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
|
|---|---|---|---|---|---|---|---|---|---|---|---|
16,400
|
_JS_FindAtom
|
bluesky950520[P]quickjs/quickjs.c
|
static JSAtom __JS_FindAtom(JSRuntime *rt, const char *str, size_t len,
int atom_type)
{
uint32_t h, h1, i;
JSAtomStruct *p;
h = hash_string8((const uint8_t *)str, len, JS_ATOM_TYPE_STRING);
h &= JS_ATOM_HASH_MASK;
h1 = h & (rt->atom_hash_size - 1);
i = rt->atom_hash[h1];
while (i != 0) {
p = rt->atom_array[i];
if (p->hash == h &&
p->atom_type == JS_ATOM_TYPE_STRING &&
p->len == len &&
p->is_wide_char == 0 &&
memcmp(p->u.str8, str, len) == 0) {
if (!__JS_AtomIsConst(i))
p->header.ref_count++;
return i;
}
i = p->hash_next;
}
return JS_ATOM_NULL;
}
|
O1
|
c
|
_JS_FindAtom:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movl $0x1, %r15d
testq %rdx, %rdx
je 0x1fe6c
xorl %eax, %eax
imull $0x107, %r15d, %ecx # imm = 0x107
movzbl (%r14,%rax), %r15d
addl %ecx, %r15d
incq %rax
cmpq %rax, %rbx
jne 0x1fe4e
andl $0x3fffffff, %r15d # imm = 0x3FFFFFFF
movl 0x50(%rdi), %eax
decl %eax
andl %r15d, %eax
movq 0x60(%rdi), %rcx
movl (%rcx,%rax,4), %ebp
testl %ebp, %ebp
je 0x1fee6
movq 0x68(%rdi), %r12
movl %ebp, %eax
movq (%r12,%rax,8), %r13
movq 0x4(%r13), %rax
testl %eax, %eax
js 0x1fede
movl %eax, %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
cmpq %rbx, %rcx
jne 0x1fede
movq %rax, %rcx
movabsq $-0x4000000000000000, %rdx # imm = 0xC000000000000000
andq %rdx, %rcx
movabsq $0x4000000000000000, %rdx # imm = 0x4000000000000000
cmpq %rdx, %rcx
jne 0x1fede
shrq $0x20, %rax
andl $0x3fffffff, %eax # imm = 0x3FFFFFFF
cmpl %r15d, %eax
jne 0x1fede
leaq 0x18(%r13), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xe6a0
testl %eax, %eax
je 0x1fef9
movl 0xc(%r13), %ebp
testl %ebp, %ebp
jne 0x1fe83
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0xe0, %ebp
jl 0x1fee8
incl (%r13)
jmp 0x1fee8
|
__JS_FindAtom:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdx
mov r14, rsi
mov r15d, 1
test rdx, rdx
jz short loc_1FE6C
xor eax, eax
loc_1FE4E:
imul ecx, r15d, 107h
movzx r15d, byte ptr [r14+rax]
add r15d, ecx
inc rax
cmp rbx, rax
jnz short loc_1FE4E
and r15d, 3FFFFFFFh
loc_1FE6C:
mov eax, [rdi+50h]
dec eax
and eax, r15d
mov rcx, [rdi+60h]
mov ebp, [rcx+rax*4]
test ebp, ebp
jz short loc_1FEE6
mov r12, [rdi+68h]
loc_1FE83:
mov eax, ebp
mov r13, [r12+rax*8]
mov rax, [r13+4]
test eax, eax
js short loc_1FEDE
mov ecx, eax
and ecx, 7FFFFFFFh
cmp rcx, rbx
jnz short loc_1FEDE
mov rcx, rax
mov rdx, 0C000000000000000h
and rcx, rdx
mov rdx, 4000000000000000h
cmp rcx, rdx
jnz short loc_1FEDE
shr rax, 20h
and eax, 3FFFFFFFh
cmp eax, r15d
jnz short loc_1FEDE
lea rdi, [r13+18h]
mov rsi, r14
mov rdx, rbx
call _bcmp
test eax, eax
jz short loc_1FEF9
loc_1FEDE:
mov ebp, [r13+0Ch]
test ebp, ebp
jnz short loc_1FE83
loc_1FEE6:
xor ebp, ebp
loc_1FEE8:
mov eax, ebp
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_1FEF9:
cmp ebp, 0E0h
jl short loc_1FEE8
inc dword ptr [r13+0]
jmp short loc_1FEE8
|
long long _JS_FindAtom(long long a1, long long a2, long long a3)
{
int v4; // r15d
long long i; // rax
int v6; // ebp
long long v7; // r12
long long v8; // r13
long long v9; // rax
v4 = 1;
if ( a3 )
{
for ( i = 0LL; i != a3; ++i )
v4 = 263 * v4 + *(unsigned __int8 *)(a2 + i);
v4 &= 0x3FFFFFFFu;
}
v6 = *(_DWORD *)(*(_QWORD *)(a1 + 96) + 4LL * (v4 & (unsigned int)(*(_DWORD *)(a1 + 80) - 1)));
if ( v6 )
{
v7 = *(_QWORD *)(a1 + 104);
while ( 1 )
{
v8 = *(_QWORD *)(v7 + 8LL * (unsigned int)v6);
v9 = *(_QWORD *)(v8 + 4);
if ( (int)v9 >= 0
&& (*(_QWORD *)(v8 + 4) & 0x7FFFFFFFLL) == a3
&& (v9 & 0xC000000000000000LL) == 0x4000000000000000LL
&& (HIDWORD(v9) & 0x3FFFFFFF) == v4
&& !(unsigned int)bcmp(v8 + 24, a2, a3, 0x4000000000000000LL) )
{
break;
}
v6 = *(_DWORD *)(v8 + 12);
if ( !v6 )
return 0;
}
if ( v6 >= 224 )
++*(_DWORD *)v8;
}
else
{
return 0;
}
return (unsigned int)v6;
}
| |||
16,401
|
_JS_FindAtom
|
bluesky950520[P]quickjs/quickjs.c
|
static JSAtom __JS_FindAtom(JSRuntime *rt, const char *str, size_t len,
int atom_type)
{
uint32_t h, h1, i;
JSAtomStruct *p;
h = hash_string8((const uint8_t *)str, len, JS_ATOM_TYPE_STRING);
h &= JS_ATOM_HASH_MASK;
h1 = h & (rt->atom_hash_size - 1);
i = rt->atom_hash[h1];
while (i != 0) {
p = rt->atom_array[i];
if (p->hash == h &&
p->atom_type == JS_ATOM_TYPE_STRING &&
p->len == len &&
p->is_wide_char == 0 &&
memcmp(p->u.str8, str, len) == 0) {
if (!__JS_AtomIsConst(i))
p->header.ref_count++;
return i;
}
i = p->hash_next;
}
return JS_ATOM_NULL;
}
|
O2
|
c
|
_JS_FindAtom:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
pushq $0x1
popq %rdx
movq %rsi, %rdi
movq %rbx, %rsi
callq 0x34631
movl %eax, %ebp
movl 0x50(%r15), %r13d
decl %r13d
andl %eax, %r13d
andl $0x3fffffff, %ebp # imm = 0x3FFFFFFF
shll $0x2, %r13d
addq 0x60(%r15), %r13
movl (%r13), %r12d
testq %r12, %r12
je 0x1a2d8
movq 0x68(%r15), %rax
movq (%rax,%r12,8), %r13
movq 0x4(%r13), %rax
testl %eax, %eax
js 0x1a2c5
movl %eax, %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
cmpq %rbx, %rcx
jne 0x1a2c5
movq %rax, %rcx
movabsq $-0x4000000000000000, %rdx # imm = 0xC000000000000000
andq %rdx, %rcx
movabsq $0x4000000000000000, %rdx # imm = 0x4000000000000000
cmpq %rdx, %rcx
jne 0x1a2c5
shrq $0x20, %rax
andl $0x3fffffff, %eax # imm = 0x3FFFFFFF
cmpl %ebp, %eax
jne 0x1a2c5
leaq 0x18(%r13), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xe6c0
testl %eax, %eax
je 0x1a2cb
addq $0xc, %r13
jmp 0x1a260
cmpl $0xe0, %r12d
jl 0x1a2d8
incl (%r13)
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
__JS_FindAtom:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdx
mov r14, rsi
mov r15, rdi
push 1
pop rdx
mov rdi, rsi
mov rsi, rbx
call hash_string8
mov ebp, eax
mov r13d, [r15+50h]
dec r13d
and r13d, eax
and ebp, 3FFFFFFFh
shl r13d, 2
add r13, [r15+60h]
loc_1A260:
mov r12d, [r13+0]
test r12, r12
jz short loc_1A2D8
mov rax, [r15+68h]
mov r13, [rax+r12*8]
mov rax, [r13+4]
test eax, eax
js short loc_1A2C5
mov ecx, eax
and ecx, 7FFFFFFFh
cmp rcx, rbx
jnz short loc_1A2C5
mov rcx, rax
mov rdx, 0C000000000000000h
and rcx, rdx
mov rdx, 4000000000000000h
cmp rcx, rdx
jnz short loc_1A2C5
shr rax, 20h
and eax, 3FFFFFFFh
cmp eax, ebp
jnz short loc_1A2C5
lea rdi, [r13+18h]
mov rsi, r14
mov rdx, rbx
call _bcmp
test eax, eax
jz short loc_1A2CB
loc_1A2C5:
add r13, 0Ch
jmp short loc_1A260
loc_1A2CB:
cmp r12d, 0E0h
jl short loc_1A2D8
inc dword ptr [r13+0]
loc_1A2D8:
mov eax, r12d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long _JS_FindAtom(long long a1, long long a2, long long a3)
{
int v4; // eax
int v5; // ebp
_DWORD *i; // r13
long long v7; // r12
long long v8; // r13
long long v9; // rax
v4 = hash_string8(a2, a3, 1LL);
v5 = v4 & 0x3FFFFFFF;
for ( i = (_DWORD *)(*(_QWORD *)(a1 + 96) + 4 * (v4 & (unsigned int)(*(_DWORD *)(a1 + 80) - 1)));
;
i = (_DWORD *)(v8 + 12) )
{
v7 = (unsigned int)*i;
if ( !*i )
break;
v8 = *(_QWORD *)(*(_QWORD *)(a1 + 104) + 8 * v7);
v9 = *(_QWORD *)(v8 + 4);
if ( (int)v9 >= 0
&& (*(_QWORD *)(v8 + 4) & 0x7FFFFFFFLL) == a3
&& (v9 & 0xC000000000000000LL) == 0x4000000000000000LL
&& (HIDWORD(v9) & 0x3FFFFFFF) == v5
&& !(unsigned int)bcmp(v8 + 24, a2, a3, 0x4000000000000000LL) )
{
if ( (int)v7 >= 224 )
++*(_DWORD *)v8;
return (unsigned int)v7;
}
}
return (unsigned int)v7;
}
|
__JS_FindAtom:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
PUSH 0x1
POP RDX
MOV RDI,RSI
MOV RSI,RBX
CALL 0x00134631
MOV EBP,EAX
MOV R13D,dword ptr [R15 + 0x50]
DEC R13D
AND R13D,EAX
AND EBP,0x3fffffff
SHL R13D,0x2
ADD R13,qword ptr [R15 + 0x60]
LAB_0011a260:
MOV R12D,dword ptr [R13]
TEST R12,R12
JZ 0x0011a2d8
MOV RAX,qword ptr [R15 + 0x68]
MOV R13,qword ptr [RAX + R12*0x8]
MOV RAX,qword ptr [R13 + 0x4]
TEST EAX,EAX
JS 0x0011a2c5
MOV ECX,EAX
AND ECX,0x7fffffff
CMP RCX,RBX
JNZ 0x0011a2c5
MOV RCX,RAX
MOV RDX,-0x4000000000000000
AND RCX,RDX
MOV RDX,0x4000000000000000
CMP RCX,RDX
JNZ 0x0011a2c5
SHR RAX,0x20
AND EAX,0x3fffffff
CMP EAX,EBP
JNZ 0x0011a2c5
LEA RDI,[R13 + 0x18]
MOV RSI,R14
MOV RDX,RBX
CALL 0x0010e6c0
TEST EAX,EAX
JZ 0x0011a2cb
LAB_0011a2c5:
ADD R13,0xc
JMP 0x0011a260
LAB_0011a2cb:
CMP R12D,0xe0
JL 0x0011a2d8
INC dword ptr [R13]
LAB_0011a2d8:
MOV EAX,R12D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong __JS_FindAtom(long param_1,void *param_2,size_t param_3)
{
uint uVar1;
int *piVar2;
ulong uVar3;
uint uVar4;
int iVar5;
ulong uVar6;
uint *puVar7;
uVar4 = hash_string8(param_2,param_3,1);
puVar7 = (uint *)((ulong)((*(int *)(param_1 + 0x50) - 1U & uVar4) << 2) +
*(long *)(param_1 + 0x60));
while( true ) {
uVar1 = *puVar7;
uVar6 = (ulong)uVar1;
if (uVar6 == 0) {
return 0;
}
piVar2 = *(int **)(*(long *)(param_1 + 0x68) + uVar6 * 8);
uVar3 = *(ulong *)(piVar2 + 1);
if ((((-1 < (int)(uint)uVar3) && (((uint)uVar3 & 0x7fffffff) == param_3)) &&
((uVar3 & 0xc000000000000000) == 0x4000000000000000)) &&
((((uint)(uVar3 >> 0x20) & 0x3fffffff) == (uVar4 & 0x3fffffff) &&
(iVar5 = bcmp(piVar2 + 6,param_2,param_3), iVar5 == 0)))) break;
puVar7 = (uint *)(piVar2 + 3);
}
if ((int)uVar1 < 0xe0) {
return uVar6;
}
*piVar2 = *piVar2 + 1;
return uVar6;
}
|
|
16,402
|
create_table_share_lock_stat()
|
eloqsql/storage/perfschema/pfs_instr_class.cc
|
PFS_table_share_lock*
create_table_share_lock_stat()
{
PFS_table_share_lock *pfs= NULL;
pfs_dirty_state dirty_state;
/* Create a new record in table stat array. */
pfs= global_table_share_lock_container.allocate(& dirty_state);
if (pfs != NULL)
{
/* Reset the stats. */
pfs->m_stat.reset();
/* Use this stat buffer. */
pfs->m_lock.dirty_to_allocated(& dirty_state);
}
return pfs;
}
|
O0
|
cpp
|
create_table_share_lock_stat():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq $0x0, -0x8(%rbp)
leaq 0x3cce21(%rip), %rdi # 0x3fa738
leaq -0xc(%rbp), %rsi
callq 0x30a60
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x2d945
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
callq 0x30e10
movq -0x8(%rbp), %rdi
leaq -0xc(%rbp), %rsi
callq 0x30e60
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nop
|
_Z28create_table_share_lock_statv:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], 0
lea rdi, global_table_share_lock_container
lea rsi, [rbp+var_C]
call _ZN29PFS_buffer_scalable_containerI20PFS_table_share_lockLi4096ELi4096E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE8allocateEP15pfs_dirty_state; PFS_buffer_scalable_container<PFS_table_share_lock,4096,4096,PFS_buffer_default_array<PFS_table_share_lock>,PFS_buffer_default_allocator<PFS_table_share_lock>>::allocate(pfs_dirty_state *)
mov [rbp+var_8], rax
cmp [rbp+var_8], 0
jz short loc_2D945
mov rdi, [rbp+var_8]
add rdi, 8; this
call _ZN19PFS_table_lock_stat5resetEv; PFS_table_lock_stat::reset(void)
mov rdi, [rbp+var_8]
lea rsi, [rbp+var_C]
call _ZN8pfs_lock18dirty_to_allocatedEPK15pfs_dirty_state; pfs_lock::dirty_to_allocated(pfs_dirty_state const*)
loc_2D945:
mov rax, [rbp+var_8]
add rsp, 10h
pop rbp
retn
|
long long create_table_share_lock_stat(void)
{
_BYTE v1[4]; // [rsp+4h] [rbp-Ch] BYREF
long long v2; // [rsp+8h] [rbp-8h]
v2 = 0LL;
v2 = PFS_buffer_scalable_container<PFS_table_share_lock,4096,4096,PFS_buffer_default_array<PFS_table_share_lock>,PFS_buffer_default_allocator<PFS_table_share_lock>>::allocate(
&global_table_share_lock_container,
v1);
if ( v2 )
{
PFS_table_lock_stat::reset((PFS_table_lock_stat *)(v2 + 8));
pfs_lock::dirty_to_allocated(v2, v1);
}
return v2;
}
|
create_table_share_lock_stat:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],0x0
LEA RDI,[0x4fa738]
LEA RSI,[RBP + -0xc]
CALL 0x00130a60
MOV qword ptr [RBP + -0x8],RAX
CMP qword ptr [RBP + -0x8],0x0
JZ 0x0012d945
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x8
CALL 0x00130e10
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[RBP + -0xc]
CALL 0x00130e60
LAB_0012d945:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x10
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* create_table_share_lock_stat() */
pfs_lock * create_table_share_lock_stat(void)
{
pfs_dirty_state local_14 [4];
pfs_lock *local_10;
local_10 = (pfs_lock *)0x0;
local_10 = (pfs_lock *)
PFS_buffer_scalable_container<PFS_table_share_lock,4096,4096,PFS_buffer_default_array<PFS_table_share_lock>,PFS_buffer_default_allocator<PFS_table_share_lock>>
::allocate((PFS_buffer_scalable_container<PFS_table_share_lock,4096,4096,PFS_buffer_default_array<PFS_table_share_lock>,PFS_buffer_default_allocator<PFS_table_share_lock>>
*)global_table_share_lock_container,local_14);
if (local_10 != (pfs_lock *)0x0) {
PFS_table_lock_stat::reset((PFS_table_lock_stat *)(local_10 + 8));
pfs_lock::dirty_to_allocated(local_10,local_14);
}
return local_10;
}
|
|
16,403
|
ma_bitmap_find_place
|
eloqsql/storage/maria/ma_bitmap.c
|
my_bool _ma_bitmap_find_place(MARIA_HA *info, MARIA_ROW *row,
MARIA_BITMAP_BLOCKS *blocks)
{
MARIA_SHARE *share= info->s;
my_bool res= 1;
uint full_page_size, position, max_page_size;
uint head_length, row_length, rest_length, extents_length;
DBUG_ENTER("_ma_bitmap_find_place");
blocks->count= 0;
blocks->tail_page_skipped= blocks->page_skipped= 0;
row->extents_count= 0;
/*
Reserve place for the following blocks:
- Head block
- Full page block
- Marker block to allow write_block_record() to split full page blocks
into full and free part
- Tail block
*/
info->bitmap_blocks.elements= ELEMENTS_RESERVED_FOR_MAIN_PART;
max_page_size= (share->block_size - PAGE_OVERHEAD_SIZE(share));
mysql_mutex_lock(&share->bitmap.bitmap_lock);
if (row->total_length <= max_page_size)
{
/* Row fits in one page */
position= ELEMENTS_RESERVED_FOR_MAIN_PART - 1;
if (find_head(info, (uint) row->total_length, position))
goto abort;
row->space_on_head_page= row->total_length;
goto end;
}
/*
First allocate all blobs so that we can find out the needed size for
the main block.
*/
if (row->blob_length && allocate_blobs(info, row))
goto abort;
extents_length= row->extents_count * ROW_EXTENT_SIZE;
/*
The + 3 is reserved for storing the number of segments in the row header.
*/
if ((head_length= (row->head_length + extents_length + 3)) <=
max_page_size)
{
/* Main row part fits into one page */
position= ELEMENTS_RESERVED_FOR_MAIN_PART - 1;
if (find_head(info, head_length, position))
goto abort;
row->space_on_head_page= head_length;
goto end;
}
/* Allocate enough space */
head_length+= ELEMENTS_RESERVED_FOR_MAIN_PART * ROW_EXTENT_SIZE;
/* The first segment size is stored in 'row_length' */
row_length= find_where_to_split_row(share, row, row->extents_count +
ELEMENTS_RESERVED_FOR_MAIN_PART-1,
max_page_size);
full_page_size= MAX_TAIL_SIZE(share->block_size);
position= 0;
rest_length= head_length - row_length;
if (rest_length <= full_page_size)
position= ELEMENTS_RESERVED_FOR_MAIN_PART -2; /* Only head and tail */
if (find_head(info, row_length, position))
goto abort;
row->space_on_head_page= row_length;
if (write_rest_of_head(info, position, rest_length))
goto abort;
end:
blocks->block= dynamic_element(&info->bitmap_blocks, position,
MARIA_BITMAP_BLOCK*);
blocks->block->sub_blocks= ELEMENTS_RESERVED_FOR_MAIN_PART - position;
/* First block's page_count is for all blocks */
blocks->count= info->bitmap_blocks.elements - position;
res= 0;
abort:
mysql_mutex_unlock(&share->bitmap.bitmap_lock);
DBUG_RETURN(res);
}
|
O3
|
c
|
ma_bitmap_find_place:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r13
movq %rdi, %r15
movq (%rdi), %r14
xorl %eax, %eax
movl %eax, 0x8(%rdx)
movq %rdx, -0x48(%rbp)
movw $0x0, 0xc(%rdx)
movl %eax, 0xac(%rsi)
movl $0x4, 0x2c8(%rdi)
movl 0x7bc(%r14), %ebx
subl 0xc18(%r14), %ebx
addl $-0x14, %ebx
leaq 0xa98(%r14), %rdi
cmpq $0x0, 0xad8(%r14)
movq %rdi, -0x50(%rbp)
jne 0x3d5c8
callq 0x2a230
movq 0x90(%r13), %rsi
movl %ebx, %eax
cmpq %rax, %rsi
movq %r15, -0x30(%rbp)
jbe 0x3d52c
cmpq $0x0, 0x88(%r13)
je 0x3d494
movq -0x30(%rbp), %rdi
movq %r13, %rsi
callq 0x3d966
movb $0x1, %r15b
testb %al, %al
jne 0x3d5a1
movl 0xa0(%r13), %r15d
movl 0xac(%r13), %edx
leal (,%rdx,8), %eax
subl %edx, %eax
leal (%r15,%rax), %r12d
addl $0x3, %r12d
cmpl %ebx, %r12d
jbe 0x3d549
addl %eax, %r15d
addl $0x3, %edx
movq %r14, %rdi
movq %r13, %rsi
movl %ebx, %ecx
callq 0x3db1d
movl %eax, %esi
movl 0x7bc(%r14), %eax
leal (%rax,%rax,2), %eax
shrl $0x2, %eax
subl %esi, %r15d
addl $0x1f, %r15d
xorl %ebx, %ebx
movq %r15, -0x40(%rbp)
cmpl %eax, %r15d
setbe %bl
addl %ebx, %ebx
movq -0x30(%rbp), %r12
movq %r12, %rdi
movl %esi, -0x34(%rbp)
movl %ebx, %edx
callq 0x3d5f0
movb $0x1, %r15b
testb %al, %al
jne 0x3d5a1
movl -0x34(%rbp), %eax
movl %eax, 0xb8(%r13)
movl -0x40(%rbp), %edx
movq %r12, %rdi
movl %ebx, %esi
callq 0x3dbb9
testb %al, %al
jne 0x3d5a1
jmp 0x3d56d
movq %r15, %rdi
movl $0x3, %edx
callq 0x3d5f0
movb $0x1, %r15b
testb %al, %al
jne 0x3d5a1
movl 0x90(%r13), %r12d
jmp 0x3d561
movq -0x30(%rbp), %rdi
movl %r12d, %esi
movl $0x3, %edx
callq 0x3d5f0
movb $0x1, %r15b
testb %al, %al
jne 0x3d5a1
movl %r12d, 0xb8(%r13)
movl $0x3, %ebx
movq -0x30(%rbp), %rsi
movq 0x2c0(%rsi), %rax
movl %ebx, %ecx
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rcx,8), %rax
movq -0x48(%rbp), %rdx
movq %rax, (%rdx)
movl $0x4, %ecx
subl %ebx, %ecx
movl %ecx, 0x10(%rax)
movl 0x2c8(%rsi), %eax
subl %ebx, %eax
movl %eax, 0x8(%rdx)
xorl %r15d, %r15d
movq 0xad8(%r14), %rdi
testq %rdi, %rdi
jne 0x3d5de
movq -0x50(%rbp), %rdi
callq 0x2a1f0
movl %r15d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xbb78e(%rip), %rsi # 0xf8d5d
movl $0x846, %edx # imm = 0x846
callq 0x312ea
jmp 0x3d45d
leaq 0x371433(%rip), %rax # 0x3aea18
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x3d5ad
|
_ma_bitmap_find_place:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r13, rsi
mov r15, rdi
mov r14, [rdi]
xor eax, eax
mov [rdx+8], eax
mov [rbp+var_48], rdx
mov word ptr [rdx+0Ch], 0
mov [rsi+0ACh], eax
mov dword ptr [rdi+2C8h], 4
mov ebx, [r14+7BCh]
sub ebx, [r14+0C18h]
add ebx, 0FFFFFFECh
lea rdi, [r14+0A98h]
cmp qword ptr [r14+0AD8h], 0
mov [rbp+var_50], rdi
jnz loc_3D5C8
call _pthread_mutex_lock
loc_3D45D:
mov rsi, [r13+90h]
mov eax, ebx
cmp rsi, rax
mov [rbp+var_30], r15
jbe loc_3D52C
cmp qword ptr [r13+88h], 0
jz short loc_3D494
mov rdi, [rbp+var_30]
mov rsi, r13
call allocate_blobs
mov r15b, 1
test al, al
jnz loc_3D5A1
loc_3D494:
mov r15d, [r13+0A0h]
mov edx, [r13+0ACh]
lea eax, ds:0[rdx*8]
sub eax, edx
lea r12d, [r15+rax]
add r12d, 3
cmp r12d, ebx
jbe loc_3D549
add r15d, eax
add edx, 3
mov rdi, r14
mov rsi, r13
mov ecx, ebx
call find_where_to_split_row
mov esi, eax
mov eax, [r14+7BCh]
lea eax, [rax+rax*2]
shr eax, 2
sub r15d, esi
add r15d, 1Fh
xor ebx, ebx
mov [rbp+var_40], r15
cmp r15d, eax
setbe bl
add ebx, ebx
mov r12, [rbp+var_30]
mov rdi, r12
mov [rbp+var_34], esi
mov edx, ebx
call find_head
mov r15b, 1
test al, al
jnz loc_3D5A1
mov eax, [rbp+var_34]
mov [r13+0B8h], eax
mov edx, dword ptr [rbp+var_40]
mov rdi, r12
mov esi, ebx
call write_rest_of_head
test al, al
jnz short loc_3D5A1
jmp short loc_3D56D
loc_3D52C:
mov rdi, r15
mov edx, 3
call find_head
mov r15b, 1
test al, al
jnz short loc_3D5A1
mov r12d, [r13+90h]
jmp short loc_3D561
loc_3D549:
mov rdi, [rbp+var_30]
mov esi, r12d
mov edx, 3
call find_head
mov r15b, 1
test al, al
jnz short loc_3D5A1
loc_3D561:
mov [r13+0B8h], r12d
mov ebx, 3
loc_3D56D:
mov rsi, [rbp+var_30]
mov rax, [rsi+2C0h]
mov ecx, ebx
lea rcx, [rcx+rcx*2]
lea rax, [rax+rcx*8]
mov rdx, [rbp+var_48]
mov [rdx], rax
mov ecx, 4
sub ecx, ebx
mov [rax+10h], ecx
mov eax, [rsi+2C8h]
sub eax, ebx
mov [rdx+8], eax
xor r15d, r15d
loc_3D5A1:
mov rdi, [r14+0AD8h]
test rdi, rdi
jnz short loc_3D5DE
loc_3D5AD:
mov rdi, [rbp+var_50]
call _pthread_mutex_unlock
mov eax, r15d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3D5C8:
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 846h
call psi_mutex_lock
jmp loc_3D45D
loc_3D5DE:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_3D5AD
|
long long ma_bitmap_find_place(long long *a1, long long a2, long long a3)
{
long long *v4; // r15
long long v5; // r14
unsigned int v6; // ebx
long long v7; // rdi
unsigned long long v8; // rsi
int v9; // edx
unsigned int v10; // r12d
int v11; // r15d
unsigned int where_to_split_row; // eax
unsigned int v13; // ebx
char head; // al
long long v15; // rax
long long v16; // rdi
unsigned int v19; // [rsp+10h] [rbp-40h]
unsigned int v20; // [rsp+1Ch] [rbp-34h]
long long *v21; // [rsp+20h] [rbp-30h]
v4 = a1;
v5 = *a1;
*(_DWORD *)(a3 + 8) = 0;
*(_WORD *)(a3 + 12) = 0;
*(_DWORD *)(a2 + 172) = 0;
*((_DWORD *)a1 + 178) = 4;
v6 = *(_DWORD *)(v5 + 1980) - *(_DWORD *)(v5 + 3096) - 20;
v7 = v5 + 2712;
if ( *(_QWORD *)(v5 + 2776) )
psi_mutex_lock(v7, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 0x846u);
else
pthread_mutex_lock(v7);
v8 = *(_QWORD *)(a2 + 144);
v21 = v4;
if ( v8 <= v6 )
{
head = find_head(v4, v8, 3LL);
LOBYTE(v4) = 1;
if ( head )
goto LABEL_15;
v10 = *(_DWORD *)(a2 + 144);
LABEL_13:
*(_DWORD *)(a2 + 184) = v10;
v13 = 3;
LABEL_14:
v15 = v21[88] + 24LL * v13;
*(_QWORD *)a3 = v15;
*(_DWORD *)(v15 + 16) = 4 - v13;
*(_DWORD *)(a3 + 8) = *((_DWORD *)v21 + 178) - v13;
LODWORD(v4) = 0;
goto LABEL_15;
}
if ( *(_QWORD *)(a2 + 136) )
{
LOBYTE(v4) = 1;
if ( (unsigned __int8)allocate_blobs(v21, a2) )
goto LABEL_15;
}
LODWORD(v4) = *(_DWORD *)(a2 + 160);
v9 = *(_DWORD *)(a2 + 172);
v10 = (_DWORD)v4 + 7 * v9 + 3;
if ( v10 <= v6 )
{
LOBYTE(v4) = 1;
if ( (unsigned __int8)find_head(v21, v10, 3LL) )
goto LABEL_15;
goto LABEL_13;
}
v11 = 7 * v9 + (_DWORD)v4;
where_to_split_row = find_where_to_split_row(v5, a2, (unsigned int)(v9 + 3), v6);
LODWORD(v4) = v11 - where_to_split_row + 31;
v19 = (unsigned int)v4;
v13 = 2 * ((unsigned int)v4 <= (unsigned int)(3 * *(_DWORD *)(v5 + 1980)) >> 2);
v20 = where_to_split_row;
LOBYTE(v4) = 1;
if ( !(unsigned __int8)find_head(v21, where_to_split_row, v13) )
{
*(_DWORD *)(a2 + 184) = v20;
if ( !(unsigned __int8)write_rest_of_head(v21, v13, v19) )
goto LABEL_14;
}
LABEL_15:
v16 = *(_QWORD *)(v5 + 2776);
if ( v16 )
((void ( *)(long long))PSI_server[44])(v16);
pthread_mutex_unlock(v5 + 2712);
return (unsigned int)v4;
}
|
_ma_bitmap_find_place:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R13,RSI
MOV R15,RDI
MOV R14,qword ptr [RDI]
XOR EAX,EAX
MOV dword ptr [RDX + 0x8],EAX
MOV qword ptr [RBP + -0x48],RDX
MOV word ptr [RDX + 0xc],0x0
MOV dword ptr [RSI + 0xac],EAX
MOV dword ptr [RDI + 0x2c8],0x4
MOV EBX,dword ptr [R14 + 0x7bc]
SUB EBX,dword ptr [R14 + 0xc18]
ADD EBX,-0x14
LEA RDI,[R14 + 0xa98]
CMP qword ptr [R14 + 0xad8],0x0
MOV qword ptr [RBP + -0x50],RDI
JNZ 0x0013d5c8
CALL 0x0012a230
LAB_0013d45d:
MOV RSI,qword ptr [R13 + 0x90]
MOV EAX,EBX
CMP RSI,RAX
MOV qword ptr [RBP + -0x30],R15
JBE 0x0013d52c
CMP qword ptr [R13 + 0x88],0x0
JZ 0x0013d494
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,R13
CALL 0x0013d966
MOV R15B,0x1
TEST AL,AL
JNZ 0x0013d5a1
LAB_0013d494:
MOV R15D,dword ptr [R13 + 0xa0]
MOV EDX,dword ptr [R13 + 0xac]
LEA EAX,[RDX*0x8]
SUB EAX,EDX
LEA R12D,[R15 + RAX*0x1]
ADD R12D,0x3
CMP R12D,EBX
JBE 0x0013d549
ADD R15D,EAX
ADD EDX,0x3
MOV RDI,R14
MOV RSI,R13
MOV ECX,EBX
CALL 0x0013db1d
MOV ESI,EAX
MOV EAX,dword ptr [R14 + 0x7bc]
LEA EAX,[RAX + RAX*0x2]
SHR EAX,0x2
SUB R15D,ESI
ADD R15D,0x1f
XOR EBX,EBX
MOV qword ptr [RBP + -0x40],R15
CMP R15D,EAX
SETBE BL
ADD EBX,EBX
MOV R12,qword ptr [RBP + -0x30]
MOV RDI,R12
MOV dword ptr [RBP + -0x34],ESI
MOV EDX,EBX
CALL 0x0013d5f0
MOV R15B,0x1
TEST AL,AL
JNZ 0x0013d5a1
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [R13 + 0xb8],EAX
MOV EDX,dword ptr [RBP + -0x40]
MOV RDI,R12
MOV ESI,EBX
CALL 0x0013dbb9
TEST AL,AL
JNZ 0x0013d5a1
JMP 0x0013d56d
LAB_0013d52c:
MOV RDI,R15
MOV EDX,0x3
CALL 0x0013d5f0
MOV R15B,0x1
TEST AL,AL
JNZ 0x0013d5a1
MOV R12D,dword ptr [R13 + 0x90]
JMP 0x0013d561
LAB_0013d549:
MOV RDI,qword ptr [RBP + -0x30]
MOV ESI,R12D
MOV EDX,0x3
CALL 0x0013d5f0
MOV R15B,0x1
TEST AL,AL
JNZ 0x0013d5a1
LAB_0013d561:
MOV dword ptr [R13 + 0xb8],R12D
MOV EBX,0x3
LAB_0013d56d:
MOV RSI,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RSI + 0x2c0]
MOV ECX,EBX
LEA RCX,[RCX + RCX*0x2]
LEA RAX,[RAX + RCX*0x8]
MOV RDX,qword ptr [RBP + -0x48]
MOV qword ptr [RDX],RAX
MOV ECX,0x4
SUB ECX,EBX
MOV dword ptr [RAX + 0x10],ECX
MOV EAX,dword ptr [RSI + 0x2c8]
SUB EAX,EBX
MOV dword ptr [RDX + 0x8],EAX
XOR R15D,R15D
LAB_0013d5a1:
MOV RDI,qword ptr [R14 + 0xad8]
TEST RDI,RDI
JNZ 0x0013d5de
LAB_0013d5ad:
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x0012a1f0
MOV EAX,R15D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013d5c8:
LEA RSI,[0x1f8d5d]
MOV EDX,0x846
CALL 0x001312ea
JMP 0x0013d45d
LAB_0013d5de:
LEA RAX,[0x4aea18]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0013d5ad
|
ulong _ma_bitmap_find_place(long *param_1,long param_2,long *param_3)
{
pthread_mutex_t *__mutex;
long lVar1;
int iVar2;
long lVar3;
int iVar4;
char cVar5;
int iVar6;
uint uVar7;
uint uVar8;
int7 uVar10;
ulong uVar9;
lVar3 = *param_1;
*(int4 *)(param_3 + 1) = 0;
*(int2 *)((long)param_3 + 0xc) = 0;
*(int4 *)(param_2 + 0xac) = 0;
*(int4 *)(param_1 + 0x59) = 4;
uVar7 = (*(int *)(lVar3 + 0x7bc) - *(int *)(lVar3 + 0xc18)) - 0x14;
__mutex = (pthread_mutex_t *)(lVar3 + 0xa98);
if (*(long *)(lVar3 + 0xad8) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c",
0x846);
}
uVar10 = (int7)((ulong)param_1 >> 8);
if ((ulong)uVar7 < *(ulong *)(param_2 + 0x90)) {
if (*(long *)(param_2 + 0x88) != 0) {
cVar5 = allocate_blobs(param_1,param_2);
uVar9 = CONCAT71(uVar10,1);
if (cVar5 != '\0') goto LAB_0013d5a1;
}
iVar2 = *(int *)(param_2 + 0xa0);
iVar4 = *(int *)(param_2 + 0xac) * 7;
uVar8 = iVar2 + iVar4 + 3;
if (uVar8 <= uVar7) {
cVar5 = find_head(param_1,uVar8,3);
uVar9 = CONCAT71((uint7)(uint3)((uint)iVar2 >> 8),1);
if (cVar5 != '\0') goto LAB_0013d5a1;
goto LAB_0013d561;
}
iVar6 = find_where_to_split_row(lVar3,param_2,*(int *)(param_2 + 0xac) + 3,uVar7);
uVar8 = ((iVar2 + iVar4) - iVar6) + 0x1f;
uVar7 = (uint)(uVar8 <= (uint)(*(int *)(lVar3 + 0x7bc) * 3) >> 2) * 2;
cVar5 = find_head(param_1,iVar6,uVar7);
uVar9 = CONCAT71((uint7)(uint3)(uVar8 >> 8),1);
if (cVar5 != '\0') goto LAB_0013d5a1;
*(int *)(param_2 + 0xb8) = iVar6;
cVar5 = write_rest_of_head(param_1,uVar7,uVar8);
if (cVar5 != '\0') goto LAB_0013d5a1;
}
else {
cVar5 = find_head(param_1,*(ulong *)(param_2 + 0x90),3);
uVar9 = CONCAT71(uVar10,1);
if (cVar5 != '\0') goto LAB_0013d5a1;
uVar8 = *(uint *)(param_2 + 0x90);
LAB_0013d561:
*(uint *)(param_2 + 0xb8) = uVar8;
uVar7 = 3;
}
lVar1 = param_1[0x58] + (ulong)uVar7 * 0x18;
*param_3 = lVar1;
*(uint *)(lVar1 + 0x10) = 4 - uVar7;
*(uint *)(param_3 + 1) = (int)param_1[0x59] - uVar7;
uVar9 = 0;
LAB_0013d5a1:
if (*(long *)(lVar3 + 0xad8) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
return uVar9 & 0xffffffff;
}
|
|
16,404
|
ImPool<ImPlot3DPlot>::Add()
|
zkingston[P]unknot/build_O1/_deps/imgui-src/imgui_internal.h
|
T* Add() { int idx = FreeIdx; if (idx == Buf.Size) { Buf.resize(Buf.Size + 1); FreeIdx++; } else { FreeIdx = *(int*)&Buf[idx]; } IM_PLACEMENT_NEW(&Buf[idx]) T(); AliveCount++; return &Buf[idx]; }
|
O1
|
c
|
ImPool<ImPlot3DPlot>::Add():
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movslq 0x20(%rdi), %r15
movl (%rdi), %ecx
cmpl %ecx, %r15d
jne 0x561dc
leal 0x1(%rcx), %ebp
movl 0x4(%rbx), %eax
cmpl %ecx, %eax
jg 0x5623c
testl %eax, %eax
je 0x561ec
movl %eax, %r12d
shrl $0x1f, %r12d
addl %eax, %r12d
sarl %r12d
addl %eax, %r12d
jmp 0x561f2
movq 0x8(%rbx), %rax
imulq $0x2e0, %r15, %rcx # imm = 0x2E0
movl (%rax,%rcx), %eax
jmp 0x56243
movl $0x8, %r12d
cmpl %ebp, %r12d
cmovlel %ebp, %r12d
cmpl %r12d, %eax
jge 0x5623c
movslq %r12d, %rax
imulq $0x2e0, %rax, %rdi # imm = 0x2E0
callq 0x2130dc
movq %rax, %r14
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x56234
movslq (%rbx), %rax
imulq $0x2e0, %rax, %rdx # imm = 0x2E0
movq %r14, %rdi
callq 0xf810
movq 0x8(%rbx), %rdi
callq 0x21318e
movq %r14, 0x8(%rbx)
movl %r12d, 0x4(%rbx)
movl %ebp, (%rbx)
movl 0x20(%rbx), %eax
incl %eax
movl %eax, 0x20(%rbx)
imulq $0x2e0, %r15, %r14 # imm = 0x2E0
movq 0x8(%rbx), %rdi
addq %r14, %rdi
callq 0x5626c
incl 0x24(%rbx)
addq 0x8(%rbx), %r14
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
_ZN6ImPoolI12ImPlot3DPlotE3AddEv:
push rbp
push r15
push r14
push r12
push rbx
mov rbx, rdi
movsxd r15, dword ptr [rdi+20h]
mov ecx, [rdi]
cmp r15d, ecx
jnz short loc_561DC
lea ebp, [rcx+1]
mov eax, [rbx+4]
cmp eax, ecx
jg short loc_5623C
test eax, eax
jz short loc_561EC
mov r12d, eax
shr r12d, 1Fh
add r12d, eax
sar r12d, 1
add r12d, eax
jmp short loc_561F2
loc_561DC:
mov rax, [rbx+8]
imul rcx, r15, 2E0h
mov eax, [rax+rcx]
jmp short loc_56243
loc_561EC:
mov r12d, 8
loc_561F2:
cmp r12d, ebp
cmovle r12d, ebp
cmp eax, r12d
jge short loc_5623C
movsxd rax, r12d
imul rdi, rax, 2E0h; this
call _ZN5ImGui8MemAllocEm; ImGui::MemAlloc(ulong)
mov r14, rax
mov rsi, [rbx+8]; void *
test rsi, rsi
jz short loc_56234
movsxd rax, dword ptr [rbx]
imul rdx, rax, 2E0h
mov rdi, r14
call _memcpy
mov rdi, [rbx+8]; this
call _ZN5ImGui7MemFreeEPv; ImGui::MemFree(void *)
loc_56234:
mov [rbx+8], r14
mov [rbx+4], r12d
loc_5623C:
mov [rbx], ebp
mov eax, [rbx+20h]
inc eax
loc_56243:
mov [rbx+20h], eax
imul r14, r15, 2E0h
mov rdi, [rbx+8]
add rdi, r14; this
call _ZN12ImPlot3DPlotC2Ev; ImPlot3DPlot::ImPlot3DPlot(void)
inc dword ptr [rbx+24h]
add r14, [rbx+8]
mov rax, r14
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long ImPool<ImPlot3DPlot>::Add(int *a1, unsigned long long a2)
{
long long v2; // r15
int v3; // ecx
int v4; // ebp
int v5; // eax
int v6; // r12d
int v7; // eax
long long v8; // r14
void *v9; // rsi
v2 = a1[8];
v3 = *a1;
if ( (_DWORD)v2 == *a1 )
{
v4 = v3 + 1;
v5 = a1[1];
if ( v5 <= v3 )
{
if ( v5 )
v6 = v5 + v5 / 2;
else
v6 = 8;
if ( v6 <= v4 )
v6 = v3 + 1;
if ( v5 < v6 )
{
v8 = ImGui::MemAlloc((ImGui *)(736LL * v6), a2);
v9 = (void *)*((_QWORD *)a1 + 1);
if ( v9 )
{
memcpy(v8, v9, 736LL * *a1);
ImGui::MemFree(*((ImGui **)a1 + 1), v9);
}
*((_QWORD *)a1 + 1) = v8;
a1[1] = v6;
}
}
*a1 = v4;
v7 = a1[8] + 1;
}
else
{
v7 = *(_DWORD *)(*((_QWORD *)a1 + 1) + 736 * v2);
}
a1[8] = v7;
ImPlot3DPlot::ImPlot3DPlot((ImPlot3DPlot *)(736 * v2 + *((_QWORD *)a1 + 1)));
++a1[9];
return *((_QWORD *)a1 + 1) + 736 * v2;
}
|
Add:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDI
MOVSXD R15,dword ptr [RDI + 0x20]
MOV ECX,dword ptr [RDI]
CMP R15D,ECX
JNZ 0x001561dc
LEA EBP,[RCX + 0x1]
MOV EAX,dword ptr [RBX + 0x4]
CMP EAX,ECX
JG 0x0015623c
TEST EAX,EAX
JZ 0x001561ec
MOV R12D,EAX
SHR R12D,0x1f
ADD R12D,EAX
SAR R12D,0x1
ADD R12D,EAX
JMP 0x001561f2
LAB_001561dc:
MOV RAX,qword ptr [RBX + 0x8]
IMUL RCX,R15,0x2e0
MOV EAX,dword ptr [RAX + RCX*0x1]
JMP 0x00156243
LAB_001561ec:
MOV R12D,0x8
LAB_001561f2:
CMP R12D,EBP
CMOVLE R12D,EBP
CMP EAX,R12D
JGE 0x0015623c
MOVSXD RAX,R12D
IMUL RDI,RAX,0x2e0
CALL 0x003130dc
MOV R14,RAX
MOV RSI,qword ptr [RBX + 0x8]
TEST RSI,RSI
JZ 0x00156234
MOVSXD RAX,dword ptr [RBX]
IMUL RDX,RAX,0x2e0
MOV RDI,R14
CALL 0x0010f810
MOV RDI,qword ptr [RBX + 0x8]
CALL 0x0031318e
LAB_00156234:
MOV qword ptr [RBX + 0x8],R14
MOV dword ptr [RBX + 0x4],R12D
LAB_0015623c:
MOV dword ptr [RBX],EBP
MOV EAX,dword ptr [RBX + 0x20]
INC EAX
LAB_00156243:
MOV dword ptr [RBX + 0x20],EAX
IMUL R14,R15,0x2e0
MOV RDI,qword ptr [RBX + 0x8]
ADD RDI,R14
CALL 0x0015626c
INC dword ptr [RBX + 0x24]
ADD R14,qword ptr [RBX + 0x8]
MOV RAX,R14
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* ImPool<ImPlot3DPlot>::Add() */
long __thiscall ImPool<ImPlot3DPlot>::Add(ImPool<ImPlot3DPlot> *this)
{
int iVar1;
int iVar2;
int iVar3;
void *__dest;
int iVar4;
long lVar5;
iVar2 = *(int *)(this + 0x20);
iVar4 = *(int *)this;
if (iVar2 == iVar4) {
iVar1 = iVar4 + 1;
iVar3 = *(int *)(this + 4);
if (iVar3 <= iVar4) {
if (iVar3 == 0) {
iVar4 = 8;
}
else {
iVar4 = iVar3 / 2 + iVar3;
}
if (iVar4 <= iVar1) {
iVar4 = iVar1;
}
if (iVar3 < iVar4) {
__dest = (void *)ImGui::MemAlloc((long)iVar4 * 0x2e0);
if (*(void **)(this + 8) != (void *)0x0) {
memcpy(__dest,*(void **)(this + 8),(long)*(int *)this * 0x2e0);
ImGui::MemFree(*(void **)(this + 8));
}
*(void **)(this + 8) = __dest;
*(int *)(this + 4) = iVar4;
}
}
*(int *)this = iVar1;
iVar4 = *(int *)(this + 0x20) + 1;
}
else {
iVar4 = *(int *)(*(long *)(this + 8) + (long)iVar2 * 0x2e0);
}
*(int *)(this + 0x20) = iVar4;
lVar5 = (long)iVar2 * 0x2e0;
ImPlot3DPlot::ImPlot3DPlot((ImPlot3DPlot *)(*(long *)(this + 8) + lVar5));
*(int *)(this + 0x24) = *(int *)(this + 0x24) + 1;
return lVar5 + *(long *)(this + 8);
}
|
|
16,405
|
LefDefParser::lefiLayer::parseAntennaCumRouting(int)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiLayer.cpp
|
void
lefiLayer::parseAntennaCumRouting(int index)
{
char *wrkingStr = strdup(values_[index]);
char *value;
char msg[1024];
value = strtok(wrkingStr, " ");
if (strcmp(value, "ANTENNACUMROUTINGPLUSCUT") != 0) {
/*
sprintf(msg, "ERROR (LEFPARS-1316): Incorrect syntax defined for property LEF57_ANTENNACUMROUTINGPLUSCUT: %s.\nCorrect syntax is \"ANTANNACUMROUTINGPLUSCUT\"\n", values_[index]);
lefiError(msg);
*/
sprintf(msg, "Incorrect syntax defined for property LEF57_ANTENNACUMROUTINGPLUSCUT: %s.\nCorrect syntax is \"ANTANNACUMROUTINGPLUSCUT\"\n", values_[index]);
lefError(1316, msg);
free(wrkingStr);
return;
}
setAntennaCumRoutingPlusCut();
free(wrkingStr);
return;
}
|
O3
|
cpp
|
LefDefParser::lefiLayer::parseAntennaCumRouting(int):
pushq %r15
pushq %r14
pushq %rbx
subq $0x400, %rsp # imm = 0x400
movq %rdi, %r14
movq 0x360(%rdi), %rax
movslq %esi, %r15
movq (%rax,%r15,8), %rdi
callq 0x23a0
movq %rax, %rbx
leaq 0x31faa(%rip), %rsi # 0x5c390
movq %rax, %rdi
callq 0x2320
leaq 0x33f5a(%rip), %rsi # 0x5e34f
movq %rax, %rdi
callq 0x22d0
testl %eax, %eax
je 0x2a442
movq 0x360(%r14), %rax
movq (%rax,%r15,8), %rdx
leaq 0x33a64(%rip), %rsi # 0x5de77
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2050
movl $0x524, %edi # imm = 0x524
movq %r14, %rsi
callq 0x307ca
movq %rbx, %rdi
callq 0x2260
addq $0x400, %rsp # imm = 0x400
popq %rbx
popq %r14
popq %r15
retq
cmpl $0x0, 0x3f0(%r14)
jne 0x2a459
movq %r14, %rdi
movl $0x1, %esi
callq 0x27f12
movq 0x3e8(%r14), %rax
movl $0x1, 0x40(%rax)
movq %rbx, %rdi
addq $0x400, %rsp # imm = 0x400
popq %rbx
popq %r14
popq %r15
jmp 0x2260
nop
|
_ZN12LefDefParser9lefiLayer22parseAntennaCumRoutingEi:
push r15
push r14
push rbx
sub rsp, 400h
mov r14, rdi
mov rax, [rdi+360h]
movsxd r15, esi
mov rdi, [rax+r15*8]
call _strdup
mov rbx, rax
lea rsi, asc_5C38E+2; " "
mov rdi, rax
call _strtok
lea rsi, aLef57Antennacu+6; "ANTENNACUMROUTINGPLUSCUT"
mov rdi, rax
call _strcmp
test eax, eax
jz short loc_2A442
mov rax, [r14+360h]
mov rdx, [rax+r15*8]
lea rsi, aIncorrectSynta_12; "Incorrect syntax defined for property L"...
mov r14, rsp
mov rdi, r14
xor eax, eax
call _sprintf
mov edi, offset stru_520.st_info; this
mov rsi, r14; int
call _ZN12LefDefParser8lefErrorEiPKc; LefDefParser::lefError(int,char const*)
mov rdi, rbx
call _free
add rsp, 400h
pop rbx
pop r14
pop r15
retn
loc_2A442:
cmp dword ptr [r14+3F0h], 0
jnz short loc_2A459
mov rdi, r14; this
mov esi, 1; int
call _ZN12LefDefParser9lefiLayer15addAntennaModelEi; LefDefParser::lefiLayer::addAntennaModel(int)
loc_2A459:
mov rax, [r14+3E8h]
mov dword ptr [rax+40h], 1
mov rdi, rbx
add rsp, 400h
pop rbx
pop r14
pop r15
jmp _free
|
long long LefDefParser::lefiLayer::parseAntennaCumRouting(
LefDefParser::lefiLayer *this,
long long a2,
long long a3)
{
void *v3; // rbx
long long v4; // rax
long long v5; // rdx
const char *v6; // rdx
_BYTE v8[1048]; // [rsp+0h] [rbp-418h] BYREF
v3 = (void *)strdup(*(_QWORD *)(*((_QWORD *)this + 108) + 8LL * (int)a2), a2, a3);
v4 = strtok(v3, " ");
if ( !(unsigned int)strcmp(v4, "ANTENNACUMROUTINGPLUSCUT") )
{
if ( !*((_DWORD *)this + 252) )
LefDefParser::lefiLayer::addAntennaModel(this, 1uLL, v5);
*(_DWORD *)(*((_QWORD *)this + 125) + 64LL) = 1;
return free(v3);
}
else
{
sprintf(
v8,
"Incorrect syntax defined for property LEF57_ANTENNACUMROUTINGPLUSCUT: %s.\n"
"Correct syntax is \"ANTANNACUMROUTINGPLUSCUT\"\n",
*(const char **)(*((_QWORD *)this + 108) + 8LL * (int)a2));
LefDefParser::lefError((LefDefParser *)&stru_520.st_info, (int)v8, v6);
return free(v3);
}
}
|
parseAntennaCumRouting:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x400
MOV R14,RDI
MOV RAX,qword ptr [RDI + 0x360]
MOVSXD R15,ESI
MOV RDI,qword ptr [RAX + R15*0x8]
CALL 0x001023a0
MOV RBX,RAX
LEA RSI,[0x15c390]
MOV RDI,RAX
CALL 0x00102320
LEA RSI,[0x15e34f]
MOV RDI,RAX
CALL 0x001022d0
TEST EAX,EAX
JZ 0x0012a442
MOV RAX,qword ptr [R14 + 0x360]
MOV RDX,qword ptr [RAX + R15*0x8]
LEA RSI,[0x15de77]
MOV R14,RSP
MOV RDI,R14
XOR EAX,EAX
CALL 0x00102050
MOV EDI,0x524
MOV RSI,R14
CALL 0x001307ca
MOV RDI,RBX
CALL 0x00102260
ADD RSP,0x400
POP RBX
POP R14
POP R15
RET
LAB_0012a442:
CMP dword ptr [R14 + 0x3f0],0x0
JNZ 0x0012a459
MOV RDI,R14
MOV ESI,0x1
CALL 0x00127f12
LAB_0012a459:
MOV RAX,qword ptr [R14 + 0x3e8]
MOV dword ptr [RAX + 0x40],0x1
MOV RDI,RBX
ADD RSP,0x400
POP RBX
POP R14
POP R15
JMP 0x00102260
|
/* LefDefParser::lefiLayer::parseAntennaCumRouting(int) */
void __thiscall LefDefParser::lefiLayer::parseAntennaCumRouting(lefiLayer *this,int param_1)
{
int iVar1;
char *__s;
char *__s1;
char acStack_418 [1024];
__s = strdup(*(char **)(*(long *)(this + 0x360) + (long)param_1 * 8));
__s1 = strtok(__s," ");
iVar1 = strcmp(__s1,"ANTENNACUMROUTINGPLUSCUT");
if (iVar1 != 0) {
sprintf(acStack_418,
"Incorrect syntax defined for property LEF57_ANTENNACUMROUTINGPLUSCUT: %s.\nCorrect syntax is \"ANTANNACUMROUTINGPLUSCUT\"\n"
,*(int8 *)(*(long *)(this + 0x360) + (long)param_1 * 8));
lefError(0x524,acStack_418);
free(__s);
return;
}
if (*(int *)(this + 0x3f0) == 0) {
addAntennaModel(this,1);
}
*(int4 *)(*(long *)(this + 1000) + 0x40) = 1;
free(__s);
return;
}
|
|
16,406
|
get_collation_number_internal
|
eloqsql/mysys/charset.c
|
static uint
get_collation_number_internal(const char *name)
{
CHARSET_INFO **cs;
for (cs= all_charsets;
cs < all_charsets + array_elements(all_charsets);
cs++)
{
if (cs[0] && cs[0]->coll_name.str &&
!my_strcasecmp(&my_charset_latin1, cs[0]->coll_name.str, name))
return cs[0]->number;
}
return 0;
}
|
O0
|
c
|
get_collation_number_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
leaq 0xb9ea5d(%rip), %rax # 0xc7b960
movq %rax, -0x18(%rbp)
leaq 0xb9ea52(%rip), %rax # 0xc7b960
addq $0x4000, %rax # imm = 0x4000
cmpq %rax, -0x18(%rbp)
jae 0xdcf7f
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0xdcf6f
movq -0x18(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x20(%rax)
je 0xdcf6f
leaq 0x28a137(%rip), %rax # 0x367070
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movq 0x20(%rcx), %rsi
movq -0x10(%rbp), %rdx
leaq 0x28a116(%rip), %rdi # 0x367070
callq *%rax
cmpl $0x0, %eax
jne 0xdcf6f
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0xdcf86
jmp 0xdcf71
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
jmp 0xdcf07
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
|
get_collation_number_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
lea rax, all_charsets
mov [rbp+var_18], rax
loc_DCF07:
lea rax, all_charsets
add rax, 4000h
cmp [rbp+var_18], rax
jnb short loc_DCF7F
mov rax, [rbp+var_18]
cmp qword ptr [rax], 0
jz short loc_DCF6F
mov rax, [rbp+var_18]
mov rax, [rax]
cmp qword ptr [rax+20h], 0
jz short loc_DCF6F
lea rax, my_charset_latin1
mov rax, [rax+0C0h]
mov rax, [rax+40h]
mov rcx, [rbp+var_18]
mov rcx, [rcx]
mov rsi, [rcx+20h]
mov rdx, [rbp+var_10]
lea rdi, my_charset_latin1
call rax
cmp eax, 0
jnz short loc_DCF6F
mov rax, [rbp+var_18]
mov rax, [rax]
mov eax, [rax]
mov [rbp+var_4], eax
jmp short loc_DCF86
loc_DCF6F:
jmp short $+2
loc_DCF71:
mov rax, [rbp+var_18]
add rax, 8
mov [rbp+var_18], rax
jmp short loc_DCF07
loc_DCF7F:
mov [rbp+var_4], 0
loc_DCF86:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
|
long long get_collation_number_internal(long long a1)
{
unsigned int **i; // [rsp+8h] [rbp-18h]
for ( i = (unsigned int **)all_charsets; i < &all_charsets[2048]; ++i )
{
if ( *i
&& *((_QWORD *)*i + 4)
&& !(*(unsigned int ( **)(void *, _QWORD, long long))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
*((_QWORD *)*i + 4),
a1) )
{
return **i;
}
}
return 0;
}
|
get_collation_number_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
LEA RAX,[0xd7b960]
MOV qword ptr [RBP + -0x18],RAX
LAB_001dcf07:
LEA RAX,[0xd7b960]
ADD RAX,0x4000
CMP qword ptr [RBP + -0x18],RAX
JNC 0x001dcf7f
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX],0x0
JZ 0x001dcf6f
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX + 0x20],0x0
JZ 0x001dcf6f
LEA RAX,[0x467070]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
MOV RSI,qword ptr [RCX + 0x20]
MOV RDX,qword ptr [RBP + -0x10]
LEA RDI,[0x467070]
CALL RAX
CMP EAX,0x0
JNZ 0x001dcf6f
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001dcf86
LAB_001dcf6f:
JMP 0x001dcf71
LAB_001dcf71:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x8
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001dcf07
LAB_001dcf7f:
MOV dword ptr [RBP + -0x4],0x0
LAB_001dcf86:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 get_collation_number_internal(int8 param_1)
{
int iVar1;
long *local_20;
local_20 = &all_charsets;
while( true ) {
if ((long *)0xd7f95f < local_20) {
return 0;
}
if (((*local_20 != 0) && (*(long *)(*local_20 + 0x20) != 0)) &&
(iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_00467130 + 0x40))
(&my_charset_latin1,*(int8 *)(*local_20 + 0x20),param_1), iVar1 == 0
)) break;
local_20 = local_20 + 1;
}
return *(int4 *)*local_20;
}
|
|
16,407
|
get_collation_number_internal
|
eloqsql/mysys/charset.c
|
static uint
get_collation_number_internal(const char *name)
{
CHARSET_INFO **cs;
for (cs= all_charsets;
cs < all_charsets + array_elements(all_charsets);
cs++)
{
if (cs[0] && cs[0]->coll_name.str &&
!my_strcasecmp(&my_charset_latin1, cs[0]->coll_name.str, name))
return cs[0]->number;
}
return 0;
}
|
O3
|
c
|
get_collation_number_internal:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq $-0x8, %r15
leaq 0xb6e55d(%rip), %r12 # 0xc01d70
leaq 0x31a7b6(%rip), %r14 # 0x3adfd0
movq 0x8(%r12,%r15), %rax
testq %rax, %rax
je 0x93841
movq 0x20(%rax), %rsi
testq %rsi, %rsi
je 0x93841
movq 0xc0(%r14), %rax
movq %r14, %rdi
movq %rbx, %rdx
callq *0x40(%rax)
testl %eax, %eax
je 0x93852
addq $0x8, %r15
cmpq $0x3ff8, %r15 # imm = 0x3FF8
jb 0x9381a
xorl %eax, %eax
jmp 0x93859
movq 0x8(%r12,%r15), %rax
movl (%rax), %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
get_collation_number_internal:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rdi
mov r15, 0FFFFFFFFFFFFFFF8h
lea r12, all_charsets
lea r14, my_charset_latin1
loc_9381A:
mov rax, [r12+r15+8]
test rax, rax
jz short loc_93841
mov rsi, [rax+20h]
test rsi, rsi
jz short loc_93841
mov rax, [r14+0C0h]
mov rdi, r14
mov rdx, rbx
call qword ptr [rax+40h]
test eax, eax
jz short loc_93852
loc_93841:
add r15, 8
cmp r15, 3FF8h
jb short loc_9381A
xor eax, eax
jmp short loc_93859
loc_93852:
mov rax, [r12+r15+8]
mov eax, [rax]
loc_93859:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long get_collation_number_internal(long long a1)
{
long long v1; // r15
long long v2; // rax
long long v3; // rsi
v1 = 0x1FFFFFFFFFFFFFFFLL;
while ( 1 )
{
v2 = all_charsets[v1 + 1];
if ( v2 )
{
v3 = *(_QWORD *)(v2 + 32);
if ( v3 )
{
if ( !(*(unsigned int ( **)(void *, long long, long long))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
v3,
a1) )
break;
}
}
if ( (unsigned long long)++v1 >= 2047 )
return 0LL;
}
return *(unsigned int *)all_charsets[v1 + 1];
}
|
get_collation_number_internal:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDI
MOV R15,-0x8
LEA R12,[0xd01d70]
LEA R14,[0x4adfd0]
LAB_0019381a:
MOV RAX,qword ptr [R12 + R15*0x1 + 0x8]
TEST RAX,RAX
JZ 0x00193841
MOV RSI,qword ptr [RAX + 0x20]
TEST RSI,RSI
JZ 0x00193841
MOV RAX,qword ptr [R14 + 0xc0]
MOV RDI,R14
MOV RDX,RBX
CALL qword ptr [RAX + 0x40]
TEST EAX,EAX
JZ 0x00193852
LAB_00193841:
ADD R15,0x8
CMP R15,0x3ff8
JC 0x0019381a
XOR EAX,EAX
JMP 0x00193859
LAB_00193852:
MOV RAX,qword ptr [R12 + R15*0x1 + 0x8]
MOV EAX,dword ptr [RAX]
LAB_00193859:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int4 get_collation_number_internal(int8 param_1)
{
long lVar1;
int iVar2;
ulong uVar3;
uVar3 = 0xfffffffffffffff8;
while (((*(long *)((long)&DAT_00d01d78 + uVar3) == 0 ||
(lVar1 = *(long *)(*(long *)((long)&DAT_00d01d78 + uVar3) + 0x20), lVar1 == 0)) ||
(iVar2 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_004ae090 + 0x40))
(&my_charset_latin1,lVar1,param_1), iVar2 != 0))) {
uVar3 = uVar3 + 8;
if (0x3ff7 < uVar3) {
return 0;
}
}
return **(int4 **)((long)&DAT_00d01d78 + uVar3);
}
|
|
16,408
|
serial_cpp::Serial::SerialImpl::readLock()
|
ami-iit[P]serial_cpp/src/impl/unix.cc
|
void
Serial::SerialImpl::readLock ()
{
int result = pthread_mutex_lock(&this->read_mutex);
if (result) {
THROW (IOException, result);
}
}
|
O2
|
cpp
|
serial_cpp::Serial::SerialImpl::readLock():
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
addq $0x68, %rdi
callq 0x3400
testl %eax, %eax
jne 0x6f4a
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %ebp
pushq $0x58
popq %rdi
callq 0x3170
movq %rax, %rbx
leaq 0x23c9(%rip), %rsi # 0x9327
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x3dfe
movb $0x1, %r15b
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movl $0x41d, %edx # imm = 0x41D
movl %ebp, %ecx
callq 0x73ea
xorl %r15d, %r15d
leaq 0x6d6a(%rip), %rsi # 0xdcf8
leaq 0x42b(%rip), %rdx # 0x73c0
movq %rbx, %rdi
callq 0x34a0
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x3140
testb %r15b, %r15b
jne 0x6fb4
jmp 0x6fbc
movq %rax, %r14
movq %rbx, %rdi
callq 0x31f0
movq %r14, %rdi
callq 0x34d0
|
_ZN10serial_cpp6Serial10SerialImpl8readLockEv:
push rbp
push r15
push r14
push rbx
sub rsp, 28h
add rdi, 68h ; 'h'
call _pthread_mutex_lock
test eax, eax
jnz short loc_6F4A
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_6F4A:
mov ebp, eax
push 58h ; 'X'
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rsp+48h+var_40]
lea rdx, [rsp+48h+var_41]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov r15b, 1
lea rsi, [rsp+48h+var_40]
mov rdi, rbx
mov edx, 41Dh
mov ecx, ebp
call _ZN10serial_cpp11IOExceptionC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii; serial_cpp::IOException::IOException(std::string,int,int)
xor r15d, r15d
lea rsi, _ZTIN10serial_cpp11IOExceptionE; lptinfo
lea rdx, _ZN10serial_cpp11IOExceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+48h+var_40]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test r15b, r15b
jnz short loc_6FB4
jmp short loc_6FBC
mov r14, rax
loc_6FB4:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_6FBC:
mov rdi, r14
call __Unwind_Resume
|
long long serial_cpp::Serial::SerialImpl::readLock(serial_cpp::Serial::SerialImpl *this)
{
long long result; // rax
int v2; // ebp
void *exception; // rbx
int v4; // r8d
int v5; // r9d
_QWORD v6[8]; // [rsp+8h] [rbp-40h] BYREF
result = pthread_mutex_lock((char *)this + 104);
if ( (_DWORD)result )
{
v2 = result;
exception = __cxa_allocate_exception(0x58uLL);
std::string::basic_string<std::allocator<char>>(
v6,
(long long)"/workspace/llm4binary/github/2025_star3/ami-iit[P]serial_cpp/src/impl/unix.cc");
serial_cpp::IOException::IOException((_DWORD)exception, (unsigned int)v6, 1053, v2, v4, v5);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'serial_cpp::IOException,
serial_cpp::IOException::~IOException);
}
return result;
}
|
readLock:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
ADD RDI,0x68
CALL 0x00103400
TEST EAX,EAX
JNZ 0x00106f4a
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00106f4a:
MOV EBP,EAX
PUSH 0x58
POP RDI
CALL 0x00103170
MOV RBX,RAX
LAB_00106f57:
LEA RSI,[0x109327]
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
CALL 0x00103dfe
MOV R15B,0x1
LAB_00106f70:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
MOV EDX,0x41d
MOV ECX,EBP
CALL 0x001073ea
XOR R15D,R15D
LEA RSI,[0x10dcf8]
LEA RDX,[0x1073c0]
MOV RDI,RBX
CALL 0x001034a0
|
/* serial_cpp::Serial::SerialImpl::readLock() */
void __thiscall serial_cpp::Serial::SerialImpl::readLock(SerialImpl *this)
{
IOException *pIVar1;
int iVar2;
allocator local_41;
string local_40 [32];
iVar2 = pthread_mutex_lock((pthread_mutex_t *)(this + 0x68));
if (iVar2 == 0) {
return;
}
pIVar1 = (IOException *)__cxa_allocate_exception(0x58);
/* try { // try from 00106f57 to 00106f6c has its CatchHandler @ 00106fb1 */
std::__cxx11::string::string<std::allocator<char>>
(local_40,
"/workspace/llm4binary/github/2025_star3/ami-iit[P]serial_cpp/src/impl/unix.cc",
&local_41);
/* try { // try from 00106f70 to 00106f9c has its CatchHandler @ 00106f9d */
IOException::IOException(pIVar1,local_40,0x41d,iVar2);
/* WARNING: Subroutine does not return */
__cxa_throw(pIVar1,&IOException::typeinfo,IOException::~IOException);
}
|
|
16,409
|
serial_cpp::Serial::SerialImpl::readLock()
|
ami-iit[P]serial_cpp/src/impl/unix.cc
|
void
Serial::SerialImpl::readLock ()
{
int result = pthread_mutex_lock(&this->read_mutex);
if (result) {
THROW (IOException, result);
}
}
|
O3
|
cpp
|
serial_cpp::Serial::SerialImpl::readLock():
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
addq $0x68, %rdi
callq 0x3410
testl %eax, %eax
jne 0x7bbe
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %ebp
movl $0x58, %edi
callq 0x3150
movq %rax, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x375a(%rip), %rsi # 0xb337
leaq 0x37a0(%rip), %rdx # 0xb384
movq %rsp, %rdi
callq 0x42e0
movb $0x1, %r12b
movq %rsp, %rsi
movq %rbx, %rdi
movl $0x41d, %edx # imm = 0x41D
movl %ebp, %ecx
callq 0x8238
xorl %r12d, %r12d
leaq 0x80dd(%rip), %rsi # 0xfce8
leaq 0x5de(%rip), %rdx # 0x81f0
movq %rbx, %rdi
callq 0x34c0
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x7c33
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x32c0
testb %r12b, %r12b
jne 0x7c3d
jmp 0x7c45
movq %rax, %r14
movq %rbx, %rdi
callq 0x31e0
movq %r14, %rdi
callq 0x34f0
nop
|
_ZN10serial_cpp6Serial10SerialImpl8readLockEv:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 20h
add rdi, 68h ; 'h'
call _pthread_mutex_lock
test eax, eax
jnz short loc_7BBE
add rsp, 20h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_7BBE:
mov ebp, eax
mov edi, 58h ; 'X'; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r15, [rsp+48h+var_38]
mov [r15-10h], r15
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aWorkspaceLlm4b+4Dh; ""
mov rdi, rsp
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov r12b, 1
mov rsi, rsp
mov rdi, rbx
mov edx, 41Dh
mov ecx, ebp
call _ZN10serial_cpp11IOExceptionC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii; serial_cpp::IOException::IOException(std::string,int,int)
xor r12d, r12d
lea rsi, _ZTIN10serial_cpp11IOExceptionE; lptinfo
lea rdx, _ZN10serial_cpp11IOExceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, [rsp+48h+var_48]; void *
cmp rdi, r15
jz short loc_7C33
mov rsi, [rsp+48h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7C33:
test r12b, r12b
jnz short loc_7C3D
jmp short loc_7C45
mov r14, rax
loc_7C3D:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_7C45:
mov rdi, r14
call __Unwind_Resume
|
long long serial_cpp::Serial::SerialImpl::readLock(serial_cpp::Serial::SerialImpl *this)
{
long long result; // rax
int v2; // ebp
void *exception; // rbx
int v4; // r8d
int v5; // r9d
void *v6[2]; // [rsp+0h] [rbp-48h] BYREF
long long v7; // [rsp+10h] [rbp-38h] BYREF
result = pthread_mutex_lock((char *)this + 104);
if ( (_DWORD)result )
{
v2 = result;
exception = __cxa_allocate_exception(0x58uLL);
v6[0] = &v7;
std::string::_M_construct<char const*>(
(long long)v6,
"/workspace/llm4binary/github/2025_star3/ami-iit[P]serial_cpp/src/impl/unix.cc",
(long long)"");
serial_cpp::IOException::IOException((_DWORD)exception, (unsigned int)v6, 1053, v2, v4, v5);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'serial_cpp::IOException,
serial_cpp::IOException::~IOException);
}
return result;
}
|
readLock:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x20
ADD RDI,0x68
CALL 0x00103410
TEST EAX,EAX
JNZ 0x00107bbe
ADD RSP,0x20
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00107bbe:
MOV EBP,EAX
MOV EDI,0x58
CALL 0x00103150
MOV RBX,RAX
LEA R15,[RSP + 0x10]
MOV qword ptr [R15 + -0x10],R15
LAB_00107bd6:
LEA RSI,[0x10b337]
LEA RDX,[0x10b384]
MOV RDI,RSP
CALL 0x001042e0
MOV R12B,0x1
LAB_00107bef:
MOV RSI,RSP
MOV RDI,RBX
MOV EDX,0x41d
MOV ECX,EBP
CALL 0x00108238
XOR R12D,R12D
LEA RSI,[0x10fce8]
LEA RDX,[0x1081f0]
MOV RDI,RBX
CALL 0x001034c0
|
/* serial_cpp::Serial::SerialImpl::readLock() */
void __thiscall serial_cpp::Serial::SerialImpl::readLock(SerialImpl *this)
{
IOException *pIVar1;
int iVar2;
int1 *local_48 [2];
int1 local_38 [16];
iVar2 = pthread_mutex_lock((pthread_mutex_t *)(this + 0x68));
if (iVar2 == 0) {
return;
}
pIVar1 = (IOException *)__cxa_allocate_exception(0x58);
local_48[0] = local_38;
/* try { // try from 00107bd6 to 00107beb has its CatchHandler @ 00107c3a */
std::__cxx11::string::_M_construct<char_const*>
(local_48,
"/workspace/llm4binary/github/2025_star3/ami-iit[P]serial_cpp/src/impl/unix.cc","");
/* try { // try from 00107bef to 00107c19 has its CatchHandler @ 00107c1a */
IOException::IOException(pIVar1,local_48,0x41d,iVar2);
/* WARNING: Subroutine does not return */
__cxa_throw(pIVar1,&IOException::typeinfo,IOException::~IOException);
}
|
|
16,410
|
test_bulk_delete
|
eloqsql/tests/mysql_client_test.c
|
static void test_bulk_delete()
{
int rc;
MYSQL_STMT *stmt;
MYSQL_BIND bind[1];
MYSQL_ROW row;
char indicator[]= {0, 0, 0};
my_bool error[1];
int i, id[]= {1, 2, 4}, count= sizeof(id)/sizeof(id[0]);
MYSQL_RES *result;
myheader("test_bulk_delete");
rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1");
myquery(rc);
rc= mysql_query(mysql, "CREATE TABLE t1 (id int not null primary key)");
myquery(rc);
rc= mysql_query(mysql, "INSERT INTO t1 VALUES (1),(2),(3),(4)");
myquery(rc);
verify_affected_rows(4);
stmt= mysql_stmt_init(mysql);
rc= mysql_stmt_prepare(stmt, "DELETE FROM t1 where id=?", -1);
check_execute(stmt, rc);
memset(bind, 0, sizeof(bind));
bind[0].buffer_type = MYSQL_TYPE_LONG;
bind[0].buffer = (void *)id;
bind[0].buffer_length = 0;
bind[0].is_null = NULL;
bind[0].length = NULL;
bind[0].error = error;
bind[0].u.indicator= indicator;
mysql_stmt_attr_set(stmt, STMT_ATTR_ARRAY_SIZE, (void*)&count);
rc= mysql_stmt_bind_param(stmt, bind);
check_execute(stmt, rc);
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
verify_affected_rows(3);
mysql_stmt_close(stmt);
rc= mysql_query(mysql, "SELECT id FROM t1");
myquery(rc);
result= mysql_store_result(mysql);
mytest(result);
i= 0;
while ((row= mysql_fetch_row(result)))
{
i++;
DIE_IF(atoi(row[0]) != 3);
}
DIE_IF(i != 1);
mysql_free_result(result);
rc= mysql_query(mysql, "DROP TABLE t1");
myquery(rc);
}
|
O0
|
c
|
test_bulk_delete:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
leaq -0x8b(%rbp), %rdi
xorl %esi, %esi
movl $0x3, %edx
callq 0x3a2e0
movq 0x935f3(%rip), %rax # 0x12d7a8
movq %rax, -0x9c(%rbp)
movl 0x935ee(%rip), %eax # 0x12d7b0
movl %eax, -0x94(%rbp)
movl $0x3, -0xa0(%rbp)
jmp 0x9a1d4
movsbl 0x3d02f6(%rip), %eax # 0x46a4d1
cmpl $0x2, %eax
jge 0x9a25c
movq 0x214df1(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
leaq 0x94133(%rip), %rsi # 0x12e324
movb $0x0, %al
callq 0x3a1c0
movq 0x214dd9(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
movl 0x3d0514(%rip), %edx # 0x46a71c
movl %edx, %eax
addl $0x1, %eax
movl %eax, 0x3d0509(%rip) # 0x46a71c
movl 0x3d04ff(%rip), %ecx # 0x46a718
movl 0x3d02dc(%rip), %r8d # 0x46a4fc
leaq 0x95405(%rip), %rsi # 0x12f62c
leaq 0x95304(%rip), %r9 # 0x12f532
movb $0x0, %al
callq 0x3a1c0
movq 0x214d9c(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
leaq 0x94116(%rip), %rsi # 0x12e35c
movb $0x0, %al
callq 0x3a1c0
movq 0x214d84(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
callq 0x3a4a0
movq 0x3d0275(%rip), %rdi # 0x46a4d8
leaq 0x953d4(%rip), %rsi # 0x12f63e
callq 0x3b3d0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0xac(%rbp)
cmpl $0x0, -0xac(%rbp)
je 0x9a28d
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0xac(%rbp)
jne 0x9a298
jmp 0x9a2b0
leaq 0x9396d(%rip), %rdi # 0x12dc0c
movl $0x4ff2, %esi # imm = 0x4FF2
leaq 0xa9cc4(%rip), %rdx # 0x143f6f
callq 0x3c010
movq 0x3d0221(%rip), %rdi # 0x46a4d8
leaq 0xab9d5(%rip), %rsi # 0x145c93
callq 0x3b3d0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0xb0(%rbp)
cmpl $0x0, -0xb0(%rbp)
je 0x9a2e1
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0xb0(%rbp)
jne 0x9a2ec
jmp 0x9a304
leaq 0x93919(%rip), %rdi # 0x12dc0c
movl $0x4ff4, %esi # imm = 0x4FF4
leaq 0xa9c70(%rip), %rdx # 0x143f6f
callq 0x3c010
movq 0x3d01cd(%rip), %rdi # 0x46a4d8
leaq 0xab9af(%rip), %rsi # 0x145cc1
callq 0x3b3d0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0xb4(%rbp)
cmpl $0x0, -0xb4(%rbp)
je 0x9a335
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0xb4(%rbp)
jne 0x9a340
jmp 0x9a358
leaq 0x938c5(%rip), %rdi # 0x12dc0c
movl $0x4ff6, %esi # imm = 0x4FF6
leaq 0xa9c1c(%rip), %rdx # 0x143f6f
callq 0x3c010
movl $0x4, %edi
callq 0x4c2b0
movq 0x3d016f(%rip), %rdi # 0x46a4d8
callq 0xb2790
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xab96a(%rip), %rsi # 0x145ce7
movq $-0x1, %rdx
callq 0x3b810
movl %eax, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
je 0x9a39f
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3c0b0
cmpl $0x0, -0x4(%rbp)
jne 0x9a3a7
jmp 0x9a3bf
leaq 0x9385e(%rip), %rdi # 0x12dc0c
movl $0x4ffb, %esi # imm = 0x4FFB
leaq 0x9f452(%rip), %rdx # 0x13980c
callq 0x3c010
leaq -0x80(%rbp), %rdi
xorl %esi, %esi
movl $0x70, %edx
callq 0x3a2e0
movl $0x3, -0x20(%rbp)
leaq -0x9c(%rbp), %rax
movq %rax, -0x70(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x78(%rbp)
movq $0x0, -0x80(%rbp)
leaq -0x8c(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x8b(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rdi
movl $0xc9, %esi
leaq -0xa0(%rbp), %rdx
callq 0xb0970
movq -0x10(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0xb1100
movsbl %al, %eax
movl %eax, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
je 0x9a44a
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3c0b0
cmpl $0x0, -0x4(%rbp)
jne 0x9a452
jmp 0x9a46a
leaq 0x937b3(%rip), %rdi # 0x12dc0c
movl $0x5008, %esi # imm = 0x5008
leaq 0x9f3a7(%rip), %rdx # 0x13980c
callq 0x3c010
movq -0x10(%rbp), %rdi
callq 0x3b8a0
movl %eax, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
je 0x9a489
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3c0b0
cmpl $0x0, -0x4(%rbp)
jne 0x9a491
jmp 0x9a4a9
leaq 0x93774(%rip), %rdi # 0x12dc0c
movl $0x500b, %esi # imm = 0x500B
leaq 0x9f368(%rip), %rdx # 0x13980c
callq 0x3c010
movl $0x3, %edi
callq 0x4c2b0
movq -0x10(%rbp), %rdi
callq 0x3b9f0
movq 0x3d0015(%rip), %rdi # 0x46a4d8
leaq 0xab837(%rip), %rsi # 0x145d01
callq 0x3b3d0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0xb8(%rbp)
cmpl $0x0, -0xb8(%rbp)
je 0x9a4ed
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0xb8(%rbp)
jne 0x9a4f8
jmp 0x9a510
leaq 0x9370d(%rip), %rdi # 0x12dc0c
movl $0x5011, %esi # imm = 0x5011
leaq 0xa9a64(%rip), %rdx # 0x143f6f
callq 0x3c010
movq 0x3cffc1(%rip), %rdi # 0x46a4d8
callq 0x3b210
movq %rax, -0xa8(%rbp)
cmpq $0x0, -0xa8(%rbp)
jne 0x9a54e
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
leaq 0x936cf(%rip), %rdi # 0x12dc0c
movl $0x5014, %esi # imm = 0x5014
leaq 0x93493(%rip), %rdx # 0x12d9dc
callq 0x3c010
movl $0x0, -0x90(%rbp)
movq -0xa8(%rbp), %rdi
callq 0x3b000
movq %rax, -0x88(%rbp)
cmpq $0x0, %rax
je 0x9a5b2
movl -0x90(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x90(%rbp)
movq -0x88(%rbp), %rax
movq (%rax), %rdi
callq 0x3a310
cmpl $0x3, %eax
je 0x9a5ae
leaq 0x93671(%rip), %rdi # 0x12dc0c
movl $0x501a, %esi # imm = 0x501A
leaq 0xab76c(%rip), %rdx # 0x145d13
callq 0x3c010
jmp 0x9a5b0
jmp 0x9a5b0
jmp 0x9a558
cmpl $0x1, -0x90(%rbp)
je 0x9a5d5
leaq 0x9364a(%rip), %rdi # 0x12dc0c
movl $0x501c, %esi # imm = 0x501C
leaq 0xab757(%rip), %rdx # 0x145d25
callq 0x3c010
jmp 0x9a5d7
jmp 0x9a5d7
movq -0xa8(%rbp), %rdi
callq 0x3b280
movq 0x3cfeee(%rip), %rdi # 0x46a4d8
leaq 0x9507c(%rip), %rsi # 0x12f66d
callq 0x3b3d0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0xbc(%rbp)
cmpl $0x0, -0xbc(%rbp)
je 0x9a614
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0xbc(%rbp)
jne 0x9a61f
jmp 0x9a637
leaq 0x935e6(%rip), %rdi # 0x12dc0c
movl $0x5020, %esi # imm = 0x5020
leaq 0xa993d(%rip), %rdx # 0x143f6f
callq 0x3c010
addq $0xc0, %rsp
popq %rbp
retq
|
test_bulk_delete:
push rbp
mov rbp, rsp
sub rsp, 0C0h
lea rdi, [rbp+var_8B]
xor esi, esi
mov edx, 3
call _memset
mov rax, cs:qword_12D7A8
mov [rbp+var_9C], rax
mov eax, cs:dword_12D7B0
mov [rbp+var_94], eax
mov [rbp+var_A0], 3
jmp short $+2
loc_9A1D4:
movsx eax, cs:opt_silent
cmp eax, 2
jge short loc_9A25C
mov rax, cs:stdout_ptr
mov rdi, [rax]
lea rsi, asc_12E324; "\n\n###################################"...
mov al, 0
call _fprintf
mov rax, cs:stdout_ptr
mov rdi, [rax]
mov edx, cs:test_count
mov eax, edx
add eax, 1
mov cs:test_count, eax
mov ecx, cs:iter_count
mov r8d, cs:opt_count
lea rsi, aUOfUUS; "%u of (%u/%u): %s"
lea r9, aTestBulkDelete; "test_bulk_delete"
mov al, 0
call _fprintf
mov rax, cs:stdout_ptr
mov rdi, [rax]
lea rsi, asc_12E35C; " \n###################################"...
mov al, 0
call _fprintf
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
loc_9A25C:
mov rdi, cs:mysql
lea rsi, aDropTableIfExi; "DROP TABLE IF EXISTS t1"
call wrap_mysql_query
mov [rbp+var_4], eax
mov eax, [rbp+var_4]
mov [rbp+var_AC], eax
cmp [rbp+var_AC], 0
jz short loc_9A28D
xor eax, eax
mov edi, eax
call print_error
loc_9A28D:
cmp [rbp+var_AC], 0
jnz short loc_9A298
jmp short loc_9A2B0
loc_9A298:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 4FF2h
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_9A2B0:
mov rdi, cs:mysql
lea rsi, aCreateTableT1I_21; "CREATE TABLE t1 (id int not null primar"...
call wrap_mysql_query
mov [rbp+var_4], eax
mov eax, [rbp+var_4]
mov [rbp+var_B0], eax
cmp [rbp+var_B0], 0
jz short loc_9A2E1
xor eax, eax
mov edi, eax
call print_error
loc_9A2E1:
cmp [rbp+var_B0], 0
jnz short loc_9A2EC
jmp short loc_9A304
loc_9A2EC:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 4FF4h
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_9A304:
mov rdi, cs:mysql
lea rsi, aInsertIntoT1Va_47; "INSERT INTO t1 VALUES (1),(2),(3),(4)"
call wrap_mysql_query
mov [rbp+var_4], eax
mov eax, [rbp+var_4]
mov [rbp+var_B4], eax
cmp [rbp+var_B4], 0
jz short loc_9A335
xor eax, eax
mov edi, eax
call print_error
loc_9A335:
cmp [rbp+var_B4], 0
jnz short loc_9A340
jmp short loc_9A358
loc_9A340:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 4FF6h
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_9A358:
mov edi, 4
call verify_affected_rows
mov rdi, cs:mysql
call mysql_stmt_init
mov [rbp+var_10], rax
mov rdi, [rbp+var_10]
lea rsi, aDeleteFromT1Wh; "DELETE FROM t1 where id=?"
mov rdx, 0FFFFFFFFFFFFFFFFh
call wrap_mysql_stmt_prepare
mov [rbp+var_4], eax
cmp [rbp+var_4], 0
jz short loc_9A39F
mov rdi, [rbp+var_10]
xor eax, eax
mov esi, eax
call print_st_error
loc_9A39F:
cmp [rbp+var_4], 0
jnz short loc_9A3A7
jmp short loc_9A3BF
loc_9A3A7:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 4FFBh
lea rdx, aRcMysqlDataTru+1Eh; "rc == 0"
call die
loc_9A3BF:
lea rdi, [rbp+var_80]
xor esi, esi
mov edx, 70h ; 'p'
call _memset
mov [rbp+var_20], 3
lea rax, [rbp+var_9C]
mov [rbp+var_70], rax
mov [rbp+var_40], 0
mov [rbp+var_78], 0
mov [rbp+var_80], 0
lea rax, [rbp+var_8C]
mov [rbp+var_68], rax
lea rax, [rbp+var_8B]
mov [rbp+var_60], rax
mov rdi, [rbp+var_10]
mov esi, 0C9h
lea rdx, [rbp+var_A0]
call mysql_stmt_attr_set
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_80]
call mysql_stmt_bind_param
movsx eax, al
mov [rbp+var_4], eax
cmp [rbp+var_4], 0
jz short loc_9A44A
mov rdi, [rbp+var_10]
xor eax, eax
mov esi, eax
call print_st_error
loc_9A44A:
cmp [rbp+var_4], 0
jnz short loc_9A452
jmp short loc_9A46A
loc_9A452:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 5008h
lea rdx, aRcMysqlDataTru+1Eh; "rc == 0"
call die
loc_9A46A:
mov rdi, [rbp+var_10]
call wrap_mysql_stmt_execute
mov [rbp+var_4], eax
cmp [rbp+var_4], 0
jz short loc_9A489
mov rdi, [rbp+var_10]
xor eax, eax
mov esi, eax
call print_st_error
loc_9A489:
cmp [rbp+var_4], 0
jnz short loc_9A491
jmp short loc_9A4A9
loc_9A491:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 500Bh
lea rdx, aRcMysqlDataTru+1Eh; "rc == 0"
call die
loc_9A4A9:
mov edi, 3
call verify_affected_rows
mov rdi, [rbp+var_10]
call wrap_mysql_stmt_close
mov rdi, cs:mysql
lea rsi, aSelectIdFromT1_1; "SELECT id FROM t1"
call wrap_mysql_query
mov [rbp+var_4], eax
mov eax, [rbp+var_4]
mov [rbp+var_B8], eax
cmp [rbp+var_B8], 0
jz short loc_9A4ED
xor eax, eax
mov edi, eax
call print_error
loc_9A4ED:
cmp [rbp+var_B8], 0
jnz short loc_9A4F8
jmp short loc_9A510
loc_9A4F8:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 5011h
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_9A510:
mov rdi, cs:mysql
call wrap_mysql_store_result
mov [rbp+var_A8], rax
cmp [rbp+var_A8], 0
jnz short loc_9A54E
xor eax, eax
mov edi, eax
call print_error
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 5014h
lea rdx, aFalse; "FALSE"
call die
loc_9A54E:
mov [rbp+var_90], 0
loc_9A558:
mov rdi, [rbp+var_A8]
call wrap_mysql_fetch_row
mov [rbp+var_88], rax
cmp rax, 0
jz short loc_9A5B2
mov eax, [rbp+var_90]
add eax, 1
mov [rbp+var_90], eax
mov rax, [rbp+var_88]
mov rdi, [rax]
call _atoi
cmp eax, 3
jz short loc_9A5AE
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 501Ah
lea rdx, aAtoiRow03; "atoi(row[0]) != 3"
call die
jmp short loc_9A5B0
loc_9A5AE:
jmp short $+2
loc_9A5B0:
jmp short loc_9A558
loc_9A5B2:
cmp [rbp+var_90], 1
jz short loc_9A5D5
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 501Ch
lea rdx, aI1_0; "i != 1"
call die
jmp short loc_9A5D7
loc_9A5D5:
jmp short $+2
loc_9A5D7:
mov rdi, [rbp+var_A8]
call wrap_mysql_free_result
mov rdi, cs:mysql
lea rsi, aDropTableT1; "DROP TABLE t1"
call wrap_mysql_query
mov [rbp+var_4], eax
mov eax, [rbp+var_4]
mov [rbp+var_BC], eax
cmp [rbp+var_BC], 0
jz short loc_9A614
xor eax, eax
mov edi, eax
call print_error
loc_9A614:
cmp [rbp+var_BC], 0
jnz short loc_9A61F
jmp short loc_9A637
loc_9A61F:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 5020h
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_9A637:
add rsp, 0C0h
pop rbp
retn
|
void test_bulk_delete()
{
int v0; // edx
char v1; // al
int v2; // [rsp+4h] [rbp-BCh]
int v3; // [rsp+8h] [rbp-B8h]
int v4; // [rsp+Ch] [rbp-B4h]
int v5; // [rsp+10h] [rbp-B0h]
int v6; // [rsp+14h] [rbp-ACh]
long long v7; // [rsp+18h] [rbp-A8h]
int v8; // [rsp+20h] [rbp-A0h] BYREF
long long v9; // [rsp+24h] [rbp-9Ch] BYREF
int v10; // [rsp+2Ch] [rbp-94h]
int v11; // [rsp+30h] [rbp-90h]
char v12; // [rsp+34h] [rbp-8Ch] BYREF
_BYTE v13[3]; // [rsp+35h] [rbp-8Bh] BYREF
_QWORD *row; // [rsp+38h] [rbp-88h]
_QWORD v15[12]; // [rsp+40h] [rbp-80h] BYREF
int v16; // [rsp+A0h] [rbp-20h]
long long v17; // [rsp+B0h] [rbp-10h]
int v18; // [rsp+BCh] [rbp-4h]
memset(v13, 0LL, sizeof(v13));
v9 = 0x200000001LL;
v10 = 4;
v8 = 3;
if ( opt_silent < 2 )
{
fprintf(stdout, "\n\n#####################################\n");
v0 = test_count++;
fprintf(stdout, "%u of (%u/%u): %s", v0, iter_count, opt_count, "test_bulk_delete");
fprintf(stdout, " \n#####################################\n");
fflush(stdout);
}
v18 = wrap_mysql_query(mysql, (long long)"DROP TABLE IF EXISTS t1");
v6 = v18;
if ( v18 )
print_error(0LL);
if ( v6 )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 20466, "r == 0");
v18 = wrap_mysql_query(mysql, (long long)"CREATE TABLE t1 (id int not null primary key)");
v5 = v18;
if ( v18 )
print_error(0LL);
if ( v5 )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 20468, "r == 0");
v18 = wrap_mysql_query(mysql, (long long)"INSERT INTO t1 VALUES (1),(2),(3),(4)");
v4 = v18;
if ( v18 )
print_error(0LL);
if ( v4 )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 20470, "r == 0");
verify_affected_rows(4LL);
v17 = mysql_stmt_init(mysql);
v18 = wrap_mysql_stmt_prepare(v17, (long long)"DELETE FROM t1 where id=?", -1LL);
if ( v18 )
print_st_error(v17, 0LL);
if ( v18 )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 20475, "rc == 0");
memset(v15, 0LL, 112LL);
v16 = 3;
v15[2] = &v9;
v15[8] = 0LL;
v15[1] = 0LL;
v15[0] = 0LL;
v15[3] = &v12;
v15[4] = v13;
mysql_stmt_attr_set(v17, 201LL, &v8);
v1 = mysql_stmt_bind_param(v17, v15);
v18 = v1;
if ( v1 )
print_st_error(v17, 0LL);
if ( v18 )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 20488, "rc == 0");
v18 = wrap_mysql_stmt_execute(v17);
if ( v18 )
print_st_error(v17, 0LL);
if ( v18 )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 20491, "rc == 0");
verify_affected_rows(3LL);
wrap_mysql_stmt_close(v17);
v18 = wrap_mysql_query(mysql, (long long)"SELECT id FROM t1");
v3 = v18;
if ( v18 )
print_error(0LL);
if ( v3 )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 20497, "r == 0");
v7 = wrap_mysql_store_result(mysql);
if ( !v7 )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 20500, "FALSE");
}
v11 = 0;
while ( 1 )
{
row = (_QWORD *)wrap_mysql_fetch_row(v7);
if ( !row )
break;
++v11;
if ( (unsigned int)atoi(*row) != 3 )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 20506, "atoi(row[0]) != 3");
}
if ( v11 != 1 )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 20508, "i != 1");
wrap_mysql_free_result(v7);
v18 = wrap_mysql_query(mysql, (long long)"DROP TABLE t1");
v2 = v18;
if ( v18 )
print_error(0LL);
if ( v2 )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 20512, "r == 0");
}
|
test_bulk_delete:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
LEA RDI,[RBP + -0x8b]
XOR ESI,ESI
MOV EDX,0x3
CALL 0x0013a2e0
MOV RAX,qword ptr [0x0022d7a8]
MOV qword ptr [RBP + -0x9c],RAX
MOV EAX,dword ptr [0x0022d7b0]
MOV dword ptr [RBP + -0x94],EAX
MOV dword ptr [RBP + -0xa0],0x3
JMP 0x0019a1d4
LAB_0019a1d4:
MOVSX EAX,byte ptr [0x0056a4d1]
CMP EAX,0x2
JGE 0x0019a25c
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x22e324]
MOV AL,0x0
CALL 0x0013a1c0
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
MOV EDX,dword ptr [0x0056a71c]
MOV EAX,EDX
ADD EAX,0x1
MOV dword ptr [0x0056a71c],EAX
MOV ECX,dword ptr [0x0056a718]
MOV R8D,dword ptr [0x0056a4fc]
LEA RSI,[0x22f62c]
LEA R9,[0x22f532]
MOV AL,0x0
CALL 0x0013a1c0
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x22e35c]
MOV AL,0x0
CALL 0x0013a1c0
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
CALL 0x0013a4a0
LAB_0019a25c:
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[0x22f63e]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x4]
MOV dword ptr [RBP + -0xac],EAX
CMP dword ptr [RBP + -0xac],0x0
JZ 0x0019a28d
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_0019a28d:
CMP dword ptr [RBP + -0xac],0x0
JNZ 0x0019a298
JMP 0x0019a2b0
LAB_0019a298:
LEA RDI,[0x22dc0c]
MOV ESI,0x4ff2
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_0019a2b0:
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[0x245c93]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x4]
MOV dword ptr [RBP + -0xb0],EAX
CMP dword ptr [RBP + -0xb0],0x0
JZ 0x0019a2e1
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_0019a2e1:
CMP dword ptr [RBP + -0xb0],0x0
JNZ 0x0019a2ec
JMP 0x0019a304
LAB_0019a2ec:
LEA RDI,[0x22dc0c]
MOV ESI,0x4ff4
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_0019a304:
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[0x245cc1]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x4]
MOV dword ptr [RBP + -0xb4],EAX
CMP dword ptr [RBP + -0xb4],0x0
JZ 0x0019a335
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_0019a335:
CMP dword ptr [RBP + -0xb4],0x0
JNZ 0x0019a340
JMP 0x0019a358
LAB_0019a340:
LEA RDI,[0x22dc0c]
MOV ESI,0x4ff6
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_0019a358:
MOV EDI,0x4
CALL 0x0014c2b0
MOV RDI,qword ptr [0x0056a4d8]
CALL 0x001b2790
MOV qword ptr [RBP + -0x10],RAX
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x245ce7]
MOV RDX,-0x1
CALL 0x0013b810
MOV dword ptr [RBP + -0x4],EAX
CMP dword ptr [RBP + -0x4],0x0
JZ 0x0019a39f
MOV RDI,qword ptr [RBP + -0x10]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0013c0b0
LAB_0019a39f:
CMP dword ptr [RBP + -0x4],0x0
JNZ 0x0019a3a7
JMP 0x0019a3bf
LAB_0019a3a7:
LEA RDI,[0x22dc0c]
MOV ESI,0x4ffb
LEA RDX,[0x23980c]
CALL 0x0013c010
LAB_0019a3bf:
LEA RDI,[RBP + -0x80]
XOR ESI,ESI
MOV EDX,0x70
CALL 0x0013a2e0
MOV dword ptr [RBP + -0x20],0x3
LEA RAX,[RBP + -0x9c]
MOV qword ptr [RBP + -0x70],RAX
MOV qword ptr [RBP + -0x40],0x0
MOV qword ptr [RBP + -0x78],0x0
MOV qword ptr [RBP + -0x80],0x0
LEA RAX,[RBP + -0x8c]
MOV qword ptr [RBP + -0x68],RAX
LEA RAX,[RBP + -0x8b]
MOV qword ptr [RBP + -0x60],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0xc9
LEA RDX,[RBP + -0xa0]
CALL 0x001b0970
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x80]
CALL 0x001b1100
MOVSX EAX,AL
MOV dword ptr [RBP + -0x4],EAX
CMP dword ptr [RBP + -0x4],0x0
JZ 0x0019a44a
MOV RDI,qword ptr [RBP + -0x10]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0013c0b0
LAB_0019a44a:
CMP dword ptr [RBP + -0x4],0x0
JNZ 0x0019a452
JMP 0x0019a46a
LAB_0019a452:
LEA RDI,[0x22dc0c]
MOV ESI,0x5008
LEA RDX,[0x23980c]
CALL 0x0013c010
LAB_0019a46a:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013b8a0
MOV dword ptr [RBP + -0x4],EAX
CMP dword ptr [RBP + -0x4],0x0
JZ 0x0019a489
MOV RDI,qword ptr [RBP + -0x10]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0013c0b0
LAB_0019a489:
CMP dword ptr [RBP + -0x4],0x0
JNZ 0x0019a491
JMP 0x0019a4a9
LAB_0019a491:
LEA RDI,[0x22dc0c]
MOV ESI,0x500b
LEA RDX,[0x23980c]
CALL 0x0013c010
LAB_0019a4a9:
MOV EDI,0x3
CALL 0x0014c2b0
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013b9f0
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[0x245d01]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x4]
MOV dword ptr [RBP + -0xb8],EAX
CMP dword ptr [RBP + -0xb8],0x0
JZ 0x0019a4ed
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_0019a4ed:
CMP dword ptr [RBP + -0xb8],0x0
JNZ 0x0019a4f8
JMP 0x0019a510
LAB_0019a4f8:
LEA RDI,[0x22dc0c]
MOV ESI,0x5011
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_0019a510:
MOV RDI,qword ptr [0x0056a4d8]
CALL 0x0013b210
MOV qword ptr [RBP + -0xa8],RAX
CMP qword ptr [RBP + -0xa8],0x0
JNZ 0x0019a54e
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LEA RDI,[0x22dc0c]
MOV ESI,0x5014
LEA RDX,[0x22d9dc]
CALL 0x0013c010
LAB_0019a54e:
MOV dword ptr [RBP + -0x90],0x0
LAB_0019a558:
MOV RDI,qword ptr [RBP + -0xa8]
CALL 0x0013b000
MOV qword ptr [RBP + -0x88],RAX
CMP RAX,0x0
JZ 0x0019a5b2
MOV EAX,dword ptr [RBP + -0x90]
ADD EAX,0x1
MOV dword ptr [RBP + -0x90],EAX
MOV RAX,qword ptr [RBP + -0x88]
MOV RDI,qword ptr [RAX]
CALL 0x0013a310
CMP EAX,0x3
JZ 0x0019a5ae
LEA RDI,[0x22dc0c]
MOV ESI,0x501a
LEA RDX,[0x245d13]
CALL 0x0013c010
JMP 0x0019a5b0
LAB_0019a5ae:
JMP 0x0019a5b0
LAB_0019a5b0:
JMP 0x0019a558
LAB_0019a5b2:
CMP dword ptr [RBP + -0x90],0x1
JZ 0x0019a5d5
LEA RDI,[0x22dc0c]
MOV ESI,0x501c
LEA RDX,[0x245d25]
CALL 0x0013c010
JMP 0x0019a5d7
LAB_0019a5d5:
JMP 0x0019a5d7
LAB_0019a5d7:
MOV RDI,qword ptr [RBP + -0xa8]
CALL 0x0013b280
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[0x22f66d]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x4]
MOV dword ptr [RBP + -0xbc],EAX
CMP dword ptr [RBP + -0xbc],0x0
JZ 0x0019a614
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_0019a614:
CMP dword ptr [RBP + -0xbc],0x0
JNZ 0x0019a61f
JMP 0x0019a637
LAB_0019a61f:
LEA RDI,[0x22dc0c]
MOV ESI,0x5020
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_0019a637:
ADD RSP,0xc0
POP RBP
RET
|
void test_bulk_delete(void)
{
char cVar1;
int iVar2;
long lVar3;
ulong uVar4;
int4 local_a8;
int8 local_a4;
int4 local_9c;
int local_98;
int1 local_94;
int1 local_93 [3];
int8 *local_90;
int8 local_88;
int8 local_80;
int8 *local_78;
int1 *local_70;
int1 *local_68;
int8 local_48;
int4 local_28;
int8 local_18;
int local_c;
memset(local_93,0,3);
local_a4 = DAT_0022d7a8;
local_9c = DAT_0022d7b0;
local_a8 = 3;
if (opt_silent < '\x02') {
fprintf(*(FILE **)PTR_stdout_003aefd8,"\n\n#####################################\n");
uVar4 = (ulong)test_count;
test_count = test_count + 1;
fprintf(*(FILE **)PTR_stdout_003aefd8,"%u of (%u/%u): %s",uVar4,(ulong)iter_count,
(ulong)opt_count,"test_bulk_delete");
fprintf(*(FILE **)PTR_stdout_003aefd8," \n#####################################\n");
fflush(*(FILE **)PTR_stdout_003aefd8);
}
local_c = wrap_mysql_query(mysql,"DROP TABLE IF EXISTS t1");
if (local_c != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x4ff2,"r == 0");
}
local_c = wrap_mysql_query(mysql,"CREATE TABLE t1 (id int not null primary key)");
if (local_c != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x4ff4,"r == 0");
}
local_c = wrap_mysql_query(mysql,"INSERT INTO t1 VALUES (1),(2),(3),(4)");
if (local_c != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x4ff6,"r == 0");
}
verify_affected_rows(4);
local_18 = mysql_stmt_init(mysql);
local_c = wrap_mysql_stmt_prepare(local_18,"DELETE FROM t1 where id=?",0xffffffffffffffff);
if (local_c != 0) {
print_st_error(local_18);
}
if (local_c != 0) {
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x4ffb,"rc == 0");
}
memset(&local_88,0,0x70);
local_28 = 3;
local_78 = &local_a4;
local_48 = 0;
local_80 = 0;
local_88 = 0;
local_70 = &local_94;
local_68 = local_93;
mysql_stmt_attr_set(local_18,0xc9,&local_a8);
cVar1 = mysql_stmt_bind_param(local_18,&local_88);
local_c = (int)cVar1;
if (local_c != 0) {
print_st_error(local_18,0);
}
if (local_c != 0) {
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x5008,"rc == 0");
}
local_c = wrap_mysql_stmt_execute(local_18);
if (local_c != 0) {
print_st_error(local_18,0);
}
if (local_c != 0) {
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x500b,"rc == 0");
}
verify_affected_rows(3);
wrap_mysql_stmt_close(local_18);
local_c = wrap_mysql_query(mysql,"SELECT id FROM t1");
if (local_c != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x5011,"r == 0");
}
lVar3 = wrap_mysql_store_result(mysql);
if (lVar3 == 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x5014,"FALSE");
}
local_98 = 0;
while (local_90 = (int8 *)wrap_mysql_fetch_row(lVar3), local_90 != (int8 *)0x0) {
local_98 = local_98 + 1;
iVar2 = atoi((char *)*local_90);
if (iVar2 != 3) {
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x501a,
"atoi(row[0]) != 3");
}
}
if (local_98 != 1) {
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x501c,"i != 1");
}
wrap_mysql_free_result(lVar3);
local_c = wrap_mysql_query(mysql,"DROP TABLE t1");
if (local_c != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x5020,"r == 0");
}
return;
}
|
|
16,411
|
protect_against_repair_crash
|
eloqsql/storage/maria/ma_check.c
|
static my_bool protect_against_repair_crash(MARIA_HA *info,
const HA_CHECK *param,
my_bool discard_index)
{
MARIA_SHARE *share= info->s;
/*
There are other than recovery-related reasons to do the writes below:
- the physical size of the data file is sometimes used during repair: we
need to flush to have it exact
- we flush the state because maria_open(HA_OPEN_COPY) will want to read
it from disk.
*/
if (_ma_flush_table_files(info, MARIA_FLUSH_DATA | MARIA_FLUSH_INDEX,
FLUSH_FORCE_WRITE,
discard_index ? FLUSH_IGNORE_CHANGED :
FLUSH_FORCE_WRITE) ||
(share->changed &&
_ma_state_info_write(share,
MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET |
MA_STATE_INFO_WRITE_FULL_INFO |
MA_STATE_INFO_WRITE_LOCK)))
return TRUE;
/* In maria_chk this is not needed: */
if (maria_multi_threaded && share->base.born_transactional)
{
if ((param->testflag & T_NO_CREATE_RENAME_LSN) == 0)
{
/* this can be true only for a transactional table */
maria_mark_in_repair(info);
if (_ma_state_info_write(share,
MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET |
MA_STATE_INFO_WRITE_LOCK))
return TRUE;
}
if (translog_status == TRANSLOG_OK &&
_ma_update_state_lsns(share, translog_get_horizon(),
share->state.create_trid, FALSE, FALSE))
return TRUE;
if (_ma_sync_table_files(info))
return TRUE;
}
return FALSE;
}
|
O3
|
c
|
protect_against_repair_crash:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r12
movq %rdi, %r14
movq (%rdi), %r15
xorl %ecx, %ecx
cmpb $0x1, %dl
adcl $0x2, %ecx
movl $0x3, %esi
movl $0x3, %edx
callq 0x5c2c4
movb $0x1, %bl
testl %eax, %eax
je 0x7c707
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpb $0x0, 0x7de(%r15)
je 0x7c722
movq %r15, %rdi
movl $0x7, %esi
callq 0x5a5e6
testl %eax, %eax
jne 0x7c6fc
leaq 0x3a9248(%rip), %rax # 0x425971
cmpb $0x0, (%rax)
je 0x7c7ab
cmpb $0x0, 0x44c(%r15)
je 0x7c7ab
testb $0x4, 0xb14(%r12)
jne 0x7c769
movq (%r14), %rax
orl $0x402, 0x170(%rax) # imm = 0x402
orb $0x1, 0x624(%r14)
movq %r15, %rdi
movl $0x5, %esi
callq 0x5a5e6
testl %eax, %eax
jne 0x7c6fc
leaq 0x3a9230(%rip), %rax # 0x4259a0
cmpl $0x1, (%rax)
jne 0x7c79b
xorl %eax, %eax
callq 0x465e4
movq 0xe0(%r15), %rdx
movq %r15, %rdi
movq %rax, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x733e2
testl %eax, %eax
jne 0x7c6fc
movq %r14, %rdi
callq 0x5c4de
testl %eax, %eax
jne 0x7c6fc
xorl %ebx, %ebx
jmp 0x7c6fc
|
protect_against_repair_crash:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r12, rsi
mov r14, rdi
mov r15, [rdi]
xor ecx, ecx
cmp dl, 1
adc ecx, 2
mov esi, 3
mov edx, 3
call _ma_flush_table_files
mov bl, 1
test eax, eax
jz short loc_7C707
loc_7C6FC:
mov eax, ebx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_7C707:
cmp byte ptr [r15+7DEh], 0
jz short loc_7C722
mov rdi, r15
mov esi, 7
call _ma_state_info_write
test eax, eax
jnz short loc_7C6FC
loc_7C722:
lea rax, maria_multi_threaded
cmp byte ptr [rax], 0
jz short loc_7C7AB
cmp byte ptr [r15+44Ch], 0
jz short loc_7C7AB
test byte ptr [r12+0B14h], 4
jnz short loc_7C769
mov rax, [r14]
or dword ptr [rax+170h], 402h
or byte ptr [r14+624h], 1
mov rdi, r15
mov esi, 5
call _ma_state_info_write
test eax, eax
jnz short loc_7C6FC
loc_7C769:
lea rax, translog_status
cmp dword ptr [rax], 1
jnz short loc_7C79B
xor eax, eax
call translog_get_horizon
mov rdx, [r15+0E0h]
mov rdi, r15
mov rsi, rax
xor ecx, ecx
xor r8d, r8d
call _ma_update_state_lsns
test eax, eax
jnz loc_7C6FC
loc_7C79B:
mov rdi, r14
call _ma_sync_table_files
test eax, eax
jnz loc_7C6FC
loc_7C7AB:
xor ebx, ebx
jmp loc_7C6FC
|
long long protect_against_repair_crash(long long a1, long long a2, char a3)
{
unsigned int v3; // ebx
long long v4; // r15
long long horizon; // rax
v4 = *(_QWORD *)a1;
LOBYTE(v3) = 1;
if ( !(unsigned int)ma_flush_table_files(a1, 3, 3u, (unsigned int)(a3 == 0) + 2)
&& (!*(_BYTE *)(v4 + 2014) || !(unsigned int)ma_state_info_write(v4, 7u)) )
{
if ( !maria_multi_threaded || !*(_BYTE *)(v4 + 1100) )
return 0;
if ( (*(_BYTE *)(a2 + 2836) & 4) != 0
|| (*(_DWORD *)(*(_QWORD *)a1 + 368LL) |= 0x402u,
*(_BYTE *)(a1 + 1572) |= 1u,
!(unsigned int)ma_state_info_write(v4, 5u)) )
{
if ( translog_status != 1
|| (horizon = translog_get_horizon(),
!(unsigned int)ma_update_state_lsns(v4, horizon, *(_QWORD *)(v4 + 224), 0, 0)) )
{
if ( !ma_sync_table_files((_DWORD *)a1) )
return 0;
}
}
}
return v3;
}
|
protect_against_repair_crash:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R12,RSI
MOV R14,RDI
MOV R15,qword ptr [RDI]
XOR ECX,ECX
CMP DL,0x1
ADC ECX,0x2
MOV ESI,0x3
MOV EDX,0x3
CALL 0x0015c2c4
MOV BL,0x1
TEST EAX,EAX
JZ 0x0017c707
LAB_0017c6fc:
MOV EAX,EBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0017c707:
CMP byte ptr [R15 + 0x7de],0x0
JZ 0x0017c722
MOV RDI,R15
MOV ESI,0x7
CALL 0x0015a5e6
TEST EAX,EAX
JNZ 0x0017c6fc
LAB_0017c722:
LEA RAX,[0x525971]
CMP byte ptr [RAX],0x0
JZ 0x0017c7ab
CMP byte ptr [R15 + 0x44c],0x0
JZ 0x0017c7ab
TEST byte ptr [R12 + 0xb14],0x4
JNZ 0x0017c769
MOV RAX,qword ptr [R14]
OR dword ptr [RAX + 0x170],0x402
OR byte ptr [R14 + 0x624],0x1
MOV RDI,R15
MOV ESI,0x5
CALL 0x0015a5e6
TEST EAX,EAX
JNZ 0x0017c6fc
LAB_0017c769:
LEA RAX,[0x5259a0]
CMP dword ptr [RAX],0x1
JNZ 0x0017c79b
XOR EAX,EAX
CALL 0x001465e4
MOV RDX,qword ptr [R15 + 0xe0]
MOV RDI,R15
MOV RSI,RAX
XOR ECX,ECX
XOR R8D,R8D
CALL 0x001733e2
TEST EAX,EAX
JNZ 0x0017c6fc
LAB_0017c79b:
MOV RDI,R14
CALL 0x0015c4de
TEST EAX,EAX
JNZ 0x0017c6fc
LAB_0017c7ab:
XOR EBX,EBX
JMP 0x0017c6fc
|
ulong protect_against_repair_crash(long *param_1,long param_2,char param_3)
{
long lVar1;
int iVar2;
int8 uVar3;
int8 unaff_RBX;
ulong uVar4;
lVar1 = *param_1;
iVar2 = _ma_flush_table_files(param_1,3,3,(param_3 == '\0') + '\x02');
uVar4 = CONCAT71((int7)((ulong)unaff_RBX >> 8),1);
if (iVar2 == 0) {
if (*(char *)(lVar1 + 0x7de) != '\0') {
iVar2 = _ma_state_info_write(lVar1,7);
if (iVar2 != 0) goto LAB_0017c6fc;
}
if ((maria_multi_threaded != '\0') && (*(char *)(lVar1 + 0x44c) != '\0')) {
if ((*(byte *)(param_2 + 0xb14) & 4) == 0) {
*(uint *)(*param_1 + 0x170) = *(uint *)(*param_1 + 0x170) | 0x402;
*(byte *)((long)param_1 + 0x624) = *(byte *)((long)param_1 + 0x624) | 1;
iVar2 = _ma_state_info_write(lVar1,5);
if (iVar2 != 0) goto LAB_0017c6fc;
}
if (translog_status == 1) {
uVar3 = translog_get_horizon();
iVar2 = _ma_update_state_lsns(lVar1,uVar3,*(int8 *)(lVar1 + 0xe0),0,0);
if (iVar2 != 0) goto LAB_0017c6fc;
}
iVar2 = _ma_sync_table_files(param_1);
if (iVar2 != 0) goto LAB_0017c6fc;
}
uVar4 = 0;
}
LAB_0017c6fc:
return uVar4 & 0xffffffff;
}
|
|
16,412
|
mysql_stmt_internal_reset
|
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
|
static my_bool mysql_stmt_internal_reset(MYSQL_STMT *stmt, my_bool is_close)
{
MYSQL *mysql= stmt->mysql;
my_bool ret= 1;
unsigned int flags= MADB_RESET_LONGDATA | MADB_RESET_BUFFER | MADB_RESET_ERROR;
if (!mysql)
{
/* connection could be invalid, e.g. after mysql_stmt_close or failed reconnect
attempt (see bug CONC-97) */
SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (stmt->state >= MYSQL_STMT_USER_FETCHING &&
stmt->fetch_row_func == stmt_unbuffered_fetch)
flags|= MADB_RESET_BUFFER;
ret= madb_reset_stmt(stmt, flags);
if (stmt->stmt_id)
{
if ((stmt->state > MYSQL_STMT_EXECUTED &&
stmt->mysql->status != MYSQL_STATUS_READY) ||
stmt->mysql->server_status & SERVER_MORE_RESULTS_EXIST)
{
/* flush any pending (multiple) result sets */
if (stmt->state == MYSQL_STMT_WAITING_USE_OR_STORE)
{
stmt->default_rset_handler(stmt);
stmt->state = MYSQL_STMT_USER_FETCHING;
}
if (stmt->field_count)
{
while (mysql_stmt_next_result(stmt) == 0);
stmt->mysql->status= MYSQL_STATUS_READY;
}
}
if (!is_close)
ret= madb_reset_stmt(stmt, MADB_RESET_SERVER);
stmt->state= MYSQL_STMT_PREPARED;
}
else
stmt->state= MYSQL_STMT_INITTED;
stmt->upsert_status.affected_rows= mysql->affected_rows;
stmt->upsert_status.last_insert_id= mysql->insert_id;
stmt->upsert_status.server_status= mysql->server_status;
stmt->upsert_status.warning_count= mysql->warning_count;
mysql->status= MYSQL_STATUS_READY;
return(ret);
}
|
O0
|
c
|
mysql_stmt_internal_reset:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x20(%rbp)
movb $0x1, -0x21(%rbp)
movl $0xb, -0x28(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x42e7e
jmp 0x42e12
movq -0x10(%rbp), %rax
movl $0x7dd, 0x108(%rax) # imm = 0x7DD
movq -0x10(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
leaq 0x3e06e(%rip), %rax # 0x80ea0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x14220
movq -0x10(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi # imm = 0x10C
leaq 0x3e054(%rip), %rax # 0x80eb0
movq 0x68(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x14220
movq -0x10(%rbp), %rax
movb $0x0, 0x30b(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x42fe1
movq -0x10(%rbp), %rax
cmpl $0x5, 0x50(%rax)
jb 0x42ea5
movq -0x10(%rbp), %rax
leaq -0x2383(%rip), %rcx # 0x40b10
cmpq %rcx, 0x348(%rax)
jne 0x42ea5
movl -0x28(%rbp), %eax
orl $0x8, %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movl -0x28(%rbp), %esi
callq 0x444e0
movb %al, -0x21(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x42f6e
movq -0x10(%rbp), %rax
cmpl $0x2, 0x50(%rax)
jbe 0x42ede
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
cmpl $0x0, 0x488(%rax)
jne 0x42ef4
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x380(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x42f4a
movq -0x10(%rbp), %rax
cmpl $0x3, 0x50(%rax)
jne 0x42f1a
movq -0x10(%rbp), %rax
movq 0x358(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
movq -0x10(%rbp), %rax
movl $0x5, 0x50(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x60(%rax)
je 0x42f48
jmp 0x42f26
movq -0x10(%rbp), %rdi
callq 0x47060
cmpl $0x0, %eax
jne 0x42f36
jmp 0x42f26
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl $0x0, 0x488(%rax)
jmp 0x42f4a
cmpb $0x0, -0x11(%rbp)
jne 0x42f61
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x444e0
movb %al, -0x21(%rbp)
movq -0x10(%rbp), %rax
movl $0x1, 0x50(%rax)
jmp 0x42f79
movq -0x10(%rbp), %rax
movl $0x0, 0x50(%rax)
movq -0x20(%rbp), %rax
movq 0x338(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xf8(%rax)
movq -0x20(%rbp), %rax
movq 0x340(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x100(%rax)
movq -0x20(%rbp), %rax
movl 0x380(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xf4(%rax)
movq -0x20(%rbp), %rax
movl 0x388(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xf0(%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0x488(%rax)
movb -0x21(%rbp), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
mysql_stmt_internal_reset:
push rbp
mov rbp, rsp
sub rsp, 30h
mov al, sil
mov [rbp+var_10], rdi
mov [rbp+var_11], al
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov [rbp+var_20], rax
mov [rbp+var_21], 1
mov [rbp+var_28], 0Bh
cmp [rbp+var_20], 0
jnz short loc_42E7E
jmp short $+2
loc_42E12:
mov rax, [rbp+var_10]
mov dword ptr [rax+108h], 7DDh
mov rdi, [rbp+var_10]
add rdi, 30Dh
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+312h], 0
mov rdi, [rbp+var_10]
add rdi, 10Ch
lea rax, client_errors
mov rsi, [rax+68h]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+30Bh], 0
mov [rbp+var_1], 1
jmp loc_42FE1
loc_42E7E:
mov rax, [rbp+var_10]
cmp dword ptr [rax+50h], 5
jb short loc_42EA5
mov rax, [rbp+var_10]
lea rcx, stmt_unbuffered_fetch
cmp [rax+348h], rcx
jnz short loc_42EA5
mov eax, [rbp+var_28]
or eax, 8
mov [rbp+var_28], eax
loc_42EA5:
mov rdi, [rbp+var_10]
mov esi, [rbp+var_28]
call madb_reset_stmt
mov [rbp+var_21], al
mov rax, [rbp+var_10]
cmp qword ptr [rax+40h], 0
jz loc_42F6E
mov rax, [rbp+var_10]
cmp dword ptr [rax+50h], 2
jbe short loc_42EDE
mov rax, [rbp+var_10]
mov rax, [rax+38h]
cmp dword ptr [rax+488h], 0
jnz short loc_42EF4
loc_42EDE:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov eax, [rax+380h]
and eax, 8
cmp eax, 0
jz short loc_42F4A
loc_42EF4:
mov rax, [rbp+var_10]
cmp dword ptr [rax+50h], 3
jnz short loc_42F1A
mov rax, [rbp+var_10]
mov rax, [rax+358h]
mov rdi, [rbp+var_10]
call rax
mov rax, [rbp+var_10]
mov dword ptr [rax+50h], 5
loc_42F1A:
mov rax, [rbp+var_10]
cmp dword ptr [rax+60h], 0
jz short loc_42F48
jmp short $+2
loc_42F26:
mov rdi, [rbp+var_10]
call mysql_stmt_next_result
cmp eax, 0
jnz short loc_42F36
jmp short loc_42F26
loc_42F36:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov dword ptr [rax+488h], 0
loc_42F48:
jmp short $+2
loc_42F4A:
cmp [rbp+var_11], 0
jnz short loc_42F61
mov rdi, [rbp+var_10]
mov esi, 4
call madb_reset_stmt
mov [rbp+var_21], al
loc_42F61:
mov rax, [rbp+var_10]
mov dword ptr [rax+50h], 1
jmp short loc_42F79
loc_42F6E:
mov rax, [rbp+var_10]
mov dword ptr [rax+50h], 0
loc_42F79:
mov rax, [rbp+var_20]
mov rcx, [rax+338h]
mov rax, [rbp+var_10]
mov [rax+0F8h], rcx
mov rax, [rbp+var_20]
mov rcx, [rax+340h]
mov rax, [rbp+var_10]
mov [rax+100h], rcx
mov rax, [rbp+var_20]
mov ecx, [rax+380h]
mov rax, [rbp+var_10]
mov [rax+0F4h], ecx
mov rax, [rbp+var_20]
mov ecx, [rax+388h]
mov rax, [rbp+var_10]
mov [rax+0F0h], ecx
mov rax, [rbp+var_20]
mov dword ptr [rax+488h], 0
mov al, [rbp+var_21]
mov [rbp+var_1], al
loc_42FE1:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
|
char mysql_stmt_internal_reset(long long a1, char a2)
{
char v3; // [rsp+Fh] [rbp-21h]
long long v4; // [rsp+10h] [rbp-20h]
v4 = *(_QWORD *)(a1 + 56);
if ( v4 )
{
v3 = madb_reset_stmt(a1, 11LL);
if ( *(_QWORD *)(a1 + 64) )
{
if ( *(_DWORD *)(a1 + 80) > 2u && *(_DWORD *)(*(_QWORD *)(a1 + 56) + 1160LL)
|| (*(_DWORD *)(*(_QWORD *)(a1 + 56) + 896LL) & 8) != 0 )
{
if ( *(_DWORD *)(a1 + 80) == 3 )
{
(*(void ( **)(long long))(a1 + 856))(a1);
*(_DWORD *)(a1 + 80) = 5;
}
if ( *(_DWORD *)(a1 + 96) )
{
while ( !(unsigned int)mysql_stmt_next_result(a1) )
;
*(_DWORD *)(*(_QWORD *)(a1 + 56) + 1160LL) = 0;
}
}
if ( !a2 )
v3 = madb_reset_stmt(a1, 4LL);
*(_DWORD *)(a1 + 80) = 1;
}
else
{
*(_DWORD *)(a1 + 80) = 0;
}
*(_QWORD *)(a1 + 248) = *(_QWORD *)(v4 + 824);
*(_QWORD *)(a1 + 256) = *(_QWORD *)(v4 + 832);
*(_DWORD *)(a1 + 244) = *(_DWORD *)(v4 + 896);
*(_DWORD *)(a1 + 240) = *(_DWORD *)(v4 + 904);
*(_DWORD *)(v4 + 1160) = 0;
return v3;
}
else
{
*(_DWORD *)(a1 + 264) = 2013;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, client_errors[13], 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
}
|
mysql_stmt_internal_reset:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV AL,SIL
MOV qword ptr [RBP + -0x10],RDI
MOV byte ptr [RBP + -0x11],AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RBP + -0x20],RAX
MOV byte ptr [RBP + -0x21],0x1
MOV dword ptr [RBP + -0x28],0xb
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x00142e7e
JMP 0x00142e12
LAB_00142e12:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x108],0x7dd
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x30d
LEA RAX,[0x180ea0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00114220
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x312],0x0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x10c
LEA RAX,[0x180eb0]
MOV RSI,qword ptr [RAX + 0x68]
MOV EDX,0x200
CALL 0x00114220
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x30b],0x0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00142fe1
LAB_00142e7e:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x50],0x5
JC 0x00142ea5
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x140b10]
CMP qword ptr [RAX + 0x348],RCX
JNZ 0x00142ea5
MOV EAX,dword ptr [RBP + -0x28]
OR EAX,0x8
MOV dword ptr [RBP + -0x28],EAX
LAB_00142ea5:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x28]
CALL 0x001444e0
MOV byte ptr [RBP + -0x21],AL
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x40],0x0
JZ 0x00142f6e
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x50],0x2
JBE 0x00142ede
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
CMP dword ptr [RAX + 0x488],0x0
JNZ 0x00142ef4
LAB_00142ede:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV EAX,dword ptr [RAX + 0x380]
AND EAX,0x8
CMP EAX,0x0
JZ 0x00142f4a
LAB_00142ef4:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x50],0x3
JNZ 0x00142f1a
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x358]
MOV RDI,qword ptr [RBP + -0x10]
CALL RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x50],0x5
LAB_00142f1a:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x60],0x0
JZ 0x00142f48
JMP 0x00142f26
LAB_00142f26:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00147060
CMP EAX,0x0
JNZ 0x00142f36
JMP 0x00142f26
LAB_00142f36:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV dword ptr [RAX + 0x488],0x0
LAB_00142f48:
JMP 0x00142f4a
LAB_00142f4a:
CMP byte ptr [RBP + -0x11],0x0
JNZ 0x00142f61
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x4
CALL 0x001444e0
MOV byte ptr [RBP + -0x21],AL
LAB_00142f61:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x50],0x1
JMP 0x00142f79
LAB_00142f6e:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x50],0x0
LAB_00142f79:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX + 0x338]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xf8],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX + 0x340]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x100],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x380]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xf4],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x388]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xf0],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x488],0x0
MOV AL,byte ptr [RBP + -0x21]
MOV byte ptr [RBP + -0x1],AL
LAB_00142fe1:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 mysql_stmt_internal_reset(long param_1,char param_2)
{
long lVar1;
int iVar2;
int1 local_29;
int1 local_9;
lVar1 = *(long *)(param_1 + 0x38);
if (lVar1 == 0) {
*(int4 *)(param_1 + 0x108) = 0x7dd;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s_Lost_connection_to_server_during_00180f18,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
local_9 = 1;
}
else {
local_29 = madb_reset_stmt(param_1,0xb);
if (*(long *)(param_1 + 0x40) == 0) {
*(int4 *)(param_1 + 0x50) = 0;
}
else {
if (((2 < *(uint *)(param_1 + 0x50)) && (*(int *)(*(long *)(param_1 + 0x38) + 0x488) != 0)) ||
((*(uint *)(*(long *)(param_1 + 0x38) + 0x380) & 8) != 0)) {
if (*(int *)(param_1 + 0x50) == 3) {
(**(code **)(param_1 + 0x358))(param_1);
*(int4 *)(param_1 + 0x50) = 5;
}
if (*(int *)(param_1 + 0x60) != 0) {
do {
iVar2 = mysql_stmt_next_result(param_1);
} while (iVar2 == 0);
*(int4 *)(*(long *)(param_1 + 0x38) + 0x488) = 0;
}
}
if (param_2 == '\0') {
local_29 = madb_reset_stmt(param_1,4);
}
*(int4 *)(param_1 + 0x50) = 1;
}
*(int8 *)(param_1 + 0xf8) = *(int8 *)(lVar1 + 0x338);
*(int8 *)(param_1 + 0x100) = *(int8 *)(lVar1 + 0x340);
*(int4 *)(param_1 + 0xf4) = *(int4 *)(lVar1 + 0x380);
*(int4 *)(param_1 + 0xf0) = *(int4 *)(lVar1 + 0x388);
*(int4 *)(lVar1 + 0x488) = 0;
local_9 = local_29;
}
return local_9;
}
|
|
16,413
|
my_rmtree
|
eloqsql/mysys/my_delete.c
|
int my_rmtree(const char *dir, myf MyFlags)
{
char path[FN_REFLEN];
char sep[] = { FN_LIBCHAR, 0 };
int err = 0;
uint i;
MY_DIR *dir_info = my_dir(dir, MYF(MY_DONT_SORT | MY_WANT_STAT));
if (!dir_info)
return 1;
for (i = 0; i < dir_info->number_of_files; i++)
{
FILEINFO *file = dir_info->dir_entry + i;
/* Skip "." and ".." */
if (!strcmp(file->name, ".") || !strcmp(file->name, ".."))
continue;
strxnmov(path, sizeof(path), dir, sep, file->name, NULL);
if (!MY_S_ISDIR(file->mystat->st_mode))
{
err = my_delete(path, MyFlags);
#ifdef _WIN32
/*
On Windows, check and possible reset readonly attribute.
my_delete(), or DeleteFile does not remove theses files.
*/
if (err)
{
DWORD attr = GetFileAttributes(path);
if (attr != INVALID_FILE_ATTRIBUTES &&
(attr & FILE_ATTRIBUTE_READONLY))
{
SetFileAttributes(path, attr &~FILE_ATTRIBUTE_READONLY);
err = my_delete(path, MyFlags);
}
}
#endif
}
else
err = my_rmtree(path, MyFlags);
if (err)
break;
}
my_dirend(dir_info);
if (!err)
err = rmdir(dir);
return err;
}
|
O3
|
c
|
my_rmtree:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp # imm = 0x228
movq %rsi, -0x240(%rbp)
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movw $0x2f, -0x232(%rbp)
movl $0x4000, %esi # imm = 0x4000
movq %rdi, -0x248(%rbp)
callq 0x6ac79
testq %rax, %rax
je 0x67779
movq %rax, %r15
movl 0x8(%rax), %eax
testl %eax, %eax
je 0x67760
movl $0x8, %r14d
leaq -0x230(%rbp), %rbx
xorl %r12d, %r12d
movq (%r15), %r13
movq -0x8(%r13,%r14), %r8
cmpb $0x2e, (%r8)
jne 0x676e9
cmpb $0x0, 0x1(%r8)
je 0x6774e
cmpb $0x2e, 0x1(%r8)
jne 0x676e9
cmpb $0x0, 0x2(%r8)
je 0x6774e
movl $0x200, %esi # imm = 0x200
movq %rbx, %rdi
movq -0x248(%rbp), %rdx
leaq -0x232(%rbp), %rcx
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x9ba20
movq (%r13,%r14), %rax
movl 0x18(%rax), %eax
movl $0xf000, %ecx # imm = 0xF000
andl %ecx, %eax
movq %rbx, %rdi
cmpl $0x4000, %eax # imm = 0x4000
jne 0x67730
movq -0x240(%rbp), %rsi
callq 0x6765d
jmp 0x6773c
movq -0x240(%rbp), %rsi
callq 0x67588
movl %eax, %r13d
testl %eax, %eax
jne 0x67781
movl 0x8(%r15), %eax
leaq -0x230(%rbp), %rbx
incq %r12
movl %eax, %ecx
addq $0x10, %r14
cmpq %rcx, %r12
jb 0x676c6
movq %r15, %rdi
callq 0x6ac48
movq -0x248(%rbp), %rdi
callq 0x37430
movl %eax, %r13d
jmp 0x67789
movl $0x1, %r13d
jmp 0x67789
movq %r15, %rdi
callq 0x6ac48
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x677ad
movl %r13d, %eax
addq $0x228, %rsp # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x372b0
nop
|
my_rmtree:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 228h
mov [rbp+var_240], rsi
mov rax, fs:28h
mov [rbp+var_30], rax
mov [rbp+var_232], 2Fh ; '/'
mov esi, 4000h
mov [rbp+var_248], rdi
call my_dir
test rax, rax
jz loc_67779
mov r15, rax
mov eax, [rax+8]
test eax, eax
jz loc_67760
mov r14d, 8
lea rbx, [rbp+var_230]
xor r12d, r12d
loc_676C6:
mov r13, [r15]
mov r8, [r13+r14-8]
cmp byte ptr [r8], 2Eh ; '.'
jnz short loc_676E9
cmp byte ptr [r8+1], 0
jz short loc_6774E
cmp byte ptr [r8+1], 2Eh ; '.'
jnz short loc_676E9
cmp byte ptr [r8+2], 0
jz short loc_6774E
loc_676E9:
mov esi, 200h
mov rdi, rbx
mov rdx, [rbp+var_248]
lea rcx, [rbp+var_232]
xor r9d, r9d
xor eax, eax
call strxnmov
mov rax, [r13+r14+0]
mov eax, [rax+18h]
mov ecx, 0F000h
and eax, ecx
mov rdi, rbx
cmp eax, 4000h
jnz short loc_67730
mov rsi, [rbp+var_240]
call my_rmtree
jmp short loc_6773C
loc_67730:
mov rsi, [rbp+var_240]
call my_delete
loc_6773C:
mov r13d, eax
test eax, eax
jnz short loc_67781
mov eax, [r15+8]
lea rbx, [rbp+var_230]
loc_6774E:
inc r12
mov ecx, eax
add r14, 10h
cmp r12, rcx
jb loc_676C6
loc_67760:
mov rdi, r15
call my_dirend
mov rdi, [rbp+var_248]
call _rmdir
mov r13d, eax
jmp short loc_67789
loc_67779:
mov r13d, 1
jmp short loc_67789
loc_67781:
mov rdi, r15
call my_dirend
loc_67789:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_677AD
mov eax, r13d
add rsp, 228h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_677AD:
call ___stack_chk_fail
|
long long my_rmtree(long long a1, long long a2)
{
long long v2; // rax
long long v3; // r15
unsigned int v4; // eax
long long v5; // r14
unsigned long long i; // r12
long long v7; // r13
_BYTE *v8; // r8
unsigned int v9; // eax
unsigned int v10; // r13d
char v12; // [rsp+0h] [rbp-250h]
__int16 v13; // [rsp+1Eh] [rbp-232h] BYREF
_BYTE v14[512]; // [rsp+20h] [rbp-230h] BYREF
unsigned long long v15; // [rsp+220h] [rbp-30h]
v15 = __readfsqword(0x28u);
v13 = 47;
v2 = my_dir(a1, 0x4000LL);
if ( v2 )
{
v3 = v2;
v4 = *(_DWORD *)(v2 + 8);
if ( v4 )
{
v5 = 8LL;
for ( i = 0LL; i < v4; ++i )
{
v7 = *(_QWORD *)v3;
v8 = *(_BYTE **)(*(_QWORD *)v3 + v5 - 8);
if ( *v8 != 46 || v8[1] && (v8[1] != 46 || v8[2]) )
{
strxnmov((unsigned int)v14, 512, a1, (unsigned int)&v13, (_DWORD)v8, 0, v12);
if ( (*(_DWORD *)(*(_QWORD *)(v7 + v5) + 24LL) & 0xF000) == 0x4000 )
v9 = my_rmtree(v14, a2);
else
v9 = my_delete((long long)v14, a2);
v10 = v9;
if ( v9 )
{
my_dirend(v3);
return v10;
}
v4 = *(_DWORD *)(v3 + 8);
}
v5 += 16LL;
}
}
my_dirend(v3);
return (unsigned int)rmdir(a1);
}
else
{
return 1;
}
}
|
my_rmtree:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x228
MOV qword ptr [RBP + -0x240],RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV word ptr [RBP + -0x232],0x2f
MOV ESI,0x4000
MOV qword ptr [RBP + -0x248],RDI
CALL 0x0016ac79
TEST RAX,RAX
JZ 0x00167779
MOV R15,RAX
MOV EAX,dword ptr [RAX + 0x8]
TEST EAX,EAX
JZ 0x00167760
MOV R14D,0x8
LEA RBX,[RBP + -0x230]
XOR R12D,R12D
LAB_001676c6:
MOV R13,qword ptr [R15]
MOV R8,qword ptr [R13 + R14*0x1 + -0x8]
CMP byte ptr [R8],0x2e
JNZ 0x001676e9
CMP byte ptr [R8 + 0x1],0x0
JZ 0x0016774e
CMP byte ptr [R8 + 0x1],0x2e
JNZ 0x001676e9
CMP byte ptr [R8 + 0x2],0x0
JZ 0x0016774e
LAB_001676e9:
MOV ESI,0x200
MOV RDI,RBX
MOV RDX,qword ptr [RBP + -0x248]
LEA RCX,[RBP + -0x232]
XOR R9D,R9D
XOR EAX,EAX
CALL 0x0019ba20
MOV RAX,qword ptr [R13 + R14*0x1]
MOV EAX,dword ptr [RAX + 0x18]
MOV ECX,0xf000
AND EAX,ECX
MOV RDI,RBX
CMP EAX,0x4000
JNZ 0x00167730
MOV RSI,qword ptr [RBP + -0x240]
CALL 0x0016765d
JMP 0x0016773c
LAB_00167730:
MOV RSI,qword ptr [RBP + -0x240]
CALL 0x00167588
LAB_0016773c:
MOV R13D,EAX
TEST EAX,EAX
JNZ 0x00167781
MOV EAX,dword ptr [R15 + 0x8]
LEA RBX,[RBP + -0x230]
LAB_0016774e:
INC R12
MOV ECX,EAX
ADD R14,0x10
CMP R12,RCX
JC 0x001676c6
LAB_00167760:
MOV RDI,R15
CALL 0x0016ac48
MOV RDI,qword ptr [RBP + -0x248]
CALL 0x00137430
MOV R13D,EAX
JMP 0x00167789
LAB_00167779:
MOV R13D,0x1
JMP 0x00167789
LAB_00167781:
MOV RDI,R15
CALL 0x0016ac48
LAB_00167789:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001677ad
MOV EAX,R13D
ADD RSP,0x228
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001677ad:
CALL 0x001372b0
|
int my_rmtree(char *param_1,int8 param_2)
{
long lVar1;
char *pcVar2;
uint uVar3;
int iVar4;
long *plVar5;
ulong uVar6;
long lVar7;
long in_FS_OFFSET;
int2 local_23a;
int1 local_238 [512];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
local_23a = 0x2f;
plVar5 = (long *)my_dir(param_1,0x4000);
if (plVar5 == (long *)0x0) {
iVar4 = 1;
}
else {
uVar3 = *(uint *)(plVar5 + 1);
if (uVar3 != 0) {
lVar7 = 8;
uVar6 = 0;
do {
lVar1 = *plVar5;
pcVar2 = *(char **)(lVar1 + -8 + lVar7);
if ((*pcVar2 != '.') || ((pcVar2[1] != '\0' && ((pcVar2[1] != '.' || (pcVar2[2] != '\0')))))
) {
strxnmov(local_238,0x200,param_1,&local_23a,pcVar2,0);
if ((*(uint *)(*(long *)(lVar1 + lVar7) + 0x18) & 0xf000) == 0x4000) {
iVar4 = my_rmtree(local_238,param_2);
}
else {
iVar4 = my_delete(local_238,param_2);
}
if (iVar4 != 0) {
my_dirend(plVar5);
goto LAB_00167789;
}
uVar3 = *(uint *)(plVar5 + 1);
}
uVar6 = uVar6 + 1;
lVar7 = lVar7 + 0x10;
} while (uVar6 < uVar3);
}
my_dirend(plVar5);
iVar4 = rmdir(param_1);
}
LAB_00167789:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return iVar4;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
16,414
|
my_load_defaults
|
eloqsql/mysys/my_default.c
|
int my_load_defaults(const char *conf_file, const char **groups, int *argc,
char ***argv, const char ***default_directories)
{
DYNAMIC_ARRAY args;
int args_used= 0;
int error= 0;
MEM_ROOT alloc;
char *ptr,**res;
const char **dirs;
DBUG_ENTER("my_load_defaults");
init_alloc_root(key_memory_defaults, &alloc, 512, 0, MYF(0));
if ((dirs= init_default_directories(&alloc)) == NULL)
goto err;
args_used= get_defaults_options(*argv);
if (my_init_dynamic_array(key_memory_defaults, &args, sizeof(char*), 128, 64,
MYF(0)))
goto err;
insert_dynamic(&args, *argv);/* Name MUST be set, even by embedded library */
*argc-= args_used;
*argv+= args_used;
if (!my_no_defaults)
{
TYPELIB group; // XXX
struct handle_option_ctx ctx;
group.count=0;
group.name= "defaults";
group.type_names= groups;
for (; *groups ; groups++)
group.count++;
ctx.alloc= &alloc;
ctx.args= &args;
ctx.group= &group;
if ((error= my_search_option_files(conf_file, &ctx, dirs)))
{
delete_dynamic(&args);
free_root(&alloc,MYF(0));
DBUG_RETURN(error);
}
}
if (!(ptr=(char*) alloc_root(&alloc, sizeof(alloc) +
(args.elements + *argc + 3) * sizeof(char*))))
goto err;
res= (char**) (ptr+sizeof(alloc));
/* found arguments + command line arguments to new array */
memcpy(res, args.buffer, args.elements * sizeof(char*));
if (my_defaults_mark_files)
{
res[args.elements++]= file_marker;
res[args.elements++]= (char*)"";
}
if (*argc)
memcpy(res + args.elements, *argv, *argc * sizeof(char*));
(*argc)+= args.elements;
*argv= res;
(*argv)[*argc]= 0;
*(MEM_ROOT*) ptr= alloc; /* Save alloc root for free */
delete_dynamic(&args);
if (my_print_defaults)
{
int i;
printf("%s would have been started with the following arguments:\n",
**argv);
for (i=1 ; i < *argc ; i++)
printf("%s ", (*argv)[i]);
puts("");
DBUG_RETURN(4);
}
if (default_directories)
*default_directories= dirs;
DBUG_RETURN(0);
err:
fprintf(stderr,"Fatal error in defaults handling. Program aborted\n");
DBUG_RETURN(2);
}
|
O3
|
c
|
my_load_defaults:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %r8, -0xa8(%rbp)
movq %rcx, %r12
movq %rdx, -0x30(%rbp)
movq %rsi, %r13
movq %rdi, -0xb0(%rbp)
leaq 0xb82807(%rip), %rbx # 0xc31018
movl (%rbx), %edi
leaq -0xf0(%rbp), %r15
movl $0x200, %edx # imm = 0x200
movq %r15, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xb96e8
movq %r15, %rdi
callq 0xaecff
movq %rax, -0x38(%rbp)
testq %rax, %rax
je 0xae876
movq (%r12), %rdi
callq 0xae614
movl %eax, %r14d
movl (%rbx), %edi
movq $0x0, (%rsp)
leaq -0x88(%rbp), %rsi
movl $0x8, %edx
xorl %ecx, %ecx
movl $0x80, %r8d
movl $0x40, %r9d
callq 0xac5ec
testb %al, %al
je 0xae8ae
movq 0x2fd72b(%rip), %rax # 0x3abfa8
movq (%rax), %rdi
leaq 0x50e80(%rip), %rdx # 0xff707
movl $0x1, %esi
xorl %eax, %eax
callq 0x2a210
movl $0x2, %r14d
movl %r14d, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r12), %rsi
movq %r12, %rbx
leaq -0x88(%rbp), %r12
movq %r12, %rdi
callq 0xac68a
movq -0x30(%rbp), %rcx
subl %r14d, (%rcx)
movslq %r14d, %rax
shlq $0x3, %rax
movq %rbx, -0x40(%rbp)
addq %rax, (%rbx)
leaq 0xb81751(%rip), %rax # 0xc30031
cmpb $0x0, (%rax)
je 0xae992
movl -0x80(%rbp), %eax
movl (%rcx), %ecx
addl %ecx, %eax
addl $0x3, %eax
leaq 0x40(,%rax,8), %rsi
leaq -0xf0(%rbp), %rdi
callq 0xb983f
testq %rax, %rax
je 0xae876
movq %rax, %r15
leaq 0x40(%rax), %r12
movq -0x88(%rbp), %rsi
movl -0x80(%rbp), %ebx
leaq (,%rbx,8), %rdx
movq %r12, %rdi
callq 0x2a0b0
leaq 0xb816f8(%rip), %rax # 0xc30030
cmpb $0x0, (%rax)
je 0xae966
movq 0x2ff754(%rip), %rax # 0x3ae098
movl %ebx, %ecx
incl %ecx
movl %ecx, -0x80(%rbp)
movq %rax, (%r12,%rbx,8)
movl -0x80(%rbp), %eax
leal 0x1(%rax), %ecx
movl %ecx, -0x80(%rbp)
leaq 0x4da15(%rip), %rcx # 0xfc374
movq %rcx, (%r12,%rax,8)
movl -0x80(%rbp), %ebx
movq -0x30(%rbp), %r13
movslq (%r13), %rdx
testq %rdx, %rdx
je 0xae9d8
movl %ebx, %eax
leaq (%r12,%rax,8), %rdi
movq -0x40(%rbp), %r14
movq (%r14), %rsi
shlq $0x3, %rdx
callq 0x2a0b0
movl -0x80(%rbp), %ebx
movl (%r13), %eax
jmp 0xae9de
movl $0x0, -0x60(%rbp)
leaq 0x50cbf(%rip), %rax # 0xff65f
movq %rax, -0x58(%rbp)
movq %r13, -0x50(%rbp)
cmpq $0x0, (%r13)
je 0xaeac1
movl $0x1, %eax
xorl %ecx, %ecx
addl $0x2, %eax
cmpq $0x0, 0x8(%r13,%rcx,8)
leaq 0x1(%rcx), %rcx
jne 0xae9ba
movl %ecx, -0x60(%rbp)
movl %eax, %r14d
shlq $0x3, %r14
jmp 0xaeac7
xorl %eax, %eax
movq -0x40(%rbp), %r14
addl %ebx, %eax
movl %eax, (%r13)
movq %r12, (%r14)
movslq (%r13), %rax
movq $0x0, 0x40(%r15,%rax,8)
movups -0xf0(%rbp), %xmm0
movups -0xe0(%rbp), %xmm1
movups -0xd0(%rbp), %xmm2
movups -0xc0(%rbp), %xmm3
movups %xmm3, 0x30(%r15)
movups %xmm2, 0x20(%r15)
movups %xmm1, 0x10(%r15)
movups %xmm0, (%r15)
leaq -0x88(%rbp), %rdi
callq 0xac8e4
leaq 0xb815fc(%rip), %rax # 0xc30032
cmpb $0x0, (%rax)
je 0xaeaa2
movq %r14, %r15
movq (%r14), %rax
movq (%rax), %rdx
leaq 0x50c82(%rip), %rsi # 0xff6cd
movl $0x1, %edi
xorl %eax, %eax
callq 0x2a8d0
cmpl $0x2, (%r13)
jl 0xaea8d
movl $0x1, %r14d
leaq 0x51603(%rip), %rbx # 0x10006e
movq (%r15), %rax
movq (%rax,%r14,8), %rdx
movl $0x1, %edi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2a8d0
incq %r14
movslq (%r13), %rax
cmpq %rax, %r14
jl 0xaea6b
movl $0xa, %edi
callq 0x2a9e0
movl $0x4, %r14d
jmp 0xae899
xorl %r14d, %r14d
movq -0xa8(%rbp), %rax
testq %rax, %rax
je 0xae899
movq -0x38(%rbp), %rcx
movq %rcx, (%rax)
jmp 0xae899
movl $0x8, %r14d
movq %r15, -0xa0(%rbp)
movq %r12, -0x98(%rbp)
leaq -0x60(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq 0xb81559(%rip), %rax # 0xc30040
movq (%rax), %rdi
testq %rdi, %rdi
je 0xaebab
callq 0x2a380
movq %rax, %r13
leaq -0xf0(%rbp), %rdi
movq %r14, %rsi
callq 0xb983f
movl $0x2, %r14d
testq %rax, %rax
je 0xaec8f
movq %rax, %r15
cmpl $0x0, -0x60(%rbp)
je 0xaeb98
incq %r13
xorl %r12d, %r12d
movq -0x50(%rbp), %rcx
movq (%rcx,%r12,8), %rdi
movq %rdi, (%r15,%r12,8)
callq 0x2a380
movq %rax, %r14
movq -0xa0(%rbp), %rdi
leal (%rax,%r13), %esi
callq 0xb983f
testq %rax, %rax
je 0xaec89
movq %rax, %rbx
movl -0x60(%rbp), %eax
addl %r12d, %eax
movq %rbx, (%r15,%rax,8)
movq (%r15,%r12,8), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x2a0b0
addq %r14, %rbx
leaq 0xb814c5(%rip), %rax # 0xc30040
movq (%rax), %rsi
movq %rbx, %rdi
movq %r13, %rdx
callq 0x2a0b0
incq %r12
movl -0x60(%rbp), %ecx
cmpq %rcx, %r12
jb 0xaeb28
addl %ecx, %ecx
jmp 0xaeb9a
xorl %ecx, %ecx
movl %ecx, -0x60(%rbp)
movq %r15, -0x50(%rbp)
movl %ecx, %ecx
movq $0x0, (%r15,%rcx,8)
leaq 0xb81486(%rip), %rbx # 0xc30038
movq (%rbx), %rcx
testq %rcx, %rcx
jne 0xaecae
movq -0xb0(%rbp), %r13
movq %r13, %rdi
callq 0xb0158
testq %rax, %rax
je 0xaec10
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0xaf0c2
testl %eax, %eax
jns 0xaecf6
movq 0x2fd3b6(%rip), %rax # 0x3abfa8
movq (%rax), %rdi
leaq 0x50b0b(%rip), %rdx # 0xff707
movl $0x1, %r14d
movl $0x1, %esi
xorl %eax, %eax
callq 0x2a210
jmp 0xaec8f
movq -0x38(%rbp), %rax
movq (%rax), %rsi
testq %rsi, %rsi
je 0xaecf6
movq -0x38(%rbp), %r14
addq $0x8, %r14
leaq 0xb81419(%rip), %rbx # 0xc30048
leaq 0x4d73e(%rip), %r15 # 0xfc374
leaq -0xa0(%rbp), %r12
cmpb $0x0, (%rsi)
je 0xaec53
movq %r12, %rdi
movq %r13, %rdx
callq 0xaf0c2
testl %eax, %eax
jns 0xaec5b
jmp 0xaebeb
movq (%rbx), %rcx
testq %rcx, %rcx
jne 0xaec6c
movq (%r14), %rsi
addq $0x8, %r14
testq %rsi, %rsi
jne 0xaec3d
jmp 0xaecf6
movq %r12, %rdi
movq %r15, %rsi
movq %r15, %rdx
xorl %r8d, %r8d
callq 0x30662
testl %eax, %eax
js 0xaebeb
je 0xaec5b
jmp 0xaecd1
movl $0x2, %r14d
leaq -0x88(%rbp), %rdi
callq 0xac8e4
leaq -0xf0(%rbp), %rdi
xorl %esi, %esi
callq 0xb9ab7
jmp 0xae899
leaq 0x4d6bf(%rip), %rdx # 0xfc374
leaq -0xa0(%rbp), %rdi
movq %rdx, %rsi
xorl %r8d, %r8d
callq 0x30662
testl %eax, %eax
js 0xaebeb
je 0xaecf6
movq 0x2fd2d0(%rip), %rax # 0x3abfa8
movq (%rax), %rdi
movq (%rbx), %rcx
leaq 0x50d19(%rip), %rdx # 0xff9fe
movl $0x1, %esi
xorl %eax, %eax
callq 0x2a210
jmp 0xaebeb
movq -0x30(%rbp), %rcx
jmp 0xae8e9
|
my_load_defaults:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0D8h
mov [rbp+var_A8], r8
mov r12, rcx
mov [rbp+var_30], rdx
mov r13, rsi
mov [rbp+var_B0], rdi
lea rbx, key_memory_defaults
mov edi, [rbx]
lea r15, [rbp+var_F0]
mov edx, 200h
mov rsi, r15
xor ecx, ecx
xor r8d, r8d
call init_alloc_root
mov rdi, r15
call init_default_directories
mov [rbp+var_38], rax
test rax, rax
jz short loc_AE876
mov rdi, [r12]
call get_defaults_options
mov r14d, eax
mov edi, [rbx]
mov [rsp+100h+var_100], 0
lea rsi, [rbp+var_88]
mov edx, 8
xor ecx, ecx
mov r8d, 80h
mov r9d, 40h ; '@'
call init_dynamic_array2
test al, al
jz short loc_AE8AE
loc_AE876:
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rdx, aFatalErrorInDe; "Fatal error in defaults handling. Progr"...
mov esi, 1
xor eax, eax
call ___fprintf_chk
mov r14d, 2
loc_AE899:
mov eax, r14d
add rsp, 0D8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_AE8AE:
mov rsi, [r12]
mov rbx, r12
lea r12, [rbp+var_88]
mov rdi, r12
call insert_dynamic
mov rcx, [rbp+var_30]
sub [rcx], r14d
movsxd rax, r14d
shl rax, 3
mov [rbp+var_40], rbx
add [rbx], rax
lea rax, my_no_defaults
cmp byte ptr [rax], 0
jz loc_AE992
loc_AE8E9:
mov eax, [rbp+var_80]
mov ecx, [rcx]
add eax, ecx
add eax, 3
lea rsi, ds:40h[rax*8]
lea rdi, [rbp+var_F0]
call alloc_root
test rax, rax
jz loc_AE876
mov r15, rax
lea r12, [rax+40h]
mov rsi, [rbp+var_88]
mov ebx, [rbp+var_80]
lea rdx, ds:0[rbx*8]
mov rdi, r12
call _memcpy
lea rax, my_defaults_mark_files
cmp byte ptr [rax], 0
jz short loc_AE966
mov rax, cs:file_marker
mov ecx, ebx
inc ecx
mov [rbp+var_80], ecx
mov [r12+rbx*8], rax
mov eax, [rbp+var_80]
lea ecx, [rax+1]
mov [rbp+var_80], ecx
lea rcx, aTotalKeyblocks+30h; ""
mov [r12+rax*8], rcx
mov ebx, [rbp+var_80]
loc_AE966:
mov r13, [rbp+var_30]
movsxd rdx, dword ptr [r13+0]
test rdx, rdx
jz short loc_AE9D8
mov eax, ebx
lea rdi, [r12+rax*8]
mov r14, [rbp+var_40]
mov rsi, [r14]
shl rdx, 3
call _memcpy
mov ebx, [rbp+var_80]
mov eax, [r13+0]
jmp short loc_AE9DE
loc_AE992:
mov [rbp+var_60], 0
lea rax, aNoDefaults+5; "defaults"
mov [rbp+var_58], rax
mov [rbp+var_50], r13
cmp qword ptr [r13+0], 0
jz loc_AEAC1
mov eax, 1
xor ecx, ecx
loc_AE9BA:
add eax, 2
cmp qword ptr [r13+rcx*8+8], 0
lea rcx, [rcx+1]
jnz short loc_AE9BA
mov [rbp+var_60], ecx
mov r14d, eax
shl r14, 3
jmp loc_AEAC7
loc_AE9D8:
xor eax, eax
mov r14, [rbp+var_40]
loc_AE9DE:
add eax, ebx
mov [r13+0], eax
mov [r14], r12
movsxd rax, dword ptr [r13+0]
mov qword ptr [r15+rax*8+40h], 0
movups xmm0, [rbp+var_F0]
movups xmm1, [rbp+var_E0]
movups xmm2, [rbp+var_D0]
movups xmm3, [rbp+var_C0]
movups xmmword ptr [r15+30h], xmm3
movups xmmword ptr [r15+20h], xmm2
movups xmmword ptr [r15+10h], xmm1
movups xmmword ptr [r15], xmm0
lea rdi, [rbp+var_88]
call delete_dynamic
lea rax, my_print_defaults
cmp byte ptr [rax], 0
jz short loc_AEAA2
mov r15, r14
mov rax, [r14]
mov rdx, [rax]
lea rsi, aSWouldHaveBeen; "%s would have been started with the fol"...
mov edi, 1
xor eax, eax
call ___printf_chk
cmp dword ptr [r13+0], 2
jl short loc_AEA8D
mov r14d, 1
lea rbx, aSS+4; "%s "
loc_AEA6B:
mov rax, [r15]
mov rdx, [rax+r14*8]
mov edi, 1
mov rsi, rbx
xor eax, eax
call ___printf_chk
inc r14
movsxd rax, dword ptr [r13+0]
cmp r14, rax
jl short loc_AEA6B
loc_AEA8D:
mov edi, 0Ah
call _putchar
mov r14d, 4
jmp loc_AE899
loc_AEAA2:
xor r14d, r14d
mov rax, [rbp+var_A8]
test rax, rax
jz loc_AE899
mov rcx, [rbp+var_38]
mov [rax], rcx
jmp loc_AE899
loc_AEAC1:
mov r14d, 8
loc_AEAC7:
mov [rbp+var_A0], r15
mov [rbp+var_98], r12
lea rax, [rbp+var_60]
mov [rbp+var_90], rax
lea rax, my_defaults_group_suffix
mov rdi, [rax]
test rdi, rdi
jz loc_AEBAB
call _strlen
mov r13, rax
lea rdi, [rbp+var_F0]
mov rsi, r14
call alloc_root
mov r14d, 2
test rax, rax
jz loc_AEC8F
mov r15, rax
cmp [rbp+var_60], 0
jz short loc_AEB98
inc r13
xor r12d, r12d
loc_AEB28:
mov rcx, [rbp+var_50]
mov rdi, [rcx+r12*8]
mov [r15+r12*8], rdi
call _strlen
mov r14, rax
mov rdi, [rbp+var_A0]
lea esi, [rax+r13]
call alloc_root
test rax, rax
jz loc_AEC89
mov rbx, rax
mov eax, [rbp+var_60]
add eax, r12d
mov [r15+rax*8], rbx
mov rsi, [r15+r12*8]
mov rdi, rbx
mov rdx, r14
call _memcpy
add rbx, r14
lea rax, my_defaults_group_suffix
mov rsi, [rax]
mov rdi, rbx
mov rdx, r13
call _memcpy
inc r12
mov ecx, [rbp+var_60]
cmp r12, rcx
jb short loc_AEB28
add ecx, ecx
jmp short loc_AEB9A
loc_AEB98:
xor ecx, ecx
loc_AEB9A:
mov [rbp+var_60], ecx
mov [rbp+var_50], r15
mov ecx, ecx
mov qword ptr [r15+rcx*8], 0
loc_AEBAB:
lea rbx, my_defaults_file
mov rcx, [rbx]
test rcx, rcx
jnz loc_AECAE
mov r13, [rbp+var_B0]
mov rdi, r13
call dirname_length
test rax, rax
jz short loc_AEC10
lea rdi, [rbp+var_A0]
xor esi, esi
mov rdx, r13
call search_default_file
test eax, eax
jns loc_AECF6
loc_AEBEB:
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rdx, aFatalErrorInDe; "Fatal error in defaults handling. Progr"...
mov r14d, 1
mov esi, 1
xor eax, eax
call ___fprintf_chk
jmp short loc_AEC8F
loc_AEC10:
mov rax, [rbp+var_38]
mov rsi, [rax]
test rsi, rsi
jz loc_AECF6
mov r14, [rbp+var_38]
add r14, 8
lea rbx, my_defaults_extra_file
lea r15, aTotalKeyblocks+30h; ""
lea r12, [rbp+var_A0]
loc_AEC3D:
cmp byte ptr [rsi], 0
jz short loc_AEC53
mov rdi, r12
mov rdx, r13
call search_default_file
test eax, eax
jns short loc_AEC5B
jmp short loc_AEBEB
loc_AEC53:
mov rcx, [rbx]
test rcx, rcx
jnz short loc_AEC6C
loc_AEC5B:
mov rsi, [r14]
add r14, 8
test rsi, rsi
jnz short loc_AEC3D
jmp loc_AECF6
loc_AEC6C:
mov rdi, r12
mov rsi, r15
mov rdx, r15
xor r8d, r8d
call search_default_file_with_ext
test eax, eax
js loc_AEBEB
jz short loc_AEC5B
jmp short loc_AECD1
loc_AEC89:
mov r14d, 2
loc_AEC8F:
lea rdi, [rbp+var_88]
call delete_dynamic
lea rdi, [rbp+var_F0]
xor esi, esi
call free_root
jmp loc_AE899
loc_AECAE:
lea rdx, aTotalKeyblocks+30h; ""
lea rdi, [rbp+var_A0]
mov rsi, rdx
xor r8d, r8d
call search_default_file_with_ext
test eax, eax
js loc_AEBEB
jz short loc_AECF6
loc_AECD1:
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov rcx, [rbx]
lea rdx, aCouldNotOpenRe; "Could not open required defaults file: "...
mov esi, 1
xor eax, eax
call ___fprintf_chk
jmp loc_AEBEB
loc_AECF6:
mov rcx, [rbp+var_30]
jmp loc_AE8E9
|
long long my_load_defaults(long long a1, _QWORD *a2, int *a3, long long *a4, _QWORD *a5)
{
int defaults_options; // r14d
unsigned int v7; // r14d
_DWORD *v9; // rcx
long long v10; // rax
_OWORD *v11; // r15
const char **v12; // r12
long long v13; // rbx
long long v14; // rax
int *v15; // r13
const char ***v16; // r14
int v17; // eax
unsigned int v18; // eax
long long v19; // rcx
long long v21; // r14
__int128 v22; // xmm0
__int128 v23; // xmm1
__int128 v24; // xmm2
const char ***v25; // r15
long long v26; // r14
long long v27; // r13
long long v28; // rax
long long v29; // r15
long long v30; // r13
long long v31; // r12
long long v32; // rdi
long long v33; // r14
long long v34; // rax
long long v35; // rbx
unsigned int v36; // ecx
const char **v37; // rbx
long long v38; // r13
_BYTE *v39; // rsi
_BYTE **v40; // r14
int v41; // eax
int v42; // eax
_OWORD v43[4]; // [rsp+10h] [rbp-F0h] BYREF
long long v44; // [rsp+50h] [rbp-B0h]
_QWORD *v45; // [rsp+58h] [rbp-A8h]
_QWORD v46[3]; // [rsp+60h] [rbp-A0h] BYREF
long long v47; // [rsp+78h] [rbp-88h] BYREF
unsigned int v48; // [rsp+80h] [rbp-80h]
unsigned int v49; // [rsp+A0h] [rbp-60h] BYREF
char *v50; // [rsp+A8h] [rbp-58h]
_QWORD *v51; // [rsp+B0h] [rbp-50h]
long long *v52; // [rsp+C0h] [rbp-40h]
_BYTE **inited; // [rsp+C8h] [rbp-38h]
int *v54; // [rsp+D0h] [rbp-30h]
v45 = a5;
v54 = a3;
v44 = a1;
init_alloc_root(key_memory_defaults, v43, 512LL, 0LL, 0LL);
inited = (_BYTE **)init_default_directories(v43);
if ( !inited )
goto LABEL_3;
defaults_options = get_defaults_options(*a4);
if ( (unsigned __int8)init_dynamic_array2(key_memory_defaults, (long long)&v47, 8u, 0LL, 0x80u, 0x40u, 0LL) )
goto LABEL_3;
insert_dynamic((long long)&v47, *a4);
v9 = v54;
*v54 -= defaults_options;
v52 = a4;
*a4 += 8LL * defaults_options;
if ( my_no_defaults )
goto LABEL_6;
v49 = 0;
v50 = "defaults";
v51 = a2;
if ( *a2 )
{
v18 = 1;
v19 = 0LL;
do
v18 += 2;
while ( a2[++v19] != 0LL );
v49 = v19;
v21 = 8LL * v18;
}
else
{
v21 = 8LL;
}
v46[0] = v43;
v46[1] = &v47;
v46[2] = &v49;
if ( my_defaults_group_suffix )
{
v27 = strlen(my_defaults_group_suffix);
v28 = alloc_root(v43, v21);
v7 = 2;
if ( !v28 )
{
LABEL_49:
delete_dynamic(&v47);
free_root(v43, 0LL);
return v7;
}
v29 = v28;
if ( v49 )
{
v30 = v27 + 1;
v31 = 0LL;
while ( 1 )
{
v32 = v51[v31];
*(_QWORD *)(v29 + 8 * v31) = v32;
v33 = strlen(v32);
v34 = alloc_root(v46[0], (unsigned int)(v33 + v30));
if ( !v34 )
break;
v35 = v34;
*(_QWORD *)(v29 + 8LL * ((unsigned int)v31 + v49)) = v34;
memcpy(v34, *(_QWORD *)(v29 + 8 * v31), v33);
memcpy(v33 + v35, my_defaults_group_suffix, v30);
if ( ++v31 >= (unsigned long long)v49 )
{
v36 = 2 * v49;
goto LABEL_32;
}
}
v7 = 2;
goto LABEL_49;
}
v36 = 0;
LABEL_32:
v49 = v36;
v51 = (_QWORD *)v29;
*(_QWORD *)(v29 + 8LL * v36) = 0LL;
}
v37 = (const char **)&my_defaults_file;
if ( my_defaults_file )
{
v42 = search_default_file_with_ext((long long)v46, "", (int)"", my_defaults_file, 0);
if ( v42 < 0 )
goto LABEL_36;
if ( v42 )
{
LABEL_52:
__fprintf_chk(stderr, 1LL, "Could not open required defaults file: %s\n", *v37);
goto LABEL_36;
}
}
else
{
v38 = v44;
if ( dirname_length(v44) )
{
if ( (int)search_default_file(v46, 0LL, v38) < 0 )
{
LABEL_36:
v7 = 1;
__fprintf_chk(stderr, 1LL, "Fatal error in defaults handling. Program aborted\n");
goto LABEL_49;
}
}
else
{
v39 = *inited;
if ( *inited )
{
v40 = inited + 1;
v37 = (const char **)&my_defaults_extra_file;
do
{
if ( *v39 )
{
if ( (int)search_default_file(v46, v39, v38) < 0 )
goto LABEL_36;
}
else if ( my_defaults_extra_file )
{
v41 = search_default_file_with_ext((long long)v46, "", (int)"", my_defaults_extra_file, 0);
if ( v41 < 0 )
goto LABEL_36;
if ( v41 )
goto LABEL_52;
}
v39 = *v40++;
}
while ( v39 );
}
}
}
v9 = v54;
LABEL_6:
v10 = alloc_root(v43, 8LL * (*v9 + v48 + 3) + 64);
if ( !v10 )
{
LABEL_3:
__fprintf_chk(stderr, 1LL, "Fatal error in defaults handling. Program aborted\n");
return 2;
}
v11 = (_OWORD *)v10;
v12 = (const char **)(v10 + 64);
v13 = v48;
memcpy(v10 + 64, v47, 8LL * v48);
if ( my_defaults_mark_files )
{
v48 = v13 + 1;
v12[v13] = file_marker;
v14 = v48++;
v12[v14] = "";
LODWORD(v13) = v48;
}
v15 = v54;
if ( *v54 )
{
v16 = (const char ***)v52;
memcpy(&v12[(unsigned int)v13], *v52, 8LL * *v54);
LODWORD(v13) = v48;
v17 = *v15;
}
else
{
v17 = 0;
v16 = (const char ***)v52;
}
*v15 = v13 + v17;
*v16 = v12;
*((_QWORD *)v11 + *v15 + 8) = 0LL;
v22 = v43[0];
v23 = v43[1];
v24 = v43[2];
v11[3] = v43[3];
v11[2] = v24;
v11[1] = v23;
*v11 = v22;
delete_dynamic(&v47);
if ( my_print_defaults )
{
v25 = v16;
__printf_chk(1LL, "%s would have been started with the following arguments:\n", **v16);
if ( *v15 >= 2 )
{
v26 = 1LL;
do
__printf_chk(1LL, "%s ", (*v25)[v26++]);
while ( v26 < *v15 );
}
putchar(10LL);
return 4;
}
else
{
v7 = 0;
if ( v45 )
*v45 = inited;
}
return v7;
}
|
my_load_defaults:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xd8
MOV qword ptr [RBP + -0xa8],R8
MOV R12,RCX
MOV qword ptr [RBP + -0x30],RDX
MOV R13,RSI
MOV qword ptr [RBP + -0xb0],RDI
LEA RBX,[0xd31018]
MOV EDI,dword ptr [RBX]
LEA R15,[RBP + -0xf0]
MOV EDX,0x200
MOV RSI,R15
XOR ECX,ECX
XOR R8D,R8D
CALL 0x001b96e8
MOV RDI,R15
CALL 0x001aecff
MOV qword ptr [RBP + -0x38],RAX
TEST RAX,RAX
JZ 0x001ae876
MOV RDI,qword ptr [R12]
CALL 0x001ae614
MOV R14D,EAX
MOV EDI,dword ptr [RBX]
MOV qword ptr [RSP],0x0
LEA RSI,[RBP + -0x88]
MOV EDX,0x8
XOR ECX,ECX
MOV R8D,0x80
MOV R9D,0x40
CALL 0x001ac5ec
TEST AL,AL
JZ 0x001ae8ae
LAB_001ae876:
MOV RAX,qword ptr [0x004abfa8]
MOV RDI,qword ptr [RAX]
LEA RDX,[0x1ff707]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x0012a210
MOV R14D,0x2
LAB_001ae899:
MOV EAX,R14D
ADD RSP,0xd8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001ae8ae:
MOV RSI,qword ptr [R12]
MOV RBX,R12
LEA R12,[RBP + -0x88]
MOV RDI,R12
CALL 0x001ac68a
MOV RCX,qword ptr [RBP + -0x30]
SUB dword ptr [RCX],R14D
MOVSXD RAX,R14D
SHL RAX,0x3
MOV qword ptr [RBP + -0x40],RBX
ADD qword ptr [RBX],RAX
LEA RAX,[0xd30031]
CMP byte ptr [RAX],0x0
JZ 0x001ae992
LAB_001ae8e9:
MOV EAX,dword ptr [RBP + -0x80]
MOV ECX,dword ptr [RCX]
ADD EAX,ECX
ADD EAX,0x3
LEA RSI,[0x40 + RAX*0x8]
LEA RDI,[RBP + -0xf0]
CALL 0x001b983f
TEST RAX,RAX
JZ 0x001ae876
MOV R15,RAX
LEA R12,[RAX + 0x40]
MOV RSI,qword ptr [RBP + -0x88]
MOV EBX,dword ptr [RBP + -0x80]
LEA RDX,[RBX*0x8]
MOV RDI,R12
CALL 0x0012a0b0
LEA RAX,[0xd30030]
CMP byte ptr [RAX],0x0
JZ 0x001ae966
MOV RAX,qword ptr [0x004ae098]
MOV ECX,EBX
INC ECX
MOV dword ptr [RBP + -0x80],ECX
MOV qword ptr [R12 + RBX*0x8],RAX
MOV EAX,dword ptr [RBP + -0x80]
LEA ECX,[RAX + 0x1]
MOV dword ptr [RBP + -0x80],ECX
LEA RCX,[0x1fc374]
MOV qword ptr [R12 + RAX*0x8],RCX
MOV EBX,dword ptr [RBP + -0x80]
LAB_001ae966:
MOV R13,qword ptr [RBP + -0x30]
MOVSXD RDX,dword ptr [R13]
TEST RDX,RDX
JZ 0x001ae9d8
MOV EAX,EBX
LEA RDI,[R12 + RAX*0x8]
MOV R14,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [R14]
SHL RDX,0x3
CALL 0x0012a0b0
MOV EBX,dword ptr [RBP + -0x80]
MOV EAX,dword ptr [R13]
JMP 0x001ae9de
LAB_001ae992:
MOV dword ptr [RBP + -0x60],0x0
LEA RAX,[0x1ff65f]
MOV qword ptr [RBP + -0x58],RAX
MOV qword ptr [RBP + -0x50],R13
CMP qword ptr [R13],0x0
JZ 0x001aeac1
MOV EAX,0x1
XOR ECX,ECX
LAB_001ae9ba:
ADD EAX,0x2
CMP qword ptr [R13 + RCX*0x8 + 0x8],0x0
LEA RCX,[RCX + 0x1]
JNZ 0x001ae9ba
MOV dword ptr [RBP + -0x60],ECX
MOV R14D,EAX
SHL R14,0x3
JMP 0x001aeac7
LAB_001ae9d8:
XOR EAX,EAX
MOV R14,qword ptr [RBP + -0x40]
LAB_001ae9de:
ADD EAX,EBX
MOV dword ptr [R13],EAX
MOV qword ptr [R14],R12
MOVSXD RAX,dword ptr [R13]
MOV qword ptr [R15 + RAX*0x8 + 0x40],0x0
MOVUPS XMM0,xmmword ptr [RBP + -0xf0]
MOVUPS XMM1,xmmword ptr [RBP + -0xe0]
MOVUPS XMM2,xmmword ptr [RBP + -0xd0]
MOVUPS XMM3,xmmword ptr [RBP + -0xc0]
MOVUPS xmmword ptr [R15 + 0x30],XMM3
MOVUPS xmmword ptr [R15 + 0x20],XMM2
MOVUPS xmmword ptr [R15 + 0x10],XMM1
MOVUPS xmmword ptr [R15],XMM0
LEA RDI,[RBP + -0x88]
CALL 0x001ac8e4
LEA RAX,[0xd30032]
CMP byte ptr [RAX],0x0
JZ 0x001aeaa2
MOV R15,R14
MOV RAX,qword ptr [R14]
MOV RDX,qword ptr [RAX]
LEA RSI,[0x1ff6cd]
MOV EDI,0x1
XOR EAX,EAX
CALL 0x0012a8d0
CMP dword ptr [R13],0x2
JL 0x001aea8d
MOV R14D,0x1
LEA RBX,[0x20006e]
LAB_001aea6b:
MOV RAX,qword ptr [R15]
MOV RDX,qword ptr [RAX + R14*0x8]
MOV EDI,0x1
MOV RSI,RBX
XOR EAX,EAX
CALL 0x0012a8d0
INC R14
MOVSXD RAX,dword ptr [R13]
CMP R14,RAX
JL 0x001aea6b
LAB_001aea8d:
MOV EDI,0xa
CALL 0x0012a9e0
MOV R14D,0x4
JMP 0x001ae899
LAB_001aeaa2:
XOR R14D,R14D
MOV RAX,qword ptr [RBP + -0xa8]
TEST RAX,RAX
JZ 0x001ae899
MOV RCX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RCX
JMP 0x001ae899
LAB_001aeac1:
MOV R14D,0x8
LAB_001aeac7:
MOV qword ptr [RBP + -0xa0],R15
MOV qword ptr [RBP + -0x98],R12
LEA RAX,[RBP + -0x60]
MOV qword ptr [RBP + -0x90],RAX
LEA RAX,[0xd30040]
MOV RDI,qword ptr [RAX]
TEST RDI,RDI
JZ 0x001aebab
CALL 0x0012a380
MOV R13,RAX
LEA RDI,[RBP + -0xf0]
MOV RSI,R14
CALL 0x001b983f
MOV R14D,0x2
TEST RAX,RAX
JZ 0x001aec8f
MOV R15,RAX
CMP dword ptr [RBP + -0x60],0x0
JZ 0x001aeb98
INC R13
XOR R12D,R12D
LAB_001aeb28:
MOV RCX,qword ptr [RBP + -0x50]
MOV RDI,qword ptr [RCX + R12*0x8]
MOV qword ptr [R15 + R12*0x8],RDI
CALL 0x0012a380
MOV R14,RAX
MOV RDI,qword ptr [RBP + -0xa0]
LEA ESI,[RAX + R13*0x1]
CALL 0x001b983f
TEST RAX,RAX
JZ 0x001aec89
MOV RBX,RAX
MOV EAX,dword ptr [RBP + -0x60]
ADD EAX,R12D
MOV qword ptr [R15 + RAX*0x8],RBX
MOV RSI,qword ptr [R15 + R12*0x8]
MOV RDI,RBX
MOV RDX,R14
CALL 0x0012a0b0
ADD RBX,R14
LEA RAX,[0xd30040]
MOV RSI,qword ptr [RAX]
MOV RDI,RBX
MOV RDX,R13
CALL 0x0012a0b0
INC R12
MOV ECX,dword ptr [RBP + -0x60]
CMP R12,RCX
JC 0x001aeb28
ADD ECX,ECX
JMP 0x001aeb9a
LAB_001aeb98:
XOR ECX,ECX
LAB_001aeb9a:
MOV dword ptr [RBP + -0x60],ECX
MOV qword ptr [RBP + -0x50],R15
MOV ECX,ECX
MOV qword ptr [R15 + RCX*0x8],0x0
LAB_001aebab:
LEA RBX,[0xd30038]
MOV RCX,qword ptr [RBX]
TEST RCX,RCX
JNZ 0x001aecae
MOV R13,qword ptr [RBP + -0xb0]
MOV RDI,R13
CALL 0x001b0158
TEST RAX,RAX
JZ 0x001aec10
LEA RDI,[RBP + -0xa0]
XOR ESI,ESI
MOV RDX,R13
CALL 0x001af0c2
TEST EAX,EAX
JNS 0x001aecf6
LAB_001aebeb:
MOV RAX,qword ptr [0x004abfa8]
MOV RDI,qword ptr [RAX]
LEA RDX,[0x1ff707]
MOV R14D,0x1
MOV ESI,0x1
XOR EAX,EAX
CALL 0x0012a210
JMP 0x001aec8f
LAB_001aec10:
MOV RAX,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RAX]
TEST RSI,RSI
JZ 0x001aecf6
MOV R14,qword ptr [RBP + -0x38]
ADD R14,0x8
LEA RBX,[0xd30048]
LEA R15,[0x1fc374]
LEA R12,[RBP + -0xa0]
LAB_001aec3d:
CMP byte ptr [RSI],0x0
JZ 0x001aec53
MOV RDI,R12
MOV RDX,R13
CALL 0x001af0c2
TEST EAX,EAX
JNS 0x001aec5b
JMP 0x001aebeb
LAB_001aec53:
MOV RCX,qword ptr [RBX]
TEST RCX,RCX
JNZ 0x001aec6c
LAB_001aec5b:
MOV RSI,qword ptr [R14]
ADD R14,0x8
TEST RSI,RSI
JNZ 0x001aec3d
JMP 0x001aecf6
LAB_001aec6c:
MOV RDI,R12
MOV RSI,R15
MOV RDX,R15
XOR R8D,R8D
CALL 0x00130662
TEST EAX,EAX
JS 0x001aebeb
JZ 0x001aec5b
JMP 0x001aecd1
LAB_001aec89:
MOV R14D,0x2
LAB_001aec8f:
LEA RDI,[RBP + -0x88]
CALL 0x001ac8e4
LEA RDI,[RBP + -0xf0]
XOR ESI,ESI
CALL 0x001b9ab7
JMP 0x001ae899
LAB_001aecae:
LEA RDX,[0x1fc374]
LEA RDI,[RBP + -0xa0]
MOV RSI,RDX
XOR R8D,R8D
CALL 0x00130662
TEST EAX,EAX
JS 0x001aebeb
JZ 0x001aecf6
LAB_001aecd1:
MOV RAX,qword ptr [0x004abfa8]
MOV RDI,qword ptr [RAX]
MOV RCX,qword ptr [RBX]
LEA RDX,[0x1ff9fe]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x0012a210
JMP 0x001aebeb
LAB_001aecf6:
MOV RCX,qword ptr [RBP + -0x30]
JMP 0x001ae8e9
|
int8
my_load_defaults(int8 param_1,long *param_2,int *param_3,long *param_4,int8 *param_5)
{
int4 *__dest;
long lVar1;
int *piVar2;
char cVar3;
int iVar4;
uint uVar5;
int4 *puVar6;
size_t sVar7;
long *plVar8;
size_t __n;
void *__dest_00;
int8 *puVar9;
char *pcVar10;
ulong uVar11;
long lVar12;
int8 uVar13;
int8 *puVar14;
int4 local_f8;
int4 uStack_f4;
int4 uStack_f0;
int4 uStack_ec;
int4 local_e8;
int4 uStack_e4;
int4 uStack_e0;
int4 uStack_dc;
int4 local_d8;
int4 uStack_d4;
int4 uStack_d0;
int4 uStack_cc;
int4 local_c8;
int4 uStack_c4;
int4 uStack_c0;
int4 uStack_bc;
int8 local_b8;
int8 *local_b0;
int4 *local_a8;
void **local_a0;
uint *local_98;
void *local_90;
uint local_88;
uint local_68 [2];
char *local_60;
long *local_58;
long *local_48;
int8 *local_40;
int *local_38;
local_b8 = param_1;
local_b0 = param_5;
local_38 = param_3;
init_alloc_root(key_memory_defaults,&local_f8,0x200,0,0);
local_40 = (int8 *)init_default_directories(&local_f8);
if (local_40 == (int8 *)0x0) goto LAB_001ae876;
iVar4 = get_defaults_options(*param_4);
cVar3 = init_dynamic_array2(key_memory_defaults,&local_90,8,0,0x80,0x40,0);
if (cVar3 != '\0') goto LAB_001ae876;
insert_dynamic(&local_90,*param_4);
*local_38 = *local_38 - iVar4;
*param_4 = *param_4 + (long)iVar4 * 8;
local_48 = param_4;
if (my_no_defaults == '\0') {
local_68[0] = 0;
local_60 = "defaults";
if (*param_2 == 0) {
lVar12 = 8;
}
else {
uVar5 = 1;
lVar12 = 0;
do {
uVar5 = uVar5 + 2;
lVar1 = lVar12 + 1;
lVar12 = lVar12 + 1;
} while (param_2[lVar1] != 0);
local_68[0] = (uint)lVar12;
lVar12 = (ulong)uVar5 << 3;
}
local_98 = local_68;
local_a8 = &local_f8;
local_a0 = &local_90;
local_58 = param_2;
if (my_defaults_group_suffix != (char *)0x0) {
local_58 = param_2;
sVar7 = strlen(my_defaults_group_suffix);
plVar8 = (long *)alloc_root(&local_f8,lVar12);
uVar13 = 2;
if (plVar8 == (long *)0x0) goto LAB_001aec8f;
if (local_68[0] == 0) {
local_68[0] = 0;
}
else {
uVar11 = 0;
do {
pcVar10 = (char *)local_58[uVar11];
plVar8[uVar11] = (long)pcVar10;
__n = strlen(pcVar10);
__dest_00 = (void *)alloc_root(local_a8,(int)__n + (int)(sVar7 + 1));
if (__dest_00 == (void *)0x0) {
uVar13 = 2;
goto LAB_001aec8f;
}
plVar8[local_68[0] + (int)uVar11] = (long)__dest_00;
memcpy(__dest_00,(void *)plVar8[uVar11],__n);
memcpy((void *)((long)__dest_00 + __n),my_defaults_group_suffix,sVar7 + 1);
uVar11 = uVar11 + 1;
} while (uVar11 < local_68[0]);
local_68[0] = local_68[0] * 2;
}
plVar8[local_68[0]] = 0;
local_58 = plVar8;
}
uVar13 = local_b8;
puVar9 = &my_defaults_file;
if (my_defaults_file != 0) {
iVar4 = search_default_file_with_ext(&local_a8,"","",my_defaults_file,0);
if (-1 < iVar4) {
if (iVar4 == 0) goto LAB_001ae8e9;
LAB_001aecd1:
__fprintf_chk(*(int8 *)PTR_stderr_004abfa8,1,
"Could not open required defaults file: %s\n",*puVar9);
}
LAB_001aebeb:
uVar13 = 1;
__fprintf_chk(*(int8 *)PTR_stderr_004abfa8,1,
"Fatal error in defaults handling. Program aborted\n");
LAB_001aec8f:
delete_dynamic(&local_90);
free_root(&local_f8,0);
return uVar13;
}
lVar12 = dirname_length(local_b8);
if (lVar12 == 0) {
pcVar10 = (char *)*local_40;
if (pcVar10 != (char *)0x0) {
puVar9 = &my_defaults_extra_file;
puVar14 = local_40;
do {
puVar14 = puVar14 + 1;
if (*pcVar10 == '\0') {
if (my_defaults_extra_file != 0) {
iVar4 = search_default_file_with_ext(&local_a8,"","",my_defaults_extra_file,0);
if (iVar4 < 0) goto LAB_001aebeb;
if (iVar4 != 0) goto LAB_001aecd1;
}
}
else {
iVar4 = search_default_file(&local_a8,pcVar10,uVar13);
if (iVar4 < 0) goto LAB_001aebeb;
}
pcVar10 = (char *)*puVar14;
} while (pcVar10 != (char *)0x0);
}
}
else {
iVar4 = search_default_file(&local_a8,0,uVar13);
if (iVar4 < 0) goto LAB_001aebeb;
}
}
LAB_001ae8e9:
puVar6 = (int4 *)alloc_root(&local_f8,(ulong)(local_88 + *local_38 + 3) * 8 + 0x40);
uVar5 = local_88;
if (puVar6 != (int4 *)0x0) {
__dest = puVar6 + 0x10;
uVar11 = (ulong)local_88;
memcpy(__dest,local_90,uVar11 * 8);
piVar2 = local_38;
plVar8 = local_48;
if (my_defaults_mark_files != '\0') {
*(int **)(__dest + uVar11 * 2) = file_marker;
local_88 = uVar5 + 2;
*(char **)(__dest + (ulong)(uVar5 + 1) * 2) = "";
uVar11 = (ulong)local_88;
}
uVar5 = (uint)uVar11;
if ((long)*local_38 == 0) {
iVar4 = 0;
}
else {
memcpy(__dest + uVar11 * 2,(void *)*local_48,(long)*local_38 << 3);
iVar4 = *piVar2;
uVar5 = local_88;
}
*piVar2 = iVar4 + uVar5;
*plVar8 = (long)__dest;
*(int8 *)(puVar6 + (long)*piVar2 * 2 + 0x10) = 0;
puVar6[0xc] = local_c8;
puVar6[0xd] = uStack_c4;
puVar6[0xe] = uStack_c0;
puVar6[0xf] = uStack_bc;
puVar6[8] = local_d8;
puVar6[9] = uStack_d4;
puVar6[10] = uStack_d0;
puVar6[0xb] = uStack_cc;
puVar6[4] = local_e8;
puVar6[5] = uStack_e4;
puVar6[6] = uStack_e0;
puVar6[7] = uStack_dc;
*puVar6 = local_f8;
puVar6[1] = uStack_f4;
puVar6[2] = uStack_f0;
puVar6[3] = uStack_ec;
delete_dynamic(&local_90);
if (my_print_defaults != '\0') {
__printf_chk(1,"%s would have been started with the following arguments:\n",
*(int8 *)*plVar8);
if (1 < *piVar2) {
lVar12 = 1;
do {
__printf_chk(1,&DAT_0020006e,*(int8 *)(*plVar8 + lVar12 * 8));
lVar12 = lVar12 + 1;
} while (lVar12 < *piVar2);
}
putchar(10);
return 4;
}
if (local_b0 == (int8 *)0x0) {
return 0;
}
*local_b0 = local_40;
return 0;
}
LAB_001ae876:
__fprintf_chk(*(int8 *)PTR_stderr_004abfa8,1,
"Fatal error in defaults handling. Program aborted\n");
return 2;
}
|
|
16,415
|
js_std_cmd
|
bluesky950520[P]quickjs/quickjs.c
|
uintptr_t js_std_cmd(int cmd, ...) {
JSRuntime *rt;
uintptr_t rv;
va_list ap;
rv = 0;
va_start(ap, cmd);
switch (cmd) {
case 0: // GetOpaque
rt = va_arg(ap, JSRuntime *);
rv = (uintptr_t)rt->libc_opaque;
break;
case 1: // SetOpaque
rt = va_arg(ap, JSRuntime *);
rt->libc_opaque = va_arg(ap, void *);
break;
default:
rv = -1;
}
va_end(ap);
return rv;
}
|
O2
|
c
|
js_std_cmd:
subq $0x58, %rsp
leaq -0x60(%rsp), %r10
movq %rsi, 0x8(%r10)
movq %rdx, 0x10(%r10)
movq %rcx, 0x18(%r10)
movq %r8, 0x20(%r10)
movq %r9, 0x28(%r10)
testb %al, %al
je 0x3377c
movaps %xmm0, -0x30(%rsp)
movaps %xmm1, -0x20(%rsp)
movaps %xmm2, -0x10(%rsp)
movaps %xmm3, (%rsp)
movaps %xmm4, 0x10(%rsp)
movaps %xmm5, 0x20(%rsp)
movaps %xmm6, 0x30(%rsp)
movaps %xmm7, 0x40(%rsp)
movq %r10, -0x70(%rsp)
leaq 0x60(%rsp), %rax
movq %rax, -0x78(%rsp)
movabsq $0x3000000008, %rax # imm = 0x3000000008
movq %rax, -0x80(%rsp)
cmpl $0x1, %edi
je 0x337be
testl %edi, %edi
jne 0x337ef
movl -0x80(%rsp), %ecx
cmpq $0x28, %rcx
ja 0x337fb
movq %rcx, %rax
addq -0x70(%rsp), %rax
addl $0x8, %ecx
movl %ecx, -0x80(%rsp)
jmp 0x33809
movl -0x80(%rsp), %edx
cmpq $0x29, %rdx
jae 0x33815
movq -0x70(%rsp), %rax
movq %rdx, %rcx
addq $0x8, %rcx
movl %ecx, -0x80(%rsp)
movq (%rax,%rdx), %rax
cmpl $0x20, %edx
ja 0x33826
addq -0x70(%rsp), %rcx
addl $0x10, %edx
movl %edx, -0x80(%rsp)
jmp 0x33834
movabsq $-0x1, %rax
jmp 0x33840
movq -0x78(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, -0x78(%rsp)
movq (%rax), %rax
movq 0x218(%rax), %rax
jmp 0x33840
movq -0x78(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, -0x78(%rsp)
movq (%rax), %rax
movq -0x78(%rsp), %rcx
leaq 0x8(%rcx), %rdx
movq %rdx, -0x78(%rsp)
movq (%rcx), %rcx
movq %rcx, 0x218(%rax)
xorl %eax, %eax
addq $0x58, %rsp
retq
|
js_std_cmd:
sub rsp, 58h
lea r10, [rsp+58h+var_B8]
mov [r10+8], rsi
mov [r10+10h], rdx
mov [r10+18h], rcx
mov [r10+20h], r8
mov [r10+28h], r9
test al, al
jz short loc_3377C
movaps [rsp+58h+var_88], xmm0
movaps [rsp+58h+var_78], xmm1
movaps [rsp+58h+var_68], xmm2
movaps [rsp+58h+var_58], xmm3
movaps [rsp+58h+var_48], xmm4
movaps [rsp+58h+var_38], xmm5
movaps [rsp+58h+var_28], xmm6
movaps [rsp+58h+var_18], xmm7
loc_3377C:
mov [rsp+58h+var_C8], r10
lea rax, [rsp+58h+arg_0]
mov [rsp+58h+var_D0], rax
mov rax, 3000000008h
mov [rsp+58h+var_D8], rax
cmp edi, 1
jz short loc_337BE
test edi, edi
jnz short loc_337EF
mov ecx, dword ptr [rsp+58h+var_D8]
cmp rcx, 28h ; '('
ja short loc_337FB
mov rax, rcx
add rax, [rsp+58h+var_C8]
add ecx, 8
mov dword ptr [rsp+58h+var_D8], ecx
jmp short loc_33809
loc_337BE:
mov edx, dword ptr [rsp+58h+var_D8]
cmp rdx, 29h ; ')'
jnb short loc_33815
mov rax, [rsp+58h+var_C8]
mov rcx, rdx
add rcx, 8
mov dword ptr [rsp+58h+var_D8], ecx
mov rax, [rax+rdx]
cmp edx, 20h ; ' '
ja short loc_33826
add rcx, [rsp+58h+var_C8]
add edx, 10h
mov dword ptr [rsp+58h+var_D8], edx
jmp short loc_33834
loc_337EF:
mov rax, 0FFFFFFFFFFFFFFFFh
jmp short loc_33840
loc_337FB:
mov rax, [rsp+58h+var_D0]
lea rcx, [rax+8]
mov [rsp+58h+var_D0], rcx
loc_33809:
mov rax, [rax]
mov rax, [rax+218h]
jmp short loc_33840
loc_33815:
mov rax, [rsp+58h+var_D0]
lea rcx, [rax+8]
mov [rsp+58h+var_D0], rcx
mov rax, [rax]
loc_33826:
mov rcx, [rsp+58h+var_D0]
lea rdx, [rcx+8]
mov [rsp+58h+var_D0], rdx
loc_33834:
mov rcx, [rcx]
mov [rax+218h], rcx
xor eax, eax
loc_33840:
add rsp, 58h
retn
|
long long js_std_cmd(
int a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
double a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v15; // [rsp+28h] [rbp-B0h]
long long v16; // [rsp+30h] [rbp-A8h]
long long v17; // [rsp+38h] [rbp-A0h]
long long v18; // [rsp+40h] [rbp-98h]
long long v19; // [rsp+48h] [rbp-90h]
__m128 v20; // [rsp+50h] [rbp-88h]
__m128 v21; // [rsp+60h] [rbp-78h]
__m128 v22; // [rsp+70h] [rbp-68h]
__m128 v23; // [rsp+80h] [rbp-58h]
__m128 v24; // [rsp+90h] [rbp-48h]
__m128 v25; // [rsp+A0h] [rbp-38h]
__m128 v26; // [rsp+B0h] [rbp-28h]
v20 = a8;
v21 = a9;
v22 = a10;
v23 = a11;
v24 = a12;
v25 = a13;
v26 = a14;
v15 = a2;
v16 = a3;
v17 = a4;
v18 = a5;
v19 = a6;
if ( a1 == 1 )
{
*(_QWORD *)(v15 + 536) = v16;
return 0LL;
}
else if ( a1 )
{
return -1LL;
}
else
{
return *(_QWORD *)(v15 + 536);
}
}
|
js_std_cmd:
SUB RSP,0x58
LEA R10,[RSP + -0x60]
MOV qword ptr [R10 + 0x8],RSI
MOV qword ptr [R10 + 0x10],RDX
MOV qword ptr [R10 + 0x18],RCX
MOV qword ptr [R10 + 0x20],R8
MOV qword ptr [R10 + 0x28],R9
TEST AL,AL
JZ 0x0013377c
MOVAPS xmmword ptr [RSP + -0x30],XMM0
MOVAPS xmmword ptr [RSP + -0x20],XMM1
MOVAPS xmmword ptr [RSP + -0x10],XMM2
MOVAPS xmmword ptr [RSP],XMM3
MOVAPS xmmword ptr [RSP + 0x10],XMM4
MOVAPS xmmword ptr [RSP + 0x20],XMM5
MOVAPS xmmword ptr [RSP + 0x30],XMM6
MOVAPS xmmword ptr [RSP + 0x40],XMM7
LAB_0013377c:
MOV qword ptr [RSP + -0x70],R10
LEA RAX,[RSP + 0x60]
MOV qword ptr [RSP + -0x78],RAX
MOV RAX,0x3000000008
MOV qword ptr [RSP + -0x80],RAX
CMP EDI,0x1
JZ 0x001337be
TEST EDI,EDI
JNZ 0x001337ef
MOV ECX,dword ptr [RSP + -0x80]
CMP RCX,0x28
JA 0x001337fb
MOV RAX,RCX
ADD RAX,qword ptr [RSP + -0x70]
ADD ECX,0x8
MOV dword ptr [RSP + -0x80],ECX
JMP 0x00133809
LAB_001337be:
MOV EDX,dword ptr [RSP + -0x80]
CMP RDX,0x29
JNC 0x00133815
MOV RAX,qword ptr [RSP + -0x70]
MOV RCX,RDX
ADD RCX,0x8
MOV dword ptr [RSP + -0x80],ECX
MOV RAX,qword ptr [RAX + RDX*0x1]
CMP EDX,0x20
JA 0x00133826
ADD RCX,qword ptr [RSP + -0x70]
ADD EDX,0x10
MOV dword ptr [RSP + -0x80],EDX
JMP 0x00133834
LAB_001337ef:
MOV RAX,-0x1
JMP 0x00133840
LAB_001337fb:
MOV RAX,qword ptr [RSP + -0x78]
LEA RCX,[RAX + 0x8]
MOV qword ptr [RSP + -0x78],RCX
LAB_00133809:
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
JMP 0x00133840
LAB_00133815:
MOV RAX,qword ptr [RSP + -0x78]
LEA RCX,[RAX + 0x8]
MOV qword ptr [RSP + -0x78],RCX
MOV RAX,qword ptr [RAX]
LAB_00133826:
MOV RCX,qword ptr [RSP + -0x78]
LEA RDX,[RCX + 0x8]
MOV qword ptr [RSP + -0x78],RDX
LAB_00133834:
MOV RCX,qword ptr [RCX]
MOV qword ptr [RAX + 0x218],RCX
XOR EAX,EAX
LAB_00133840:
ADD RSP,0x58
RET
|
/* WARNING: Removing unreachable block (ram,0x001337fb) */
/* WARNING: Removing unreachable block (ram,0x00133815) */
/* WARNING: Removing unreachable block (ram,0x00133826) */
/* WARNING: Heritage AFTER dead removal. Example location: s0xffffffffffffff50 : 0x00133809 */
/* WARNING: Restarted to delay deadcode elimination for space: stack */
int8 js_std_cmd(int param_1,long param_2)
{
int8 uVar1;
long local_b0;
int8 local_a8;
if (param_1 == 1) {
*(int8 *)(param_2 + 0x218) = local_a8;
uVar1 = 0;
}
else if (param_1 == 0) {
uVar1 = *(int8 *)(local_b0 + 0x218);
}
else {
uVar1 = 0xffffffffffffffff;
}
return uVar1;
}
|
|
16,416
|
ma_row_pos_from_key
|
eloqsql/storage/maria/ma_search.c
|
MARIA_RECORD_POS _ma_row_pos_from_key(const MARIA_KEY *key)
{
my_off_t pos;
const uchar *after_key= key->data + key->data_length;
MARIA_SHARE *share= key->keyinfo->share;
switch (share->rec_reflength) {
#if SIZEOF_OFF_T > 4
case 8: pos= (my_off_t) mi_uint8korr(after_key); break;
case 7: pos= (my_off_t) mi_uint7korr(after_key); break;
case 6: pos= (my_off_t) mi_uint6korr(after_key); break;
case 5: pos= (my_off_t) mi_uint5korr(after_key); break;
#else
case 8: pos= (my_off_t) mi_uint4korr(after_key+4); break;
case 7: pos= (my_off_t) mi_uint4korr(after_key+3); break;
case 6: pos= (my_off_t) mi_uint4korr(after_key+2); break;
case 5: pos= (my_off_t) mi_uint4korr(after_key+1); break;
#endif
case 4: pos= (my_off_t) mi_uint4korr(after_key); break;
case 3: pos= (my_off_t) mi_uint3korr(after_key); break;
case 2: pos= (my_off_t) mi_uint2korr(after_key); break;
case 0: /* NO_RECORD */
default:
pos=0L; /* Shut compiler up */
}
return (*share->keypos_to_recpos)(share, pos);
}
|
O0
|
c
|
ma_row_pos_from_key:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
movq (%rcx), %rax
movl 0x10(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl 0x740(%rax), %eax
movq %rax, -0x28(%rbp)
subq $0x8, %rax
ja 0x95c53
movq -0x28(%rbp), %rax
leaq 0xc35c1(%rip), %rcx # 0x1590e0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
movzbl 0x7(%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x6(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x5(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x4(%rcx), %ecx
shll $0x18, %ecx
orl %ecx, %eax
movl %eax, %eax
movq -0x18(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
movq -0x18(%rbp), %rdx
movzbl 0x2(%rdx), %edx
shll $0x8, %edx
orl %edx, %ecx
movq -0x18(%rbp), %rdx
movzbl 0x1(%rdx), %edx
shll $0x10, %edx
orl %edx, %ecx
movq -0x18(%rbp), %rdx
movzbl (%rdx), %edx
shll $0x18, %edx
orl %edx, %ecx
movl %ecx, %ecx
shlq $0x20, %rcx
orq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x95c5b
movq -0x18(%rbp), %rdi
callq 0x95750
movq %rax, -0x10(%rbp)
jmp 0x95c5b
movq -0x18(%rbp), %rdi
callq 0x957b0
movq %rax, -0x10(%rbp)
jmp 0x95c5b
movq -0x18(%rbp), %rdi
callq 0x95800
movq %rax, -0x10(%rbp)
jmp 0x95c5b
movq -0x18(%rbp), %rax
movzbl 0x3(%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
shll $0x18, %ecx
orl %ecx, %eax
movl %eax, %eax
movq %rax, -0x10(%rbp)
jmp 0x95c5b
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, %eax
movq %rax, -0x10(%rbp)
jmp 0x95c5b
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzwl %ax, %eax
movq %rax, -0x10(%rbp)
jmp 0x95c5b
jmp 0x95c53
movq $0x0, -0x10(%rbp)
movq -0x20(%rbp), %rax
movq 0x6c8(%rax), %rax
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq *%rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ma_row_pos_from_key:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov rcx, [rbp+var_8]
mov rax, [rcx]
mov ecx, [rcx+10h]
add rax, rcx
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov rax, [rax]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov eax, [rax+740h]
mov [rbp+var_28], rax
sub rax, 8; switch 9 cases
ja def_95B26; jumptable 0000000000095B26 default case, case 1
mov rax, [rbp+var_28]
lea rcx, jpt_95B26
movsxd rax, ds:(jpt_95B26 - 1590E0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_95B28:
mov rax, [rbp+var_18]; jumptable 0000000000095B26 case 8
movzx eax, byte ptr [rax+7]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+6]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+5]
shl ecx, 10h
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+4]
shl ecx, 18h
or eax, ecx
mov eax, eax
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+3]
mov rdx, [rbp+var_18]
movzx edx, byte ptr [rdx+2]
shl edx, 8
or ecx, edx
mov rdx, [rbp+var_18]
movzx edx, byte ptr [rdx+1]
shl edx, 10h
or ecx, edx
mov rdx, [rbp+var_18]
movzx edx, byte ptr [rdx]
shl edx, 18h
or ecx, edx
mov ecx, ecx
shl rcx, 20h
or rax, rcx
mov [rbp+var_10], rax
jmp loc_95C5B
loc_95B99:
mov rdi, [rbp+var_18]; jumptable 0000000000095B26 case 7
call mi_uint7korr
mov [rbp+var_10], rax
jmp loc_95C5B
loc_95BAB:
mov rdi, [rbp+var_18]; jumptable 0000000000095B26 case 6
call mi_uint6korr
mov [rbp+var_10], rax
jmp loc_95C5B
loc_95BBD:
mov rdi, [rbp+var_18]; jumptable 0000000000095B26 case 5
call mi_uint5korr
mov [rbp+var_10], rax
jmp loc_95C5B
loc_95BCF:
mov rax, [rbp+var_18]; jumptable 0000000000095B26 case 4
movzx eax, byte ptr [rax+3]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+2]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+1]
shl ecx, 10h
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx]
shl ecx, 18h
or eax, ecx
mov eax, eax
mov [rbp+var_10], rax
jmp short loc_95C5B
loc_95C05:
mov rax, [rbp+var_18]; jumptable 0000000000095B26 case 3
movzx eax, byte ptr [rax+2]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx]
shl ecx, 10h
or eax, ecx
mov eax, eax
mov [rbp+var_10], rax
jmp short loc_95C5B
loc_95C2E:
mov rax, [rbp+var_18]; jumptable 0000000000095B26 case 2
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx]
movzx ecx, cx
shl ecx, 8
or eax, ecx
movzx eax, ax
mov [rbp+var_10], rax
jmp short loc_95C5B
loc_95C51:
jmp short $+2; jumptable 0000000000095B26 case 0
def_95B26:
mov [rbp+var_10], 0; jumptable 0000000000095B26 default case, case 1
loc_95C5B:
mov rax, [rbp+var_20]
mov rax, [rax+6C8h]
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_10]
call rax
add rsp, 30h
pop rbp
retn
|
long long ma_row_pos_from_key(long long a1)
{
long long result; // rax
long long v2; // [rsp+10h] [rbp-20h]
unsigned int *v3; // [rsp+18h] [rbp-18h]
unsigned long long v4; // [rsp+20h] [rbp-10h]
unsigned long long v5; // [rsp+20h] [rbp-10h]
unsigned long long v6; // [rsp+20h] [rbp-10h]
v3 = (unsigned int *)(*(unsigned int *)(a1 + 16) + *(_QWORD *)a1);
v2 = **(_QWORD **)(a1 + 8);
switch ( *(_DWORD *)(v2 + 1856) )
{
case 2:
result = (*(long long ( **)(long long, _QWORD))(v2 + 1736))(v2, _byteswap_ushort(*(_WORD *)v3));
break;
case 3:
result = (*(long long ( **)(long long, _QWORD))(v2 + 1736))(
v2,
(*(unsigned __int8 *)v3 << 16) | (*((unsigned __int8 *)v3 + 1) << 8) | (unsigned int)*((unsigned __int8 *)v3 + 2));
break;
case 4:
result = (*(long long ( **)(long long, _QWORD))(v2 + 1736))(v2, _byteswap_ulong(*v3));
break;
case 5:
v6 = mi_uint5korr(v3);
result = (*(long long ( **)(long long, unsigned long long))(v2 + 1736))(v2, v6);
break;
case 6:
v5 = mi_uint6korr(v3);
result = (*(long long ( **)(long long, unsigned long long))(v2 + 1736))(v2, v5);
break;
case 7:
v4 = mi_uint7korr(v3);
result = (*(long long ( **)(long long, unsigned long long))(v2 + 1736))(v2, v4);
break;
case 8:
result = (*(long long ( **)(long long, unsigned long long))(v2 + 1736))(
v2,
((unsigned long long)_byteswap_ulong(*v3) << 32) | _byteswap_ulong(v3[1]));
break;
default:
result = (*(long long ( **)(long long, _QWORD))(v2 + 1736))(v2, 0LL);
break;
}
return result;
}
|
_ma_row_pos_from_key:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV RCX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x10]
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x740]
MOV qword ptr [RBP + -0x28],RAX
SUB RAX,0x8
JA 0x00195c53
MOV RAX,qword ptr [RBP + -0x28]
LEA RCX,[0x2590e0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_8:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x7]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x6]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x5]
SHL ECX,0x10
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x4]
SHL ECX,0x18
OR EAX,ECX
MOV EAX,EAX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x3]
MOV RDX,qword ptr [RBP + -0x18]
MOVZX EDX,byte ptr [RDX + 0x2]
SHL EDX,0x8
OR ECX,EDX
MOV RDX,qword ptr [RBP + -0x18]
MOVZX EDX,byte ptr [RDX + 0x1]
SHL EDX,0x10
OR ECX,EDX
MOV RDX,qword ptr [RBP + -0x18]
MOVZX EDX,byte ptr [RDX]
SHL EDX,0x18
OR ECX,EDX
MOV ECX,ECX
SHL RCX,0x20
OR RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00195c5b
caseD_7:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00195750
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00195c5b
caseD_6:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001957b0
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00195c5b
caseD_5:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00195800
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00195c5b
caseD_4:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x3]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x10
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX]
SHL ECX,0x18
OR EAX,ECX
MOV EAX,EAX
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00195c5b
caseD_3:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX]
SHL ECX,0x10
OR EAX,ECX
MOV EAX,EAX
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00195c5b
caseD_2:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOVZX EAX,AX
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00195c5b
caseD_0:
JMP 0x00195c53
caseD_1:
MOV qword ptr [RBP + -0x10],0x0
LAB_00195c5b:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x6c8]
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x10]
CALL RAX
ADD RSP,0x30
POP RBP
RET
|
void _ma_row_pos_from_key(long *param_1)
{
long lVar1;
int1 *puVar2;
ulong local_18;
puVar2 = (int1 *)(*param_1 + (ulong)*(uint *)(param_1 + 2));
lVar1 = *(long *)param_1[1];
switch(*(int4 *)(lVar1 + 0x740)) {
case 0:
default:
local_18 = 0;
break;
case 2:
local_18 = (ulong)CONCAT11(*puVar2,puVar2[1]);
break;
case 3:
local_18 = (ulong)CONCAT12(*puVar2,CONCAT11(puVar2[1],puVar2[2]));
break;
case 4:
local_18 = (ulong)CONCAT13(*puVar2,CONCAT12(puVar2[1],CONCAT11(puVar2[2],puVar2[3])));
break;
case 5:
local_18 = mi_uint5korr(puVar2);
break;
case 6:
local_18 = mi_uint6korr(puVar2);
break;
case 7:
local_18 = mi_uint7korr(puVar2);
break;
case 8:
local_18 = CONCAT44(CONCAT13(*puVar2,CONCAT12(puVar2[1],CONCAT11(puVar2[2],puVar2[3]))),
CONCAT13(puVar2[4],CONCAT12(puVar2[5],CONCAT11(puVar2[6],puVar2[7]))));
}
(**(code **)(lVar1 + 0x6c8))(lVar1,local_18);
return;
}
|
|
16,417
|
zip_entry_noallocread
|
7CodeWizard[P]stablediffusion/thirdparty/zip.c
|
ssize_t zip_entry_noallocread(struct zip_t *zip, void *buf, size_t bufsize) {
mz_zip_archive *pzip = NULL;
if (!zip) {
// zip_t handler is not initialized
return (ssize_t)ZIP_ENOINIT;
}
pzip = &(zip->archive);
if (pzip->m_zip_mode != MZ_ZIP_MODE_READING ||
zip->entry.index < (ssize_t)0) {
// the entry is not found or we do not have read access
return (ssize_t)ZIP_ENOENT;
}
if (!mz_zip_reader_extract_to_mem_no_alloc(pzip, (mz_uint)zip->entry.index,
buf, bufsize, 0, NULL, 0)) {
return (ssize_t)ZIP_EMEMNOALLOC;
}
return (ssize_t)zip->entry.uncomp_size;
}
|
O1
|
c
|
zip_entry_noallocread:
testq %rdi, %rdi
je 0x8b496
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq $-0x3, %rax
cmpl $0x1, 0x14(%rdi)
jne 0x8b4a5
movq %rdx, %rcx
movq %rsi, %rdx
movq 0x78(%rbx), %rsi
testq %rsi, %rsi
js 0x8b4a5
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x847fe
testl %eax, %eax
je 0x8b49e
movq 0x88(%rbx), %rax
jmp 0x8b4a5
movq $-0x1, %rax
retq
movq $-0x12, %rax
addq $0x10, %rsp
popq %rbx
retq
|
zip_entry_noallocread:
test rdi, rdi
jz short loc_8B496
push rbx
sub rsp, 10h
mov rbx, rdi
mov rax, 0FFFFFFFFFFFFFFFDh
cmp dword ptr [rdi+14h], 1
jnz short loc_8B4A5
mov rcx, rdx
mov rdx, rsi
mov rsi, [rbx+78h]
test rsi, rsi
js short loc_8B4A5
xorps xmm0, xmm0
movups [rsp+18h+var_18], xmm0
mov rdi, rbx
xor r8d, r8d
xor r9d, r9d
call mz_zip_reader_extract_to_mem_no_alloc1
test eax, eax
jz short loc_8B49E
mov rax, [rbx+88h]
jmp short loc_8B4A5
loc_8B496:
mov rax, 0FFFFFFFFFFFFFFFFh
retn
loc_8B49E:
mov rax, 0FFFFFFFFFFFFFFEEh
loc_8B4A5:
add rsp, 10h
pop rbx
retn
|
long long zip_entry_noallocread(long long a1, _BYTE *a2, unsigned long long a3)
{
long long result; // rax
long long v6; // rsi
if ( !a1 )
return -1LL;
result = -3LL;
if ( *(_DWORD *)(a1 + 20) == 1 )
{
v6 = *(_QWORD *)(a1 + 120);
if ( v6 >= 0 )
{
if ( (unsigned int)mz_zip_reader_extract_to_mem_no_alloc1(a1, v6, a2, a3, 0, 0LL, 0LL, 0LL) )
return *(_QWORD *)(a1 + 136);
else
return -18LL;
}
}
return result;
}
| |||
16,418
|
zip_entry_noallocread
|
7CodeWizard[P]stablediffusion/thirdparty/zip.c
|
ssize_t zip_entry_noallocread(struct zip_t *zip, void *buf, size_t bufsize) {
mz_zip_archive *pzip = NULL;
if (!zip) {
// zip_t handler is not initialized
return (ssize_t)ZIP_ENOINIT;
}
pzip = &(zip->archive);
if (pzip->m_zip_mode != MZ_ZIP_MODE_READING ||
zip->entry.index < (ssize_t)0) {
// the entry is not found or we do not have read access
return (ssize_t)ZIP_ENOENT;
}
if (!mz_zip_reader_extract_to_mem_no_alloc(pzip, (mz_uint)zip->entry.index,
buf, bufsize, 0, NULL, 0)) {
return (ssize_t)ZIP_EMEMNOALLOC;
}
return (ssize_t)zip->entry.uncomp_size;
}
|
O2
|
c
|
zip_entry_noallocread:
testq %rdi, %rdi
je 0x65541
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
pushq $-0x3
popq %rax
cmpl $0x1, 0x14(%rdi)
jne 0x65548
movq %rdx, %rcx
movq %rsi, %rdx
movq 0x78(%rbx), %rsi
testq %rsi, %rsi
js 0x65548
andq $0x0, (%rsp)
movq %rbx, %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5eee3
testl %eax, %eax
je 0x65545
movq 0x88(%rbx), %rax
jmp 0x65548
pushq $-0x1
popq %rax
retq
pushq $-0x12
popq %rax
addq $0x10, %rsp
popq %rbx
retq
|
zip_entry_noallocread:
test rdi, rdi
jz short loc_65541
push rbx
sub rsp, 10h
mov rbx, rdi
push 0FFFFFFFFFFFFFFFDh
pop rax
cmp dword ptr [rdi+14h], 1
jnz short loc_65548
mov rcx, rdx
mov rdx, rsi
mov rsi, [rbx+78h]
test rsi, rsi
js short loc_65548
and [rsp+18h+var_18], 0
mov rdi, rbx
xor r8d, r8d
xor r9d, r9d
call mz_zip_reader_extract_to_mem_no_alloc
test eax, eax
jz short loc_65545
mov rax, [rbx+88h]
jmp short loc_65548
loc_65541:
push 0FFFFFFFFFFFFFFFFh
pop rax
retn
loc_65545:
push 0FFFFFFFFFFFFFFEEh
pop rax
loc_65548:
add rsp, 10h
pop rbx
retn
|
long long zip_entry_noallocread(long long a1, int a2, int a3)
{
long long result; // rax
long long v6; // rsi
if ( !a1 )
return -1LL;
result = -3LL;
if ( *(_DWORD *)(a1 + 20) == 1 )
{
v6 = *(_QWORD *)(a1 + 120);
if ( v6 >= 0 )
{
if ( (unsigned int)mz_zip_reader_extract_to_mem_no_alloc(a1, v6, a2, a3, 0, 0, 0LL) )
return *(_QWORD *)(a1 + 136);
else
return -18LL;
}
}
return result;
}
|
zip_entry_noallocread:
TEST RDI,RDI
JZ 0x00165541
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
PUSH -0x3
POP RAX
CMP dword ptr [RDI + 0x14],0x1
JNZ 0x00165548
MOV RCX,RDX
MOV RDX,RSI
MOV RSI,qword ptr [RBX + 0x78]
TEST RSI,RSI
JS 0x00165548
AND qword ptr [RSP],0x0
MOV RDI,RBX
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0015eee3
TEST EAX,EAX
JZ 0x00165545
MOV RAX,qword ptr [RBX + 0x88]
JMP 0x00165548
LAB_00165541:
PUSH -0x1
POP RAX
RET
LAB_00165545:
PUSH -0x12
POP RAX
LAB_00165548:
ADD RSP,0x10
POP RBX
RET
|
int8 zip_entry_noallocread(long param_1,int8 param_2,int8 param_3)
{
int iVar1;
int8 uVar2;
if (param_1 != 0) {
uVar2 = 0xfffffffffffffffd;
if ((*(int *)(param_1 + 0x14) == 1) && (-1 < *(long *)(param_1 + 0x78))) {
iVar1 = mz_zip_reader_extract_to_mem_no_alloc
(param_1,*(long *)(param_1 + 0x78),param_2,param_3,0,0,0);
if (iVar1 == 0) {
uVar2 = 0xffffffffffffffee;
}
else {
uVar2 = *(int8 *)(param_1 + 0x88);
}
}
return uVar2;
}
return 0xffffffffffffffff;
}
|
|
16,419
|
zip_entry_noallocread
|
7CodeWizard[P]stablediffusion/thirdparty/zip.c
|
ssize_t zip_entry_noallocread(struct zip_t *zip, void *buf, size_t bufsize) {
mz_zip_archive *pzip = NULL;
if (!zip) {
// zip_t handler is not initialized
return (ssize_t)ZIP_ENOINIT;
}
pzip = &(zip->archive);
if (pzip->m_zip_mode != MZ_ZIP_MODE_READING ||
zip->entry.index < (ssize_t)0) {
// the entry is not found or we do not have read access
return (ssize_t)ZIP_ENOENT;
}
if (!mz_zip_reader_extract_to_mem_no_alloc(pzip, (mz_uint)zip->entry.index,
buf, bufsize, 0, NULL, 0)) {
return (ssize_t)ZIP_EMEMNOALLOC;
}
return (ssize_t)zip->entry.uncomp_size;
}
|
O3
|
c
|
zip_entry_noallocread:
testq %rdi, %rdi
je 0x8a1d6
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq $-0x3, %rax
cmpl $0x1, 0x14(%rdi)
jne 0x8a1e5
movq %rdx, %rcx
movq %rsi, %rdx
movq 0x78(%rbx), %rsi
testq %rsi, %rsi
js 0x8a1e5
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x8383d
testl %eax, %eax
je 0x8a1de
movq 0x88(%rbx), %rax
jmp 0x8a1e5
movq $-0x1, %rax
retq
movq $-0x12, %rax
addq $0x10, %rsp
popq %rbx
retq
|
zip_entry_noallocread:
test rdi, rdi
jz short loc_8A1D6
push rbx
sub rsp, 10h
mov rbx, rdi
mov rax, 0FFFFFFFFFFFFFFFDh
cmp dword ptr [rdi+14h], 1
jnz short loc_8A1E5
mov rcx, rdx
mov rdx, rsi
mov rsi, [rbx+78h]
test rsi, rsi
js short loc_8A1E5
xorps xmm0, xmm0
movups [rsp+18h+var_18], xmm0
mov rdi, rbx
xor r8d, r8d
xor r9d, r9d
call mz_zip_reader_extract_to_mem_no_alloc1
test eax, eax
jz short loc_8A1DE
mov rax, [rbx+88h]
jmp short loc_8A1E5
loc_8A1D6:
mov rax, 0FFFFFFFFFFFFFFFFh
retn
loc_8A1DE:
mov rax, 0FFFFFFFFFFFFFFEEh
loc_8A1E5:
add rsp, 10h
pop rbx
retn
|
long long zip_entry_noallocread(long long a1, _BYTE *a2, unsigned long long a3)
{
long long result; // rax
long long v6; // rsi
if ( !a1 )
return -1LL;
result = -3LL;
if ( *(_DWORD *)(a1 + 20) == 1 )
{
v6 = *(_QWORD *)(a1 + 120);
if ( v6 >= 0 )
{
if ( (unsigned int)mz_zip_reader_extract_to_mem_no_alloc1(a1, v6, a2, a3, 0, 0LL, 0LL, 0LL) )
return *(_QWORD *)(a1 + 136);
else
return -18LL;
}
}
return result;
}
| |||
16,420
|
js_math_imul
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_math_imul(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
uint32_t a, b, c;
int32_t d;
if (JS_ToUint32(ctx, &a, argv[0]))
return JS_EXCEPTION;
if (JS_ToUint32(ctx, &b, argv[1]))
return JS_EXCEPTION;
c = a * b;
memcpy(&d, &c, sizeof(d));
return js_int32(d);
}
|
O0
|
c
|
js_math_imul:
subq $0x48, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rdi, 0x20(%rsp)
movl %ecx, 0x1c(%rsp)
movq %r8, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
leaq 0xc(%rsp), %rsi
callq 0x4d940
cmpl $0x0, %eax
je 0xd8abf
movl $0x0, 0x38(%rsp)
movq $0x6, 0x40(%rsp)
jmp 0xd8b19
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdx
movq 0x18(%rax), %rcx
leaq 0x8(%rsp), %rsi
callq 0x4d940
cmpl $0x0, %eax
je 0xd8af3
movl $0x0, 0x38(%rsp)
movq $0x6, 0x40(%rsp)
jmp 0xd8b19
movl 0xc(%rsp), %eax
imull 0x8(%rsp), %eax
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %eax
movl %eax, (%rsp)
movl (%rsp), %edi
callq 0x33cc0
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rdx
addq $0x48, %rsp
retq
nopl (%rax,%rax)
|
js_math_imul:
sub rsp, 48h
mov [rsp+48h+var_20], rsi
mov [rsp+48h+var_18], rdx
mov [rsp+48h+var_28], rdi
mov [rsp+48h+var_2C], ecx
mov [rsp+48h+var_38], r8
mov rdi, [rsp+48h+var_28]
mov rax, [rsp+48h+var_38]
mov rdx, [rax]
mov rcx, [rax+8]
lea rsi, [rsp+48h+var_3C]
call JS_ToUint32_0
cmp eax, 0
jz short loc_D8ABF
mov dword ptr [rsp+48h+var_10], 0
mov [rsp+48h+var_8], 6
jmp short loc_D8B19
loc_D8ABF:
mov rdi, [rsp+48h+var_28]
mov rax, [rsp+48h+var_38]
mov rdx, [rax+10h]
mov rcx, [rax+18h]
lea rsi, [rsp+48h+var_40]
call JS_ToUint32_0
cmp eax, 0
jz short loc_D8AF3
mov dword ptr [rsp+48h+var_10], 0
mov [rsp+48h+var_8], 6
jmp short loc_D8B19
loc_D8AF3:
mov eax, [rsp+48h+var_3C]
imul eax, [rsp+48h+var_40]
mov [rsp+48h+var_44], eax
mov eax, [rsp+48h+var_44]
mov [rsp+48h+var_48], eax
mov edi, [rsp+48h+var_48]
call js_int32
mov [rsp+48h+var_10], rax
mov [rsp+48h+var_8], rdx
loc_D8B19:
mov rax, [rsp+48h+var_10]
mov rdx, [rsp+48h+var_8]
add rsp, 48h
retn
|
long long js_math_imul(long long a1, long long a2, long long a3, int a4, long long a5)
{
long long v5; // rdx
int v7; // [rsp+8h] [rbp-40h] BYREF
int v8; // [rsp+Ch] [rbp-3Ch] BYREF
long long v9; // [rsp+10h] [rbp-38h]
int v10; // [rsp+1Ch] [rbp-2Ch]
long long v11; // [rsp+20h] [rbp-28h]
long long v12; // [rsp+28h] [rbp-20h]
long long v13; // [rsp+30h] [rbp-18h]
long long v14; // [rsp+38h] [rbp-10h]
long long v15; // [rsp+40h] [rbp-8h]
v12 = a2;
v13 = a3;
v11 = a1;
v10 = a4;
v9 = a5;
if ( (unsigned int)JS_ToUint32_0(a1, (long long)&v8, *(_DWORD **)a5, *(_QWORD *)(a5 + 8)) )
{
LODWORD(v14) = 0;
v15 = 6LL;
}
else if ( (unsigned int)JS_ToUint32_0(v11, (long long)&v7, *(_DWORD **)(v9 + 16), *(_QWORD *)(v9 + 24)) )
{
LODWORD(v14) = 0;
v15 = 6LL;
}
else
{
v14 = js_int32(v7 * v8);
v15 = v5;
}
return v14;
}
|
js_math_imul:
SUB RSP,0x48
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP + 0x20],RDI
MOV dword ptr [RSP + 0x1c],ECX
MOV qword ptr [RSP + 0x10],R8
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0xc]
CALL 0x0014d940
CMP EAX,0x0
JZ 0x001d8abf
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x6
JMP 0x001d8b19
LAB_001d8abf:
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RAX + 0x18]
LEA RSI,[RSP + 0x8]
CALL 0x0014d940
CMP EAX,0x0
JZ 0x001d8af3
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x6
JMP 0x001d8b19
LAB_001d8af3:
MOV EAX,dword ptr [RSP + 0xc]
IMUL EAX,dword ptr [RSP + 0x8]
MOV dword ptr [RSP + 0x4],EAX
MOV EAX,dword ptr [RSP + 0x4]
MOV dword ptr [RSP],EAX
MOV EDI,dword ptr [RSP]
CALL 0x00133cc0
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
LAB_001d8b19:
MOV RAX,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
ADD RSP,0x48
RET
|
int1 [16]
js_math_imul(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 *param_5)
{
int iVar1;
int1 auVar2 [16];
int local_40;
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_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
iVar1 = JS_ToUint32(param_1,&local_3c,*param_5,param_5[1]);
if (iVar1 == 0) {
iVar1 = JS_ToUint32(local_28,&local_40,local_38[2],local_38[3]);
if (iVar1 == 0) {
auVar2 = js_int32(local_3c * local_40);
local_8 = auVar2._8_8_;
local_10 = auVar2._0_4_;
uStack_c = auVar2._4_4_;
}
else {
local_10 = 0;
local_8 = 6;
}
}
else {
local_10 = 0;
local_8 = 6;
}
auVar2._4_4_ = uStack_c;
auVar2._0_4_ = local_10;
auVar2._8_8_ = local_8;
return auVar2;
}
|
|
16,421
|
js_math_imul
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_math_imul(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
uint32_t a, b, c;
int32_t d;
if (JS_ToUint32(ctx, &a, argv[0]))
return JS_EXCEPTION;
if (JS_ToUint32(ctx, &b, argv[1]))
return JS_EXCEPTION;
c = a * b;
memcpy(&d, &c, sizeof(d));
return js_int32(d);
}
|
O1
|
c
|
js_math_imul:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %r8, %r15
movq %rdi, %r14
movq (%r8), %rdx
movq 0x8(%r8), %rcx
movq %rdx, (%rsp)
cmpl $-0x9, %ecx
jb 0x7e1d0
movq (%rsp), %rax
incl (%rax)
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0x279c3
movl $0x6, %ebx
testl %eax, %eax
jne 0x7e20c
movq 0x10(%r15), %rdx
movq 0x18(%r15), %rcx
movq %rdx, (%rsp)
cmpl $-0x9, %ecx
jb 0x7e1fd
movq (%rsp), %rax
incl (%rax)
movq %rsp, %rsi
movq %r14, %rdi
callq 0x279c3
testl %eax, %eax
je 0x7e21b
xorl %eax, %eax
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl (%rsp), %eax
imull 0xc(%rsp), %eax
xorl %ebx, %ebx
jmp 0x7e20e
|
js_math_imul:
push r15
push r14
push rbx
sub rsp, 10h
mov r15, r8
mov r14, rdi
mov rdx, [r8]
mov rcx, [r8+8]
mov [rsp+28h+var_28], rdx
cmp ecx, 0FFFFFFF7h
jb short loc_7E1D0
mov rax, [rsp+28h+var_28]
inc dword ptr [rax]
loc_7E1D0:
lea rsi, [rsp+28h+var_1C]
mov rdi, r14
call JS_ToInt32Free
mov ebx, 6
test eax, eax
jnz short loc_7E20C
mov rdx, [r15+10h]
mov rcx, [r15+18h]
mov [rsp+28h+var_28], rdx
cmp ecx, 0FFFFFFF7h
jb short loc_7E1FD
mov rax, [rsp+28h+var_28]
inc dword ptr [rax]
loc_7E1FD:
mov rsi, rsp
mov rdi, r14
call JS_ToInt32Free
test eax, eax
jz short loc_7E21B
loc_7E20C:
xor eax, eax
loc_7E20E:
mov rdx, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
retn
loc_7E21B:
mov eax, dword ptr [rsp+28h+var_28]
imul eax, [rsp+28h+var_1C]
xor ebx, ebx
jmp short loc_7E20E
|
long long js_math_imul(long long a1, long long a2, long long a3, long long a4, unsigned long long *a5)
{
unsigned long long v6; // rdx
long long v7; // rcx
unsigned long long v8; // rdx
long long v9; // rcx
int v11[3]; // [rsp+0h] [rbp-28h] BYREF
int v12[7]; // [rsp+Ch] [rbp-1Ch] BYREF
v6 = *a5;
v7 = a5[1];
*(_QWORD *)v11 = *a5;
if ( (unsigned int)v7 >= 0xFFFFFFF7 )
++**(_DWORD **)v11;
if ( (unsigned int)JS_ToInt32Free(a1, v12, v6, v7) )
return 0LL;
v8 = a5[2];
v9 = a5[3];
*(_QWORD *)v11 = v8;
if ( (unsigned int)v9 >= 0xFFFFFFF7 )
++**(_DWORD **)v11;
if ( (unsigned int)JS_ToInt32Free(a1, v11, v8, v9) )
return 0LL;
else
return (unsigned int)(v12[0] * v11[0]);
}
| |||
16,422
|
js_math_imul
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_math_imul(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
uint32_t a, b, c;
int32_t d;
if (JS_ToUint32(ctx, &a, argv[0]))
return JS_EXCEPTION;
if (JS_ToUint32(ctx, &b, argv[1]))
return JS_EXCEPTION;
c = a * b;
memcpy(&d, &c, sizeof(d));
return js_int32(d);
}
|
O2
|
c
|
js_math_imul:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %r8, %r15
movq %rdi, %r14
movq (%r8), %rdx
movq 0x8(%r8), %rcx
leaq 0xc(%rsp), %rsi
callq 0x215d7
pushq $0x6
popq %rbx
testl %eax, %eax
jne 0x69dba
movq 0x10(%r15), %rdx
movq 0x18(%r15), %rcx
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x215d7
testl %eax, %eax
je 0x69dc9
xorl %eax, %eax
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl 0x8(%rsp), %eax
imull 0xc(%rsp), %eax
xorl %ebx, %ebx
jmp 0x69dbc
|
js_math_imul:
push r15
push r14
push rbx
sub rsp, 10h
mov r15, r8
mov r14, rdi
mov rdx, [r8]
mov rcx, [r8+8]
lea rsi, [rsp+28h+var_1C]
call JS_ToInt32
push 6
pop rbx
test eax, eax
jnz short loc_69DBA
mov rdx, [r15+10h]
mov rcx, [r15+18h]
lea rsi, [rsp+28h+var_20]
mov rdi, r14
call JS_ToInt32
test eax, eax
jz short loc_69DC9
loc_69DBA:
xor eax, eax
loc_69DBC:
mov rdx, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
retn
loc_69DC9:
mov eax, [rsp+28h+var_20]
imul eax, [rsp+28h+var_1C]
xor ebx, ebx
jmp short loc_69DBC
|
long long js_math_imul(long long a1, long long a2, long long a3, long long a4, long long a5)
{
int v7; // [rsp+8h] [rbp-20h] BYREF
_DWORD v8[7]; // [rsp+Ch] [rbp-1Ch] BYREF
if ( (unsigned int)JS_ToInt32(a1, (long long)v8, *(_DWORD **)a5, *(_QWORD *)(a5 + 8))
|| (unsigned int)JS_ToInt32(a1, (long long)&v7, *(_DWORD **)(a5 + 16), *(_QWORD *)(a5 + 24)) )
{
return 0LL;
}
else
{
return (unsigned int)(v8[0] * v7);
}
}
|
js_math_imul:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R15,R8
MOV R14,RDI
MOV RDX,qword ptr [R8]
MOV RCX,qword ptr [R8 + 0x8]
LEA RSI,[RSP + 0xc]
CALL 0x001215d7
PUSH 0x6
POP RBX
TEST EAX,EAX
JNZ 0x00169dba
MOV RDX,qword ptr [R15 + 0x10]
MOV RCX,qword ptr [R15 + 0x18]
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x001215d7
TEST EAX,EAX
JZ 0x00169dc9
LAB_00169dba:
XOR EAX,EAX
LAB_00169dbc:
MOV RDX,RBX
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
LAB_00169dc9:
MOV EAX,dword ptr [RSP + 0x8]
IMUL EAX,dword ptr [RSP + 0xc]
XOR EBX,EBX
JMP 0x00169dbc
|
int js_math_imul(int8 param_1)
{
int iVar1;
int8 *in_R8;
int local_20;
int local_1c;
iVar1 = JS_ToInt32(param_1,&local_1c,*in_R8,in_R8[1]);
if ((iVar1 == 0) && (iVar1 = JS_ToInt32(param_1,&local_20,in_R8[2],in_R8[3]), iVar1 == 0)) {
return local_20 * local_1c;
}
return 0;
}
|
|
16,423
|
ma_rec_pos
|
eloqsql/storage/maria/ma_search.c
|
MARIA_RECORD_POS _ma_rec_pos(MARIA_SHARE *share, uchar *ptr)
{
my_off_t pos;
switch (share->rec_reflength) {
#if SIZEOF_OFF_T > 4
case 8:
pos= (my_off_t) mi_uint8korr(ptr);
if (pos == HA_OFFSET_ERROR)
return HA_OFFSET_ERROR; /* end of list */
break;
case 7:
pos= (my_off_t) mi_uint7korr(ptr);
if (pos == (((my_off_t) 1) << 56) -1)
return HA_OFFSET_ERROR; /* end of list */
break;
case 6:
pos= (my_off_t) mi_uint6korr(ptr);
if (pos == (((my_off_t) 1) << 48) -1)
return HA_OFFSET_ERROR; /* end of list */
break;
case 5:
pos= (my_off_t) mi_uint5korr(ptr);
if (pos == (((my_off_t) 1) << 40) -1)
return HA_OFFSET_ERROR; /* end of list */
break;
#else
case 8:
case 7:
case 6:
case 5:
ptr+= (share->rec_reflength-4);
/* fall through */
#endif
case 4:
pos= (my_off_t) mi_uint4korr(ptr);
if (pos == (my_off_t) (uint32) ~0L)
return HA_OFFSET_ERROR;
break;
case 3:
pos= (my_off_t) mi_uint3korr(ptr);
if (pos == (my_off_t) (1 << 24) -1)
return HA_OFFSET_ERROR;
break;
case 2:
pos= (my_off_t) mi_uint2korr(ptr);
if (pos == (my_off_t) (1 << 16) -1)
return HA_OFFSET_ERROR;
break;
default: abort(); /* Impossible */
}
return (*share->keypos_to_recpos)(share, pos);
}
|
O0
|
c
|
ma_rec_pos:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x740(%rax), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x6, %eax
ja 0x95d74
movq -0x28(%rbp), %rax
leaq 0xc34fd(%rip), %rcx # 0x159094
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
movzbl 0x7(%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x6(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x5(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x4(%rcx), %ecx
shll $0x18, %ecx
orl %ecx, %eax
movl %eax, %eax
movq -0x18(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
movq -0x18(%rbp), %rdx
movzbl 0x2(%rdx), %edx
shll $0x8, %edx
orl %edx, %ecx
movq -0x18(%rbp), %rdx
movzbl 0x1(%rdx), %edx
shll $0x10, %edx
orl %edx, %ecx
movq -0x18(%rbp), %rdx
movzbl (%rdx), %edx
shll $0x18, %edx
orl %edx, %ecx
movl %ecx, %ecx
shlq $0x20, %rcx
orq %rcx, %rax
movq %rax, -0x20(%rbp)
cmpq $-0x1, -0x20(%rbp)
jne 0x95c20
movq $-0x1, -0x8(%rbp)
jmp 0x95d92
jmp 0x95d79
movq -0x18(%rbp), %rdi
callq 0x955c0
movq %rax, -0x20(%rbp)
movabsq $0xffffffffffffff, %rax # imm = 0xFFFFFFFFFFFFFF
cmpq %rax, -0x20(%rbp)
jne 0x95c4f
movq $-0x1, -0x8(%rbp)
jmp 0x95d92
jmp 0x95d79
movq -0x18(%rbp), %rdi
callq 0x95620
movq %rax, -0x20(%rbp)
movabsq $0xffffffffffff, %rax # imm = 0xFFFFFFFFFFFF
cmpq %rax, -0x20(%rbp)
jne 0x95c7e
movq $-0x1, -0x8(%rbp)
jmp 0x95d92
jmp 0x95d79
movq -0x18(%rbp), %rdi
callq 0x95670
movq %rax, -0x20(%rbp)
movabsq $0xffffffffff, %rax # imm = 0xFFFFFFFFFF
cmpq %rax, -0x20(%rbp)
jne 0x95cad
movq $-0x1, -0x8(%rbp)
jmp 0x95d92
jmp 0x95d79
movq -0x18(%rbp), %rax
movzbl 0x3(%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
shll $0x18, %ecx
orl %ecx, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq %rax, -0x20(%rbp)
jne 0x95cfe
movq $-0x1, -0x8(%rbp)
jmp 0x95d92
jmp 0x95d79
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
cmpq $0xffffff, -0x20(%rbp) # imm = 0xFFFFFF
jne 0x95d3b
movq $-0x1, -0x8(%rbp)
jmp 0x95d92
jmp 0x95d79
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzwl %ax, %eax
movq %rax, -0x20(%rbp)
cmpq $0xffff, -0x20(%rbp) # imm = 0xFFFF
jne 0x95d72
movq $-0x1, -0x8(%rbp)
jmp 0x95d92
jmp 0x95d79
callq 0x2a5c0
movq -0x10(%rbp), %rax
movq 0x6c8(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq *%rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
_ma_rec_pos:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov eax, [rax+740h]
add eax, 0FFFFFFFEh; switch 7 cases
mov ecx, eax
mov [rbp+var_28], rcx
sub eax, 6
ja def_95B9E; jumptable 0000000000095B9E default case
mov rax, [rbp+var_28]
lea rcx, jpt_95B9E
movsxd rax, ds:(jpt_95B9E - 159094h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_95BA0:
mov rax, [rbp+var_18]; jumptable 0000000000095B9E case 8
movzx eax, byte ptr [rax+7]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+6]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+5]
shl ecx, 10h
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+4]
shl ecx, 18h
or eax, ecx
mov eax, eax
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+3]
mov rdx, [rbp+var_18]
movzx edx, byte ptr [rdx+2]
shl edx, 8
or ecx, edx
mov rdx, [rbp+var_18]
movzx edx, byte ptr [rdx+1]
shl edx, 10h
or ecx, edx
mov rdx, [rbp+var_18]
movzx edx, byte ptr [rdx]
shl edx, 18h
or ecx, edx
mov ecx, ecx
shl rcx, 20h
or rax, rcx
mov [rbp+var_20], rax
cmp [rbp+var_20], 0FFFFFFFFFFFFFFFFh
jnz short loc_95C20
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp loc_95D92
loc_95C20:
jmp loc_95D79
loc_95C25:
mov rdi, [rbp+var_18]; jumptable 0000000000095B9E case 7
call mi_uint7korr
mov [rbp+var_20], rax
mov rax, 0FFFFFFFFFFFFFFh
cmp [rbp+var_20], rax
jnz short loc_95C4F
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp loc_95D92
loc_95C4F:
jmp loc_95D79
loc_95C54:
mov rdi, [rbp+var_18]; jumptable 0000000000095B9E case 6
call mi_uint6korr
mov [rbp+var_20], rax
mov rax, 0FFFFFFFFFFFFh
cmp [rbp+var_20], rax
jnz short loc_95C7E
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp loc_95D92
loc_95C7E:
jmp loc_95D79
loc_95C83:
mov rdi, [rbp+var_18]; jumptable 0000000000095B9E case 5
call mi_uint5korr
mov [rbp+var_20], rax
mov rax, 0FFFFFFFFFFh
cmp [rbp+var_20], rax
jnz short loc_95CAD
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp loc_95D92
loc_95CAD:
jmp loc_95D79
loc_95CB2:
mov rax, [rbp+var_18]; jumptable 0000000000095B9E case 4
movzx eax, byte ptr [rax+3]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+2]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+1]
shl ecx, 10h
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx]
shl ecx, 18h
or eax, ecx
mov eax, eax
mov [rbp+var_20], rax
mov eax, 0FFFFFFFFh
cmp [rbp+var_20], rax
jnz short loc_95CFE
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp loc_95D92
loc_95CFE:
jmp short loc_95D79
loc_95D00:
mov rax, [rbp+var_18]; jumptable 0000000000095B9E case 3
movzx eax, byte ptr [rax+2]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx]
shl ecx, 10h
or eax, ecx
mov eax, eax
mov [rbp+var_20], rax
cmp [rbp+var_20], 0FFFFFFh
jnz short loc_95D3B
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_95D92
loc_95D3B:
jmp short loc_95D79
loc_95D3D:
mov rax, [rbp+var_18]; jumptable 0000000000095B9E case 2
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx]
movzx ecx, cx
shl ecx, 8
or eax, ecx
movzx eax, ax
mov [rbp+var_20], rax
cmp [rbp+var_20], 0FFFFh
jnz short loc_95D72
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_95D92
loc_95D72:
jmp short loc_95D79
def_95B9E:
call _abort; jumptable 0000000000095B9E default case
loc_95D79:
mov rax, [rbp+var_10]
mov rax, [rax+6C8h]
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call rax
mov [rbp+var_8], rax
loc_95D92:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
long long ma_rec_pos(long long a1, unsigned int *a2, long long a3)
{
unsigned long long v4; // [rsp+10h] [rbp-20h]
long long v5; // [rsp+28h] [rbp-8h]
switch ( *(_DWORD *)(a1 + 1856) )
{
case 2:
v4 = _byteswap_ushort(*(_WORD *)a2);
if ( v4 != 0xFFFF )
goto LABEL_24;
v5 = -1LL;
break;
case 3:
v4 = (*(unsigned __int8 *)a2 << 16) | (*((unsigned __int8 *)a2 + 1) << 8) | (unsigned int)*((unsigned __int8 *)a2
+ 2);
if ( v4 != 0xFFFFFF )
goto LABEL_24;
v5 = -1LL;
break;
case 4:
v4 = _byteswap_ulong(*a2);
if ( v4 != 0xFFFFFFFF )
goto LABEL_24;
v5 = -1LL;
break;
case 5:
v4 = mi_uint5korr(a2);
if ( v4 != 0xFFFFFFFFFFLL )
goto LABEL_24;
v5 = -1LL;
break;
case 6:
v4 = mi_uint6korr(a2);
if ( v4 != 0xFFFFFFFFFFFFLL )
goto LABEL_24;
v5 = -1LL;
break;
case 7:
v4 = mi_uint7korr(a2);
if ( v4 != 0xFFFFFFFFFFFFFFLL )
goto LABEL_24;
v5 = -1LL;
break;
case 8:
v4 = ((unsigned long long)_byteswap_ulong(*a2) << 32) | _byteswap_ulong(a2[1]);
if ( v4 == -1LL )
v5 = -1LL;
else
LABEL_24:
v5 = (*(long long ( **)(long long, unsigned long long))(a1 + 1736))(a1, v4);
break;
default:
abort(a1, a2, a3);
}
return v5;
}
|
_ma_rec_pos:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x740]
ADD EAX,-0x2
MOV ECX,EAX
MOV qword ptr [RBP + -0x28],RCX
SUB EAX,0x6
JA 0x00195d74
MOV RAX,qword ptr [RBP + -0x28]
LEA RCX,[0x259094]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_8:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x7]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x6]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x5]
SHL ECX,0x10
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x4]
SHL ECX,0x18
OR EAX,ECX
MOV EAX,EAX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x3]
MOV RDX,qword ptr [RBP + -0x18]
MOVZX EDX,byte ptr [RDX + 0x2]
SHL EDX,0x8
OR ECX,EDX
MOV RDX,qword ptr [RBP + -0x18]
MOVZX EDX,byte ptr [RDX + 0x1]
SHL EDX,0x10
OR ECX,EDX
MOV RDX,qword ptr [RBP + -0x18]
MOVZX EDX,byte ptr [RDX]
SHL EDX,0x18
OR ECX,EDX
MOV ECX,ECX
SHL RCX,0x20
OR RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],-0x1
JNZ 0x00195c20
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x00195d92
LAB_00195c20:
JMP 0x00195d79
caseD_7:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001955c0
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,0xffffffffffffff
CMP qword ptr [RBP + -0x20],RAX
JNZ 0x00195c4f
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x00195d92
LAB_00195c4f:
JMP 0x00195d79
caseD_6:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00195620
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,0xffffffffffff
CMP qword ptr [RBP + -0x20],RAX
JNZ 0x00195c7e
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x00195d92
LAB_00195c7e:
JMP 0x00195d79
caseD_5:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00195670
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,0xffffffffff
CMP qword ptr [RBP + -0x20],RAX
JNZ 0x00195cad
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x00195d92
LAB_00195cad:
JMP 0x00195d79
caseD_4:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x3]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x10
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX]
SHL ECX,0x18
OR EAX,ECX
MOV EAX,EAX
MOV qword ptr [RBP + -0x20],RAX
MOV EAX,0xffffffff
CMP qword ptr [RBP + -0x20],RAX
JNZ 0x00195cfe
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x00195d92
LAB_00195cfe:
JMP 0x00195d79
caseD_3:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX]
SHL ECX,0x10
OR EAX,ECX
MOV EAX,EAX
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],0xffffff
JNZ 0x00195d3b
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x00195d92
LAB_00195d3b:
JMP 0x00195d79
caseD_2:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOVZX EAX,AX
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],0xffff
JNZ 0x00195d72
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x00195d92
LAB_00195d72:
JMP 0x00195d79
default:
CALL 0x0012a5c0
LAB_00195d79:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x6c8]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
CALL RAX
MOV qword ptr [RBP + -0x8],RAX
LAB_00195d92:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
int8 _ma_rec_pos(long param_1,int1 *param_2)
{
int8 uVar1;
ulong local_28;
switch(*(int4 *)(param_1 + 0x740)) {
case 2:
local_28 = (ulong)CONCAT11(*param_2,param_2[1]);
if (local_28 == 0xffff) {
return 0xffffffffffffffff;
}
break;
case 3:
local_28 = (ulong)CONCAT12(*param_2,CONCAT11(param_2[1],param_2[2]));
if (local_28 == 0xffffff) {
return 0xffffffffffffffff;
}
break;
case 4:
local_28 = (ulong)CONCAT13(*param_2,CONCAT12(param_2[1],CONCAT11(param_2[2],param_2[3])));
if (local_28 == 0xffffffff) {
return 0xffffffffffffffff;
}
break;
case 5:
local_28 = mi_uint5korr(param_2);
if (local_28 == 0xffffffffff) {
return 0xffffffffffffffff;
}
break;
case 6:
local_28 = mi_uint6korr(param_2);
if (local_28 == 0xffffffffffff) {
return 0xffffffffffffffff;
}
break;
case 7:
local_28 = mi_uint7korr(param_2);
if (local_28 == 0xffffffffffffff) {
return 0xffffffffffffffff;
}
break;
case 8:
local_28 = CONCAT44(CONCAT13(*param_2,CONCAT12(param_2[1],CONCAT11(param_2[2],param_2[3]))),
CONCAT13(param_2[4],CONCAT12(param_2[5],CONCAT11(param_2[6],param_2[7]))));
if (local_28 == 0xffffffffffffffff) {
return 0xffffffffffffffff;
}
break;
default:
/* WARNING: Subroutine does not return */
abort();
}
uVar1 = (**(code **)(param_1 + 0x6c8))(param_1,local_28);
return uVar1;
}
|
|
16,424
|
normalize_dirname
|
eloqsql/mysys/mf_pack.c
|
size_t normalize_dirname(char *to, const char *from)
{
size_t length;
char buff[FN_REFLEN + 1];
DBUG_ENTER("normalize_dirname");
/*
Despite the name, this actually converts the name to the system's
format (TODO: name this properly).
*/
(void) intern_filename(buff, from);
length= strlen(buff); /* Fix that '/' is last */
if (length &&
#ifdef FN_DEVCHAR
buff[length - 1] != FN_DEVCHAR &&
#endif
buff[length - 1] != FN_LIBCHAR && buff[length - 1] != '/')
{
/* we need reserve 2 bytes for the trailing slash and the zero */
if (length >= sizeof (buff) - 1)
length= sizeof (buff) - 2;
buff[length]= FN_LIBCHAR;
buff[length + 1]= '\0';
}
length=cleanup_dirname(to, buff);
DBUG_RETURN(length);
}
|
O3
|
c
|
normalize_dirname:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x210, %rsp # imm = 0x210
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
leaq -0x220(%rbp), %r14
movq %r14, %rdi
callq 0x5da65
movq %r14, %rdi
callq 0x36410
testq %rax, %rax
je 0x5ddbb
cmpb $0x2f, -0x1(%rax,%r14)
je 0x5ddbb
movl $0x1ff, %ecx # imm = 0x1FF
cmpq %rcx, %rax
cmovbq %rax, %rcx
movw $0x2f, -0x220(%rbp,%rcx)
leaq -0x220(%rbp), %rsi
movq %rbx, %rdi
callq 0x5dafb
movq %fs:0x28, %rcx
cmpq -0x18(%rbp), %rcx
jne 0x5dde5
addq $0x210, %rsp # imm = 0x210
popq %rbx
popq %r14
popq %rbp
retq
callq 0x362b0
|
normalize_dirname:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 210h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_18], rax
lea r14, [rbp+var_220]
mov rdi, r14
call intern_filename
mov rdi, r14
call _strlen
test rax, rax
jz short loc_5DDBB
cmp byte ptr [rax+r14-1], 2Fh ; '/'
jz short loc_5DDBB
mov ecx, 1FFh
cmp rax, rcx
cmovb rcx, rax
mov [rbp+rcx+var_220], 2Fh ; '/'
loc_5DDBB:
lea rsi, [rbp+var_220]
mov rdi, rbx
call cleanup_dirname
mov rcx, fs:28h
cmp rcx, [rbp+var_18]
jnz short loc_5DDE5
add rsp, 210h
pop rbx
pop r14
pop rbp
retn
loc_5DDE5:
call ___stack_chk_fail
|
long long normalize_dirname(long long a1, _BYTE *a2)
{
unsigned long long v2; // rax
long long v3; // rcx
unsigned __int8 v5[520]; // [rsp+0h] [rbp-220h] BYREF
unsigned long long v6; // [rsp+208h] [rbp-18h]
v6 = __readfsqword(0x28u);
intern_filename((long long)v5, a2);
v2 = strlen(v5);
if ( v2 && v5[v2 - 1] != 47 )
{
v3 = 511LL;
if ( v2 < 0x1FF )
v3 = v2;
*(_WORD *)&v5[v3] = 47;
}
return cleanup_dirname(a1, v5);
}
|
normalize_dirname:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x210
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
LEA R14,[RBP + -0x220]
MOV RDI,R14
CALL 0x0015da65
MOV RDI,R14
CALL 0x00136410
TEST RAX,RAX
JZ 0x0015ddbb
CMP byte ptr [RAX + R14*0x1 + -0x1],0x2f
JZ 0x0015ddbb
MOV ECX,0x1ff
CMP RAX,RCX
CMOVC RCX,RAX
MOV word ptr [RBP + RCX*0x1 + -0x220],0x2f
LAB_0015ddbb:
LEA RSI,[RBP + -0x220]
MOV RDI,RBX
CALL 0x0015dafb
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x18]
JNZ 0x0015dde5
ADD RSP,0x210
POP RBX
POP R14
POP RBP
RET
LAB_0015dde5:
CALL 0x001362b0
|
void normalize_dirname(int8 param_1)
{
size_t sVar1;
size_t sVar2;
long in_FS_OFFSET;
int8 uStack_230;
char local_228 [520];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
uStack_230 = (code *)0x15dd90;
intern_filename(local_228);
uStack_230 = (code *)0x15dd98;
sVar1 = strlen(local_228);
if ((sVar1 != 0) && (local_228[sVar1 - 1] != '/')) {
sVar2 = 0x1ff;
if (sVar1 < 0x1ff) {
sVar2 = sVar1;
}
(local_228 + sVar2)[0] = '/';
(local_228 + sVar2)[1] = '\0';
}
uStack_230 = (code *)0x15ddca;
cleanup_dirname(param_1,local_228);
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return;
}
/* WARNING: Subroutine does not return */
uStack_230 = unpack_dirname;
__stack_chk_fail();
}
|
|
16,425
|
sd_image_to_tensor(unsigned char const*, ggml_tensor*)
|
7CodeWizard[P]stablediffusion/ggml_extend.hpp
|
__STATIC_INLINE__ void sd_image_to_tensor(const uint8_t* image_data,
struct ggml_tensor* output) {
int64_t width = output->ne[0];
int64_t height = output->ne[1];
int64_t channels = output->ne[2];
GGML_ASSERT(channels == 3 && output->type == GGML_TYPE_F32);
for (int iy = 0; iy < height; iy++) {
for (int ix = 0; ix < width; ix++) {
for (int k = 0; k < channels; k++) {
float value = *(image_data + iy * width * channels + ix * channels + k);
ggml_tensor_set_f32(output, value / 255.0f, ix, iy, k);
}
}
}
}
|
O0
|
cpp
|
sd_image_to_tensor(unsigned char const*, ggml_tensor*):
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x10(%rsp)
cmpq $0x3, 0x10(%rsp)
jne 0x35bba
movq 0x28(%rsp), %rax
cmpl $0x0, (%rax)
je 0x35bfe
movq 0x1a2367(%rip), %rax # 0x1d7f28
movq (%rax), %rdi
callq 0xb8e0
movq 0x1a23d8(%rip), %rax # 0x1d7fa8
movq (%rax), %rdi
leaq 0x14a040(%rip), %rsi # 0x17fc1a
leaq 0x14a17b(%rip), %rdx # 0x17fd5c
movl $0xda, %ecx
leaq 0x14af4e(%rip), %r8 # 0x180b3b
movb $0x0, %al
callq 0xbae0
callq 0x11a4f0
callq 0xb3a0
jmp 0x35c00
movl $0x0, 0xc(%rsp)
movslq 0xc(%rsp), %rax
cmpq 0x18(%rsp), %rax
jge 0x35cdc
movl $0x0, 0x8(%rsp)
movslq 0x8(%rsp), %rax
cmpq 0x20(%rsp), %rax
jge 0x35cca
movl $0x0, 0x4(%rsp)
movslq 0x4(%rsp), %rax
cmpq 0x10(%rsp), %rax
jge 0x35cb8
movq 0x30(%rsp), %rcx
movslq 0xc(%rsp), %rax
movq 0x20(%rsp), %rdx
imulq %rdx, %rax
movq 0x10(%rsp), %rdx
imulq %rdx, %rax
addq %rax, %rcx
movslq 0x8(%rsp), %rax
imulq %rdx, %rax
addq %rax, %rcx
movslq 0x4(%rsp), %rax
movzbl (%rax,%rcx), %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, (%rsp)
movq 0x28(%rsp), %rdi
movss (%rsp), %xmm0
movss 0x14737d(%rip), %xmm1 # 0x17d010
divss %xmm1, %xmm0
movl 0x8(%rsp), %esi
movl 0xc(%rsp), %edx
movl 0x4(%rsp), %ecx
xorl %r8d, %r8d
callq 0x36080
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x35c38
jmp 0x35cba
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x35c20
jmp 0x35ccc
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x35c08
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
|
_ZL18sd_image_to_tensorPKhP11ggml_tensor:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov rax, [rsp+38h+var_10]
mov rax, [rax+10h]
mov [rsp+38h+var_18], rax
mov rax, [rsp+38h+var_10]
mov rax, [rax+18h]
mov [rsp+38h+var_20], rax
mov rax, [rsp+38h+var_10]
mov rax, [rax+20h]
mov [rsp+38h+var_28], rax
cmp [rsp+38h+var_28], 3
jnz short loc_35BBA
mov rax, [rsp+38h+var_10]
cmp dword ptr [rax], 0
jz short loc_35BFE
loc_35BBA:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov ecx, 0DAh
lea r8, aChannels3Outpu; "channels == 3 && output->type == GGML_T"...
mov al, 0
call _fprintf
call ggml_print_backtrace
call _abort
loc_35BFE:
jmp short $+2
loc_35C00:
mov [rsp+38h+var_2C], 0
loc_35C08:
movsxd rax, [rsp+38h+var_2C]
cmp rax, [rsp+38h+var_20]
jge loc_35CDC
mov [rsp+38h+var_30], 0
loc_35C20:
movsxd rax, [rsp+38h+var_30]
cmp rax, [rsp+38h+var_18]
jge loc_35CCA
mov [rsp+38h+var_34], 0
loc_35C38:
movsxd rax, [rsp+38h+var_34]
cmp rax, [rsp+38h+var_28]
jge short loc_35CB8
mov rcx, [rsp+38h+var_8]
movsxd rax, [rsp+38h+var_2C]
mov rdx, [rsp+38h+var_18]
imul rax, rdx
mov rdx, [rsp+38h+var_28]
imul rax, rdx
add rcx, rax
movsxd rax, [rsp+38h+var_30]
imul rax, rdx
add rcx, rax
movsxd rax, [rsp+38h+var_34]
movzx eax, byte ptr [rax+rcx]
cvtsi2ss xmm0, eax
movss [rsp+38h+var_38], xmm0
mov rdi, [rsp+38h+var_10]
movss xmm0, [rsp+38h+var_38]
movss xmm1, cs:dword_17D010
divss xmm0, xmm1
mov esi, [rsp+38h+var_30]
mov edx, [rsp+38h+var_2C]
mov ecx, [rsp+38h+var_34]
xor r8d, r8d
call _ZL19ggml_tensor_set_f32P11ggml_tensorfiiii; ggml_tensor_set_f32(ggml_tensor *,float,int,int,int,int)
mov eax, [rsp+38h+var_34]
add eax, 1
mov [rsp+38h+var_34], eax
jmp short loc_35C38
loc_35CB8:
jmp short $+2
loc_35CBA:
mov eax, [rsp+38h+var_30]
add eax, 1
mov [rsp+38h+var_30], eax
jmp loc_35C20
loc_35CCA:
jmp short $+2
loc_35CCC:
mov eax, [rsp+38h+var_2C]
add eax, 1
mov [rsp+38h+var_2C], eax
jmp loc_35C08
loc_35CDC:
add rsp, 38h
retn
|
long long sd_image_to_tensor(long long a1, long long a2)
{
long long result; // rax
unsigned int k; // [rsp+4h] [rbp-34h]
unsigned int j; // [rsp+8h] [rbp-30h]
unsigned int i; // [rsp+Ch] [rbp-2Ch]
long long v6; // [rsp+18h] [rbp-20h]
long long v7; // [rsp+20h] [rbp-18h]
v7 = *(_QWORD *)(a2 + 16);
v6 = *(_QWORD *)(a2 + 24);
if ( *(_QWORD *)(a2 + 32) != 3LL || *(_DWORD *)a2 )
{
fflush(stdout);
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml_extend.hpp",
218,
"channels == 3 && output->type == GGML_TYPE_F32");
ggml_print_backtrace();
abort();
}
for ( i = 0; ; ++i )
{
result = (int)i;
if ( (int)i >= v6 )
break;
for ( j = 0; (int)j < v7; ++j )
{
for ( k = 0; (int)k < 3LL; ++k )
ggml_tensor_set_f32(
a2,
j,
i,
k,
0LL,
(float)*(unsigned __int8 *)((int)k + 3LL * (int)j + 3 * v7 * (int)i + a1) / 255.0);
}
}
return result;
}
|
sd_image_to_tensor:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RSP + 0x10],RAX
CMP qword ptr [RSP + 0x10],0x3
JNZ 0x00135bba
MOV RAX,qword ptr [RSP + 0x28]
CMP dword ptr [RAX],0x0
JZ 0x00135bfe
LAB_00135bba:
MOV RAX,qword ptr [0x002d7f28]
MOV RDI,qword ptr [RAX]
CALL 0x0010b8e0
MOV RAX,qword ptr [0x002d7fa8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x27fc1a]
LEA RDX,[0x27fd5c]
MOV ECX,0xda
LEA R8,[0x280b3b]
MOV AL,0x0
CALL 0x0010bae0
CALL 0x0021a4f0
CALL 0x0010b3a0
LAB_00135bfe:
JMP 0x00135c00
LAB_00135c00:
MOV dword ptr [RSP + 0xc],0x0
LAB_00135c08:
MOVSXD RAX,dword ptr [RSP + 0xc]
CMP RAX,qword ptr [RSP + 0x18]
JGE 0x00135cdc
MOV dword ptr [RSP + 0x8],0x0
LAB_00135c20:
MOVSXD RAX,dword ptr [RSP + 0x8]
CMP RAX,qword ptr [RSP + 0x20]
JGE 0x00135cca
MOV dword ptr [RSP + 0x4],0x0
LAB_00135c38:
MOVSXD RAX,dword ptr [RSP + 0x4]
CMP RAX,qword ptr [RSP + 0x10]
JGE 0x00135cb8
MOV RCX,qword ptr [RSP + 0x30]
MOVSXD RAX,dword ptr [RSP + 0xc]
MOV RDX,qword ptr [RSP + 0x20]
IMUL RAX,RDX
MOV RDX,qword ptr [RSP + 0x10]
IMUL RAX,RDX
ADD RCX,RAX
MOVSXD RAX,dword ptr [RSP + 0x8]
IMUL RAX,RDX
ADD RCX,RAX
MOVSXD RAX,dword ptr [RSP + 0x4]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CVTSI2SS XMM0,EAX
MOVSS dword ptr [RSP],XMM0
MOV RDI,qword ptr [RSP + 0x28]
MOVSS XMM0,dword ptr [RSP]
MOVSS XMM1,dword ptr [0x0027d010]
DIVSS XMM0,XMM1
MOV ESI,dword ptr [RSP + 0x8]
MOV EDX,dword ptr [RSP + 0xc]
MOV ECX,dword ptr [RSP + 0x4]
XOR R8D,R8D
CALL 0x00136080
MOV EAX,dword ptr [RSP + 0x4]
ADD EAX,0x1
MOV dword ptr [RSP + 0x4],EAX
JMP 0x00135c38
LAB_00135cb8:
JMP 0x00135cba
LAB_00135cba:
MOV EAX,dword ptr [RSP + 0x8]
ADD EAX,0x1
MOV dword ptr [RSP + 0x8],EAX
JMP 0x00135c20
LAB_00135cca:
JMP 0x00135ccc
LAB_00135ccc:
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc],EAX
JMP 0x00135c08
LAB_00135cdc:
ADD RSP,0x38
RET
|
/* sd_image_to_tensor(unsigned char const*, ggml_tensor*) */
void sd_image_to_tensor(uchar *param_1,ggml_tensor *param_2)
{
long lVar1;
long lVar2;
int local_34;
int local_30;
int local_2c;
lVar1 = *(long *)(param_2 + 0x10);
lVar2 = *(long *)(param_2 + 0x18);
if ((*(long *)(param_2 + 0x20) == 3) && (*(int *)param_2 == 0)) {
for (local_2c = 0; local_2c < lVar2; local_2c = local_2c + 1) {
for (local_30 = 0; local_30 < lVar1; local_30 = local_30 + 1) {
for (local_34 = 0; local_34 < 3; local_34 = local_34 + 1) {
ggml_tensor_set_f32(param_2,(float)param_1[(long)local_34 +
(long)local_30 * 3 + local_2c * lVar1 * 3] /
DAT_0027d010,local_30,local_2c,local_34,0);
}
}
}
return;
}
fflush(*(FILE **)PTR_stdout_002d7f28);
fprintf(*(FILE **)PTR_stderr_002d7fa8,"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml_extend.hpp",
0xda,"channels == 3 && output->type == GGML_TYPE_F32");
ggml_print_backtrace();
/* WARNING: Subroutine does not return */
abort();
}
|
|
16,426
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long)
|
monkey531[P]llama/common/json.hpp
|
reference operator[](size_type idx)
{
// implicitly convert null value to an empty array
if (is_null())
{
m_data.m_type = value_t::array;
m_data.m_value.array = create<array_t>();
assert_invariant();
}
// operator[] only works for arrays
if (JSON_HEDLEY_LIKELY(is_array()))
{
// fill up array with null values if given idx is outside range
if (idx >= m_data.m_value.array->size())
{
#if JSON_DIAGNOSTICS
// remember array size & capacity before resizing
const auto old_size = m_data.m_value.array->size();
const auto old_capacity = m_data.m_value.array->capacity();
#endif
m_data.m_value.array->resize(idx + 1);
#if JSON_DIAGNOSTICS
if (JSON_HEDLEY_UNLIKELY(m_data.m_value.array->capacity() != old_capacity))
{
// capacity has changed: update all parents
set_parents();
}
else
{
// set parent for values added above
set_parents(begin() + static_cast<typename iterator::difference_type>(old_size), static_cast<typename iterator::difference_type>(idx + 1 - old_size));
}
#endif
assert_invariant();
}
return m_data.m_value.array->operator[](idx);
}
JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this));
}
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x0, (%rdi)
jne 0xcfb92
movb $0x2, (%r14)
movl $0x18, %edi
callq 0x1dc10
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x8974c
cmpb $0x2, (%r14)
jne 0xcfbd9
movq 0x8(%r14), %rdi
movq 0x8(%rdi), %rax
subq (%rdi), %rax
sarq $0x4, %rax
cmpq %rbx, %rax
ja 0xcfbc2
leaq 0x1(%rbx), %rsi
callq 0xcfe3c
movq %r14, %rdi
movl $0x1, %esi
callq 0x8974c
movq 0x8(%r14), %rax
shlq $0x4, %rbx
addq (%rax), %rbx
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1d5b0
movq %rax, %rbx
movq %r14, %rdi
callq 0x8fd1e
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x4982a(%rip), %rsi # 0x119427
leaq 0x10(%rsp), %rdi
callq 0xc677a
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x131, %esi # imm = 0x131
movq %r14, %rcx
callq 0x8fac6
xorl %ebp, %ebp
leaq 0x87570(%rip), %rsi # 0x157198
leaq -0x43cfb(%rip), %rdx # 0x8bf34
movq %rbx, %rdi
callq 0x1e5a0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcfc5d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1dc40
jmp 0xcfc5d
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0xcfc6a
movq %rbx, %rdi
callq 0x1d8b0
movq %r14, %rdi
callq 0x1e650
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov rbx, rsi
mov r14, rdi
cmp byte ptr [rdi], 0
jnz short loc_CFB92
mov byte ptr [r14], 2
mov edi, 18h; unsigned __int64
call __Znwm; operator new(ulong)
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
mov qword ptr [rax+10h], 0
mov [r14+8], rax
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
loc_CFB92:
cmp byte ptr [r14], 2
jnz short loc_CFBD9
mov rdi, [r14+8]
mov rax, [rdi+8]
sub rax, [rdi]
sar rax, 4
cmp rax, rbx
ja short loc_CFBC2
lea rsi, [rbx+1]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE6resizeEm; 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>>::resize(ulong)
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
loc_CFBC2:
mov rax, [r14+8]
shl rbx, 4
add rbx, [rax]
mov rax, rbx
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_CFBD9:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUseOpera; "cannot use operator[] with a numeric ar"...
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 131h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_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_CFC5D
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_CFC5D
mov r14, rax
mov bpl, 1
loc_CFC5D:
test bpl, bpl
jz short loc_CFC6A
mov rdi, rbx; void *
call ___cxa_free_exception
loc_CFC6A:
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
long long a1,
unsigned long long a2)
{
long long v3; // rax
_QWORD *v4; // rdi
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v7; // [rsp+8h] [rbp-40h] BYREF
_QWORD v8[2]; // [rsp+10h] [rbp-38h] BYREF
if ( !*(_BYTE *)a1 )
{
*(_BYTE *)a1 = 2;
v3 = operator new(0x18uLL);
*(_OWORD *)v3 = 0LL;
*(_QWORD *)(v3 + 16) = 0LL;
*(_QWORD *)(a1 + 8) = v3;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
}
if ( *(_BYTE *)a1 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v7 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(
(long long)v8,
(long long)"cannot use operator[] with a numeric argument with ",
&v7);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
305,
v8);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v4 = *(_QWORD **)(a1 + 8);
if ( (long long)(v4[1] - *v4) >> 4 <= a2 )
{
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>>::resize(
v4,
a2 + 1);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
}
return **(_QWORD **)(a1 + 8) + 16 * a2;
}
|
operator[]:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RSI
MOV R14,RDI
CMP byte ptr [RDI],0x0
JNZ 0x001cfb92
MOV byte ptr [R14],0x2
MOV EDI,0x18
CALL 0x0011dc10
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],0x0
MOV qword ptr [R14 + 0x8],RAX
MOV RDI,R14
MOV ESI,0x1
CALL 0x0018974c
LAB_001cfb92:
CMP byte ptr [R14],0x2
JNZ 0x001cfbd9
MOV RDI,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [RDI + 0x8]
SUB RAX,qword ptr [RDI]
SAR RAX,0x4
CMP RAX,RBX
JA 0x001cfbc2
LEA RSI,[RBX + 0x1]
CALL 0x001cfe3c
MOV RDI,R14
MOV ESI,0x1
CALL 0x0018974c
LAB_001cfbc2:
MOV RAX,qword ptr [R14 + 0x8]
SHL RBX,0x4
ADD RBX,qword ptr [RAX]
MOV RAX,RBX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_001cfbd9:
MOV EDI,0x20
CALL 0x0011d5b0
MOV RBX,RAX
MOV RDI,R14
CALL 0x0018fd1e
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001cfbf6:
LEA RSI,[0x219427]
LEA RDI,[RSP + 0x10]
CALL 0x001c677a
MOV BPL,0x1
LAB_001cfc0a:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x131
MOV RCX,R14
CALL 0x0018fac6
XOR EBP,EBP
LEA RSI,[0x257198]
LEA RDX,[0x18bf34]
MOV RDI,RBX
CALL 0x0011e5a0
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::operator[](unsigned long) */
long __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,ulong param_1)
{
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_00;
int8 *puVar1;
int8 uVar2;
char *local_40;
detail local_38 [32];
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
*this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2;
puVar1 = (int8 *)operator_new(0x18);
*puVar1 = 0;
puVar1[1] = 0;
puVar1[2] = 0;
*(int8 **)(this + 8) = puVar1;
assert_invariant(SUB81(this,0));
}
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
this_00 = *(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(this + 8);
if ((ulong)(*(long *)(this_00 + 8) - *(long *)this_00 >> 4) <= param_1) {
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>>>
::resize(this_00,param_1 + 1);
assert_invariant(SUB81(this,0));
}
return param_1 * 0x10 + **(long **)(this + 8);
}
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 001cfbf6 to 001cfc06 has its CatchHandler @ 001cfc57 */
detail::concat<std::__cxx11::string,char_const(&)[52],char_const*>
(local_38,"cannot use operator[] with a numeric argument with ",&local_40);
/* try { // try from 001cfc0a to 001cfc36 has its CatchHandler @ 001cfc37 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0x131,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception);
}
|
|
16,427
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long)
|
monkey531[P]llama/common/json.hpp
|
reference operator[](size_type idx)
{
// implicitly convert null value to an empty array
if (is_null())
{
m_data.m_type = value_t::array;
m_data.m_value.array = create<array_t>();
assert_invariant();
}
// operator[] only works for arrays
if (JSON_HEDLEY_LIKELY(is_array()))
{
// fill up array with null values if given idx is outside range
if (idx >= m_data.m_value.array->size())
{
#if JSON_DIAGNOSTICS
// remember array size & capacity before resizing
const auto old_size = m_data.m_value.array->size();
const auto old_capacity = m_data.m_value.array->capacity();
#endif
m_data.m_value.array->resize(idx + 1);
#if JSON_DIAGNOSTICS
if (JSON_HEDLEY_UNLIKELY(m_data.m_value.array->capacity() != old_capacity))
{
// capacity has changed: update all parents
set_parents();
}
else
{
// set parent for values added above
set_parents(begin() + static_cast<typename iterator::difference_type>(old_size), static_cast<typename iterator::difference_type>(idx + 1 - old_size));
}
#endif
assert_invariant();
}
return m_data.m_value.array->operator[](idx);
}
JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this));
}
|
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>::operator[](unsigned long):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movb (%rdi), %al
testb %al, %al
jne 0xce8ea
movb $0x2, (%r14)
movl $0x18, %edi
callq 0x1dc20
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x89876
movb (%r14), %al
cmpb $0x2, %al
jne 0xce935
movq 0x8(%r14), %rdi
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
cmpq %rbx, %rcx
ja 0xce922
leaq 0x1(%rbx), %rsi
callq 0xceba8
movq %r14, %rdi
movl $0x1, %esi
callq 0x89876
movq 0x8(%r14), %rax
movq (%rax), %rax
shlq $0x4, %rbx
addq %rax, %rbx
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1d5b0
movq %rax, %rbx
movq %r14, %rdi
callq 0x8fb52
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x47ace(%rip), %rsi # 0x116427
leaq 0x10(%rsp), %rdi
callq 0xc565b
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x131, %esi # imm = 0x131
movq %r14, %rcx
callq 0x8f8fa
xorl %ebp, %ebp
leaq 0x85814(%rip), %rsi # 0x154198
leaq -0x42b2f(%rip), %rdx # 0x8be5c
movq %rbx, %rdi
callq 0x1e5b0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xce9b1
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1dc50
testb %bpl, %bpl
jne 0xce9bb
jmp 0xce9c3
movq %rax, %r14
movq %rbx, %rdi
callq 0x1d8c0
movq %r14, %rdi
callq 0x1e660
nop
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov rbx, rsi
mov r14, rdi
mov al, [rdi]
test al, al
jnz short loc_CE8EA
mov byte ptr [r14], 2
mov edi, 18h; unsigned __int64
call __Znwm; operator new(ulong)
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
mov qword ptr [rax+10h], 0
mov [r14+8], rax
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov al, [r14]
loc_CE8EA:
cmp al, 2
jnz short loc_CE935
mov rdi, [r14+8]
mov rax, [rdi]
mov rcx, [rdi+8]
sub rcx, rax
sar rcx, 4
cmp rcx, rbx
ja short loc_CE922
lea rsi, [rbx+1]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE6resizeEm; 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>>::resize(ulong)
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rax, [r14+8]
mov rax, [rax]
loc_CE922:
shl rbx, 4
add rbx, rax
mov rax, rbx
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_CE935:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUseOpera; "cannot use operator[] with a numeric ar"...
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 131h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_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_CE9B1
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CE9B1:
test bpl, bpl
jnz short loc_CE9BB
jmp short loc_CE9C3
mov r14, rax
loc_CE9BB:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_CE9C3:
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
long long a1,
unsigned long long a2)
{
char v3; // al
long long v4; // rax
long long *v5; // rdi
long long v6; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v9; // [rsp+8h] [rbp-40h] BYREF
_QWORD v10[2]; // [rsp+10h] [rbp-38h] BYREF
v3 = *(_BYTE *)a1;
if ( !*(_BYTE *)a1 )
{
*(_BYTE *)a1 = 2;
v4 = operator new(0x18uLL);
*(_OWORD *)v4 = 0LL;
*(_QWORD *)(v4 + 16) = 0LL;
*(_QWORD *)(a1 + 8) = 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>::assert_invariant((char *)a1);
v3 = *(_BYTE *)a1;
}
if ( v3 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(
(long long)v10,
(long long)"cannot use operator[] with a numeric argument with ",
&v9);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
305,
v10);
__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);
}
v5 = *(long long **)(a1 + 8);
v6 = *v5;
if ( (v5[1] - *v5) >> 4 <= a2 )
{
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>>::resize(
v5,
a2 + 1);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
v6 = **(_QWORD **)(a1 + 8);
}
return v6 + 16 * a2;
}
|
operator[]:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RSI
MOV R14,RDI
MOV AL,byte ptr [RDI]
TEST AL,AL
JNZ 0x001ce8ea
MOV byte ptr [R14],0x2
MOV EDI,0x18
CALL 0x0011dc20
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],0x0
MOV qword ptr [R14 + 0x8],RAX
MOV RDI,R14
MOV ESI,0x1
CALL 0x00189876
MOV AL,byte ptr [R14]
LAB_001ce8ea:
CMP AL,0x2
JNZ 0x001ce935
MOV RDI,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
SUB RCX,RAX
SAR RCX,0x4
CMP RCX,RBX
JA 0x001ce922
LEA RSI,[RBX + 0x1]
CALL 0x001ceba8
MOV RDI,R14
MOV ESI,0x1
CALL 0x00189876
MOV RAX,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [RAX]
LAB_001ce922:
SHL RBX,0x4
ADD RBX,RAX
MOV RAX,RBX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_001ce935:
MOV EDI,0x20
CALL 0x0011d5b0
MOV RBX,RAX
MOV RDI,R14
CALL 0x0018fb52
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001ce952:
LEA RSI,[0x216427]
LEA RDI,[RSP + 0x10]
CALL 0x001c565b
MOV BPL,0x1
LAB_001ce966:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x131
MOV RCX,R14
CALL 0x0018f8fa
XOR EBP,EBP
LEA RSI,[0x254198]
LEA RDX,[0x18be5c]
MOV RDI,RBX
CALL 0x0011e5b0
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::operator[](unsigned long) */
long __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,ulong param_1)
{
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_00;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
bVar1;
int8 *puVar2;
long lVar3;
int8 uVar4;
char *local_40;
detail local_38 [32];
bVar1 = *this;
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
*this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2;
puVar2 = (int8 *)operator_new(0x18);
*puVar2 = 0;
puVar2[1] = 0;
puVar2[2] = 0;
*(int8 **)(this + 8) = puVar2;
assert_invariant(SUB81(this,0));
bVar1 = *this;
}
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
this_00 = *(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(this + 8);
lVar3 = *(long *)this_00;
if ((ulong)(*(long *)(this_00 + 8) - lVar3 >> 4) <= param_1) {
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>>>
::resize(this_00,param_1 + 1);
assert_invariant(SUB81(this,0));
lVar3 = **(long **)(this + 8);
}
return param_1 * 0x10 + lVar3;
}
uVar4 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 001ce952 to 001ce962 has its CatchHandler @ 001ce9b8 */
detail::concat<std::__cxx11::string,char_const(&)[52],char_const*>
(local_38,"cannot use operator[] with a numeric argument with ",&local_40);
/* try { // try from 001ce966 to 001ce992 has its CatchHandler @ 001ce993 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x131,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&detail::type_error::typeinfo,detail::exception::~exception);
}
|
|
16,428
|
find_set_from_flags
|
eloqsql/mysys/typelib.c
|
my_ulonglong find_set_from_flags(const TYPELIB *lib, uint default_name,
my_ulonglong cur_set, my_ulonglong default_set,
const char *str, uint length,
char **err_pos, uint *err_len)
{
const char *end= str + length;
my_ulonglong flags_to_set= 0, flags_to_clear= 0, res;
my_bool set_defaults= 0;
*err_pos= 0; /* No error yet */
if (str != end)
{
const char *start= str;
for (;;)
{
const char *pos= start;
uint flag_no, value;
if (!(flag_no= parse_name(lib, &pos, end)))
goto err;
if (flag_no == default_name)
{
/* Using 'default' twice isn't allowed. */
if (set_defaults)
goto err;
set_defaults= TRUE;
}
else
{
my_ulonglong bit= (1ULL << (flag_no - 1));
/* parse the '=on|off|default' */
if ((flags_to_clear | flags_to_set) & bit ||
pos >= end || *pos++ != '=' ||
!(value= parse_name(&on_off_default_typelib, &pos, end)))
goto err;
if (value == 1) /* this is '=off' */
flags_to_clear|= bit;
else if (value == 2) /* this is '=on' */
flags_to_set|= bit;
else /* this is '=default' */
{
if (default_set & bit)
flags_to_set|= bit;
else
flags_to_clear|= bit;
}
}
if (pos >= end)
break;
if (*pos++ != ',')
goto err;
start=pos;
continue;
err:
*err_pos= (char*)start;
*err_len= (uint)(end - start);
break;
}
}
res= set_defaults? default_set : cur_set;
res|= flags_to_set;
res&= ~flags_to_clear;
return res;
}
|
O0
|
c
|
find_set_from_flags:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq -0x28(%rbp), %rax
movl -0x2c(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movb $0x0, -0x51(%rbp)
movq 0x10(%rbp), %rax
movq $0x0, (%rax)
movq -0x28(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0x1053a1
movq -0x28(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rdx
leaq -0x68(%rbp), %rsi
callq 0x1053f0
movl %eax, -0x6c(%rbp)
cmpl $0x0, %eax
jne 0x105273
jmp 0x105381
movl -0x6c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jne 0x10528f
cmpb $0x0, -0x51(%rbp)
je 0x105286
jmp 0x105381
movb $0x1, -0x51(%rbp)
jmp 0x10534f
movl -0x6c(%rbp), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0x78(%rbp)
movq -0x48(%rbp), %rax
orq -0x40(%rbp), %rax
andq -0x78(%rbp), %rax
cmpq $0x0, %rax
jne 0x1052f4
movq -0x68(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x1052f4
movq -0x68(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x68(%rbp)
movsbl (%rax), %eax
cmpl $0x3d, %eax
jne 0x1052f4
movq -0x38(%rbp), %rdx
leaq 0x1c877d(%rip), %rdi # 0x2cda60
leaq -0x68(%rbp), %rsi
callq 0x1053f0
movl %eax, -0x70(%rbp)
cmpl $0x0, %eax
jne 0x1052f9
jmp 0x105381
cmpl $0x1, -0x70(%rbp)
jne 0x10530d
movq -0x78(%rbp), %rax
orq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x10534d
cmpl $0x2, -0x70(%rbp)
jne 0x105321
movq -0x78(%rbp), %rax
orq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x10534b
movq -0x20(%rbp), %rax
andq -0x78(%rbp), %rax
cmpq $0x0, %rax
je 0x10533d
movq -0x78(%rbp), %rax
orq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x105349
movq -0x78(%rbp), %rax
orq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x10534b
jmp 0x10534d
jmp 0x10534f
movq -0x68(%rbp), %rax
cmpq -0x38(%rbp), %rax
jb 0x10535b
jmp 0x10539f
movq -0x68(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x68(%rbp)
movsbl (%rax), %eax
cmpl $0x2c, %eax
je 0x105374
jmp 0x105381
movq -0x68(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x10524d
movq -0x60(%rbp), %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
movq -0x60(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq 0x18(%rbp), %rax
movl %ecx, (%rax)
jmp 0x1053a1
movsbl -0x51(%rbp), %eax
cmpl $0x0, %eax
je 0x1053b4
movq -0x20(%rbp), %rax
movq %rax, -0x80(%rbp)
jmp 0x1053bc
movq -0x18(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rax
orq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
xorq $-0x1, %rax
andq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)
|
find_set_from_flags:
push rbp
mov rbp, rsp
sub rsp, 80h
mov rax, [rbp+arg_8]
mov rax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_2C], r9d
mov rax, [rbp+var_28]
mov ecx, [rbp+var_2C]
add rax, rcx
mov [rbp+var_38], rax
mov [rbp+var_40], 0
mov [rbp+var_48], 0
mov [rbp+var_51], 0
mov rax, [rbp+arg_0]
mov qword ptr [rax], 0
mov rax, [rbp+var_28]
cmp rax, [rbp+var_38]
jz loc_1053A1
mov rax, [rbp+var_28]
mov [rbp+var_60], rax
loc_10524D:
mov rax, [rbp+var_60]
mov [rbp+var_68], rax
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_38]
lea rsi, [rbp+var_68]
call parse_name
mov [rbp+var_6C], eax
cmp eax, 0
jnz short loc_105273
jmp loc_105381
loc_105273:
mov eax, [rbp+var_6C]
cmp eax, [rbp+var_C]
jnz short loc_10528F
cmp [rbp+var_51], 0
jz short loc_105286
jmp loc_105381
loc_105286:
mov [rbp+var_51], 1
jmp loc_10534F
loc_10528F:
mov eax, [rbp+var_6C]
sub eax, 1
mov eax, eax
mov ecx, eax
mov eax, 1
shl rax, cl
mov [rbp+var_78], rax
mov rax, [rbp+var_48]
or rax, [rbp+var_40]
and rax, [rbp+var_78]
cmp rax, 0
jnz short loc_1052F4
mov rax, [rbp+var_68]
cmp rax, [rbp+var_38]
jnb short loc_1052F4
mov rax, [rbp+var_68]
mov rcx, rax
add rcx, 1
mov [rbp+var_68], rcx
movsx eax, byte ptr [rax]
cmp eax, 3Dh ; '='
jnz short loc_1052F4
mov rdx, [rbp+var_38]
lea rdi, on_off_default_typelib
lea rsi, [rbp+var_68]
call parse_name
mov [rbp+var_70], eax
cmp eax, 0
jnz short loc_1052F9
loc_1052F4:
jmp loc_105381
loc_1052F9:
cmp [rbp+var_70], 1
jnz short loc_10530D
mov rax, [rbp+var_78]
or rax, [rbp+var_48]
mov [rbp+var_48], rax
jmp short loc_10534D
loc_10530D:
cmp [rbp+var_70], 2
jnz short loc_105321
mov rax, [rbp+var_78]
or rax, [rbp+var_40]
mov [rbp+var_40], rax
jmp short loc_10534B
loc_105321:
mov rax, [rbp+var_20]
and rax, [rbp+var_78]
cmp rax, 0
jz short loc_10533D
mov rax, [rbp+var_78]
or rax, [rbp+var_40]
mov [rbp+var_40], rax
jmp short loc_105349
loc_10533D:
mov rax, [rbp+var_78]
or rax, [rbp+var_48]
mov [rbp+var_48], rax
loc_105349:
jmp short $+2
loc_10534B:
jmp short $+2
loc_10534D:
jmp short $+2
loc_10534F:
mov rax, [rbp+var_68]
cmp rax, [rbp+var_38]
jb short loc_10535B
jmp short loc_10539F
loc_10535B:
mov rax, [rbp+var_68]
mov rcx, rax
add rcx, 1
mov [rbp+var_68], rcx
movsx eax, byte ptr [rax]
cmp eax, 2Ch ; ','
jz short loc_105374
jmp short loc_105381
loc_105374:
mov rax, [rbp+var_68]
mov [rbp+var_60], rax
jmp loc_10524D
loc_105381:
mov rcx, [rbp+var_60]
mov rax, [rbp+arg_0]
mov [rax], rcx
mov rax, [rbp+var_38]
mov rcx, [rbp+var_60]
sub rax, rcx
mov ecx, eax
mov rax, [rbp+arg_8]
mov [rax], ecx
loc_10539F:
jmp short $+2
loc_1053A1:
movsx eax, [rbp+var_51]
cmp eax, 0
jz short loc_1053B4
mov rax, [rbp+var_20]
mov [rbp+var_80], rax
jmp short loc_1053BC
loc_1053B4:
mov rax, [rbp+var_18]
mov [rbp+var_80], rax
loc_1053BC:
mov rax, [rbp+var_80]
mov [rbp+var_50], rax
mov rax, [rbp+var_40]
or rax, [rbp+var_50]
mov [rbp+var_50], rax
mov rax, [rbp+var_48]
xor rax, 0FFFFFFFFFFFFFFFFh
and rax, [rbp+var_50]
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
add rsp, 80h
pop rbp
retn
|
long long find_set_from_flags(
long long a1,
int a2,
long long a3,
long long a4,
_BYTE *a5,
unsigned int a6,
_QWORD *a7,
_DWORD *a8)
{
_BYTE *v8; // rax
_BYTE *v9; // rax
long long v11; // [rsp+0h] [rbp-80h]
long long v12; // [rsp+8h] [rbp-78h]
int v13; // [rsp+10h] [rbp-70h]
int v14; // [rsp+14h] [rbp-6Ch]
_BYTE *v15; // [rsp+18h] [rbp-68h] BYREF
_BYTE *i; // [rsp+20h] [rbp-60h]
char v17; // [rsp+2Fh] [rbp-51h]
long long v18; // [rsp+38h] [rbp-48h]
long long v19; // [rsp+40h] [rbp-40h]
unsigned long long v20; // [rsp+48h] [rbp-38h]
unsigned int v21; // [rsp+54h] [rbp-2Ch]
_BYTE *v22; // [rsp+58h] [rbp-28h]
long long v23; // [rsp+60h] [rbp-20h]
long long v24; // [rsp+68h] [rbp-18h]
int v25; // [rsp+74h] [rbp-Ch]
long long v26; // [rsp+78h] [rbp-8h]
v26 = a1;
v25 = a2;
v24 = a3;
v23 = a4;
v22 = a5;
v21 = a6;
v20 = (unsigned long long)&a5[a6];
v19 = 0LL;
v18 = 0LL;
v17 = 0;
*a7 = 0LL;
if ( v22 != (_BYTE *)v20 )
{
for ( i = v22; ; i = v15 )
{
v15 = i;
v14 = parse_name(v26, &v15, v20);
if ( !v14 )
break;
if ( v14 == v25 )
{
if ( v17 )
break;
v17 = 1;
}
else
{
v12 = 1LL << ((unsigned __int8)v14 - 1);
if ( (v12 & (v19 | v18)) != 0 )
break;
if ( (unsigned long long)v15 >= v20 )
break;
v8 = v15++;
if ( *v8 != 61 )
break;
v13 = parse_name(&on_off_default_typelib, &v15, v20);
switch ( v13 )
{
case 0:
goto LABEL_22;
case 1:
v18 |= v12;
break;
case 2:
v19 |= v12;
break;
default:
if ( (v12 & v23) != 0 )
v19 |= v12;
else
v18 |= v12;
break;
}
}
if ( (unsigned long long)v15 >= v20 )
goto LABEL_23;
v9 = v15++;
if ( *v9 != 44 )
break;
}
LABEL_22:
*a7 = i;
*a8 = v20 - (_DWORD)i;
}
LABEL_23:
if ( v17 )
v11 = v23;
else
v11 = v24;
return (v11 | v19) & ~v18;
}
| |||
16,429
|
find_set_from_flags
|
eloqsql/mysys/typelib.c
|
my_ulonglong find_set_from_flags(const TYPELIB *lib, uint default_name,
my_ulonglong cur_set, my_ulonglong default_set,
const char *str, uint length,
char **err_pos, uint *err_len)
{
const char *end= str + length;
my_ulonglong flags_to_set= 0, flags_to_clear= 0, res;
my_bool set_defaults= 0;
*err_pos= 0; /* No error yet */
if (str != end)
{
const char *start= str;
for (;;)
{
const char *pos= start;
uint flag_no, value;
if (!(flag_no= parse_name(lib, &pos, end)))
goto err;
if (flag_no == default_name)
{
/* Using 'default' twice isn't allowed. */
if (set_defaults)
goto err;
set_defaults= TRUE;
}
else
{
my_ulonglong bit= (1ULL << (flag_no - 1));
/* parse the '=on|off|default' */
if ((flags_to_clear | flags_to_set) & bit ||
pos >= end || *pos++ != '=' ||
!(value= parse_name(&on_off_default_typelib, &pos, end)))
goto err;
if (value == 1) /* this is '=off' */
flags_to_clear|= bit;
else if (value == 2) /* this is '=on' */
flags_to_set|= bit;
else /* this is '=default' */
{
if (default_set & bit)
flags_to_set|= bit;
else
flags_to_clear|= bit;
}
}
if (pos >= end)
break;
if (*pos++ != ',')
goto err;
start=pos;
continue;
err:
*err_pos= (char*)start;
*err_len= (uint)(end - start);
break;
}
}
res= set_defaults? default_set : cur_set;
res|= flags_to_set;
res&= ~flags_to_clear;
return res;
}
|
O3
|
c
|
find_set_from_flags:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, -0x50(%rbp)
movq %rdx, %rax
movl %esi, -0x44(%rbp)
movq 0x10(%rbp), %rcx
movq $0x0, (%rcx)
testl %r9d, %r9d
je 0xacd55
movq %r8, %r14
movq %rdi, %rbx
movq %rax, -0x58(%rbp)
movl %r9d, %r15d
addq %r8, %r15
leaq -0x30(%rbp), %rdi
movq %r8, (%rdi)
movq %rbx, %rsi
movl $0x9, %edx
movq %r15, %rcx
callq 0xac8bd
testl %eax, %eax
je 0xacd60
movq %rbx, -0x60(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x38(%rbp)
xorl %r13d, %r13d
movq %r14, %r12
cmpl -0x44(%rbp), %eax
jne 0xacc9c
movb $0x1, %bl
testb %r13b, %r13b
je 0xacd1a
jmp 0xacd7c
decb %al
movl $0x1, %ebx
movl %eax, %ecx
shlq %cl, %rbx
movq -0x40(%rbp), %r14
movq %r14, %rcx
orq -0x38(%rbp), %rcx
movzbl %al, %eax
btq %rax, %rcx
jb 0xacd74
movq -0x30(%rbp), %rax
cmpq %r15, %rax
jae 0xacd74
leaq 0x1(%rax), %rcx
movq %rcx, -0x30(%rbp)
cmpb $0x3d, (%rax)
jne 0xacd74
leaq -0x30(%rbp), %rdi
leaq 0x2e3d77(%rip), %rsi # 0x390a60
movl $0x9, %edx
movq %r15, %rcx
callq 0xac8bd
cmpl $0x1, %eax
je 0xacd13
cmpl $0x2, %eax
je 0xacd0a
testl %eax, %eax
je 0xacd74
testq %rbx, -0x50(%rbp)
je 0xacd13
orq %rbx, %r14
movq %r14, -0x40(%rbp)
jmp 0xacd17
orq %rbx, -0x38(%rbp)
movl %r13d, %ebx
movq -0x30(%rbp), %r14
cmpq %r15, %r14
jae 0xacd90
cmpb $0x2c, (%r14)
jne 0xacd7c
incq %r14
movq %r14, -0x30(%rbp)
leaq -0x30(%rbp), %rdi
movq -0x60(%rbp), %rsi
movl $0x9, %edx
movq %r15, %rcx
callq 0xac8bd
movl %ebx, %r13d
movq %r14, %r12
testl %eax, %eax
jne 0xacc87
jmp 0xacd7f
movq $-0x1, %rdx
xorl %ecx, %ecx
jmp 0xacda6
xorl %ebx, %ebx
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
jmp 0xacd7f
movq %r12, %r14
movl %r13d, %ebx
jmp 0xacd7f
movq %r12, %r14
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rcx
movq %r14, (%rcx)
subl %r14d, %r15d
movl %r15d, (%rax)
testb %bl, %bl
movq -0x58(%rbp), %rax
cmovneq -0x50(%rbp), %rax
movq -0x38(%rbp), %rdx
notq %rdx
movq -0x40(%rbp), %rcx
orq %rcx, %rax
andq %rdx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
find_set_from_flags:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rbp+var_50], rcx
mov rax, rdx
mov [rbp+var_44], esi
mov rcx, [rbp+arg_0]
mov qword ptr [rcx], 0
test r9d, r9d
jz loc_ACD55
mov r14, r8
mov rbx, rdi
mov [rbp+var_58], rax
mov r15d, r9d
add r15, r8
lea rdi, [rbp+var_30]
mov [rdi], r8
mov rsi, rbx
mov edx, 9
mov rcx, r15
call find_type_eol
test eax, eax
jz loc_ACD60
mov [rbp+var_60], rbx
mov [rbp+var_40], 0
mov [rbp+var_38], 0
xor r13d, r13d
mov r12, r14
loc_ACC87:
cmp eax, [rbp+var_44]
jnz short loc_ACC9C
mov bl, 1
test r13b, r13b
jz loc_ACD1A
jmp loc_ACD7C
loc_ACC9C:
dec al
mov ebx, 1
mov ecx, eax
shl rbx, cl
mov r14, [rbp+var_40]
mov rcx, r14
or rcx, [rbp+var_38]
movzx eax, al
bt rcx, rax
jb loc_ACD74
mov rax, [rbp+var_30]
cmp rax, r15
jnb loc_ACD74
lea rcx, [rax+1]
mov [rbp+var_30], rcx
cmp byte ptr [rax], 3Dh ; '='
jnz loc_ACD74
lea rdi, [rbp+var_30]
lea rsi, on_off_default_typelib
mov edx, 9
mov rcx, r15
call find_type_eol
cmp eax, 1
jz short loc_ACD13
cmp eax, 2
jz short loc_ACD0A
test eax, eax
jz short loc_ACD74
test [rbp+var_50], rbx
jz short loc_ACD13
loc_ACD0A:
or r14, rbx
mov [rbp+var_40], r14
jmp short loc_ACD17
loc_ACD13:
or [rbp+var_38], rbx
loc_ACD17:
mov ebx, r13d
loc_ACD1A:
mov r14, [rbp+var_30]
cmp r14, r15
jnb short loc_ACD90
cmp byte ptr [r14], 2Ch ; ','
jnz short loc_ACD7C
inc r14
mov [rbp+var_30], r14
lea rdi, [rbp+var_30]
mov rsi, [rbp+var_60]
mov edx, 9
mov rcx, r15
call find_type_eol
mov r13d, ebx
mov r12, r14
test eax, eax
jnz loc_ACC87
jmp short loc_ACD7F
loc_ACD55:
mov rdx, 0FFFFFFFFFFFFFFFFh
xor ecx, ecx
jmp short loc_ACDA6
loc_ACD60:
xor ebx, ebx
mov [rbp+var_38], 0
mov [rbp+var_40], 0
jmp short loc_ACD7F
loc_ACD74:
mov r14, r12
mov ebx, r13d
jmp short loc_ACD7F
loc_ACD7C:
mov r14, r12
loc_ACD7F:
mov rax, [rbp+arg_8]
mov rcx, [rbp+arg_0]
mov [rcx], r14
sub r15d, r14d
mov [rax], r15d
loc_ACD90:
test bl, bl
mov rax, [rbp+var_58]
cmovnz rax, [rbp+var_50]
mov rdx, [rbp+var_38]
not rdx
mov rcx, [rbp+var_40]
loc_ACDA6:
or rax, rcx
and rax, rdx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long find_set_from_flags(
long long a1,
int a2,
long long a3,
long long a4,
long long a5,
unsigned int a6,
_QWORD *a7,
_DWORD *a8)
{
long long v8; // rax
long long v9; // r14
int v10; // ebx
unsigned __int8 *v11; // r15
int type_eol; // eax
int v13; // r13d
long long v14; // r12
unsigned __int8 v15; // al
long long v16; // rbx
long long v17; // rcx
_BYTE *v18; // rax
int v19; // eax
long long v20; // rdx
long long v21; // rcx
long long v25; // [rsp+20h] [rbp-40h]
long long v26; // [rsp+28h] [rbp-38h]
_QWORD v27[6]; // [rsp+30h] [rbp-30h] BYREF
v8 = a3;
*a7 = 0LL;
if ( a6 )
{
v9 = a5;
v10 = a1;
v11 = (unsigned __int8 *)(a5 + a6);
v27[0] = a5;
type_eol = find_type_eol(v27, a1, 9, v11);
if ( type_eol )
{
v25 = 0LL;
v26 = 0LL;
v13 = 0;
v14 = v9;
while ( 1 )
{
if ( type_eol == a2 )
{
LOBYTE(v10) = 1;
if ( (_BYTE)v13 )
break;
}
else
{
v15 = type_eol - 1;
v16 = 1LL << v15;
v17 = v26 | v25;
if ( _bittest64(&v17, v15)
|| (v18 = (_BYTE *)v27[0], v27[0] >= (unsigned long long)v11)
|| (++v27[0], *v18 != 61) )
{
LABEL_23:
v9 = v14;
LOBYTE(v10) = v13;
goto LABEL_25;
}
v19 = find_type_eol(v27, (long long)&on_off_default_typelib, 9, v11);
switch ( v19 )
{
case 1:
goto LABEL_15;
case 2:
goto LABEL_14;
case 0:
goto LABEL_23;
}
if ( (v16 & a4) != 0 )
LABEL_14:
v25 |= v16;
else
LABEL_15:
v26 |= v16;
v10 = v13;
}
if ( v27[0] >= (unsigned long long)v11 )
goto LABEL_26;
if ( *(_BYTE *)v27[0] != 44 )
break;
v9 = ++v27[0];
type_eol = find_type_eol(v27, a1, 9, v11);
v13 = v10;
v14 = v9;
if ( !type_eol )
goto LABEL_25;
}
v9 = v14;
}
else
{
LOBYTE(v10) = 0;
v26 = 0LL;
v25 = 0LL;
}
LABEL_25:
*a7 = v9;
*a8 = (_DWORD)v11 - v9;
LABEL_26:
v8 = a3;
if ( (_BYTE)v10 )
v8 = a4;
v20 = ~v26;
v21 = v25;
}
else
{
v20 = -1LL;
v21 = 0LL;
}
return v20 & (v21 | v8);
}
|
find_set_from_flags:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x50],RCX
MOV RAX,RDX
MOV dword ptr [RBP + -0x44],ESI
MOV RCX,qword ptr [RBP + 0x10]
MOV qword ptr [RCX],0x0
TEST R9D,R9D
JZ 0x001acd55
MOV R14,R8
MOV RBX,RDI
MOV qword ptr [RBP + -0x58],RAX
MOV R15D,R9D
ADD R15,R8
LEA RDI,[RBP + -0x30]
MOV qword ptr [RDI],R8
MOV RSI,RBX
MOV EDX,0x9
MOV RCX,R15
CALL 0x001ac8bd
TEST EAX,EAX
JZ 0x001acd60
MOV qword ptr [RBP + -0x60],RBX
MOV qword ptr [RBP + -0x40],0x0
MOV qword ptr [RBP + -0x38],0x0
XOR R13D,R13D
MOV R12,R14
LAB_001acc87:
CMP EAX,dword ptr [RBP + -0x44]
JNZ 0x001acc9c
MOV BL,0x1
TEST R13B,R13B
JZ 0x001acd1a
JMP 0x001acd7c
LAB_001acc9c:
DEC AL
MOV EBX,0x1
MOV ECX,EAX
SHL RBX,CL
MOV R14,qword ptr [RBP + -0x40]
MOV RCX,R14
OR RCX,qword ptr [RBP + -0x38]
MOVZX EAX,AL
BT RCX,RAX
JC 0x001acd74
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,R15
JNC 0x001acd74
LEA RCX,[RAX + 0x1]
MOV qword ptr [RBP + -0x30],RCX
CMP byte ptr [RAX],0x3d
JNZ 0x001acd74
LEA RDI,[RBP + -0x30]
LEA RSI,[0x490a60]
MOV EDX,0x9
MOV RCX,R15
CALL 0x001ac8bd
CMP EAX,0x1
JZ 0x001acd13
CMP EAX,0x2
JZ 0x001acd0a
TEST EAX,EAX
JZ 0x001acd74
TEST qword ptr [RBP + -0x50],RBX
JZ 0x001acd13
LAB_001acd0a:
OR R14,RBX
MOV qword ptr [RBP + -0x40],R14
JMP 0x001acd17
LAB_001acd13:
OR qword ptr [RBP + -0x38],RBX
LAB_001acd17:
MOV EBX,R13D
LAB_001acd1a:
MOV R14,qword ptr [RBP + -0x30]
CMP R14,R15
JNC 0x001acd90
CMP byte ptr [R14],0x2c
JNZ 0x001acd7c
INC R14
MOV qword ptr [RBP + -0x30],R14
LEA RDI,[RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x60]
MOV EDX,0x9
MOV RCX,R15
CALL 0x001ac8bd
MOV R13D,EBX
MOV R12,R14
TEST EAX,EAX
JNZ 0x001acc87
JMP 0x001acd7f
LAB_001acd55:
MOV RDX,-0x1
XOR ECX,ECX
JMP 0x001acda6
LAB_001acd60:
XOR EBX,EBX
MOV qword ptr [RBP + -0x38],0x0
MOV qword ptr [RBP + -0x40],0x0
JMP 0x001acd7f
LAB_001acd74:
MOV R14,R12
MOV EBX,R13D
JMP 0x001acd7f
LAB_001acd7c:
MOV R14,R12
LAB_001acd7f:
MOV RAX,qword ptr [RBP + 0x18]
MOV RCX,qword ptr [RBP + 0x10]
MOV qword ptr [RCX],R14
SUB R15D,R14D
MOV dword ptr [RAX],R15D
LAB_001acd90:
TEST BL,BL
MOV RAX,qword ptr [RBP + -0x58]
CMOVNZ RAX,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x38]
NOT RDX
MOV RCX,qword ptr [RBP + -0x40]
LAB_001acda6:
OR RAX,RCX
AND RAX,RDX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong find_set_from_flags(int8 param_1,int param_2,ulong param_3,ulong param_4,char *param_5,
uint param_6,int8 *param_7,int *param_8)
{
bool bVar1;
byte bVar2;
int iVar3;
bool bVar4;
bool bVar5;
ulong uVar6;
char *pcVar7;
ulong local_48;
ulong local_40;
char *local_38;
*param_7 = 0;
if (param_6 == 0) {
local_40 = 0xffffffffffffffff;
local_48 = 0;
}
else {
pcVar7 = param_5 + param_6;
local_38 = param_5;
iVar3 = find_type_eol(&local_38,param_1,9,pcVar7);
if (iVar3 == 0) {
local_40 = 0;
local_48 = 0;
bVar4 = false;
}
else {
local_48 = 0;
local_40 = 0;
bVar5 = false;
do {
if (iVar3 == param_2) {
bVar4 = true;
bVar1 = true;
if (bVar5) break;
}
else {
bVar2 = (char)iVar3 - 1;
uVar6 = 1L << (bVar2 & 0x3f);
bVar4 = bVar5;
if (((((local_48 | local_40) >> ((ulong)bVar2 & 0x3f) & 1) != 0) || (pcVar7 <= local_38))
|| (*local_38 != '=')) break;
local_38 = local_38 + 1;
iVar3 = find_type_eol(&local_38,on_off_default_typelib,9,pcVar7);
bVar1 = bVar5;
if (iVar3 == 1) {
LAB_001acd13:
local_40 = local_40 | uVar6;
}
else {
if (iVar3 != 2) {
if (iVar3 == 0) break;
if ((param_4 & uVar6) == 0) goto LAB_001acd13;
}
local_48 = local_48 | uVar6;
}
}
bVar5 = bVar1;
if (pcVar7 <= local_38) goto LAB_001acd90;
bVar4 = bVar5;
if (*local_38 != ',') break;
param_5 = local_38 + 1;
local_38 = param_5;
iVar3 = find_type_eol(&local_38,param_1,9,pcVar7);
} while (iVar3 != 0);
}
*param_7 = param_5;
*param_8 = (int)pcVar7 - (int)param_5;
bVar5 = bVar4;
LAB_001acd90:
if (bVar5) {
param_3 = param_4;
}
local_40 = ~local_40;
}
return (param_3 | local_48) & local_40;
}
|
|
16,430
|
google::protobuf::MessageOptions::MessageOptions(google::protobuf::MessageOptions const&)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
|
MessageOptions::MessageOptions(const MessageOptions& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
MessageOptions* const _this = this; (void)_this;
new (&_impl_) Impl_{
/*decltype(_impl_._extensions_)*/{}
, decltype(_impl_._has_bits_){from._impl_._has_bits_}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.uninterpreted_option_){from._impl_.uninterpreted_option_}
, decltype(_impl_.message_set_wire_format_){}
, decltype(_impl_.no_standard_descriptor_accessor_){}
, decltype(_impl_.deprecated_){}
, decltype(_impl_.map_entry_){}};
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
_impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_);
::memcpy(&_impl_.message_set_wire_format_, &from._impl_.message_set_wire_format_,
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.map_entry_) -
reinterpret_cast<char*>(&_impl_.message_set_wire_format_)) + sizeof(_impl_.map_entry_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.MessageOptions)
}
|
O0
|
cpp
|
google::protobuf::MessageOptions::MessageOptions(google::protobuf::MessageOptions const&):
subq $0xc8, %rsp
movq %rdi, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
movq 0x78(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0xd3f60
movq 0x40(%rsp), %rdi
leaq 0x1b7cb4(%rip), %rax # 0x2785e0
movq %rax, (%rdi)
movq %rdi, 0x68(%rsp)
addq $0x10, %rdi
movq %rdi, 0x48(%rsp)
movq %rdi, %rax
movq %rax, 0x50(%rsp)
callq 0xd6a90
jmp 0xc094c
movq 0x50(%rsp), %rax
movq 0x70(%rsp), %rcx
movl 0x28(%rcx), %ecx
movl %ecx, 0x18(%rax)
movq %rax, %rdi
addq $0x1c, %rdi
movl $0x0, 0x1c(%rax)
callq 0xd3ff0
movq 0x50(%rsp), %rdi
addq $0x20, %rdi
movq 0x70(%rsp), %rsi
addq $0x30, %rsi
callq 0xd6ac0
jmp 0xc0988
movq 0x40(%rsp), %rcx
movq 0x50(%rsp), %rax
movb $0x0, 0x38(%rax)
movb $0x0, 0x39(%rax)
movb $0x0, 0x3a(%rax)
movb $0x0, 0x3b(%rax)
addq $0x8, %rcx
movq 0x70(%rsp), %rax
addq $0x8, %rax
movq %rcx, 0x88(%rsp)
movq %rax, 0x80(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
setne %al
movb %al, 0x3f(%rsp)
movb 0x3f(%rsp), %al
testb $0x1, %al
jne 0xc0a13
jmp 0xc0abf
movq 0x80(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq $0x0, 0x98(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x28(%rsp)
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0xb8(%rsp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0xc0a81
movq 0x28(%rsp), %rdi
callq 0x9cd40
addq $0x8, %rax
movq %rax, 0xa8(%rsp)
jmp 0xc0a9f
movq 0x98(%rsp), %rax
callq *%rax
movq %rax, 0x20(%rsp)
jmp 0xc0a92
movq 0x20(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rsi
movq 0x30(%rsp), %rdi
callq 0xe0920
jmp 0xc0abd
jmp 0xc0abf
jmp 0xc0ac1
movq 0x40(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x8(%rsp)
callq 0x810d0
movq %rax, 0x10(%rsp)
jmp 0xc0adb
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdi
movq 0x70(%rsp), %rdx
addq $0x10, %rdx
callq 0x198570
jmp 0xc0af5
movq 0x40(%rsp), %rax
movq %rax, %rdi
addq $0x10, %rdi
addq $0x38, %rdi
movq 0x70(%rsp), %rsi
addq $0x10, %rsi
addq $0x38, %rsi
movq %rax, %rdx
addq $0x10, %rdx
addq $0x3b, %rdx
addq $0x10, %rax
addq $0x38, %rax
subq %rax, %rdx
addq $0x1, %rdx
callq 0x13390
addq $0xc8, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
jmp 0xc0b61
movq 0x48(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
callq 0x186290
movq 0x40(%rsp), %rdi
callq 0xd3f50
movq 0x60(%rsp), %rdi
callq 0x13750
nopw %cs:(%rax,%rax)
|
_ZN6google8protobuf14MessageOptionsC2ERKS1_:
sub rsp, 0C8h
mov [rsp+0C8h+var_50], rdi
mov [rsp+0C8h+var_58], rsi
mov rdi, [rsp+0C8h+var_50]; this
mov [rsp+0C8h+var_88], rdi
call _ZN6google8protobuf7MessageC2Ev; google::protobuf::Message::Message(void)
mov rdi, [rsp+0C8h+var_88]
lea rax, off_2785E0
mov [rdi], rax
mov [rsp+0C8h+var_60], rdi
add rdi, 10h; this
mov [rsp+0C8h+var_80], rdi
mov rax, rdi
mov [rsp+0C8h+var_78], rax
call _ZN6google8protobuf8internal12ExtensionSetC2Ev; google::protobuf::internal::ExtensionSet::ExtensionSet(void)
jmp short $+2
loc_C094C:
mov rax, [rsp+0C8h+var_78]
mov rcx, [rsp+0C8h+var_58]
mov ecx, [rcx+28h]
mov [rax+18h], ecx
mov rdi, rax
add rdi, 1Ch; this
mov dword ptr [rax+1Ch], 0
call _ZN6google8protobuf8internal10CachedSizeC2Ev; google::protobuf::internal::CachedSize::CachedSize(void)
mov rdi, [rsp+0C8h+var_78]
add rdi, 20h ; ' '; this
mov rsi, [rsp+0C8h+var_58]
add rsi, 30h ; '0'
call _ZN6google8protobuf16RepeatedPtrFieldINS0_19UninterpretedOptionEEC2ERKS3_; google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::RepeatedPtrField(google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption> const&)
jmp short $+2
loc_C0988:
mov rcx, [rsp+0C8h+var_88]
mov rax, [rsp+0C8h+var_78]
mov byte ptr [rax+38h], 0
mov byte ptr [rax+39h], 0
mov byte ptr [rax+3Ah], 0
mov byte ptr [rax+3Bh], 0
add rcx, 8
mov rax, [rsp+0C8h+var_58]
add rax, 8
mov [rsp+0C8h+var_40], rcx
mov [rsp+0C8h+var_48], rax
mov rax, [rsp+0C8h+var_40]
mov [rsp+0C8h+var_98], rax
mov rax, [rsp+0C8h+var_48]
mov [rsp+0C8h+var_38], rax
mov rax, [rsp+0C8h+var_38]
mov [rsp+0C8h+var_8], rax
mov rax, [rsp+0C8h+var_8]
mov rax, [rax]
and rax, 1
cmp rax, 0
setnz al
mov [rsp+0C8h+var_89], al
mov al, [rsp+0C8h+var_89]
test al, 1
jnz short loc_C0A13
jmp loc_C0ABF
loc_C0A13:
mov rax, [rsp+0C8h+var_48]
mov [rsp+0C8h+var_28], rax
mov [rsp+0C8h+var_30], 0
mov rax, [rsp+0C8h+var_28]
mov [rsp+0C8h+var_A0], rax
mov [rsp+0C8h+var_18], rax
mov rax, [rsp+0C8h+var_18]
mov [rsp+0C8h+var_10], rax
mov rax, [rsp+0C8h+var_10]
mov rax, [rax]
and rax, 1
cmp rax, 0
jz short loc_C0A81
mov rdi, [rsp+0C8h+var_A0]
call _ZNK6google8protobuf8internal16InternalMetadata8PtrValueINS2_9ContainerINS0_15UnknownFieldSetEEEEEPT_v; google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(void)
add rax, 8
mov [rsp+0C8h+var_20], rax
jmp short loc_C0A9F
loc_C0A81:
mov rax, [rsp+0C8h+var_30]
call rax
mov [rsp+0C8h+var_A8], rax
jmp short $+2
loc_C0A92:
mov rax, [rsp+0C8h+var_A8]
mov [rsp+0C8h+var_20], rax
loc_C0A9F:
mov rax, [rsp+0C8h+var_20]
mov qword ptr [rsp+0C8h+var_B0], rax
mov rsi, qword ptr [rsp+0C8h+var_B0]; int
mov rdi, [rsp+0C8h+var_98]; void *
call _ZN6google8protobuf8internal16InternalMetadata11DoMergeFromINS0_15UnknownFieldSetEEEvRKT_; google::protobuf::internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>(google::protobuf::UnknownFieldSet const&)
jmp short $+2
loc_C0ABD:
jmp short $+2
loc_C0ABF:
jmp short $+2
loc_C0AC1:
mov rax, [rsp+0C8h+var_88]
add rax, 10h
mov [rsp+0C8h+var_C0], rax
call _ZN6google8protobuf14MessageOptions25internal_default_instanceEv; google::protobuf::MessageOptions::internal_default_instance(void)
mov [rsp+0C8h+var_B8], rax
jmp short $+2
loc_C0ADB:
mov rsi, [rsp+0C8h+var_B8]; google::protobuf::MessageLite *
mov rdi, [rsp+0C8h+var_C0]; this
mov rdx, [rsp+0C8h+var_58]
add rdx, 10h; google::protobuf::internal::ExtensionSet *
call _ZN6google8protobuf8internal12ExtensionSet9MergeFromEPKNS0_11MessageLiteERKS2_; google::protobuf::internal::ExtensionSet::MergeFrom(google::protobuf::MessageLite const*,google::protobuf::internal::ExtensionSet const&)
jmp short $+2
loc_C0AF5:
mov rax, [rsp+0C8h+var_88]
mov rdi, rax
add rdi, 10h
add rdi, 38h ; '8'
mov rsi, [rsp+0C8h+var_58]
add rsi, 10h
add rsi, 38h ; '8'
mov rdx, rax
add rdx, 10h
add rdx, 3Bh ; ';'
add rax, 10h
add rax, 38h ; '8'
sub rdx, rax
add rdx, 1
call _memcpy
add rsp, 0C8h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
jmp short loc_C0B61
mov rdi, [rsp+arg_40]; this
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
call _ZN6google8protobuf8internal12ExtensionSetD2Ev; google::protobuf::internal::ExtensionSet::~ExtensionSet()
loc_C0B61:
mov rdi, [rsp+arg_38]; this
call _ZN6google8protobuf7MessageD2Ev; google::protobuf::Message::~Message()
mov rdi, [rsp+arg_58]
call __Unwind_Resume
|
long long google::protobuf::MessageOptions::MessageOptions(
google::protobuf::MessageOptions *this,
const google::protobuf::MessageOptions *a2)
{
google::protobuf::MessageOptions *v2; // rdi
int v3; // edx
int v4; // ecx
int v5; // r8d
int v6; // r9d
google::protobuf::MessageLite *v8; // [rsp+10h] [rbp-B8h]
char *v10; // [rsp+50h] [rbp-78h]
unsigned long long v12; // [rsp+A8h] [rbp-20h]
google::protobuf::Message::Message(this);
*(_QWORD *)this = off_2785E0;
v10 = (char *)this + 16;
google::protobuf::internal::ExtensionSet::ExtensionSet((google::protobuf::MessageOptions *)((char *)this + 16));
*((_DWORD *)this + 10) = *((_DWORD *)a2 + 10);
*((_DWORD *)this + 11) = 0;
google::protobuf::internal::CachedSize::CachedSize((google::protobuf::MessageOptions *)((char *)this + 44));
v2 = (google::protobuf::MessageOptions *)((char *)this + 48);
google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::RepeatedPtrField(
(_DWORD)v10 + 32,
(_DWORD)a2 + 48,
v3,
v4,
v5,
v6);
v10[56] = 0;
v10[57] = 0;
v10[58] = 0;
v10[59] = 0;
if ( (*((_QWORD *)a2 + 1) & 1LL) != 0 )
{
v12 = google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>((_QWORD *)a2 + 1)
+ 8;
v2 = (google::protobuf::MessageOptions *)((char *)this + 8);
google::protobuf::internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>((char *)this + 8, v12);
}
v8 = (google::protobuf::MessageLite *)google::protobuf::MessageOptions::internal_default_instance(v2);
google::protobuf::internal::ExtensionSet::MergeFrom(
(google::protobuf::MessageOptions *)((char *)this + 16),
v8,
(const google::protobuf::MessageOptions *)((char *)a2 + 16));
return memcpy((char *)this + 72, (char *)a2 + 72, 4LL);
}
|
MessageOptions:
SUB RSP,0xc8
MOV qword ptr [RSP + 0x78],RDI
MOV qword ptr [RSP + 0x70],RSI
MOV RDI,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0x40],RDI
CALL 0x001d3f60
MOV RDI,qword ptr [RSP + 0x40]
LEA RAX,[0x3785e0]
MOV qword ptr [RDI],RAX
MOV qword ptr [RSP + 0x68],RDI
ADD RDI,0x10
MOV qword ptr [RSP + 0x48],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x50],RAX
LAB_001c0945:
CALL 0x001d6a90
JMP 0x001c094c
LAB_001c094c:
MOV RAX,qword ptr [RSP + 0x50]
MOV RCX,qword ptr [RSP + 0x70]
MOV ECX,dword ptr [RCX + 0x28]
MOV dword ptr [RAX + 0x18],ECX
MOV RDI,RAX
ADD RDI,0x1c
MOV dword ptr [RAX + 0x1c],0x0
CALL 0x001d3ff0
MOV RDI,qword ptr [RSP + 0x50]
ADD RDI,0x20
MOV RSI,qword ptr [RSP + 0x70]
ADD RSI,0x30
LAB_001c0981:
CALL 0x001d6ac0
JMP 0x001c0988
LAB_001c0988:
MOV RCX,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RSP + 0x50]
MOV byte ptr [RAX + 0x38],0x0
MOV byte ptr [RAX + 0x39],0x0
MOV byte ptr [RAX + 0x3a],0x0
MOV byte ptr [RAX + 0x3b],0x0
ADD RCX,0x8
MOV RAX,qword ptr [RSP + 0x70]
ADD RAX,0x8
MOV qword ptr [RSP + 0x88],RCX
MOV qword ptr [RSP + 0x80],RAX
MOV RAX,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0x90],RAX
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0xc0],RAX
MOV RAX,qword ptr [RSP + 0xc0]
MOV RAX,qword ptr [RAX]
AND RAX,0x1
CMP RAX,0x0
SETNZ AL
MOV byte ptr [RSP + 0x3f],AL
MOV AL,byte ptr [RSP + 0x3f]
TEST AL,0x1
JNZ 0x001c0a13
JMP 0x001c0abf
LAB_001c0a13:
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0xa0],RAX
MOV qword ptr [RSP + 0x98],0x0
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0xb0],RAX
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0xb8],RAX
MOV RAX,qword ptr [RSP + 0xb8]
MOV RAX,qword ptr [RAX]
AND RAX,0x1
CMP RAX,0x0
JZ 0x001c0a81
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x0019cd40
ADD RAX,0x8
MOV qword ptr [RSP + 0xa8],RAX
JMP 0x001c0a9f
LAB_001c0a81:
MOV RAX,qword ptr [RSP + 0x98]
LAB_001c0a89:
CALL RAX
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001c0a92
LAB_001c0a92:
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0xa8],RAX
LAB_001c0a9f:
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0x18],RAX
MOV RSI,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x001e0920
JMP 0x001c0abd
LAB_001c0abd:
JMP 0x001c0abf
LAB_001c0abf:
JMP 0x001c0ac1
LAB_001c0ac1:
MOV RAX,qword ptr [RSP + 0x40]
ADD RAX,0x10
MOV qword ptr [RSP + 0x8],RAX
CALL 0x001810d0
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001c0adb
LAB_001c0adb:
MOV RSI,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x70]
ADD RDX,0x10
CALL 0x00298570
LAB_001c0af3:
JMP 0x001c0af5
LAB_001c0af5:
MOV RAX,qword ptr [RSP + 0x40]
MOV RDI,RAX
ADD RDI,0x10
ADD RDI,0x38
MOV RSI,qword ptr [RSP + 0x70]
ADD RSI,0x10
ADD RSI,0x38
MOV RDX,RAX
ADD RDX,0x10
ADD RDX,0x3b
ADD RAX,0x10
ADD RAX,0x38
SUB RDX,RAX
ADD RDX,0x1
CALL 0x00113390
ADD RSP,0xc8
RET
|
/* google::protobuf::MessageOptions::MessageOptions(google::protobuf::MessageOptions const&) */
void __thiscall
google::protobuf::MessageOptions::MessageOptions(MessageOptions *this,MessageOptions *param_1)
{
InternalMetadata *this_00;
MessageLite *pMVar1;
UnknownFieldSet *local_20;
Message::Message((Message *)this);
*(int ***)this = &PTR__MessageOptions_003785e0;
/* try { // try from 001c0945 to 001c0949 has its CatchHandler @ 001c0b39 */
internal::ExtensionSet::ExtensionSet((ExtensionSet *)(this + 0x10));
*(int4 *)(this + 0x28) = *(int4 *)(param_1 + 0x28);
*(int4 *)(this + 0x2c) = 0;
internal::CachedSize::CachedSize((CachedSize *)(this + 0x2c));
/* try { // try from 001c0981 to 001c0985 has its CatchHandler @ 001c0b49 */
RepeatedPtrField<google::protobuf::UninterpretedOption>::RepeatedPtrField
((RepeatedPtrField<google::protobuf::UninterpretedOption> *)(this + 0x30),
(RepeatedPtrField *)(param_1 + 0x30));
this[0x48] = (MessageOptions)0x0;
this[0x49] = (MessageOptions)0x0;
this[0x4a] = (MessageOptions)0x0;
this[0x4b] = (MessageOptions)0x0;
this_00 = (InternalMetadata *)(param_1 + 8);
if ((*(ulong *)this_00 & 1) != 0) {
if ((*(ulong *)this_00 & 1) == 0) {
/* try { // try from 001c0a89 to 001c0af2 has its CatchHandler @ 001c0b39 */
local_20 = (UnknownFieldSet *)(*(code *)0x0)();
}
else {
local_20 = (UnknownFieldSet *)
internal::InternalMetadata::
PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>
(this_00);
local_20 = (UnknownFieldSet *)((Container *)local_20 + 8);
}
internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>
((InternalMetadata *)(this + 8),local_20);
}
pMVar1 = (MessageLite *)internal_default_instance();
internal::ExtensionSet::MergeFrom
((ExtensionSet *)(this + 0x10),pMVar1,(ExtensionSet *)(param_1 + 0x10));
memcpy(this + 0x48,param_1 + 0x48,4);
return;
}
|
|
16,431
|
google::protobuf::MessageOptions::MessageOptions(google::protobuf::MessageOptions const&)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
|
MessageOptions::MessageOptions(const MessageOptions& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
MessageOptions* const _this = this; (void)_this;
new (&_impl_) Impl_{
/*decltype(_impl_._extensions_)*/{}
, decltype(_impl_._has_bits_){from._impl_._has_bits_}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.uninterpreted_option_){from._impl_.uninterpreted_option_}
, decltype(_impl_.message_set_wire_format_){}
, decltype(_impl_.no_standard_descriptor_accessor_){}
, decltype(_impl_.deprecated_){}
, decltype(_impl_.map_entry_){}};
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
_impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_);
::memcpy(&_impl_.message_set_wire_format_, &from._impl_.message_set_wire_format_,
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.map_entry_) -
reinterpret_cast<char*>(&_impl_.message_set_wire_format_)) + sizeof(_impl_.map_entry_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.MessageOptions)
}
|
O3
|
cpp
|
google::protobuf::MessageOptions::MessageOptions(google::protobuf::MessageOptions const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
leaq 0xace02(%rip), %rax # 0xfed80
movq %rax, (%rdi)
leaq 0x10(%rdi), %r12
movl $0x0, 0x18(%rdi)
movq $0x0, 0x20(%rdi)
movl 0x28(%rsi), %eax
movl %eax, 0x28(%rdi)
movups %xmm0, 0x2c(%rdi)
movups %xmm0, 0x38(%rdi)
cmpl $0x0, 0x38(%rsi)
je 0x51fbe
leaq 0x30(%rbx), %rdi
leaq 0x30(%r15), %rsi
leaq 0x7ce1(%rip), %rdx # 0x59c98
xorl %ecx, %ecx
callq 0x4769a
movl $0x0, 0x48(%rbx)
movq 0x8(%r15), %rsi
testb $0x1, %sil
je 0x51fdf
andq $-0x4, %rsi
addq $0x8, %rsi
movq %r14, %rdi
callq 0x59718
leaq 0x10(%r15), %rdx
leaq 0xb082e(%rip), %rsi # 0x102818
movq %r12, %rdi
callq 0xffd8
movl 0x48(%r15), %eax
movl %eax, 0x48(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r15
movq %r12, %rdi
callq 0x93d76
jmp 0x52015
movq %rax, %r15
leaq 0xaf304(%rip), %rax # 0x101320
addq $0x10, %rax
movq %rax, (%rbx)
movq %r14, %rdi
callq 0x59494
movq %r15, %rdi
callq 0xf570
nop
|
_ZN6google8protobuf14MessageOptionsC2ERKS1_:
push r15; Alternative name is 'google::protobuf::MessageOptions::MessageOptions(google::protobuf::MessageOptions const&)'
push r14
push r12
push rbx
push rax
mov r15, rsi
mov rbx, rdi
lea r14, [rdi+8]
xorps xmm0, xmm0
movups xmmword ptr [rdi+8], xmm0
lea rax, off_FED80
mov [rdi], rax
lea r12, [rdi+10h]
mov dword ptr [rdi+18h], 0
mov qword ptr [rdi+20h], 0
mov eax, [rsi+28h]
mov [rdi+28h], eax
movups xmmword ptr [rdi+2Ch], xmm0
movups xmmword ptr [rdi+38h], xmm0
cmp dword ptr [rsi+38h], 0
jz short loc_51FBE
lea rdi, [rbx+30h]
lea rsi, [r15+30h]
lea rdx, _ZN6google8protobuf8internal20RepeatedPtrFieldBase18MergeFromInnerLoopINS0_16RepeatedPtrFieldINS0_19UninterpretedOptionEE11TypeHandlerEEEvPPvS9_ii; google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInnerLoop<google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::TypeHandler>(void **,void **,int,int)
xor ecx, ecx
call _ZN6google8protobuf8internal20RepeatedPtrFieldBase17MergeFromInternalERKS2_MS2_FvPPvS6_iiE; google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInternal(google::protobuf::internal::RepeatedPtrFieldBase const&,void (google::protobuf::internal::RepeatedPtrFieldBase::*)(void **,void **,int,int))
loc_51FBE:
mov dword ptr [rbx+48h], 0
mov rsi, [r15+8]
test sil, 1
jz short loc_51FDF
and rsi, 0FFFFFFFFFFFFFFFCh
add rsi, 8
mov rdi, r14
call _ZN6google8protobuf8internal16InternalMetadata11DoMergeFromINS0_15UnknownFieldSetEEEvRKT_; google::protobuf::internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>(google::protobuf::UnknownFieldSet const&)
loc_51FDF:
lea rdx, [r15+10h]; google::protobuf::internal::ExtensionSet *
lea rsi, _ZN6google8protobuf33_MessageOptions_default_instance_E; google::protobuf::MessageLite *
mov rdi, r12; this
call _ZN6google8protobuf8internal12ExtensionSet9MergeFromEPKNS0_11MessageLiteERKS2_; google::protobuf::internal::ExtensionSet::MergeFrom(google::protobuf::MessageLite const*,google::protobuf::internal::ExtensionSet const&)
mov eax, [r15+48h]
mov [rbx+48h], eax
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
mov r15, rax
mov rdi, r12; this
call _ZN6google8protobuf8internal12ExtensionSetD2Ev; google::protobuf::internal::ExtensionSet::~ExtensionSet()
jmp short loc_52015
mov r15, rax
loc_52015:
lea rax, _ZTVN6google8protobuf11MessageLiteE; `vtable for'google::protobuf::MessageLite
add rax, 10h
mov [rbx], rax
mov rdi, r14; this
call _ZN6google8protobuf8internal16InternalMetadataD2Ev; google::protobuf::internal::InternalMetadata::~InternalMetadata()
mov rdi, r15
call __Unwind_Resume
|
long long google::protobuf::MessageOptions::MessageOptions(
google::protobuf::MessageOptions *this,
const google::protobuf::MessageOptions *a2,
long long a3,
int a4,
int a5,
int a6)
{
long long v7; // rsi
long long result; // rax
*(_OWORD *)((char *)this + 8) = 0LL;
*(_QWORD *)this = off_FED80;
*((_DWORD *)this + 6) = 0;
*((_QWORD *)this + 4) = 0LL;
*((_DWORD *)this + 10) = *((_DWORD *)a2 + 10);
*(_OWORD *)((char *)this + 44) = 0LL;
*(_OWORD *)((char *)this + 56) = 0LL;
if ( *((_DWORD *)a2 + 14) )
google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInternal(
(long long)this + 48,
(long long)a2 + 48,
(char *)google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInnerLoop<google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::TypeHandler>,
0LL);
*((_DWORD *)this + 18) = 0;
v7 = *((_QWORD *)a2 + 1);
if ( (v7 & 1) != 0 )
google::protobuf::internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>(
(char *)this + 8,
(v7 & 0xFFFFFFFFFFFFFFFCLL) + 8);
google::protobuf::internal::ExtensionSet::MergeFrom(
(google::protobuf::MessageOptions *)((char *)this + 16),
(const google::protobuf::MessageLite *)&google::protobuf::_MessageOptions_default_instance_,
(const google::protobuf::MessageOptions *)((char *)a2 + 16),
a4,
a5,
a6);
result = *((unsigned int *)a2 + 18);
*((_DWORD *)this + 18) = result;
return result;
}
|
MessageOptions:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RSI
MOV RBX,RDI
LEA R14,[RDI + 0x8]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x8],XMM0
LEA RAX,[0x1fed80]
MOV qword ptr [RDI],RAX
LEA R12,[RDI + 0x10]
MOV dword ptr [RDI + 0x18],0x0
MOV qword ptr [RDI + 0x20],0x0
MOV EAX,dword ptr [RSI + 0x28]
MOV dword ptr [RDI + 0x28],EAX
MOVUPS xmmword ptr [RDI + 0x2c],XMM0
MOVUPS xmmword ptr [RDI + 0x38],XMM0
CMP dword ptr [RSI + 0x38],0x0
JZ 0x00151fbe
LEA RDI,[RBX + 0x30]
LEA RSI,[R15 + 0x30]
LAB_00151fb0:
LEA RDX,[0x159c98]
XOR ECX,ECX
CALL 0x0014769a
LAB_00151fbe:
MOV dword ptr [RBX + 0x48],0x0
MOV RSI,qword ptr [R15 + 0x8]
TEST SIL,0x1
JZ 0x00151fdf
AND RSI,-0x4
ADD RSI,0x8
LAB_00151fd7:
MOV RDI,R14
CALL 0x00159718
LAB_00151fdf:
LEA RDX,[R15 + 0x10]
LEA RSI,[0x202818]
MOV RDI,R12
CALL 0x0010ffd8
LAB_00151ff2:
MOV EAX,dword ptr [R15 + 0x48]
MOV dword ptr [RBX + 0x48],EAX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* google::protobuf::MessageOptions::MessageOptions(google::protobuf::MessageOptions const&) */
void __thiscall
google::protobuf::MessageOptions::MessageOptions(MessageOptions *this,MessageOptions *param_1)
{
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int ***)this = &PTR__MessageOptions_001fed80;
*(int4 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int4 *)(this + 0x28) = *(int4 *)(param_1 + 0x28);
*(int8 *)(this + 0x2c) = 0;
*(int8 *)(this + 0x34) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
if (*(int *)(param_1 + 0x38) != 0) {
/* try { // try from 00151fb0 to 00151fbd has its CatchHandler @ 00152005 */
internal::RepeatedPtrFieldBase::MergeFromInternal
((RepeatedPtrFieldBase *)(this + 0x30),
(_func_void_void_ptr_ptr_void_ptr_ptr_int_int *)(param_1 + 0x30));
}
*(int4 *)(this + 0x48) = 0;
if ((*(ulong *)(param_1 + 8) & 1) != 0) {
/* try { // try from 00151fd7 to 00151ff1 has its CatchHandler @ 00152012 */
internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>
((InternalMetadata *)(this + 8),
(UnknownFieldSet *)((*(ulong *)(param_1 + 8) & 0xfffffffffffffffc) + 8));
}
internal::ExtensionSet::MergeFrom
((ExtensionSet *)(this + 0x10),(MessageLite *)_MessageOptions_default_instance_,
(ExtensionSet *)(param_1 + 0x10));
*(int4 *)(this + 0x48) = *(int4 *)(param_1 + 0x48);
return;
}
|
|
16,432
|
psi_rwlock_trywrlock
|
eloqsql/mysys/my_thr_init.c
|
ATTRIBUTE_COLD
int psi_rwlock_trywrlock(mysql_rwlock_t *that, const char *file, uint line)
{
PSI_rwlock_locker_state state;
PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_wrwait)
(&state, that->m_psi, PSI_RWLOCK_TRYWRITELOCK, file, line);
int result= rw_trywrlock(&that->m_rwlock);
if (locker)
PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result);
return result;
}
|
O3
|
c
|
psi_rwlock_trywrlock:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edx, %r8d
movq %rsi, %rcx
movq %rdi, %r14
leaq 0x2f1790(%rip), %r15 # 0x31ced8
movq (%r15), %rax
movq 0x90(%rdi), %rsi
leaq -0x48(%rbp), %rdi
pushq $0x3
popq %rdx
callq *0x1b0(%rax)
movq %rax, %rbx
movq %r14, %rdi
callq 0x49d73
movl %eax, %r14d
testq %rbx, %rbx
je 0x2b781
movq (%r15), %rax
movq %rbx, %rdi
movl %r14d, %esi
callq *0x1b8(%rax)
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
psi_rwlock_trywrlock:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 38h
mov r8d, edx
mov rcx, rsi
mov r14, rdi
lea r15, PSI_server
mov rax, [r15]
mov rsi, [rdi+90h]
lea rdi, [rbp+var_48]
push 3
pop rdx
call qword ptr [rax+1B0h]
mov rbx, rax
mov rdi, r14
call my_rw_trywrlock
mov r14d, eax
test rbx, rbx
jz short loc_2B781
mov rax, [r15]
mov rdi, rbx
mov esi, r14d
call qword ptr [rax+1B8h]
loc_2B781:
mov eax, r14d
add rsp, 38h
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long psi_rwlock_trywrlock(long long a1, long long a2, unsigned int a3)
{
long long v3; // rbx
unsigned int v4; // r14d
_BYTE v6[72]; // [rsp+8h] [rbp-48h] BYREF
v3 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[54])(
v6,
*(_QWORD *)(a1 + 144),
3LL,
a2,
a3);
v4 = my_rw_trywrlock(a1);
if ( v3 )
((void ( *)(long long, _QWORD))PSI_server[55])(v3, v4);
return v4;
}
|
psi_rwlock_trywrlock:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV R8D,EDX
MOV RCX,RSI
MOV R14,RDI
LEA R15,[0x41ced8]
MOV RAX,qword ptr [R15]
MOV RSI,qword ptr [RDI + 0x90]
LEA RDI,[RBP + -0x48]
PUSH 0x3
POP RDX
CALL qword ptr [RAX + 0x1b0]
MOV RBX,RAX
MOV RDI,R14
CALL 0x00149d73
MOV R14D,EAX
TEST RBX,RBX
JZ 0x0012b781
MOV RAX,qword ptr [R15]
MOV RDI,RBX
MOV ESI,R14D
CALL qword ptr [RAX + 0x1b8]
LAB_0012b781:
MOV EAX,R14D
ADD RSP,0x38
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 psi_rwlock_trywrlock(long param_1,int8 param_2,int4 param_3)
{
int4 uVar1;
long lVar2;
int1 local_50 [48];
lVar2 = (**(code **)(PSI_server + 0x1b0))
(local_50,*(int8 *)(param_1 + 0x90),3,param_2,param_3);
uVar1 = my_rw_trywrlock(param_1);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1b8))(lVar2,uVar1);
}
return uVar1;
}
|
|
16,433
|
ftxui::Color::Print[abi:cxx11](bool) const
|
Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/screen/color.cpp
|
std::string Color::Print(bool is_background_color) const {
switch (type_) {
case ColorType::Palette1:
return is_background_color ? "49"s : "39"s;
case ColorType::Palette16:
return palette16code[2 * red_ + is_background_color]; // NOLINT;
case ColorType::Palette256:
return (is_background_color ? "48;5;"s : "38;5;"s) + std::to_string(red_);
case ColorType::TrueColor:
default:
return (is_background_color ? "48;2;"s : "38;2;"s) //
+ std::to_string(red_) + ";" //
+ std::to_string(green_) + ";" //
+ std::to_string(blue_); //
}
}
|
O0
|
cpp
|
ftxui::Color::Print[abi:cxx11](bool) const:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp # imm = 0x1A0
movq %rdi, -0x188(%rbp)
movb %dl, %al
movq %rdi, %rcx
movq %rcx, -0x180(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x178(%rbp)
movzbl (%rax), %eax
movq %rax, -0x170(%rbp)
subq $0x3, %rax
ja 0x3873b
movq -0x170(%rbp), %rax
leaq 0x589b4(%rip), %rcx # 0x90f7c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
testb $0x1, -0x11(%rbp)
je 0x385f1
movq -0x188(%rbp), %rdi
leaq 0x589df(%rip), %rsi # 0x90fc4
movl $0x2, %edx
callq 0x390b0
jmp 0x38609
movq -0x188(%rbp), %rdi
leaq 0x59384(%rip), %rsi # 0x91983
movl $0x2, %edx
callq 0x390b0
jmp 0x38988
movq -0x178(%rbp), %rax
movzbl 0x1(%rax), %eax
movzbl -0x11(%rbp), %edx
andl $0x1, %edx
movl %eax, %ecx
movl %edx, %eax
leal (%rax,%rcx,2), %eax
movl %eax, %esi
leaq 0xa3878(%rip), %rdi # 0xdbea8
callq 0x39140
movq (%rax), %rax
movq %rax, -0x198(%rbp)
leaq -0x12(%rbp), %rdi
movq %rdi, -0x190(%rbp)
callq 0xdaa0
movq -0x188(%rbp), %rdi
movq -0x198(%rbp), %rsi
movq -0x190(%rbp), %rdx
callq 0x16510
jmp 0x3866b
leaq -0x12(%rbp), %rdi
callq 0xd620
jmp 0x38988
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x12(%rbp), %rdi
callq 0xd620
jmp 0x38998
testb $0x1, -0x11(%rbp)
je 0x386b0
leaq -0x48(%rbp), %rdi
leaq 0x58923(%rip), %rsi # 0x90fc7
movl $0x5, %edx
callq 0x390b0
jmp 0x386c5
leaq -0x48(%rbp), %rdi
leaq 0x58912(%rip), %rsi # 0x90fcd
movl $0x5, %edx
callq 0x390b0
movq -0x178(%rbp), %rax
movzbl 0x1(%rax), %esi
leaq -0x68(%rbp), %rdi
callq 0x2cdc0
jmp 0x386db
movq -0x188(%rbp), %rdi
leaq -0x48(%rbp), %rsi
leaq -0x68(%rbp), %rdx
callq 0x2cc20
jmp 0x386f1
leaq -0x68(%rbp), %rdi
callq 0xdbc8
leaq -0x48(%rbp), %rdi
callq 0xdbc8
jmp 0x38988
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x3872b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x68(%rbp), %rdi
callq 0xdbc8
leaq -0x48(%rbp), %rdi
callq 0xdbc8
jmp 0x38998
jmp 0x3873b
testb $0x1, -0x11(%rbp)
je 0x3875b
leaq -0x108(%rbp), %rdi
leaq 0x58884(%rip), %rsi # 0x90fd3
movl $0x5, %edx
callq 0x390b0
jmp 0x38773
leaq -0x108(%rbp), %rdi
leaq 0x58870(%rip), %rsi # 0x90fd9
movl $0x5, %edx
callq 0x390b0
movq -0x178(%rbp), %rax
movzbl 0x1(%rax), %esi
leaq -0x128(%rbp), %rdi
callq 0x2cdc0
jmp 0x3878c
leaq -0xe8(%rbp), %rdi
leaq -0x108(%rbp), %rsi
leaq -0x128(%rbp), %rdx
callq 0x2cc20
jmp 0x387a8
leaq 0x5882e(%rip), %rdx # 0x90fdd
leaq -0xc8(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x2cbd0
jmp 0x387c4
movq -0x178(%rbp), %rax
movzbl 0x2(%rax), %esi
leaq -0x148(%rbp), %rdi
callq 0x2cdc0
jmp 0x387dd
leaq -0xa8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
leaq -0x148(%rbp), %rdx
callq 0x2cc20
jmp 0x387f9
leaq 0x587dd(%rip), %rdx # 0x90fdd
leaq -0x88(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x2cbd0
jmp 0x38815
movq -0x178(%rbp), %rax
movzbl 0x3(%rax), %esi
leaq -0x168(%rbp), %rdi
callq 0x2cdc0
jmp 0x3882e
movq -0x188(%rbp), %rdi
leaq -0x88(%rbp), %rsi
leaq -0x168(%rbp), %rdx
callq 0x2cc20
jmp 0x3884a
leaq -0x168(%rbp), %rdi
callq 0xdbc8
leaq -0x88(%rbp), %rdi
callq 0xdbc8
leaq -0xa8(%rbp), %rdi
callq 0xdbc8
leaq -0x148(%rbp), %rdi
callq 0xdbc8
leaq -0xc8(%rbp), %rdi
callq 0xdbc8
leaq -0xe8(%rbp), %rdi
callq 0xdbc8
leaq -0x128(%rbp), %rdi
callq 0xdbc8
leaq -0x108(%rbp), %rdi
callq 0xdbc8
jmp 0x38988
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x3897a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x3896e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x38962
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x38956
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x3894a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x3893e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x38932
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x168(%rbp), %rdi
callq 0xdbc8
leaq -0x88(%rbp), %rdi
callq 0xdbc8
leaq -0xa8(%rbp), %rdi
callq 0xdbc8
leaq -0x148(%rbp), %rdi
callq 0xdbc8
leaq -0xc8(%rbp), %rdi
callq 0xdbc8
leaq -0xe8(%rbp), %rdi
callq 0xdbc8
leaq -0x128(%rbp), %rdi
callq 0xdbc8
leaq -0x108(%rbp), %rdi
callq 0xdbc8
jmp 0x38998
movq -0x180(%rbp), %rax
addq $0x1a0, %rsp # imm = 0x1A0
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0xda90
nopw %cs:(%rax,%rax)
|
_ZNK5ftxui5Color5PrintB5cxx11Eb:
push rbp
mov rbp, rsp
sub rsp, 1A0h
mov [rbp+var_188], rdi
mov al, dl
mov rcx, rdi
mov [rbp+var_180], rcx
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
and al, 1
mov [rbp+var_11], al
mov rax, [rbp+var_10]
mov [rbp+var_178], rax
movzx eax, byte ptr [rax]
mov [rbp+var_170], rax
sub rax, 3; switch 4 cases
ja def_385CF; jumptable 00000000000385CF default case
mov rax, [rbp+var_170]
lea rcx, jpt_385CF
movsxd rax, ds:(jpt_385CF - 90F7Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_385D1:
test [rbp+var_11], 1; jumptable 00000000000385CF case 0
jz short loc_385F1
mov rdi, [rbp+var_188]
lea rsi, unk_90FC4
mov edx, 2
call _ZNSt8literals15string_literalsli1sB5cxx11EPKcm; std::literals::string_literals::operator"" s(char const*,ulong)
jmp short loc_38609
loc_385F1:
mov rdi, [rbp+var_188]
lea rsi, aGrey39+4; "39"
mov edx, 2
call _ZNSt8literals15string_literalsli1sB5cxx11EPKcm; std::literals::string_literals::operator"" s(char const*,ulong)
loc_38609:
jmp loc_38988
loc_3860E:
mov rax, [rbp+var_178]; jumptable 00000000000385CF case 1
movzx eax, byte ptr [rax+1]
movzx edx, [rbp+var_11]
and edx, 1
mov ecx, eax
mov eax, edx
lea eax, [rax+rcx*2]
mov esi, eax
lea rdi, _ZN5ftxui12_GLOBAL__N_113palette16codeE; ftxui::`anonymous namespace'::palette16code
call _ZNKSt5arrayIPKcLm33EEixEm; std::array<char const*,33ul>::operator[](ulong)
mov rax, [rax]
mov [rbp+var_198], rax
lea rdi, [rbp+var_12]
mov [rbp+var_190], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rbp+var_188]
mov rsi, [rbp+var_198]
mov rdx, [rbp+var_190]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_3866B:
lea rdi, [rbp+var_12]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_38988
mov rcx, rax
mov eax, edx
mov [rbp+var_20], rcx
mov [rbp+var_24], eax
lea rdi, [rbp+var_12]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_38998
loc_38693:
test [rbp+var_11], 1; jumptable 00000000000385CF case 2
jz short loc_386B0
lea rdi, [rbp+var_48]
lea rsi, a485; "48;5;"
mov edx, 5
call _ZNSt8literals15string_literalsli1sB5cxx11EPKcm; std::literals::string_literals::operator"" s(char const*,ulong)
jmp short loc_386C5
loc_386B0:
lea rdi, [rbp+var_48]
lea rsi, a385; "38;5;"
mov edx, 5
call _ZNSt8literals15string_literalsli1sB5cxx11EPKcm; std::literals::string_literals::operator"" s(char const*,ulong)
loc_386C5:
mov rax, [rbp+var_178]
movzx esi, byte ptr [rax+1]; int
lea rdi, [rbp+var_68]; this
call _ZNSt7__cxx119to_stringEi; std::to_string(int)
jmp short $+2
loc_386DB:
mov rdi, [rbp+var_188]
lea rsi, [rbp+var_48]
lea rdx, [rbp+var_68]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
jmp short $+2
loc_386F1:
lea rdi, [rbp+var_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_38988
mov rcx, rax
mov eax, edx
mov [rbp+var_20], rcx
mov [rbp+var_24], eax
jmp short loc_3872B
mov rcx, rax
mov eax, edx
mov [rbp+var_20], rcx
mov [rbp+var_24], eax
lea rdi, [rbp+var_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_3872B:
lea rdi, [rbp+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_38998
loc_38739:
jmp short $+2; jumptable 00000000000385CF case 3
def_385CF:
test [rbp+var_11], 1; jumptable 00000000000385CF default case
jz short loc_3875B
lea rdi, [rbp+var_108]
lea rsi, a482; "48;2;"
mov edx, 5
call _ZNSt8literals15string_literalsli1sB5cxx11EPKcm; std::literals::string_literals::operator"" s(char const*,ulong)
jmp short loc_38773
loc_3875B:
lea rdi, [rbp+var_108]
lea rsi, a382; "38;2;"
mov edx, 5
call _ZNSt8literals15string_literalsli1sB5cxx11EPKcm; std::literals::string_literals::operator"" s(char const*,ulong)
loc_38773:
mov rax, [rbp+var_178]
movzx esi, byte ptr [rax+1]; int
lea rdi, [rbp+var_128]; this
call _ZNSt7__cxx119to_stringEi; std::to_string(int)
jmp short $+2
loc_3878C:
lea rdi, [rbp+var_E8]
lea rsi, [rbp+var_108]
lea rdx, [rbp+var_128]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
jmp short $+2
loc_387A8:
lea rdx, a382+4; ";"
lea rdi, [rbp+var_C8]
lea rsi, [rbp+var_E8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_387C4:
mov rax, [rbp+var_178]
movzx esi, byte ptr [rax+2]; int
lea rdi, [rbp+var_148]; this
call _ZNSt7__cxx119to_stringEi; std::to_string(int)
jmp short $+2
loc_387DD:
lea rdi, [rbp+var_A8]
lea rsi, [rbp+var_C8]
lea rdx, [rbp+var_148]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
jmp short $+2
loc_387F9:
lea rdx, a382+4; ";"
lea rdi, [rbp+var_88]
lea rsi, [rbp+var_A8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_38815:
mov rax, [rbp+var_178]
movzx esi, byte ptr [rax+3]; int
lea rdi, [rbp+var_168]; this
call _ZNSt7__cxx119to_stringEi; std::to_string(int)
jmp short $+2
loc_3882E:
mov rdi, [rbp+var_188]
lea rsi, [rbp+var_88]
lea rdx, [rbp+var_168]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
jmp short $+2
loc_3884A:
lea rdi, [rbp+var_168]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_88]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_148]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_C8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_E8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_128]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_108]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_38988
mov rcx, rax
mov eax, edx
mov [rbp+var_20], rcx
mov [rbp+var_24], eax
jmp loc_3897A
mov rcx, rax
mov eax, edx
mov [rbp+var_20], rcx
mov [rbp+var_24], eax
jmp loc_3896E
mov rcx, rax
mov eax, edx
mov [rbp+var_20], rcx
mov [rbp+var_24], eax
jmp loc_38962
mov rcx, rax
mov eax, edx
mov [rbp+var_20], rcx
mov [rbp+var_24], eax
jmp short loc_38956
mov rcx, rax
mov eax, edx
mov [rbp+var_20], rcx
mov [rbp+var_24], eax
jmp short loc_3894A
mov rcx, rax
mov eax, edx
mov [rbp+var_20], rcx
mov [rbp+var_24], eax
jmp short loc_3893E
mov rcx, rax
mov eax, edx
mov [rbp+var_20], rcx
mov [rbp+var_24], eax
jmp short loc_38932
mov rcx, rax
mov eax, edx
mov [rbp+var_20], rcx
mov [rbp+var_24], eax
lea rdi, [rbp+var_168]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_38932:
lea rdi, [rbp+var_88]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_3893E:
lea rdi, [rbp+var_A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_3894A:
lea rdi, [rbp+var_148]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_38956:
lea rdi, [rbp+var_C8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_38962:
lea rdi, [rbp+var_E8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_3896E:
lea rdi, [rbp+var_128]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_3897A:
lea rdi, [rbp+var_108]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_38998
loc_38988:
mov rax, [rbp+var_180]
add rsp, 1A0h
pop rbp
retn
loc_38998:
mov rdi, [rbp+var_20]
call __Unwind_Resume
|
long long ftxui::Color::Print[abi:cxx11](long long a1, _BYTE *a2, char a3)
{
long long v4; // [rsp+8h] [rbp-198h]
_BYTE v5[32]; // [rsp+38h] [rbp-168h] BYREF
_BYTE v6[32]; // [rsp+58h] [rbp-148h] BYREF
_BYTE v7[32]; // [rsp+78h] [rbp-128h] BYREF
_BYTE v8[32]; // [rsp+98h] [rbp-108h] BYREF
_BYTE v9[32]; // [rsp+B8h] [rbp-E8h] BYREF
_BYTE v10[32]; // [rsp+D8h] [rbp-C8h] BYREF
_BYTE v11[32]; // [rsp+F8h] [rbp-A8h] BYREF
_BYTE v12[32]; // [rsp+118h] [rbp-88h] BYREF
_BYTE v13[32]; // [rsp+138h] [rbp-68h] BYREF
_BYTE v14[36]; // [rsp+158h] [rbp-48h] BYREF
char v15; // [rsp+18Eh] [rbp-12h] BYREF
char v16; // [rsp+18Fh] [rbp-11h]
_BYTE *v17; // [rsp+190h] [rbp-10h]
long long v18; // [rsp+198h] [rbp-8h]
v18 = a1;
v17 = a2;
v16 = a3 & 1;
switch ( *a2 )
{
case 0:
if ( (v16 & 1) != 0 )
std::literals::string_literals::operator"" s[abi:cxx11](a1, &unk_90FC4, 2LL);
else
std::literals::string_literals::operator"" s[abi:cxx11](a1, "39", 2LL);
break;
case 1:
v4 = *(_QWORD *)std::array<char const*,33ul>::operator[](
&ftxui::`anonymous namespace'::palette16code,
(v16 & 1) + 2 * (unsigned int)(unsigned __int8)a2[1]);
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(a1, v4, (long long)&v15);
std::allocator<char>::~allocator(&v15);
break;
case 2:
if ( (v16 & 1) != 0 )
std::literals::string_literals::operator"" s[abi:cxx11](v14, "48;5;", 5LL);
else
std::literals::string_literals::operator"" s[abi:cxx11](v14, "38;5;", 5LL);
std::to_string((std::__cxx11 *)v13, (unsigned __int8)a2[1]);
std::operator+<char>(a1, (long long)v14, (long long)v13);
std::string::~string(v13);
std::string::~string(v14);
break;
default:
if ( (v16 & 1) != 0 )
std::literals::string_literals::operator"" s[abi:cxx11](v8, "48;2;", 5LL);
else
std::literals::string_literals::operator"" s[abi:cxx11](v8, "38;2;", 5LL);
std::to_string((std::__cxx11 *)v7, (unsigned __int8)a2[1]);
std::operator+<char>((long long)v9, (long long)v8, (long long)v7);
std::operator+<char>((long long)v10, (long long)v9, (long long)";");
std::to_string((std::__cxx11 *)v6, (unsigned __int8)a2[2]);
std::operator+<char>((long long)v11, (long long)v10, (long long)v6);
std::operator+<char>((long long)v12, (long long)v11, (long long)";");
std::to_string((std::__cxx11 *)v5, (unsigned __int8)a2[3]);
std::operator+<char>(a1, (long long)v12, (long long)v5);
std::string::~string(v5);
std::string::~string(v12);
std::string::~string(v11);
std::string::~string(v6);
std::string::~string(v10);
std::string::~string(v9);
std::string::~string(v7);
std::string::~string(v8);
break;
}
return a1;
}
|
Print[abi:cxx11]:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x1a0
MOV qword ptr [RBP + -0x188],RDI
MOV AL,DL
MOV RCX,RDI
MOV qword ptr [RBP + -0x180],RCX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
AND AL,0x1
MOV byte ptr [RBP + -0x11],AL
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x178],RAX
MOVZX EAX,byte ptr [RAX]
MOV qword ptr [RBP + -0x170],RAX
SUB RAX,0x3
JA 0x0013873b
MOV RAX,qword ptr [RBP + -0x170]
LEA RCX,[0x190f7c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
TEST byte ptr [RBP + -0x11],0x1
JZ 0x001385f1
MOV RDI,qword ptr [RBP + -0x188]
LEA RSI,[0x190fc4]
MOV EDX,0x2
CALL 0x001390b0
JMP 0x00138609
LAB_001385f1:
MOV RDI,qword ptr [RBP + -0x188]
LEA RSI,[0x191983]
MOV EDX,0x2
CALL 0x001390b0
LAB_00138609:
JMP 0x00138988
caseD_1:
MOV RAX,qword ptr [RBP + -0x178]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EDX,byte ptr [RBP + -0x11]
AND EDX,0x1
MOV ECX,EAX
MOV EAX,EDX
LEA EAX,[RAX + RCX*0x2]
MOV ESI,EAX
LEA RDI,[0x1dbea8]
CALL 0x00139140
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x198],RAX
LEA RDI,[RBP + -0x12]
MOV qword ptr [RBP + -0x190],RDI
CALL 0x0010daa0
MOV RDI,qword ptr [RBP + -0x188]
MOV RSI,qword ptr [RBP + -0x198]
MOV RDX,qword ptr [RBP + -0x190]
LAB_00138664:
CALL 0x00116510
LAB_00138669:
JMP 0x0013866b
LAB_0013866b:
LEA RDI,[RBP + -0x12]
CALL 0x0010d620
JMP 0x00138988
caseD_2:
TEST byte ptr [RBP + -0x11],0x1
JZ 0x001386b0
LEA RDI,[RBP + -0x48]
LEA RSI,[0x190fc7]
MOV EDX,0x5
CALL 0x001390b0
JMP 0x001386c5
LAB_001386b0:
LEA RDI,[RBP + -0x48]
LEA RSI,[0x190fcd]
MOV EDX,0x5
CALL 0x001390b0
LAB_001386c5:
MOV RAX,qword ptr [RBP + -0x178]
MOVZX ESI,byte ptr [RAX + 0x1]
LAB_001386d0:
LEA RDI,[RBP + -0x68]
CALL 0x0012cdc0
JMP 0x001386db
LAB_001386db:
MOV RDI,qword ptr [RBP + -0x188]
LEA RSI,[RBP + -0x48]
LEA RDX,[RBP + -0x68]
CALL 0x0012cc20
LAB_001386ef:
JMP 0x001386f1
LAB_001386f1:
LEA RDI,[RBP + -0x68]
CALL 0x0010dbc8
LEA RDI,[RBP + -0x48]
CALL 0x0010dbc8
JMP 0x00138988
caseD_3:
JMP 0x0013873b
default:
TEST byte ptr [RBP + -0x11],0x1
JZ 0x0013875b
LEA RDI,[RBP + -0x108]
LEA RSI,[0x190fd3]
MOV EDX,0x5
CALL 0x001390b0
JMP 0x00138773
LAB_0013875b:
LEA RDI,[RBP + -0x108]
LEA RSI,[0x190fd9]
MOV EDX,0x5
CALL 0x001390b0
LAB_00138773:
MOV RAX,qword ptr [RBP + -0x178]
MOVZX ESI,byte ptr [RAX + 0x1]
LAB_0013877e:
LEA RDI,[RBP + -0x128]
CALL 0x0012cdc0
JMP 0x0013878c
LAB_0013878c:
LEA RDI,[RBP + -0xe8]
LEA RSI,[RBP + -0x108]
LEA RDX,[RBP + -0x128]
CALL 0x0012cc20
JMP 0x001387a8
LAB_001387a8:
LEA RDX,[0x190fdd]
LEA RDI,[RBP + -0xc8]
LEA RSI,[RBP + -0xe8]
CALL 0x0012cbd0
JMP 0x001387c4
LAB_001387c4:
MOV RAX,qword ptr [RBP + -0x178]
MOVZX ESI,byte ptr [RAX + 0x2]
LAB_001387cf:
LEA RDI,[RBP + -0x148]
CALL 0x0012cdc0
JMP 0x001387dd
LAB_001387dd:
LEA RDI,[RBP + -0xa8]
LEA RSI,[RBP + -0xc8]
LEA RDX,[RBP + -0x148]
CALL 0x0012cc20
JMP 0x001387f9
LAB_001387f9:
LEA RDX,[0x190fdd]
LEA RDI,[RBP + -0x88]
LEA RSI,[RBP + -0xa8]
CALL 0x0012cbd0
JMP 0x00138815
LAB_00138815:
MOV RAX,qword ptr [RBP + -0x178]
MOVZX ESI,byte ptr [RAX + 0x3]
LAB_00138820:
LEA RDI,[RBP + -0x168]
CALL 0x0012cdc0
JMP 0x0013882e
LAB_0013882e:
MOV RDI,qword ptr [RBP + -0x188]
LEA RSI,[RBP + -0x88]
LEA RDX,[RBP + -0x168]
CALL 0x0012cc20
LAB_00138848:
JMP 0x0013884a
LAB_0013884a:
LEA RDI,[RBP + -0x168]
CALL 0x0010dbc8
LEA RDI,[RBP + -0x88]
CALL 0x0010dbc8
LEA RDI,[RBP + -0xa8]
CALL 0x0010dbc8
LEA RDI,[RBP + -0x148]
CALL 0x0010dbc8
LEA RDI,[RBP + -0xc8]
CALL 0x0010dbc8
LEA RDI,[RBP + -0xe8]
CALL 0x0010dbc8
LEA RDI,[RBP + -0x128]
CALL 0x0010dbc8
LEA RDI,[RBP + -0x108]
CALL 0x0010dbc8
JMP 0x00138988
LAB_00138988:
MOV RAX,qword ptr [RBP + -0x180]
ADD RSP,0x1a0
POP RBP
RET
|
/* ftxui::Color::Print[abi:cxx11](bool) const */
string * ftxui::Color::Print_abi_cxx11_(bool param_1)
{
char *pcVar1;
int8 *puVar2;
byte in_DL;
int1 *in_RSI;
int7 in_register_00000039;
string *this;
__cxx11 local_170 [32];
__cxx11 local_150 [32];
__cxx11 local_130 [32];
string local_110 [32];
string local_f0 [32];
string local_d0 [32];
string local_b0 [32];
string local_90 [32];
__cxx11 local_70 [32];
string local_50 [54];
allocator local_1a;
byte local_19;
string *local_10;
this = (string *)CONCAT71(in_register_00000039,param_1);
local_19 = in_DL & 1;
local_10 = this;
switch(*in_RSI) {
case 0:
if (local_19 == 0) {
s_abi_cxx11_((char *)this,0x191983);
}
else {
s_abi_cxx11_((char *)this,0x190fc4);
}
break;
case 1:
puVar2 = (int8 *)
std::array<char_const*,33ul>::operator[]
((array<char_const*,33ul> *)(anonymous_namespace)::palette16code,
(ulong)((uint)local_19 + (uint)(byte)in_RSI[1] * 2));
pcVar1 = (char *)*puVar2;
std::allocator<char>::allocator();
/* try { // try from 00138664 to 00138668 has its CatchHandler @ 00138679 */
std::__cxx11::string::string<std::allocator<char>>(this,pcVar1,&local_1a);
std::allocator<char>::~allocator((allocator<char> *)&local_1a);
break;
case 2:
if (local_19 == 0) {
s_abi_cxx11_((char *)local_50,0x190fcd);
}
else {
s_abi_cxx11_((char *)local_50,0x190fc7);
}
/* try { // try from 001386d0 to 001386d8 has its CatchHandler @ 00138708 */
std::__cxx11::to_string(local_70,(uint)(byte)in_RSI[1]);
/* try { // try from 001386db to 001386ee has its CatchHandler @ 00138716 */
std::operator+(this,local_50);
std::__cxx11::string::~string((string *)local_70);
std::__cxx11::string::~string(local_50);
break;
case 3:
default:
if (local_19 == 0) {
s_abi_cxx11_((char *)local_110,0x190fd9);
}
else {
s_abi_cxx11_((char *)local_110,0x190fd3);
}
/* try { // try from 0013877e to 00138789 has its CatchHandler @ 001388af */
std::__cxx11::to_string(local_130,(uint)(byte)in_RSI[1]);
/* try { // try from 0013878c to 001387a5 has its CatchHandler @ 001388c0 */
std::operator+(local_f0,local_110);
/* try { // try from 001387a8 to 001387c1 has its CatchHandler @ 001388d1 */
std::operator+(local_d0,(char *)local_f0);
/* try { // try from 001387cf to 001387da has its CatchHandler @ 001388e2 */
std::__cxx11::to_string(local_150,(uint)(byte)in_RSI[2]);
/* try { // try from 001387dd to 001387f6 has its CatchHandler @ 001388f0 */
std::operator+(local_b0,local_d0);
/* try { // try from 001387f9 to 00138812 has its CatchHandler @ 001388fe */
std::operator+(local_90,(char *)local_b0);
/* try { // try from 00138820 to 0013882b has its CatchHandler @ 0013890c */
std::__cxx11::to_string(local_170,(uint)(byte)in_RSI[3]);
/* try { // try from 0013882e to 00138847 has its CatchHandler @ 0013891a */
std::operator+(this,local_90);
std::__cxx11::string::~string((string *)local_170);
std::__cxx11::string::~string(local_90);
std::__cxx11::string::~string(local_b0);
std::__cxx11::string::~string((string *)local_150);
std::__cxx11::string::~string(local_d0);
std::__cxx11::string::~string(local_f0);
std::__cxx11::string::~string((string *)local_130);
std::__cxx11::string::~string(local_110);
}
return this;
}
|
|
16,434
|
rtree_find_first
|
eloqsql/storage/myisam/rt_index.c
|
int rtree_find_first(MI_INFO *info, uint keynr, uchar *key, uint key_length,
uint search_flag)
{
my_off_t root;
uint nod_cmp_flag;
MI_KEYDEF *keyinfo = info->s->keyinfo + keynr;
/*
At the moment index can only properly handle the
MBR_INTERSECT, so we use it for all sorts of queries.
TODO: better searsh for CONTAINS/WITHIN.
*/
search_flag= nod_cmp_flag= MBR_INTERSECT;
if ((root = info->s->state.key_root[keynr]) == HA_OFFSET_ERROR)
{
my_errno= HA_ERR_END_OF_FILE;
return -1;
}
/*
Save searched key, include data pointer.
The data pointer is required if the search_flag contains MBR_DATA.
(minimum bounding rectangle)
*/
memcpy(info->first_mbr_key, key, keyinfo->keylength);
info->last_rkey_length = key_length;
info->rtree_recursion_depth = -1;
info->buff_used = 1;
/*
TODO better search for CONTAINS/WITHIN.
nod_cmp_flag= ((search_flag & (MBR_EQUAL | MBR_WITHIN)) ?
MBR_WITHIN : MBR_INTERSECT);
*/
return rtree_find_req(info, keyinfo, search_flag, nod_cmp_flag, root, 0);
}
|
O3
|
c
|
rtree_find_first:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %r14d
movq (%rdi), %rax
movl %esi, %ecx
movq 0x98(%rax), %rsi
movq (%rsi,%rcx,8), %r15
cmpq $-0x1, %r15
je 0x89b26
movq %rdi, %rbx
movq 0x218(%rax), %rax
imulq $0x70, %rcx, %rcx
leaq (%rax,%rcx), %r12
movq 0x118(%rdi), %rdi
movzwl 0x12(%rax,%rcx), %eax
movq %rdx, %rsi
movq %rax, %rdx
callq 0x29080
movl %r14d, 0x1dc(%rbx)
movl $0xffffffff, 0x3c0(%rbx) # imm = 0xFFFFFFFF
movb $0x1, 0x33d(%rbx)
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x89b3f
callq 0xa1b22
movl $0x89, (%rax)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
rtree_find_first:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r14d, ecx
mov rax, [rdi]
mov ecx, esi
mov rsi, [rax+98h]
mov r15, [rsi+rcx*8]
cmp r15, 0FFFFFFFFFFFFFFFFh
jz short loc_89B26
mov rbx, rdi
mov rax, [rax+218h]
imul rcx, 70h ; 'p'
lea r12, [rax+rcx]
mov rdi, [rdi+118h]
movzx eax, word ptr [rax+rcx+12h]
mov rsi, rdx
mov rdx, rax
call _memcpy
mov [rbx+1DCh], r14d
mov dword ptr [rbx+3C0h], 0FFFFFFFFh
mov byte ptr [rbx+33Dh], 1
mov rdi, rbx
mov rsi, r12
mov rdx, r15
xor ecx, ecx
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp short rtree_find_req
loc_89B26:
call _my_thread_var
mov dword ptr [rax], 89h
mov eax, 0FFFFFFFFh
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long rtree_find_first(long long a1, unsigned int a2, long long a3, int a4)
{
long long v5; // rcx
const char *v6; // rsi
long long v7; // r15
long long v8; // r12
v5 = a2;
v6 = *(const char **)(*(_QWORD *)a1 + 152LL);
v7 = *(_QWORD *)&v6[8 * v5];
if ( v7 == -1 )
{
*(_DWORD *)my_thread_var(a1, v6) = 137;
return 0xFFFFFFFFLL;
}
else
{
v8 = *(_QWORD *)(*(_QWORD *)a1 + 536LL) + 112 * v5;
memcpy(*(_QWORD *)(a1 + 280), a3, *(unsigned __int16 *)(v8 + 18));
*(_DWORD *)(a1 + 476) = a4;
*(_DWORD *)(a1 + 960) = -1;
*(_BYTE *)(a1 + 829) = 1;
return rtree_find_req(a1, v8, v7, 0LL);
}
}
|
rtree_find_first:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R14D,ECX
MOV RAX,qword ptr [RDI]
MOV ECX,ESI
MOV RSI,qword ptr [RAX + 0x98]
MOV R15,qword ptr [RSI + RCX*0x8]
CMP R15,-0x1
JZ 0x00189b26
MOV RBX,RDI
MOV RAX,qword ptr [RAX + 0x218]
IMUL RCX,RCX,0x70
LEA R12,[RAX + RCX*0x1]
MOV RDI,qword ptr [RDI + 0x118]
MOVZX EAX,word ptr [RAX + RCX*0x1 + 0x12]
MOV RSI,RDX
MOV RDX,RAX
CALL 0x00129080
MOV dword ptr [RBX + 0x1dc],R14D
MOV dword ptr [RBX + 0x3c0],0xffffffff
MOV byte ptr [RBX + 0x33d],0x1
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
XOR ECX,ECX
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x00189b3f
LAB_00189b26:
CALL 0x001a1b22
MOV dword ptr [RAX],0x89
MOV EAX,0xffffffff
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 rtree_find_first(long *param_1,ulong param_2,void *param_3,int4 param_4)
{
long lVar1;
long lVar2;
int8 uVar3;
int4 *puVar4;
long lVar5;
lVar1 = *(long *)(*(long *)(*param_1 + 0x98) + (param_2 & 0xffffffff) * 8);
if (lVar1 != -1) {
lVar2 = *(long *)(*param_1 + 0x218);
lVar5 = (param_2 & 0xffffffff) * 0x70;
memcpy((void *)param_1[0x23],param_3,(ulong)*(ushort *)(lVar2 + 0x12 + lVar5));
*(int4 *)((long)param_1 + 0x1dc) = param_4;
*(int4 *)(param_1 + 0x78) = 0xffffffff;
*(int1 *)((long)param_1 + 0x33d) = 1;
uVar3 = rtree_find_req(param_1,lVar2 + lVar5,lVar1,0);
return uVar3;
}
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0x89;
return 0xffffffff;
}
|
|
16,435
|
common_params_get_system_info[abi:cxx11](common_params const&)
|
monkey531[P]llama/common/common.cpp
|
std::string common_params_get_system_info(const common_params & params) {
std::ostringstream os;
os << "system_info: n_threads = " << params.cpuparams.n_threads;
if (params.cpuparams_batch.n_threads != -1) {
os << " (n_threads_batch = " << params.cpuparams_batch.n_threads << ")";
}
#if defined(_WIN32) && (_WIN32_WINNT >= 0x0601) && !defined(__MINGW64__) // windows 7 and later
// TODO: windows + arm64 + mingw64
DWORD logicalProcessorCount = GetActiveProcessorCount(ALL_PROCESSOR_GROUPS);
os << " / " << logicalProcessorCount << " | " << llama_print_system_info();
#else
os << " / " << std::thread::hardware_concurrency() << " | " << llama_print_system_info();
#endif
return os.str();
}
|
O3
|
cpp
|
common_params_get_system_info[abi:cxx11](common_params const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x180, %rsp # imm = 0x180
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x1bbd0
leaq 0x7d2e1(%rip), %rsi # 0xfcd42
movl $0x19, %edx
movq %r15, %rdi
callq 0x1ba10
movl 0x274(%r14), %esi
leaq 0x8(%rsp), %rdi
callq 0x1bfb0
cmpl $-0x1, 0x488(%r14)
je 0x7fac4
leaq 0x7d2cc(%rip), %rsi # 0xfcd5c
leaq 0x8(%rsp), %rdi
movl $0x14, %edx
callq 0x1ba10
movl 0x488(%r14), %esi
leaq 0x8(%rsp), %rdi
callq 0x1bfb0
leaq 0x82d8c(%rip), %rsi # 0x102843
movl $0x1, %edx
movq %rax, %rdi
callq 0x1ba10
leaq 0x7d2a6(%rip), %rsi # 0xfcd71
leaq 0x8(%rsp), %rdi
movl $0x3, %edx
callq 0x1ba10
callq 0x1bc30
movl %eax, %esi
leaq 0x8(%rsp), %rdi
callq 0x1b600
movq %rax, %r14
leaq 0x83192(%rip), %rsi # 0x102c87
movl $0x3, %edx
movq %rax, %rdi
callq 0x1ba10
callq 0x1b520
movq %rax, %r15
testq %rax, %rax
je 0x7fb27
movq %r15, %rdi
callq 0x1b3f0
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x1ba10
jmp 0x7fb41
movq (%r14), %rax
movq -0x18(%rax), %rax
movq %r14, %rdi
addq %rax, %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x1bf60
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x1be10
movq 0xbb41b(%rip), %rsi # 0x13af70
leaq 0x8(%rsp), %rdi
callq 0x1b4b0
leaq 0x78(%rsp), %rdi
callq 0x1b2c0
movq %rbx, %rax
addq $0x180, %rsp # imm = 0x180
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0xbb3ed(%rip), %rsi # 0x13af70
leaq 0x8(%rsp), %rdi
callq 0x1b4b0
leaq 0x78(%rsp), %rdi
callq 0x1b2c0
movq %rbx, %rdi
callq 0x1c020
|
_Z29common_params_get_system_infoB5cxx11RK13common_params:
push r15
push r14
push rbx
sub rsp, 180h
mov r14, rsi
mov rbx, rdi
lea r15, [rsp+198h+var_190]
mov rdi, r15
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
lea rsi, aSystemInfoNThr; "system_info: n_threads = "
mov edx, 19h
mov rdi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov esi, [r14+274h]
lea rdi, [rsp+198h+var_190]
call __ZNSolsEi; std::ostream::operator<<(int)
cmp dword ptr [r14+488h], 0FFFFFFFFh
jz short loc_7FAC4
lea rsi, aNThreadsBatch; " (n_threads_batch = "
lea rdi, [rsp+198h+var_190]
mov edx, 14h
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov esi, [r14+488h]
lea rdi, [rsp+198h+var_190]
call __ZNSolsEi; std::ostream::operator<<(int)
lea rsi, a09401910201912+51h; ")"
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_7FAC4:
lea rsi, asc_FCD71; " / "
lea rdi, [rsp+198h+var_190]; this
mov edx, 3
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
call __ZNSt6thread20hardware_concurrencyEv; std::thread::hardware_concurrency(void)
mov esi, eax
lea rdi, [rsp+198h+var_190]
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov r14, rax
lea rsi, asc_102C86+1; " | "
mov edx, 3
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
call _llama_print_system_info
mov r15, rax
test rax, rax
jz short loc_7FB27
mov rdi, r15
call _strlen
mov rdi, r14
mov rsi, r15
mov rdx, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp short loc_7FB41
loc_7FB27:
mov rax, [r14]
mov rax, [rax-18h]
mov rdi, r14
add rdi, rax
mov esi, [r14+rax+20h]
or esi, 1
call __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate)
loc_7FB41:
lea rsi, [rsp+198h+var_188]
mov rdi, rbx
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+198h+var_190]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+198h+var_120]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rax, rbx
add rsp, 180h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_0]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+arg_70]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rbx
call __Unwind_Resume
|
long long common_params_get_system_info[abi:cxx11](long long a1, long long a2)
{
long long v2; // rax
unsigned int v3; // eax
_QWORD *v4; // r14
long long v5; // rax
long long v6; // r15
long long v7; // rax
_BYTE v9[8]; // [rsp+8h] [rbp-190h] BYREF
_BYTE v10[104]; // [rsp+10h] [rbp-188h] BYREF
_BYTE v11[288]; // [rsp+78h] [rbp-120h] BYREF
std::ostringstream::basic_ostringstream(v9);
std::__ostream_insert<char,std::char_traits<char>>(v9, "system_info: n_threads = ", 25LL);
std::ostream::operator<<(v9, *(unsigned int *)(a2 + 628));
if ( *(_DWORD *)(a2 + 1160) != -1 )
{
std::__ostream_insert<char,std::char_traits<char>>(v9, " (n_threads_batch = ", 20LL);
v2 = std::ostream::operator<<(v9, *(unsigned int *)(a2 + 1160));
std::__ostream_insert<char,std::char_traits<char>>(v2, ")", 1LL);
}
std::__ostream_insert<char,std::char_traits<char>>(v9, " / ", 3LL);
v3 = std::thread::hardware_concurrency((std::thread *)v9);
v4 = (_QWORD *)std::ostream::_M_insert<unsigned long>(v9, v3);
std::__ostream_insert<char,std::char_traits<char>>(v4, " | ", 3LL);
v5 = llama_print_system_info();
v6 = v5;
if ( v5 )
{
v7 = strlen(v5);
std::__ostream_insert<char,std::char_traits<char>>(v4, v6, v7);
}
else
{
std::ios::clear((char *)v4 + *(_QWORD *)(*v4 - 24LL), *(_DWORD *)((char *)v4 + *(_QWORD *)(*v4 - 24LL) + 32) | 1u);
}
std::stringbuf::str(a1, v10);
std::ostringstream::~ostringstream(v9, &`VTT for'std::ostringstream);
std::ios_base::~ios_base((std::ios_base *)v11);
return a1;
}
|
common_params_get_system_info[abi:cxx11]:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x180
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RSP + 0x8]
MOV RDI,R15
CALL 0x0011bbd0
LAB_0017fa5a:
LEA RSI,[0x1fcd42]
MOV EDX,0x19
MOV RDI,R15
CALL 0x0011ba10
MOV ESI,dword ptr [R14 + 0x274]
LEA RDI,[RSP + 0x8]
CALL 0x0011bfb0
CMP dword ptr [R14 + 0x488],-0x1
JZ 0x0017fac4
LEA RSI,[0x1fcd5c]
LEA RDI,[RSP + 0x8]
MOV EDX,0x14
CALL 0x0011ba10
MOV ESI,dword ptr [R14 + 0x488]
LEA RDI,[RSP + 0x8]
CALL 0x0011bfb0
LEA RSI,[0x202843]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x0011ba10
LAB_0017fac4:
LEA RSI,[0x1fcd71]
LEA RDI,[RSP + 0x8]
MOV EDX,0x3
CALL 0x0011ba10
CALL 0x0011bc30
MOV ESI,EAX
LEA RDI,[RSP + 0x8]
CALL 0x0011b600
MOV R14,RAX
LEA RSI,[0x202c87]
MOV EDX,0x3
MOV RDI,RAX
CALL 0x0011ba10
CALL 0x0011b520
MOV R15,RAX
TEST RAX,RAX
JZ 0x0017fb27
MOV RDI,R15
CALL 0x0011b3f0
MOV RDI,R14
MOV RSI,R15
MOV RDX,RAX
CALL 0x0011ba10
JMP 0x0017fb41
LAB_0017fb27:
MOV RAX,qword ptr [R14]
MOV RAX,qword ptr [RAX + -0x18]
MOV RDI,R14
ADD RDI,RAX
MOV ESI,dword ptr [R14 + RAX*0x1 + 0x20]
OR ESI,0x1
CALL 0x0011bf60
LAB_0017fb41:
LEA RSI,[RSP + 0x10]
MOV RDI,RBX
CALL 0x0011be10
LAB_0017fb4e:
MOV RSI,qword ptr [0x0023af70]
LEA RDI,[RSP + 0x8]
CALL 0x0011b4b0
LEA RDI,[RSP + 0x78]
CALL 0x0011b2c0
MOV RAX,RBX
ADD RSP,0x180
POP RBX
POP R14
POP R15
RET
|
/* common_params_get_system_info[abi:cxx11](common_params const&) */
common_params * common_params_get_system_info_abi_cxx11_(common_params *param_1)
{
ostream *poVar1;
char *__s;
size_t sVar2;
long in_RSI;
ostringstream local_190 [112];
ios_base local_120 [264];
std::__cxx11::ostringstream::ostringstream(local_190);
/* try { // try from 0017fa5a to 0017fb4d has its CatchHandler @ 0017fb79 */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)local_190,"system_info: n_threads = ",0x19);
std::ostream::operator<<((ostream *)local_190,*(int *)(in_RSI + 0x274));
if (*(int *)(in_RSI + 0x488) != -1) {
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)local_190," (n_threads_batch = ",0x14);
poVar1 = (ostream *)std::ostream::operator<<((ostream *)local_190,*(int *)(in_RSI + 0x488));
std::__ostream_insert<char,std::char_traits<char>>(poVar1,")",1);
}
std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_190," / ",3);
std::thread::hardware_concurrency();
poVar1 = std::ostream::_M_insert<unsigned_long>((ulong)local_190);
std::__ostream_insert<char,std::char_traits<char>>(poVar1," | ",3);
__s = (char *)llama_print_system_info();
if (__s == (char *)0x0) {
std::ios::clear(poVar1 + *(long *)(*(long *)poVar1 + -0x18),
*(uint *)(poVar1 + *(long *)(*(long *)poVar1 + -0x18) + 0x20) | 1);
}
else {
sVar2 = strlen(__s);
std::__ostream_insert<char,std::char_traits<char>>(poVar1,__s,sVar2);
}
std::__cxx11::stringbuf::str();
std::__cxx11::ostringstream::~ostringstream(local_190);
std::ios_base::~ios_base(local_120);
return param_1;
}
|
|
16,436
|
string_buffer_putc
|
bluesky950520[P]quickjs/quickjs.c
|
static int string_buffer_putc(StringBuffer *s, uint32_t c)
{
if (unlikely(c >= 0x10000)) {
/* surrogate pair */
if (string_buffer_putc16(s, get_hi_surrogate(c)))
return -1;
c = get_lo_surrogate(c);
}
return string_buffer_putc16(s, c);
}
|
O0
|
c
|
string_buffer_putc:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
cmpl $0x10000, 0x14(%rsp) # imm = 0x10000
setae %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x4c824
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x14(%rsp), %edi
callq 0x7d4a0
movq 0x8(%rsp), %rdi
movl %eax, %esi
callq 0x7d3d0
cmpl $0x0, %eax
je 0x4c817
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x4c836
movl 0x14(%rsp), %edi
callq 0x7d4c0
movl %eax, 0x14(%rsp)
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x7d3d0
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop
|
string_buffer_putc:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_14], esi
cmp [rsp+28h+var_14], 10000h
setnb al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_4C824
mov rax, [rsp+28h+var_10]
mov [rsp+28h+var_20], rax
mov edi, [rsp+28h+var_14]
call get_hi_surrogate_0
mov rdi, [rsp+28h+var_20]
mov esi, eax
call string_buffer_putc16
cmp eax, 0
jz short loc_4C817
mov [rsp+28h+var_4], 0FFFFFFFFh
jmp short loc_4C836
loc_4C817:
mov edi, [rsp+28h+var_14]
call get_lo_surrogate_0
mov [rsp+28h+var_14], eax
loc_4C824:
mov rdi, [rsp+28h+var_10]
mov esi, [rsp+28h+var_14]
call string_buffer_putc16
mov [rsp+28h+var_4], eax
loc_4C836:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
|
long long string_buffer_putc(long long a1, unsigned int a2)
{
unsigned int hi_surrogate_0; // eax
unsigned int lo_surrogate_0; // [rsp+14h] [rbp-14h]
lo_surrogate_0 = a2;
if ( a2 < 0x10000 )
return (unsigned int)string_buffer_putc16(a1, lo_surrogate_0);
hi_surrogate_0 = get_hi_surrogate_0(a2);
if ( !(unsigned int)string_buffer_putc16(a1, hi_surrogate_0) )
{
lo_surrogate_0 = get_lo_surrogate_0(a2);
return (unsigned int)string_buffer_putc16(a1, lo_surrogate_0);
}
return (unsigned int)-1;
}
|
string_buffer_putc:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV dword ptr [RSP + 0x14],ESI
CMP dword ptr [RSP + 0x14],0x10000
SETNC AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0014c824
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x8],RAX
MOV EDI,dword ptr [RSP + 0x14]
CALL 0x0017d4a0
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,EAX
CALL 0x0017d3d0
CMP EAX,0x0
JZ 0x0014c817
MOV dword ptr [RSP + 0x24],0xffffffff
JMP 0x0014c836
LAB_0014c817:
MOV EDI,dword ptr [RSP + 0x14]
CALL 0x0017d4c0
MOV dword ptr [RSP + 0x14],EAX
LAB_0014c824:
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,dword ptr [RSP + 0x14]
CALL 0x0017d3d0
MOV dword ptr [RSP + 0x24],EAX
LAB_0014c836:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
int4 string_buffer_putc(int8 param_1,uint param_2)
{
int4 uVar1;
int iVar2;
uint local_14;
local_14 = param_2;
if (0xffff < param_2) {
uVar1 = get_hi_surrogate(param_2);
iVar2 = string_buffer_putc16(param_1,uVar1);
if (iVar2 != 0) {
return 0xffffffff;
}
local_14 = get_lo_surrogate(param_2);
}
uVar1 = string_buffer_putc16(param_1,local_14);
return uVar1;
}
|
|
16,437
|
string_buffer_putc
|
bluesky950520[P]quickjs/quickjs.c
|
static int string_buffer_putc(StringBuffer *s, uint32_t c)
{
if (unlikely(c >= 0x10000)) {
/* surrogate pair */
if (string_buffer_putc16(s, get_hi_surrogate(c)))
return -1;
c = get_lo_surrogate(c);
}
return string_buffer_putc16(s, c);
}
|
O3
|
c
|
string_buffer_putc:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
cmpl $0x10000, %esi # imm = 0x10000
jae 0x33643
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4886d
movl %ebx, %esi
shrl $0xa, %esi
addl $0xd7c0, %esi # imm = 0xD7C0
movq %r14, %rdi
callq 0x4886d
testl %eax, %eax
je 0x33667
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
andl $0x3ff, %ebx # imm = 0x3FF
orl $0xdc00, %ebx # imm = 0xDC00
jmp 0x33632
|
string_buffer_putc:
push r14
push rbx
push rax
mov ebx, esi
mov r14, rdi
cmp esi, offset loc_10000
jnb short loc_33643
loc_33632:
mov rdi, r14
mov esi, ebx
add rsp, 8
pop rbx
pop r14
jmp string_buffer_putc16
loc_33643:
mov esi, ebx
shr esi, 0Ah
add esi, 0D7C0h
mov rdi, r14
call string_buffer_putc16
test eax, eax
jz short loc_33667
mov eax, 0FFFFFFFFh
add rsp, 8
pop rbx
pop r14
retn
loc_33667:
and ebx, 3FFh
or ebx, 0DC00h
jmp short loc_33632
|
long long string_buffer_putc(long long a1, unsigned int a2)
{
unsigned int v2; // ebx
v2 = a2;
if ( a2 < (unsigned int)&loc_10000 )
return string_buffer_putc16(a1, v2);
if ( !(unsigned int)string_buffer_putc16(a1, (a2 >> 10) + 55232) )
{
v2 = a2 & 0x3FF | 0xDC00;
return string_buffer_putc16(a1, v2);
}
return 0xFFFFFFFFLL;
}
|
string_buffer_putc:
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
CMP ESI,0x10000
JNC 0x00133643
LAB_00133632:
MOV RDI,R14
MOV ESI,EBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0014886d
LAB_00133643:
MOV ESI,EBX
SHR ESI,0xa
ADD ESI,0xd7c0
MOV RDI,R14
CALL 0x0014886d
TEST EAX,EAX
JZ 0x00133667
MOV EAX,0xffffffff
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_00133667:
AND EBX,0x3ff
OR EBX,0xdc00
JMP 0x00133632
|
int8 string_buffer_putc(int8 param_1,uint param_2)
{
int iVar1;
int8 uVar2;
if (0xffff < param_2) {
iVar1 = string_buffer_putc16(param_1,(param_2 >> 10) + 0xd7c0);
if (iVar1 != 0) {
return 0xffffffff;
}
param_2 = param_2 & 0x3ff | 0xdc00;
}
uVar2 = string_buffer_putc16(param_1,param_2);
return uVar2;
}
|
|
16,438
|
update_backward_delete_link
|
eloqsql/storage/myisam/mi_dynrec.c
|
static int update_backward_delete_link(MI_INFO *info, my_off_t delete_block,
my_off_t filepos)
{
MI_BLOCK_INFO block_info;
DBUG_ENTER("update_backward_delete_link");
if (delete_block != HA_OFFSET_ERROR)
{
block_info.second_read=0;
if (_mi_get_block_info(&block_info,info->dfile,delete_block)
& BLOCK_DELETED)
{
uchar buff[8];
mi_sizestore(buff,filepos);
if (info->s->file_write(info,buff, 8, delete_block+12, MYF(MY_NABP)))
DBUG_RETURN(1); /* Error on write */
}
else
{
my_errno=HA_ERR_WRONG_IN_RECORD;
DBUG_RETURN(1); /* Wrong delete link */
}
}
DBUG_RETURN(0);
}
|
O3
|
c
|
update_backward_delete_link:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
cmpq $-0x1, %rsi
je 0x78574
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x78(%rbp), %rdi
movl $0x0, 0x50(%rdi)
movl 0x1c0(%r14), %esi
movq %rbx, %rdx
callq 0x77fdf
testb $0x4, %al
jne 0x7853f
callq 0xa16ee
movl $0x7f, (%rax)
movl $0x1, %eax
jmp 0x78576
bswapq %r15
leaq -0x80(%rbp), %rsi
movq %r15, (%rsi)
movq (%r14), %rax
addq $0xc, %rbx
movl $0x8, %edx
movl $0x4, %r8d
movq %r14, %rdi
movq %rbx, %rcx
callq *0x2e8(%rax)
movq %rax, %rcx
movl $0x1, %eax
testq %rcx, %rcx
jne 0x78576
xorl %eax, %eax
movq %fs:0x28, %rcx
cmpq -0x20(%rbp), %rcx
jne 0x78590
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
|
update_backward_delete_link_0:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 68h
mov rax, fs:28h
mov [rbp+var_20], rax
cmp rsi, 0FFFFFFFFFFFFFFFFh
jz short loc_78574
mov r15, rdx
mov rbx, rsi
mov r14, rdi
lea rdi, [rbp+var_78]
mov dword ptr [rdi+50h], 0
mov esi, [r14+1C0h]
mov rdx, rbx
call _mi_get_block_info
test al, 4
jnz short loc_7853F
call _my_thread_var
mov dword ptr [rax], 7Fh
mov eax, 1
jmp short loc_78576
loc_7853F:
bswap r15
lea rsi, [rbp+var_80]
mov [rsi], r15
mov rax, [r14]
add rbx, 0Ch
mov edx, 8
mov r8d, 4
mov rdi, r14
mov rcx, rbx
call qword ptr [rax+2E8h]
mov rcx, rax
mov eax, 1
test rcx, rcx
jnz short loc_78576
loc_78574:
xor eax, eax
loc_78576:
mov rcx, fs:28h
cmp rcx, [rbp+var_20]
jnz short loc_78590
add rsp, 68h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_78590:
call ___stack_chk_fail
|
long long update_backward_delete_link_0(unsigned int *a1, long long a2, unsigned long long a3)
{
unsigned long long v5; // rsi
long long result; // rax
long long v7; // rcx
unsigned long long v8; // [rsp+0h] [rbp-80h] BYREF
_BYTE v9[80]; // [rsp+8h] [rbp-78h] BYREF
int v10; // [rsp+58h] [rbp-28h]
unsigned long long v11; // [rsp+60h] [rbp-20h]
v11 = __readfsqword(0x28u);
if ( a2 == -1 )
return 0LL;
v10 = 0;
v5 = a1[112];
if ( (mi_get_block_info((long long)v9, v5, a2) & 4) == 0 )
{
*(_DWORD *)my_thread_var(v9, (const char *)v5) = 127;
return 1LL;
}
v8 = _byteswap_uint64(a3);
v7 = (*(long long ( **)(unsigned int *, unsigned long long *, long long, long long, long long))(*(_QWORD *)a1 + 744LL))(
a1,
&v8,
8LL,
a2 + 12,
4LL);
result = 1LL;
if ( !v7 )
return 0LL;
return result;
}
|
update_backward_delete_link:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x68
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RAX
CMP RSI,-0x1
JZ 0x00178574
MOV R15,RDX
MOV RBX,RSI
MOV R14,RDI
LEA RDI,[RBP + -0x78]
MOV dword ptr [RDI + 0x50],0x0
MOV ESI,dword ptr [R14 + 0x1c0]
MOV RDX,RBX
CALL 0x00177fdf
TEST AL,0x4
JNZ 0x0017853f
CALL 0x001a16ee
MOV dword ptr [RAX],0x7f
MOV EAX,0x1
JMP 0x00178576
LAB_0017853f:
BSWAP R15
LEA RSI,[RBP + -0x80]
MOV qword ptr [RSI],R15
MOV RAX,qword ptr [R14]
ADD RBX,0xc
MOV EDX,0x8
MOV R8D,0x4
MOV RDI,R14
MOV RCX,RBX
CALL qword ptr [RAX + 0x2e8]
MOV RCX,RAX
MOV EAX,0x1
TEST RCX,RCX
JNZ 0x00178576
LAB_00178574:
XOR EAX,EAX
LAB_00178576:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x20]
JNZ 0x00178590
ADD RSP,0x68
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00178590:
CALL 0x00129270
|
int8 update_backward_delete_link(long *param_1,long param_2,ulong param_3)
{
ulong uVar1;
int4 *puVar2;
int8 uVar3;
long lVar4;
long in_FS_OFFSET;
ulong local_88;
int1 local_80 [80];
int4 local_30;
long local_28;
local_28 = *(long *)(in_FS_OFFSET + 0x28);
if (param_2 != -1) {
local_30 = 0;
uVar1 = _mi_get_block_info(local_80,(int)param_1[0x38],param_2);
if ((uVar1 & 4) == 0) {
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x7f;
uVar3 = 1;
goto LAB_00178576;
}
local_88 = param_3 >> 0x38 | (param_3 & 0xff000000000000) >> 0x28 |
(param_3 & 0xff0000000000) >> 0x18 | (param_3 & 0xff00000000) >> 8 |
(param_3 & 0xff000000) << 8 | (param_3 & 0xff0000) << 0x18 |
(param_3 & 0xff00) << 0x28 | param_3 << 0x38;
lVar4 = (**(code **)(*param_1 + 0x2e8))(param_1,&local_88,8,param_2 + 0xc,4);
uVar3 = 1;
if (lVar4 != 0) goto LAB_00178576;
}
uVar3 = 0;
LAB_00178576:
if (*(long *)(in_FS_OFFSET + 0x28) == local_28) {
return uVar3;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
16,439
|
reset_events_waits_by_class()
|
eloqsql/storage/perfschema/pfs_instr_class.cc
|
void reset_events_waits_by_class()
{
reset_file_class_io();
reset_socket_class_io();
global_idle_stat.reset();
global_table_io_stat.reset();
global_table_lock_stat.reset();
global_metadata_stat.reset();
}
|
O0
|
cpp
|
reset_events_waits_by_class():
pushq %rbp
movq %rsp, %rbp
callq 0x4fea0
callq 0x4ff00
leaq 0x3bc1cb(%rip), %rdi # 0x40c040
callq 0x2b3a0
leaq 0x3bc1ff(%rip), %rdi # 0x40c080
callq 0x50f30
leaq 0x3bc2b3(%rip), %rdi # 0x40c140
callq 0x50890
leaq 0x3bc427(%rip), %rdi # 0x40c2c0
callq 0x2b3a0
popq %rbp
retq
|
_Z27reset_events_waits_by_classv:
push rbp
mov rbp, rsp
call _Z19reset_file_class_iov; reset_file_class_io(void)
call _Z21reset_socket_class_iov; reset_socket_class_io(void)
lea rdi, global_idle_stat; this
call _ZN15PFS_single_stat5resetEv; PFS_single_stat::reset(void)
lea rdi, global_table_io_stat; this
call _ZN17PFS_table_io_stat5resetEv; PFS_table_io_stat::reset(void)
lea rdi, global_table_lock_stat; this
call _ZN19PFS_table_lock_stat5resetEv; PFS_table_lock_stat::reset(void)
lea rdi, global_metadata_stat; this
call _ZN15PFS_single_stat5resetEv; PFS_single_stat::reset(void)
pop rbp
retn
|
PFS_single_stat *reset_events_waits_by_class(void)
{
reset_file_class_io();
reset_socket_class_io();
PFS_single_stat::reset((PFS_single_stat *)&global_idle_stat);
PFS_table_io_stat::reset((PFS_table_io_stat *)&global_table_io_stat);
PFS_table_lock_stat::reset((PFS_table_lock_stat *)&global_table_lock_stat);
return PFS_single_stat::reset((PFS_single_stat *)&global_metadata_stat);
}
|
reset_events_waits_by_class:
PUSH RBP
MOV RBP,RSP
CALL 0x0014fea0
CALL 0x0014ff00
LEA RDI,[0x50c040]
CALL 0x0012b3a0
LEA RDI,[0x50c080]
CALL 0x00150f30
LEA RDI,[0x50c140]
CALL 0x00150890
LEA RDI,[0x50c2c0]
CALL 0x0012b3a0
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* reset_events_waits_by_class() */
void reset_events_waits_by_class(void)
{
reset_file_class_io();
reset_socket_class_io();
PFS_single_stat::reset((PFS_single_stat *)global_idle_stat);
PFS_table_io_stat::reset((PFS_table_io_stat *)global_table_io_stat);
PFS_table_lock_stat::reset((PFS_table_lock_stat *)global_table_lock_stat);
PFS_single_stat::reset((PFS_single_stat *)global_metadata_stat);
return;
}
|
|
16,440
|
hp_search_next
|
eloqsql/storage/heap/hp_hash.c
|
uchar *hp_search_next(HP_INFO *info, HP_KEYDEF *keyinfo, const uchar *key,
HASH_INFO *pos)
{
DBUG_ENTER("hp_search_next");
while ((pos= pos->next_key))
{
if (! hp_key_cmp(keyinfo, pos->ptr_to_rec, key))
{
info->current_hash_ptr=pos;
DBUG_RETURN (info->current_ptr= pos->ptr_to_rec);
}
}
my_errno=HA_ERR_KEY_NOT_FOUND;
DBUG_PRINT("exit",("Error: %d",my_errno));
info->current_hash_ptr=0;
DBUG_RETURN ((info->current_ptr= 0));
}
|
O3
|
c
|
hp_search_next:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq (%r14), %r14
testq %r14, %r14
je 0x2715a
movq 0x8(%r14), %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0x26e94
testl %eax, %eax
jne 0x27131
movq %r14, 0x10(%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rbx)
jmp 0x2716e
callq 0x2a59a
movl $0x78, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
hp_search_next:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov rbx, rdi
loc_27131:
mov r14, [r14]
test r14, r14
jz short loc_2715A
mov rsi, [r14+8]
mov rdi, r12
mov rdx, r15
call hp_key_cmp
test eax, eax
jnz short loc_27131
mov [rbx+10h], r14
mov rax, [r14+8]
mov [rbx+8], rax
jmp short loc_2716E
loc_2715A:
call _my_thread_var
mov dword ptr [rax], 78h ; 'x'
xorps xmm0, xmm0
movups xmmword ptr [rbx+8], xmm0
xor eax, eax
loc_2716E:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long hp_search_next(long long a1, long long a2, _BYTE *a3, _QWORD *a4)
{
long long v6; // r12
long long v7; // rbx
long long result; // rax
v6 = a2;
v7 = a1;
while ( 1 )
{
a4 = (_QWORD *)*a4;
if ( !a4 )
break;
a2 = a4[1];
a1 = v6;
if ( !(unsigned int)hp_key_cmp(v6, a2, a3) )
{
*(_QWORD *)(v7 + 16) = a4;
result = a4[1];
*(_QWORD *)(v7 + 8) = result;
return result;
}
}
*(_DWORD *)my_thread_var(a1, a2) = 120;
*(_OWORD *)(v7 + 8) = 0LL;
return 0LL;
}
|
hp_search_next:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
LAB_00127131:
MOV R14,qword ptr [R14]
TEST R14,R14
JZ 0x0012715a
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,R12
MOV RDX,R15
CALL 0x00126e94
TEST EAX,EAX
JNZ 0x00127131
MOV qword ptr [RBX + 0x10],R14
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RBX + 0x8],RAX
JMP 0x0012716e
LAB_0012715a:
CALL 0x0012a59a
MOV dword ptr [RAX],0x78
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x8],XMM0
XOR EAX,EAX
LAB_0012716e:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 hp_search_next(long param_1,int8 param_2,int8 param_3,long *param_4)
{
int8 uVar1;
int iVar2;
int4 *puVar3;
do {
param_4 = (long *)*param_4;
if (param_4 == (long *)0x0) {
puVar3 = (int4 *)_my_thread_var();
*puVar3 = 0x78;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
return 0;
}
iVar2 = hp_key_cmp(param_2,param_4[1],param_3);
} while (iVar2 != 0);
*(long **)(param_1 + 0x10) = param_4;
uVar1 = param_4[1];
*(int8 *)(param_1 + 8) = uVar1;
return uVar1;
}
|
|
16,441
|
get_first_set
|
eloqsql/mysys/my_bitmap.c
|
static inline uint get_first_set(my_bitmap_map value, uint word_pos)
{
uchar *byte_ptr= (uchar*)&value;
uchar byte_value;
uint byte_pos, bit_pos;
DBUG_ASSERT(value);
for (byte_pos=0; ; byte_pos++, byte_ptr++)
{
if ((byte_value= *byte_ptr))
{
for (bit_pos=0; ; bit_pos++)
if (byte_value & (1 << bit_pos))
return (word_pos*32) + (byte_pos*8) + bit_pos;
}
}
return MY_BIT_NONE; /* Impossible */
}
|
O0
|
c
|
get_first_set:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
leaq -0x4(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0xeead4
movl $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movb (%rax), %al
movb %al, -0x11(%rbp)
cmpb $0x0, %al
je 0xeeb26
movl $0x0, -0x1c(%rbp)
movzbl -0x11(%rbp), %eax
movl -0x1c(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0xeeb19
movl -0x8(%rbp), %eax
shll $0x5, %eax
movl -0x18(%rbp), %ecx
shll $0x3, %ecx
addl %ecx, %eax
addl -0x1c(%rbp), %eax
popq %rbp
retq
jmp 0xeeb1b
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xeeaef
jmp 0xeeb28
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0xeeadb
nop
|
get_first_set:
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov [rbp+var_8], esi
lea rax, [rbp+var_4]
mov [rbp+var_10], rax
jmp short $+2
loc_EEAD4:
mov [rbp+var_18], 0
loc_EEADB:
mov rax, [rbp+var_10]
mov al, [rax]
mov [rbp+var_11], al
cmp al, 0
jz short loc_EEB26
mov [rbp+var_1C], 0
loc_EEAEF:
movzx eax, [rbp+var_11]
mov ecx, [rbp+var_1C]
mov edx, 1
shl edx, cl
mov ecx, edx
and eax, ecx
cmp eax, 0
jz short loc_EEB19
mov eax, [rbp+var_8]
shl eax, 5
mov ecx, [rbp+var_18]
shl ecx, 3
add eax, ecx
add eax, [rbp+var_1C]
pop rbp
retn
loc_EEB19:
jmp short $+2
loc_EEB1B:
mov eax, [rbp+var_1C]
add eax, 1
mov [rbp+var_1C], eax
jmp short loc_EEAEF
loc_EEB26:
jmp short $+2
loc_EEB28:
mov eax, [rbp+var_18]
add eax, 1
mov [rbp+var_18], eax
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_EEADB
|
long long get_first_set(int a1, int a2)
{
int i; // [rsp+0h] [rbp-1Ch]
int v4; // [rsp+4h] [rbp-18h]
int *v5; // [rsp+Ch] [rbp-10h]
int v6; // [rsp+18h] [rbp-4h] BYREF
v6 = a1;
v5 = &v6;
v4 = 0;
while ( !*(_BYTE *)v5 )
{
++v4;
v5 = (int *)((char *)v5 + 1);
}
for ( i = 0; ((1 << i) & *(unsigned __int8 *)v5) == 0; ++i )
;
return (unsigned int)(i + 8 * v4 + 32 * a2);
}
|
get_first_set:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV dword ptr [RBP + -0x8],ESI
LEA RAX,[RBP + -0x4]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001eead4
LAB_001eead4:
MOV dword ptr [RBP + -0x18],0x0
LAB_001eeadb:
MOV RAX,qword ptr [RBP + -0x10]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x11],AL
CMP AL,0x0
JZ 0x001eeb26
MOV dword ptr [RBP + -0x1c],0x0
LAB_001eeaef:
MOVZX EAX,byte ptr [RBP + -0x11]
MOV ECX,dword ptr [RBP + -0x1c]
MOV EDX,0x1
SHL EDX,CL
MOV ECX,EDX
AND EAX,ECX
CMP EAX,0x0
JZ 0x001eeb19
MOV EAX,dword ptr [RBP + -0x8]
SHL EAX,0x5
MOV ECX,dword ptr [RBP + -0x18]
SHL ECX,0x3
ADD EAX,ECX
ADD EAX,dword ptr [RBP + -0x1c]
POP RBP
RET
LAB_001eeb19:
JMP 0x001eeb1b
LAB_001eeb1b:
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x001eeaef
LAB_001eeb26:
JMP 0x001eeb28
LAB_001eeb28:
MOV EAX,dword ptr [RBP + -0x18]
ADD EAX,0x1
MOV dword ptr [RBP + -0x18],EAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001eeadb
|
int get_first_set(int8 param_1,int param_2)
{
int local_24;
int local_20;
byte *local_18;
byte local_c [4];
local_20 = 0;
for (local_18 = local_c; *local_18 == 0; local_18 = local_18 + 1) {
local_20 = local_20 + 1;
}
local_24 = 0;
while (((uint)*local_18 & 1 << ((byte)local_24 & 0x1f)) == 0) {
local_24 = local_24 + 1;
}
return param_2 * 0x20 + local_20 * 8 + local_24;
}
|
|
16,442
|
OpenSubdiv::v3_6_0::Far::SourcePatch::GetCornerRingPoints(int, int*) const
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchBuilder.cpp
|
int
SourcePatch::GetCornerRingPoints(int corner, int ringPoints[]) const {
bool isQuad = (_numCorners == 4);
int cNext = fastModN(corner + 1, _numCorners);
int cOpp = fastModN(corner + 1 + isQuad, _numCorners);
int cPrev = fastModN(corner + 2 + isQuad, _numCorners);
//
// Assemble the ring in a canonical ordering beginning with the points of
// the 2 or 3 other corners of the face followed by the local ring -- with
// any shared or compensating points (for valence-2 interior) preceding
// and following the points local to the ring.
//
int ringSize = 0;
// The adjacent corner points:
ringPoints[ringSize++] = cNext;
if (isQuad) {
ringPoints[ringSize++] = cOpp;
}
ringPoints[ringSize++] = cPrev;
// Shared points preceding the local ring points:
if (_corners[cPrev]._val2Interior) {
ringPoints[ringSize++] = isQuad ? cOpp : cNext;
}
if (_corners[corner]._sharesWithPrev) {
ringPoints[ringSize++] = _localRingOffsets[cPrev] + _localRingSizes[cPrev] - 1;
}
// The local ring points:
for (int i = 0; i < _localRingSizes[corner]; ++i) {
ringPoints[ringSize++] = _localRingOffsets[corner] + i;
}
// Shared points following the local ring points:
if (isQuad) {
if (_corners[corner]._sharesWithNext) {
ringPoints[ringSize++] = _localRingOffsets[cNext];
}
if (_corners[cNext]._val2Interior) {
ringPoints[ringSize++] = cOpp;
}
} else {
if (_corners[corner]._sharesWithNext) {
if (_corners[cNext]._val2Interior) {
ringPoints[ringSize++] = cPrev;
} else if (_localRingSizes[cNext] == 0) {
ringPoints[ringSize++] = _localRingOffsets[cPrev];
} else {
ringPoints[ringSize++] = _localRingOffsets[cNext];
}
}
}
assert(ringSize == _ringSizes[corner]);
// The assembled ordering matches the desired ordering if the patch-face
// is first, so rotate the assembled ring if that's not the case:
//
if (_corners[corner]._patchFace) {
int rotationOffset = ringSize - (1 + isQuad) * _corners[corner]._patchFace;
std::rotate(ringPoints, ringPoints + rotationOffset, ringPoints + ringSize);
}
return ringSize;
}
|
O0
|
cpp
|
OpenSubdiv::v3_6_0::Far::SourcePatch::GetCornerRingPoints(int, int*) const:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpl $0x4, 0x18(%rax)
sete %cl
andb $0x1, %cl
movb %cl, -0x19(%rbp)
movl -0xc(%rbp), %edi
addl $0x1, %edi
movl 0x18(%rax), %esi
callq 0x138860
movl %eax, %ecx
movq -0x40(%rbp), %rax
movl %ecx, -0x20(%rbp)
movl -0xc(%rbp), %edi
addl $0x1, %edi
movb -0x19(%rbp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %edi
movl 0x18(%rax), %esi
callq 0x138860
movl %eax, %ecx
movq -0x40(%rbp), %rax
movl %ecx, -0x24(%rbp)
movl -0xc(%rbp), %edi
addl $0x2, %edi
movb -0x19(%rbp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %edi
movl 0x18(%rax), %esi
callq 0x138860
movl %eax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x20(%rbp), %edx
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x2c(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
testb $0x1, -0x19(%rbp)
je 0x139b7a
movl -0x24(%rbp), %edx
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x2c(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movq -0x40(%rbp), %rax
movl -0x28(%rbp), %esi
movq -0x18(%rbp), %rcx
movl -0x2c(%rbp), %edx
movl %edx, %edi
addl $0x1, %edi
movl %edi, -0x2c(%rbp)
movslq %edx, %rdx
movl %esi, (%rcx,%rdx,4)
movslq -0x28(%rbp), %rcx
imulq $0x6, %rcx, %rcx
addq %rcx, %rax
movb 0x4(%rax), %al
shrb $0x5, %al
andb $0x1, %al
movzbl %al, %eax
cmpw $0x0, %ax
je 0x139bde
testb $0x1, -0x19(%rbp)
je 0x139bc0
movl -0x24(%rbp), %eax
movl %eax, -0x44(%rbp)
jmp 0x139bc6
movl -0x20(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %edx
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x2c(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movq -0x40(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x6, %rcx, %rcx
addq %rcx, %rax
movb 0x4(%rax), %al
shrb $0x3, %al
andb $0x1, %al
movzbl %al, %eax
cmpw $0x0, %ax
je 0x139c2a
movq -0x40(%rbp), %rax
movslq -0x28(%rbp), %rcx
movl 0x48(%rax,%rcx,4), %edx
movslq -0x28(%rbp), %rcx
addl 0x38(%rax,%rcx,4), %edx
subl $0x1, %edx
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x2c(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl $0x0, -0x30(%rbp)
movq -0x40(%rbp), %rcx
movl -0x30(%rbp), %eax
movslq -0xc(%rbp), %rdx
cmpl 0x38(%rcx,%rdx,4), %eax
jge 0x139c71
movq -0x40(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl 0x48(%rax,%rcx,4), %edx
addl -0x30(%rbp), %edx
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x2c(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x139c31
testb $0x1, -0x19(%rbp)
je 0x139cf5
movq -0x40(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x6, %rcx, %rcx
addq %rcx, %rax
movb 0x4(%rax), %al
shrb $0x4, %al
andb $0x1, %al
movzbl %al, %eax
cmpw $0x0, %ax
je 0x139cb8
movq -0x40(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl 0x48(%rax,%rcx,4), %edx
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x2c(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movq -0x40(%rbp), %rax
movslq -0x20(%rbp), %rcx
imulq $0x6, %rcx, %rcx
addq %rcx, %rax
movb 0x4(%rax), %al
shrb $0x5, %al
andb $0x1, %al
movzbl %al, %eax
cmpw $0x0, %ax
je 0x139cf0
movl -0x24(%rbp), %edx
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x2c(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x139dac
movq -0x40(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x6, %rcx, %rcx
addq %rcx, %rax
movb 0x4(%rax), %al
shrb $0x4, %al
andb $0x1, %al
movzbl %al, %eax
cmpw $0x0, %ax
je 0x139daa
movq -0x40(%rbp), %rax
movslq -0x20(%rbp), %rcx
imulq $0x6, %rcx, %rcx
addq %rcx, %rax
movb 0x4(%rax), %al
shrb $0x5, %al
andb $0x1, %al
movzbl %al, %eax
cmpw $0x0, %ax
je 0x139d53
movl -0x28(%rbp), %edx
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x2c(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x139da8
movq -0x40(%rbp), %rax
movslq -0x20(%rbp), %rcx
cmpl $0x0, 0x38(%rax,%rcx,4)
jne 0x139d85
movq -0x40(%rbp), %rax
movslq -0x28(%rbp), %rcx
movl 0x48(%rax,%rcx,4), %edx
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x2c(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x139da6
movq -0x40(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl 0x48(%rax,%rcx,4), %edx
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x2c(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x139da8
jmp 0x139daa
jmp 0x139dac
movq -0x40(%rbp), %rcx
movl -0x2c(%rbp), %eax
movslq -0xc(%rbp), %rdx
cmpl 0x28(%rcx,%rdx,4), %eax
jne 0x139dbf
jmp 0x139dde
leaq 0xb651b(%rip), %rdi # 0x1f02e1
leaq 0xb62ed(%rip), %rsi # 0x1f00ba
movl $0x650, %edx # imm = 0x650
leaq 0xb6527(%rip), %rcx # 0x1f0300
callq 0xc9440
movq -0x40(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x6, %rcx, %rcx
addq %rcx, %rax
cmpw $0x0, 0x2(%rax)
je 0x139e45
movq -0x40(%rbp), %rdx
movl -0x2c(%rbp), %eax
movb -0x19(%rbp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
addl $0x1, %ecx
movslq -0xc(%rbp), %rsi
imulq $0x6, %rsi, %rsi
addq %rsi, %rdx
movzwl 0x2(%rdx), %edx
imull %edx, %ecx
subl %ecx, %eax
movl %eax, -0x34(%rbp)
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rsi
movslq -0x34(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rsi
movq -0x18(%rbp), %rdx
movslq -0x2c(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rdx
callq 0xc7b80
movl -0x2c(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nop
|
_ZNK10OpenSubdiv6v3_6_03Far11SourcePatch19GetCornerRingPointsEiPi:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov [rbp+var_40], rax
cmp dword ptr [rax+18h], 4
setz cl
and cl, 1
mov [rbp+var_19], cl
mov edi, [rbp+var_C]
add edi, 1; this
mov esi, [rax+18h]; int
call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_18fastModNEii; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::fastModN(int,int)
mov ecx, eax
mov rax, [rbp+var_40]
mov [rbp+var_20], ecx
mov edi, [rbp+var_C]
add edi, 1
mov cl, [rbp+var_19]
and cl, 1
movzx ecx, cl
add edi, ecx; this
mov esi, [rax+18h]; int
call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_18fastModNEii; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::fastModN(int,int)
mov ecx, eax
mov rax, [rbp+var_40]
mov [rbp+var_24], ecx
mov edi, [rbp+var_C]
add edi, 2
mov cl, [rbp+var_19]
and cl, 1
movzx ecx, cl
add edi, ecx; this
mov esi, [rax+18h]; int
call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_18fastModNEii; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::fastModN(int,int)
mov [rbp+var_28], eax
mov [rbp+var_2C], 0
mov edx, [rbp+var_20]
mov rax, [rbp+var_18]
mov ecx, [rbp+var_2C]
mov esi, ecx
add esi, 1
mov [rbp+var_2C], esi
movsxd rcx, ecx
mov [rax+rcx*4], edx
test [rbp+var_19], 1
jz short loc_139B7A
mov edx, [rbp+var_24]
mov rax, [rbp+var_18]
mov ecx, [rbp+var_2C]
mov esi, ecx
add esi, 1
mov [rbp+var_2C], esi
movsxd rcx, ecx
mov [rax+rcx*4], edx
loc_139B7A:
mov rax, [rbp+var_40]
mov esi, [rbp+var_28]
mov rcx, [rbp+var_18]
mov edx, [rbp+var_2C]
mov edi, edx
add edi, 1
mov [rbp+var_2C], edi
movsxd rdx, edx
mov [rcx+rdx*4], esi
movsxd rcx, [rbp+var_28]
imul rcx, 6
add rax, rcx
mov al, [rax+4]
shr al, 5
and al, 1
movzx eax, al
cmp ax, 0
jz short loc_139BDE
test [rbp+var_19], 1
jz short loc_139BC0
mov eax, [rbp+var_24]
mov [rbp+var_44], eax
jmp short loc_139BC6
loc_139BC0:
mov eax, [rbp+var_20]
mov [rbp+var_44], eax
loc_139BC6:
mov edx, [rbp+var_44]
mov rax, [rbp+var_18]
mov ecx, [rbp+var_2C]
mov esi, ecx
add esi, 1
mov [rbp+var_2C], esi
movsxd rcx, ecx
mov [rax+rcx*4], edx
loc_139BDE:
mov rax, [rbp+var_40]
movsxd rcx, [rbp+var_C]
imul rcx, 6
add rax, rcx
mov al, [rax+4]
shr al, 3
and al, 1
movzx eax, al
cmp ax, 0
jz short loc_139C2A
mov rax, [rbp+var_40]
movsxd rcx, [rbp+var_28]
mov edx, [rax+rcx*4+48h]
movsxd rcx, [rbp+var_28]
add edx, [rax+rcx*4+38h]
sub edx, 1
mov rax, [rbp+var_18]
mov ecx, [rbp+var_2C]
mov esi, ecx
add esi, 1
mov [rbp+var_2C], esi
movsxd rcx, ecx
mov [rax+rcx*4], edx
loc_139C2A:
mov [rbp+var_30], 0
loc_139C31:
mov rcx, [rbp+var_40]
mov eax, [rbp+var_30]
movsxd rdx, [rbp+var_C]
cmp eax, [rcx+rdx*4+38h]
jge short loc_139C71
mov rax, [rbp+var_40]
movsxd rcx, [rbp+var_C]
mov edx, [rax+rcx*4+48h]
add edx, [rbp+var_30]
mov rax, [rbp+var_18]
mov ecx, [rbp+var_2C]
mov esi, ecx
add esi, 1
mov [rbp+var_2C], esi
movsxd rcx, ecx
mov [rax+rcx*4], edx
mov eax, [rbp+var_30]
add eax, 1
mov [rbp+var_30], eax
jmp short loc_139C31
loc_139C71:
test [rbp+var_19], 1
jz short loc_139CF5
mov rax, [rbp+var_40]
movsxd rcx, [rbp+var_C]
imul rcx, 6
add rax, rcx
mov al, [rax+4]
shr al, 4
and al, 1
movzx eax, al
cmp ax, 0
jz short loc_139CB8
mov rax, [rbp+var_40]
movsxd rcx, [rbp+var_20]
mov edx, [rax+rcx*4+48h]
mov rax, [rbp+var_18]
mov ecx, [rbp+var_2C]
mov esi, ecx
add esi, 1
mov [rbp+var_2C], esi
movsxd rcx, ecx
mov [rax+rcx*4], edx
loc_139CB8:
mov rax, [rbp+var_40]
movsxd rcx, [rbp+var_20]
imul rcx, 6
add rax, rcx
mov al, [rax+4]
shr al, 5
and al, 1
movzx eax, al
cmp ax, 0
jz short loc_139CF0
mov edx, [rbp+var_24]
mov rax, [rbp+var_18]
mov ecx, [rbp+var_2C]
mov esi, ecx
add esi, 1
mov [rbp+var_2C], esi
movsxd rcx, ecx
mov [rax+rcx*4], edx
loc_139CF0:
jmp loc_139DAC
loc_139CF5:
mov rax, [rbp+var_40]
movsxd rcx, [rbp+var_C]
imul rcx, 6
add rax, rcx
mov al, [rax+4]
shr al, 4
and al, 1
movzx eax, al
cmp ax, 0
jz loc_139DAA
mov rax, [rbp+var_40]
movsxd rcx, [rbp+var_20]
imul rcx, 6
add rax, rcx
mov al, [rax+4]
shr al, 5
and al, 1
movzx eax, al
cmp ax, 0
jz short loc_139D53
mov edx, [rbp+var_28]
mov rax, [rbp+var_18]
mov ecx, [rbp+var_2C]
mov esi, ecx
add esi, 1
mov [rbp+var_2C], esi
movsxd rcx, ecx
mov [rax+rcx*4], edx
jmp short loc_139DA8
loc_139D53:
mov rax, [rbp+var_40]
movsxd rcx, [rbp+var_20]
cmp dword ptr [rax+rcx*4+38h], 0
jnz short loc_139D85
mov rax, [rbp+var_40]
movsxd rcx, [rbp+var_28]
mov edx, [rax+rcx*4+48h]
mov rax, [rbp+var_18]
mov ecx, [rbp+var_2C]
mov esi, ecx
add esi, 1
mov [rbp+var_2C], esi
movsxd rcx, ecx
mov [rax+rcx*4], edx
jmp short loc_139DA6
loc_139D85:
mov rax, [rbp+var_40]
movsxd rcx, [rbp+var_20]
mov edx, [rax+rcx*4+48h]
mov rax, [rbp+var_18]
mov ecx, [rbp+var_2C]
mov esi, ecx
add esi, 1
mov [rbp+var_2C], esi
movsxd rcx, ecx
mov [rax+rcx*4], edx
loc_139DA6:
jmp short $+2
loc_139DA8:
jmp short $+2
loc_139DAA:
jmp short $+2
loc_139DAC:
mov rcx, [rbp+var_40]
mov eax, [rbp+var_2C]
movsxd rdx, [rbp+var_C]
cmp eax, [rcx+rdx*4+28h]
jnz short loc_139DBF
jmp short loc_139DDE
loc_139DBF:
lea rdi, aRingsizeRingsi; "ringSize == _ringSizes[corner]"
lea rsi, aWorkspaceLlm4b_12; "/workspace/llm4binary/github/2025_star3"...
mov edx, 650h
lea rcx, aIntOpensubdivV_16; "int OpenSubdiv::v3_6_0::Far::SourcePatc"...
call ___assert_fail
loc_139DDE:
mov rax, [rbp+var_40]
movsxd rcx, [rbp+var_C]
imul rcx, 6
add rax, rcx
cmp word ptr [rax+2], 0
jz short loc_139E45
mov rdx, [rbp+var_40]
mov eax, [rbp+var_2C]
mov cl, [rbp+var_19]
and cl, 1
movzx ecx, cl
add ecx, 1
movsxd rsi, [rbp+var_C]
imul rsi, 6
add rdx, rsi
movzx edx, word ptr [rdx+2]
imul ecx, edx
sub eax, ecx
mov [rbp+var_34], eax
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_18]
movsxd rax, [rbp+var_34]
shl rax, 2
add rsi, rax
mov rdx, [rbp+var_18]
movsxd rax, [rbp+var_2C]
shl rax, 2
add rdx, rax
call __ZNSt3_V26rotateIPiEET_S2_S2_S2_; std::_V2::rotate<int *>(int *,int *,int *)
loc_139E45:
mov eax, [rbp+var_2C]
add rsp, 50h
pop rbp
retn
|
long long OpenSubdiv::v3_6_0::Far::SourcePatch::GetCornerRingPoints(
OpenSubdiv::v3_6_0::Far::SourcePatch *this,
int a2,
int *a3)
{
int v3; // edx
unsigned int v4; // ecx
unsigned int v5; // ecx
unsigned int v6; // ecx
unsigned int v7; // ecx
unsigned int v8; // ecx
unsigned int v9; // ecx
int v10; // edx
unsigned int v11; // ecx
int v13; // [rsp+Ch] [rbp-44h]
int i; // [rsp+20h] [rbp-30h]
int v15; // [rsp+24h] [rbp-2Ch]
unsigned int v16; // [rsp+24h] [rbp-2Ch]
int v17; // [rsp+28h] [rbp-28h]
int v18; // [rsp+2Ch] [rbp-24h]
int v19; // [rsp+30h] [rbp-20h]
bool v20; // [rsp+37h] [rbp-19h]
v20 = *((_DWORD *)this + 6) == 4;
v19 = OpenSubdiv::v3_6_0::Far::`anonymous namespace'::fastModN(
(OpenSubdiv::v3_6_0::Far::_anonymous_namespace_ *)(unsigned int)(a2 + 1),
*((_DWORD *)this + 6));
v18 = OpenSubdiv::v3_6_0::Far::`anonymous namespace'::fastModN(
(OpenSubdiv::v3_6_0::Far::_anonymous_namespace_ *)((unsigned int)v20 + a2 + 1),
*((_DWORD *)this + 6));
v17 = OpenSubdiv::v3_6_0::Far::`anonymous namespace'::fastModN(
(OpenSubdiv::v3_6_0::Far::_anonymous_namespace_ *)((unsigned int)v20 + a2 + 2),
*((_DWORD *)this + 6));
v15 = 1;
*a3 = v19;
if ( v20 )
{
v15 = 2;
a3[1] = v18;
}
v3 = v15;
v16 = v15 + 1;
a3[v3] = v17;
if ( (*((_BYTE *)this + 6 * v17 + 4) & 0x20) != 0 )
{
if ( v20 )
v13 = v18;
else
v13 = v19;
v4 = v16++;
a3[v4] = v13;
}
if ( (*((_BYTE *)this + 6 * a2 + 4) & 8) != 0 )
{
v5 = v16++;
a3[v5] = *((_DWORD *)this + v17 + 14) + *((_DWORD *)this + v17 + 18) - 1;
}
for ( i = 0; i < *((_DWORD *)this + a2 + 14); ++i )
{
v6 = v16++;
a3[v6] = i + *((_DWORD *)this + a2 + 18);
}
if ( v20 )
{
if ( (*((_BYTE *)this + 6 * a2 + 4) & 0x10) != 0 )
{
v7 = v16++;
a3[v7] = *((_DWORD *)this + v19 + 18);
}
if ( (*((_BYTE *)this + 6 * v19 + 4) & 0x20) != 0 )
{
v8 = v16++;
a3[v8] = v18;
}
}
else if ( (*((_BYTE *)this + 6 * a2 + 4) & 0x10) != 0 )
{
if ( (*((_BYTE *)this + 6 * v19 + 4) & 0x20) != 0 )
{
v9 = v16++;
a3[v9] = v17;
}
else
{
if ( *((_DWORD *)this + v19 + 14) )
v10 = *((_DWORD *)this + v19 + 18);
else
v10 = *((_DWORD *)this + v17 + 18);
v11 = v16++;
a3[v11] = v10;
}
}
if ( v16 != *((_DWORD *)this + a2 + 10) )
__assert_fail(
"ringSize == _ringSizes[corner]",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchBuilder.cpp",
1616LL,
"int OpenSubdiv::v3_6_0::Far::SourcePatch::GetCornerRingPoints(int, int *) const");
if ( *((_WORD *)this + 3 * a2 + 1) )
std::_V2::rotate<int *>(a3, &a3[v16 - *((unsigned __int16 *)this + 3 * a2 + 1) * (v20 + 1)], &a3[v16]);
return v16;
}
| |||
16,443
|
OpenSubdiv::v3_6_0::Far::SourcePatch::GetCornerRingPoints(int, int*) const
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchBuilder.cpp
|
int
SourcePatch::GetCornerRingPoints(int corner, int ringPoints[]) const {
bool isQuad = (_numCorners == 4);
int cNext = fastModN(corner + 1, _numCorners);
int cOpp = fastModN(corner + 1 + isQuad, _numCorners);
int cPrev = fastModN(corner + 2 + isQuad, _numCorners);
//
// Assemble the ring in a canonical ordering beginning with the points of
// the 2 or 3 other corners of the face followed by the local ring -- with
// any shared or compensating points (for valence-2 interior) preceding
// and following the points local to the ring.
//
int ringSize = 0;
// The adjacent corner points:
ringPoints[ringSize++] = cNext;
if (isQuad) {
ringPoints[ringSize++] = cOpp;
}
ringPoints[ringSize++] = cPrev;
// Shared points preceding the local ring points:
if (_corners[cPrev]._val2Interior) {
ringPoints[ringSize++] = isQuad ? cOpp : cNext;
}
if (_corners[corner]._sharesWithPrev) {
ringPoints[ringSize++] = _localRingOffsets[cPrev] + _localRingSizes[cPrev] - 1;
}
// The local ring points:
for (int i = 0; i < _localRingSizes[corner]; ++i) {
ringPoints[ringSize++] = _localRingOffsets[corner] + i;
}
// Shared points following the local ring points:
if (isQuad) {
if (_corners[corner]._sharesWithNext) {
ringPoints[ringSize++] = _localRingOffsets[cNext];
}
if (_corners[cNext]._val2Interior) {
ringPoints[ringSize++] = cOpp;
}
} else {
if (_corners[corner]._sharesWithNext) {
if (_corners[cNext]._val2Interior) {
ringPoints[ringSize++] = cPrev;
} else if (_localRingSizes[cNext] == 0) {
ringPoints[ringSize++] = _localRingOffsets[cPrev];
} else {
ringPoints[ringSize++] = _localRingOffsets[cNext];
}
}
}
assert(ringSize == _ringSizes[corner]);
// The assembled ordering matches the desired ordering if the patch-face
// is first, so rotate the assembled ring if that's not the case:
//
if (_corners[corner]._patchFace) {
int rotationOffset = ringSize - (1 + isQuad) * _corners[corner]._patchFace;
std::rotate(ringPoints, ringPoints + rotationOffset, ringPoints + ringSize);
}
return ringSize;
}
|
O2
|
cpp
|
OpenSubdiv::v3_6_0::Far::SourcePatch::GetCornerRingPoints(int, int*) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x18(%rdi), %r9d
xorl %ecx, %ecx
cmpl $0x4, %r9d
sete %cl
leal 0x1(%rsi), %eax
xorl %r11d, %r11d
cmpl %r9d, %eax
movl %r9d, %eax
cmovll %r11d, %eax
negl %eax
leal (%rsi,%rcx), %r8d
incl %r8d
cmpl %r9d, %r8d
movl %r9d, %r10d
cmovll %r11d, %r10d
subl %r10d, %r8d
leal (%rsi,%rcx), %r10d
addl $0x2, %r10d
cmpl %r9d, %r10d
cmovgel %r9d, %r11d
subl %r11d, %r10d
leal (%rsi,%rax), %r11d
incl %r11d
movl %r11d, (%rdx)
cmpl $0x4, %r9d
jne 0x7a26c
movl %r8d, 0x4(%rdx)
pushq $0x2
jmp 0x7a26e
pushq $0x1
popq %rax
leal 0x1(%rax), %ebx
movl %eax, %r14d
movl %r10d, (%rdx,%r14,4)
movslq %r10d, %r14
imulq $0x6, %r14, %r15
testb $0x20, 0x4(%rdi,%r15)
je 0x7a29d
cmpl $0x4, %r9d
movl %r11d, %ebp
cmovel %r8d, %ebp
addl $0x2, %eax
movl %ebx, %ebx
movl %ebp, (%rdx,%rbx,4)
movl %eax, %ebx
movslq %esi, %rsi
imulq $0x6, %rsi, %rax
testb $0x8, 0x4(%rdi,%rax)
je 0x7a2c4
movl 0x38(%rdi,%r14,4), %r15d
movl 0x48(%rdi,%r14,4), %r12d
leal (%r12,%r15), %ebp
decl %ebp
movl %ebx, %r15d
incl %ebx
movl %ebp, (%rdx,%r15,4)
addq %rdi, %rax
movl %ebx, %ebx
movq %rbx, %r15
shlq $0x20, %r15
xorl %ebp, %ebp
movabsq $0x100000000, %r12 # imm = 0x100000000
cmpl 0x38(%rdi,%rsi,4), %ebp
jge 0x7a2f8
movl 0x48(%rdi,%rsi,4), %r13d
addl %ebp, %r13d
movl %r13d, (%rdx,%rbx,4)
incq %rbx
incl %ebp
addq %r12, %r15
jmp 0x7a2dc
movb 0x4(%rax), %bpl
cmpl $0x4, %r9d
jne 0x7a331
movslq %r11d, %r9
testb $0x10, %bpl
je 0x7a31a
movl 0x48(%rdi,%r9,4), %r10d
incl %ebx
sarq $0x1e, %r15
movl %r10d, (%rdx,%r15)
imulq $0x6, %r9, %r9
testb $0x20, 0x4(%rdi,%r9)
je 0x7a371
movslq %ebx, %r9
incl %ebx
movl %r8d, (%rdx,%r9,4)
jmp 0x7a371
testb $0x10, %bpl
je 0x7a371
movslq %r11d, %r8
imulq $0x6, %r8, %r9
testb $0x20, 0x4(%rdi,%r9)
jne 0x7a35c
incq %rbx
sarq $0x1e, %r15
cmpl $0x0, 0x38(%rdi,%r8,4)
je 0x7a368
movl 0x48(%rdi,%r8,4), %r8d
jmp 0x7a36d
incl %ebx
sarq $0x1e, %r15
movl %r10d, (%rdx,%r15)
jmp 0x7a371
movl 0x48(%rdi,%r14,4), %r8d
movl %r8d, (%rdx,%r15)
cmpl 0x28(%rdi,%rsi,4), %ebx
jne 0x7a3af
movzwl 0x2(%rax), %eax
testl %eax, %eax
je 0x7a39e
shll %cl, %eax
movl %ebx, %ecx
subl %eax, %ecx
movslq %ecx, %rax
leaq (%rdx,%rax,4), %rsi
movslq %ebx, %rax
leaq (%rdx,%rax,4), %rax
movq %rdx, %rdi
movq %rax, %rdx
callq 0x527d0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4848b(%rip), %rdi # 0xc2841
leaq 0x4825d(%rip), %rsi # 0xc261a
leaq 0x4849c(%rip), %rcx # 0xc2860
movl $0x650, %edx # imm = 0x650
callq 0x512a0
|
_ZNK10OpenSubdiv6v3_6_03Far11SourcePatch19GetCornerRingPointsEiPi:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r9d, [rdi+18h]
xor ecx, ecx
cmp r9d, 4
setz cl
lea eax, [rsi+1]
xor r11d, r11d
cmp eax, r9d
mov eax, r9d
cmovl eax, r11d
neg eax
lea r8d, [rsi+rcx]
inc r8d
cmp r8d, r9d
mov r10d, r9d
cmovl r10d, r11d
sub r8d, r10d
lea r10d, [rsi+rcx]
add r10d, 2
cmp r10d, r9d
cmovge r11d, r9d
sub r10d, r11d
lea r11d, [rsi+rax]
inc r11d
mov [rdx], r11d
cmp r9d, 4
jnz short loc_7A26C
mov [rdx+4], r8d
push 2
jmp short loc_7A26E
loc_7A26C:
push 1
loc_7A26E:
pop rax
lea ebx, [rax+1]
mov r14d, eax
mov [rdx+r14*4], r10d
movsxd r14, r10d
imul r15, r14, 6
test byte ptr [rdi+r15+4], 20h
jz short loc_7A29D
cmp r9d, 4
mov ebp, r11d
cmovz ebp, r8d
add eax, 2
mov ebx, ebx
mov [rdx+rbx*4], ebp
mov ebx, eax
loc_7A29D:
movsxd rsi, esi
imul rax, rsi, 6
test byte ptr [rdi+rax+4], 8
jz short loc_7A2C4
mov r15d, [rdi+r14*4+38h]
mov r12d, [rdi+r14*4+48h]
lea ebp, [r12+r15]
dec ebp
mov r15d, ebx
inc ebx
mov [rdx+r15*4], ebp
loc_7A2C4:
add rax, rdi
mov ebx, ebx
mov r15, rbx
shl r15, 20h
xor ebp, ebp
mov r12, 100000000h
loc_7A2DC:
cmp ebp, [rdi+rsi*4+38h]
jge short loc_7A2F8
mov r13d, [rdi+rsi*4+48h]
add r13d, ebp
mov [rdx+rbx*4], r13d
inc rbx
inc ebp
add r15, r12
jmp short loc_7A2DC
loc_7A2F8:
mov bpl, [rax+4]
cmp r9d, 4
jnz short loc_7A331
movsxd r9, r11d
test bpl, 10h
jz short loc_7A31A
mov r10d, [rdi+r9*4+48h]
inc ebx
sar r15, 1Eh
mov [rdx+r15], r10d
loc_7A31A:
imul r9, 6
test byte ptr [rdi+r9+4], 20h
jz short loc_7A371
movsxd r9, ebx
inc ebx
mov [rdx+r9*4], r8d
jmp short loc_7A371
loc_7A331:
test bpl, 10h
jz short loc_7A371
movsxd r8, r11d
imul r9, r8, 6
test byte ptr [rdi+r9+4], 20h
jnz short loc_7A35C
inc rbx
sar r15, 1Eh
cmp dword ptr [rdi+r8*4+38h], 0
jz short loc_7A368
mov r8d, [rdi+r8*4+48h]
jmp short loc_7A36D
loc_7A35C:
inc ebx
sar r15, 1Eh
mov [rdx+r15], r10d
jmp short loc_7A371
loc_7A368:
mov r8d, [rdi+r14*4+48h]
loc_7A36D:
mov [rdx+r15], r8d
loc_7A371:
cmp ebx, [rdi+rsi*4+28h]
jnz short loc_7A3AF
movzx eax, word ptr [rax+2]
test eax, eax
jz short loc_7A39E
shl eax, cl
mov ecx, ebx
sub ecx, eax
movsxd rax, ecx
lea rsi, [rdx+rax*4]
movsxd rax, ebx
lea rax, [rdx+rax*4]
mov rdi, rdx
mov rdx, rax
call __ZNSt3_V28__rotateIPiEET_S2_S2_S2_St26random_access_iterator_tag; std::_V2::__rotate<int *>(int *,int *,int *,std::random_access_iterator_tag)
loc_7A39E:
mov eax, ebx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7A3AF:
lea rdi, aRingsizeRingsi; "ringSize == _ringSizes[corner]"
lea rsi, aWorkspaceLlm4b_13; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aIntOpensubdivV_16; "int OpenSubdiv::v3_6_0::Far::SourcePatc"...
mov edx, 650h
call ___assert_fail
|
long long OpenSubdiv::v3_6_0::Far::SourcePatch::GetCornerRingPoints(
OpenSubdiv::v3_6_0::Far::SourcePatch *this,
int a2,
int *a3)
{
int v3; // r9d
int v4; // ecx
int v5; // r11d
int v6; // eax
int v7; // eax
int v8; // r8d
int v9; // r10d
int v10; // r8d
int v11; // r10d
int v12; // r10d
int v13; // r11d
long long v14; // rbx
int v15; // ebp
long long v16; // rax
long long v17; // r15
char *v18; // rax
signed long long v19; // r15
int i; // ebp
char v21; // bp
long long v22; // r9
long long v23; // r15
int v24; // r8d
int v25; // eax
int v27; // [rsp-10h] [rbp-40h]
v3 = *((_DWORD *)this + 6);
v4 = v3 == 4;
v5 = 0;
v6 = v3;
if ( a2 + 1 < v3 )
v6 = 0;
v7 = -v6;
v8 = a2 + v4 + 1;
v9 = *((_DWORD *)this + 6);
if ( v8 < v3 )
v9 = 0;
v10 = v8 - v9;
v11 = a2 + v4 + 2;
if ( v11 >= v3 )
v5 = *((_DWORD *)this + 6);
v12 = v11 - v5;
v13 = a2 + v7 + 1;
*a3 = v13;
if ( v3 == 4 )
{
a3[1] = v10;
v27 = 2;
}
else
{
v27 = 1;
}
LODWORD(v14) = v27 + 1;
a3[v27] = v12;
if ( (*((_BYTE *)this + 6 * v12 + 4) & 0x20) != 0 )
{
v15 = a2 + v7 + 1;
if ( v3 == 4 )
v15 = v10;
a3[(unsigned int)v14] = v15;
LODWORD(v14) = v27 + 2;
}
v16 = 6LL * a2;
if ( (*((_BYTE *)this + v16 + 4) & 8) != 0 )
{
v17 = (unsigned int)v14;
LODWORD(v14) = v14 + 1;
a3[v17] = *((_DWORD *)this + v12 + 18) + *((_DWORD *)this + v12 + 14) - 1;
}
v18 = (char *)this + v16;
v14 = (unsigned int)v14;
v19 = (unsigned long long)(unsigned int)v14 << 32;
for ( i = 0; i < *((_DWORD *)this + a2 + 14); ++i )
{
a3[v14++] = i + *((_DWORD *)this + a2 + 18);
v19 += 0x100000000LL;
}
v21 = v18[4];
if ( v3 == 4 )
{
if ( (v21 & 0x10) != 0 )
{
LODWORD(v14) = v14 + 1;
*(int *)((char *)a3 + (v19 >> 30)) = *((_DWORD *)this + v13 + 18);
}
if ( (*((_BYTE *)this + 6 * v13 + 4) & 0x20) != 0 )
{
v22 = (int)v14;
LODWORD(v14) = v14 + 1;
a3[v22] = v10;
}
}
else if ( (v21 & 0x10) != 0 )
{
if ( (*((_BYTE *)this + 6 * v13 + 4) & 0x20) != 0 )
{
LODWORD(v14) = v14 + 1;
*(int *)((char *)a3 + (v19 >> 30)) = v12;
}
else
{
LODWORD(v14) = v14 + 1;
v23 = v19 >> 30;
if ( *((_DWORD *)this + v13 + 14) )
v24 = *((_DWORD *)this + v13 + 18);
else
v24 = *((_DWORD *)this + v12 + 18);
*(int *)((char *)a3 + v23) = v24;
}
}
if ( (_DWORD)v14 != *((_DWORD *)this + a2 + 10) )
__assert_fail(
"ringSize == _ringSizes[corner]",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchBuilder.cpp",
1616LL,
"int OpenSubdiv::v3_6_0::Far::SourcePatch::GetCornerRingPoints(int, int *) const");
v25 = *((unsigned __int16 *)v18 + 1);
if ( v25 )
std::_V2::__rotate<int *>(a3, &a3[(int)v14 - (v25 << v4)], &a3[(int)v14]);
return (unsigned int)v14;
}
|
GetCornerRingPoints:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R9D,dword ptr [RDI + 0x18]
XOR ECX,ECX
CMP R9D,0x4
SETZ CL
LEA EAX,[RSI + 0x1]
XOR R11D,R11D
CMP EAX,R9D
MOV EAX,R9D
CMOVL EAX,R11D
NEG EAX
LEA R8D,[RSI + RCX*0x1]
INC R8D
CMP R8D,R9D
MOV R10D,R9D
CMOVL R10D,R11D
SUB R8D,R10D
LEA R10D,[RSI + RCX*0x1]
ADD R10D,0x2
CMP R10D,R9D
CMOVGE R11D,R9D
SUB R10D,R11D
LEA R11D,[RSI + RAX*0x1]
INC R11D
MOV dword ptr [RDX],R11D
CMP R9D,0x4
JNZ 0x0017a26c
MOV dword ptr [RDX + 0x4],R8D
PUSH 0x2
JMP 0x0017a26e
LAB_0017a26c:
PUSH 0x1
LAB_0017a26e:
POP RAX
LEA EBX,[RAX + 0x1]
MOV R14D,EAX
MOV dword ptr [RDX + R14*0x4],R10D
MOVSXD R14,R10D
IMUL R15,R14,0x6
TEST byte ptr [RDI + R15*0x1 + 0x4],0x20
JZ 0x0017a29d
CMP R9D,0x4
MOV EBP,R11D
CMOVZ EBP,R8D
ADD EAX,0x2
MOV EBX,EBX
MOV dword ptr [RDX + RBX*0x4],EBP
MOV EBX,EAX
LAB_0017a29d:
MOVSXD RSI,ESI
IMUL RAX,RSI,0x6
TEST byte ptr [RDI + RAX*0x1 + 0x4],0x8
JZ 0x0017a2c4
MOV R15D,dword ptr [RDI + R14*0x4 + 0x38]
MOV R12D,dword ptr [RDI + R14*0x4 + 0x48]
LEA EBP,[R12 + R15*0x1]
DEC EBP
MOV R15D,EBX
INC EBX
MOV dword ptr [RDX + R15*0x4],EBP
LAB_0017a2c4:
ADD RAX,RDI
MOV EBX,EBX
MOV R15,RBX
SHL R15,0x20
XOR EBP,EBP
MOV R12,0x100000000
LAB_0017a2dc:
CMP EBP,dword ptr [RDI + RSI*0x4 + 0x38]
JGE 0x0017a2f8
MOV R13D,dword ptr [RDI + RSI*0x4 + 0x48]
ADD R13D,EBP
MOV dword ptr [RDX + RBX*0x4],R13D
INC RBX
INC EBP
ADD R15,R12
JMP 0x0017a2dc
LAB_0017a2f8:
MOV BPL,byte ptr [RAX + 0x4]
CMP R9D,0x4
JNZ 0x0017a331
MOVSXD R9,R11D
TEST BPL,0x10
JZ 0x0017a31a
MOV R10D,dword ptr [RDI + R9*0x4 + 0x48]
INC EBX
SAR R15,0x1e
MOV dword ptr [RDX + R15*0x1],R10D
LAB_0017a31a:
IMUL R9,R9,0x6
TEST byte ptr [RDI + R9*0x1 + 0x4],0x20
JZ 0x0017a371
MOVSXD R9,EBX
INC EBX
MOV dword ptr [RDX + R9*0x4],R8D
JMP 0x0017a371
LAB_0017a331:
TEST BPL,0x10
JZ 0x0017a371
MOVSXD R8,R11D
IMUL R9,R8,0x6
TEST byte ptr [RDI + R9*0x1 + 0x4],0x20
JNZ 0x0017a35c
INC RBX
SAR R15,0x1e
CMP dword ptr [RDI + R8*0x4 + 0x38],0x0
JZ 0x0017a368
MOV R8D,dword ptr [RDI + R8*0x4 + 0x48]
JMP 0x0017a36d
LAB_0017a35c:
INC EBX
SAR R15,0x1e
MOV dword ptr [RDX + R15*0x1],R10D
JMP 0x0017a371
LAB_0017a368:
MOV R8D,dword ptr [RDI + R14*0x4 + 0x48]
LAB_0017a36d:
MOV dword ptr [RDX + R15*0x1],R8D
LAB_0017a371:
CMP EBX,dword ptr [RDI + RSI*0x4 + 0x28]
JNZ 0x0017a3af
MOVZX EAX,word ptr [RAX + 0x2]
TEST EAX,EAX
JZ 0x0017a39e
SHL EAX,CL
MOV ECX,EBX
SUB ECX,EAX
MOVSXD RAX,ECX
LEA RSI,[RDX + RAX*0x4]
MOVSXD RAX,EBX
LEA RAX,[RDX + RAX*0x4]
MOV RDI,RDX
MOV RDX,RAX
CALL 0x001527d0
LAB_0017a39e:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017a3af:
LEA RDI,[0x1c2841]
LEA RSI,[0x1c261a]
LEA RCX,[0x1c2860]
MOV EDX,0x650
CALL 0x001512a0
|
/* OpenSubdiv::v3_6_0::Far::SourcePatch::GetCornerRingPoints(int, int*) const */
ulong __thiscall
OpenSubdiv::v3_6_0::Far::SourcePatch::GetCornerRingPoints
(SourcePatch *this,int param_1,int *param_2)
{
int4 uVar1;
uint uVar2;
uint uVar3;
long lVar4;
int iVar5;
ulong uVar6;
int iVar7;
long lVar8;
int iVar9;
long lVar10;
int iVar11;
int iVar12;
long lVar13;
long lVar14;
bool bVar15;
iVar5 = *(int *)(this + 0x18);
bVar15 = iVar5 == 4;
iVar12 = iVar5;
if (param_1 + 1 < iVar5) {
iVar12 = 0;
}
iVar9 = param_1 + (uint)bVar15 + 1;
iVar7 = iVar5;
if (iVar9 < iVar5) {
iVar7 = 0;
}
iVar9 = iVar9 - iVar7;
iVar11 = param_1 + (uint)bVar15 + 2;
iVar7 = 0;
if (iVar5 <= iVar11) {
iVar7 = iVar5;
}
iVar11 = iVar11 - iVar7;
iVar12 = (param_1 - iVar12) + 1;
*param_2 = iVar12;
if (iVar5 == 4) {
param_2[1] = iVar9;
uVar2 = 2;
}
else {
uVar2 = 1;
}
param_2[uVar2] = iVar11;
lVar13 = (long)iVar11;
uVar3 = uVar2 + 1;
if (((byte)this[lVar13 * 6 + 4] & 0x20) != 0) {
iVar7 = iVar12;
if (iVar5 == 4) {
iVar7 = iVar9;
}
uVar3 = uVar2 + 2;
param_2[uVar2 + 1] = iVar7;
}
lVar8 = (long)param_1;
lVar4 = lVar8 * 6;
if (((byte)this[lVar4 + 4] & 8) != 0) {
uVar6 = (ulong)uVar3;
uVar3 = uVar3 + 1;
param_2[uVar6] = *(int *)(this + lVar13 * 4 + 0x48) + *(int *)(this + lVar13 * 4 + 0x38) + -1;
}
uVar6 = (ulong)uVar3;
lVar14 = uVar6 << 0x20;
for (iVar7 = 0; iVar7 < *(int *)(this + lVar8 * 4 + 0x38); iVar7 = iVar7 + 1) {
param_2[uVar6] = *(int *)(this + lVar8 * 4 + 0x48) + iVar7;
uVar6 = uVar6 + 1;
lVar14 = lVar14 + 0x100000000;
}
lVar14 = lVar14 >> 0x1e;
if (iVar5 == 4) {
if (((byte)this[lVar4 + 4] & 0x10) != 0) {
uVar6 = (ulong)((int)uVar6 + 1);
*(int4 *)((long)param_2 + lVar14) = *(int4 *)(this + (long)iVar12 * 4 + 0x48);
}
if (((byte)this[(long)iVar12 * 6 + 4] & 0x20) != 0) {
iVar5 = (int)uVar6;
uVar6 = (ulong)(iVar5 + 1);
param_2[iVar5] = iVar9;
}
}
else if (((byte)this[lVar4 + 4] & 0x10) != 0) {
lVar10 = (long)iVar12;
if (((byte)this[lVar10 * 6 + 4] & 0x20) == 0) {
uVar6 = uVar6 + 1;
if (*(int *)(this + lVar10 * 4 + 0x38) == 0) {
uVar1 = *(int4 *)(this + lVar13 * 4 + 0x48);
}
else {
uVar1 = *(int4 *)(this + lVar10 * 4 + 0x48);
}
*(int4 *)((long)param_2 + lVar14) = uVar1;
}
else {
uVar6 = (ulong)((int)uVar6 + 1);
*(int *)((long)param_2 + lVar14) = iVar11;
}
}
iVar5 = (int)uVar6;
if (iVar5 == *(int *)(this + lVar8 * 4 + 0x28)) {
if (*(ushort *)(this + lVar4 + 2) != 0) {
std::_V2::__rotate<int*>
(param_2,param_2 + (int)(iVar5 - ((uint)*(ushort *)(this + lVar4 + 2) << bVar15)),
param_2 + iVar5);
}
return uVar6 & 0xffffffff;
}
/* WARNING: Subroutine does not return */
__assert_fail("ringSize == _ringSizes[corner]",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchBuilder.cpp"
,0x650,
"int OpenSubdiv::v3_6_0::Far::SourcePatch::GetCornerRingPoints(int, int *) const");
}
|
|
16,444
|
testing::AssertionResult::AssertionResult(testing::AssertionResult const&)
|
seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest-assertion-result.cc
|
AssertionResult::AssertionResult(const AssertionResult& other)
: success_(other.success_),
message_(other.message_.get() != nullptr
? new ::std::string(*other.message_)
: static_cast< ::std::string*>(nullptr)) {}
|
O1
|
cpp
|
testing::AssertionResult::AssertionResult(testing::AssertionResult const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movb (%rsi), %al
movb %al, (%rdi)
movq 0x8(%rsi), %r15
testq %r15, %r15
je 0x12021
movl $0x20, %edi
callq 0x9490
movq %rax, %r14
addq $0x10, %rax
movq %rax, (%r14)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0xf66a
jmp 0x12024
xorl %r14d, %r14d
movq %r14, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movl $0x20, %esi
movq %r14, %rdi
callq 0x94c0
movq %rbx, %rdi
callq 0x99a0
|
_ZN7testing15AssertionResultC2ERKS0_:
push r15; Alternative name is 'testing::AssertionResult::AssertionResult(testing::AssertionResult const&)'
push r14
push rbx
mov rbx, rdi
mov al, [rsi]
mov [rdi], al
mov r15, [rsi+8]
test r15, r15
jz short loc_12021
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
add rax, 10h
mov [r14], rax
mov rsi, [r15]
mov rdx, [r15+8]
add rdx, rsi
mov rdi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
jmp short loc_12024
loc_12021:
xor r14d, r14d
loc_12024:
mov [rbx+8], r14
pop rbx
pop r14
pop r15
retn
mov rbx, rax
mov esi, 20h ; ' '; unsigned __int64
mov rdi, r14; void *
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, rbx
call __Unwind_Resume
|
char testing::AssertionResult::AssertionResult(
testing::AssertionResult *this,
const testing::AssertionResult *a2)
{
char result; // al
long long v3; // r15
_QWORD *v4; // r14
result = *(_BYTE *)a2;
*(_BYTE *)this = *(_BYTE *)a2;
v3 = *((_QWORD *)a2 + 1);
if ( v3 )
{
v4 = (_QWORD *)operator new(0x20uLL);
*v4 = v4 + 2;
result = std::string::_M_construct<char *>(v4, *(_BYTE **)v3, *(_QWORD *)v3 + *(_QWORD *)(v3 + 8));
}
else
{
v4 = 0LL;
}
*((_QWORD *)this + 1) = v4;
return result;
}
|
AssertionResult:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV AL,byte ptr [RSI]
MOV byte ptr [RDI],AL
MOV R15,qword ptr [RSI + 0x8]
TEST R15,R15
JZ 0x00112021
MOV EDI,0x20
CALL 0x00109490
MOV R14,RAX
ADD RAX,0x10
MOV qword ptr [R14],RAX
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
ADD RDX,RSI
LAB_00112017:
MOV RDI,R14
CALL 0x0010f66a
LAB_0011201f:
JMP 0x00112024
LAB_00112021:
XOR R14D,R14D
LAB_00112024:
MOV qword ptr [RBX + 0x8],R14
POP RBX
POP R14
POP R15
RET
|
/* testing::AssertionResult::AssertionResult(testing::AssertionResult const&) */
void __thiscall
testing::AssertionResult::AssertionResult(AssertionResult *this,AssertionResult *param_1)
{
long *plVar1;
long *plVar2;
*this = *param_1;
plVar1 = *(long **)(param_1 + 8);
if (plVar1 == (long *)0x0) {
plVar2 = (long *)0x0;
}
else {
plVar2 = (long *)operator_new(0x20);
*plVar2 = (long)(plVar2 + 2);
/* try { // try from 00112017 to 0011201e has its CatchHandler @ 0011202e */
std::__cxx11::string::_M_construct<char*>(plVar2,*plVar1,plVar1[1] + *plVar1);
}
*(long **)(this + 8) = plVar2;
return;
}
|
|
16,445
|
fmt::v10::detail::bigint::divmod_assign(fmt::v10::detail::bigint const&)
|
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h
|
FMT_CONSTEXPR20 auto divmod_assign(const bigint& divisor) -> int {
FMT_ASSERT(this != &divisor, "");
if (compare(*this, divisor) < 0) return 0;
FMT_ASSERT(divisor.bigits_[divisor.bigits_.size() - 1u] != 0, "");
align(divisor);
int quotient = 0;
do {
subtract_aligned(divisor);
++quotient;
} while (compare(*this, divisor) >= 0);
return quotient;
}
|
O0
|
c
|
fmt::v10::detail::bigint::divmod_assign(fmt::v10::detail::bigint const&):
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq 0x20(%rsp), %rax
setne %al
andb $0x1, %al
movb %al, 0x1f(%rsp)
leaq 0x1f(%rsp), %rdi
leaq 0x786f2(%rip), %rsi # 0x113a74
callq 0x46120
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x9b440
cmpl $0x0, %eax
jge 0x9b3a8
movl $0x0, 0x34(%rsp)
jmp 0x9b437
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
callq 0x9b830
movq 0x8(%rsp), %rdi
movq %rax, %rsi
subq $0x1, %rsi
callq 0x9c980
cmpl $0x0, (%rax)
setne %al
andb $0x1, %al
movb %al, 0x1e(%rsp)
leaq 0x1e(%rsp), %rdi
leaq 0x7868f(%rip), %rsi # 0x113a74
callq 0x46120
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x9c9a0
movl $0x0, 0x18(%rsp)
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x9caa0
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x9b440
cmpl $0x0, %eax
jge 0x9b401
movl 0x18(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
|
_ZN3fmt3v106detail6bigint13divmod_assignERKS2_:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov rax, [rsp+38h+var_10]
mov [rsp+38h+var_28], rax
cmp rax, [rsp+38h+var_18]
setnz al
and al, 1
mov [rsp+38h+var_19], al
lea rdi, [rsp+38h+var_19]
lea rsi, aSFromSSMsTotal+1Ah; ""
call _ZN3fmt3v106detail13ignore_unusedIJbA1_cEEEvDpRKT_; fmt::v10::detail::ignore_unused<bool,char [1]>(bool,char [1] const&)
mov rdi, [rsp+38h+var_28]; this
mov rsi, [rsp+38h+var_18]; fmt::v10::detail::bigint *
call _ZN3fmt3v106detail7compareERKNS1_6bigintES4_; fmt::v10::detail::compare(fmt::v10::detail::bigint const&,fmt::v10::detail::bigint const&)
cmp eax, 0
jge short loc_9B3A8
mov [rsp+38h+var_4], 0
jmp loc_9B437
loc_9B3A8:
mov rax, [rsp+38h+var_18]
mov [rsp+38h+var_30], rax
mov rdi, [rsp+38h+var_18]
call _ZNK3fmt3v106detail6bufferIjE4sizeEv; fmt::v10::detail::buffer<uint>::size(void)
mov rdi, [rsp+38h+var_30]
mov rsi, rax
sub rsi, 1
call _ZNK3fmt3v106detail6bufferIjEixImEERKjT_; fmt::v10::detail::buffer<uint>::operator[]<ulong>(ulong)
cmp dword ptr [rax], 0
setnz al
and al, 1
mov [rsp+38h+var_1A], al
lea rdi, [rsp+38h+var_1A]
lea rsi, aSFromSSMsTotal+1Ah; ""
call _ZN3fmt3v106detail13ignore_unusedIJbA1_cEEEvDpRKT_; fmt::v10::detail::ignore_unused<bool,char [1]>(bool,char [1] const&)
mov rdi, [rsp+38h+var_28]; this
mov rsi, [rsp+38h+var_18]; fmt::v10::detail::bigint *
call _ZN3fmt3v106detail6bigint5alignERKS2_; fmt::v10::detail::bigint::align(fmt::v10::detail::bigint const&)
mov [rsp+38h+var_20], 0
loc_9B401:
mov rdi, [rsp+38h+var_28]; this
mov rsi, [rsp+38h+var_18]; fmt::v10::detail::bigint *
call _ZN3fmt3v106detail6bigint16subtract_alignedERKS2_; fmt::v10::detail::bigint::subtract_aligned(fmt::v10::detail::bigint const&)
mov eax, [rsp+38h+var_20]
add eax, 1
mov [rsp+38h+var_20], eax
mov rdi, [rsp+38h+var_28]; this
mov rsi, [rsp+38h+var_18]; fmt::v10::detail::bigint *
call _ZN3fmt3v106detail7compareERKNS1_6bigintES4_; fmt::v10::detail::compare(fmt::v10::detail::bigint const&,fmt::v10::detail::bigint const&)
cmp eax, 0
jge short loc_9B401
mov eax, [rsp+38h+var_20]
mov [rsp+38h+var_4], eax
loc_9B437:
mov eax, [rsp+38h+var_4]
add rsp, 38h
retn
|
long long fmt::v10::detail::bigint::divmod_assign(
fmt::v10::detail::bigint *this,
const fmt::v10::detail::bigint *a2)
{
const fmt::v10::detail::bigint *v2; // rdx
long long v3; // rax
const fmt::v10::detail::bigint *v4; // rdx
unsigned int v6; // [rsp+18h] [rbp-20h]
fmt::v10::detail::ignore_unused<bool,char [1]>();
if ( (int)fmt::v10::detail::compare(this, a2, v2) >= 0 )
{
v3 = fmt::v10::detail::buffer<unsigned int>::size(a2, a2);
fmt::v10::detail::buffer<unsigned int>::operator[]<unsigned long>(a2, v3 - 1);
fmt::v10::detail::ignore_unused<bool,char [1]>();
fmt::v10::detail::bigint::align(this, a2);
v6 = 0;
do
{
fmt::v10::detail::bigint::subtract_aligned(this, a2);
++v6;
}
while ( (int)fmt::v10::detail::compare(this, a2, v4) >= 0 );
return v6;
}
else
{
return 0;
}
}
|
divmod_assign:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x10],RAX
CMP RAX,qword ptr [RSP + 0x20]
SETNZ AL
AND AL,0x1
MOV byte ptr [RSP + 0x1f],AL
LEA RDI,[RSP + 0x1f]
LEA RSI,[0x213a74]
CALL 0x00146120
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x0019b440
CMP EAX,0x0
JGE 0x0019b3a8
MOV dword ptr [RSP + 0x34],0x0
JMP 0x0019b437
LAB_0019b3a8:
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x0019b830
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,RAX
SUB RSI,0x1
CALL 0x0019c980
CMP dword ptr [RAX],0x0
SETNZ AL
AND AL,0x1
MOV byte ptr [RSP + 0x1e],AL
LEA RDI,[RSP + 0x1e]
LEA RSI,[0x213a74]
CALL 0x00146120
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x0019c9a0
MOV dword ptr [RSP + 0x18],0x0
LAB_0019b401:
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x0019caa0
MOV EAX,dword ptr [RSP + 0x18]
ADD EAX,0x1
MOV dword ptr [RSP + 0x18],EAX
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x0019b440
CMP EAX,0x0
JGE 0x0019b401
MOV EAX,dword ptr [RSP + 0x18]
MOV dword ptr [RSP + 0x34],EAX
LAB_0019b437:
MOV EAX,dword ptr [RSP + 0x34]
ADD RSP,0x38
RET
|
/* fmt::v10::detail::bigint::divmod_assign(fmt::v10::detail::bigint const&) */
int __thiscall fmt::v10::detail::bigint::divmod_assign(bigint *this,bigint *param_1)
{
bigint *this_00;
int iVar1;
long lVar2;
uint *puVar3;
int local_20;
bool local_1a;
bool local_19;
bigint *local_18;
bigint *local_10;
int local_4;
local_19 = this != param_1;
local_18 = param_1;
local_10 = this;
ignore_unused<bool,char[1]>(&local_19,"");
iVar1 = compare(this,local_18);
this_00 = local_18;
if (iVar1 < 0) {
local_4 = 0;
}
else {
lVar2 = buffer<unsigned_int>::size((buffer<unsigned_int> *)local_18);
puVar3 = buffer<unsigned_int>::operator[]<unsigned_long>
((buffer<unsigned_int> *)this_00,lVar2 - 1);
local_1a = *puVar3 != 0;
ignore_unused<bool,char[1]>(&local_1a,"");
align(this,local_18);
local_20 = 0;
do {
subtract_aligned(this,local_18);
local_20 = local_20 + 1;
iVar1 = compare(this,local_18);
local_4 = local_20;
} while (-1 < iVar1);
}
return local_4;
}
|
|
16,446
|
find_or_create_user(PFS_thread*, char const*, unsigned int)
|
eloqsql/storage/perfschema/pfs_user.cc
|
PFS_user *
find_or_create_user(PFS_thread *thread,
const char *username, uint username_length)
{
LF_PINS *pins= get_user_hash_pins(thread);
if (unlikely(pins == NULL))
{
global_user_container.m_lost++;
return NULL;
}
PFS_user_key key;
set_user_key(&key, username, username_length);
PFS_user **entry;
PFS_user *pfs;
uint retry_count= 0;
const uint retry_max= 3;
pfs_dirty_state dirty_state;
search:
entry= reinterpret_cast<PFS_user**>
(lf_hash_search(&user_hash, pins,
key.m_hash_key, key.m_key_length));
if (entry && (entry != MY_ERRPTR))
{
pfs= *entry;
pfs->inc_refcount();
lf_hash_search_unpin(pins);
return pfs;
}
lf_hash_search_unpin(pins);
pfs= global_user_container.allocate(& dirty_state);
if (pfs != NULL)
{
pfs->m_key= key;
if (username_length > 0)
pfs->m_username= &pfs->m_key.m_hash_key[0];
else
pfs->m_username= NULL;
pfs->m_username_length= username_length;
pfs->init_refcount();
pfs->reset_stats();
pfs->m_disconnected_count= 0;
int res;
pfs->m_lock.dirty_to_allocated(& dirty_state);
res= lf_hash_insert(&user_hash, pins, &pfs);
if (likely(res == 0))
{
return pfs;
}
global_user_container.deallocate(pfs);
if (res > 0)
{
if (++retry_count > retry_max)
{
global_user_container.m_lost++;
return NULL;
}
goto search;
}
global_user_container.m_lost++;
return NULL;
}
return NULL;
}
|
O0
|
cpp
|
find_or_create_user(PFS_thread*, char const*, unsigned int):
pushq %rbp
movq %rsp, %rbp
subq $0x200, %rsp # imm = 0x200
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x1a0(%rbp)
movq %rsi, -0x1a8(%rbp)
movl %edx, -0x1ac(%rbp)
movq -0x1a0(%rbp), %rdi
callq 0xcd1830
movq %rax, -0x1b8(%rbp)
cmpq $0x0, -0x1b8(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0xcd156c
leaq 0x11745f5(%rip), %rax # 0x1e45b40
movq (%rax), %rcx
addq $0x1, %rcx
leaq 0x11745e7(%rip), %rax # 0x1e45b40
movq %rcx, (%rax)
movq $0x0, -0x198(%rbp)
jmp 0xcd17f1
movq -0x1a8(%rbp), %rsi
movl -0x1ac(%rbp), %edx
leaq -0x190(%rbp), %rdi
callq 0xcd18a0
movl $0x0, -0x1cc(%rbp)
movl $0x3, -0x1d0(%rbp)
movq -0x1b8(%rbp), %rsi
leaq -0x190(%rbp), %rdx
movl -0xc(%rbp), %ecx
leaq 0x1135307(%rip), %rdi # 0x1e068b8
callq 0xc29ef0
movq %rax, -0x1c0(%rbp)
cmpq $0x0, -0x1c0(%rbp)
je 0xcd1626
movl $0x1, %eax
cmpq %rax, -0x1c0(%rbp)
je 0xcd1626
movq -0x1c0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x1c8(%rbp)
movq -0x1c8(%rbp), %rdi
callq 0xcd1ed0
jmp 0xcd15f4
jmp 0xcd15f6
movq -0x1b8(%rbp), %rcx
movq $0x0, -0x1e0(%rbp)
movq -0x1e0(%rbp), %rax
xchgq %rax, 0x10(%rcx)
movq -0x1c8(%rbp), %rax
movq %rax, -0x198(%rbp)
jmp 0xcd17f1
jmp 0xcd1628
jmp 0xcd162a
jmp 0xcd162c
movq -0x1b8(%rbp), %rcx
movq $0x0, -0x1e8(%rbp)
movq -0x1e8(%rbp), %rax
xchgq %rax, 0x10(%rcx)
leaq 0x11744f0(%rip), %rdi # 0x1e45b40
leaq -0x1d4(%rbp), %rsi
callq 0xcd1f00
movq %rax, -0x1c8(%rbp)
cmpq $0x0, -0x1c8(%rbp)
je 0xcd17e6
movq -0x1c8(%rbp), %rdi
addq $0x7e4, %rdi # imm = 0x7E4
leaq -0x190(%rbp), %rsi
movl $0x188, %edx # imm = 0x188
callq 0x4331a0
cmpl $0x0, -0x1ac(%rbp)
jbe 0xcd16b7
movq -0x1c8(%rbp), %rcx
addq $0x7e4, %rcx # imm = 0x7E4
movq -0x1c8(%rbp), %rax
movq %rcx, 0x970(%rax)
jmp 0xcd16c9
movq -0x1c8(%rbp), %rax
movq $0x0, 0x970(%rax)
movl -0x1ac(%rbp), %ecx
movq -0x1c8(%rbp), %rax
movl %ecx, 0x978(%rax)
movq -0x1c8(%rbp), %rdi
callq 0xcd22d0
movq -0x1c8(%rbp), %rdi
callq 0xcbcd80
movq -0x1c8(%rbp), %rax
movq $0x0, 0x980(%rax)
movq -0x1c8(%rbp), %rdi
addq $0x7e0, %rdi # imm = 0x7E0
leaq -0x1d4(%rbp), %rsi
callq 0xcb0f80
movq -0x1b8(%rbp), %rsi
leaq 0x113518a(%rip), %rdi # 0x1e068b8
leaq -0x1c8(%rbp), %rdx
callq 0xc28ed0
movl %eax, -0x1ec(%rbp)
cmpl $0x0, -0x1ec(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0xcd1767
movq -0x1c8(%rbp), %rax
movq %rax, -0x198(%rbp)
jmp 0xcd17f1
movq -0x1c8(%rbp), %rsi
leaq 0x11743cb(%rip), %rdi # 0x1e45b40
callq 0xcd2300
cmpl $0x0, -0x1ec(%rbp)
jle 0xcd17c1
movl -0x1cc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1cc(%rbp)
cmpl $0x3, %eax
jbe 0xcd17bc
leaq 0x11743a2(%rip), %rax # 0x1e45b40
movq (%rax), %rcx
addq $0x1, %rcx
leaq 0x1174394(%rip), %rax # 0x1e45b40
movq %rcx, (%rax)
movq $0x0, -0x198(%rbp)
jmp 0xcd17f1
jmp 0xcd1599
leaq 0x1174378(%rip), %rax # 0x1e45b40
movq (%rax), %rcx
addq $0x1, %rcx
leaq 0x117436a(%rip), %rax # 0x1e45b40
movq %rcx, (%rax)
movq $0x0, -0x198(%rbp)
jmp 0xcd17f1
movq $0x0, -0x198(%rbp)
movq -0x198(%rbp), %rax
movq %rax, -0x1f8(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xcd1821
movq -0x1f8(%rbp), %rax
addq $0x200, %rsp # imm = 0x200
popq %rbp
retq
callq 0x433650
nopw %cs:(%rax,%rax)
|
_Z19find_or_create_userP10PFS_threadPKcj:
push rbp
mov rbp, rsp
sub rsp, 200h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_1A0], rdi
mov [rbp+var_1A8], rsi
mov [rbp+var_1AC], edx
mov rdi, [rbp+var_1A0]; PFS_thread *
call _ZL18get_user_hash_pinsP10PFS_thread; get_user_hash_pins(PFS_thread *)
mov [rbp+var_1B8], rax
cmp [rbp+var_1B8], 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_CD156C
lea rax, global_user_container
mov rcx, [rax]
add rcx, 1
lea rax, global_user_container
mov [rax], rcx
mov [rbp+var_198], 0
jmp loc_CD17F1
loc_CD156C:
mov rsi, [rbp+var_1A8]
mov edx, [rbp+var_1AC]
lea rdi, [rbp+var_190]
call _ZL12set_user_keyP12PFS_user_keyPKcj; set_user_key(PFS_user_key *,char const*,uint)
mov [rbp+var_1CC], 0
mov [rbp+var_1D0], 3
loc_CD1599:
mov rsi, [rbp+var_1B8]
lea rdx, [rbp+var_190]
mov ecx, [rbp+var_C]
lea rdi, user_hash
call lf_hash_search
mov [rbp+var_1C0], rax
cmp [rbp+var_1C0], 0
jz short loc_CD1626
mov eax, 1
cmp [rbp+var_1C0], rax
jz short loc_CD1626
mov rax, [rbp+var_1C0]
mov rax, [rax]
mov [rbp+var_1C8], rax
mov rdi, [rbp+var_1C8]; this
call _ZN8PFS_user12inc_refcountEv; PFS_user::inc_refcount(void)
jmp short $+2
loc_CD15F4:
jmp short $+2
loc_CD15F6:
mov rcx, [rbp+var_1B8]
mov [rbp+var_1E0], 0
mov rax, [rbp+var_1E0]
xchg rax, [rcx+10h]
mov rax, [rbp+var_1C8]
mov [rbp+var_198], rax
jmp loc_CD17F1
loc_CD1626:
jmp short $+2
loc_CD1628:
jmp short $+2
loc_CD162A:
jmp short $+2
loc_CD162C:
mov rcx, [rbp+var_1B8]
mov [rbp+var_1E8], 0
mov rax, [rbp+var_1E8]
xchg rax, [rcx+10h]
lea rdi, global_user_container
lea rsi, [rbp+var_1D4]
call _ZN29PFS_buffer_scalable_containerI8PFS_userLi128ELi128E14PFS_user_array18PFS_user_allocatorE8allocateEP15pfs_dirty_state; PFS_buffer_scalable_container<PFS_user,128,128,PFS_user_array,PFS_user_allocator>::allocate(pfs_dirty_state *)
mov [rbp+var_1C8], rax
cmp [rbp+var_1C8], 0
jz loc_CD17E6
mov rdi, [rbp+var_1C8]
add rdi, 7E4h
lea rsi, [rbp+var_190]
mov edx, 188h
call _memcpy
cmp [rbp+var_1AC], 0
jbe short loc_CD16B7
mov rcx, [rbp+var_1C8]
add rcx, 7E4h
mov rax, [rbp+var_1C8]
mov [rax+970h], rcx
jmp short loc_CD16C9
loc_CD16B7:
mov rax, [rbp+var_1C8]
mov qword ptr [rax+970h], 0
loc_CD16C9:
mov ecx, [rbp+var_1AC]
mov rax, [rbp+var_1C8]
mov [rax+978h], ecx
mov rdi, [rbp+var_1C8]; this
call _ZN8PFS_user13init_refcountEv; PFS_user::init_refcount(void)
mov rdi, [rbp+var_1C8]; this
call _ZN20PFS_connection_slice11reset_statsEv; PFS_connection_slice::reset_stats(void)
mov rax, [rbp+var_1C8]
mov qword ptr [rax+980h], 0
mov rdi, [rbp+var_1C8]
add rdi, 7E0h
lea rsi, [rbp+var_1D4]
call _ZN8pfs_lock18dirty_to_allocatedEPK15pfs_dirty_state; pfs_lock::dirty_to_allocated(pfs_dirty_state const*)
mov rsi, [rbp+var_1B8]
lea rdi, user_hash
lea rdx, [rbp+var_1C8]
call lf_hash_insert
mov [rbp+var_1EC], eax
cmp [rbp+var_1EC], 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_CD1767
mov rax, [rbp+var_1C8]
mov [rbp+var_198], rax
jmp loc_CD17F1
loc_CD1767:
mov rsi, [rbp+var_1C8]
lea rdi, global_user_container
call _ZN29PFS_buffer_scalable_containerI8PFS_userLi128ELi128E14PFS_user_array18PFS_user_allocatorE10deallocateEPS0_; PFS_buffer_scalable_container<PFS_user,128,128,PFS_user_array,PFS_user_allocator>::deallocate(PFS_user*)
cmp [rbp+var_1EC], 0
jle short loc_CD17C1
mov eax, [rbp+var_1CC]
add eax, 1
mov [rbp+var_1CC], eax
cmp eax, 3
jbe short loc_CD17BC
lea rax, global_user_container
mov rcx, [rax]
add rcx, 1
lea rax, global_user_container
mov [rax], rcx
mov [rbp+var_198], 0
jmp short loc_CD17F1
loc_CD17BC:
jmp loc_CD1599
loc_CD17C1:
lea rax, global_user_container
mov rcx, [rax]
add rcx, 1
lea rax, global_user_container
mov [rax], rcx
mov [rbp+var_198], 0
jmp short loc_CD17F1
loc_CD17E6:
mov [rbp+var_198], 0
loc_CD17F1:
mov rax, [rbp+var_198]
mov [rbp+var_1F8], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_CD1821
mov rax, [rbp+var_1F8]
add rsp, 200h
pop rbp
retn
loc_CD1821:
call ___stack_chk_fail
|
PFS_user * find_or_create_user(PFS_thread *a1, const char *a2, unsigned int a3)
{
unsigned int v3; // edx
int v5; // [rsp+14h] [rbp-1ECh]
_DWORD v6[2]; // [rsp+2Ch] [rbp-1D4h] BYREF
int v7; // [rsp+34h] [rbp-1CCh]
PFS_user *v8; // [rsp+38h] [rbp-1C8h] BYREF
PFS_user **v9; // [rsp+40h] [rbp-1C0h]
long long user_hash_pins; // [rsp+48h] [rbp-1B8h]
unsigned int v11; // [rsp+54h] [rbp-1ACh]
const char *v12; // [rsp+58h] [rbp-1A8h]
PFS_thread *v13; // [rsp+60h] [rbp-1A0h]
_BYTE v15[388]; // [rsp+70h] [rbp-190h] BYREF
unsigned int v16; // [rsp+1F4h] [rbp-Ch]
unsigned long long v17; // [rsp+1F8h] [rbp-8h]
v17 = __readfsqword(0x28u);
v13 = a1;
v12 = a2;
v11 = a3;
user_hash_pins = get_user_hash_pins(a1);
if ( user_hash_pins )
{
set_user_key(v15, v12, v11);
v7 = 0;
v6[1] = 3;
while ( 1 )
{
v9 = (PFS_user **)lf_hash_search((long long)user_hash, user_hash_pins, (long long)v15, v16);
if ( (unsigned long long)v9 >= 2 )
{
v8 = *v9;
PFS_user::inc_refcount(v8);
_InterlockedExchange64((volatile long long *)(user_hash_pins + 16), 0LL);
return v8;
}
_InterlockedExchange64((volatile long long *)(user_hash_pins + 16), 0LL);
v8 = (PFS_user *)PFS_buffer_scalable_container<PFS_user,128,128,PFS_user_array,PFS_user_allocator>::allocate(
global_user_container,
v6);
if ( !v8 )
break;
memcpy((char *)v8 + 2020, v15, 392LL);
if ( v11 )
*((_QWORD *)v8 + 302) = (char *)v8 + 2020;
else
*((_QWORD *)v8 + 302) = 0LL;
*((_DWORD *)v8 + 606) = v11;
PFS_user::init_refcount(v8);
PFS_connection_slice::reset_stats(v8);
*((_QWORD *)v8 + 304) = 0LL;
pfs_lock::dirty_to_allocated((PFS_user *)((char *)v8 + 2016), v6, v3);
v5 = lf_hash_insert((long long)user_hash, user_hash_pins, (long long)&v8);
if ( !v5 )
return v8;
PFS_buffer_scalable_container<PFS_user,128,128,PFS_user_array,PFS_user_allocator>::deallocate(
global_user_container,
v8);
if ( v5 <= 0 )
{
++global_user_container[0];
return 0LL;
}
if ( (unsigned int)++v7 > 3 )
{
++global_user_container[0];
return 0LL;
}
}
return 0LL;
}
else
{
++global_user_container[0];
return 0LL;
}
}
|
inline_mysql_mutex_lock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x40],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00cd153c
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x1c]
CALL 0x00d1e160
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00cd1548
LAB_00cd153c:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x005335c0
MOV dword ptr [RBP + -0x4],EAX
LAB_00cd1548:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int inline_mysql_mutex_lock(pthread_mutex_t *param_1,int8 param_2,int4 param_3)
{
int4 local_c;
if (*(long *)((long)param_1 + 0x40) == 0) {
local_c = pthread_mutex_lock(param_1);
}
else {
local_c = psi_mutex_lock(param_1,param_2,param_3);
}
return local_c;
}
|
|
16,447
|
thai2sortable
|
eloqsql/strings/ctype-tis620.c
|
static size_t thai2sortable(uchar *tstr, size_t len)
{
uchar *p;
size_t tlen;
uchar l2bias;
tlen= len;
l2bias= 256 - 8;
for (p= tstr; tlen > 0; p++, tlen--)
{
uchar c= *p;
if (isthai(c))
{
const int *t_ctype0= t_ctype[c];
if (isconsnt(c))
l2bias -= 8;
if (isldvowel(c) && tlen != 1 && isconsnt(p[1]))
{
/* simply swap between leading-vowel and consonant */
*p= p[1];
p[1]= c;
tlen--;
p++;
continue;
}
/* if found level 2 char (L2_GARAN,L2_TONE*,L2_TYKHU) move to last */
if (t_ctype0[1] >= L2_GARAN)
{
/*
l2bias use to control position weight of l2char
example (*=l2char) XX*X must come before X*XX
*/
memmove((char*) p, (char*) (p+1), tlen-1);
tstr[len-1]= l2bias + t_ctype0[1]- L2_GARAN +1;
p--;
continue;
}
}
else
{
l2bias-= 8;
*p= to_lower_tis620[c];
}
}
return len;
}
|
O0
|
c
|
thai2sortable:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movb $-0x8, -0x21(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x20(%rbp)
jbe 0x99b06
movq -0x18(%rbp), %rax
movb (%rax), %al
movb %al, -0x22(%rbp)
movzbl -0x22(%rbp), %eax
cmpl $0x80, %eax
jl 0x99ac7
movzbl -0x22(%rbp), %eax
movl %eax, %ecx
leaq 0xfd99c(%rip), %rax # 0x197360
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movzbl -0x22(%rbp), %eax
movl %eax, %ecx
leaq 0xfd984(%rip), %rax # 0x197360
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x999f8
movzbl -0x21(%rbp), %eax
subl $0x8, %eax
movb %al, -0x21(%rbp)
movzbl -0x22(%rbp), %eax
movl %eax, %ecx
leaq 0xfd95b(%rip), %rax # 0x197360
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x99a72
cmpq $0x1, -0x20(%rbp)
je 0x99a72
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
movl %eax, %ecx
leaq 0xfd931(%rip), %rax # 0x197360
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x99a72
movq -0x18(%rbp), %rax
movb 0x1(%rax), %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
movb -0x22(%rbp), %cl
movq -0x18(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x99ae9
movq -0x30(%rbp), %rax
cmpl $0x9, 0x4(%rax)
jl 0x99ac5
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x1, %rsi
movq -0x20(%rbp), %rdx
subq $0x1, %rdx
callq 0x36150
movzbl -0x21(%rbp), %eax
movq -0x30(%rbp), %rcx
addl 0x4(%rcx), %eax
subl $0x9, %eax
addl $0x1, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
subq $0x1, %rcx
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x99ae9
jmp 0x99ae7
movzbl -0x21(%rbp), %eax
subl $0x8, %eax
movb %al, -0x21(%rbp)
movzbl -0x22(%rbp), %eax
movl %eax, %ecx
leaq 0x2860a2(%rip), %rax # 0x31fb80
movb (%rax,%rcx), %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
jmp 0x99ae9
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x99994
movq -0x10(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
|
thai2sortable:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
mov [rbp+var_21], 0F8h
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
loc_99994:
cmp [rbp+var_20], 0
jbe loc_99B06
mov rax, [rbp+var_18]
mov al, [rax]
mov [rbp+var_22], al
movzx eax, [rbp+var_22]
cmp eax, 80h
jl loc_99AC7
movzx eax, [rbp+var_22]
mov ecx, eax
lea rax, t_ctype
imul rcx, 14h
add rax, rcx
mov [rbp+var_30], rax
movzx eax, [rbp+var_22]
mov ecx, eax
lea rax, t_ctype
imul rcx, 14h
add rax, rcx
mov eax, [rax+10h]
and eax, 10h
cmp eax, 0
jz short loc_999F8
movzx eax, [rbp+var_21]
sub eax, 8
mov [rbp+var_21], al
loc_999F8:
movzx eax, [rbp+var_22]
mov ecx, eax
lea rax, t_ctype
imul rcx, 14h
add rax, rcx
mov eax, [rax+10h]
and eax, 20h
cmp eax, 0
jz short loc_99A72
cmp [rbp+var_20], 1
jz short loc_99A72
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
mov ecx, eax
lea rax, t_ctype
imul rcx, 14h
add rax, rcx
mov eax, [rax+10h]
and eax, 10h
cmp eax, 0
jz short loc_99A72
mov rax, [rbp+var_18]
mov cl, [rax+1]
mov rax, [rbp+var_18]
mov [rax], cl
mov cl, [rbp+var_22]
mov rax, [rbp+var_18]
mov [rax+1], cl
mov rax, [rbp+var_20]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp short loc_99AE9
loc_99A72:
mov rax, [rbp+var_30]
cmp dword ptr [rax+4], 9
jl short loc_99AC5
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_18]
add rsi, 1
mov rdx, [rbp+var_20]
sub rdx, 1
call _memmove
movzx eax, [rbp+var_21]
mov rcx, [rbp+var_30]
add eax, [rcx+4]
sub eax, 9
add eax, 1
mov dl, al
mov rax, [rbp+var_8]
mov rcx, [rbp+var_10]
sub rcx, 1
mov [rax+rcx], dl
mov rax, [rbp+var_18]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_18], rax
jmp short loc_99AE9
loc_99AC5:
jmp short loc_99AE7
loc_99AC7:
movzx eax, [rbp+var_21]
sub eax, 8
mov [rbp+var_21], al
movzx eax, [rbp+var_22]
mov ecx, eax
lea rax, to_lower_tis620
mov cl, [rax+rcx]
mov rax, [rbp+var_18]
mov [rax], cl
loc_99AE7:
jmp short $+2
loc_99AE9:
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
mov rax, [rbp+var_20]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_20], rax
jmp loc_99994
loc_99B06:
mov rax, [rbp+var_10]
add rsp, 30h
pop rbp
retn
|
long long thai2sortable(unsigned __int8 *a1, long long a2)
{
char *v3; // [rsp+0h] [rbp-30h]
unsigned __int8 v4; // [rsp+Eh] [rbp-22h]
char v5; // [rsp+Fh] [rbp-21h]
long long v6; // [rsp+10h] [rbp-20h]
unsigned __int8 *v7; // [rsp+18h] [rbp-18h]
v6 = a2;
v5 = -8;
v7 = a1;
while ( v6 )
{
v4 = *v7;
if ( *v7 < 0x80u )
{
v5 -= 8;
*v7 = to_lower_tis620[v4];
}
else
{
v3 = (char *)&t_ctype[5 * v4];
if ( (*((_DWORD *)v3 + 4) & 0x10) != 0 )
v5 -= 8;
if ( (t_ctype[5 * v4 + 4] & 0x20) != 0 && v6 != 1 && (t_ctype[5 * v7[1] + 4] & 0x10) != 0 )
{
*v7 = v7[1];
v7[1] = v4;
--v6;
++v7;
}
else if ( *((int *)v3 + 1) >= 9 )
{
memmove(v7, v7 + 1, v6 - 1);
a1[a2 - 1] = v3[4] + v5 - 9 + 1;
--v7;
}
}
++v7;
--v6;
}
return a2;
}
|
thai2sortable:
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 + -0x10]
MOV qword ptr [RBP + -0x20],RAX
MOV byte ptr [RBP + -0x21],0xf8
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
LAB_00199994:
CMP qword ptr [RBP + -0x20],0x0
JBE 0x00199b06
MOV RAX,qword ptr [RBP + -0x18]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x22],AL
MOVZX EAX,byte ptr [RBP + -0x22]
CMP EAX,0x80
JL 0x00199ac7
MOVZX EAX,byte ptr [RBP + -0x22]
MOV ECX,EAX
LEA RAX,[0x297360]
IMUL RCX,RCX,0x14
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOVZX EAX,byte ptr [RBP + -0x22]
MOV ECX,EAX
LEA RAX,[0x297360]
IMUL RCX,RCX,0x14
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x10]
AND EAX,0x10
CMP EAX,0x0
JZ 0x001999f8
MOVZX EAX,byte ptr [RBP + -0x21]
SUB EAX,0x8
MOV byte ptr [RBP + -0x21],AL
LAB_001999f8:
MOVZX EAX,byte ptr [RBP + -0x22]
MOV ECX,EAX
LEA RAX,[0x297360]
IMUL RCX,RCX,0x14
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x10]
AND EAX,0x20
CMP EAX,0x0
JZ 0x00199a72
CMP qword ptr [RBP + -0x20],0x1
JZ 0x00199a72
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
MOV ECX,EAX
LEA RAX,[0x297360]
IMUL RCX,RCX,0x14
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x10]
AND EAX,0x10
CMP EAX,0x0
JZ 0x00199a72
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,byte ptr [RAX + 0x1]
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],CL
MOV CL,byte ptr [RBP + -0x22]
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00199ae9
LAB_00199a72:
MOV RAX,qword ptr [RBP + -0x30]
CMP dword ptr [RAX + 0x4],0x9
JL 0x00199ac5
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x1
MOV RDX,qword ptr [RBP + -0x20]
SUB RDX,0x1
CALL 0x00136150
MOVZX EAX,byte ptr [RBP + -0x21]
MOV RCX,qword ptr [RBP + -0x30]
ADD EAX,dword ptr [RCX + 0x4]
SUB EAX,0x9
ADD EAX,0x1
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x10]
SUB RCX,0x1
MOV byte ptr [RAX + RCX*0x1],DL
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00199ae9
LAB_00199ac5:
JMP 0x00199ae7
LAB_00199ac7:
MOVZX EAX,byte ptr [RBP + -0x21]
SUB EAX,0x8
MOV byte ptr [RBP + -0x21],AL
MOVZX EAX,byte ptr [RBP + -0x22]
MOV ECX,EAX
LEA RAX,[0x41fb80]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],CL
LAB_00199ae7:
JMP 0x00199ae9
LAB_00199ae9:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00199994
LAB_00199b06:
MOV RAX,qword ptr [RBP + -0x10]
ADD RSP,0x30
POP RBP
RET
|
long thai2sortable(byte *param_1,long param_2)
{
byte bVar1;
char local_29;
long local_28;
byte *local_20;
local_29 = -8;
local_20 = param_1;
for (local_28 = param_2; local_28 != 0; local_28 = local_28 + -1) {
bVar1 = *local_20;
if (bVar1 < 0x80) {
local_29 = local_29 + -8;
*local_20 = to_lower_tis620[bVar1];
}
else {
if ((*(uint *)(t_ctype + (ulong)bVar1 * 0x14 + 0x10) & 0x10) != 0) {
local_29 = local_29 + -8;
}
if ((((*(uint *)(t_ctype + (ulong)bVar1 * 0x14 + 0x10) & 0x20) == 0) || (local_28 == 1)) ||
((*(uint *)(t_ctype + (ulong)local_20[1] * 0x14 + 0x10) & 0x10) == 0)) {
if (8 < *(int *)(t_ctype + (ulong)bVar1 * 0x14 + 4)) {
memmove(local_20,local_20 + 1,local_28 - 1);
param_1[param_2 + -1] =
(local_29 + (char)*(int4 *)(t_ctype + (ulong)bVar1 * 0x14 + 4)) - 8;
local_20 = local_20 + -1;
}
}
else {
*local_20 = local_20[1];
local_20[1] = bVar1;
local_28 = local_28 + -1;
local_20 = local_20 + 1;
}
}
local_20 = local_20 + 1;
}
return param_2;
}
|
|
16,448
|
js_map_read
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_map_read(BCReaderState *s, int magic)
{
JSContext *ctx = s->ctx;
JSValue obj, rv, argv[2];
uint32_t i, prop_count;
argv[0] = JS_UNDEFINED;
argv[1] = JS_UNDEFINED;
obj = js_map_constructor(ctx, JS_UNDEFINED, 0, NULL, magic);
if (JS_IsException(obj))
return JS_EXCEPTION;
if (BC_add_object_ref(s, obj))
goto fail;
if (bc_get_leb128(s, &prop_count))
goto fail;
for(i = 0; i < prop_count; i++) {
argv[0] = JS_ReadObjectRec(s);
if (JS_IsException(argv[0]))
goto fail;
if (!(magic & MAGIC_SET)) {
argv[1] = JS_ReadObjectRec(s);
if (JS_IsException(argv[1]))
goto fail;
}
rv = js_map_set(ctx, obj, countof(argv), argv, magic);
if (JS_IsException(rv))
goto fail;
JS_FreeValue(ctx, rv);
JS_FreeValue(ctx, argv[0]);
JS_FreeValue(ctx, argv[1]);
argv[0] = JS_UNDEFINED;
argv[1] = JS_UNDEFINED;
}
return obj;
fail:
JS_FreeValue(ctx, obj);
JS_FreeValue(ctx, argv[0]);
JS_FreeValue(ctx, argv[1]);
return JS_EXCEPTION;
}
|
O2
|
c
|
js_map_read:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %r9d
movq %rdi, %r13
movq (%rdi), %r14
andl $0x0, 0x20(%rsp)
andl $0x0, 0x30(%rsp)
movq $0x3, 0x38(%rsp)
xorl %r15d, %r15d
pushq $0x3
popq %rbp
movq %r14, %rdi
xorl %esi, %esi
movq %rbp, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl %r9d, 0x4(%rsp)
callq 0x2f33e
pushq $0x6
popq %rbx
movq %rdx, 0x10(%rsp)
cmpl $0x6, %edx
je 0x3d629
movq %r13, %rdi
movq %rax, 0x8(%rsp)
movq %rax, %rsi
callq 0x3d44b
testl %eax, %eax
je 0x3d510
movq %rbp, %r15
jmp 0x3d5f4
leaq 0x1c(%rsp), %rsi
movq %r13, %rdi
callq 0x3d194
movq %rbp, %r15
testl %eax, %eax
jne 0x3d5f4
movl 0x1c(%rsp), %ebx
pushq $0x3
popq %rbp
movq %r13, 0x40(%rsp)
subl $0x1, %ebx
jb 0x3d643
movq %r13, %rdi
callq 0x2ae8a
movq %rdx, %r15
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
cmpl $0x6, %r15d
je 0x3d5f1
movq %rax, %r12
movq %rbp, %r13
testb $0x1, 0x4(%rsp)
jne 0x3d586
movq 0x40(%rsp), %rdi
callq 0x2ae8a
movq %rdx, %r13
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
cmpl $0x6, %r13d
je 0x3d5ee
movq %r14, %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x20(%rsp), %r8
movl 0x4(%rsp), %r9d
callq 0x3d662
cmpl $0x6, %edx
je 0x3d5ee
movq %r14, %rdi
movq %rax, %rsi
callq 0x1801e
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x1801e
movq 0x30(%rsp), %rsi
movq %r14, %rdi
movq %r13, %rdx
callq 0x1801e
andl $0x0, 0x20(%rsp)
movq %rbp, 0x28(%rsp)
andl $0x0, 0x30(%rsp)
movq %rbp, 0x38(%rsp)
movq 0x40(%rsp), %r13
jmp 0x3d534
movq %r13, %rbp
pushq $0x6
popq %rbx
movq %r14, %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x1801e
movq 0x20(%rsp), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x1801e
movq 0x30(%rsp), %rsi
movq %r14, %rdi
movq %rbp, %rdx
callq 0x1801e
xorl %r15d, %r15d
xorl %eax, %eax
orq %rax, %r15
movq %r15, %rax
movq %rbx, %rdx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
movq 0x8(%rsp), %rdx
movq %rdx, %rax
andq %rcx, %rax
movl %edx, %r15d
movq 0x10(%rsp), %rbx
jmp 0x3d62b
|
js_map_read:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r9d, esi
mov r13, rdi
mov r14, [rdi]
and dword ptr [rsp+78h+var_58], 0
and dword ptr [rsp+78h+var_48], 0
mov [rsp+78h+var_40], 3
xor r15d, r15d
push 3
pop rbp
mov rdi, r14
xor esi, esi
mov rdx, rbp
xor ecx, ecx
xor r8d, r8d
mov [rsp+78h+var_74], r9d
call js_map_constructor
push 6
pop rbx
mov [rsp+78h+var_68], rdx
cmp edx, 6
jz loc_3D629
mov rdi, r13
mov [rsp+78h+var_70], rax
mov rsi, rax
call BC_add_object_ref1
test eax, eax
jz short loc_3D510
mov r15, rbp
jmp loc_3D5F4
loc_3D510:
lea rsi, [rsp+78h+var_5C]
mov rdi, r13
call bc_get_leb128
mov r15, rbp
test eax, eax
jnz loc_3D5F4
mov ebx, [rsp+78h+var_5C]
push 3
pop rbp
mov [rsp+78h+var_38], r13
loc_3D534:
sub ebx, 1
jb loc_3D643
mov rdi, r13
call JS_ReadObjectRec
mov r15, rdx
mov [rsp+78h+var_58], rax
mov [rsp+78h+var_50], rdx
cmp r15d, 6
jz loc_3D5F1
mov r12, rax
mov r13, rbp
test byte ptr [rsp+78h+var_74], 1
jnz short loc_3D586
mov rdi, [rsp+78h+var_38]
call JS_ReadObjectRec
mov r13, rdx
mov [rsp+78h+var_48], rax
mov [rsp+78h+var_40], rdx
cmp r13d, 6
jz short loc_3D5EE
loc_3D586:
mov rdi, r14
mov rsi, [rsp+78h+var_70]
mov rdx, [rsp+78h+var_68]
lea r8, [rsp+78h+var_58]
mov r9d, [rsp+78h+var_74]
call js_map_set
cmp edx, 6
jz short loc_3D5EE
mov rdi, r14
mov rsi, rax
call JS_FreeValue
mov rdi, r14
mov rsi, r12
mov rdx, r15
call JS_FreeValue
mov rsi, [rsp+78h+var_48]
mov rdi, r14
mov rdx, r13
call JS_FreeValue
and dword ptr [rsp+78h+var_58], 0
mov [rsp+78h+var_50], rbp
and dword ptr [rsp+78h+var_48], 0
mov [rsp+78h+var_40], rbp
mov r13, [rsp+78h+var_38]
jmp loc_3D534
loc_3D5EE:
mov rbp, r13
loc_3D5F1:
push 6
pop rbx
loc_3D5F4:
mov rdi, r14
mov rsi, [rsp+78h+var_70]
mov rdx, [rsp+78h+var_68]
call JS_FreeValue
mov rsi, [rsp+78h+var_58]
mov rdi, r14
mov rdx, r15
call JS_FreeValue
mov rsi, [rsp+78h+var_48]
mov rdi, r14
mov rdx, rbp
call JS_FreeValue
xor r15d, r15d
loc_3D629:
xor eax, eax
loc_3D62B:
or r15, rax
mov rax, r15
mov rdx, rbx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3D643:
mov rcx, 0FFFFFFFF00000000h
mov rdx, [rsp+78h+var_70]
mov rax, rdx
and rax, rcx
mov r15d, edx
mov rbx, [rsp+78h+var_68]
jmp short loc_3D62B
|
unsigned long long js_map_read(
long long *a1,
unsigned int a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
long long *v10; // r13
long long v11; // r14
long long v12; // r15
long long v13; // rbp
unsigned long long v14; // rax
long long v15; // rdx
long long v16; // r15
double v17; // xmm4_8
double v18; // xmm5_8
int v19; // ebx
long long ObjectRec; // rax
long long v22; // rcx
double v23; // xmm4_8
double v24; // xmm5_8
long long v25; // rdx
long long v26; // r12
long long v27; // r13
long long v28; // rax
long long v29; // rdx
long long v30; // rax
long long v31; // rdx
unsigned long long v32; // rax
long long v34; // [rsp+8h] [rbp-70h]
long long v35; // [rsp+10h] [rbp-68h]
int v36; // [rsp+1Ch] [rbp-5Ch] BYREF
long long v37; // [rsp+20h] [rbp-58h] BYREF
long long v38; // [rsp+28h] [rbp-50h]
long long v39; // [rsp+30h] [rbp-48h]
long long v40; // [rsp+38h] [rbp-40h]
long long *i; // [rsp+40h] [rbp-38h]
v10 = a1;
v11 = *a1;
LODWORD(v37) = 0;
LODWORD(v39) = 0;
v40 = 3LL;
v12 = 0LL;
v13 = 3LL;
v14 = js_map_constructor(v11, 0LL, 3LL, 0, 0LL, a2, a3, a4, a5, a6, a7, a8, a9, a10);
v35 = v15;
if ( (_DWORD)v15 == 6 )
goto LABEL_14;
v34 = v14;
if ( (unsigned int)BC_add_object_ref1((long long)a1, v14) )
{
v16 = 3LL;
LABEL_13:
JS_FreeValue(v11, v34, v35);
JS_FreeValue(v11, v37, v16);
JS_FreeValue(v11, v39, v13);
v12 = 0LL;
LABEL_14:
v32 = 0LL;
return v32 | v12;
}
v16 = 3LL;
if ( (unsigned int)bc_get_leb128((long long)a1, &v36) )
goto LABEL_13;
v19 = v36;
v13 = 3LL;
for ( i = a1; v19-- != 0; v10 = i )
{
ObjectRec = JS_ReadObjectRec(v10, a3, a4, a5, a6, v17, v18, a9, a10);
v16 = v25;
v37 = ObjectRec;
v38 = v25;
if ( (_DWORD)v25 == 6 )
goto LABEL_13;
v26 = ObjectRec;
v27 = 3LL;
if ( (a2 & 1) == 0
&& (v28 = JS_ReadObjectRec(i, a3, a4, a5, a6, v23, v24, a9, a10), v27 = v29,
v39 = v28,
v40 = v29,
(_DWORD)v29 == 6)
|| (v30 = js_map_set(v11, v34, v35, v22, &v37, a2), (_DWORD)v31 == 6) )
{
v13 = v27;
goto LABEL_13;
}
JS_FreeValue(v11, v30, v31);
JS_FreeValue(v11, v26, v16);
JS_FreeValue(v11, v39, v27);
LODWORD(v37) = 0;
v38 = 3LL;
LODWORD(v39) = 0;
v40 = 3LL;
}
v32 = v34 & 0xFFFFFFFF00000000LL;
v12 = (unsigned int)v34;
return v32 | v12;
}
|
js_map_read:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R9D,ESI
MOV R13,RDI
MOV R14,qword ptr [RDI]
AND dword ptr [RSP + 0x20],0x0
AND dword ptr [RSP + 0x30],0x0
MOV qword ptr [RSP + 0x38],0x3
XOR R15D,R15D
PUSH 0x3
POP RBP
MOV RDI,R14
XOR ESI,ESI
MOV RDX,RBP
XOR ECX,ECX
XOR R8D,R8D
MOV dword ptr [RSP + 0x4],R9D
CALL 0x0012f33e
PUSH 0x6
POP RBX
MOV qword ptr [RSP + 0x10],RDX
CMP EDX,0x6
JZ 0x0013d629
MOV RDI,R13
MOV qword ptr [RSP + 0x8],RAX
MOV RSI,RAX
CALL 0x0013d44b
TEST EAX,EAX
JZ 0x0013d510
MOV R15,RBP
JMP 0x0013d5f4
LAB_0013d510:
LEA RSI,[RSP + 0x1c]
MOV RDI,R13
CALL 0x0013d194
MOV R15,RBP
TEST EAX,EAX
JNZ 0x0013d5f4
MOV EBX,dword ptr [RSP + 0x1c]
PUSH 0x3
POP RBP
MOV qword ptr [RSP + 0x40],R13
LAB_0013d534:
SUB EBX,0x1
JC 0x0013d643
MOV RDI,R13
CALL 0x0012ae8a
MOV R15,RDX
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RDX
CMP R15D,0x6
JZ 0x0013d5f1
MOV R12,RAX
MOV R13,RBP
TEST byte ptr [RSP + 0x4],0x1
JNZ 0x0013d586
MOV RDI,qword ptr [RSP + 0x40]
CALL 0x0012ae8a
MOV R13,RDX
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x38],RDX
CMP R13D,0x6
JZ 0x0013d5ee
LAB_0013d586:
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LEA R8,[RSP + 0x20]
MOV R9D,dword ptr [RSP + 0x4]
CALL 0x0013d662
CMP EDX,0x6
JZ 0x0013d5ee
MOV RDI,R14
MOV RSI,RAX
CALL 0x0011801e
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x0011801e
MOV RSI,qword ptr [RSP + 0x30]
MOV RDI,R14
MOV RDX,R13
CALL 0x0011801e
AND dword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x28],RBP
AND dword ptr [RSP + 0x30],0x0
MOV qword ptr [RSP + 0x38],RBP
MOV R13,qword ptr [RSP + 0x40]
JMP 0x0013d534
LAB_0013d5ee:
MOV RBP,R13
LAB_0013d5f1:
PUSH 0x6
POP RBX
LAB_0013d5f4:
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
CALL 0x0011801e
MOV RSI,qword ptr [RSP + 0x20]
MOV RDI,R14
MOV RDX,R15
CALL 0x0011801e
MOV RSI,qword ptr [RSP + 0x30]
MOV RDI,R14
MOV RDX,RBP
CALL 0x0011801e
XOR R15D,R15D
LAB_0013d629:
XOR EAX,EAX
LAB_0013d62b:
OR R15,RAX
MOV RAX,R15
MOV RDX,RBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013d643:
MOV RCX,-0x100000000
MOV RDX,qword ptr [RSP + 0x8]
MOV RAX,RDX
AND RAX,RCX
MOV R15D,EDX
MOV RBX,qword ptr [RSP + 0x10]
JMP 0x0013d62b
|
int1 [16] js_map_read(int8 *param_1,uint param_2)
{
int8 uVar1;
int8 uVar2;
int iVar3;
int8 uVar4;
ulong uVar5;
int8 uVar6;
int8 uVar7;
int8 uVar8;
ulong uVar9;
bool bVar10;
int1 auVar11 [16];
int1 auVar12 [16];
int1 auVar13 [16];
int1 auVar14 [12];
int local_5c;
int1 local_58 [16];
int1 local_48 [16];
int8 *local_38;
uVar1 = *param_1;
local_58._0_8_ = local_58._0_8_ & 0xffffffff00000000;
local_48._0_8_ = local_48._0_8_ & 0xffffffff00000000;
local_48._8_8_ = 3;
uVar7 = 3;
auVar11 = js_map_constructor(uVar1,0,3,0,0);
uVar6 = auVar11._8_8_;
uVar9 = auVar11._0_8_;
if (auVar11._8_4_ != 6) {
iVar3 = BC_add_object_ref1(param_1,uVar9);
auVar11._8_8_ = local_48._8_8_;
auVar11._0_8_ = local_48._0_8_;
uVar8 = uVar7;
if (iVar3 == 0) {
iVar3 = bc_get_leb128(param_1,&local_5c);
auVar11._8_8_ = local_48._8_8_;
auVar11._0_8_ = local_48._0_8_;
if (iVar3 == 0) {
uVar2 = 3;
iVar3 = local_5c;
local_38 = param_1;
while (bVar10 = iVar3 != 0, iVar3 = iVar3 + -1, bVar10) {
local_58 = JS_ReadObjectRec(local_38);
auVar11._8_8_ = local_48._8_8_;
auVar11._0_8_ = local_48._0_8_;
auVar12._8_8_ = 3;
auVar12._0_8_ = local_48._0_8_;
uVar8 = local_58._8_8_;
uVar4 = local_58._0_8_;
uVar7 = uVar2;
if (local_58._8_4_ == 6) goto LAB_0013d5f4;
if ((param_2 & 1) == 0) {
auVar12 = JS_ReadObjectRec(local_38);
uVar7 = auVar12._8_8_;
local_48._8_8_ = uVar7;
auVar11 = auVar12;
if (auVar12._8_4_ == 6) goto LAB_0013d5f4;
}
uVar7 = auVar12._8_8_;
local_48._0_8_ = auVar12._0_8_;
auVar14 = js_map_set(uVar1,uVar9,uVar6);
auVar11._8_8_ = local_48._8_8_;
auVar11._0_8_ = local_48._0_8_;
if (auVar14._8_4_ == 6) goto LAB_0013d5f4;
JS_FreeValue(uVar1,auVar14._0_8_);
JS_FreeValue(uVar1,uVar4,uVar8);
JS_FreeValue(uVar1,local_48._0_8_,uVar7);
local_58._0_8_ = local_58._0_8_ & 0xffffffff00000000;
local_48._0_8_ = local_48._0_8_ & 0xffffffff00000000;
local_58._8_8_ = uVar2;
local_48._8_8_ = uVar2;
}
uVar5 = uVar9 & 0xffffffff00000000;
uVar9 = uVar9 & 0xffffffff;
goto LAB_0013d62b;
}
}
LAB_0013d5f4:
local_48 = auVar11;
JS_FreeValue(uVar1,uVar9,uVar6);
JS_FreeValue(uVar1,local_58._0_8_,uVar8);
JS_FreeValue(uVar1,local_48._0_8_,uVar7);
}
uVar6 = 6;
uVar9 = 0;
uVar5 = 0;
LAB_0013d62b:
auVar13._8_8_ = uVar6;
auVar13._0_8_ = uVar9 | uVar5;
return auVar13;
}
|
|
16,449
|
Modbus::ModbusTcpServerPrivateUnix::~ModbusTcpServerPrivateUnix()
|
serhmarch[P]ModbusBridge/modbus/src/unix/ModbusTcpServer_p_unix.h
|
~ModbusTcpServerPrivateUnix()
{
delete this->socket;
}
|
O1
|
c
|
Modbus::ModbusTcpServerPrivateUnix::~ModbusTcpServerPrivateUnix():
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0xae51(%rip), %rax # 0x22d48
movq %rax, (%rdi)
movq 0xd8(%rdi), %rdi
testq %rdi, %rdi
je 0x17f10
movl $0x4, %esi
callq 0x5310
leaq 0xae81(%rip), %rax # 0x22d98
movq %rax, (%rbx)
leaq 0xc0(%rbx), %r14
movq 0xc0(%rbx), %rdi
cmpq %r14, %rdi
je 0x17f42
movq (%rdi), %r15
movl $0x18, %esi
callq 0x5310
movq %r15, %rdi
cmpq %r14, %r15
jne 0x17f2d
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xeeac
nop
|
_ZN6Modbus26ModbusTcpServerPrivateUnixD2Ev:
push r15
push r14
push rbx
mov rbx, rdi
lea rax, off_22D48
mov [rdi], rax
mov rdi, [rdi+0D8h]; void *
test rdi, rdi
jz short loc_17F10
mov esi, 4; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_17F10:
lea rax, off_22D98
mov [rbx], rax
lea r14, [rbx+0C0h]
mov rdi, [rbx+0C0h]; void *
cmp rdi, r14
jz short loc_17F42
loc_17F2D:
mov r15, [rdi]
mov esi, 18h; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, r15
cmp r15, r14
jnz short loc_17F2D
loc_17F42:
mov rdi, rbx; this
pop rbx
pop r14
pop r15
jmp _ZN23ModbusServerPortPrivateD2Ev; ModbusServerPortPrivate::~ModbusServerPortPrivate()
|
void Modbus::ModbusTcpServerPrivateUnix::~ModbusTcpServerPrivateUnix(
Modbus::ModbusTcpServerPrivateUnix *this)
{
void *v2; // rdi
Modbus::ModbusTcpServerPrivateUnix **v3; // rdi
Modbus::ModbusTcpServerPrivateUnix *v4; // r15
*(_QWORD *)this = off_22D48;
v2 = (void *)*((_QWORD *)this + 27);
if ( v2 )
operator delete(v2, 4uLL);
*(_QWORD *)this = &off_22D98;
v3 = (Modbus::ModbusTcpServerPrivateUnix **)*((_QWORD *)this + 24);
if ( v3 != (Modbus::ModbusTcpServerPrivateUnix **)((char *)this + 192) )
{
do
{
v4 = *v3;
operator delete(v3, 0x18uLL);
v3 = (Modbus::ModbusTcpServerPrivateUnix **)v4;
}
while ( v4 != (Modbus::ModbusTcpServerPrivateUnix *)((char *)this + 192) );
}
ModbusServerPortPrivate::~ModbusServerPortPrivate(this);
}
|
~ModbusTcpServerPrivateUnix:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x122d48]
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0xd8]
TEST RDI,RDI
JZ 0x00117f10
MOV ESI,0x4
CALL 0x00105310
LAB_00117f10:
LEA RAX,[0x122d98]
MOV qword ptr [RBX],RAX
LEA R14,[RBX + 0xc0]
MOV RDI,qword ptr [RBX + 0xc0]
CMP RDI,R14
JZ 0x00117f42
LAB_00117f2d:
MOV R15,qword ptr [RDI]
MOV ESI,0x18
CALL 0x00105310
MOV RDI,R15
CMP R15,R14
JNZ 0x00117f2d
LAB_00117f42:
MOV RDI,RBX
POP RBX
POP R14
POP R15
JMP 0x0010eeac
|
/* Modbus::ModbusTcpServerPrivateUnix::~ModbusTcpServerPrivateUnix() */
void __thiscall
Modbus::ModbusTcpServerPrivateUnix::~ModbusTcpServerPrivateUnix(ModbusTcpServerPrivateUnix *this)
{
ModbusTcpServerPrivateUnix *pMVar1;
ModbusTcpServerPrivateUnix *pMVar2;
*(int ***)this = &PTR__ModbusTcpServerPrivateUnix_00122d48;
if (*(void **)(this + 0xd8) != (void *)0x0) {
operator_delete(*(void **)(this + 0xd8),4);
}
*(int ***)this = &PTR__ModbusTcpServerPrivate_00122d98;
pMVar2 = *(ModbusTcpServerPrivateUnix **)(this + 0xc0);
while (pMVar2 != this + 0xc0) {
pMVar1 = *(ModbusTcpServerPrivateUnix **)pMVar2;
operator_delete(pMVar2,0x18);
pMVar2 = pMVar1;
}
ModbusServerPortPrivate::~ModbusServerPortPrivate((ModbusServerPortPrivate *)this);
return;
}
|
|
16,450
|
Modbus::ModbusTcpServerPrivateUnix::~ModbusTcpServerPrivateUnix()
|
serhmarch[P]ModbusBridge/modbus/src/unix/ModbusTcpServer_p_unix.h
|
~ModbusTcpServerPrivateUnix()
{
delete this->socket;
}
|
O3
|
c
|
Modbus::ModbusTcpServerPrivateUnix::~ModbusTcpServerPrivateUnix():
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0xa069(%rip), %rax # 0x21d48
movq %rax, (%rdi)
movq 0xd8(%rdi), %rdi
movl $0x4, %esi
callq 0x5310
leaq 0xa09e(%rip), %rax # 0x21d98
movq %rax, (%rbx)
leaq 0xc0(%rbx), %r14
movq 0xc0(%rbx), %rdi
cmpq %r14, %rdi
je 0x17d25
movq (%rdi), %r15
movl $0x18, %esi
callq 0x5310
movq %r15, %rdi
cmpq %r14, %r15
jne 0x17d10
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xef0c
|
_ZN6Modbus26ModbusTcpServerPrivateUnixD2Ev:
push r15
push r14
push rbx
mov rbx, rdi
lea rax, off_21D48
mov [rdi], rax
mov rdi, [rdi+0D8h]; void *
mov esi, 4; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
lea rax, off_21D98
mov [rbx], rax
lea r14, [rbx+0C0h]
mov rdi, [rbx+0C0h]; void *
cmp rdi, r14
jz short loc_17D25
loc_17D10:
mov r15, [rdi]
mov esi, 18h; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, r15
cmp r15, r14
jnz short loc_17D10
loc_17D25:
mov rdi, rbx; this
pop rbx
pop r14
pop r15
jmp _ZN23ModbusServerPortPrivateD2Ev; ModbusServerPortPrivate::~ModbusServerPortPrivate()
|
void Modbus::ModbusTcpServerPrivateUnix::~ModbusTcpServerPrivateUnix(void **this)
{
char *v2; // r14
char *v3; // rdi
char *v4; // r15
*this = off_21D48;
operator delete(this[27], 4uLL);
*this = &off_21D98;
v2 = (char *)(this + 24);
v3 = (char *)this[24];
if ( v3 != v2 )
{
do
{
v4 = *(char **)v3;
operator delete(v3, 0x18uLL);
v3 = v4;
}
while ( v4 != v2 );
}
ModbusServerPortPrivate::~ModbusServerPortPrivate((ModbusServerPortPrivate *)this);
}
|
~ModbusTcpServerPrivateUnix:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x121d48]
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0xd8]
MOV ESI,0x4
CALL 0x00105310
LEA RAX,[0x121d98]
MOV qword ptr [RBX],RAX
LEA R14,[RBX + 0xc0]
MOV RDI,qword ptr [RBX + 0xc0]
CMP RDI,R14
JZ 0x00117d25
LAB_00117d10:
MOV R15,qword ptr [RDI]
MOV ESI,0x18
CALL 0x00105310
MOV RDI,R15
CMP R15,R14
JNZ 0x00117d10
LAB_00117d25:
MOV RDI,RBX
POP RBX
POP R14
POP R15
JMP 0x0010ef0c
|
/* Modbus::ModbusTcpServerPrivateUnix::~ModbusTcpServerPrivateUnix() */
void __thiscall
Modbus::ModbusTcpServerPrivateUnix::~ModbusTcpServerPrivateUnix(ModbusTcpServerPrivateUnix *this)
{
ModbusTcpServerPrivateUnix *pMVar1;
ModbusTcpServerPrivateUnix *pMVar2;
*(int ***)this = &PTR__ModbusTcpServerPrivateUnix_00121d48;
operator_delete(*(void **)(this + 0xd8),4);
*(int ***)this = &PTR__ModbusTcpServerPrivate_00121d98;
pMVar2 = *(ModbusTcpServerPrivateUnix **)(this + 0xc0);
while (pMVar2 != this + 0xc0) {
pMVar1 = *(ModbusTcpServerPrivateUnix **)pMVar2;
operator_delete(pMVar2,0x18);
pMVar2 = pMVar1;
}
ModbusServerPortPrivate::~ModbusServerPortPrivate((ModbusServerPortPrivate *)this);
return;
}
|
|
16,451
|
my_coll_lexem_next
|
eloqsql/strings/ctype-uca.c
|
static my_coll_lexem_num my_coll_lexem_next(MY_COLL_LEXEM *lexem)
{
const char *beg;
my_coll_lexem_num rc;
for (beg= lexem->beg ; beg < lexem->end ; beg++)
{
switch (*beg)
{
case ' ':
case '\t':
case '\r':
case '\n':
continue;
case '[': /* Bracket expression, e.g. "[optimize [a-z]]" */
{
size_t nbrackets; /* Indicates nested recursion level */
for (beg++, nbrackets= 1 ; beg < lexem->end; beg++)
{
if (*beg == '[') /* Enter nested bracket expression */
nbrackets++;
else if (*beg == ']')
{
if (--nbrackets == 0)
{
rc= MY_COLL_LEXEM_OPTION;
beg++;
goto ex;
}
}
}
rc= MY_COLL_LEXEM_ERROR;
goto ex;
}
case '&':
beg++;
rc= MY_COLL_LEXEM_RESET;
goto ex;
case '=':
beg++;
lexem->diff= 0;
rc= MY_COLL_LEXEM_SHIFT;
goto ex;
case '/':
beg++;
rc= MY_COLL_LEXEM_EXTEND;
goto ex;
case '|':
beg++;
rc= MY_COLL_LEXEM_CONTEXT;
goto ex;
case '<': /* Shift: '<' or '<<' or '<<<' or '<<<<' */
{
/* Scan up to 3 additional '<' characters */
for (beg++, lexem->diff= 1;
(beg < lexem->end) && (*beg == '<') && (lexem->diff <= 3);
beg++, lexem->diff++);
rc= MY_COLL_LEXEM_SHIFT;
goto ex;
}
default:
break;
}
/* Escaped character, e.g. \u1234 */
if ((*beg == '\\') && (beg + 2 < lexem->end) &&
(beg[1] == 'u') && my_isxdigit(&my_charset_utf8mb3_general_ci, beg[2]))
{
int ch;
beg+= 2;
lexem->code= 0;
while ((beg < lexem->end) && ((ch= ch2x(beg[0])) >= 0))
{
lexem->code= (lexem->code << 4) + ch;
beg++;
}
rc= MY_COLL_LEXEM_CHAR;
goto ex;
}
/*
Unescaped single byte character:
allow printable ASCII range except SPACE and
special characters parsed above []<&/|=
*/
if (*beg >= 0x21 && *beg <= 0x7E)
{
lexem->code= *beg++;
rc= MY_COLL_LEXEM_CHAR;
goto ex;
}
if (((uchar) *beg) > 0x7F) /* Unescaped multibyte character */
{
CHARSET_INFO *cs= &my_charset_utf8mb3_general_ci;
my_wc_t wc;
int nbytes= my_ci_mb_wc(cs, &wc, (uchar *) beg, (uchar *) lexem->end);
if (nbytes > 0)
{
rc= MY_COLL_LEXEM_CHAR;
beg+= nbytes;
lexem->code= (int) wc;
goto ex;
}
}
rc= MY_COLL_LEXEM_ERROR;
goto ex;
}
rc= MY_COLL_LEXEM_EOF;
ex:
lexem->prev= lexem->beg;
lexem->beg= beg;
lexem->term= rc;
return rc;
}
|
O3
|
c
|
my_coll_lexem_next:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %r14
movq 0x10(%rdi), %rcx
xorl %r15d, %r15d
cmpq %rcx, %r14
jae 0x7666d
movzbl (%r14), %edx
cmpl $0xc, %edx
jle 0x76475
cmpl $0x1f, %edx
jle 0x76482
cmpl $0x25, %edx
jg 0x7649b
cmpl $0x20, %edx
je 0x7648b
jmp 0x76627
leal -0x9(%rdx), %eax
cmpl $0x2, %eax
jb 0x7648b
jmp 0x76627
cmpl $0xd, %edx
jne 0x76627
incq %r14
cmpq %rcx, %r14
jne 0x76458
movq %rcx, %rax
jmp 0x76670
cmpl $0x3c, %edx
jle 0x764f8
cmpl $0x5b, %edx
jg 0x76559
cmpl $0x3d, %edx
je 0x76575
cmpl $0x5b, %edx
jne 0x76627
incq %r14
movl $0x6, %r15d
cmpq %rcx, %r14
jae 0x7666d
movl $0x1, %eax
movzbl (%r14), %edx
cmpl $0x5d, %edx
je 0x764e5
cmpl $0x5b, %edx
jne 0x764ee
incq %rax
jmp 0x764ee
decq %rax
je 0x7668a
incq %r14
cmpq %rcx, %r14
jb 0x764d2
jmp 0x76493
cmpl $0x26, %edx
je 0x7661c
cmpl $0x2f, %edx
je 0x76611
cmpl $0x3c, %edx
jne 0x76627
incq %r14
movl $0x1, 0x20(%rbx)
movl $0x1, %r15d
cmpq %rcx, %r14
jae 0x7666d
movl $0x2, %eax
cmpb $0x3c, (%r14)
jne 0x7666d
leal -0x1(%rax), %edx
cmpl $0x4, %edx
jae 0x7666d
incq %r14
movl %eax, 0x20(%rbx)
incl %eax
cmpq %rcx, %r14
jb 0x76531
jmp 0x76493
cmpl $0x5c, %edx
je 0x7658a
cmpl $0x7c, %edx
jne 0x76627
incq %r14
movl $0x9, %r15d
jmp 0x7666d
incq %r14
movl $0x0, 0x20(%rbx)
movl $0x1, %r15d
jmp 0x7666d
leaq 0x2(%r14), %rax
cmpq %rcx, %rax
jae 0x76661
cmpb $0x75, 0x1(%r14)
jne 0x76661
leaq 0x32e8f7(%rip), %rsi # 0x3a4ea0
movq 0x40(%rsi), %rsi
movzbl (%rax), %edi
cmpb $0x0, 0x1(%rsi,%rdi)
jns 0x76661
movl $0x0, 0x24(%rbx)
xorl %edx, %edx
movsbl (%rax), %esi
leal -0x30(%rsi), %edi
cmpl $0xa, %edi
jb 0x765f9
leal -0x61(%rsi), %edi
cmpl $0x5, %edi
ja 0x765dc
addl $-0x57, %esi
jmp 0x765f7
movl $0x5, %r15d
cmpb $0x37, %sil
jl 0x76670
leal -0x41(%rsi), %edi
cmpl $0x5, %edi
ja 0x76670
addl $-0x37, %esi
movl %esi, %edi
shll $0x4, %edx
addl %edi, %edx
movl %edx, 0x24(%rbx)
incq %rax
movl $0x5, %r15d
cmpq %rcx, %rax
jb 0x765c4
jmp 0x76670
incq %r14
movl $0x8, %r15d
jmp 0x7666d
incq %r14
movl $0x4, %r15d
jmp 0x7666d
leal -0x7f(%rdx), %eax
cmpb $-0x5e, %al
jae 0x76661
movl $0x6, %r15d
testb %dl, %dl
jns 0x7666d
leaq 0x32e861(%rip), %rdi # 0x3a4ea0
movq 0xb8(%rdi), %rax
leaq -0x20(%rbp), %rsi
movq %r14, %rdx
callq *0x28(%rax)
testl %eax, %eax
jle 0x7666d
movl %eax, %eax
addq %rax, %r14
movl -0x20(%rbp), %eax
movl %eax, 0x24(%rbx)
jmp 0x76667
incq %r14
movl %edx, 0x24(%rbx)
movl $0x5, %r15d
movq %r14, %rax
movq 0x8(%rbx), %rcx
movq %rcx, 0x18(%rbx)
movq %rax, 0x8(%rbx)
movl %r15d, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
incq %r14
movl $0x7, %r15d
jmp 0x7666d
|
my_coll_lexem_next:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov r14, [rdi+8]
mov rcx, [rdi+10h]
xor r15d, r15d
cmp r14, rcx
jnb loc_7666D
loc_76458:
movzx edx, byte ptr [r14]
cmp edx, 0Ch
jle short loc_76475
cmp edx, 1Fh
jle short loc_76482
cmp edx, 25h ; '%'
jg short loc_7649B
cmp edx, 20h ; ' '
jz short loc_7648B
jmp loc_76627
loc_76475:
lea eax, [rdx-9]
cmp eax, 2
jb short loc_7648B
jmp loc_76627
loc_76482:
cmp edx, 0Dh
jnz loc_76627
loc_7648B:
inc r14
cmp r14, rcx
jnz short loc_76458
loc_76493:
mov rax, rcx
jmp loc_76670
loc_7649B:
cmp edx, 3Ch ; '<'
jle short loc_764F8
cmp edx, 5Bh ; '['
jg loc_76559
cmp edx, 3Dh ; '='
jz loc_76575
cmp edx, 5Bh ; '['
jnz loc_76627
inc r14
mov r15d, 6
cmp r14, rcx
jnb loc_7666D
mov eax, 1
loc_764D2:
movzx edx, byte ptr [r14]
cmp edx, 5Dh ; ']'
jz short loc_764E5
cmp edx, 5Bh ; '['
jnz short loc_764EE
inc rax
jmp short loc_764EE
loc_764E5:
dec rax
jz loc_7668A
loc_764EE:
inc r14
cmp r14, rcx
jb short loc_764D2
jmp short loc_76493
loc_764F8:
cmp edx, 26h ; '&'
jz loc_7661C
cmp edx, 2Fh ; '/'
jz loc_76611
cmp edx, 3Ch ; '<'
jnz loc_76627
inc r14
mov dword ptr [rbx+20h], 1
mov r15d, 1
cmp r14, rcx
jnb loc_7666D
mov eax, 2
loc_76531:
cmp byte ptr [r14], 3Ch ; '<'
jnz loc_7666D
lea edx, [rax-1]
cmp edx, 4
jnb loc_7666D
inc r14
mov [rbx+20h], eax
inc eax
cmp r14, rcx
jb short loc_76531
jmp loc_76493
loc_76559:
cmp edx, 5Ch ; '\'
jz short loc_7658A
cmp edx, 7Ch ; '|'
jnz loc_76627
inc r14
mov r15d, 9
jmp loc_7666D
loc_76575:
inc r14
mov dword ptr [rbx+20h], 0
mov r15d, 1
jmp loc_7666D
loc_7658A:
lea rax, [r14+2]
cmp rax, rcx
jnb loc_76661
cmp byte ptr [r14+1], 75h ; 'u'
jnz loc_76661
lea rsi, my_charset_utf8mb3_general_ci
mov rsi, [rsi+40h]
movzx edi, byte ptr [rax]
cmp byte ptr [rsi+rdi+1], 0
jns loc_76661
mov dword ptr [rbx+24h], 0
xor edx, edx
loc_765C4:
movsx esi, byte ptr [rax]
lea edi, [rsi-30h]
cmp edi, 0Ah
jb short loc_765F9
lea edi, [rsi-61h]
cmp edi, 5
ja short loc_765DC
add esi, 0FFFFFFA9h
jmp short loc_765F7
loc_765DC:
mov r15d, 5
cmp sil, 37h ; '7'
jl loc_76670
lea edi, [rsi-41h]
cmp edi, 5
ja short loc_76670
add esi, 0FFFFFFC9h
loc_765F7:
mov edi, esi
loc_765F9:
shl edx, 4
add edx, edi
mov [rbx+24h], edx
inc rax
mov r15d, 5
cmp rax, rcx
jb short loc_765C4
jmp short loc_76670
loc_76611:
inc r14
mov r15d, 8
jmp short loc_7666D
loc_7661C:
inc r14
mov r15d, 4
jmp short loc_7666D
loc_76627:
lea eax, [rdx-7Fh]
cmp al, 0A2h
jnb short loc_76661
mov r15d, 6
test dl, dl
jns short loc_7666D
lea rdi, my_charset_utf8mb3_general_ci
mov rax, [rdi+0B8h]
lea rsi, [rbp+var_20]
mov rdx, r14
call qword ptr [rax+28h]
test eax, eax
jle short loc_7666D
mov eax, eax
add r14, rax
mov eax, [rbp+var_20]
mov [rbx+24h], eax
jmp short loc_76667
loc_76661:
inc r14
mov [rbx+24h], edx
loc_76667:
mov r15d, 5
loc_7666D:
mov rax, r14
loc_76670:
mov rcx, [rbx+8]
mov [rbx+18h], rcx
mov [rbx+8], rax
mov [rbx], r15d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_7668A:
inc r14
mov r15d, 7
jmp short loc_7666D
|
unsigned __int8 * my_coll_lexem_next(long long a1)
{
long long v1; // rax
unsigned __int8 *v3; // r14
unsigned long long v4; // rcx
int v5; // r15d
unsigned int v6; // edx
unsigned __int8 *result; // rax
long long v8; // rax
int v9; // edx
int v10; // eax
int v11; // edx
int v12; // esi
int v13; // edi
int v14; // esi
int v15; // eax
_QWORD v16[4]; // [rsp+0h] [rbp-20h] BYREF
v16[0] = v1;
v3 = *(unsigned __int8 **)(a1 + 8);
v4 = *(_QWORD *)(a1 + 16);
v5 = 0;
if ( (unsigned long long)v3 >= v4 )
goto LABEL_58;
do
{
v6 = *v3;
if ( v6 <= 0xC )
{
if ( v6 - 9 >= 2 )
goto LABEL_52;
}
else
{
if ( *v3 > 0x1Fu )
{
if ( *v3 <= 0x25u )
{
if ( v6 != 32 )
goto LABEL_52;
goto LABEL_10;
}
if ( *v3 <= 0x3Cu )
{
switch ( v6 )
{
case '&':
++v3;
v5 = 4;
goto LABEL_58;
case '/':
++v3;
v5 = 8;
goto LABEL_58;
case '<':
++v3;
*(_DWORD *)(a1 + 32) = 1;
v5 = 1;
if ( (unsigned long long)v3 >= v4 )
goto LABEL_58;
v10 = 2;
while ( *v3 == 60 && (unsigned int)(v10 - 1) < 4 )
{
++v3;
*(_DWORD *)(a1 + 32) = v10++;
if ( (unsigned long long)v3 >= v4 )
goto LABEL_11;
}
goto LABEL_58;
}
}
else if ( *v3 > 0x5Bu )
{
if ( v6 == 92 )
{
result = v3 + 2;
if ( (unsigned long long)(v3 + 2) < v4
&& v3[1] == 117
&& *(char *)(*(_QWORD *)&my_charset_utf8mb3_general_ci[16] + *result + 1LL) < 0 )
{
*(_DWORD *)(a1 + 36) = 0;
v11 = 0;
while ( 1 )
{
v12 = (char)*result;
v13 = v12 - 48;
if ( (unsigned int)(v12 - 48) >= 0xA )
{
if ( (unsigned int)(v12 - 97) > 5 )
{
v5 = 5;
if ( (char)v12 < 55 || (unsigned int)(v12 - 65) > 5 )
goto LABEL_59;
v14 = v12 - 55;
}
else
{
v14 = v12 - 87;
}
v13 = v14;
}
v11 = v13 + 16 * v11;
*(_DWORD *)(a1 + 36) = v11;
++result;
v5 = 5;
if ( (unsigned long long)result >= v4 )
goto LABEL_59;
}
}
goto LABEL_56;
}
if ( v6 == 124 )
{
++v3;
v5 = 9;
goto LABEL_58;
}
}
else
{
if ( v6 == 61 )
{
++v3;
*(_DWORD *)(a1 + 32) = 0;
v5 = 1;
goto LABEL_58;
}
if ( v6 == 91 )
{
++v3;
v5 = 6;
if ( (unsigned long long)v3 >= v4 )
goto LABEL_58;
v8 = 1LL;
while ( 1 )
{
v9 = *v3;
if ( v9 == 93 )
{
if ( !--v8 )
{
++v3;
v5 = 7;
goto LABEL_58;
}
}
else if ( v9 == 91 )
{
++v8;
}
if ( (unsigned long long)++v3 >= v4 )
goto LABEL_11;
}
}
}
LABEL_52:
if ( (unsigned __int8)(v6 - 127) < 0xA2u )
{
v5 = 6;
if ( (v6 & 0x80u) != 0 )
{
v15 = (*(long long ( **)(unsigned int *, _QWORD *, unsigned __int8 *))(*(_QWORD *)&my_charset_utf8mb3_general_ci[46]
+ 40LL))(
my_charset_utf8mb3_general_ci,
v16,
v3);
if ( v15 > 0 )
{
v3 += (unsigned int)v15;
*(_DWORD *)(a1 + 36) = v16[0];
LABEL_57:
v5 = 5;
}
}
LABEL_58:
result = v3;
goto LABEL_59;
}
LABEL_56:
++v3;
*(_DWORD *)(a1 + 36) = v6;
goto LABEL_57;
}
if ( v6 != 13 )
goto LABEL_52;
}
LABEL_10:
++v3;
}
while ( v3 != (unsigned __int8 *)v4 );
LABEL_11:
result = (unsigned __int8 *)v4;
LABEL_59:
*(_QWORD *)(a1 + 24) = *(_QWORD *)(a1 + 8);
*(_QWORD *)(a1 + 8) = result;
*(_DWORD *)a1 = v5;
return result;
}
|
my_coll_lexem_next:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RDI + 0x10]
XOR R15D,R15D
CMP R14,RCX
JNC 0x0017666d
LAB_00176458:
MOVZX EDX,byte ptr [R14]
CMP EDX,0xc
JLE 0x00176475
CMP EDX,0x1f
JLE 0x00176482
CMP EDX,0x25
JG 0x0017649b
CMP EDX,0x20
JZ 0x0017648b
JMP 0x00176627
LAB_00176475:
LEA EAX,[RDX + -0x9]
CMP EAX,0x2
JC 0x0017648b
JMP 0x00176627
LAB_00176482:
CMP EDX,0xd
JNZ 0x00176627
LAB_0017648b:
INC R14
CMP R14,RCX
JNZ 0x00176458
LAB_00176493:
MOV RAX,RCX
JMP 0x00176670
LAB_0017649b:
CMP EDX,0x3c
JLE 0x001764f8
CMP EDX,0x5b
JG 0x00176559
CMP EDX,0x3d
JZ 0x00176575
CMP EDX,0x5b
JNZ 0x00176627
INC R14
MOV R15D,0x6
CMP R14,RCX
JNC 0x0017666d
MOV EAX,0x1
LAB_001764d2:
MOVZX EDX,byte ptr [R14]
CMP EDX,0x5d
JZ 0x001764e5
CMP EDX,0x5b
JNZ 0x001764ee
INC RAX
JMP 0x001764ee
LAB_001764e5:
DEC RAX
JZ 0x0017668a
LAB_001764ee:
INC R14
CMP R14,RCX
JC 0x001764d2
JMP 0x00176493
LAB_001764f8:
CMP EDX,0x26
JZ 0x0017661c
CMP EDX,0x2f
JZ 0x00176611
CMP EDX,0x3c
JNZ 0x00176627
INC R14
MOV dword ptr [RBX + 0x20],0x1
MOV R15D,0x1
CMP R14,RCX
JNC 0x0017666d
MOV EAX,0x2
LAB_00176531:
CMP byte ptr [R14],0x3c
JNZ 0x0017666d
LEA EDX,[RAX + -0x1]
CMP EDX,0x4
JNC 0x0017666d
INC R14
MOV dword ptr [RBX + 0x20],EAX
INC EAX
CMP R14,RCX
JC 0x00176531
JMP 0x00176493
LAB_00176559:
CMP EDX,0x5c
JZ 0x0017658a
CMP EDX,0x7c
JNZ 0x00176627
INC R14
MOV R15D,0x9
JMP 0x0017666d
LAB_00176575:
INC R14
MOV dword ptr [RBX + 0x20],0x0
MOV R15D,0x1
JMP 0x0017666d
LAB_0017658a:
LEA RAX,[R14 + 0x2]
CMP RAX,RCX
JNC 0x00176661
CMP byte ptr [R14 + 0x1],0x75
JNZ 0x00176661
LEA RSI,[0x4a4ea0]
MOV RSI,qword ptr [RSI + 0x40]
MOVZX EDI,byte ptr [RAX]
CMP byte ptr [RSI + RDI*0x1 + 0x1],0x0
JNS 0x00176661
MOV dword ptr [RBX + 0x24],0x0
XOR EDX,EDX
LAB_001765c4:
MOVSX ESI,byte ptr [RAX]
LEA EDI,[RSI + -0x30]
CMP EDI,0xa
JC 0x001765f9
LEA EDI,[RSI + -0x61]
CMP EDI,0x5
JA 0x001765dc
ADD ESI,-0x57
JMP 0x001765f7
LAB_001765dc:
MOV R15D,0x5
CMP SIL,0x37
JL 0x00176670
LEA EDI,[RSI + -0x41]
CMP EDI,0x5
JA 0x00176670
ADD ESI,-0x37
LAB_001765f7:
MOV EDI,ESI
LAB_001765f9:
SHL EDX,0x4
ADD EDX,EDI
MOV dword ptr [RBX + 0x24],EDX
INC RAX
MOV R15D,0x5
CMP RAX,RCX
JC 0x001765c4
JMP 0x00176670
LAB_00176611:
INC R14
MOV R15D,0x8
JMP 0x0017666d
LAB_0017661c:
INC R14
MOV R15D,0x4
JMP 0x0017666d
LAB_00176627:
LEA EAX,[RDX + -0x7f]
CMP AL,0xa2
JNC 0x00176661
MOV R15D,0x6
TEST DL,DL
JNS 0x0017666d
LEA RDI,[0x4a4ea0]
MOV RAX,qword ptr [RDI + 0xb8]
LEA RSI,[RBP + -0x20]
MOV RDX,R14
CALL qword ptr [RAX + 0x28]
TEST EAX,EAX
JLE 0x0017666d
MOV EAX,EAX
ADD R14,RAX
MOV EAX,dword ptr [RBP + -0x20]
MOV dword ptr [RBX + 0x24],EAX
JMP 0x00176667
LAB_00176661:
INC R14
MOV dword ptr [RBX + 0x24],EDX
LAB_00176667:
MOV R15D,0x5
LAB_0017666d:
MOV RAX,R14
LAB_00176670:
MOV RCX,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x18],RCX
MOV qword ptr [RBX + 0x8],RAX
MOV dword ptr [RBX],R15D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0017668a:
INC R14
MOV R15D,0x7
JMP 0x0017666d
|
void my_coll_lexem_next(int4 *param_1)
{
byte bVar1;
byte *pbVar2;
int4 in_EAX;
uint uVar3;
long lVar4;
int iVar5;
int iVar6;
byte *pbVar7;
byte *pbVar8;
int4 uVar9;
int4 local_28 [2];
pbVar7 = *(byte **)(param_1 + 2);
pbVar2 = *(byte **)(param_1 + 4);
uVar9 = 0;
pbVar8 = pbVar7;
if (pbVar7 < pbVar2) {
do {
bVar1 = *pbVar7;
uVar3 = (uint)bVar1;
if (0xc < bVar1) {
if (bVar1 < 0x20) {
if (uVar3 == 0xd) goto LAB_0017648b;
LAB_00176627:
if (0xa1 < (byte)(bVar1 + 0x81)) goto LAB_00176661;
uVar9 = 6;
pbVar8 = pbVar7;
if ((-1 < (char)bVar1) ||
(local_28[0] = in_EAX,
uVar3 = (**(code **)(my_charset_utf8mb3_general_ci._184_8_ + 0x28))
(my_charset_utf8mb3_general_ci,local_28,pbVar7), (int)uVar3 < 1))
break;
pbVar8 = pbVar7 + uVar3;
param_1[9] = local_28[0];
}
else {
if (bVar1 < 0x26) {
if (uVar3 == 0x20) goto LAB_0017648b;
goto LAB_00176627;
}
if (bVar1 < 0x3d) {
if (uVar3 == 0x26) {
uVar9 = 4;
pbVar8 = pbVar7 + 1;
}
else if (uVar3 == 0x2f) {
uVar9 = 8;
pbVar8 = pbVar7 + 1;
}
else {
if (uVar3 != 0x3c) goto LAB_00176627;
pbVar7 = pbVar7 + 1;
param_1[8] = 1;
uVar9 = 1;
pbVar8 = pbVar7;
if (pbVar7 < pbVar2) {
iVar5 = 2;
goto LAB_00176531;
}
}
break;
}
if (bVar1 < 0x5c) {
if (uVar3 == 0x3d) {
param_1[8] = 0;
uVar9 = 1;
pbVar8 = pbVar7 + 1;
}
else {
if (uVar3 != 0x5b) goto LAB_00176627;
pbVar7 = pbVar7 + 1;
uVar9 = 6;
pbVar8 = pbVar7;
if (pbVar7 < pbVar2) {
lVar4 = 1;
goto LAB_001764d2;
}
}
break;
}
if (uVar3 != 0x5c) {
if (uVar3 != 0x7c) goto LAB_00176627;
uVar9 = 9;
pbVar8 = pbVar7 + 1;
break;
}
pbVar8 = pbVar7 + 2;
if (((pbVar8 < pbVar2) && (pbVar7[1] == 0x75)) &&
(*(char *)(my_charset_utf8mb3_general_ci._64_8_ + 1 + (ulong)*pbVar8) < '\0')) {
param_1[9] = 0;
iVar5 = 0;
goto LAB_001765c4;
}
LAB_00176661:
pbVar8 = pbVar7 + 1;
param_1[9] = uVar3;
}
uVar9 = 5;
break;
}
if (1 < bVar1 - 9) goto LAB_00176627;
LAB_0017648b:
pbVar7 = pbVar7 + 1;
pbVar8 = pbVar2;
} while (pbVar7 != pbVar2);
}
goto LAB_00176670;
while( true ) {
pbVar7 = pbVar7 + 1;
param_1[8] = iVar5;
iVar5 = iVar5 + 1;
pbVar8 = pbVar2;
if (pbVar2 <= pbVar7) break;
LAB_00176531:
pbVar8 = pbVar7;
if ((*pbVar7 != 0x3c) || (3 < iVar5 - 1U)) break;
}
goto LAB_00176670;
LAB_001764d2:
do {
if (*pbVar7 == 0x5d) {
lVar4 = lVar4 + -1;
if (lVar4 == 0) {
uVar9 = 7;
pbVar8 = pbVar7 + 1;
break;
}
}
else if (*pbVar7 == 0x5b) {
lVar4 = lVar4 + 1;
}
pbVar7 = pbVar7 + 1;
pbVar8 = pbVar2;
} while (pbVar7 < pbVar2);
goto LAB_00176670;
LAB_001765c4:
do {
iVar6 = (int)(char)*pbVar8;
uVar3 = iVar6 - 0x30;
if (9 < uVar3) {
if (iVar6 - 0x61U < 6) {
uVar3 = iVar6 - 0x57;
}
else {
uVar9 = 5;
if (((char)*pbVar8 < '7') || (5 < iVar6 - 0x41U)) break;
uVar3 = iVar6 - 0x37;
}
}
iVar5 = iVar5 * 0x10 + uVar3;
param_1[9] = iVar5;
pbVar8 = pbVar8 + 1;
uVar9 = 5;
} while (pbVar8 < pbVar2);
LAB_00176670:
*(int8 *)(param_1 + 6) = *(int8 *)(param_1 + 2);
*(byte **)(param_1 + 2) = pbVar8;
*param_1 = uVar9;
return;
}
|
|
16,452
|
minja::TemplateNode::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 render(std::ostringstream & out, const std::shared_ptr<Context> & context) const {
try {
do_render(out, context);
} catch (const LoopControlException & e) {
// TODO: make stack creation lazy. Only needed if it was thrown outside of a loop.
std::ostringstream err;
err << e.what();
if (location_.source) err << error_location_suffix(*location_.source, location_.pos);
throw LoopControlException(err.str(), e.control_type);
} catch (const std::exception & e) {
std::ostringstream err;
err << e.what();
if (location_.source) err << error_location_suffix(*location_.source, location_.pos);
throw std::runtime_error(err.str());
}
}
|
O2
|
cpp
|
minja::TemplateNode::render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x1a0, %rsp # imm = 0x1A0
movq %rdi, %r14
movq (%rdi), %rax
callq *(%rax)
addq $0x1a0, %rsp # imm = 0x1A0
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
cmpl $0x2, %edx
jne 0x72a8b
movq %rbx, %rdi
callq 0x23380
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x23bb0
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x238c0
movq 0x8(%r14), %rsi
testq %rsi, %rsi
jne 0x72b31
pushq $0x18
popq %rdi
callq 0x23460
movq %rax, %r14
leaq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x23dd0
movl 0x10(%rbx), %edx
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x72c02
xorl %ebp, %ebp
leaq 0x88589(%rip), %rsi # 0xfb000
movq 0x894ea(%rip), %rdx # 0xfbf68
movq %r14, %rdi
callq 0x23f20
jmp 0x72b31
cmpl $0x1, %edx
jne 0x72bf1
movq %rbx, %rdi
callq 0x23380
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x23bb0
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x238c0
movq 0x8(%r14), %rsi
testq %rsi, %rsi
je 0x72aef
movq 0x18(%r14), %rdx
leaq 0x8(%rsp), %rdi
callq 0x5768a
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x237f0
leaq 0x8(%rsp), %rdi
callq 0x241d8
pushq $0x10
popq %rdi
callq 0x23460
movq %rax, %r14
leaq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x23dd0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x23e50
xorl %ebp, %ebp
movq 0x894ce(%rip), %rsi # 0xfbff0
movq 0x8942f(%rip), %rdx # 0xfbf58
movq %r14, %rdi
callq 0x23f20
movq 0x18(%r14), %rdx
leaq 0x8(%rsp), %rdi
callq 0x5768a
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x237f0
leaq 0x8(%rsp), %rdi
callq 0x241d8
jmp 0x72a41
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x241d8
jmp 0x72bc4
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x241d8
jmp 0x72bdd
jmp 0x72bc1
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x241d8
testb %bpl, %bpl
jne 0x72b94
jmp 0x72bc4
movq %rax, %rbx
movq %r14, %rdi
callq 0x236b0
jmp 0x72bc4
jmp 0x72bda
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x241d8
testb %bpl, %bpl
jne 0x72bb7
jmp 0x72bdd
movq %rax, %rbx
movq %r14, %rdi
callq 0x236b0
jmp 0x72bdd
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x231f0
jmp 0x72bd3
movq %rax, %rbx
callq 0x23e70
jmp 0x72bf1
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x231f0
jmp 0x72bec
movq %rax, %rbx
callq 0x23e70
movq %rbx, %rdi
callq 0x23fa0
movq %rax, %rdi
callq 0x27215
nop
|
_ZNK5minja12TemplateNode6renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE:
push rbp
push r14
push rbx
sub rsp, 1A0h
mov r14, rdi
mov rax, [rdi]
call qword ptr [rax]
add rsp, 1A0h
pop rbx
pop r14
pop rbp
retn
mov rbx, rax
cmp edx, 2
jnz loc_72A8B
mov rdi, rbx; void *
call ___cxa_begin_catch
mov rbx, rax
lea rdi, [rsp+arg_20]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax+10h]
lea rdi, [rsp+arg_20]
mov rsi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rsi, [r14+8]
test rsi, rsi
jnz loc_72B31
loc_72A41:
push 18h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, [rsp+arg_28]
lea rdi, [rsp+arg_0]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov edx, [rbx+10h]
mov bpl, 1
lea rsi, [rsp+arg_0]
mov rdi, r14
call _ZN5minja20LoopControlExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_15LoopControlTypeE; minja::LoopControlException::LoopControlException(std::string const&,minja::LoopControlType)
xor ebp, ebp
lea rsi, _ZTIN5minja20LoopControlExceptionE; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD2Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
|
long long minja::TemplateNode::render(long long ( ***a1)(_QWORD))
{
return (**a1)(a1);
}
|
render:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x1a0
MOV R14,RDI
MOV RAX,qword ptr [RDI]
LAB_001729ef:
CALL qword ptr [RAX]
LAB_001729f1:
ADD RSP,0x1a0
POP RBX
POP R14
POP RBP
RET
|
/* minja::TemplateNode::render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&)
const */
void minja::TemplateNode::render(ostringstream *param_1,shared_ptr *param_2)
{
/* try { // try from 001729ef to 001729f0 has its CatchHandler @ 001729fd */
(*(code *)**(int8 **)param_1)();
return;
}
|
|
16,453
|
minja::TemplateNode::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 render(std::ostringstream & out, const std::shared_ptr<Context> & context) const {
try {
do_render(out, context);
} catch (const LoopControlException & e) {
// TODO: make stack creation lazy. Only needed if it was thrown outside of a loop.
std::ostringstream err;
err << e.what();
if (location_.source) err << error_location_suffix(*location_.source, location_.pos);
throw LoopControlException(err.str(), e.control_type);
} catch (const std::exception & e) {
std::ostringstream err;
err << e.what();
if (location_.source) err << error_location_suffix(*location_.source, location_.pos);
throw std::runtime_error(err.str());
}
}
|
O3
|
cpp
|
minja::TemplateNode::render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x1a0, %rsp # imm = 0x1A0
movq %rdi, %r14
movq (%rdi), %rax
callq *(%rax)
addq $0x1a0, %rsp # imm = 0x1A0
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
cmpl $0x2, %edx
jne 0x99791
movq %rbx, %rdi
callq 0x1a380
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x1ab90
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x1a8a0
movq 0x8(%r14), %rsi
testq %rsi, %rsi
jne 0x99816
movl $0x18, %edi
callq 0x1a440
movq %rax, %r14
leaq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x1adc0
movl 0x10(%rbx), %ebx
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x1aad0
leaq 0x908af(%rip), %rax # 0x12a018
addq $0x10, %rax
movq %rax, (%r14)
movl %ebx, 0x10(%r14)
xorl %ebp, %ebp
leaq 0x90883(%rip), %rsi # 0x12a000
movq 0x917fc(%rip), %rdx # 0x12af80
movq %r14, %rdi
callq 0x1af20
jmp 0x99816
cmpl $0x1, %edx
jne 0x999b3
movq %rbx, %rdi
callq 0x1a380
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x1ab90
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x1a8a0
movq 0x8(%r14), %rsi
testq %rsi, %rsi
jne 0x9985c
movl $0x10, %edi
callq 0x1a440
movq %rax, %r14
leaq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x1adc0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x1ae30
xorl %ebp, %ebp
movq 0x917e9(%rip), %rsi # 0x12aff0
movq 0x91752(%rip), %rdx # 0x12af60
movq %r14, %rdi
callq 0x1af20
movq 0x18(%r14), %rdx
leaq 0x8(%rsp), %rdi
callq 0x770d0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x28(%rsp), %rdi
callq 0x1aa00
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x99733
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8e0
jmp 0x99733
movq 0x18(%r14), %rdx
leaq 0x8(%rsp), %rdi
callq 0x770d0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x28(%rsp), %rdi
callq 0x1aa00
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x997d2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8e0
jmp 0x997d2
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9995e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8e0
jmp 0x9995e
jmp 0x9995b
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9998b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8e0
jmp 0x9998b
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x99913
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8e0
testb %bpl, %bpl
jne 0x9991d
jmp 0x9995e
movq %rax, %rbx
movq %r14, %rdi
callq 0x1a690
jmp 0x9995e
jmp 0x99988
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x99947
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8e0
testb %bpl, %bpl
jne 0x99951
jmp 0x9998b
movq %rax, %rbx
movq %r14, %rdi
callq 0x1a690
jmp 0x9998b
movq %rax, %rbx
movq 0x91613(%rip), %rsi # 0x12af78
leaq 0x28(%rsp), %rdi
callq 0x1a490
leaq 0x98(%rsp), %rdi
callq 0x1a2b0
jmp 0x99981
movq %rax, %rbx
callq 0x1ae60
jmp 0x999b3
movq %rax, %rbx
movq 0x915e6(%rip), %rsi # 0x12af78
leaq 0x28(%rsp), %rdi
callq 0x1a490
leaq 0x98(%rsp), %rdi
callq 0x1a2b0
jmp 0x999ae
movq %rax, %rbx
callq 0x1ae60
movq %rbx, %rdi
callq 0x1afa0
movq %rax, %rdi
callq 0x212e3
nop
|
_ZNK5minja12TemplateNode6renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE:
push rbp
push r14
push rbx
sub rsp, 1A0h
mov r14, rdi
mov rax, [rdi]
call qword ptr [rax]
add rsp, 1A0h
pop rbx
pop r14
pop rbp
retn
mov rbx, rax
cmp edx, 2
jnz loc_99791
mov rdi, rbx; void *
call ___cxa_begin_catch
mov rbx, rax
lea rdi, [rsp+arg_20]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax+10h]
lea rdi, [rsp+arg_20]
mov rsi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rsi, [r14+8]; int
test rsi, rsi
jnz loc_99816
loc_99733:
mov edi, 18h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, [rsp+arg_28]
lea rdi, [rsp+arg_0]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov ebx, [rbx+10h]
mov bpl, 1
lea rsi, [rsp+arg_0]
mov rdi, r14
call __ZNSt13runtime_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
lea rax, _ZTVN5minja20LoopControlExceptionE; `vtable for'minja::LoopControlException
add rax, 10h
mov [r14], rax
mov [r14+10h], ebx
xor ebp, ebp
lea rsi, _ZTIN5minja20LoopControlExceptionE; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD2Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
|
long long minja::TemplateNode::render(long long ( ***a1)(_QWORD))
{
return (**a1)(a1);
}
|
render:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x1a0
MOV R14,RDI
MOV RAX,qword ptr [RDI]
LAB_001996e1:
CALL qword ptr [RAX]
LAB_001996e3:
ADD RSP,0x1a0
POP RBX
POP R14
POP RBP
RET
|
/* minja::TemplateNode::render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&)
const */
void minja::TemplateNode::render(ostringstream *param_1,shared_ptr *param_2)
{
/* try { // try from 001996e1 to 001996e2 has its CatchHandler @ 001996ef */
(*(code *)**(int8 **)param_1)();
return;
}
|
|
16,454
|
nglog::tools::InitializeLoggingUtilities(char const*)
|
ng-log[P]ng-log/src/utilities.cc
|
bool IsLoggingInitialized() {
return g_program_invocation_short_name != nullptr;
}
|
O1
|
cpp
|
nglog::tools::InitializeLoggingUtilities(char const*):
pushq %rbx
subq $0x60, %rsp
cmpq $0x0, 0x1e685(%rip) # 0x3fa20
jne 0x213cd
movq %rdi, %rbx
movl $0x2f, %esi
callq 0x75d0
leaq 0x1(%rax), %rcx
testq %rax, %rax
cmoveq %rbx, %rcx
movq %rcx, 0x1e664(%rip) # 0x3fa20
leaq 0x6c(%rip), %rdi # 0x2142f
addq $0x60, %rsp
popq %rbx
jmp 0xb017
leaq 0x2b38(%rip), %rsi # 0x23f0c
movq %rsp, %rbx
movq %rbx, %rdi
movl $0x12b, %edx # imm = 0x12B
callq 0xdf18
movq %rbx, %rdi
callq 0xa68a
movq %rax, %rbx
leaq 0x2b5f(%rip), %rsi # 0x23f55
movl $0x26, %edx
movq %rax, %rdi
callq 0x7610
leaq 0x2b72(%rip), %rsi # 0x23f7c
movl $0x25, %edx
movq %rbx, %rdi
callq 0x7610
movq %rsp, %rdi
callq 0xdf5c
movq %rsp, %rdi
callq 0xdf5c
movq %rax, %rdi
callq 0x9351
|
_ZN5nglog5tools26InitializeLoggingUtilitiesEPKc:
push rbx
sub rsp, 60h
cmp cs:_ZN5nglogL31g_program_invocation_short_nameE, 0; nglog::g_program_invocation_short_name
jnz short loc_213CD
mov rbx, rdi
mov esi, (offset qword_28+7); void (*)(void)
call _strrchr
lea rcx, [rax+1]
test rax, rax
cmovz rcx, rbx
mov cs:_ZN5nglogL31g_program_invocation_short_nameE, rcx; nglog::g_program_invocation_short_name
lea rdi, _ZN5nglogL21DumpStackTraceAndExitEv; this
add rsp, 60h
pop rbx
jmp _ZN5nglog22InstallFailureFunctionEPFvvE; nglog::InstallFailureFunction(void (*)(void))
loc_213CD:
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
mov rbx, rsp
mov rdi, rbx; this
mov edx, 12Bh; int
call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int)
mov rdi, rbx; this
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
mov rbx, rax
lea rsi, aCheckFailedIsl; "Check failed: !IsLoggingInitialized() "
mov edx, 26h ; '&'
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, aYouCalledIniti; "You called InitializeLogging() twice!"
mov edx, 25h ; '%'
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, rsp; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
mov rdi, rsp; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
mov rdi, rax
call __clang_call_terminate
|
long long ( * nglog::tools::InitializeLoggingUtilities(nglog::tools *this, const char *a2))(_QWORD)
{
long long v2; // rax
nglog::tools *v3; // rcx
long long v5; // rbx
_BYTE v6[104]; // [rsp+0h] [rbp-68h] BYREF
if ( nglog::g_program_invocation_short_name )
{
nglog::LogMessageFatal::LogMessageFatal(
(nglog::LogMessageFatal *)v6,
(nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/utilities.cc",
299);
v5 = nglog::LogMessage::stream((nglog::LogMessage *)v6);
std::__ostream_insert<char,std::char_traits<char>>(v5, "Check failed: !IsLoggingInitialized() ", 38LL);
std::__ostream_insert<char,std::char_traits<char>>(v5, "You called InitializeLogging() twice!", 37LL);
nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v6);
}
v2 = strrchr(this, (char *)&qword_28 + 7);
v3 = (nglog::tools *)(v2 + 1);
if ( !v2 )
v3 = this;
nglog::g_program_invocation_short_name = (long long)v3;
return nglog::InstallFailureFunction((nglog *)nglog::DumpStackTraceAndExit, (void (*)(void))((char *)&qword_28 + 7));
}
|
InitializeLoggingUtilities:
PUSH RBX
SUB RSP,0x60
CMP qword ptr [0x0013fa20],0x0
JNZ 0x001213cd
MOV RBX,RDI
MOV ESI,0x2f
CALL 0x001075d0
LEA RCX,[RAX + 0x1]
TEST RAX,RAX
CMOVZ RCX,RBX
MOV qword ptr [0x0013fa20],RCX
LEA RDI,[0x12142f]
ADD RSP,0x60
POP RBX
JMP 0x0010b017
LAB_001213cd:
LEA RSI,[0x123f0c]
MOV RBX,RSP
MOV RDI,RBX
MOV EDX,0x12b
CALL 0x0010df18
LAB_001213e4:
MOV RDI,RBX
CALL 0x0010a68a
MOV RBX,RAX
LEA RSI,[0x123f55]
MOV EDX,0x26
MOV RDI,RAX
CALL 0x00107610
LEA RSI,[0x123f7c]
MOV EDX,0x25
MOV RDI,RBX
CALL 0x00107610
LAB_00121417:
MOV RDI,RSP
CALL 0x0010df5c
LAB_0012141f:
MOV RDI,RSP
CALL 0x0010df5c
LAB_00121427:
MOV RDI,RAX
CALL 0x00109351
|
/* nglog::tools::InitializeLoggingUtilities(char const*) */
void nglog::tools::InitializeLoggingUtilities(char *param_1)
{
char *pcVar1;
ostream *poVar2;
int8 uVar3;
LogMessageFatal aLStack_68 [96];
if (g_program_invocation_short_name == (char *)0x0) {
pcVar1 = strrchr(param_1,0x2f);
g_program_invocation_short_name = pcVar1 + 1;
if (pcVar1 == (char *)0x0) {
g_program_invocation_short_name = param_1;
}
InstallFailureFunction(DumpStackTraceAndExit);
return;
}
LogMessageFatal::LogMessageFatal
(aLStack_68,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/utilities.cc",
299);
/* try { // try from 001213e4 to 00121416 has its CatchHandler @ 0012141f */
poVar2 = (ostream *)LogMessage::stream((LogMessage *)aLStack_68);
std::__ostream_insert<char,std::char_traits<char>>
(poVar2,"Check failed: !IsLoggingInitialized() ",0x26);
std::__ostream_insert<char,std::char_traits<char>>
(poVar2,"You called InitializeLogging() twice!",0x25);
LogMessageFatal::~LogMessageFatal(aLStack_68);
/* catch(type#1 @ 00000000) { ... } // from try @ 001213e4 with catch @ 0012141f
try { // try from 0012141f to 00121426 has its CatchHandler @ 00121427 */
uVar3 = LogMessageFatal::~LogMessageFatal(aLStack_68);
/* catch(type#1 @ 00000000) { ... } // from try @ 0012141f with catch @ 00121427
*/
/* WARNING: Subroutine does not return */
__clang_call_terminate(uVar3);
}
|
|
16,455
|
nglog::tools::InitializeLoggingUtilities(char const*)
|
ng-log[P]ng-log/src/utilities.cc
|
bool IsLoggingInitialized() {
return g_program_invocation_short_name != nullptr;
}
|
O2
|
cpp
|
nglog::tools::InitializeLoggingUtilities(char const*):
pushq %rbx
subq $0x60, %rsp
cmpq $0x0, 0x220ff(%rip) # 0x3ea80
jne 0x1c9a0
callq 0x1c8f9
movq %rax, 0x220f1(%rip) # 0x3ea80
leaq 0x5f(%rip), %rdi # 0x1c9f5
addq $0x60, %rsp
popq %rbx
jmp 0xa3df
leaq 0x3569(%rip), %rsi # 0x1ff10
movq %rsp, %rbx
movq %rbx, %rdi
movl $0x12b, %edx # imm = 0x12B
callq 0xc22e
movq %rbx, %rdi
callq 0x9b66
leaq 0x3593(%rip), %rsi # 0x1ff59
movq %rax, %rdi
callq 0x7590
leaq 0x35ab(%rip), %rsi # 0x1ff80
movq %rax, %rdi
callq 0x7590
movq %rsp, %rdi
callq 0xc23c
movq %rsp, %rdi
callq 0xc23c
movq %rax, %rdi
callq 0x8de4
|
_ZN5nglog5tools26InitializeLoggingUtilitiesEPKc:
push rbx
sub rsp, 60h
cmp cs:_ZN5nglogL31g_program_invocation_short_nameE, 0; nglog::g_program_invocation_short_name
jnz short loc_1C9A0
call _ZN5nglog5tools14const_basenameEPKc; nglog::tools::const_basename(char const*)
mov cs:_ZN5nglogL31g_program_invocation_short_nameE, rax; nglog::g_program_invocation_short_name
lea rdi, _ZN5nglogL21DumpStackTraceAndExitEv; this
add rsp, 60h
pop rbx
jmp _ZN5nglog22InstallFailureFunctionEPFvvE; nglog::InstallFailureFunction(void (*)(void))
loc_1C9A0:
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
mov rbx, rsp
mov rdi, rbx; this
mov edx, 12Bh; int
call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int)
mov rdi, rbx; this
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
lea rsi, aCheckFailedIsl; "Check failed: !IsLoggingInitialized() "
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
lea rsi, aYouCalledIniti; "You called InitializeLogging() twice!"
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rsp; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
mov rdi, rsp; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
mov rdi, rax
call __clang_call_terminate
|
long long ( * nglog::tools::InitializeLoggingUtilities(nglog::tools *this, char *a2))(_QWORD)
{
long long v3; // rax
long long v4; // rax
_BYTE v5[104]; // [rsp+0h] [rbp-68h] BYREF
if ( nglog::g_program_invocation_short_name )
{
nglog::LogMessageFatal::LogMessageFatal(
(nglog::LogMessageFatal *)v5,
(nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/utilities.cc",
299);
v3 = nglog::LogMessage::stream((nglog::LogMessage *)v5);
v4 = std::operator<<<std::char_traits<char>>(v3, "Check failed: !IsLoggingInitialized() ");
std::operator<<<std::char_traits<char>>(v4, "You called InitializeLogging() twice!");
nglog::LogMessageFatal::~LogMessageFatal(
(nglog::LogMessageFatal *)v5,
(nglog::internal::LogMessageData *)"You called InitializeLogging() twice!");
}
nglog::g_program_invocation_short_name = (long long)nglog::tools::const_basename(this, a2);
return nglog::InstallFailureFunction((nglog *)nglog::DumpStackTraceAndExit, (void (*)(void))a2);
}
|
InitializeLoggingUtilities:
PUSH RBX
SUB RSP,0x60
CMP qword ptr [0x0013ea80],0x0
JNZ 0x0011c9a0
CALL 0x0011c8f9
MOV qword ptr [0x0013ea80],RAX
LEA RDI,[0x11c9f5]
ADD RSP,0x60
POP RBX
JMP 0x0010a3df
LAB_0011c9a0:
LEA RSI,[0x11ff10]
MOV RBX,RSP
MOV RDI,RBX
MOV EDX,0x12b
CALL 0x0010c22e
LAB_0011c9b7:
MOV RDI,RBX
CALL 0x00109b66
LEA RSI,[0x11ff59]
MOV RDI,RAX
CALL 0x00107590
LEA RSI,[0x11ff80]
MOV RDI,RAX
CALL 0x00107590
LAB_0011c9dd:
MOV RDI,RSP
CALL 0x0010c23c
LAB_0011c9e5:
MOV RDI,RSP
CALL 0x0010c23c
LAB_0011c9ed:
MOV RDI,RAX
CALL 0x00108de4
|
/* nglog::tools::InitializeLoggingUtilities(char const*) */
void nglog::tools::InitializeLoggingUtilities(char *param_1)
{
ostream *poVar1;
int8 uVar2;
LogMessageFatal aLStack_68 [96];
if (g_program_invocation_short_name == 0) {
g_program_invocation_short_name = const_basename(param_1);
InstallFailureFunction(DumpStackTraceAndExit);
return;
}
LogMessageFatal::LogMessageFatal
(aLStack_68,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/utilities.cc",
299);
/* try { // try from 0011c9b7 to 0011c9dc has its CatchHandler @ 0011c9e5 */
poVar1 = (ostream *)LogMessage::stream((LogMessage *)aLStack_68);
poVar1 = std::operator<<(poVar1,"Check failed: !IsLoggingInitialized() ");
std::operator<<(poVar1,"You called InitializeLogging() twice!");
LogMessageFatal::~LogMessageFatal(aLStack_68);
/* catch(type#1 @ 00000000) { ... } // from try @ 0011c9b7 with catch @ 0011c9e5
try { // try from 0011c9e5 to 0011c9ec has its CatchHandler @ 0011c9ed */
uVar2 = LogMessageFatal::~LogMessageFatal(aLStack_68);
/* catch(type#1 @ 00000000) { ... } // from try @ 0011c9e5 with catch @ 0011c9ed
*/
/* WARNING: Subroutine does not return */
__clang_call_terminate(uVar2);
}
|
|
16,456
|
nglog::(anonymous namespace)::DumpTimeInfo()
|
ng-log[P]ng-log/src/signalhandler.cc
|
void DumpTimeInfo() {
time_t time_in_sec = time(nullptr);
char buf[256]; // Big enough for time info.
MinimalFormatter formatter(buf, sizeof(buf));
formatter.AppendString("*** Aborted at ");
formatter.AppendUint64(static_cast<uint64>(time_in_sec), 10);
formatter.AppendString(" (unix time)");
formatter.AppendString(" try \"date -d @");
formatter.AppendUint64(static_cast<uint64>(time_in_sec), 10);
formatter.AppendString("\" if you are using GNU date ***\n");
g_failure_writer(buf, formatter.num_bytes_written());
}
|
O0
|
cpp
|
nglog::(anonymous namespace)::DumpTimeInfo():
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp # imm = 0x140
xorl %eax, %eax
movl %eax, %edi
callq 0xa760
movq %rax, -0x8(%rbp)
leaq -0x110(%rbp), %rsi
leaq -0x128(%rbp), %rdi
movl $0x100, %edx # imm = 0x100
callq 0x68800
leaq -0x128(%rbp), %rdi
leaq 0x9042(%rip), %rsi # 0x712c0
callq 0x68840
movq -0x8(%rbp), %rsi
leaq -0x128(%rbp), %rdi
movl $0xa, %edx
callq 0x688d0
leaq -0x128(%rbp), %rdi
leaq 0x902a(%rip), %rsi # 0x712d0
callq 0x68840
leaq -0x128(%rbp), %rdi
leaq 0x9024(%rip), %rsi # 0x712dd
callq 0x68840
movq -0x8(%rbp), %rsi
leaq -0x128(%rbp), %rdi
movl $0xa, %edx
callq 0x688d0
leaq -0x128(%rbp), %rdi
leaq 0x900c(%rip), %rsi # 0x712ed
callq 0x68840
movq 0x339e3(%rip), %rax # 0x9bcd0
movq %rax, -0x130(%rbp)
leaq -0x110(%rbp), %rax
movq %rax, -0x138(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x689b0
movq -0x138(%rbp), %rdi
movq %rax, %rsi
movq -0x130(%rbp), %rax
callq *%rax
addq $0x140, %rsp # imm = 0x140
popq %rbp
retq
nopw (%rax,%rax)
|
_ZN5nglog12_GLOBAL__N_112DumpTimeInfoEv:
push rbp
mov rbp, rsp
sub rsp, 140h
xor eax, eax
mov edi, eax
call _time
mov [rbp+var_8], rax
lea rsi, [rbp+var_110]; char *
lea rdi, [rbp+var_128]; this
mov edx, 100h; unsigned __int64
call _ZN5nglog12_GLOBAL__N_116MinimalFormatterC2EPcm; nglog::`anonymous namespace'::MinimalFormatter::MinimalFormatter(char *,ulong)
lea rdi, [rbp+var_128]; this
lea rsi, aAbortedAt; "*** Aborted at "
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
mov rsi, [rbp+var_8]; unsigned __int64
lea rdi, [rbp+var_128]; this
mov edx, 0Ah; unsigned int
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendUint64Emj; nglog::`anonymous namespace'::MinimalFormatter::AppendUint64(ulong,uint)
lea rdi, [rbp+var_128]; this
lea rsi, aUnixTime; " (unix time)"
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
lea rdi, [rbp+var_128]; this
lea rsi, aTryDateD; " try \"date -d @"
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
mov rsi, [rbp+var_8]; unsigned __int64
lea rdi, [rbp+var_128]; this
mov edx, 0Ah; unsigned int
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendUint64Emj; nglog::`anonymous namespace'::MinimalFormatter::AppendUint64(ulong,uint)
lea rdi, [rbp+var_128]; this
lea rsi, aIfYouAreUsingG; "\" if you are using GNU date ***\n"
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
mov rax, cs:_ZN5nglog12_GLOBAL__N_116g_failure_writerE; nglog::`anonymous namespace'::g_failure_writer
mov [rbp+var_130], rax
lea rax, [rbp+var_110]
mov [rbp+var_138], rax
lea rdi, [rbp+var_128]; this
call _ZNK5nglog12_GLOBAL__N_116MinimalFormatter17num_bytes_writtenEv; nglog::`anonymous namespace'::MinimalFormatter::num_bytes_written(void)
mov rdi, [rbp+var_138]
mov rsi, rax
mov rax, [rbp+var_130]
call rax
add rsp, 140h
pop rbp
retn
|
long long nglog::`anonymous namespace'::DumpTimeInfo(nglog::_anonymous_namespace_ *this)
{
long long v1; // rax
long long ( *v3)(nglog::_anonymous_namespace_ *__hidden, const char *, unsigned long long); // [rsp+10h] [rbp-130h]
char v4[24]; // [rsp+18h] [rbp-128h] BYREF
char v5[264]; // [rsp+30h] [rbp-110h] BYREF
unsigned long long v6; // [rsp+138h] [rbp-8h]
v6 = time(0LL);
nglog::`anonymous namespace'::MinimalFormatter::MinimalFormatter(
(nglog::_anonymous_namespace_::MinimalFormatter *)v4,
v5,
0x100uLL);
nglog::`anonymous namespace'::MinimalFormatter::AppendString(
(nglog::_anonymous_namespace_::MinimalFormatter *)v4,
"*** Aborted at ");
nglog::`anonymous namespace'::MinimalFormatter::AppendUint64(
(nglog::_anonymous_namespace_::MinimalFormatter *)v4,
v6,
0xAu);
nglog::`anonymous namespace'::MinimalFormatter::AppendString(
(nglog::_anonymous_namespace_::MinimalFormatter *)v4,
" (unix time)");
nglog::`anonymous namespace'::MinimalFormatter::AppendString(
(nglog::_anonymous_namespace_::MinimalFormatter *)v4,
" try \"date -d @");
nglog::`anonymous namespace'::MinimalFormatter::AppendUint64(
(nglog::_anonymous_namespace_::MinimalFormatter *)v4,
v6,
0xAu);
nglog::`anonymous namespace'::MinimalFormatter::AppendString(
(nglog::_anonymous_namespace_::MinimalFormatter *)v4,
"\" if you are using GNU date ***\n");
v3 = nglog::`anonymous namespace'::g_failure_writer;
v1 = nglog::`anonymous namespace'::MinimalFormatter::num_bytes_written((nglog::_anonymous_namespace_::MinimalFormatter *)v4);
return ((long long ( *)(char *, long long))v3)(v5, v1);
}
|
DumpTimeInfo:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x140
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0010a760
MOV qword ptr [RBP + -0x8],RAX
LEA RSI,[RBP + -0x110]
LEA RDI,[RBP + -0x128]
MOV EDX,0x100
CALL 0x00168800
LEA RDI,[RBP + -0x128]
LEA RSI,[0x1712c0]
CALL 0x00168840
MOV RSI,qword ptr [RBP + -0x8]
LEA RDI,[RBP + -0x128]
MOV EDX,0xa
CALL 0x001688d0
LEA RDI,[RBP + -0x128]
LEA RSI,[0x1712d0]
CALL 0x00168840
LEA RDI,[RBP + -0x128]
LEA RSI,[0x1712dd]
CALL 0x00168840
MOV RSI,qword ptr [RBP + -0x8]
LEA RDI,[RBP + -0x128]
MOV EDX,0xa
CALL 0x001688d0
LEA RDI,[RBP + -0x128]
LEA RSI,[0x1712ed]
CALL 0x00168840
MOV RAX,qword ptr [0x0019bcd0]
MOV qword ptr [RBP + -0x130],RAX
LEA RAX,[RBP + -0x110]
MOV qword ptr [RBP + -0x138],RAX
LEA RDI,[RBP + -0x128]
CALL 0x001689b0
MOV RDI,qword ptr [RBP + -0x138]
MOV RSI,RAX
MOV RAX,qword ptr [RBP + -0x130]
CALL RAX
ADD RSP,0x140
POP RBP
RET
|
/* nglog::(anonymous namespace)::DumpTimeInfo() */
void nglog::(anonymous_namespace)::DumpTimeInfo(void)
{
int *puVar1;
int8 uVar2;
MinimalFormatter local_130 [24];
char local_118 [264];
ulong local_10;
local_10 = time((time_t *)0x0);
MinimalFormatter::MinimalFormatter(local_130,local_118,0x100);
MinimalFormatter::AppendString(local_130,"*** Aborted at ");
MinimalFormatter::AppendUint64(local_130,local_10,10);
MinimalFormatter::AppendString(local_130," (unix time)");
MinimalFormatter::AppendString(local_130," try \"date -d @");
MinimalFormatter::AppendUint64(local_130,local_10,10);
MinimalFormatter::AppendString(local_130,"\" if you are using GNU date ***\n");
puVar1 = g_failure_writer;
uVar2 = MinimalFormatter::num_bytes_written(local_130);
(*(code *)puVar1)(local_118,uVar2);
return;
}
|
|
16,457
|
inherit_charset_data
|
eloqsql/mysys/charset.c
|
static void
inherit_charset_data(struct charset_info_st *cs, CHARSET_INFO *refcs)
{
if (!cs->to_upper)
cs->to_upper= refcs->to_upper;
if (!cs->to_lower)
cs->to_lower= refcs->to_lower;
if (!cs->m_ctype)
cs->m_ctype= refcs->m_ctype;
if (!cs->tab_to_uni)
cs->tab_to_uni= refcs->tab_to_uni;
}
|
O0
|
c
|
inherit_charset_data:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x50(%rax)
jne 0x7ece7
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x7ed02
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x7ed1d
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x68(%rax)
jne 0x7ed38
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x68(%rax)
popq %rbp
retq
nopw (%rax,%rax)
|
mysql_thread_end:
push rbp
mov rbp, rsp
pop rbp
retn
|
void mysql_thread_end()
{
;
}
|
mysql_thread_end:
PUSH RBP
MOV RBP,RSP
POP RBP
RET
|
void mysql_thread_end(void)
{
return;
}
|
|
16,458
|
do_outer_field_null(Copy_field*)
|
eloqsql/sql/field_conv.cc
|
static void do_outer_field_null(Copy_field *copy)
{
if (*copy->null_row ||
(copy->from_null_ptr && (*copy->from_null_ptr & copy->from_bit)))
{
*copy->to_null_ptr|=copy->to_bit;
copy->to_field->reset();
}
else
{
*copy->to_null_ptr&= ~copy->to_bit;
(copy->do_copy2)(copy);
}
}
|
O0
|
cpp
|
do_outer_field_null(Copy_field*):
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
testb $0x1, (%rax)
jne 0x8d0b4b
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x8d0b74
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movzbl (%rax), %eax
movq -0x8(%rbp), %rcx
andl 0x28(%rcx), %eax
cmpl $0x0, %eax
je 0x8d0b74
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %edx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movzbl (%rax), %ecx
orl %edx, %ecx
movb %cl, (%rax)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
movq (%rdi), %rax
callq *0x160(%rax)
jmp 0x8d0b9b
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %edx
xorl $-0x1, %edx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movzbl (%rax), %ecx
andl %edx, %ecx
movb %cl, (%rax)
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rax
movq -0x8(%rbp), %rdi
callq *%rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZL19do_outer_field_nullP10Copy_field:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rax, [rax+20h]
test byte ptr [rax], 1
jnz short loc_8D0B4B
mov rax, [rbp+var_8]
cmp qword ptr [rax+10h], 0
jz short loc_8D0B74
mov rax, [rbp+var_8]
mov rax, [rax+10h]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_8]
and eax, [rcx+28h]
cmp eax, 0
jz short loc_8D0B74
loc_8D0B4B:
mov rax, [rbp+var_8]
mov edx, [rax+2Ch]
mov rax, [rbp+var_8]
mov rax, [rax+18h]
movzx ecx, byte ptr [rax]
or ecx, edx
mov [rax], cl
mov rax, [rbp+var_8]
mov rdi, [rax+40h]
mov rax, [rdi]
call qword ptr [rax+160h]
jmp short loc_8D0B9B
loc_8D0B74:
mov rax, [rbp+var_8]
mov edx, [rax+2Ch]
xor edx, 0FFFFFFFFh
mov rax, [rbp+var_8]
mov rax, [rax+18h]
movzx ecx, byte ptr [rax]
and ecx, edx
mov [rax], cl
mov rax, [rbp+var_8]
mov rax, [rax+70h]
mov rdi, [rbp+var_8]
call rax
loc_8D0B9B:
add rsp, 10h
pop rbp
retn
|
long long do_outer_field_null(Copy_field *a1)
{
if ( (**((_BYTE **)a1 + 4) & 1) != 0
|| *((_QWORD *)a1 + 2) && (*((_DWORD *)a1 + 10) & **((unsigned __int8 **)a1 + 2)) != 0 )
{
**((_BYTE **)a1 + 3) |= *((_DWORD *)a1 + 11);
return (*(long long ( **)(_QWORD))(**((_QWORD **)a1 + 8) + 352LL))(*((_QWORD *)a1 + 8));
}
else
{
**((_BYTE **)a1 + 3) &= ~*((_BYTE *)a1 + 44);
return (*((long long ( **)(Copy_field *))a1 + 14))(a1);
}
}
|
~Item_cache_year:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x008d11c0
ADD RSP,0x10
POP RBP
RET
|
/* Item_cache_year::~Item_cache_year() */
void __thiscall Item_cache_year::~Item_cache_year(Item_cache_year *this)
{
Item_cache_int::~Item_cache_int((Item_cache_int *)this);
return;
}
|
|
16,459
|
test_conc155
|
eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c
|
static int test_conc155(MYSQL *mysql)
{
MYSQL_STMT *stmt;
MYSQL_BIND bind;
char buffer[50];
int rc;
rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1");
check_mysql_rc(rc, mysql);
rc= mysql_query(mysql, "CREATE TABLE t1 (a TEXT)");
check_mysql_rc(rc, mysql);
rc= mysql_query(mysql, "INSERT INTO t1 VALUES ('zero terminated string')");
check_mysql_rc(rc, mysql);
stmt= mysql_stmt_init(mysql);
rc= mysql_stmt_prepare(stmt, SL("SELECT a FROM t1"));
check_stmt_rc(rc, stmt);
rc= mysql_stmt_execute(stmt);
check_stmt_rc(rc, stmt);
memset(buffer, 'X', 50);
memset(&bind, 0, sizeof(MYSQL_BIND));
bind.buffer= buffer;
bind.buffer_length= 50;
bind.buffer_type= MYSQL_TYPE_STRING;
rc= mysql_stmt_bind_result(stmt, &bind);
check_stmt_rc(rc, stmt);
rc= mysql_stmt_fetch(stmt);
check_stmt_rc(rc, stmt);
if (strlen(buffer) != strlen("zero terminated string"))
{
diag("Wrong buffer length");
return FAIL;
}
mysql_stmt_close(stmt);
rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1");
check_mysql_rc(rc, mysql);
return OK;
}
|
O0
|
c
|
test_conc155:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp # imm = 0x110
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x50(%rbp)
movq -0x50(%rbp), %rdi
leaq 0x4aa1f(%rip), %rsi # 0x66636
callq 0x38a70
movl %eax, -0xcc(%rbp)
cmpl $0x0, -0xcc(%rbp)
je 0x1bc86
movl -0xcc(%rbp), %eax
movl %eax, -0xdc(%rbp)
movq -0x50(%rbp), %rdi
callq 0x3c3f0
movq %rax, -0xd8(%rbp)
movq -0x50(%rbp), %rdi
callq 0x3c3c0
movl -0xdc(%rbp), %esi
movq -0xd8(%rbp), %rdx
movl %eax, %ecx
leaq 0x49a6f(%rip), %rdi # 0x656d5
leaq 0x4a400(%rip), %r8 # 0x6606d
movl $0xffb, %r9d # imm = 0xFFB
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x44(%rbp)
jmp 0x1bfc8
jmp 0x1bc88
movq -0x50(%rbp), %rdi
leaq 0x4b922(%rip), %rsi # 0x675b5
callq 0x38a70
movl %eax, -0xcc(%rbp)
cmpl $0x0, -0xcc(%rbp)
je 0x1bd02
movl -0xcc(%rbp), %eax
movl %eax, -0xec(%rbp)
movq -0x50(%rbp), %rdi
callq 0x3c3f0
movq %rax, -0xe8(%rbp)
movq -0x50(%rbp), %rdi
callq 0x3c3c0
movl -0xec(%rbp), %esi
movq -0xe8(%rbp), %rdx
movl %eax, %ecx
leaq 0x499f3(%rip), %rdi # 0x656d5
leaq 0x4a384(%rip), %r8 # 0x6606d
movl $0xffd, %r9d # imm = 0xFFD
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x44(%rbp)
jmp 0x1bfc8
jmp 0x1bd04
movq -0x50(%rbp), %rdi
leaq 0x4b8bf(%rip), %rsi # 0x675ce
callq 0x38a70
movl %eax, -0xcc(%rbp)
cmpl $0x0, -0xcc(%rbp)
je 0x1bd7e
movl -0xcc(%rbp), %eax
movl %eax, -0xfc(%rbp)
movq -0x50(%rbp), %rdi
callq 0x3c3f0
movq %rax, -0xf8(%rbp)
movq -0x50(%rbp), %rdi
callq 0x3c3c0
movl -0xfc(%rbp), %esi
movq -0xf8(%rbp), %rdx
movl %eax, %ecx
leaq 0x49977(%rip), %rdi # 0x656d5
leaq 0x4a308(%rip), %r8 # 0x6606d
movl $0xfff, %r9d # imm = 0xFFF
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x44(%rbp)
jmp 0x1bfc8
jmp 0x1bd80
movq -0x50(%rbp), %rdi
callq 0x44950
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
leaq 0x4a78d(%rip), %rsi # 0x66525
movl $0x10, %edx
callq 0x45070
movl %eax, -0xcc(%rbp)
cmpl $0x0, -0xcc(%rbp)
je 0x1bde3
movq -0x58(%rbp), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x497cc(%rip), %rdi # 0x65590
leaq 0x4a2a2(%rip), %rdx # 0x6606d
movl $0x1003, %ecx # imm = 0x1003
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x44(%rbp)
jmp 0x1bfc8
jmp 0x1bde5
movq -0x58(%rbp), %rdi
callq 0x46580
movl %eax, -0xcc(%rbp)
cmpl $0x0, -0xcc(%rbp)
je 0x1be2f
movq -0x58(%rbp), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x49780(%rip), %rdi # 0x65590
leaq 0x4a256(%rip), %rdx # 0x6606d
movl $0x1006, %ecx # imm = 0x1006
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x44(%rbp)
jmp 0x1bfc8
jmp 0x1be31
leaq -0x40(%rbp), %rdi
movl $0x58, %esi
movl $0x32, %edx
callq 0x14260
leaq -0xc8(%rbp), %rdi
xorl %esi, %esi
movl $0x70, %edx
callq 0x14260
leaq -0x40(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq $0x32, -0x88(%rbp)
movl $0xfe, -0x68(%rbp)
movq -0x58(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x43940
movsbl %al, %eax
movl %eax, -0xcc(%rbp)
cmpl $0x0, -0xcc(%rbp)
je 0x1bec8
movq -0x58(%rbp), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x496e7(%rip), %rdi # 0x65590
leaq 0x4a1bd(%rip), %rdx # 0x6606d
movl $0x1010, %ecx # imm = 0x1010
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x44(%rbp)
jmp 0x1bfc8
jmp 0x1beca
movq -0x58(%rbp), %rdi
callq 0x44020
movl %eax, -0xcc(%rbp)
cmpl $0x0, -0xcc(%rbp)
je 0x1bf14
movq -0x58(%rbp), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x4969b(%rip), %rdi # 0x65590
leaq 0x4a171(%rip), %rdx # 0x6606d
movl $0x1013, %ecx # imm = 0x1013
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x44(%rbp)
jmp 0x1bfc8
jmp 0x1bf16
leaq -0x40(%rbp), %rdi
callq 0x141a0
cmpq $0x16, %rax
je 0x1bf3f
leaq 0x4b6d3(%rip), %rdi # 0x675ff
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x44(%rbp)
jmp 0x1bfc8
movq -0x58(%rbp), %rdi
callq 0x43eb0
movq -0x50(%rbp), %rdi
leaq 0x4a6e3(%rip), %rsi # 0x66636
callq 0x38a70
movl %eax, -0xcc(%rbp)
cmpl $0x0, -0xcc(%rbp)
je 0x1bfbf
movl -0xcc(%rbp), %eax
movl %eax, -0x10c(%rbp)
movq -0x50(%rbp), %rdi
callq 0x3c3f0
movq %rax, -0x108(%rbp)
movq -0x50(%rbp), %rdi
callq 0x3c3c0
movl -0x10c(%rbp), %esi
movq -0x108(%rbp), %rdx
movl %eax, %ecx
leaq 0x49733(%rip), %rdi # 0x656d5
leaq 0x4a0c4(%rip), %r8 # 0x6606d
movl $0x101d, %r9d # imm = 0x101D
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x44(%rbp)
jmp 0x1bfc8
jmp 0x1bfc1
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x110(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x1bff2
movl -0x110(%rbp), %eax
addq $0x110, %rsp # imm = 0x110
popq %rbp
retq
callq 0x144c0
nopw (%rax,%rax)
|
test_conc155:
push rbp
mov rbp, rsp
sub rsp, 110h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_50], rdi
mov rdi, [rbp+var_50]
lea rsi, aDropTableIfExi_0; "DROP TABLE IF EXISTS t1"
call mysql_query
mov [rbp+var_CC], eax
cmp [rbp+var_CC], 0
jz short loc_1BC86
mov eax, [rbp+var_CC]
mov [rbp+var_DC], eax
mov rdi, [rbp+var_50]
call mysql_error
mov [rbp+var_D8], rax
mov rdi, [rbp+var_50]
call mysql_errno
mov esi, [rbp+var_DC]
mov rdx, [rbp+var_D8]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 0FFBh
mov al, 0
call diag
mov [rbp+var_44], 1
jmp loc_1BFC8
loc_1BC86:
jmp short $+2
loc_1BC88:
mov rdi, [rbp+var_50]
lea rsi, aCreateTableT1A_4; "CREATE TABLE t1 (a TEXT)"
call mysql_query
mov [rbp+var_CC], eax
cmp [rbp+var_CC], 0
jz short loc_1BD02
mov eax, [rbp+var_CC]
mov [rbp+var_EC], eax
mov rdi, [rbp+var_50]
call mysql_error
mov [rbp+var_E8], rax
mov rdi, [rbp+var_50]
call mysql_errno
mov esi, [rbp+var_EC]
mov rdx, [rbp+var_E8]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 0FFDh
mov al, 0
call diag
mov [rbp+var_44], 1
jmp loc_1BFC8
loc_1BD02:
jmp short $+2
loc_1BD04:
mov rdi, [rbp+var_50]
lea rsi, aInsertIntoT1Va_6; "INSERT INTO t1 VALUES ('zero terminated"...
call mysql_query
mov [rbp+var_CC], eax
cmp [rbp+var_CC], 0
jz short loc_1BD7E
mov eax, [rbp+var_CC]
mov [rbp+var_FC], eax
mov rdi, [rbp+var_50]
call mysql_error
mov [rbp+var_F8], rax
mov rdi, [rbp+var_50]
call mysql_errno
mov esi, [rbp+var_FC]
mov rdx, [rbp+var_F8]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 0FFFh
mov al, 0
call diag
mov [rbp+var_44], 1
jmp loc_1BFC8
loc_1BD7E:
jmp short $+2
loc_1BD80:
mov rdi, [rbp+var_50]
call mysql_stmt_init
mov [rbp+var_58], rax
mov rdi, [rbp+var_58]
lea rsi, aSelectAFromT1; "SELECT a FROM t1"
mov edx, 10h
call mysql_stmt_prepare
mov [rbp+var_CC], eax
cmp [rbp+var_CC], 0
jz short loc_1BDE3
mov rdi, [rbp+var_58]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 1003h
mov al, 0
call diag
mov [rbp+var_44], 1
jmp loc_1BFC8
loc_1BDE3:
jmp short $+2
loc_1BDE5:
mov rdi, [rbp+var_58]
call mysql_stmt_execute
mov [rbp+var_CC], eax
cmp [rbp+var_CC], 0
jz short loc_1BE2F
mov rdi, [rbp+var_58]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 1006h
mov al, 0
call diag
mov [rbp+var_44], 1
jmp loc_1BFC8
loc_1BE2F:
jmp short $+2
loc_1BE31:
lea rdi, [rbp+var_40]
mov esi, 58h ; 'X'
mov edx, 32h ; '2'
call _memset
lea rdi, [rbp+var_C8]
xor esi, esi
mov edx, 70h ; 'p'
call _memset
lea rax, [rbp+var_40]
mov [rbp+var_B8], rax
mov [rbp+var_88], 32h ; '2'
mov [rbp+var_68], 0FEh
mov rdi, [rbp+var_58]
lea rsi, [rbp+var_C8]
call mysql_stmt_bind_result
movsx eax, al
mov [rbp+var_CC], eax
cmp [rbp+var_CC], 0
jz short loc_1BEC8
mov rdi, [rbp+var_58]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 1010h
mov al, 0
call diag
mov [rbp+var_44], 1
jmp loc_1BFC8
loc_1BEC8:
jmp short $+2
loc_1BECA:
mov rdi, [rbp+var_58]
call mysql_stmt_fetch
mov [rbp+var_CC], eax
cmp [rbp+var_CC], 0
jz short loc_1BF14
mov rdi, [rbp+var_58]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 1013h
mov al, 0
call diag
mov [rbp+var_44], 1
jmp loc_1BFC8
loc_1BF14:
jmp short $+2
loc_1BF16:
lea rdi, [rbp+var_40]
call _strlen
cmp rax, 16h
jz short loc_1BF3F
lea rdi, aWrongBufferLen; "Wrong buffer length"
mov al, 0
call diag
mov [rbp+var_44], 1
jmp loc_1BFC8
loc_1BF3F:
mov rdi, [rbp+var_58]
call mysql_stmt_close
mov rdi, [rbp+var_50]
lea rsi, aDropTableIfExi_0; "DROP TABLE IF EXISTS t1"
call mysql_query
mov [rbp+var_CC], eax
cmp [rbp+var_CC], 0
jz short loc_1BFBF
mov eax, [rbp+var_CC]
mov [rbp+var_10C], eax
mov rdi, [rbp+var_50]
call mysql_error
mov [rbp+var_108], rax
mov rdi, [rbp+var_50]
call mysql_errno
mov esi, [rbp+var_10C]
mov rdx, [rbp+var_108]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 101Dh
mov al, 0
call diag
mov [rbp+var_44], 1
jmp short loc_1BFC8
loc_1BFBF:
jmp short $+2
loc_1BFC1:
mov [rbp+var_44], 0
loc_1BFC8:
mov eax, [rbp+var_44]
mov [rbp+var_110], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_1BFF2
mov eax, [rbp+var_110]
add rsp, 110h
pop rbp
retn
loc_1BFF2:
call ___stack_chk_fail
|
long long test_conc155(long long a1)
{
int v1; // eax
int v2; // eax
int v3; // eax
int v4; // eax
int v5; // r8d
int v6; // r9d
int v7; // eax
int v8; // r8d
int v9; // r9d
int v10; // eax
int v11; // r8d
int v12; // r9d
int v13; // eax
int v14; // r8d
int v15; // r9d
int v16; // edx
int v17; // ecx
int v18; // r8d
int v19; // r9d
int v20; // eax
int v22; // [rsp+8h] [rbp-108h]
int v23; // [rsp+18h] [rbp-F8h]
int v24; // [rsp+28h] [rbp-E8h]
int v25; // [rsp+38h] [rbp-D8h]
int v26; // [rsp+44h] [rbp-CCh]
int v27; // [rsp+44h] [rbp-CCh]
int v28; // [rsp+44h] [rbp-CCh]
int v29; // [rsp+44h] [rbp-CCh]
_BYTE v30[16]; // [rsp+48h] [rbp-C8h] BYREF
_BYTE *v31; // [rsp+58h] [rbp-B8h]
long long v32; // [rsp+88h] [rbp-88h]
int v33; // [rsp+A8h] [rbp-68h]
long long v34; // [rsp+B8h] [rbp-58h]
long long v35; // [rsp+C0h] [rbp-50h]
_BYTE v37[56]; // [rsp+D0h] [rbp-40h] BYREF
unsigned long long v38; // [rsp+108h] [rbp-8h]
v38 = __readfsqword(0x28u);
v35 = a1;
v26 = mysql_query(a1, "DROP TABLE IF EXISTS t1");
if ( v26 )
{
v25 = mysql_error(v35);
v1 = mysql_errno(v35);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v26,
v25,
v1,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
4091);
return 1;
}
else
{
v27 = mysql_query(v35, "CREATE TABLE t1 (a TEXT)");
if ( v27 )
{
v24 = mysql_error(v35);
v2 = mysql_errno(v35);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v27,
v24,
v2,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
4093);
return 1;
}
else
{
v28 = mysql_query(v35, "INSERT INTO t1 VALUES ('zero terminated string')");
if ( v28 )
{
v23 = mysql_error(v35);
v3 = mysql_errno(v35);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v28,
v23,
v3,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
4095);
return 1;
}
else
{
v34 = mysql_stmt_init(v35);
if ( (unsigned int)mysql_stmt_prepare(v34, "SELECT a FROM t1", 16LL) )
{
v4 = mysql_stmt_error(v34);
diag(
(unsigned int)"Error: %s (%s: %d)",
v4,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
4099,
v5,
v6);
return 1;
}
else if ( (unsigned int)mysql_stmt_execute(v34) )
{
v7 = mysql_stmt_error(v34);
diag(
(unsigned int)"Error: %s (%s: %d)",
v7,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
4102,
v8,
v9);
return 1;
}
else
{
memset(v37, 88LL, 50LL);
memset(v30, 0LL, 112LL);
v31 = v37;
v32 = 50LL;
v33 = 254;
if ( (unsigned __int8)mysql_stmt_bind_result(v34, v30) )
{
v10 = mysql_stmt_error(v34);
diag(
(unsigned int)"Error: %s (%s: %d)",
v10,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
4112,
v11,
v12);
return 1;
}
else if ( (unsigned int)mysql_stmt_fetch(v34) )
{
v13 = mysql_stmt_error(v34);
diag(
(unsigned int)"Error: %s (%s: %d)",
v13,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
4115,
v14,
v15);
return 1;
}
else if ( strlen(v37) == 22 )
{
mysql_stmt_close(v34);
v29 = mysql_query(v35, "DROP TABLE IF EXISTS t1");
if ( v29 )
{
v22 = mysql_error(v35);
v20 = mysql_errno(v35);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v29,
v22,
v20,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
4125);
return 1;
}
else
{
return 0;
}
}
else
{
diag((unsigned int)"Wrong buffer length", (unsigned int)v30, v16, v17, v18, v19);
return 1;
}
}
}
}
}
}
|
test_conc155:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x110
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x50],RDI
MOV RDI,qword ptr [RBP + -0x50]
LEA RSI,[0x166636]
CALL 0x00138a70
MOV dword ptr [RBP + -0xcc],EAX
CMP dword ptr [RBP + -0xcc],0x0
JZ 0x0011bc86
MOV EAX,dword ptr [RBP + -0xcc]
MOV dword ptr [RBP + -0xdc],EAX
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x0013c3f0
MOV qword ptr [RBP + -0xd8],RAX
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x0013c3c0
MOV ESI,dword ptr [RBP + -0xdc]
MOV RDX,qword ptr [RBP + -0xd8]
MOV ECX,EAX
LEA RDI,[0x1656d5]
LEA R8,[0x16606d]
MOV R9D,0xffb
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x44],0x1
JMP 0x0011bfc8
LAB_0011bc86:
JMP 0x0011bc88
LAB_0011bc88:
MOV RDI,qword ptr [RBP + -0x50]
LEA RSI,[0x1675b5]
CALL 0x00138a70
MOV dword ptr [RBP + -0xcc],EAX
CMP dword ptr [RBP + -0xcc],0x0
JZ 0x0011bd02
MOV EAX,dword ptr [RBP + -0xcc]
MOV dword ptr [RBP + -0xec],EAX
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x0013c3f0
MOV qword ptr [RBP + -0xe8],RAX
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x0013c3c0
MOV ESI,dword ptr [RBP + -0xec]
MOV RDX,qword ptr [RBP + -0xe8]
MOV ECX,EAX
LEA RDI,[0x1656d5]
LEA R8,[0x16606d]
MOV R9D,0xffd
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x44],0x1
JMP 0x0011bfc8
LAB_0011bd02:
JMP 0x0011bd04
LAB_0011bd04:
MOV RDI,qword ptr [RBP + -0x50]
LEA RSI,[0x1675ce]
CALL 0x00138a70
MOV dword ptr [RBP + -0xcc],EAX
CMP dword ptr [RBP + -0xcc],0x0
JZ 0x0011bd7e
MOV EAX,dword ptr [RBP + -0xcc]
MOV dword ptr [RBP + -0xfc],EAX
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x0013c3f0
MOV qword ptr [RBP + -0xf8],RAX
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x0013c3c0
MOV ESI,dword ptr [RBP + -0xfc]
MOV RDX,qword ptr [RBP + -0xf8]
MOV ECX,EAX
LEA RDI,[0x1656d5]
LEA R8,[0x16606d]
MOV R9D,0xfff
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x44],0x1
JMP 0x0011bfc8
LAB_0011bd7e:
JMP 0x0011bd80
LAB_0011bd80:
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x00144950
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x58]
LEA RSI,[0x166525]
MOV EDX,0x10
CALL 0x00145070
MOV dword ptr [RBP + -0xcc],EAX
CMP dword ptr [RBP + -0xcc],0x0
JZ 0x0011bde3
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0x1003
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x44],0x1
JMP 0x0011bfc8
LAB_0011bde3:
JMP 0x0011bde5
LAB_0011bde5:
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x00146580
MOV dword ptr [RBP + -0xcc],EAX
CMP dword ptr [RBP + -0xcc],0x0
JZ 0x0011be2f
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0x1006
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x44],0x1
JMP 0x0011bfc8
LAB_0011be2f:
JMP 0x0011be31
LAB_0011be31:
LEA RDI,[RBP + -0x40]
MOV ESI,0x58
MOV EDX,0x32
CALL 0x00114260
LEA RDI,[RBP + -0xc8]
XOR ESI,ESI
MOV EDX,0x70
CALL 0x00114260
LEA RAX,[RBP + -0x40]
MOV qword ptr [RBP + -0xb8],RAX
MOV qword ptr [RBP + -0x88],0x32
MOV dword ptr [RBP + -0x68],0xfe
MOV RDI,qword ptr [RBP + -0x58]
LEA RSI,[RBP + -0xc8]
CALL 0x00143940
MOVSX EAX,AL
MOV dword ptr [RBP + -0xcc],EAX
CMP dword ptr [RBP + -0xcc],0x0
JZ 0x0011bec8
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0x1010
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x44],0x1
JMP 0x0011bfc8
LAB_0011bec8:
JMP 0x0011beca
LAB_0011beca:
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x00144020
MOV dword ptr [RBP + -0xcc],EAX
CMP dword ptr [RBP + -0xcc],0x0
JZ 0x0011bf14
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0x1013
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x44],0x1
JMP 0x0011bfc8
LAB_0011bf14:
JMP 0x0011bf16
LAB_0011bf16:
LEA RDI,[RBP + -0x40]
CALL 0x001141a0
CMP RAX,0x16
JZ 0x0011bf3f
LEA RDI,[0x1675ff]
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x44],0x1
JMP 0x0011bfc8
LAB_0011bf3f:
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x00143eb0
MOV RDI,qword ptr [RBP + -0x50]
LEA RSI,[0x166636]
CALL 0x00138a70
MOV dword ptr [RBP + -0xcc],EAX
CMP dword ptr [RBP + -0xcc],0x0
JZ 0x0011bfbf
MOV EAX,dword ptr [RBP + -0xcc]
MOV dword ptr [RBP + -0x10c],EAX
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x0013c3f0
MOV qword ptr [RBP + -0x108],RAX
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x0013c3c0
MOV ESI,dword ptr [RBP + -0x10c]
MOV RDX,qword ptr [RBP + -0x108]
MOV ECX,EAX
LEA RDI,[0x1656d5]
LEA R8,[0x16606d]
MOV R9D,0x101d
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x44],0x1
JMP 0x0011bfc8
LAB_0011bfbf:
JMP 0x0011bfc1
LAB_0011bfc1:
MOV dword ptr [RBP + -0x44],0x0
LAB_0011bfc8:
MOV EAX,dword ptr [RBP + -0x44]
MOV dword ptr [RBP + -0x110],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0011bff2
MOV EAX,dword ptr [RBP + -0x110]
ADD RSP,0x110
POP RBP
RET
LAB_0011bff2:
CALL 0x001144c0
|
int4 test_conc155(int8 param_1)
{
char cVar1;
int iVar2;
int4 uVar3;
int8 uVar4;
size_t sVar5;
long in_FS_OFFSET;
int1 local_d0 [16];
char *local_c0;
int8 local_90;
int4 local_70;
int8 local_60;
int8 local_58;
int4 local_4c;
char local_48 [56];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_58 = param_1;
iVar2 = mysql_query(param_1,"DROP TABLE IF EXISTS t1");
if (iVar2 == 0) {
iVar2 = mysql_query(local_58,"CREATE TABLE t1 (a TEXT)");
if (iVar2 == 0) {
iVar2 = mysql_query(local_58,"INSERT INTO t1 VALUES (\'zero terminated string\')");
if (iVar2 == 0) {
local_60 = mysql_stmt_init(local_58);
iVar2 = mysql_stmt_prepare(local_60,"SELECT a FROM t1",0x10);
if (iVar2 == 0) {
iVar2 = mysql_stmt_execute(local_60);
if (iVar2 == 0) {
memset(local_48,0x58,0x32);
memset(local_d0,0,0x70);
local_c0 = local_48;
local_90 = 0x32;
local_70 = 0xfe;
cVar1 = mysql_stmt_bind_result(local_60,local_d0);
if (cVar1 == '\0') {
iVar2 = mysql_stmt_fetch(local_60);
if (iVar2 == 0) {
sVar5 = strlen(local_48);
if (sVar5 == 0x16) {
mysql_stmt_close(local_60);
iVar2 = mysql_query(local_58,"DROP TABLE IF EXISTS t1");
if (iVar2 == 0) {
local_4c = 0;
}
else {
uVar4 = mysql_error(local_58);
uVar3 = mysql_errno(local_58);
diag("Error (%d): %s (%d) in %s line %d",iVar2,uVar4,uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x101d);
local_4c = 1;
}
}
else {
diag("Wrong buffer length");
local_4c = 1;
}
}
else {
uVar4 = mysql_stmt_error(local_60);
diag("Error: %s (%s: %d)",uVar4,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x1013);
local_4c = 1;
}
}
else {
uVar4 = mysql_stmt_error(local_60);
diag("Error: %s (%s: %d)",uVar4,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x1010);
local_4c = 1;
}
}
else {
uVar4 = mysql_stmt_error(local_60);
diag("Error: %s (%s: %d)",uVar4,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x1006);
local_4c = 1;
}
}
else {
uVar4 = mysql_stmt_error(local_60);
diag("Error: %s (%s: %d)",uVar4,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
0x1003);
local_4c = 1;
}
}
else {
uVar4 = mysql_error(local_58);
uVar3 = mysql_errno(local_58);
diag("Error (%d): %s (%d) in %s line %d",iVar2,uVar4,uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
0xfff);
local_4c = 1;
}
}
else {
uVar4 = mysql_error(local_58);
uVar3 = mysql_errno(local_58);
diag("Error (%d): %s (%d) in %s line %d",iVar2,uVar4,uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0xffd
);
local_4c = 1;
}
}
else {
uVar4 = mysql_error(local_58);
uVar3 = mysql_errno(local_58);
diag("Error (%d): %s (%d) in %s line %d",iVar2,uVar4,uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0xffb);
local_4c = 1;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_4c;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
16,460
|
my_uca_context_weight_find
|
eloqsql/strings/ctype-uca.c
|
static inline const MY_CONTRACTION *
my_uca_context_weight_find(my_uca_scanner *scanner, my_wc_t *wc,
size_t max_char_length)
{
const MY_CONTRACTION *cnt;
DBUG_ASSERT(scanner->level->contractions.nitems);
/*
If we have scanned a character which can have previous context,
and there were some more characters already before,
then reconstruct codepoint of the previous character
from "page" and "code" into w[1], and verify that {wc[1], wc[0]}
together form a real previous context pair.
Note, we support only 2-character long sequences with previous
context at the moment. CLDR does not have longer sequences.
*/
if (my_uca_can_be_previous_context_tail(&scanner->level->contractions,
wc[0]) &&
scanner->wbeg != nochar && /* if not the very first character */
my_uca_can_be_previous_context_head(&scanner->level->contractions,
(wc[1]= ((scanner->page << 8) +
scanner->code))) &&
(cnt= my_uca_previous_context_find(scanner, wc[1], wc[0])))
{
scanner->page= scanner->code= 0; /* Clear for the next character */
return cnt;
}
else if (my_uca_can_be_contraction_head(&scanner->level->contractions,
wc[0]))
{
/* Check if w[0] starts a contraction */
if ((cnt= my_uca_scanner_contraction_find(scanner, wc, max_char_length)))
return cnt;
}
return NULL;
}
|
O0
|
c
|
my_uca_context_weight_find:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
jmp 0x130226
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x1303d0
movsbl %al, %eax
cmpl $0x0, %eax
je 0x1302d1
movq -0x10(%rbp), %rax
leaq 0x1674fb(%rip), %rcx # 0x297750
cmpq %rcx, (%rax)
je 0x1302d1
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movl 0x24(%rax), %eax
shll $0x8, %eax
movq -0x10(%rbp), %rcx
addl 0x28(%rcx), %eax
movslq %eax, %rsi
movq -0x18(%rbp), %rax
movq %rsi, 0x8(%rax)
callq 0x130400
movsbl %al, %eax
cmpl $0x0, %eax
je 0x1302d1
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
callq 0x130430
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x1302d1
movq -0x10(%rbp), %rax
movl $0x0, 0x28(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x24(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x13031e
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x127840
cmpb $0x0, %al
je 0x130314
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x1304e0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x130312
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x13031e
jmp 0x130314
jmp 0x130316
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
my_uca_context_weight_find:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
jmp short $+2
loc_130226:
mov rax, [rbp+var_10]
mov rdi, [rax+18h]
add rdi, 18h
mov rax, [rbp+var_18]
mov rsi, [rax]
call my_uca_can_be_previous_context_tail
movsx eax, al
cmp eax, 0
jz loc_1302D1
mov rax, [rbp+var_10]
lea rcx, nochar
cmp [rax], rcx
jz short loc_1302D1
mov rax, [rbp+var_10]
mov rdi, [rax+18h]
add rdi, 18h
mov rax, [rbp+var_10]
mov eax, [rax+24h]
shl eax, 8
mov rcx, [rbp+var_10]
add eax, [rcx+28h]
movsxd rsi, eax
mov rax, [rbp+var_18]
mov [rax+8], rsi
call my_uca_can_be_previous_context_head
movsx eax, al
cmp eax, 0
jz short loc_1302D1
mov rdi, [rbp+var_10]
mov rax, [rbp+var_18]
mov rsi, [rax+8]
mov rax, [rbp+var_18]
mov rdx, [rax]
call my_uca_previous_context_find
mov [rbp+var_28], rax
cmp rax, 0
jz short loc_1302D1
mov rax, [rbp+var_10]
mov dword ptr [rax+28h], 0
mov rax, [rbp+var_10]
mov dword ptr [rax+24h], 0
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp short loc_13031E
loc_1302D1:
mov rax, [rbp+var_10]
mov rdi, [rax+18h]
add rdi, 18h
mov rax, [rbp+var_18]
mov rsi, [rax]
call my_uca_can_be_contraction_head
cmp al, 0
jz short loc_130314
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call my_uca_scanner_contraction_find
mov [rbp+var_28], rax
cmp rax, 0
jz short loc_130312
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp short loc_13031E
loc_130312:
jmp short $+2
loc_130314:
jmp short $+2
loc_130316:
mov [rbp+var_8], 0
loc_13031E:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
long long my_uca_context_weight_find(long long a1, _QWORD *a2, long long a3)
{
long long v3; // rdi
long long v5; // [rsp+8h] [rbp-28h]
long long v6; // [rsp+8h] [rbp-28h]
if ( (unsigned __int8)my_uca_can_be_previous_context_tail(*(_QWORD *)(a1 + 24) + 24LL, *a2)
&& *(_UNKNOWN **)a1 != &nochar
&& (v3 = *(_QWORD *)(a1 + 24) + 24LL,
a2[1] = *(_DWORD *)(a1 + 40) + (*(_DWORD *)(a1 + 36) << 8),
(unsigned __int8)my_uca_can_be_previous_context_head(v3))
&& (v5 = my_uca_previous_context_find(a1, a2[1], *a2)) != 0 )
{
*(_DWORD *)(a1 + 40) = 0;
*(_DWORD *)(a1 + 36) = 0;
return v5;
}
else if ( (unsigned __int8)my_uca_can_be_contraction_head(*(_QWORD *)(a1 + 24) + 24LL, *a2)
&& (v6 = my_uca_scanner_contraction_find(a1, a2, a3)) != 0 )
{
return v6;
}
else
{
return 0LL;
}
}
| |||
16,461
|
my_uca_context_weight_find
|
eloqsql/strings/ctype-uca.c
|
static inline const MY_CONTRACTION *
my_uca_context_weight_find(my_uca_scanner *scanner, my_wc_t *wc,
size_t max_char_length)
{
const MY_CONTRACTION *cnt;
DBUG_ASSERT(scanner->level->contractions.nitems);
/*
If we have scanned a character which can have previous context,
and there were some more characters already before,
then reconstruct codepoint of the previous character
from "page" and "code" into w[1], and verify that {wc[1], wc[0]}
together form a real previous context pair.
Note, we support only 2-character long sequences with previous
context at the moment. CLDR does not have longer sequences.
*/
if (my_uca_can_be_previous_context_tail(&scanner->level->contractions,
wc[0]) &&
scanner->wbeg != nochar && /* if not the very first character */
my_uca_can_be_previous_context_head(&scanner->level->contractions,
(wc[1]= ((scanner->page << 8) +
scanner->code))) &&
(cnt= my_uca_previous_context_find(scanner, wc[1], wc[0])))
{
scanner->page= scanner->code= 0; /* Clear for the next character */
return cnt;
}
else if (my_uca_can_be_contraction_head(&scanner->level->contractions,
wc[0]))
{
/* Check if w[0] starts a contraction */
if ((cnt= my_uca_scanner_contraction_find(scanner, wc, max_char_length)))
return cnt;
}
return NULL;
}
|
O3
|
c
|
my_uca_context_weight_find:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, -0x30(%rbp)
movq %rsi, %r14
movq 0x18(%rdi), %rcx
movq (%rsi), %rdx
movq 0x28(%rcx), %rsi
movl %edx, %eax
andl $0xfff, %eax # imm = 0xFFF
cmpb $0x0, (%rsi,%rax)
js 0xc4074
movq 0x28(%rcx), %rcx
testb $0x1, (%rcx,%rax)
je 0xc41c0
movq %rdi, -0x40(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x60(%rbp)
movaps %xmm0, -0x70(%rbp)
movaps %xmm0, -0x80(%rbp)
cmpq $0x2, -0x30(%rbp)
jb 0xc41c0
movq -0x40(%rbp), %r13
movq 0x8(%r13), %r12
movb $0x4, %r15b
movl $0x1, %edx
movl $0x8, %ebx
movq %rdx, -0x38(%rbp)
movq 0x10(%r13), %rcx
movq 0x30(%r13), %rdi
movq 0xb8(%rdi), %rax
leaq (%r14,%rbx), %rsi
movq %r12, %rdx
callq *0x28(%rax)
testl %eax, %eax
jle 0xc40f4
movl %eax, %eax
addq %rax, %r12
movq -0x38(%rbp), %rdx
movq %r12, -0x80(%rbp,%rdx,8)
movq 0x18(%r13), %rcx
movq (%r14,%rdx,8), %rax
movq 0x28(%rcx), %rsi
andl $0xfff, %eax # imm = 0xFFF
testb %r15b, (%rsi,%rax)
je 0xc4110
incq %rdx
addb %r15b, %r15b
addq $0x8, %rbx
cmpq %rdx, -0x30(%rbp)
jne 0xc400d
movq -0x30(%rbp), %rdx
jmp 0xc40f8
leaq 0x219b55(%rip), %rsi # 0x2ddbd0
cmpq %rsi, (%rdi)
je 0xc3fcc
movl 0x24(%rdi), %esi
shll $0x8, %esi
movslq 0x28(%rdi), %r8
movslq %esi, %rsi
addq %r8, %rsi
movq %rsi, 0x8(%r14)
movq 0x28(%rcx), %rcx
movl %esi, %r8d
andl $0xfff, %r8d # imm = 0xFFF
testb $0x40, (%rcx,%r8)
movq 0x18(%rdi), %rcx
je 0xc3fcc
movq 0x18(%rcx), %r8
testq %r8, %r8
jle 0xc3fcc
movq 0x20(%rcx), %r12
imulq $0x58, %r8, %r8
addq %r12, %r8
cmpb $0x0, 0x52(%r12)
je 0xc40e6
cmpq %rsi, (%r12)
jne 0xc40e6
cmpq %rdx, 0x8(%r12)
je 0xc41ec
addq $0x58, %r12
cmpq %r8, %r12
jb 0xc40cd
jmp 0xc3fcc
movq -0x38(%rbp), %rdx
cmpq $0x2, %rdx
jb 0xc41c0
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rcx
movq 0x28(%rcx), %rsi
jmp 0xc4113
incq %rdx
leaq (,%rdx,8), %rdi
movq %rsi, -0x48(%rbp)
movq %rdx, %r8
decq %rdx
movq -0x8(%r14,%r8,8), %rax
andl $0xfff, %eax # imm = 0xFFF
testb $0x2, (%rsi,%rax)
je 0xc41ae
movq 0x18(%rcx), %rax
testq %rax, %rax
jle 0xc41ae
movq 0x20(%rcx), %r12
imulq $0x58, %rax, %rax
addq %r12, %rax
leaq (,%r8,8), %rsi
movq %rsi, -0x50(%rbp)
movq %rdi, -0x38(%rbp)
movq %rax, -0x30(%rbp)
cmpq $0x5, %r8
ja 0xc416a
cmpq $0x0, (%r12,%rdi)
jne 0xc41a5
cmpb $0x0, 0x52(%r12)
jne 0xc41a5
movq %r12, %rdi
movq %r14, %rsi
movq %rdx, %r15
movq -0x50(%rbp), %rdx
movq %r14, %r13
movq %rcx, %rbx
movq %r8, %r14
callq 0x2a5b0
movq %r14, %r8
movq -0x38(%rbp), %rdi
movq %rbx, %rcx
movq %r15, %rdx
movq %r13, %r14
testl %eax, %eax
movq -0x30(%rbp), %rax
je 0xc41d5
addq $0x58, %r12
cmpq %rax, %r12
jb 0xc415d
addq $-0x8, %rdi
cmpq $0x1, %rdx
movq -0x48(%rbp), %rsi
ja 0xc411f
xorl %r12d, %r12d
movq %r12, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x32(%r12), %rax
movq -0x40(%rbp), %rcx
movq %rax, (%rcx)
movq -0x80(%rbp,%rdx,8), %rax
movq %rax, 0x8(%rcx)
jmp 0xc41c3
leaq 0x32(%r12), %rax
movq %rax, (%rdi)
movq $0x0, 0x24(%rdi)
jmp 0xc41c3
|
my_uca_context_weight_find:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rbp+var_30], rdx
mov r14, rsi
mov rcx, [rdi+18h]
mov rdx, [rsi]
mov rsi, [rcx+28h]
mov eax, edx
and eax, 0FFFh
cmp byte ptr [rsi+rax], 0
js loc_C4074
loc_C3FCC:
mov rcx, [rcx+28h]
test byte ptr [rcx+rax], 1
jz loc_C41C0
mov [rbp+var_40], rdi
xorps xmm0, xmm0
movaps [rbp+var_60], xmm0
movaps [rbp+var_70], xmm0
movaps [rbp+var_80], xmm0
cmp [rbp+var_30], 2
jb loc_C41C0
mov r13, [rbp+var_40]
mov r12, [r13+8]
mov r15b, 4
mov edx, 1
mov ebx, 8
loc_C400D:
mov [rbp+var_38], rdx
mov rcx, [r13+10h]
mov rdi, [r13+30h]
mov rax, [rdi+0B8h]
lea rsi, [r14+rbx]
mov rdx, r12
call qword ptr [rax+28h]
test eax, eax
jle loc_C40F4
mov eax, eax
add r12, rax
mov rdx, [rbp+var_38]
mov qword ptr [rbp+rdx*8+var_80], r12
mov rcx, [r13+18h]
mov rax, [r14+rdx*8]
mov rsi, [rcx+28h]
and eax, 0FFFh
test [rsi+rax], r15b
jz loc_C4110
inc rdx
add r15b, r15b
add rbx, 8
cmp [rbp+var_30], rdx
jnz short loc_C400D
mov rdx, [rbp+var_30]
jmp loc_C40F8
loc_C4074:
lea rsi, nochar
cmp [rdi], rsi
jz loc_C3FCC
mov esi, [rdi+24h]
shl esi, 8
movsxd r8, dword ptr [rdi+28h]
movsxd rsi, esi
add rsi, r8
mov [r14+8], rsi
mov rcx, [rcx+28h]
mov r8d, esi
and r8d, 0FFFh
test byte ptr [rcx+r8], 40h
mov rcx, [rdi+18h]
jz loc_C3FCC
mov r8, [rcx+18h]
test r8, r8
jle loc_C3FCC
mov r12, [rcx+20h]
imul r8, 58h ; 'X'
add r8, r12
loc_C40CD:
cmp byte ptr [r12+52h], 0
jz short loc_C40E6
cmp [r12], rsi
jnz short loc_C40E6
cmp [r12+8], rdx
jz loc_C41EC
loc_C40E6:
add r12, 58h ; 'X'
cmp r12, r8
jb short loc_C40CD
jmp loc_C3FCC
loc_C40F4:
mov rdx, [rbp+var_38]
loc_C40F8:
cmp rdx, 2
jb loc_C41C0
mov rax, [rbp+var_40]
mov rcx, [rax+18h]
mov rsi, [rcx+28h]
jmp short loc_C4113
loc_C4110:
inc rdx
loc_C4113:
lea rdi, ds:0[rdx*8]
mov [rbp+var_48], rsi
loc_C411F:
mov r8, rdx
dec rdx
mov rax, [r14+r8*8-8]
and eax, 0FFFh
test byte ptr [rsi+rax], 2
jz short loc_C41AE
mov rax, [rcx+18h]
test rax, rax
jle short loc_C41AE
mov r12, [rcx+20h]
imul rax, 58h ; 'X'
add rax, r12
lea rsi, ds:0[r8*8]
mov [rbp+var_50], rsi
mov [rbp+var_38], rdi
mov [rbp+var_30], rax
loc_C415D:
cmp r8, 5
ja short loc_C416A
cmp qword ptr [r12+rdi], 0
jnz short loc_C41A5
loc_C416A:
cmp byte ptr [r12+52h], 0
jnz short loc_C41A5
mov rdi, r12
mov rsi, r14
mov r15, rdx
mov rdx, [rbp+var_50]
mov r13, r14
mov rbx, rcx
mov r14, r8
call _bcmp
mov r8, r14
mov rdi, [rbp+var_38]
mov rcx, rbx
mov rdx, r15
mov r14, r13
test eax, eax
mov rax, [rbp+var_30]
jz short loc_C41D5
loc_C41A5:
add r12, 58h ; 'X'
cmp r12, rax
jb short loc_C415D
loc_C41AE:
add rdi, 0FFFFFFFFFFFFFFF8h
cmp rdx, 1
mov rsi, [rbp+var_48]
ja loc_C411F
loc_C41C0:
xor r12d, r12d
loc_C41C3:
mov rax, r12
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_C41D5:
lea rax, [r12+32h]
mov rcx, [rbp+var_40]
mov [rcx], rax
mov rax, qword ptr [rbp+rdx*8+var_80]
mov [rcx+8], rax
jmp short loc_C41C3
loc_C41EC:
lea rax, [r12+32h]
mov [rdi], rax
mov qword ptr [rdi+24h], 0
jmp short loc_C41C3
|
unsigned long long my_uca_context_weight_find(
long long a1,
_QWORD *a2,
unsigned long long a3,
long long a4,
long long a5,
long long a6)
{
_QWORD *v6; // r14
_QWORD *v7; // rcx
long long v8; // rdx
long long v9; // rax
_QWORD *v10; // r13
long long v11; // r12
char v12; // r15
long long v13; // rdx
long long v14; // rbx
int v15; // eax
long long v16; // rdx
_QWORD *v17; // rcx
long long v18; // rsi
unsigned long long v19; // rdx
long long v20; // rsi
bool v21; // zf
unsigned long long v22; // r12
long long v23; // rdi
unsigned long long v24; // r8
long long v25; // rax
unsigned long long v26; // rax
_QWORD *v27; // rsi
unsigned long long v28; // r15
_QWORD *v29; // r13
_QWORD *v30; // rbx
unsigned long long v31; // r14
int v32; // eax
_QWORD *v34; // rcx
__int128 v35; // [rsp+0h] [rbp-80h]
__int128 v36; // [rsp+10h] [rbp-70h]
__int128 v37; // [rsp+20h] [rbp-60h]
long long v38; // [rsp+30h] [rbp-50h]
long long v39; // [rsp+38h] [rbp-48h]
_QWORD *v40; // [rsp+40h] [rbp-40h]
long long v41; // [rsp+48h] [rbp-38h]
unsigned long long v42; // [rsp+50h] [rbp-30h]
v42 = a3;
v6 = a2;
v7 = *(_QWORD **)(a1 + 24);
v8 = *a2;
v9 = *a2 & 0xFFFLL;
if ( *(char *)(v7[5] + v9) >= 0
|| *(_UNKNOWN **)a1 == &nochar
|| (v20 = *(int *)(a1 + 40) + (long long)(int)(*(_DWORD *)(a1 + 36) << 8),
v6[1] = v20,
a5 = v20 & 0xFFF,
v21 = (*(_BYTE *)(v7[5] + a5) & 0x40) == 0,
v7 = *(_QWORD **)(a1 + 24),
v21)
|| (a5 = v7[3], a5 <= 0) )
{
LABEL_2:
if ( (*(_BYTE *)(v7[5] + v9) & 1) != 0 && (v40 = (_QWORD *)a1, v37 = 0LL, v36 = 0LL, v35 = 0LL, v42 >= 2) )
{
v10 = v40;
v11 = v40[1];
v12 = 4;
v13 = 1LL;
v14 = 1LL;
while ( 1 )
{
v41 = v13;
v15 = (*(long long ( **)(_QWORD, _QWORD *, long long, _QWORD, long long, long long, _QWORD, _QWORD, _QWORD, _QWORD, _QWORD, _QWORD))(*(_QWORD *)(v10[6] + 184LL) + 40LL))(
v10[6],
&v6[v14],
v11,
v10[2],
a5,
a6,
v35,
*((_QWORD *)&v35 + 1),
v36,
*((_QWORD *)&v36 + 1),
v37,
*((_QWORD *)&v37 + 1));
if ( v15 <= 0 )
break;
v11 += (unsigned int)v15;
v16 = v41;
*((_QWORD *)&v35 + v41) = v11;
v17 = (_QWORD *)v10[3];
v18 = v17[5];
if ( ((unsigned __int8)v12 & *(_BYTE *)(v18 + (v6[v16] & 0xFFFLL))) == 0 )
{
v19 = v16 + 1;
goto LABEL_22;
}
v13 = v16 + 1;
v12 *= 2;
++v14;
if ( v42 == v13 )
{
v19 = v42;
goto LABEL_19;
}
}
v19 = v41;
LABEL_19:
if ( v19 < 2 )
return 0LL;
v17 = (_QWORD *)v40[3];
v18 = v17[5];
LABEL_22:
v23 = 8 * v19;
v39 = v18;
while ( 1 )
{
v24 = v19--;
if ( (*(_BYTE *)(v18 + (v6[v24 - 1] & 0xFFFLL)) & 2) != 0 )
{
v25 = v17[3];
if ( v25 > 0 )
break;
}
LABEL_31:
v23 -= 8LL;
v18 = v39;
if ( v19 <= 1 )
return 0LL;
}
v22 = v17[4];
v26 = v22 + 88 * v25;
v38 = 8 * v24;
v41 = v23;
v42 = v26;
while ( 1 )
{
if ( (v24 > 5 || !*(_QWORD *)(v22 + v23)) && !*(_BYTE *)(v22 + 82) )
{
v27 = v6;
v28 = v19;
v29 = v6;
v30 = v17;
v31 = v24;
v32 = bcmp(v22, v27, v38);
v24 = v31;
v23 = v41;
v17 = v30;
v19 = v28;
v6 = v29;
v21 = v32 == 0;
v26 = v42;
if ( v21 )
break;
}
v22 += 88LL;
if ( v22 >= v26 )
goto LABEL_31;
}
v34 = v40;
*v40 = v22 + 50;
v34[1] = *((_QWORD *)&v35 + v28);
}
else
{
return 0LL;
}
}
else
{
v22 = v7[4];
a5 = v22 + 88 * a5;
while ( !*(_BYTE *)(v22 + 82) || *(_QWORD *)v22 != v20 || *(_QWORD *)(v22 + 8) != v8 )
{
v22 += 88LL;
if ( v22 >= a5 )
goto LABEL_2;
}
*(_QWORD *)a1 = v22 + 50;
*(_QWORD *)(a1 + 36) = 0LL;
}
return v22;
}
|
my_uca_context_weight_find:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x30],RDX
MOV R14,RSI
MOV RCX,qword ptr [RDI + 0x18]
MOV RDX,qword ptr [RSI]
MOV RSI,qword ptr [RCX + 0x28]
MOV EAX,EDX
AND EAX,0xfff
CMP byte ptr [RSI + RAX*0x1],0x0
JS 0x001c4074
LAB_001c3fcc:
MOV RCX,qword ptr [RCX + 0x28]
TEST byte ptr [RCX + RAX*0x1],0x1
JZ 0x001c41c0
MOV qword ptr [RBP + -0x40],RDI
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RBP + -0x60],XMM0
MOVAPS xmmword ptr [RBP + -0x70],XMM0
MOVAPS xmmword ptr [RBP + -0x80],XMM0
CMP qword ptr [RBP + -0x30],0x2
JC 0x001c41c0
MOV R13,qword ptr [RBP + -0x40]
MOV R12,qword ptr [R13 + 0x8]
MOV R15B,0x4
MOV EDX,0x1
MOV EBX,0x8
LAB_001c400d:
MOV qword ptr [RBP + -0x38],RDX
MOV RCX,qword ptr [R13 + 0x10]
MOV RDI,qword ptr [R13 + 0x30]
MOV RAX,qword ptr [RDI + 0xb8]
LEA RSI,[R14 + RBX*0x1]
MOV RDX,R12
CALL qword ptr [RAX + 0x28]
TEST EAX,EAX
JLE 0x001c40f4
MOV EAX,EAX
ADD R12,RAX
MOV RDX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + RDX*0x8 + -0x80],R12
MOV RCX,qword ptr [R13 + 0x18]
MOV RAX,qword ptr [R14 + RDX*0x8]
MOV RSI,qword ptr [RCX + 0x28]
AND EAX,0xfff
TEST byte ptr [RSI + RAX*0x1],R15B
JZ 0x001c4110
INC RDX
ADD R15B,R15B
ADD RBX,0x8
CMP qword ptr [RBP + -0x30],RDX
JNZ 0x001c400d
MOV RDX,qword ptr [RBP + -0x30]
JMP 0x001c40f8
LAB_001c4074:
LEA RSI,[0x3ddbd0]
CMP qword ptr [RDI],RSI
JZ 0x001c3fcc
MOV ESI,dword ptr [RDI + 0x24]
SHL ESI,0x8
MOVSXD R8,dword ptr [RDI + 0x28]
MOVSXD RSI,ESI
ADD RSI,R8
MOV qword ptr [R14 + 0x8],RSI
MOV RCX,qword ptr [RCX + 0x28]
MOV R8D,ESI
AND R8D,0xfff
TEST byte ptr [RCX + R8*0x1],0x40
MOV RCX,qword ptr [RDI + 0x18]
JZ 0x001c3fcc
MOV R8,qword ptr [RCX + 0x18]
TEST R8,R8
JLE 0x001c3fcc
MOV R12,qword ptr [RCX + 0x20]
IMUL R8,R8,0x58
ADD R8,R12
LAB_001c40cd:
CMP byte ptr [R12 + 0x52],0x0
JZ 0x001c40e6
CMP qword ptr [R12],RSI
JNZ 0x001c40e6
CMP qword ptr [R12 + 0x8],RDX
JZ 0x001c41ec
LAB_001c40e6:
ADD R12,0x58
CMP R12,R8
JC 0x001c40cd
JMP 0x001c3fcc
LAB_001c40f4:
MOV RDX,qword ptr [RBP + -0x38]
LAB_001c40f8:
CMP RDX,0x2
JC 0x001c41c0
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RCX + 0x28]
JMP 0x001c4113
LAB_001c4110:
INC RDX
LAB_001c4113:
LEA RDI,[RDX*0x8]
MOV qword ptr [RBP + -0x48],RSI
LAB_001c411f:
MOV R8,RDX
DEC RDX
MOV RAX,qword ptr [R14 + R8*0x8 + -0x8]
AND EAX,0xfff
TEST byte ptr [RSI + RAX*0x1],0x2
JZ 0x001c41ae
MOV RAX,qword ptr [RCX + 0x18]
TEST RAX,RAX
JLE 0x001c41ae
MOV R12,qword ptr [RCX + 0x20]
IMUL RAX,RAX,0x58
ADD RAX,R12
LEA RSI,[R8*0x8]
MOV qword ptr [RBP + -0x50],RSI
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x30],RAX
LAB_001c415d:
CMP R8,0x5
JA 0x001c416a
CMP qword ptr [R12 + RDI*0x1],0x0
JNZ 0x001c41a5
LAB_001c416a:
CMP byte ptr [R12 + 0x52],0x0
JNZ 0x001c41a5
MOV RDI,R12
MOV RSI,R14
MOV R15,RDX
MOV RDX,qword ptr [RBP + -0x50]
MOV R13,R14
MOV RBX,RCX
MOV R14,R8
CALL 0x0012a5b0
MOV R8,R14
MOV RDI,qword ptr [RBP + -0x38]
MOV RCX,RBX
MOV RDX,R15
MOV R14,R13
TEST EAX,EAX
MOV RAX,qword ptr [RBP + -0x30]
JZ 0x001c41d5
LAB_001c41a5:
ADD R12,0x58
CMP R12,RAX
JC 0x001c415d
LAB_001c41ae:
ADD RDI,-0x8
CMP RDX,0x1
MOV RSI,qword ptr [RBP + -0x48]
JA 0x001c411f
LAB_001c41c0:
XOR R12D,R12D
LAB_001c41c3:
MOV RAX,R12
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001c41d5:
LEA RAX,[R12 + 0x32]
MOV RCX,qword ptr [RBP + -0x40]
MOV qword ptr [RCX],RAX
MOV RAX,qword ptr [RBP + RDX*0x8 + -0x80]
MOV qword ptr [RCX + 0x8],RAX
JMP 0x001c41c3
LAB_001c41ec:
LEA RAX,[R12 + 0x32]
MOV qword ptr [RDI],RAX
MOV qword ptr [RDI + 0x24],0x0
JMP 0x001c41c3
|
long * my_uca_context_weight_find(long *param_1,long *param_2,ulong param_3)
{
uint uVar1;
int iVar2;
long *plVar3;
long lVar4;
ulong uVar5;
ulong uVar6;
ulong uVar7;
long lVar8;
long lVar9;
long *plVar10;
byte bVar11;
long local_88 [7];
long local_50;
long *local_48;
ulong local_40;
long *local_38;
lVar9 = param_1[3];
uVar5 = (ulong)((uint)*param_2 & 0xfff);
if ((*(char *)(*(long *)(lVar9 + 0x28) + uVar5) < '\0') && ((int4 *)*param_1 != &nochar)) {
lVar8 = (long)(*(int *)((long)param_1 + 0x24) << 8) + (long)(int)param_1[5];
param_2[1] = lVar8;
plVar10 = (long *)(lVar9 + 0x28);
lVar9 = param_1[3];
if (((*(byte *)(*plVar10 + (ulong)((uint)lVar8 & 0xfff)) & 0x40) != 0) &&
(0 < *(long *)(lVar9 + 0x18))) {
plVar10 = *(long **)(lVar9 + 0x20);
plVar3 = plVar10 + *(long *)(lVar9 + 0x18) * 0xb;
do {
if (((*(char *)((long)plVar10 + 0x52) != '\0') && (*plVar10 == lVar8)) &&
(plVar10[1] == *param_2)) {
*param_1 = (long)plVar10 + 0x32;
*(int8 *)((long)param_1 + 0x24) = 0;
return plVar10;
}
plVar10 = plVar10 + 0xb;
} while (plVar10 < plVar3);
}
}
if ((*(byte *)(*(long *)(lVar9 + 0x28) + uVar5) & 1) != 0) {
local_88[4] = 0;
local_88[5] = 0;
local_88[2] = 0;
local_88[3] = 0;
local_88[0] = 0;
local_88[1] = 0;
if (1 < param_3) {
lVar9 = param_1[1];
bVar11 = 4;
uVar5 = 1;
lVar8 = 8;
local_48 = param_1;
local_38 = (long *)param_3;
do {
local_40 = uVar5;
uVar1 = (**(code **)(*(long *)(param_1[6] + 0xb8) + 0x28))
(param_1[6],(long)param_2 + lVar8,lVar9,param_1[2]);
if ((int)uVar1 < 1) break;
lVar9 = lVar9 + (ulong)uVar1;
local_88[local_40] = lVar9;
lVar4 = param_1[3];
local_50 = *(long *)(lVar4 + 0x28);
if ((*(byte *)(local_50 + (ulong)((uint)param_2[local_40] & 0xfff)) & bVar11) == 0) {
local_40 = local_40 + 1;
goto LAB_001c4113;
}
uVar5 = local_40 + 1;
bVar11 = bVar11 * '\x02';
lVar8 = lVar8 + 8;
local_40 = (ulong)local_38;
} while (local_38 != (long *)uVar5);
if (1 < local_40) {
lVar4 = local_48[3];
local_50 = *(long *)(lVar4 + 0x28);
LAB_001c4113:
uVar5 = local_40 * 8;
uVar6 = local_40;
do {
uVar7 = uVar6 - 1;
if (((*(byte *)(local_50 + (ulong)((uint)param_2[uVar6 - 1] & 0xfff)) & 2) != 0) &&
(0 < *(long *)(lVar4 + 0x18))) {
plVar10 = *(long **)(lVar4 + 0x20);
plVar3 = plVar10 + *(long *)(lVar4 + 0x18) * 0xb;
local_88[6] = uVar6 * 8;
local_40 = uVar5;
local_38 = plVar3;
do {
if (((5 < uVar6) || (*(long *)((long)plVar10 + uVar5) == 0)) &&
((*(char *)((long)plVar10 + 0x52) == '\0' &&
(iVar2 = bcmp(plVar10,param_2,local_88[6]), plVar3 = local_38, uVar5 = local_40,
iVar2 == 0)))) {
*local_48 = (long)plVar10 + 0x32;
local_48[1] = local_88[uVar7];
return plVar10;
}
plVar10 = plVar10 + 0xb;
} while (plVar10 < plVar3);
}
uVar5 = uVar5 + -8;
uVar6 = uVar7;
} while (1 < uVar7);
}
}
}
return (long *)0x0;
}
|
|
16,462
|
rapidcsv::Document::ReplaceString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
Andrewchistyakov[P]flashcards_lyc/src/rapidcsv.h
|
static void ReplaceString(std::string& pStr, const std::string& pSearch, const std::string& pReplace)
{
size_t pos = 0;
while ((pos = pStr.find(pSearch, pos)) != std::string::npos)
{
pStr.replace(pos, pSearch.size(), pReplace);
pos += pReplace.size();
}
}
|
O1
|
c
|
rapidcsv::Document::ReplaceString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rsi), %rsi
movq 0x8(%r14), %rcx
xorl %edx, %edx
callq 0xb770
cmpq $-0x1, %rax
je 0x1e5df
movq %rax, %r12
movq 0x8(%r14), %rdx
movq (%rbx), %rcx
movq 0x8(%rbx), %r8
movq %r15, %rdi
movq %r12, %rsi
callq 0xb470
addq 0x8(%rbx), %r12
movq (%r14), %rsi
movq 0x8(%r14), %rcx
movq %r15, %rdi
movq %r12, %rdx
callq 0xb770
movq %rax, %r12
cmpq $-0x1, %rax
jne 0x1e5aa
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
_ZN8rapidcsv8Document13ReplaceStringERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS6_S9_:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov rsi, [rsi]
mov rcx, [r14+8]
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_1E5DF
mov r12, rax
loc_1E5AA:
mov rdx, [r14+8]
mov rcx, [rbx]
mov r8, [rbx+8]
mov rdi, r15
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
add r12, [rbx+8]
mov rsi, [r14]
mov rcx, [r14+8]
mov rdi, r15
mov rdx, r12
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong)
mov r12, rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_1E5AA
loc_1E5DF:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
|
long long rapidcsv::Document::ReplaceString(long long a1, _QWORD *a2, long long a3)
{
long long result; // rax
long long v5; // r12
result = std::string::find(a1, *a2, 0LL, a2[1]);
if ( result != -1 )
{
v5 = result;
do
{
std::string::replace(a1, v5, a2[1]);
result = std::string::find(a1, *a2, *(_QWORD *)(a3 + 8) + v5, a2[1]);
v5 = result;
}
while ( result != -1 );
}
return result;
}
|
ReplaceString:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
MOV RSI,qword ptr [RSI]
MOV RCX,qword ptr [R14 + 0x8]
XOR EDX,EDX
CALL 0x0010b770
CMP RAX,-0x1
JZ 0x0011e5df
MOV R12,RAX
LAB_0011e5aa:
MOV RDX,qword ptr [R14 + 0x8]
MOV RCX,qword ptr [RBX]
MOV R8,qword ptr [RBX + 0x8]
MOV RDI,R15
MOV RSI,R12
CALL 0x0010b470
ADD R12,qword ptr [RBX + 0x8]
MOV RSI,qword ptr [R14]
MOV RCX,qword ptr [R14 + 0x8]
MOV RDI,R15
MOV RDX,R12
CALL 0x0010b770
MOV R12,RAX
CMP RAX,-0x1
JNZ 0x0011e5aa
LAB_0011e5df:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* rapidcsv::Document::ReplaceString(std::__cxx11::string&, std::__cxx11::string const&,
std::__cxx11::string const&) */
void rapidcsv::Document::ReplaceString(string *param_1,string *param_2,string *param_3)
{
ulong uVar1;
for (uVar1 = std::__cxx11::string::find((char *)param_1,*(ulong *)param_2,0);
uVar1 != 0xffffffffffffffff;
uVar1 = std::__cxx11::string::find
((char *)param_1,*(ulong *)param_2,uVar1 + *(long *)(param_3 + 8))) {
std::__cxx11::string::replace((ulong)param_1,uVar1,*(char **)(param_2 + 8),*(ulong *)param_3);
}
return;
}
|
|
16,463
|
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 0xd1823
movl $0x2000, %ecx # imm = 0x2000
andl 0xc(%rdi), %ecx
je 0xd1823
retq
testq %rdx, %rdx
jle 0xd1843
pushq %rbp
movq %rsp, %rbp
addq %rsi, %rdx
cmpb $0x0, (%rsi)
js 0xd1841
incq %rsi
cmpq %rdx, %rsi
jb 0xd182f
movl $0x1, %eax
popq %rbp
retq
movl $0x1, %eax
retq
|
my_string_repertoire_8bit:
mov eax, 3
test rdx, rdx
jz short loc_D1823
mov ecx, 2000h
and ecx, [rdi+0Ch]
jz short loc_D1823
retn
loc_D1823:
test rdx, rdx
jle short loc_D1843
push rbp
mov rbp, rsp
add rdx, rsi
loc_D182F:
cmp byte ptr [rsi], 0
js short loc_D1841
inc rsi
cmp rsi, rdx
jb short loc_D182F
mov eax, 1
loc_D1841:
pop rbp
retn
loc_D1843:
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 0x001d1823
MOV ECX,0x2000
AND ECX,dword ptr [RDI + 0xc]
JZ 0x001d1823
RET
LAB_001d1823:
TEST RDX,RDX
JLE 0x001d1843
PUSH RBP
MOV RBP,RSP
ADD RDX,RSI
LAB_001d182f:
CMP byte ptr [RSI],0x0
JS 0x001d1841
INC RSI
CMP RSI,RDX
JC 0x001d182f
MOV EAX,0x1
LAB_001d1841:
POP RBP
RET
LAB_001d1843:
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;
}
|
|
16,464
|
std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> string_split<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char)
|
llama.cpp/common/common.h
|
std::vector<std::string> string_split<std::string>(const std::string & input, char separator)
{
std::vector<std::string> parts;
size_t begin_pos = 0;
size_t separator_pos = input.find(separator);
while (separator_pos != std::string::npos) {
std::string part = input.substr(begin_pos, separator_pos - begin_pos);
parts.emplace_back(part);
begin_pos = separator_pos + 1;
separator_pos = input.find(separator, begin_pos);
}
parts.emplace_back(input.substr(begin_pos, separator_pos - begin_pos));
return parts;
}
|
O3
|
c
|
std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> string_split<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
xorl %r15d, %r15d
movq %rsi, %rdi
movl %edx, %esi
xorl %edx, %edx
callq 0x21230
cmpq $-0x1, %rax
je 0x5c79d
movq %rax, %r12
xorl %r15d, %r15d
leaq 0x8(%rsp), %r13
movsbl %bpl, %ebp
movq %r12, %rcx
subq %r15, %rcx
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x210d0
movq %rbx, %rdi
movq %r13, %rsi
callq 0x72c3c
movq %r12, %r15
incq %r15
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x21230
movq %rax, %r12
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x5c797
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x20180
cmpq $-0x1, %r12
jne 0x5c746
movq %r15, %rcx
notq %rcx
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x210d0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x72c8a
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5c7db
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x20180
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x5c80c
jmp 0x5c7fa
movq %rax, %r14
jmp 0x5c81e
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x5c81e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x20180
movq %rbx, %rdi
callq 0x282d8
movq %r14, %rdi
callq 0x20af0
|
_ZL12string_splitINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIT_SaIS7_EERKS5_c:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebp, edx
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
xor r15d, r15d
mov rdi, rsi
mov esi, edx
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_5C79D
mov r12, rax
xor r15d, r15d
lea r13, [rsp+58h+var_50]
movsx ebp, bpl
loc_5C746:
mov rcx, r12
sub rcx, r15
mov rdi, r13
mov rsi, r14
mov rdx, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rdi, rbx
mov rsi, r13
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJRS5_EEES9_DpOT_; std::vector<std::string>::emplace_back<std::string&>(std::string&)
mov r15, r12
inc r15
mov rdi, r14
mov esi, ebp
mov rdx, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
mov r12, rax
mov rdi, [rsp+58h+var_50]; void *
lea rax, [rsp+58h+var_40]
cmp rdi, rax
jz short loc_5C797
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5C797:
cmp r12, 0FFFFFFFFFFFFFFFFh
jnz short loc_5C746
loc_5C79D:
mov rcx, r15
not rcx
lea rdi, [rsp+58h+var_50]
mov rsi, r14
mov rdx, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
lea rsi, [rsp+58h+var_50]
mov rdi, rbx
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
lea rax, [rsp+58h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5C7DB
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5C7DB:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]
jmp short loc_5C80C
jmp short $+2
loc_5C7FA:
mov r14, rax
jmp short loc_5C81E
mov r14, rax
mov rdi, [rsp+arg_0]; void *
lea rax, [rsp+arg_10]
loc_5C80C:
cmp rdi, rax
jz short loc_5C81E
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5C81E:
mov rdi, rbx
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, r14
call __Unwind_Resume
|
void string_split<std::string>(long long a1, long long a2, unsigned int a3)
{
char v3; // bp
long long v4; // r15
long long v5; // rax
long long v6; // r12
void *v7[2]; // [rsp+8h] [rbp-50h] BYREF
_QWORD v8[8]; // [rsp+18h] [rbp-40h] BYREF
v3 = a3;
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
v4 = 0LL;
v5 = std::string::find(a2, a3, 0LL);
if ( v5 != -1 )
{
v6 = v5;
v4 = 0LL;
do
{
std::string::substr(v7, a2, v4, v6 - v4);
std::vector<std::string>::emplace_back<std::string&>(a1, v7);
v4 = v6 + 1;
v6 = std::string::find(a2, (unsigned int)v3, v6 + 1);
if ( v7[0] != v8 )
operator delete(v7[0], v8[0] + 1LL);
}
while ( v6 != -1 );
}
std::string::substr(v7, a2, v4, ~v4);
std::vector<std::string>::emplace_back<std::string>(a1, v7);
if ( v7[0] != v8 )
operator delete(v7[0], v8[0] + 1LL);
}
|
string_split<std::__cxx11::string>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
XOR R15D,R15D
MOV RDI,RSI
MOV ESI,EDX
XOR EDX,EDX
CALL 0x00121230
CMP RAX,-0x1
JZ 0x0015c79d
MOV R12,RAX
XOR R15D,R15D
LEA R13,[RSP + 0x8]
MOVSX EBP,BPL
LAB_0015c746:
MOV RCX,R12
SUB RCX,R15
LAB_0015c74c:
MOV RDI,R13
MOV RSI,R14
MOV RDX,R15
CALL 0x001210d0
LAB_0015c75a:
MOV RDI,RBX
MOV RSI,R13
CALL 0x00172c3c
MOV R15,R12
INC R15
MOV RDI,R14
MOV ESI,EBP
MOV RDX,R15
CALL 0x00121230
MOV R12,RAX
MOV RDI,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x0015c797
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00120180
LAB_0015c797:
CMP R12,-0x1
JNZ 0x0015c746
LAB_0015c79d:
MOV RCX,R15
NOT RCX
LAB_0015c7a3:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
MOV RDX,R15
CALL 0x001210d0
LAB_0015c7b3:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00172c8a
LAB_0015c7c0:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0015c7db
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00120180
LAB_0015c7db:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >
string_split<std::__cxx11::string >(std::__cxx11::string const&, char) */
void string_split<std::__cxx11::string>(string *param_1,char param_2)
{
long lVar1;
uint in_EDX;
int7 in_register_00000031;
long *local_50 [2];
long local_40 [2];
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
lVar1 = std::__cxx11::string::find(param_2,(ulong)in_EDX);
if (lVar1 != -1) {
do {
/* try { // try from 0015c74c to 0015c759 has its CatchHandler @ 0015c7fa */
std::__cxx11::string::substr((ulong)local_50,CONCAT71(in_register_00000031,param_2));
/* try { // try from 0015c75a to 0015c764 has its CatchHandler @ 0015c7ff */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string&>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1,
(string *)local_50);
lVar1 = std::__cxx11::string::find(param_2,(ulong)(uint)(int)(char)in_EDX);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
} while (lVar1 != -1);
}
/* try { // try from 0015c7a3 to 0015c7b2 has its CatchHandler @ 0015c7f8 */
std::__cxx11::string::substr((ulong)local_50,CONCAT71(in_register_00000031,param_2));
/* try { // try from 0015c7b3 to 0015c7bf has its CatchHandler @ 0015c7ea */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1,
(string *)local_50);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
return;
}
|
|
16,465
|
my_wc_mb_euc_kr
|
eloqsql/strings/ctype-euc_kr.c
|
static int
my_wc_mb_euc_kr(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
if (s >= e)
return MY_CS_TOOSMALL;
if ((uint) wc < 0x80)
{
s[0]= (uchar) wc;
return 1;
}
if (!(code=func_uni_ksc5601_onechar(wc)))
return MY_CS_ILUNI;
if (s+2>e)
return MY_CS_TOOSMALL2;
s[0]=code>>8;
s[1]=code&0xFF;
return 2;
}
|
O0
|
c
|
my_wc_mb_euc_kr:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x97c8b
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x97d04
movq -0x18(%rbp), %rax
cmpl $0x80, %eax
jae 0x97cab
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x97d04
movq -0x18(%rbp), %rax
movl %eax, %edi
callq 0x98030
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0x97cc7
movl $0x0, -0x4(%rbp)
jmp 0x97d04
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x97cde
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x97d04
movl -0x2c(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl -0x2c(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
my_wc_mb_euc_kr:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_97C8B
mov [rbp+var_4], 0FFFFFF9Bh
jmp short loc_97D04
loc_97C8B:
mov rax, [rbp+var_18]
cmp eax, 80h
jnb short loc_97CAB
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp short loc_97D04
loc_97CAB:
mov rax, [rbp+var_18]
mov edi, eax
call func_uni_ksc5601_onechar
mov [rbp+var_2C], eax
cmp eax, 0
jnz short loc_97CC7
mov [rbp+var_4], 0
jmp short loc_97D04
loc_97CC7:
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_97CDE
mov [rbp+var_4], 0FFFFFF9Ah
jmp short loc_97D04
loc_97CDE:
mov eax, [rbp+var_2C]
sar eax, 8
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov eax, [rbp+var_2C]
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov [rbp+var_4], 2
loc_97D04:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long my_wc_mb_euc_kr(long long a1, unsigned int a2, _BYTE *a3, unsigned long long a4)
{
int v5; // [rsp+4h] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
if ( a2 >= 0x80 )
{
v5 = func_uni_ksc5601_onechar(a2);
if ( v5 )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
*a3 = BYTE1(v5);
a3[1] = v5;
return 2;
}
else
{
return (unsigned int)-102;
}
}
else
{
return 0;
}
}
else
{
*a3 = a2;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
|
my_wc_mb_euc_kr:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x00197c8b
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x00197d04
LAB_00197c8b:
MOV RAX,qword ptr [RBP + -0x18]
CMP EAX,0x80
JNC 0x00197cab
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00197d04
LAB_00197cab:
MOV RAX,qword ptr [RBP + -0x18]
MOV EDI,EAX
CALL 0x00198030
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x00197cc7
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00197d04
LAB_00197cc7:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x00197cde
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x00197d04
LAB_00197cde:
MOV EAX,dword ptr [RBP + -0x2c]
SAR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x2c]
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV dword ptr [RBP + -0x4],0x2
LAB_00197d04:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 my_wc_mb_euc_kr(int8 param_1,uint param_2,int1 *param_3,int1 *param_4)
{
int iVar1;
int4 local_c;
if (param_3 < param_4) {
if (param_2 < 0x80) {
*param_3 = (char)param_2;
local_c = 1;
}
else {
iVar1 = func_uni_ksc5601_onechar(param_2);
if (iVar1 == 0) {
local_c = 0;
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
*param_3 = (char)((uint)iVar1 >> 8);
param_3[1] = (char)iVar1;
local_c = 2;
}
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
|
|
16,466
|
minja::Parser::parseLogicalAnd()
|
monkey531[P]llama/common/minja.hpp
|
std::shared_ptr<Expression> parseLogicalAnd() {
auto left = parseLogicalNot();
if (!left) throw std::runtime_error("Expected left side of 'logical and' expression");
static std::regex and_tok(R"(and\b)");
auto location = get_location();
while (!consumeToken(and_tok).empty()) {
auto right = parseLogicalNot();
if (!right) throw std::runtime_error("Expected right side of 'and' expression");
left = std::make_shared<BinaryOpExpr>(location, std::move(left), std::move(right), BinaryOpExpr::Op::And);
}
return left;
}
|
O3
|
cpp
|
minja::Parser::parseLogicalAnd():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x85908
cmpq $0x0, (%rbx)
je 0x8580f
leaq 0xa793c(%rip), %rax # 0x12cfe0
movb (%rax), %al
testb %al, %al
je 0x85841
movq (%r14), %rax
movq %rax, 0x20(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x28(%rsp)
testq %rax, %rax
je 0x856d9
movq 0xa68bd(%rip), %rcx # 0x12bf88
cmpb $0x0, (%rcx)
je 0x856d5
incl 0x8(%rax)
jmp 0x856d9
lock
incl 0x8(%rax)
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
leaq 0x20(%rsp), %rcx
movq %rax, 0x10(%rcx)
movq %rsp, %r13
leaq 0xa5294(%rip), %r12 # 0x12a988
addq $0x10, %r12
movq %r13, %rdi
movq %r14, %rsi
leaq 0xa78bb(%rip), %rdx # 0x12cfc0
movl $0x1, %ecx
callq 0x840ae
movq (%rsp), %rdi
movq 0x8(%rsp), %r15
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x8572f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a8e0
testq %r15, %r15
je 0x857ba
movq %r13, %rdi
movq %r14, %rsi
callq 0x85908
cmpq $0x0, (%rsp)
je 0x857db
movl $0x58, %edi
callq 0x1a8c0
movq %rax, %rbp
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%rbp)
movq %r12, (%rbp)
movq %rbp, %r15
addq $0x10, %r15
movq %r15, %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %rdx
movq %r13, %rcx
movl $0xe, %r8d
callq 0x95fec
movq %r15, (%rbx)
movq 0x8(%rbx), %rdi
movq %rbp, 0x8(%rbx)
testq %rdi, %rdi
je 0x857a2
callq 0x6de32
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x856f8
callq 0x6de32
jmp 0x856f8
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x857c9
callq 0x6de32
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x1a450
movq %rax, %r15
leaq 0x6a508(%rip), %rsi # 0xefcf7
movq %rax, %rdi
callq 0x1a330
movq 0xa67f2(%rip), %rsi # 0x12bff0
movq 0xa675b(%rip), %rdx # 0x12bf60
movq %r15, %rdi
callq 0x1af10
jmp 0x85841
movl $0x10, %edi
callq 0x1a450
movq %rax, %r15
leaq 0x6a49f(%rip), %rsi # 0xefcc2
movq %rax, %rdi
callq 0x1a330
movq 0xa67be(%rip), %rsi # 0x12bff0
movq 0xa6727(%rip), %rdx # 0x12bf60
movq %r15, %rdi
callq 0x1af10
leaq 0xa7798(%rip), %rdi # 0x12cfe0
callq 0x1aff0
testl %eax, %eax
je 0x856ae
leaq 0xa7764(%rip), %rdi # 0x12cfc0
leaq 0x6a48e(%rip), %rsi # 0xefcf1
movl $0x10, %edx
callq 0x62dc0
leaq -0x227b0(%rip), %rdi # 0x630c4
leaq 0xa7745(%rip), %rsi # 0x12cfc0
leaq 0xa7046(%rip), %rdx # 0x12c8c8
callq 0x1a7c0
leaq 0xa7752(%rip), %rdi # 0x12cfe0
callq 0x1a5c0
jmp 0x856ae
movq %rax, %r14
leaq 0xa773e(%rip), %rdi # 0x12cfe0
callq 0x1a5b0
jmp 0x858f2
movq %rax, %r14
jmp 0x858f2
movq %rax, %r14
movq %r15, %rdi
callq 0x1a690
jmp 0x858f2
jmp 0x858cc
movq %rax, %r14
movq %r15, %rdi
callq 0x1a690
jmp 0x858cf
jmp 0x858e0
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x858e3
callq 0x6de32
jmp 0x858e3
movq %rax, %r14
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x858f2
callq 0x6de32
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x85900
callq 0x6de32
movq %r14, %rdi
callq 0x1af90
|
_ZN5minja6Parser15parseLogicalAndEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r14, rsi
mov rbx, rdi
call _ZN5minja6Parser15parseLogicalNotEv; minja::Parser::parseLogicalNot(void)
cmp qword ptr [rbx], 0
jz loc_8580F
lea rax, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; `guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok
mov al, [rax]
test al, al
jz loc_85841
loc_856AE:
mov rax, [r14]
mov [rsp+68h+var_48], rax
mov rax, [r14+8]
mov [rsp+68h+var_40], rax
test rax, rax
jz short loc_856D9
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_856D5
inc dword ptr [rax+8]
jmp short loc_856D9
loc_856D5:
lock inc dword ptr [rax+8]
loc_856D9:
mov rax, [r14+20h]
sub rax, [r14+10h]
lea rcx, [rsp+68h+var_48]
mov [rcx+10h], rax
mov r13, rsp
lea r12, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja12BinaryOpExprESaIS1_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<minja::BinaryOpExpr>,(__gnu_cxx::_Lock_policy)2>
add r12, 10h
loc_856F8:
mov rdi, r13
mov rsi, r14
lea rdx, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; minja::Parser::parseLogicalAnd(void)::and_tok
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
mov rdi, [rsp+68h+var_68]; void *
mov r15, [rsp+68h+var_60]
lea rax, [rsp+68h+var_58]
cmp rdi, rax
jz short loc_8572F
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8572F:
test r15, r15
jz loc_857BA
mov rdi, r13; this
mov rsi, r14
call _ZN5minja6Parser15parseLogicalNotEv; minja::Parser::parseLogicalNot(void)
cmp [rsp+68h+var_68], 0
jz loc_857DB
mov edi, 58h ; 'X'; unsigned __int64
call __Znwm; operator new(ulong)
mov rbp, rax
mov rax, 100000001h
mov [rbp+8], rax
mov [rbp+0], r12
mov r15, rbp
add r15, 10h
mov rdi, r15
lea rsi, [rsp+68h+var_48]
mov rdx, rbx
mov rcx, r13
mov r8d, 0Eh
call _ZN5minja12BinaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_NS0_2OpE; minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&,std::shared_ptr<minja::Expression> &&,std::shared_ptr<minja::Expression> &,minja::BinaryOpExpr::Op)
mov [rbx], r15
mov rdi, [rbx+8]
mov [rbx+8], rbp
test rdi, rdi
jz short loc_857A2
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_857A2:
mov rdi, [rsp+68h+var_60]
test rdi, rdi
jz loc_856F8
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp loc_856F8
loc_857BA:
mov rdi, [rsp+68h+var_40]
test rdi, rdi
jz short loc_857C9
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_857C9:
mov rax, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_857DB:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedRightS_0; "Expected right side of 'and' expression"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
jmp short loc_85841
loc_8580F:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedLeftSi_0; "Expected left side of 'logical and' exp"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
loc_85841:
lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_856AE
lea rdi, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; minja::Parser::parseLogicalAnd(void)::and_tok
lea rsi, aAndB; "and\\b"
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_856AE
mov r14, rax
lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_858F2
mov r14, rax
jmp short loc_858F2
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_858F2
jmp short loc_858CC
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_858CF
jmp short loc_858E0
loc_858CC:
mov r14, rax
loc_858CF:
mov rdi, [rsp+arg_0]
test rdi, rdi
jz short loc_858E3
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_858E3
loc_858E0:
mov r14, rax
loc_858E3:
mov rdi, [rsp+arg_20]
test rdi, rdi
jz short loc_858F2
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_858F2:
mov rdi, [rbx+8]
test rdi, rdi
jz short loc_85900
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_85900:
mov rdi, r14
call __Unwind_Resume
|
minja::Parser * minja::Parser::parseLogicalAnd(volatile signed __int32 **this, long long *a2)
{
volatile signed __int32 *v3; // rax
volatile signed __int32 *v4; // r15
volatile signed __int32 *v5; // rbp
volatile signed __int32 *v6; // rdi
std::runtime_error *v8; // r15
std::runtime_error *exception; // r15
void *v10; // [rsp+0h] [rbp-68h] BYREF
volatile signed __int32 *v11; // [rsp+8h] [rbp-60h]
long long v12; // [rsp+10h] [rbp-58h] BYREF
long long v13; // [rsp+20h] [rbp-48h] BYREF
volatile signed __int32 *v14; // [rsp+28h] [rbp-40h]
long long v15; // [rsp+30h] [rbp-38h]
minja::Parser::parseLogicalNot((minja::Parser *)this);
if ( !*this )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected left side of 'logical and' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( !(_BYTE)`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11],
(long long)"and\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11]);
}
v13 = *a2;
v3 = (volatile signed __int32 *)a2[1];
v14 = v3;
if ( v3 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v3 + 2);
else
_InterlockedIncrement(v3 + 2);
}
v15 = a2[4] - a2[2];
while ( 1 )
{
minja::Parser::consumeToken(
(long long)&v10,
(long long)a2,
(long long)&minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11],
1u);
v4 = v11;
if ( v10 != &v12 )
operator delete(v10, v12 + 1);
if ( !v4 )
break;
minja::Parser::parseLogicalNot((minja::Parser *)&v10);
if ( !v10 )
{
v8 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v8, "Expected right side of 'and' expression");
__cxa_throw(
v8,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v5 = (volatile signed __int32 *)operator new(0x58uLL);
*((_QWORD *)v5 + 1) = 0x100000001LL;
*(_QWORD *)v5 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<minja::BinaryOpExpr>,(__gnu_cxx::_Lock_policy)2>
+ 2;
minja::BinaryOpExpr::BinaryOpExpr(v5 + 4, &v13, this, &v10, 14LL);
*this = v5 + 4;
v6 = this[1];
this[1] = v5;
if ( v6 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6);
if ( v11 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11);
}
if ( v14 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14);
return (minja::Parser *)this;
}
|
parseLogicalAnd:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14,RSI
MOV RBX,RDI
CALL 0x00185908
CMP qword ptr [RBX],0x0
JZ 0x0018580f
LEA RAX,[0x22cfe0]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x00185841
LAB_001856ae:
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x28],RAX
TEST RAX,RAX
JZ 0x001856d9
MOV RCX,qword ptr [0x0022bf88]
CMP byte ptr [RCX],0x0
JZ 0x001856d5
INC dword ptr [RAX + 0x8]
JMP 0x001856d9
LAB_001856d5:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001856d9:
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
LEA RCX,[RSP + 0x20]
MOV qword ptr [RCX + 0x10],RAX
MOV R13,RSP
LEA R12,[0x22a988]
ADD R12,0x10
LAB_001856f8:
MOV RDI,R13
MOV RSI,R14
LEA RDX,[0x22cfc0]
MOV ECX,0x1
CALL 0x001840ae
MOV RDI,qword ptr [RSP]
MOV R15,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x0018572f
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0011a8e0
LAB_0018572f:
TEST R15,R15
JZ 0x001857ba
LAB_00185738:
MOV RDI,R13
MOV RSI,R14
CALL 0x00185908
CMP qword ptr [RSP],0x0
JZ 0x001857db
LAB_0018574e:
MOV EDI,0x58
CALL 0x0011a8c0
LAB_00185758:
MOV RBP,RAX
MOV RAX,0x100000001
MOV qword ptr [RBP + 0x8],RAX
MOV qword ptr [RBP],R12
MOV R15,RBP
ADD R15,0x10
MOV RDI,R15
LEA RSI,[RSP + 0x20]
MOV RDX,RBX
MOV RCX,R13
MOV R8D,0xe
CALL 0x00195fec
MOV qword ptr [RBX],R15
MOV RDI,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x8],RBP
TEST RDI,RDI
JZ 0x001857a2
CALL 0x0016de32
LAB_001857a2:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x001856f8
CALL 0x0016de32
JMP 0x001856f8
LAB_001857ba:
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x001857c9
CALL 0x0016de32
LAB_001857c9:
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001857db:
MOV EDI,0x10
CALL 0x0011a450
MOV R15,RAX
LAB_001857e8:
LEA RSI,[0x1efcf7]
MOV RDI,RAX
CALL 0x0011a330
LAB_001857f7:
MOV RSI,qword ptr [0x0022bff0]
MOV RDX,qword ptr [0x0022bf60]
MOV RDI,R15
CALL 0x0011af10
LAB_0018580f:
MOV EDI,0x10
CALL 0x0011a450
MOV R15,RAX
LAB_0018581c:
LEA RSI,[0x1efcc2]
MOV RDI,RAX
CALL 0x0011a330
LAB_0018582b:
MOV RSI,qword ptr [0x0022bff0]
MOV RDX,qword ptr [0x0022bf60]
MOV RDI,R15
CALL 0x0011af10
LAB_00185841:
LEA RDI,[0x22cfe0]
CALL 0x0011aff0
TEST EAX,EAX
JZ 0x001856ae
LAB_00185855:
LEA RDI,[0x22cfc0]
LEA RSI,[0x1efcf1]
MOV EDX,0x10
CALL 0x00162dc0
LAB_0018586d:
LEA RDI,[0x1630c4]
LEA RSI,[0x22cfc0]
LEA RDX,[0x22c8c8]
CALL 0x0011a7c0
LEA RDI,[0x22cfe0]
CALL 0x0011a5c0
JMP 0x001856ae
|
/* minja::Parser::parseLogicalAnd() */
void minja::Parser::parseLogicalAnd(void)
{
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1;
int iVar2;
int8 *puVar3;
runtime_error *prVar4;
int8 *in_RSI;
long *in_RDI;
long *local_68;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60;
long local_58 [2];
int8 local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40;
long local_38;
parseLogicalNot();
if (*in_RDI == 0) {
prVar4 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0018581c to 0018582a has its CatchHandler @ 001858ae */
std::runtime_error::runtime_error(prVar4,"Expected left side of \'logical and\' expression");
/* try { // try from 0018582b to 00185840 has its CatchHandler @ 001858a9 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar4,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60);
}
if (parseLogicalAnd()::and_tok_abi_cxx11_ == '\0') {
iVar2 = __cxa_guard_acquire(&parseLogicalAnd()::and_tok_abi_cxx11_);
if (iVar2 != 0) {
/* try { // try from 00185855 to 0018586c has its CatchHandler @ 00185898 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseLogicalAnd()::and_tok_abi_cxx11_,"and\\b",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseLogicalAnd()::and_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseLogicalAnd()::and_tok_abi_cxx11_);
}
}
local_48 = *in_RSI;
local_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1];
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_0022bf88 == '\0') {
LOCK();
*(int *)(local_40 + 8) = *(int *)(local_40 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_40 + 8) = *(int *)(local_40 + 8) + 1;
}
}
local_38 = in_RSI[4] - in_RSI[2];
while( true ) {
/* try { // try from 001856f8 to 0018570e has its CatchHandler @ 001858e0 */
consumeToken(&local_68);
p_Var1 = local_60;
if (local_68 != local_58) {
operator_delete(local_68,local_58[0] + 1);
}
if (p_Var1 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) break;
/* try { // try from 00185738 to 00185742 has its CatchHandler @ 001858ca */
parseLogicalNot();
if (local_68 == (long *)0x0) {
prVar4 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001857e8 to 001857f6 has its CatchHandler @ 001858bd */
std::runtime_error::runtime_error(prVar4,"Expected right side of \'and\' expression");
/* try { // try from 001857f7 to 0018580c has its CatchHandler @ 001858bb */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar4,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60);
}
/* try { // try from 0018574e to 00185757 has its CatchHandler @ 001858cc */
puVar3 = (int8 *)operator_new(0x58);
puVar3[1] = 0x100000001;
*puVar3 = &PTR___Sp_counted_ptr_inplace_0022a998;
BinaryOpExpr::BinaryOpExpr((BinaryOpExpr *)(puVar3 + 2),&local_48);
*in_RDI = (long)(puVar3 + 2);
p_Var1 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RDI[1];
in_RDI[1] = (long)puVar3;
if (p_Var1 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Var1);
}
if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60);
}
}
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40);
}
return;
}
|
|
16,467
|
common_sampler_type_to_chr(common_sampler_type)
|
monkey531[P]llama/common/sampling.cpp
|
char common_sampler_type_to_chr(enum common_sampler_type cnstr) {
switch (cnstr) {
case COMMON_SAMPLER_TYPE_DRY: return 'd';
case COMMON_SAMPLER_TYPE_TOP_K: return 'k';
case COMMON_SAMPLER_TYPE_TYPICAL_P: return 'y';
case COMMON_SAMPLER_TYPE_TOP_P: return 'p';
case COMMON_SAMPLER_TYPE_MIN_P: return 'm';
case COMMON_SAMPLER_TYPE_TEMPERATURE: return 't';
case COMMON_SAMPLER_TYPE_XTC: return 'x';
case COMMON_SAMPLER_TYPE_INFILL: return 'i';
case COMMON_SAMPLER_TYPE_PENALTIES: return 'e';
default : return '?';
}
}
|
O0
|
cpp
|
common_sampler_type_to_chr(common_sampler_type):
movl %edi, -0x8(%rsp)
movl -0x8(%rsp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x10(%rsp)
subl $0x9, %eax
ja 0x1c3c6a
movq -0x10(%rsp), %rax
leaq 0x54e66(%rip), %rcx # 0x218a88
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x64, -0x1(%rsp)
jmp 0x1c3c6f
movb $0x6b, -0x1(%rsp)
jmp 0x1c3c6f
movb $0x79, -0x1(%rsp)
jmp 0x1c3c6f
movb $0x70, -0x1(%rsp)
jmp 0x1c3c6f
movb $0x6d, -0x1(%rsp)
jmp 0x1c3c6f
movb $0x74, -0x1(%rsp)
jmp 0x1c3c6f
movb $0x78, -0x1(%rsp)
jmp 0x1c3c6f
movb $0x69, -0x1(%rsp)
jmp 0x1c3c6f
movb $0x65, -0x1(%rsp)
jmp 0x1c3c6f
movb $0x3f, -0x1(%rsp)
movb -0x1(%rsp), %al
retq
nopw %cs:(%rax,%rax)
|
_Z26common_sampler_type_to_chr19common_sampler_type:
mov [rsp+var_8], edi
mov eax, [rsp+var_8]
dec eax; switch 10 cases
mov ecx, eax
mov [rsp+var_10], rcx
sub eax, 9
ja short def_1C3C29; jumptable 00000000001C3C29 default case, case 5
mov rax, [rsp+var_10]
lea rcx, jpt_1C3C29
movsxd rax, ds:(jpt_1C3C29 - 218A88h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_1C3C2B:
mov [rsp+var_1], 64h ; 'd'; jumptable 00000000001C3C29 case 1
jmp short loc_1C3C6F
loc_1C3C32:
mov [rsp+var_1], 6Bh ; 'k'; jumptable 00000000001C3C29 case 2
jmp short loc_1C3C6F
loc_1C3C39:
mov [rsp+var_1], 79h ; 'y'; jumptable 00000000001C3C29 case 6
jmp short loc_1C3C6F
loc_1C3C40:
mov [rsp+var_1], 70h ; 'p'; jumptable 00000000001C3C29 case 3
jmp short loc_1C3C6F
loc_1C3C47:
mov [rsp+var_1], 6Dh ; 'm'; jumptable 00000000001C3C29 case 4
jmp short loc_1C3C6F
loc_1C3C4E:
mov [rsp+var_1], 74h ; 't'; jumptable 00000000001C3C29 case 7
jmp short loc_1C3C6F
loc_1C3C55:
mov [rsp+var_1], 78h ; 'x'; jumptable 00000000001C3C29 case 8
jmp short loc_1C3C6F
loc_1C3C5C:
mov [rsp+var_1], 69h ; 'i'; jumptable 00000000001C3C29 case 9
jmp short loc_1C3C6F
loc_1C3C63:
mov [rsp+var_1], 65h ; 'e'; jumptable 00000000001C3C29 case 10
jmp short loc_1C3C6F
def_1C3C29:
mov [rsp+var_1], 3Fh ; '?'; jumptable 00000000001C3C29 default case, case 5
loc_1C3C6F:
mov al, [rsp+var_1]
retn
|
char common_sampler_type_to_chr(int a1)
{
char v2; // [rsp+Fh] [rbp-1h]
switch ( a1 )
{
case 1:
v2 = 100;
break;
case 2:
v2 = 107;
break;
case 3:
v2 = 112;
break;
case 4:
v2 = 109;
break;
case 6:
v2 = 121;
break;
case 7:
v2 = 116;
break;
case 8:
v2 = 120;
break;
case 9:
v2 = 105;
break;
case 10:
v2 = 101;
break;
default:
v2 = 63;
break;
}
return v2;
}
|
allocator:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x001c3c30
ADD RSP,0x18
RET
|
/* 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> > >::allocator(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> > > const&) */
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>>>
::allocator(allocator *param_1)
{
__gnu_cxx::
new_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>>>
::new_allocator((new_allocator *)param_1);
return;
}
|
|
16,468
|
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>>>::max_size() const
|
7CodeWizard[P]stablediffusion/thirdparty/json.hpp
|
size_type max_size() const noexcept
{
switch (m_type)
{
case value_t::array:
{
// delegate call to array_t::max_size()
return m_value.array->max_size();
}
case value_t::object:
{
// delegate call to object_t::max_size()
return m_value.object->max_size();
}
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:
{
// all other types have max_size() == size()
return size();
}
}
}
|
O0
|
cpp
|
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>>>::max_size() const:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movzbl (%rax), %eax
movq %rax, 0x10(%rsp)
subq $0x9, %rax
ja 0xdc9b2
movq 0x10(%rsp), %rax
leaq 0xa6427(%rip), %rcx # 0x182da4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xc9da0
movq %rax, 0x20(%rsp)
jmp 0xdc9c1
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xdd5f0
movq %rax, 0x20(%rsp)
jmp 0xdc9c1
jmp 0xdc9b2
movq 0x8(%rsp), %rdi
callq 0xc3d40
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
|
_ZNK8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE8max_sizeEv:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov rax, [rsp+28h+var_10]
mov [rsp+28h+var_20], rax
movzx eax, byte ptr [rax]
mov [rsp+28h+var_18], rax
sub rax, 9; switch 10 cases
ja short def_DC984; jumptable 00000000000DC984 default case
mov rax, [rsp+28h+var_18]
lea rcx, jpt_DC984
movsxd rax, ds:(jpt_DC984 - 182DA4h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_DC986:
mov rax, [rsp+28h+var_20]; jumptable 00000000000DC984 case 2
mov rdi, [rax+8]
call _ZNKSt6vectorIN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapS_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEEESaISD_EE8max_sizeEv; std::vector<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>>>::max_size(void)
mov [rsp+28h+var_8], rax
jmp short loc_DC9C1
loc_DC99B:
mov rax, [rsp+28h+var_20]; jumptable 00000000000DC984 case 1
mov rdi, [rax+8]
call _ZNKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_210basic_jsonIS_St6vectorS5_blmdSaNS7_14adl_serializerES9_IhSaIhEEEESt4lessIvESaISt4pairIKS5_SD_EEE8max_sizeEv; std::map<std::string,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>>>::max_size(void)
mov [rsp+28h+var_8], rax
jmp short loc_DC9C1
loc_DC9B0:
jmp short $+2; jumptable 00000000000DC984 cases 0,3-9
def_DC984:
mov rdi, [rsp+28h+var_20]; jumptable 00000000000DC984 default case
call _ZNK8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE4sizeEv; 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>>::size(void)
mov [rsp+28h+var_8], rax
loc_DC9C1:
mov rax, [rsp+28h+var_8]
add rsp, 28h
retn
|
long long 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>>::max_size(
long long a1)
{
long long v2; // [rsp+20h] [rbp-8h]
switch ( *(_BYTE *)a1 )
{
case 1:
v2 = std::map<std::string,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>>>::max_size(*(_QWORD *)(a1 + 8));
break;
case 2:
v2 = std::vector<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>>>::max_size(*(_QWORD *)(a1 + 8));
break;
default:
v2 = 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>>::size(a1);
break;
}
return v2;
}
|
max_size:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x8],RAX
MOVZX EAX,byte ptr [RAX]
MOV qword ptr [RSP + 0x10],RAX
SUB RAX,0x9
JA 0x001dc9b2
MOV RAX,qword ptr [RSP + 0x10]
LEA RCX,[0x282da4]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_2:
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x001c9da0
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001dc9c1
caseD_1:
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x001dd5f0
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001dc9c1
caseD_0:
JMP 0x001dc9b2
default:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001c3d40
MOV qword ptr [RSP + 0x20],RAX
LAB_001dc9c1:
MOV RAX,qword ptr [RSP + 0x20]
ADD RSP,0x28
RET
|
/* 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> > >::max_size() const */
int8 __thiscall
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>>>
::max_size(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>>>
*this)
{
int8 local_8;
switch(*this) {
case (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>>>
)0x0:
case (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>>>
)0x3:
case (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>>>
)0x4:
case (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>>>
)0x5:
case (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>>>
)0x6:
case (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>>>
)0x7:
case (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>>>
)0x8:
case (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>>>
)0x9:
default:
local_8 = size(this);
break;
case (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>>>
)0x1:
local_8 = std::
map<std::__cxx11::string,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>>>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,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>>>>>>
::max_size(*(map<std::__cxx11::string,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>>>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,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>>>>>>
**)(this + 8));
break;
case (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>>>
)0x2:
local_8 = std::
vector<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>>>,std::allocator<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>>>>>
::max_size(*(vector<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>>>,std::allocator<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>>>>>
**)(this + 8));
}
return local_8;
}
|
|
16,469
|
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>>>::max_size() const
|
7CodeWizard[P]stablediffusion/thirdparty/json.hpp
|
size_type max_size() const noexcept
{
switch (m_type)
{
case value_t::array:
{
// delegate call to array_t::max_size()
return m_value.array->max_size();
}
case value_t::object:
{
// delegate call to object_t::max_size()
return m_value.object->max_size();
}
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:
{
// all other types have max_size() == size()
return size();
}
}
}
|
O2
|
cpp
|
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>>>::max_size() const:
movzbl (%rdi), %eax
cmpl $0x2, %eax
je 0x51402
cmpl $0x1, %eax
jne 0x4a9dc
movabsq $0x199999999999999, %rax # imm = 0x199999999999999
retq
movabsq $0x7ffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFF
retq
nop
|
_ZNK8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE8max_sizeEv:
movzx eax, byte ptr [rdi]
cmp eax, 2
jz short loc_51402
cmp eax, 1
jnz _ZNK8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE4sizeEv; 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>>::size(void)
mov rax, 199999999999999h
retn
loc_51402:
mov rax, 7FFFFFFFFFFFFFFh
retn
|
long long 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>>::max_size(
unsigned __int8 *a1)
{
int v1; // eax
v1 = *a1;
if ( v1 == 2 )
return 0x7FFFFFFFFFFFFFFLL;
if ( v1 == 1 )
return 0x199999999999999LL;
return 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>>::size(a1);
}
|
max_size:
MOVZX EAX,byte ptr [RDI]
CMP EAX,0x2
JZ 0x00151402
CMP EAX,0x1
JNZ 0x0014a9dc
MOV RAX,0x199999999999999
RET
LAB_00151402:
MOV RAX,0x7ffffffffffffff
RET
|
/* 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> > >::max_size() const */
ulong __thiscall
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>>>
::max_size(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>>>
*this)
{
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>>>
bVar1;
ulong uVar2;
if (*this == (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>>>
)0x2) {
return 0x7ffffffffffffff;
}
if (*this == (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>>>
)0x1) {
return 0x199999999999999;
}
bVar1 = *this;
uVar2 = (ulong)(byte)bVar1;
if (bVar1 != (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>>>
)0x0) {
if (bVar1 == (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>>>
)0x1) {
return *(ulong *)(*(long *)(this + 8) + 0x28);
}
if (bVar1 == (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>>>
)0x2) {
return (*(long **)(this + 8))[1] - **(long **)(this + 8) >> 4;
}
uVar2 = 1;
}
return uVar2;
}
|
|
16,470
|
create_control_file
|
eloqsql/storage/maria/ma_control_file.c
|
static CONTROL_FILE_ERROR create_control_file(const char *name,
int open_flags)
{
uint32 sum;
uchar buffer[CF_CREATE_TIME_TOTAL_SIZE];
ulong rnd1,rnd2;
DBUG_ENTER("maria_create_control_file");
if ((control_file_fd= mysql_file_create(key_file_control, name, 0,
open_flags, MYF(MY_SYNC_DIR | MY_WME))) < 0)
DBUG_RETURN(CONTROL_FILE_UNKNOWN_ERROR);
/* Reset variables, as we are creating the file */
cf_create_time_size= CF_CREATE_TIME_TOTAL_SIZE;
cf_changeable_size= CF_CHANGEABLE_TOTAL_SIZE;
/* Create unique uuid for the control file */
my_random_bytes((uchar *)&rnd1, sizeof (rnd1));
my_random_bytes((uchar *)&rnd2, sizeof (rnd2));
my_uuid_init(rnd1, rnd2);
my_uuid(maria_uuid);
/* Prepare and write the file header */
memcpy(buffer, CF_MAGIC_STRING, CF_MAGIC_STRING_SIZE);
buffer[CF_VERSION_OFFSET]= CONTROL_FILE_VERSION;
memcpy(buffer + CF_UUID_OFFSET, maria_uuid, CF_UUID_SIZE);
int2store(buffer + CF_CREATE_TIME_SIZE_OFFSET, cf_create_time_size);
int2store(buffer + CF_CHANGEABLE_SIZE_OFFSET, cf_changeable_size);
/* Write create time variables */
int2store(buffer + CF_BLOCKSIZE_OFFSET, maria_block_size);
/* Store checksum for create time parts */
sum= (uint32) my_checksum(0, buffer, cf_create_time_size -
CF_CHECKSUM_SIZE);
int4store(buffer + cf_create_time_size - CF_CHECKSUM_SIZE, sum);
if (my_pwrite(control_file_fd, buffer, cf_create_time_size,
0, MYF(MY_FNABP | MY_WME)))
DBUG_RETURN(CONTROL_FILE_UNKNOWN_ERROR);
/*
To be safer we should make sure that there are no logs or data/index
files around (indeed it could be that the control file alone was deleted
or not restored, and we should not go on with life at this point).
Things should still be relatively safe as if someone tries to use
an old table with a new control file the different uuid:s between
the files will cause ma_open() to generate an HA_ERR_OLD_FILE
error. When used from mysqld this will cause the table to be open
in repair mode which will remove all dependencies between the
table and the old control file.
We could have a tool which can rebuild the control file, by reading the
directory of logs, finding the newest log, reading it to find last
checkpoint... Slow but can save your db. For this to be possible, we
must always write to the control file right after writing the checkpoint
log record, and do nothing in between (i.e. the checkpoint must be
usable as soon as it has been written to the log).
*/
/* init the file with these "undefined" values */
DBUG_RETURN(ma_control_file_write_and_force(LSN_IMPOSSIBLE,
FILENO_IMPOSSIBLE, 0, 0));
}
|
O0
|
c
|
create_control_file:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x40(%rbp)
movl %esi, -0x44(%rbp)
leaq 0x429bba(%rip), %rax # 0x477d20
movl (%rax), %edi
movq -0x40(%rbp), %rcx
movl -0x44(%rbp), %r9d
leaq 0x103764(%rip), %rsi # 0x1518db
movl $0x9a, %edx
xorl %r8d, %r8d
movq $0x8010, (%rsp) # imm = 0x8010
callq 0x4f150
movl %eax, 0x26f22e(%rip) # 0x2bd3c0
cmpl $0x0, %eax
jge 0x4e1a5
jmp 0x4e199
movl $0xb, -0x34(%rbp)
jmp 0x4e2f8
movl $0x1e, 0x429fd5(%rip) # 0x478184
movl $0x16, 0x429fcf(%rip) # 0x478188
leaq -0x50(%rbp), %rdi
movl $0x8, %esi
callq 0x14fc50
leaq -0x58(%rbp), %rdi
movl $0x8, %esi
callq 0x14fc50
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0xfee00
leaq 0x429917(%rip), %rdi # 0x477b00
callq 0xfefb0
movw 0x1037ac(%rip), %ax # 0x1519a1
movw %ax, -0x30(%rbp)
movb 0x1037a4(%rip), %al # 0x1519a3
movb %al, -0x2e(%rbp)
movb $0x1, -0x2d(%rbp)
leaq 0x4298f3(%rip), %rax # 0x477b00
movq (%rax), %rcx
movq %rcx, -0x2c(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x24(%rbp)
leaq -0x30(%rbp), %rax
addq $0x14, %rax
movq %rax, -0x60(%rbp)
movl 0x429f56(%rip), %eax # 0x478184
movw %ax, %cx
movq -0x60(%rbp), %rax
movw %cx, (%rax)
jmp 0x4e23a
leaq -0x30(%rbp), %rax
addq $0x16, %rax
movq %rax, -0x68(%rbp)
movl 0x429f3c(%rip), %eax # 0x478188
movw %ax, %cx
movq -0x68(%rbp), %rax
movw %cx, (%rax)
jmp 0x4e258
leaq -0x30(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x70(%rbp)
leaq 0x26ef95(%rip), %rax # 0x2bd200
movq (%rax), %rax
movw %ax, %cx
movq -0x70(%rbp), %rax
movw %cx, (%rax)
leaq -0x30(%rbp), %rsi
movl 0x429f02(%rip), %eax # 0x478184
subl $0x4, %eax
movl %eax, %eax
movl %eax, %edx
xorl %edi, %edi
callq 0x1021d0
movl %eax, -0x48(%rbp)
leaq -0x30(%rbp), %rax
movl 0x429ee7(%rip), %ecx # 0x478184
addq %rcx, %rax
addq $-0x4, %rax
movq %rax, -0x78(%rbp)
movl -0x48(%rbp), %ecx
movq -0x78(%rbp), %rax
movl %ecx, (%rax)
movl 0x26f109(%rip), %edi # 0x2bd3c0
leaq -0x30(%rbp), %rsi
movl 0x429ec3(%rip), %eax # 0x478184
movl %eax, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x12, %r8d
callq 0xf4860
cmpq $0x0, %rax
je 0x4e2e3
jmp 0x4e2da
movl $0xb, -0x34(%rbp)
jmp 0x4e2f8
jmp 0x4e2e5
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
movq %rdx, %rdi
movl %ecx, %esi
callq 0x4e810
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x7c(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x4e31c
movl -0x7c(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
callq 0x2a270
nopw %cs:(%rax,%rax)
|
create_control_file:
push rbp
mov rbp, rsp
sub rsp, 90h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_40], rdi
mov [rbp+var_44], esi
lea rax, key_file_control
mov edi, [rax]
mov rcx, [rbp+var_40]
mov r9d, [rbp+var_44]
lea rsi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 9Ah
xor r8d, r8d
mov [rsp+90h+var_90], 8010h
call inline_mysql_file_create
mov cs:control_file_fd, eax
cmp eax, 0
jge short loc_4E1A5
jmp short $+2
loc_4E199:
mov [rbp+var_34], 0Bh
jmp loc_4E2F8
loc_4E1A5:
mov cs:cf_create_time_size, 1Eh
mov cs:cf_changeable_size, 16h
lea rdi, [rbp+var_50]
mov esi, 8
call my_random_bytes
lea rdi, [rbp+var_58]
mov esi, 8
call my_random_bytes
mov rdi, [rbp+var_50]
mov rsi, [rbp+var_58]
call my_uuid_init
lea rdi, maria_uuid
call my_uuid
mov ax, cs:word_1519A1
mov [rbp+var_30], ax
mov al, cs:byte_1519A3
mov [rbp+var_2E], al
mov [rbp+var_2D], 1
lea rax, maria_uuid
mov rcx, [rax]
mov [rbp+var_2C], rcx
mov rax, [rax+8]
mov [rbp+var_24], rax
lea rax, [rbp+var_30]
add rax, 14h
mov [rbp+var_60], rax
mov eax, cs:cf_create_time_size
mov cx, ax
mov rax, [rbp+var_60]
mov [rax], cx
jmp short $+2
loc_4E23A:
lea rax, [rbp+var_30]
add rax, 16h
mov [rbp+var_68], rax
mov eax, cs:cf_changeable_size
mov cx, ax
mov rax, [rbp+var_68]
mov [rax], cx
jmp short $+2
loc_4E258:
lea rax, [rbp+var_30]
add rax, 18h
mov [rbp+var_70], rax
lea rax, maria_block_size
mov rax, [rax]
mov cx, ax
mov rax, [rbp+var_70]
mov [rax], cx
lea rsi, [rbp+var_30]
mov eax, cs:cf_create_time_size
sub eax, 4
mov eax, eax
mov edx, eax
xor edi, edi
call my_checksum
mov [rbp+var_48], eax
lea rax, [rbp+var_30]
mov ecx, cs:cf_create_time_size
add rax, rcx
add rax, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_78], rax
mov ecx, [rbp+var_48]
mov rax, [rbp+var_78]
mov [rax], ecx
mov edi, cs:control_file_fd
lea rsi, [rbp+var_30]
mov eax, cs:cf_create_time_size
mov edx, eax
xor eax, eax
mov ecx, eax
mov r8d, 12h
call my_pwrite
cmp rax, 0
jz short loc_4E2E3
jmp short $+2
loc_4E2DA:
mov [rbp+var_34], 0Bh
jmp short loc_4E2F8
loc_4E2E3:
jmp short $+2
loc_4E2E5:
xor eax, eax
mov edx, eax
xor ecx, ecx
mov rdi, rdx
mov esi, ecx
call ma_control_file_write_and_force
mov [rbp+var_34], eax
loc_4E2F8:
mov eax, [rbp+var_34]
mov [rbp+var_7C], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_4E31C
mov eax, [rbp+var_7C]
add rsp, 90h
pop rbp
retn
loc_4E31C:
call ___stack_chk_fail
|
long long create_control_file(long long a1, int a2)
{
long long v3; // [rsp+38h] [rbp-58h] BYREF
long long v4; // [rsp+40h] [rbp-50h] BYREF
int v5; // [rsp+48h] [rbp-48h]
int v6; // [rsp+4Ch] [rbp-44h]
long long v7; // [rsp+50h] [rbp-40h]
__int16 v9; // [rsp+60h] [rbp-30h] BYREF
char v10; // [rsp+62h] [rbp-2Eh]
char v11; // [rsp+63h] [rbp-2Dh]
long long v12; // [rsp+64h] [rbp-2Ch]
long long v13; // [rsp+6Ch] [rbp-24h]
__int16 v14; // [rsp+74h] [rbp-1Ch]
__int16 v15; // [rsp+76h] [rbp-1Ah]
__int16 v16; // [rsp+78h] [rbp-18h]
unsigned long long v17; // [rsp+88h] [rbp-8h]
v17 = __readfsqword(0x28u);
v7 = a1;
v6 = a2;
control_file_fd = inline_mysql_file_create(
key_file_control,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_control_file.c",
154,
a1,
0,
a2,
32784LL);
if ( control_file_fd >= 0 )
{
cf_create_time_size = 30;
cf_changeable_size = 22;
my_random_bytes(&v4, 8LL);
my_random_bytes(&v3, 8LL);
my_uuid_init(v4, v3);
my_uuid(maria_uuid);
v9 = -258;
v10 = 12;
v11 = 1;
v12 = maria_uuid[0];
v13 = maria_uuid[1];
v14 = cf_create_time_size;
v15 = cf_changeable_size;
v16 = maria_block_size;
v5 = my_checksum(0LL, &v9, (unsigned int)(cf_create_time_size - 4));
*(_DWORD *)((char *)&v9 + (unsigned int)cf_create_time_size - 4) = v5;
if ( my_pwrite((unsigned int)control_file_fd, &v9, (unsigned int)cf_create_time_size, 0LL) )
return 11;
else
return (unsigned int)ma_control_file_write_and_force(0LL, 0LL);
}
else
{
return 11;
}
}
|
create_control_file:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x40],RDI
MOV dword ptr [RBP + -0x44],ESI
LEA RAX,[0x577d20]
MOV EDI,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x40]
MOV R9D,dword ptr [RBP + -0x44]
LEA RSI,[0x2518db]
MOV EDX,0x9a
XOR R8D,R8D
MOV qword ptr [RSP],0x8010
CALL 0x0014f150
MOV dword ptr [0x003bd3c0],EAX
CMP EAX,0x0
JGE 0x0014e1a5
JMP 0x0014e199
LAB_0014e199:
MOV dword ptr [RBP + -0x34],0xb
JMP 0x0014e2f8
LAB_0014e1a5:
MOV dword ptr [0x00578184],0x1e
MOV dword ptr [0x00578188],0x16
LEA RDI,[RBP + -0x50]
MOV ESI,0x8
CALL 0x0024fc50
LEA RDI,[RBP + -0x58]
MOV ESI,0x8
CALL 0x0024fc50
MOV RDI,qword ptr [RBP + -0x50]
MOV RSI,qword ptr [RBP + -0x58]
CALL 0x001fee00
LEA RDI,[0x577b00]
CALL 0x001fefb0
MOV AX,word ptr [0x002519a1]
MOV word ptr [RBP + -0x30],AX
MOV AL,byte ptr [0x002519a3]
MOV byte ptr [RBP + -0x2e],AL
MOV byte ptr [RBP + -0x2d],0x1
LEA RAX,[0x577b00]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RBP + -0x2c],RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x24],RAX
LEA RAX,[RBP + -0x30]
ADD RAX,0x14
MOV qword ptr [RBP + -0x60],RAX
MOV EAX,dword ptr [0x00578184]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x60]
MOV word ptr [RAX],CX
JMP 0x0014e23a
LAB_0014e23a:
LEA RAX,[RBP + -0x30]
ADD RAX,0x16
MOV qword ptr [RBP + -0x68],RAX
MOV EAX,dword ptr [0x00578188]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x68]
MOV word ptr [RAX],CX
JMP 0x0014e258
LAB_0014e258:
LEA RAX,[RBP + -0x30]
ADD RAX,0x18
MOV qword ptr [RBP + -0x70],RAX
LEA RAX,[0x3bd200]
MOV RAX,qword ptr [RAX]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x70]
MOV word ptr [RAX],CX
LEA RSI,[RBP + -0x30]
MOV EAX,dword ptr [0x00578184]
SUB EAX,0x4
MOV EAX,EAX
MOV EDX,EAX
XOR EDI,EDI
CALL 0x002021d0
MOV dword ptr [RBP + -0x48],EAX
LEA RAX,[RBP + -0x30]
MOV ECX,dword ptr [0x00578184]
ADD RAX,RCX
ADD RAX,-0x4
MOV qword ptr [RBP + -0x78],RAX
MOV ECX,dword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x78]
MOV dword ptr [RAX],ECX
MOV EDI,dword ptr [0x003bd3c0]
LEA RSI,[RBP + -0x30]
MOV EAX,dword ptr [0x00578184]
MOV EDX,EAX
XOR EAX,EAX
MOV ECX,EAX
MOV R8D,0x12
CALL 0x001f4860
CMP RAX,0x0
JZ 0x0014e2e3
JMP 0x0014e2da
LAB_0014e2da:
MOV dword ptr [RBP + -0x34],0xb
JMP 0x0014e2f8
LAB_0014e2e3:
JMP 0x0014e2e5
LAB_0014e2e5:
XOR EAX,EAX
MOV EDX,EAX
XOR ECX,ECX
MOV RDI,RDX
MOV ESI,ECX
CALL 0x0014e810
MOV dword ptr [RBP + -0x34],EAX
LAB_0014e2f8:
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x7c],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0014e31c
MOV EAX,dword ptr [RBP + -0x7c]
ADD RSP,0x90
POP RBP
RET
LAB_0014e31c:
CALL 0x0012a270
|
int4 create_control_file(int8 param_1,int4 param_2)
{
long lVar1;
long in_FS_OFFSET;
int8 local_60;
int8 local_58;
int4 local_50;
int4 local_4c;
int8 local_48;
int4 local_3c;
int2 local_38;
int1 local_36;
int1 local_35;
int8 local_34;
int8 local_2c;
int2 local_24;
int2 local_22;
int2 local_20;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_4c = param_2;
local_48 = param_1;
control_file_fd =
inline_mysql_file_create
(key_file_control,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_control_file.c",0x9a,
param_1,0,param_2,0x8010);
if (control_file_fd < 0) {
local_3c = 0xb;
}
else {
cf_create_time_size = 0x1e;
cf_changeable_size = 0x16;
my_random_bytes(&local_58,8);
my_random_bytes(&local_60,8);
my_uuid_init(local_58,local_60);
my_uuid(&maria_uuid);
local_38 = DAT_002519a1;
local_36 = DAT_002519a3;
local_35 = 1;
local_34 = maria_uuid;
local_2c = DAT_00577b08;
local_24 = (int2)cf_create_time_size;
local_22 = (int2)cf_changeable_size;
local_20 = (int2)maria_block_size;
local_50 = my_checksum(0,&local_38,cf_create_time_size - 4);
*(int4 *)((long)&local_3c + (ulong)cf_create_time_size) = local_50;
lVar1 = my_pwrite(control_file_fd,&local_38,cf_create_time_size,0,0x12);
if (lVar1 == 0) {
local_3c = ma_control_file_write_and_force(0,0);
}
else {
local_3c = 0xb;
}
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_3c;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
16,471
|
google::protobuf::FloatValue::_InternalParse(char const*, google::protobuf::internal::ParseContext*)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/wrappers.pb.cc
|
const char* FloatValue::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// float value = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
_impl_.value_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
|
O3
|
cpp
|
google::protobuf::FloatValue::_InternalParse(char const*, google::protobuf::internal::ParseContext*):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x8(%rsp), %rax
movq %rsi, (%rax)
movl 0x5c(%rdx), %edx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7347e
testb %al, %al
jne 0xb0922
leaq 0x8(%r14), %r15
leaq 0x8(%rsp), %r12
movq 0x8(%rsp), %rdi
movzbl (%rdi), %r13d
leaq 0x1(%rdi), %rax
testb %r13b, %r13b
jns 0xb0893
movzbl (%rax), %eax
movl %eax, %ecx
shll $0x7, %ecx
addl %ecx, %r13d
addl $-0x80, %r13d
testb %al, %al
js 0xb0888
addq $0x2, %rdi
movq %rdi, %rax
jmp 0xb0893
movl %r13d, %esi
callq 0x7ce8e
movl %edx, %r13d
movq %rax, 0x8(%rsp)
cmpl $0xd, %r13d
je 0xb08d9
testl %r13d, %r13d
je 0xb0916
movl %r13d, %ecx
andl $0x7, %ecx
cmpl $0x4, %ecx
je 0xb0916
movq (%r15), %rsi
testb $0x1, %sil
je 0xb0904
andq $-0x4, %rsi
addq $0x8, %rsi
movl %r13d, %edi
movq %rax, %rdx
movq %rbx, %rcx
callq 0xa3709
movq %rax, 0x8(%rsp)
testq %rax, %rax
jne 0xb08ec
jmp 0xb0935
movss (%rax), %xmm0
movss %xmm0, 0x10(%r14)
addq $0x4, %rax
movq %rax, 0x8(%rsp)
movl 0x5c(%rbx), %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7347e
testb %al, %al
je 0xb085a
jmp 0xb0922
movq %r15, %rdi
callq 0x735aa
movq %rax, %rsi
movq 0x8(%rsp), %rax
jmp 0xb08bf
testq %rax, %rax
je 0xb0935
decl %r13d
movl %r13d, 0x50(%rbx)
movq 0x8(%rsp), %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq $0x0, 0x8(%rsp)
jmp 0xb0922
|
_ZN6google8protobuf10FloatValue14_InternalParseEPKcPNS0_8internal12ParseContextE:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov rbx, rdx
mov r14, rdi
lea rax, [rsp+38h+var_30]
mov [rax], rsi
mov edx, [rdx+5Ch]; int
mov rdi, rbx; this
mov rsi, rax; char **
call _ZN6google8protobuf8internal18EpsCopyInputStream13DoneWithCheckEPPKci; google::protobuf::internal::EpsCopyInputStream::DoneWithCheck(char const**,int)
test al, al
jnz loc_B0922
lea r15, [r14+8]
lea r12, [rsp+38h+var_30]
loc_B085A:
mov rdi, [rsp+38h+var_30]; this
movzx r13d, byte ptr [rdi]
lea rax, [rdi+1]
test r13b, r13b
jns short loc_B0893
movzx eax, byte ptr [rax]
mov ecx, eax
shl ecx, 7
add r13d, ecx
add r13d, 0FFFFFF80h
test al, al
js short loc_B0888
add rdi, 2
mov rax, rdi
jmp short loc_B0893
loc_B0888:
mov esi, r13d; char *
call _ZN6google8protobuf8internal15ReadTagFallbackEPKcj; google::protobuf::internal::ReadTagFallback(char const*,uint)
mov r13d, edx
loc_B0893:
mov [rsp+38h+var_30], rax
cmp r13d, 0Dh
jz short loc_B08D9
test r13d, r13d
jz short loc_B0916
mov ecx, r13d
and ecx, 7
cmp ecx, 4
jz short loc_B0916
mov rsi, [r15]
test sil, 1
jz short loc_B0904
and rsi, 0FFFFFFFFFFFFFFFCh
add rsi, 8; unsigned __int64
loc_B08BF:
mov edi, r13d; this
mov rdx, rax; google::protobuf::UnknownFieldSet *
mov rcx, rbx; char *
call _ZN6google8protobuf8internal17UnknownFieldParseEmPNS0_15UnknownFieldSetEPKcPNS1_12ParseContextE; google::protobuf::internal::UnknownFieldParse(ulong,google::protobuf::UnknownFieldSet *,char const*,google::protobuf::internal::ParseContext *)
mov [rsp+38h+var_30], rax
test rax, rax
jnz short loc_B08EC
jmp short loc_B0935
loc_B08D9:
movss xmm0, dword ptr [rax]
movss dword ptr [r14+10h], xmm0
add rax, 4
mov [rsp+38h+var_30], rax
loc_B08EC:
mov edx, [rbx+5Ch]; int
mov rdi, rbx; this
mov rsi, r12; char **
call _ZN6google8protobuf8internal18EpsCopyInputStream13DoneWithCheckEPPKci; google::protobuf::internal::EpsCopyInputStream::DoneWithCheck(char const**,int)
test al, al
jz loc_B085A
jmp short loc_B0922
loc_B0904:
mov rdi, r15
call _ZN6google8protobuf8internal16InternalMetadata27mutable_unknown_fields_slowINS0_15UnknownFieldSetEEEPT_v; google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>(void)
mov rsi, rax
mov rax, [rsp+38h+var_30]
jmp short loc_B08BF
loc_B0916:
test rax, rax
jz short loc_B0935
dec r13d
mov [rbx+50h], r13d
loc_B0922:
mov rax, [rsp+38h+var_30]
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_B0935:
mov [rsp+38h+var_30], 0
jmp short loc_B0922
|
google::protobuf::internal * google::protobuf::FloatValue::_InternalParse(
google::protobuf::FloatValue *this,
google::protobuf::internal *a2,
google::protobuf::internal::ParseContext *a3)
{
google::protobuf::internal::ParseContext *v4; // r8
_QWORD *v5; // r15
unsigned int v6; // r13d
google::protobuf::internal *TagFallback; // rax
int v8; // eax
unsigned int v9; // edx
unsigned long long v10; // rsi
google::protobuf::internal *v12[6]; // [rsp+8h] [rbp-30h] BYREF
v12[0] = a2;
if ( google::protobuf::internal::EpsCopyInputStream::DoneWithCheck(a3, (const char **)v12, *((_DWORD *)a3 + 23)) )
return v12[0];
v5 = (_QWORD *)((char *)this + 8);
while ( 1 )
{
v6 = *(unsigned __int8 *)v12[0];
TagFallback = (google::protobuf::internal *)((char *)v12[0] + 1);
if ( (v6 & 0x80u) != 0 )
{
v8 = *(unsigned __int8 *)TagFallback;
v6 = (v8 << 7) + v6 - 128;
if ( (v8 & 0x80u) != 0 )
{
TagFallback = (google::protobuf::internal *)google::protobuf::internal::ReadTagFallback(
v12[0],
(const char *)v6);
v6 = v9;
}
else
{
TagFallback = (google::protobuf::internal *)((char *)v12[0] + 2);
}
}
v12[0] = TagFallback;
if ( v6 == 13 )
{
*((_DWORD *)this + 4) = *(_DWORD *)TagFallback;
v12[0] = (google::protobuf::internal *)((char *)TagFallback + 4);
goto LABEL_15;
}
if ( !v6 || (v6 & 7) == 4 )
break;
if ( (*v5 & 1) != 0 )
{
v10 = (*v5 & 0xFFFFFFFFFFFFFFFCLL) + 8;
}
else
{
v10 = google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>((long long *)this + 1);
TagFallback = v12[0];
}
v12[0] = (google::protobuf::internal *)google::protobuf::internal::UnknownFieldParse(
(google::protobuf::internal *)v6,
v10,
TagFallback,
(const char *)a3,
v4);
if ( !v12[0] )
goto LABEL_21;
LABEL_15:
if ( google::protobuf::internal::EpsCopyInputStream::DoneWithCheck(a3, (const char **)v12, *((_DWORD *)a3 + 23)) )
return v12[0];
}
if ( TagFallback )
{
*((_DWORD *)a3 + 20) = v6 - 1;
return v12[0];
}
LABEL_21:
v12[0] = 0LL;
return v12[0];
}
|
_InternalParse:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV RBX,RDX
MOV R14,RDI
LEA RAX,[RSP + 0x8]
MOV qword ptr [RAX],RSI
MOV EDX,dword ptr [RDX + 0x5c]
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0017347e
TEST AL,AL
JNZ 0x001b0922
LEA R15,[R14 + 0x8]
LEA R12,[RSP + 0x8]
LAB_001b085a:
MOV RDI,qword ptr [RSP + 0x8]
MOVZX R13D,byte ptr [RDI]
LEA RAX,[RDI + 0x1]
TEST R13B,R13B
JNS 0x001b0893
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
SHL ECX,0x7
ADD R13D,ECX
ADD R13D,-0x80
TEST AL,AL
JS 0x001b0888
ADD RDI,0x2
MOV RAX,RDI
JMP 0x001b0893
LAB_001b0888:
MOV ESI,R13D
CALL 0x0017ce8e
MOV R13D,EDX
LAB_001b0893:
MOV qword ptr [RSP + 0x8],RAX
CMP R13D,0xd
JZ 0x001b08d9
TEST R13D,R13D
JZ 0x001b0916
MOV ECX,R13D
AND ECX,0x7
CMP ECX,0x4
JZ 0x001b0916
MOV RSI,qword ptr [R15]
TEST SIL,0x1
JZ 0x001b0904
AND RSI,-0x4
ADD RSI,0x8
LAB_001b08bf:
MOV EDI,R13D
MOV RDX,RAX
MOV RCX,RBX
CALL 0x001a3709
MOV qword ptr [RSP + 0x8],RAX
TEST RAX,RAX
JNZ 0x001b08ec
JMP 0x001b0935
LAB_001b08d9:
MOVSS XMM0,dword ptr [RAX]
MOVSS dword ptr [R14 + 0x10],XMM0
ADD RAX,0x4
MOV qword ptr [RSP + 0x8],RAX
LAB_001b08ec:
MOV EDX,dword ptr [RBX + 0x5c]
MOV RDI,RBX
MOV RSI,R12
CALL 0x0017347e
TEST AL,AL
JZ 0x001b085a
JMP 0x001b0922
LAB_001b0904:
MOV RDI,R15
CALL 0x001735aa
MOV RSI,RAX
MOV RAX,qword ptr [RSP + 0x8]
JMP 0x001b08bf
LAB_001b0916:
TEST RAX,RAX
JZ 0x001b0935
DEC R13D
MOV dword ptr [RBX + 0x50],R13D
LAB_001b0922:
MOV RAX,qword ptr [RSP + 0x8]
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_001b0935:
MOV qword ptr [RSP + 0x8],0x0
JMP 0x001b0922
|
/* google::protobuf::FloatValue::_InternalParse(char const*,
google::protobuf::internal::ParseContext*) */
byte * __thiscall
google::protobuf::FloatValue::_InternalParse(FloatValue *this,char *param_1,ParseContext *param_2)
{
byte bVar1;
byte bVar2;
ulong uVar3;
char cVar4;
UnknownFieldSet *pUVar5;
uint uVar6;
int1 auVar7 [12];
byte *local_30;
local_30 = (byte *)param_1;
cVar4 = internal::EpsCopyInputStream::DoneWithCheck
((EpsCopyInputStream *)param_2,(char **)&local_30,*(int *)(param_2 + 0x5c));
if (cVar4 == '\0') {
do {
bVar1 = *local_30;
auVar7[8] = bVar1;
auVar7._0_8_ = local_30 + 1;
auVar7._9_3_ = 0;
if ((char)bVar1 < '\0') {
bVar2 = local_30[1];
uVar6 = ((uint)bVar1 + (uint)bVar2 * 0x80) - 0x80;
if ((char)bVar2 < '\0') {
auVar7 = internal::ReadTagFallback((char *)local_30,uVar6);
}
else {
auVar7._8_4_ = uVar6;
auVar7._0_8_ = local_30 + 2;
}
}
uVar6 = auVar7._8_4_;
local_30 = auVar7._0_8_;
if (uVar6 == 0xd) {
*(int4 *)(this + 0x10) = *(int4 *)local_30;
local_30 = local_30 + 4;
}
else {
if ((uVar6 == 0) || ((uVar6 & 7) == 4)) {
if (local_30 == (byte *)0x0) {
return (byte *)0x0;
}
*(uint *)(param_2 + 0x50) = uVar6 - 1;
return local_30;
}
uVar3 = *(ulong *)(this + 8);
if ((uVar3 & 1) == 0) {
pUVar5 = internal::InternalMetadata::
mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>
((InternalMetadata *)(this + 8));
}
else {
pUVar5 = (UnknownFieldSet *)((uVar3 & 0xfffffffffffffffc) + 8);
}
local_30 = (byte *)internal::UnknownFieldParse((ulong)uVar6,pUVar5,(char *)local_30,param_2)
;
if (local_30 == (byte *)0x0) {
return (byte *)0x0;
}
}
cVar4 = internal::EpsCopyInputStream::DoneWithCheck
((EpsCopyInputStream *)param_2,(char **)&local_30,*(int *)(param_2 + 0x5c));
} while (cVar4 == '\0');
}
return local_30;
}
|
|
16,472
|
rak_vm_new_range
|
fabiosvm[P]rak/include/rak/vm.h
|
static inline void rak_vm_new_range(RakVM *vm, RakError *err)
{
RakValue val1 = rak_vm_get(vm, 1);
RakValue val2 = rak_vm_get(vm, 0);
if (!rak_is_number(val1) || !rak_is_number(val2)
|| !rak_is_integer(val1) || !rak_is_integer(val2))
{
rak_error_set(err, "range must be of type integer numbers");
return;
}
double start = rak_as_number(val1);
double end = rak_as_number(val2);
RakRange *range = rak_range_new(start, end, err);
if (!rak_is_ok(err)) return;
RakValue res = rak_range_value(range);
rak_object_retain(rak_as_object(res));
rak_stack_set(&vm->vstk, 1, res);
rak_vm_pop(vm);
}
|
O0
|
c
|
rak_vm_new_range:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0xb680
movq %rax, -0x20(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0xb680
movq %rax, -0x30(%rbp)
movq %rdx, -0x28(%rbp)
cmpl $0x2, -0x20(%rbp)
jne 0xcc37
cmpl $0x2, -0x30(%rbp)
jne 0xcc37
movsd -0x18(%rbp), %xmm0
cvttsd2si -0x18(%rbp), %rax
cvtsi2sd %rax, %xmm1
ucomisd %xmm1, %xmm0
jne 0xcc37
jp 0xcc37
movsd -0x28(%rbp), %xmm0
cvttsd2si -0x28(%rbp), %rax
cvtsi2sd %rax, %xmm1
ucomisd %xmm1, %xmm0
jne 0xcc37
jp 0xcc37
jmp 0xcc4b
movq -0x10(%rbp), %rdi
leaq 0x1e4d(%rip), %rsi # 0xea8f
movb $0x0, %al
callq 0x8220
jmp 0xccc5
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x38(%rbp), %xmm0
movsd -0x40(%rbp), %xmm1
movq -0x10(%rbp), %rdi
callq 0x99b0
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
testb $0x1, (%rax)
jne 0xcc81
jmp 0xccc5
movl $0x5, -0x58(%rbp)
movl $0x2, -0x54(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0xcca4
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x58(%rbp), %rcx
movq %rcx, -0x10(%rax)
movq -0x50(%rbp), %rcx
movq %rcx, -0x8(%rax)
movq -0x8(%rbp), %rdi
callq 0xb630
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
rak_vm_new_range:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]
mov esi, 1
call rak_vm_get
mov [rbp+var_20], rax
mov [rbp+var_18], rdx
mov rdi, [rbp+var_8]
xor esi, esi
call rak_vm_get
mov [rbp+var_30], rax
mov [rbp+var_28], rdx
cmp dword ptr [rbp+var_20], 2
jnz short loc_CC37
cmp dword ptr [rbp+var_30], 2
jnz short loc_CC37
movsd xmm0, [rbp+var_18]
cvttsd2si rax, [rbp+var_18]
cvtsi2sd xmm1, rax
ucomisd xmm0, xmm1
jnz short loc_CC37
jp short loc_CC37
movsd xmm0, [rbp+var_28]
cvttsd2si rax, [rbp+var_28]
cvtsi2sd xmm1, rax
ucomisd xmm0, xmm1
jnz short loc_CC37
jp short loc_CC37
jmp short loc_CC4B
loc_CC37:
mov rdi, [rbp+var_10]
lea rsi, aRangeMustBeOfT; "range must be of type integer numbers"
mov al, 0
call rak_error_set
jmp short loc_CCC5
loc_CC4B:
movsd xmm0, [rbp+var_18]
movsd [rbp+var_38], xmm0
movsd xmm0, [rbp+var_28]
movsd [rbp+var_40], xmm0
movsd xmm0, [rbp+var_38]
movsd xmm1, [rbp+var_40]
mov rdi, [rbp+var_10]
call rak_range_new
mov [rbp+var_48], rax
mov rax, [rbp+var_10]
test byte ptr [rax], 1
jnz short loc_CC81
jmp short loc_CCC5
loc_CC81:
mov dword ptr [rbp+var_58], 5
mov dword ptr [rbp+var_58+4], 2
mov rax, [rbp+var_48]
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
mov ecx, [rax]
add ecx, 1
mov [rax], ecx
jmp short $+2
loc_CCA4:
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov rcx, [rbp+var_58]
mov [rax-10h], rcx
mov rcx, [rbp+var_50]
mov [rax-8], rcx
mov rdi, [rbp+var_8]
call rak_vm_pop
loc_CCC5:
add rsp, 60h
pop rbp
retn
|
long long rak_vm_new_range(
long long a1,
_BYTE *a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
double v10; // rdx
long long v11; // rdx
long long v12; // rcx
long long v13; // r8
long long v14; // r9
__m128 v15; // xmm4
__m128 v16; // xmm5
long long result; // rax
long long v18; // rax
char v19; // [rsp+0h] [rbp-60h]
_DWORD *v20; // [rsp+18h] [rbp-48h]
int v21; // [rsp+30h] [rbp-30h]
int v22; // [rsp+40h] [rbp-20h]
double v23; // [rsp+48h] [rbp-18h]
v22 = rak_vm_get(a1, 1u);
v23 = v10;
v21 = rak_vm_get(a1, 0);
if ( v22 != 2 )
return rak_error_set(
(long long)a2,
(long long)"range must be of type integer numbers",
v11,
v12,
v13,
v14,
a3,
a4,
a5,
a6,
v15,
v16,
a9,
a10,
v19);
if ( v21 != 2 )
return rak_error_set(
(long long)a2,
(long long)"range must be of type integer numbers",
v11,
v12,
v13,
v14,
a3,
a4,
a5,
a6,
v15,
v16,
a9,
a10,
v19);
a3 = (__m128)*(unsigned long long *)&v23;
*(double *)a4.m128_u64 = (double)(int)v23;
if ( v23 != *(double *)a4.m128_u64 )
return rak_error_set(
(long long)a2,
(long long)"range must be of type integer numbers",
v11,
v12,
v13,
v14,
a3,
a4,
a5,
a6,
v15,
v16,
a9,
a10,
v19);
a3 = (__m128)(unsigned long long)v11;
*(double *)a4.m128_u64 = (double)(int)*(double *)&v11;
if ( *(double *)&v11 != *(double *)a4.m128_u64 )
return rak_error_set(
(long long)a2,
(long long)"range must be of type integer numbers",
v11,
v12,
v13,
v14,
a3,
a4,
a5,
a6,
v15,
v16,
a9,
a10,
v19);
v20 = (_DWORD *)rak_range_new(
a2,
(__m128)*(unsigned long long *)&v23,
(__m128)(unsigned long long)v11,
a5,
a6,
*(double *)v15.m128_u64,
*(double *)v16.m128_u64,
a9,
a10);
result = (long long)a2;
if ( (*a2 & 1) != 0 )
{
++*v20;
v18 = *(_QWORD *)(a1 + 8);
*(_QWORD *)(v18 - 16) = 0x200000005LL;
*(_QWORD *)(v18 - 8) = v20;
return rak_vm_pop(a1);
}
return result;
}
|
rak_vm_new_range:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,0x1
CALL 0x0010b680
MOV qword ptr [RBP + -0x20],RAX
MOV qword ptr [RBP + -0x18],RDX
MOV RDI,qword ptr [RBP + -0x8]
XOR ESI,ESI
CALL 0x0010b680
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0x28],RDX
CMP dword ptr [RBP + -0x20],0x2
JNZ 0x0010cc37
CMP dword ptr [RBP + -0x30],0x2
JNZ 0x0010cc37
MOVSD XMM0,qword ptr [RBP + -0x18]
CVTTSD2SI RAX,qword ptr [RBP + -0x18]
CVTSI2SD XMM1,RAX
UCOMISD XMM0,XMM1
JNZ 0x0010cc37
JP 0x0010cc37
MOVSD XMM0,qword ptr [RBP + -0x28]
CVTTSD2SI RAX,qword ptr [RBP + -0x28]
CVTSI2SD XMM1,RAX
UCOMISD XMM0,XMM1
JNZ 0x0010cc37
JP 0x0010cc37
JMP 0x0010cc4b
LAB_0010cc37:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x10ea8f]
MOV AL,0x0
CALL 0x00108220
JMP 0x0010ccc5
LAB_0010cc4b:
MOVSD XMM0,qword ptr [RBP + -0x18]
MOVSD qword ptr [RBP + -0x38],XMM0
MOVSD XMM0,qword ptr [RBP + -0x28]
MOVSD qword ptr [RBP + -0x40],XMM0
MOVSD XMM0,qword ptr [RBP + -0x38]
MOVSD XMM1,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001099b0
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x10]
TEST byte ptr [RAX],0x1
JNZ 0x0010cc81
JMP 0x0010ccc5
LAB_0010cc81:
MOV dword ptr [RBP + -0x58],0x5
MOV dword ptr [RBP + -0x54],0x2
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
MOV dword ptr [RAX],ECX
JMP 0x0010cca4
LAB_0010cca4:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x58]
MOV qword ptr [RAX + -0x10],RCX
MOV RCX,qword ptr [RBP + -0x50]
MOV qword ptr [RAX + -0x8],RCX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0010b630
LAB_0010ccc5:
ADD RSP,0x60
POP RBP
RET
|
void rak_vm_new_range(long param_1,byte *param_2)
{
long lVar1;
int iVar2;
int iVar3;
int *piVar4;
double extraout_RDX;
double extraout_RDX_00;
iVar2 = rak_vm_get(param_1,1);
iVar3 = rak_vm_get(param_1,0);
if ((iVar2 == 2) && (iVar3 == 2)) {
if ((extraout_RDX == (double)(long)extraout_RDX) &&
(!NAN(extraout_RDX) && !NAN((double)(long)extraout_RDX))) {
if ((extraout_RDX_00 == (double)(long)extraout_RDX_00) &&
(!NAN(extraout_RDX_00) && !NAN((double)(long)extraout_RDX_00))) {
piVar4 = (int *)rak_range_new(extraout_RDX,extraout_RDX_00,param_2);
if ((*param_2 & 1) == 0) {
return;
}
*piVar4 = *piVar4 + 1;
lVar1 = *(long *)(param_1 + 8);
*(int8 *)(lVar1 + -0x10) = 0x200000005;
*(int **)(lVar1 + -8) = piVar4;
rak_vm_pop(param_1);
return;
}
}
}
rak_error_set(param_2,"range must be of type integer numbers");
return;
}
|
|
16,473
|
ggml_thread_cpumask_next
|
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c
|
static void ggml_thread_cpumask_next(const bool * global_mask, bool * local_mask, bool strict, int32_t* iter) {
if (!strict) {
memcpy(local_mask, global_mask, GGML_MAX_N_THREADS);
return;
} else {
memset(local_mask, 0, GGML_MAX_N_THREADS);
int32_t base_idx = *iter;
for (int32_t i = 0; i < GGML_MAX_N_THREADS; i++) {
int32_t idx = base_idx + i;
if (idx >= GGML_MAX_N_THREADS) {
// Just a cheaper modulo
idx -= GGML_MAX_N_THREADS;
}
if (global_mask[idx]) {
local_mask[idx] = 1;
*iter = idx + 1;
return;
}
}
}
}
|
O0
|
c
|
ggml_thread_cpumask_next:
subq $0x38, %rsp
movb %dl, %al
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
andb $0x1, %al
movb %al, 0x27(%rsp)
movq %rcx, 0x18(%rsp)
testb $0x1, 0x27(%rsp)
jne 0x149fb
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl $0x200, %edx # imm = 0x200
callq 0xfa50
jmp 0x14a8b
movq 0x28(%rsp), %rdi
xorl %esi, %esi
movl $0x200, %edx # imm = 0x200
callq 0xf650
movq 0x18(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x14(%rsp)
movl $0x0, 0x10(%rsp)
cmpl $0x200, 0x10(%rsp) # imm = 0x200
jge 0x14a89
movl 0x14(%rsp), %eax
addl 0x10(%rsp), %eax
movl %eax, 0xc(%rsp)
cmpl $0x200, 0xc(%rsp) # imm = 0x200
jl 0x14a4c
movl 0xc(%rsp), %eax
subl $0x200, %eax # imm = 0x200
movl %eax, 0xc(%rsp)
movq 0x30(%rsp), %rax
movslq 0xc(%rsp), %rcx
testb $0x1, (%rax,%rcx)
je 0x14a7a
movq 0x28(%rsp), %rax
movslq 0xc(%rsp), %rcx
movb $0x1, (%rax,%rcx)
movl 0xc(%rsp), %ecx
addl $0x1, %ecx
movq 0x18(%rsp), %rax
movl %ecx, (%rax)
jmp 0x14a8b
jmp 0x14a7c
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x14a1f
jmp 0x14a8b
addq $0x38, %rsp
retq
|
ggml_thread_cpumask_next:
sub rsp, 38h
mov al, dl
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
and al, 1
mov [rsp+38h+var_11], al
mov [rsp+38h+var_20], rcx
test [rsp+38h+var_11], 1
jnz short loc_149FB
mov rdi, [rsp+38h+var_10]
mov rsi, [rsp+38h+var_8]
mov edx, 200h
call _memcpy
jmp loc_14A8B
loc_149FB:
mov rdi, [rsp+38h+var_10]
xor esi, esi
mov edx, 200h
call _memset
mov rax, [rsp+38h+var_20]
mov eax, [rax]
mov [rsp+38h+var_24], eax
mov [rsp+38h+var_28], 0
loc_14A1F:
cmp [rsp+38h+var_28], 200h
jge short loc_14A89
mov eax, [rsp+38h+var_24]
add eax, [rsp+38h+var_28]
mov [rsp+38h+var_2C], eax
cmp [rsp+38h+var_2C], 200h
jl short loc_14A4C
mov eax, [rsp+38h+var_2C]
sub eax, 200h
mov [rsp+38h+var_2C], eax
loc_14A4C:
mov rax, [rsp+38h+var_8]
movsxd rcx, [rsp+38h+var_2C]
test byte ptr [rax+rcx], 1
jz short loc_14A7A
mov rax, [rsp+38h+var_10]
movsxd rcx, [rsp+38h+var_2C]
mov byte ptr [rax+rcx], 1
mov ecx, [rsp+38h+var_2C]
add ecx, 1
mov rax, [rsp+38h+var_20]
mov [rax], ecx
jmp short loc_14A8B
loc_14A7A:
jmp short $+2
loc_14A7C:
mov eax, [rsp+38h+var_28]
add eax, 1
mov [rsp+38h+var_28], eax
jmp short loc_14A1F
loc_14A89:
jmp short $+2
loc_14A8B:
add rsp, 38h
retn
|
long long ggml_thread_cpumask_next(long long a1, long long a2, char a3, unsigned int *a4)
{
long long result; // rax
int v5; // [rsp+Ch] [rbp-2Ch]
int i; // [rsp+10h] [rbp-28h]
int v7; // [rsp+14h] [rbp-24h]
if ( (a3 & 1) == 0 )
return memcpy(a2, a1, 512LL);
memset(a2, 0LL, 512LL);
result = *a4;
v7 = *a4;
for ( i = 0; i < 512; ++i )
{
v5 = i + v7;
if ( i + v7 >= 512 )
v5 -= 512;
if ( (*(_BYTE *)(a1 + v5) & 1) != 0 )
{
*(_BYTE *)(a2 + v5) = 1;
result = (long long)a4;
*a4 = v5 + 1;
return result;
}
result = (unsigned int)(i + 1);
}
return result;
}
|
ggml_thread_cpumask_next:
SUB RSP,0x38
MOV AL,DL
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
AND AL,0x1
MOV byte ptr [RSP + 0x27],AL
MOV qword ptr [RSP + 0x18],RCX
TEST byte ptr [RSP + 0x27],0x1
JNZ 0x001149fb
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x30]
MOV EDX,0x200
CALL 0x0010fa50
JMP 0x00114a8b
LAB_001149fb:
MOV RDI,qword ptr [RSP + 0x28]
XOR ESI,ESI
MOV EDX,0x200
CALL 0x0010f650
MOV RAX,qword ptr [RSP + 0x18]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x14],EAX
MOV dword ptr [RSP + 0x10],0x0
LAB_00114a1f:
CMP dword ptr [RSP + 0x10],0x200
JGE 0x00114a89
MOV EAX,dword ptr [RSP + 0x14]
ADD EAX,dword ptr [RSP + 0x10]
MOV dword ptr [RSP + 0xc],EAX
CMP dword ptr [RSP + 0xc],0x200
JL 0x00114a4c
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x200
MOV dword ptr [RSP + 0xc],EAX
LAB_00114a4c:
MOV RAX,qword ptr [RSP + 0x30]
MOVSXD RCX,dword ptr [RSP + 0xc]
TEST byte ptr [RAX + RCX*0x1],0x1
JZ 0x00114a7a
MOV RAX,qword ptr [RSP + 0x28]
MOVSXD RCX,dword ptr [RSP + 0xc]
MOV byte ptr [RAX + RCX*0x1],0x1
MOV ECX,dword ptr [RSP + 0xc]
ADD ECX,0x1
MOV RAX,qword ptr [RSP + 0x18]
MOV dword ptr [RAX],ECX
JMP 0x00114a8b
LAB_00114a7a:
JMP 0x00114a7c
LAB_00114a7c:
MOV EAX,dword ptr [RSP + 0x10]
ADD EAX,0x1
MOV dword ptr [RSP + 0x10],EAX
JMP 0x00114a1f
LAB_00114a89:
JMP 0x00114a8b
LAB_00114a8b:
ADD RSP,0x38
RET
|
void ggml_thread_cpumask_next(void *param_1,void *param_2,byte param_3,int *param_4)
{
int local_2c;
int local_28;
if ((param_3 & 1) == 0) {
memcpy(param_2,param_1,0x200);
}
else {
memset(param_2,0,0x200);
for (local_28 = 0; local_28 < 0x200; local_28 = local_28 + 1) {
local_2c = *param_4 + local_28;
if (0x1ff < local_2c) {
local_2c = local_2c + -0x200;
}
if ((*(byte *)((long)param_1 + (long)local_2c) & 1) != 0) {
*(int1 *)((long)param_2 + (long)local_2c) = 1;
*param_4 = local_2c + 1;
return;
}
}
}
return;
}
|
|
16,474
|
init_tree
|
eloqsql/mysys/tree.c
|
void init_tree(TREE *tree, size_t default_alloc_size, size_t memory_limit,
int size, qsort_cmp2 compare,
tree_element_free free_element, void *custom_arg,
myf my_flags)
{
DBUG_ENTER("init_tree");
DBUG_PRINT("enter",("tree: %p size: %d", tree, size));
if (default_alloc_size < DEFAULT_ALLOC_SIZE)
default_alloc_size= DEFAULT_ALLOC_SIZE;
default_alloc_size= MY_ALIGN(default_alloc_size, DEFAULT_ALIGN_SIZE);
tree->root= &null_element;
tree->compare=compare;
tree->size_of_element= size > 0 ? (uint) size : 0;
tree->memory_limit=memory_limit;
tree->free=free_element;
tree->allocated=0;
tree->elements_in_tree=0;
tree->custom_arg = custom_arg;
tree->my_flags= my_flags;
tree->flag= 0;
if (!free_element && size >= 0 &&
((uint) size <= sizeof(void*) || ((uint) size & (sizeof(void*)-1))))
{
/*
We know that the data doesn't have to be aligned (like if the key
contains a double), so we can store the data combined with the
TREE_ELEMENT.
*/
tree->offset_to_key=sizeof(TREE_ELEMENT); /* Put key after element */
/* Fix allocation size so that we don't lose any memory */
default_alloc_size/=(sizeof(TREE_ELEMENT)+size);
if (!default_alloc_size)
default_alloc_size=1;
default_alloc_size*=(sizeof(TREE_ELEMENT)+size);
}
else
{
tree->offset_to_key=0; /* use key through pointer */
tree->size_of_element+=sizeof(void*);
}
if (!(tree->with_delete= MY_TEST(my_flags & MY_TREE_WITH_DELETE)))
{
init_alloc_root(key_memory_TREE, &tree->mem_root, default_alloc_size, 0,
MYF(my_flags));
tree->mem_root.min_malloc= sizeof(TREE_ELEMENT)+tree->size_of_element;
}
DBUG_VOID_RETURN;
}
|
O3
|
c
|
init_tree:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %r8, %rax
movq %rdi, %rbx
movq 0x18(%rbp), %r8
movq 0x10(%rbp), %rdi
cmpq $0x2001, %rsi # imm = 0x2001
movl $0x2000, %r10d # imm = 0x2000
cmovaeq %rsi, %r10
addq $0x1fff, %r10 # imm = 0x1FFF
andq $-0x2000, %r10 # imm = 0xE000
leaq 0x2e145a(%rip), %rsi # 0x385bc0
movq %rsi, (%rbx)
movq %rax, 0x228(%rbx)
testq %r9, %r9
setne %sil
xorl %r11d, %r11d
testl %ecx, %ecx
movl $0x0, %eax
cmovgl %ecx, %eax
movl %eax, 0x210(%rbx)
movq %rdx, 0x218(%rbx)
movq %r9, 0x280(%rbx)
movq $0x0, 0x220(%rbx)
movl %r11d, 0x20c(%rbx)
movq %rdi, 0x230(%rbx)
movq %r8, 0x288(%rbx)
movl %r11d, 0x290(%rbx)
sets %dl
orb %sil, %dl
jne 0xa47d9
cmpl $0x9, %ecx
setae %dl
testb $0x7, %cl
sete %sil
testb %sil, %dl
je 0xa47ee
movl $0x0, 0x208(%rbx)
addl $0x8, %eax
movl %eax, 0x210(%rbx)
jmp 0xa4814
movl $0x18, 0x208(%rbx)
addl $0x18, %ecx
movq %r10, %rax
xorl %edx, %edx
divq %rcx
cmpq %rcx, %r10
movl $0x1, %r10d
cmovaeq %rax, %r10
imulq %rcx, %r10
movl %r8d, %eax
shrl $0x12, %eax
andb $0x1, %al
movb %al, 0x278(%rbx)
jne 0xa484f
leaq 0xb639f1(%rip), %rax # 0xc0821c
movl (%rax), %edi
leaq 0x238(%rbx), %rsi
movq %r10, %rdx
xorl %ecx, %ecx
callq 0x9ca8c
movl 0x210(%rbx), %eax
addq $0x18, %rax
movq %rax, 0x250(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
init_tree:
push rbp
mov rbp, rsp
push rbx
push rax
mov rax, r8
mov rbx, rdi
mov r8, [rbp+arg_8]
mov rdi, [rbp+arg_0]
cmp rsi, 2001h
mov r10d, 2000h
cmovnb r10, rsi
add r10, 1FFFh
and r10, 0FFFFFFFFFFFFE000h
lea rsi, null_element
mov [rbx], rsi
mov [rbx+228h], rax
test r9, r9
setnz sil
xor r11d, r11d
test ecx, ecx
mov eax, 0
cmovg eax, ecx
mov [rbx+210h], eax
mov [rbx+218h], rdx
mov [rbx+280h], r9
mov qword ptr [rbx+220h], 0
mov [rbx+20Ch], r11d
mov [rbx+230h], rdi
mov [rbx+288h], r8
mov [rbx+290h], r11d
sets dl
or dl, sil
jnz short loc_A47D9
cmp ecx, 9
setnb dl
test cl, 7
setz sil
test dl, sil
jz short loc_A47EE
loc_A47D9:
mov dword ptr [rbx+208h], 0
add eax, 8
mov [rbx+210h], eax
jmp short loc_A4814
loc_A47EE:
mov dword ptr [rbx+208h], 18h
add ecx, 18h
mov rax, r10
xor edx, edx
div rcx
cmp r10, rcx
mov r10d, 1
cmovnb r10, rax
imul r10, rcx
loc_A4814:
mov eax, r8d
shr eax, 12h
and al, 1
mov [rbx+278h], al
jnz short loc_A484F
lea rax, key_memory_TREE
mov edi, [rax]
lea rsi, [rbx+238h]
mov rdx, r10
xor ecx, ecx
call init_alloc_root
mov eax, [rbx+210h]
add rax, 18h
mov [rbx+250h], rax
loc_A484F:
add rsp, 8
pop rbx
pop rbp
retn
|
char init_tree(
long long a1,
unsigned long long a2,
long long a3,
int a4,
long long a5,
long long a6,
long long a7,
long long a8)
{
long long v8; // r10
unsigned long long v9; // r10
int v10; // eax
unsigned long long v11; // rcx
unsigned long long v12; // rax
bool v13; // cf
long long v14; // r10
long long v15; // rax
v8 = 0x2000LL;
if ( a2 >= 0x2001 )
v8 = a2;
v9 = (v8 + 0x1FFF) & 0xFFFFFFFFFFFFE000LL;
*(_QWORD *)a1 = &null_element;
*(_QWORD *)(a1 + 552) = a5;
v10 = 0;
if ( a4 > 0 )
v10 = a4;
*(_DWORD *)(a1 + 528) = v10;
*(_QWORD *)(a1 + 536) = a3;
*(_QWORD *)(a1 + 640) = a6;
*(_QWORD *)(a1 + 544) = 0LL;
*(_DWORD *)(a1 + 524) = 0;
*(_QWORD *)(a1 + 560) = a7;
*(_QWORD *)(a1 + 648) = a8;
*(_DWORD *)(a1 + 656) = 0;
if ( a6 != 0 || a4 < 0 || (a4 & 7) == 0 && (unsigned int)a4 >= 9 )
{
*(_DWORD *)(a1 + 520) = 0;
*(_DWORD *)(a1 + 528) = v10 + 8;
}
else
{
*(_DWORD *)(a1 + 520) = 24;
v11 = (unsigned int)(a4 + 24);
v12 = v9 / v11;
v13 = v9 < v11;
v14 = 1LL;
if ( !v13 )
v14 = v12;
v9 = v11 * v14;
}
LOBYTE(v15) = (a8 & 0x40000) != 0;
*(_BYTE *)(a1 + 632) = v15;
if ( (a8 & 0x40000) == 0 )
{
init_alloc_root(key_memory_TREE, (long long *)(a1 + 568), v9, 0LL, a8);
v15 = *(unsigned int *)(a1 + 528) + 24LL;
*(_QWORD *)(a1 + 592) = v15;
}
return v15;
}
|
init_tree:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RAX,R8
MOV RBX,RDI
MOV R8,qword ptr [RBP + 0x18]
MOV RDI,qword ptr [RBP + 0x10]
CMP RSI,0x2001
MOV R10D,0x2000
CMOVNC R10,RSI
ADD R10,0x1fff
AND R10,-0x2000
LEA RSI,[0x485bc0]
MOV qword ptr [RBX],RSI
MOV qword ptr [RBX + 0x228],RAX
TEST R9,R9
SETNZ SIL
XOR R11D,R11D
TEST ECX,ECX
MOV EAX,0x0
CMOVG EAX,ECX
MOV dword ptr [RBX + 0x210],EAX
MOV qword ptr [RBX + 0x218],RDX
MOV qword ptr [RBX + 0x280],R9
MOV qword ptr [RBX + 0x220],0x0
MOV dword ptr [RBX + 0x20c],R11D
MOV qword ptr [RBX + 0x230],RDI
MOV qword ptr [RBX + 0x288],R8
MOV dword ptr [RBX + 0x290],R11D
SETS DL
OR DL,SIL
JNZ 0x001a47d9
CMP ECX,0x9
SETNC DL
TEST CL,0x7
SETZ SIL
TEST DL,SIL
JZ 0x001a47ee
LAB_001a47d9:
MOV dword ptr [RBX + 0x208],0x0
ADD EAX,0x8
MOV dword ptr [RBX + 0x210],EAX
JMP 0x001a4814
LAB_001a47ee:
MOV dword ptr [RBX + 0x208],0x18
ADD ECX,0x18
MOV RAX,R10
XOR EDX,EDX
DIV RCX
CMP R10,RCX
MOV R10D,0x1
CMOVNC R10,RAX
IMUL R10,RCX
LAB_001a4814:
MOV EAX,R8D
SHR EAX,0x12
AND AL,0x1
MOV byte ptr [RBX + 0x278],AL
JNZ 0x001a484f
LEA RAX,[0xd0821c]
MOV EDI,dword ptr [RAX]
LEA RSI,[RBX + 0x238]
MOV RDX,R10
XOR ECX,ECX
CALL 0x0019ca8c
MOV EAX,dword ptr [RBX + 0x210]
ADD RAX,0x18
MOV qword ptr [RBX + 0x250],RAX
LAB_001a484f:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void init_tree(int8 *param_1,ulong param_2,int8 param_3,uint param_4,int8 param_5,
long param_6,int8 param_7,ulong param_8)
{
uint uVar1;
ulong uVar2;
ulong uVar3;
ulong uVar4;
uVar3 = 0x2000;
if (0x2000 < param_2) {
uVar3 = param_2;
}
uVar3 = uVar3 + 0x1fff & 0xffffffffffffe000;
*param_1 = null_element;
param_1[0x45] = param_5;
uVar1 = 0;
if (0 < (int)param_4) {
uVar1 = param_4;
}
*(uint *)(param_1 + 0x42) = uVar1;
param_1[0x43] = param_3;
param_1[0x50] = param_6;
param_1[0x44] = 0;
*(int4 *)((long)param_1 + 0x20c) = 0;
param_1[0x46] = param_7;
param_1[0x51] = param_8;
*(int4 *)(param_1 + 0x52) = 0;
if (((int)param_4 < 0 || param_6 != 0) || (8 < param_4 && (param_4 & 7) == 0)) {
*(int4 *)(param_1 + 0x41) = 0;
*(uint *)(param_1 + 0x42) = uVar1 + 8;
}
else {
*(int4 *)(param_1 + 0x41) = 0x18;
uVar2 = (ulong)(param_4 + 0x18);
uVar4 = 1;
if (uVar2 <= uVar3) {
uVar4 = uVar3 / uVar2;
}
uVar3 = uVar4 * uVar2;
}
*(byte *)(param_1 + 0x4f) = (byte)(param_8 >> 0x12) & 1;
if ((param_8 >> 0x12 & 1) == 0) {
init_alloc_root(key_memory_TREE,param_1 + 0x47,uVar3,0);
param_1[0x4a] = (ulong)*(uint *)(param_1 + 0x42) + 0x18;
}
return;
}
|
|
16,475
|
escape_quotes_for_mysql
|
eloqsql/mysys/charset.c
|
size_t escape_quotes_for_mysql(CHARSET_INFO *charset_info,
char *to, size_t to_length,
const char *from, size_t length,
my_bool *overflow)
{
const char *to_start= to;
const char *end, *to_end=to_start + (to_length ? to_length-1 : 2*length);
#ifdef USE_MB
my_bool use_mb_flag= my_ci_use_mb(charset_info);
#endif
*overflow= FALSE;
for (end= from + length; from < end; from++)
{
#ifdef USE_MB
int tmp_length;
if (use_mb_flag && (tmp_length= my_ismbchar(charset_info, from, end)))
{
if (to + tmp_length > to_end)
{
*overflow= TRUE;
break;
}
while (tmp_length--)
*to++= *from++;
from--;
continue;
}
/*
We don't have the same issue here with a non-multi-byte character being
turned into a multi-byte character by the addition of an escaping
character, because we are only escaping the ' character with itself.
*/
#endif
if (*from == '\'')
{
if (to + 2 > to_end)
{
*overflow= TRUE;
break;
}
*to++= '\'';
*to++= '\'';
}
else
{
if (to + 1 > to_end)
{
*overflow= TRUE;
break;
}
*to++= *from;
}
}
*to= 0;
return (size_t) (to - to_start);
}
|
O0
|
c
|
escape_quotes_for_mysql:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x29d25
movq -0x18(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x29d30
movq -0x28(%rbp), %rax
shlq %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
movq -0x60(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
callq 0x29ea0
movb %al, -0x49(%rbp)
movq -0x30(%rbp), %rax
movb $0x0, (%rax)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x29e79
movsbl -0x49(%rbp), %eax
cmpl $0x0, %eax
je 0x29def
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x29ed0
movl %eax, -0x50(%rbp)
cmpl $0x0, %eax
je 0x29def
movq -0x10(%rbp), %rax
movslq -0x50(%rbp), %rcx
addq %rcx, %rax
cmpq -0x48(%rbp), %rax
jbe 0x29dab
movq -0x30(%rbp), %rax
movb $0x1, (%rax)
jmp 0x29e79
jmp 0x29dad
movl -0x50(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x50(%rbp)
cmpl $0x0, %eax
je 0x29de1
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb (%rax), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0x29dad
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x29e68
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x27, %eax
jne 0x29e38
movq -0x10(%rbp), %rax
addq $0x2, %rax
cmpq -0x48(%rbp), %rax
jbe 0x29e12
movq -0x30(%rbp), %rax
movb $0x1, (%rax)
jmp 0x29e79
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $0x27, (%rax)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $0x27, (%rax)
jmp 0x29e66
movq -0x10(%rbp), %rax
addq $0x1, %rax
cmpq -0x48(%rbp), %rax
jbe 0x29e4f
movq -0x30(%rbp), %rax
movb $0x1, (%rax)
jmp 0x29e79
movq -0x20(%rbp), %rax
movb (%rax), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0x29e68
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x29d5e
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
subq %rcx, %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
escape_quotes_for_mysql:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_10]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov [rbp+var_58], rax
cmp [rbp+var_18], 0
jz short loc_29D25
mov rax, [rbp+var_18]
sub rax, 1
mov [rbp+var_60], rax
jmp short loc_29D30
loc_29D25:
mov rax, [rbp+var_28]
shl rax, 1
mov [rbp+var_60], rax
loc_29D30:
mov rax, [rbp+var_58]
mov rcx, [rbp+var_60]
add rax, rcx
mov [rbp+var_48], rax
mov rdi, [rbp+var_8]
call my_ci_use_mb
mov [rbp+var_49], al
mov rax, [rbp+var_30]
mov byte ptr [rax], 0
mov rax, [rbp+var_20]
add rax, [rbp+var_28]
mov [rbp+var_40], rax
loc_29D5E:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_40]
jnb loc_29E79
movsx eax, [rbp+var_49]
cmp eax, 0
jz short loc_29DEF
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_40]
call my_ismbchar
mov [rbp+var_50], eax
cmp eax, 0
jz short loc_29DEF
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_50]
add rax, rcx
cmp rax, [rbp+var_48]
jbe short loc_29DAB
mov rax, [rbp+var_30]
mov byte ptr [rax], 1
jmp loc_29E79
loc_29DAB:
jmp short $+2
loc_29DAD:
mov eax, [rbp+var_50]
mov ecx, eax
add ecx, 0FFFFFFFFh
mov [rbp+var_50], ecx
cmp eax, 0
jz short loc_29DE1
mov rax, [rbp+var_20]
mov rcx, rax
add rcx, 1
mov [rbp+var_20], rcx
mov cl, [rax]
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
jmp short loc_29DAD
loc_29DE1:
mov rax, [rbp+var_20]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_20], rax
jmp short loc_29E68
loc_29DEF:
mov rax, [rbp+var_20]
movsx eax, byte ptr [rax]
cmp eax, 27h ; '''
jnz short loc_29E38
mov rax, [rbp+var_10]
add rax, 2
cmp rax, [rbp+var_48]
jbe short loc_29E12
mov rax, [rbp+var_30]
mov byte ptr [rax], 1
jmp short loc_29E79
loc_29E12:
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov byte ptr [rax], 27h ; '''
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov byte ptr [rax], 27h ; '''
jmp short loc_29E66
loc_29E38:
mov rax, [rbp+var_10]
add rax, 1
cmp rax, [rbp+var_48]
jbe short loc_29E4F
mov rax, [rbp+var_30]
mov byte ptr [rax], 1
jmp short loc_29E79
loc_29E4F:
mov rax, [rbp+var_20]
mov cl, [rax]
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
loc_29E66:
jmp short $+2
loc_29E68:
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp loc_29D5E
loc_29E79:
mov rax, [rbp+var_10]
mov byte ptr [rax], 0
mov rax, [rbp+var_10]
mov rcx, [rbp+var_38]
sub rax, rcx
add rsp, 60h
pop rbp
retn
|
_BYTE * escape_quotes_for_mysql(long long a1, char *a2, long long a3, char *a4, long long a5, _BYTE *a6)
{
char *v7; // rax
char v8; // cl
char *v9; // rax
_BYTE *v10; // rax
char *v11; // rax
long long v13; // [rsp+0h] [rbp-60h]
int v14; // [rsp+10h] [rbp-50h]
char v15; // [rsp+17h] [rbp-49h]
unsigned long long v16; // [rsp+18h] [rbp-48h]
char *v17; // [rsp+20h] [rbp-40h]
char *v21; // [rsp+50h] [rbp-10h]
v21 = a2;
if ( a3 )
v13 = a3 - 1;
else
v13 = 2 * a5;
v16 = (unsigned long long)&a2[v13];
v15 = my_ci_use_mb(a1);
*a6 = 0;
v17 = &a4[a5];
while ( a4 < v17 )
{
if ( v15 && (v14 = my_ismbchar(a1, a4, v17)) != 0 )
{
if ( (unsigned long long)&v21[v14] > v16 )
{
*a6 = 1;
break;
}
while ( v14-- )
{
v7 = a4++;
v8 = *v7;
v9 = v21++;
*v9 = v8;
}
--a4;
}
else if ( *a4 == 39 )
{
if ( (unsigned long long)(v21 + 2) > v16 )
{
*a6 = 1;
break;
}
*v21 = 39;
v10 = v21 + 1;
v21 += 2;
*v10 = 39;
}
else
{
if ( (unsigned long long)(v21 + 1) > v16 )
{
*a6 = 1;
break;
}
v11 = v21++;
*v11 = *a4;
}
++a4;
}
*v21 = 0;
return (_BYTE *)(v21 - a2);
}
|
escape_quotes_for_mysql:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x58],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00129d25
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
JMP 0x00129d30
LAB_00129d25:
MOV RAX,qword ptr [RBP + -0x28]
SHL RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
LAB_00129d30:
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x60]
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00129ea0
MOV byte ptr [RBP + -0x49],AL
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
LAB_00129d5e:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x00129e79
MOVSX EAX,byte ptr [RBP + -0x49]
CMP EAX,0x0
JZ 0x00129def
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x40]
CALL 0x00129ed0
MOV dword ptr [RBP + -0x50],EAX
CMP EAX,0x0
JZ 0x00129def
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x50]
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x48]
JBE 0x00129dab
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0x1
JMP 0x00129e79
LAB_00129dab:
JMP 0x00129dad
LAB_00129dad:
MOV EAX,dword ptr [RBP + -0x50]
MOV ECX,EAX
ADD ECX,-0x1
MOV dword ptr [RBP + -0x50],ECX
CMP EAX,0x0
JZ 0x00129de1
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x20],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
JMP 0x00129dad
LAB_00129de1:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00129e68
LAB_00129def:
MOV RAX,qword ptr [RBP + -0x20]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x27
JNZ 0x00129e38
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x48]
JBE 0x00129e12
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0x1
JMP 0x00129e79
LAB_00129e12:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV byte ptr [RAX],0x27
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV byte ptr [RAX],0x27
JMP 0x00129e66
LAB_00129e38:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
CMP RAX,qword ptr [RBP + -0x48]
JBE 0x00129e4f
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0x1
JMP 0x00129e79
LAB_00129e4f:
MOV RAX,qword ptr [RBP + -0x20]
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
LAB_00129e66:
JMP 0x00129e68
LAB_00129e68:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00129d5e
LAB_00129e79:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x38]
SUB RAX,RCX
ADD RSP,0x60
POP RBP
RET
|
long escape_quotes_for_mysql
(int8 param_1,char *param_2,long param_3,char *param_4,long param_5,
int1 *param_6)
{
char cVar1;
char *pcVar2;
long local_68;
int local_58;
char *local_28;
char *local_18;
if (param_3 == 0) {
local_68 = param_5 << 1;
}
else {
local_68 = param_3 + -1;
}
pcVar2 = param_2 + local_68;
cVar1 = my_ci_use_mb(param_1);
*param_6 = 0;
local_28 = param_4;
local_18 = param_2;
do {
if (param_4 + param_5 <= local_28) {
LAB_00129e79:
*local_18 = '\0';
return (long)local_18 - (long)param_2;
}
if ((cVar1 == '\0') ||
(local_58 = my_ismbchar(param_1,local_28,param_4 + param_5), local_58 == 0)) {
if (*local_28 == '\'') {
if (pcVar2 < local_18 + 2) {
*param_6 = 1;
goto LAB_00129e79;
}
*local_18 = '\'';
local_18[1] = '\'';
local_18 = local_18 + 2;
}
else {
if (pcVar2 < local_18 + 1) {
*param_6 = 1;
goto LAB_00129e79;
}
*local_18 = *local_28;
local_18 = local_18 + 1;
}
}
else {
if (pcVar2 < local_18 + local_58) {
*param_6 = 1;
goto LAB_00129e79;
}
while (local_58 != 0) {
*local_18 = *local_28;
local_58 = local_58 + -1;
local_28 = local_28 + 1;
local_18 = local_18 + 1;
}
local_28 = local_28 + -1;
}
local_28 = local_28 + 1;
} while( true );
}
|
|
16,476
|
LefDefParser::lefiTiming::addRiseFallSlew(double, double, double, double)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiMacro.cpp
|
void
lefiTiming::addRiseFallSlew(double one,
double two,
double three,
double four)
{
if (nowRise_) {
hasRiseSlew_ = 1;
riseSlewOne_ = one;
riseSlewTwo_ = two;
riseSlewThree_ = three;
riseSlewFour_ = four;
} else {
hasFallSlew_ = 1;
fallSlewOne_ = one;
fallSlewTwo_ = two;
fallSlewThree_ = three;
fallSlewFour_ = four;
}
}
|
O0
|
cpp
|
LefDefParser::lefiTiming::addRiseFallSlew(double, double, double, double):
movq %rdi, -0x8(%rsp)
movsd %xmm0, -0x10(%rsp)
movsd %xmm1, -0x18(%rsp)
movsd %xmm2, -0x20(%rsp)
movsd %xmm3, -0x28(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x30(%rsp)
cmpl $0x0, 0x80(%rax)
je 0x62706
movq -0x30(%rsp), %rax
movl $0x1, 0x2c(%rax)
movsd -0x10(%rsp), %xmm0
movsd %xmm0, 0x138(%rax)
movsd -0x18(%rsp), %xmm0
movsd %xmm0, 0x140(%rax)
movsd -0x20(%rsp), %xmm0
movsd %xmm0, 0x148(%rax)
movsd -0x28(%rsp), %xmm0
movsd %xmm0, 0x150(%rax)
jmp 0x6274a
movq -0x30(%rsp), %rax
movl $0x1, 0x34(%rax)
movsd -0x10(%rsp), %xmm0
movsd %xmm0, 0x170(%rax)
movsd -0x18(%rsp), %xmm0
movsd %xmm0, 0x178(%rax)
movsd -0x20(%rsp), %xmm0
movsd %xmm0, 0x180(%rax)
movsd -0x28(%rsp), %xmm0
movsd %xmm0, 0x188(%rax)
retq
nopl (%rax,%rax)
|
_ZN12LefDefParser10lefiTiming15addRiseFallSlewEdddd:
mov [rsp+var_8], rdi
movsd [rsp+var_10], xmm0
movsd [rsp+var_18], xmm1
movsd [rsp+var_20], xmm2
movsd [rsp+var_28], xmm3
mov rax, [rsp+var_8]
mov [rsp+var_30], rax
cmp dword ptr [rax+80h], 0
jz short loc_62706
mov rax, [rsp+var_30]
mov dword ptr [rax+2Ch], 1
movsd xmm0, [rsp+var_10]
movsd qword ptr [rax+138h], xmm0
movsd xmm0, [rsp+var_18]
movsd qword ptr [rax+140h], xmm0
movsd xmm0, [rsp+var_20]
movsd qword ptr [rax+148h], xmm0
movsd xmm0, [rsp+var_28]
movsd qword ptr [rax+150h], xmm0
jmp short locret_6274A
loc_62706:
mov rax, [rsp+var_30]
mov dword ptr [rax+34h], 1
movsd xmm0, [rsp+var_10]
movsd qword ptr [rax+170h], xmm0
movsd xmm0, [rsp+var_18]
movsd qword ptr [rax+178h], xmm0
movsd xmm0, [rsp+var_20]
movsd qword ptr [rax+180h], xmm0
movsd xmm0, [rsp+var_28]
movsd qword ptr [rax+188h], xmm0
locret_6274A:
retn
|
LefDefParser::lefiTiming * LefDefParser::lefiTiming::addRiseFallSlew(
LefDefParser::lefiTiming *this,
double a2,
double a3,
double a4,
double a5)
{
LefDefParser::lefiTiming *result; // rax
result = this;
if ( *((_DWORD *)this + 32) )
{
*((_DWORD *)this + 11) = 1;
*((double *)this + 39) = a2;
*((double *)this + 40) = a3;
*((double *)this + 41) = a4;
*((double *)this + 42) = a5;
}
else
{
*((_DWORD *)this + 13) = 1;
*((double *)this + 46) = a2;
*((double *)this + 47) = a3;
*((double *)this + 48) = a4;
*((double *)this + 49) = a5;
}
return result;
}
|
addRiseFallSlew:
MOV qword ptr [RSP + -0x8],RDI
MOVSD qword ptr [RSP + -0x10],XMM0
MOVSD qword ptr [RSP + -0x18],XMM1
MOVSD qword ptr [RSP + -0x20],XMM2
MOVSD qword ptr [RSP + -0x28],XMM3
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RSP + -0x30],RAX
CMP dword ptr [RAX + 0x80],0x0
JZ 0x00162706
MOV RAX,qword ptr [RSP + -0x30]
MOV dword ptr [RAX + 0x2c],0x1
MOVSD XMM0,qword ptr [RSP + -0x10]
MOVSD qword ptr [RAX + 0x138],XMM0
MOVSD XMM0,qword ptr [RSP + -0x18]
MOVSD qword ptr [RAX + 0x140],XMM0
MOVSD XMM0,qword ptr [RSP + -0x20]
MOVSD qword ptr [RAX + 0x148],XMM0
MOVSD XMM0,qword ptr [RSP + -0x28]
MOVSD qword ptr [RAX + 0x150],XMM0
JMP 0x0016274a
LAB_00162706:
MOV RAX,qword ptr [RSP + -0x30]
MOV dword ptr [RAX + 0x34],0x1
MOVSD XMM0,qword ptr [RSP + -0x10]
MOVSD qword ptr [RAX + 0x170],XMM0
MOVSD XMM0,qword ptr [RSP + -0x18]
MOVSD qword ptr [RAX + 0x178],XMM0
MOVSD XMM0,qword ptr [RSP + -0x20]
MOVSD qword ptr [RAX + 0x180],XMM0
MOVSD XMM0,qword ptr [RSP + -0x28]
MOVSD qword ptr [RAX + 0x188],XMM0
LAB_0016274a:
RET
|
/* LefDefParser::lefiTiming::addRiseFallSlew(double, double, double, double) */
void __thiscall
LefDefParser::lefiTiming::addRiseFallSlew
(lefiTiming *this,double param_1,double param_2,double param_3,double param_4)
{
if (*(int *)(this + 0x80) == 0) {
*(int4 *)(this + 0x34) = 1;
*(double *)(this + 0x170) = param_1;
*(double *)(this + 0x178) = param_2;
*(double *)(this + 0x180) = param_3;
*(double *)(this + 0x188) = param_4;
}
else {
*(int4 *)(this + 0x2c) = 1;
*(double *)(this + 0x138) = param_1;
*(double *)(this + 0x140) = param_2;
*(double *)(this + 0x148) = param_3;
*(double *)(this + 0x150) = param_4;
}
return;
}
|
|
16,477
|
minja::Parser::unexpected(minja::TemplateToken const&) const
|
monkey531[P]llama/common/minja.hpp
|
std::runtime_error unexpected(const TemplateToken & token) const {
return std::runtime_error("Unexpected " + TemplateToken::typeToString(token.type)
+ error_location_suffix(*template_str, token.location.pos));
}
|
O1
|
cpp
|
minja::Parser::unexpected(minja::TemplateToken const&) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl 0x8(%rdx), %esi
leaq 0x68(%rsp), %r12
movq %r12, %rdi
callq 0x5d844
leaq 0x50845(%rip), %rcx # 0xadb13
movl $0xb, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x18750
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5d308
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x5d310
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%r15), %rsi
movq 0x20(%r14), %rdx
leaq 0x48(%rsp), %rdi
callq 0x23408
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %r8
movq 0x50(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r12, %rcx
je 0x5d35b
movq 0x38(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x5d37a
leaq 0x58(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x5d375
movq 0x58(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x5d38b
movq 0x48(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x181d0
jmp 0x5d399
leaq 0x48(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x18750
leaq 0x18(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x5d3bd
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x5d3c3
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x18a80
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5d408
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186a0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5d423
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x186a0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x5d43a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x186a0
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5d455
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x186a0
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5d48a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x5d48a
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5d4aa
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x5d4aa
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x5d4c6
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x5d4c6
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5d4e1
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x186a0
movq %rbx, %rdi
callq 0x18ba0
nop
|
_ZNK5minja6Parser10unexpectedERKNS_13TemplateTokenE:
push r15; int
push r14; int
push r12; int
push rbx; int
sub rsp, 88h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov esi, [rdx+8]
lea r12, [rsp+0A8h+var_40]
mov rdi, r12
call _ZN5minja13TemplateToken12typeToStringB5cxx11ENS0_4TypeE; minja::TemplateToken::typeToString(minja::TemplateToken::Type)
lea rcx, aUnexpected_0; "Unexpected "
mov r8d, 0Bh
mov rdi, r12
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
lea r12, [rsp+0A8h+var_70]
mov [r12-10h], r12
mov rdx, [rax]
mov rcx, rax
add rcx, 10h; int
cmp rdx, rcx
jz short loc_5D308
mov [rsp+0A8h+var_80], rdx
mov rdx, [rcx]
mov [rsp+0A8h+var_70], rdx
jmp short loc_5D310
loc_5D308:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r12], xmm0
loc_5D310:
mov rdx, [rax+8]
mov qword ptr [rsp+0A8h+var_78], rdx; int
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rsi, [r15]; int
mov rdx, [r14+20h]; int
lea rdi, [rsp+0A8h+var_60]; int
call _ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; minja::error_location_suffix(std::string const&,ulong)
mov rcx, [rsp+0A8h+var_80]
mov r8, qword ptr [rsp+0A8h+var_78]
mov rdx, [rsp+0A8h+var_58]
lea rax, [rdx+r8]
mov esi, 0Fh
cmp rcx, r12
jz short loc_5D35B
mov rsi, [rsp+0A8h+var_70]
loc_5D35B:
cmp rax, rsi
jbe short loc_5D37A
lea rdi, [rsp+0A8h+var_50]
mov esi, 0Fh
cmp [rdi-10h], rdi
jz short loc_5D375
mov rsi, [rsp+0A8h+var_50]
loc_5D375:
cmp rax, rsi
jbe short loc_5D38B
loc_5D37A:
mov rsi, qword ptr [rsp+0A8h+var_60]
lea rdi, [rsp+0A8h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
jmp short loc_5D399
loc_5D38B:
lea rdi, [rsp+0A8h+var_60]
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
loc_5D399:
lea rdx, [rsp+0A8h+var_90]
mov [rdx-10h], rdx
mov rsi, [rax]
lea rcx, [rax+10h]
cmp rsi, rcx
jz short loc_5D3BD
mov [rsp+0A8h+var_A0], rsi
mov rdx, [rcx]
mov [rsp+0A8h+var_90], rdx
jmp short loc_5D3C3
loc_5D3BD:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rdx], xmm0
loc_5D3C3:
mov rdx, rax
add rdx, 8
mov rsi, [rax+8]
mov [rsp+0A8h+var_98], rsi
mov [rax], rcx
mov qword ptr [rdx], 0
mov byte ptr [rcx], 0
lea rsi, [rsp+0A8h+var_A0]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
lea rax, [rsp+0A8h+var_90]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5D408
mov rsi, [rsp+0A8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5D408:
lea rax, [rsp+0A8h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5D423
mov rsi, [rsp+0A8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5D423:
mov rdi, [rsp+0A8h+var_80]; void *
cmp rdi, r12
jz short loc_5D43A
mov rsi, [rsp+0A8h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5D43A:
lea rax, [rsp+0A8h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5D455
mov rsi, [rsp+0A8h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5D455:
mov rax, rbx
add rsp, 88h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5D48A
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_5D48A
mov rbx, rax
loc_5D48A:
lea rax, [rsp+arg_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5D4AA
mov rsi, [rsp+arg_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_5D4AA
mov rbx, rax
loc_5D4AA:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r12
jz short loc_5D4C6
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_5D4C6
mov rbx, rax
loc_5D4C6:
lea rax, [rsp+arg_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5D4E1
mov rsi, [rsp+arg_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5D4E1:
mov rdi, rbx
call __Unwind_Resume
|
minja::Parser * minja::Parser::unexpected(minja::Parser *this, long long **a2, long long a3)
{
long long v4; // rax
__int128 *v5; // rcx
unsigned long long v6; // rax
unsigned long long v7; // rsi
unsigned long long v8; // rsi
void **v9; // rax
__int128 *v10; // rcx
void *v12[2]; // [rsp+8h] [rbp-A0h] BYREF
__int128 v13; // [rsp+18h] [rbp-90h] BYREF
void *v14; // [rsp+28h] [rbp-80h] BYREF
int v15[2]; // [rsp+30h] [rbp-78h]
__int128 v16; // [rsp+38h] [rbp-70h] BYREF
int v17[2]; // [rsp+48h] [rbp-60h] BYREF
long long v18; // [rsp+50h] [rbp-58h]
_QWORD v19[2]; // [rsp+58h] [rbp-50h] BYREF
void *v20[2]; // [rsp+68h] [rbp-40h] BYREF
long long v21; // [rsp+78h] [rbp-30h] BYREF
minja::TemplateToken::typeToString[abi:cxx11](v20, *(unsigned int *)(a3 + 8));
v4 = std::string::replace(v20, 0LL, 0LL, "Unexpected ", 11LL);
v14 = &v16;
v5 = (__int128 *)(v4 + 16);
if ( *(_QWORD *)v4 == v4 + 16 )
{
v16 = *v5;
}
else
{
v14 = *(void **)v4;
*(_QWORD *)&v16 = *(_QWORD *)v5;
}
*(_QWORD *)v15 = *(_QWORD *)(v4 + 8);
*(_QWORD *)v4 = v5;
*(_QWORD *)(v4 + 8) = 0LL;
*(_BYTE *)(v4 + 16) = 0;
minja::error_location_suffix((long long)v17, *a2, *(_QWORD *)(a3 + 32));
v6 = v18 + *(_QWORD *)v15;
v7 = 15LL;
if ( v14 != &v16 )
v7 = v16;
if ( v6 <= v7 )
goto LABEL_10;
v8 = 15LL;
if ( *(_QWORD **)v17 != v19 )
v8 = v19[0];
if ( v6 <= v8 )
v9 = (void **)std::string::replace(v17, 0LL, 0LL, v14, *(_QWORD *)v15);
else
LABEL_10:
v9 = (void **)std::string::_M_append(&v14, *(_QWORD *)v17);
v12[0] = &v13;
v10 = (__int128 *)(v9 + 2);
if ( *v9 == v9 + 2 )
{
v13 = *v10;
}
else
{
v12[0] = *v9;
*(_QWORD *)&v13 = *(_QWORD *)v10;
}
v12[1] = v9[1];
*v9 = v10;
v9[1] = 0LL;
*(_BYTE *)v10 = 0;
std::runtime_error::runtime_error(this, v12);
if ( v12[0] != &v13 )
operator delete(v12[0], v13 + 1);
if ( *(_QWORD **)v17 != v19 )
operator delete(*(void **)v17, v19[0] + 1LL);
if ( v14 != &v16 )
operator delete(v14, v16 + 1);
if ( v20[0] != &v21 )
operator delete(v20[0], v21 + 1);
return this;
}
|
unexpected:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV ESI,dword ptr [RDX + 0x8]
LEA R12,[RSP + 0x68]
MOV RDI,R12
CALL 0x0015d844
LAB_0015d2c7:
LEA RCX,[0x1adb13]
MOV R8D,0xb
MOV RDI,R12
XOR ESI,ESI
XOR EDX,EDX
CALL 0x00118750
LEA R12,[RSP + 0x38]
MOV qword ptr [R12 + -0x10],R12
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x0015d308
MOV qword ptr [RSP + 0x28],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x38],RDX
JMP 0x0015d310
LAB_0015d308:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R12],XMM0
LAB_0015d310:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R14 + 0x20]
LAB_0015d32f:
LEA RDI,[RSP + 0x48]
CALL 0x00123408
MOV RCX,qword ptr [RSP + 0x28]
MOV R8,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x50]
LEA RAX,[RDX + R8*0x1]
MOV ESI,0xf
CMP RCX,R12
JZ 0x0015d35b
MOV RSI,qword ptr [RSP + 0x38]
LAB_0015d35b:
CMP RAX,RSI
JBE 0x0015d37a
LEA RDI,[RSP + 0x58]
MOV ESI,0xf
CMP qword ptr [RDI + -0x10],RDI
JZ 0x0015d375
MOV RSI,qword ptr [RSP + 0x58]
LAB_0015d375:
CMP RAX,RSI
JBE 0x0015d38b
LAB_0015d37a:
MOV RSI,qword ptr [RSP + 0x48]
LAB_0015d37f:
LEA RDI,[RSP + 0x28]
CALL 0x001181d0
JMP 0x0015d399
LAB_0015d38b:
LEA RDI,[RSP + 0x48]
XOR ESI,ESI
XOR EDX,EDX
CALL 0x00118750
LAB_0015d399:
LEA RDX,[RSP + 0x18]
MOV qword ptr [RDX + -0x10],RDX
MOV RSI,qword ptr [RAX]
LEA RCX,[RAX + 0x10]
CMP RSI,RCX
JZ 0x0015d3bd
MOV qword ptr [RSP + 0x8],RSI
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x18],RDX
JMP 0x0015d3c3
LAB_0015d3bd:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RDX],XMM0
LAB_0015d3c3:
MOV RDX,RAX
ADD RDX,0x8
MOV RSI,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x10],RSI
MOV qword ptr [RAX],RCX
MOV qword ptr [RDX],0x0
MOV byte ptr [RCX],0x0
LAB_0015d3e0:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00118a80
LAB_0015d3ed:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0015d408
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001186a0
LAB_0015d408:
LEA RAX,[RSP + 0x58]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0015d423
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x001186a0
LAB_0015d423:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R12
JZ 0x0015d43a
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x001186a0
LAB_0015d43a:
LEA RAX,[RSP + 0x78]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0015d455
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x001186a0
LAB_0015d455:
MOV RAX,RBX
ADD RSP,0x88
POP RBX
POP R12
POP R14
POP R15
RET
|
/* minja::Parser::unexpected(minja::TemplateToken const&) const */
TemplateToken * minja::Parser::unexpected(TemplateToken *param_1)
{
long *plVar1;
int8 *puVar2;
ulong *puVar3;
long in_RDX;
int8 *in_RSI;
ulong uVar4;
long *local_a0;
int8 local_98;
long local_90;
int8 uStack_88;
ulong *local_80;
long local_78;
ulong local_70;
long lStack_68;
ulong *local_60;
long local_58;
ulong local_50 [2];
long *local_40 [2];
long local_30 [2];
TemplateToken::typeToString_abi_cxx11_((TemplateToken *)local_40);
/* try { // try from 0015d2c7 to 0015d2df has its CatchHandler @ 0015d4c3 */
plVar1 = (long *)std::__cxx11::string::replace((ulong)local_40,0,(char *)0x0,0x1adb13);
puVar3 = (ulong *)(plVar1 + 2);
if ((ulong *)*plVar1 == puVar3) {
local_70 = *puVar3;
lStack_68 = plVar1[3];
local_80 = &local_70;
}
else {
local_70 = *puVar3;
local_80 = (ulong *)*plVar1;
}
local_78 = plVar1[1];
*plVar1 = (long)puVar3;
plVar1[1] = 0;
*(int1 *)(plVar1 + 2) = 0;
/* try { // try from 0015d32f to 0015d338 has its CatchHandler @ 0015d4a7 */
error_location_suffix((minja *)&local_60,(string *)*in_RSI,*(ulong *)(in_RDX + 0x20));
uVar4 = 0xf;
if (local_80 != &local_70) {
uVar4 = local_70;
}
if (uVar4 < (ulong)(local_58 + local_78)) {
uVar4 = 0xf;
if (local_60 != local_50) {
uVar4 = local_50[0];
}
if ((ulong)(local_58 + local_78) <= uVar4) {
puVar2 = (int8 *)
std::__cxx11::string::replace((ulong)&local_60,0,(char *)0x0,(ulong)local_80);
goto LAB_0015d399;
}
}
/* try { // try from 0015d37f to 0015d398 has its CatchHandler @ 0015d487 */
puVar2 = (int8 *)std::__cxx11::string::_M_append((char *)&local_80,(ulong)local_60);
LAB_0015d399:
local_a0 = &local_90;
plVar1 = puVar2 + 2;
if ((long *)*puVar2 == plVar1) {
local_90 = *plVar1;
uStack_88 = puVar2[3];
}
else {
local_90 = *plVar1;
local_a0 = (long *)*puVar2;
}
local_98 = puVar2[1];
*puVar2 = plVar1;
puVar2[1] = 0;
*(int1 *)plVar1 = 0;
/* try { // try from 0015d3e0 to 0015d3ec has its CatchHandler @ 0015d467 */
std::runtime_error::runtime_error((runtime_error *)param_1,(string *)&local_a0);
if (local_a0 != &local_90) {
operator_delete(local_a0,local_90 + 1);
}
if (local_60 != local_50) {
operator_delete(local_60,local_50[0] + 1);
}
if (local_80 != &local_70) {
operator_delete(local_80,local_70 + 1);
}
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
return param_1;
}
|
|
16,478
|
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>::at<char const (&) [5], 0>(char const (&) [5])
|
monkey531[P]llama/common/json.hpp
|
reference at(KeyType && key)
{
// 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 set_parent(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>& 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 (&) [5], 0>(char const (&) [5]):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0xa8afb
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0xa8ae5
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1b250
testl %eax, %eax
je 0xa8ada
addq $0x30, %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
jne 0xa8abb
jmp 0xa8add
movq %rbx, %rax
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rbx
cmpq %rbx, %rax
je 0xa8b59
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x1b4d0
movq %rax, %rbx
movq %r14, %rdi
callq 0x62a40
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x4b7ec(%rip), %rsi # 0xf4309
leaq 0x20(%rsp), %rdi
callq 0xae8c9
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x627e8
xorl %ebp, %ebp
leaq 0x85400(%rip), %rsi # 0x12df48
leaq -0x49e55(%rip), %rdx # 0x5ecfa
movq %rbx, %rdi
callq 0x1c1c0
jmp 0xa8bd2
movl $0x20, %edi
callq 0x1b4d0
movq %rax, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x1b440
leaq (%rax,%r15), %rdx
movq %rsp, %rdi
movq %r15, %rsi
callq 0x261e8
leaq 0x4b7ab(%rip), %rsi # 0xf4339
leaq 0x4b7aa(%rip), %rcx # 0xf433f
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xaeea6
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x60e5c
xorl %ebp, %ebp
leaq 0x85305(%rip), %rsi # 0x12dec8
leaq -0x49ed0(%rip), %rdx # 0x5ecfa
movq %rbx, %rdi
callq 0x1c1c0
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa8bf0
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1ba60
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xa8c3b
movq 0x10(%rsp), %rsi
jmp 0xa8c33
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xa8c45
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1ba60
jmp 0xa8c45
jmp 0xa8c42
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa8c3b
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1ba60
testb %bpl, %bpl
jne 0xa8c45
jmp 0xa8c4d
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b760
movq %r14, %rdi
callq 0x1c250
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_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_A8AFB
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
mov rax, [r12+8]
cmp rbx, rax
jz short loc_A8AE5
loc_A8ABB:
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_A8ADA
add rbx, 30h ; '0'
mov rax, [r12+8]
cmp rbx, rax
jnz short loc_A8ABB
jmp short loc_A8ADD
loc_A8ADA:
mov rax, rbx
loc_A8ADD:
mov rcx, [r14+8]
mov rbx, [rcx+8]
loc_A8AE5:
cmp rax, rbx
jz short loc_A8B59
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_A8AFB:
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_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_A8BD2
loc_A8B59:
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_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_A8BD2:
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A8BF0
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A8BF0:
mov rdi, [rsp+68h+var_68]
cmp rdi, r12
jz short loc_A8C3B
mov rsi, [rsp+68h+var_58]
jmp short loc_A8C33
mov r14, rax
mov rdi, [rsp+68h+var_68]; void *
cmp rdi, r12
jz short loc_A8C45
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A8C45
jmp short loc_A8C42
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A8C3B
mov rsi, [rsp+68h+var_38]
loc_A8C33:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A8C3B:
test bpl, bpl
jnz short loc_A8C45
jmp short loc_A8C4D
loc_A8C42:
mov r14, rax
loc_A8C45:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_A8C4D:
mov rdi, r14
call __Unwind_Resume
|
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_(
long long a1,
_BYTE *a2)
{
long long *v2; // r12
long long v3; // rbx
long long v4; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx
long long v8; // rax
void *v9[2]; // [rsp+0h] [rbp-68h] BYREF
long long v10; // [rsp+10h] [rbp-58h] BYREF
_QWORD v11[2]; // [rsp+20h] [rbp-48h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = (void *)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(&)[22],char const*>(v11, "cannot use at() with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
304,
v11);
__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);
}
v2 = *(long long **)(a1 + 8);
v3 = *v2;
v4 = v2[1];
if ( *v2 != v4 )
{
while ( (unsigned int)std::string::compare(v3, a2) )
{
v3 += 48LL;
v4 = v2[1];
if ( v3 == v4 )
goto LABEL_7;
}
v4 = v3;
LABEL_7:
v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL);
}
if ( v4 == v3 )
{
v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = &v10;
v8 = strlen(a2);
std::string::_M_construct<char const*>((long long)v9, a2, (long long)&a2[v8]);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
v11,
"key '",
v9,
"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
v7,
403,
v11);
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v4 + 32;
}
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x001a8afb
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x001a8ae5
LAB_001a8abb:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011b250
TEST EAX,EAX
JZ 0x001a8ada
ADD RBX,0x30
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JNZ 0x001a8abb
JMP 0x001a8add
LAB_001a8ada:
MOV RAX,RBX
LAB_001a8add:
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x8]
LAB_001a8ae5:
CMP RAX,RBX
JZ 0x001a8b59
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001a8afb:
MOV EDI,0x20
CALL 0x0011b4d0
MOV RBX,RAX
MOV RDI,R14
CALL 0x00162a40
MOV RDX,RSP
MOV qword ptr [RDX],RAX
LAB_001a8b16:
LEA RSI,[0x1f4309]
LEA RDI,[RSP + 0x20]
CALL 0x001ae8c9
MOV BPL,0x1
LAB_001a8b2a:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x001627e8
XOR EBP,EBP
LEA RSI,[0x22df48]
LEA RDX,[0x15ecfa]
MOV RDI,RBX
CALL 0x0011c1c0
LAB_001a8b59:
MOV EDI,0x20
CALL 0x0011b4d0
MOV RBX,RAX
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x0011b440
LEA RDX,[RAX + R15*0x1]
LAB_001a8b7c:
MOV RDI,RSP
MOV RSI,R15
CALL 0x001261e8
LAB_001a8b87:
LEA RSI,[0x1f4339]
LEA RCX,[0x1f433f]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001aeea6
MOV BPL,0x1
LAB_001a8ba5:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x00160e5c
XOR EBP,EBP
LEA RSI,[0x22dec8]
LEA RDX,[0x15ecfa]
MOV RDI,RBX
CALL 0x0011c1c0
|
char * _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_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 001a8b16 to 001a8b26 has its CatchHandler @ 001a8c42 */
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 001a8b2a to 001a8b56 has its CatchHandler @ 001a8c1d */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(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 001a8b7c to 001a8b86 has its CatchHandler @ 001a8c1b */
std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5);
/* try { // try from 001a8b87 to 001a8ba1 has its CatchHandler @ 001a8c00 */
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 001a8ba5 to 001a8bd1 has its CatchHandler @ 001a8bd2 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(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;
}
|
|
16,479
|
Json::Reader::pushError(Json::Value const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
aimrt_mujoco_sim/_deps/jsoncpp-src/src/lib_json/json_reader.cpp
|
bool Reader::pushError(const Value& value, const String& message) {
ptrdiff_t const length = end_ - begin_;
if (value.getOffsetStart() > length || value.getOffsetLimit() > length)
return false;
Token token;
token.type_ = tokenError;
token.start_ = begin_ + value.getOffsetStart();
token.end_ = begin_ + value.getOffsetLimit();
ErrorInfo info;
info.token_ = token;
info.message_ = message;
info.extra_ = nullptr;
errors_.push_back(info);
return true;
}
|
O3
|
cpp
|
Json::Reader::pushError(Json::Value const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0xc8(%rdi), %r12
subq 0xc0(%rdi), %r12
movq %rsi, %rdi
callq 0x79ac6
cmpq %r12, %rax
jg 0x6f9fe
movq %r15, %rdi
callq 0x79acc
cmpq %r12, %rax
jle 0x6fa05
xorl %eax, %eax
jmp 0x6fa86
movq 0xc0(%rbx), %r13
movq %r15, %rdi
callq 0x79ac6
movq %rax, %r12
addq %r13, %r12
movq 0xc0(%rbx), %r13
movq %r15, %rdi
callq 0x79acc
addq %r13, %rax
leaq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
movl $0xd, -0x28(%r15)
movq %r12, -0x20(%r15)
movq %rax, -0x18(%r15)
movq %r14, %rsi
callq 0x1f200
movq %rsp, %rsi
movq $0x0, 0x38(%rsi)
addq $0x50, %rbx
movq %rbx, %rdi
callq 0x739a4
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x6fa84
callq 0x1f0e0
movb $0x1, %al
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x6faa6
callq 0x1f0e0
movq %rbx, %rdi
callq 0x1ffd0
|
_ZN4Json6Reader9pushErrorERKNS_5ValueERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 40h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov r12, [rdi+0C8h]
sub r12, [rdi+0C0h]
mov rdi, rsi; this
call _ZNK4Json5Value14getOffsetStartEv; Json::Value::getOffsetStart(void)
cmp rax, r12
jg short loc_6F9FE
mov rdi, r15; this
call _ZNK4Json5Value14getOffsetLimitEv; Json::Value::getOffsetLimit(void)
cmp rax, r12
jle short loc_6FA05
loc_6F9FE:
xor eax, eax
jmp loc_6FA86
loc_6FA05:
mov r13, [rbx+0C0h]
mov rdi, r15; this
call _ZNK4Json5Value14getOffsetStartEv; Json::Value::getOffsetStart(void)
mov r12, rax
add r12, r13
mov r13, [rbx+0C0h]
mov rdi, r15; this
call _ZNK4Json5Value14getOffsetLimitEv; Json::Value::getOffsetLimit(void)
add rax, r13
lea rdi, [rsp+68h+var_50]
lea r15, [rsp+68h+var_40]
mov [r15-10h], r15
mov qword ptr [r15-8], 0
mov byte ptr [r15], 0
mov dword ptr [r15-28h], 0Dh
mov [r15-20h], r12
mov [r15-18h], rax
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
mov rsi, rsp
mov qword ptr [rsi+38h], 0
add rbx, 50h ; 'P'
mov rdi, rbx
call _ZNSt5dequeIN4Json6Reader9ErrorInfoESaIS2_EE9push_backERKS2_; std::deque<Json::Reader::ErrorInfo>::push_back(Json::Reader::ErrorInfo const&)
mov rdi, [rsp+68h+var_50]; void *
cmp rdi, r15
jz short loc_6FA84
call __ZdlPv; operator delete(void *)
loc_6FA84:
mov al, 1
loc_6FA86:
add rsp, 40h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+arg_10]; void *
cmp rdi, r15
jz short loc_6FAA6
call __ZdlPv; operator delete(void *)
loc_6FAA6:
mov rdi, rbx
call __Unwind_Resume
|
char Json::Reader::pushError(long long a1, Json::Value *a2, long long a3)
{
long long v4; // r12
long long v6; // r13
long long v7; // r12
long long v8; // r13
long long v9; // rdx
long long v10; // rcx
long long v11; // r8
long long v12; // r9
int v13; // [rsp+0h] [rbp-68h] BYREF
long long v14; // [rsp+8h] [rbp-60h]
long long v15; // [rsp+10h] [rbp-58h]
void *v16[2]; // [rsp+18h] [rbp-50h] BYREF
_BYTE v17[16]; // [rsp+28h] [rbp-40h] BYREF
long long v18; // [rsp+38h] [rbp-30h]
v4 = *(_QWORD *)(a1 + 200) - *(_QWORD *)(a1 + 192);
if ( Json::Value::getOffsetStart(a2) > v4 || Json::Value::getOffsetLimit(a2) > v4 )
return 0;
v6 = *(_QWORD *)(a1 + 192);
v7 = v6 + Json::Value::getOffsetStart(a2);
v8 = *(_QWORD *)(a1 + 192);
v16[0] = v17;
v16[1] = 0LL;
v17[0] = 0;
v13 = 13;
v14 = v7;
v15 = v8 + Json::Value::getOffsetLimit(a2);
std::string::_M_assign(v16, a3);
v18 = 0LL;
((void ( *)(long long, int *, long long, long long, long long, long long))std::deque<Json::Reader::ErrorInfo>::push_back)(
a1 + 80,
&v13,
v9,
v10,
v11,
v12);
if ( v16[0] != v17 )
operator delete(v16[0]);
return 1;
}
|
pushError:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV R12,qword ptr [RDI + 0xc8]
SUB R12,qword ptr [RDI + 0xc0]
MOV RDI,RSI
CALL 0x00179ac6
CMP RAX,R12
JG 0x0016f9fe
MOV RDI,R15
CALL 0x00179acc
CMP RAX,R12
JLE 0x0016fa05
LAB_0016f9fe:
XOR EAX,EAX
JMP 0x0016fa86
LAB_0016fa05:
MOV R13,qword ptr [RBX + 0xc0]
MOV RDI,R15
CALL 0x00179ac6
MOV R12,RAX
ADD R12,R13
MOV R13,qword ptr [RBX + 0xc0]
MOV RDI,R15
CALL 0x00179acc
ADD RAX,R13
LEA RDI,[RSP + 0x18]
LEA R15,[RSP + 0x28]
MOV qword ptr [R15 + -0x10],R15
MOV qword ptr [R15 + -0x8],0x0
MOV byte ptr [R15],0x0
MOV dword ptr [R15 + -0x28],0xd
MOV qword ptr [R15 + -0x20],R12
MOV qword ptr [R15 + -0x18],RAX
LAB_0016fa56:
MOV RSI,R14
CALL 0x0011f200
MOV RSI,RSP
MOV qword ptr [RSI + 0x38],0x0
ADD RBX,0x50
MOV RDI,RBX
CALL 0x001739a4
LAB_0016fa75:
MOV RDI,qword ptr [RSP + 0x18]
CMP RDI,R15
JZ 0x0016fa84
CALL 0x0011f0e0
LAB_0016fa84:
MOV AL,0x1
LAB_0016fa86:
ADD RSP,0x40
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* Json::Reader::pushError(Json::Value const&, std::__cxx11::string const&) */
int8 __thiscall Json::Reader::pushError(Reader *this,Value *param_1,string *param_2)
{
long lVar1;
long lVar2;
long lVar3;
int4 local_68 [2];
long local_60;
long local_58;
int1 *local_50;
int8 local_48;
int1 local_40 [16];
int8 local_30;
lVar1 = *(long *)(this + 200);
lVar2 = *(long *)(this + 0xc0);
lVar3 = Value::getOffsetStart(param_1);
if ((lVar3 <= lVar1 - lVar2) && (lVar3 = Value::getOffsetLimit(param_1), lVar3 <= lVar1 - lVar2))
{
lVar1 = *(long *)(this + 0xc0);
lVar3 = Value::getOffsetStart(param_1);
lVar2 = *(long *)(this + 0xc0);
local_58 = Value::getOffsetLimit(param_1);
local_58 = local_58 + lVar2;
local_48 = 0;
local_40[0] = 0;
local_68[0] = 0xd;
local_60 = lVar3 + lVar1;
local_50 = local_40;
/* try { // try from 0016fa56 to 0016fa74 has its CatchHandler @ 0016fa94 */
std::__cxx11::string::_M_assign((string *)&local_50,param_2);
local_30 = 0;
std::deque<Json::Reader::ErrorInfo,std::allocator<Json::Reader::ErrorInfo>>::push_back
((deque<Json::Reader::ErrorInfo,std::allocator<Json::Reader::ErrorInfo>> *)
(this + 0x50),(ErrorInfo *)local_68);
if (local_50 != local_40) {
operator_delete(local_50);
}
return 1;
}
return 0;
}
|
|
16,480
|
std::vector<int, std::allocator<int>> string_split<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char)
|
llama.cpp/common/common.h
|
static std::vector<T> string_split(const std::string & str, char delim) {
static_assert(!std::is_same<T, std::string>::value, "Please use the specialized version for std::string");
std::vector<T> values;
std::istringstream str_stream(str);
std::string token;
while (std::getline(str_stream, token, delim)) {
T value;
std::istringstream token_stream(token);
token_stream >> value;
values.push_back(value);
}
return values;
}
|
O3
|
c
|
std::vector<int, std::allocator<int>> string_split<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x328, %rsp # imm = 0x328
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
xorl %r14d, %r14d
movq %r14, 0x10(%rdi)
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movl $0x8, %edx
callq 0x20780
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movq %r14, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x8(%rsp), %r12
leaq 0x1a8(%rsp), %r13
leaq 0x4(%rsp), %rbp
movq 0xff773(%rip), %r14 # 0x161fd0
movq %r15, %rdi
movq %r12, %rsi
movl $0x2c, %edx
callq 0x20040
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x628d5
movq %r13, %rdi
movq %r12, %rsi
movl $0x8, %edx
callq 0x20780
movq %r13, %rdi
movq %rbp, %rsi
callq 0x21360
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x628b0
movl 0x4(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x628bb
movq %rbx, %rdi
movq %rbp, %rdx
callq 0x8ffc2
movq %r13, %rdi
movq %r14, %rsi
callq 0x20fa0
leaq 0x220(%rsp), %rdi
callq 0x20c20
jmp 0x6285d
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x628f1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x20170
movq 0xff6d8(%rip), %rsi # 0x161fd0
leaq 0x28(%rsp), %rdi
callq 0x20fa0
leaq 0xa0(%rsp), %rdi
callq 0x20c20
addq $0x328, %rsp # imm = 0x328
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x62923
movq %rax, %r14
jmp 0x6294c
movq %rax, %r14
movq 0xff69e(%rip), %rsi # 0x161fd0
leaq 0x1a8(%rsp), %rdi
callq 0x20fa0
leaq 0x220(%rsp), %rdi
callq 0x20c20
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x62968
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x20170
movq 0xff661(%rip), %rsi # 0x161fd0
leaq 0x28(%rsp), %rdi
callq 0x20fa0
leaq 0xa0(%rsp), %rdi
callq 0x20c20
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x6299a
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x20170
movq %r14, %rdi
callq 0x20ad0
|
_ZL12string_splitIiESt6vectorIT_SaIS1_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 328h
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
xor r14d, r14d
mov [rdi+10h], r14
lea r15, [rsp+358h+var_330]
mov rdi, r15
mov edx, 8
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode)
lea rax, [rsp+358h+var_340]
mov [rax-10h], rax
mov [rax-8], r14
mov byte ptr [rax], 0
lea r12, [rsp+358h+var_350]
lea r13, [rsp+358h+var_1B0]
lea rbp, [rsp+358h+var_354]
mov r14, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr
loc_6285D:
mov rdi, r15
mov rsi, r12
mov edx, 2Ch ; ','
call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &,char)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
jnz short loc_628D5
mov rdi, r13
mov rsi, r12
mov edx, 8
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode)
mov rdi, r13
mov rsi, rbp
call __ZNSirsERi; std::istream::operator>>(int &)
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jz short loc_628B0
mov eax, [rsp+358h+var_354]
mov [rsi], eax
add rsi, 4
mov [rbx+8], rsi
jmp short loc_628BB
loc_628B0:
mov rdi, rbx
mov rdx, rbp
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
loc_628BB:
mov rdi, r13
mov rsi, r14
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream()
lea rdi, [rsp+358h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
jmp short loc_6285D
loc_628D5:
mov rdi, [rsp+358h+var_350]; void *
lea rax, [rsp+358h+var_340]
cmp rdi, rax
jz short loc_628F1
mov rsi, [rsp+358h+var_340]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_628F1:
mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+358h+var_330]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream()
lea rdi, [rsp+358h+var_2B8]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
add rsp, 328h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_62923:
mov r14, rax
jmp short loc_6294C
mov r14, rax
mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_1A0]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream()
lea rdi, [rsp+arg_218]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
loc_6294C:
mov rdi, [rsp+arg_0]; void *
lea rax, [rsp+arg_10]
cmp rdi, rax
jz short loc_62968
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_62968:
mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_20]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream()
lea rdi, [rsp+arg_98]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, [rbx]; void *
test rdi, rdi
jz short loc_6299A
mov rsi, [rbx+10h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6299A:
mov rdi, r14
call __Unwind_Resume
|
void string_split<int>(long long a1, long long a2)
{
_QWORD *v2; // rax
_DWORD *v3; // rsi
int v4; // [rsp+4h] [rbp-354h] BYREF
void *v5[2]; // [rsp+8h] [rbp-350h] BYREF
_QWORD v6[2]; // [rsp+18h] [rbp-340h] BYREF
_BYTE v7[120]; // [rsp+28h] [rbp-330h] BYREF
_BYTE v8[264]; // [rsp+A0h] [rbp-2B8h] BYREF
_BYTE v9[120]; // [rsp+1A8h] [rbp-1B0h] BYREF
_BYTE v10[312]; // [rsp+220h] [rbp-138h] BYREF
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
std::istringstream::basic_istringstream(v7, a2, 8LL);
v5[0] = v6;
v5[1] = 0LL;
LOBYTE(v6[0]) = 0;
while ( 1 )
{
v2 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v7, v5, 44LL);
if ( (*((_BYTE *)v2 + *(_QWORD *)(*v2 - 24LL) + 32) & 5) != 0 )
break;
std::istringstream::basic_istringstream(v9, v5, 8LL);
std::istream::operator>>(v9, &v4);
v3 = *(_DWORD **)(a1 + 8);
if ( v3 == *(_DWORD **)(a1 + 16) )
{
std::vector<int>::_M_realloc_insert<int const&>(a1, v3, &v4);
}
else
{
*v3 = v4;
*(_QWORD *)(a1 + 8) = v3 + 1;
}
std::istringstream::~istringstream(v9, &`VTT for'std::istringstream);
std::ios_base::~ios_base((std::ios_base *)v10);
}
if ( v5[0] != v6 )
operator delete(v5[0], v6[0] + 1LL);
std::istringstream::~istringstream(v7, &`VTT for'std::istringstream);
std::ios_base::~ios_base((std::ios_base *)v8);
}
|
string_split<int>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x328
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
XOR R14D,R14D
MOV qword ptr [RDI + 0x10],R14
LEA R15,[RSP + 0x28]
MOV RDI,R15
MOV EDX,0x8
CALL 0x00120780
LEA RAX,[RSP + 0x18]
MOV qword ptr [RAX + -0x10],RAX
MOV qword ptr [RAX + -0x8],R14
MOV byte ptr [RAX],0x0
LEA R12,[RSP + 0x8]
LEA R13,[RSP + 0x1a8]
LEA RBP,[RSP + 0x4]
MOV R14,qword ptr [0x00261fd0]
LAB_0016285d:
MOV RDI,R15
MOV RSI,R12
MOV EDX,0x2c
CALL 0x00120040
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5
JNZ 0x001628d5
LAB_0016287b:
MOV RDI,R13
MOV RSI,R12
MOV EDX,0x8
CALL 0x00120780
LAB_0016288b:
MOV RDI,R13
MOV RSI,RBP
CALL 0x00121360
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JZ 0x001628b0
MOV EAX,dword ptr [RSP + 0x4]
MOV dword ptr [RSI],EAX
ADD RSI,0x4
MOV qword ptr [RBX + 0x8],RSI
JMP 0x001628bb
LAB_001628b0:
MOV RDI,RBX
MOV RDX,RBP
CALL 0x0018ffc2
LAB_001628bb:
MOV RDI,R13
MOV RSI,R14
CALL 0x00120fa0
LEA RDI,[RSP + 0x220]
CALL 0x00120c20
JMP 0x0016285d
LAB_001628d5:
MOV RDI,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x001628f1
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00120170
LAB_001628f1:
MOV RSI,qword ptr [0x00261fd0]
LEA RDI,[RSP + 0x28]
CALL 0x00120fa0
LEA RDI,[RSP + 0xa0]
CALL 0x00120c20
ADD RSP,0x328
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* std::vector<int, std::allocator<int> > string_split<int>(std::__cxx11::string const&, char) */
void string_split<int>(string *param_1,char param_2)
{
int *piVar1;
istream *piVar2;
int7 in_register_00000031;
int local_354;
int1 *local_350;
int8 local_348;
int1 local_340;
int7 uStack_33f;
istream local_330 [120];
ios_base local_2b8 [264];
istream local_1b0 [120];
ios_base local_138 [264];
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
std::__cxx11::istringstream::istringstream
((istringstream *)local_330,CONCAT71(in_register_00000031,param_2),8);
local_350 = &local_340;
local_348 = 0;
local_340 = 0;
while( true ) {
/* try { // try from 0016285d to 0016286c has its CatchHandler @ 00162923 */
piVar2 = std::getline<char,std::char_traits<char>,std::allocator<char>>
(local_330,(string *)&local_350,',');
if (((byte)piVar2[*(long *)(*(long *)piVar2 + -0x18) + 0x20] & 5) != 0) break;
/* try { // try from 0016287b to 0016288a has its CatchHandler @ 00162921 */
std::__cxx11::istringstream::istringstream((istringstream *)local_1b0,(string *)&local_350,8);
/* try { // try from 0016288b to 001628ba has its CatchHandler @ 00162928 */
std::istream::operator>>(local_1b0,&local_354);
piVar1 = *(int **)(param_1 + 8);
if (piVar1 == *(int **)(param_1 + 0x10)) {
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)param_1,piVar1,&local_354);
}
else {
*piVar1 = local_354;
*(int **)(param_1 + 8) = piVar1 + 1;
}
std::__cxx11::istringstream::~istringstream((istringstream *)local_1b0);
std::ios_base::~ios_base(local_138);
}
if (local_350 != &local_340) {
operator_delete(local_350,CONCAT71(uStack_33f,local_340) + 1);
}
std::__cxx11::istringstream::~istringstream((istringstream *)local_330);
std::ios_base::~ios_base(local_2b8);
return;
}
|
|
16,481
|
nglog::(anonymous namespace)::PrettyDuration[abi:cxx11](std::chrono::duration<int, std::ratio<1l, 1l>> const&)
|
ng-log[P]ng-log/src/logging.cc
|
string PrettyDuration(const std::chrono::duration<int>& secs) {
std::stringstream result;
int mins = secs.count() / 60;
int hours = mins / 60;
mins = mins % 60;
int s = secs.count() % 60;
result.fill('0');
result << hours << ':' << setw(2) << mins << ':' << setw(2) << s;
return result.str();
}
|
O0
|
cpp
|
nglog::(anonymous namespace)::PrettyDuration[abi:cxx11](std::chrono::duration<int, std::ratio<1l, 1l>> const&):
pushq %rbp
movq %rsp, %rbp
subq $0x220, %rsp # imm = 0x220
movq %rdi, -0x1d0(%rbp)
movq %rdi, %rax
movq %rax, -0x1c8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x9500
movq -0x10(%rbp), %rdi
callq 0x1b470
movl %eax, -0x1c0(%rbp)
jmp 0x16a21
movl -0x1c0(%rbp), %ecx
movslq %ecx, %rax
imulq $-0x77777777, %rax, %rax # imm = 0x88888889
shrq $0x20, %rax
addl %ecx, %eax
movl %eax, %ecx
shrl $0x1f, %ecx
sarl $0x5, %eax
addl %ecx, %eax
movl %eax, -0x19c(%rbp)
movslq -0x19c(%rbp), %rax
movl %eax, %ecx
imulq $-0x77777777, %rax, %rax # imm = 0x88888889
shrq $0x20, %rax
addl %ecx, %eax
movl %eax, %ecx
shrl $0x1f, %ecx
sarl $0x5, %eax
addl %ecx, %eax
movl %eax, -0x1b0(%rbp)
movslq -0x19c(%rbp), %rcx
movl %ecx, %eax
imulq $-0x77777777, %rcx, %rcx # imm = 0x88888889
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x5, %ecx
addl %edx, %ecx
imull $0x3c, %ecx, %ecx
subl %ecx, %eax
movl %eax, -0x19c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1b470
movl %eax, -0x1d4(%rbp)
jmp 0x16aa9
movl -0x1d4(%rbp), %eax
movslq %eax, %rcx
imulq $-0x77777777, %rcx, %rcx # imm = 0x88888889
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x5, %ecx
addl %edx, %ecx
imull $0x3c, %ecx, %ecx
subl %ecx, %eax
movl %eax, -0x1b4(%rbp)
movq -0x198(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x198(%rbp,%rax), %rdi
movl $0x30, %esi
callq 0x97f0
jmp 0x16af3
leaq -0x188(%rbp), %rdi
movl -0x1b0(%rbp), %esi
callq 0x9ce0
movq %rax, -0x1e0(%rbp)
jmp 0x16b0e
movq -0x1e0(%rbp), %rdi
movl $0x3a, %esi
callq 0x98a0
movq %rax, -0x1e8(%rbp)
jmp 0x16b28
movl $0x2, %edi
callq 0x19180
movl %eax, -0x1ec(%rbp)
jmp 0x16b3a
movq -0x1e8(%rbp), %rdi
movl -0x1ec(%rbp), %eax
movl %eax, -0x1b8(%rbp)
movl -0x1b8(%rbp), %esi
callq 0x9880
movq %rax, -0x1f8(%rbp)
jmp 0x16b61
movq -0x1f8(%rbp), %rdi
movl -0x19c(%rbp), %esi
callq 0x9ce0
movq %rax, -0x200(%rbp)
jmp 0x16b7c
movq -0x200(%rbp), %rdi
movl $0x3a, %esi
callq 0x98a0
movq %rax, -0x208(%rbp)
jmp 0x16b96
movl $0x2, %edi
callq 0x19180
movl %eax, -0x20c(%rbp)
jmp 0x16ba8
movq -0x208(%rbp), %rdi
movl -0x20c(%rbp), %eax
movl %eax, -0x1bc(%rbp)
movl -0x1bc(%rbp), %esi
callq 0x9880
movq %rax, -0x218(%rbp)
jmp 0x16bcf
movq -0x218(%rbp), %rdi
movl -0x1b4(%rbp), %esi
callq 0x9ce0
jmp 0x16be3
movq -0x1d0(%rbp), %rdi
leaq -0x198(%rbp), %rsi
callq 0x96d0
jmp 0x16bf8
leaq -0x198(%rbp), %rdi
callq 0x9560
movq -0x1c8(%rbp), %rax
addq $0x220, %rsp # imm = 0x220
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a8(%rbp)
movl %eax, -0x1ac(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x9560
movq -0x1a8(%rbp), %rdi
callq 0x9d10
nop
|
_ZN5nglog12_GLOBAL__N_114PrettyDurationB5cxx11ERKNSt6chrono8durationIiSt5ratioILl1ELl1EEEE:
push rbp
mov rbp, rsp
sub rsp, 220h
mov [rbp+var_1D0], rdi
mov rax, rdi
mov [rbp+var_1C8], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
lea rdi, [rbp+var_198]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
mov rdi, [rbp+var_10]
call _ZNKSt6chrono8durationIiSt5ratioILl1ELl1EEE5countEv; std::chrono::duration<int,std::ratio<1l,1l>>::count(void)
mov [rbp+var_1C0], eax
jmp short $+2
loc_16A21:
mov ecx, [rbp+var_1C0]
movsxd rax, ecx
imul rax, 0FFFFFFFF88888889h
shr rax, 20h
add eax, ecx
mov ecx, eax
shr ecx, 1Fh
sar eax, 5
add eax, ecx
mov [rbp+var_19C], eax
movsxd rax, [rbp+var_19C]
mov ecx, eax
imul rax, 0FFFFFFFF88888889h
shr rax, 20h
add eax, ecx
mov ecx, eax
shr ecx, 1Fh
sar eax, 5
add eax, ecx
mov [rbp+var_1B0], eax
movsxd rcx, [rbp+var_19C]
mov eax, ecx
imul rcx, 0FFFFFFFF88888889h
shr rcx, 20h
add ecx, eax
mov edx, ecx
shr edx, 1Fh
sar ecx, 5
add ecx, edx
imul ecx, 3Ch ; '<'
sub eax, ecx
mov [rbp+var_19C], eax
mov rdi, [rbp+var_10]
call _ZNKSt6chrono8durationIiSt5ratioILl1ELl1EEE5countEv; std::chrono::duration<int,std::ratio<1l,1l>>::count(void)
mov [rbp+var_1D4], eax
jmp short $+2
loc_16AA9:
mov eax, [rbp+var_1D4]
movsxd rcx, eax
imul rcx, 0FFFFFFFF88888889h
shr rcx, 20h
add ecx, eax
mov edx, ecx
shr edx, 1Fh
sar ecx, 5
add ecx, edx
imul ecx, 3Ch ; '<'
sub eax, ecx
mov [rbp+var_1B4], eax
mov rax, [rbp+var_198]
mov rax, [rax-18h]
lea rdi, [rbp+rax+var_198]
mov esi, 30h ; '0'
call __ZNSt9basic_iosIcSt11char_traitsIcEE4fillEc; std::ios::fill(char)
jmp short $+2
loc_16AF3:
lea rdi, [rbp+var_188]
mov esi, [rbp+var_1B0]
call __ZNSolsEi; std::ostream::operator<<(int)
mov [rbp+var_1E0], rax
jmp short $+2
loc_16B0E:
mov rdi, [rbp+var_1E0]
mov esi, 3Ah ; ':'
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
mov [rbp+var_1E8], rax
jmp short $+2
loc_16B28:
mov edi, 2; int
call _ZSt4setwi; std::setw(int)
mov [rbp+var_1EC], eax
jmp short $+2
loc_16B3A:
mov rdi, [rbp+var_1E8]
mov eax, [rbp+var_1EC]
mov [rbp+var_1B8], eax
mov esi, [rbp+var_1B8]
call __ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Setw)
mov [rbp+var_1F8], rax
jmp short $+2
loc_16B61:
mov rdi, [rbp+var_1F8]
mov esi, [rbp+var_19C]
call __ZNSolsEi; std::ostream::operator<<(int)
mov [rbp+var_200], rax
jmp short $+2
loc_16B7C:
mov rdi, [rbp+var_200]
mov esi, 3Ah ; ':'
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
mov [rbp+var_208], rax
jmp short $+2
loc_16B96:
mov edi, 2; int
call _ZSt4setwi; std::setw(int)
mov [rbp+var_20C], eax
jmp short $+2
loc_16BA8:
mov rdi, [rbp+var_208]
mov eax, [rbp+var_20C]
mov [rbp+var_1BC], eax
mov esi, [rbp+var_1BC]
call __ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Setw)
mov [rbp+var_218], rax
jmp short $+2
loc_16BCF:
mov rdi, [rbp+var_218]
mov esi, [rbp+var_1B4]
call __ZNSolsEi; std::ostream::operator<<(int)
jmp short $+2
loc_16BE3:
mov rdi, [rbp+var_1D0]
lea rsi, [rbp+var_198]
call __ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(void)
jmp short $+2
loc_16BF8:
lea rdi, [rbp+var_198]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
mov rax, [rbp+var_1C8]
add rsp, 220h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_1A8], rcx
mov [rbp+var_1AC], eax
lea rdi, [rbp+var_198]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
mov rdi, [rbp+var_1A8]
call __Unwind_Resume
|
long long nglog::`anonymous namespace'::PrettyDuration[abi:cxx11](long long a1, long long a2)
{
long long v3; // [rsp+8h] [rbp-218h]
long long v4; // [rsp+18h] [rbp-208h]
long long v5; // [rsp+20h] [rbp-200h]
long long v6; // [rsp+28h] [rbp-1F8h]
long long v7; // [rsp+38h] [rbp-1E8h]
long long v8; // [rsp+40h] [rbp-1E0h]
int v9; // [rsp+60h] [rbp-1C0h]
unsigned int v10; // [rsp+64h] [rbp-1BCh]
unsigned int v11; // [rsp+68h] [rbp-1B8h]
unsigned int v12; // [rsp+6Ch] [rbp-1B4h]
_QWORD v13[2]; // [rsp+88h] [rbp-198h] BYREF
_BYTE v14[376]; // [rsp+98h] [rbp-188h] BYREF
long long v15; // [rsp+210h] [rbp-10h]
long long v16; // [rsp+218h] [rbp-8h]
v16 = a1;
v15 = a2;
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v13);
v9 = std::chrono::duration<int,std::ratio<1l,1l>>::count(v15);
v12 = (int)std::chrono::duration<int,std::ratio<1l,1l>>::count(v15) % 60;
std::ios::fill((char *)v13 + *(_QWORD *)(v13[0] - 24LL), 48LL);
v8 = std::ostream::operator<<(v14, (unsigned int)(v9 / 60 / 60));
v7 = std::operator<<<std::char_traits<char>>(v8, 58LL);
v11 = std::setw(2);
v6 = std::operator<<<char,std::char_traits<char>>(v7, v11);
v5 = std::ostream::operator<<(v6, (unsigned int)(v9 / 60 % 60));
v4 = std::operator<<<std::char_traits<char>>(v5, 58LL);
v10 = std::setw(2);
v3 = std::operator<<<char,std::char_traits<char>>(v4, v10);
std::ostream::operator<<(v3, v12);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(a1, v13);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v13);
return a1;
}
|
PrettyDuration[abi:cxx11]:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x220
MOV qword ptr [RBP + -0x1d0],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x1c8],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LEA RDI,[RBP + -0x198]
CALL 0x00109500
MOV RDI,qword ptr [RBP + -0x10]
LAB_00116a14:
CALL 0x0011b470
MOV dword ptr [RBP + -0x1c0],EAX
JMP 0x00116a21
LAB_00116a21:
MOV ECX,dword ptr [RBP + -0x1c0]
MOVSXD RAX,ECX
IMUL RAX,RAX,-0x77777777
SHR RAX,0x20
ADD EAX,ECX
MOV ECX,EAX
SHR ECX,0x1f
SAR EAX,0x5
ADD EAX,ECX
MOV dword ptr [RBP + -0x19c],EAX
MOVSXD RAX,dword ptr [RBP + -0x19c]
MOV ECX,EAX
IMUL RAX,RAX,-0x77777777
SHR RAX,0x20
ADD EAX,ECX
MOV ECX,EAX
SHR ECX,0x1f
SAR EAX,0x5
ADD EAX,ECX
MOV dword ptr [RBP + -0x1b0],EAX
MOVSXD RCX,dword ptr [RBP + -0x19c]
MOV EAX,ECX
IMUL RCX,RCX,-0x77777777
SHR RCX,0x20
ADD ECX,EAX
MOV EDX,ECX
SHR EDX,0x1f
SAR ECX,0x5
ADD ECX,EDX
IMUL ECX,ECX,0x3c
SUB EAX,ECX
MOV dword ptr [RBP + -0x19c],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0011b470
MOV dword ptr [RBP + -0x1d4],EAX
JMP 0x00116aa9
LAB_00116aa9:
MOV EAX,dword ptr [RBP + -0x1d4]
MOVSXD RCX,EAX
IMUL RCX,RCX,-0x77777777
SHR RCX,0x20
ADD ECX,EAX
MOV EDX,ECX
SHR EDX,0x1f
SAR ECX,0x5
ADD ECX,EDX
IMUL ECX,ECX,0x3c
SUB EAX,ECX
MOV dword ptr [RBP + -0x1b4],EAX
MOV RAX,qword ptr [RBP + -0x198]
MOV RAX,qword ptr [RAX + -0x18]
LEA RDI,[RBP + RAX*0x1 + -0x198]
MOV ESI,0x30
CALL 0x001097f0
JMP 0x00116af3
LAB_00116af3:
LEA RDI,[RBP + -0x188]
MOV ESI,dword ptr [RBP + -0x1b0]
CALL 0x00109ce0
MOV qword ptr [RBP + -0x1e0],RAX
JMP 0x00116b0e
LAB_00116b0e:
MOV RDI,qword ptr [RBP + -0x1e0]
MOV ESI,0x3a
CALL 0x001098a0
MOV qword ptr [RBP + -0x1e8],RAX
JMP 0x00116b28
LAB_00116b28:
MOV EDI,0x2
CALL 0x00119180
MOV dword ptr [RBP + -0x1ec],EAX
JMP 0x00116b3a
LAB_00116b3a:
MOV RDI,qword ptr [RBP + -0x1e8]
MOV EAX,dword ptr [RBP + -0x1ec]
MOV dword ptr [RBP + -0x1b8],EAX
MOV ESI,dword ptr [RBP + -0x1b8]
CALL 0x00109880
MOV qword ptr [RBP + -0x1f8],RAX
JMP 0x00116b61
LAB_00116b61:
MOV RDI,qword ptr [RBP + -0x1f8]
MOV ESI,dword ptr [RBP + -0x19c]
CALL 0x00109ce0
MOV qword ptr [RBP + -0x200],RAX
JMP 0x00116b7c
LAB_00116b7c:
MOV RDI,qword ptr [RBP + -0x200]
MOV ESI,0x3a
CALL 0x001098a0
MOV qword ptr [RBP + -0x208],RAX
JMP 0x00116b96
LAB_00116b96:
MOV EDI,0x2
CALL 0x00119180
MOV dword ptr [RBP + -0x20c],EAX
JMP 0x00116ba8
LAB_00116ba8:
MOV RDI,qword ptr [RBP + -0x208]
MOV EAX,dword ptr [RBP + -0x20c]
MOV dword ptr [RBP + -0x1bc],EAX
MOV ESI,dword ptr [RBP + -0x1bc]
CALL 0x00109880
MOV qword ptr [RBP + -0x218],RAX
JMP 0x00116bcf
LAB_00116bcf:
MOV RDI,qword ptr [RBP + -0x218]
MOV ESI,dword ptr [RBP + -0x1b4]
CALL 0x00109ce0
JMP 0x00116be3
LAB_00116be3:
MOV RDI,qword ptr [RBP + -0x1d0]
LEA RSI,[RBP + -0x198]
CALL 0x001096d0
LAB_00116bf6:
JMP 0x00116bf8
LAB_00116bf8:
LEA RDI,[RBP + -0x198]
CALL 0x00109560
MOV RAX,qword ptr [RBP + -0x1c8]
ADD RSP,0x220
POP RBP
RET
|
/* nglog::(anonymous namespace)::PrettyDuration[abi:cxx11](std::chrono::duration<int, std::ratio<1l,
1l> > const&) */
_anonymous_namespace_ * __thiscall
nglog::(anonymous_namespace)::PrettyDuration_abi_cxx11_
(_anonymous_namespace_ *this,duration *param_1)
{
int iVar1;
int iVar2;
int4 uVar3;
ostream *poVar4;
long local_1a0 [2];
ostream local_190 [376];
duration<int,std::ratio<1l,1l>> *local_18;
_anonymous_namespace_ *local_10;
local_18 = (duration<int,std::ratio<1l,1l>> *)param_1;
local_10 = this;
std::__cxx11::stringstream::stringstream((stringstream *)local_1a0);
/* try { // try from 00116a14 to 00116bf5 has its CatchHandler @ 00116c14 */
iVar1 = std::chrono::duration<int,std::ratio<1l,1l>>::count(local_18);
iVar2 = std::chrono::duration<int,std::ratio<1l,1l>>::count(local_18);
std::ios::fill((char)local_1a0 + (char)*(int8 *)(local_1a0[0] + -0x18));
poVar4 = (ostream *)std::ostream::operator<<(local_190,(iVar1 / 0x3c) / 0x3c);
poVar4 = std::operator<<(poVar4,':');
uVar3 = std::setw(2);
poVar4 = std::operator<<(poVar4,uVar3);
poVar4 = (ostream *)std::ostream::operator<<(poVar4,(iVar1 / 0x3c) % 0x3c);
poVar4 = std::operator<<(poVar4,':');
uVar3 = std::setw(2);
poVar4 = std::operator<<(poVar4,uVar3);
std::ostream::operator<<(poVar4,iVar2 % 0x3c);
std::__cxx11::stringstream::str();
std::__cxx11::stringstream::~stringstream((stringstream *)local_1a0);
return this;
}
|
|
16,482
|
ggml_barrier
|
monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c
|
void ggml_barrier(struct ggml_threadpool * tp) {
int n_threads = atomic_load_explicit(&tp->n_threads_cur, memory_order_relaxed);
if (n_threads == 1) {
return;
}
#ifdef GGML_USE_OPENMP
#pragma omp barrier
#else
int n_passed = atomic_load_explicit(&tp->n_barrier_passed, memory_order_relaxed);
// enter barrier (full seq-cst fence)
int n_barrier = atomic_fetch_add_explicit(&tp->n_barrier, 1, memory_order_seq_cst);
if (n_barrier == (n_threads - 1)) {
// last thread
atomic_store_explicit(&tp->n_barrier, 0, memory_order_relaxed);
// exit barrier (fill seq-cst fence)
atomic_fetch_add_explicit(&tp->n_barrier_passed, 1, memory_order_seq_cst);
return;
}
// wait for other threads
while (atomic_load_explicit(&tp->n_barrier_passed, memory_order_relaxed) == n_passed) {
ggml_thread_cpu_relax();
}
// exit barrier (full seq-cst fence)
// TSAN doesn't support standalone fence yet, we use a dummy read-modify-write instead
#ifdef GGML_TSAN_ENABLED
atomic_fetch_add_explicit(&tp->n_barrier_passed, 0, memory_order_seq_cst);
#else
atomic_thread_fence(memory_order_seq_cst);
#endif
#endif
}
|
O0
|
c
|
ggml_barrier:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
movl 0xdc(%rax), %eax
movl %eax, 0x28(%rsp)
movl 0x28(%rsp), %eax
movl %eax, 0x2c(%rsp)
cmpl $0x1, 0x2c(%rsp)
jne 0xd63c
jmp 0xd6e2
movq 0x30(%rsp), %rax
movl 0xc0(%rax), %eax
movl %eax, 0x20(%rsp)
movl 0x20(%rsp), %eax
movl %eax, 0x24(%rsp)
movq 0x30(%rsp), %rcx
movl $0x1, 0x18(%rsp)
movl 0x18(%rsp), %eax
lock
xaddl %eax, 0x80(%rcx)
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movl 0x2c(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0xd6bd
movq 0x30(%rsp), %rax
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %ecx
movl %ecx, 0x80(%rax)
movq 0x30(%rsp), %rcx
movl $0x1, 0xc(%rsp)
movl 0xc(%rsp), %eax
lock
xaddl %eax, 0xc0(%rcx)
movl %eax, 0x8(%rsp)
jmp 0xd6e2
jmp 0xd6bf
movq 0x30(%rsp), %rax
movl 0xc0(%rax), %eax
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %eax
cmpl 0x24(%rsp), %eax
jne 0xd6df
callq 0xd6f0
jmp 0xd6bf
mfence
addq $0x38, %rsp
retq
nopw (%rax,%rax)
|
ggml_barrier:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov rax, [rsp+38h+var_8]
mov eax, [rax+0DCh]
mov [rsp+38h+var_10], eax
mov eax, [rsp+38h+var_10]
mov [rsp+38h+var_C], eax
cmp [rsp+38h+var_C], 1
jnz short loc_D63C
jmp loc_D6E2
loc_D63C:
mov rax, [rsp+38h+var_8]
mov eax, [rax+0C0h]
mov [rsp+38h+var_18], eax
mov eax, [rsp+38h+var_18]
mov [rsp+38h+var_14], eax
mov rcx, [rsp+38h+var_8]
mov [rsp+38h+var_20], 1
mov eax, [rsp+38h+var_20]
lock xadd [rcx+80h], eax
mov [rsp+38h+var_24], eax
mov eax, [rsp+38h+var_24]
mov [rsp+38h+var_1C], eax
mov eax, [rsp+38h+var_1C]
mov ecx, [rsp+38h+var_C]
sub ecx, 1
cmp eax, ecx
jnz short loc_D6BD
mov rax, [rsp+38h+var_8]
mov [rsp+38h+var_28], 0
mov ecx, [rsp+38h+var_28]
mov [rax+80h], ecx
mov rcx, [rsp+38h+var_8]
mov [rsp+38h+var_2C], 1
mov eax, [rsp+38h+var_2C]
lock xadd [rcx+0C0h], eax
mov [rsp+38h+var_30], eax
jmp short loc_D6E2
loc_D6BD:
jmp short $+2
loc_D6BF:
mov rax, [rsp+38h+var_8]
mov eax, [rax+0C0h]
mov [rsp+38h+var_34], eax
mov eax, [rsp+38h+var_34]
cmp eax, [rsp+38h+var_14]
jnz short loc_D6DF
call ggml_thread_cpu_relax
jmp short loc_D6BF
loc_D6DF:
mfence
loc_D6E2:
add rsp, 38h
retn
|
long long ggml_barrier(long long a1)
{
long long result; // rax
unsigned int v2; // [rsp+4h] [rbp-34h]
int v3; // [rsp+24h] [rbp-14h]
unsigned int v4; // [rsp+28h] [rbp-10h]
int v5; // [rsp+2Ch] [rbp-Ch]
v4 = *(_DWORD *)(a1 + 220);
result = v4;
if ( v4 != 1 )
{
v3 = *(_DWORD *)(a1 + 192);
v5 = *(_DWORD *)(a1 + 220);
if ( _InterlockedExchangeAdd((volatile signed __int32 *)(a1 + 128), 1u) == v5 - 1 )
{
*(_DWORD *)(a1 + 128) = 0;
return (unsigned int)_InterlockedExchangeAdd((volatile signed __int32 *)(a1 + 192), 1u);
}
else
{
while ( 1 )
{
v2 = *(_DWORD *)(a1 + 192);
result = v2;
if ( v2 != v3 )
break;
ggml_thread_cpu_relax();
}
_mm_mfence();
}
}
return result;
}
|
ggml_barrier:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV RAX,qword ptr [RSP + 0x30]
MOV EAX,dword ptr [RAX + 0xdc]
MOV dword ptr [RSP + 0x28],EAX
MOV EAX,dword ptr [RSP + 0x28]
MOV dword ptr [RSP + 0x2c],EAX
CMP dword ptr [RSP + 0x2c],0x1
JNZ 0x0010d63c
JMP 0x0010d6e2
LAB_0010d63c:
MOV RAX,qword ptr [RSP + 0x30]
MOV EAX,dword ptr [RAX + 0xc0]
MOV dword ptr [RSP + 0x20],EAX
MOV EAX,dword ptr [RSP + 0x20]
MOV dword ptr [RSP + 0x24],EAX
MOV RCX,qword ptr [RSP + 0x30]
MOV dword ptr [RSP + 0x18],0x1
MOV EAX,dword ptr [RSP + 0x18]
XADD.LOCK dword ptr [RCX + 0x80],EAX
MOV dword ptr [RSP + 0x14],EAX
MOV EAX,dword ptr [RSP + 0x14]
MOV dword ptr [RSP + 0x1c],EAX
MOV EAX,dword ptr [RSP + 0x1c]
MOV ECX,dword ptr [RSP + 0x2c]
SUB ECX,0x1
CMP EAX,ECX
JNZ 0x0010d6bd
MOV RAX,qword ptr [RSP + 0x30]
MOV dword ptr [RSP + 0x10],0x0
MOV ECX,dword ptr [RSP + 0x10]
MOV dword ptr [RAX + 0x80],ECX
MOV RCX,qword ptr [RSP + 0x30]
MOV dword ptr [RSP + 0xc],0x1
MOV EAX,dword ptr [RSP + 0xc]
XADD.LOCK dword ptr [RCX + 0xc0],EAX
MOV dword ptr [RSP + 0x8],EAX
JMP 0x0010d6e2
LAB_0010d6bd:
JMP 0x0010d6bf
LAB_0010d6bf:
MOV RAX,qword ptr [RSP + 0x30]
MOV EAX,dword ptr [RAX + 0xc0]
MOV dword ptr [RSP + 0x4],EAX
MOV EAX,dword ptr [RSP + 0x4]
CMP EAX,dword ptr [RSP + 0x24]
JNZ 0x0010d6df
CALL 0x0010d6f0
JMP 0x0010d6bf
LAB_0010d6df:
MFENCE
LAB_0010d6e2:
ADD RSP,0x38
RET
|
void ggml_barrier(long param_1)
{
int *piVar1;
int iVar2;
int iVar3;
if (*(int *)(param_1 + 0xdc) != 1) {
iVar3 = *(int *)(param_1 + 0xc0);
LOCK();
piVar1 = (int *)(param_1 + 0x80);
iVar2 = *piVar1;
*piVar1 = *piVar1 + 1;
UNLOCK();
if (iVar2 == *(int *)(param_1 + 0xdc) + -1) {
*(int4 *)(param_1 + 0x80) = 0;
LOCK();
*(int *)(param_1 + 0xc0) = *(int *)(param_1 + 0xc0) + 1;
UNLOCK();
}
else {
while (*(int *)(param_1 + 0xc0) == iVar3) {
ggml_thread_cpu_relax();
}
}
}
return;
}
|
|
16,483
|
ggml_barrier
|
monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c
|
void ggml_barrier(struct ggml_threadpool * tp) {
int n_threads = atomic_load_explicit(&tp->n_threads_cur, memory_order_relaxed);
if (n_threads == 1) {
return;
}
#ifdef GGML_USE_OPENMP
#pragma omp barrier
#else
int n_passed = atomic_load_explicit(&tp->n_barrier_passed, memory_order_relaxed);
// enter barrier (full seq-cst fence)
int n_barrier = atomic_fetch_add_explicit(&tp->n_barrier, 1, memory_order_seq_cst);
if (n_barrier == (n_threads - 1)) {
// last thread
atomic_store_explicit(&tp->n_barrier, 0, memory_order_relaxed);
// exit barrier (fill seq-cst fence)
atomic_fetch_add_explicit(&tp->n_barrier_passed, 1, memory_order_seq_cst);
return;
}
// wait for other threads
while (atomic_load_explicit(&tp->n_barrier_passed, memory_order_relaxed) == n_passed) {
ggml_thread_cpu_relax();
}
// exit barrier (full seq-cst fence)
// TSAN doesn't support standalone fence yet, we use a dummy read-modify-write instead
#ifdef GGML_TSAN_ENABLED
atomic_fetch_add_explicit(&tp->n_barrier_passed, 0, memory_order_seq_cst);
#else
atomic_thread_fence(memory_order_seq_cst);
#endif
#endif
}
|
O3
|
c
|
ggml_barrier:
movl 0xdc(%rdi), %ecx
cmpl $0x1, %ecx
je 0x8f24
movl 0xc0(%rdi), %eax
movl $0x1, %edx
lock
xaddl %edx, 0x80(%rdi)
decl %ecx
cmpl %ecx, %edx
jne 0x8f13
movl $0x0, 0x80(%rdi)
lock
incl 0xc0(%rdi)
retq
movl 0xc0(%rdi), %ecx
cmpl %eax, %ecx
jne 0x8f21
pause
jmp 0x8f13
mfence
retq
|
ggml_barrier:
mov ecx, [rdi+0DCh]
cmp ecx, 1
jz short locret_8F24
mov eax, [rdi+0C0h]
mov edx, 1
lock xadd [rdi+80h], edx
dec ecx
cmp edx, ecx
jnz short loc_8F13
mov dword ptr [rdi+80h], 0
lock inc dword ptr [rdi+0C0h]
retn
loc_8F13:
mov ecx, [rdi+0C0h]
cmp ecx, eax
jnz short loc_8F21
pause
jmp short loc_8F13
loc_8F21:
mfence
locret_8F24:
retn
|
void ggml_barrier(long long a1)
{
int v1; // ecx
int v2; // eax
v1 = *(_DWORD *)(a1 + 220);
if ( v1 != 1 )
{
v2 = *(_DWORD *)(a1 + 192);
if ( _InterlockedExchangeAdd((volatile signed __int32 *)(a1 + 128), 1u) == v1 - 1 )
{
*(_DWORD *)(a1 + 128) = 0;
_InterlockedIncrement((volatile signed __int32 *)(a1 + 192));
}
else
{
while ( *(_DWORD *)(a1 + 192) == v2 )
_mm_pause();
_mm_mfence();
}
}
}
|
ggml_barrier:
MOV ECX,dword ptr [RDI + 0xdc]
CMP ECX,0x1
JZ 0x00108f24
MOV EAX,dword ptr [RDI + 0xc0]
MOV EDX,0x1
XADD.LOCK dword ptr [RDI + 0x80],EDX
DEC ECX
CMP EDX,ECX
JNZ 0x00108f13
MOV dword ptr [RDI + 0x80],0x0
INC.LOCK dword ptr [RDI + 0xc0]
RET
LAB_00108f13:
MOV ECX,dword ptr [RDI + 0xc0]
CMP ECX,EAX
JNZ 0x00108f21
PAUSE
JMP 0x00108f13
LAB_00108f21:
MFENCE
LAB_00108f24:
RET
|
void ggml_barrier(long param_1)
{
int *piVar1;
int iVar2;
if (*(int *)(param_1 + 0xdc) != 1) {
LOCK();
piVar1 = (int *)(param_1 + 0x80);
iVar2 = *piVar1;
*piVar1 = *piVar1 + 1;
UNLOCK();
if (iVar2 == *(int *)(param_1 + 0xdc) + -1) {
*(int4 *)(param_1 + 0x80) = 0;
LOCK();
*(int *)(param_1 + 0xc0) = *(int *)(param_1 + 0xc0) + 1;
UNLOCK();
return;
}
do {
} while (*(int *)(param_1 + 0xc0) == *(int *)(param_1 + 0xc0));
}
return;
}
|
|
16,484
|
translog_truncate_log
|
eloqsql/storage/maria/ma_loghandler.c
|
static my_bool translog_truncate_log(TRANSLOG_ADDRESS addr)
{
uchar *page;
TRANSLOG_ADDRESS current_page;
uint32 next_page_offset, page_rest;
uint32 i;
File fd;
int rc;
TRANSLOG_VALIDATOR_DATA data;
char path[FN_REFLEN];
uchar page_buff[TRANSLOG_PAGE_SIZE];
DBUG_ENTER("translog_truncate_log");
/* TODO: write warning to the client */
DBUG_PRINT("warning", ("removing all records from " LSN_FMT " "
"till " LSN_FMT,
LSN_IN_PARTS(addr),
LSN_IN_PARTS(log_descriptor.horizon)));
DBUG_ASSERT(cmp_translog_addr(addr, log_descriptor.horizon) < 0);
/* remove files between the address and horizon */
for (i= LSN_FILE_NO(addr) + 1; i <= LSN_FILE_NO(log_descriptor.horizon); i++)
if (mysql_file_delete(key_file_translog,
translog_filename_by_fileno(i, path), MYF(MY_WME)))
{
translog_unlock();
DBUG_RETURN(1);
}
/* truncate the last file up to the last page */
next_page_offset= LSN_OFFSET(addr);
next_page_offset= (next_page_offset -
((next_page_offset - 1) % TRANSLOG_PAGE_SIZE + 1) +
TRANSLOG_PAGE_SIZE);
page_rest= next_page_offset - LSN_OFFSET(addr);
memset(page_buff, TRANSLOG_FILLER, page_rest);
rc= ((fd= open_logfile_by_number_no_cache(LSN_FILE_NO(addr))) < 0 ||
((mysql_file_chsize(fd, next_page_offset, TRANSLOG_FILLER, MYF(MY_WME)) ||
(page_rest && my_pwrite(fd, page_buff, page_rest, LSN_OFFSET(addr),
log_write_flags)) ||
mysql_file_sync(fd, MYF(MY_WME)))));
translog_syncs++;
rc|= (fd > 0 && mysql_file_close(fd, MYF(MY_WME)));
if (sync_log_dir >= TRANSLOG_SYNC_DIR_ALWAYS)
{
rc|= sync_dir(log_descriptor.directory_fd, MYF(MY_WME | MY_IGNORE_BADFD));
translog_syncs++;
}
if (rc)
DBUG_RETURN(1);
/* fix the horizon */
log_descriptor.horizon= addr;
/* fix the buffer data */
current_page= MAKE_LSN(LSN_FILE_NO(addr), (next_page_offset -
TRANSLOG_PAGE_SIZE));
data.addr= ¤t_page;
if ((page= translog_get_page(&data, log_descriptor.buffers->buffer, NULL)) ==
NULL)
DBUG_RETURN(1);
if (page != log_descriptor.buffers->buffer)
memcpy(log_descriptor.buffers->buffer, page, TRANSLOG_PAGE_SIZE);
log_descriptor.bc.buffer->offset= current_page;
log_descriptor.bc.buffer->size= LSN_OFFSET(addr) - LSN_OFFSET(current_page);
log_descriptor.bc.ptr=
log_descriptor.buffers->buffer + log_descriptor.bc.buffer->size;
log_descriptor.bc.current_page_fill= log_descriptor.bc.buffer->size;
DBUG_RETURN(0);
}
|
O0
|
c
|
translog_truncate_log:
pushq %rbp
movq %rsp, %rbp
subq $0x2260, %rsp # imm = 0x2260
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x2220(%rbp)
jmp 0x2f4b1
jmp 0x2f4b3
jmp 0x2f4b5
movq -0x2220(%rbp), %rax
sarq $0x20, %rax
addl $0x1, %eax
movl %eax, -0x223c(%rbp)
movl -0x223c(%rbp), %eax
movq 0xc51502(%rip), %rcx # 0xc809d8
sarq $0x20, %rcx
cmpl %ecx, %eax
ja 0x2f548
leaq 0x44f61f(%rip), %rax # 0x47eb04
movl (%rax), %eax
movl %eax, -0x225c(%rbp)
movl -0x223c(%rbp), %edi
leaq -0x210(%rbp), %rsi
callq 0x2baf0
movl -0x225c(%rbp), %edi
movq %rax, %rcx
leaq 0x127e9b(%rip), %rsi # 0x1573aa
movl $0xd6f, %edx # imm = 0xD6F
movl $0x10, %r8d
callq 0x33c40
cmpl $0x0, %eax
je 0x2f535
callq 0x2c4b0
movb $0x1, -0x2211(%rbp)
jmp 0x2f8ac
jmp 0x2f537
movl -0x223c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x223c(%rbp)
jmp 0x2f4c9
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x2220(%rbp), %rax
movl %eax, -0x2234(%rbp)
movl -0x2234(%rbp), %eax
movl -0x2234(%rbp), %ecx
subl $0x1, %ecx
andl $0x1fff, %ecx # imm = 0x1FFF
addl $0x1, %ecx
subl %ecx, %eax
addl $0x2000, %eax # imm = 0x2000
movl %eax, -0x2234(%rbp)
movl -0x2234(%rbp), %eax
movabsq $0xffffffff, %rcx # imm = 0xFFFFFFFF
andq -0x2220(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x2238(%rbp)
leaq -0x2210(%rbp), %rdi
movl -0x2238(%rbp), %eax
movl %eax, %edx
movl $0xff, %esi
callq 0x2a2a0
movq -0x2220(%rbp), %rax
sarq $0x20, %rax
movl %eax, %edi
callq 0x2c0c0
movl %eax, %ecx
movl %ecx, -0x2240(%rbp)
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x225d(%rbp)
jl 0x2f6a1
movl -0x2240(%rbp), %edx
movl -0x2234(%rbp), %eax
movl %eax, %ecx
leaq 0x127dad(%rip), %rdi # 0x1573aa
movl $0xd7d, %esi # imm = 0xD7D
movl $0xff, %r8d
movl $0x10, %r9d
callq 0x35ae0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x225e(%rbp)
jne 0x2f695
cmpl $0x0, -0x2238(%rbp)
je 0x2f66d
movl -0x2240(%rbp), %edi
leaq -0x2210(%rbp), %rsi
movl -0x2238(%rbp), %eax
movl %eax, %edx
movabsq $0xffffffff, %rcx # imm = 0xFFFFFFFF
andq -0x2220(%rbp), %rcx
movl $0x34, %r8d
callq 0xfa980
movq %rax, %rcx
movb $0x1, %al
cmpq $0x0, %rcx
movb %al, -0x225e(%rbp)
jne 0x2f695
movl -0x2240(%rbp), %edx
leaq 0x127d30(%rip), %rdi # 0x1573aa
movl $0xd80, %esi # imm = 0xD80
movl $0x10, %ecx
callq 0x35460
cmpl $0x0, %eax
setne %al
movb %al, -0x225e(%rbp)
movb -0x225e(%rbp), %al
movb %al, -0x225d(%rbp)
movb -0x225d(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x2244(%rbp)
movq 0x44f4cf(%rip), %rax # 0x47eb88
addq $0x1, %rax
movq %rax, 0x44f4c4(%rip) # 0x47eb88
xorl %eax, %eax
cmpl $0x0, -0x2240(%rbp)
movb %al, -0x225f(%rbp)
jle 0x2f6fd
movl -0x2240(%rbp), %edx
leaq 0x127cc8(%rip), %rdi # 0x1573aa
movl $0xd82, %esi # imm = 0xD82
movl $0x10, %ecx
callq 0x2c190
cmpl $0x0, %eax
setne %al
movb %al, -0x225f(%rbp)
movb -0x225f(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
orl -0x2244(%rbp), %eax
movl %eax, -0x2244(%rbp)
cmpq $0x2, 0x294efc(%rip) # 0x2c4618
jb 0x2f758
movl 0x45095c(%rip), %edx # 0x480080
leaq 0x127c7f(%rip), %rdi # 0x1573aa
movl $0xd85, %esi # imm = 0xD85
movl $0x30, %ecx
callq 0x35460
orl -0x2244(%rbp), %eax
movl %eax, -0x2244(%rbp)
movq 0x44f43b(%rip), %rax # 0x47eb88
addq $0x1, %rax
movq %rax, 0x44f430(%rip) # 0x47eb88
cmpl $0x0, -0x2244(%rbp)
je 0x2f76f
jmp 0x2f763
movb $0x1, -0x2211(%rbp)
jmp 0x2f8ac
movq -0x2220(%rbp), %rax
movq %rax, 0xc5125b(%rip) # 0xc809d8
movq -0x2220(%rbp), %rax
sarq $0x20, %rax
movl %eax, %eax
shlq $0x20, %rax
movl -0x2234(%rbp), %ecx
subl $0x2000, %ecx # imm = 0x2000
movl %ecx, %ecx
orq %rcx, %rax
movq %rax, -0x2230(%rbp)
leaq -0x2230(%rbp), %rax
movq %rax, -0x2258(%rbp)
leaq -0x2258(%rbp), %rdi
leaq 0x4505ce(%rip), %rsi # 0x47fd90
addq $0x2f8, %rsi # imm = 0x2F8
xorl %eax, %eax
movl %eax, %edx
callq 0x2e460
movq %rax, -0x2228(%rbp)
cmpq $0x0, %rax
jne 0x2f7ed
jmp 0x2f7e1
movb $0x1, -0x2211(%rbp)
jmp 0x2f8ac
leaq 0x45059c(%rip), %rax # 0x47fd90
addq $0x2f8, %rax # imm = 0x2F8
cmpq %rax, -0x2228(%rbp)
je 0x2f822
movq -0x2228(%rbp), %rsi
leaq 0x45057f(%rip), %rdi # 0x47fd90
addq $0x2f8, %rdi # imm = 0x2F8
movl $0x2000, %edx # imm = 0x2000
callq 0x2a0b0
movq -0x2230(%rbp), %rcx
movq 0xc511d8(%rip), %rax # 0xc80a08
movq %rcx, 0x100010(%rax)
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x2220(%rbp), %rax
movabsq $0xffffffff, %rcx # imm = 0xFFFFFFFF
andq -0x2230(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq 0xc511a3(%rip), %rax # 0xc80a08
movl %ecx, 0x100030(%rax)
movq 0xc51196(%rip), %rax # 0xc80a08
movl 0x100030(%rax), %eax
movl %eax, %ecx
leaq 0x45050f(%rip), %rax # 0x47fd90
addq $0x2f8, %rax # imm = 0x2F8
addq %rcx, %rax
movq %rax, 0xc5116f(%rip) # 0xc80a00
movq 0xc51170(%rip), %rax # 0xc80a08
movl 0x100030(%rax), %eax
movw %ax, 0xc5116b(%rip) # 0xc80a10
movb $0x0, -0x2211(%rbp)
movb -0x2211(%rbp), %al
movb %al, -0x2260(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x2f8d9
movb -0x2260(%rbp), %al
addq $0x2260, %rsp # imm = 0x2260
popq %rbp
retq
callq 0x2a250
nop
|
translog_truncate_log:
push rbp
mov rbp, rsp
sub rsp, 2260h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_2220], rdi
jmp short $+2
loc_2F4B1:
jmp short $+2
loc_2F4B3:
jmp short $+2
loc_2F4B5:
mov rax, [rbp+var_2220]
sar rax, 20h
add eax, 1
mov [rbp+var_223C], eax
loc_2F4C9:
mov eax, [rbp+var_223C]
mov rcx, cs:qword_C809D8
sar rcx, 20h
cmp eax, ecx
ja short loc_2F548
lea rax, key_file_translog
mov eax, [rax]
mov [rbp+var_225C], eax
mov edi, [rbp+var_223C]
lea rsi, [rbp+var_210]
call translog_filename_by_fileno
mov edi, [rbp+var_225C]
mov rcx, rax
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0D6Fh
mov r8d, 10h
call inline_mysql_file_delete
cmp eax, 0
jz short loc_2F535
call translog_unlock
mov [rbp+var_2211], 1
jmp loc_2F8AC
loc_2F535:
jmp short $+2
loc_2F537:
mov eax, [rbp+var_223C]
add eax, 1
mov [rbp+var_223C], eax
jmp short loc_2F4C9
loc_2F548:
mov rax, 0FFFFFFFFh
and rax, [rbp+var_2220]
mov [rbp+var_2234], eax
mov eax, [rbp+var_2234]
mov ecx, [rbp+var_2234]
sub ecx, 1
and ecx, 1FFFh
add ecx, 1
sub eax, ecx
add eax, 2000h
mov [rbp+var_2234], eax
mov eax, [rbp+var_2234]
mov rcx, 0FFFFFFFFh
and rcx, [rbp+var_2220]
sub rax, rcx
mov [rbp+var_2238], eax
lea rdi, [rbp+var_2210]
mov eax, [rbp+var_2238]
mov edx, eax
mov esi, 0FFh
call _memset
mov rax, [rbp+var_2220]
sar rax, 20h
mov edi, eax
call open_logfile_by_number_no_cache
mov ecx, eax
mov [rbp+var_2240], ecx
mov al, 1
cmp ecx, 0
mov [rbp+var_225D], al
jl loc_2F6A1
mov edx, [rbp+var_2240]
mov eax, [rbp+var_2234]
mov ecx, eax
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 0D7Dh
mov r8d, 0FFh
mov r9d, 10h
call inline_mysql_file_chsize
mov ecx, eax
mov al, 1
cmp ecx, 0
mov [rbp+var_225E], al
jnz short loc_2F695
cmp [rbp+var_2238], 0
jz short loc_2F66D
mov edi, [rbp+var_2240]
lea rsi, [rbp+var_2210]
mov eax, [rbp+var_2238]
mov edx, eax
mov rcx, 0FFFFFFFFh
and rcx, [rbp+var_2220]
mov r8d, 34h ; '4'
call my_pwrite
mov rcx, rax
mov al, 1
cmp rcx, 0
mov [rbp+var_225E], al
jnz short loc_2F695
loc_2F66D:
mov edx, [rbp+var_2240]
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 0D80h
mov ecx, 10h
call inline_mysql_file_sync
cmp eax, 0
setnz al
mov [rbp+var_225E], al
loc_2F695:
mov al, [rbp+var_225E]
mov [rbp+var_225D], al
loc_2F6A1:
mov al, [rbp+var_225D]
and al, 1
movzx eax, al
mov [rbp+var_2244], eax
mov rax, cs:translog_syncs
add rax, 1
mov cs:translog_syncs, rax
xor eax, eax
cmp [rbp+var_2240], 0
mov [rbp+var_225F], al
jle short loc_2F6FD
mov edx, [rbp+var_2240]
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 0D82h
mov ecx, 10h
call inline_mysql_file_close
cmp eax, 0
setnz al
mov [rbp+var_225F], al
loc_2F6FD:
mov al, [rbp+var_225F]
and al, 1
movzx eax, al
or eax, [rbp+var_2244]
mov [rbp+var_2244], eax
cmp cs:sync_log_dir, 2
jb short loc_2F758
mov edx, cs:dword_480080
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 0D85h
mov ecx, 30h ; '0'
call inline_mysql_file_sync
or eax, [rbp+var_2244]
mov [rbp+var_2244], eax
mov rax, cs:translog_syncs
add rax, 1
mov cs:translog_syncs, rax
loc_2F758:
cmp [rbp+var_2244], 0
jz short loc_2F76F
jmp short $+2
loc_2F763:
mov [rbp+var_2211], 1
jmp loc_2F8AC
loc_2F76F:
mov rax, [rbp+var_2220]
mov cs:qword_C809D8, rax
mov rax, [rbp+var_2220]
sar rax, 20h
mov eax, eax
shl rax, 20h
mov ecx, [rbp+var_2234]
sub ecx, 2000h
mov ecx, ecx
or rax, rcx
mov [rbp+var_2230], rax
lea rax, [rbp+var_2230]
mov [rbp+var_2258], rax
lea rdi, [rbp+var_2258]
lea rsi, log_descriptor
add rsi, 2F8h
xor eax, eax
mov edx, eax
call translog_get_page
mov [rbp+var_2228], rax
cmp rax, 0
jnz short loc_2F7ED
jmp short $+2
loc_2F7E1:
mov [rbp+var_2211], 1
jmp loc_2F8AC
loc_2F7ED:
lea rax, log_descriptor
add rax, 2F8h
cmp [rbp+var_2228], rax
jz short loc_2F822
mov rsi, [rbp+var_2228]
lea rdi, log_descriptor
add rdi, 2F8h
mov edx, 2000h
call _memcpy
loc_2F822:
mov rcx, [rbp+var_2230]
mov rax, cs:qword_C80A08
mov [rax+100010h], rcx
mov rax, 0FFFFFFFFh
and rax, [rbp+var_2220]
mov rcx, 0FFFFFFFFh
and rcx, [rbp+var_2230]
sub rax, rcx
mov ecx, eax
mov rax, cs:qword_C80A08
mov dword ptr ds:my_rw_destroy[rax], ecx
mov rax, cs:qword_C80A08
mov eax, dword ptr ds:my_rw_destroy[rax]
mov ecx, eax
lea rax, log_descriptor
add rax, 2F8h
add rax, rcx
mov cs:qword_C80A00, rax
mov rax, cs:qword_C80A08
mov eax, dword ptr ds:my_rw_destroy[rax]
mov cs:word_C80A10, ax
mov [rbp+var_2211], 0
loc_2F8AC:
mov al, [rbp+var_2211]
mov [rbp+var_2260], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_2F8D9
mov al, [rbp+var_2260]
add rsp, 2260h
pop rbp
retn
loc_2F8D9:
call ___stack_chk_fail
|
char translog_truncate_log(long long a1, long long a2, long long a3, long long a4, int a5, int a6)
{
long long v6; // rax
long long v7; // rdx
long long v8; // rcx
int v9; // r8d
int v10; // r9d
bool v12; // [rsp+1h] [rbp-225Fh]
bool v13; // [rsp+2h] [rbp-225Eh]
char v14; // [rsp+3h] [rbp-225Dh]
unsigned int v15; // [rsp+4h] [rbp-225Ch]
unsigned long long *v16; // [rsp+8h] [rbp-2258h] BYREF
int v17; // [rsp+1Ch] [rbp-2244h]
signed int v18; // [rsp+20h] [rbp-2240h]
unsigned int i; // [rsp+24h] [rbp-223Ch]
unsigned int v20; // [rsp+28h] [rbp-2238h]
unsigned int v21; // [rsp+2Ch] [rbp-2234h]
unsigned long long v22; // [rsp+30h] [rbp-2230h] BYREF
long long *page; // [rsp+38h] [rbp-2228h]
long long v24; // [rsp+40h] [rbp-2220h]
_BYTE v26[8192]; // [rsp+50h] [rbp-2210h] BYREF
_BYTE v27[520]; // [rsp+2050h] [rbp-210h] BYREF
unsigned long long v28; // [rsp+2258h] [rbp-8h]
v28 = __readfsqword(0x28u);
v24 = a1;
for ( i = HIDWORD(a1) + 1; i <= HIDWORD(qword_C809D8); ++i )
{
v15 = key_file_translog;
v6 = translog_filename_by_fileno(i, (long long)v27, a3, qword_C809D8 >> 32, a5, a6);
if ( (unsigned int)inline_mysql_file_delete(
v15,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
3439LL,
v6,
16LL) )
{
translog_unlock();
return 1;
}
}
v21 = v24 - ((((_WORD)v24 - 1) & 0x1FFF) + 1) + 0x2000;
v20 = 0x2000 - ((((_WORD)v24 - 1) & 0x1FFF) + 1);
memset(v26, 255LL, v20);
v18 = open_logfile_by_number_no_cache(HIDWORD(v24), 255LL, v7, v8, v9, v10);
v14 = 1;
if ( v18 >= 0 )
{
v13 = 1;
if ( !(unsigned int)inline_mysql_file_chsize(
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
3453LL,
(unsigned int)v18,
v21,
255LL,
16LL) )
{
if ( !v20 || (v13 = 1, !my_pwrite((unsigned int)v18, v26, v20, (unsigned int)v24, 52LL)) )
v13 = (unsigned int)inline_mysql_file_sync(
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
3456LL,
(unsigned int)v18,
16LL) != 0;
}
v14 = v13;
}
v17 = v14 & 1;
++translog_syncs;
v12 = 0;
if ( v18 > 0 )
v12 = (unsigned int)inline_mysql_file_close(
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0xD82u,
v18,
16LL) != 0;
v17 |= v12;
if ( (unsigned long long)sync_log_dir >= 2 )
{
v17 |= inline_mysql_file_sync(
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
3461LL,
(unsigned int)dword_480080,
48LL);
++translog_syncs;
}
if ( v17 )
return 1;
qword_C809D8 = v24;
v22 = (v21 - 0x2000) | ((unsigned long long)HIDWORD(v24) << 32);
v16 = &v22;
page = (long long *)translog_get_page((long long **)&v16, (long long)&log_descriptor[95], 0LL);
if ( !page )
return 1;
if ( page != &log_descriptor[95] )
memcpy(&log_descriptor[95], page, 0x2000LL);
*(_QWORD *)(qword_C80A08 + 1048592) = v22;
*(_DWORD *)((char *)my_rw_destroy + qword_C80A08) = v24 - v22;
qword_C80A00 = (long long)&log_descriptor[95] + *(unsigned int *)((char *)my_rw_destroy + qword_C80A08);
word_C80A10 = *(_DWORD *)((char *)my_rw_destroy + qword_C80A08);
return 0;
}
|
translog_truncate_log:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x2260
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x2220],RDI
JMP 0x0012f4b1
LAB_0012f4b1:
JMP 0x0012f4b3
LAB_0012f4b3:
JMP 0x0012f4b5
LAB_0012f4b5:
MOV RAX,qword ptr [RBP + -0x2220]
SAR RAX,0x20
ADD EAX,0x1
MOV dword ptr [RBP + -0x223c],EAX
LAB_0012f4c9:
MOV EAX,dword ptr [RBP + -0x223c]
MOV RCX,qword ptr [0x00d809d8]
SAR RCX,0x20
CMP EAX,ECX
JA 0x0012f548
LEA RAX,[0x57eb04]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x225c],EAX
MOV EDI,dword ptr [RBP + -0x223c]
LEA RSI,[RBP + -0x210]
CALL 0x0012baf0
MOV EDI,dword ptr [RBP + -0x225c]
MOV RCX,RAX
LEA RSI,[0x2573aa]
MOV EDX,0xd6f
MOV R8D,0x10
CALL 0x00133c40
CMP EAX,0x0
JZ 0x0012f535
CALL 0x0012c4b0
MOV byte ptr [RBP + -0x2211],0x1
JMP 0x0012f8ac
LAB_0012f535:
JMP 0x0012f537
LAB_0012f537:
MOV EAX,dword ptr [RBP + -0x223c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x223c],EAX
JMP 0x0012f4c9
LAB_0012f548:
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x2220]
MOV dword ptr [RBP + -0x2234],EAX
MOV EAX,dword ptr [RBP + -0x2234]
MOV ECX,dword ptr [RBP + -0x2234]
SUB ECX,0x1
AND ECX,0x1fff
ADD ECX,0x1
SUB EAX,ECX
ADD EAX,0x2000
MOV dword ptr [RBP + -0x2234],EAX
MOV EAX,dword ptr [RBP + -0x2234]
MOV RCX,0xffffffff
AND RCX,qword ptr [RBP + -0x2220]
SUB RAX,RCX
MOV dword ptr [RBP + -0x2238],EAX
LEA RDI,[RBP + -0x2210]
MOV EAX,dword ptr [RBP + -0x2238]
MOV EDX,EAX
MOV ESI,0xff
CALL 0x0012a2a0
MOV RAX,qword ptr [RBP + -0x2220]
SAR RAX,0x20
MOV EDI,EAX
CALL 0x0012c0c0
MOV ECX,EAX
MOV dword ptr [RBP + -0x2240],ECX
MOV AL,0x1
CMP ECX,0x0
MOV byte ptr [RBP + -0x225d],AL
JL 0x0012f6a1
MOV EDX,dword ptr [RBP + -0x2240]
MOV EAX,dword ptr [RBP + -0x2234]
MOV ECX,EAX
LEA RDI,[0x2573aa]
MOV ESI,0xd7d
MOV R8D,0xff
MOV R9D,0x10
CALL 0x00135ae0
MOV ECX,EAX
MOV AL,0x1
CMP ECX,0x0
MOV byte ptr [RBP + -0x225e],AL
JNZ 0x0012f695
CMP dword ptr [RBP + -0x2238],0x0
JZ 0x0012f66d
MOV EDI,dword ptr [RBP + -0x2240]
LEA RSI,[RBP + -0x2210]
MOV EAX,dword ptr [RBP + -0x2238]
MOV EDX,EAX
MOV RCX,0xffffffff
AND RCX,qword ptr [RBP + -0x2220]
MOV R8D,0x34
CALL 0x001fa980
MOV RCX,RAX
MOV AL,0x1
CMP RCX,0x0
MOV byte ptr [RBP + -0x225e],AL
JNZ 0x0012f695
LAB_0012f66d:
MOV EDX,dword ptr [RBP + -0x2240]
LEA RDI,[0x2573aa]
MOV ESI,0xd80
MOV ECX,0x10
CALL 0x00135460
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x225e],AL
LAB_0012f695:
MOV AL,byte ptr [RBP + -0x225e]
MOV byte ptr [RBP + -0x225d],AL
LAB_0012f6a1:
MOV AL,byte ptr [RBP + -0x225d]
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x2244],EAX
MOV RAX,qword ptr [0x0057eb88]
ADD RAX,0x1
MOV qword ptr [0x0057eb88],RAX
XOR EAX,EAX
CMP dword ptr [RBP + -0x2240],0x0
MOV byte ptr [RBP + -0x225f],AL
JLE 0x0012f6fd
MOV EDX,dword ptr [RBP + -0x2240]
LEA RDI,[0x2573aa]
MOV ESI,0xd82
MOV ECX,0x10
CALL 0x0012c190
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x225f],AL
LAB_0012f6fd:
MOV AL,byte ptr [RBP + -0x225f]
AND AL,0x1
MOVZX EAX,AL
OR EAX,dword ptr [RBP + -0x2244]
MOV dword ptr [RBP + -0x2244],EAX
CMP qword ptr [0x003c4618],0x2
JC 0x0012f758
MOV EDX,dword ptr [0x00580080]
LEA RDI,[0x2573aa]
MOV ESI,0xd85
MOV ECX,0x30
CALL 0x00135460
OR EAX,dword ptr [RBP + -0x2244]
MOV dword ptr [RBP + -0x2244],EAX
MOV RAX,qword ptr [0x0057eb88]
ADD RAX,0x1
MOV qword ptr [0x0057eb88],RAX
LAB_0012f758:
CMP dword ptr [RBP + -0x2244],0x0
JZ 0x0012f76f
JMP 0x0012f763
LAB_0012f763:
MOV byte ptr [RBP + -0x2211],0x1
JMP 0x0012f8ac
LAB_0012f76f:
MOV RAX,qword ptr [RBP + -0x2220]
MOV qword ptr [0x00d809d8],RAX
MOV RAX,qword ptr [RBP + -0x2220]
SAR RAX,0x20
MOV EAX,EAX
SHL RAX,0x20
MOV ECX,dword ptr [RBP + -0x2234]
SUB ECX,0x2000
MOV ECX,ECX
OR RAX,RCX
MOV qword ptr [RBP + -0x2230],RAX
LEA RAX,[RBP + -0x2230]
MOV qword ptr [RBP + -0x2258],RAX
LEA RDI,[RBP + -0x2258]
LEA RSI,[0x57fd90]
ADD RSI,0x2f8
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0012e460
MOV qword ptr [RBP + -0x2228],RAX
CMP RAX,0x0
JNZ 0x0012f7ed
JMP 0x0012f7e1
LAB_0012f7e1:
MOV byte ptr [RBP + -0x2211],0x1
JMP 0x0012f8ac
LAB_0012f7ed:
LEA RAX,[0x57fd90]
ADD RAX,0x2f8
CMP qword ptr [RBP + -0x2228],RAX
JZ 0x0012f822
MOV RSI,qword ptr [RBP + -0x2228]
LEA RDI,[0x57fd90]
ADD RDI,0x2f8
MOV EDX,0x2000
CALL 0x0012a0b0
LAB_0012f822:
MOV RCX,qword ptr [RBP + -0x2230]
MOV RAX,qword ptr [0x00d80a08]
MOV qword ptr [RAX + 0x100010],RCX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x2220]
MOV RCX,0xffffffff
AND RCX,qword ptr [RBP + -0x2230]
SUB RAX,RCX
MOV ECX,EAX
MOV RAX,qword ptr [0x00d80a08]
MOV dword ptr [RAX + 0x100030],ECX
MOV RAX,qword ptr [0x00d80a08]
MOV EAX,dword ptr [RAX + 0x100030]
MOV ECX,EAX
LEA RAX,[0x57fd90]
ADD RAX,0x2f8
ADD RAX,RCX
MOV qword ptr [0x00d80a00],RAX
MOV RAX,qword ptr [0x00d80a08]
MOV EAX,dword ptr [RAX + 0x100030]
MOV word ptr [0x00d80a10],AX
MOV byte ptr [RBP + -0x2211],0x0
LAB_0012f8ac:
MOV AL,byte ptr [RBP + -0x2211]
MOV byte ptr [RBP + -0x2260],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0012f8d9
MOV AL,byte ptr [RBP + -0x2260]
ADD RSP,0x2260
POP RBP
RET
LAB_0012f8d9:
CALL 0x0012a250
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int8 translog_truncate_log(ulong param_1)
{
int4 uVar1;
int iVar2;
uint uVar3;
int8 uVar4;
long lVar5;
long in_FS_OFFSET;
bool local_2267;
bool local_2266;
bool local_2265;
ulong *local_2260 [2];
uint local_224c;
int local_2248;
uint local_2244;
uint local_2240;
int local_223c;
ulong local_2238;
int *local_2230;
ulong local_2228;
int1 local_2219;
int1 local_2218 [8192];
int1 local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_2244 = (uint)(param_1 >> 0x20);
local_2228 = param_1;
do {
uVar1 = key_file_translog;
local_2244 = local_2244 + 1;
if ((uint)(DAT_00d809d8 >> 0x20) < local_2244) {
iVar2 = (int)local_2228;
local_223c = (iVar2 - ((iVar2 - 1U & 0x1fff) + 1)) + 0x2000;
local_2240 = local_223c - iVar2;
memset(local_2218,0xff,(ulong)local_2240);
local_2248 = open_logfile_by_number_no_cache((long)local_2228 >> 0x20 & 0xffffffff);
local_2265 = true;
if (-1 < local_2248) {
iVar2 = inline_mysql_file_chsize
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0xd7d,local_2248,local_223c,0xff,0x10);
local_2266 = true;
if (iVar2 == 0) {
if (local_2240 != 0) {
lVar5 = my_pwrite(local_2248,local_2218,local_2240,local_2228 & 0xffffffff,0x34);
local_2266 = true;
if (lVar5 != 0) goto LAB_0012f695;
}
iVar2 = inline_mysql_file_sync
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c"
,0xd80,local_2248,0x10);
local_2266 = iVar2 != 0;
}
LAB_0012f695:
local_2265 = local_2266;
}
local_224c = (uint)local_2265;
translog_syncs = translog_syncs + 1;
local_2267 = false;
if (0 < local_2248) {
iVar2 = inline_mysql_file_close
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0xd82,local_2248,0x10);
local_2267 = iVar2 != 0;
}
local_224c = local_2267 | local_224c;
if (1 < sync_log_dir) {
uVar3 = inline_mysql_file_sync
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0xd85,_DAT_00580080,0x30);
local_224c = uVar3 | local_224c;
translog_syncs = translog_syncs + 1;
}
if (local_224c == 0) {
DAT_00d809d8 = local_2228;
local_2238 = ((long)local_2228 >> 0x20) << 0x20 | (ulong)(local_223c - 0x2000);
local_2260[0] = &local_2238;
local_2230 = (int *)translog_get_page(local_2260,&DAT_00580088,0);
if (local_2230 == (int *)0x0) {
local_2219 = 1;
}
else {
if (local_2230 != &DAT_00580088) {
memcpy(&DAT_00580088,local_2230,0x2000);
}
*(ulong *)(Elf64_Ehdr_00100000.e_ident_pad + DAT_00d80a08 + 7) = local_2238;
*(int *)(Elf64_Ehdr_00100000.e_ident_pad + DAT_00d80a08 + 0x27) =
(int)local_2228 - (int)local_2238;
DAT_00d80a00 = &DAT_00580088 +
*(uint *)(Elf64_Ehdr_00100000.e_ident_pad + DAT_00d80a08 + 0x27);
DAT_00d80a10 = (int2)
*(int4 *)(Elf64_Ehdr_00100000.e_ident_pad + DAT_00d80a08 + 0x27);
local_2219 = 0;
}
}
else {
local_2219 = 1;
}
goto LAB_0012f8ac;
}
uVar4 = translog_filename_by_fileno(local_2244,local_218);
iVar2 = inline_mysql_file_delete
(uVar1,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0xd6f,uVar4,0x10);
} while (iVar2 == 0);
translog_unlock();
local_2219 = 1;
LAB_0012f8ac:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_2219);
}
|
|
16,485
|
ma_nommap_pread
|
eloqsql/storage/maria/ma_dynrec.c
|
size_t _ma_nommap_pread(MARIA_HA *info, uchar *Buffer,
size_t Count, my_off_t offset, myf MyFlags)
{
return mysql_file_pread(info->dfile.file, Buffer, Count, offset, MyFlags);
}
|
O3
|
c
|
ma_nommap_pread:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, -0x30(%rbp)
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r13
movl 0x480(%rdi), %ebx
leaq 0x349d86(%rip), %rax # 0x386010
movq (%rax), %rax
leaq -0x78(%rbp), %rdi
movl %ebx, %esi
movl $0x6, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x3c2cc
movl %ebx, %edi
movq %r13, %rsi
movq %r14, %rdx
movq %r12, %rcx
movq -0x30(%rbp), %r8
callq 0xa0544
movq %rax, %rbx
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
leaq 0x349d3a(%rip), %rax # 0x386010
movq (%rax), %rax
leaq 0x9d47c(%rip), %rdx # 0xd975c
movq %r15, %rdi
movq %r14, %rsi
movl $0xa2, %ecx
callq *0x210(%rax)
movl %ebx, %edi
movq %r13, %rsi
movq %r14, %rdx
movq %r12, %rcx
movq -0x30(%rbp), %r12
movq %r12, %r8
callq 0xa0544
movq %rax, %rbx
xorl %esi, %esi
testq %rax, %rax
cmovneq %rsi, %r14
cmpq $-0x1, %rax
cmovneq %rax, %rsi
testb $0x6, %r12b
cmovneq %r14, %rsi
leaq 0x349ce5(%rip), %rax # 0x386010
movq (%rax), %rax
movq %r15, %rdi
callq *0x218(%rax)
jmp 0x3c2ba
|
_ma_nommap_pread:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rbp+var_30], r8
mov r12, rcx
mov r14, rdx
mov r13, rsi
mov ebx, [rdi+480h]
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_78]
mov esi, ebx
mov edx, 6
call qword ptr [rax+158h]
test rax, rax
jnz short loc_3C2CC
mov edi, ebx
mov rsi, r13
mov rdx, r14
mov rcx, r12
mov r8, [rbp+var_30]
call my_pread
mov rbx, rax
loc_3C2BA:
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3C2CC:
mov r15, rax
lea rax, PSI_server
mov rax, [rax]
lea rdx, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r15
mov rsi, r14
mov ecx, 0A2h
call qword ptr [rax+210h]
mov edi, ebx
mov rsi, r13
mov rdx, r14
mov rcx, r12
mov r12, [rbp+var_30]
mov r8, r12
call my_pread
mov rbx, rax
xor esi, esi
test rax, rax
cmovnz r14, rsi
cmp rax, 0FFFFFFFFFFFFFFFFh
cmovnz rsi, rax
test r12b, 6
cmovnz rsi, r14
lea rax, PSI_server
mov rax, [rax]
mov rdi, r15
call qword ptr [rax+218h]
jmp short loc_3C2BA
|
long long ma_nommap_pread(long long a1, long long a2, long long a3, long long a4, long long a5)
{
unsigned int v7; // ebx
long long v8; // rax
long long v9; // rbx
long long v11; // r15
_BYTE v12[72]; // [rsp+8h] [rbp-78h] BYREF
long long v13; // [rsp+50h] [rbp-30h]
v13 = a5;
v7 = *(_DWORD *)(a1 + 1152);
v8 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v12, v7, 6LL);
if ( !v8 )
return my_pread(v7, a2, a3, a4, v13);
v11 = v8;
((void ( *)(long long, long long, const char *, long long))PSI_server[66])(
v8,
a3,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c",
162LL);
v9 = my_pread(v7, a2, a3, a4, v13);
((void ( *)(long long))PSI_server[67])(v11);
return v9;
}
|
_ma_nommap_pread:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x30],R8
MOV R12,RCX
MOV R14,RDX
MOV R13,RSI
MOV EBX,dword ptr [RDI + 0x480]
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x78]
MOV ESI,EBX
MOV EDX,0x6
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0013c2cc
MOV EDI,EBX
MOV RSI,R13
MOV RDX,R14
MOV RCX,R12
MOV R8,qword ptr [RBP + -0x30]
CALL 0x001a0544
MOV RBX,RAX
LAB_0013c2ba:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013c2cc:
MOV R15,RAX
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
LEA RDX,[0x1d975c]
MOV RDI,R15
MOV RSI,R14
MOV ECX,0xa2
CALL qword ptr [RAX + 0x210]
MOV EDI,EBX
MOV RSI,R13
MOV RDX,R14
MOV RCX,R12
MOV R12,qword ptr [RBP + -0x30]
MOV R8,R12
CALL 0x001a0544
MOV RBX,RAX
XOR ESI,ESI
TEST RAX,RAX
CMOVNZ R14,RSI
CMP RAX,-0x1
CMOVNZ RSI,RAX
TEST R12B,0x6
CMOVNZ RSI,R14
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
MOV RDI,R15
CALL qword ptr [RAX + 0x218]
JMP 0x0013c2ba
|
long _ma_nommap_pread(long param_1,int8 param_2,long param_3,int8 param_4,ulong param_5)
{
int4 uVar1;
ulong uVar2;
long lVar3;
long lVar4;
long lVar5;
int1 local_80 [72];
ulong local_38;
uVar1 = *(int4 *)(param_1 + 0x480);
local_38 = param_5;
lVar3 = (**(code **)(PSI_server + 0x158))(local_80,uVar1,6);
if (lVar3 == 0) {
lVar4 = my_pread(uVar1,param_2,param_3,param_4,local_38);
}
else {
(**(code **)(PSI_server + 0x210))
(lVar3,param_3,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c",
0xa2);
uVar2 = local_38;
lVar4 = my_pread(uVar1,param_2,param_3,param_4,local_38);
if (lVar4 != 0) {
param_3 = 0;
}
lVar5 = 0;
if (lVar4 != -1) {
lVar5 = lVar4;
}
if ((uVar2 & 6) != 0) {
lVar5 = param_3;
}
(**(code **)(PSI_server + 0x218))(lVar3,lVar5);
}
return lVar4;
}
|
|
16,486
|
common_log::set_colors(bool)
|
llama.cpp/common/log.cpp
|
void set_colors(bool colors) {
pause();
if (colors) {
g_col[COMMON_LOG_COL_DEFAULT] = LOG_COL_DEFAULT;
g_col[COMMON_LOG_COL_BOLD] = LOG_COL_BOLD;
g_col[COMMON_LOG_COL_RED] = LOG_COL_RED;
g_col[COMMON_LOG_COL_GREEN] = LOG_COL_GREEN;
g_col[COMMON_LOG_COL_YELLOW] = LOG_COL_YELLOW;
g_col[COMMON_LOG_COL_BLUE] = LOG_COL_BLUE;
g_col[COMMON_LOG_COL_MAGENTA] = LOG_COL_MAGENTA;
g_col[COMMON_LOG_COL_CYAN] = LOG_COL_CYAN;
g_col[COMMON_LOG_COL_WHITE] = LOG_COL_WHITE;
} else {
for (size_t i = 0; i < g_col.size(); i++) {
g_col[i] = "";
}
}
resume();
}
|
O3
|
cpp
|
common_log::set_colors(bool):
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0xc7f82
testl %ebp, %ebp
je 0xc8441
movq 0x44392(%rip), %rax # 0x10c768
leaq 0x1278(%rip), %rcx # 0xc9655
movq %rcx, (%rax)
movq 0x44381(%rip), %rax # 0x10c768
leaq 0x1243d(%rip), %rcx # 0xda82b
movq %rcx, 0x8(%rax)
leaq 0x12437(%rip), %rcx # 0xda830
movq %rcx, 0x10(%rax)
leaq 0x12432(%rip), %rcx # 0xda836
movq %rcx, 0x18(%rax)
leaq 0x2e40(%rip), %rcx # 0xcb24f
movq %rcx, 0x20(%rax)
leaq 0x12422(%rip), %rcx # 0xda83c
movq %rcx, 0x28(%rax)
leaq 0x1241d(%rip), %rcx # 0xda842
movq %rcx, 0x30(%rax)
leaq 0x12418(%rip), %rcx # 0xda848
movq %rcx, 0x38(%rax)
leaq 0x12413(%rip), %rcx # 0xda84e
movq %rcx, 0x40(%rax)
jmp 0xc847b
movq 0x44320(%rip), %rax # 0x10c768
cmpq %rax, 0x44321(%rip) # 0x10c770
je 0xc847b
xorl %ecx, %ecx
leaq 0xa136(%rip), %rdx # 0xd2590
movq %rdx, (%rax,%rcx,8)
incq %rcx
movq 0x44308(%rip), %rsi # 0x10c770
movq 0x442f9(%rip), %rax # 0x10c768
subq %rax, %rsi
sarq $0x3, %rsi
cmpq %rsi, %rcx
jb 0xc845a
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xc800a
nop
|
_ZN10common_log10set_colorsEb:
push rbp
push rbx
push rax
mov ebp, esi
mov rbx, rdi
call _ZN10common_log5pauseEv; common_log::pause(void)
test ebp, ebp
jz short loc_C8441
mov rax, cs:_ZL5g_col; g_col
lea rcx, a0m+1; "\x1B[0m"
mov [rax], rcx
mov rax, cs:_ZL5g_col; g_col
lea rcx, a1m; "\x1B[1m"
mov [rax+8], rcx
lea rcx, a31m; "\x1B[31m"
mov [rax+10h], rcx
lea rcx, a32m; "\x1B[32m"
mov [rax+18h], rcx
lea rcx, a33m; "\x1B[33m"
mov [rax+20h], rcx
lea rcx, a34m; "\x1B[34m"
mov [rax+28h], rcx
lea rcx, a35m; "\x1B[35m"
mov [rax+30h], rcx
lea rcx, a36m; "\x1B[36m"
mov [rax+38h], rcx
lea rcx, a37m; "\x1B[37m"
mov [rax+40h], rcx
jmp short loc_C847B
loc_C8441:
mov rax, cs:_ZL5g_col; g_col
cmp cs:qword_10C770, rax
jz short loc_C847B
xor ecx, ecx
lea rdx, aExampleToolCal+1Dh; ""
loc_C845A:
mov [rax+rcx*8], rdx
inc rcx
mov rsi, cs:qword_10C770
mov rax, cs:_ZL5g_col; g_col
sub rsi, rax
sar rsi, 3
cmp rcx, rsi
jb short loc_C845A
loc_C847B:
mov rdi, rbx; this
add rsp, 8
pop rbx
pop rbp
jmp _ZN10common_log6resumeEv; common_log::resume(void)
|
long long common_log::set_colors(common_log *this, int a2)
{
_QWORD *v2; // rax
long long v3; // rax
unsigned long long v4; // rcx
common_log::pause(this);
if ( a2 )
{
*(_QWORD *)g_col = "\x1B[0m";
v2 = (_QWORD *)g_col;
*(_QWORD *)(g_col + 8) = "\x1B[1m";
v2[2] = "\x1B[31m";
v2[3] = "\x1B[32m";
v2[4] = "\x1B[33m";
v2[5] = "\x1B[34m";
v2[6] = "\x1B[35m";
v2[7] = "\x1B[36m";
v2[8] = "\x1B[37m";
}
else
{
v3 = g_col;
if ( qword_10C770 != g_col )
{
v4 = 0LL;
do
{
*(_QWORD *)(v3 + 8 * v4++) = "";
v3 = g_col;
}
while ( v4 < (qword_10C770 - g_col) >> 3 );
}
}
return common_log::resume(this);
}
|
set_colors:
PUSH RBP
PUSH RBX
PUSH RAX
MOV EBP,ESI
MOV RBX,RDI
CALL 0x001c7f82
TEST EBP,EBP
JZ 0x001c8441
MOV RAX,qword ptr [0x0020c768]
LEA RCX,[0x1c9655]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [0x0020c768]
LEA RCX,[0x1da82b]
MOV qword ptr [RAX + 0x8],RCX
LEA RCX,[0x1da830]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[0x1da836]
MOV qword ptr [RAX + 0x18],RCX
LEA RCX,[0x1cb24f]
MOV qword ptr [RAX + 0x20],RCX
LEA RCX,[0x1da83c]
MOV qword ptr [RAX + 0x28],RCX
LEA RCX,[0x1da842]
MOV qword ptr [RAX + 0x30],RCX
LEA RCX,[0x1da848]
MOV qword ptr [RAX + 0x38],RCX
LEA RCX,[0x1da84e]
MOV qword ptr [RAX + 0x40],RCX
JMP 0x001c847b
LAB_001c8441:
MOV RAX,qword ptr [0x0020c768]
CMP qword ptr [0x0020c770],RAX
JZ 0x001c847b
XOR ECX,ECX
LEA RDX,[0x1d2590]
LAB_001c845a:
MOV qword ptr [RAX + RCX*0x8],RDX
INC RCX
MOV RSI,qword ptr [0x0020c770]
MOV RAX,qword ptr [0x0020c768]
SUB RSI,RAX
SAR RSI,0x3
CMP RCX,RSI
JC 0x001c845a
LAB_001c847b:
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x001c800a
|
/* common_log::set_colors(bool) */
void __thiscall common_log::set_colors(common_log *this,bool param_1)
{
int8 *puVar1;
ulong uVar2;
int7 in_register_00000031;
pause(this);
if ((int)CONCAT71(in_register_00000031,param_1) == 0) {
if (DAT_0020c770 != g_col) {
uVar2 = 0;
do {
g_col[uVar2] = "";
uVar2 = uVar2 + 1;
} while (uVar2 < (ulong)((long)DAT_0020c770 - (long)g_col >> 3));
}
}
else {
*g_col = &DAT_001c9655;
puVar1 = g_col;
g_col[1] = &DAT_001da82b;
puVar1[2] = &DAT_001da830;
puVar1[3] = &DAT_001da836;
puVar1[4] = &DAT_001cb24f;
puVar1[5] = &DAT_001da83c;
puVar1[6] = &DAT_001da842;
puVar1[7] = &DAT_001da848;
puVar1[8] = &DAT_001da84e;
}
resume(this);
return;
}
|
|
16,487
|
parse_prefixed_json_tool_call_array(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)
|
monkey531[P]llama/common/chat.cpp
|
static common_chat_msg parse_prefixed_json_tool_call_array(const std::string& input, const std::string & prefix, size_t rstrip_prefix = 0) {
auto content_end = input.find(prefix);
size_t tc_start = std::string::npos;
common_chat_msg result;
result.role = "assistant";
const auto process_tool_calls = [&](const json & tool_calls) {
for (const auto & tool_call : tool_calls) {
const auto & arguments = tool_call["arguments"];
result.tool_calls.push_back({
tool_call["name"],
arguments.is_string() ? arguments.get<std::string>() : arguments.dump(),
tool_call.contains("id") ? tool_call["id"] : "",
});
}
};
if (content_end == std::string::npos) {
result.content = input;
} else {
tc_start = content_end + prefix.size() - rstrip_prefix;
result.content = input.substr(0, content_end);
auto tool_calls = json::parse(input.substr(tc_start));
process_tool_calls(tool_calls);
}
return result;
}
|
O2
|
cpp
|
parse_prefixed_json_tool_call_array(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r13
movq %rsi, %rdi
movq %rdx, %rsi
xorl %edx, %edx
callq 0x241b0
movq %rax, %r14
movq %r13, %rdi
callq 0xa8e24
leaq 0xc7f4(%rip), %rsi # 0xb3383
movq %r13, 0x8(%rsp)
movq %r13, %rdi
callq 0x24130
cmpq $-0x1, %r14
je 0xa6d91
movq 0x8(%r12), %r12
leaq 0x50(%rsp), %rdi
movq %rbx, %rsi
xorl %edx, %edx
movq %r14, %rcx
callq 0x23940
subq %r15, %r14
addq %r12, %r14
movq 0x8(%rsp), %rax
leaq 0x20(%rax), %rdi
leaq 0x50(%rsp), %r15
movq %r15, %rsi
callq 0x23ae0
movq %r15, %rdi
callq 0x241f8
leaq 0x50(%rsp), %rdi
pushq $-0x1
popq %rcx
movq %rbx, %rsi
movq %r14, %rdx
callq 0x23940
xorps %xmm0, %xmm0
leaq 0xb0(%rsp), %rdx
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
pushq $0x1
popq %rcx
xorl %r8d, %r8d
callq 0x7aa90
leaq 0xb0(%rsp), %rdi
callq 0x47dd4
leaq 0x50(%rsp), %r15
movq %r15, %rdi
callq 0x241f8
leaq 0x20(%rsp), %r12
leaq 0x10(%rsp), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x67f1e
leaq 0xd8(%rsp), %rdi
movq %rbx, %rsi
callq 0x6818a
movq 0x8(%rsp), %rax
leaq 0x40(%rax), %rbx
leaq 0x40(%rsp), %rbp
movq %r12, %rdi
leaq 0xd8(%rsp), %rsi
callq 0x679c2
testb %al, %al
je 0xa6d80
movq %r12, %rdi
callq 0x67bbc
movq %rax, %r13
movq %rax, %rdi
leaq 0xdaa3(%rip), %rsi # 0xb4738
callq 0x7b0ca
movq %rax, %r14
movq %r13, %rdi
leaq 0xe02d(%rip), %rsi # 0xb4cd4
callq 0x7b0ca
movq %r15, %rdi
movq %rax, %rsi
callq 0x63e20
cmpb $0x3, (%r14)
jne 0xa6ccc
leaq 0x70(%rsp), %rdi
movq %r14, %rsi
callq 0x63e20
jmp 0xa6ce5
leaq 0x70(%rsp), %rdi
movq %r14, %rsi
pushq $-0x1
popq %rdx
pushq $0x20
popq %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5d33a
movq %r13, %rdi
leaq 0xcaf3(%rip), %rsi # 0xb37e2
callq 0x7b0a8
testb %al, %al
je 0xa6d14
movq %r13, %rdi
leaq 0xcae0(%rip), %rsi # 0xb37e2
callq 0x7b0ca
movq %rbp, %rdi
movq %rax, %rsi
callq 0x42160
jmp 0xa6d23
movq %rbp, %rdi
leaq 0x8dbb(%rip), %rsi # 0xafad9
callq 0x88754
leaq 0x90(%rsp), %rdi
movq %rbp, %rsi
callq 0x63e20
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa8ea8
movq %r15, %rdi
callq 0x8a718
movq %rbp, %rdi
callq 0x425c4
movq 0x20(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x2, %eax
je 0xa6d6b
cmpl $0x1, %eax
jne 0xa6d76
addq $0x30, 0x28(%rsp)
jmp 0xa6c68
addq $0x10, 0x30(%rsp)
jmp 0xa6c68
incq 0x38(%rsp)
jmp 0xa6c68
leaq 0x10(%rsp), %rdi
callq 0x425c4
movq 0x8(%rsp), %r14
jmp 0xa6da2
movq 0x8(%rsp), %r14
leaq 0x20(%r14), %rdi
movq %rbx, %rsi
callq 0x234e0
movq %r14, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa6dd9
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x47dd4
leaq 0x50(%rsp), %rdi
callq 0x241f8
jmp 0xa6e31
jmp 0xa6dd9
jmp 0xa6dd9
movq %rax, %rbx
jmp 0xa6e31
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x8a718
xorl %ebp, %ebp
jmp 0xa6df5
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x40(%rsp), %rdi
callq 0x425c4
testb %bpl, %bpl
jne 0xa6e0e
jmp 0xa6e27
movq %rax, %rbx
jmp 0xa6e18
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x241f8
leaq 0x50(%rsp), %rdi
callq 0x241f8
jmp 0xa6e27
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x425c4
movq 0x8(%rsp), %rdi
callq 0x5c67e
movq %rbx, %rdi
callq 0x23fc0
|
_ZL35parse_prefixed_json_tool_call_arrayRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_m:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0F8h
mov r15, rcx
mov r12, rdx
mov rbx, rsi
mov r13, rdi
mov rdi, rsi
mov rsi, rdx
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findERKS4_m; std::string::find(std::string const&,ulong)
mov r14, rax
mov rdi, r13; this
call _ZN15common_chat_msgC2Ev; common_chat_msg::common_chat_msg(void)
lea rsi, aYouAreAHelpful+12h; "assistant"
mov [rsp+128h+var_120], r13
mov rdi, r13
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*)
cmp r14, 0FFFFFFFFFFFFFFFFh
jz loc_A6D91
mov r12, [r12+8]
lea rdi, [rsp+128h+var_D8]
mov rsi, rbx
xor edx, edx
mov rcx, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
sub r14, r15
add r14, r12
mov rax, [rsp+128h+var_120]
lea rdi, [rax+20h]
lea r15, [rsp+128h+var_D8]
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, r15; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+128h+var_D8]
push 0FFFFFFFFFFFFFFFFh
pop rcx
mov rsi, rbx
mov rdx, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
xorps xmm0, xmm0
lea rdx, [rsp+128h+var_78]
movaps xmmword ptr [rdx+10h], xmm0
movaps xmmword ptr [rdx], xmm0
lea rdi, [rsp+128h+var_118]
lea rsi, [rsp+128h+var_D8]
push 1
pop rcx
xor r8d, r8d
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5parseIS9_EESD_OT_St8functionIFbiNS0_6detail13parse_event_tERSD_EEbb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::parse<std::string>(std::string &&,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)>,bool,bool)
lea rdi, [rsp+128h+var_78]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
lea r15, [rsp+128h+var_D8]
mov rdi, r15; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea r12, [rsp+128h+var_108]
lea rbx, [rsp+128h+var_118]
mov rdi, r12
mov rsi, rbx
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6cbeginEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::cbegin(void)
lea rdi, [rsp+128h+var_50]
mov rsi, rbx
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4cendEv; 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>::cend(void)
mov rax, [rsp+128h+var_120]
lea rbx, [rax+40h]
lea rbp, [rsp+128h+var_E8]
loc_A6C68:
mov rdi, r12
lea rsi, [rsp+128h+var_50]
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
test al, al
jz loc_A6D80
mov rdi, r12
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEdeEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::operator*(void)
mov r13, rax
mov rdi, rax
lea rsi, aKeywordArgumen+9; "arguments"
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[]<char const>(char const *)
mov r14, rax
mov rdi, r13
lea rsi, aNamespacedSetO+2Fh; "name"
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[]<char const>(char const *)
mov rdi, r15
mov rsi, rax
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
cmp byte ptr [r14], 3
jnz short loc_A6CCC
lea rdi, [rsp+128h+var_B8]
mov rsi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
jmp short loc_A6CE5
loc_A6CCC:
lea rdi, [rsp+128h+var_B8]
mov rsi, r14
push 0FFFFFFFFFFFFFFFFh
pop rdx
push 20h ; ' '
pop rcx
xor r8d, r8d
xor r9d, r9d
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t)
loc_A6CE5:
mov rdi, r13
lea rsi, aToolCallId+0Ah; "id"
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
test al, al
jz short loc_A6D14
mov rdi, r13
lea rsi, aToolCallId+0Ah; "id"
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[]<char const>(char const *)
mov rdi, rbp
mov rsi, rax
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
jmp short loc_A6D23
loc_A6D14:
mov rdi, rbp
lea rsi, aErrorWhileHand_0+34h; ""
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRA1_KcA1_cTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SK_EE5valueEiE4typeELi0EEEOT_
loc_A6D23:
lea rdi, [rsp+128h+var_98]
mov rsi, rbp
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
mov rdi, rbx
mov rsi, r15
call _ZNSt6vectorI16common_tool_callSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<common_tool_call>::emplace_back<common_tool_call>(common_tool_call &&)
mov rdi, r15; this
call _ZN16common_tool_callD2Ev; common_tool_call::~common_tool_call()
mov rdi, rbp
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rax, [rsp+128h+var_108]
movzx eax, byte ptr [rax]
cmp eax, 2
jz short loc_A6D6B
cmp eax, 1
jnz short loc_A6D76
add [rsp+128h+var_100], 30h ; '0'
jmp loc_A6C68
loc_A6D6B:
add [rsp+128h+var_F8], 10h
jmp loc_A6C68
loc_A6D76:
inc [rsp+128h+var_F0]
jmp loc_A6C68
loc_A6D80:
lea rdi, [rsp+128h+var_118]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov r14, [rsp+128h+var_120]
jmp short loc_A6DA2
loc_A6D91:
mov r14, [rsp+128h+var_120]
lea rdi, [r14+20h]
mov rsi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
loc_A6DA2:
mov rax, r14
add rsp, 0F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_A6DD9
mov rbx, rax
lea rdi, [rsp+arg_A8]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
lea rdi, [rsp+arg_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_A6E31
jmp short loc_A6DD9
jmp short $+2
loc_A6DD9:
mov rbx, rax
jmp short loc_A6E31
mov rbx, rax
lea rdi, [rsp+arg_48]; this
call _ZN16common_tool_callD2Ev; common_tool_call::~common_tool_call()
xor ebp, ebp
jmp short loc_A6DF5
mov rbx, rax
mov bpl, 1
loc_A6DF5:
lea rdi, [rsp+arg_38]
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()
test bpl, bpl
jnz short loc_A6E0E
jmp short loc_A6E27
mov rbx, rax
jmp short loc_A6E18
mov rbx, rax
loc_A6E0E:
lea rdi, [rsp+arg_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_A6E18:
lea rdi, [rsp+arg_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_A6E27
mov rbx, rax
loc_A6E27:
lea rdi, [rsp+arg_8]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_A6E31:
mov rdi, [rsp+arg_0]; this
call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg()
mov rdi, rbx
call __Unwind_Resume
|
common_chat_msg * parse_prefixed_json_tool_call_array(
common_chat_msg *this,
long long a2,
long long a3,
long long a4)
{
long long v6; // r14
long long v7; // r12
long long v8; // r13
_BYTE *v9; // r14
long long v10; // rax
unsigned __int8 *v11; // rax
int v12; // eax
common_chat_msg *v13; // r14
_BYTE v15[16]; // [rsp+10h] [rbp-118h] BYREF
unsigned __int8 *v16; // [rsp+20h] [rbp-108h] BYREF
long long v17; // [rsp+28h] [rbp-100h]
long long v18; // [rsp+30h] [rbp-F8h]
long long v19; // [rsp+38h] [rbp-F0h]
unsigned __int8 v20[16]; // [rsp+40h] [rbp-E8h] BYREF
long long v21[4]; // [rsp+50h] [rbp-D8h] BYREF
_BYTE v22[32]; // [rsp+70h] [rbp-B8h] BYREF
_BYTE v23[32]; // [rsp+90h] [rbp-98h] BYREF
_BYTE v24[40]; // [rsp+B0h] [rbp-78h] BYREF
_BYTE v25[80]; // [rsp+D8h] [rbp-50h] BYREF
v6 = std::string::find(a2, a3, 0LL);
common_chat_msg::common_chat_msg(this);
std::string::assign(this, "assistant");
if ( v6 == -1 )
{
v13 = this;
std::string::_M_assign((char *)this + 32, a2);
}
else
{
v7 = *(_QWORD *)(a3 + 8);
std::string::substr(v21, a2, 0LL, v6);
std::string::operator=((char *)this + 32, v21);
std::string::~string(v21);
std::string::substr(v21, a2, v7 + v6 - a4, -1LL);
memset(v24, 0, 32);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::parse<std::string>(
v15,
v21,
(long long)v24,
1u,
0);
std::_Function_base::~_Function_base((std::_Function_base *)v24);
std::string::~string(v21);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::cbegin(
(long long)&v16,
(long long)v15);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::cend(
(long long)v25,
(long long)v15);
while ( ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_((long long)&v16) )
{
v8 = nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator*(&v16);
v9 = (_BYTE *)nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>(
v8,
(long long)"arguments");
v10 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>(
v8,
(long long)"name");
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
(long long)v21,
v10);
if ( *v9 == 3 )
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
(long long)v22,
(long long)v9);
else
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::dump(
(long long)v22,
(long long)v9,
-1,
32,
0,
0);
if ( ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_(v8) )
{
v11 = (unsigned __int8 *)nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>(
v8,
(long long)"id");
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v20,
v11);
}
else
{
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRA1_KcA1_cTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SK_EE5valueEiE4typeELi0EEEOT_((char *)v20);
}
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
(long long)v23,
(long long)v20);
std::vector<common_tool_call>::emplace_back<common_tool_call>((char *)this + 64, v21);
common_tool_call::~common_tool_call((common_tool_call *)v21);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v20);
v12 = *v16;
if ( v12 == 2 )
{
v18 += 16LL;
}
else if ( v12 == 1 )
{
v17 += 48LL;
}
else
{
++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(v15);
return this;
}
return v13;
}
|
parse_prefixed_json_tool_call_array:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xf8
MOV R15,RCX
MOV R12,RDX
MOV RBX,RSI
MOV R13,RDI
MOV RDI,RSI
MOV RSI,RDX
XOR EDX,EDX
CALL 0x001241b0
MOV R14,RAX
MOV RDI,R13
CALL 0x001a8e24
LAB_001a6b88:
LEA RSI,[0x1b3383]
MOV qword ptr [RSP + 0x8],R13
MOV RDI,R13
CALL 0x00124130
CMP R14,-0x1
JZ 0x001a6d91
MOV R12,qword ptr [R12 + 0x8]
LAB_001a6bab:
LEA RDI,[RSP + 0x50]
MOV RSI,RBX
XOR EDX,EDX
MOV RCX,R14
CALL 0x00123940
SUB R14,R15
ADD R14,R12
MOV RAX,qword ptr [RSP + 0x8]
LEA RDI,[RAX + 0x20]
LEA R15,[RSP + 0x50]
MOV RSI,R15
CALL 0x00123ae0
MOV RDI,R15
CALL 0x001241f8
LAB_001a6be1:
LEA RDI,[RSP + 0x50]
PUSH -0x1
POP RCX
MOV RSI,RBX
MOV RDX,R14
CALL 0x00123940
XORPS XMM0,XMM0
LEA RDX,[RSP + 0xb0]
MOVAPS xmmword ptr [RDX + 0x10],XMM0
MOVAPS xmmword ptr [RDX],XMM0
LAB_001a6c06:
LEA RDI,[RSP + 0x10]
LEA RSI,[RSP + 0x50]
PUSH 0x1
POP RCX
XOR R8D,R8D
CALL 0x0017aa90
LEA RDI,[RSP + 0xb0]
CALL 0x00147dd4
LEA R15,[RSP + 0x50]
MOV RDI,R15
CALL 0x001241f8
LEA R12,[RSP + 0x20]
LEA RBX,[RSP + 0x10]
MOV RDI,R12
MOV RSI,RBX
CALL 0x00167f1e
LEA RDI,[RSP + 0xd8]
MOV RSI,RBX
CALL 0x0016818a
MOV RAX,qword ptr [RSP + 0x8]
LEA RBX,[RAX + 0x40]
LEA RBP,[RSP + 0x40]
LAB_001a6c68:
MOV RDI,R12
LEA RSI,[RSP + 0xd8]
CALL 0x001679c2
TEST AL,AL
JZ 0x001a6d80
MOV RDI,R12
CALL 0x00167bbc
MOV R13,RAX
MOV RDI,RAX
LEA RSI,[0x1b4738]
CALL 0x0017b0ca
MOV R14,RAX
MOV RDI,R13
LEA RSI,[0x1b4cd4]
CALL 0x0017b0ca
MOV RDI,R15
MOV RSI,RAX
CALL 0x00163e20
CMP byte ptr [R14],0x3
JNZ 0x001a6ccc
LAB_001a6cbd:
LEA RDI,[RSP + 0x70]
MOV RSI,R14
CALL 0x00163e20
JMP 0x001a6ce5
LAB_001a6ccc:
LEA RDI,[RSP + 0x70]
MOV RSI,R14
PUSH -0x1
POP RDX
PUSH 0x20
POP RCX
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0015d33a
LAB_001a6ce5:
MOV RDI,R13
LEA RSI,[0x1b37e2]
CALL 0x0017b0a8
TEST AL,AL
JZ 0x001a6d14
MOV RDI,R13
LEA RSI,[0x1b37e2]
CALL 0x0017b0ca
MOV RDI,RBP
MOV RSI,RAX
CALL 0x00142160
JMP 0x001a6d23
LAB_001a6d14:
MOV RDI,RBP
LEA RSI,[0x1afad9]
CALL 0x00188754
LAB_001a6d23:
LEA RDI,[RSP + 0x90]
MOV RSI,RBP
CALL 0x00163e20
LAB_001a6d33:
MOV RDI,RBX
MOV RSI,R15
CALL 0x001a8ea8
MOV RDI,R15
CALL 0x0018a718
MOV RDI,RBP
CALL 0x001425c4
MOV RAX,qword ptr [RSP + 0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x2
JZ 0x001a6d6b
CMP EAX,0x1
JNZ 0x001a6d76
ADD qword ptr [RSP + 0x28],0x30
JMP 0x001a6c68
LAB_001a6d6b:
ADD qword ptr [RSP + 0x30],0x10
JMP 0x001a6c68
LAB_001a6d76:
INC qword ptr [RSP + 0x38]
JMP 0x001a6c68
LAB_001a6d80:
LEA RDI,[RSP + 0x10]
CALL 0x001425c4
MOV R14,qword ptr [RSP + 0x8]
JMP 0x001a6da2
LAB_001a6d91:
MOV R14,qword ptr [RSP + 0x8]
LEA RDI,[R14 + 0x20]
LAB_001a6d9a:
MOV RSI,RBX
CALL 0x001234e0
LAB_001a6da2:
MOV RAX,R14
ADD RSP,0xf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* parse_prefixed_json_tool_call_array(std::__cxx11::string const&, std::__cxx11::string const&,
unsigned long) */
string * parse_prefixed_json_tool_call_array(string *param_1,string *param_2,ulong param_3)
{
char cVar1;
long lVar2;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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;
char *pcVar3;
basic_json *pbVar4;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_118 [16];
char *local_108;
long local_100;
long local_f8;
long local_f0;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_e8 [16];
string local_d8 [32];
int1 local_b8 [32];
int1 local_98 [32];
int8 local_78;
int8 uStack_70;
int8 local_68;
int8 uStack_60;
int1 local_50 [32];
lVar2 = std::__cxx11::string::find(param_2,param_3);
common_chat_msg::common_chat_msg((common_chat_msg *)param_1);
/* try { // try from 001a6b88 to 001a6b9b has its CatchHandler @ 001a6dd9 */
std::__cxx11::string::assign((char *)param_1);
if (lVar2 == -1) {
/* try { // try from 001a6d9a to 001a6da1 has its CatchHandler @ 001a6db7 */
std::__cxx11::string::_M_assign(param_1 + 0x20);
}
else {
/* try { // try from 001a6bab to 001a6bbc has its CatchHandler @ 001a6dd7 */
std::__cxx11::string::substr((ulong)local_d8,(ulong)param_2);
std::__cxx11::string::operator=(param_1 + 0x20,local_d8);
std::__cxx11::string::~string(local_d8);
/* try { // try from 001a6be1 to 001a6bf3 has its CatchHandler @ 001a6dd5 */
std::__cxx11::string::substr((ulong)local_d8,(ulong)param_2);
local_68 = 0;
uStack_60 = 0;
local_78 = 0;
uStack_70 = 0;
/* try { // try from 001a6c06 to 001a6c1a has its CatchHandler @ 001a6db9 */
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::parse<std::__cxx11::string>(local_118,local_d8,&local_78,1,0);
std::_Function_base::~_Function_base((_Function_base *)&local_78);
std::__cxx11::string::~string(local_d8);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::cbegin();
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>
::cend();
while( true ) {
/* try { // try from 001a6c68 to 001a6cb6 has its CatchHandler @ 001a6e24 */
cVar1 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_108,local_50);
if (cVar1 == '\0') break;
this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)nlohmann::json_abi_v3_11_3::detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::operator*((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_108);
pcVar3 = nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[]<char_const>(this,"arguments");
pbVar4 = nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[]<char_const>(this,"name");
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(local_d8,pbVar4);
if (*pcVar3 == '\x03') {
/* try { // try from 001a6cbd to 001a6ce4 has its CatchHandler @ 001a6e06 */
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(local_b8,pcVar3);
}
else {
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::dump(local_b8,pcVar3,0xffffffffffffffff,0x20,0,0);
}
/* try { // try from 001a6ce5 to 001a6d22 has its CatchHandler @ 001a6e0b */
cVar1 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
(this,"id");
if (cVar1 == '\0') {
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRA1_KcA1_cTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SK_EE5valueEiE4typeELi0EEEOT_
(local_e8,"");
}
else {
pbVar4 = nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[]<char_const>(this,"id");
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_e8,pbVar4);
}
/* try { // try from 001a6d23 to 001a6d32 has its CatchHandler @ 001a6def */
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(local_98,local_e8);
/* try { // try from 001a6d33 to 001a6d3d has its CatchHandler @ 001a6dde */
std::vector<common_tool_call,std::allocator<common_tool_call>>::emplace_back<common_tool_call>
((vector<common_tool_call,std::allocator<common_tool_call>> *)(param_1 + 0x40),
(common_tool_call *)local_d8);
common_tool_call::~common_tool_call((common_tool_call *)local_d8);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_e8);
if (*local_108 == '\x02') {
local_f8 = local_f8 + 0x10;
}
else if (*local_108 == '\x01') {
local_100 = local_100 + 0x30;
}
else {
local_f0 = local_f0 + 1;
}
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_118);
}
return param_1;
}
|
|
16,488
|
_ac_compiler_find_rule_idx_by_name
|
alca/libalca/compiler.c
|
int __ac_compiler_find_rule_idx_by_name(ac_compiler *compiler, char *name)
{
for (int i = 0; i < compiler->nrules; i++)
{
if (!compiler->rule_table)
return -1;
ac_rule_entry entry = compiler->rule_table[i];
char *rname = ac_arena_get_string(compiler->data_arena, entry.name_offset);
if (rname) {
if (strcmp(rname, name) == 0)
return i;
}
}
return -1;
}
|
O0
|
c
|
_ac_compiler_find_rule_idx_by_name:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x24(%rcx), %eax
jae 0x123da
movq -0x10(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x1236b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x123e1
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x1c(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0x30(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x28(%rbp)
movl 0x10(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0x20(%rbp), %esi
callq 0x77a0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x123ca
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x7650
cmpl $0x0, %eax
jne 0x123c8
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x123e1
jmp 0x123ca
jmp 0x123cc
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x12347
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
__ac_compiler_find_rule_idx_by_name:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], 0
loc_12347:
mov eax, [rbp+var_1C]
mov rcx, [rbp+var_10]
cmp eax, [rcx+24h]
jnb loc_123DA
mov rax, [rbp+var_10]
cmp qword ptr [rax+48h], 0
jnz short loc_1236B
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_123E1
loc_1236B:
mov rax, [rbp+var_10]
mov rax, [rax+48h]
movsxd rcx, [rbp+var_1C]
imul rcx, 14h
add rax, rcx
mov rcx, [rax]
mov [rbp+var_30], rcx
mov rcx, [rax+8]
mov [rbp+var_28], rcx
mov eax, [rax+10h]
mov [rbp+var_20], eax
mov rax, [rbp+var_10]
mov rdi, [rax+10h]
mov esi, [rbp+var_20]
call _ac_arena_get_string
mov [rbp+var_38], rax
cmp [rbp+var_38], 0
jz short loc_123CA
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_18]
call _strcmp
cmp eax, 0
jnz short loc_123C8
mov eax, [rbp+var_1C]
mov [rbp+var_4], eax
jmp short loc_123E1
loc_123C8:
jmp short $+2
loc_123CA:
jmp short $+2
loc_123CC:
mov eax, [rbp+var_1C]
add eax, 1
mov [rbp+var_1C], eax
jmp loc_12347
loc_123DA:
mov [rbp+var_4], 0FFFFFFFFh
loc_123E1:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
|
long long _ac_compiler_find_rule_idx_by_name(long long a1, long long a2)
{
long long string; // [rsp+8h] [rbp-38h]
unsigned int i; // [rsp+24h] [rbp-1Ch]
for ( i = 0; i < *(_DWORD *)(a1 + 36); ++i )
{
if ( !*(_QWORD *)(a1 + 72) )
return (unsigned int)-1;
string = ac_arena_get_string(*(_QWORD *)(a1 + 16), *(unsigned int *)(20LL * (int)i + *(_QWORD *)(a1 + 72) + 16));
if ( string && !(unsigned int)strcmp(string, a2) )
return i;
}
return (unsigned int)-1;
}
|
__ac_compiler_find_rule_idx_by_name:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],0x0
LAB_00112347:
MOV EAX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0x24]
JNC 0x001123da
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x48],0x0
JNZ 0x0011236b
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001123e1
LAB_0011236b:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x48]
MOVSXD RCX,dword ptr [RBP + -0x1c]
IMUL RCX,RCX,0x14
ADD RAX,RCX
MOV RCX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x28],RCX
MOV EAX,dword ptr [RAX + 0x10]
MOV dword ptr [RBP + -0x20],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x10]
MOV ESI,dword ptr [RBP + -0x20]
CALL 0x001077a0
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],0x0
JZ 0x001123ca
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00107650
CMP EAX,0x0
JNZ 0x001123c8
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001123e1
LAB_001123c8:
JMP 0x001123ca
LAB_001123ca:
JMP 0x001123cc
LAB_001123cc:
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x00112347
LAB_001123da:
MOV dword ptr [RBP + -0x4],0xffffffff
LAB_001123e1:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
uint __ac_compiler_find_rule_idx_by_name(long param_1,char *param_2)
{
int iVar1;
char *__s1;
uint local_24;
local_24 = 0;
while( true ) {
if (*(uint *)(param_1 + 0x24) <= local_24) {
return 0xffffffff;
}
if (*(long *)(param_1 + 0x48) == 0) break;
__s1 = (char *)ac_arena_get_string(*(int8 *)(param_1 + 0x10),
*(int4 *)
(*(long *)(param_1 + 0x48) + (long)(int)local_24 * 0x14 +
0x10));
if ((__s1 != (char *)0x0) && (iVar1 = strcmp(__s1,param_2), iVar1 == 0)) {
return local_24;
}
local_24 = local_24 + 1;
}
return 0xffffffff;
}
|
|
16,489
|
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 0x26172
leaq 0x2ef636(%rip), %rcx # 0x315780
movq 0x40(%rcx), %rcx
movzbl %al, %edx
testb $0x8, 0x1(%rcx,%rdx)
je 0x26164
movb 0x1(%rdi), %al
incq %rdi
testb %al, %al
jne 0x2614e
jmp 0x26172
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 0x5aae8
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_26172
lea rcx, my_charset_latin1
mov rcx, [rcx+40h]
loc_2614E:
movzx edx, al
test byte ptr [rcx+rdx+1], 8
jz short loc_26164
mov al, [rdi+1]
inc rdi
test al, al
jnz short loc_2614E
jmp short loc_26172
loc_26164:
xor ecx, ecx
cmp al, 30h ; '0'
setnz cl
lea esi, ds:8[rcx*2]
loc_26172:
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 0x00126172
LEA RCX,[0x415780]
MOV RCX,qword ptr [RCX + 0x40]
LAB_0012614e:
MOVZX EDX,AL
TEST byte ptr [RCX + RDX*0x1 + 0x1],0x8
JZ 0x00126164
MOV AL,byte ptr [RDI + 0x1]
INC RDI
TEST AL,AL
JNZ 0x0012614e
JMP 0x00126172
LAB_00126164:
XOR ECX,ECX
CMP AL,0x30
SETNZ CL
LEA ESI,[0x8 + RCX*0x2]
LAB_00126172:
LEA RBX,[RBP + -0x10]
MOV ECX,0x7fffffff
XOR EDX,EDX
MOV R8,RBX
CALL 0x0015aae8
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_00126172:
local_18 = in_RAX;
str2int(param_1,cVar2,0,0x7fffffff,&local_18);
return local_18;
}
if ((PTR_ctype_latin1_004157c0[(ulong)bVar1 + 1] & 8) == 0) {
cVar2 = (bVar1 != 0x30) * '\x02' + '\b';
goto LAB_00126172;
}
bVar1 = param_1[1];
param_1 = param_1 + 1;
} while( true );
}
|
|
16,490
|
mysql_client_register_plugin
|
eloqsql/build_O3/libmariadb/libmariadb/ma_client_plugin.c
|
struct st_mysql_client_plugin * STDCALL
mysql_client_register_plugin(MYSQL *mysql,
struct st_mysql_client_plugin *plugin)
{
struct st_mysql_client_plugin *found_plugin= NULL;
va_list unused;
LINT_INIT_STRUCT(unused);
if (is_not_initialized(mysql, plugin->name))
return NULL;
pthread_mutex_lock(&LOCK_load_client_plugin);
/* make sure the plugin wasn't loaded meanwhile */
if (!(found_plugin= find_plugin(plugin->name, plugin->type)))
found_plugin= add_plugin(mysql, plugin, 0, 0, unused);
pthread_mutex_unlock(&LOCK_load_client_plugin);
return found_plugin;
}
|
O3
|
c
|
mysql_client_register_plugin:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, -0x30(%rbp)
movq $0x0, -0x20(%rbp)
cmpb $0x0, 0x2483a(%rip) # 0x4c860
je 0x2806c
leaq 0x24839(%rip), %rdi # 0x4c868
callq 0x136a0
movq 0x8(%r14), %rdi
movl (%r14), %esi
callq 0x280af
movq %rax, %r15
testq %rax, %rax
jne 0x2805e
leaq -0x30(%rbp), %r8
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x27e20
movq %rax, %r15
leaq 0x24803(%rip), %rdi # 0x4c868
callq 0x13330
jmp 0x280a1
movq 0x8(%r14), %r8
leaq 0x22aa9(%rip), %rax # 0x4ab20
movq (%rax), %rdx
leaq 0x22aaf(%rip), %rax # 0x4ab30
movq 0x1d8(%rax), %rcx
leaq 0xe007(%rip), %r9 # 0x36096
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x80b, %esi # imm = 0x80B
xorl %eax, %eax
callq 0x16165
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
mysql_client_register_plugin:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 18h
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
movaps [rbp+var_30], xmm0
mov [rbp+var_20], 0
cmp cs:initialized, 0
jz short loc_2806C
lea rdi, LOCK_load_client_plugin
call _pthread_mutex_lock
mov rdi, [r14+8]
mov esi, [r14]
call find_plugin
mov r15, rax
test rax, rax
jnz short loc_2805E
lea r8, [rbp+var_30]
mov rdi, rbx
mov rsi, r14
xor edx, edx
xor ecx, ecx
call add_plugin
mov r15, rax
loc_2805E:
lea rdi, LOCK_load_client_plugin
call _pthread_mutex_unlock
jmp short loc_280A1
loc_2806C:
mov r8, [r14+8]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rax, client_errors
mov rcx, [rax+1D8h]
lea r9, aNotInitialized; "not initialized"
xor r15d, r15d
mov rdi, rbx
mov esi, 80Bh
xor eax, eax
call my_set_error
loc_280A1:
mov rax, r15
add rsp, 18h
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long mysql_client_register_plugin(long long a1, unsigned int *a2)
{
long long v2; // rdx
long long v3; // rcx
long long v4; // r8
long long v5; // r9
long long plugin; // r15
__int128 v8; // [rsp+0h] [rbp-30h] BYREF
long long v9; // [rsp+10h] [rbp-20h]
v8 = 0LL;
v9 = 0LL;
if ( initialized )
{
pthread_mutex_lock(&LOCK_load_client_plugin);
plugin = find_plugin(*((_QWORD *)a2 + 1), *a2, v2, v3, v4, v5, v8, *((_QWORD *)&v8 + 1), v9);
if ( !plugin )
plugin = add_plugin(a1, (long long)a2, 0LL, 0, (long long)&v8);
pthread_mutex_unlock(&LOCK_load_client_plugin);
}
else
{
plugin = 0LL;
my_set_error(a1, 2059, (long long)SQLSTATE_UNKNOWN, client_errors[59], *((_QWORD *)a2 + 1), "not initialized", v8, v9);
}
return plugin;
}
|
mysql_client_register_plugin:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RBP + -0x30],XMM0
MOV qword ptr [RBP + -0x20],0x0
CMP byte ptr [0x0014c860],0x0
JZ 0x0012806c
LEA RDI,[0x14c868]
CALL 0x001136a0
MOV RDI,qword ptr [R14 + 0x8]
MOV ESI,dword ptr [R14]
CALL 0x001280af
MOV R15,RAX
TEST RAX,RAX
JNZ 0x0012805e
LEA R8,[RBP + -0x30]
MOV RDI,RBX
MOV RSI,R14
XOR EDX,EDX
XOR ECX,ECX
CALL 0x00127e20
MOV R15,RAX
LAB_0012805e:
LEA RDI,[0x14c868]
CALL 0x00113330
JMP 0x001280a1
LAB_0012806c:
MOV R8,qword ptr [R14 + 0x8]
LEA RAX,[0x14ab20]
MOV RDX,qword ptr [RAX]
LEA RAX,[0x14ab30]
MOV RCX,qword ptr [RAX + 0x1d8]
LEA R9,[0x136096]
XOR R15D,R15D
MOV RDI,RBX
MOV ESI,0x80b
XOR EAX,EAX
CALL 0x00116165
LAB_001280a1:
MOV RAX,R15
ADD RSP,0x18
POP RBX
POP R14
POP R15
POP RBP
RET
|
long mysql_client_register_plugin(int8 param_1,int4 *param_2)
{
long lVar1;
int8 local_38;
int8 uStack_30;
int8 local_28;
local_38 = 0;
uStack_30 = 0;
local_28 = 0;
if (initialized == '\0') {
lVar1 = 0;
my_set_error(param_1,0x80b,SQLSTATE_UNKNOWN,PTR_s_Plugin__s_could_not_be_loaded____0014ad08,
*(int8 *)(param_2 + 2),"not initialized");
}
else {
pthread_mutex_lock((pthread_mutex_t *)LOCK_load_client_plugin);
lVar1 = find_plugin(*(int8 *)(param_2 + 2),*param_2);
if (lVar1 == 0) {
lVar1 = add_plugin(param_1,param_2,0,0,&local_38);
}
pthread_mutex_unlock((pthread_mutex_t *)LOCK_load_client_plugin);
}
return lVar1;
}
|
|
16,491
|
JS_NewBigInt64
|
bluesky950520[P]quickjs/quickjs.c
|
JSValue JS_NewBigInt64(JSContext *ctx, int64_t v)
{
JSValue val;
bf_t *a;
val = JS_NewBigInt(ctx);
if (JS_IsException(val))
return val;
a = JS_GetBigInt(val);
if (bf_set_si(a, v)) {
JS_FreeValue(ctx, val);
return JS_ThrowOutOfMemory(ctx);
}
return val;
}
|
O0
|
c
|
JS_NewBigInt64:
subq $0x48, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rdi
callq 0x400c0
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movq (%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x29fb0
cmpl $0x0, %eax
je 0x4003e
movq 0x18(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x400a4
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x40140
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xec4d0
cmpl $0x0, %eax
je 0x40090
movq 0x30(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0x29f80
movq 0x30(%rsp), %rdi
callq 0x27f00
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
jmp 0x400a4
movq 0x18(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rdx
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
|
JS_NewBigInt64:
sub rsp, 48h
mov [rsp+48h+var_18], rdi
mov [rsp+48h+var_20], rsi
mov rdi, [rsp+48h+var_18]
call JS_NewBigInt
mov [rsp+48h+var_48], rax
mov [rsp+48h+var_40], rdx
mov rax, [rsp+48h+var_48]
mov [rsp+48h+var_30], rax
mov rax, [rsp+48h+var_40]
mov [rsp+48h+var_28], rax
mov rdi, [rsp+48h+var_30]
mov rsi, [rsp+48h+var_28]
call JS_IsException_1
cmp eax, 0
jz short loc_4003E
mov rax, [rsp+48h+var_30]
mov [rsp+48h+var_10], rax
mov rax, [rsp+48h+var_28]
mov [rsp+48h+var_8], rax
jmp short loc_400A4
loc_4003E:
mov rdi, [rsp+48h+var_30]
mov rsi, [rsp+48h+var_28]
call JS_GetBigInt
mov [rsp+48h+var_38], rax
mov rdi, [rsp+48h+var_38]
mov rsi, [rsp+48h+var_20]
call bf_set_si
cmp eax, 0
jz short loc_40090
mov rdi, [rsp+48h+var_18]
mov rsi, [rsp+48h+var_30]
mov rdx, [rsp+48h+var_28]
call JS_FreeValue
mov rdi, [rsp+48h+var_18]
call JS_ThrowOutOfMemory
mov [rsp+48h+var_10], rax
mov [rsp+48h+var_8], rdx
jmp short loc_400A4
loc_40090:
mov rax, [rsp+48h+var_30]
mov [rsp+48h+var_10], rax
mov rax, [rsp+48h+var_28]
mov [rsp+48h+var_8], rax
loc_400A4:
mov rax, [rsp+48h+var_10]
mov rdx, [rsp+48h+var_8]
add rsp, 48h
retn
|
long long JS_NewBigInt64(long long a1, long long a2)
{
long long v2; // rdx
long long BigInt; // rax
long long v4; // rdx
long long v5; // rcx
long long v6; // r8
long long v7; // r9
int v8; // edx
long long v9; // rcx
int v10; // r8d
int v11; // r9d
long long v13; // [rsp+0h] [rbp-48h]
long long v14; // [rsp+8h] [rbp-40h]
long long v15; // [rsp+18h] [rbp-30h]
long long v16; // [rsp+20h] [rbp-28h]
v13 = JS_NewBigInt(a1);
v14 = v2;
v15 = v13;
v16 = v2;
if ( JS_IsException_1(v13, v2) )
return v13;
BigInt = JS_GetBigInt(v13, v16);
if ( !(unsigned int)bf_set_si(BigInt, a2, v4, v5, v6, v7, v13, v14, BigInt) )
return v15;
JS_FreeValue(a1, v15, v16);
return JS_ThrowOutOfMemory(a1, v15, v8, v9, v10, v11);
}
|
JS_NewBigInt64:
SUB RSP,0x48
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x001400c0
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x00129fb0
CMP EAX,0x0
JZ 0x0014003e
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x40],RAX
JMP 0x001400a4
LAB_0014003e:
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x00140140
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x001ec4d0
CMP EAX,0x0
JZ 0x00140090
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
CALL 0x00129f80
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x00127f00
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
JMP 0x001400a4
LAB_00140090:
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x40],RAX
LAB_001400a4:
MOV RAX,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
ADD RSP,0x48
RET
|
int1 [16] JS_NewBigInt64(int8 param_1,int8 param_2)
{
int iVar1;
int8 uVar2;
int8 uVar3;
int8 uVar4;
int1 auVar5 [16];
auVar5 = JS_NewBigInt(param_1);
uVar4 = auVar5._8_8_;
uVar2 = auVar5._0_8_;
iVar1 = JS_IsException(uVar2,uVar4);
if (iVar1 == 0) {
uVar3 = JS_GetBigInt(uVar2,uVar4);
iVar1 = bf_set_si(uVar3,param_2);
if (iVar1 != 0) {
JS_FreeValue(param_1,uVar2,uVar4);
auVar5 = JS_ThrowOutOfMemory(param_1);
}
}
return auVar5;
}
|
|
16,492
|
JS_NewBigInt64
|
bluesky950520[P]quickjs/quickjs.c
|
JSValue JS_NewBigInt64(JSContext *ctx, int64_t v)
{
JSValue val;
bf_t *a;
val = JS_NewBigInt(ctx);
if (JS_IsException(val))
return val;
a = JS_GetBigInt(val);
if (bf_set_si(a, v)) {
JS_FreeValue(ctx, val);
return JS_ThrowOutOfMemory(ctx);
}
return val;
}
|
O2
|
c
|
JS_NewBigInt64:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
movq %rdi, %r15
callq 0x25965
movq %rax, %r14
movq %rdx, %rbx
cmpl $0x6, %ebx
je 0x25953
movq %r14, %rdi
addq $0x8, %rdi
movq %r12, %rsi
callq 0x7319c
testl %eax, %eax
je 0x25953
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1bbce
movq %r15, %rdi
callq 0x1ad90
pushq $0x6
popq %rbx
xorl %r14d, %r14d
movq %r14, %rax
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
JS_NewBigInt64:
push r15
push r14
push r12
push rbx
push rax
mov r12, rsi
mov r15, rdi
call JS_NewBigInt
mov r14, rax
mov rbx, rdx
cmp ebx, 6
jz short loc_25953
mov rdi, r14
add rdi, 8
mov rsi, r12
call bf_set_si
test eax, eax
jz short loc_25953
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call JS_FreeValue
mov rdi, r15
call JS_ThrowOutOfMemory
push 6
pop rbx
xor r14d, r14d
loc_25953:
mov rax, r14
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
|
long long JS_NewBigInt64(long long a1, long long a2)
{
long long v2; // rax
long long v3; // r14
long long v4; // rdx
long long v5; // rbx
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
v2 = JS_NewBigInt(a1);
v3 = v2;
v5 = v4;
if ( (_DWORD)v4 != 6 && (unsigned int)bf_set_si(v2 + 8, a2) )
{
JS_FreeValue(a1, v3, v5);
JS_ThrowOutOfMemory(a1, v3, v6, v7, v8, v9);
return 0LL;
}
return v3;
}
|
JS_NewBigInt64:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,RSI
MOV R15,RDI
CALL 0x00125965
MOV R14,RAX
MOV RBX,RDX
CMP EBX,0x6
JZ 0x00125953
MOV RDI,R14
ADD RDI,0x8
MOV RSI,R12
CALL 0x0017319c
TEST EAX,EAX
JZ 0x00125953
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x0011bbce
MOV RDI,R15
CALL 0x0011ad90
PUSH 0x6
POP RBX
XOR R14D,R14D
LAB_00125953:
MOV RAX,R14
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
int1 [16] JS_NewBigInt64(int8 param_1,int8 param_2)
{
int iVar1;
int1 auVar2 [16];
auVar2 = JS_NewBigInt();
if (auVar2._8_4_ != 6) {
iVar1 = bf_set_si(auVar2._0_8_ + 8,param_2);
if (iVar1 != 0) {
JS_FreeValue(param_1,auVar2._0_8_,auVar2._8_8_);
JS_ThrowOutOfMemory(param_1);
auVar2 = ZEXT816(6) << 0x40;
}
}
return auVar2;
}
|
|
16,493
|
LefDefParser::lefwMacroSymmetry(char const*)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
|
int
lefwMacroSymmetry(const char *symmetry)
{
if (!lefwFile)
return LEFW_UNINITIALIZED;
if (!lefwDidInit)
return LEFW_BAD_ORDER;
if (lefwState != LEFW_MACRO_START &&
lefwState != LEFW_MACRO)
return LEFW_BAD_ORDER;
if (!symmetry || symmetry == 0 || *symmetry == 0)
return LEFW_BAD_DATA;
if (lefwWriteEncrypt)
encPrint(lefwFile, (char*) " SYMMETRY %s ;\n", symmetry);
else
fprintf(lefwFile, " SYMMETRY %s ;\n", symmetry);
lefwLines++;
lefwState = LEFW_MACRO;
return LEFW_OK;
}
|
O0
|
cpp
|
LefDefParser::lefwMacroSymmetry(char const*):
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
leaq 0x9a1e0(%rip), %rax # 0xc5250
cmpq $0x0, (%rax)
jne 0x2b083
movl $0x1, 0x14(%rsp)
jmp 0x2b157
leaq 0x9a41a(%rip), %rax # 0xc54a4
cmpl $0x0, (%rax)
jne 0x2b09c
movl $0x2, 0x14(%rsp)
jmp 0x2b157
leaq 0x9a3fd(%rip), %rax # 0xc54a0
cmpl $0x9, (%rax)
je 0x2b0c1
leaq 0x9a3f1(%rip), %rax # 0xc54a0
cmpl $0x21, (%rax)
je 0x2b0c1
movl $0x2, 0x14(%rsp)
jmp 0x2b157
cmpq $0x0, 0x8(%rsp)
je 0x2b0de
cmpq $0x0, 0x8(%rsp)
je 0x2b0de
movq 0x8(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x2b0e8
movl $0x3, 0x14(%rsp)
jmp 0x2b157
cmpl $0x0, 0x9a44d(%rip) # 0xc553c
je 0x2b110
leaq 0x9a158(%rip), %rax # 0xc5250
movq (%rax), %rdi
movq 0x8(%rsp), %rdx
leaq 0x68ab3(%rip), %rsi # 0x93bba
movb $0x0, %al
callq 0x8bf50
jmp 0x2b12d
leaq 0x9a139(%rip), %rax # 0xc5250
movq (%rax), %rdi
movq 0x8(%rsp), %rdx
leaq 0x68a94(%rip), %rsi # 0x93bba
movb $0x0, %al
callq 0x2370
leaq 0x9a368(%rip), %rax # 0xc549c
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x9a35c(%rip), %rax # 0xc549c
movl %ecx, (%rax)
leaq 0x9a357(%rip), %rax # 0xc54a0
movl $0x21, (%rax)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
|
_ZN12LefDefParser17lefwMacroSymmetryEPKc:
sub rsp, 18h
mov [rsp+18h+var_10], rdi
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
cmp qword ptr [rax], 0
jnz short loc_2B083
mov [rsp+18h+var_4], 1
jmp loc_2B157
loc_2B083:
lea rax, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit
cmp dword ptr [rax], 0
jnz short loc_2B09C
mov [rsp+18h+var_4], 2
jmp loc_2B157
loc_2B09C:
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
cmp dword ptr [rax], 9
jz short loc_2B0C1
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
cmp dword ptr [rax], 21h ; '!'
jz short loc_2B0C1
mov [rsp+18h+var_4], 2
jmp loc_2B157
loc_2B0C1:
cmp [rsp+18h+var_10], 0
jz short loc_2B0DE
cmp [rsp+18h+var_10], 0
jz short loc_2B0DE
mov rax, [rsp+18h+var_10]
movsx eax, byte ptr [rax]
cmp eax, 0
jnz short loc_2B0E8
loc_2B0DE:
mov [rsp+18h+var_4], 3
jmp short loc_2B157
loc_2B0E8:
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt
jz short loc_2B110
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
mov rdx, [rsp+18h+var_10]
lea rsi, aSymmetryS; " SYMMETRY %s ;\n"
mov al, 0
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
jmp short loc_2B12D
loc_2B110:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
mov rdx, [rsp+18h+var_10]
lea rsi, aSymmetryS; " SYMMETRY %s ;\n"
mov al, 0
call _fprintf
loc_2B12D:
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
mov [rax], ecx
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
mov dword ptr [rax], 21h ; '!'
mov [rsp+18h+var_4], 0
loc_2B157:
mov eax, [rsp+18h+var_4]
add rsp, 18h
retn
|
long long LefDefParser::lefwMacroSymmetry(
LefDefParser *this,
const char *a2,
long long a3,
int a4,
int a5,
int a6)
{
if ( *(_QWORD *)&LefDefParser::lefwFile )
{
if ( LefDefParser::lefwDidInit )
{
if ( LefDefParser::lefwState == 9 || LefDefParser::lefwState == 33 )
{
if ( this && *(_BYTE *)this )
{
if ( LefDefParser::lefwWriteEncrypt )
LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)" SYMMETRY %s ;\n", (_DWORD)this, a4, a5, a6);
else
fprintf(*(_QWORD *)&LefDefParser::lefwFile, " SYMMETRY %s ;\n", (const char *)this);
++LefDefParser::lefwLines;
LefDefParser::lefwState = 33;
return 0;
}
else
{
return 3;
}
}
else
{
return 2;
}
}
else
{
return 2;
}
}
else
{
return 1;
}
}
|
lefwMacroSymmetry:
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RDI
LEA RAX,[0x1c5250]
CMP qword ptr [RAX],0x0
JNZ 0x0012b083
MOV dword ptr [RSP + 0x14],0x1
JMP 0x0012b157
LAB_0012b083:
LEA RAX,[0x1c54a4]
CMP dword ptr [RAX],0x0
JNZ 0x0012b09c
MOV dword ptr [RSP + 0x14],0x2
JMP 0x0012b157
LAB_0012b09c:
LEA RAX,[0x1c54a0]
CMP dword ptr [RAX],0x9
JZ 0x0012b0c1
LEA RAX,[0x1c54a0]
CMP dword ptr [RAX],0x21
JZ 0x0012b0c1
MOV dword ptr [RSP + 0x14],0x2
JMP 0x0012b157
LAB_0012b0c1:
CMP qword ptr [RSP + 0x8],0x0
JZ 0x0012b0de
CMP qword ptr [RSP + 0x8],0x0
JZ 0x0012b0de
MOV RAX,qword ptr [RSP + 0x8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JNZ 0x0012b0e8
LAB_0012b0de:
MOV dword ptr [RSP + 0x14],0x3
JMP 0x0012b157
LAB_0012b0e8:
CMP dword ptr [0x001c553c],0x0
JZ 0x0012b110
LEA RAX,[0x1c5250]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x8]
LEA RSI,[0x193bba]
MOV AL,0x0
CALL 0x0018bf50
JMP 0x0012b12d
LAB_0012b110:
LEA RAX,[0x1c5250]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x8]
LEA RSI,[0x193bba]
MOV AL,0x0
CALL 0x00102370
LAB_0012b12d:
LEA RAX,[0x1c549c]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x1c549c]
MOV dword ptr [RAX],ECX
LEA RAX,[0x1c54a0]
MOV dword ptr [RAX],0x21
MOV dword ptr [RSP + 0x14],0x0
LAB_0012b157:
MOV EAX,dword ptr [RSP + 0x14]
ADD RSP,0x18
RET
|
/* LefDefParser::lefwMacroSymmetry(char const*) */
int4 LefDefParser::lefwMacroSymmetry(char *param_1)
{
int4 local_4;
if (lefwFile == (_IO_FILE *)0x0) {
local_4 = 1;
}
else if (lefwDidInit == 0) {
local_4 = 2;
}
else if ((lefwState == 9) || (lefwState == 0x21)) {
if ((param_1 == (char *)0x0) || ((param_1 == (char *)0x0 || (*param_1 == '\0')))) {
local_4 = 3;
}
else {
if (lefwWriteEncrypt == 0) {
fprintf(lefwFile," SYMMETRY %s ;\n",param_1);
}
else {
encPrint(lefwFile," SYMMETRY %s ;\n",param_1);
}
lefwLines = lefwLines + 1;
lefwState = 0x21;
local_4 = 0;
}
}
else {
local_4 = 2;
}
return local_4;
}
|
|
16,494
|
ma_SHA1Final
|
eloqsql/libmariadb/libmariadb/ma_sha1.c
|
void ma_SHA1Final(unsigned char digest[20], _MA_SHA1_CTX * context)
{
unsigned char bits[8];
unsigned int index, padLen;
/* Save number of bits */
bits[7] = context->count[0] & 0xFF;
bits[6] = (context->count[0] >> 8) & 0xFF;
bits[5] = (context->count[0] >> 16) & 0xFF;
bits[4] = (context->count[0] >> 24) & 0xFF;
bits[3] = context->count[1] & 0xFF;
bits[2] = (context->count[1] >> 8) & 0xFF;
bits[1] = (context->count[1] >> 16) & 0xFF;
bits[0] = (context->count[1] >> 24) & 0xFF;
/* Pad out to 56 mod 64.
*/
index = (unsigned int) ((context->count[0] >> 3) & 0x3f);
padLen = (index < 56) ? (56 - index) : (120 - index);
ma_SHA1Update(context, PADDING, padLen);
/* Append length (before padding) */
ma_SHA1Update(context, bits, 8);
/* Store state in digest */
ma_SHA1Encode(digest, context->state, 20);
/* Zeroize sensitive information.
*/
memset((unsigned char*) context, 0, sizeof(*context));
}
|
O0
|
c
|
ma_SHA1Final:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl 0x14(%rax), %eax
andl $0xff, %eax
movb %al, -0x9(%rbp)
movq -0x20(%rbp), %rax
movl 0x14(%rax), %eax
shrl $0x8, %eax
andl $0xff, %eax
movb %al, -0xa(%rbp)
movq -0x20(%rbp), %rax
movl 0x14(%rax), %eax
shrl $0x10, %eax
andl $0xff, %eax
movb %al, -0xb(%rbp)
movq -0x20(%rbp), %rax
movl 0x14(%rax), %eax
shrl $0x18, %eax
andl $0xff, %eax
movb %al, -0xc(%rbp)
movq -0x20(%rbp), %rax
movl 0x18(%rax), %eax
andl $0xff, %eax
movb %al, -0xd(%rbp)
movq -0x20(%rbp), %rax
movl 0x18(%rax), %eax
shrl $0x8, %eax
andl $0xff, %eax
movb %al, -0xe(%rbp)
movq -0x20(%rbp), %rax
movl 0x18(%rax), %eax
shrl $0x10, %eax
andl $0xff, %eax
movb %al, -0xf(%rbp)
movq -0x20(%rbp), %rax
movl 0x18(%rax), %eax
shrl $0x18, %eax
andl $0xff, %eax
movb %al, -0x10(%rbp)
movq -0x20(%rbp), %rax
movl 0x14(%rax), %eax
shrl $0x3, %eax
andl $0x3f, %eax
movl %eax, -0x24(%rbp)
cmpl $0x38, -0x24(%rbp)
jae 0x4e52a
movl $0x38, %eax
subl -0x24(%rbp), %eax
movl %eax, -0x2c(%rbp)
jmp 0x4e535
movl $0x78, %eax
subl -0x24(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movl -0x28(%rbp), %eax
movl %eax, %edx
leaq 0x16fb5(%rip), %rsi # 0x65500
callq 0x4c6f0
movq -0x20(%rbp), %rdi
leaq -0x10(%rbp), %rsi
movl $0x8, %edx
callq 0x4c6f0
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl $0x14, %edx
callq 0x4e5b0
movq -0x20(%rbp), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x4c(%rax)
movups %xmm0, 0x40(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x4e5aa
addq $0x30, %rsp
popq %rbp
retq
callq 0x134b0
nop
|
ma_SHA1Final:
push rbp
mov rbp, rsp
sub rsp, 30h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov rax, [rbp+var_20]
mov eax, [rax+14h]
and eax, 0FFh
mov [rbp+var_9], al
mov rax, [rbp+var_20]
mov eax, [rax+14h]
shr eax, 8
and eax, 0FFh
mov [rbp+var_A], al
mov rax, [rbp+var_20]
mov eax, [rax+14h]
shr eax, 10h
and eax, 0FFh
mov [rbp+var_B], al
mov rax, [rbp+var_20]
mov eax, [rax+14h]
shr eax, 18h
and eax, 0FFh
mov [rbp+var_C], al
mov rax, [rbp+var_20]
mov eax, [rax+18h]
and eax, 0FFh
mov [rbp+var_D], al
mov rax, [rbp+var_20]
mov eax, [rax+18h]
shr eax, 8
and eax, 0FFh
mov [rbp+var_E], al
mov rax, [rbp+var_20]
mov eax, [rax+18h]
shr eax, 10h
and eax, 0FFh
mov [rbp+var_F], al
mov rax, [rbp+var_20]
mov eax, [rax+18h]
shr eax, 18h
and eax, 0FFh
mov [rbp+var_10], al
mov rax, [rbp+var_20]
mov eax, [rax+14h]
shr eax, 3
and eax, 3Fh
mov [rbp+var_24], eax
cmp [rbp+var_24], 38h ; '8'
jnb short loc_4E52A
mov eax, 38h ; '8'
sub eax, [rbp+var_24]
mov [rbp+var_2C], eax
jmp short loc_4E535
loc_4E52A:
mov eax, 78h ; 'x'
sub eax, [rbp+var_24]
mov [rbp+var_2C], eax
loc_4E535:
mov eax, [rbp+var_2C]
mov [rbp+var_28], eax
mov rdi, [rbp+var_20]
mov eax, [rbp+var_28]
mov edx, eax
lea rsi, PADDING
call ma_SHA1Update
mov rdi, [rbp+var_20]
lea rsi, [rbp+var_10]
mov edx, 8
call ma_SHA1Update
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov edx, 14h
call ma_SHA1Encode
mov rax, [rbp+var_20]
xorps xmm0, xmm0
movups xmmword ptr [rax+4Ch], xmm0
movups xmmword ptr [rax+40h], xmm0
movups xmmword ptr [rax+30h], xmm0
movups xmmword ptr [rax+20h], xmm0
movups xmmword ptr [rax+10h], xmm0
movups xmmword ptr [rax], xmm0
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_4E5AA
add rsp, 30h
pop rbp
retn
loc_4E5AA:
call ___stack_chk_fail
|
unsigned long long ma_SHA1Final(long long a1, long long a2)
{
unsigned int v3; // [rsp+4h] [rbp-2Ch]
unsigned int v4; // [rsp+Ch] [rbp-24h]
_BYTE v5[8]; // [rsp+20h] [rbp-10h] BYREF
unsigned long long v6; // [rsp+28h] [rbp-8h]
v6 = __readfsqword(0x28u);
v5[7] = *(_DWORD *)(a2 + 20);
v5[6] = BYTE1(*(_DWORD *)(a2 + 20));
v5[5] = BYTE2(*(_DWORD *)(a2 + 20));
v5[4] = HIBYTE(*(_DWORD *)(a2 + 20));
v5[3] = *(_DWORD *)(a2 + 24);
v5[2] = BYTE1(*(_DWORD *)(a2 + 24));
v5[1] = BYTE2(*(_DWORD *)(a2 + 24));
v5[0] = HIBYTE(*(_DWORD *)(a2 + 24));
v4 = (*(_DWORD *)(a2 + 20) >> 3) & 0x3F;
if ( v4 >= 0x38 )
v3 = 120 - v4;
else
v3 = 56 - v4;
ma_SHA1Update(a2, (long long)&PADDING, v3);
ma_SHA1Update(a2, (long long)v5, 8uLL);
ma_SHA1Encode(a1, a2, 20LL);
*(_OWORD *)(a2 + 76) = 0LL;
*(_OWORD *)(a2 + 64) = 0LL;
*(_OWORD *)(a2 + 48) = 0LL;
*(_OWORD *)(a2 + 32) = 0LL;
*(_OWORD *)(a2 + 16) = 0LL;
*(_OWORD *)a2 = 0LL;
return __readfsqword(0x28u);
}
|
ma_SHA1Final:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x14]
AND EAX,0xff
MOV byte ptr [RBP + -0x9],AL
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x14]
SHR EAX,0x8
AND EAX,0xff
MOV byte ptr [RBP + -0xa],AL
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x14]
SHR EAX,0x10
AND EAX,0xff
MOV byte ptr [RBP + -0xb],AL
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x14]
SHR EAX,0x18
AND EAX,0xff
MOV byte ptr [RBP + -0xc],AL
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x18]
AND EAX,0xff
MOV byte ptr [RBP + -0xd],AL
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x18]
SHR EAX,0x8
AND EAX,0xff
MOV byte ptr [RBP + -0xe],AL
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x18]
SHR EAX,0x10
AND EAX,0xff
MOV byte ptr [RBP + -0xf],AL
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x18]
SHR EAX,0x18
AND EAX,0xff
MOV byte ptr [RBP + -0x10],AL
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x14]
SHR EAX,0x3
AND EAX,0x3f
MOV dword ptr [RBP + -0x24],EAX
CMP dword ptr [RBP + -0x24],0x38
JNC 0x0014e52a
MOV EAX,0x38
SUB EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x0014e535
LAB_0014e52a:
MOV EAX,0x78
SUB EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x2c],EAX
LAB_0014e535:
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x28],EAX
MOV RDI,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RBP + -0x28]
MOV EDX,EAX
LEA RSI,[0x165500]
CALL 0x0014c6f0
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x10]
MOV EDX,0x8
CALL 0x0014c6f0
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV EDX,0x14
CALL 0x0014e5b0
MOV RAX,qword ptr [RBP + -0x20]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x4c],XMM0
MOVUPS xmmword ptr [RAX + 0x40],XMM0
MOVUPS xmmword ptr [RAX + 0x30],XMM0
MOVUPS xmmword ptr [RAX + 0x20],XMM0
MOVUPS xmmword ptr [RAX + 0x10],XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0014e5aa
ADD RSP,0x30
POP RBP
RET
LAB_0014e5aa:
CALL 0x001134b0
|
void ma_SHA1Final(int8 param_1,int8 *param_2)
{
uint uVar1;
long in_FS_OFFSET;
int local_34;
int1 local_18;
int1 local_17;
int1 local_16;
int1 local_15;
int1 local_14;
int1 local_13;
int1 local_12;
int1 local_11;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_11 = (int1)*(int4 *)((long)param_2 + 0x14);
local_12 = (int1)((uint)*(int4 *)((long)param_2 + 0x14) >> 8);
local_13 = (int1)((uint)*(int4 *)((long)param_2 + 0x14) >> 0x10);
local_14 = (int1)((uint)*(int4 *)((long)param_2 + 0x14) >> 0x18);
local_15 = (int1)*(int4 *)(param_2 + 3);
local_16 = (int1)((uint)*(int4 *)(param_2 + 3) >> 8);
local_17 = (int1)((uint)*(int4 *)(param_2 + 3) >> 0x10);
local_18 = (int1)((uint)*(int4 *)(param_2 + 3) >> 0x18);
uVar1 = *(uint *)((long)param_2 + 0x14) >> 3 & 0x3f;
if (uVar1 < 0x38) {
local_34 = 0x38 - uVar1;
}
else {
local_34 = 0x78 - uVar1;
}
ma_SHA1Update(param_2,PADDING,local_34);
ma_SHA1Update(param_2,&local_18,8);
ma_SHA1Encode(param_1,param_2,0x14);
*(int8 *)((long)param_2 + 0x4c) = 0;
*(int8 *)((long)param_2 + 0x54) = 0;
param_2[8] = 0;
param_2[9] = 0;
param_2[6] = 0;
param_2[7] = 0;
param_2[4] = 0;
param_2[5] = 0;
param_2[2] = 0;
param_2[3] = 0;
*param_2 = 0;
param_2[1] = 0;
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
16,495
|
lf_hash_search_using_hash_value
|
eloqsql/mysys/lf_hash.cc
|
void *lf_hash_search_using_hash_value(LF_HASH *hash, LF_PINS *pins,
my_hash_value_type hashnr,
const void *key, uint keylen)
{
LF_SLIST **el, *found;
uint bucket;
/* hide OOM errors - if we cannot initialize a bucket, try the previous one */
for (bucket= hashnr % hash->size; ;bucket= my_clear_highest_bit(bucket))
{
el= (LF_SLIST **)lf_dynarray_lvalue(&hash->array, bucket);
if (el && (*el || initialize_bucket(hash, el, bucket, pins) == 0))
break;
if (unlikely(bucket == 0))
return 0; /* if there's no bucket==0, the hash is empty */
}
found= l_search(el, hash->charset, my_reverse_bits(hashnr) | 1,
(uchar *)key, keylen, pins);
return found ? found+1 : 0;
}
|
O0
|
cpp
|
lf_hash_search_using_hash_value:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
movl 0xc0(%rcx), %ecx
xorl %edx, %edx
divl %ecx
movl %edx, -0x44(%rbp)
movq -0x10(%rbp), %rdi
movl -0x44(%rbp), %esi
callq 0xfdc70
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0xfedeb
movq -0x38(%rbp), %rax
cmpq $0x0, (%rax)
jne 0xfede9
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl -0x44(%rbp), %edx
movq -0x18(%rbp), %rcx
callq 0xfe6b0
cmpl $0x0, %eax
jne 0xfedeb
jmp 0xfee15
cmpl $0x0, -0x44(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0xfee06
movq $0x0, -0x8(%rbp)
jmp 0xfee7b
jmp 0xfee08
movl -0x44(%rbp), %edi
callq 0xfeb40
movl %eax, -0x44(%rbp)
jmp 0xfedaf
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
movq 0xa8(%rax), %rax
movq %rax, -0x50(%rbp)
movl -0x1c(%rbp), %edi
callq 0xfe830
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
movl %eax, %edx
orl $0x1, %edx
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %r8d
movq -0x18(%rbp), %r9
callq 0xfee90
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0xfee6b
movq -0x40(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x60(%rbp)
jmp 0xfee73
xorl %eax, %eax
movq %rax, -0x60(%rbp)
jmp 0xfee73
movq -0x60(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
lf_hash_search_using_hash_value:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov [rbp+var_2C], r8d
mov eax, [rbp+var_1C]
mov rcx, [rbp+var_10]
mov ecx, [rcx+0C0h]
xor edx, edx
div ecx
mov [rbp+var_44], edx
loc_FEDAF:
mov rdi, [rbp+var_10]
mov esi, [rbp+var_44]
call lf_dynarray_lvalue
mov [rbp+var_38], rax
cmp [rbp+var_38], 0
jz short loc_FEDEB
mov rax, [rbp+var_38]
cmp qword ptr [rax], 0
jnz short loc_FEDE9
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_38]
mov edx, [rbp+var_44]
mov rcx, [rbp+var_18]
call _ZL17initialize_bucketP10st_lf_hashPP8LF_SLISTjP7LF_PINS; initialize_bucket(st_lf_hash *,LF_SLIST **,uint,LF_PINS *)
cmp eax, 0
jnz short loc_FEDEB
loc_FEDE9:
jmp short loc_FEE15
loc_FEDEB:
cmp [rbp+var_44], 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_FEE06
mov [rbp+var_8], 0
jmp short loc_FEE7B
loc_FEE06:
jmp short $+2
loc_FEE08:
mov edi, [rbp+var_44]; unsigned int
call _ZL20my_clear_highest_bitj; my_clear_highest_bit(uint)
mov [rbp+var_44], eax
jmp short loc_FEDAF
loc_FEE15:
mov rax, [rbp+var_38]
mov [rbp+var_58], rax
mov rax, [rbp+var_10]
mov rax, [rax+0A8h]
mov [rbp+var_50], rax
mov edi, [rbp+var_1C]; unsigned int
call _ZL15my_reverse_bitsj; my_reverse_bits(uint)
mov rdi, [rbp+var_58]
mov rsi, [rbp+var_50]
mov edx, eax
or edx, 1
mov rcx, [rbp+var_28]
mov r8d, [rbp+var_2C]
mov r9, [rbp+var_18]
call _ZL8l_searchPP8LF_SLISTPK15charset_info_stjPKhjP7LF_PINS; l_search(LF_SLIST **,charset_info_st const*,uint,uchar const*,uint,LF_PINS *)
mov [rbp+var_40], rax
cmp [rbp+var_40], 0
jz short loc_FEE6B
mov rax, [rbp+var_40]
add rax, 20h ; ' '
mov [rbp+var_60], rax
jmp short loc_FEE73
loc_FEE6B:
xor eax, eax
mov [rbp+var_60], rax
jmp short $+2
loc_FEE73:
mov rax, [rbp+var_60]
mov [rbp+var_8], rax
loc_FEE7B:
mov rax, [rbp+var_8]
add rsp, 60h
pop rbp
retn
|
long long lf_hash_search_using_hash_value(
long long a1,
long long a2,
unsigned int a3,
long long a4,
unsigned int a5)
{
volatile signed long long *i; // rax
int v6; // eax
long long v7; // rax
long long v10; // [rsp+10h] [rbp-50h]
int v11; // [rsp+1Ch] [rbp-44h]
volatile signed long long *v12; // [rsp+28h] [rbp-38h]
v11 = a3 % *(_DWORD *)(a1 + 192);
for ( i = (volatile signed long long *)lf_dynarray_lvalue(a1, v11);
;
i = (volatile signed long long *)lf_dynarray_lvalue(a1, v11) )
{
v12 = i;
if ( i )
{
if ( *i || !(unsigned int)initialize_bucket(a1, i, v11, a2) )
break;
}
if ( !v11 )
return 0LL;
v11 = my_clear_highest_bit(v11);
}
v10 = *(_QWORD *)(a1 + 168);
v6 = my_reverse_bits(a3);
v7 = l_search(v12, v10, v6 | 1u, a4, a5, a2);
if ( v7 )
return v7 + 32;
else
return 0LL;
}
|
lf_hash_search_using_hash_value:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV dword ptr [RBP + -0x2c],R8D
MOV EAX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0xc0]
XOR EDX,EDX
DIV ECX
MOV dword ptr [RBP + -0x44],EDX
LAB_001fedaf:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x44]
CALL 0x001fdc70
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],0x0
JZ 0x001fedeb
MOV RAX,qword ptr [RBP + -0x38]
CMP qword ptr [RAX],0x0
JNZ 0x001fede9
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x38]
MOV EDX,dword ptr [RBP + -0x44]
MOV RCX,qword ptr [RBP + -0x18]
CALL 0x001fe6b0
CMP EAX,0x0
JNZ 0x001fedeb
LAB_001fede9:
JMP 0x001fee15
LAB_001fedeb:
CMP dword ptr [RBP + -0x44],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x001fee06
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001fee7b
LAB_001fee06:
JMP 0x001fee08
LAB_001fee08:
MOV EDI,dword ptr [RBP + -0x44]
CALL 0x001feb40
MOV dword ptr [RBP + -0x44],EAX
JMP 0x001fedaf
LAB_001fee15:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xa8]
MOV qword ptr [RBP + -0x50],RAX
MOV EDI,dword ptr [RBP + -0x1c]
CALL 0x001fe830
MOV RDI,qword ptr [RBP + -0x58]
MOV RSI,qword ptr [RBP + -0x50]
MOV EDX,EAX
OR EDX,0x1
MOV RCX,qword ptr [RBP + -0x28]
MOV R8D,dword ptr [RBP + -0x2c]
MOV R9,qword ptr [RBP + -0x18]
CALL 0x001fee90
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x40],0x0
JZ 0x001fee6b
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x20
MOV qword ptr [RBP + -0x60],RAX
JMP 0x001fee73
LAB_001fee6b:
XOR EAX,EAX
MOV qword ptr [RBP + -0x60],RAX
JMP 0x001fee73
LAB_001fee73:
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x8],RAX
LAB_001fee7b:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x60
POP RBP
RET
|
long lf_hash_search_using_hash_value
(st_lf_hash *param_1,LF_PINS *param_2,uint param_3,uchar *param_4,uint param_5)
{
charset_info_st *pcVar1;
int iVar2;
uint uVar3;
LF_SLIST **ppLVar4;
long local_68;
uint local_4c;
local_4c = param_3 % *(uint *)(param_1 + 0xc0);
while ((ppLVar4 = (LF_SLIST **)lf_dynarray_lvalue(param_1,local_4c), ppLVar4 == (LF_SLIST **)0x0
|| ((*ppLVar4 == (LF_SLIST *)0x0 &&
(iVar2 = initialize_bucket(param_1,ppLVar4,local_4c,param_2), iVar2 != 0))))) {
if (local_4c == 0) {
return 0;
}
local_4c = my_clear_highest_bit(local_4c);
}
pcVar1 = *(charset_info_st **)(param_1 + 0xa8);
uVar3 = my_reverse_bits(param_3);
local_68 = l_search(ppLVar4,pcVar1,uVar3 | 1,param_4,param_5,param_2);
if (local_68 == 0) {
local_68 = 0;
}
else {
local_68 = local_68 + 0x20;
}
return local_68;
}
|
|
16,496
|
my_coll_lexem_next
|
eloqsql/strings/ctype-uca.c
|
static my_coll_lexem_num my_coll_lexem_next(MY_COLL_LEXEM *lexem)
{
const char *beg;
my_coll_lexem_num rc;
for (beg= lexem->beg ; beg < lexem->end ; beg++)
{
switch (*beg)
{
case ' ':
case '\t':
case '\r':
case '\n':
continue;
case '[': /* Bracket expression, e.g. "[optimize [a-z]]" */
{
size_t nbrackets; /* Indicates nested recursion level */
for (beg++, nbrackets= 1 ; beg < lexem->end; beg++)
{
if (*beg == '[') /* Enter nested bracket expression */
nbrackets++;
else if (*beg == ']')
{
if (--nbrackets == 0)
{
rc= MY_COLL_LEXEM_OPTION;
beg++;
goto ex;
}
}
}
rc= MY_COLL_LEXEM_ERROR;
goto ex;
}
case '&':
beg++;
rc= MY_COLL_LEXEM_RESET;
goto ex;
case '=':
beg++;
lexem->diff= 0;
rc= MY_COLL_LEXEM_SHIFT;
goto ex;
case '/':
beg++;
rc= MY_COLL_LEXEM_EXTEND;
goto ex;
case '|':
beg++;
rc= MY_COLL_LEXEM_CONTEXT;
goto ex;
case '<': /* Shift: '<' or '<<' or '<<<' or '<<<<' */
{
/* Scan up to 3 additional '<' characters */
for (beg++, lexem->diff= 1;
(beg < lexem->end) && (*beg == '<') && (lexem->diff <= 3);
beg++, lexem->diff++);
rc= MY_COLL_LEXEM_SHIFT;
goto ex;
}
default:
break;
}
/* Escaped character, e.g. \u1234 */
if ((*beg == '\\') && (beg + 2 < lexem->end) &&
(beg[1] == 'u') && my_isxdigit(&my_charset_utf8mb3_general_ci, beg[2]))
{
int ch;
beg+= 2;
lexem->code= 0;
while ((beg < lexem->end) && ((ch= ch2x(beg[0])) >= 0))
{
lexem->code= (lexem->code << 4) + ch;
beg++;
}
rc= MY_COLL_LEXEM_CHAR;
goto ex;
}
/*
Unescaped single byte character:
allow printable ASCII range except SPACE and
special characters parsed above []<&/|=
*/
if (*beg >= 0x21 && *beg <= 0x7E)
{
lexem->code= *beg++;
rc= MY_COLL_LEXEM_CHAR;
goto ex;
}
if (((uchar) *beg) > 0x7F) /* Unescaped multibyte character */
{
CHARSET_INFO *cs= &my_charset_utf8mb3_general_ci;
my_wc_t wc;
int nbytes= my_ci_mb_wc(cs, &wc, (uchar *) beg, (uchar *) lexem->end);
if (nbytes > 0)
{
rc= MY_COLL_LEXEM_CHAR;
beg+= nbytes;
lexem->code= (int) wc;
goto ex;
}
}
rc= MY_COLL_LEXEM_ERROR;
goto ex;
}
rc= MY_COLL_LEXEM_EOF;
ex:
lexem->prev= lexem->beg;
lexem->beg= beg;
lexem->term= rc;
return rc;
}
|
O3
|
c
|
my_coll_lexem_next:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %r14
movq 0x10(%rdi), %rcx
xorl %r15d, %r15d
cmpq %rcx, %r14
jae 0x47ab1
movzbl (%r14), %edx
cmpl $0xc, %edx
jle 0x478b9
cmpl $0x1f, %edx
jle 0x478c6
cmpl $0x25, %edx
jg 0x478df
cmpl $0x20, %edx
je 0x478cf
jmp 0x47a6b
leal -0x9(%rdx), %eax
cmpl $0x2, %eax
jb 0x478cf
jmp 0x47a6b
cmpl $0xd, %edx
jne 0x47a6b
incq %r14
cmpq %rcx, %r14
jne 0x4789c
movq %rcx, %rax
jmp 0x47ab4
cmpl $0x3c, %edx
jle 0x4793c
cmpl $0x5b, %edx
jg 0x4799d
cmpl $0x3d, %edx
je 0x479b9
cmpl $0x5b, %edx
jne 0x47a6b
incq %r14
movl $0x6, %r15d
cmpq %rcx, %r14
jae 0x47ab1
movl $0x1, %eax
movzbl (%r14), %edx
cmpl $0x5d, %edx
je 0x47929
cmpl $0x5b, %edx
jne 0x47932
incq %rax
jmp 0x47932
decq %rax
je 0x47ace
incq %r14
cmpq %rcx, %r14
jb 0x47916
jmp 0x478d7
cmpl $0x26, %edx
je 0x47a60
cmpl $0x2f, %edx
je 0x47a55
cmpl $0x3c, %edx
jne 0x47a6b
incq %r14
movl $0x1, 0x20(%rbx)
movl $0x1, %r15d
cmpq %rcx, %r14
jae 0x47ab1
movl $0x2, %eax
cmpb $0x3c, (%r14)
jne 0x47ab1
leal -0x1(%rax), %edx
cmpl $0x4, %edx
jae 0x47ab1
incq %r14
movl %eax, 0x20(%rbx)
incl %eax
cmpq %rcx, %r14
jb 0x47975
jmp 0x478d7
cmpl $0x5c, %edx
je 0x479ce
cmpl $0x7c, %edx
jne 0x47a6b
incq %r14
movl $0x9, %r15d
jmp 0x47ab1
incq %r14
movl $0x0, 0x20(%rbx)
movl $0x1, %r15d
jmp 0x47ab1
leaq 0x2(%r14), %rax
cmpq %rcx, %rax
jae 0x47aa5
cmpb $0x75, 0x1(%r14)
jne 0x47aa5
leaq 0x3262e3(%rip), %rsi # 0x36dcd0
movq 0x40(%rsi), %rsi
movzbl (%rax), %edi
cmpb $0x0, 0x1(%rsi,%rdi)
jns 0x47aa5
movl $0x0, 0x24(%rbx)
xorl %edx, %edx
movsbl (%rax), %esi
leal -0x30(%rsi), %edi
cmpl $0xa, %edi
jb 0x47a3d
leal -0x61(%rsi), %edi
cmpl $0x5, %edi
ja 0x47a20
addl $-0x57, %esi
jmp 0x47a3b
movl $0x5, %r15d
cmpb $0x37, %sil
jl 0x47ab4
leal -0x41(%rsi), %edi
cmpl $0x5, %edi
ja 0x47ab4
addl $-0x37, %esi
movl %esi, %edi
shll $0x4, %edx
addl %edi, %edx
movl %edx, 0x24(%rbx)
incq %rax
movl $0x5, %r15d
cmpq %rcx, %rax
jb 0x47a08
jmp 0x47ab4
incq %r14
movl $0x8, %r15d
jmp 0x47ab1
incq %r14
movl $0x4, %r15d
jmp 0x47ab1
leal -0x7f(%rdx), %eax
cmpb $-0x5e, %al
jae 0x47aa5
movl $0x6, %r15d
testb %dl, %dl
jns 0x47ab1
leaq 0x32624d(%rip), %rdi # 0x36dcd0
movq 0xb8(%rdi), %rax
leaq -0x20(%rbp), %rsi
movq %r14, %rdx
callq *0x28(%rax)
testl %eax, %eax
jle 0x47ab1
movl %eax, %eax
addq %rax, %r14
movl -0x20(%rbp), %eax
movl %eax, 0x24(%rbx)
jmp 0x47aab
incq %r14
movl %edx, 0x24(%rbx)
movl $0x5, %r15d
movq %r14, %rax
movq 0x8(%rbx), %rcx
movq %rcx, 0x18(%rbx)
movq %rax, 0x8(%rbx)
movl %r15d, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
incq %r14
movl $0x7, %r15d
jmp 0x47ab1
|
my_coll_lexem_next:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov r14, [rdi+8]
mov rcx, [rdi+10h]
xor r15d, r15d
cmp r14, rcx
jnb loc_47AB1
loc_4789C:
movzx edx, byte ptr [r14]
cmp edx, 0Ch
jle short loc_478B9
cmp edx, 1Fh
jle short loc_478C6
cmp edx, 25h ; '%'
jg short loc_478DF
cmp edx, 20h ; ' '
jz short loc_478CF
jmp loc_47A6B
loc_478B9:
lea eax, [rdx-9]
cmp eax, 2
jb short loc_478CF
jmp loc_47A6B
loc_478C6:
cmp edx, 0Dh
jnz loc_47A6B
loc_478CF:
inc r14
cmp r14, rcx
jnz short loc_4789C
loc_478D7:
mov rax, rcx
jmp loc_47AB4
loc_478DF:
cmp edx, 3Ch ; '<'
jle short loc_4793C
cmp edx, 5Bh ; '['
jg loc_4799D
cmp edx, 3Dh ; '='
jz loc_479B9
cmp edx, 5Bh ; '['
jnz loc_47A6B
inc r14
mov r15d, 6
cmp r14, rcx
jnb loc_47AB1
mov eax, 1
loc_47916:
movzx edx, byte ptr [r14]
cmp edx, 5Dh ; ']'
jz short loc_47929
cmp edx, 5Bh ; '['
jnz short loc_47932
inc rax
jmp short loc_47932
loc_47929:
dec rax
jz loc_47ACE
loc_47932:
inc r14
cmp r14, rcx
jb short loc_47916
jmp short loc_478D7
loc_4793C:
cmp edx, 26h ; '&'
jz loc_47A60
cmp edx, 2Fh ; '/'
jz loc_47A55
cmp edx, 3Ch ; '<'
jnz loc_47A6B
inc r14
mov dword ptr [rbx+20h], 1
mov r15d, 1
cmp r14, rcx
jnb loc_47AB1
mov eax, 2
loc_47975:
cmp byte ptr [r14], 3Ch ; '<'
jnz loc_47AB1
lea edx, [rax-1]
cmp edx, 4
jnb loc_47AB1
inc r14
mov [rbx+20h], eax
inc eax
cmp r14, rcx
jb short loc_47975
jmp loc_478D7
loc_4799D:
cmp edx, 5Ch ; '\'
jz short loc_479CE
cmp edx, 7Ch ; '|'
jnz loc_47A6B
inc r14
mov r15d, 9
jmp loc_47AB1
loc_479B9:
inc r14
mov dword ptr [rbx+20h], 0
mov r15d, 1
jmp loc_47AB1
loc_479CE:
lea rax, [r14+2]
cmp rax, rcx
jnb loc_47AA5
cmp byte ptr [r14+1], 75h ; 'u'
jnz loc_47AA5
lea rsi, my_charset_utf8mb3_general_ci
mov rsi, [rsi+40h]
movzx edi, byte ptr [rax]
cmp byte ptr [rsi+rdi+1], 0
jns loc_47AA5
mov dword ptr [rbx+24h], 0
xor edx, edx
loc_47A08:
movsx esi, byte ptr [rax]
lea edi, [rsi-30h]
cmp edi, 0Ah
jb short loc_47A3D
lea edi, [rsi-61h]
cmp edi, 5
ja short loc_47A20
add esi, 0FFFFFFA9h
jmp short loc_47A3B
loc_47A20:
mov r15d, 5
cmp sil, 37h ; '7'
jl loc_47AB4
lea edi, [rsi-41h]
cmp edi, 5
ja short loc_47AB4
add esi, 0FFFFFFC9h
loc_47A3B:
mov edi, esi
loc_47A3D:
shl edx, 4
add edx, edi
mov [rbx+24h], edx
inc rax
mov r15d, 5
cmp rax, rcx
jb short loc_47A08
jmp short loc_47AB4
loc_47A55:
inc r14
mov r15d, 8
jmp short loc_47AB1
loc_47A60:
inc r14
mov r15d, 4
jmp short loc_47AB1
loc_47A6B:
lea eax, [rdx-7Fh]
cmp al, 0A2h
jnb short loc_47AA5
mov r15d, 6
test dl, dl
jns short loc_47AB1
lea rdi, my_charset_utf8mb3_general_ci
mov rax, [rdi+0B8h]
lea rsi, [rbp+var_20]
mov rdx, r14
call qword ptr [rax+28h]
test eax, eax
jle short loc_47AB1
mov eax, eax
add r14, rax
mov eax, [rbp+var_20]
mov [rbx+24h], eax
jmp short loc_47AAB
loc_47AA5:
inc r14
mov [rbx+24h], edx
loc_47AAB:
mov r15d, 5
loc_47AB1:
mov rax, r14
loc_47AB4:
mov rcx, [rbx+8]
mov [rbx+18h], rcx
mov [rbx+8], rax
mov [rbx], r15d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_47ACE:
inc r14
mov r15d, 7
jmp short loc_47AB1
|
unsigned __int8 * my_coll_lexem_next(long long a1)
{
long long v1; // rax
unsigned __int8 *v3; // r14
unsigned long long v4; // rcx
int v5; // r15d
unsigned int v6; // edx
unsigned __int8 *result; // rax
long long v8; // rax
int v9; // edx
int v10; // eax
int v11; // edx
int v12; // esi
int v13; // edi
int v14; // esi
int v15; // eax
_QWORD v16[4]; // [rsp+0h] [rbp-20h] BYREF
v16[0] = v1;
v3 = *(unsigned __int8 **)(a1 + 8);
v4 = *(_QWORD *)(a1 + 16);
v5 = 0;
if ( (unsigned long long)v3 >= v4 )
goto LABEL_58;
do
{
v6 = *v3;
if ( v6 <= 0xC )
{
if ( v6 - 9 >= 2 )
goto LABEL_52;
}
else
{
if ( *v3 > 0x1Fu )
{
if ( *v3 <= 0x25u )
{
if ( v6 != 32 )
goto LABEL_52;
goto LABEL_10;
}
if ( *v3 <= 0x3Cu )
{
switch ( v6 )
{
case '&':
++v3;
v5 = 4;
goto LABEL_58;
case '/':
++v3;
v5 = 8;
goto LABEL_58;
case '<':
++v3;
*(_DWORD *)(a1 + 32) = 1;
v5 = 1;
if ( (unsigned long long)v3 >= v4 )
goto LABEL_58;
v10 = 2;
while ( *v3 == 60 && (unsigned int)(v10 - 1) < 4 )
{
++v3;
*(_DWORD *)(a1 + 32) = v10++;
if ( (unsigned long long)v3 >= v4 )
goto LABEL_11;
}
goto LABEL_58;
}
}
else if ( *v3 > 0x5Bu )
{
if ( v6 == 92 )
{
result = v3 + 2;
if ( (unsigned long long)(v3 + 2) < v4
&& v3[1] == 117
&& *(char *)(*(_QWORD *)&my_charset_utf8mb3_general_ci[16] + *result + 1LL) < 0 )
{
*(_DWORD *)(a1 + 36) = 0;
v11 = 0;
while ( 1 )
{
v12 = (char)*result;
v13 = v12 - 48;
if ( (unsigned int)(v12 - 48) >= 0xA )
{
if ( (unsigned int)(v12 - 97) > 5 )
{
v5 = 5;
if ( (char)v12 < 55 || (unsigned int)(v12 - 65) > 5 )
goto LABEL_59;
v14 = v12 - 55;
}
else
{
v14 = v12 - 87;
}
v13 = v14;
}
v11 = v13 + 16 * v11;
*(_DWORD *)(a1 + 36) = v11;
++result;
v5 = 5;
if ( (unsigned long long)result >= v4 )
goto LABEL_59;
}
}
goto LABEL_56;
}
if ( v6 == 124 )
{
++v3;
v5 = 9;
goto LABEL_58;
}
}
else
{
if ( v6 == 61 )
{
++v3;
*(_DWORD *)(a1 + 32) = 0;
v5 = 1;
goto LABEL_58;
}
if ( v6 == 91 )
{
++v3;
v5 = 6;
if ( (unsigned long long)v3 >= v4 )
goto LABEL_58;
v8 = 1LL;
while ( 1 )
{
v9 = *v3;
if ( v9 == 93 )
{
if ( !--v8 )
{
++v3;
v5 = 7;
goto LABEL_58;
}
}
else if ( v9 == 91 )
{
++v8;
}
if ( (unsigned long long)++v3 >= v4 )
goto LABEL_11;
}
}
}
LABEL_52:
if ( (unsigned __int8)(v6 - 127) < 0xA2u )
{
v5 = 6;
if ( (v6 & 0x80u) != 0 )
{
v15 = (*(long long ( **)(unsigned int *, _QWORD *, unsigned __int8 *))(*(_QWORD *)&my_charset_utf8mb3_general_ci[46]
+ 40LL))(
my_charset_utf8mb3_general_ci,
v16,
v3);
if ( v15 > 0 )
{
v3 += (unsigned int)v15;
*(_DWORD *)(a1 + 36) = v16[0];
LABEL_57:
v5 = 5;
}
}
LABEL_58:
result = v3;
goto LABEL_59;
}
LABEL_56:
++v3;
*(_DWORD *)(a1 + 36) = v6;
goto LABEL_57;
}
if ( v6 != 13 )
goto LABEL_52;
}
LABEL_10:
++v3;
}
while ( v3 != (unsigned __int8 *)v4 );
LABEL_11:
result = (unsigned __int8 *)v4;
LABEL_59:
*(_QWORD *)(a1 + 24) = *(_QWORD *)(a1 + 8);
*(_QWORD *)(a1 + 8) = result;
*(_DWORD *)a1 = v5;
return result;
}
|
my_coll_lexem_next:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RDI + 0x10]
XOR R15D,R15D
CMP R14,RCX
JNC 0x00147ab1
LAB_0014789c:
MOVZX EDX,byte ptr [R14]
CMP EDX,0xc
JLE 0x001478b9
CMP EDX,0x1f
JLE 0x001478c6
CMP EDX,0x25
JG 0x001478df
CMP EDX,0x20
JZ 0x001478cf
JMP 0x00147a6b
LAB_001478b9:
LEA EAX,[RDX + -0x9]
CMP EAX,0x2
JC 0x001478cf
JMP 0x00147a6b
LAB_001478c6:
CMP EDX,0xd
JNZ 0x00147a6b
LAB_001478cf:
INC R14
CMP R14,RCX
JNZ 0x0014789c
LAB_001478d7:
MOV RAX,RCX
JMP 0x00147ab4
LAB_001478df:
CMP EDX,0x3c
JLE 0x0014793c
CMP EDX,0x5b
JG 0x0014799d
CMP EDX,0x3d
JZ 0x001479b9
CMP EDX,0x5b
JNZ 0x00147a6b
INC R14
MOV R15D,0x6
CMP R14,RCX
JNC 0x00147ab1
MOV EAX,0x1
LAB_00147916:
MOVZX EDX,byte ptr [R14]
CMP EDX,0x5d
JZ 0x00147929
CMP EDX,0x5b
JNZ 0x00147932
INC RAX
JMP 0x00147932
LAB_00147929:
DEC RAX
JZ 0x00147ace
LAB_00147932:
INC R14
CMP R14,RCX
JC 0x00147916
JMP 0x001478d7
LAB_0014793c:
CMP EDX,0x26
JZ 0x00147a60
CMP EDX,0x2f
JZ 0x00147a55
CMP EDX,0x3c
JNZ 0x00147a6b
INC R14
MOV dword ptr [RBX + 0x20],0x1
MOV R15D,0x1
CMP R14,RCX
JNC 0x00147ab1
MOV EAX,0x2
LAB_00147975:
CMP byte ptr [R14],0x3c
JNZ 0x00147ab1
LEA EDX,[RAX + -0x1]
CMP EDX,0x4
JNC 0x00147ab1
INC R14
MOV dword ptr [RBX + 0x20],EAX
INC EAX
CMP R14,RCX
JC 0x00147975
JMP 0x001478d7
LAB_0014799d:
CMP EDX,0x5c
JZ 0x001479ce
CMP EDX,0x7c
JNZ 0x00147a6b
INC R14
MOV R15D,0x9
JMP 0x00147ab1
LAB_001479b9:
INC R14
MOV dword ptr [RBX + 0x20],0x0
MOV R15D,0x1
JMP 0x00147ab1
LAB_001479ce:
LEA RAX,[R14 + 0x2]
CMP RAX,RCX
JNC 0x00147aa5
CMP byte ptr [R14 + 0x1],0x75
JNZ 0x00147aa5
LEA RSI,[0x46dcd0]
MOV RSI,qword ptr [RSI + 0x40]
MOVZX EDI,byte ptr [RAX]
CMP byte ptr [RSI + RDI*0x1 + 0x1],0x0
JNS 0x00147aa5
MOV dword ptr [RBX + 0x24],0x0
XOR EDX,EDX
LAB_00147a08:
MOVSX ESI,byte ptr [RAX]
LEA EDI,[RSI + -0x30]
CMP EDI,0xa
JC 0x00147a3d
LEA EDI,[RSI + -0x61]
CMP EDI,0x5
JA 0x00147a20
ADD ESI,-0x57
JMP 0x00147a3b
LAB_00147a20:
MOV R15D,0x5
CMP SIL,0x37
JL 0x00147ab4
LEA EDI,[RSI + -0x41]
CMP EDI,0x5
JA 0x00147ab4
ADD ESI,-0x37
LAB_00147a3b:
MOV EDI,ESI
LAB_00147a3d:
SHL EDX,0x4
ADD EDX,EDI
MOV dword ptr [RBX + 0x24],EDX
INC RAX
MOV R15D,0x5
CMP RAX,RCX
JC 0x00147a08
JMP 0x00147ab4
LAB_00147a55:
INC R14
MOV R15D,0x8
JMP 0x00147ab1
LAB_00147a60:
INC R14
MOV R15D,0x4
JMP 0x00147ab1
LAB_00147a6b:
LEA EAX,[RDX + -0x7f]
CMP AL,0xa2
JNC 0x00147aa5
MOV R15D,0x6
TEST DL,DL
JNS 0x00147ab1
LEA RDI,[0x46dcd0]
MOV RAX,qword ptr [RDI + 0xb8]
LEA RSI,[RBP + -0x20]
MOV RDX,R14
CALL qword ptr [RAX + 0x28]
TEST EAX,EAX
JLE 0x00147ab1
MOV EAX,EAX
ADD R14,RAX
MOV EAX,dword ptr [RBP + -0x20]
MOV dword ptr [RBX + 0x24],EAX
JMP 0x00147aab
LAB_00147aa5:
INC R14
MOV dword ptr [RBX + 0x24],EDX
LAB_00147aab:
MOV R15D,0x5
LAB_00147ab1:
MOV RAX,R14
LAB_00147ab4:
MOV RCX,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x18],RCX
MOV qword ptr [RBX + 0x8],RAX
MOV dword ptr [RBX],R15D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00147ace:
INC R14
MOV R15D,0x7
JMP 0x00147ab1
|
void my_coll_lexem_next(int4 *param_1)
{
byte bVar1;
byte *pbVar2;
int4 in_EAX;
uint uVar3;
long lVar4;
int iVar5;
int iVar6;
byte *pbVar7;
byte *pbVar8;
int4 uVar9;
int4 local_28 [2];
pbVar7 = *(byte **)(param_1 + 2);
pbVar2 = *(byte **)(param_1 + 4);
uVar9 = 0;
pbVar8 = pbVar7;
if (pbVar7 < pbVar2) {
do {
bVar1 = *pbVar7;
uVar3 = (uint)bVar1;
if (0xc < bVar1) {
if (bVar1 < 0x20) {
if (uVar3 == 0xd) goto LAB_001478cf;
LAB_00147a6b:
if (0xa1 < (byte)(bVar1 + 0x81)) goto LAB_00147aa5;
uVar9 = 6;
pbVar8 = pbVar7;
if ((-1 < (char)bVar1) ||
(local_28[0] = in_EAX,
uVar3 = (**(code **)(my_charset_utf8mb3_general_ci._184_8_ + 0x28))
(my_charset_utf8mb3_general_ci,local_28,pbVar7), (int)uVar3 < 1))
break;
pbVar8 = pbVar7 + uVar3;
param_1[9] = local_28[0];
}
else {
if (bVar1 < 0x26) {
if (uVar3 == 0x20) goto LAB_001478cf;
goto LAB_00147a6b;
}
if (bVar1 < 0x3d) {
if (uVar3 == 0x26) {
uVar9 = 4;
pbVar8 = pbVar7 + 1;
}
else if (uVar3 == 0x2f) {
uVar9 = 8;
pbVar8 = pbVar7 + 1;
}
else {
if (uVar3 != 0x3c) goto LAB_00147a6b;
pbVar7 = pbVar7 + 1;
param_1[8] = 1;
uVar9 = 1;
pbVar8 = pbVar7;
if (pbVar7 < pbVar2) {
iVar5 = 2;
goto LAB_00147975;
}
}
break;
}
if (bVar1 < 0x5c) {
if (uVar3 == 0x3d) {
param_1[8] = 0;
uVar9 = 1;
pbVar8 = pbVar7 + 1;
}
else {
if (uVar3 != 0x5b) goto LAB_00147a6b;
pbVar7 = pbVar7 + 1;
uVar9 = 6;
pbVar8 = pbVar7;
if (pbVar7 < pbVar2) {
lVar4 = 1;
goto LAB_00147916;
}
}
break;
}
if (uVar3 != 0x5c) {
if (uVar3 != 0x7c) goto LAB_00147a6b;
uVar9 = 9;
pbVar8 = pbVar7 + 1;
break;
}
pbVar8 = pbVar7 + 2;
if (((pbVar8 < pbVar2) && (pbVar7[1] == 0x75)) &&
(*(char *)(my_charset_utf8mb3_general_ci._64_8_ + 1 + (ulong)*pbVar8) < '\0')) {
param_1[9] = 0;
iVar5 = 0;
goto LAB_00147a08;
}
LAB_00147aa5:
pbVar8 = pbVar7 + 1;
param_1[9] = uVar3;
}
uVar9 = 5;
break;
}
if (1 < bVar1 - 9) goto LAB_00147a6b;
LAB_001478cf:
pbVar7 = pbVar7 + 1;
pbVar8 = pbVar2;
} while (pbVar7 != pbVar2);
}
goto LAB_00147ab4;
while( true ) {
pbVar7 = pbVar7 + 1;
param_1[8] = iVar5;
iVar5 = iVar5 + 1;
pbVar8 = pbVar2;
if (pbVar2 <= pbVar7) break;
LAB_00147975:
pbVar8 = pbVar7;
if ((*pbVar7 != 0x3c) || (3 < iVar5 - 1U)) break;
}
goto LAB_00147ab4;
LAB_00147916:
do {
if (*pbVar7 == 0x5d) {
lVar4 = lVar4 + -1;
if (lVar4 == 0) {
uVar9 = 7;
pbVar8 = pbVar7 + 1;
break;
}
}
else if (*pbVar7 == 0x5b) {
lVar4 = lVar4 + 1;
}
pbVar7 = pbVar7 + 1;
pbVar8 = pbVar2;
} while (pbVar7 < pbVar2);
goto LAB_00147ab4;
LAB_00147a08:
do {
iVar6 = (int)(char)*pbVar8;
uVar3 = iVar6 - 0x30;
if (9 < uVar3) {
if (iVar6 - 0x61U < 6) {
uVar3 = iVar6 - 0x57;
}
else {
uVar9 = 5;
if (((char)*pbVar8 < '7') || (5 < iVar6 - 0x41U)) break;
uVar3 = iVar6 - 0x37;
}
}
iVar5 = iVar5 * 0x10 + uVar3;
param_1[9] = iVar5;
pbVar8 = pbVar8 + 1;
uVar9 = 5;
} while (pbVar8 < pbVar2);
LAB_00147ab4:
*(int8 *)(param_1 + 6) = *(int8 *)(param_1 + 2);
*(byte **)(param_1 + 2) = pbVar8;
*param_1 = uVar9;
return;
}
|
|
16,497
|
translog_buffer_destroy
|
eloqsql/storage/maria/ma_loghandler.c
|
static void translog_buffer_destroy(struct st_translog_buffer *buffer)
{
DBUG_ENTER("translog_buffer_destroy");
DBUG_PRINT("enter",
("Buffer #%u: %p file: %d offset: " LSN_FMT " size: %lu",
(uint) buffer->buffer_no, buffer,
(buffer->file ? buffer->file->handler.file : -1),
LSN_IN_PARTS(buffer->offset),
(ulong) buffer->size));
if (buffer->file != NULL)
{
/*
We ignore errors here, because we can't do something about it
(it is shutting down)
We also have to take the locks even if there can't be any other
threads running, because translog_buffer_flush()
requires that we have the buffer locked.
*/
translog_buffer_lock(buffer);
translog_buffer_flush(buffer);
translog_buffer_unlock(buffer);
}
DBUG_PRINT("info", ("Destroy mutex: %p", &buffer->mutex));
mysql_mutex_destroy(&buffer->mutex);
mysql_cond_destroy(&buffer->waiting_filling_buffer);
DBUG_VOID_RETURN;
}
|
O0
|
c
|
translog_buffer_destroy:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
jmp 0x5511e
movq -0x8(%rbp), %rax
cmpq $0x0, 0x100038(%rax)
je 0x55147
movq -0x8(%rbp), %rdi
callq 0x514f0
movq -0x8(%rbp), %rdi
callq 0x57720
movq -0x8(%rbp), %rdi
callq 0x51530
jmp 0x55149
jmp 0x5514b
movq -0x8(%rbp), %rdi
addq $0x100090, %rdi # imm = 0x100090
callq 0x55240
movq -0x8(%rbp), %rdi
addq $0x100040, %rdi # imm = 0x100040
callq 0x55290
jmp 0x5516d
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
translog_buffer_destroy:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
jmp short $+2
loc_5511E:
mov rax, [rbp+var_8]
cmp qword ptr ds:loc_100038[rax], 0
jz short loc_55147
mov rdi, [rbp+var_8]
call translog_buffer_lock
mov rdi, [rbp+var_8]
call translog_buffer_flush
mov rdi, [rbp+var_8]
call translog_buffer_unlock
loc_55147:
jmp short $+2
loc_55149:
jmp short $+2
loc_5514B:
mov rdi, [rbp+var_8]
add rdi, 100090h
call inline_mysql_mutex_destroy_3
mov rdi, [rbp+var_8]
add rdi, 100040h
call inline_mysql_cond_destroy_1
jmp short $+2
loc_5516D:
add rsp, 10h
pop rbp
retn
|
long long translog_buffer_destroy(long long a1)
{
if ( *(_QWORD *)((char *)&loc_100038 + a1) )
{
translog_buffer_lock(a1);
translog_buffer_flush(a1);
translog_buffer_unlock(a1);
}
inline_mysql_mutex_destroy_3(a1 + 1048720);
return inline_mysql_cond_destroy_1(a1 + 1048640);
}
|
translog_buffer_destroy:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
JMP 0x0015511e
LAB_0015511e:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x100038],0x0
JZ 0x00155147
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001514f0
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00157720
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00151530
LAB_00155147:
JMP 0x00155149
LAB_00155149:
JMP 0x0015514b
LAB_0015514b:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x100090
CALL 0x00155240
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x100040
CALL 0x00155290
JMP 0x0015516d
LAB_0015516d:
ADD RSP,0x10
POP RBP
RET
|
void translog_buffer_destroy(long param_1)
{
if (*(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f) != 0) {
translog_buffer_lock(param_1);
translog_buffer_flush(param_1);
translog_buffer_unlock(param_1);
}
inline_mysql_mutex_destroy(param_1 + 0x100090);
inline_mysql_cond_destroy((long)&Elf64_Phdr_ARRAY_00100040[0].p_type + param_1);
return;
}
|
|
16,498
|
js_async_function_resolve_call
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_async_function_resolve_call(JSContext *ctx,
JSValue func_obj,
JSValue this_obj,
int argc, JSValue *argv,
int flags)
{
JSObject *p = JS_VALUE_GET_OBJ(func_obj);
JSAsyncFunctionData *s = p->u.async_function_data;
BOOL is_reject = p->class_id - JS_CLASS_ASYNC_FUNCTION_RESOLVE;
JSValue arg;
if (argc > 0)
arg = argv[0];
else
arg = JS_UNDEFINED;
s->func_state.throw_flag = is_reject;
if (is_reject) {
JS_Throw(ctx, js_dup(arg));
} else {
/* return value of await */
s->func_state.frame.cur_sp[-1] = js_dup(arg);
}
js_async_function_resume(ctx, s);
return JS_UNDEFINED;
}
|
O0
|
c
|
js_async_function_resolve_call:
subq $0xb8, %rsp
movl 0xc8(%rsp), %eax
movq 0xc0(%rsp), %rax
movq %rsi, 0x98(%rsp)
movq %rdx, 0xa0(%rsp)
movq %rcx, 0x88(%rsp)
movq %r8, 0x90(%rsp)
movq %rdi, 0x80(%rsp)
movl %r9d, 0x7c(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x68(%rsp)
movq 0x70(%rsp), %rax
movzwl 0x6(%rax), %eax
subl $0x35, %eax
movl %eax, 0x64(%rsp)
cmpl $0x0, 0x7c(%rsp)
jle 0x540a0
movq 0xc0(%rsp), %rax
movq (%rax), %rcx
movq %rcx, 0x50(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x58(%rsp)
jmp 0x540c5
movl $0x0, 0x40(%rsp)
movq $0x3, 0x48(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x58(%rsp)
movl 0x64(%rsp), %ecx
movq 0x68(%rsp), %rax
movl %ecx, 0x54(%rax)
cmpl $0x0, 0x64(%rsp)
je 0x5411e
movq 0x80(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x216d0
movq 0x8(%rsp), %rdi
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x2cf00
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
jmp 0x54160
movq 0x68(%rsp), %rax
movq 0xa0(%rax), %rax
movq %rax, (%rsp)
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x216d0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%rsp), %rcx
movq %rcx, -0x10(%rax)
movq 0x18(%rsp), %rcx
movq %rcx, -0x8(%rax)
movq 0x80(%rsp), %rdi
movq 0x68(%rsp), %rsi
callq 0x92620
movl $0x0, 0xa8(%rsp)
movq $0x3, 0xb0(%rsp)
movq 0xa8(%rsp), %rax
movq 0xb0(%rsp), %rdx
addq $0xb8, %rsp
retq
nopw %cs:(%rax,%rax)
|
js_async_function_resolve_call:
sub rsp, 0B8h
mov eax, [rsp+0B8h+arg_8]
mov rax, [rsp+0B8h+arg_0]
mov [rsp+0B8h+var_20], rsi
mov [rsp+0B8h+var_18], rdx
mov [rsp+0B8h+var_30], rcx
mov [rsp+0B8h+var_28], r8
mov [rsp+0B8h+var_38], rdi
mov [rsp+0B8h+var_3C], r9d
mov rax, [rsp+0B8h+var_20]
mov [rsp+0B8h+var_48], rax
mov rax, [rsp+0B8h+var_48]
mov rax, [rax+30h]
mov [rsp+0B8h+var_50], rax
mov rax, [rsp+0B8h+var_48]
movzx eax, word ptr [rax+6]
sub eax, 35h ; '5'
mov [rsp+0B8h+var_54], eax
cmp [rsp+0B8h+var_3C], 0
jle short loc_540A0
mov rax, [rsp+0B8h+arg_0]
mov rcx, [rax]
mov [rsp+0B8h+var_68], rcx
mov rax, [rax+8]
mov [rsp+0B8h+var_60], rax
jmp short loc_540C5
loc_540A0:
mov dword ptr [rsp+0B8h+var_78], 0
mov [rsp+0B8h+var_70], 3
mov rax, [rsp+0B8h+var_78]
mov [rsp+0B8h+var_68], rax
mov rax, [rsp+0B8h+var_70]
mov [rsp+0B8h+var_60], rax
loc_540C5:
mov ecx, [rsp+0B8h+var_54]
mov rax, [rsp+0B8h+var_50]
mov [rax+54h], ecx
cmp [rsp+0B8h+var_54], 0
jz short loc_5411E
mov rax, [rsp+0B8h+var_38]
mov [rsp+0B8h+var_B0], rax
mov rdi, [rsp+0B8h+var_68]
mov rsi, [rsp+0B8h+var_60]
call js_dup
mov rdi, [rsp+0B8h+var_B0]
mov [rsp+0B8h+var_88], rax
mov [rsp+0B8h+var_80], rdx
mov rsi, [rsp+0B8h+var_88]
mov rdx, [rsp+0B8h+var_80]
call JS_Throw
mov [rsp+0B8h+var_98], rax
mov [rsp+0B8h+var_90], rdx
jmp short loc_54160
loc_5411E:
mov rax, [rsp+0B8h+var_50]
mov rax, [rax+0A0h]
mov [rsp+0B8h+var_B8], rax
mov rdi, [rsp+0B8h+var_68]
mov rsi, [rsp+0B8h+var_60]
call js_dup
mov rcx, rax
mov rax, [rsp+0B8h+var_B8]
mov [rsp+0B8h+var_A8], rcx
mov [rsp+0B8h+var_A0], rdx
mov rcx, [rsp+0B8h+var_A8]
mov [rax-10h], rcx
mov rcx, [rsp+0B8h+var_A0]
mov [rax-8], rcx
loc_54160:
mov rdi, [rsp+0B8h+var_38]
mov rsi, [rsp+0B8h+var_50]
call js_async_function_resume
mov dword ptr [rsp+0B8h+var_10], 0
mov [rsp+0B8h+var_8], 3
mov rax, [rsp+0B8h+var_10]
mov rdx, [rsp+0B8h+var_8]
add rsp, 0B8h
retn
|
long long js_async_function_resolve_call(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
int a6,
long long a7)
{
long long v7; // rdx
long long v8; // rdx
long long v10; // [rsp+0h] [rbp-B8h]
_DWORD *v11; // [rsp+30h] [rbp-88h]
_DWORD *v12; // [rsp+40h] [rbp-78h]
_DWORD *v13; // [rsp+50h] [rbp-68h]
long long v14; // [rsp+58h] [rbp-60h]
int v15; // [rsp+64h] [rbp-54h]
long long v16; // [rsp+68h] [rbp-50h]
long long v17; // [rsp+A8h] [rbp-10h]
v16 = *(_QWORD *)(a2 + 48);
v15 = *(unsigned __int16 *)(a2 + 6) - 53;
if ( a6 <= 0 )
{
LODWORD(v12) = 0;
v13 = v12;
LODWORD(v14) = 3;
}
else
{
v13 = *(_DWORD **)a7;
v14 = *(_QWORD *)(a7 + 8);
}
*(_DWORD *)(v16 + 84) = v15;
if ( v15 )
{
v11 = js_dup(v13, v14);
JS_Throw(a1, (long long)v11, v7);
}
else
{
v10 = *(_QWORD *)(v16 + 160);
*(_QWORD *)(v10 - 16) = js_dup(v13, v14);
*(_QWORD *)(v10 - 8) = v8;
}
js_async_function_resume(a1, v16);
LODWORD(v17) = 0;
return v17;
}
|
js_async_function_resolve_call:
SUB RSP,0xb8
MOV EAX,dword ptr [RSP + 0xc8]
MOV RAX,qword ptr [RSP + 0xc0]
MOV qword ptr [RSP + 0x98],RSI
MOV qword ptr [RSP + 0xa0],RDX
MOV qword ptr [RSP + 0x88],RCX
MOV qword ptr [RSP + 0x90],R8
MOV qword ptr [RSP + 0x80],RDI
MOV dword ptr [RSP + 0x7c],R9D
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOVZX EAX,word ptr [RAX + 0x6]
SUB EAX,0x35
MOV dword ptr [RSP + 0x64],EAX
CMP dword ptr [RSP + 0x7c],0x0
JLE 0x001540a0
MOV RAX,qword ptr [RSP + 0xc0]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP + 0x50],RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x58],RAX
JMP 0x001540c5
LAB_001540a0:
MOV dword ptr [RSP + 0x40],0x0
MOV qword ptr [RSP + 0x48],0x3
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x58],RAX
LAB_001540c5:
MOV ECX,dword ptr [RSP + 0x64]
MOV RAX,qword ptr [RSP + 0x68]
MOV dword ptr [RAX + 0x54],ECX
CMP dword ptr [RSP + 0x64],0x0
JZ 0x0015411e
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x001216d0
MOV RDI,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x38],RDX
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
CALL 0x0012cf00
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RDX
JMP 0x00154160
LAB_0015411e:
MOV RAX,qword ptr [RSP + 0x68]
MOV RAX,qword ptr [RAX + 0xa0]
MOV qword ptr [RSP],RAX
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x001216d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x10],RCX
MOV qword ptr [RSP + 0x18],RDX
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + -0x10],RCX
MOV RCX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + -0x8],RCX
LAB_00154160:
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x68]
CALL 0x00192620
MOV dword ptr [RSP + 0xa8],0x0
MOV qword ptr [RSP + 0xb0],0x3
MOV RAX,qword ptr [RSP + 0xa8]
MOV RDX,qword ptr [RSP + 0xb0]
ADD RSP,0xb8
RET
|
int1 [16] js_async_function_resolve_call(int8 param_1,long param_2)
{
long lVar1;
long lVar2;
int iVar3;
int in_R9D;
int1 auVar4 [16];
long *in_stack_00000008;
uint uStack_74;
long local_68;
long local_60;
uint uStack_c;
lVar1 = *(long *)(param_2 + 0x30);
iVar3 = *(ushort *)(param_2 + 6) - 0x35;
if (in_R9D < 1) {
local_68 = (ulong)uStack_74 << 0x20;
local_60 = 3;
}
else {
local_68 = *in_stack_00000008;
local_60 = in_stack_00000008[1];
}
*(int *)(lVar1 + 0x54) = iVar3;
if (iVar3 == 0) {
lVar2 = *(long *)(lVar1 + 0xa0);
auVar4 = js_dup(local_68,local_60);
*(int1 (*) [16])(lVar2 + -0x10) = auVar4;
}
else {
auVar4 = js_dup(local_68,local_60);
JS_Throw(param_1,auVar4._0_8_,auVar4._8_8_);
}
js_async_function_resume(param_1,lVar1);
auVar4._8_8_ = 3;
auVar4._0_8_ = (ulong)uStack_c << 0x20;
return auVar4;
}
|
|
16,499
|
js_async_function_resolve_call
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_async_function_resolve_call(JSContext *ctx,
JSValue func_obj,
JSValue this_obj,
int argc, JSValue *argv,
int flags)
{
JSObject *p = JS_VALUE_GET_OBJ(func_obj);
JSAsyncFunctionData *s = p->u.async_function_data;
BOOL is_reject = p->class_id - JS_CLASS_ASYNC_FUNCTION_RESOLVE;
JSValue arg;
if (argc > 0)
arg = argv[0];
else
arg = JS_UNDEFINED;
s->func_state.throw_flag = is_reject;
if (is_reject) {
JS_Throw(ctx, js_dup(arg));
} else {
/* return value of await */
s->func_state.frame.cur_sp[-1] = js_dup(arg);
}
js_async_function_resume(ctx, s);
return JS_UNDEFINED;
}
|
O1
|
c
|
js_async_function_resolve_call:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x30(%rsi), %rbx
movzwl 0x6(%rsi), %eax
addl $-0x35, %eax
testl %r9d, %r9d
jle 0x36678
movq 0x40(%rsp), %rcx
movq (%rcx), %rdx
movq 0x8(%rcx), %r12
movabsq $-0x100000000, %r13 # imm = 0xFFFFFFFF00000000
andq %rdx, %r13
movl %edx, %ecx
jmp 0x36683
movl $0x3, %r12d
xorl %ecx, %ecx
xorl %r13d, %r13d
movl %eax, 0x54(%rbx)
testl %eax, %eax
je 0x366c7
orq %rcx, %r13
movq %r13, (%rsp)
cmpl $-0x9, %r12d
jb 0x3669d
movq (%rsp), %rax
incl (%rax)
movq 0x18(%r14), %r15
leaq 0xf8(%r15), %rbp
movq 0xf0(%r15), %rsi
movq 0xf8(%r15), %rdx
movq %r15, %rdi
callq 0x1d8c6
movq %r13, 0xf0(%r15)
jmp 0x366e9
movq 0xa0(%rbx), %rbp
orq %rcx, %r13
movq %r13, (%rsp)
cmpl $-0x9, %r12d
jb 0x366e1
movq (%rsp), %rax
incl (%rax)
movq %r13, -0x10(%rbp)
addq $-0x8, %rbp
movq %r12, (%rbp)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x53037
movl $0x3, %edx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
js_async_function_resolve_call:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rdi
mov rbx, [rsi+30h]
movzx eax, word ptr [rsi+6]
add eax, 0FFFFFFCBh
test r9d, r9d
jle short loc_36678
mov rcx, [rsp+38h+arg_0]
mov rdx, [rcx]
mov r12, [rcx+8]
mov r13, 0FFFFFFFF00000000h
and r13, rdx
mov ecx, edx
jmp short loc_36683
loc_36678:
mov r12d, 3
xor ecx, ecx
xor r13d, r13d
loc_36683:
mov [rbx+54h], eax
test eax, eax
jz short loc_366C7
or r13, rcx
mov [rsp+38h+var_38], r13
cmp r12d, 0FFFFFFF7h
jb short loc_3669D
mov rax, [rsp+38h+var_38]
inc dword ptr [rax]
loc_3669D:
mov r15, [r14+18h]
lea rbp, [r15+0F8h]
mov rsi, [r15+0F0h]
mov rdx, [r15+0F8h]
mov rdi, r15
call JS_FreeValueRT
mov [r15+0F0h], r13
jmp short loc_366E9
loc_366C7:
mov rbp, [rbx+0A0h]
or r13, rcx
mov [rsp+38h+var_38], r13
cmp r12d, 0FFFFFFF7h
jb short loc_366E1
mov rax, [rsp+38h+var_38]
inc dword ptr [rax]
loc_366E1:
mov [rbp-10h], r13
add rbp, 0FFFFFFFFFFFFFFF8h
loc_366E9:
mov [rbp+0], r12
mov rdi, r14
mov rsi, rbx
call js_async_function_resume
mov edx, 3
xor eax, eax
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long js_async_function_resolve_call(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
int a6,
long long *a7)
{
long long v7; // rbx
int v8; // eax
long long v9; // r12
unsigned long long v10; // r13
long long v11; // rcx
_DWORD *v12; // r13
long long v13; // r15
long long *v14; // rbp
long long v15; // rbp
_DWORD *v16; // r13
v7 = *(_QWORD *)(a2 + 48);
v8 = *(unsigned __int16 *)(a2 + 6) - 53;
if ( a6 <= 0 )
{
v9 = 3LL;
v11 = 0LL;
v10 = 0LL;
}
else
{
a3 = *a7;
v9 = a7[1];
v10 = *a7 & 0xFFFFFFFF00000000LL;
v11 = (unsigned int)*a7;
}
*(_DWORD *)(v7 + 84) = v8;
if ( v8 )
{
v12 = (_DWORD *)(v11 | v10);
if ( (unsigned int)v9 >= 0xFFFFFFF7 )
++*v12;
v13 = *(_QWORD *)(a1 + 24);
v14 = (long long *)(v13 + 248);
JS_FreeValueRT(v13, *(_DWORD **)(v13 + 240), *(_QWORD *)(v13 + 248));
*(_QWORD *)(v13 + 240) = v12;
}
else
{
v15 = *(_QWORD *)(v7 + 160);
v16 = (_DWORD *)(v11 | v10);
if ( (unsigned int)v9 >= 0xFFFFFFF7 )
++*v16;
*(_QWORD *)(v15 - 16) = v16;
v14 = (long long *)(v15 - 8);
}
*v14 = v9;
js_async_function_resume(a1, v7, a3);
return 0LL;
}
|
js_async_function_resolve_call:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDI
MOV RBX,qword ptr [RSI + 0x30]
MOVZX EAX,word ptr [RSI + 0x6]
ADD EAX,-0x35
TEST R9D,R9D
JLE 0x00136678
MOV RCX,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RCX]
MOV R12,qword ptr [RCX + 0x8]
MOV R13,-0x100000000
AND R13,RDX
MOV ECX,EDX
JMP 0x00136683
LAB_00136678:
MOV R12D,0x3
XOR ECX,ECX
XOR R13D,R13D
LAB_00136683:
MOV dword ptr [RBX + 0x54],EAX
TEST EAX,EAX
JZ 0x001366c7
OR R13,RCX
MOV qword ptr [RSP],R13
CMP R12D,-0x9
JC 0x0013669d
MOV RAX,qword ptr [RSP]
INC dword ptr [RAX]
LAB_0013669d:
MOV R15,qword ptr [R14 + 0x18]
LEA RBP,[R15 + 0xf8]
MOV RSI,qword ptr [R15 + 0xf0]
MOV RDX,qword ptr [R15 + 0xf8]
MOV RDI,R15
CALL 0x0011d8c6
MOV qword ptr [R15 + 0xf0],R13
JMP 0x001366e9
LAB_001366c7:
MOV RBP,qword ptr [RBX + 0xa0]
OR R13,RCX
MOV qword ptr [RSP],R13
CMP R12D,-0x9
JC 0x001366e1
MOV RAX,qword ptr [RSP]
INC dword ptr [RAX]
LAB_001366e1:
MOV qword ptr [RBP + -0x10],R13
ADD RBP,-0x8
LAB_001366e9:
MOV qword ptr [RBP],R12
MOV RDI,R14
MOV RSI,RBX
CALL 0x00153037
MOV EDX,0x3
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16] js_async_function_resolve_call(long param_1,long param_2)
{
long lVar1;
long lVar2;
int iVar3;
ulong uVar4;
ulong *puVar5;
int in_R9D;
ulong uVar6;
ulong uVar7;
int *piVar8;
ulong *in_stack_00000008;
lVar1 = *(long *)(param_2 + 0x30);
iVar3 = *(ushort *)(param_2 + 6) - 0x35;
if (in_R9D < 1) {
uVar6 = 3;
uVar4 = 0;
uVar7 = 0;
}
else {
uVar6 = in_stack_00000008[1];
uVar7 = *in_stack_00000008 & 0xffffffff00000000;
uVar4 = *in_stack_00000008 & 0xffffffff;
}
*(int *)(lVar1 + 0x54) = iVar3;
if (iVar3 == 0) {
lVar2 = *(long *)(lVar1 + 0xa0);
piVar8 = (int *)(uVar7 | uVar4);
if (0xfffffff6 < (uint)uVar6) {
*piVar8 = *piVar8 + 1;
}
*(int **)(lVar2 + -0x10) = piVar8;
puVar5 = (ulong *)(lVar2 + -8);
}
else {
piVar8 = (int *)(uVar7 | uVar4);
if (0xfffffff6 < (uint)uVar6) {
*piVar8 = *piVar8 + 1;
}
lVar2 = *(long *)(param_1 + 0x18);
puVar5 = (ulong *)(lVar2 + 0xf8);
JS_FreeValueRT(lVar2,*(int8 *)(lVar2 + 0xf0),*(int8 *)(lVar2 + 0xf8));
*(int **)(lVar2 + 0xf0) = piVar8;
}
*puVar5 = uVar6;
js_async_function_resume(param_1,lVar1);
return ZEXT816(3) << 0x40;
}
|
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.