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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
43,800 | my_once_free | eloqsql/mysys/my_once.c | void my_once_free(void)
{
reg1 USED_MEM *next,*old;
DBUG_ENTER("my_once_free");
for (next=my_once_root_block ; next ; )
{
old=next; next= next->next ;
free((uchar*) old);
}
my_once_root_block=0;
DBUG_VOID_RETURN;
} | O0 | c | my_once_free:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0xb8f0a1(%rip), %rax # 0xc83290
movq (%rax), %rax
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xf421b
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2a170
jmp 0xf41f6
leaq 0xb8f06e(%rip), %rax # 0xc83290
movq $0x0, (%rax)
jmp 0xf422b
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| my_once_free:
push rbp
mov rbp, rsp
sub rsp, 10h
lea rax, my_once_root_block
mov rax, [rax]
mov [rbp+var_8], rax
loc_F41F6:
cmp [rbp+var_8], 0
jz short loc_F421B
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_8], rax
mov rdi, [rbp+var_10]
call _free
jmp short loc_F41F6
loc_F421B:
lea rax, my_once_root_block
mov qword ptr [rax], 0
jmp short $+2
loc_F422B:
add rsp, 10h
pop rbp
retn
| _QWORD *my_once_free()
{
_QWORD *result; // rax
_QWORD *v1; // [rsp+0h] [rbp-10h]
_QWORD *v2; // [rsp+8h] [rbp-8h]
v2 = (_QWORD *)my_once_root_block;
while ( v2 )
{
v1 = v2;
v2 = (_QWORD *)*v2;
free(v1);
}
result = &my_once_root_block;
my_once_root_block = 0LL;
return result;
}
| my_once_free:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
LEA RAX,[0xd83290]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x8],RAX
LAB_001f41f6:
CMP qword ptr [RBP + -0x8],0x0
JZ 0x001f421b
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x8],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0012a170
JMP 0x001f41f6
LAB_001f421b:
LEA RAX,[0xd83290]
MOV qword ptr [RAX],0x0
JMP 0x001f422b
LAB_001f422b:
ADD RSP,0x10
POP RBP
RET
|
void my_once_free(void)
{
int8 *puVar1;
int8 local_10;
local_10 = my_once_root_block;
while (local_10 != (int8 *)0x0) {
puVar1 = (int8 *)*local_10;
free(local_10);
local_10 = puVar1;
}
my_once_root_block = (int8 *)0x0;
return;
}
| |
43,801 | downheap | eloqsql/mysys/queues.c | void _downheap(QUEUE *queue, uint idx)
{
uchar *element= queue->root[idx];
uint next_index,
elements= queue->elements,
half_queue= elements >> 1,
offset_to_key= queue->offset_to_key,
offset_to_queue_pos= queue->offset_to_queue_pos;
while (idx <= half_queue)
{
next_index= idx+idx;
if (next_index < elements &&
(queue->compare(queue->first_cmp_arg,
queue->root[next_index]+offset_to_key,
queue->root[next_index+1]+offset_to_key) *
queue->max_at_top) > 0)
next_index++;
if ((queue->compare(queue->first_cmp_arg,
queue->root[next_index]+offset_to_key,
element+offset_to_key) * queue->max_at_top) >= 0)
break;
queue->root[idx]= queue->root[next_index];
if (offset_to_queue_pos)
(*(uint*) (queue->root[idx] + offset_to_queue_pos-1))= idx;
idx= next_index;
}
queue->root[idx]=element;
if (offset_to_queue_pos)
(*(uint*) (element + offset_to_queue_pos-1))= idx;
} | O3 | c | downheap:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebx
movq (%rdi), %rax
movl %esi, %r13d
movq (%rax,%r13,8), %rcx
movl 0x10(%rdi), %edx
movl %edx, -0x30(%rbp)
shrl %edx
movl 0x1c(%rdi), %r15d
movl %edx, -0x2c(%rbp)
cmpl %esi, %edx
jb 0x5ca4e
movq %rdi, %r14
movl 0x18(%rdi), %eax
movq %rcx, -0x40(%rbp)
movq %rax, -0x38(%rbp)
addq %rcx, %rax
movq %rax, -0x48(%rbp)
leal (%rbx,%rbx), %r12d
movq (%r14), %rax
cmpl -0x30(%rbp), %r12d
jae 0x5c9f1
movq 0x8(%r14), %rdi
movl %r12d, %ecx
movq (%rax,%rcx,8), %rsi
movq -0x38(%rbp), %rcx
addq %rcx, %rsi
movl %r12d, %r13d
orl $0x1, %r13d
movq (%rax,%r13,8), %rdx
addq %rcx, %rdx
callq *0x28(%r14)
imull 0x24(%r14), %eax
testl %eax, %eax
jg 0x5c9eb
movl %r12d, %r13d
movq (%r14), %rax
movl %r13d, %r12d
movq 0x8(%r14), %rdi
movl %r12d, %r13d
movq (%rax,%r13,8), %rsi
addq -0x38(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq *0x28(%r14)
imull 0x24(%r14), %eax
testl %eax, %eax
jns 0x5ca3e
movq (%r14), %rcx
movq (%rcx,%r13,8), %rdx
movl %ebx, %eax
movq %rdx, (%rcx,%rax,8)
testq %r15, %r15
je 0x5ca2f
movq (%r14), %rcx
movq (%rcx,%rax,8), %rax
movl %ebx, -0x1(%rax,%r15)
movl %r12d, %ebx
cmpl -0x2c(%rbp), %r12d
jbe 0x5c9ae
jmp 0x5ca44
movl %ebx, %r13d
movl %ebx, %r12d
movq (%r14), %rax
movl %r12d, %ebx
movq -0x40(%rbp), %rcx
movq %rcx, (%rax,%r13,8)
testq %r15, %r15
je 0x5ca5c
movl %ebx, -0x1(%rcx,%r15)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _downheap:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebx, esi
mov rax, [rdi]
mov r13d, esi
mov rcx, [rax+r13*8]
mov edx, [rdi+10h]
mov [rbp+var_30], edx
shr edx, 1
mov r15d, [rdi+1Ch]
mov [rbp+var_2C], edx
cmp edx, esi
jb loc_5CA4E
mov r14, rdi
mov eax, [rdi+18h]
mov [rbp+var_40], rcx
mov [rbp+var_38], rax
add rax, rcx
mov [rbp+var_48], rax
loc_5C9AE:
lea r12d, [rbx+rbx]
mov rax, [r14]
cmp r12d, [rbp+var_30]
jnb short loc_5C9F1
mov rdi, [r14+8]
mov ecx, r12d
mov rsi, [rax+rcx*8]
mov rcx, [rbp+var_38]
add rsi, rcx
mov r13d, r12d
or r13d, 1
mov rdx, [rax+r13*8]
add rdx, rcx
call qword ptr [r14+28h]
imul eax, [r14+24h]
test eax, eax
jg short loc_5C9EB
mov r13d, r12d
loc_5C9EB:
mov rax, [r14]
mov r12d, r13d
loc_5C9F1:
mov rdi, [r14+8]
mov r13d, r12d
mov rsi, [rax+r13*8]
add rsi, [rbp+var_38]
mov rdx, [rbp+var_48]
call qword ptr [r14+28h]
imul eax, [r14+24h]
test eax, eax
jns short loc_5CA3E
mov rcx, [r14]
mov rdx, [rcx+r13*8]
mov eax, ebx
mov [rcx+rax*8], rdx
test r15, r15
jz short loc_5CA2F
mov rcx, [r14]
mov rax, [rcx+rax*8]
mov [rax+r15-1], ebx
loc_5CA2F:
mov ebx, r12d
cmp r12d, [rbp+var_2C]
jbe loc_5C9AE
jmp short loc_5CA44
loc_5CA3E:
mov r13d, ebx
mov r12d, ebx
loc_5CA44:
mov rax, [r14]
mov ebx, r12d
mov rcx, [rbp+var_40]
loc_5CA4E:
mov [rax+r13*8], rcx
test r15, r15
jz short loc_5CA5C
mov [rcx+r15-1], ebx
loc_5CA5C:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long downheap(long long *a1, unsigned int a2)
{
unsigned int v2; // ebx
long long result; // rax
long long v4; // r13
long long v5; // rcx
long long v6; // r15
unsigned int v7; // r12d
long long v8; // rax
long long v9; // r13
long long v10; // [rsp+8h] [rbp-48h]
long long v11; // [rsp+10h] [rbp-40h]
long long v12; // [rsp+18h] [rbp-38h]
unsigned int v13; // [rsp+20h] [rbp-30h]
v2 = a2;
result = *a1;
v4 = a2;
v5 = *(_QWORD *)(*a1 + 8LL * a2);
v13 = *((_DWORD *)a1 + 4);
v6 = *((unsigned int *)a1 + 7);
if ( v13 >> 1 >= a2 )
{
v11 = *(_QWORD *)(*a1 + 8LL * a2);
v12 = *((unsigned int *)a1 + 6);
v10 = v5 + v12;
while ( 1 )
{
v7 = 2 * v2;
v8 = *a1;
if ( 2 * v2 < v13 )
{
v9 = v7 | 1;
if ( (int)(*((_DWORD *)a1 + 9)
* ((long long ( *)(long long, long long, long long))a1[5])(
a1[1],
v12 + *(_QWORD *)(v8 + 8LL * v7),
v12 + *(_QWORD *)(v8 + 8 * v9))) <= 0 )
LODWORD(v9) = 2 * v2;
v8 = *a1;
v7 = v9;
}
v4 = v7;
if ( (int)(*((_DWORD *)a1 + 9)
* ((long long ( *)(long long, long long, long long))a1[5])(
a1[1],
v12 + *(_QWORD *)(v8 + 8LL * v7),
v10)) >= 0 )
break;
*(_QWORD *)(*a1 + 8LL * v2) = *(_QWORD *)(*a1 + 8LL * v7);
if ( v6 )
*(_DWORD *)(*(_QWORD *)(*a1 + 8LL * v2) + v6 - 1) = v2;
v2 = v7;
if ( v7 > v13 >> 1 )
goto LABEL_13;
}
v4 = v2;
v7 = v2;
LABEL_13:
result = *a1;
v2 = v7;
v5 = v11;
}
*(_QWORD *)(result + 8 * v4) = v5;
if ( v6 )
*(_DWORD *)(v5 + v6 - 1) = v2;
return result;
}
| _downheap:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBX,ESI
MOV RAX,qword ptr [RDI]
MOV R13D,ESI
MOV RCX,qword ptr [RAX + R13*0x8]
MOV EDX,dword ptr [RDI + 0x10]
MOV dword ptr [RBP + -0x30],EDX
SHR EDX,0x1
MOV R15D,dword ptr [RDI + 0x1c]
MOV dword ptr [RBP + -0x2c],EDX
CMP EDX,ESI
JC 0x0015ca4e
MOV R14,RDI
MOV EAX,dword ptr [RDI + 0x18]
MOV qword ptr [RBP + -0x40],RCX
MOV qword ptr [RBP + -0x38],RAX
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
LAB_0015c9ae:
LEA R12D,[RBX + RBX*0x1]
MOV RAX,qword ptr [R14]
CMP R12D,dword ptr [RBP + -0x30]
JNC 0x0015c9f1
MOV RDI,qword ptr [R14 + 0x8]
MOV ECX,R12D
MOV RSI,qword ptr [RAX + RCX*0x8]
MOV RCX,qword ptr [RBP + -0x38]
ADD RSI,RCX
MOV R13D,R12D
OR R13D,0x1
MOV RDX,qword ptr [RAX + R13*0x8]
ADD RDX,RCX
CALL qword ptr [R14 + 0x28]
IMUL EAX,dword ptr [R14 + 0x24]
TEST EAX,EAX
JG 0x0015c9eb
MOV R13D,R12D
LAB_0015c9eb:
MOV RAX,qword ptr [R14]
MOV R12D,R13D
LAB_0015c9f1:
MOV RDI,qword ptr [R14 + 0x8]
MOV R13D,R12D
MOV RSI,qword ptr [RAX + R13*0x8]
ADD RSI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x48]
CALL qword ptr [R14 + 0x28]
IMUL EAX,dword ptr [R14 + 0x24]
TEST EAX,EAX
JNS 0x0015ca3e
MOV RCX,qword ptr [R14]
MOV RDX,qword ptr [RCX + R13*0x8]
MOV EAX,EBX
MOV qword ptr [RCX + RAX*0x8],RDX
TEST R15,R15
JZ 0x0015ca2f
MOV RCX,qword ptr [R14]
MOV RAX,qword ptr [RCX + RAX*0x8]
MOV dword ptr [RAX + R15*0x1 + -0x1],EBX
LAB_0015ca2f:
MOV EBX,R12D
CMP R12D,dword ptr [RBP + -0x2c]
JBE 0x0015c9ae
JMP 0x0015ca44
LAB_0015ca3e:
MOV R13D,EBX
MOV R12D,EBX
LAB_0015ca44:
MOV RAX,qword ptr [R14]
MOV EBX,R12D
MOV RCX,qword ptr [RBP + -0x40]
LAB_0015ca4e:
MOV qword ptr [RAX + R13*0x8],RCX
TEST R15,R15
JZ 0x0015ca5c
MOV dword ptr [RCX + R15*0x1 + -0x1],EBX
LAB_0015ca5c:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void _downheap(long *param_1,uint param_2)
{
uint uVar1;
long lVar2;
uint uVar3;
int iVar4;
ulong uVar5;
long lVar6;
uint uVar7;
uint uVar8;
ulong uVar9;
ulong uVar10;
lVar6 = *param_1;
uVar9 = (ulong)param_2;
lVar2 = *(long *)(lVar6 + uVar9 * 8);
uVar1 = *(uint *)(param_1 + 2);
uVar7 = uVar1 >> 1;
uVar10 = (ulong)*(uint *)((long)param_1 + 0x1c);
if (param_2 <= uVar7) {
uVar5 = (ulong)*(uint *)(param_1 + 3);
uVar8 = param_2;
do {
uVar3 = uVar8 * 2;
uVar9 = (ulong)uVar3;
lVar6 = *param_1;
if (uVar3 < uVar1) {
uVar9 = (ulong)(uVar3 | 1);
iVar4 = (*(code *)param_1[5])
(param_1[1],*(long *)(lVar6 + (ulong)uVar3 * 8) + uVar5,
*(long *)(lVar6 + uVar9 * 8) + uVar5);
if (iVar4 * *(int *)((long)param_1 + 0x24) < 1) {
uVar9 = (ulong)uVar3;
}
lVar6 = *param_1;
}
param_2 = (uint)uVar9;
iVar4 = (*(code *)param_1[5])(param_1[1],*(long *)(lVar6 + uVar9 * 8) + uVar5,uVar5 + lVar2);
if (-1 < iVar4 * *(int *)((long)param_1 + 0x24)) {
uVar9 = (ulong)uVar8;
param_2 = uVar8;
break;
}
*(int8 *)(*param_1 + (ulong)uVar8 * 8) = *(int8 *)(*param_1 + uVar9 * 8);
if (uVar10 != 0) {
*(uint *)(*(long *)(*param_1 + (ulong)uVar8 * 8) + -1 + uVar10) = uVar8;
}
uVar8 = param_2;
} while (param_2 <= uVar7);
lVar6 = *param_1;
}
*(long *)(lVar6 + uVar9 * 8) = lVar2;
if (uVar10 != 0) {
*(uint *)(lVar2 + -1 + uVar10) = param_2;
}
return;
}
| |
43,802 | free_block | eloqsql/storage/maria/ma_pagecache.c | static my_bool free_block(PAGECACHE *pagecache, PAGECACHE_BLOCK_LINK *block,
my_bool abort_if_pinned)
{
uint status= block->status;
KEYCACHE_THREAD_TRACE("free block");
KEYCACHE_DBUG_PRINT("free_block",
("block: %u hash_link %p",
PCBLOCK_NUMBER(pagecache, block),
block->hash_link));
mysql_mutex_assert_owner(&pagecache->cache_lock);
if (block->hash_link)
{
/*
While waiting for readers to finish, new readers might request the
block. But since we set block->status|= PCBLOCK_REASSIGNED, they
will wait on block->wqueue[COND_FOR_SAVED]. They must be signaled
later.
*/
block->status|= PCBLOCK_REASSIGNED;
wait_for_readers(pagecache, block);
if (unlikely(abort_if_pinned) && unlikely(block->pins))
{
/*
Block got pinned while waiting for readers.
This can only happens when called from flush_pagecache_blocks_int()
when flushing blocks as part of prepare for maria_close() or from
flush_cached_blocks()
*/
block->status&= ~PCBLOCK_REASSIGNED;
unreg_request(pagecache, block, 0);
/* All pending requests for this page must be resubmitted. */
if (block->wqueue[COND_FOR_SAVED].last_thread)
wqueue_release_queue(&block->wqueue[COND_FOR_SAVED]);
return 1;
}
unlink_hash(pagecache, block->hash_link);
}
unlink_changed(block);
DBUG_ASSERT(block->wlocks == 0);
DBUG_ASSERT(block->rlocks == 0);
DBUG_ASSERT(block->rlocks_queue == 0);
DBUG_ASSERT(block->pins == 0);
DBUG_ASSERT((block->status & ~(PCBLOCK_ERROR | PCBLOCK_READ | PCBLOCK_IN_FLUSH | PCBLOCK_CHANGED | PCBLOCK_REASSIGNED | PCBLOCK_DEL_WRITE)) == 0);
DBUG_ASSERT(block->requests >= 1);
DBUG_ASSERT(block->next_used == NULL);
block->status= 0;
#ifdef DBUG_ASSERT_EXISTS
block->type= PAGECACHE_EMPTY_PAGE;
#endif
block->rec_lsn= LSN_MAX;
DBUG_PRINT("hash", ("block (Free): %p, hash_link: %p -> NULL",
block, block->hash_link));
block->hash_link= NULL;
if (block->temperature == PCBLOCK_WARM)
pagecache->warm_blocks--;
block->temperature= PCBLOCK_COLD;
KEYCACHE_THREAD_TRACE("free block");
KEYCACHE_DBUG_PRINT("free_block",
("block is freed"));
unreg_request(pagecache, block, 0);
/*
Block->requests is != 0 if unreg_requests()/link_block() gave the block
to a waiting thread
*/
if (!block->requests)
{
DBUG_ASSERT(block->next_used != 0);
/* Remove the free block from the LRU ring. */
unlink_block(pagecache, block);
/* Insert the free block in the free list. */
block->next_used= pagecache->free_block_list;
pagecache->free_block_list= block;
/* Keep track of the number of currently unused blocks. */
pagecache->blocks_unused++;
}
else
{
/* keep flag set by link_block() */
block->status= status & PCBLOCK_REASSIGNED;
}
/* All pending requests for this page must be resubmitted. */
if (block->wqueue[COND_FOR_SAVED].last_thread)
wqueue_release_queue(&block->wqueue[COND_FOR_SAVED]);
return 0;
} | O0 | c | free_block:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb %al, -0x19(%rbp)
movq -0x18(%rbp), %rax
movzwl 0x74(%rax), %eax
movl %eax, -0x20(%rbp)
jmp 0x400d2
jmp 0x400d4
jmp 0x400d6
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x40184
movq -0x18(%rbp), %rax
movzwl 0x74(%rax), %ecx
orl $0x8, %ecx
movw %cx, 0x74(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x403d0
movsbl -0x19(%rbp), %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x40173
movq -0x18(%rbp), %rax
cmpl $0x0, 0x64(%rax)
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x40173
movq -0x18(%rbp), %rax
movzwl 0x74(%rax), %ecx
andl $-0x9, %ecx
movw %cx, 0x74(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
xorl %edx, %edx
callq 0x3caa0
movq -0x18(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x4016a
movq -0x18(%rbp), %rdi
addq $0x48, %rdi
addq $0x8, %rdi
callq 0xff620
movb $0x1, -0x1(%rbp)
jmp 0x40289
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0x3ff00
movq -0x18(%rbp), %rdi
callq 0x40500
jmp 0x4018f
jmp 0x40191
jmp 0x40193
jmp 0x40195
jmp 0x40197
jmp 0x40199
jmp 0x4019b
jmp 0x4019d
jmp 0x4019f
jmp 0x401a1
jmp 0x401a3
jmp 0x401a5
jmp 0x401a7
movq -0x18(%rbp), %rax
movw $0x0, 0x74(%rax)
movq -0x18(%rbp), %rax
movabsq $0xffffffffffffff, %rcx # imm = 0xFFFFFFFFFFFFFF
movq %rcx, 0x88(%rax)
jmp 0x401c8
movq -0x18(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x18(%rbp), %rax
cmpl $0x1, 0x78(%rax)
jne 0x401ee
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x60(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x78(%rax)
jmp 0x401fb
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
xorl %edx, %edx
callq 0x3caa0
movq -0x18(%rbp), %rax
cmpl $0x0, 0x60(%rax)
jne 0x40258
jmp 0x40216
jmp 0x40218
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x40540
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x50(%rax)
jmp 0x40269
movl -0x20(%rbp), %eax
andl $0x8, %eax
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, 0x74(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x40285
movq -0x18(%rbp), %rdi
addq $0x48, %rdi
addq $0x8, %rdi
callq 0xff620
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| free_block:
push rbp
mov rbp, rsp
sub rsp, 20h
mov al, dl
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_19], al
mov rax, [rbp+var_18]
movzx eax, word ptr [rax+74h]
mov [rbp+var_20], eax
jmp short $+2
loc_400D2:
jmp short $+2
loc_400D4:
jmp short $+2
loc_400D6:
mov rax, [rbp+var_18]
cmp qword ptr [rax+20h], 0
jz loc_40184
mov rax, [rbp+var_18]
movzx ecx, word ptr [rax+74h]
or ecx, 8
mov [rax+74h], cx
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call wait_for_readers
movsx eax, [rbp+var_19]
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_40173
mov rax, [rbp+var_18]
cmp dword ptr [rax+64h], 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_40173
mov rax, [rbp+var_18]
movzx ecx, word ptr [rax+74h]
and ecx, 0FFFFFFF7h
mov [rax+74h], cx
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
xor edx, edx
call unreg_request
mov rax, [rbp+var_18]
cmp qword ptr [rax+50h], 0
jz short loc_4016A
mov rdi, [rbp+var_18]
add rdi, 48h ; 'H'
add rdi, 8
call wqueue_release_queue
loc_4016A:
mov [rbp+var_1], 1
jmp loc_40289
loc_40173:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_18]
mov rsi, [rax+20h]
call unlink_hash
loc_40184:
mov rdi, [rbp+var_18]
call unlink_changed
jmp short $+2
loc_4018F:
jmp short $+2
loc_40191:
jmp short $+2
loc_40193:
jmp short $+2
loc_40195:
jmp short $+2
loc_40197:
jmp short $+2
loc_40199:
jmp short $+2
loc_4019B:
jmp short $+2
loc_4019D:
jmp short $+2
loc_4019F:
jmp short $+2
loc_401A1:
jmp short $+2
loc_401A3:
jmp short $+2
loc_401A5:
jmp short $+2
loc_401A7:
mov rax, [rbp+var_18]
mov word ptr [rax+74h], 0
mov rax, [rbp+var_18]
mov rcx, 0FFFFFFFFFFFFFFh
mov [rax+88h], rcx
jmp short $+2
loc_401C8:
mov rax, [rbp+var_18]
mov qword ptr [rax+20h], 0
mov rax, [rbp+var_18]
cmp dword ptr [rax+78h], 1
jnz short loc_401EE
mov rax, [rbp+var_10]
mov rcx, [rax+60h]
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rax+60h], rcx
loc_401EE:
mov rax, [rbp+var_18]
mov dword ptr [rax+78h], 0
jmp short $+2
loc_401FB:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
xor edx, edx
call unreg_request
mov rax, [rbp+var_18]
cmp dword ptr [rax+60h], 0
jnz short loc_40258
jmp short $+2
loc_40216:
jmp short $+2
loc_40218:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call unlink_block
mov rax, [rbp+var_10]
mov rcx, [rax+0A0h]
mov rax, [rbp+var_18]
mov [rax], rcx
mov rcx, [rbp+var_18]
mov rax, [rbp+var_10]
mov [rax+0A0h], rcx
mov rax, [rbp+var_10]
mov rcx, [rax+50h]
add rcx, 1
mov [rax+50h], rcx
jmp short loc_40269
loc_40258:
mov eax, [rbp+var_20]
and eax, 8
mov cx, ax
mov rax, [rbp+var_18]
mov [rax+74h], cx
loc_40269:
mov rax, [rbp+var_18]
cmp qword ptr [rax+50h], 0
jz short loc_40285
mov rdi, [rbp+var_18]
add rdi, 48h ; 'H'
add rdi, 8
call wqueue_release_queue
loc_40285:
mov [rbp+var_1], 0
loc_40289:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
| char free_block(_QWORD *a1, long long a2, char a3)
{
__int16 v4; // [rsp+0h] [rbp-20h]
v4 = *(_WORD *)(a2 + 116);
if ( *(_QWORD *)(a2 + 32) )
{
*(_WORD *)(a2 + 116) |= 8u;
wait_for_readers(a1, a2);
if ( a3 && *(_DWORD *)(a2 + 100) )
{
*(_WORD *)(a2 + 116) &= ~8u;
unreg_request(a1, a2, 0);
if ( *(_QWORD *)(a2 + 80) )
wqueue_release_queue(a2 + 80);
return 1;
}
unlink_hash(a1, *(long long **)(a2 + 32));
}
unlink_changed(a2);
*(_WORD *)(a2 + 116) = 0;
*(_QWORD *)(a2 + 136) = 0xFFFFFFFFFFFFFFLL;
*(_QWORD *)(a2 + 32) = 0LL;
if ( *(_DWORD *)(a2 + 120) == 1 )
--a1[12];
*(_DWORD *)(a2 + 120) = 0;
unreg_request(a1, a2, 0);
if ( *(_DWORD *)(a2 + 96) )
{
*(_WORD *)(a2 + 116) = v4 & 8;
}
else
{
unlink_block(a1, a2);
*(_QWORD *)a2 = a1[20];
a1[20] = a2;
++a1[10];
}
if ( *(_QWORD *)(a2 + 80) )
wqueue_release_queue(a2 + 80);
return 0;
}
| free_block:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV AL,DL
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV byte ptr [RBP + -0x19],AL
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RAX + 0x74]
MOV dword ptr [RBP + -0x20],EAX
JMP 0x001400d2
LAB_001400d2:
JMP 0x001400d4
LAB_001400d4:
JMP 0x001400d6
LAB_001400d6:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x20],0x0
JZ 0x00140184
MOV RAX,qword ptr [RBP + -0x18]
MOVZX ECX,word ptr [RAX + 0x74]
OR ECX,0x8
MOV word ptr [RAX + 0x74],CX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001403d0
MOVSX EAX,byte ptr [RBP + -0x19]
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00140173
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x64],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00140173
MOV RAX,qword ptr [RBP + -0x18]
MOVZX ECX,word ptr [RAX + 0x74]
AND ECX,0xfffffff7
MOV word ptr [RAX + 0x74],CX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
XOR EDX,EDX
CALL 0x0013caa0
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x50],0x0
JZ 0x0014016a
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x48
ADD RDI,0x8
CALL 0x001ff620
LAB_0014016a:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00140289
LAB_00140173:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x20]
CALL 0x0013ff00
LAB_00140184:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00140500
JMP 0x0014018f
LAB_0014018f:
JMP 0x00140191
LAB_00140191:
JMP 0x00140193
LAB_00140193:
JMP 0x00140195
LAB_00140195:
JMP 0x00140197
LAB_00140197:
JMP 0x00140199
LAB_00140199:
JMP 0x0014019b
LAB_0014019b:
JMP 0x0014019d
LAB_0014019d:
JMP 0x0014019f
LAB_0014019f:
JMP 0x001401a1
LAB_001401a1:
JMP 0x001401a3
LAB_001401a3:
JMP 0x001401a5
LAB_001401a5:
JMP 0x001401a7
LAB_001401a7:
MOV RAX,qword ptr [RBP + -0x18]
MOV word ptr [RAX + 0x74],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,0xffffffffffffff
MOV qword ptr [RAX + 0x88],RCX
JMP 0x001401c8
LAB_001401c8:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x20],0x0
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x78],0x1
JNZ 0x001401ee
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x60]
ADD RCX,-0x1
MOV qword ptr [RAX + 0x60],RCX
LAB_001401ee:
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x78],0x0
JMP 0x001401fb
LAB_001401fb:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
XOR EDX,EDX
CALL 0x0013caa0
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x60],0x0
JNZ 0x00140258
JMP 0x00140216
LAB_00140216:
JMP 0x00140218
LAB_00140218:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00140540
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0xa0]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xa0],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x50]
ADD RCX,0x1
MOV qword ptr [RAX + 0x50],RCX
JMP 0x00140269
LAB_00140258:
MOV EAX,dword ptr [RBP + -0x20]
AND EAX,0x8
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x18]
MOV word ptr [RAX + 0x74],CX
LAB_00140269:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x50],0x0
JZ 0x00140285
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x48
ADD RDI,0x8
CALL 0x001ff620
LAB_00140285:
MOV byte ptr [RBP + -0x1],0x0
LAB_00140289:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 free_block(long param_1,int8 *param_2,char param_3)
{
ushort uVar1;
uVar1 = *(ushort *)((long)param_2 + 0x74);
if (param_2[4] != 0) {
*(ushort *)((long)param_2 + 0x74) = *(ushort *)((long)param_2 + 0x74) | 8;
wait_for_readers(param_1,param_2);
if ((param_3 != '\0') && (*(int *)((long)param_2 + 100) != 0)) {
*(ushort *)((long)param_2 + 0x74) = *(ushort *)((long)param_2 + 0x74) & 0xfff7;
unreg_request(param_1,param_2,0);
if (param_2[10] != 0) {
wqueue_release_queue(param_2 + 10);
}
return 1;
}
unlink_hash(param_1,param_2[4]);
}
unlink_changed(param_2);
*(int2 *)((long)param_2 + 0x74) = 0;
param_2[0x11] = 0xffffffffffffff;
param_2[4] = 0;
if (*(int *)(param_2 + 0xf) == 1) {
*(long *)(param_1 + 0x60) = *(long *)(param_1 + 0x60) + -1;
}
*(int4 *)(param_2 + 0xf) = 0;
unreg_request(param_1,param_2,0);
if (*(int *)(param_2 + 0xc) == 0) {
unlink_block(param_1,param_2);
*param_2 = *(int8 *)(param_1 + 0xa0);
*(int8 **)(param_1 + 0xa0) = param_2;
*(long *)(param_1 + 0x50) = *(long *)(param_1 + 0x50) + 1;
}
else {
*(ushort *)((long)param_2 + 0x74) = uVar1 & 8;
}
if (param_2[10] != 0) {
wqueue_release_queue(param_2 + 10);
}
return 0;
}
| |
43,803 | free_block | eloqsql/storage/maria/ma_pagecache.c | static my_bool free_block(PAGECACHE *pagecache, PAGECACHE_BLOCK_LINK *block,
my_bool abort_if_pinned)
{
uint status= block->status;
KEYCACHE_THREAD_TRACE("free block");
KEYCACHE_DBUG_PRINT("free_block",
("block: %u hash_link %p",
PCBLOCK_NUMBER(pagecache, block),
block->hash_link));
mysql_mutex_assert_owner(&pagecache->cache_lock);
if (block->hash_link)
{
/*
While waiting for readers to finish, new readers might request the
block. But since we set block->status|= PCBLOCK_REASSIGNED, they
will wait on block->wqueue[COND_FOR_SAVED]. They must be signaled
later.
*/
block->status|= PCBLOCK_REASSIGNED;
wait_for_readers(pagecache, block);
if (unlikely(abort_if_pinned) && unlikely(block->pins))
{
/*
Block got pinned while waiting for readers.
This can only happens when called from flush_pagecache_blocks_int()
when flushing blocks as part of prepare for maria_close() or from
flush_cached_blocks()
*/
block->status&= ~PCBLOCK_REASSIGNED;
unreg_request(pagecache, block, 0);
/* All pending requests for this page must be resubmitted. */
if (block->wqueue[COND_FOR_SAVED].last_thread)
wqueue_release_queue(&block->wqueue[COND_FOR_SAVED]);
return 1;
}
unlink_hash(pagecache, block->hash_link);
}
unlink_changed(block);
DBUG_ASSERT(block->wlocks == 0);
DBUG_ASSERT(block->rlocks == 0);
DBUG_ASSERT(block->rlocks_queue == 0);
DBUG_ASSERT(block->pins == 0);
DBUG_ASSERT((block->status & ~(PCBLOCK_ERROR | PCBLOCK_READ | PCBLOCK_IN_FLUSH | PCBLOCK_CHANGED | PCBLOCK_REASSIGNED | PCBLOCK_DEL_WRITE)) == 0);
DBUG_ASSERT(block->requests >= 1);
DBUG_ASSERT(block->next_used == NULL);
block->status= 0;
#ifdef DBUG_ASSERT_EXISTS
block->type= PAGECACHE_EMPTY_PAGE;
#endif
block->rec_lsn= LSN_MAX;
DBUG_PRINT("hash", ("block (Free): %p, hash_link: %p -> NULL",
block, block->hash_link));
block->hash_link= NULL;
if (block->temperature == PCBLOCK_WARM)
pagecache->warm_blocks--;
block->temperature= PCBLOCK_COLD;
KEYCACHE_THREAD_TRACE("free block");
KEYCACHE_DBUG_PRINT("free_block",
("block is freed"));
unreg_request(pagecache, block, 0);
/*
Block->requests is != 0 if unreg_requests()/link_block() gave the block
to a waiting thread
*/
if (!block->requests)
{
DBUG_ASSERT(block->next_used != 0);
/* Remove the free block from the LRU ring. */
unlink_block(pagecache, block);
/* Insert the free block in the free list. */
block->next_used= pagecache->free_block_list;
pagecache->free_block_list= block;
/* Keep track of the number of currently unused blocks. */
pagecache->blocks_unused++;
}
else
{
/* keep flag set by link_block() */
block->status= status & PCBLOCK_REASSIGNED;
}
/* All pending requests for this page must be resubmitted. */
if (block->wqueue[COND_FOR_SAVED].last_thread)
wqueue_release_queue(&block->wqueue[COND_FOR_SAVED]);
return 0;
} | O3 | c | free_block:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movzwl 0x74(%rsi), %r12d
cmpq $0x0, 0x20(%rsi)
je 0x3d79c
movl %edx, %r15d
movl %r12d, %eax
orl $0x8, %eax
movw %ax, 0x74(%rbx)
callq 0xa1ac2
movq 0x20(%rbx), %rcx
cmpl $0x0, 0x68(%rcx)
je 0x3d787
movq %rax, %rcx
addq $0x8, %rax
movq %rax, 0x28(%rbx)
leaq 0xc8(%r14), %rsi
cmpq $0x0, 0x38(%rcx)
jne 0x3d868
movq %rax, %rdi
callq 0x29420
movq $0x0, 0x28(%rbx)
testb %r15b, %r15b
jne 0x3d848
movq 0x20(%rbx), %rsi
movq %r14, %rdi
callq 0x3d5f5
movq 0x10(%rbx), %rcx
movq 0x18(%rbx), %rax
testq %rcx, %rcx
je 0x3d7b3
movq %rax, 0x18(%rcx)
movq 0x10(%rbx), %rcx
jmp 0x3d7b5
xorl %ecx, %ecx
movq %rcx, (%rax)
movw $0x0, 0x74(%rbx)
movabsq $0xffffffffffffff, %rax # imm = 0xFFFFFFFFFFFFFF
movq %rax, 0x88(%rbx)
movq $0x0, 0x20(%rbx)
cmpl $0x1, 0x78(%rbx)
jne 0x3d7e1
decq 0x60(%r14)
movl $0x0, 0x78(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3ab6f
cmpl $0x0, 0x60(%rbx)
je 0x3d806
andl $0x8, %r12d
movw %r12w, 0x74(%rbx)
jmp 0x3d826
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3d9e1
movq 0xa0(%r14), %rax
movq %rax, (%rbx)
movq %rbx, 0xa0(%r14)
incq 0x50(%r14)
xorl %r14d, %r14d
cmpq $0x0, 0x50(%rbx)
je 0x3d83c
addq $0x50, %rbx
movq %rbx, %rdi
callq 0xa6683
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x64(%rbx)
je 0x3d790
andb $-0x9, 0x74(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3ab6f
movb $0x1, %r14b
jmp 0x3d829
leaq 0x9ca9b(%rip), %rdx # 0xda30a
movq %rax, %rdi
movl $0x64d, %ecx # imm = 0x64D
callq 0x2ee80
jmp 0x3d77f
| free_block:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rsi
mov r14, rdi
movzx r12d, word ptr [rsi+74h]
cmp qword ptr [rsi+20h], 0
jz short loc_3D79C
mov r15d, edx
mov eax, r12d
or eax, 8
mov [rbx+74h], ax
call _my_thread_var
mov rcx, [rbx+20h]
cmp dword ptr [rcx+68h], 0
jz short loc_3D787
mov rcx, rax
add rax, 8
mov [rbx+28h], rax
lea rsi, [r14+0C8h]
cmp qword ptr [rcx+38h], 0
jnz loc_3D868
mov rdi, rax
call _pthread_cond_wait
loc_3D77F:
mov qword ptr [rbx+28h], 0
loc_3D787:
test r15b, r15b
jnz loc_3D848
loc_3D790:
mov rsi, [rbx+20h]
mov rdi, r14
call unlink_hash
loc_3D79C:
mov rcx, [rbx+10h]
mov rax, [rbx+18h]
test rcx, rcx
jz short loc_3D7B3
mov [rcx+18h], rax
mov rcx, [rbx+10h]
jmp short loc_3D7B5
loc_3D7B3:
xor ecx, ecx
loc_3D7B5:
mov [rax], rcx
mov word ptr [rbx+74h], 0
mov rax, 0FFFFFFFFFFFFFFh
mov [rbx+88h], rax
mov qword ptr [rbx+20h], 0
cmp dword ptr [rbx+78h], 1
jnz short loc_3D7E1
dec qword ptr [r14+60h]
loc_3D7E1:
mov dword ptr [rbx+78h], 0
mov rdi, r14
mov rsi, rbx
xor edx, edx
call unreg_request
cmp dword ptr [rbx+60h], 0
jz short loc_3D806
and r12d, 8
mov [rbx+74h], r12w
jmp short loc_3D826
loc_3D806:
mov rdi, r14
mov rsi, rbx
call unlink_block
mov rax, [r14+0A0h]
mov [rbx], rax
mov [r14+0A0h], rbx
inc qword ptr [r14+50h]
loc_3D826:
xor r14d, r14d
loc_3D829:
cmp qword ptr [rbx+50h], 0
jz short loc_3D83C
add rbx, 50h ; 'P'
mov rdi, rbx
call wqueue_release_queue
loc_3D83C:
mov eax, r14d
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_3D848:
cmp dword ptr [rbx+64h], 0
jz loc_3D790
and byte ptr [rbx+74h], 0F7h
mov rdi, r14
mov rsi, rbx
xor edx, edx
call unreg_request
mov r14b, 1
jmp short loc_3D829
loc_3D868:
lea rdx, aWorkspaceLlm4b_25; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rax
mov ecx, 64Dh
call psi_cond_wait
jmp loc_3D77F
| long long free_block(_QWORD *a1, long long a2, char a3)
{
unsigned int v4; // r14d
__int16 v5; // r12
long long v7; // rax
long long v8; // rcx
long long v9; // rax
long long v10; // rsi
long long v11; // rcx
_QWORD *v12; // rax
long long v13; // rcx
v4 = (unsigned int)a1;
v5 = *(_WORD *)(a2 + 116);
if ( *(_QWORD *)(a2 + 32) )
{
*(_WORD *)(a2 + 116) = v5 | 8;
v7 = my_thread_var(a1);
if ( *(_DWORD *)(*(_QWORD *)(a2 + 32) + 104LL) )
{
v8 = v7;
v9 = v7 + 8;
*(_QWORD *)(a2 + 40) = v9;
v10 = (long long)(a1 + 25);
if ( *(_QWORD *)(v8 + 56) )
psi_cond_wait(v9, v10, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0x64Du);
else
pthread_cond_wait(v9, v10);
*(_QWORD *)(a2 + 40) = 0LL;
}
if ( a3 && *(_DWORD *)(a2 + 100) )
{
*(_BYTE *)(a2 + 116) &= ~8u;
unreg_request(a1, a2, 0);
LOBYTE(v4) = 1;
goto LABEL_17;
}
unlink_hash(a1, *(long long **)(a2 + 32));
}
v11 = *(_QWORD *)(a2 + 16);
v12 = *(_QWORD **)(a2 + 24);
if ( v11 )
{
*(_QWORD *)(v11 + 24) = v12;
v13 = *(_QWORD *)(a2 + 16);
}
else
{
v13 = 0LL;
}
*v12 = v13;
*(_WORD *)(a2 + 116) = 0;
*(_QWORD *)(a2 + 136) = 0xFFFFFFFFFFFFFFLL;
*(_QWORD *)(a2 + 32) = 0LL;
if ( *(_DWORD *)(a2 + 120) == 1 )
--a1[12];
*(_DWORD *)(a2 + 120) = 0;
unreg_request(a1, a2, 0);
if ( *(_DWORD *)(a2 + 96) )
{
*(_WORD *)(a2 + 116) = v5 & 8;
}
else
{
unlink_block(a1, a2);
*(_QWORD *)a2 = a1[20];
a1[20] = a2;
++a1[10];
}
v4 = 0;
LABEL_17:
if ( *(_QWORD *)(a2 + 80) )
wqueue_release_queue(a2 + 80);
return v4;
}
| free_block:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
MOVZX R12D,word ptr [RSI + 0x74]
CMP qword ptr [RSI + 0x20],0x0
JZ 0x0013d79c
MOV R15D,EDX
MOV EAX,R12D
OR EAX,0x8
MOV word ptr [RBX + 0x74],AX
CALL 0x001a1ac2
MOV RCX,qword ptr [RBX + 0x20]
CMP dword ptr [RCX + 0x68],0x0
JZ 0x0013d787
MOV RCX,RAX
ADD RAX,0x8
MOV qword ptr [RBX + 0x28],RAX
LEA RSI,[R14 + 0xc8]
CMP qword ptr [RCX + 0x38],0x0
JNZ 0x0013d868
MOV RDI,RAX
CALL 0x00129420
LAB_0013d77f:
MOV qword ptr [RBX + 0x28],0x0
LAB_0013d787:
TEST R15B,R15B
JNZ 0x0013d848
LAB_0013d790:
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,R14
CALL 0x0013d5f5
LAB_0013d79c:
MOV RCX,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RBX + 0x18]
TEST RCX,RCX
JZ 0x0013d7b3
MOV qword ptr [RCX + 0x18],RAX
MOV RCX,qword ptr [RBX + 0x10]
JMP 0x0013d7b5
LAB_0013d7b3:
XOR ECX,ECX
LAB_0013d7b5:
MOV qword ptr [RAX],RCX
MOV word ptr [RBX + 0x74],0x0
MOV RAX,0xffffffffffffff
MOV qword ptr [RBX + 0x88],RAX
MOV qword ptr [RBX + 0x20],0x0
CMP dword ptr [RBX + 0x78],0x1
JNZ 0x0013d7e1
DEC qword ptr [R14 + 0x60]
LAB_0013d7e1:
MOV dword ptr [RBX + 0x78],0x0
MOV RDI,R14
MOV RSI,RBX
XOR EDX,EDX
CALL 0x0013ab6f
CMP dword ptr [RBX + 0x60],0x0
JZ 0x0013d806
AND R12D,0x8
MOV word ptr [RBX + 0x74],R12W
JMP 0x0013d826
LAB_0013d806:
MOV RDI,R14
MOV RSI,RBX
CALL 0x0013d9e1
MOV RAX,qword ptr [R14 + 0xa0]
MOV qword ptr [RBX],RAX
MOV qword ptr [R14 + 0xa0],RBX
INC qword ptr [R14 + 0x50]
LAB_0013d826:
XOR R14D,R14D
LAB_0013d829:
CMP qword ptr [RBX + 0x50],0x0
JZ 0x0013d83c
ADD RBX,0x50
MOV RDI,RBX
CALL 0x001a6683
LAB_0013d83c:
MOV EAX,R14D
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0013d848:
CMP dword ptr [RBX + 0x64],0x0
JZ 0x0013d790
AND byte ptr [RBX + 0x74],0xf7
MOV RDI,R14
MOV RSI,RBX
XOR EDX,EDX
CALL 0x0013ab6f
MOV R14B,0x1
JMP 0x0013d829
LAB_0013d868:
LEA RDX,[0x1da30a]
MOV RDI,RAX
MOV ECX,0x64d
CALL 0x0012ee80
JMP 0x0013d77f
|
ulong free_block(long param_1,int8 *param_2,char param_3)
{
ushort uVar1;
int8 *puVar2;
long lVar3;
pthread_cond_t *__cond;
int8 uVar4;
ulong uVar5;
uVar1 = *(ushort *)((long)param_2 + 0x74);
if (param_2[4] != 0) {
*(ushort *)((long)param_2 + 0x74) = uVar1 | 8;
lVar3 = _my_thread_var();
if (*(int *)(param_2[4] + 0x68) != 0) {
__cond = (pthread_cond_t *)(lVar3 + 8);
param_2[5] = __cond;
if (*(long *)(lVar3 + 0x38) == 0) {
pthread_cond_wait(__cond,(pthread_mutex_t *)(param_1 + 200));
}
else {
psi_cond_wait(__cond,(pthread_mutex_t *)(param_1 + 200),
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",0x64d)
;
}
param_2[5] = 0;
}
if ((param_3 != '\0') && (*(int *)((long)param_2 + 100) != 0)) {
*(byte *)((long)param_2 + 0x74) = *(byte *)((long)param_2 + 0x74) & 0xf7;
unreg_request(param_1,param_2,0);
uVar5 = CONCAT71((int7)((ulong)param_1 >> 8),1);
goto LAB_0013d829;
}
unlink_hash(param_1,param_2[4]);
}
puVar2 = (int8 *)param_2[3];
if (param_2[2] == 0) {
uVar4 = 0;
}
else {
*(int8 **)(param_2[2] + 0x18) = puVar2;
uVar4 = param_2[2];
}
*puVar2 = uVar4;
*(int2 *)((long)param_2 + 0x74) = 0;
param_2[0x11] = 0xffffffffffffff;
param_2[4] = 0;
if (*(int *)(param_2 + 0xf) == 1) {
*(long *)(param_1 + 0x60) = *(long *)(param_1 + 0x60) + -1;
}
*(int4 *)(param_2 + 0xf) = 0;
unreg_request(param_1,param_2,0);
if (*(int *)(param_2 + 0xc) == 0) {
unlink_block(param_1,param_2);
*param_2 = *(int8 *)(param_1 + 0xa0);
*(int8 **)(param_1 + 0xa0) = param_2;
*(long *)(param_1 + 0x50) = *(long *)(param_1 + 0x50) + 1;
}
else {
*(ushort *)((long)param_2 + 0x74) = uVar1 & 8;
}
uVar5 = 0;
LAB_0013d829:
if (param_2[10] != 0) {
wqueue_release_queue(param_2 + 10);
}
return uVar5 & 0xffffffff;
}
| |
43,804 | thr_abort_locks_for_thread | eloqsql/mysys/thr_lock.c | my_bool thr_abort_locks_for_thread(THR_LOCK *lock, my_thread_id thread_id)
{
THR_LOCK_DATA *data;
my_bool found= FALSE;
DBUG_ENTER("thr_abort_locks_for_thread");
mysql_mutex_lock(&lock->mutex);
for (data= lock->read_wait.data; data ; data= data->next)
{
if (data->owner->thread_id == thread_id) /* purecov: tested */
{
DBUG_PRINT("info",("Aborting read-wait lock"));
data->type= TL_UNLOCK; /* Mark killed */
/* It's safe to signal the cond first: we're still holding the mutex. */
found= TRUE;
mysql_cond_signal(data->cond);
data->cond= 0; /* Removed from list */
if (((*data->prev)= data->next))
data->next->prev= data->prev;
else
lock->read_wait.last= data->prev;
}
}
for (data= lock->write_wait.data; data ; data= data->next)
{
if (data->owner->thread_id == thread_id) /* purecov: tested */
{
DBUG_PRINT("info",("Aborting write-wait lock"));
data->type= TL_UNLOCK;
found= TRUE;
mysql_cond_signal(data->cond);
data->cond= 0;
if (((*data->prev)= data->next))
data->next->prev= data->prev;
else
lock->write_wait.last= data->prev;
}
}
wake_up_waiters(lock);
mysql_mutex_unlock(&lock->mutex);
DBUG_RETURN(found);
} | O0 | c | thr_abort_locks_for_thread:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x19(%rbp)
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
leaq 0x5b3e5(%rip), %rsi # 0x155be8
movl $0x545, %edx # imm = 0x545
callq 0xf92b0
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xfa8b5
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0xfa8a2
jmp 0xfa837
jmp 0xfa839
movq -0x18(%rbp), %rax
movl $0x0, 0x40(%rax)
movb $0x1, -0x19(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0xfa780
movq -0x18(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
je 0xfa890
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x10(%rax)
jmp 0xfa8a0
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x68(%rax)
jmp 0xfa8a2
jmp 0xfa8a4
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0xfa819
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xfa963
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0xfa950
jmp 0xfa8e2
jmp 0xfa8e4
movq -0x18(%rbp), %rax
movl $0x0, 0x40(%rax)
movb $0x1, -0x19(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0xfa780
movq -0x18(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
je 0xfa93b
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x10(%rax)
jmp 0xfa94e
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x88(%rax)
jmp 0xfa950
jmp 0xfa952
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0xfa8c4
movq -0x8(%rbp), %rdi
callq 0xf9670
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0xf9320
movb -0x19(%rbp), %al
movb %al, -0x1a(%rbp)
movb -0x1a(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| thr_abort_locks_for_thread:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_19], 0
mov rdi, [rbp+var_8]
add rdi, 18h
lea rsi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 545h
call inline_mysql_mutex_lock_27
mov rax, [rbp+var_8]
mov rax, [rax+60h]
mov [rbp+var_18], rax
loc_FA819:
cmp [rbp+var_18], 0
jz loc_FA8B5
mov rax, [rbp+var_18]
mov rax, [rax]
mov rax, [rax+8]
cmp rax, [rbp+var_10]
jnz short loc_FA8A2
jmp short $+2
loc_FA837:
jmp short $+2
loc_FA839:
mov rax, [rbp+var_18]
mov dword ptr [rax+40h], 0
mov [rbp+var_19], 1
mov rax, [rbp+var_18]
mov rdi, [rax+20h]
call inline_mysql_cond_signal_4
mov rax, [rbp+var_18]
mov qword ptr [rax+20h], 0
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov rcx, [rbp+var_18]
mov rcx, [rcx+10h]
mov [rcx], rax
cmp rax, 0
jz short loc_FA890
mov rax, [rbp+var_18]
mov rcx, [rax+10h]
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov [rax+10h], rcx
jmp short loc_FA8A0
loc_FA890:
mov rax, [rbp+var_18]
mov rcx, [rax+10h]
mov rax, [rbp+var_8]
mov [rax+68h], rcx
loc_FA8A0:
jmp short $+2
loc_FA8A2:
jmp short $+2
loc_FA8A4:
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov [rbp+var_18], rax
jmp loc_FA819
loc_FA8B5:
mov rax, [rbp+var_8]
mov rax, [rax+80h]
mov [rbp+var_18], rax
loc_FA8C4:
cmp [rbp+var_18], 0
jz loc_FA963
mov rax, [rbp+var_18]
mov rax, [rax]
mov rax, [rax+8]
cmp rax, [rbp+var_10]
jnz short loc_FA950
jmp short $+2
loc_FA8E2:
jmp short $+2
loc_FA8E4:
mov rax, [rbp+var_18]
mov dword ptr [rax+40h], 0
mov [rbp+var_19], 1
mov rax, [rbp+var_18]
mov rdi, [rax+20h]
call inline_mysql_cond_signal_4
mov rax, [rbp+var_18]
mov qword ptr [rax+20h], 0
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov rcx, [rbp+var_18]
mov rcx, [rcx+10h]
mov [rcx], rax
cmp rax, 0
jz short loc_FA93B
mov rax, [rbp+var_18]
mov rcx, [rax+10h]
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov [rax+10h], rcx
jmp short loc_FA94E
loc_FA93B:
mov rax, [rbp+var_18]
mov rcx, [rax+10h]
mov rax, [rbp+var_8]
mov [rax+88h], rcx
loc_FA94E:
jmp short $+2
loc_FA950:
jmp short $+2
loc_FA952:
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov [rbp+var_18], rax
jmp loc_FA8C4
loc_FA963:
mov rdi, [rbp+var_8]
call wake_up_waiters
mov rdi, [rbp+var_8]
add rdi, 18h
call inline_mysql_mutex_unlock_28
mov al, [rbp+var_19]
mov [rbp+var_1A], al
mov al, [rbp+var_1A]
add rsp, 20h
pop rbp
retn
| char thr_abort_locks_for_thread(_QWORD *a1, long long a2)
{
long long v2; // rax
long long v3; // rax
char v5; // [rsp+7h] [rbp-19h]
long long i; // [rsp+8h] [rbp-18h]
long long j; // [rsp+8h] [rbp-18h]
v5 = 0;
inline_mysql_mutex_lock_27(
(long long)(a1 + 3),
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",
0x545u);
for ( i = a1[12]; i; i = *(_QWORD *)(i + 8) )
{
if ( *(_QWORD *)(*(_QWORD *)i + 8LL) == a2 )
{
*(_DWORD *)(i + 64) = 0;
v5 = 1;
inline_mysql_cond_signal_4(*(_QWORD *)(i + 32));
*(_QWORD *)(i + 32) = 0LL;
v2 = *(_QWORD *)(i + 8);
**(_QWORD **)(i + 16) = v2;
if ( v2 )
*(_QWORD *)(*(_QWORD *)(i + 8) + 16LL) = *(_QWORD *)(i + 16);
else
a1[13] = *(_QWORD *)(i + 16);
}
}
for ( j = a1[16]; j; j = *(_QWORD *)(j + 8) )
{
if ( *(_QWORD *)(*(_QWORD *)j + 8LL) == a2 )
{
*(_DWORD *)(j + 64) = 0;
v5 = 1;
inline_mysql_cond_signal_4(*(_QWORD *)(j + 32));
*(_QWORD *)(j + 32) = 0LL;
v3 = *(_QWORD *)(j + 8);
**(_QWORD **)(j + 16) = v3;
if ( v3 )
*(_QWORD *)(*(_QWORD *)(j + 8) + 16LL) = *(_QWORD *)(j + 16);
else
a1[17] = *(_QWORD *)(j + 16);
}
}
wake_up_waiters((long long)a1);
inline_mysql_mutex_unlock_28((long long)(a1 + 3));
return v5;
}
| thr_abort_locks_for_thread:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV byte ptr [RBP + -0x19],0x0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x18
LEA RSI,[0x255be8]
MOV EDX,0x545
CALL 0x001f92b0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x60]
MOV qword ptr [RBP + -0x18],RAX
LAB_001fa819:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001fa8b5
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x8]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x001fa8a2
JMP 0x001fa837
LAB_001fa837:
JMP 0x001fa839
LAB_001fa839:
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x40],0x0
MOV byte ptr [RBP + -0x19],0x1
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x20]
CALL 0x001fa780
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x20],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX + 0x10]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JZ 0x001fa890
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x001fa8a0
LAB_001fa890:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x68],RCX
LAB_001fa8a0:
JMP 0x001fa8a2
LAB_001fa8a2:
JMP 0x001fa8a4
LAB_001fa8a4:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001fa819
LAB_001fa8b5:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x80]
MOV qword ptr [RBP + -0x18],RAX
LAB_001fa8c4:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001fa963
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x8]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x001fa950
JMP 0x001fa8e2
LAB_001fa8e2:
JMP 0x001fa8e4
LAB_001fa8e4:
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x40],0x0
MOV byte ptr [RBP + -0x19],0x1
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x20]
CALL 0x001fa780
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x20],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX + 0x10]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JZ 0x001fa93b
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x001fa94e
LAB_001fa93b:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x88],RCX
LAB_001fa94e:
JMP 0x001fa950
LAB_001fa950:
JMP 0x001fa952
LAB_001fa952:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001fa8c4
LAB_001fa963:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001f9670
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x18
CALL 0x001f9320
MOV AL,byte ptr [RBP + -0x19]
MOV byte ptr [RBP + -0x1a],AL
MOV AL,byte ptr [RBP + -0x1a]
ADD RSP,0x20
POP RBP
RET
|
int1 thr_abort_locks_for_thread(long param_1,long param_2)
{
long lVar1;
int1 local_21;
long *local_20;
local_21 = 0;
inline_mysql_mutex_lock
(param_1 + 0x18,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x545);
for (local_20 = *(long **)(param_1 + 0x60); local_20 != (long *)0x0;
local_20 = (long *)local_20[1]) {
if (*(long *)(*local_20 + 8) == param_2) {
*(int4 *)(local_20 + 8) = 0;
local_21 = 1;
inline_mysql_cond_signal(local_20[4]);
local_20[4] = 0;
lVar1 = local_20[1];
*(long *)local_20[2] = lVar1;
if (lVar1 == 0) {
*(long *)(param_1 + 0x68) = local_20[2];
}
else {
*(long *)(local_20[1] + 0x10) = local_20[2];
}
}
}
for (local_20 = *(long **)(param_1 + 0x80); local_20 != (long *)0x0;
local_20 = (long *)local_20[1]) {
if (*(long *)(*local_20 + 8) == param_2) {
*(int4 *)(local_20 + 8) = 0;
local_21 = 1;
inline_mysql_cond_signal(local_20[4]);
local_20[4] = 0;
lVar1 = local_20[1];
*(long *)local_20[2] = lVar1;
if (lVar1 == 0) {
*(long *)(param_1 + 0x88) = local_20[2];
}
else {
*(long *)(local_20[1] + 0x10) = local_20[2];
}
}
}
wake_up_waiters(param_1);
inline_mysql_mutex_unlock(param_1 + 0x18);
return local_21;
}
| |
43,805 | ggml_new_graph_custom | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c | struct ggml_cgraph * ggml_new_graph_custom(struct ggml_context * ctx, size_t size, bool grads) {
const size_t obj_size = ggml_graph_nbytes(size, grads);
struct ggml_object * obj = ggml_new_object(ctx, GGML_OBJECT_TYPE_GRAPH, obj_size);
struct ggml_cgraph * cgraph = (struct ggml_cgraph *) ((char *) ctx->mem_buffer + obj->offs);
// the size of the hash table is doubled since it needs to hold both nodes and leafs
size_t hash_size = ggml_hash_size(size * 2);
void * p = cgraph + 1;
struct ggml_tensor ** nodes_ptr = incr_ptr_aligned(&p, size * sizeof(struct ggml_tensor *), sizeof(struct ggml_tensor *));
struct ggml_tensor ** leafs_ptr = incr_ptr_aligned(&p, size * sizeof(struct ggml_tensor *), sizeof(struct ggml_tensor *));
struct ggml_tensor ** hash_keys_ptr = incr_ptr_aligned(&p, hash_size * sizeof(struct ggml_tensor *), sizeof(struct ggml_tensor *));
struct ggml_tensor ** grads_ptr = grads ? incr_ptr_aligned(&p, hash_size * sizeof(struct ggml_tensor *), sizeof(struct ggml_tensor *)) : NULL;
struct ggml_tensor ** grad_accs_ptr = grads ? incr_ptr_aligned(&p, hash_size * sizeof(struct ggml_tensor *), sizeof(struct ggml_tensor *)) : NULL;
ggml_bitset_t * hash_used = incr_ptr_aligned(&p, ggml_bitset_size(hash_size) * sizeof(ggml_bitset_t), sizeof(ggml_bitset_t));
// check that we allocated the correct amount of memory
assert(obj_size == (size_t)((char *)p - (char *)cgraph));
*cgraph = (struct ggml_cgraph) {
/*.size =*/ size,
/*.n_nodes =*/ 0,
/*.n_leafs =*/ 0,
/*.nodes =*/ nodes_ptr,
/*.grads =*/ grads_ptr,
/*.grad_accs =*/ grad_accs_ptr,
/*.leafs =*/ leafs_ptr,
/*.hash_table =*/ { hash_size, hash_used, hash_keys_ptr },
/*.order =*/ GGML_CGRAPH_EVAL_ORDER_LEFT_TO_RIGHT,
};
ggml_hash_set_reset(&cgraph->visited_hash_set);
if (grads) {
memset(cgraph->grads, 0, hash_size*sizeof(struct ggml_tensor *));
memset(cgraph->grad_accs, 0, hash_size*sizeof(struct ggml_tensor *));
}
return cgraph;
} | O3 | c | ggml_new_graph_custom:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
movl %edx, %esi
callq 0x22116
movq %rax, %r12
movq %rbx, %rdi
movl $0x1, %esi
movq %rax, %rdx
callq 0x1a932
movq 0x8(%rbx), %rbx
movq (%rax), %rax
leaq (%r15,%r15), %r14
movl $0x20, %esi
xorl %edx, %edx
leaq 0x2a13d(%rip), %rcx # 0x4c320
leaq (%rsi,%rdx), %rdi
shrq %rdi
cmpq %r14, (%rcx,%rdi,8)
jb 0x221f5
movq %rdi, %rsi
jmp 0x221fb
incq %rdi
movq %rdi, %rdx
cmpq %rsi, %rdx
jb 0x221e3
addq %rax, %rbx
cmpq $0x1f, %rdx
ja 0x2220f
movq (%rcx,%rdx,8), %r14
jmp 0x22213
orq $0x1, %r14
leaq 0x57(%rbx), %rcx
andq $-0x8, %rcx
leaq (%rcx,%r15,8), %rsi
leaq (%rsi,%r15,8), %rax
leaq (%rax,%r14,8), %r9
leaq (%r9,%r14,8), %r8
leaq (%r8,%r14,8), %rdi
testb %bpl, %bpl
cmoveq %r9, %rdi
leaq 0x1f(%r14), %rdx
shrq $0x5, %rdx
leaq (%rdi,%rdx,4), %r10
subq %rbx, %r10
cmpq %r10, %r12
jne 0x222be
shlq $0x2, %rdx
xorl %r10d, %r10d
testb %bpl, %bpl
cmoveq %r10, %r8
cmoveq %r10, %r9
movl %r15d, (%rbx)
movq %r10, 0x4(%rbx)
movq %rcx, 0x10(%rbx)
movq %r9, 0x18(%rbx)
movq %r8, 0x20(%rbx)
movq %rsi, 0x28(%rbx)
movq %r14, 0x30(%rbx)
movq %rdi, 0x38(%rbx)
movq %rax, 0x40(%rbx)
movl $0x0, 0x48(%rbx)
xorl %esi, %esi
callq 0x168f0
testb %bpl, %bpl
je 0x222b2
shlq $0x3, %r14
movq 0x18(%rbx), %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x168f0
movq 0x20(%rbx), %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x168f0
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2b3a4(%rip), %rdi # 0x4d669
leaq 0x2a347(%rip), %rsi # 0x4c613
leaq 0x2b3c7(%rip), %rcx # 0x4d69a
movl $0x1715, %edx # imm = 0x1715
callq 0x16b00
| ggml_new_graph_custom:
push rbp
push r15
push r14
push r12
push rbx
mov ebp, edx
mov r15, rsi
mov rbx, rdi
mov rdi, rsi
mov esi, edx
call ggml_graph_nbytes
mov r12, rax
mov rdi, rbx
mov esi, 1
mov rdx, rax
call ggml_new_object
mov rbx, [rbx+8]
mov rax, [rax]
lea r14, [r15+r15]
mov esi, 20h ; ' '
xor edx, edx
lea rcx, ggml_hash_size_primes
loc_221E3:
lea rdi, [rsi+rdx]
shr rdi, 1
cmp [rcx+rdi*8], r14
jb short loc_221F5
mov rsi, rdi
jmp short loc_221FB
loc_221F5:
inc rdi
mov rdx, rdi
loc_221FB:
cmp rdx, rsi
jb short loc_221E3
add rbx, rax
cmp rdx, 1Fh
ja short loc_2220F
mov r14, [rcx+rdx*8]
jmp short loc_22213
loc_2220F:
or r14, 1
loc_22213:
lea rcx, [rbx+57h]
and rcx, 0FFFFFFFFFFFFFFF8h
lea rsi, [rcx+r15*8]
lea rax, [rsi+r15*8]
lea r9, [rax+r14*8]
lea r8, [r9+r14*8]
lea rdi, [r8+r14*8]
test bpl, bpl
cmovz rdi, r9
lea rdx, [r14+1Fh]
shr rdx, 5
lea r10, [rdi+rdx*4]
sub r10, rbx
cmp r12, r10
jnz short loc_222BE
shl rdx, 2
xor r10d, r10d
test bpl, bpl
cmovz r8, r10
cmovz r9, r10
mov [rbx], r15d
mov [rbx+4], r10
mov [rbx+10h], rcx
mov [rbx+18h], r9
mov [rbx+20h], r8
mov [rbx+28h], rsi
mov [rbx+30h], r14
mov [rbx+38h], rdi
mov [rbx+40h], rax
mov dword ptr [rbx+48h], 0
xor esi, esi
call _memset
test bpl, bpl
jz short loc_222B2
shl r14, 3
mov rdi, [rbx+18h]
xor esi, esi
mov rdx, r14
call _memset
mov rdi, [rbx+20h]
xor esi, esi
mov rdx, r14
call _memset
loc_222B2:
mov rax, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_222BE:
lea rdi, aObjSizeSizeTCh; "obj_size == (size_t)((char *)p - (char "...
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aStructGgmlCgra; "struct ggml_cgraph *ggml_new_graph_cust"...
mov edx, 1715h
call ___assert_fail
| long long ggml_new_graph_custom(
long long *a1,
long long a2,
char a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
unsigned long long v13; // r12
__m128 v14; // xmm4
__m128 v15; // xmm5
long long *v16; // rax
long long v17; // rbx
long long v18; // rax
unsigned long long v19; // r14
unsigned long long v20; // rsi
unsigned long long v21; // rdx
unsigned long long v22; // rdi
long long v23; // rbx
long long v24; // r14
unsigned long long v25; // rcx
unsigned long long v26; // rsi
unsigned long long v27; // rax
unsigned long long v28; // r9
unsigned long long v29; // r8
unsigned long long v30; // rdi
unsigned long long v31; // rdx
long long v32; // rdx
long long v33; // r14
v13 = ggml_graph_nbytes(a2, a3);
v16 = (long long *)ggml_new_object(a1, 1, v13, a4, a5, a6, a7, v14, v15, a10, a11);
v17 = a1[1];
v18 = *v16;
v19 = 2 * a2;
v20 = 32LL;
v21 = 0LL;
do
{
v22 = (v20 + v21) >> 1;
if ( ggml_hash_size_primes[v22] < v19 )
v21 = v22 + 1;
else
v20 = (v20 + v21) >> 1;
}
while ( v21 < v20 );
v23 = v18 + v17;
if ( v21 > 0x1F )
v24 = v19 | 1;
else
v24 = ggml_hash_size_primes[v21];
v25 = (v23 + 87) & 0xFFFFFFFFFFFFFFF8LL;
v26 = v25 + 8 * a2;
v27 = v26 + 8 * a2;
v28 = v27 + 8 * v24;
v29 = v28 + 8 * v24;
v30 = v29 + 8 * v24;
if ( !a3 )
v30 = v27 + 8 * v24;
v31 = (unsigned long long)(v24 + 31) >> 5;
if ( v13 != v30 + 4 * v31 - v23 )
__assert_fail(
"obj_size == (size_t)((char *)p - (char *)cgraph)",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
5909LL,
"struct ggml_cgraph *ggml_new_graph_custom(struct ggml_context *, size_t, _Bool)");
v32 = 4 * v31;
if ( !a3 )
{
v29 = 0LL;
v28 = 0LL;
}
*(_DWORD *)v23 = a2;
*(_QWORD *)(v23 + 4) = 0LL;
*(_QWORD *)(v23 + 16) = v25;
*(_QWORD *)(v23 + 24) = v28;
*(_QWORD *)(v23 + 32) = v29;
*(_QWORD *)(v23 + 40) = v26;
*(_QWORD *)(v23 + 48) = v24;
*(_QWORD *)(v23 + 56) = v30;
*(_QWORD *)(v23 + 64) = v27;
*(_DWORD *)(v23 + 72) = 0;
memset(v30, 0LL, v32);
if ( a3 )
{
v33 = 8 * v24;
memset(*(_QWORD *)(v23 + 24), 0LL, v33);
memset(*(_QWORD *)(v23 + 32), 0LL, v33);
}
return v23;
}
| ggml_new_graph_custom:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV EBP,EDX
MOV R15,RSI
MOV RBX,RDI
MOV RDI,RSI
MOV ESI,EDX
CALL 0x00122116
MOV R12,RAX
MOV RDI,RBX
MOV ESI,0x1
MOV RDX,RAX
CALL 0x0011a932
MOV RBX,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [RAX]
LEA R14,[R15 + R15*0x1]
MOV ESI,0x20
XOR EDX,EDX
LEA RCX,[0x14c320]
LAB_001221e3:
LEA RDI,[RSI + RDX*0x1]
SHR RDI,0x1
CMP qword ptr [RCX + RDI*0x8],R14
JC 0x001221f5
MOV RSI,RDI
JMP 0x001221fb
LAB_001221f5:
INC RDI
MOV RDX,RDI
LAB_001221fb:
CMP RDX,RSI
JC 0x001221e3
ADD RBX,RAX
CMP RDX,0x1f
JA 0x0012220f
MOV R14,qword ptr [RCX + RDX*0x8]
JMP 0x00122213
LAB_0012220f:
OR R14,0x1
LAB_00122213:
LEA RCX,[RBX + 0x57]
AND RCX,-0x8
LEA RSI,[RCX + R15*0x8]
LEA RAX,[RSI + R15*0x8]
LEA R9,[RAX + R14*0x8]
LEA R8,[R9 + R14*0x8]
LEA RDI,[R8 + R14*0x8]
TEST BPL,BPL
CMOVZ RDI,R9
LEA RDX,[R14 + 0x1f]
SHR RDX,0x5
LEA R10,[RDI + RDX*0x4]
SUB R10,RBX
CMP R12,R10
JNZ 0x001222be
SHL RDX,0x2
XOR R10D,R10D
TEST BPL,BPL
CMOVZ R8,R10
CMOVZ R9,R10
MOV dword ptr [RBX],R15D
MOV qword ptr [RBX + 0x4],R10
MOV qword ptr [RBX + 0x10],RCX
MOV qword ptr [RBX + 0x18],R9
MOV qword ptr [RBX + 0x20],R8
MOV qword ptr [RBX + 0x28],RSI
MOV qword ptr [RBX + 0x30],R14
MOV qword ptr [RBX + 0x38],RDI
MOV qword ptr [RBX + 0x40],RAX
MOV dword ptr [RBX + 0x48],0x0
XOR ESI,ESI
CALL 0x001168f0
TEST BPL,BPL
JZ 0x001222b2
SHL R14,0x3
MOV RDI,qword ptr [RBX + 0x18]
XOR ESI,ESI
MOV RDX,R14
CALL 0x001168f0
MOV RDI,qword ptr [RBX + 0x20]
XOR ESI,ESI
MOV RDX,R14
CALL 0x001168f0
LAB_001222b2:
MOV RAX,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001222be:
LEA RDI,[0x14d669]
LEA RSI,[0x14c613]
LEA RCX,[0x14d69a]
MOV EDX,0x1715
CALL 0x00116b00
|
int4 * ggml_new_graph_custom(long param_1,long param_2,int4 param_3)
{
long lVar1;
long lVar2;
void *pvVar3;
char cVar4;
long lVar5;
long *plVar6;
ulong uVar7;
int4 *puVar8;
ulong uVar9;
void *__s;
void *pvVar10;
ulong uVar11;
cVar4 = (char)param_3;
lVar5 = ggml_graph_nbytes(param_2,param_3);
plVar6 = (long *)ggml_new_object(param_1,1,lVar5);
uVar7 = 0;
uVar11 = 0x20;
do {
uVar9 = uVar11 + uVar7 >> 1;
if ((ulong)(&ggml_hash_size_primes)[uVar9] < (ulong)(param_2 * 2)) {
uVar7 = uVar9 + 1;
uVar9 = uVar11;
}
uVar11 = uVar9;
} while (uVar7 < uVar9);
puVar8 = (int4 *)(*(long *)(param_1 + 8) + *plVar6);
if (uVar7 < 0x20) {
uVar11 = (&ggml_hash_size_primes)[uVar7];
}
else {
uVar11 = param_2 * 2 | 1;
}
uVar7 = (long)puVar8 + 0x57U & 0xfffffffffffffff8;
lVar1 = uVar7 + param_2 * 8;
lVar2 = lVar1 + param_2 * 8;
pvVar10 = (void *)(lVar2 + uVar11 * 8);
pvVar3 = (void *)((long)pvVar10 + uVar11 * 8);
__s = (void *)((long)pvVar3 + uVar11 * 8);
if (cVar4 == '\0') {
__s = pvVar10;
}
uVar9 = uVar11 + 0x1f >> 5;
if (lVar5 == (long)__s + (uVar9 * 4 - (long)puVar8)) {
if (cVar4 == '\0') {
pvVar10 = (void *)0x0;
pvVar3 = (void *)0x0;
}
*puVar8 = (int)param_2;
*(int8 *)(puVar8 + 1) = 0;
*(ulong *)(puVar8 + 4) = uVar7;
*(void **)(puVar8 + 6) = pvVar10;
*(void **)(puVar8 + 8) = pvVar3;
*(long *)(puVar8 + 10) = lVar1;
*(ulong *)(puVar8 + 0xc) = uVar11;
*(void **)(puVar8 + 0xe) = __s;
*(long *)(puVar8 + 0x10) = lVar2;
puVar8[0x12] = 0;
memset(__s,0,uVar9 << 2);
if (cVar4 != '\0') {
memset(*(void **)(puVar8 + 6),0,uVar11 << 3);
memset(*(void **)(puVar8 + 8),0,uVar11 << 3);
}
return puVar8;
}
/* WARNING: Subroutine does not return */
__assert_fail("obj_size == (size_t)((char *)p - (char *)cgraph)",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
0x1715,
"struct ggml_cgraph *ggml_new_graph_custom(struct ggml_context *, size_t, _Bool)");
}
| |
43,806 | mysql_stmt_store_result_cont | eloqsql/libmariadb/libmariadb/mariadb_async.c | int STDCALL
mysql_stmt_store_result_cont(int *ret, MYSQL_STMT *stmt, int ready_status)
{
MK_ASYNC_CONT_BODY(
stmt->mysql,
1,
r_int)
} | O3 | c | mysql_stmt_store_result_cont:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x38(%rsi), %rax
movq 0x480(%rax), %rcx
movq 0x28(%rcx), %r15
cmpb $0x0, 0x15(%r15)
je 0x30d69
movb $0x1, 0x14(%r15)
movl %edx, 0x4(%r15)
leaq 0x38(%r15), %rdi
callq 0x321cb
movb $0x0, 0x14(%r15)
testl %eax, %eax
jle 0x30dcf
movl (%r15), %r15d
jmp 0x30e48
movl $0x7de, 0x90(%rax) # imm = 0x7DE
movl $0x297, %edi # imm = 0x297
addq 0x38(%r14), %rdi
leaq 0x1f27d(%rip), %rax # 0x50000
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13230
movq 0x38(%r14), %rax
xorl %r15d, %r15d
movb %r15b, 0x29c(%rax)
movl $0x97, %edi
addq 0x38(%r14), %rdi
leaq 0x1f262(%rip), %rax # 0x50010
movq 0x70(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13230
movq 0x38(%r14), %rax
movb %r15b, 0x296(%rax)
movl $0x1, (%rbx)
jmp 0x30e48
movb $0x0, 0x15(%r15)
js 0x30ddc
movl 0x8(%r15), %eax
jmp 0x30e43
movq 0x38(%r14), %rax
movl $0x7d8, 0x90(%rax) # imm = 0x7D8
movl $0x297, %edi # imm = 0x297
addq 0x38(%r14), %rdi
leaq 0x1f206(%rip), %rax # 0x50000
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13230
movq 0x38(%r14), %rax
xorl %r15d, %r15d
movb %r15b, 0x29c(%rax)
movl $0x97, %edi
addq 0x38(%r14), %rdi
leaq 0x1f1eb(%rip), %rax # 0x50010
movq 0x40(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13230
movq 0x38(%r14), %rax
movb %r15b, 0x296(%rax)
movl $0x1, %eax
movl %eax, (%rbx)
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| mysql_stmt_store_result_cont:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov rax, [rsi+38h]
mov rcx, [rax+480h]
mov r15, [rcx+28h]
cmp byte ptr [r15+15h], 0
jz short loc_30D69
mov byte ptr [r15+14h], 1
mov [r15+4], edx
lea rdi, [r15+38h]
call my_context_continue
mov byte ptr [r15+14h], 0
test eax, eax
jle short loc_30DCF
mov r15d, [r15]
jmp loc_30E48
loc_30D69:
mov dword ptr [rax+90h], 7DEh
mov edi, 297h
add rdi, [r14+38h]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [r14+38h]
xor r15d, r15d
mov [rax+29Ch], r15b
mov edi, 97h
add rdi, [r14+38h]
lea rax, client_errors
mov rsi, [rax+70h]
mov edx, 1FFh
call _strncpy
mov rax, [r14+38h]
mov [rax+296h], r15b
mov dword ptr [rbx], 1
jmp short loc_30E48
loc_30DCF:
mov byte ptr [r15+15h], 0
js short loc_30DDC
mov eax, [r15+8]
jmp short loc_30E43
loc_30DDC:
mov rax, [r14+38h]
mov dword ptr [rax+90h], 7D8h
mov edi, 297h
add rdi, [r14+38h]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [r14+38h]
xor r15d, r15d
mov [rax+29Ch], r15b
mov edi, 97h
add rdi, [r14+38h]
lea rax, client_errors
mov rsi, [rax+40h]
mov edx, 1FFh
call _strncpy
mov rax, [r14+38h]
mov [rax+296h], r15b
mov eax, 1
loc_30E43:
mov [rbx], eax
xor r15d, r15d
loc_30E48:
mov eax, r15d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long mysql_stmt_store_result_cont(int *a1, long long a2, unsigned int a3)
{
long long v3; // rax
unsigned int *v4; // r15
int v5; // eax
unsigned int v6; // r15d
int v7; // eax
v3 = *(_QWORD *)(a2 + 56);
v4 = *(unsigned int **)(*(_QWORD *)(v3 + 1152) + 40LL);
if ( *((_BYTE *)v4 + 21) )
{
*((_BYTE *)v4 + 20) = 1;
v4[1] = a3;
v5 = my_context_continue(v4 + 14);
*((_BYTE *)v4 + 20) = 0;
if ( v5 <= 0 )
{
*((_BYTE *)v4 + 21) = 0;
if ( v5 < 0 )
{
*(_DWORD *)(*(_QWORD *)(a2 + 56) + 144LL) = 2008;
strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0;
strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[8], 511LL);
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0;
v7 = 1;
}
else
{
v7 = v4[2];
}
*a1 = v7;
return 0;
}
else
{
return *v4;
}
}
else
{
*(_DWORD *)(v3 + 144) = 2014;
strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL);
v6 = 0;
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0;
strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[14], 511LL);
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0;
*a1 = 1;
}
return v6;
}
| mysql_stmt_store_result_cont:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RSI + 0x38]
MOV RCX,qword ptr [RAX + 0x480]
MOV R15,qword ptr [RCX + 0x28]
CMP byte ptr [R15 + 0x15],0x0
JZ 0x00130d69
MOV byte ptr [R15 + 0x14],0x1
MOV dword ptr [R15 + 0x4],EDX
LEA RDI,[R15 + 0x38]
CALL 0x001321cb
MOV byte ptr [R15 + 0x14],0x0
TEST EAX,EAX
JLE 0x00130dcf
MOV R15D,dword ptr [R15]
JMP 0x00130e48
LAB_00130d69:
MOV dword ptr [RAX + 0x90],0x7de
MOV EDI,0x297
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x150000]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113230
MOV RAX,qword ptr [R14 + 0x38]
XOR R15D,R15D
MOV byte ptr [RAX + 0x29c],R15B
MOV EDI,0x97
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x150010]
MOV RSI,qword ptr [RAX + 0x70]
MOV EDX,0x1ff
CALL 0x00113230
MOV RAX,qword ptr [R14 + 0x38]
MOV byte ptr [RAX + 0x296],R15B
MOV dword ptr [RBX],0x1
JMP 0x00130e48
LAB_00130dcf:
MOV byte ptr [R15 + 0x15],0x0
JS 0x00130ddc
MOV EAX,dword ptr [R15 + 0x8]
JMP 0x00130e43
LAB_00130ddc:
MOV RAX,qword ptr [R14 + 0x38]
MOV dword ptr [RAX + 0x90],0x7d8
MOV EDI,0x297
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x150000]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113230
MOV RAX,qword ptr [R14 + 0x38]
XOR R15D,R15D
MOV byte ptr [RAX + 0x29c],R15B
MOV EDI,0x97
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x150010]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x1ff
CALL 0x00113230
MOV RAX,qword ptr [R14 + 0x38]
MOV byte ptr [RAX + 0x296],R15B
MOV EAX,0x1
LAB_00130e43:
MOV dword ptr [RBX],EAX
XOR R15D,R15D
LAB_00130e48:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 mysql_stmt_store_result_cont(int4 *param_1,long param_2,int4 param_3)
{
int4 *puVar1;
int iVar2;
int4 uVar3;
puVar1 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28);
if (*(char *)((long)puVar1 + 0x15) == '\0') {
*(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7de;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5);
uVar3 = 0;
*(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97),
PTR_s_Commands_out_of_sync__you_can_t_r_00150080,0x1ff);
*(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0;
*param_1 = 1;
}
else {
*(int1 *)(puVar1 + 5) = 1;
puVar1[1] = param_3;
iVar2 = my_context_continue(puVar1 + 0xe);
*(int1 *)(puVar1 + 5) = 0;
if (iVar2 < 1) {
*(int1 *)((long)puVar1 + 0x15) = 0;
if (iVar2 < 0) {
*(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7d8;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_00150050,
0x1ff);
*(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0;
uVar3 = 1;
}
else {
uVar3 = puVar1[2];
}
*param_1 = uVar3;
uVar3 = 0;
}
else {
uVar3 = *puVar1;
}
}
return uVar3;
}
| |
43,807 | find_var | bluesky950520[P]quickjs/quickjs.c | static int find_var(JSContext *ctx, JSFunctionDef *fd, JSAtom name)
{
JSVarDef *vd;
int i;
if (fd->vars_htab) {
i = find_var_htab(fd, name);
if (i == -1)
goto not_found;
vd = &fd->vars[i];
if (fd->vars[i].scope_level == 0)
return i;
}
for(i = fd->var_count; i-- > 0;) {
vd = &fd->vars[i];
if (vd->var_name == name)
if (vd->scope_level == 0)
return i;
}
not_found:
return find_arg(ctx, fd, name);
} | O2 | c | find_var:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movq 0x98(%rdi), %r15
testq %r15, %r15
je 0x5866a
movl %ebx, %edi
callq 0x556b5
movl %eax, %edi
movl 0xa4(%r14), %esi
pushq $0x5
popq %rcx
movl %esi, %eax
cltd
idivl %ecx
addl %esi, %eax
bsrl %eax, %ecx
notl %ecx
pushq $-0x1
popq %rdx
shrl %cl, %edx
pushq $0x1
popq %rcx
movl $0xffffffff, %r8d # imm = 0xFFFFFFFF
movl %edi, %eax
andl %edx, %eax
movl (%r15,%rax,4), %eax
cmpq %r8, %rax
je 0x586ab
movq 0x90(%r14), %r9
movq %rax, %r10
shlq $0x4, %r10
cmpl %ebx, (%r9,%r10)
je 0x58673
addl %ecx, %edi
incl %ecx
jmp 0x58643
movl 0xa4(%r14), %esi
jmp 0x58682
movslq %eax, %rcx
shlq $0x4, %rcx
cmpl $0x0, 0x4(%r9,%rcx)
je 0x586be
movl %esi, %eax
shlq $0x4, %rax
addq $-0xc, %rax
testl %esi, %esi
jle 0x586ab
movq 0x90(%r14), %rcx
cmpl %ebx, -0x4(%rcx,%rax)
jne 0x586a3
cmpl $0x0, (%rcx,%rax)
je 0x586ba
decl %esi
addq $-0x10, %rax
jmp 0x5868c
movq %r14, %rdi
movl %ebx, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x5a042
decl %esi
movl %esi, %eax
popq %rbx
popq %r14
popq %r15
retq
| find_var:
push r15
push r14
push rbx
mov ebx, esi
mov r14, rdi
mov r15, [rdi+98h]
test r15, r15
jz short loc_5866A
mov edi, ebx
call hash_atom
mov edi, eax
mov esi, [r14+0A4h]
push 5
pop rcx
mov eax, esi
cdq
idiv ecx
add eax, esi
bsr ecx, eax
not ecx
push 0FFFFFFFFFFFFFFFFh
pop rdx
shr edx, cl
push 1
pop rcx
mov r8d, 0FFFFFFFFh
loc_58643:
mov eax, edi
and eax, edx
mov eax, [r15+rax*4]
cmp rax, r8
jz short loc_586AB
mov r9, [r14+90h]
mov r10, rax
shl r10, 4
cmp [r9+r10], ebx
jz short loc_58673
add edi, ecx
inc ecx
jmp short loc_58643
loc_5866A:
mov esi, [r14+0A4h]
jmp short loc_58682
loc_58673:
movsxd rcx, eax
shl rcx, 4
cmp dword ptr [r9+rcx+4], 0
jz short loc_586BE
loc_58682:
mov eax, esi
shl rax, 4
add rax, 0FFFFFFFFFFFFFFF4h
loc_5868C:
test esi, esi
jle short loc_586AB
mov rcx, [r14+90h]
cmp [rcx+rax-4], ebx
jnz short loc_586A3
cmp dword ptr [rcx+rax], 0
jz short loc_586BA
loc_586A3:
dec esi
add rax, 0FFFFFFFFFFFFFFF0h
jmp short loc_5868C
loc_586AB:
mov rdi, r14
mov esi, ebx
pop rbx
pop r14
pop r15
jmp find_arg
loc_586BA:
dec esi
mov eax, esi
loc_586BE:
pop rbx
pop r14
pop r15
retn
| long long find_var(long long a1, unsigned int a2, long long a3, long long a4, long long a5)
{
long long v7; // r15
int v8; // edi
int v9; // esi
unsigned int v10; // ecx
long long result; // rax
long long v12; // r9
long long v13; // rax
v7 = *(_QWORD *)(a1 + 152);
if ( v7 )
{
v8 = hash_atom(a2);
v9 = *(_DWORD *)(a1 + 164);
_BitScanReverse(&v10, v9 + v9 / 5);
a3 = 0xFFFFFFFF >> ~(_BYTE)v10;
a4 = 1LL;
a5 = 0xFFFFFFFFLL;
while ( 1 )
{
result = *(unsigned int *)(v7 + 4LL * ((unsigned int)a3 & v8));
if ( result == 0xFFFFFFFFLL )
break;
v12 = *(_QWORD *)(a1 + 144);
if ( *(_DWORD *)(v12 + 16 * result) == a2 )
{
a4 = 16LL * (int)result;
if ( !*(_DWORD *)(v12 + a4 + 4) )
return result;
goto LABEL_8;
}
v8 += a4;
a4 = (unsigned int)(a4 + 1);
}
}
else
{
v9 = *(_DWORD *)(a1 + 164);
LABEL_8:
v13 = 16LL * (unsigned int)v9 - 12;
while ( v9 > 0 )
{
a4 = *(_QWORD *)(a1 + 144);
if ( *(_DWORD *)(a4 + v13 - 4) == a2 && !*(_DWORD *)(a4 + v13) )
return (unsigned int)(v9 - 1);
--v9;
v13 -= 16LL;
}
}
return find_arg(a1, a2, a3, a4, a5);
}
| find_var:
PUSH R15
PUSH R14
PUSH RBX
MOV EBX,ESI
MOV R14,RDI
MOV R15,qword ptr [RDI + 0x98]
TEST R15,R15
JZ 0x0015866a
MOV EDI,EBX
CALL 0x001556b5
MOV EDI,EAX
MOV ESI,dword ptr [R14 + 0xa4]
PUSH 0x5
POP RCX
MOV EAX,ESI
CDQ
IDIV ECX
ADD EAX,ESI
BSR ECX,EAX
NOT ECX
PUSH -0x1
POP RDX
SHR EDX,CL
PUSH 0x1
POP RCX
MOV R8D,0xffffffff
LAB_00158643:
MOV EAX,EDI
AND EAX,EDX
MOV EAX,dword ptr [R15 + RAX*0x4]
CMP RAX,R8
JZ 0x001586ab
MOV R9,qword ptr [R14 + 0x90]
MOV R10,RAX
SHL R10,0x4
CMP dword ptr [R9 + R10*0x1],EBX
JZ 0x00158673
ADD EDI,ECX
INC ECX
JMP 0x00158643
LAB_0015866a:
MOV ESI,dword ptr [R14 + 0xa4]
JMP 0x00158682
LAB_00158673:
MOVSXD RCX,EAX
SHL RCX,0x4
CMP dword ptr [R9 + RCX*0x1 + 0x4],0x0
JZ 0x001586be
LAB_00158682:
MOV EAX,ESI
SHL RAX,0x4
ADD RAX,-0xc
LAB_0015868c:
TEST ESI,ESI
JLE 0x001586ab
MOV RCX,qword ptr [R14 + 0x90]
CMP dword ptr [RCX + RAX*0x1 + -0x4],EBX
JNZ 0x001586a3
CMP dword ptr [RCX + RAX*0x1],0x0
JZ 0x001586ba
LAB_001586a3:
DEC ESI
ADD RAX,-0x10
JMP 0x0015868c
LAB_001586ab:
MOV RDI,R14
MOV ESI,EBX
POP RBX
POP R14
POP R15
JMP 0x0015a042
LAB_001586ba:
DEC ESI
MOV EAX,ESI
LAB_001586be:
POP RBX
POP R14
POP R15
RET
|
ulong find_var(long param_1,int param_2)
{
int iVar1;
uint uVar2;
uint uVar3;
long lVar4;
ulong uVar5;
int iVar6;
uint uVar7;
lVar4 = *(long *)(param_1 + 0x98);
if (lVar4 == 0) {
uVar7 = *(uint *)(param_1 + 0xa4);
LAB_00158682:
lVar4 = (ulong)uVar7 * 0x10 + -0xc;
for (; 0 < (int)uVar7; uVar7 = uVar7 - 1) {
if ((*(int *)(*(long *)(param_1 + 0x90) + -4 + lVar4) == param_2) &&
(*(int *)(*(long *)(param_1 + 0x90) + lVar4) == 0)) {
return (ulong)(uVar7 - 1);
}
lVar4 = lVar4 + -0x10;
}
}
else {
uVar2 = hash_atom(param_2);
uVar7 = *(uint *)(param_1 + 0xa4);
uVar3 = (int)uVar7 / 5 + uVar7;
iVar1 = 0x1f;
if (uVar3 != 0) {
for (; uVar3 >> iVar1 == 0; iVar1 = iVar1 + -1) {
}
}
iVar6 = 1;
while( true ) {
uVar3 = *(uint *)(lVar4 + (ulong)(uVar2 & 0xffffffffU >> (~(byte)iVar1 & 0x1f)) * 4);
uVar5 = (ulong)uVar3;
if (uVar5 == 0xffffffff) break;
if (*(int *)(*(long *)(param_1 + 0x90) + uVar5 * 0x10) == param_2) {
if (*(int *)(*(long *)(param_1 + 0x90) + 4 + (long)(int)uVar3 * 0x10) == 0) {
return uVar5;
}
goto LAB_00158682;
}
uVar2 = uVar2 + iVar6;
iVar6 = iVar6 + 1;
}
}
uVar5 = find_arg(param_1,param_2);
return uVar5;
}
| |
43,808 | maria_get_pointer_length | eloqsql/storage/maria/ma_create.c | uint maria_get_pointer_length(ulonglong file_length, uint def)
{
DBUG_ASSERT(def >= 2 && def <= 7);
if (file_length) /* If not default */
{
#ifdef NOT_YET_READY_FOR_8_BYTE_POINTERS
if (file_length >= (1ULL << 56))
def=8;
else
#endif
if (file_length >= (1ULL << 48))
def=7;
else if (file_length >= (1ULL << 40))
def=6;
else if (file_length >= (1ULL << 32))
def=5;
else if (file_length >= (1ULL << 24))
def=4;
else if (file_length >= (1ULL << 16))
def=3;
else
def=2;
}
return def;
} | O0 | c | maria_get_pointer_length:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
jmp 0x7528d
cmpq $0x0, -0x8(%rbp)
je 0x7531a
movabsq $0x1000000000000, %rax # imm = 0x1000000000000
cmpq %rax, -0x8(%rbp)
jb 0x752b1
movl $0x7, -0xc(%rbp)
jmp 0x75318
movabsq $0x10000000000, %rax # imm = 0x10000000000
cmpq %rax, -0x8(%rbp)
jb 0x752ca
movl $0x6, -0xc(%rbp)
jmp 0x75316
movabsq $0x100000000, %rax # imm = 0x100000000
cmpq %rax, -0x8(%rbp)
jb 0x752e3
movl $0x5, -0xc(%rbp)
jmp 0x75314
cmpq $0x1000000, -0x8(%rbp) # imm = 0x1000000
jb 0x752f6
movl $0x4, -0xc(%rbp)
jmp 0x75312
cmpq $0x10000, -0x8(%rbp) # imm = 0x10000
jb 0x75309
movl $0x3, -0xc(%rbp)
jmp 0x75310
movl $0x2, -0xc(%rbp)
jmp 0x75312
jmp 0x75314
jmp 0x75316
jmp 0x75318
jmp 0x7531a
movl -0xc(%rbp), %eax
popq %rbp
retq
nop
| maria_get_pointer_length:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
jmp short $+2
loc_7528D:
cmp [rbp+var_8], 0
jz loc_7531A
mov rax, 1000000000000h
cmp [rbp+var_8], rax
jb short loc_752B1
mov [rbp+var_C], 7
jmp short loc_75318
loc_752B1:
mov rax, 10000000000h
cmp [rbp+var_8], rax
jb short loc_752CA
mov [rbp+var_C], 6
jmp short loc_75316
loc_752CA:
mov rax, 100000000h
cmp [rbp+var_8], rax
jb short loc_752E3
mov [rbp+var_C], 5
jmp short loc_75314
loc_752E3:
cmp [rbp+var_8], 1000000h
jb short loc_752F6
mov [rbp+var_C], 4
jmp short loc_75312
loc_752F6:
cmp [rbp+var_8], 10000h
jb short loc_75309
mov [rbp+var_C], 3
jmp short loc_75310
loc_75309:
mov [rbp+var_C], 2
loc_75310:
jmp short $+2
loc_75312:
jmp short $+2
loc_75314:
jmp short $+2
loc_75316:
jmp short $+2
loc_75318:
jmp short $+2
loc_7531A:
mov eax, [rbp+var_C]
pop rbp
retn
| long long maria_get_pointer_length(unsigned long long a1, unsigned int a2)
{
if ( a1 )
{
if ( a1 < 0x1000000000000LL )
{
if ( a1 < 0x10000000000LL )
{
if ( a1 < 0x100000000LL )
{
if ( a1 < 0x1000000 )
{
if ( a1 < 0x10000 )
return 2;
else
return 3;
}
else
{
return 4;
}
}
else
{
return 5;
}
}
else
{
return 6;
}
}
else
{
return 7;
}
}
return a2;
}
| maria_get_pointer_length:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
JMP 0x0017528d
LAB_0017528d:
CMP qword ptr [RBP + -0x8],0x0
JZ 0x0017531a
MOV RAX,0x1000000000000
CMP qword ptr [RBP + -0x8],RAX
JC 0x001752b1
MOV dword ptr [RBP + -0xc],0x7
JMP 0x00175318
LAB_001752b1:
MOV RAX,0x10000000000
CMP qword ptr [RBP + -0x8],RAX
JC 0x001752ca
MOV dword ptr [RBP + -0xc],0x6
JMP 0x00175316
LAB_001752ca:
MOV RAX,0x100000000
CMP qword ptr [RBP + -0x8],RAX
JC 0x001752e3
MOV dword ptr [RBP + -0xc],0x5
JMP 0x00175314
LAB_001752e3:
CMP qword ptr [RBP + -0x8],0x1000000
JC 0x001752f6
MOV dword ptr [RBP + -0xc],0x4
JMP 0x00175312
LAB_001752f6:
CMP qword ptr [RBP + -0x8],0x10000
JC 0x00175309
MOV dword ptr [RBP + -0xc],0x3
JMP 0x00175310
LAB_00175309:
MOV dword ptr [RBP + -0xc],0x2
LAB_00175310:
JMP 0x00175312
LAB_00175312:
JMP 0x00175314
LAB_00175314:
JMP 0x00175316
LAB_00175316:
JMP 0x00175318
LAB_00175318:
JMP 0x0017531a
LAB_0017531a:
MOV EAX,dword ptr [RBP + -0xc]
POP RBP
RET
|
int4 maria_get_pointer_length(ulong param_1,int4 param_2)
{
int4 local_14;
local_14 = param_2;
if (param_1 != 0) {
if (param_1 < 0x1000000000000) {
if (param_1 < 0x10000000000) {
if (param_1 < 0x100000000) {
if (param_1 < 0x1000000) {
if (param_1 < 0x10000) {
local_14 = 2;
}
else {
local_14 = 3;
}
}
else {
local_14 = 4;
}
}
else {
local_14 = 5;
}
}
else {
local_14 = 6;
}
}
else {
local_14 = 7;
}
}
return local_14;
}
| |
43,809 | maria_get_pointer_length | eloqsql/storage/maria/ma_create.c | uint maria_get_pointer_length(ulonglong file_length, uint def)
{
DBUG_ASSERT(def >= 2 && def <= 7);
if (file_length) /* If not default */
{
#ifdef NOT_YET_READY_FOR_8_BYTE_POINTERS
if (file_length >= (1ULL << 56))
def=8;
else
#endif
if (file_length >= (1ULL << 48))
def=7;
else if (file_length >= (1ULL << 40))
def=6;
else if (file_length >= (1ULL << 32))
def=5;
else if (file_length >= (1ULL << 24))
def=4;
else if (file_length >= (1ULL << 16))
def=3;
else
def=2;
}
return def;
} | O3 | c | maria_get_pointer_length:
pushq %rbp
movq %rsp, %rbp
movl %esi, %eax
testq %rdi, %rdi
je 0x5e625
movq %rdi, %rax
shrq $0x30, %rax
movl $0x7, %eax
jne 0x5e625
movq %rdi, %rax
shrq $0x28, %rax
movl $0x6, %eax
jne 0x5e625
movq %rdi, %rax
shrq $0x20, %rax
movl $0x5, %eax
jne 0x5e625
movl $0x4, %eax
cmpq $0xffffff, %rdi # imm = 0xFFFFFF
ja 0x5e625
cmpq $0x10000, %rdi # imm = 0x10000
movl $0x2, %eax
sbbl $-0x1, %eax
popq %rbp
retq
| maria_get_pointer_length:
push rbp
mov rbp, rsp
mov eax, esi
test rdi, rdi
jz short loc_5E625
mov rax, rdi
shr rax, 30h
mov eax, 7
jnz short loc_5E625
mov rax, rdi
shr rax, 28h
mov eax, 6
jnz short loc_5E625
mov rax, rdi
shr rax, 20h
mov eax, 5
jnz short loc_5E625
mov eax, 4
cmp rdi, 0FFFFFFh
ja short loc_5E625
cmp rdi, offset stru_10000
mov eax, 2
sbb eax, 0FFFFFFFFh
loc_5E625:
pop rbp
retn
| long long maria_get_pointer_length(unsigned long long a1, unsigned int a2)
{
long long result; // rax
result = a2;
if ( a1 )
{
result = 7LL;
if ( !HIWORD(a1) )
{
result = 6LL;
if ( !(a1 >> 40) )
{
result = 5LL;
if ( !HIDWORD(a1) )
{
result = 4LL;
if ( a1 <= 0xFFFFFF )
return 2 - ((unsigned int)(a1 < (unsigned long long)&stru_10000) - 1);
}
}
}
}
return result;
}
| maria_get_pointer_length:
PUSH RBP
MOV RBP,RSP
MOV EAX,ESI
TEST RDI,RDI
JZ 0x0015e625
MOV RAX,RDI
SHR RAX,0x30
MOV EAX,0x7
JNZ 0x0015e625
MOV RAX,RDI
SHR RAX,0x28
MOV EAX,0x6
JNZ 0x0015e625
MOV RAX,RDI
SHR RAX,0x20
MOV EAX,0x5
JNZ 0x0015e625
MOV EAX,0x4
CMP RDI,0xffffff
JA 0x0015e625
CMP RDI,0x10000
MOV EAX,0x2
SBB EAX,-0x1
LAB_0015e625:
POP RBP
RET
|
int maria_get_pointer_length(ulong param_1,int param_2)
{
if ((((param_1 != 0) && (param_2 = 7, param_1 >> 0x30 == 0)) &&
(param_2 = 6, param_1 >> 0x28 == 0)) &&
((param_2 = 5, param_1 >> 0x20 == 0 && (param_2 = 4, param_1 < 0x1000000)))) {
param_2 = 3 - (uint)(param_1 < 0x10000);
}
return param_2;
}
| |
43,810 | nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::set_parents() | 11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp | void set_parents()
{
#if JSON_DIAGNOSTICS
switch (m_data.m_type)
{
case value_t::array:
{
for (auto& element : *m_data.m_value.array)
{
element.m_parent = this;
}
break;
}
case value_t::object:
{
for (auto& element : *m_data.m_value.object)
{
element.second.m_parent = this;
}
break;
}
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
break;
}
#endif
} | O0 | cpp | nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::set_parents():
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
popq %rbp
retq
nopw (%rax,%rax)
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE11set_parentsEv:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
pop rbp
retn
| void nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::set_parents()
{
;
}
| set_parents:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long,
unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer,
std::vector<unsigned char, std::allocator<unsigned char> >, void>::set_parents() */
void nlohmann::json_abi_v3_11_3::
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::set_parents(void)
{
return;
}
| |
43,811 | PFS_user_allocator::free_array(PFS_user_array*) | eloqsql/storage/perfschema/pfs_buffer_container.cc | void PFS_user_allocator::free_array(PFS_user_array *array)
{
size_t size= array->m_max;
size_t waits_sizing= size * wait_class_max;
size_t stages_sizing= size * stage_class_max;
size_t statements_sizing= size * statement_class_max;
size_t transactions_sizing= size * transaction_class_max;
size_t memory_sizing= size * memory_class_max;
PFS_FREE_ARRAY(& builtin_memory_user,
size, sizeof(PFS_user), array->m_ptr);
array->m_ptr= NULL;
PFS_FREE_ARRAY(& builtin_memory_user_waits,
waits_sizing, sizeof(PFS_single_stat),
array->m_instr_class_waits_array);
array->m_instr_class_waits_array= NULL;
PFS_FREE_ARRAY(& builtin_memory_user_stages,
stages_sizing, sizeof(PFS_stage_stat),
array->m_instr_class_stages_array);
array->m_instr_class_stages_array= NULL;
PFS_FREE_ARRAY(& builtin_memory_user_statements,
statements_sizing, sizeof(PFS_statement_stat),
array->m_instr_class_statements_array);
array->m_instr_class_statements_array= NULL;
PFS_FREE_ARRAY(& builtin_memory_user_transactions,
transactions_sizing, sizeof(PFS_transaction_stat),
array->m_instr_class_transactions_array);
array->m_instr_class_transactions_array= NULL;
PFS_FREE_ARRAY(& builtin_memory_user_memory,
memory_sizing, sizeof(PFS_memory_stat),
array->m_instr_class_memory_array);
array->m_instr_class_memory_array= NULL;
} | O0 | cpp | PFS_user_allocator::free_array(PFS_user_array*):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
leaq 0x3dd349(%rip), %rcx # 0x40f2a0
movl (%rcx), %ecx
imulq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
leaq 0x3dcae4(%rip), %rcx # 0x40ea50
imulq (%rcx), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
leaq 0x3dcae1(%rip), %rcx # 0x40ea60
imulq (%rcx), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
leaq 0x3dcafe(%rip), %rcx # 0x40ea90
imulq (%rcx), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
leaq 0x3dcadb(%rip), %rcx # 0x40ea80
imulq (%rcx), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
leaq 0x3d95c0(%rip), %rdi # 0x40b580
movl $0x9c0, %edx # imm = 0x9C0
callq 0x29970
movq -0x10(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rcx
leaq 0x3d96d7(%rip), %rdi # 0x40b6c0
movl $0x20, %edx
callq 0x29970
movq -0x10(%rbp), %rax
movq $0x0, 0x60(%rax)
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rcx
leaq 0x3d97ee(%rip), %rdi # 0x40b800
movl $0x20, %edx
callq 0x29970
movq -0x10(%rbp), %rax
movq $0x0, 0x68(%rax)
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rcx
leaq 0x3d9905(%rip), %rdi # 0x40b940
movl $0xb8, %edx
callq 0x29970
movq -0x10(%rbp), %rax
movq $0x0, 0x70(%rax)
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rcx
leaq 0x3d9a1c(%rip), %rdi # 0x40ba80
movl $0x58, %edx
callq 0x29970
movq -0x10(%rbp), %rax
movq $0x0, 0x78(%rax)
movq -0x40(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rcx
leaq 0x3d9b30(%rip), %rdi # 0x40bbc0
movl $0x48, %edx
callq 0x29970
movq -0x10(%rbp), %rax
movq $0x0, 0x80(%rax)
addq $0x40, %rsp
popq %rbp
retq
nop
| _ZN18PFS_user_allocator10free_arrayEP14PFS_user_array:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov rax, [rax+50h]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
lea rcx, wait_class_max
mov ecx, [rcx]
imul rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
lea rcx, stage_class_max
imul rax, [rcx]
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
lea rcx, statement_class_max
imul rax, [rcx]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
lea rcx, transaction_class_max
imul rax, [rcx]
mov [rbp+var_38], rax
mov rax, [rbp+var_18]
lea rcx, memory_class_max
imul rax, [rcx]
mov [rbp+var_40], rax
mov rsi, [rbp+var_18]
mov rax, [rbp+var_10]
mov rcx, [rax+48h]
lea rdi, builtin_memory_user
mov edx, 9C0h
call _Z14pfs_free_arrayP24PFS_builtin_memory_classmmPv; pfs_free_array(PFS_builtin_memory_class *,ulong,ulong,void *)
mov rax, [rbp+var_10]
mov qword ptr [rax+48h], 0
mov rsi, [rbp+var_20]
mov rax, [rbp+var_10]
mov rcx, [rax+60h]
lea rdi, builtin_memory_user_waits
mov edx, 20h ; ' '
call _Z14pfs_free_arrayP24PFS_builtin_memory_classmmPv; pfs_free_array(PFS_builtin_memory_class *,ulong,ulong,void *)
mov rax, [rbp+var_10]
mov qword ptr [rax+60h], 0
mov rsi, [rbp+var_28]
mov rax, [rbp+var_10]
mov rcx, [rax+68h]
lea rdi, builtin_memory_user_stages
mov edx, 20h ; ' '
call _Z14pfs_free_arrayP24PFS_builtin_memory_classmmPv; pfs_free_array(PFS_builtin_memory_class *,ulong,ulong,void *)
mov rax, [rbp+var_10]
mov qword ptr [rax+68h], 0
mov rsi, [rbp+var_30]
mov rax, [rbp+var_10]
mov rcx, [rax+70h]
lea rdi, builtin_memory_user_statements
mov edx, 0B8h
call _Z14pfs_free_arrayP24PFS_builtin_memory_classmmPv; pfs_free_array(PFS_builtin_memory_class *,ulong,ulong,void *)
mov rax, [rbp+var_10]
mov qword ptr [rax+70h], 0
mov rsi, [rbp+var_38]
mov rax, [rbp+var_10]
mov rcx, [rax+78h]
lea rdi, builtin_memory_user_transactions
mov edx, 58h ; 'X'
call _Z14pfs_free_arrayP24PFS_builtin_memory_classmmPv; pfs_free_array(PFS_builtin_memory_class *,ulong,ulong,void *)
mov rax, [rbp+var_10]
mov qword ptr [rax+78h], 0
mov rsi, [rbp+var_40]
mov rax, [rbp+var_10]
mov rcx, [rax+80h]
lea rdi, builtin_memory_user_memory
mov edx, 48h ; 'H'
call _Z14pfs_free_arrayP24PFS_builtin_memory_classmmPv; pfs_free_array(PFS_builtin_memory_class *,ulong,ulong,void *)
mov rax, [rbp+var_10]
mov qword ptr [rax+80h], 0
add rsp, 40h
pop rbp
retn
| PFS_user_array * PFS_user_allocator::free_array(PFS_user_allocator *this, PFS_user_array *a2)
{
PFS_user_array *result; // rax
long long v3; // [rsp+0h] [rbp-40h]
long long v4; // [rsp+8h] [rbp-38h]
long long v5; // [rsp+10h] [rbp-30h]
long long v6; // [rsp+18h] [rbp-28h]
long long v7; // [rsp+20h] [rbp-20h]
long long v8; // [rsp+28h] [rbp-18h]
v8 = *((_QWORD *)a2 + 10);
v7 = (unsigned int)wait_class_max * v8;
v6 = stage_class_max * v8;
v5 = statement_class_max * v8;
v4 = transaction_class_max * v8;
v3 = memory_class_max * v8;
pfs_free_array((PFS_builtin_memory_class *)&builtin_memory_user, v8, 2496LL, *((void **)a2 + 9));
*((_QWORD *)a2 + 9) = 0LL;
pfs_free_array((PFS_builtin_memory_class *)&builtin_memory_user_waits, v7, 32LL, *((void **)a2 + 12));
*((_QWORD *)a2 + 12) = 0LL;
pfs_free_array((PFS_builtin_memory_class *)&builtin_memory_user_stages, v6, 32LL, *((void **)a2 + 13));
*((_QWORD *)a2 + 13) = 0LL;
pfs_free_array((PFS_builtin_memory_class *)&builtin_memory_user_statements, v5, 184LL, *((void **)a2 + 14));
*((_QWORD *)a2 + 14) = 0LL;
pfs_free_array((PFS_builtin_memory_class *)&builtin_memory_user_transactions, v4, 88LL, *((void **)a2 + 15));
*((_QWORD *)a2 + 15) = 0LL;
pfs_free_array((PFS_builtin_memory_class *)&builtin_memory_user_memory, v3, 72LL, *((void **)a2 + 16));
result = a2;
*((_QWORD *)a2 + 16) = 0LL;
return result;
}
| free_array:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x50]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
LEA RCX,[0x50f2a0]
MOV ECX,dword ptr [RCX]
IMUL RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
LEA RCX,[0x50ea50]
IMUL RAX,qword ptr [RCX]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
LEA RCX,[0x50ea60]
IMUL RAX,qword ptr [RCX]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
LEA RCX,[0x50ea90]
IMUL RAX,qword ptr [RCX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x18]
LEA RCX,[0x50ea80]
IMUL RAX,qword ptr [RCX]
MOV qword ptr [RBP + -0x40],RAX
MOV RSI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x48]
LEA RDI,[0x50b580]
MOV EDX,0x9c0
CALL 0x00129970
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x48],0x0
MOV RSI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x60]
LEA RDI,[0x50b6c0]
MOV EDX,0x20
CALL 0x00129970
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x60],0x0
MOV RSI,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x68]
LEA RDI,[0x50b800]
MOV EDX,0x20
CALL 0x00129970
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x68],0x0
MOV RSI,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x70]
LEA RDI,[0x50b940]
MOV EDX,0xb8
CALL 0x00129970
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x70],0x0
MOV RSI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x78]
LEA RDI,[0x50ba80]
MOV EDX,0x58
CALL 0x00129970
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x78],0x0
MOV RSI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x80]
LEA RDI,[0x50bbc0]
MOV EDX,0x48
CALL 0x00129970
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x80],0x0
ADD RSP,0x40
POP RBP
RET
|
/* PFS_user_allocator::free_array(PFS_user_array*) */
void __thiscall PFS_user_allocator::free_array(PFS_user_allocator *this,PFS_user_array *param_1)
{
ulong uVar1;
ulong uVar2;
ulong uVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
uVar1 = *(ulong *)(param_1 + 0x50);
uVar6 = (ulong)wait_class_max;
uVar2 = uVar1 * stage_class_max;
uVar3 = uVar1 * statement_class_max;
uVar4 = uVar1 * transaction_class_max;
uVar5 = uVar1 * memory_class_max;
pfs_free_array((PFS_builtin_memory_class *)builtin_memory_user,uVar1,0x9c0,
*(void **)(param_1 + 0x48));
*(int8 *)(param_1 + 0x48) = 0;
pfs_free_array((PFS_builtin_memory_class *)builtin_memory_user_waits,uVar1 * uVar6,0x20,
*(void **)(param_1 + 0x60));
*(int8 *)(param_1 + 0x60) = 0;
pfs_free_array((PFS_builtin_memory_class *)builtin_memory_user_stages,uVar2,0x20,
*(void **)(param_1 + 0x68));
*(int8 *)(param_1 + 0x68) = 0;
pfs_free_array((PFS_builtin_memory_class *)builtin_memory_user_statements,uVar3,0xb8,
*(void **)(param_1 + 0x70));
*(int8 *)(param_1 + 0x70) = 0;
pfs_free_array((PFS_builtin_memory_class *)builtin_memory_user_transactions,uVar4,0x58,
*(void **)(param_1 + 0x78));
*(int8 *)(param_1 + 0x78) = 0;
pfs_free_array((PFS_builtin_memory_class *)builtin_memory_user_memory,uVar5,0x48,
*(void **)(param_1 + 0x80));
*(int8 *)(param_1 + 0x80) = 0;
return;
}
| |
43,812 | coro::io_scheduler::yield_for(std::chrono::duration<long, std::ratio<1l, 1000l>>) | AlayaLite/build_O3/_deps/libcoro-src/src/io_scheduler.cpp | auto io_scheduler::yield_for(std::chrono::milliseconds amount) -> coro::task<void>
{
if (amount <= 0ms)
{
co_await schedule();
}
else
{
// Yield/timeout tasks are considered live in the scheduler and must be accounted for. Note
// that if the user gives an invalid amount and schedule() is directly called it will account
// for the scheduled task there.
m_size.fetch_add(1, std::memory_order::release);
// Yielding does not requiring setting the timer position on the poll info since
// it doesn't have a corresponding 'event' that can trigger, it always waits for
// the timeout to occur before resuming.
detail::poll_info pi{};
add_timer_token(clock::now() + amount, pi);
co_await pi;
m_size.fetch_sub(1, std::memory_order::release);
}
co_return;
} | O3 | cpp | coro::io_scheduler::yield_for(std::chrono::duration<long, std::ratio<1l, 1000l>>):
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x68, %edi
callq 0x32a0
leaq 0x8ab(%rip), %rcx # 0x750c
movq %rcx, (%rax)
leaq 0x9ab(%rip), %rcx # 0x7616
movq %rcx, 0x8(%rax)
movq %rbx, 0x58(%rax)
movq %r14, 0x50(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movq %rax, (%r15)
movb $0x0, 0x60(%rax)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
| _ZN4coro12io_scheduler9yield_forENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE:
push r15
push r14
push rbx
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov edi, 68h ; 'h'; unsigned __int64
call __Znwm; operator new(ulong)
lea rcx, _ZN4coro12io_scheduler9yield_forENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE_resume; coro::io_scheduler::yield_for(std::chrono::duration<long,std::ratio<1l,1000l>>) [clone]
mov [rax], rcx
lea rcx, _ZN4coro12io_scheduler9yield_forENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE_destroy; coro::io_scheduler::yield_for(std::chrono::duration<long,std::ratio<1l,1000l>>) [clone]
mov [rax+8], rcx
mov [rax+58h], rbx
mov [rax+50h], r14
xorps xmm0, xmm0
movups xmmword ptr [rax+10h], xmm0
mov [r15], rax
mov byte ptr [rax+60h], 0
mov rax, r15
pop rbx
pop r14
pop r15
retn
| _QWORD * coro::io_scheduler::yield_for(_QWORD *a1, long long a2, long long a3)
{
long long v4; // rax
v4 = operator new(0x68uLL);
*(_QWORD *)v4 = coro::io_scheduler::yield_for;
*(_QWORD *)(v4 + 8) = coro::io_scheduler::yield_for;
*(_QWORD *)(v4 + 88) = a3;
*(_QWORD *)(v4 + 80) = a2;
*(_OWORD *)(v4 + 16) = 0LL;
*a1 = v4;
*(_BYTE *)(v4 + 96) = 0;
return a1;
}
| yield_for:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
MOV EDI,0x68
CALL 0x001032a0
LEA RCX,[0x10750c]
MOV qword ptr [RAX],RCX
LEA RCX,[0x107616]
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RAX + 0x58],RBX
MOV qword ptr [RAX + 0x50],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x10],XMM0
MOV qword ptr [R15],RAX
MOV byte ptr [RAX + 0x60],0x0
MOV RAX,R15
POP RBX
POP R14
POP R15
RET
|
/* coro::io_scheduler::yield_for(std::chrono::duration<long, std::ratio<1l, 1000l> >) */
int8 *
coro::io_scheduler::yield_for(int8 *param_1,int8 param_2,int8 param_3)
{
int8 *puVar1;
puVar1 = (int8 *)operator_new(0x68);
*puVar1 = yield_for;
puVar1[1] = yield_for;
puVar1[0xb] = param_3;
puVar1[10] = param_2;
puVar1[2] = 0;
puVar1[3] = 0;
*param_1 = puVar1;
*(int1 *)(puVar1 + 0xc) = 0;
return param_1;
}
| |
43,813 | double minja::Value::get<double>() const | monkey531[P]llama/common/minja.hpp | T get() const {
if (is_primitive()) return primitive_.get<T>();
throw std::runtime_error("get<T> not defined for this value type: " + dump());
} | O2 | cpp | double minja::Value::get<double>() const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x64756
testb %al, %al
je 0x651cf
addq $0x40, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x65430
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x23470
movq %rax, %rbx
movq %rsp, %rdi
pushq $-0x1
popq %rdx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x64766
leaq 0x50002(%rip), %rsi # 0xb51f3
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x59ebe
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x23ed0
xorl %ebp, %ebp
movq 0x99dd1(%rip), %rsi # 0xfefe8
movq 0x99d2a(%rip), %rdx # 0xfef48
movq %rbx, %rdi
callq 0x23fb0
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x242a8
jmp 0x6523b
movq %rax, %r14
movb $0x1, %bpl
movq %rsp, %rdi
callq 0x242a8
testb %bpl, %bpl
jne 0x6524d
jmp 0x65255
movq %rax, %r14
movq %rbx, %rdi
callq 0x23690
movq %r14, %rdi
callq 0x24030
nop
| _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v:
push rbp
push r14
push rbx
sub rsp, 40h
mov r14, rsi
mov rbx, rdi
mov rdi, rsi; this
call _ZNK5minja5Value12is_primitiveEv; minja::Value::is_primitive(void)
test al, al
jz short loc_651CF
add r14, 40h ; '@'
mov rdi, rbx
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
mov rax, rbx
add rsp, 40h
pop rbx
pop r14
pop rbp
retn
loc_651CF:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, rsp
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, r14
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aGetTNotDefined; "get<T> not defined for this value type:"...
lea rdi, [rsp+58h+var_38]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+58h+var_38]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+58h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_6523B
mov r14, rax
mov bpl, 1
loc_6523B:
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_6524D
jmp short loc_65255
mov r14, rax
loc_6524D:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_65255:
mov rdi, r14
call __Unwind_Resume
| long long minja::Value::get<std::string>(long long a1, minja::Value *a2)
{
void *exception; // rbx
_BYTE v4[32]; // [rsp+0h] [rbp-58h] BYREF
_BYTE v5[56]; // [rsp+20h] [rbp-38h] BYREF
if ( !minja::Value::is_primitive(a2) )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v4, (long long)a2, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v5, (long long)"get<T> not defined for this value type: ", (long long)v4);
std::runtime_error::runtime_error(exception, v5);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
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(
a1,
(char *)a2 + 64);
return a1;
}
| get<std::__cxx11::string>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RSI
MOV RBX,RDI
MOV RDI,RSI
CALL 0x00164756
TEST AL,AL
JZ 0x001651cf
ADD R14,0x40
MOV RDI,RBX
MOV RSI,R14
CALL 0x00165430
MOV RAX,RBX
ADD RSP,0x40
POP RBX
POP R14
POP RBP
RET
LAB_001651cf:
PUSH 0x10
POP RDI
CALL 0x00123470
MOV RBX,RAX
LAB_001651da:
MOV RDI,RSP
PUSH -0x1
POP RDX
MOV RSI,R14
XOR ECX,ECX
CALL 0x00164766
LAB_001651ea:
LEA RSI,[0x1b51f3]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00159ebe
MOV BPL,0x1
LAB_00165201:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x00123ed0
XOR EBP,EBP
MOV RSI,qword ptr [0x001fefe8]
MOV RDX,qword ptr [0x001fef48]
MOV RDI,RBX
CALL 0x00123fb0
|
/* std::__cxx11::string minja::Value::get<std::__cxx11::string >() const */
void minja::Value::get<std::__cxx11::string>(void)
{
char cVar1;
runtime_error *this;
Value *in_RSI;
int1 auStack_58 [32];
string local_38 [32];
cVar1 = is_primitive(in_RSI);
if (cVar1 != '\0') {
_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
();
return;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001651da to 001651e9 has its CatchHandler @ 0016524a */
dump_abi_cxx11_((int)auStack_58,SUB81(in_RSI,0));
/* try { // try from 001651ea to 001651fd has its CatchHandler @ 00165235 */
std::operator+((char *)local_38,(string *)"get<T> not defined for this value type: ");
/* try { // try from 00165201 to 00165225 has its CatchHandler @ 00165226 */
std::runtime_error::runtime_error(this,local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_001fefe8,PTR__runtime_error_001fef48);
}
| |
43,814 | double minja::Value::get<double>() const | monkey531[P]llama/common/minja.hpp | T get() const {
if (is_primitive()) return primitive_.get<T>();
throw std::runtime_error("get<T> not defined for this value type: " + dump());
} | O3 | cpp | double minja::Value::get<double>() const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpq $0x0, 0x10(%rdi)
jne 0x89a36
cmpq $0x0, 0x20(%r14)
jne 0x89a36
cmpq $0x0, 0x30(%r14)
jne 0x89a36
addq $0x40, %r14
leaq 0x20(%rsp), %rbx
movb $0x0, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x89ca9
movb (%rbx), %al
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x1b450
movq %rax, %rbx
movq %rsp, %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x88cb6
leaq 0x687a7(%rip), %rsi # 0xf2203
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x7b47d
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x1beb0
xorl %ebp, %ebp
movq 0xa4566(%rip), %rsi # 0x12dfe8
movq 0xa44c7(%rip), %rdx # 0x12df50
movq %rbx, %rdi
callq 0x1bfb0
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x89aaf
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1b8e0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x89aca
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b8e0
testb %bpl, %bpl
jne 0x89af4
jmp 0x89afc
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x89af4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b8e0
jmp 0x89af4
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b670
movq %r14, %rdi
callq 0x1c030
| _ZNK5minja5Value3getIbEET_v:
push rbp
push r14
push rbx
sub rsp, 40h
mov r14, rdi
cmp qword ptr [rdi+10h], 0
jnz short loc_89A36
cmp qword ptr [r14+20h], 0
jnz short loc_89A36
cmp qword ptr [r14+30h], 0
jnz short loc_89A36
add r14, 40h ; '@'
lea rbx, [rsp+58h+var_38]
mov byte ptr [rbx], 0
mov rdi, r14
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_9boolean_tE; nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::boolean_t &)
mov al, [rbx]
add rsp, 40h
pop rbx
pop r14
pop rbp
retn
loc_89A36:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, rsp
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aGetTNotDefined; "get<T> not defined for this value type:"...
lea rdi, [rsp+58h+var_38]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+58h+var_38]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+58h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_89AAF
mov rsi, [rsp+58h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_89AAF:
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_89ACA
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_89ACA:
test bpl, bpl
jnz short loc_89AF4
jmp short loc_89AFC
mov r14, rax
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_89AF4
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_89AF4
mov r14, rax
loc_89AF4:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_89AFC:
mov rdi, r14
call __Unwind_Resume
| char minja::Value::get<bool>(_QWORD *a1)
{
void *exception; // rbx
_BYTE v3[16]; // [rsp+0h] [rbp-58h] BYREF
_BYTE v4[16]; // [rsp+20h] [rbp-38h] BYREF
if ( a1[2] || a1[4] || a1[6] )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v3, (long long)a1, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v4, (long long)"get<T> not defined for this value type: ", (long long)v3);
std::runtime_error::runtime_error(exception, v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v4[0] = 0;
nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
a1 + 8,
v4);
return v4[0];
}
| get<bool>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP qword ptr [RDI + 0x10],0x0
JNZ 0x00189a36
CMP qword ptr [R14 + 0x20],0x0
JNZ 0x00189a36
CMP qword ptr [R14 + 0x30],0x0
JNZ 0x00189a36
ADD R14,0x40
LEA RBX,[RSP + 0x20]
MOV byte ptr [RBX],0x0
MOV RDI,R14
MOV RSI,RBX
CALL 0x00189ca9
MOV AL,byte ptr [RBX]
ADD RSP,0x40
POP RBX
POP R14
POP RBP
RET
LAB_00189a36:
MOV EDI,0x10
CALL 0x0011b450
MOV RBX,RAX
LAB_00189a43:
MOV RDI,RSP
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x00188cb6
LAB_00189a55:
LEA RSI,[0x1f2203]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x0017b47d
MOV BPL,0x1
LAB_00189a6c:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x0011beb0
XOR EBP,EBP
MOV RSI,qword ptr [0x0022dfe8]
MOV RDX,qword ptr [0x0022df50]
MOV RDI,RBX
CALL 0x0011bfb0
|
/* bool minja::Value::get<bool>() const */
bool __thiscall minja::Value::get<bool>(Value *this)
{
runtime_error *this_00;
int1 auStack_58 [32];
string local_38 [32];
if (((*(long *)(this + 0x10) == 0) && (*(long *)(this + 0x20) == 0)) &&
(*(long *)(this + 0x30) == 0)) {
local_38[0] = (string)0x0;
nlohmann::json_abi_v3_11_3::detail::
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
((basic_json *)(this + 0x40),local_38);
return (bool)local_38[0];
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00189a43 to 00189a54 has its CatchHandler @ 00189af1 */
dump_abi_cxx11_((int)auStack_58,SUB81(this,0));
/* try { // try from 00189a55 to 00189a68 has its CatchHandler @ 00189ad1 */
std::operator+((char *)local_38,(string *)"get<T> not defined for this value type: ");
/* try { // try from 00189a6c to 00189a90 has its CatchHandler @ 00189a91 */
std::runtime_error::runtime_error(this_00,local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_0022dfe8,PTR__runtime_error_0022df50);
}
| |
43,815 | ggml_vec_dot_q3_K_q8_K | 7CodeWizard[P]stablediffusion/ggml/src/ggml-quants.c | void ggml_vec_dot_q3_K_q8_K(const int n, float * restrict s, const void * restrict vx, const void * restrict vy) {
assert(n % QK_K == 0);
const uint32_t kmask1 = 0x03030303;
const uint32_t kmask2 = 0x0f0f0f0f;
const block_q3_K * restrict x = vx;
const block_q8_K * restrict y = vy;
const int nb = n / QK_K;
#ifdef __ARM_NEON
uint32_t aux[3];
uint32_t utmp[4];
const uint8x16_t m3b = vdupq_n_u8(0x3);
const int32x4_t vzero = vdupq_n_s32(0);
const uint8x16_t m0 = vdupq_n_u8(1);
const uint8x16_t m1 = vshlq_n_u8(m0, 1);
const uint8x16_t m2 = vshlq_n_u8(m0, 2);
const uint8x16_t m3 = vshlq_n_u8(m0, 3);
const int8_t m32 = 32;
ggml_int8x16x4_t q3bytes;
float sum = 0;
for (int i = 0; i < nb; ++i) {
const float d = y[i].d * GGML_FP16_TO_FP32(x[i].d);
const uint8_t * restrict q3 = x[i].qs;
const uint8_t * restrict qh = x[i].hmask;
const int8_t * restrict q8 = y[i].qs;
ggml_uint8x16x2_t qhbits = ggml_vld1q_u8_x2(qh);
ggml_uint8x16x4_t q3h;
int32_t isum = 0;
// Set up scales
memcpy(aux, x[i].scales, 12);
utmp[3] = ((aux[1] >> 4) & kmask2) | (((aux[2] >> 6) & kmask1) << 4);
utmp[2] = ((aux[0] >> 4) & kmask2) | (((aux[2] >> 4) & kmask1) << 4);
utmp[1] = (aux[1] & kmask2) | (((aux[2] >> 2) & kmask1) << 4);
utmp[0] = (aux[0] & kmask2) | (((aux[2] >> 0) & kmask1) << 4);
int8_t * scale = (int8_t *)utmp;
for (int j = 0; j < 16; ++j) scale[j] -= m32;
for (int j = 0; j < QK_K/128; ++j) {
const ggml_uint8x16x2_t q3bits = ggml_vld1q_u8_x2(q3); q3 += 32;
const ggml_int8x16x4_t q8bytes_1 = ggml_vld1q_s8_x4(q8); q8 += 64;
const ggml_int8x16x4_t q8bytes_2 = ggml_vld1q_s8_x4(q8); q8 += 64;
q3h.val[0] = vshlq_n_u8(vbicq_u8(m0, qhbits.val[0]), 2);
q3h.val[1] = vshlq_n_u8(vbicq_u8(m0, qhbits.val[1]), 2);
q3h.val[2] = vshlq_n_u8(vbicq_u8(m1, qhbits.val[0]), 1);
q3h.val[3] = vshlq_n_u8(vbicq_u8(m1, qhbits.val[1]), 1);
q3bytes.val[0] = vsubq_s8(vreinterpretq_s8_u8(vandq_u8(q3bits.val[0], m3b)), vreinterpretq_s8_u8(q3h.val[0]));
q3bytes.val[1] = vsubq_s8(vreinterpretq_s8_u8(vandq_u8(q3bits.val[1], m3b)), vreinterpretq_s8_u8(q3h.val[1]));
q3bytes.val[2] = vsubq_s8(vreinterpretq_s8_u8(vandq_u8(vshrq_n_u8(q3bits.val[0], 2), m3b)), vreinterpretq_s8_u8(q3h.val[2]));
q3bytes.val[3] = vsubq_s8(vreinterpretq_s8_u8(vandq_u8(vshrq_n_u8(q3bits.val[1], 2), m3b)), vreinterpretq_s8_u8(q3h.val[3]));
isum += vaddvq_s32(ggml_vdotq_s32(vzero, q3bytes.val[0], q8bytes_1.val[0])) * scale[0];
isum += vaddvq_s32(ggml_vdotq_s32(vzero, q3bytes.val[1], q8bytes_1.val[1])) * scale[1];
isum += vaddvq_s32(ggml_vdotq_s32(vzero, q3bytes.val[2], q8bytes_1.val[2])) * scale[2];
isum += vaddvq_s32(ggml_vdotq_s32(vzero, q3bytes.val[3], q8bytes_1.val[3])) * scale[3];
scale += 4;
q3h.val[0] = vbicq_u8(m2, qhbits.val[0]);
q3h.val[1] = vbicq_u8(m2, qhbits.val[1]);
q3h.val[2] = vshrq_n_u8(vbicq_u8(m3, qhbits.val[0]), 1);
q3h.val[3] = vshrq_n_u8(vbicq_u8(m3, qhbits.val[1]), 1);
q3bytes.val[0] = vsubq_s8(vreinterpretq_s8_u8(vandq_u8(vshrq_n_u8(q3bits.val[0], 4), m3b)), vreinterpretq_s8_u8(q3h.val[0]));
q3bytes.val[1] = vsubq_s8(vreinterpretq_s8_u8(vandq_u8(vshrq_n_u8(q3bits.val[1], 4), m3b)), vreinterpretq_s8_u8(q3h.val[1]));
q3bytes.val[2] = vsubq_s8(vreinterpretq_s8_u8(vandq_u8(vshrq_n_u8(q3bits.val[0], 6), m3b)), vreinterpretq_s8_u8(q3h.val[2]));
q3bytes.val[3] = vsubq_s8(vreinterpretq_s8_u8(vandq_u8(vshrq_n_u8(q3bits.val[1], 6), m3b)), vreinterpretq_s8_u8(q3h.val[3]));
isum += vaddvq_s32(ggml_vdotq_s32(vzero, q3bytes.val[0], q8bytes_2.val[0])) * scale[0];
isum += vaddvq_s32(ggml_vdotq_s32(vzero, q3bytes.val[1], q8bytes_2.val[1])) * scale[1];
isum += vaddvq_s32(ggml_vdotq_s32(vzero, q3bytes.val[2], q8bytes_2.val[2])) * scale[2];
isum += vaddvq_s32(ggml_vdotq_s32(vzero, q3bytes.val[3], q8bytes_2.val[3])) * scale[3];
scale += 4;
if (j == 0) {
qhbits.val[0] = vshrq_n_u8(qhbits.val[0], 4);
qhbits.val[1] = vshrq_n_u8(qhbits.val[1], 4);
}
}
sum += d * isum;
}
*s = sum;
#elif defined __AVX2__
const __m256i m3 = _mm256_set1_epi8(3);
const __m256i mone = _mm256_set1_epi8(1);
const __m128i m32 = _mm_set1_epi8(32);
__m256 acc = _mm256_setzero_ps();
uint32_t aux[3];
for (int i = 0; i < nb; ++i) {
const float d = y[i].d * GGML_FP16_TO_FP32(x[i].d);
const uint8_t * restrict q3 = x[i].qs;
const int8_t * restrict q8 = y[i].qs;
// Set up scales
memcpy(aux, x[i].scales, 12);
__m128i scales128 = _mm_set_epi32(
((aux[1] >> 4) & kmask2) | (((aux[2] >> 6) & kmask1) << 4),
((aux[0] >> 4) & kmask2) | (((aux[2] >> 4) & kmask1) << 4),
(aux[1] & kmask2) | (((aux[2] >> 2) & kmask1) << 4),
(aux[0] & kmask2) | (((aux[2] >> 0) & kmask1) << 4));
scales128 = _mm_sub_epi8(scales128, m32);
const __m256i all_scales = _mm256_cvtepi8_epi16(scales128);
const __m128i l_scales = _mm256_extracti128_si256(all_scales, 0);
const __m128i h_scales = _mm256_extracti128_si256(all_scales, 1);
const __m256i scales[2] = {MM256_SET_M128I(l_scales, l_scales), MM256_SET_M128I(h_scales, h_scales)};
// high bit
const __m256i hbits = _mm256_loadu_si256((const __m256i*)x[i].hmask);
// integer accumulator
__m256i sumi = _mm256_setzero_si256();
int bit = 0;
int is = 0;
for (int j = 0; j < QK_K/128; ++j) {
// load low 2 bits
const __m256i q3bits = _mm256_loadu_si256((const __m256i*)q3); q3 += 32;
// prepare low and high bits
const __m256i q3l_0 = _mm256_and_si256(q3bits, m3);
const __m256i q3h_0 = _mm256_slli_epi16(_mm256_srli_epi16(_mm256_andnot_si256(hbits, _mm256_slli_epi16(mone, bit)), bit), 2);
++bit;
const __m256i q3l_1 = _mm256_and_si256(_mm256_srli_epi16(q3bits, 2), m3);
const __m256i q3h_1 = _mm256_slli_epi16(_mm256_srli_epi16(_mm256_andnot_si256(hbits, _mm256_slli_epi16(mone, bit)), bit), 2);
++bit;
const __m256i q3l_2 = _mm256_and_si256(_mm256_srli_epi16(q3bits, 4), m3);
const __m256i q3h_2 = _mm256_slli_epi16(_mm256_srli_epi16(_mm256_andnot_si256(hbits, _mm256_slli_epi16(mone, bit)), bit), 2);
++bit;
const __m256i q3l_3 = _mm256_and_si256(_mm256_srli_epi16(q3bits, 6), m3);
const __m256i q3h_3 = _mm256_slli_epi16(_mm256_srli_epi16(_mm256_andnot_si256(hbits, _mm256_slli_epi16(mone, bit)), bit), 2);
++bit;
// load Q8 quants
const __m256i q8_0 = _mm256_loadu_si256((const __m256i*)q8); q8 += 32;
const __m256i q8_1 = _mm256_loadu_si256((const __m256i*)q8); q8 += 32;
const __m256i q8_2 = _mm256_loadu_si256((const __m256i*)q8); q8 += 32;
const __m256i q8_3 = _mm256_loadu_si256((const __m256i*)q8); q8 += 32;
// Dot product: we multiply the 2 low bits and 1 high bit part separately, so we can use _mm256_maddubs_epi16,
// and then subtract. The high bit part has the 2 already subtracted (and so, it is zero if the high bit was not set,
// and 2 if the high bit was set)
__m256i q8s_0 = _mm256_maddubs_epi16(q3h_0, q8_0);
__m256i q8s_1 = _mm256_maddubs_epi16(q3h_1, q8_1);
__m256i q8s_2 = _mm256_maddubs_epi16(q3h_2, q8_2);
__m256i q8s_3 = _mm256_maddubs_epi16(q3h_3, q8_3);
__m256i p16_0 = _mm256_maddubs_epi16(q3l_0, q8_0);
__m256i p16_1 = _mm256_maddubs_epi16(q3l_1, q8_1);
__m256i p16_2 = _mm256_maddubs_epi16(q3l_2, q8_2);
__m256i p16_3 = _mm256_maddubs_epi16(q3l_3, q8_3);
p16_0 = _mm256_sub_epi16(p16_0, q8s_0);
p16_1 = _mm256_sub_epi16(p16_1, q8s_1);
p16_2 = _mm256_sub_epi16(p16_2, q8s_2);
p16_3 = _mm256_sub_epi16(p16_3, q8s_3);
// multiply with scales
p16_0 = _mm256_madd_epi16(_mm256_shuffle_epi8(scales[j], get_scale_shuffle_q3k(is + 0)), p16_0);
p16_1 = _mm256_madd_epi16(_mm256_shuffle_epi8(scales[j], get_scale_shuffle_q3k(is + 1)), p16_1);
p16_2 = _mm256_madd_epi16(_mm256_shuffle_epi8(scales[j], get_scale_shuffle_q3k(is + 2)), p16_2);
p16_3 = _mm256_madd_epi16(_mm256_shuffle_epi8(scales[j], get_scale_shuffle_q3k(is + 3)), p16_3);
// accumulate
p16_0 = _mm256_add_epi32(p16_0, p16_1);
p16_2 = _mm256_add_epi32(p16_2, p16_3);
sumi = _mm256_add_epi32(sumi, _mm256_add_epi32(p16_0, p16_2));
}
// multiply with block scale and accumulate
acc = _mm256_fmadd_ps(_mm256_broadcast_ss(&d), _mm256_cvtepi32_ps(sumi), acc);
}
*s = hsum_float_8(acc);
#elif defined __AVX__
const __m128i m3 = _mm_set1_epi8(3);
const __m128i mone = _mm_set1_epi8(1);
const __m128i m32 = _mm_set1_epi8(32);
const __m128i m2 = _mm_set1_epi8(2);
__m256 acc = _mm256_setzero_ps();
const uint32_t *aux;
for (int i = 0; i < nb; ++i) {
const float d = y[i].d * GGML_FP16_TO_FP32(x[i].d);
const uint8_t * restrict q3 = x[i].qs;
const int8_t * restrict q8 = y[i].qs;
// Set up scales
aux = (const uint32_t *)x[i].scales;
__m128i scales128 = _mm_set_epi32(
((aux[1] >> 4) & kmask2) | (((aux[2] >> 6) & kmask1) << 4),
((aux[0] >> 4) & kmask2) | (((aux[2] >> 4) & kmask1) << 4),
(aux[1] & kmask2) | (((aux[2] >> 2) & kmask1) << 4),
(aux[0] & kmask2) | (((aux[2] >> 0) & kmask1) << 4));
scales128 = _mm_sub_epi8(scales128, m32);
const __m128i scales_0 = _mm_cvtepi8_epi16(scales128);
const __m128i scales_1 = _mm_cvtepi8_epi16(_mm_unpackhi_epi64(scales128, scales128));
const __m128i scales[2] = { scales_0, scales_1 };
// high bit *128*2 from block_q3_K.hmask[QK_K/8]
const __m128i hbits_0 = _mm_loadu_si128((const __m128i*)&x[i].hmask[0]);
const __m128i hbits_1 = _mm_loadu_si128((const __m128i*)&x[i].hmask[16]);
// integer accumulator
__m128i sumi_0 = _mm_setzero_si128();
__m128i sumi_1 = _mm_setzero_si128();
for (int j = 0; j < QK_K/128; ++j) {
// load low 2 bits *64*2 from block_q3_K.qs[QK_K/4]
const __m128i q3bits_0 = _mm_loadu_si128((const __m128i*)q3); q3 += 16;
const __m128i q3bits_1 = _mm_loadu_si128((const __m128i*)q3); q3 += 16;
// prepare low and high bits
const int bit = j << 2;
const __m128i q3l_0 = _mm_and_si128(q3bits_0, m3);
const __m128i q3l_1 = _mm_and_si128(q3bits_1, m3);
const __m128i q3h_0 = _mm_slli_epi16(_mm_srli_epi16(_mm_andnot_si128(hbits_0, _mm_slli_epi16(mone, bit)), bit), 2);
const __m128i q3h_1 = _mm_slli_epi16(_mm_srli_epi16(_mm_andnot_si128(hbits_1, _mm_slli_epi16(mone, bit)), bit), 2);
const __m128i q3l_2 = _mm_and_si128(_mm_srli_epi16(q3bits_0, 2), m3);
const __m128i q3l_3 = _mm_and_si128(_mm_srli_epi16(q3bits_1, 2), m3);
const __m128i q3h_2 = _mm_slli_epi16(_mm_srli_epi16(_mm_andnot_si128(hbits_0, _mm_slli_epi16(mone, bit+1)), bit+1), 2);
const __m128i q3h_3 = _mm_slli_epi16(_mm_srli_epi16(_mm_andnot_si128(hbits_1, _mm_slli_epi16(mone, bit+1)), bit+1), 2);
const __m128i q3l_4 = _mm_and_si128(_mm_srli_epi16(q3bits_0, 4), m3);
const __m128i q3l_5 = _mm_and_si128(_mm_srli_epi16(q3bits_1, 4), m3);
const __m128i q3h_4 = _mm_slli_epi16(_mm_srli_epi16(_mm_andnot_si128(hbits_0, _mm_slli_epi16(mone, bit+2)), bit+2), 2);
const __m128i q3h_5 = _mm_slli_epi16(_mm_srli_epi16(_mm_andnot_si128(hbits_1, _mm_slli_epi16(mone, bit+2)), bit+2), 2);
const __m128i q3l_6 = _mm_and_si128(_mm_srli_epi16(q3bits_0, 6), m3);
const __m128i q3l_7 = _mm_and_si128(_mm_srli_epi16(q3bits_1, 6), m3);
const __m128i q3h_6 = _mm_slli_epi16(_mm_srli_epi16(_mm_andnot_si128(hbits_0, _mm_slli_epi16(mone, bit+3)), bit+3), 2);
const __m128i q3h_7 = _mm_slli_epi16(_mm_srli_epi16(_mm_andnot_si128(hbits_1, _mm_slli_epi16(mone, bit+3)), bit+3), 2);
// load Q8 quants from block_q8_K.qs[QK_K]
const __m128i q8_0 = _mm_loadu_si128((const __m128i*)q8); q8 += 16;
const __m128i q8_1 = _mm_loadu_si128((const __m128i*)q8); q8 += 16;
const __m128i q8_2 = _mm_loadu_si128((const __m128i*)q8); q8 += 16;
const __m128i q8_3 = _mm_loadu_si128((const __m128i*)q8); q8 += 16;
const __m128i q8_4 = _mm_loadu_si128((const __m128i*)q8); q8 += 16;
const __m128i q8_5 = _mm_loadu_si128((const __m128i*)q8); q8 += 16;
const __m128i q8_6 = _mm_loadu_si128((const __m128i*)q8); q8 += 16;
const __m128i q8_7 = _mm_loadu_si128((const __m128i*)q8); q8 += 16;
// Dot product: we multiply the 2 low bits and 1 high bit part separately, so we can use _mm256_maddubs_epi16,
// and then subtract. The high bit part has the 2 already subtracted (and so, it is zero if the high bit was not set,
// and 2 if the high bit was set)
__m128i q8s_0 = _mm_maddubs_epi16(q3h_0, q8_0);
__m128i q8s_1 = _mm_maddubs_epi16(q3h_1, q8_1);
__m128i q8s_2 = _mm_maddubs_epi16(q3h_2, q8_2);
__m128i q8s_3 = _mm_maddubs_epi16(q3h_3, q8_3);
__m128i q8s_4 = _mm_maddubs_epi16(q3h_4, q8_4);
__m128i q8s_5 = _mm_maddubs_epi16(q3h_5, q8_5);
__m128i q8s_6 = _mm_maddubs_epi16(q3h_6, q8_6);
__m128i q8s_7 = _mm_maddubs_epi16(q3h_7, q8_7);
__m128i p16_0 = _mm_maddubs_epi16(q3l_0, q8_0);
__m128i p16_1 = _mm_maddubs_epi16(q3l_1, q8_1);
__m128i p16_2 = _mm_maddubs_epi16(q3l_2, q8_2);
__m128i p16_3 = _mm_maddubs_epi16(q3l_3, q8_3);
__m128i p16_4 = _mm_maddubs_epi16(q3l_4, q8_4);
__m128i p16_5 = _mm_maddubs_epi16(q3l_5, q8_5);
__m128i p16_6 = _mm_maddubs_epi16(q3l_6, q8_6);
__m128i p16_7 = _mm_maddubs_epi16(q3l_7, q8_7);
p16_0 = _mm_sub_epi16(p16_0, q8s_0);
p16_1 = _mm_sub_epi16(p16_1, q8s_1);
p16_2 = _mm_sub_epi16(p16_2, q8s_2);
p16_3 = _mm_sub_epi16(p16_3, q8s_3);
p16_4 = _mm_sub_epi16(p16_4, q8s_4);
p16_5 = _mm_sub_epi16(p16_5, q8s_5);
p16_6 = _mm_sub_epi16(p16_6, q8s_6);
p16_7 = _mm_sub_epi16(p16_7, q8s_7);
// multiply with scales
__m128i shuffle = _mm_set1_epi16(0x0100);
p16_0 = _mm_madd_epi16(_mm_shuffle_epi8(scales[j], shuffle), p16_0);
shuffle = _mm_add_epi16(shuffle, m2);
p16_1 = _mm_madd_epi16(_mm_shuffle_epi8(scales[j], shuffle), p16_1);
shuffle = _mm_add_epi16(shuffle, m2);
p16_2 = _mm_madd_epi16(_mm_shuffle_epi8(scales[j], shuffle), p16_2);
shuffle = _mm_add_epi16(shuffle, m2);
p16_3 = _mm_madd_epi16(_mm_shuffle_epi8(scales[j], shuffle), p16_3);
shuffle = _mm_add_epi16(shuffle, m2);
p16_4 = _mm_madd_epi16(_mm_shuffle_epi8(scales[j], shuffle), p16_4);
shuffle = _mm_add_epi16(shuffle, m2);
p16_5 = _mm_madd_epi16(_mm_shuffle_epi8(scales[j], shuffle), p16_5);
shuffle = _mm_add_epi16(shuffle, m2);
p16_6 = _mm_madd_epi16(_mm_shuffle_epi8(scales[j], shuffle), p16_6);
shuffle = _mm_add_epi16(shuffle, m2);
p16_7 = _mm_madd_epi16(_mm_shuffle_epi8(scales[j], shuffle), p16_7);
// accumulate
p16_0 = _mm_add_epi32(p16_0, p16_1);
p16_2 = _mm_add_epi32(p16_2, p16_3);
p16_4 = _mm_add_epi32(p16_4, p16_5);
p16_6 = _mm_add_epi32(p16_6, p16_7);
sumi_0 = _mm_add_epi32(sumi_0, _mm_add_epi32(p16_0, p16_2));
sumi_1 = _mm_add_epi32(sumi_1, _mm_add_epi32(p16_4, p16_6));
}
// multiply with block scale and accumulate
__m256i sumi = MM256_SET_M128I(sumi_1, sumi_0);
acc = _mm256_add_ps(_mm256_mul_ps(_mm256_broadcast_ss(&d), _mm256_cvtepi32_ps(sumi)), acc);
}
*s = hsum_float_8(acc);
#elif defined __riscv_v_intrinsic
uint32_t aux[3];
uint32_t utmp[4];
float sumf = 0;
for (int i = 0; i < nb; ++i) {
const uint8_t * restrict q3 = x[i].qs;
const uint8_t * restrict qh = x[i].hmask;
const int8_t * restrict q8 = y[i].qs;
memcpy(aux, x[i].scales, 12);
utmp[3] = ((aux[1] >> 4) & kmask2) | (((aux[2] >> 6) & kmask1) << 4);
utmp[2] = ((aux[0] >> 4) & kmask2) | (((aux[2] >> 4) & kmask1) << 4);
utmp[1] = (aux[1] & kmask2) | (((aux[2] >> 2) & kmask1) << 4);
utmp[0] = (aux[0] & kmask2) | (((aux[2] >> 0) & kmask1) << 4);
int8_t * scale = (int8_t *)utmp;
for (int j = 0; j < 16; ++j) scale[j] -= 32;
size_t vl = 32;
uint8_t m = 1;
vint32m1_t vzero = __riscv_vmv_v_x_i32m1(0, 1);
vuint8m1_t vqh = __riscv_vle8_v_u8m1(qh, vl);
int sum_t = 0;
for (int j = 0; j < QK_K; j += 128) {
vl = 32;
// load Q3
vuint8m1_t q3_x = __riscv_vle8_v_u8m1(q3, vl);
vint8m1_t q3_0 = __riscv_vreinterpret_v_u8m1_i8m1(__riscv_vand_vx_u8m1(q3_x, 0x03, vl));
vint8m1_t q3_1 = __riscv_vreinterpret_v_u8m1_i8m1(__riscv_vand_vx_u8m1(__riscv_vsrl_vx_u8m1(q3_x, 0x2, vl), 0x03 , vl));
vint8m1_t q3_2 = __riscv_vreinterpret_v_u8m1_i8m1(__riscv_vand_vx_u8m1(__riscv_vsrl_vx_u8m1(q3_x, 0x4, vl), 0x03 , vl));
vint8m1_t q3_3 = __riscv_vreinterpret_v_u8m1_i8m1(__riscv_vand_vx_u8m1(__riscv_vsrl_vx_u8m1(q3_x, 0x6, vl), 0x03 , vl));
// compute mask for subtraction
vuint8m1_t qh_m0 = __riscv_vand_vx_u8m1(vqh, m, vl);
vbool8_t vmask_0 = __riscv_vmseq_vx_u8m1_b8(qh_m0, 0, vl);
vint8m1_t q3_m0 = __riscv_vsub_vx_i8m1_m(vmask_0, q3_0, 0x4, vl);
m <<= 1;
vuint8m1_t qh_m1 = __riscv_vand_vx_u8m1(vqh, m, vl);
vbool8_t vmask_1 = __riscv_vmseq_vx_u8m1_b8(qh_m1, 0, vl);
vint8m1_t q3_m1 = __riscv_vsub_vx_i8m1_m(vmask_1, q3_1, 0x4, vl);
m <<= 1;
vuint8m1_t qh_m2 = __riscv_vand_vx_u8m1(vqh, m, vl);
vbool8_t vmask_2 = __riscv_vmseq_vx_u8m1_b8(qh_m2, 0, vl);
vint8m1_t q3_m2 = __riscv_vsub_vx_i8m1_m(vmask_2, q3_2, 0x4, vl);
m <<= 1;
vuint8m1_t qh_m3 = __riscv_vand_vx_u8m1(vqh, m, vl);
vbool8_t vmask_3 = __riscv_vmseq_vx_u8m1_b8(qh_m3, 0, vl);
vint8m1_t q3_m3 = __riscv_vsub_vx_i8m1_m(vmask_3, q3_3, 0x4, vl);
m <<= 1;
// load Q8 and take product with Q3
vint16m2_t a0 = __riscv_vwmul_vv_i16m2(q3_m0, __riscv_vle8_v_i8m1(q8, vl), vl);
vint16m2_t a1 = __riscv_vwmul_vv_i16m2(q3_m1, __riscv_vle8_v_i8m1(q8+32, vl), vl);
vint16m2_t a2 = __riscv_vwmul_vv_i16m2(q3_m2, __riscv_vle8_v_i8m1(q8+64, vl), vl);
vint16m2_t a3 = __riscv_vwmul_vv_i16m2(q3_m3, __riscv_vle8_v_i8m1(q8+96, vl), vl);
vl = 16;
// retrieve lane to multiply with scale
vint32m2_t aux0_0 = __riscv_vwmul_vx_i32m2(__riscv_vget_v_i16m2_i16m1(a0, 0), (scale[0]), vl);
vint32m2_t aux0_1 = __riscv_vwmul_vx_i32m2(__riscv_vget_v_i16m2_i16m1(a0, 1), (scale[1]), vl);
vint32m2_t aux1_0 = __riscv_vwmul_vx_i32m2(__riscv_vget_v_i16m2_i16m1(a1, 0), (scale[2]), vl);
vint32m2_t aux1_1 = __riscv_vwmul_vx_i32m2(__riscv_vget_v_i16m2_i16m1(a1, 1), (scale[3]), vl);
vint32m2_t aux2_0 = __riscv_vwmul_vx_i32m2(__riscv_vget_v_i16m2_i16m1(a2, 0), (scale[4]), vl);
vint32m2_t aux2_1 = __riscv_vwmul_vx_i32m2(__riscv_vget_v_i16m2_i16m1(a2, 1), (scale[5]), vl);
vint32m2_t aux3_0 = __riscv_vwmul_vx_i32m2(__riscv_vget_v_i16m2_i16m1(a3, 0), (scale[6]), vl);
vint32m2_t aux3_1 = __riscv_vwmul_vx_i32m2(__riscv_vget_v_i16m2_i16m1(a3, 1), (scale[7]), vl);
vint32m1_t isum0 = __riscv_vredsum_vs_i32m2_i32m1(__riscv_vadd_vv_i32m2(aux0_0, aux0_1, vl), vzero, vl);
vint32m1_t isum1 = __riscv_vredsum_vs_i32m2_i32m1(__riscv_vadd_vv_i32m2(aux1_0, aux1_1, vl), isum0, vl);
vint32m1_t isum2 = __riscv_vredsum_vs_i32m2_i32m1(__riscv_vadd_vv_i32m2(aux2_0, aux2_1, vl), isum1, vl);
vint32m1_t isum3 = __riscv_vredsum_vs_i32m2_i32m1(__riscv_vadd_vv_i32m2(aux3_0, aux3_1, vl), isum2, vl);
sum_t += __riscv_vmv_x_s_i32m1_i32(isum3);
q3 += 32; q8 += 128; scale += 8;
}
const float d = GGML_FP16_TO_FP32(x[i].d) * y[i].d;
sumf += d*sum_t;
}
*s = sumf;
#else
// scalar version
// This function is written like this so the compiler can manage to vectorize most of it
// Using -Ofast, GCC and clang manage to produce code that is within a factor of 2 or so from the
// manually vectorized version above. Every other version I tried would run at least 4 times slower.
// The ideal situation would be if we could just write the code once, and the compiler would
// automatically produce the best possible set of machine instructions, instead of us having to manually
// write vectorized versions for AVX, ARM_NEON, etc.
int8_t aux8[QK_K];
int16_t aux16[8];
float sums [8];
int32_t aux32[8];
memset(sums, 0, 8*sizeof(float));
uint32_t auxs[4];
const int8_t * scales = (const int8_t*)auxs;
float sumf = 0;
for (int i = 0; i < nb; ++i) {
const uint8_t * restrict q3 = x[i].qs;
const uint8_t * restrict hm = x[i].hmask;
const int8_t * restrict q8 = y[i].qs;
memset(aux32, 0, 8*sizeof(int32_t));
int8_t * restrict a = aux8;
uint8_t m = 1;
for (int j = 0; j < QK_K; j += 128) {
for (int l = 0; l < 32; ++l) a[l] = q3[l] & 3;
for (int l = 0; l < 32; ++l) a[l] -= (hm[l] & m ? 0 : 4);
a += 32; m <<= 1;
for (int l = 0; l < 32; ++l) a[l] = (q3[l] >> 2) & 3;
for (int l = 0; l < 32; ++l) a[l] -= (hm[l] & m ? 0 : 4);
a += 32; m <<= 1;
for (int l = 0; l < 32; ++l) a[l] = (q3[l] >> 4) & 3;
for (int l = 0; l < 32; ++l) a[l] -= (hm[l] & m ? 0 : 4);
a += 32; m <<= 1;
for (int l = 0; l < 32; ++l) a[l] = (q3[l] >> 6) & 3;
for (int l = 0; l < 32; ++l) a[l] -= (hm[l] & m ? 0 : 4);
a += 32; m <<= 1;
q3 += 32;
}
a = aux8;
memcpy(auxs, x[i].scales, 12);
uint32_t tmp = auxs[2];
auxs[2] = ((auxs[0] >> 4) & kmask2) | (((tmp >> 4) & kmask1) << 4);
auxs[3] = ((auxs[1] >> 4) & kmask2) | (((tmp >> 6) & kmask1) << 4);
auxs[0] = (auxs[0] & kmask2) | (((tmp >> 0) & kmask1) << 4);
auxs[1] = (auxs[1] & kmask2) | (((tmp >> 2) & kmask1) << 4);
for (int j = 0; j < QK_K/16; ++j) {
for (int l = 0; l < 8; ++l) aux16[l] = q8[l] * a[l];
for (int l = 0; l < 8; ++l) aux32[l] += (scales[j] - 32) * aux16[l];
q8 += 8; a += 8;
for (int l = 0; l < 8; ++l) aux16[l] = q8[l] * a[l];
for (int l = 0; l < 8; ++l) aux32[l] += (scales[j] - 32) * aux16[l];
q8 += 8; a += 8;
}
const float d = GGML_FP16_TO_FP32(x[i].d) * y[i].d;
for (int l = 0; l < 8; ++l) sums[l] += d * aux32[l];
}
for (int l = 0; l < 8; ++l) sumf += sums[l];
*s = sumf;
#endif
} | O1 | c | ggml_vec_dot_q3_K_q8_K:
vpxor %xmm0, %xmm0, %xmm0
cmpl $0x100, %edi # imm = 0x100
jl 0xb9f4c
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
andq $-0x20, %rsp
subq $0xa0, %rsp
shrl $0x8, %edi
leaq 0x20(%rdx), %rax
vxorps %xmm6, %xmm6, %xmm6
xorl %r8d, %r8d
leaq 0xc45a8(%rip), %r9 # 0x17e280
vmovddup 0xf628(%rip), %xmm0 # xmm0 = mem[0,0]
vmovaps %xmm0, 0x30(%rsp)
vpbroadcastb 0xf34d(%rip), %xmm0 # 0xc903c
vmovdqa %xmm0, 0x20(%rsp)
vpbroadcastw 0xf340(%rip), %ymm5 # 0xc903e
vpbroadcastb 0xf339(%rip), %ymm7 # 0xc9040
vmovdqa 0xf531(%rip), %ymm8 # 0xc9240
vmovdqa 0xf549(%rip), %ymm9 # 0xc9260
vmovdqa 0xf561(%rip), %ymm10 # 0xc9280
vmovdqa 0xf579(%rip), %ymm11 # 0xc92a0
imulq $0x124, %r8, %r10 # imm = 0x124
addq %rcx, %r10
addq $0x4, %r10
vmovss -0x4(%r10), %xmm0
vmovss %xmm0, 0x1c(%rsp)
imulq $0x6e, %r8, %r11
movzwl 0x6c(%rdx,%r11), %ebx
vmovss (%r9,%rbx,4), %xmm0
vmovss %xmm0, 0x18(%rsp)
movl 0x60(%rdx,%r11), %ebx
movl 0x64(%rdx,%r11), %r14d
movl 0x68(%rdx,%r11), %r15d
vmovd %ebx, %xmm0
vpinsrd $0x1, %r14d, %xmm0, %xmm0
shrl $0x4, %r14d
vpinsrd $0x2, %r15d, %xmm0, %xmm0
vpinsrd $0x3, %r14d, %xmm0, %xmm0
vpand 0xf5c8(%rip), %xmm0, %xmm0 # 0xc9350
vmovd %r15d, %xmm14
vpinsrd $0x1, %ebx, %xmm14, %xmm14
vpshufd $0x10, %xmm14, %xmm14 # xmm14 = xmm14[0,0,1,0]
vmovdqa 0x30(%rsp), %xmm1
vpsllvd %xmm1, %xmm14, %xmm15
vpsrlvd %xmm1, %xmm14, %xmm14
vpblendd $0xc, %xmm14, %xmm15, %xmm14 # xmm14 = xmm15[0,1],xmm14[2,3]
vpand 0xf5a9(%rip), %xmm14, %xmm14 # 0xc9360
vpor %xmm0, %xmm14, %xmm0
vpaddb 0x20(%rsp), %xmm0, %xmm0
vpmovsxbw %xmm0, %ymm0
vpermq $0x44, %ymm0, %ymm14 # ymm14 = ymm0[0,1,0,1]
vmovdqa %ymm14, 0x40(%rsp)
vpermq $0xee, %ymm0, %ymm0 # ymm0 = ymm0[2,3,2,3]
vmovdqa %ymm0, 0x60(%rsp)
vpcmpeqd %ymm0, %ymm0, %ymm0
vpxor (%rdx,%r11), %ymm0, %ymm14
xorl %r11d, %r11d
vpxor %xmm15, %xmm15, %xmm15
vmovd %r11d, %xmm2
vpsllw %xmm2, %ymm5, %ymm4
vmovdqu (%rax,%r11,8), %ymm0
vpand %ymm4, %ymm14, %ymm4
vpsrlw %xmm2, %ymm4, %ymm2
leal 0x1(%r11), %ebx
vmovd %ebx, %xmm4
vpsllw %xmm4, %ymm5, %ymm3
vpsllw $0x2, %ymm2, %ymm2
vpand %ymm3, %ymm14, %ymm3
vpsrlw %xmm4, %ymm3, %ymm3
leal 0x2(%r11), %ebx
vmovd %ebx, %xmm4
vpsllw %xmm4, %ymm5, %ymm1
vpand %ymm1, %ymm14, %ymm1
vpsrlw %xmm4, %ymm1, %ymm1
leal 0x3(%r11), %ebx
vmovd %ebx, %xmm4
vpsllw %xmm4, %ymm5, %ymm12
vpand %ymm14, %ymm12, %ymm12
vpsrlw %xmm4, %ymm12, %ymm4
vmovdqu (%r10), %ymm12
vpmaddubsw %ymm12, %ymm2, %ymm2
vpand %ymm7, %ymm0, %ymm13
vpmaddubsw %ymm12, %ymm13, %ymm12
vpsrlw $0x2, %ymm0, %ymm13
vpsllw $0x2, %ymm3, %ymm3
vpsubw %ymm2, %ymm12, %ymm2
vmovdqu 0x20(%r10), %ymm12
vpmaddubsw %ymm12, %ymm3, %ymm3
vpand %ymm7, %ymm13, %ymm13
vpmaddubsw %ymm12, %ymm13, %ymm12
vpsrlw $0x4, %ymm0, %ymm13
vpsllw $0x2, %ymm1, %ymm1
vpsubw %ymm3, %ymm12, %ymm3
vmovdqu 0x40(%r10), %ymm12
vpmaddubsw %ymm12, %ymm1, %ymm1
vpand %ymm7, %ymm13, %ymm13
vpmaddubsw %ymm12, %ymm13, %ymm12
vpsrlw $0x6, %ymm0, %ymm0
vpsllw $0x2, %ymm4, %ymm4
vpsubw %ymm1, %ymm12, %ymm1
vmovdqu 0x60(%r10), %ymm12
vpmaddubsw %ymm12, %ymm4, %ymm4
vpand %ymm7, %ymm0, %ymm0
vpmaddubsw %ymm12, %ymm0, %ymm0
vpsubw %ymm4, %ymm0, %ymm0
vmovdqa 0x40(%rsp,%r11,8), %ymm4
vpshufb %ymm8, %ymm4, %ymm12
vpmaddwd %ymm2, %ymm12, %ymm2
vpaddd %ymm2, %ymm15, %ymm2
vpshufb %ymm9, %ymm4, %ymm12
vpmaddwd %ymm3, %ymm12, %ymm3
vpshufb %ymm10, %ymm4, %ymm12
vpmaddwd %ymm1, %ymm12, %ymm1
vpaddd %ymm1, %ymm3, %ymm1
vpaddd %ymm1, %ymm2, %ymm1
vpshufb %ymm11, %ymm4, %ymm2
vpmaddwd %ymm0, %ymm2, %ymm0
vpaddd %ymm0, %ymm1, %ymm15
addq $0x4, %r11
subq $-0x80, %r10
cmpq $0x4, %r11
je 0xb9df0
vmovss 0x18(%rsp), %xmm0
vmulss 0x1c(%rsp), %xmm0, %xmm0
vbroadcastss %xmm0, %ymm12
vcvtdq2ps %ymm15, %ymm0
vfmadd213ps %ymm6, %ymm12, %ymm0 # ymm0 = (ymm12 * ymm0) + ymm6
incq %r8
addq $0x6e, %rax
vmovaps %ymm0, %ymm6
cmpq %rdi, %r8
jne 0xb9d27
leaq -0x18(%rbp), %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
vextracti128 $0x1, %ymm0, %xmm1
vaddps %xmm0, %xmm1, %xmm0
vshufpd $0x1, %xmm0, %xmm0, %xmm1 # xmm1 = xmm0[1,0]
vaddps %xmm1, %xmm0, %xmm0
vhaddps %xmm0, %xmm0, %xmm0
vmovss %xmm0, (%rsi)
vzeroupper
retq
| ggml_vec_dot_q3_K_q8_K:
vpxor xmm0, xmm0, xmm0
cmp edi, 100h
jl loc_B9F4C
push rbp
mov rbp, rsp
push r15
push r14
push rbx
and rsp, 0FFFFFFFFFFFFFFE0h
sub rsp, 0A0h
shr edi, 8
lea rax, [rdx+20h]
vxorps xmm6, xmm6, xmm6
xor r8d, r8d
lea r9, ggml_table_f32_f16
vmovddup xmm0, cs:qword_C9308
vmovaps [rsp+0C0h+var_90], xmm0
vpbroadcastb xmm0, cs:byte_C903C
vmovdqa [rsp+0C0h+var_A0], xmm0
vpbroadcastw ymm5, cs:word_C903E
vpbroadcastb ymm7, cs:byte_C9040
vmovdqa ymm8, cs:ymmword_C9240
vmovdqa ymm9, cs:ymmword_C9260
vmovdqa ymm10, cs:ymmword_C9280
vmovdqa ymm11, cs:ymmword_C92A0
loc_B9D27:
imul r10, r8, 124h
add r10, rcx
add r10, 4
vmovss xmm0, dword ptr [r10-4]
vmovss [rsp+0C0h+var_A4], xmm0
imul r11, r8, 6Eh ; 'n'
movzx ebx, word ptr [rdx+r11+6Ch]
vmovss xmm0, dword ptr [r9+rbx*4]
vmovss [rsp+0C0h+var_A8], xmm0
mov ebx, [rdx+r11+60h]
mov r14d, [rdx+r11+64h]
mov r15d, [rdx+r11+68h]
vmovd xmm0, ebx
vpinsrd xmm0, xmm0, r14d, 1
shr r14d, 4
vpinsrd xmm0, xmm0, r15d, 2
vpinsrd xmm0, xmm0, r14d, 3
vpand xmm0, xmm0, cs:xmmword_C9350
vmovd xmm14, r15d
vpinsrd xmm14, xmm14, ebx, 1
vpshufd xmm14, xmm14, 10h
vmovdqa xmm1, [rsp+0C0h+var_90]
vpsllvd xmm15, xmm14, xmm1
vpsrlvd xmm14, xmm14, xmm1
vpblendd xmm14, xmm15, xmm14, 0Ch
vpand xmm14, xmm14, cs:xmmword_C9360
vpor xmm0, xmm14, xmm0
vpaddb xmm0, xmm0, [rsp+0C0h+var_A0]
vpmovsxbw ymm0, xmm0
vpermq ymm14, ymm0, 44h ; 'D'
vmovdqa [rsp+0C0h+var_80], ymm14
vpermq ymm0, ymm0, 0EEh
vmovdqa [rsp+0C0h+var_60], ymm0
vpcmpeqd ymm0, ymm0, ymm0
vpxor ymm14, ymm0, ymmword ptr [rdx+r11]
xor r11d, r11d
vpxor xmm15, xmm15, xmm15
loc_B9DF0:
vmovd xmm2, r11d
vpsllw ymm4, ymm5, xmm2
vmovdqu ymm0, ymmword ptr [rax+r11*8]
vpand ymm4, ymm14, ymm4
vpsrlw ymm2, ymm4, xmm2
lea ebx, [r11+1]
vmovd xmm4, ebx
vpsllw ymm3, ymm5, xmm4
vpsllw ymm2, ymm2, 2
vpand ymm3, ymm14, ymm3
vpsrlw ymm3, ymm3, xmm4
lea ebx, [r11+2]
vmovd xmm4, ebx
vpsllw ymm1, ymm5, xmm4
vpand ymm1, ymm14, ymm1
vpsrlw ymm1, ymm1, xmm4
lea ebx, [r11+3]
vmovd xmm4, ebx
vpsllw ymm12, ymm5, xmm4
vpand ymm12, ymm12, ymm14
vpsrlw ymm4, ymm12, xmm4
vmovdqu ymm12, ymmword ptr [r10]
vpmaddubsw ymm2, ymm2, ymm12
vpand ymm13, ymm0, ymm7
vpmaddubsw ymm12, ymm13, ymm12
vpsrlw ymm13, ymm0, 2
vpsllw ymm3, ymm3, 2
vpsubw ymm2, ymm12, ymm2
vmovdqu ymm12, ymmword ptr [r10+20h]
vpmaddubsw ymm3, ymm3, ymm12
vpand ymm13, ymm13, ymm7
vpmaddubsw ymm12, ymm13, ymm12
vpsrlw ymm13, ymm0, 4
vpsllw ymm1, ymm1, 2
vpsubw ymm3, ymm12, ymm3
vmovdqu ymm12, ymmword ptr [r10+40h]
vpmaddubsw ymm1, ymm1, ymm12
vpand ymm13, ymm13, ymm7
vpmaddubsw ymm12, ymm13, ymm12
vpsrlw ymm0, ymm0, 6
vpsllw ymm4, ymm4, 2
vpsubw ymm1, ymm12, ymm1
vmovdqu ymm12, ymmword ptr [r10+60h]
vpmaddubsw ymm4, ymm4, ymm12
vpand ymm0, ymm0, ymm7
vpmaddubsw ymm0, ymm0, ymm12
vpsubw ymm0, ymm0, ymm4
vmovdqa ymm4, [rsp+r11*8+0C0h+var_80]
vpshufb ymm12, ymm4, ymm8
vpmaddwd ymm2, ymm12, ymm2
vpaddd ymm2, ymm15, ymm2
vpshufb ymm12, ymm4, ymm9
vpmaddwd ymm3, ymm12, ymm3
vpshufb ymm12, ymm4, ymm10
vpmaddwd ymm1, ymm12, ymm1
vpaddd ymm1, ymm3, ymm1
vpaddd ymm1, ymm2, ymm1
vpshufb ymm2, ymm4, ymm11
vpmaddwd ymm0, ymm2, ymm0
vpaddd ymm15, ymm1, ymm0
add r11, 4
sub r10, 0FFFFFFFFFFFFFF80h
cmp r11, 4
jz loc_B9DF0
vmovss xmm0, [rsp+0C0h+var_A8]
vmulss xmm0, xmm0, [rsp+0C0h+var_A4]
vbroadcastss ymm12, xmm0
vcvtdq2ps ymm0, ymm15
vfmadd213ps ymm0, ymm12, ymm6
inc r8
add rax, 6Eh ; 'n'
vmovaps ymm6, ymm0
cmp r8, rdi
jnz loc_B9D27
lea rsp, [rbp-18h]
pop rbx
pop r14
pop r15
pop rbp
loc_B9F4C:
vextracti128 xmm1, ymm0, 1
vaddps xmm0, xmm1, xmm0
vshufpd xmm1, xmm0, xmm0, 1
vaddps xmm0, xmm0, xmm1
vhaddps xmm0, xmm0, xmm0
vmovss dword ptr [rsi], xmm0
vzeroupper
retn
| void ggml_vec_dot_q3_K_q8_K(
int a1,
long long _RSI,
long long a3,
long long a4,
__m128 _XMM0,
double a6,
double a7,
double a8,
double a9,
double a10,
__m128 _XMM6)
{
long long v14; // rdi
long long v17; // r8
__asm { vpxor xmm0, xmm0, xmm0 }
if ( a1 >= 256 )
{
v14 = (unsigned int)a1 >> 8;
_RAX = a3 + 32;
__asm { vxorps xmm6, xmm6, xmm6 }
v17 = 0LL;
_R9 = &ggml_table_f32_f16;
__asm
{
vmovddup xmm0, cs:qword_C9308
vmovaps [rsp+0C0h+var_90], xmm0
vpbroadcastb xmm0, cs:byte_C903C
vmovdqa [rsp+0C0h+var_A0], xmm0
vpbroadcastw ymm5, cs:word_C903E
vpbroadcastb ymm7, cs:byte_C9040
vmovdqa ymm8, cs:ymmword_C9240
vmovdqa ymm9, cs:ymmword_C9260
vmovdqa ymm10, cs:ymmword_C9280
vmovdqa ymm11, cs:ymmword_C92A0
}
do
{
_R10 = a4 + 292 * v17 + 4;
__asm
{
vmovss xmm0, dword ptr [r10-4]
vmovss [rsp+0C0h+var_A4], xmm0
}
_RBX = *(unsigned __int16 *)(a3 + 110 * v17 + 108);
__asm
{
vmovss xmm0, dword ptr [r9+rbx*4]
vmovss [rsp+0C0h+var_A8], xmm0
}
LODWORD(_RBX) = *(_DWORD *)(a3 + 110 * v17 + 96);
_R15D = *(_DWORD *)(a3 + 110 * v17 + 104);
__asm
{
vmovd xmm0, ebx
vpinsrd xmm0, xmm0, r14d, 1
vpinsrd xmm0, xmm0, r15d, 2
vpinsrd xmm0, xmm0, r14d, 3
vpand xmm0, xmm0, cs:xmmword_C9350
vmovd xmm14, r15d
vpinsrd xmm14, xmm14, ebx, 1
vpshufd xmm14, xmm14, 10h
vmovdqa xmm1, [rsp+0C0h+var_90]
vpsllvd xmm15, xmm14, xmm1
vpsrlvd xmm14, xmm14, xmm1
vpblendd xmm14, xmm15, xmm14, 0Ch
vpand xmm14, xmm14, cs:xmmword_C9360
vpor xmm0, xmm14, xmm0
vpaddb xmm0, xmm0, [rsp+0C0h+var_A0]
vpmovsxbw ymm0, xmm0
vpermq ymm14, ymm0, 44h ; 'D'
vmovdqa [rsp+0C0h+var_80], ymm14
vpermq ymm0, ymm0, 0EEh
vmovdqa [rsp+0C0h+var_60], ymm0
vpcmpeqd ymm0, ymm0, ymm0
vpxor ymm14, ymm0, ymmword ptr [rdx+r11]
}
_R11 = 0LL;
__asm { vpxor xmm15, xmm15, xmm15 }
do
{
__asm
{
vmovd xmm2, r11d
vpsllw ymm4, ymm5, xmm2
vmovdqu ymm0, ymmword ptr [rax+r11*8]
vpand ymm4, ymm14, ymm4
vpsrlw ymm2, ymm4, xmm2
}
_EBX = _R11 + 1;
__asm
{
vmovd xmm4, ebx
vpsllw ymm3, ymm5, xmm4
vpsllw ymm2, ymm2, 2
vpand ymm3, ymm14, ymm3
vpsrlw ymm3, ymm3, xmm4
}
_EBX = _R11 + 2;
__asm
{
vmovd xmm4, ebx
vpsllw ymm1, ymm5, xmm4
vpand ymm1, ymm14, ymm1
vpsrlw ymm1, ymm1, xmm4
}
_EBX = _R11 + 3;
__asm
{
vmovd xmm4, ebx
vpsllw ymm12, ymm5, xmm4
vpand ymm12, ymm12, ymm14
vpsrlw ymm4, ymm12, xmm4
vmovdqu ymm12, ymmword ptr [r10]
vpmaddubsw ymm2, ymm2, ymm12
vpand ymm13, ymm0, ymm7
vpmaddubsw ymm12, ymm13, ymm12
vpsrlw ymm13, ymm0, 2
vpsllw ymm3, ymm3, 2
vpsubw ymm2, ymm12, ymm2
vmovdqu ymm12, ymmword ptr [r10+20h]
vpmaddubsw ymm3, ymm3, ymm12
vpand ymm13, ymm13, ymm7
vpmaddubsw ymm12, ymm13, ymm12
vpsrlw ymm13, ymm0, 4
vpsllw ymm1, ymm1, 2
vpsubw ymm3, ymm12, ymm3
vmovdqu ymm12, ymmword ptr [r10+40h]
vpmaddubsw ymm1, ymm1, ymm12
vpand ymm13, ymm13, ymm7
vpmaddubsw ymm12, ymm13, ymm12
vpsrlw ymm0, ymm0, 6
vpsllw ymm4, ymm4, 2
vpsubw ymm1, ymm12, ymm1
vmovdqu ymm12, ymmword ptr [r10+60h]
vpmaddubsw ymm4, ymm4, ymm12
vpand ymm0, ymm0, ymm7
vpmaddubsw ymm0, ymm0, ymm12
vpsubw ymm0, ymm0, ymm4
vmovdqa ymm4, [rsp+r11*8+0C0h+var_80]
vpshufb ymm12, ymm4, ymm8
vpmaddwd ymm2, ymm12, ymm2
vpaddd ymm2, ymm15, ymm2
vpshufb ymm12, ymm4, ymm9
vpmaddwd ymm3, ymm12, ymm3
vpshufb ymm12, ymm4, ymm10
vpmaddwd ymm1, ymm12, ymm1
vpaddd ymm1, ymm3, ymm1
vpaddd ymm1, ymm2, ymm1
vpshufb ymm2, ymm4, ymm11
vpmaddwd ymm0, ymm2, ymm0
vpaddd ymm15, ymm1, ymm0
}
_R11 += 4LL;
_R10 += 128LL;
}
while ( _R11 == 4 );
__asm
{
vmovss xmm0, [rsp+0C0h+var_A8]
vmulss xmm0, xmm0, [rsp+0C0h+var_A4]
vbroadcastss ymm12, xmm0
vcvtdq2ps ymm0, ymm15
vfmadd213ps ymm0, ymm12, ymm6
}
++v17;
_RAX += 110LL;
__asm { vmovaps ymm6, ymm0 }
}
while ( v17 != v14 );
}
__asm
{
vextracti128 xmm1, ymm0, 1
vaddps xmm0, xmm1, xmm0
vshufpd xmm1, xmm0, xmm0, 1
vaddps xmm0, xmm0, xmm1
vhaddps xmm0, xmm0, xmm0
vmovss dword ptr [rsi], xmm0
vzeroupper
}
}
| |||
43,816 | ggml_vec_dot_q3_K_q8_K | 7CodeWizard[P]stablediffusion/ggml/src/ggml-quants.c | void ggml_vec_dot_q3_K_q8_K(const int n, float * restrict s, const void * restrict vx, const void * restrict vy) {
assert(n % QK_K == 0);
const uint32_t kmask1 = 0x03030303;
const uint32_t kmask2 = 0x0f0f0f0f;
const block_q3_K * restrict x = vx;
const block_q8_K * restrict y = vy;
const int nb = n / QK_K;
#ifdef __ARM_NEON
uint32_t aux[3];
uint32_t utmp[4];
const uint8x16_t m3b = vdupq_n_u8(0x3);
const int32x4_t vzero = vdupq_n_s32(0);
const uint8x16_t m0 = vdupq_n_u8(1);
const uint8x16_t m1 = vshlq_n_u8(m0, 1);
const uint8x16_t m2 = vshlq_n_u8(m0, 2);
const uint8x16_t m3 = vshlq_n_u8(m0, 3);
const int8_t m32 = 32;
ggml_int8x16x4_t q3bytes;
float sum = 0;
for (int i = 0; i < nb; ++i) {
const float d = y[i].d * GGML_FP16_TO_FP32(x[i].d);
const uint8_t * restrict q3 = x[i].qs;
const uint8_t * restrict qh = x[i].hmask;
const int8_t * restrict q8 = y[i].qs;
ggml_uint8x16x2_t qhbits = ggml_vld1q_u8_x2(qh);
ggml_uint8x16x4_t q3h;
int32_t isum = 0;
// Set up scales
memcpy(aux, x[i].scales, 12);
utmp[3] = ((aux[1] >> 4) & kmask2) | (((aux[2] >> 6) & kmask1) << 4);
utmp[2] = ((aux[0] >> 4) & kmask2) | (((aux[2] >> 4) & kmask1) << 4);
utmp[1] = (aux[1] & kmask2) | (((aux[2] >> 2) & kmask1) << 4);
utmp[0] = (aux[0] & kmask2) | (((aux[2] >> 0) & kmask1) << 4);
int8_t * scale = (int8_t *)utmp;
for (int j = 0; j < 16; ++j) scale[j] -= m32;
for (int j = 0; j < QK_K/128; ++j) {
const ggml_uint8x16x2_t q3bits = ggml_vld1q_u8_x2(q3); q3 += 32;
const ggml_int8x16x4_t q8bytes_1 = ggml_vld1q_s8_x4(q8); q8 += 64;
const ggml_int8x16x4_t q8bytes_2 = ggml_vld1q_s8_x4(q8); q8 += 64;
q3h.val[0] = vshlq_n_u8(vbicq_u8(m0, qhbits.val[0]), 2);
q3h.val[1] = vshlq_n_u8(vbicq_u8(m0, qhbits.val[1]), 2);
q3h.val[2] = vshlq_n_u8(vbicq_u8(m1, qhbits.val[0]), 1);
q3h.val[3] = vshlq_n_u8(vbicq_u8(m1, qhbits.val[1]), 1);
q3bytes.val[0] = vsubq_s8(vreinterpretq_s8_u8(vandq_u8(q3bits.val[0], m3b)), vreinterpretq_s8_u8(q3h.val[0]));
q3bytes.val[1] = vsubq_s8(vreinterpretq_s8_u8(vandq_u8(q3bits.val[1], m3b)), vreinterpretq_s8_u8(q3h.val[1]));
q3bytes.val[2] = vsubq_s8(vreinterpretq_s8_u8(vandq_u8(vshrq_n_u8(q3bits.val[0], 2), m3b)), vreinterpretq_s8_u8(q3h.val[2]));
q3bytes.val[3] = vsubq_s8(vreinterpretq_s8_u8(vandq_u8(vshrq_n_u8(q3bits.val[1], 2), m3b)), vreinterpretq_s8_u8(q3h.val[3]));
isum += vaddvq_s32(ggml_vdotq_s32(vzero, q3bytes.val[0], q8bytes_1.val[0])) * scale[0];
isum += vaddvq_s32(ggml_vdotq_s32(vzero, q3bytes.val[1], q8bytes_1.val[1])) * scale[1];
isum += vaddvq_s32(ggml_vdotq_s32(vzero, q3bytes.val[2], q8bytes_1.val[2])) * scale[2];
isum += vaddvq_s32(ggml_vdotq_s32(vzero, q3bytes.val[3], q8bytes_1.val[3])) * scale[3];
scale += 4;
q3h.val[0] = vbicq_u8(m2, qhbits.val[0]);
q3h.val[1] = vbicq_u8(m2, qhbits.val[1]);
q3h.val[2] = vshrq_n_u8(vbicq_u8(m3, qhbits.val[0]), 1);
q3h.val[3] = vshrq_n_u8(vbicq_u8(m3, qhbits.val[1]), 1);
q3bytes.val[0] = vsubq_s8(vreinterpretq_s8_u8(vandq_u8(vshrq_n_u8(q3bits.val[0], 4), m3b)), vreinterpretq_s8_u8(q3h.val[0]));
q3bytes.val[1] = vsubq_s8(vreinterpretq_s8_u8(vandq_u8(vshrq_n_u8(q3bits.val[1], 4), m3b)), vreinterpretq_s8_u8(q3h.val[1]));
q3bytes.val[2] = vsubq_s8(vreinterpretq_s8_u8(vandq_u8(vshrq_n_u8(q3bits.val[0], 6), m3b)), vreinterpretq_s8_u8(q3h.val[2]));
q3bytes.val[3] = vsubq_s8(vreinterpretq_s8_u8(vandq_u8(vshrq_n_u8(q3bits.val[1], 6), m3b)), vreinterpretq_s8_u8(q3h.val[3]));
isum += vaddvq_s32(ggml_vdotq_s32(vzero, q3bytes.val[0], q8bytes_2.val[0])) * scale[0];
isum += vaddvq_s32(ggml_vdotq_s32(vzero, q3bytes.val[1], q8bytes_2.val[1])) * scale[1];
isum += vaddvq_s32(ggml_vdotq_s32(vzero, q3bytes.val[2], q8bytes_2.val[2])) * scale[2];
isum += vaddvq_s32(ggml_vdotq_s32(vzero, q3bytes.val[3], q8bytes_2.val[3])) * scale[3];
scale += 4;
if (j == 0) {
qhbits.val[0] = vshrq_n_u8(qhbits.val[0], 4);
qhbits.val[1] = vshrq_n_u8(qhbits.val[1], 4);
}
}
sum += d * isum;
}
*s = sum;
#elif defined __AVX2__
const __m256i m3 = _mm256_set1_epi8(3);
const __m256i mone = _mm256_set1_epi8(1);
const __m128i m32 = _mm_set1_epi8(32);
__m256 acc = _mm256_setzero_ps();
uint32_t aux[3];
for (int i = 0; i < nb; ++i) {
const float d = y[i].d * GGML_FP16_TO_FP32(x[i].d);
const uint8_t * restrict q3 = x[i].qs;
const int8_t * restrict q8 = y[i].qs;
// Set up scales
memcpy(aux, x[i].scales, 12);
__m128i scales128 = _mm_set_epi32(
((aux[1] >> 4) & kmask2) | (((aux[2] >> 6) & kmask1) << 4),
((aux[0] >> 4) & kmask2) | (((aux[2] >> 4) & kmask1) << 4),
(aux[1] & kmask2) | (((aux[2] >> 2) & kmask1) << 4),
(aux[0] & kmask2) | (((aux[2] >> 0) & kmask1) << 4));
scales128 = _mm_sub_epi8(scales128, m32);
const __m256i all_scales = _mm256_cvtepi8_epi16(scales128);
const __m128i l_scales = _mm256_extracti128_si256(all_scales, 0);
const __m128i h_scales = _mm256_extracti128_si256(all_scales, 1);
const __m256i scales[2] = {MM256_SET_M128I(l_scales, l_scales), MM256_SET_M128I(h_scales, h_scales)};
// high bit
const __m256i hbits = _mm256_loadu_si256((const __m256i*)x[i].hmask);
// integer accumulator
__m256i sumi = _mm256_setzero_si256();
int bit = 0;
int is = 0;
for (int j = 0; j < QK_K/128; ++j) {
// load low 2 bits
const __m256i q3bits = _mm256_loadu_si256((const __m256i*)q3); q3 += 32;
// prepare low and high bits
const __m256i q3l_0 = _mm256_and_si256(q3bits, m3);
const __m256i q3h_0 = _mm256_slli_epi16(_mm256_srli_epi16(_mm256_andnot_si256(hbits, _mm256_slli_epi16(mone, bit)), bit), 2);
++bit;
const __m256i q3l_1 = _mm256_and_si256(_mm256_srli_epi16(q3bits, 2), m3);
const __m256i q3h_1 = _mm256_slli_epi16(_mm256_srli_epi16(_mm256_andnot_si256(hbits, _mm256_slli_epi16(mone, bit)), bit), 2);
++bit;
const __m256i q3l_2 = _mm256_and_si256(_mm256_srli_epi16(q3bits, 4), m3);
const __m256i q3h_2 = _mm256_slli_epi16(_mm256_srli_epi16(_mm256_andnot_si256(hbits, _mm256_slli_epi16(mone, bit)), bit), 2);
++bit;
const __m256i q3l_3 = _mm256_and_si256(_mm256_srli_epi16(q3bits, 6), m3);
const __m256i q3h_3 = _mm256_slli_epi16(_mm256_srli_epi16(_mm256_andnot_si256(hbits, _mm256_slli_epi16(mone, bit)), bit), 2);
++bit;
// load Q8 quants
const __m256i q8_0 = _mm256_loadu_si256((const __m256i*)q8); q8 += 32;
const __m256i q8_1 = _mm256_loadu_si256((const __m256i*)q8); q8 += 32;
const __m256i q8_2 = _mm256_loadu_si256((const __m256i*)q8); q8 += 32;
const __m256i q8_3 = _mm256_loadu_si256((const __m256i*)q8); q8 += 32;
// Dot product: we multiply the 2 low bits and 1 high bit part separately, so we can use _mm256_maddubs_epi16,
// and then subtract. The high bit part has the 2 already subtracted (and so, it is zero if the high bit was not set,
// and 2 if the high bit was set)
__m256i q8s_0 = _mm256_maddubs_epi16(q3h_0, q8_0);
__m256i q8s_1 = _mm256_maddubs_epi16(q3h_1, q8_1);
__m256i q8s_2 = _mm256_maddubs_epi16(q3h_2, q8_2);
__m256i q8s_3 = _mm256_maddubs_epi16(q3h_3, q8_3);
__m256i p16_0 = _mm256_maddubs_epi16(q3l_0, q8_0);
__m256i p16_1 = _mm256_maddubs_epi16(q3l_1, q8_1);
__m256i p16_2 = _mm256_maddubs_epi16(q3l_2, q8_2);
__m256i p16_3 = _mm256_maddubs_epi16(q3l_3, q8_3);
p16_0 = _mm256_sub_epi16(p16_0, q8s_0);
p16_1 = _mm256_sub_epi16(p16_1, q8s_1);
p16_2 = _mm256_sub_epi16(p16_2, q8s_2);
p16_3 = _mm256_sub_epi16(p16_3, q8s_3);
// multiply with scales
p16_0 = _mm256_madd_epi16(_mm256_shuffle_epi8(scales[j], get_scale_shuffle_q3k(is + 0)), p16_0);
p16_1 = _mm256_madd_epi16(_mm256_shuffle_epi8(scales[j], get_scale_shuffle_q3k(is + 1)), p16_1);
p16_2 = _mm256_madd_epi16(_mm256_shuffle_epi8(scales[j], get_scale_shuffle_q3k(is + 2)), p16_2);
p16_3 = _mm256_madd_epi16(_mm256_shuffle_epi8(scales[j], get_scale_shuffle_q3k(is + 3)), p16_3);
// accumulate
p16_0 = _mm256_add_epi32(p16_0, p16_1);
p16_2 = _mm256_add_epi32(p16_2, p16_3);
sumi = _mm256_add_epi32(sumi, _mm256_add_epi32(p16_0, p16_2));
}
// multiply with block scale and accumulate
acc = _mm256_fmadd_ps(_mm256_broadcast_ss(&d), _mm256_cvtepi32_ps(sumi), acc);
}
*s = hsum_float_8(acc);
#elif defined __AVX__
const __m128i m3 = _mm_set1_epi8(3);
const __m128i mone = _mm_set1_epi8(1);
const __m128i m32 = _mm_set1_epi8(32);
const __m128i m2 = _mm_set1_epi8(2);
__m256 acc = _mm256_setzero_ps();
const uint32_t *aux;
for (int i = 0; i < nb; ++i) {
const float d = y[i].d * GGML_FP16_TO_FP32(x[i].d);
const uint8_t * restrict q3 = x[i].qs;
const int8_t * restrict q8 = y[i].qs;
// Set up scales
aux = (const uint32_t *)x[i].scales;
__m128i scales128 = _mm_set_epi32(
((aux[1] >> 4) & kmask2) | (((aux[2] >> 6) & kmask1) << 4),
((aux[0] >> 4) & kmask2) | (((aux[2] >> 4) & kmask1) << 4),
(aux[1] & kmask2) | (((aux[2] >> 2) & kmask1) << 4),
(aux[0] & kmask2) | (((aux[2] >> 0) & kmask1) << 4));
scales128 = _mm_sub_epi8(scales128, m32);
const __m128i scales_0 = _mm_cvtepi8_epi16(scales128);
const __m128i scales_1 = _mm_cvtepi8_epi16(_mm_unpackhi_epi64(scales128, scales128));
const __m128i scales[2] = { scales_0, scales_1 };
// high bit *128*2 from block_q3_K.hmask[QK_K/8]
const __m128i hbits_0 = _mm_loadu_si128((const __m128i*)&x[i].hmask[0]);
const __m128i hbits_1 = _mm_loadu_si128((const __m128i*)&x[i].hmask[16]);
// integer accumulator
__m128i sumi_0 = _mm_setzero_si128();
__m128i sumi_1 = _mm_setzero_si128();
for (int j = 0; j < QK_K/128; ++j) {
// load low 2 bits *64*2 from block_q3_K.qs[QK_K/4]
const __m128i q3bits_0 = _mm_loadu_si128((const __m128i*)q3); q3 += 16;
const __m128i q3bits_1 = _mm_loadu_si128((const __m128i*)q3); q3 += 16;
// prepare low and high bits
const int bit = j << 2;
const __m128i q3l_0 = _mm_and_si128(q3bits_0, m3);
const __m128i q3l_1 = _mm_and_si128(q3bits_1, m3);
const __m128i q3h_0 = _mm_slli_epi16(_mm_srli_epi16(_mm_andnot_si128(hbits_0, _mm_slli_epi16(mone, bit)), bit), 2);
const __m128i q3h_1 = _mm_slli_epi16(_mm_srli_epi16(_mm_andnot_si128(hbits_1, _mm_slli_epi16(mone, bit)), bit), 2);
const __m128i q3l_2 = _mm_and_si128(_mm_srli_epi16(q3bits_0, 2), m3);
const __m128i q3l_3 = _mm_and_si128(_mm_srli_epi16(q3bits_1, 2), m3);
const __m128i q3h_2 = _mm_slli_epi16(_mm_srli_epi16(_mm_andnot_si128(hbits_0, _mm_slli_epi16(mone, bit+1)), bit+1), 2);
const __m128i q3h_3 = _mm_slli_epi16(_mm_srli_epi16(_mm_andnot_si128(hbits_1, _mm_slli_epi16(mone, bit+1)), bit+1), 2);
const __m128i q3l_4 = _mm_and_si128(_mm_srli_epi16(q3bits_0, 4), m3);
const __m128i q3l_5 = _mm_and_si128(_mm_srli_epi16(q3bits_1, 4), m3);
const __m128i q3h_4 = _mm_slli_epi16(_mm_srli_epi16(_mm_andnot_si128(hbits_0, _mm_slli_epi16(mone, bit+2)), bit+2), 2);
const __m128i q3h_5 = _mm_slli_epi16(_mm_srli_epi16(_mm_andnot_si128(hbits_1, _mm_slli_epi16(mone, bit+2)), bit+2), 2);
const __m128i q3l_6 = _mm_and_si128(_mm_srli_epi16(q3bits_0, 6), m3);
const __m128i q3l_7 = _mm_and_si128(_mm_srli_epi16(q3bits_1, 6), m3);
const __m128i q3h_6 = _mm_slli_epi16(_mm_srli_epi16(_mm_andnot_si128(hbits_0, _mm_slli_epi16(mone, bit+3)), bit+3), 2);
const __m128i q3h_7 = _mm_slli_epi16(_mm_srli_epi16(_mm_andnot_si128(hbits_1, _mm_slli_epi16(mone, bit+3)), bit+3), 2);
// load Q8 quants from block_q8_K.qs[QK_K]
const __m128i q8_0 = _mm_loadu_si128((const __m128i*)q8); q8 += 16;
const __m128i q8_1 = _mm_loadu_si128((const __m128i*)q8); q8 += 16;
const __m128i q8_2 = _mm_loadu_si128((const __m128i*)q8); q8 += 16;
const __m128i q8_3 = _mm_loadu_si128((const __m128i*)q8); q8 += 16;
const __m128i q8_4 = _mm_loadu_si128((const __m128i*)q8); q8 += 16;
const __m128i q8_5 = _mm_loadu_si128((const __m128i*)q8); q8 += 16;
const __m128i q8_6 = _mm_loadu_si128((const __m128i*)q8); q8 += 16;
const __m128i q8_7 = _mm_loadu_si128((const __m128i*)q8); q8 += 16;
// Dot product: we multiply the 2 low bits and 1 high bit part separately, so we can use _mm256_maddubs_epi16,
// and then subtract. The high bit part has the 2 already subtracted (and so, it is zero if the high bit was not set,
// and 2 if the high bit was set)
__m128i q8s_0 = _mm_maddubs_epi16(q3h_0, q8_0);
__m128i q8s_1 = _mm_maddubs_epi16(q3h_1, q8_1);
__m128i q8s_2 = _mm_maddubs_epi16(q3h_2, q8_2);
__m128i q8s_3 = _mm_maddubs_epi16(q3h_3, q8_3);
__m128i q8s_4 = _mm_maddubs_epi16(q3h_4, q8_4);
__m128i q8s_5 = _mm_maddubs_epi16(q3h_5, q8_5);
__m128i q8s_6 = _mm_maddubs_epi16(q3h_6, q8_6);
__m128i q8s_7 = _mm_maddubs_epi16(q3h_7, q8_7);
__m128i p16_0 = _mm_maddubs_epi16(q3l_0, q8_0);
__m128i p16_1 = _mm_maddubs_epi16(q3l_1, q8_1);
__m128i p16_2 = _mm_maddubs_epi16(q3l_2, q8_2);
__m128i p16_3 = _mm_maddubs_epi16(q3l_3, q8_3);
__m128i p16_4 = _mm_maddubs_epi16(q3l_4, q8_4);
__m128i p16_5 = _mm_maddubs_epi16(q3l_5, q8_5);
__m128i p16_6 = _mm_maddubs_epi16(q3l_6, q8_6);
__m128i p16_7 = _mm_maddubs_epi16(q3l_7, q8_7);
p16_0 = _mm_sub_epi16(p16_0, q8s_0);
p16_1 = _mm_sub_epi16(p16_1, q8s_1);
p16_2 = _mm_sub_epi16(p16_2, q8s_2);
p16_3 = _mm_sub_epi16(p16_3, q8s_3);
p16_4 = _mm_sub_epi16(p16_4, q8s_4);
p16_5 = _mm_sub_epi16(p16_5, q8s_5);
p16_6 = _mm_sub_epi16(p16_6, q8s_6);
p16_7 = _mm_sub_epi16(p16_7, q8s_7);
// multiply with scales
__m128i shuffle = _mm_set1_epi16(0x0100);
p16_0 = _mm_madd_epi16(_mm_shuffle_epi8(scales[j], shuffle), p16_0);
shuffle = _mm_add_epi16(shuffle, m2);
p16_1 = _mm_madd_epi16(_mm_shuffle_epi8(scales[j], shuffle), p16_1);
shuffle = _mm_add_epi16(shuffle, m2);
p16_2 = _mm_madd_epi16(_mm_shuffle_epi8(scales[j], shuffle), p16_2);
shuffle = _mm_add_epi16(shuffle, m2);
p16_3 = _mm_madd_epi16(_mm_shuffle_epi8(scales[j], shuffle), p16_3);
shuffle = _mm_add_epi16(shuffle, m2);
p16_4 = _mm_madd_epi16(_mm_shuffle_epi8(scales[j], shuffle), p16_4);
shuffle = _mm_add_epi16(shuffle, m2);
p16_5 = _mm_madd_epi16(_mm_shuffle_epi8(scales[j], shuffle), p16_5);
shuffle = _mm_add_epi16(shuffle, m2);
p16_6 = _mm_madd_epi16(_mm_shuffle_epi8(scales[j], shuffle), p16_6);
shuffle = _mm_add_epi16(shuffle, m2);
p16_7 = _mm_madd_epi16(_mm_shuffle_epi8(scales[j], shuffle), p16_7);
// accumulate
p16_0 = _mm_add_epi32(p16_0, p16_1);
p16_2 = _mm_add_epi32(p16_2, p16_3);
p16_4 = _mm_add_epi32(p16_4, p16_5);
p16_6 = _mm_add_epi32(p16_6, p16_7);
sumi_0 = _mm_add_epi32(sumi_0, _mm_add_epi32(p16_0, p16_2));
sumi_1 = _mm_add_epi32(sumi_1, _mm_add_epi32(p16_4, p16_6));
}
// multiply with block scale and accumulate
__m256i sumi = MM256_SET_M128I(sumi_1, sumi_0);
acc = _mm256_add_ps(_mm256_mul_ps(_mm256_broadcast_ss(&d), _mm256_cvtepi32_ps(sumi)), acc);
}
*s = hsum_float_8(acc);
#elif defined __riscv_v_intrinsic
uint32_t aux[3];
uint32_t utmp[4];
float sumf = 0;
for (int i = 0; i < nb; ++i) {
const uint8_t * restrict q3 = x[i].qs;
const uint8_t * restrict qh = x[i].hmask;
const int8_t * restrict q8 = y[i].qs;
memcpy(aux, x[i].scales, 12);
utmp[3] = ((aux[1] >> 4) & kmask2) | (((aux[2] >> 6) & kmask1) << 4);
utmp[2] = ((aux[0] >> 4) & kmask2) | (((aux[2] >> 4) & kmask1) << 4);
utmp[1] = (aux[1] & kmask2) | (((aux[2] >> 2) & kmask1) << 4);
utmp[0] = (aux[0] & kmask2) | (((aux[2] >> 0) & kmask1) << 4);
int8_t * scale = (int8_t *)utmp;
for (int j = 0; j < 16; ++j) scale[j] -= 32;
size_t vl = 32;
uint8_t m = 1;
vint32m1_t vzero = __riscv_vmv_v_x_i32m1(0, 1);
vuint8m1_t vqh = __riscv_vle8_v_u8m1(qh, vl);
int sum_t = 0;
for (int j = 0; j < QK_K; j += 128) {
vl = 32;
// load Q3
vuint8m1_t q3_x = __riscv_vle8_v_u8m1(q3, vl);
vint8m1_t q3_0 = __riscv_vreinterpret_v_u8m1_i8m1(__riscv_vand_vx_u8m1(q3_x, 0x03, vl));
vint8m1_t q3_1 = __riscv_vreinterpret_v_u8m1_i8m1(__riscv_vand_vx_u8m1(__riscv_vsrl_vx_u8m1(q3_x, 0x2, vl), 0x03 , vl));
vint8m1_t q3_2 = __riscv_vreinterpret_v_u8m1_i8m1(__riscv_vand_vx_u8m1(__riscv_vsrl_vx_u8m1(q3_x, 0x4, vl), 0x03 , vl));
vint8m1_t q3_3 = __riscv_vreinterpret_v_u8m1_i8m1(__riscv_vand_vx_u8m1(__riscv_vsrl_vx_u8m1(q3_x, 0x6, vl), 0x03 , vl));
// compute mask for subtraction
vuint8m1_t qh_m0 = __riscv_vand_vx_u8m1(vqh, m, vl);
vbool8_t vmask_0 = __riscv_vmseq_vx_u8m1_b8(qh_m0, 0, vl);
vint8m1_t q3_m0 = __riscv_vsub_vx_i8m1_m(vmask_0, q3_0, 0x4, vl);
m <<= 1;
vuint8m1_t qh_m1 = __riscv_vand_vx_u8m1(vqh, m, vl);
vbool8_t vmask_1 = __riscv_vmseq_vx_u8m1_b8(qh_m1, 0, vl);
vint8m1_t q3_m1 = __riscv_vsub_vx_i8m1_m(vmask_1, q3_1, 0x4, vl);
m <<= 1;
vuint8m1_t qh_m2 = __riscv_vand_vx_u8m1(vqh, m, vl);
vbool8_t vmask_2 = __riscv_vmseq_vx_u8m1_b8(qh_m2, 0, vl);
vint8m1_t q3_m2 = __riscv_vsub_vx_i8m1_m(vmask_2, q3_2, 0x4, vl);
m <<= 1;
vuint8m1_t qh_m3 = __riscv_vand_vx_u8m1(vqh, m, vl);
vbool8_t vmask_3 = __riscv_vmseq_vx_u8m1_b8(qh_m3, 0, vl);
vint8m1_t q3_m3 = __riscv_vsub_vx_i8m1_m(vmask_3, q3_3, 0x4, vl);
m <<= 1;
// load Q8 and take product with Q3
vint16m2_t a0 = __riscv_vwmul_vv_i16m2(q3_m0, __riscv_vle8_v_i8m1(q8, vl), vl);
vint16m2_t a1 = __riscv_vwmul_vv_i16m2(q3_m1, __riscv_vle8_v_i8m1(q8+32, vl), vl);
vint16m2_t a2 = __riscv_vwmul_vv_i16m2(q3_m2, __riscv_vle8_v_i8m1(q8+64, vl), vl);
vint16m2_t a3 = __riscv_vwmul_vv_i16m2(q3_m3, __riscv_vle8_v_i8m1(q8+96, vl), vl);
vl = 16;
// retrieve lane to multiply with scale
vint32m2_t aux0_0 = __riscv_vwmul_vx_i32m2(__riscv_vget_v_i16m2_i16m1(a0, 0), (scale[0]), vl);
vint32m2_t aux0_1 = __riscv_vwmul_vx_i32m2(__riscv_vget_v_i16m2_i16m1(a0, 1), (scale[1]), vl);
vint32m2_t aux1_0 = __riscv_vwmul_vx_i32m2(__riscv_vget_v_i16m2_i16m1(a1, 0), (scale[2]), vl);
vint32m2_t aux1_1 = __riscv_vwmul_vx_i32m2(__riscv_vget_v_i16m2_i16m1(a1, 1), (scale[3]), vl);
vint32m2_t aux2_0 = __riscv_vwmul_vx_i32m2(__riscv_vget_v_i16m2_i16m1(a2, 0), (scale[4]), vl);
vint32m2_t aux2_1 = __riscv_vwmul_vx_i32m2(__riscv_vget_v_i16m2_i16m1(a2, 1), (scale[5]), vl);
vint32m2_t aux3_0 = __riscv_vwmul_vx_i32m2(__riscv_vget_v_i16m2_i16m1(a3, 0), (scale[6]), vl);
vint32m2_t aux3_1 = __riscv_vwmul_vx_i32m2(__riscv_vget_v_i16m2_i16m1(a3, 1), (scale[7]), vl);
vint32m1_t isum0 = __riscv_vredsum_vs_i32m2_i32m1(__riscv_vadd_vv_i32m2(aux0_0, aux0_1, vl), vzero, vl);
vint32m1_t isum1 = __riscv_vredsum_vs_i32m2_i32m1(__riscv_vadd_vv_i32m2(aux1_0, aux1_1, vl), isum0, vl);
vint32m1_t isum2 = __riscv_vredsum_vs_i32m2_i32m1(__riscv_vadd_vv_i32m2(aux2_0, aux2_1, vl), isum1, vl);
vint32m1_t isum3 = __riscv_vredsum_vs_i32m2_i32m1(__riscv_vadd_vv_i32m2(aux3_0, aux3_1, vl), isum2, vl);
sum_t += __riscv_vmv_x_s_i32m1_i32(isum3);
q3 += 32; q8 += 128; scale += 8;
}
const float d = GGML_FP16_TO_FP32(x[i].d) * y[i].d;
sumf += d*sum_t;
}
*s = sumf;
#else
// scalar version
// This function is written like this so the compiler can manage to vectorize most of it
// Using -Ofast, GCC and clang manage to produce code that is within a factor of 2 or so from the
// manually vectorized version above. Every other version I tried would run at least 4 times slower.
// The ideal situation would be if we could just write the code once, and the compiler would
// automatically produce the best possible set of machine instructions, instead of us having to manually
// write vectorized versions for AVX, ARM_NEON, etc.
int8_t aux8[QK_K];
int16_t aux16[8];
float sums [8];
int32_t aux32[8];
memset(sums, 0, 8*sizeof(float));
uint32_t auxs[4];
const int8_t * scales = (const int8_t*)auxs;
float sumf = 0;
for (int i = 0; i < nb; ++i) {
const uint8_t * restrict q3 = x[i].qs;
const uint8_t * restrict hm = x[i].hmask;
const int8_t * restrict q8 = y[i].qs;
memset(aux32, 0, 8*sizeof(int32_t));
int8_t * restrict a = aux8;
uint8_t m = 1;
for (int j = 0; j < QK_K; j += 128) {
for (int l = 0; l < 32; ++l) a[l] = q3[l] & 3;
for (int l = 0; l < 32; ++l) a[l] -= (hm[l] & m ? 0 : 4);
a += 32; m <<= 1;
for (int l = 0; l < 32; ++l) a[l] = (q3[l] >> 2) & 3;
for (int l = 0; l < 32; ++l) a[l] -= (hm[l] & m ? 0 : 4);
a += 32; m <<= 1;
for (int l = 0; l < 32; ++l) a[l] = (q3[l] >> 4) & 3;
for (int l = 0; l < 32; ++l) a[l] -= (hm[l] & m ? 0 : 4);
a += 32; m <<= 1;
for (int l = 0; l < 32; ++l) a[l] = (q3[l] >> 6) & 3;
for (int l = 0; l < 32; ++l) a[l] -= (hm[l] & m ? 0 : 4);
a += 32; m <<= 1;
q3 += 32;
}
a = aux8;
memcpy(auxs, x[i].scales, 12);
uint32_t tmp = auxs[2];
auxs[2] = ((auxs[0] >> 4) & kmask2) | (((tmp >> 4) & kmask1) << 4);
auxs[3] = ((auxs[1] >> 4) & kmask2) | (((tmp >> 6) & kmask1) << 4);
auxs[0] = (auxs[0] & kmask2) | (((tmp >> 0) & kmask1) << 4);
auxs[1] = (auxs[1] & kmask2) | (((tmp >> 2) & kmask1) << 4);
for (int j = 0; j < QK_K/16; ++j) {
for (int l = 0; l < 8; ++l) aux16[l] = q8[l] * a[l];
for (int l = 0; l < 8; ++l) aux32[l] += (scales[j] - 32) * aux16[l];
q8 += 8; a += 8;
for (int l = 0; l < 8; ++l) aux16[l] = q8[l] * a[l];
for (int l = 0; l < 8; ++l) aux32[l] += (scales[j] - 32) * aux16[l];
q8 += 8; a += 8;
}
const float d = GGML_FP16_TO_FP32(x[i].d) * y[i].d;
for (int l = 0; l < 8; ++l) sums[l] += d * aux32[l];
}
for (int l = 0; l < 8; ++l) sumf += sums[l];
*s = sumf;
#endif
} | O2 | c | ggml_vec_dot_q3_K_q8_K:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
andq $-0x20, %rsp
subq $0xc0, %rsp
movq %rdx, %r8
movl %edi, %eax
movl $0x100, %edi # imm = 0x100
cltd
idivl %edi
xorl %edx, %edx
testl %eax, %eax
cmovlel %edx, %eax
leaq 0x20(%r8), %rdi
vxorps %xmm0, %xmm0, %xmm0
leaq 0xc7917(%rip), %r9 # 0x15d290
vmovddup 0xf547(%rip), %xmm1 # xmm1 = mem[0,0]
vmovaps %xmm1, 0x30(%rsp)
vpbroadcastb 0xf5a0(%rip), %xmm1 # 0xa4f30
vmovdqa %xmm1, 0x20(%rsp)
vpbroadcastw 0xf593(%rip), %ymm6 # 0xa4f32
vpbroadcastb 0xf58c(%rip), %ymm7 # 0xa4f34
vmovdqa 0xf450(%rip), %ymm8 # 0xa4e00
vmovdqa 0xf468(%rip), %ymm9 # 0xa4e20
vmovdqa 0xf480(%rip), %ymm10 # 0xa4e40
vmovdqa 0xf498(%rip), %ymm11 # 0xa4e60
cmpq %rax, %rdx
je 0x95beb
vmovaps %ymm0, 0x40(%rsp)
imulq $0x124, %rdx, %r10 # imm = 0x124
addq %rcx, %r10
addq $0x4, %r10
vmovss -0x4(%r10), %xmm0
vmovss %xmm0, 0x1c(%rsp)
imulq $0x6e, %rdx, %r11
movzwl 0x6c(%r8,%r11), %ebx
vmovss (%r9,%rbx,4), %xmm13
movl 0x60(%r8,%r11), %ebx
movl 0x64(%r8,%r11), %r14d
movl 0x68(%r8,%r11), %r15d
vmovd %ebx, %xmm1
vpinsrd $0x1, %r14d, %xmm1, %xmm1
shrl $0x4, %r14d
vpinsrd $0x2, %r15d, %xmm1, %xmm1
vpinsrd $0x3, %r14d, %xmm1, %xmm1
vpand 0xf4ce(%rip), %xmm1, %xmm1 # 0xa4f00
vmovd %r15d, %xmm14
vpinsrd $0x1, %ebx, %xmm14, %xmm14
vpshufd $0x10, %xmm14, %xmm14 # xmm14 = xmm14[0,0,1,0]
vmovdqa 0x30(%rsp), %xmm0
vpsllvd %xmm0, %xmm14, %xmm15
vpsrlvd %xmm0, %xmm14, %xmm14
vpblendd $0xc, %xmm14, %xmm15, %xmm14 # xmm14 = xmm15[0,1],xmm14[2,3]
vpand 0xf4af(%rip), %xmm14, %xmm14 # 0xa4f10
vpor %xmm1, %xmm14, %xmm1
vpaddb 0x20(%rsp), %xmm1, %xmm1
vpmovsxbw %xmm1, %ymm1
vpermq $0x44, %ymm1, %ymm14 # ymm14 = ymm1[0,1,0,1]
vmovdqa %ymm14, 0x60(%rsp)
vpermq $0xee, %ymm1, %ymm1 # ymm1 = ymm1[2,3,2,3]
vmovdqa %ymm1, 0x80(%rsp)
vpcmpeqd %ymm0, %ymm0, %ymm0
vpxor (%r8,%r11), %ymm0, %ymm15
vpxor %xmm14, %xmm14, %xmm14
xorl %r11d, %r11d
cmpq $0x8, %r11
je 0x95bc4
vmovd %r11d, %xmm1
vpsllw %xmm1, %ymm6, %ymm3
vpand %ymm3, %ymm15, %ymm3
vpsrlw %xmm1, %ymm3, %ymm3
leal 0x1(%r11), %ebx
vmovd %ebx, %xmm5
vpsllw %xmm5, %ymm6, %ymm4
vmovdqu (%rdi,%r11,8), %ymm1
vpand %ymm4, %ymm15, %ymm4
vpsrlw %xmm5, %ymm4, %ymm4
leal 0x2(%r11), %ebx
vmovd %ebx, %xmm5
vpsllw %xmm5, %ymm6, %ymm0
vpsllw $0x2, %ymm3, %ymm3
vpand %ymm0, %ymm15, %ymm0
vpsrlw %xmm5, %ymm0, %ymm0
leal 0x3(%r11), %ebx
vmovd %ebx, %xmm5
vpsllw %xmm5, %ymm6, %ymm2
vpand %ymm2, %ymm15, %ymm2
vpsrlw %xmm5, %ymm2, %ymm2
vmovdqu (%r10), %ymm5
vpmaddubsw %ymm5, %ymm3, %ymm3
vpand %ymm7, %ymm1, %ymm12
vpmaddubsw %ymm5, %ymm12, %ymm5
vpsrlw $0x2, %ymm1, %ymm12
vpsllw $0x2, %ymm4, %ymm4
vpsubw %ymm3, %ymm5, %ymm3
vmovdqu 0x20(%r10), %ymm5
vpmaddubsw %ymm5, %ymm4, %ymm4
vpand %ymm7, %ymm12, %ymm12
vpmaddubsw %ymm5, %ymm12, %ymm5
vpsrlw $0x4, %ymm1, %ymm12
vpsllw $0x2, %ymm0, %ymm0
vpsubw %ymm4, %ymm5, %ymm4
vmovdqu 0x40(%r10), %ymm5
vpmaddubsw %ymm5, %ymm0, %ymm0
vpand %ymm7, %ymm12, %ymm12
vpmaddubsw %ymm5, %ymm12, %ymm5
vpsrlw $0x6, %ymm1, %ymm1
vpsllw $0x2, %ymm2, %ymm2
vpsubw %ymm0, %ymm5, %ymm0
vmovdqu 0x60(%r10), %ymm5
vpmaddubsw %ymm5, %ymm2, %ymm2
vpand %ymm7, %ymm1, %ymm1
vpmaddubsw %ymm5, %ymm1, %ymm1
vpsubw %ymm2, %ymm1, %ymm1
vmovdqa 0x60(%rsp,%r11,8), %ymm2
vpshufb %ymm8, %ymm2, %ymm5
vpmaddwd %ymm3, %ymm5, %ymm3
vpshufb %ymm9, %ymm2, %ymm5
vpmaddwd %ymm4, %ymm5, %ymm4
vpshufb %ymm10, %ymm2, %ymm5
vpmaddwd %ymm0, %ymm5, %ymm0
vpaddd %ymm0, %ymm4, %ymm0
vpshufb %ymm11, %ymm2, %ymm2
vpmaddwd %ymm1, %ymm2, %ymm1
vpaddd %ymm3, %ymm14, %ymm2
vpaddd %ymm0, %ymm2, %ymm0
vpaddd %ymm1, %ymm0, %ymm14
addq $0x4, %r11
subq $-0x80, %r10
jmp 0x95a9d
vmulss 0x1c(%rsp), %xmm13, %xmm1
vbroadcastss %xmm1, %ymm1
vcvtdq2ps %ymm14, %ymm12
vmovaps 0x40(%rsp), %ymm0
vfmadd231ps %ymm12, %ymm1, %ymm0 # ymm0 = (ymm1 * ymm12) + ymm0
incq %rdx
addq $0x6e, %rdi
jmp 0x959c8
vextractf128 $0x1, %ymm0, %xmm1
vaddps %xmm0, %xmm1, %xmm0
vshufpd $0x1, %xmm0, %xmm0, %xmm1 # xmm1 = xmm0[1,0]
vaddps %xmm1, %xmm0, %xmm0
vhaddps %xmm0, %xmm0, %xmm0
vmovss %xmm0, (%rsi)
leaq -0x18(%rbp), %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
vzeroupper
retq
| ggml_vec_dot_q3_K_q8_K:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
and rsp, 0FFFFFFFFFFFFFFE0h
sub rsp, 0C0h
mov r8, rdx
mov eax, edi
mov edi, 100h
cdq
idiv edi
xor edx, edx
test eax, eax
cmovle eax, edx
lea rdi, [r8+20h]
vxorps xmm0, xmm0, xmm0
lea r9, ggml_table_f32_f16
vmovddup xmm1, cs:qword_A4EC8
vmovaps [rsp+0D8h+var_A8], xmm1
vpbroadcastb xmm1, cs:byte_A4F30
vmovdqa [rsp+0D8h+var_B8], xmm1
vpbroadcastw ymm6, cs:word_A4F32
vpbroadcastb ymm7, cs:byte_A4F34
vmovdqa ymm8, cs:ymmword_A4E00
vmovdqa ymm9, cs:ymmword_A4E20
vmovdqa ymm10, cs:ymmword_A4E40
vmovdqa ymm11, cs:ymmword_A4E60
loc_959C8:
cmp rdx, rax
jz loc_95BEB
vmovaps [rsp+0D8h+var_98], ymm0
imul r10, rdx, 124h
add r10, rcx
add r10, 4
vmovss xmm0, dword ptr [r10-4]
vmovss [rsp+0D8h+var_BC], xmm0
imul r11, rdx, 6Eh ; 'n'
movzx ebx, word ptr [r8+r11+6Ch]
vmovss xmm13, dword ptr [r9+rbx*4]
mov ebx, [r8+r11+60h]
mov r14d, [r8+r11+64h]
mov r15d, [r8+r11+68h]
vmovd xmm1, ebx
vpinsrd xmm1, xmm1, r14d, 1
shr r14d, 4
vpinsrd xmm1, xmm1, r15d, 2
vpinsrd xmm1, xmm1, r14d, 3
vpand xmm1, xmm1, cs:xmmword_A4F00
vmovd xmm14, r15d
vpinsrd xmm14, xmm14, ebx, 1
vpshufd xmm14, xmm14, 10h
vmovdqa xmm0, [rsp+0D8h+var_A8]
vpsllvd xmm15, xmm14, xmm0
vpsrlvd xmm14, xmm14, xmm0
vpblendd xmm14, xmm15, xmm14, 0Ch
vpand xmm14, xmm14, cs:xmmword_A4F10
vpor xmm1, xmm14, xmm1
vpaddb xmm1, xmm1, [rsp+0D8h+var_B8]
vpmovsxbw ymm1, xmm1
vpermq ymm14, ymm1, 44h ; 'D'
vmovdqa [rsp+0D8h+var_78], ymm14
vpermq ymm1, ymm1, 0EEh
vmovdqa [rsp+0D8h+var_58], ymm1
vpcmpeqd ymm0, ymm0, ymm0
vpxor ymm15, ymm0, ymmword ptr [r8+r11]
vpxor xmm14, xmm14, xmm14
xor r11d, r11d
loc_95A9D:
cmp r11, 8
jz loc_95BC4
vmovd xmm1, r11d
vpsllw ymm3, ymm6, xmm1
vpand ymm3, ymm15, ymm3
vpsrlw ymm3, ymm3, xmm1
lea ebx, [r11+1]
vmovd xmm5, ebx
vpsllw ymm4, ymm6, xmm5
vmovdqu ymm1, ymmword ptr [rdi+r11*8]
vpand ymm4, ymm15, ymm4
vpsrlw ymm4, ymm4, xmm5
lea ebx, [r11+2]
vmovd xmm5, ebx
vpsllw ymm0, ymm6, xmm5
vpsllw ymm3, ymm3, 2
vpand ymm0, ymm15, ymm0
vpsrlw ymm0, ymm0, xmm5
lea ebx, [r11+3]
vmovd xmm5, ebx
vpsllw ymm2, ymm6, xmm5
vpand ymm2, ymm15, ymm2
vpsrlw ymm2, ymm2, xmm5
vmovdqu ymm5, ymmword ptr [r10]
vpmaddubsw ymm3, ymm3, ymm5
vpand ymm12, ymm1, ymm7
vpmaddubsw ymm5, ymm12, ymm5
vpsrlw ymm12, ymm1, 2
vpsllw ymm4, ymm4, 2
vpsubw ymm3, ymm5, ymm3
vmovdqu ymm5, ymmword ptr [r10+20h]
vpmaddubsw ymm4, ymm4, ymm5
vpand ymm12, ymm12, ymm7
vpmaddubsw ymm5, ymm12, ymm5
vpsrlw ymm12, ymm1, 4
vpsllw ymm0, ymm0, 2
vpsubw ymm4, ymm5, ymm4
vmovdqu ymm5, ymmword ptr [r10+40h]
vpmaddubsw ymm0, ymm0, ymm5
vpand ymm12, ymm12, ymm7
vpmaddubsw ymm5, ymm12, ymm5
vpsrlw ymm1, ymm1, 6
vpsllw ymm2, ymm2, 2
vpsubw ymm0, ymm5, ymm0
vmovdqu ymm5, ymmword ptr [r10+60h]
vpmaddubsw ymm2, ymm2, ymm5
vpand ymm1, ymm1, ymm7
vpmaddubsw ymm1, ymm1, ymm5
vpsubw ymm1, ymm1, ymm2
vmovdqa ymm2, [rsp+r11*8+0D8h+var_78]
vpshufb ymm5, ymm2, ymm8
vpmaddwd ymm3, ymm5, ymm3
vpshufb ymm5, ymm2, ymm9
vpmaddwd ymm4, ymm5, ymm4
vpshufb ymm5, ymm2, ymm10
vpmaddwd ymm0, ymm5, ymm0
vpaddd ymm0, ymm4, ymm0
vpshufb ymm2, ymm2, ymm11
vpmaddwd ymm1, ymm2, ymm1
vpaddd ymm2, ymm14, ymm3
vpaddd ymm0, ymm2, ymm0
vpaddd ymm14, ymm0, ymm1
add r11, 4
sub r10, 0FFFFFFFFFFFFFF80h
jmp loc_95A9D
loc_95BC4:
vmulss xmm1, xmm13, [rsp+0D8h+var_BC]
vbroadcastss ymm1, xmm1
vcvtdq2ps ymm12, ymm14
vmovaps ymm0, [rsp+0D8h+var_98]
vfmadd231ps ymm0, ymm1, ymm12
inc rdx
add rdi, 6Eh ; 'n'
jmp loc_959C8
loc_95BEB:
vextractf128 xmm1, ymm0, 1
vaddps xmm0, xmm1, xmm0
vshufpd xmm1, xmm0, xmm0, 1
vaddps xmm0, xmm0, xmm1
vhaddps xmm0, xmm0, xmm0
vmovss dword ptr [rsi], xmm0
lea rsp, [rbp-18h]
pop rbx
pop r14
pop r15
pop rbp
vzeroupper
retn
| long long ggml_vec_dot_q3_K_q8_K(int a1, long long _RSI, long long a3, long long a4, __m128 _XMM0)
{
long long result; // rax
long long v8; // rdx
result = (unsigned int)(a1 / 256);
v8 = 0LL;
if ( (int)result <= 0 )
result = 0LL;
_RDI = a3 + 32;
__asm { vxorps xmm0, xmm0, xmm0 }
_R9 = &ggml_table_f32_f16;
__asm
{
vmovddup xmm1, cs:qword_A4EC8
vmovaps [rsp+0D8h+var_A8], xmm1
vpbroadcastb xmm1, cs:byte_A4F30
vmovdqa [rsp+0D8h+var_B8], xmm1
vpbroadcastw ymm6, cs:word_A4F32
vpbroadcastb ymm7, cs:byte_A4F34
vmovdqa ymm8, cs:ymmword_A4E00
vmovdqa ymm9, cs:ymmword_A4E20
vmovdqa ymm10, cs:ymmword_A4E40
vmovdqa ymm11, cs:ymmword_A4E60
}
while ( v8 != result )
{
__asm { vmovaps [rsp+0D8h+var_98], ymm0 }
_R10 = a4 + 292 * v8 + 4;
__asm
{
vmovss xmm0, dword ptr [r10-4]
vmovss [rsp+0D8h+var_BC], xmm0
}
_RBX = *(unsigned __int16 *)(a3 + 110 * v8 + 108);
__asm { vmovss xmm13, dword ptr [r9+rbx*4] }
LODWORD(_RBX) = *(_DWORD *)(a3 + 110 * v8 + 96);
_R15D = *(_DWORD *)(a3 + 110 * v8 + 104);
__asm
{
vmovd xmm1, ebx
vpinsrd xmm1, xmm1, r14d, 1
vpinsrd xmm1, xmm1, r15d, 2
vpinsrd xmm1, xmm1, r14d, 3
vpand xmm1, xmm1, cs:xmmword_A4F00
vmovd xmm14, r15d
vpinsrd xmm14, xmm14, ebx, 1
vpshufd xmm14, xmm14, 10h
vmovdqa xmm0, [rsp+0D8h+var_A8]
vpsllvd xmm15, xmm14, xmm0
vpsrlvd xmm14, xmm14, xmm0
vpblendd xmm14, xmm15, xmm14, 0Ch
vpand xmm14, xmm14, cs:xmmword_A4F10
vpor xmm1, xmm14, xmm1
vpaddb xmm1, xmm1, [rsp+0D8h+var_B8]
vpmovsxbw ymm1, xmm1
vpermq ymm14, ymm1, 44h ; 'D'
vmovdqa [rsp+0D8h+var_78], ymm14
vpermq ymm1, ymm1, 0EEh
vmovdqa [rsp+0D8h+var_58], ymm1
vpcmpeqd ymm0, ymm0, ymm0
vpxor ymm15, ymm0, ymmword ptr [r8+r11]
vpxor xmm14, xmm14, xmm14
}
for ( _R11 = 0LL; _R11 != 8; _R11 += 4LL )
{
__asm
{
vmovd xmm1, r11d
vpsllw ymm3, ymm6, xmm1
vpand ymm3, ymm15, ymm3
vpsrlw ymm3, ymm3, xmm1
}
_EBX = _R11 + 1;
__asm
{
vmovd xmm5, ebx
vpsllw ymm4, ymm6, xmm5
vmovdqu ymm1, ymmword ptr [rdi+r11*8]
vpand ymm4, ymm15, ymm4
vpsrlw ymm4, ymm4, xmm5
}
_EBX = _R11 + 2;
__asm
{
vmovd xmm5, ebx
vpsllw ymm0, ymm6, xmm5
vpsllw ymm3, ymm3, 2
vpand ymm0, ymm15, ymm0
vpsrlw ymm0, ymm0, xmm5
}
_EBX = _R11 + 3;
__asm
{
vmovd xmm5, ebx
vpsllw ymm2, ymm6, xmm5
vpand ymm2, ymm15, ymm2
vpsrlw ymm2, ymm2, xmm5
vmovdqu ymm5, ymmword ptr [r10]
vpmaddubsw ymm3, ymm3, ymm5
vpand ymm12, ymm1, ymm7
vpmaddubsw ymm5, ymm12, ymm5
vpsrlw ymm12, ymm1, 2
vpsllw ymm4, ymm4, 2
vpsubw ymm3, ymm5, ymm3
vmovdqu ymm5, ymmword ptr [r10+20h]
vpmaddubsw ymm4, ymm4, ymm5
vpand ymm12, ymm12, ymm7
vpmaddubsw ymm5, ymm12, ymm5
vpsrlw ymm12, ymm1, 4
vpsllw ymm0, ymm0, 2
vpsubw ymm4, ymm5, ymm4
vmovdqu ymm5, ymmword ptr [r10+40h]
vpmaddubsw ymm0, ymm0, ymm5
vpand ymm12, ymm12, ymm7
vpmaddubsw ymm5, ymm12, ymm5
vpsrlw ymm1, ymm1, 6
vpsllw ymm2, ymm2, 2
vpsubw ymm0, ymm5, ymm0
vmovdqu ymm5, ymmword ptr [r10+60h]
vpmaddubsw ymm2, ymm2, ymm5
vpand ymm1, ymm1, ymm7
vpmaddubsw ymm1, ymm1, ymm5
vpsubw ymm1, ymm1, ymm2
vmovdqa ymm2, [rsp+r11*8+0D8h+var_78]
vpshufb ymm5, ymm2, ymm8
vpmaddwd ymm3, ymm5, ymm3
vpshufb ymm5, ymm2, ymm9
vpmaddwd ymm4, ymm5, ymm4
vpshufb ymm5, ymm2, ymm10
vpmaddwd ymm0, ymm5, ymm0
vpaddd ymm0, ymm4, ymm0
vpshufb ymm2, ymm2, ymm11
vpmaddwd ymm1, ymm2, ymm1
vpaddd ymm2, ymm14, ymm3
vpaddd ymm0, ymm2, ymm0
vpaddd ymm14, ymm0, ymm1
}
_R10 += 128LL;
}
__asm
{
vmulss xmm1, xmm13, [rsp+0D8h+var_BC]
vbroadcastss ymm1, xmm1
vcvtdq2ps ymm12, ymm14
vmovaps ymm0, [rsp+0D8h+var_98]
vfmadd231ps ymm0, ymm1, ymm12
}
++v8;
_RDI += 110LL;
}
__asm
{
vextractf128 xmm1, ymm0, 1
vaddps xmm0, xmm1, xmm0
vshufpd xmm1, xmm0, xmm0, 1
vaddps xmm0, xmm0, xmm1
vhaddps xmm0, xmm0, xmm0
vmovss dword ptr [rsi], xmm0
vzeroupper
}
return result;
}
| ggml_vec_dot_q3_K_q8_K:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
AND RSP,-0x20
SUB RSP,0xc0
MOV R8,RDX
MOV EAX,EDI
MOV EDI,0x100
CDQ
IDIV EDI
XOR EDX,EDX
TEST EAX,EAX
CMOVLE EAX,EDX
LEA RDI,[R8 + 0x20]
VXORPS XMM0,XMM0,XMM0
LEA R9,[0x25d290]
VMOVDDUP XMM1,qword ptr [0x001a4ec8]
VMOVAPS xmmword ptr [RSP + 0x30],XMM1
VPBROADCASTB XMM1,byte ptr [0x001a4f30]
VMOVDQA xmmword ptr [RSP + 0x20],XMM1
VPBROADCASTW YMM6,word ptr [0x001a4f32]
VPBROADCASTB YMM7,byte ptr [0x001a4f34]
VMOVDQA YMM8,ymmword ptr [0x001a4e00]
VMOVDQA YMM9,ymmword ptr [0x001a4e20]
VMOVDQA YMM10,ymmword ptr [0x001a4e40]
VMOVDQA YMM11,ymmword ptr [0x001a4e60]
LAB_001959c8:
CMP RDX,RAX
JZ 0x00195beb
VMOVAPS ymmword ptr [RSP + 0x40],YMM0
IMUL R10,RDX,0x124
ADD R10,RCX
ADD R10,0x4
VMOVSS XMM0,dword ptr [R10 + -0x4]
VMOVSS dword ptr [RSP + 0x1c],XMM0
IMUL R11,RDX,0x6e
MOVZX EBX,word ptr [R8 + R11*0x1 + 0x6c]
VMOVSS XMM13,dword ptr [R9 + RBX*0x4]
MOV EBX,dword ptr [R8 + R11*0x1 + 0x60]
MOV R14D,dword ptr [R8 + R11*0x1 + 0x64]
MOV R15D,dword ptr [R8 + R11*0x1 + 0x68]
VMOVD XMM1,EBX
VPINSRD XMM1,XMM1,R14D,0x1
SHR R14D,0x4
VPINSRD XMM1,XMM1,R15D,0x2
VPINSRD XMM1,XMM1,R14D,0x3
VPAND XMM1,XMM1,xmmword ptr [0x001a4f00]
VMOVD XMM14,R15D
VPINSRD XMM14,XMM14,EBX,0x1
VPSHUFD XMM14,XMM14,0x10
VMOVDQA XMM0,xmmword ptr [RSP + 0x30]
VPSLLVD XMM15,XMM14,XMM0
VPSRLVD XMM14,XMM14,XMM0
VPBLENDD XMM14,XMM15,XMM14,0xc
VPAND XMM14,XMM14,xmmword ptr [0x001a4f10]
VPOR XMM1,XMM14,XMM1
VPADDB XMM1,XMM1,xmmword ptr [RSP + 0x20]
VPMOVSXBW YMM1,XMM1
VPERMQ YMM14,YMM1,0x44
VMOVDQA ymmword ptr [RSP + 0x60],YMM14
VPERMQ YMM1,YMM1,0xee
VMOVDQA ymmword ptr [RSP + 0x80],YMM1
VPCMPEQD YMM0,YMM0,YMM0
VPXOR YMM15,YMM0,ymmword ptr [R8 + R11*0x1]
VPXOR XMM14,XMM14,XMM14
XOR R11D,R11D
LAB_00195a9d:
CMP R11,0x8
JZ 0x00195bc4
VMOVD XMM1,R11D
VPSLLW YMM3,YMM6,XMM1
VPAND YMM3,YMM15,YMM3
VPSRLW YMM3,YMM3,XMM1
LEA EBX,[R11 + 0x1]
VMOVD XMM5,EBX
VPSLLW YMM4,YMM6,XMM5
VMOVDQU YMM1,ymmword ptr [RDI + R11*0x8]
VPAND YMM4,YMM15,YMM4
VPSRLW YMM4,YMM4,XMM5
LEA EBX,[R11 + 0x2]
VMOVD XMM5,EBX
VPSLLW YMM0,YMM6,XMM5
VPSLLW YMM3,YMM3,0x2
VPAND YMM0,YMM15,YMM0
VPSRLW YMM0,YMM0,XMM5
LEA EBX,[R11 + 0x3]
VMOVD XMM5,EBX
VPSLLW YMM2,YMM6,XMM5
VPAND YMM2,YMM15,YMM2
VPSRLW YMM2,YMM2,XMM5
VMOVDQU YMM5,ymmword ptr [R10]
VPMADDUBSW YMM3,YMM3,YMM5
VPAND YMM12,YMM1,YMM7
VPMADDUBSW YMM5,YMM12,YMM5
VPSRLW YMM12,YMM1,0x2
VPSLLW YMM4,YMM4,0x2
VPSUBW YMM3,YMM5,YMM3
VMOVDQU YMM5,ymmword ptr [R10 + 0x20]
VPMADDUBSW YMM4,YMM4,YMM5
VPAND YMM12,YMM12,YMM7
VPMADDUBSW YMM5,YMM12,YMM5
VPSRLW YMM12,YMM1,0x4
VPSLLW YMM0,YMM0,0x2
VPSUBW YMM4,YMM5,YMM4
VMOVDQU YMM5,ymmword ptr [R10 + 0x40]
VPMADDUBSW YMM0,YMM0,YMM5
VPAND YMM12,YMM12,YMM7
VPMADDUBSW YMM5,YMM12,YMM5
VPSRLW YMM1,YMM1,0x6
VPSLLW YMM2,YMM2,0x2
VPSUBW YMM0,YMM5,YMM0
VMOVDQU YMM5,ymmword ptr [R10 + 0x60]
VPMADDUBSW YMM2,YMM2,YMM5
VPAND YMM1,YMM1,YMM7
VPMADDUBSW YMM1,YMM1,YMM5
VPSUBW YMM1,YMM1,YMM2
VMOVDQA YMM2,ymmword ptr [RSP + R11*0x8 + 0x60]
VPSHUFB YMM5,YMM2,YMM8
VPMADDWD YMM3,YMM5,YMM3
VPSHUFB YMM5,YMM2,YMM9
VPMADDWD YMM4,YMM5,YMM4
VPSHUFB YMM5,YMM2,YMM10
VPMADDWD YMM0,YMM5,YMM0
VPADDD YMM0,YMM4,YMM0
VPSHUFB YMM2,YMM2,YMM11
VPMADDWD YMM1,YMM2,YMM1
VPADDD YMM2,YMM14,YMM3
VPADDD YMM0,YMM2,YMM0
VPADDD YMM14,YMM0,YMM1
ADD R11,0x4
SUB R10,-0x80
JMP 0x00195a9d
LAB_00195bc4:
VMULSS XMM1,XMM13,dword ptr [RSP + 0x1c]
VBROADCASTSS YMM1,XMM1
VCVTDQ2PS YMM12,YMM14
VMOVAPS YMM0,ymmword ptr [RSP + 0x40]
VFMADD231PS YMM0,YMM1,YMM12
INC RDX
ADD RDI,0x6e
JMP 0x001959c8
LAB_00195beb:
VEXTRACTF128 XMM1,YMM0,0x1
VADDPS XMM0,XMM1,XMM0
VSHUFPD XMM1,XMM0,XMM0,0x1
VADDPS XMM0,XMM0,XMM1
VHADDPS XMM0,XMM0,XMM0
VMOVSS dword ptr [RSI],XMM0
LEA RSP,[RBP + -0x18]
POP RBX
POP R14
POP R15
POP RBP
VZEROUPPER
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void ggml_vec_dot_q3_K_q8_K(int param_1,int4 *param_2,long param_3,long param_4)
{
uint uVar1;
uint uVar2;
float fVar3;
int1 auVar4 [16];
int1 auVar5 [32];
int1 auVar6 [32];
int1 auVar7 [32];
int1 auVar8 [32];
int1 auVar9 [32];
int1 auVar10 [16];
ulong uVar11;
ulong uVar12;
long lVar13;
float *pfVar14;
int1 (*pauVar15) [32];
uint uVar16;
long lVar17;
long lVar18;
int1 auVar19 [16];
int1 auVar20 [16];
int1 auVar21 [16];
int1 auVar22 [32];
int1 auVar23 [32];
int1 auVar24 [32];
int1 auVar25 [32];
int1 auVar26 [32];
int1 auVar27 [32];
int1 auVar28 [64];
int1 local_80 [32];
int1 local_60 [32];
uVar12 = 0;
uVar11 = (long)param_1 / 0x100 & 0xffffffff;
if ((int)((long)param_1 / 0x100) < 1) {
uVar11 = uVar12;
}
lVar13 = param_3 + 0x20;
auVar19 = ZEXT816(0) << 0x40;
auVar25._2_2_ = DAT_001a4f32;
auVar25._0_2_ = DAT_001a4f32;
auVar25._4_2_ = DAT_001a4f32;
auVar25._6_2_ = DAT_001a4f32;
auVar25._8_2_ = DAT_001a4f32;
auVar25._10_2_ = DAT_001a4f32;
auVar25._12_2_ = DAT_001a4f32;
auVar25._14_2_ = DAT_001a4f32;
auVar25._16_2_ = DAT_001a4f32;
auVar25._18_2_ = DAT_001a4f32;
auVar25._20_2_ = DAT_001a4f32;
auVar25._22_2_ = DAT_001a4f32;
auVar25._24_2_ = DAT_001a4f32;
auVar25._26_2_ = DAT_001a4f32;
auVar25._28_2_ = DAT_001a4f32;
auVar25._30_2_ = DAT_001a4f32;
auVar26[1] = DAT_001a4f34;
auVar26[0] = DAT_001a4f34;
auVar26[2] = DAT_001a4f34;
auVar26[3] = DAT_001a4f34;
auVar26[4] = DAT_001a4f34;
auVar26[5] = DAT_001a4f34;
auVar26[6] = DAT_001a4f34;
auVar26[7] = DAT_001a4f34;
auVar26[8] = DAT_001a4f34;
auVar26[9] = DAT_001a4f34;
auVar26[10] = DAT_001a4f34;
auVar26[0xb] = DAT_001a4f34;
auVar26[0xc] = DAT_001a4f34;
auVar26[0xd] = DAT_001a4f34;
auVar26[0xe] = DAT_001a4f34;
auVar26[0xf] = DAT_001a4f34;
auVar26[0x10] = DAT_001a4f34;
auVar26[0x11] = DAT_001a4f34;
auVar26[0x12] = DAT_001a4f34;
auVar26[0x13] = DAT_001a4f34;
auVar26[0x14] = DAT_001a4f34;
auVar26[0x15] = DAT_001a4f34;
auVar26[0x16] = DAT_001a4f34;
auVar26[0x17] = DAT_001a4f34;
auVar26[0x18] = DAT_001a4f34;
auVar26[0x19] = DAT_001a4f34;
auVar26[0x1a] = DAT_001a4f34;
auVar26[0x1b] = DAT_001a4f34;
auVar26[0x1c] = DAT_001a4f34;
auVar26[0x1d] = DAT_001a4f34;
auVar26[0x1e] = DAT_001a4f34;
auVar26[0x1f] = DAT_001a4f34;
for (; uVar12 != uVar11; uVar12 = uVar12 + 1) {
pfVar14 = (float *)(uVar12 * 0x124 + param_4);
pauVar15 = (int1 (*) [32])(pfVar14 + 1);
lVar17 = uVar12 * 0x6e;
uVar16 = *(uint *)(param_3 + 0x60 + lVar17);
uVar1 = *(uint *)(param_3 + 100 + lVar17);
uVar2 = *(uint *)(param_3 + 0x68 + lVar17);
auVar20 = vpinsrd_avx(ZEXT416(uVar16),uVar1,1);
auVar20 = vpinsrd_avx(auVar20,uVar2,2);
auVar20 = vpinsrd_avx(auVar20,uVar1 >> 4,3);
auVar20 = vpand_avx(auVar20,_DAT_001a4f00);
auVar4 = vpinsrd_avx(ZEXT416(uVar2),uVar16,1);
auVar4 = vpshufd_avx(auVar4,0x10);
auVar10._8_8_ = DAT_001a4ec8;
auVar10._0_8_ = DAT_001a4ec8;
auVar21 = vpsllvd_avx2(auVar4,auVar10);
auVar4 = vpsrlvd_avx2(auVar4,auVar10);
auVar4 = vpblendd_avx2(auVar21,auVar4,0xc);
auVar4 = vpand_avx(auVar4,_DAT_001a4f10);
auVar20 = vpor_avx(auVar4,auVar20);
auVar4[1] = DAT_001a4f30;
auVar4[0] = DAT_001a4f30;
auVar4[2] = DAT_001a4f30;
auVar4[3] = DAT_001a4f30;
auVar4[4] = DAT_001a4f30;
auVar4[5] = DAT_001a4f30;
auVar4[6] = DAT_001a4f30;
auVar4[7] = DAT_001a4f30;
auVar4[8] = DAT_001a4f30;
auVar4[9] = DAT_001a4f30;
auVar4[10] = DAT_001a4f30;
auVar4[0xb] = DAT_001a4f30;
auVar4[0xc] = DAT_001a4f30;
auVar4[0xd] = DAT_001a4f30;
auVar4[0xe] = DAT_001a4f30;
auVar4[0xf] = DAT_001a4f30;
auVar20 = vpaddb_avx(auVar20,auVar4);
auVar5 = vpmovsxbw_avx2(auVar20);
local_80 = vpermq_avx2(auVar5,0x44);
local_60 = vpermq_avx2(auVar5,0xee);
auVar5 = vpcmpeqd_avx2(ZEXT1632(auVar10),ZEXT1632(auVar10));
auVar5 = auVar5 ^ *(int1 (*) [32])(param_3 + lVar17);
auVar28 = ZEXT1664((int1 [16])0x0);
for (lVar18 = 0; lVar18 != 8; lVar18 = lVar18 + 4) {
uVar16 = (uint)lVar18;
auVar22 = vpsllw_avx2(auVar25,ZEXT416(uVar16));
auVar22 = vpand_avx2(auVar5,auVar22);
auVar23 = vpsrlw_avx2(auVar22,ZEXT416(uVar16));
auVar6 = vpsllw_avx2(auVar25,ZEXT416(uVar16 + 1));
auVar22 = *(int1 (*) [32])(lVar13 + lVar18 * 8);
auVar6 = vpand_avx2(auVar5,auVar6);
auVar7 = vpsrlw_avx2(auVar6,ZEXT416(uVar16 + 1));
auVar6 = vpsllw_avx2(auVar25,ZEXT416(uVar16 + 2));
auVar23 = vpsllw_avx2(auVar23,2);
auVar6 = vpand_avx2(auVar5,auVar6);
auVar8 = vpsrlw_avx2(auVar6,ZEXT416(uVar16 + 2));
auVar6 = vpsllw_avx2(auVar25,ZEXT416(uVar16 + 3));
auVar6 = vpand_avx2(auVar5,auVar6);
auVar9 = vpsrlw_avx2(auVar6,ZEXT416(uVar16 + 3));
auVar23 = vpmaddubsw_avx2(auVar23,*pauVar15);
auVar6 = vpand_avx2(auVar22,auVar26);
auVar6 = vpmaddubsw_avx2(auVar6,*pauVar15);
auVar27 = vpsrlw_avx2(auVar22,2);
auVar24 = vpsllw_avx2(auVar7,2);
auVar7 = vpsubw_avx2(auVar6,auVar23);
auVar23 = vpmaddubsw_avx2(auVar24,pauVar15[1]);
auVar6 = vpand_avx2(auVar27,auVar26);
auVar6 = vpmaddubsw_avx2(auVar6,pauVar15[1]);
auVar27 = vpsrlw_avx2(auVar22,4);
auVar24 = vpsllw_avx2(auVar8,2);
auVar8 = vpsubw_avx2(auVar6,auVar23);
auVar23 = vpmaddubsw_avx2(auVar24,pauVar15[2]);
auVar6 = vpand_avx2(auVar27,auVar26);
auVar6 = vpmaddubsw_avx2(auVar6,pauVar15[2]);
auVar22 = vpsrlw_avx2(auVar22,6);
auVar24 = vpsllw_avx2(auVar9,2);
auVar9 = vpsubw_avx2(auVar6,auVar23);
auVar6 = vpmaddubsw_avx2(auVar24,pauVar15[3]);
auVar22 = vpand_avx2(auVar22,auVar26);
auVar22 = vpmaddubsw_avx2(auVar22,pauVar15[3]);
auVar24 = vpsubw_avx2(auVar22,auVar6);
auVar22 = *(int1 (*) [32])(local_80 + lVar18 * 8);
auVar6 = vpshufb_avx2(auVar22,_DAT_001a4e00);
auVar23 = vpmaddwd_avx2(auVar6,auVar7);
auVar6 = vpshufb_avx2(auVar22,_DAT_001a4e20);
auVar6 = vpmaddwd_avx2(auVar6,auVar8);
auVar7 = vpshufb_avx2(auVar22,_DAT_001a4e40);
auVar7 = vpmaddwd_avx2(auVar7,auVar9);
auVar6 = vpaddd_avx2(auVar6,auVar7);
auVar22 = vpshufb_avx2(auVar22,_DAT_001a4e60);
auVar7 = vpmaddwd_avx2(auVar22,auVar24);
auVar22 = vpaddd_avx2(auVar28._0_32_,auVar23);
auVar22 = vpaddd_avx2(auVar22,auVar6);
auVar22 = vpaddd_avx2(auVar22,auVar7);
auVar28 = ZEXT3264(auVar22);
pauVar15 = pauVar15 + 4;
}
fVar3 = (float)(&ggml_table_f32_f16)[*(ushort *)(param_3 + 0x6c + lVar17)] * *pfVar14;
auVar22._4_4_ = fVar3;
auVar22._0_4_ = fVar3;
auVar22._8_4_ = fVar3;
auVar22._12_4_ = fVar3;
auVar22._16_4_ = fVar3;
auVar22._20_4_ = fVar3;
auVar22._24_4_ = fVar3;
auVar22._28_4_ = fVar3;
auVar5 = vcvtdq2ps_avx(auVar28._0_32_);
auVar19 = vfmadd231ps_fma(ZEXT1632(auVar19),auVar22,auVar5);
lVar13 = lVar13 + 0x6e;
}
auVar20._0_4_ = auVar19._0_4_ + 0.0;
auVar20._4_4_ = auVar19._4_4_ + 0.0;
auVar20._8_4_ = auVar19._8_4_ + 0.0;
auVar20._12_4_ = auVar19._12_4_ + 0.0;
auVar19 = vshufpd_avx(auVar20,auVar20,1);
auVar21._0_4_ = auVar20._0_4_ + auVar19._0_4_;
auVar21._4_4_ = auVar20._4_4_ + auVar19._4_4_;
auVar21._8_4_ = auVar20._8_4_ + auVar19._8_4_;
auVar21._12_4_ = auVar20._12_4_ + auVar19._12_4_;
auVar19 = vhaddps_avx(auVar21,auVar21);
*param_2 = auVar19._0_4_;
return;
}
| |
43,817 | my_wc_mb_euc_jp | eloqsql/strings/ctype-ujis.c | static int
my_wc_mb_euc_jp(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int jp;
if ((int) wc < 0x80) /* ASCII [00-7F] */
{
if (s >= e)
return MY_CS_TOOSMALL;
*s= (uchar) wc;
return 1;
}
if (wc > 0xFFFF)
return MY_CS_ILUNI;
if ((jp= unicode_to_jisx0208_eucjp[wc])) /* JIS-X-0208 */
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
MY_PUT_MB2(s, jp);
return 2;
}
if ((jp= unicode_to_jisx0212_eucjp[wc])) /* JIS-X-0212 */
{
if (s + 3 > e)
return MY_CS_TOOSMALL3;
s[0]= 0x8F;
MY_PUT_MB2(s + 1, jp);
return 3;
}
if (wc >= 0xFF61 && wc <= 0xFF9F) /* Half width Katakana */
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
s[0]= 0x8E;
s[1]= (uchar) (wc - 0xFEC0);
return 2;
}
return MY_CS_ILUNI;
} | O0 | c | my_wc_mb_euc_jp:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x80, %eax
jge 0xc4ffd
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0xc4fe5
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0xc5125
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0xc5125
cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF
jbe 0xc5013
movl $0x0, -0x4(%rbp)
jmp 0xc5125
movq -0x18(%rbp), %rcx
leaq 0x2c8702(%rip), %rax # 0x38d720
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
je 0xc506f
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0xc5044
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0xc5125
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)
jmp 0xc5125
movq -0x18(%rbp), %rcx
leaq 0x2e86a6(%rip), %rax # 0x3ad720
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
je 0xc50d0
movq -0x20(%rbp), %rax
addq $0x3, %rax
cmpq -0x28(%rbp), %rax
jbe 0xc50a0
movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99
jmp 0xc5125
movq -0x20(%rbp), %rax
movb $-0x71, (%rax)
movl -0x2c(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x2c(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x2(%rax)
movl $0x3, -0x4(%rbp)
jmp 0xc5125
cmpq $0xff61, -0x18(%rbp) # imm = 0xFF61
jb 0xc511e
cmpq $0xff9f, -0x18(%rbp) # imm = 0xFF9F
ja 0xc511e
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0xc50fb
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0xc5125
movq -0x20(%rbp), %rax
movb $-0x72, (%rax)
movq -0x18(%rbp), %rax
subq $0xfec0, %rax # imm = 0xFEC0
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movl $0x2, -0x4(%rbp)
jmp 0xc5125
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
| my_wc_mb_euc_jp:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_18]
cmp eax, 80h
jge short loc_C4FFD
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_C4FE5
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_C5125
loc_C4FE5:
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp loc_C5125
loc_C4FFD:
cmp [rbp+var_18], 0FFFFh
jbe short loc_C5013
mov [rbp+var_4], 0
jmp loc_C5125
loc_C5013:
mov rcx, [rbp+var_18]
lea rax, unicode_to_jisx0208_eucjp
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_2C], eax
cmp eax, 0
jz short loc_C506F
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_C5044
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_C5125
loc_C5044:
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
jmp loc_C5125
loc_C506F:
mov rcx, [rbp+var_18]
lea rax, unicode_to_jisx0212_eucjp
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_2C], eax
cmp eax, 0
jz short loc_C50D0
mov rax, [rbp+var_20]
add rax, 3
cmp rax, [rbp+var_28]
jbe short loc_C50A0
mov [rbp+var_4], 0FFFFFF99h
jmp loc_C5125
loc_C50A0:
mov rax, [rbp+var_20]
mov byte ptr [rax], 8Fh
mov eax, [rbp+var_2C]
sar eax, 8
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov eax, [rbp+var_2C]
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax+2], cl
mov [rbp+var_4], 3
jmp short loc_C5125
loc_C50D0:
cmp [rbp+var_18], 0FF61h
jb short loc_C511E
cmp [rbp+var_18], 0FF9Fh
ja short loc_C511E
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_C50FB
mov [rbp+var_4], 0FFFFFF9Ah
jmp short loc_C5125
loc_C50FB:
mov rax, [rbp+var_20]
mov byte ptr [rax], 8Eh
mov rax, [rbp+var_18]
sub rax, 0FEC0h
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov [rbp+var_4], 2
jmp short loc_C5125
loc_C511E:
mov [rbp+var_4], 0
loc_C5125:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_wc_mb_euc_jp(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
__int16 v5; // [rsp+0h] [rbp-2Ch]
__int16 v6; // [rsp+0h] [rbp-2Ch]
if ( (int)a2 >= 128 )
{
if ( a2 <= 0xFFFF )
{
v5 = unicode_to_jisx0208_eucjp[a2];
if ( v5 )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
*a3 = HIBYTE(v5);
a3[1] = v5;
return 2;
}
else
{
return (unsigned int)-102;
}
}
else
{
v6 = unicode_to_jisx0212_eucjp[a2];
if ( v6 )
{
if ( (unsigned long long)(a3 + 3) <= a4 )
{
*a3 = -113;
a3[1] = HIBYTE(v6);
a3[2] = v6;
return 3;
}
else
{
return (unsigned int)-103;
}
}
else if ( a2 < 0xFF61 || a2 > 0xFF9F )
{
return 0;
}
else if ( (unsigned long long)(a3 + 2) <= a4 )
{
*a3 = -114;
a3[1] = a2 + 64;
return 2;
}
else
{
return (unsigned int)-102;
}
}
}
else
{
return 0;
}
}
else if ( (unsigned long long)a3 < a4 )
{
*a3 = a2;
return 1;
}
else
{
return (unsigned int)-101;
}
}
| my_wc_mb_euc_jp:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x18]
CMP EAX,0x80
JGE 0x001c4ffd
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x001c4fe5
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x001c5125
LAB_001c4fe5:
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 0x001c5125
LAB_001c4ffd:
CMP qword ptr [RBP + -0x18],0xffff
JBE 0x001c5013
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001c5125
LAB_001c5013:
MOV RCX,qword ptr [RBP + -0x18]
LEA RAX,[0x48d720]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JZ 0x001c506f
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x001c5044
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x001c5125
LAB_001c5044:
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
JMP 0x001c5125
LAB_001c506f:
MOV RCX,qword ptr [RBP + -0x18]
LEA RAX,[0x4ad720]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JZ 0x001c50d0
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x3
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x001c50a0
MOV dword ptr [RBP + -0x4],0xffffff99
JMP 0x001c5125
LAB_001c50a0:
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],0x8f
MOV EAX,dword ptr [RBP + -0x2c]
SAR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV EAX,dword ptr [RBP + -0x2c]
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2],CL
MOV dword ptr [RBP + -0x4],0x3
JMP 0x001c5125
LAB_001c50d0:
CMP qword ptr [RBP + -0x18],0xff61
JC 0x001c511e
CMP qword ptr [RBP + -0x18],0xff9f
JA 0x001c511e
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x001c50fb
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x001c5125
LAB_001c50fb:
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],0x8e
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,0xfec0
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV dword ptr [RBP + -0x4],0x2
JMP 0x001c5125
LAB_001c511e:
MOV dword ptr [RBP + -0x4],0x0
LAB_001c5125:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_wc_mb_euc_jp(int8 param_1,ulong param_2,char *param_3,char *param_4)
{
short sVar1;
int4 local_c;
if ((int)param_2 < 0x80) {
if (param_3 < param_4) {
*param_3 = (char)param_2;
local_c = 1;
}
else {
local_c = 0xffffff9b;
}
}
else if (param_2 < 0x10000) {
sVar1 = *(short *)(unicode_to_jisx0208_eucjp + param_2 * 2);
if (sVar1 == 0) {
sVar1 = *(short *)(unicode_to_jisx0212_eucjp + param_2 * 2);
if (sVar1 == 0) {
if ((param_2 < 0xff61) || (0xff9f < param_2)) {
local_c = 0;
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
*param_3 = -0x72;
param_3[1] = (char)param_2 + '@';
local_c = 2;
}
}
else if (param_4 < param_3 + 3) {
local_c = 0xffffff99;
}
else {
*param_3 = -0x71;
param_3[1] = (char)((ushort)sVar1 >> 8);
param_3[2] = (char)sVar1;
local_c = 3;
}
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
*param_3 = (char)((ushort)sVar1 >> 8);
param_3[1] = (char)sVar1;
local_c = 2;
}
}
else {
local_c = 0;
}
return local_c;
}
| |
43,818 | stbi__skip_jpeg_junk_at_end(stbi__jpeg*) | monkey531[P]llama/examples/llava/../../common/stb_image.h | static stbi_uc stbi__skip_jpeg_junk_at_end(stbi__jpeg *j)
{
// some JPEGs have junk at end, skip over it but if we find what looks
// like a valid marker, resume there
while (!stbi__at_eof(j->s)) {
stbi_uc x = stbi__get8(j->s);
while (x == 0xff) { // might be a marker
if (stbi__at_eof(j->s)) return STBI__MARKER_none;
x = stbi__get8(j->s);
if (x != 0x00 && x != 0xff) {
// not a stuffed zero or lead-in to another marker, looks
// like an actual marker, return it
return x;
}
// stuffed zero has x=0 now which ends the loop, meaning we go
// back to regular scan loop.
// repeated 0xff keeps trying to read the next byte of the marker.
}
}
return STBI__MARKER_none;
} | O0 | c | stbi__skip_jpeg_junk_at_end(stbi__jpeg*):
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq (%rax), %rdi
callq 0x946c0
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x9f7f4
jmp 0x9f862
movq 0x8(%rsp), %rax
movq (%rax), %rdi
callq 0x8ecc0
movb %al, 0x7(%rsp)
movzbl 0x7(%rsp), %eax
cmpl $0xff, %eax
jne 0x9f85d
movq 0x8(%rsp), %rax
movq (%rax), %rdi
callq 0x946c0
cmpl $0x0, %eax
je 0x9f82a
movb $-0x1, 0x17(%rsp)
jmp 0x9f867
movq 0x8(%rsp), %rax
movq (%rax), %rdi
callq 0x8ecc0
movb %al, 0x7(%rsp)
movzbl 0x7(%rsp), %eax
cmpl $0x0, %eax
je 0x9f85b
movzbl 0x7(%rsp), %eax
cmpl $0xff, %eax
je 0x9f85b
movb 0x7(%rsp), %al
movb %al, 0x17(%rsp)
jmp 0x9f867
jmp 0x9f805
jmp 0x9f7d9
movb $-0x1, 0x17(%rsp)
movb 0x17(%rsp), %al
addq $0x18, %rsp
retq
| _ZL27stbi__skip_jpeg_junk_at_endP10stbi__jpeg:
sub rsp, 18h
mov [rsp+18h+var_10], rdi
loc_9F7D9:
mov rax, [rsp+18h+var_10]
mov rdi, [rax]
call _ZL12stbi__at_eofP13stbi__context; stbi__at_eof(stbi__context *)
cmp eax, 0
setnz al
xor al, 0FFh
test al, 1
jnz short loc_9F7F4
jmp short loc_9F862
loc_9F7F4:
mov rax, [rsp+18h+var_10]
mov rdi, [rax]
call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *)
mov [rsp+18h+var_11], al
loc_9F805:
movzx eax, [rsp+18h+var_11]
cmp eax, 0FFh
jnz short loc_9F85D
mov rax, [rsp+18h+var_10]
mov rdi, [rax]
call _ZL12stbi__at_eofP13stbi__context; stbi__at_eof(stbi__context *)
cmp eax, 0
jz short loc_9F82A
mov [rsp+18h+var_1], 0FFh
jmp short loc_9F867
loc_9F82A:
mov rax, [rsp+18h+var_10]
mov rdi, [rax]
call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *)
mov [rsp+18h+var_11], al
movzx eax, [rsp+18h+var_11]
cmp eax, 0
jz short loc_9F85B
movzx eax, [rsp+18h+var_11]
cmp eax, 0FFh
jz short loc_9F85B
mov al, [rsp+18h+var_11]
mov [rsp+18h+var_1], al
jmp short loc_9F867
loc_9F85B:
jmp short loc_9F805
loc_9F85D:
jmp loc_9F7D9
loc_9F862:
mov [rsp+18h+var_1], 0FFh
loc_9F867:
mov al, [rsp+18h+var_1]
add rsp, 18h
retn
| char stbi__skip_jpeg_junk_at_end(long long *a1)
{
unsigned __int8 v2; // [rsp+7h] [rbp-11h]
while ( !stbi__at_eof(*a1) )
{
v2 = stbi__get8(*a1);
while ( v2 == 255 )
{
if ( stbi__at_eof(*a1) )
return -1;
v2 = stbi__get8(*a1);
if ( v2 && v2 != 255 )
return v2;
}
}
return -1;
}
| stbi__skip_jpeg_junk_at_end:
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RDI
LAB_0019f7d9:
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX]
CALL 0x001946c0
CMP EAX,0x0
SETNZ AL
XOR AL,0xff
TEST AL,0x1
JNZ 0x0019f7f4
JMP 0x0019f862
LAB_0019f7f4:
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX]
CALL 0x0018ecc0
MOV byte ptr [RSP + 0x7],AL
LAB_0019f805:
MOVZX EAX,byte ptr [RSP + 0x7]
CMP EAX,0xff
JNZ 0x0019f85d
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX]
CALL 0x001946c0
CMP EAX,0x0
JZ 0x0019f82a
MOV byte ptr [RSP + 0x17],0xff
JMP 0x0019f867
LAB_0019f82a:
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX]
CALL 0x0018ecc0
MOV byte ptr [RSP + 0x7],AL
MOVZX EAX,byte ptr [RSP + 0x7]
CMP EAX,0x0
JZ 0x0019f85b
MOVZX EAX,byte ptr [RSP + 0x7]
CMP EAX,0xff
JZ 0x0019f85b
MOV AL,byte ptr [RSP + 0x7]
MOV byte ptr [RSP + 0x17],AL
JMP 0x0019f867
LAB_0019f85b:
JMP 0x0019f805
LAB_0019f85d:
JMP 0x0019f7d9
LAB_0019f862:
MOV byte ptr [RSP + 0x17],0xff
LAB_0019f867:
MOV AL,byte ptr [RSP + 0x17]
ADD RSP,0x18
RET
|
/* stbi__skip_jpeg_junk_at_end(stbi__jpeg*) */
char stbi__skip_jpeg_junk_at_end(stbi__jpeg *param_1)
{
int iVar1;
char local_11;
do {
iVar1 = stbi__at_eof(*(stbi__context **)param_1);
if (iVar1 != 0) {
return -1;
}
local_11 = stbi__get8(*(stbi__context **)param_1);
while (local_11 == -1) {
iVar1 = stbi__at_eof(*(stbi__context **)param_1);
if (iVar1 != 0) {
return -1;
}
local_11 = stbi__get8(*(stbi__context **)param_1);
if ((local_11 != '\0') && (local_11 != -1)) {
return local_11;
}
}
} while( true );
}
| |
43,819 | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::end_array() | monkey531[P]llama/common/json.hpp | bool end_array()
{
JSON_ASSERT(!ref_stack.empty());
JSON_ASSERT(ref_stack.back()->is_array());
ref_stack.back()->set_parents();
ref_stack.pop_back();
return true;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::end_array():
pushq %rax
movq 0x10(%rdi), %rax
cmpq %rax, 0x8(%rdi)
je 0x6146c
movq -0x8(%rax), %rcx
cmpb $0x2, (%rcx)
jne 0x61488
addq $-0x8, %rax
movq %rax, 0x10(%rdi)
movb $0x1, %al
popq %rcx
retq
leaq 0x8b0d6(%rip), %rdi # 0xec549
leaq 0x8b119(%rip), %rdx # 0xec593
leaq 0x8c0ca(%rip), %rcx # 0xed54b
movl $0x1b01, %esi # imm = 0x1B01
jmp 0x614a2
leaq 0x8b0ba(%rip), %rdi # 0xec549
leaq 0x8b0fd(%rip), %rdx # 0xec593
leaq 0x8c379(%rip), %rcx # 0xed816
movl $0x1b02, %esi # imm = 0x1B02
xorl %eax, %eax
callq 0x1aeb0
nop
| _ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9end_arrayEv:
push rax
mov rax, [rdi+10h]
cmp [rdi+8], rax
jz short loc_6146C
mov rcx, [rax-8]
cmp byte ptr [rcx], 2
jnz short loc_61488
add rax, 0FFFFFFFFFFFFFFF8h
mov [rdi+10h], rax
mov al, 1
pop rcx
retn
loc_6146C:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aRefStackEmpty; "!ref_stack.empty()"
mov esi, 1B01h
jmp short loc_614A2
loc_61488:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aRefStackBackIs_0; "ref_stack.back()->is_array()"
mov esi, 1B02h
loc_614A2:
xor eax, eax
call _ggml_abort
nop
| char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::end_array(
long long a1)
{
long long v1; // rax
long long v3; // rsi
long long v4; // rdx
long long v5; // rcx
v1 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(a1 + 8) == v1 )
{
v3 = 6913LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
6913LL,
"GGML_ASSERT(%s) failed",
"!ref_stack.empty()");
}
else
{
if ( **(_BYTE **)(v1 - 8) == 2 )
{
*(_QWORD *)(a1 + 16) = v1 - 8;
return 1;
}
v3 = 6914LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
6914LL,
"GGML_ASSERT(%s) failed",
"ref_stack.back()->is_array()");
}
return nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::parse_error<nlohmann::json_abi_v3_11_3::detail::out_of_range>(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
v3,
v4,
v5);
}
| end_array:
PUSH RAX
MOV RAX,qword ptr [RDI + 0x10]
CMP qword ptr [RDI + 0x8],RAX
JZ 0x0016146c
MOV RCX,qword ptr [RAX + -0x8]
CMP byte ptr [RCX],0x2
JNZ 0x00161488
ADD RAX,-0x8
MOV qword ptr [RDI + 0x10],RAX
MOV AL,0x1
POP RCX
RET
LAB_0016146c:
LEA RDI,[0x1ec549]
LEA RDX,[0x1ec593]
LEA RCX,[0x1ed54b]
MOV ESI,0x1b01
JMP 0x001614a2
LAB_00161488:
LEA RDI,[0x1ec549]
LEA RDX,[0x1ec593]
LEA RCX,[0x1ed816]
MOV ESI,0x1b02
LAB_001614a2:
XOR EAX,EAX
CALL 0x0011aeb0
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::end_array() */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::end_array(json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this)
{
long lVar1;
char *pcVar2;
int8 uVar3;
lVar1 = *(long *)(this + 0x10);
if (*(long *)(this + 8) == lVar1) {
pcVar2 = "!ref_stack.empty()";
uVar3 = 0x1b01;
}
else {
if (**(char **)(lVar1 + -8) == '\x02') {
*(long *)(this + 0x10) = lVar1 + -8;
return CONCAT71((int7)((ulong)(lVar1 + -8) >> 8),1);
}
pcVar2 = "ref_stack.back()->is_array()";
uVar3 = 0x1b02;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar3,
"GGML_ASSERT(%s) failed",pcVar2);
}
| |
43,820 | 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>::get_binary() const | monkey531[P]llama/common/json.hpp | const binary_t& get_binary() const
{
if (!is_binary())
{
JSON_THROW(type_error::create(302, detail::concat("type must be binary, but is ", type_name()), this));
}
return *get_ptr<const binary_t*>();
} | 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>::get_binary() const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x8, (%rdi)
jne 0xb26bf
movq 0x8(%r14), %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1a430
movq %rax, %rbx
movq %r14, %rdi
callq 0x5f6cc
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x3e9a9(%rip), %rsi # 0xf108c
leaq 0x10(%rsp), %rdi
callq 0x87057
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x86e88
xorl %ebp, %ebp
leaq 0x7784a(%rip), %rsi # 0x129f58
leaq -0x56e13(%rip), %rdx # 0x5b902
movq %rbx, %rdi
callq 0x1af20
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb273b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1a8e0
testb %bpl, %bpl
jne 0xb2745
jmp 0xb274d
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a670
movq %r14, %rdi
callq 0x1afb0
nop
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10get_binaryEv:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 8
jnz short loc_B26BF
mov rax, [r14+8]
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_B26BF:
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, aTypeMustBeBina; "type must be binary, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_B273B
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B273B:
test bpl, bpl
jnz short loc_B2745
jmp short loc_B274D
mov r14, rax
loc_B2745:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_B274D:
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>::get_binary(
long long a1)
{
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v3; // [rsp+8h] [rbp-40h] BYREF
_QWORD v4[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 8 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
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>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v4,
(long long)"type must be binary, but is ",
&v3);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302,
v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return *(_QWORD *)(a1 + 8);
}
| get_binary:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x8
JNZ 0x001b26bf
MOV RAX,qword ptr [R14 + 0x8]
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_001b26bf:
MOV EDI,0x20
CALL 0x0011a430
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015f6cc
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001b26dc:
LEA RSI,[0x1f108c]
LEA RDI,[RSP + 0x10]
CALL 0x00187057
MOV BPL,0x1
LAB_001b26f0:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x00186e88
XOR EBP,EBP
LEA RSI,[0x229f58]
LEA RDX,[0x15b902]
MOV RDI,RBX
CALL 0x0011af20
|
/* 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>::get_binary() const */
int8 __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::get_binary(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this)
{
int8 uVar1;
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>
)0x8) {
return *(int8 *)(this + 8);
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 001b26dc to 001b26ec has its CatchHandler @ 001b2742 */
detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be binary, but is ",&local_40);
/* try { // try from 001b26f0 to 001b271c has its CatchHandler @ 001b271d */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar1,0x12e,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
| |
43,821 | alaya::RawSpace<float, float, unsigned int, alaya::SequentialStorage<float, unsigned int>>::RawSpace(unsigned int, unsigned long, alaya::MetricType) | AlayaLite/include/space/raw_space.hpp | RawSpace(IDType capacity, size_t dim, MetricType metric)
: capacity_(capacity), dim_(dim), metric_(metric) {
data_size_ = dim * sizeof(DataType);
distance_calu_func_ = l2_sqr<DataType, DistanceType>; // Assign the distance function
data_storage_.init(data_size_, capacity);
if constexpr (!(std::is_same_v<DataType, float> || std::is_same_v<DataType, double>)) {
if (metric_ == MetricType::COS) {
LOG_ERROR("COS metric only support float or double");
exit(-1);
}
}
set_metric_function();
} | O0 | cpp | alaya::RawSpace<float, float, unsigned int, alaya::SequentialStorage<float, unsigned int>>::RawSpace(unsigned int, unsigned long, alaya::MetricType):
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movl %esi, 0x3c(%rsp)
movq %rdx, 0x30(%rsp)
movl %ecx, 0x2c(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movl 0x2c(%rsp), %eax
movl %eax, (%rdi)
movl $0x0, 0x10(%rdi)
movl 0x30(%rsp), %eax
movl %eax, 0x14(%rdi)
movl $0x0, 0x18(%rdi)
movl $0x0, 0x1c(%rdi)
movl 0x3c(%rsp), %eax
movl %eax, 0x20(%rdi)
addq $0x28, %rdi
movq %rdi, 0x10(%rsp)
callq 0x29de0
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rdi
movl 0x30(%rsp), %ecx
shll $0x2, %ecx
movl %ecx, 0x10(%rax)
leaq 0xae(%rip), %rcx # 0x29e30
movq %rcx, 0x8(%rax)
movl 0x10(%rax), %eax
movl %eax, %esi
movl 0x3c(%rsp), %eax
movl %eax, %edx
xorl %ecx, %ecx
movl $0x40, %r8d
callq 0x29eb0
jmp 0x29da0
movq 0x8(%rsp), %rdi
callq 0x29fa0
jmp 0x29dac
addq $0x48, %rsp
retq
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
callq 0x29ff0
movq 0x20(%rsp), %rdi
callq 0x15dd0
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN5alaya8RawSpaceIffjNS_17SequentialStorageIfjEEEC2EjmNS_10MetricTypeE:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_C], esi
mov [rsp+48h+var_18], rdx
mov [rsp+48h+var_1C], ecx
mov rdi, [rsp+48h+var_8]
mov [rsp+48h+var_40], rdi
mov eax, [rsp+48h+var_1C]
mov [rdi], eax
mov dword ptr [rdi+10h], 0
mov eax, dword ptr [rsp+48h+var_18]
mov [rdi+14h], eax
mov dword ptr [rdi+18h], 0
mov dword ptr [rdi+1Ch], 0
mov eax, [rsp+48h+var_C]
mov [rdi+20h], eax
add rdi, 28h ; '('
mov [rsp+48h+var_38], rdi
call _ZN5alaya17SequentialStorageIfjEC2Ev; alaya::SequentialStorage<float,uint>::SequentialStorage(void)
mov rax, [rsp+48h+var_40]
mov rdi, [rsp+48h+var_38]
mov ecx, dword ptr [rsp+48h+var_18]
shl ecx, 2
mov [rax+10h], ecx
lea rcx, _ZN5alaya6l2_sqrIffEET0_PT_S3_m; alaya::l2_sqr<float,float>(float *,float *,ulong)
mov [rax+8], rcx
mov eax, [rax+10h]
mov esi, eax
mov eax, [rsp+48h+var_C]
mov edx, eax
xor ecx, ecx
mov r8d, 40h ; '@'
call _ZN5alaya17SequentialStorageIfjE4initEmmcm; alaya::SequentialStorage<float,uint>::init(ulong,ulong,char,ulong)
jmp short $+2
loc_29DA0:
mov rdi, [rsp+48h+var_40]
call _ZN5alaya8RawSpaceIffjNS_17SequentialStorageIfjEEE19set_metric_functionEv; alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>::set_metric_function(void)
jmp short $+2
loc_29DAC:
add rsp, 48h
retn
mov rdi, [rsp+arg_8]
mov rcx, rax
mov eax, edx
mov [rsp+arg_18], rcx
mov [rsp+arg_14], eax
call _ZN5alaya17SequentialStorageIfjED2Ev; alaya::SequentialStorage<float,uint>::~SequentialStorage()
mov rdi, [rsp+arg_18]
call __Unwind_Resume
| long long alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>::RawSpace(
long long a1,
unsigned int a2,
unsigned int a3,
int a4)
{
*(_DWORD *)a1 = a4;
*(_DWORD *)(a1 + 16) = 0;
*(_QWORD *)(a1 + 20) = a3;
*(_DWORD *)(a1 + 28) = 0;
*(_DWORD *)(a1 + 32) = a2;
alaya::SequentialStorage<float,unsigned int>::SequentialStorage();
*(_DWORD *)(a1 + 16) = 4 * a3;
*(_QWORD *)(a1 + 8) = alaya::l2_sqr<float,float>;
alaya::SequentialStorage<float,unsigned int>::init(a1 + 40, *(unsigned int *)(a1 + 16), a2, 0LL, 64LL);
return alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>::set_metric_function(a1);
}
| RawSpace:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV dword ptr [RSP + 0x3c],ESI
MOV qword ptr [RSP + 0x30],RDX
MOV dword ptr [RSP + 0x2c],ECX
MOV RDI,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x8],RDI
MOV EAX,dword ptr [RSP + 0x2c]
MOV dword ptr [RDI],EAX
MOV dword ptr [RDI + 0x10],0x0
MOV EAX,dword ptr [RSP + 0x30]
MOV dword ptr [RDI + 0x14],EAX
MOV dword ptr [RDI + 0x18],0x0
MOV dword ptr [RDI + 0x1c],0x0
MOV EAX,dword ptr [RSP + 0x3c]
MOV dword ptr [RDI + 0x20],EAX
ADD RDI,0x28
MOV qword ptr [RSP + 0x10],RDI
CALL 0x00129de0
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP + 0x30]
SHL ECX,0x2
MOV dword ptr [RAX + 0x10],ECX
LEA RCX,[0x129e30]
MOV qword ptr [RAX + 0x8],RCX
MOV EAX,dword ptr [RAX + 0x10]
MOV ESI,EAX
MOV EAX,dword ptr [RSP + 0x3c]
MOV EDX,EAX
LAB_00129d91:
XOR ECX,ECX
MOV R8D,0x40
CALL 0x00129eb0
JMP 0x00129da0
LAB_00129da0:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00129fa0
LAB_00129daa:
JMP 0x00129dac
LAB_00129dac:
ADD RSP,0x48
RET
|
/* alaya::RawSpace<float, float, unsigned int, alaya::SequentialStorage<float, unsigned int>
>::RawSpace(unsigned int, unsigned long, alaya::MetricType) */
void __thiscall
alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>::RawSpace
(RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>> *this,
uint param_1,int param_3,int4 param_4)
{
*(int4 *)this = param_4;
*(int4 *)(this + 0x10) = 0;
*(int *)(this + 0x14) = param_3;
*(int4 *)(this + 0x18) = 0;
*(int4 *)(this + 0x1c) = 0;
*(uint *)(this + 0x20) = param_1;
SequentialStorage<float,unsigned_int>::SequentialStorage
((SequentialStorage<float,unsigned_int> *)(this + 0x28));
*(int *)(this + 0x10) = param_3 << 2;
*(code **)(this + 8) = l2_sqr<float,float>;
/* try { // try from 00129d91 to 00129da9 has its CatchHandler @ 00129db1 */
SequentialStorage<float,unsigned_int>::init
((SequentialStorage<float,unsigned_int> *)(this + 0x28),(ulong)*(uint *)(this + 0x10),
(ulong)param_1,'\0',0x40);
set_metric_function(this);
return;
}
| |
43,822 | ma_zlib_ctx_init | eloqsql/libmariadb/plugins/compress/c_zlib.c | static ma_compress_ctx *ma_zlib_ctx_init(int compression_level)
{
ma_compress_ctx *ctx;
if (!(ctx = (ma_compress_ctx *)calloc(1, sizeof(ma_compress_ctx))))
return NULL;
ctx->compression_level= (compression_level == COMPRESSION_LEVEL_DEFAULT) ?
Z_DEFAULT_COMPRESSION : compression_level;
return ctx;
} | O3 | c | ma_zlib_ctx_init:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0x1, %edi
movl $0x20, %esi
callq 0x35840
testq %rax, %rax
je 0x4f786
cmpl $0x7fffffff, %ebx # imm = 0x7FFFFFFF
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
cmovnel %ebx, %ecx
movl %ecx, 0x10(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| ma_zlib_ctx_init:
push rbp
mov rbp, rsp
push rbx
push rax
mov ebx, edi
mov edi, 1
mov esi, 20h ; ' '
call _calloc
test rax, rax
jz short loc_4F786
cmp ebx, 7FFFFFFFh
mov ecx, 0FFFFFFFFh
cmovnz ecx, ebx
mov [rax+10h], ecx
loc_4F786:
add rsp, 8
pop rbx
pop rbp
retn
| long long ma_zlib_ctx_init(int a1)
{
long long result; // rax
int v2; // ecx
result = calloc(1LL, 32LL);
if ( result )
{
v2 = -1;
if ( a1 != 0x7FFFFFFF )
v2 = a1;
*(_DWORD *)(result + 16) = v2;
}
return result;
}
| ma_zlib_ctx_init:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV EBX,EDI
MOV EDI,0x1
MOV ESI,0x20
CALL 0x00135840
TEST RAX,RAX
JZ 0x0014f786
CMP EBX,0x7fffffff
MOV ECX,0xffffffff
CMOVNZ ECX,EBX
MOV dword ptr [RAX + 0x10],ECX
LAB_0014f786:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void ma_zlib_ctx_init(int param_1)
{
void *pvVar1;
int iVar2;
pvVar1 = calloc(1,0x20);
if (pvVar1 != (void *)0x0) {
iVar2 = -1;
if (param_1 != 0x7fffffff) {
iVar2 = param_1;
}
*(int *)((long)pvVar1 + 0x10) = iVar2;
}
return;
}
| |
43,823 | aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::TimingWheelTool::Tick[abi:cxx11]() | aimrt_mujoco_sim/_deps/aimrt-src/src/plugins/time_manipulator_plugin/../time_manipulator_plugin/time_manipulator_executor.h | TaskList Tick() {
TaskList task_list;
task_list.swap(wheel[current_pos]);
++current_pos;
if (current_pos == wheel.size()) [[unlikely]] {
current_pos = 0;
borrow_func();
}
return task_list;
} | O3 | c | aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::TimingWheelTool::Tick[abi:cxx11]():
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %rdi, 0x8(%rdi)
movq %rdi, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rsi), %rax
movq 0x10(%rsi), %rcx
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %r15
movq %r15, %rsi
callq 0x83c80
movq 0x10(%r15), %rax
movq 0x10(%rbx), %rcx
movq %rcx, 0x10(%r15)
movq %rax, 0x10(%rbx)
movq (%r14), %rax
movq 0x18(%r14), %rcx
incq %rax
movq %rax, (%r14)
subq 0x10(%r14), %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
cmpq %rdx, %rax
je 0x9b152
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq $0x0, (%r14)
cmpq $0x0, 0x38(%r14)
je 0x9b16a
leaq 0x28(%r14), %rdi
callq *0x40(%r14)
jmp 0x9b149
callq 0x80b20
movq %rax, %r14
movq %rbx, %rdi
callq 0x9b866
movq %r14, %rdi
callq 0x83b70
| _ZN5aimrt7plugins23time_manipulator_plugin23TimeManipulatorExecutor15TimingWheelTool4TickB5cxx11Ev:
push r15
push r14
push rbx
mov r14, rsi
mov rbx, rdi
mov [rdi+8], rdi
mov [rdi], rdi
mov qword ptr [rdi+10h], 0
mov rax, [rsi]
mov rcx, [rsi+10h]
lea rax, [rax+rax*2]
lea r15, [rcx+rax*8]
mov rsi, r15; std::__detail::_List_node_base *
call __ZNSt8__detail15_List_node_base4swapERS0_S1_; std::__detail::_List_node_base::swap(std::__detail::_List_node_base&,std::__detail::_List_node_base&)
mov rax, [r15+10h]
mov rcx, [rbx+10h]
mov [r15+10h], rcx
mov [rbx+10h], rax
mov rax, [r14]
mov rcx, [r14+18h]
inc rax
mov [r14], rax
sub rcx, [r14+10h]
sar rcx, 3
mov rdx, 0AAAAAAAAAAAAAAABh
imul rdx, rcx
cmp rax, rdx
jz short loc_9B152
loc_9B149:
mov rax, rbx
pop rbx
pop r14
pop r15
retn
loc_9B152:
mov qword ptr [r14], 0
cmp qword ptr [r14+38h], 0
jz short loc_9B16A
lea rdi, [r14+28h]
call qword ptr [r14+40h]
jmp short loc_9B149
loc_9B16A:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
mov r14, rax
mov rdi, rbx
call _ZNSt7__cxx1110_List_baseIN5aimrt7plugins23time_manipulator_plugin23TimeManipulatorExecutor17TaskWithTimestampESaIS5_EE8_M_clearEv; std::_List_base<aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::TaskWithTimestamp>::_M_clear(void)
mov rdi, r14
call __Unwind_Resume
| std::__detail::_List_node_base * aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::TimingWheelTool::Tick[abi:cxx11](
std::__detail::_List_node_base *a1,
long long a2,
std::__detail::_List_node_base *a3)
{
std::__detail::_List_node_base *v3; // r15
long long v4; // rax
long long v5; // rcx
long long v6; // rax
*((_QWORD *)a1 + 1) = a1;
*(_QWORD *)a1 = a1;
*((_QWORD *)a1 + 2) = 0LL;
v3 = (std::__detail::_List_node_base *)(*(_QWORD *)(a2 + 16) + 24LL * *(_QWORD *)a2);
std::__detail::_List_node_base::swap(a1, v3, a3);
v4 = *((_QWORD *)v3 + 2);
*((_QWORD *)v3 + 2) = *((_QWORD *)a1 + 2);
*((_QWORD *)a1 + 2) = v4;
v5 = *(_QWORD *)(a2 + 24);
v6 = *(_QWORD *)a2 + 1LL;
*(_QWORD *)a2 = v6;
if ( v6 == 0xAAAAAAAAAAAAAAABLL * ((v5 - *(_QWORD *)(a2 + 16)) >> 3) )
{
*(_QWORD *)a2 = 0LL;
if ( !*(_QWORD *)(a2 + 56) )
std::__throw_bad_function_call();
(*(void ( **)(long long))(a2 + 64))(a2 + 40);
}
return a1;
}
| Tick[abi:cxx11]:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RSI
MOV RBX,RDI
MOV qword ptr [RDI + 0x8],RDI
MOV qword ptr [RDI],RDI
MOV qword ptr [RDI + 0x10],0x0
MOV RAX,qword ptr [RSI]
MOV RCX,qword ptr [RSI + 0x10]
LEA RAX,[RAX + RAX*0x2]
LEA R15,[RCX + RAX*0x8]
MOV RSI,R15
CALL 0x00183c80
MOV RAX,qword ptr [R15 + 0x10]
MOV RCX,qword ptr [RBX + 0x10]
MOV qword ptr [R15 + 0x10],RCX
MOV qword ptr [RBX + 0x10],RAX
MOV RAX,qword ptr [R14]
MOV RCX,qword ptr [R14 + 0x18]
INC RAX
MOV qword ptr [R14],RAX
SUB RCX,qword ptr [R14 + 0x10]
SAR RCX,0x3
MOV RDX,-0x5555555555555555
IMUL RDX,RCX
CMP RAX,RDX
JZ 0x0019b152
LAB_0019b149:
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
LAB_0019b152:
MOV qword ptr [R14],0x0
CMP qword ptr [R14 + 0x38],0x0
JZ 0x0019b16a
LEA RDI,[R14 + 0x28]
LAB_0019b164:
CALL qword ptr [R14 + 0x40]
JMP 0x0019b149
LAB_0019b16a:
CALL 0x00180b20
|
/* aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::TimingWheelTool::Tick[abi:cxx11]()
*/
void aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::TimingWheelTool::
Tick_abi_cxx11_(void)
{
_List_node_base *p_Var1;
int8 uVar2;
long lVar3;
long *in_RSI;
_List_node_base *in_RDI;
*(_List_node_base **)(in_RDI + 8) = in_RDI;
*(_List_node_base **)in_RDI = in_RDI;
*(int8 *)(in_RDI + 0x10) = 0;
p_Var1 = (_List_node_base *)(in_RSI[2] + *in_RSI * 0x18);
std::__detail::_List_node_base::swap(in_RDI,p_Var1);
uVar2 = *(int8 *)(p_Var1 + 0x10);
*(int8 *)(p_Var1 + 0x10) = *(int8 *)(in_RDI + 0x10);
*(int8 *)(in_RDI + 0x10) = uVar2;
lVar3 = *in_RSI;
*in_RSI = lVar3 + 1;
if (lVar3 + 1 == (in_RSI[3] - in_RSI[2] >> 3) * -0x5555555555555555) {
*in_RSI = 0;
if (in_RSI[7] == 0) {
/* WARNING: Subroutine does not return */
std::__throw_bad_function_call();
}
/* try { // try from 0019b164 to 0019b16e has its CatchHandler @ 0019b16f */
(*(code *)in_RSI[8])(in_RSI + 5);
}
return;
}
| |
43,824 | mi_init_bulk_insert | eloqsql/storage/myisam/mi_write.c | int mi_init_bulk_insert(MI_INFO *info, size_t cache_size, ha_rows rows)
{
MYISAM_SHARE *share=info->s;
MI_KEYDEF *key=share->keyinfo;
bulk_insert_param *params;
uint i, num_keys, total_keylength;
ulonglong key_map;
DBUG_ENTER("_mi_init_bulk_insert");
DBUG_PRINT("enter",("cache_size: %lu", (ulong) cache_size));
DBUG_ASSERT(!info->bulk_insert &&
(!rows || rows >= MI_MIN_ROWS_TO_USE_BULK_INSERT));
mi_clear_all_keys_active(key_map);
for (i=total_keylength=num_keys=0 ; i < share->base.keys ; i++)
{
if (! (key[i].flag & HA_NOSAME) && (share->base.auto_key != i + 1) &&
mi_is_key_active(share->state.key_map, i))
{
num_keys++;
mi_set_key_active(key_map, i);
total_keylength+=key[i].maxlength+TREE_ELEMENT_EXTRA_SIZE;
}
}
if (num_keys==0 ||
num_keys * (size_t) MI_MIN_SIZE_BULK_INSERT_TREE > cache_size)
DBUG_RETURN(0);
if (rows && rows*total_keylength < cache_size)
cache_size= (size_t) rows;
else
cache_size/=total_keylength*16;
info->bulk_insert=(TREE *)
my_malloc(mi_key_memory_MI_INFO_bulk_insert,
(sizeof(TREE)*share->base.keys+
sizeof(bulk_insert_param)*num_keys),MYF(0));
if (!info->bulk_insert)
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
params=(bulk_insert_param *)(info->bulk_insert+share->base.keys);
for (i=0 ; i < share->base.keys ; i++)
{
if (mi_is_key_active(key_map, i))
{
params->info=info;
params->keynr=i;
/* Only allocate a 16'th of the buffer at a time */
init_tree(&info->bulk_insert[i],
cache_size * key[i].maxlength,
cache_size * key[i].maxlength, 0,
(qsort_cmp2)keys_compare, keys_free, (void *)params++, MYF(0));
}
else
info->bulk_insert[i].root=0;
}
DBUG_RETURN(0);
} | O0 | c | mi_init_bulk_insert:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x218(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x528e0
jmp 0x528e2
jmp 0x528e4
movq $0x0, -0x50(%rbp)
movl $0x0, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x180(%rcx), %eax
jae 0x529c7
movq -0x30(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movzwl 0xa(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x529b7
movq -0x28(%rbp), %rax
movl 0x184(%rax), %eax
movl -0x3c(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
je 0x529b7
movq -0x28(%rbp), %rax
movq 0xc0(%rax), %rax
movl -0x3c(%rbp), %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
je 0x52970
movb $0x1, %al
testb $0x1, %al
jne 0x52978
jmp 0x529b7
xorl %eax, %eax
testb $0x1, %al
jne 0x52978
jmp 0x529b7
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
orq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movzwl 0x16(%rax), %eax
movl %eax, %ecx
addq $0x20, %rcx
movl -0x44(%rbp), %eax
addq %rcx, %rax
movl %eax, -0x44(%rbp)
jmp 0x529b9
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x52901
cmpl $0x0, -0x40(%rbp)
je 0x529da
movl -0x40(%rbp), %eax
shlq $0xe, %rax
cmpq -0x18(%rbp), %rax
jbe 0x529e8
jmp 0x529dc
movl $0x0, -0x4(%rbp)
jmp 0x52bb5
cmpq $0x0, -0x20(%rbp)
je 0x52a0a
movq -0x20(%rbp), %rax
movl -0x44(%rbp), %ecx
imulq %rcx, %rax
cmpq -0x18(%rbp), %rax
jae 0x52a0a
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x52a21
movl -0x44(%rbp), %eax
shll $0x4, %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
xorl %edx, %edx
divq %rcx
movq %rax, -0x18(%rbp)
leaq 0x39d97c(%rip), %rax # 0x3f03a4
movl (%rax), %edi
movq -0x28(%rbp), %rax
movl 0x180(%rax), %eax
imulq $0x298, %rax, %rsi # imm = 0x298
movl -0x40(%rbp), %eax
shlq $0x4, %rax
addq %rax, %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x80550
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x80(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x80(%rax)
jne 0x52a78
jmp 0x52a6c
movl $0x80, -0x4(%rbp)
jmp 0x52bb5
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movq -0x28(%rbp), %rcx
movl 0x180(%rcx), %ecx
imulq $0x298, %rcx, %rcx # imm = 0x298
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x180(%rcx), %eax
jae 0x52bac
movq -0x50(%rbp), %rax
movl -0x3c(%rbp), %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
je 0x52adb
movb $0x1, %al
testb $0x1, %al
jne 0x52ae6
jmp 0x52b7d
xorl %eax, %eax
testb $0x1, %al
jne 0x52ae6
jmp 0x52b7d
movq -0x10(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movl -0x3c(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rdi
movl -0x3c(%rbp), %eax
imulq $0x298, %rax, %rax # imm = 0x298
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movzwl 0x16(%rax), %eax
imulq %rax, %rsi
movq -0x18(%rbp), %rdx
movq -0x30(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movzwl 0x16(%rax), %eax
imulq %rax, %rdx
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x10, %rcx
movq %rcx, -0x38(%rbp)
xorl %ecx, %ecx
leaq 0x61(%rip), %r8 # 0x52bc0
leaq 0xba(%rip), %r9 # 0x52c20
xorl %r10d, %r10d
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x86fc0
jmp 0x52b9c
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movl -0x3c(%rbp), %ecx
imulq $0x298, %rcx, %rcx # imm = 0x298
addq %rcx, %rax
movq $0x0, (%rax)
jmp 0x52b9e
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x52aa2
jmp 0x52bae
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nop
| mi_init_bulk_insert:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov rax, [rax+218h]
mov [rbp+var_30], rax
jmp short $+2
loc_528E0:
jmp short $+2
loc_528E2:
jmp short $+2
loc_528E4:
mov [rbp+var_50], 0
mov [rbp+var_40], 0
mov [rbp+var_44], 0
mov [rbp+var_3C], 0
loc_52901:
mov eax, [rbp+var_3C]
mov rcx, [rbp+var_28]
cmp eax, [rcx+180h]
jnb loc_529C7
mov rax, [rbp+var_30]
mov ecx, [rbp+var_3C]
imul rcx, 70h ; 'p'
add rax, rcx
movzx eax, word ptr [rax+0Ah]
and eax, 1
cmp eax, 0
jnz loc_529B7
mov rax, [rbp+var_28]
mov eax, [rax+184h]
mov ecx, [rbp+var_3C]
add ecx, 1
cmp eax, ecx
jz short loc_529B7
mov rax, [rbp+var_28]
mov rax, [rax+0C0h]
mov ecx, [rbp+var_3C]
mov edx, 1
shl rdx, cl
mov rcx, rdx
and rax, rcx
cmp rax, 0
jz short loc_52970
mov al, 1
test al, 1
jnz short loc_52978
jmp short loc_529B7
loc_52970:
xor eax, eax
test al, 1
jnz short loc_52978
jmp short loc_529B7
loc_52978:
mov eax, [rbp+var_40]
add eax, 1
mov [rbp+var_40], eax
mov eax, [rbp+var_3C]
mov ecx, eax
mov eax, 1
shl rax, cl
or rax, [rbp+var_50]
mov [rbp+var_50], rax
mov rax, [rbp+var_30]
mov ecx, [rbp+var_3C]
imul rcx, 70h ; 'p'
add rax, rcx
movzx eax, word ptr [rax+16h]
mov ecx, eax
add rcx, 20h ; ' '
mov eax, [rbp+var_44]
add rax, rcx
mov [rbp+var_44], eax
loc_529B7:
jmp short $+2
loc_529B9:
mov eax, [rbp+var_3C]
add eax, 1
mov [rbp+var_3C], eax
jmp loc_52901
loc_529C7:
cmp [rbp+var_40], 0
jz short loc_529DA
mov eax, [rbp+var_40]
shl rax, 0Eh
cmp rax, [rbp+var_18]
jbe short loc_529E8
loc_529DA:
jmp short $+2
loc_529DC:
mov [rbp+var_4], 0
jmp loc_52BB5
loc_529E8:
cmp [rbp+var_20], 0
jz short loc_52A0A
mov rax, [rbp+var_20]
mov ecx, [rbp+var_44]
imul rax, rcx
cmp rax, [rbp+var_18]
jnb short loc_52A0A
mov rax, [rbp+var_20]
mov [rbp+var_18], rax
jmp short loc_52A21
loc_52A0A:
mov eax, [rbp+var_44]
shl eax, 4
mov eax, eax
mov ecx, eax
mov rax, [rbp+var_18]
xor edx, edx
div rcx
mov [rbp+var_18], rax
loc_52A21:
lea rax, mi_key_memory_MI_INFO_bulk_insert
mov edi, [rax]
mov rax, [rbp+var_28]
mov eax, [rax+180h]
imul rsi, rax, 298h
mov eax, [rbp+var_40]
shl rax, 4
add rsi, rax
xor eax, eax
mov edx, eax
call my_malloc
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+80h], rcx
mov rax, [rbp+var_10]
cmp qword ptr [rax+80h], 0
jnz short loc_52A78
jmp short $+2
loc_52A6C:
mov [rbp+var_4], 80h
jmp loc_52BB5
loc_52A78:
mov rax, [rbp+var_10]
mov rax, [rax+80h]
mov rcx, [rbp+var_28]
mov ecx, [rcx+180h]
imul rcx, 298h
add rax, rcx
mov [rbp+var_38], rax
mov [rbp+var_3C], 0
loc_52AA2:
mov eax, [rbp+var_3C]
mov rcx, [rbp+var_28]
cmp eax, [rcx+180h]
jnb loc_52BAC
mov rax, [rbp+var_50]
mov ecx, [rbp+var_3C]
mov edx, 1
shl rdx, cl
mov rcx, rdx
and rax, rcx
cmp rax, 0
jz short loc_52ADB
mov al, 1
test al, 1
jnz short loc_52AE6
jmp loc_52B7D
loc_52ADB:
xor eax, eax
test al, 1
jnz short loc_52AE6
jmp loc_52B7D
loc_52AE6:
mov rcx, [rbp+var_10]
mov rax, [rbp+var_38]
mov [rax], rcx
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_38]
mov [rax+8], ecx
mov rax, [rbp+var_10]
mov rdi, [rax+80h]
mov eax, [rbp+var_3C]
imul rax, 298h
add rdi, rax
mov rsi, [rbp+var_18]
mov rax, [rbp+var_30]
mov ecx, [rbp+var_3C]
imul rcx, 70h ; 'p'
add rax, rcx
movzx eax, word ptr [rax+16h]
imul rsi, rax
mov rdx, [rbp+var_18]
mov rax, [rbp+var_30]
mov ecx, [rbp+var_3C]
imul rcx, 70h ; 'p'
add rax, rcx
movzx eax, word ptr [rax+16h]
imul rdx, rax
mov rax, [rbp+var_38]
mov rcx, rax
add rcx, 10h
mov [rbp+var_38], rcx
xor ecx, ecx
lea r8, keys_compare
lea r9, keys_free
xor r10d, r10d
mov [rsp+60h+var_60], rax
mov [rsp+60h+var_58], 0
call init_tree
jmp short loc_52B9C
loc_52B7D:
mov rax, [rbp+var_10]
mov rax, [rax+80h]
mov ecx, [rbp+var_3C]
imul rcx, 298h
add rax, rcx
mov qword ptr [rax], 0
loc_52B9C:
jmp short $+2
loc_52B9E:
mov eax, [rbp+var_3C]
add eax, 1
mov [rbp+var_3C], eax
jmp loc_52AA2
loc_52BAC:
jmp short $+2
loc_52BAE:
mov [rbp+var_4], 0
loc_52BB5:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
| long long mi_init_bulk_insert(_QWORD *a1, unsigned long long a2, long long a3)
{
long long v3; // rax
long long v5; // [rsp+10h] [rbp-50h]
unsigned int v6; // [rsp+1Ch] [rbp-44h]
unsigned int v7; // [rsp+20h] [rbp-40h]
unsigned int i; // [rsp+24h] [rbp-3Ch]
unsigned int j; // [rsp+24h] [rbp-3Ch]
long long v10; // [rsp+28h] [rbp-38h]
long long v11; // [rsp+30h] [rbp-30h]
long long v12; // [rsp+38h] [rbp-28h]
unsigned long long v13; // [rsp+48h] [rbp-18h]
v12 = *a1;
v11 = *(_QWORD *)(*a1 + 536LL);
v5 = 0LL;
v7 = 0;
v6 = 0;
for ( i = 0; i < *(_DWORD *)(v12 + 384); ++i )
{
if ( (*(_WORD *)(112LL * i + v11 + 10) & 1) == 0
&& *(_DWORD *)(v12 + 388) != i + 1
&& ((1LL << i) & *(_QWORD *)(v12 + 192)) != 0 )
{
++v7;
v5 |= 1LL << i;
v6 += *(unsigned __int16 *)(112LL * i + v11 + 22) + 32;
}
}
if ( v7 && (unsigned long long)v7 << 14 <= a2 )
{
if ( a3 && (unsigned long long)v6 * a3 < a2 )
LODWORD(v13) = a3;
else
v13 = a2 / (16 * v6);
a1[16] = my_malloc(mi_key_memory_MI_INFO_bulk_insert, 16LL * v7 + 664LL * *(unsigned int *)(v12 + 384), 0LL);
if ( a1[16] )
{
v10 = 664LL * *(unsigned int *)(v12 + 384) + a1[16];
for ( j = 0; j < *(_DWORD *)(v12 + 384); ++j )
{
if ( ((1LL << j) & v5) != 0 )
{
*(_QWORD *)v10 = a1;
*(_DWORD *)(v10 + 8) = j;
v3 = v10;
v10 += 16LL;
init_tree(
664 * j + *((_DWORD *)a1 + 32),
*(unsigned __int16 *)(112LL * j + v11 + 22) * (_DWORD)v13,
*(unsigned __int16 *)(112LL * j + v11 + 22) * (_DWORD)v13,
0,
(unsigned int)keys_compare,
(unsigned int)keys_free,
v3,
0LL);
}
else
{
*(_QWORD *)(664LL * j + a1[16]) = 0LL;
}
}
return 0;
}
else
{
return 128;
}
}
else
{
return 0;
}
}
| mi_init_bulk_insert:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x218]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001528e0
LAB_001528e0:
JMP 0x001528e2
LAB_001528e2:
JMP 0x001528e4
LAB_001528e4:
MOV qword ptr [RBP + -0x50],0x0
MOV dword ptr [RBP + -0x40],0x0
MOV dword ptr [RBP + -0x44],0x0
MOV dword ptr [RBP + -0x3c],0x0
LAB_00152901:
MOV EAX,dword ptr [RBP + -0x3c]
MOV RCX,qword ptr [RBP + -0x28]
CMP EAX,dword ptr [RCX + 0x180]
JNC 0x001529c7
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RBP + -0x3c]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOVZX EAX,word ptr [RAX + 0xa]
AND EAX,0x1
CMP EAX,0x0
JNZ 0x001529b7
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x184]
MOV ECX,dword ptr [RBP + -0x3c]
ADD ECX,0x1
CMP EAX,ECX
JZ 0x001529b7
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0xc0]
MOV ECX,dword ptr [RBP + -0x3c]
MOV EDX,0x1
SHL RDX,CL
MOV RCX,RDX
AND RAX,RCX
CMP RAX,0x0
JZ 0x00152970
MOV AL,0x1
TEST AL,0x1
JNZ 0x00152978
JMP 0x001529b7
LAB_00152970:
XOR EAX,EAX
TEST AL,0x1
JNZ 0x00152978
JMP 0x001529b7
LAB_00152978:
MOV EAX,dword ptr [RBP + -0x40]
ADD EAX,0x1
MOV dword ptr [RBP + -0x40],EAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV ECX,EAX
MOV EAX,0x1
SHL RAX,CL
OR RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RBP + -0x3c]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOVZX EAX,word ptr [RAX + 0x16]
MOV ECX,EAX
ADD RCX,0x20
MOV EAX,dword ptr [RBP + -0x44]
ADD RAX,RCX
MOV dword ptr [RBP + -0x44],EAX
LAB_001529b7:
JMP 0x001529b9
LAB_001529b9:
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x00152901
LAB_001529c7:
CMP dword ptr [RBP + -0x40],0x0
JZ 0x001529da
MOV EAX,dword ptr [RBP + -0x40]
SHL RAX,0xe
CMP RAX,qword ptr [RBP + -0x18]
JBE 0x001529e8
LAB_001529da:
JMP 0x001529dc
LAB_001529dc:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00152bb5
LAB_001529e8:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x00152a0a
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x44]
IMUL RAX,RCX
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x00152a0a
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00152a21
LAB_00152a0a:
MOV EAX,dword ptr [RBP + -0x44]
SHL EAX,0x4
MOV EAX,EAX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x18],RAX
LAB_00152a21:
LEA RAX,[0x4f03a4]
MOV EDI,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x180]
IMUL RSI,RAX,0x298
MOV EAX,dword ptr [RBP + -0x40]
SHL RAX,0x4
ADD RSI,RAX
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00180550
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x80],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x80],0x0
JNZ 0x00152a78
JMP 0x00152a6c
LAB_00152a6c:
MOV dword ptr [RBP + -0x4],0x80
JMP 0x00152bb5
LAB_00152a78:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x80]
MOV RCX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RCX + 0x180]
IMUL RCX,RCX,0x298
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV dword ptr [RBP + -0x3c],0x0
LAB_00152aa2:
MOV EAX,dword ptr [RBP + -0x3c]
MOV RCX,qword ptr [RBP + -0x28]
CMP EAX,dword ptr [RCX + 0x180]
JNC 0x00152bac
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0x3c]
MOV EDX,0x1
SHL RDX,CL
MOV RCX,RDX
AND RAX,RCX
CMP RAX,0x0
JZ 0x00152adb
MOV AL,0x1
TEST AL,0x1
JNZ 0x00152ae6
JMP 0x00152b7d
LAB_00152adb:
XOR EAX,EAX
TEST AL,0x1
JNZ 0x00152ae6
JMP 0x00152b7d
LAB_00152ae6:
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RCX
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x80]
MOV EAX,dword ptr [RBP + -0x3c]
IMUL RAX,RAX,0x298
ADD RDI,RAX
MOV RSI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RBP + -0x3c]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOVZX EAX,word ptr [RAX + 0x16]
IMUL RSI,RAX
MOV RDX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RBP + -0x3c]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOVZX EAX,word ptr [RAX + 0x16]
IMUL RDX,RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,RAX
ADD RCX,0x10
MOV qword ptr [RBP + -0x38],RCX
XOR ECX,ECX
LEA R8,[0x152bc0]
LEA R9,[0x152c20]
XOR R10D,R10D
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],0x0
CALL 0x00186fc0
JMP 0x00152b9c
LAB_00152b7d:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x80]
MOV ECX,dword ptr [RBP + -0x3c]
IMUL RCX,RCX,0x298
ADD RAX,RCX
MOV qword ptr [RAX],0x0
LAB_00152b9c:
JMP 0x00152b9e
LAB_00152b9e:
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x00152aa2
LAB_00152bac:
JMP 0x00152bae
LAB_00152bae:
MOV dword ptr [RBP + -0x4],0x0
LAB_00152bb5:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x00152ad6) */
/* WARNING: Removing unreachable block (ram,0x0015296e) */
int4 mi_init_bulk_insert(long *param_1,ulong param_2,ulong param_3)
{
long lVar1;
long lVar2;
long lVar3;
ulong local_58;
uint local_4c;
uint local_48;
uint local_44;
int8 *local_40;
ulong local_20;
int4 local_c;
lVar1 = *param_1;
lVar2 = *(long *)(lVar1 + 0x218);
local_58 = 0;
local_48 = 0;
local_4c = 0;
for (local_44 = 0; local_44 < *(uint *)(lVar1 + 0x180); local_44 = local_44 + 1) {
if ((((*(ushort *)(lVar2 + (ulong)local_44 * 0x70 + 10) & 1) == 0) &&
(*(int *)(lVar1 + 0x184) != local_44 + 1)) &&
((*(ulong *)(lVar1 + 0xc0) & 1L << ((byte)local_44 & 0x3f)) != 0)) {
local_48 = local_48 + 1;
local_58 = 1L << ((byte)local_44 & 0x3f) | local_58;
local_4c = local_4c + *(ushort *)(lVar2 + (ulong)local_44 * 0x70 + 0x16) + 0x20;
}
}
if ((local_48 == 0) || (param_2 < (ulong)local_48 << 0xe)) {
local_c = 0;
}
else {
if ((param_3 == 0) || (local_20 = param_3, param_2 <= param_3 * local_4c)) {
local_20 = param_2 / (local_4c << 4);
}
lVar3 = my_malloc(mi_key_memory_MI_INFO_bulk_insert,
(ulong)*(uint *)(lVar1 + 0x180) * 0x298 + (ulong)local_48 * 0x10,0);
param_1[0x10] = lVar3;
if (param_1[0x10] == 0) {
local_c = 0x80;
}
else {
local_40 = (int8 *)(param_1[0x10] + (ulong)*(uint *)(lVar1 + 0x180) * 0x298);
for (local_44 = 0; local_44 < *(uint *)(lVar1 + 0x180); local_44 = local_44 + 1) {
if ((local_58 & 1L << ((byte)local_44 & 0x3f)) == 0) {
*(int8 *)(param_1[0x10] + (ulong)local_44 * 0x298) = 0;
}
else {
*local_40 = param_1;
*(uint *)(local_40 + 1) = local_44;
init_tree(param_1[0x10] + (ulong)local_44 * 0x298,
local_20 * *(ushort *)(lVar2 + (ulong)local_44 * 0x70 + 0x16),
local_20 * *(ushort *)(lVar2 + (ulong)local_44 * 0x70 + 0x16),0,keys_compare,
keys_free,local_40,0);
local_40 = local_40 + 2;
}
}
local_c = 0;
}
}
return local_c;
}
| |
43,825 | os_sem_wait_timeout | navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal-src/src/os_posix.c | int32_t
os_sem_wait_timeout (p_sem_t* sem, uint32_t ticks)
{
if (sem == NULL || *sem == NULL) {
return EFAIL;
}
struct timespec t;
clock_gettime(CLOCK_REALTIME, &t);
t.tv_sec += OS_TICKS2MS(ticks) / 1000;
t.tv_nsec += (OS_TICKS2MS(ticks) % 1000) * 1000000;
return sem_timedwait((sem_t*)(*sem), &t) == 0 ? EOK : EFAIL;
} | O3 | c | os_sem_wait_timeout:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0x151ee
movq %rdi, %r14
cmpq $0x0, (%rdi)
je 0x151ee
movl %esi, %r15d
xorl %ebx, %ebx
leaq -0x30(%rbp), %r12
xorl %edi, %edi
movq %r12, %rsi
callq 0x6140
movl %r15d, %eax
imulq $0x10624dd3, %rax, %rax # imm = 0x10624DD3
shrq $0x26, %rax
addq %rax, (%r12)
imull $0x3e8, %eax, %eax # imm = 0x3E8
subl %eax, %r15d
imull $0xf4240, %r15d, %eax # imm = 0xF4240
addq %rax, 0x8(%r12)
movq (%r14), %rdi
movq %r12, %rsi
callq 0x6180
negl %eax
sbbl %ebx, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| os_sem_wait_timeout:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov ebx, 0FFFFFFFFh
test rdi, rdi
jz short loc_151EE
mov r14, rdi
cmp qword ptr [rdi], 0
jz short loc_151EE
mov r15d, esi
xor ebx, ebx
lea r12, [rbp+var_30]
xor edi, edi
mov rsi, r12
call _clock_gettime
mov eax, r15d
imul rax, 10624DD3h
shr rax, 26h
add [r12], rax
imul eax, 3E8h
sub r15d, eax
imul eax, r15d, 0F4240h
add [r12+8], rax
mov rdi, [r14]
mov rsi, r12
call _sem_timedwait
neg eax
sbb ebx, ebx
loc_151EE:
mov eax, ebx
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long os_sem_wait_timeout(_QWORD *a1, unsigned int a2)
{
unsigned int v2; // ebx
long long v4; // [rsp+0h] [rbp-30h] BYREF
long long v5; // [rsp+8h] [rbp-28h]
v2 = -1;
if ( a1 && *a1 )
{
clock_gettime(0LL, &v4);
v4 += a2 / 0x3E8uLL;
v5 += 1000000 * (a2 % 0x3E8);
return (unsigned int)-((unsigned int)sem_timedwait(*a1, &v4) != 0);
}
return v2;
}
| os_sem_wait_timeout:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV EBX,0xffffffff
TEST RDI,RDI
JZ 0x001151ee
MOV R14,RDI
CMP qword ptr [RDI],0x0
JZ 0x001151ee
MOV R15D,ESI
XOR EBX,EBX
LEA R12,[RBP + -0x30]
XOR EDI,EDI
MOV RSI,R12
CALL 0x00106140
MOV EAX,R15D
IMUL RAX,RAX,0x10624dd3
SHR RAX,0x26
ADD qword ptr [R12],RAX
IMUL EAX,EAX,0x3e8
SUB R15D,EAX
IMUL EAX,R15D,0xf4240
ADD qword ptr [R12 + 0x8],RAX
MOV RDI,qword ptr [R14]
MOV RSI,R12
CALL 0x00106180
NEG EAX
SBB EBX,EBX
LAB_001151ee:
MOV EAX,EBX
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int os_sem_wait_timeout(long *param_1,uint param_2)
{
int iVar1;
timespec local_38;
iVar1 = -1;
if ((param_1 != (long *)0x0) && (*param_1 != 0)) {
clock_gettime(0,&local_38);
local_38.tv_sec = local_38.tv_sec + (ulong)param_2 / 1000;
local_38.tv_nsec = local_38.tv_nsec + (ulong)((param_2 % 1000) * 1000000);
iVar1 = sem_timedwait((sem_t *)*param_1,&local_38);
iVar1 = -(uint)(iVar1 != 0);
}
return iVar1;
}
| |
43,826 | js_typed_array_toReversed | bluesky950520[P]quickjs/quickjs.c | static JSValue js_typed_array_toReversed(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue arr, ret;
JSObject *p;
p = get_typed_array(ctx, this_val);
if (!p)
return JS_EXCEPTION;
arr = js_typed_array_constructor_ta(ctx, JS_UNDEFINED, this_val,
p->class_id, p->u.array.count);
if (JS_IsException(arr))
return JS_EXCEPTION;
ret = js_typed_array_reverse(ctx, arr, argc, argv);
JS_FreeValue(ctx, arr);
return ret;
} | O1 | c | js_typed_array_toReversed:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
cmpl $-0x1, %r15d
jne 0x80aed
movq 0x8(%rsp), %r13
movzwl 0x6(%r13), %eax
addl $-0x15, %eax
cmpw $0xc, %ax
jb 0x80b01
leaq 0x20215(%rip), %rsi # 0xa0d09
xorl %r13d, %r13d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x21953
movl $0x6, %r14d
testq %r13, %r13
je 0x80b76
movzwl 0x6(%r13), %r9d
movl 0x40(%r13), %eax
movl %eax, (%rsp)
xorl %r13d, %r13d
movl $0x3, %edx
movq %rbx, %rdi
xorl %esi, %esi
movq %r12, %rcx
movq %r15, %r8
callq 0x7df44
movq %rax, %r15
movq %rdx, %r12
movl $0x0, %eax
cmpl $0x6, %r12d
je 0x80b7b
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x8095d
movq %rax, %r13
movq %rdx, %r14
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1ccb2
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
andq %r13, %rax
movl %r13d, %r13d
jmp 0x80b7b
xorl %r13d, %r13d
xorl %eax, %eax
orq %rax, %r13
movq %r13, %rax
movq %r14, %rdx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| js_typed_array_toReversed:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov r15, rdx
mov r12, rsi
mov rbx, rdi
mov [rsp+38h+var_30], rsi
cmp r15d, 0FFFFFFFFh
jnz short loc_80AED
mov r13, [rsp+38h+var_30]
movzx eax, word ptr [r13+6]
add eax, 0FFFFFFEBh
cmp ax, 0Ch
jb short loc_80B01
loc_80AED:
lea rsi, aNotATypedarray; "not a TypedArray"
xor r13d, r13d
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
loc_80B01:
mov r14d, 6
test r13, r13
jz short loc_80B76
movzx r9d, word ptr [r13+6]
mov eax, [r13+40h]
mov [rsp+38h+var_38], eax
xor r13d, r13d
mov edx, 3
mov rdi, rbx
xor esi, esi
mov rcx, r12
mov r8, r15
call js_typed_array_constructor_ta
mov r15, rax
mov r12, rdx
mov eax, 0
cmp r12d, 6
jz short loc_80B7B
mov rdi, rbx
mov rsi, r15
mov rdx, r12
call js_typed_array_reverse
mov r13, rax
mov r14, rdx
mov rdi, [rbx+18h]
mov rsi, r15
mov rdx, r12
call JS_FreeValueRT
mov rax, 0FFFFFFFF00000000h
and rax, r13
mov r13d, r13d
jmp short loc_80B7B
loc_80B76:
xor r13d, r13d
xor eax, eax
loc_80B7B:
or r13, rax
mov rax, r13
mov rdx, r14
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| unsigned long long js_typed_array_toReversed(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v15; // r13
signed int v16; // r9d
long long v17; // r13
long long v18; // rdx
long long v19; // rcx
long long v20; // r8
long long v21; // r9
_DWORD *v22; // r15
__m128 v23; // xmm4
__m128 v24; // xmm5
long long v25; // r12
unsigned long long v26; // rax
long long v27; // rax
char v29; // [rsp+0h] [rbp-38h]
unsigned int v30; // [rsp+0h] [rbp-38h]
if ( (_DWORD)a3 != -1 || (v15 = a2, (unsigned __int16)(*(_WORD *)(a2 + 6) - 21) >= 0xCu) )
{
v15 = 0LL;
JS_ThrowTypeError(a1, (long long)"not a TypedArray", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v29);
}
if ( v15 )
{
v16 = *(unsigned __int16 *)(v15 + 6);
v30 = *(_DWORD *)(v15 + 64);
v17 = 0LL;
v22 = (_DWORD *)js_typed_array_constructor_ta(
a1,
0LL,
3LL,
a2,
a3,
v16,
a7,
a8,
a9,
a10,
*(double *)a11.m128_u64,
*(double *)a12.m128_u64,
a13,
a14,
v30);
v25 = v18;
v26 = 0LL;
if ( (_DWORD)v18 != 6 )
{
js_typed_array_reverse((const char *)a1, (long long)v22, v18, v19, v20, v21, a7, a8, a9, a10, v23, v24, a13, a14);
v17 = v27;
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v22, v25);
v26 = v17 & 0xFFFFFFFF00000000LL;
v17 = (unsigned int)v17;
}
}
else
{
v17 = 0LL;
v26 = 0LL;
}
return v26 | v17;
}
| js_typed_array_toReversed:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
MOV qword ptr [RSP + 0x8],RSI
CMP R15D,-0x1
JNZ 0x00180aed
MOV R13,qword ptr [RSP + 0x8]
MOVZX EAX,word ptr [R13 + 0x6]
ADD EAX,-0x15
CMP AX,0xc
JC 0x00180b01
LAB_00180aed:
LEA RSI,[0x1a0d09]
XOR R13D,R13D
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00121953
LAB_00180b01:
MOV R14D,0x6
TEST R13,R13
JZ 0x00180b76
MOVZX R9D,word ptr [R13 + 0x6]
MOV EAX,dword ptr [R13 + 0x40]
MOV dword ptr [RSP],EAX
XOR R13D,R13D
MOV EDX,0x3
MOV RDI,RBX
XOR ESI,ESI
MOV RCX,R12
MOV R8,R15
CALL 0x0017df44
MOV R15,RAX
MOV R12,RDX
MOV EAX,0x0
CMP R12D,0x6
JZ 0x00180b7b
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
CALL 0x0018095d
MOV R13,RAX
MOV R14,RDX
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R15
MOV RDX,R12
CALL 0x0011ccb2
MOV RAX,-0x100000000
AND RAX,R13
MOV R13D,R13D
JMP 0x00180b7b
LAB_00180b76:
XOR R13D,R13D
XOR EAX,EAX
LAB_00180b7b:
OR R13,RAX
MOV RAX,R13
MOV RDX,R14
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
int1 [16] js_typed_array_toReversed(long param_1,long param_2,int8 param_3)
{
ulong uVar1;
long lVar2;
ulong uVar3;
int8 uVar4;
int1 auVar5 [16];
int1 auVar6 [16];
if (((int)param_3 != -1) || (lVar2 = param_2, 0xb < (ushort)(*(short *)(param_2 + 6) - 0x15U))) {
lVar2 = 0;
JS_ThrowTypeError(param_1,"not a TypedArray");
}
uVar4 = 6;
if (lVar2 == 0) {
uVar3 = 0;
uVar1 = 0;
}
else {
uVar3 = 0;
auVar5 = js_typed_array_constructor_ta
(param_1,0,3,param_2,param_3,*(int2 *)(lVar2 + 6),
*(int4 *)(lVar2 + 0x40));
uVar1 = 0;
if (auVar5._8_4_ != 6) {
auVar6 = js_typed_array_reverse(param_1,auVar5._0_8_,auVar5._8_8_);
uVar4 = auVar6._8_8_;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar5._0_8_,auVar5._8_8_);
uVar1 = auVar6._0_8_ & 0xffffffff00000000;
uVar3 = auVar6._0_8_ & 0xffffffff;
}
}
auVar5._8_8_ = uVar4;
auVar5._0_8_ = uVar3 | uVar1;
return auVar5;
}
| |
43,827 | js_typed_array_toReversed | bluesky950520[P]quickjs/quickjs.c | static JSValue js_typed_array_toReversed(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue arr, ret;
JSObject *p;
p = get_typed_array(ctx, this_val);
if (!p)
return JS_EXCEPTION;
arr = js_typed_array_constructor_ta(ctx, JS_UNDEFINED, this_val,
p->class_id, p->u.array.count);
if (JS_IsException(arr))
return JS_EXCEPTION;
ret = js_typed_array_reverse(ctx, arr, argc, argv);
JS_FreeValue(ctx, arr);
return ret;
} | O3 | c | js_typed_array_toReversed:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r8
movq %rdi, %rbx
cmpl $-0x1, %r8d
jne 0x8363c
movq %rsi, %rcx
movzwl 0x6(%rsi), %r9d
leal -0x15(%r9), %eax
cmpw $0xc, %ax
jae 0x8363c
movl 0x40(%rcx), %eax
movl %eax, (%rsp)
xorl %r15d, %r15d
movl $0x3, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x809ec
movq %rax, %r12
movq %rdx, %r13
movl $0x6, %r14d
movl $0x0, %eax
cmpl $0x6, %r13d
je 0x83658
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x83449
movq %rax, %r15
movq %rdx, %r14
cmpl $-0x9, %r13d
jb 0x83627
movq 0x18(%rbx), %rdi
movl (%r12), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r12)
cmpl $0x1, %eax
jg 0x83627
movq %r12, %rsi
movq %r13, %rdx
callq 0x20d90
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
movq %r15, %rax
andq %rcx, %rax
movl %r15d, %r15d
jmp 0x83658
leaq 0x20680(%rip), %rsi # 0xa3cc3
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2214f
movl $0x6, %r14d
xorl %eax, %eax
orq %rax, %r15
movq %r15, %rax
movq %r14, %rdx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| js_typed_array_toReversed:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov r8, rdx
mov rbx, rdi
cmp r8d, 0FFFFFFFFh
jnz loc_8363C
mov rcx, rsi
movzx r9d, word ptr [rsi+6]
lea eax, [r9-15h]
cmp ax, 0Ch
jnb short loc_8363C
mov eax, [rcx+40h]
mov [rsp+38h+var_38], eax
xor r15d, r15d
mov edx, 3
mov rdi, rbx
xor esi, esi
call js_typed_array_constructor_ta
mov r12, rax
mov r13, rdx
mov r14d, 6
mov eax, 0
cmp r13d, 6
jz short loc_83658
mov rdi, rbx
mov rsi, r12
mov rdx, r13
call js_typed_array_reverse
mov r15, rax
mov r14, rdx
cmp r13d, 0FFFFFFF7h
jb short loc_83627
mov rdi, [rbx+18h]
mov eax, [r12]
lea ecx, [rax-1]
mov [r12], ecx
cmp eax, 1
jg short loc_83627
mov rsi, r12
mov rdx, r13
call js_free_value_rt
loc_83627:
mov rcx, 0FFFFFFFF00000000h
mov rax, r15
and rax, rcx
mov r15d, r15d
jmp short loc_83658
loc_8363C:
lea rsi, aNotATypedarray; "not a TypedArray"
xor r15d, r15d
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
mov r14d, 6
xor eax, eax
loc_83658:
or r15, rax
mov rax, r15
mov rdx, r14
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| unsigned long long js_typed_array_toReversed(
long long a1,
long long a2,
long long a3,
long long a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
long long a13,
long long a14)
{
long long v14; // r15
long long v15; // rdx
long long v16; // rcx
long long v17; // r8
long long v18; // r9
_QWORD *v19; // r12
__m128 v20; // xmm4
__m128 v21; // xmm5
long long v22; // r13
unsigned long long v23; // rax
long long v24; // r8
long long v25; // r9
long long v26; // rdi
int v27; // eax
long long v28; // rcx
char v30; // [rsp+0h] [rbp-38h]
if ( (_DWORD)a3 == -1 && (a4 = a2, a14 = *(unsigned __int16 *)(a2 + 6), (unsigned __int16)(a14 - 21) < 0xCu) )
{
v14 = 0LL;
v19 = (_QWORD *)js_typed_array_constructor_ta(
a1,
0LL,
3LL,
a2,
a3,
a14,
a5,
a6,
a7,
a8,
*(double *)a9.m128_u64,
*(double *)a10.m128_u64,
a11,
a12,
*(_DWORD *)(a2 + 64));
v22 = v15;
v23 = 0LL;
if ( (_DWORD)v15 != 6 )
{
v14 = js_typed_array_reverse(
(const char *)a1,
(long long)v19,
v15,
v16,
v17,
v18,
a5,
a6,
a7,
a8,
v20,
v21,
a11,
a12);
if ( (unsigned int)v22 >= 0xFFFFFFF7 )
{
v26 = *(_QWORD *)(a1 + 24);
v27 = *(_DWORD *)v19;
v28 = (unsigned int)(*(_DWORD *)v19 - 1);
*(_DWORD *)v19 = v28;
if ( v27 <= 1 )
js_free_value_rt(v26, v19, v22, v28, v24, v25);
}
v23 = v14 & 0xFFFFFFFF00000000LL;
v14 = (unsigned int)v14;
}
}
else
{
v14 = 0LL;
JS_ThrowTypeError(a1, (long long)"not a TypedArray", a3, a4, a3, a14, a5, a6, a7, a8, a9, a10, a11, a12, v30);
v23 = 0LL;
}
return v23 | v14;
}
| js_typed_array_toReversed:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R8,RDX
MOV RBX,RDI
CMP R8D,-0x1
JNZ 0x0018363c
MOV RCX,RSI
MOVZX R9D,word ptr [RSI + 0x6]
LEA EAX,[R9 + -0x15]
CMP AX,0xc
JNC 0x0018363c
MOV EAX,dword ptr [RCX + 0x40]
MOV dword ptr [RSP],EAX
XOR R15D,R15D
MOV EDX,0x3
MOV RDI,RBX
XOR ESI,ESI
CALL 0x001809ec
MOV R12,RAX
MOV R13,RDX
MOV R14D,0x6
MOV EAX,0x0
CMP R13D,0x6
JZ 0x00183658
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
CALL 0x00183449
MOV R15,RAX
MOV R14,RDX
CMP R13D,-0x9
JC 0x00183627
MOV RDI,qword ptr [RBX + 0x18]
MOV EAX,dword ptr [R12]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R12],ECX
CMP EAX,0x1
JG 0x00183627
MOV RSI,R12
MOV RDX,R13
CALL 0x00120d90
LAB_00183627:
MOV RCX,-0x100000000
MOV RAX,R15
AND RAX,RCX
MOV R15D,R15D
JMP 0x00183658
LAB_0018363c:
LEA RSI,[0x1a3cc3]
XOR R15D,R15D
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0012214f
MOV R14D,0x6
XOR EAX,EAX
LAB_00183658:
OR R15,RAX
MOV RAX,R15
MOV RDX,R14
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
int1 [16] js_typed_array_toReversed(long param_1,long param_2,int param_3)
{
int iVar1;
int8 uVar2;
int *piVar3;
ulong uVar4;
int8 uVar5;
ulong uVar6;
int1 auVar7 [16];
int1 auVar8 [16];
if ((param_3 == -1) && ((ushort)(*(short *)(param_2 + 6) - 0x15U) < 0xc)) {
uVar6 = 0;
auVar7 = js_typed_array_constructor_ta(param_1,0,3);
piVar3 = auVar7._0_8_;
uVar5 = 6;
uVar4 = 0;
if (auVar7._8_4_ != 6) {
auVar8 = js_typed_array_reverse(param_1,piVar3,auVar7._8_8_);
uVar5 = auVar8._8_8_;
if (0xfffffff6 < auVar7._8_4_) {
uVar2 = *(int8 *)(param_1 + 0x18);
iVar1 = *piVar3;
*piVar3 = iVar1 + -1;
if (iVar1 < 2) {
js_free_value_rt(uVar2,piVar3,auVar7._8_8_);
}
}
uVar4 = auVar8._0_8_ & 0xffffffff00000000;
uVar6 = auVar8._0_8_ & 0xffffffff;
}
}
else {
uVar6 = 0;
JS_ThrowTypeError(param_1,"not a TypedArray");
uVar5 = 6;
uVar4 = 0;
}
auVar7._8_8_ = uVar5;
auVar7._0_8_ = uVar6 | uVar4;
return auVar7;
}
| |
43,828 | qdevtools::SignalView::SignalView(QWidget*) | HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp | SignalView::SignalView(QWidget* parent) : QWidget(parent), object_(nullptr)
{
auto logger = new QPlainTextEdit;
logger->setReadOnly(true);
auto button = new QPushButton(QStringLiteral("Clear"));
connect(button, &QPushButton::clicked, logger, &QPlainTextEdit::clear);
logger->setEnabled(false);
button->setEnabled(false);
auto layout = new QVBoxLayout;
layout->addWidget(logger);
layout->addWidget(button);
layout->setContentsMargins(0, 0, 0, 0);
setLayout(layout);
} | O1 | cpp | qdevtools::SignalView::SignalView(QWidget*):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
xorl %edx, %edx
callq 0xf760
leaq 0x1a176(%rip), %rax # 0x2cae0
leaq 0x10(%rax), %rcx
movq %rcx, (%rbx)
addq $0x1c0, %rax # imm = 0x1C0
movq %rax, 0x10(%rbx)
movq $0x0, 0x28(%rbx)
movl $0x28, %edi
callq 0xf910
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
callq 0xf630
movq %r14, %rdi
movl $0x1, %esi
callq 0xf510
movl $0x28, %edi
callq 0xf910
movq %rax, %r15
movq %rsp, %rsi
movq $0x0, (%rsi)
leaq 0x10ce3(%rip), %rax # 0x236a8
movq %rax, 0x8(%rsi)
movq $0x5, 0x10(%rsi)
movq %r15, %rdi
xorl %edx, %edx
callq 0xffc0
movq (%rsp), %rax
testq %rax, %rax
je 0x129fc
lock
decl (%rax)
jne 0x129fc
movq (%rsp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0xf610
movq 0x1b505(%rip), %rax # 0x2df08
movq %rax, (%rsp)
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movq 0x1b5cb(%rip), %r12 # 0x2dfe0
movq %r12, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movl $0x20, %edi
callq 0xf910
movl $0x1, (%rax)
leaq 0xf0f8(%rip), %rcx # 0x21b2e
movq %rcx, 0x8(%rax)
movq %r12, 0x10(%rax)
xorl %r10d, %r10d
movq %r10, 0x18(%rax)
subq $0x8, %rsp
movq 0x1b508(%rip), %r11 # 0x2df58
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rdx
leaq 0x28(%rsp), %r8
movq %r15, %rsi
movq %r14, %rcx
movq %rax, %r9
pushq %r11
pushq %r10
pushq $0x0
callq 0xf6e0
addq $0x20, %rsp
leaq 0x18(%rsp), %rdi
callq 0xf400
movq %r14, %rdi
xorl %esi, %esi
callq 0xf550
movq %r15, %rdi
xorl %esi, %esi
callq 0xf550
movl $0x20, %edi
callq 0xf910
movq %rax, %r12
movq %rax, %rdi
callq 0xf600
movq %r12, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf950
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf950
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xf850
movq %rbx, %rdi
movq %r12, %rsi
callq 0xf430
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r13
movl $0x20, %esi
movq %r12, %rdi
jmp 0x12b28
movq %rax, %r13
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x12b13
movq %rsp, %rsi
callq 0x102da
movl $0x28, %esi
movq %r15, %rdi
jmp 0x12b28
movq %rax, %r13
movl $0x28, %esi
movq %r14, %rdi
callq 0xf0d0
jmp 0x12b36
jmp 0x12b33
jmp 0x12b33
movq %rax, %r13
movq %rbx, %rdi
callq 0xf340
movq %r13, %rdi
callq 0xf410
| _ZN9qdevtools10SignalViewC2EP7QWidget:
push r15; Alternative name is 'qdevtools::SignalView::SignalView(QWidget *)'
push r14
push r13
push r12
push rbx
sub rsp, 30h
mov rbx, rdi
xor edx, edx
call __ZN7QWidgetC2EPS_6QFlagsIN2Qt10WindowTypeEE; QWidget::QWidget(QWidget*,QFlags<Qt::WindowType>)
lea rax, _ZTVN9qdevtools10SignalViewE; `vtable for'qdevtools::SignalView
lea rcx, [rax+10h]
mov [rbx], rcx
add rax, 1C0h
mov [rbx+10h], rax
mov qword ptr [rbx+28h], 0
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rdi, rax; this
xor esi, esi; QWidget *
call __ZN14QPlainTextEditC1EP7QWidget; QPlainTextEdit::QPlainTextEdit(QWidget *)
mov rdi, r14; this
mov esi, 1; bool
call __ZN14QPlainTextEdit11setReadOnlyEb; QPlainTextEdit::setReadOnly(bool)
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov r15, rax
mov rsi, rsp; QString *
mov qword ptr [rsi], 0
lea rax, aClear; "Clear"
mov [rsi+8], rax
mov qword ptr [rsi+10h], 5
mov rdi, r15; this
xor edx, edx; QWidget *
call __ZN11QPushButtonC1ERK7QStringP7QWidget; QPushButton::QPushButton(QString const&,QWidget *)
mov rax, [rsp+58h+var_58]
test rax, rax
jz short loc_129FC
lock dec dword ptr [rax]
jnz short loc_129FC
mov rdi, [rsp+58h+var_58]
mov esi, 2
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
loc_129FC:
mov rax, cs:_ZN15QAbstractButton7clickedEb_ptr
mov [rsp+58h+var_58], rax
xor eax, eax
mov [rsp+58h+var_50], rax
mov r12, cs:_ZN14QPlainTextEdit5clearEv_ptr
mov [rsp+58h+var_38], r12
mov [rsp+58h+var_30], rax
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
mov dword ptr [rax], 1
lea rcx, _ZN9QtPrivate11QSlotObjectIM14QPlainTextEditFvvENS_4ListIJEEEvE4implEiPNS_15QSlotObjectBaseEP7QObjectPPvPb; QtPrivate::QSlotObject<void (QPlainTextEdit::*)(void),QtPrivate::List<>,void>::impl(int,QtPrivate::QSlotObjectBase *,QObject *,void **,bool *)
mov [rax+8], rcx
mov [rax+10h], r12
xor r10d, r10d
mov [rax+18h], r10
sub rsp, 8
mov r11, cs:_ZN15QAbstractButton16staticMetaObjectE_ptr
lea rdi, [rsp+60h+var_40]
lea rdx, [rsp+60h+var_58]
lea r8, [rsp+60h+var_38]
mov rsi, r15
mov rcx, r14
mov r9, rax
push r11
push r10
push 0
call __ZN7QObject11connectImplEPKS_PPvS1_S3_PN9QtPrivate15QSlotObjectBaseEN2Qt14ConnectionTypeEPKiPK11QMetaObject; QObject::connectImpl(QObject const*,void **,QObject const*,void **,QtPrivate::QSlotObjectBase *,Qt::ConnectionType,int const*,QMetaObject const*)
add rsp, 20h
lea rdi, [rsp+58h+var_40]; this
call __ZN11QMetaObject10ConnectionD1Ev; QMetaObject::Connection::~Connection()
mov rdi, r14; this
xor esi, esi; bool
call __ZN7QWidget10setEnabledEb; QWidget::setEnabled(bool)
mov rdi, r15; this
xor esi, esi; bool
call __ZN7QWidget10setEnabledEb; QWidget::setEnabled(bool)
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
mov r12, rax
mov rdi, rax; this
call __ZN11QVBoxLayoutC1Ev; QVBoxLayout::QVBoxLayout(void)
mov rdi, r12
mov rsi, r14
xor edx, edx
xor ecx, ecx
call __ZN10QBoxLayout9addWidgetEP7QWidgeti6QFlagsIN2Qt13AlignmentFlagEE; QBoxLayout::addWidget(QWidget *,int,QFlags<Qt::AlignmentFlag>)
mov rdi, r12
mov rsi, r15
xor edx, edx
xor ecx, ecx
call __ZN10QBoxLayout9addWidgetEP7QWidgeti6QFlagsIN2Qt13AlignmentFlagEE; QBoxLayout::addWidget(QWidget *,int,QFlags<Qt::AlignmentFlag>)
mov rdi, r12; this
xor esi, esi; int
xor edx, edx; int
xor ecx, ecx; int
xor r8d, r8d; int
call __ZN7QLayout18setContentsMarginsEiiii; QLayout::setContentsMargins(int,int,int,int)
mov rdi, rbx; this
mov rsi, r12; QLayout *
call __ZN7QWidget9setLayoutEP7QLayout; QWidget::setLayout(QLayout *)
add rsp, 30h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov r13, rax
mov esi, 20h ; ' '
mov rdi, r12
jmp short loc_12B28
mov r13, rax
mov rdi, [rsp+0]
test rdi, rdi
jz short loc_12B13
mov rsi, rsp
call _ZN9qdevtools10SignalViewC2EP7QWidget_cold_1; qdevtools::SignalView::SignalView(QWidget *) [clone]
loc_12B13:
mov esi, 28h ; '('
mov rdi, r15
jmp short loc_12B28
mov r13, rax
mov esi, 28h ; '('; unsigned __int64
mov rdi, r14; void *
loc_12B28:
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_12B36
jmp short loc_12B33
jmp short $+2
loc_12B33:
mov r13, rax
loc_12B36:
mov rdi, rbx; this
call __ZN7QWidgetD2Ev; QWidget::~QWidget()
mov rdi, r13
call __Unwind_Resume
| long long qdevtools::SignalView::SignalView(qdevtools::SignalView *this, QWidget *a2)
{
QPlainTextEdit *v2; // r14
QPushButton *v3; // r15
long long v4; // rax
QVBoxLayout *v5; // r12
volatile signed __int32 *v7; // [rsp+0h] [rbp-58h] BYREF
const __int16 *v8; // [rsp+8h] [rbp-50h]
long long v9; // [rsp+10h] [rbp-48h]
_BYTE v10[8]; // [rsp+18h] [rbp-40h] BYREF
_QWORD v11[7]; // [rsp+20h] [rbp-38h] BYREF
QWidget::QWidget(this, a2, 0LL);
*(_QWORD *)this = &`vtable for'qdevtools::SignalView + 2;
*((_QWORD *)this + 2) = &`vtable for'qdevtools::SignalView + 56;
*((_QWORD *)this + 5) = 0LL;
v2 = (QPlainTextEdit *)operator new(0x28uLL);
QPlainTextEdit::QPlainTextEdit(v2, 0LL);
QPlainTextEdit::setReadOnly(v2, 1);
v3 = (QPushButton *)operator new(0x28uLL);
v7 = 0LL;
v8 = L"Clear";
v9 = 5LL;
QPushButton::QPushButton(v3, (const QString *)&v7, 0LL);
if ( v7 && !_InterlockedDecrement(v7) )
QArrayData::deallocate(v7, 2LL);
v7 = (volatile signed __int32 *)&QAbstractButton::clicked;
v8 = 0LL;
v11[0] = &QPlainTextEdit::clear;
v11[1] = 0LL;
v4 = operator new(0x20uLL);
*(_DWORD *)v4 = 1;
*(_QWORD *)(v4 + 8) = &QtPrivate::QSlotObject<void (QPlainTextEdit::*)(void),QtPrivate::List<>,void>::impl;
*(_QWORD *)(v4 + 16) = &QPlainTextEdit::clear;
*(_QWORD *)(v4 + 24) = 0LL;
QObject::connectImpl(v10, v3, &v7, v2, v11, v4, 0LL, 0LL, &QAbstractButton::staticMetaObject);
QMetaObject::Connection::~Connection((QMetaObject::Connection *)v10);
QWidget::setEnabled(v2, 0);
QWidget::setEnabled(v3, 0);
v5 = (QVBoxLayout *)operator new(0x20uLL);
QVBoxLayout::QVBoxLayout(v5);
QBoxLayout::addWidget(v5, v2, 0LL, 0LL);
QBoxLayout::addWidget(v5, v3, 0LL, 0LL);
QLayout::setContentsMargins(v5, 0, 0, 0, 0);
return QWidget::setLayout(this, v5);
}
| SignalView:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x30
MOV RBX,RDI
XOR EDX,EDX
CALL 0x0010f760
LEA RAX,[0x12cae0]
LEA RCX,[RAX + 0x10]
MOV qword ptr [RBX],RCX
ADD RAX,0x1c0
MOV qword ptr [RBX + 0x10],RAX
MOV qword ptr [RBX + 0x28],0x0
LAB_00112983:
MOV EDI,0x28
CALL 0x0010f910
LAB_0011298d:
MOV R14,RAX
MOV RDI,RAX
XOR ESI,ESI
CALL 0x0010f630
LAB_0011299a:
MOV RDI,R14
MOV ESI,0x1
CALL 0x0010f510
LAB_001129a7:
MOV EDI,0x28
CALL 0x0010f910
MOV R15,RAX
MOV RSI,RSP
MOV qword ptr [RSI],0x0
LEA RAX,[0x1236a8]
MOV qword ptr [RSI + 0x8],RAX
MOV qword ptr [RSI + 0x10],0x5
LAB_001129d1:
MOV RDI,R15
XOR EDX,EDX
CALL 0x0010ffc0
MOV RAX,qword ptr [RSP]
TEST RAX,RAX
JZ 0x001129fc
DEC.LOCK dword ptr [RAX]
JNZ 0x001129fc
MOV RDI,qword ptr [RSP]
MOV ESI,0x2
MOV EDX,0x8
CALL 0x0010f610
LAB_001129fc:
MOV RAX,qword ptr [0x0012df08]
MOV qword ptr [RSP],RAX
XOR EAX,EAX
MOV qword ptr [RSP + 0x8],RAX
MOV R12,qword ptr [0x0012dfe0]
MOV qword ptr [RSP + 0x20],R12
MOV qword ptr [RSP + 0x28],RAX
LAB_00112a1f:
MOV EDI,0x20
CALL 0x0010f910
MOV dword ptr [RAX],0x1
LEA RCX,[0x121b2e]
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RAX + 0x10],R12
XOR R10D,R10D
MOV qword ptr [RAX + 0x18],R10
SUB RSP,0x8
MOV R11,qword ptr [0x0012df58]
LEA RDI,[RSP + 0x20]
LEA RDX,[RSP + 0x8]
LEA R8,[RSP + 0x28]
MOV RSI,R15
MOV RCX,R14
MOV R9,RAX
PUSH R11
PUSH R10
PUSH 0x0
CALL 0x0010f6e0
ADD RSP,0x20
LEA RDI,[RSP + 0x18]
CALL 0x0010f400
MOV RDI,R14
XOR ESI,ESI
CALL 0x0010f550
MOV RDI,R15
XOR ESI,ESI
CALL 0x0010f550
LAB_00112a95:
MOV EDI,0x20
CALL 0x0010f910
LAB_00112a9f:
MOV R12,RAX
MOV RDI,RAX
CALL 0x0010f600
LAB_00112aaa:
MOV RDI,R12
MOV RSI,R14
XOR EDX,EDX
XOR ECX,ECX
CALL 0x0010f950
MOV RDI,R12
MOV RSI,R15
XOR EDX,EDX
XOR ECX,ECX
CALL 0x0010f950
MOV RDI,R12
XOR ESI,ESI
XOR EDX,EDX
XOR ECX,ECX
XOR R8D,R8D
CALL 0x0010f850
MOV RDI,RBX
MOV RSI,R12
CALL 0x0010f430
LAB_00112ae4:
ADD RSP,0x30
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* qdevtools::SignalView::SignalView(QWidget*) */
void __thiscall qdevtools::SignalView::SignalView(SignalView *this,QWidget *param_1)
{
int *puVar1;
QPlainTextEdit *this_00;
QPushButton *this_01;
int4 *puVar2;
QVBoxLayout *this_02;
QArrayData *local_58;
wchar16 *local_50;
int8 local_48;
Connection local_40 [8];
int *local_38;
int8 local_30;
QWidget::QWidget((QWidget *)this,param_1,0);
*(int ***)this = &PTR_metaObject_0012caf0;
*(int ***)(this + 0x10) = &PTR__SignalView_0012cca0;
*(int8 *)(this + 0x28) = 0;
/* try { // try from 00112983 to 0011298c has its CatchHandler @ 00112b2f */
this_00 = (QPlainTextEdit *)operator_new(0x28);
/* try { // try from 0011298d to 00112999 has its CatchHandler @ 00112b1d */
QPlainTextEdit::QPlainTextEdit(this_00,(QWidget *)0x0);
/* try { // try from 0011299a to 001129a6 has its CatchHandler @ 00112b2f */
QPlainTextEdit::setReadOnly(SUB81(this_00,0));
/* try { // try from 001129a7 to 001129b0 has its CatchHandler @ 00112b33 */
this_01 = (QPushButton *)operator_new(0x28);
local_58 = (QArrayData *)0x0;
local_50 = L"Clear";
local_48 = 5;
/* try { // try from 001129d1 to 001129da has its CatchHandler @ 00112aff */
QPushButton::QPushButton(this_01,(QString *)&local_58,(QWidget *)0x0);
if (local_58 != (QArrayData *)0x0) {
LOCK();
*(int *)local_58 = *(int *)local_58 + -1;
UNLOCK();
if (*(int *)local_58 == 0) {
QArrayData::deallocate(local_58,2,8);
}
}
puVar1 = PTR_clear_0012dfe0;
local_58 = (QArrayData *)PTR_clicked_0012df08;
local_50 = (wchar16 *)0x0;
local_38 = PTR_clear_0012dfe0;
local_30 = 0;
/* try { // try from 00112a1f to 00112a94 has its CatchHandler @ 00112b33 */
puVar2 = (int4 *)operator_new(0x20);
*puVar2 = 1;
*(code **)(puVar2 + 2) =
QtPrivate::QSlotObject<void(QPlainTextEdit::*)(),QtPrivate::List<>,void>::impl;
*(int **)(puVar2 + 4) = puVar1;
*(int8 *)(puVar2 + 6) = 0;
QObject::connectImpl
(local_40,this_01,&local_58,this_00,&local_38,puVar2,0,0,PTR_staticMetaObject_0012df58);
QMetaObject::Connection::~Connection(local_40);
QWidget::setEnabled(SUB81(this_00,0));
QWidget::setEnabled(SUB81(this_01,0));
/* try { // try from 00112a95 to 00112a9e has its CatchHandler @ 00112b31 */
this_02 = (QVBoxLayout *)operator_new(0x20);
/* try { // try from 00112a9f to 00112aa9 has its CatchHandler @ 00112af2 */
QVBoxLayout::QVBoxLayout(this_02);
/* try { // try from 00112aaa to 00112ae3 has its CatchHandler @ 00112b31 */
QBoxLayout::addWidget(this_02,this_00,0);
QBoxLayout::addWidget(this_02,this_01,0);
QLayout::setContentsMargins((int)this_02,0,0,0);
QWidget::setLayout((QLayout *)this);
return;
}
| |
43,829 | evmone::baseline::CodeAnalysis::CodeAnalysis(std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>, std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>, evmone::EOF1Header) | corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/baseline.hpp | CodeAnalysis(bytes_view container, bytes_view executable_code, EOF1Header header)
: m_raw_code{container}, m_executable_code(executable_code), m_eof_header{std::move(header)}
{} | O3 | cpp | evmone::baseline::CodeAnalysis::CodeAnalysis(std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>, std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>, evmone::EOF1Header):
movq %rsi, (%rdi)
movq %rdx, 0x8(%rdi)
movq %rcx, 0x10(%rdi)
movq %r8, 0x18(%rdi)
xorl %eax, %eax
movq %rax, 0x20(%rdi)
movl %eax, 0x28(%rdi)
movq %rax, 0x30(%rdi)
movl %eax, 0x38(%rdi)
movq %rax, 0x40(%rdi)
movups (%r9), %xmm0
movups %xmm0, 0x48(%rdi)
movups 0x10(%r9), %xmm0
movups %xmm0, 0x58(%rdi)
movq 0x20(%r9), %rcx
movq %rcx, 0x68(%rdi)
movq %rax, 0x20(%r9)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r9)
movups 0x28(%r9), %xmm1
movups %xmm1, 0x70(%rdi)
movq 0x38(%r9), %rcx
movq %rcx, 0x80(%rdi)
movq %rax, 0x38(%r9)
movups %xmm0, 0x28(%r9)
movq 0x40(%r9), %rcx
movq %rcx, 0x88(%rdi)
movups 0x48(%r9), %xmm1
movups %xmm1, 0x90(%rdi)
movq 0x58(%r9), %rcx
movq %rcx, 0xa0(%rdi)
movq %rax, 0x58(%r9)
movups %xmm0, 0x48(%r9)
movups 0x60(%r9), %xmm1
movups %xmm1, 0xa8(%rdi)
movq 0x70(%r9), %rcx
movq %rcx, 0xb8(%rdi)
movq %rax, 0x70(%r9)
movups %xmm0, 0x60(%r9)
movq %rax, 0xc0(%rdi)
retq
| _ZN6evmone8baseline12CodeAnalysisC2ESt17basic_string_viewIhN4evmc11byte_traitsIhEEES6_NS_10EOF1HeaderE:
mov [rdi], rsi
mov [rdi+8], rdx
mov [rdi+10h], rcx
mov [rdi+18h], r8
xor eax, eax
mov [rdi+20h], rax
mov [rdi+28h], eax
mov [rdi+30h], rax
mov [rdi+38h], eax
mov [rdi+40h], rax
movups xmm0, xmmword ptr [r9]
movups xmmword ptr [rdi+48h], xmm0
movups xmm0, xmmword ptr [r9+10h]
movups xmmword ptr [rdi+58h], xmm0
mov rcx, [r9+20h]
mov [rdi+68h], rcx
mov [r9+20h], rax
xorps xmm0, xmm0
movups xmmword ptr [r9+10h], xmm0
movups xmm1, xmmword ptr [r9+28h]
movups xmmword ptr [rdi+70h], xmm1
mov rcx, [r9+38h]
mov [rdi+80h], rcx
mov [r9+38h], rax
movups xmmword ptr [r9+28h], xmm0
mov rcx, [r9+40h]
mov [rdi+88h], rcx
movups xmm1, xmmword ptr [r9+48h]
movups xmmword ptr [rdi+90h], xmm1
mov rcx, [r9+58h]
mov [rdi+0A0h], rcx
mov [r9+58h], rax
movups xmmword ptr [r9+48h], xmm0
movups xmm1, xmmword ptr [r9+60h]
movups xmmword ptr [rdi+0A8h], xmm1
mov rcx, [r9+70h]
mov [rdi+0B8h], rcx
mov [r9+70h], rax
movups xmmword ptr [r9+60h], xmm0
mov [rdi+0C0h], rax
retn
| long long evmone::baseline::CodeAnalysis::CodeAnalysis(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6)
{
long long result; // rax
*(_QWORD *)a1 = a2;
*(_QWORD *)(a1 + 8) = a3;
*(_QWORD *)(a1 + 16) = a4;
*(_QWORD *)(a1 + 24) = a5;
result = 0LL;
*(_QWORD *)(a1 + 32) = 0LL;
*(_DWORD *)(a1 + 40) = 0;
*(_QWORD *)(a1 + 48) = 0LL;
*(_DWORD *)(a1 + 56) = 0;
*(_QWORD *)(a1 + 64) = 0LL;
*(_OWORD *)(a1 + 72) = *(_OWORD *)a6;
*(_OWORD *)(a1 + 88) = *(_OWORD *)(a6 + 16);
*(_QWORD *)(a1 + 104) = *(_QWORD *)(a6 + 32);
*(_QWORD *)(a6 + 32) = 0LL;
*(_OWORD *)(a6 + 16) = 0LL;
*(_OWORD *)(a1 + 112) = *(_OWORD *)(a6 + 40);
*(_QWORD *)(a1 + 128) = *(_QWORD *)(a6 + 56);
*(_QWORD *)(a6 + 56) = 0LL;
*(_OWORD *)(a6 + 40) = 0LL;
*(_QWORD *)(a1 + 136) = *(_QWORD *)(a6 + 64);
*(_OWORD *)(a1 + 144) = *(_OWORD *)(a6 + 72);
*(_QWORD *)(a1 + 160) = *(_QWORD *)(a6 + 88);
*(_QWORD *)(a6 + 88) = 0LL;
*(_OWORD *)(a6 + 72) = 0LL;
*(_OWORD *)(a1 + 168) = *(_OWORD *)(a6 + 96);
*(_QWORD *)(a1 + 184) = *(_QWORD *)(a6 + 112);
*(_QWORD *)(a6 + 112) = 0LL;
*(_OWORD *)(a6 + 96) = 0LL;
*(_QWORD *)(a1 + 192) = 0LL;
return result;
}
| CodeAnalysis:
MOV qword ptr [RDI],RSI
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RDI + 0x10],RCX
MOV qword ptr [RDI + 0x18],R8
XOR EAX,EAX
MOV qword ptr [RDI + 0x20],RAX
MOV dword ptr [RDI + 0x28],EAX
MOV qword ptr [RDI + 0x30],RAX
MOV dword ptr [RDI + 0x38],EAX
MOV qword ptr [RDI + 0x40],RAX
MOVUPS XMM0,xmmword ptr [R9]
MOVUPS xmmword ptr [RDI + 0x48],XMM0
MOVUPS XMM0,xmmword ptr [R9 + 0x10]
MOVUPS xmmword ptr [RDI + 0x58],XMM0
MOV RCX,qword ptr [R9 + 0x20]
MOV qword ptr [RDI + 0x68],RCX
MOV qword ptr [R9 + 0x20],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R9 + 0x10],XMM0
MOVUPS XMM1,xmmword ptr [R9 + 0x28]
MOVUPS xmmword ptr [RDI + 0x70],XMM1
MOV RCX,qword ptr [R9 + 0x38]
MOV qword ptr [RDI + 0x80],RCX
MOV qword ptr [R9 + 0x38],RAX
MOVUPS xmmword ptr [R9 + 0x28],XMM0
MOV RCX,qword ptr [R9 + 0x40]
MOV qword ptr [RDI + 0x88],RCX
MOVUPS XMM1,xmmword ptr [R9 + 0x48]
MOVUPS xmmword ptr [RDI + 0x90],XMM1
MOV RCX,qword ptr [R9 + 0x58]
MOV qword ptr [RDI + 0xa0],RCX
MOV qword ptr [R9 + 0x58],RAX
MOVUPS xmmword ptr [R9 + 0x48],XMM0
MOVUPS XMM1,xmmword ptr [R9 + 0x60]
MOVUPS xmmword ptr [RDI + 0xa8],XMM1
MOV RCX,qword ptr [R9 + 0x70]
MOV qword ptr [RDI + 0xb8],RCX
MOV qword ptr [R9 + 0x70],RAX
MOVUPS xmmword ptr [R9 + 0x60],XMM0
MOV qword ptr [RDI + 0xc0],RAX
RET
|
/* evmone::baseline::CodeAnalysis::CodeAnalysis(std::basic_string_view<unsigned char,
evmc::byte_traits<unsigned char> >, std::basic_string_view<unsigned char,
evmc::byte_traits<unsigned char> >, evmone::EOF1Header) */
void __thiscall
evmone::baseline::CodeAnalysis::CodeAnalysis
(CodeAnalysis *this,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 *param_6)
{
int8 uVar1;
*(int8 *)this = param_2;
*(int8 *)(this + 8) = param_3;
*(int8 *)(this + 0x10) = param_4;
*(int8 *)(this + 0x18) = param_5;
*(int8 *)(this + 0x20) = 0;
*(int4 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int4 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
uVar1 = param_6[1];
*(int8 *)(this + 0x48) = *param_6;
*(int8 *)(this + 0x50) = uVar1;
uVar1 = param_6[3];
*(int8 *)(this + 0x58) = param_6[2];
*(int8 *)(this + 0x60) = uVar1;
*(int8 *)(this + 0x68) = param_6[4];
param_6[4] = 0;
param_6[2] = 0;
param_6[3] = 0;
uVar1 = param_6[6];
*(int8 *)(this + 0x70) = param_6[5];
*(int8 *)(this + 0x78) = uVar1;
*(int8 *)(this + 0x80) = param_6[7];
param_6[7] = 0;
param_6[5] = 0;
param_6[6] = 0;
*(int8 *)(this + 0x88) = param_6[8];
uVar1 = param_6[10];
*(int8 *)(this + 0x90) = param_6[9];
*(int8 *)(this + 0x98) = uVar1;
*(int8 *)(this + 0xa0) = param_6[0xb];
param_6[0xb] = 0;
param_6[9] = 0;
param_6[10] = 0;
uVar1 = param_6[0xd];
*(int8 *)(this + 0xa8) = param_6[0xc];
*(int8 *)(this + 0xb0) = uVar1;
*(int8 *)(this + 0xb8) = param_6[0xe];
param_6[0xe] = 0;
param_6[0xc] = 0;
param_6[0xd] = 0;
*(int8 *)(this + 0xc0) = 0;
return;
}
| |
43,830 | psi_rwlock_wrlock | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD
int psi_rwlock_wrlock(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_WRITELOCK, file, line);
int result= rw_wrlock(&that->m_rwlock);
if (locker)
PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result);
return result;
} | O3 | c | psi_rwlock_wrlock:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edx, %r8d
movq %rsi, %rcx
movq %rdi, %r14
leaq 0x360da0(%rip), %r15 # 0x390ed8
movq (%r15), %rax
movq 0x90(%rdi), %rsi
leaq -0x48(%rbp), %rdi
pushq $0x1
popq %rdx
callq *0x1b0(%rax)
movq %rax, %rbx
movq %r14, %rdi
callq 0xab6fd
movl %eax, %r14d
testq %rbx, %rbx
je 0x30171
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_wrlock:
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 1
pop rdx
call qword ptr [rax+1B0h]
mov rbx, rax
mov rdi, r14
call my_rw_wrlock
mov r14d, eax
test rbx, rbx
jz short loc_30171
mov rax, [r15]
mov rdi, rbx
mov esi, r14d
call qword ptr [rax+1B8h]
loc_30171:
mov eax, r14d
add rsp, 38h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long psi_rwlock_wrlock(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),
1LL,
a2,
a3);
v4 = my_rw_wrlock(a1);
if ( v3 )
((void ( *)(long long, _QWORD))PSI_server[55])(v3, v4);
return v4;
}
| psi_rwlock_wrlock:
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,[0x490ed8]
MOV RAX,qword ptr [R15]
MOV RSI,qword ptr [RDI + 0x90]
LEA RDI,[RBP + -0x48]
PUSH 0x1
POP RDX
CALL qword ptr [RAX + 0x1b0]
MOV RBX,RAX
MOV RDI,R14
CALL 0x001ab6fd
MOV R14D,EAX
TEST RBX,RBX
JZ 0x00130171
MOV RAX,qword ptr [R15]
MOV RDI,RBX
MOV ESI,R14D
CALL qword ptr [RAX + 0x1b8]
LAB_00130171:
MOV EAX,R14D
ADD RSP,0x38
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 psi_rwlock_wrlock(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),1,param_2,param_3);
uVar1 = my_rw_wrlock(param_1);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1b8))(lVar2,uVar1);
}
return uVar1;
}
| |
43,831 | inline_mysql_cond_broadcast | eloqsql/include/mysql/psi/mysql_thread.h | static inline int inline_mysql_cond_broadcast(
mysql_cond_t *that)
{
int result;
#ifdef HAVE_PSI_COND_INTERFACE
if (psi_likely(that->m_psi != NULL))
PSI_COND_CALL(broadcast_cond)(that->m_psi);
#endif
result= pthread_cond_broadcast(&that->m_cond);
return result;
} | O0 | c | inline_mysql_cond_broadcast:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x5d5eb
leaq 0x261ac1(%rip), %rax # 0x2bf098
movq (%rax), %rax
movq 0x178(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rdi
callq *%rax
movq -0x8(%rbp), %rdi
callq 0x2a690
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
| inline_mysql_cond_broadcast_1:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
cmp qword ptr [rax+30h], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_5D5EB
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+178h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+30h]
call rax
loc_5D5EB:
mov rdi, [rbp+var_8]
call _pthread_cond_broadcast
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
add rsp, 10h
pop rbp
retn
| long long inline_mysql_cond_broadcast_1(long long a1)
{
if ( *(_QWORD *)(a1 + 48) )
((void ( *)(_QWORD))PSI_server[47])(*(_QWORD *)(a1 + 48));
return (unsigned int)pthread_cond_broadcast(a1);
}
| inline_mysql_cond_broadcast:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x30],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0015d5eb
LEA RAX,[0x3bf098]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x178]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x30]
CALL RAX
LAB_0015d5eb:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012a690
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
ADD RSP,0x10
POP RBP
RET
|
int inline_mysql_cond_broadcast(pthread_cond_t *param_1)
{
int iVar1;
if (param_1[1].__align != 0) {
(**(code **)(PSI_server + 0x178))(param_1[1].__align);
}
iVar1 = pthread_cond_broadcast(param_1);
return iVar1;
}
| |
43,832 | XA_prepare_log_event::XA_prepare_log_event(unsigned char const*, Format_description_log_event const*) | eloqsql/sql/log_event.cc | XA_prepare_log_event::
XA_prepare_log_event(const uchar *buf,
const Format_description_log_event *description_event)
:Xid_apply_log_event(buf, description_event)
{
buf+= description_event->common_header_len +
description_event->post_header_len[XA_PREPARE_LOG_EVENT-1];
one_phase= * (bool *) buf;
buf+= 1;
m_xid.formatID= uint4korr(buf);
buf+= 4;
m_xid.gtrid_length= uint4korr(buf);
buf+= 4;
// Todo: validity here and elsewhere checks to be replaced by MDEV-21839 fixes
if (m_xid.gtrid_length <= 0 || m_xid.gtrid_length > MAXGTRIDSIZE)
{
m_xid.formatID= -1;
return;
}
m_xid.bqual_length= uint4korr(buf);
buf+= 4;
if (m_xid.bqual_length < 0 || m_xid.bqual_length > MAXBQUALSIZE)
{
m_xid.formatID= -1;
return;
}
DBUG_ASSERT(m_xid.gtrid_length + m_xid.bqual_length <= XIDDATASIZE);
memcpy(m_xid.data, buf, m_xid.gtrid_length + m_xid.bqual_length);
xid= NULL;
} | O0 | cpp | XA_prepare_log_event::XA_prepare_log_event(unsigned char const*, Format_description_log_event const*):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x65dc0
movq -0x20(%rbp), %rax
leaq 0x22a30c(%rip), %rcx # 0x279b70
addq $0x10, %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movzbl 0xcd(%rcx), %edx
movq -0x18(%rbp), %rcx
movq 0xd0(%rcx), %rcx
movzbl 0x25(%rcx), %ecx
addl %ecx, %edx
movq -0x10(%rbp), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movb (%rcx), %cl
andb $0x1, %cl
movb %cl, 0x260(%rax)
movq -0x10(%rbp), %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
movq %rcx, 0x90(%rax)
movq -0x10(%rbp), %rcx
addq $0x4, %rcx
movq %rcx, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
movq %rcx, 0x98(%rax)
movq -0x10(%rbp), %rcx
addq $0x4, %rcx
movq %rcx, -0x10(%rbp)
cmpq $0x0, 0x98(%rax)
jle 0x4f8fa
movq -0x20(%rbp), %rax
cmpq $0x40, 0x98(%rax)
jle 0x4f90e
movq -0x20(%rbp), %rax
movq $-0x1, 0x90(%rax)
jmp 0x4f992
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
movq %rcx, 0xa0(%rax)
movq -0x10(%rbp), %rcx
addq $0x4, %rcx
movq %rcx, -0x10(%rbp)
cmpq $0x0, 0xa0(%rax)
jl 0x4f943
movq -0x20(%rbp), %rax
cmpq $0x40, 0xa0(%rax)
jle 0x4f954
movq -0x20(%rbp), %rax
movq $-0x1, 0x90(%rax)
jmp 0x4f992
jmp 0x4f956
jmp 0x4f958
jmp 0x4f95a
movq -0x20(%rbp), %rax
movq %rax, %rdi
addq $0x90, %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rsi
movq 0x98(%rax), %rdx
addq 0xa0(%rax), %rdx
callq 0x3b0c0
movq -0x20(%rbp), %rax
movq $0x0, 0x258(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ZN20XA_prepare_log_eventC2EPKhPK28Format_description_log_event:
push rbp; Alternative name is 'XA_prepare_log_event::XA_prepare_log_event(unsigned char const*, Format_description_log_event const*)'
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rdi, [rbp+var_8]; this
mov [rbp+var_20], rdi
mov rsi, [rbp+var_10]; unsigned __int8 *
mov rdx, [rbp+var_18]; Format_description_log_event *
call _ZN19Xid_apply_log_eventC2EPKhPK28Format_description_log_event; Xid_apply_log_event::Xid_apply_log_event(uchar const*,Format_description_log_event const*)
mov rax, [rbp+var_20]
lea rcx, _ZTV20XA_prepare_log_event; `vtable for'XA_prepare_log_event
add rcx, 10h
mov [rax], rcx
mov rcx, [rbp+var_18]
movzx edx, byte ptr [rcx+0CDh]
mov rcx, [rbp+var_18]
mov rcx, [rcx+0D0h]
movzx ecx, byte ptr [rcx+25h]
add edx, ecx
mov rcx, [rbp+var_10]
movsxd rdx, edx
add rcx, rdx
mov [rbp+var_10], rcx
mov rcx, [rbp+var_10]
mov cl, [rcx]
and cl, 1
mov [rax+260h], cl
mov rcx, [rbp+var_10]
add rcx, 1
mov [rbp+var_10], rcx
mov rcx, [rbp+var_10]
mov ecx, [rcx]
mov [rax+90h], rcx
mov rcx, [rbp+var_10]
add rcx, 4
mov [rbp+var_10], rcx
mov rcx, [rbp+var_10]
mov ecx, [rcx]
mov [rax+98h], rcx
mov rcx, [rbp+var_10]
add rcx, 4
mov [rbp+var_10], rcx
cmp qword ptr [rax+98h], 0
jle short loc_4F8FA
mov rax, [rbp+var_20]
cmp qword ptr [rax+98h], 40h ; '@'
jle short loc_4F90E
loc_4F8FA:
mov rax, [rbp+var_20]
mov qword ptr [rax+90h], 0FFFFFFFFFFFFFFFFh
jmp loc_4F992
loc_4F90E:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
mov ecx, [rcx]
mov [rax+0A0h], rcx
mov rcx, [rbp+var_10]
add rcx, 4
mov [rbp+var_10], rcx
cmp qword ptr [rax+0A0h], 0
jl short loc_4F943
mov rax, [rbp+var_20]
cmp qword ptr [rax+0A0h], 40h ; '@'
jle short loc_4F954
loc_4F943:
mov rax, [rbp+var_20]
mov qword ptr [rax+90h], 0FFFFFFFFFFFFFFFFh
jmp short loc_4F992
loc_4F954:
jmp short $+2
loc_4F956:
jmp short $+2
loc_4F958:
jmp short $+2
loc_4F95A:
mov rax, [rbp+var_20]
mov rdi, rax
add rdi, 90h
add rdi, 18h
mov rsi, [rbp+var_10]
mov rdx, [rax+98h]
add rdx, [rax+0A0h]
call _memcpy
mov rax, [rbp+var_20]
mov qword ptr [rax+258h], 0
loc_4F992:
add rsp, 20h
pop rbp
retn
| void XA_prepare_log_event::XA_prepare_log_event(
XA_prepare_log_event *this,
const unsigned __int8 *a2,
const Format_description_log_event *a3)
{
unsigned __int8 *v4; // [rsp+10h] [rbp-10h]
unsigned __int8 *v5; // [rsp+10h] [rbp-10h]
unsigned __int8 *v6; // [rsp+10h] [rbp-10h]
Xid_apply_log_event::Xid_apply_log_event(this, a2, a3);
*(_QWORD *)this = &`vtable for'XA_prepare_log_event + 2;
v4 = (unsigned __int8 *)&a2[*(unsigned __int8 *)(*((_QWORD *)a3 + 26) + 37LL) + *((unsigned __int8 *)a3 + 205)];
*((_BYTE *)this + 608) = *v4++ & 1;
*((_QWORD *)this + 18) = *(unsigned int *)v4;
v4 += 4;
*((_QWORD *)this + 19) = *(unsigned int *)v4;
v5 = v4 + 4;
if ( *((long long *)this + 19) > 0 && *((long long *)this + 19) <= 64 )
{
*((_QWORD *)this + 20) = *(unsigned int *)v5;
v6 = v5 + 4;
if ( *((_QWORD *)this + 20) <= 0x40uLL )
{
memcpy((char *)this + 168, v6, *((_QWORD *)this + 20) + *((_QWORD *)this + 19));
*((_QWORD *)this + 75) = 0LL;
}
else
{
*((_QWORD *)this + 18) = -1LL;
}
}
else
{
*((_QWORD *)this + 18) = -1LL;
}
}
| XA_prepare_log_event:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RDI
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x00165dc0
MOV RAX,qword ptr [RBP + -0x20]
LEA RCX,[0x379b70]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX EDX,byte ptr [RCX + 0xcd]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX + 0xd0]
MOVZX ECX,byte ptr [RCX + 0x25]
ADD EDX,ECX
MOV RCX,qword ptr [RBP + -0x10]
MOVSXD RDX,EDX
ADD RCX,RDX
MOV qword ptr [RBP + -0x10],RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV CL,byte ptr [RCX]
AND CL,0x1
MOV byte ptr [RAX + 0x260],CL
MOV RCX,qword ptr [RBP + -0x10]
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX]
MOV qword ptr [RAX + 0x90],RCX
MOV RCX,qword ptr [RBP + -0x10]
ADD RCX,0x4
MOV qword ptr [RBP + -0x10],RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX]
MOV qword ptr [RAX + 0x98],RCX
MOV RCX,qword ptr [RBP + -0x10]
ADD RCX,0x4
MOV qword ptr [RBP + -0x10],RCX
CMP qword ptr [RAX + 0x98],0x0
JLE 0x0014f8fa
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0x98],0x40
JLE 0x0014f90e
LAB_0014f8fa:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x90],-0x1
JMP 0x0014f992
LAB_0014f90e:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX]
MOV qword ptr [RAX + 0xa0],RCX
MOV RCX,qword ptr [RBP + -0x10]
ADD RCX,0x4
MOV qword ptr [RBP + -0x10],RCX
CMP qword ptr [RAX + 0xa0],0x0
JL 0x0014f943
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0xa0],0x40
JLE 0x0014f954
LAB_0014f943:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x90],-0x1
JMP 0x0014f992
LAB_0014f954:
JMP 0x0014f956
LAB_0014f956:
JMP 0x0014f958
LAB_0014f958:
JMP 0x0014f95a
LAB_0014f95a:
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,RAX
ADD RDI,0x90
ADD RDI,0x18
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x98]
ADD RDX,qword ptr [RAX + 0xa0]
CALL 0x0013b0c0
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x258],0x0
LAB_0014f992:
ADD RSP,0x20
POP RBP
RET
|
/* XA_prepare_log_event::XA_prepare_log_event(unsigned char const*, Format_description_log_event
const*) */
void __thiscall
XA_prepare_log_event::XA_prepare_log_event
(XA_prepare_log_event *this,uchar *param_1,Format_description_log_event *param_2)
{
byte *pbVar1;
Xid_apply_log_event::Xid_apply_log_event((Xid_apply_log_event *)this,param_1,param_2);
*(int ***)this = &PTR_print_00379b80;
pbVar1 = param_1 + (int)((uint)(byte)param_2[0xcd] +
(uint)*(byte *)(*(long *)(param_2 + 0xd0) + 0x25));
this[0x260] = (XA_prepare_log_event)(*pbVar1 & 1);
*(ulong *)(this + 0x90) = (ulong)*(uint *)(pbVar1 + 1);
*(ulong *)(this + 0x98) = (ulong)*(uint *)(pbVar1 + 5);
if ((*(long *)(this + 0x98) < 1) || (0x40 < *(long *)(this + 0x98))) {
*(int8 *)(this + 0x90) = 0xffffffffffffffff;
}
else {
*(ulong *)(this + 0xa0) = (ulong)*(uint *)(pbVar1 + 9);
if ((*(long *)(this + 0xa0) < 0) || (0x40 < *(long *)(this + 0xa0))) {
*(int8 *)(this + 0x90) = 0xffffffffffffffff;
}
else {
memcpy(this + 0xa8,pbVar1 + 0xd,*(long *)(this + 0x98) + *(long *)(this + 0xa0));
*(int8 *)(this + 600) = 0;
}
}
return;
}
| |
43,833 | tprint | eloqsql/storage/maria/ma_recovery_util.c | void tprint(FILE *trace_file __attribute__ ((unused)),
const char *format __attribute__ ((unused)), ...)
{
va_list args;
#ifndef DBUG_OFF
{
char buff[1024];
size_t length;
va_start(args, format);
length= my_vsnprintf(buff, sizeof(buff)-1, format, args);
if (length && buff[length-1] == '\n')
buff[length-1]= 0; /* Don't print end \n */
DBUG_PRINT("info", ("%s", buff));
va_end(args);
}
#endif
va_start(args, format);
if (trace_file != NULL)
vfprintf(trace_file, format, args);
va_end(args);
} | O0 | c | tprint:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0x416b8
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
movq %r9, -0xb8(%rbp)
movq %r8, -0xc0(%rbp)
movq %rcx, -0xc8(%rbp)
movq %rdx, -0xd0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x30(%rbp), %rax
leaq -0xe0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
cmpq $0x0, -0x8(%rbp)
je 0x41718
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x2a7c0
addq $0xe0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| tprint:
push rbp
mov rbp, rsp
sub rsp, 0E0h
test al, al
jz short loc_416B8
movaps [rbp+var_B0], xmm0
movaps [rbp+var_A0], xmm1
movaps [rbp+var_90], xmm2
movaps [rbp+var_80], xmm3
movaps [rbp+var_70], xmm4
movaps [rbp+var_60], xmm5
movaps [rbp+var_50], xmm6
movaps [rbp+var_40], xmm7
loc_416B8:
mov [rbp+var_B8], r9
mov [rbp+var_C0], r8
mov [rbp+var_C8], rcx
mov [rbp+var_D0], rdx
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
lea rax, [rbp+var_30]
lea rcx, [rbp+var_E0]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 10h
cmp [rbp+var_8], 0
jz short loc_41718
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
lea rdx, [rbp+var_30]
call _vfprintf
loc_41718:
add rsp, 0E0h
pop rbp
retn
| _DWORD * tprint(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
_DWORD *result; // rax
char v16; // [rsp+0h] [rbp-E0h] BYREF
long long v17; // [rsp+10h] [rbp-D0h]
long long v18; // [rsp+18h] [rbp-C8h]
long long v19; // [rsp+20h] [rbp-C0h]
long long v20; // [rsp+28h] [rbp-B8h]
__m128 v21; // [rsp+30h] [rbp-B0h]
__m128 v22; // [rsp+40h] [rbp-A0h]
__m128 v23; // [rsp+50h] [rbp-90h]
__m128 v24; // [rsp+60h] [rbp-80h]
__m128 v25; // [rsp+70h] [rbp-70h]
__m128 v26; // [rsp+80h] [rbp-60h]
__m128 v27; // [rsp+90h] [rbp-50h]
__m128 v28; // [rsp+A0h] [rbp-40h]
_DWORD v29[2]; // [rsp+B0h] [rbp-30h] BYREF
char *v30; // [rsp+B8h] [rbp-28h]
char *v31; // [rsp+C0h] [rbp-20h]
long long v32; // [rsp+D0h] [rbp-10h]
long long v33; // [rsp+D8h] [rbp-8h]
v21 = a7;
v22 = a8;
v23 = a9;
v24 = a10;
v25 = a11;
v26 = a12;
v27 = a13;
v28 = a14;
v20 = a6;
v19 = a5;
v18 = a4;
v17 = a3;
v33 = a1;
v32 = a2;
result = v29;
v31 = &v16;
v30 = &a15;
v29[1] = 48;
v29[0] = 16;
if ( a1 )
return (_DWORD *)vfprintf(v33, v32, v29);
return result;
}
| tprint:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xe0
TEST AL,AL
JZ 0x001416b8
MOVAPS xmmword ptr [RBP + -0xb0],XMM0
MOVAPS xmmword ptr [RBP + -0xa0],XMM1
MOVAPS xmmword ptr [RBP + -0x90],XMM2
MOVAPS xmmword ptr [RBP + -0x80],XMM3
MOVAPS xmmword ptr [RBP + -0x70],XMM4
MOVAPS xmmword ptr [RBP + -0x60],XMM5
MOVAPS xmmword ptr [RBP + -0x50],XMM6
MOVAPS xmmword ptr [RBP + -0x40],XMM7
LAB_001416b8:
MOV qword ptr [RBP + -0xb8],R9
MOV qword ptr [RBP + -0xc0],R8
MOV qword ptr [RBP + -0xc8],RCX
MOV qword ptr [RBP + -0xd0],RDX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LEA RAX,[RBP + -0x30]
LEA RCX,[RBP + -0xe0]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x10
CMP qword ptr [RBP + -0x8],0x0
JZ 0x00141718
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDX,[RBP + -0x30]
CALL 0x0012a7c0
LAB_00141718:
ADD RSP,0xe0
POP RBP
RET
|
void tprint(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,FILE *param_9
,char *param_10,int8 param_11,int8 param_12,int8 param_13,
int8 param_14)
{
char in_AL;
int1 local_e8 [16];
int8 local_d8;
int8 local_d0;
int8 local_c8;
int8 local_c0;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int4 local_38;
int4 local_34;
int1 *local_30;
int1 *local_28;
char *local_18;
FILE *local_10;
if (in_AL != '\0') {
local_b8 = param_1;
local_a8 = param_2;
local_98 = param_3;
local_88 = param_4;
local_78 = param_5;
local_68 = param_6;
local_58 = param_7;
local_48 = param_8;
}
local_28 = local_e8;
local_30 = &stack0x00000008;
local_34 = 0x30;
local_38 = 0x10;
if (param_9 != (FILE *)0x0) {
local_d8 = param_11;
local_d0 = param_12;
local_c8 = param_13;
local_c0 = param_14;
local_18 = param_10;
local_10 = param_9;
vfprintf(param_9,param_10,&local_38);
}
return;
}
| |
43,834 | WriteResults(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<AIRREntity, std::allocator<AIRREntity>>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::vector<AIRREntity, std::allocator<AIRREntity>>>>> const&) | MikePodsytnik[P]TCRtrie/src/TrieInterface.cpp | static void WriteResults(const std::string& outPath, const std::unordered_map<std::string, std::vector<AIRREntity>>& results) {
std::ofstream outFile(outPath);
if (!outFile.is_open()) {
std::cerr << "Error: Unable to write to " << outPath << std::endl;
return;
}
bool hasVGene = false, hasJGene = false;
for (const auto& [_, matches] : results) {
for (const auto& m : matches) {
if (!m.vGene.empty()) hasVGene = true;
if (!m.jGene.empty()) hasJGene = true;
if (hasVGene && hasJGene) break;
}
if (hasVGene && hasJGene) break;
}
outFile << "query\tmatch";
if (hasVGene) outFile << "\tv_gene";
if (hasJGene) outFile << "\tj_gene";
outFile << '\n';
for (const auto& [query, matches] : results) {
for (const auto& match : matches) {
outFile << query << '\t' << match.junctionAA;
if (hasVGene) outFile << '\t' << match.vGene;
if (hasJGene) outFile << '\t' << match.jGene;
outFile << '\n';
}
}
} | O0 | cpp | WriteResults(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<AIRREntity, std::allocator<AIRREntity>>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::vector<AIRREntity, std::allocator<AIRREntity>>>>> const&):
pushq %rbp
movq %rsp, %rbp
subq $0x310, %rsp # imm = 0x310
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rsi
leaq -0x210(%rbp), %rdi
movq %rdi, -0x2d8(%rbp)
movl $0x10, %edx
callq 0x9b00
movq -0x2d8(%rbp), %rdi
callq 0x94a0
movb %al, -0x2c9(%rbp)
jmp 0x6a8a3
movb -0x2c9(%rbp), %al
testb $0x1, %al
jne 0x6a92b
jmp 0x6a8af
movq 0x3773a(%rip), %rdi # 0xa1ff0
leaq 0x78b0(%rip), %rsi # 0x7216d
callq 0x95e0
movq %rax, -0x2e0(%rbp)
jmp 0x6a8cb
movq -0x2e0(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x9550
movq %rax, -0x2e8(%rbp)
jmp 0x6a8e4
movq -0x2e8(%rbp), %rdi
movq 0x37666(%rip), %rsi # 0xa1f58
callq 0x9660
jmp 0x6a8f9
movl $0x1, -0x220(%rbp)
jmp 0x6acfe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x218(%rbp)
movl %eax, -0x21c(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x9900
jmp 0x6ad13
movb $0x0, -0x221(%rbp)
movb $0x0, -0x222(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rdi
callq 0x6b160
movq %rax, -0x238(%rbp)
movq -0x230(%rbp), %rdi
callq 0x6b190
movq %rax, -0x240(%rbp)
leaq -0x238(%rbp), %rdi
leaq -0x240(%rbp), %rsi
callq 0x6b1c0
testb $0x1, %al
jne 0x6a986
jmp 0x6aaa3
leaq -0x238(%rbp), %rdi
callq 0x6b1f0
movq %rax, -0x248(%rbp)
movq -0x248(%rbp), %rdi
callq 0x656d0
movq %rax, -0x250(%rbp)
movq -0x248(%rbp), %rdi
callq 0x6b220
movq %rax, -0x258(%rbp)
movq -0x258(%rbp), %rax
movq %rax, -0x260(%rbp)
movq -0x260(%rbp), %rdi
callq 0x5f7d0
movq %rax, -0x268(%rbp)
movq -0x260(%rbp), %rdi
callq 0x5f800
movq %rax, -0x270(%rbp)
leaq -0x268(%rbp), %rdi
leaq -0x270(%rbp), %rsi
callq 0x5fac0
testb $0x1, %al
jne 0x6aa0c
jmp 0x6aa7c
leaq -0x268(%rbp), %rdi
callq 0x5fb30
movq %rax, -0x278(%rbp)
movq -0x278(%rbp), %rdi
addq $0x20, %rdi
callq 0x99c0
testb $0x1, %al
jne 0x6aa3a
movb $0x1, -0x221(%rbp)
movq -0x278(%rbp), %rdi
addq $0x40, %rdi
callq 0x99c0
testb $0x1, %al
jne 0x6aa55
movb $0x1, -0x222(%rbp)
testb $0x1, -0x221(%rbp)
je 0x6aa69
testb $0x1, -0x222(%rbp)
je 0x6aa69
jmp 0x6aa7c
jmp 0x6aa6b
leaq -0x268(%rbp), %rdi
callq 0x5fb50
jmp 0x6a9f3
testb $0x1, -0x221(%rbp)
je 0x6aa90
testb $0x1, -0x222(%rbp)
je 0x6aa90
jmp 0x6aaa3
jmp 0x6aa92
leaq -0x238(%rbp), %rdi
callq 0x6b240
jmp 0x6a96a
leaq 0x76de(%rip), %rsi # 0x72188
leaq -0x210(%rbp), %rdi
callq 0x95e0
jmp 0x6aab8
testb $0x1, -0x221(%rbp)
je 0x6aad8
leaq 0x76cc(%rip), %rsi # 0x72194
leaq -0x210(%rbp), %rdi
callq 0x95e0
jmp 0x6aad6
jmp 0x6aad8
testb $0x1, -0x222(%rbp)
je 0x6aaf8
leaq 0x76b4(%rip), %rsi # 0x7219c
leaq -0x210(%rbp), %rdi
callq 0x95e0
jmp 0x6aaf6
jmp 0x6aaf8
leaq -0x210(%rbp), %rdi
movl $0xa, %esi
callq 0x9750
jmp 0x6ab0b
movq -0x10(%rbp), %rax
movq %rax, -0x280(%rbp)
movq -0x280(%rbp), %rdi
callq 0x6b160
movq %rax, -0x288(%rbp)
movq -0x280(%rbp), %rdi
callq 0x6b190
movq %rax, -0x290(%rbp)
leaq -0x288(%rbp), %rdi
leaq -0x290(%rbp), %rsi
callq 0x6b1c0
testb $0x1, %al
jne 0x6ab58
jmp 0x6acf4
leaq -0x288(%rbp), %rdi
callq 0x6b1f0
movq %rax, -0x298(%rbp)
movq -0x298(%rbp), %rdi
callq 0x656d0
movq %rax, -0x2a0(%rbp)
movq -0x298(%rbp), %rdi
callq 0x6b220
movq %rax, -0x2a8(%rbp)
movq -0x2a8(%rbp), %rax
movq %rax, -0x2b0(%rbp)
movq -0x2b0(%rbp), %rdi
callq 0x5f7d0
movq %rax, -0x2b8(%rbp)
movq -0x2b0(%rbp), %rdi
callq 0x5f800
movq %rax, -0x2c0(%rbp)
leaq -0x2b8(%rbp), %rdi
leaq -0x2c0(%rbp), %rsi
callq 0x5fac0
testb $0x1, %al
jne 0x6abe1
jmp 0x6ace1
leaq -0x2b8(%rbp), %rdi
callq 0x5fb30
movq %rax, -0x2c8(%rbp)
movq -0x2a0(%rbp), %rsi
leaq -0x210(%rbp), %rdi
callq 0x9550
movq %rax, -0x2f0(%rbp)
jmp 0x6ac10
movq -0x2f0(%rbp), %rdi
movl $0x9, %esi
callq 0x9750
movq %rax, -0x2f8(%rbp)
jmp 0x6ac2a
movq -0x2f8(%rbp), %rdi
movq -0x2c8(%rbp), %rsi
callq 0x9550
jmp 0x6ac3f
testb $0x1, -0x221(%rbp)
je 0x6ac7d
leaq -0x210(%rbp), %rdi
movl $0x9, %esi
callq 0x9750
movq %rax, -0x300(%rbp)
jmp 0x6ac62
movq -0x300(%rbp), %rdi
movq -0x2c8(%rbp), %rsi
addq $0x20, %rsi
callq 0x9550
jmp 0x6ac7b
jmp 0x6ac7d
testb $0x1, -0x222(%rbp)
je 0x6acbb
leaq -0x210(%rbp), %rdi
movl $0x9, %esi
callq 0x9750
movq %rax, -0x308(%rbp)
jmp 0x6aca0
movq -0x308(%rbp), %rdi
movq -0x2c8(%rbp), %rsi
addq $0x40, %rsi
callq 0x9550
jmp 0x6acb9
jmp 0x6acbb
leaq -0x210(%rbp), %rdi
movl $0xa, %esi
callq 0x9750
jmp 0x6acce
jmp 0x6acd0
leaq -0x2b8(%rbp), %rdi
callq 0x5fb50
jmp 0x6abc5
jmp 0x6ace3
leaq -0x288(%rbp), %rdi
callq 0x6b240
jmp 0x6ab3c
movl $0x0, -0x220(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x9900
addq $0x310, %rsp # imm = 0x310
popq %rbp
retq
movq -0x218(%rbp), %rdi
callq 0x9a70
nop
| _ZL12WriteResultsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt13unordered_mapIS4_St6vectorI10AIRREntitySaIS9_EESt4hashIS4_ESt8equal_toIS4_ESaISt4pairIS5_SB_EEE:
push rbp
mov rbp, rsp
sub rsp, 310h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rsi, [rbp+var_8]
lea rdi, [rbp+var_210]
mov [rbp+var_2D8], rdi
mov edx, 10h
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ofstream::basic_ofstream(std::string const&,std::_Ios_Openmode)
mov rdi, [rbp+var_2D8]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEE7is_openEv; std::ofstream::is_open(void)
mov [rbp+var_2C9], al
jmp short $+2
loc_6A8A3:
mov al, [rbp+var_2C9]
test al, 1
jnz short loc_6A92B
jmp short $+2
loc_6A8AF:
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, aErrorUnableToW; "Error: Unable to write to "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_2E0], rax
jmp short $+2
loc_6A8CB:
mov rdi, [rbp+var_2E0]
mov rsi, [rbp+var_8]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rbp+var_2E8], rax
jmp short $+2
loc_6A8E4:
mov rdi, [rbp+var_2E8]
mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr
call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &))
jmp short $+2
loc_6A8F9:
mov [rbp+var_220], 1
jmp loc_6ACFE
mov rcx, rax
mov eax, edx
mov [rbp+var_218], rcx
mov [rbp+var_21C], eax
lea rdi, [rbp+var_210]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream()
jmp loc_6AD13
loc_6A92B:
mov [rbp+var_221], 0
mov [rbp+var_222], 0
mov rax, [rbp+var_10]
mov [rbp+var_230], rax
mov rdi, [rbp+var_230]
call _ZNKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorI10AIRREntitySaIS7_EESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S9_EEE5beginEv; std::unordered_map<std::string,std::vector<AIRREntity>>::begin(void)
mov [rbp+var_238], rax
mov rdi, [rbp+var_230]
call _ZNKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorI10AIRREntitySaIS7_EESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S9_EEE3endEv; std::unordered_map<std::string,std::vector<AIRREntity>>::end(void)
mov [rbp+var_240], rax
loc_6A96A:
lea rdi, [rbp+var_238]
lea rsi, [rbp+var_240]
call _ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorI10AIRREntitySaISA_EEELb1EEESG_; std::__detail::operator!=(std::__detail::_Node_iterator_base<std::pair<std::string const,std::vector<AIRREntity>>,true> const&,std::__detail::_Node_iterator_base<std::pair<std::string const,std::vector<AIRREntity>>,true> const&)
test al, 1
jnz short loc_6A986
jmp loc_6AAA3
loc_6A986:
lea rdi, [rbp+var_238]
call _ZNKSt8__detail20_Node_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorI10AIRREntitySaISA_EEELb0ELb1EEdeEv; std::__detail::_Node_const_iterator<std::pair<std::string const,std::vector<AIRREntity>>,false,true>::operator*(void)
mov [rbp+var_248], rax
mov rdi, [rbp+var_248]
call _ZSt3getILm0EKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorI10AIRREntitySaIS8_EEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKSF_; std::get<0ul,std::string const,std::vector<AIRREntity>>(std::pair<std::string const,std::vector<AIRREntity>> const&)
mov [rbp+var_250], rax
mov rdi, [rbp+var_248]
call _ZSt3getILm1EKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorI10AIRREntitySaIS8_EEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKSF_; std::get<1ul,std::string const,std::vector<AIRREntity>>(std::pair<std::string const,std::vector<AIRREntity>> const&)
mov [rbp+var_258], rax
mov rax, [rbp+var_258]
mov [rbp+var_260], rax
mov rdi, [rbp+var_260]
call _ZNKSt6vectorI10AIRREntitySaIS0_EE5beginEv; std::vector<AIRREntity>::begin(void)
mov [rbp+var_268], rax
mov rdi, [rbp+var_260]
call _ZNKSt6vectorI10AIRREntitySaIS0_EE3endEv; std::vector<AIRREntity>::end(void)
mov [rbp+var_270], rax
loc_6A9F3:
lea rdi, [rbp+var_268]
lea rsi, [rbp+var_270]
call _ZN9__gnu_cxxneIPK10AIRREntitySt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_; __gnu_cxx::operator!=<AIRREntity const*,std::vector<AIRREntity>>(__gnu_cxx::__normal_iterator<AIRREntity const*,std::vector<AIRREntity>> const&,__gnu_cxx::__normal_iterator<AIRREntity const*,std::vector<AIRREntity>> const&)
test al, 1
jnz short loc_6AA0C
jmp short loc_6AA7C
loc_6AA0C:
lea rdi, [rbp+var_268]
call _ZNK9__gnu_cxx17__normal_iteratorIPK10AIRREntitySt6vectorIS1_SaIS1_EEEdeEv; __gnu_cxx::__normal_iterator<AIRREntity const*,std::vector<AIRREntity>>::operator*(void)
mov [rbp+var_278], rax
mov rdi, [rbp+var_278]
add rdi, 20h ; ' '
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_6AA3A
mov [rbp+var_221], 1
loc_6AA3A:
mov rdi, [rbp+var_278]
add rdi, 40h ; '@'
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_6AA55
mov [rbp+var_222], 1
loc_6AA55:
test [rbp+var_221], 1
jz short loc_6AA69
test [rbp+var_222], 1
jz short loc_6AA69
jmp short loc_6AA7C
loc_6AA69:
jmp short $+2
loc_6AA6B:
lea rdi, [rbp+var_268]
call _ZN9__gnu_cxx17__normal_iteratorIPK10AIRREntitySt6vectorIS1_SaIS1_EEEppEv; __gnu_cxx::__normal_iterator<AIRREntity const*,std::vector<AIRREntity>>::operator++(void)
jmp loc_6A9F3
loc_6AA7C:
test [rbp+var_221], 1
jz short loc_6AA90
test [rbp+var_222], 1
jz short loc_6AA90
jmp short loc_6AAA3
loc_6AA90:
jmp short $+2
loc_6AA92:
lea rdi, [rbp+var_238]
call _ZNSt8__detail20_Node_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorI10AIRREntitySaISA_EEELb0ELb1EEppEv; std::__detail::_Node_const_iterator<std::pair<std::string const,std::vector<AIRREntity>>,false,true>::operator++(void)
jmp loc_6A96A
loc_6AAA3:
lea rsi, aQueryMatch; "query\tmatch"
lea rdi, [rbp+var_210]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_6AAB8:
test [rbp+var_221], 1
jz short loc_6AAD8
lea rsi, aVGene_0; "\tv_gene"
lea rdi, [rbp+var_210]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_6AAD6:
jmp short $+2
loc_6AAD8:
test [rbp+var_222], 1
jz short loc_6AAF8
lea rsi, aJGene_0; "\tj_gene"
lea rdi, [rbp+var_210]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_6AAF6:
jmp short $+2
loc_6AAF8:
lea rdi, [rbp+var_210]
mov esi, 0Ah
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
jmp short $+2
loc_6AB0B:
mov rax, [rbp+var_10]
mov [rbp+var_280], rax
mov rdi, [rbp+var_280]
call _ZNKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorI10AIRREntitySaIS7_EESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S9_EEE5beginEv; std::unordered_map<std::string,std::vector<AIRREntity>>::begin(void)
mov [rbp+var_288], rax
mov rdi, [rbp+var_280]
call _ZNKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorI10AIRREntitySaIS7_EESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S9_EEE3endEv; std::unordered_map<std::string,std::vector<AIRREntity>>::end(void)
mov [rbp+var_290], rax
loc_6AB3C:
lea rdi, [rbp+var_288]
lea rsi, [rbp+var_290]
call _ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorI10AIRREntitySaISA_EEELb1EEESG_; std::__detail::operator!=(std::__detail::_Node_iterator_base<std::pair<std::string const,std::vector<AIRREntity>>,true> const&,std::__detail::_Node_iterator_base<std::pair<std::string const,std::vector<AIRREntity>>,true> const&)
test al, 1
jnz short loc_6AB58
jmp loc_6ACF4
loc_6AB58:
lea rdi, [rbp+var_288]
call _ZNKSt8__detail20_Node_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorI10AIRREntitySaISA_EEELb0ELb1EEdeEv; std::__detail::_Node_const_iterator<std::pair<std::string const,std::vector<AIRREntity>>,false,true>::operator*(void)
mov [rbp+var_298], rax
mov rdi, [rbp+var_298]
call _ZSt3getILm0EKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorI10AIRREntitySaIS8_EEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKSF_; std::get<0ul,std::string const,std::vector<AIRREntity>>(std::pair<std::string const,std::vector<AIRREntity>> const&)
mov [rbp+var_2A0], rax
mov rdi, [rbp+var_298]
call _ZSt3getILm1EKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorI10AIRREntitySaIS8_EEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKSF_; std::get<1ul,std::string const,std::vector<AIRREntity>>(std::pair<std::string const,std::vector<AIRREntity>> const&)
mov [rbp+var_2A8], rax
mov rax, [rbp+var_2A8]
mov [rbp+var_2B0], rax
mov rdi, [rbp+var_2B0]
call _ZNKSt6vectorI10AIRREntitySaIS0_EE5beginEv; std::vector<AIRREntity>::begin(void)
mov [rbp+var_2B8], rax
mov rdi, [rbp+var_2B0]
call _ZNKSt6vectorI10AIRREntitySaIS0_EE3endEv; std::vector<AIRREntity>::end(void)
mov [rbp+var_2C0], rax
loc_6ABC5:
lea rdi, [rbp+var_2B8]
lea rsi, [rbp+var_2C0]
call _ZN9__gnu_cxxneIPK10AIRREntitySt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_; __gnu_cxx::operator!=<AIRREntity const*,std::vector<AIRREntity>>(__gnu_cxx::__normal_iterator<AIRREntity const*,std::vector<AIRREntity>> const&,__gnu_cxx::__normal_iterator<AIRREntity const*,std::vector<AIRREntity>> const&)
test al, 1
jnz short loc_6ABE1
jmp loc_6ACE1
loc_6ABE1:
lea rdi, [rbp+var_2B8]
call _ZNK9__gnu_cxx17__normal_iteratorIPK10AIRREntitySt6vectorIS1_SaIS1_EEEdeEv; __gnu_cxx::__normal_iterator<AIRREntity const*,std::vector<AIRREntity>>::operator*(void)
mov [rbp+var_2C8], rax
mov rsi, [rbp+var_2A0]
lea rdi, [rbp+var_210]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rbp+var_2F0], rax
jmp short $+2
loc_6AC10:
mov rdi, [rbp+var_2F0]
mov esi, 9
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
mov [rbp+var_2F8], rax
jmp short $+2
loc_6AC2A:
mov rdi, [rbp+var_2F8]
mov rsi, [rbp+var_2C8]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
jmp short $+2
loc_6AC3F:
test [rbp+var_221], 1
jz short loc_6AC7D
lea rdi, [rbp+var_210]
mov esi, 9
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
mov [rbp+var_300], rax
jmp short $+2
loc_6AC62:
mov rdi, [rbp+var_300]
mov rsi, [rbp+var_2C8]
add rsi, 20h ; ' '
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
jmp short $+2
loc_6AC7B:
jmp short $+2
loc_6AC7D:
test [rbp+var_222], 1
jz short loc_6ACBB
lea rdi, [rbp+var_210]
mov esi, 9
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
mov [rbp+var_308], rax
jmp short $+2
loc_6ACA0:
mov rdi, [rbp+var_308]
mov rsi, [rbp+var_2C8]
add rsi, 40h ; '@'
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
jmp short $+2
loc_6ACB9:
jmp short $+2
loc_6ACBB:
lea rdi, [rbp+var_210]
mov esi, 0Ah
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
jmp short $+2
loc_6ACCE:
jmp short $+2
loc_6ACD0:
lea rdi, [rbp+var_2B8]
call _ZN9__gnu_cxx17__normal_iteratorIPK10AIRREntitySt6vectorIS1_SaIS1_EEEppEv; __gnu_cxx::__normal_iterator<AIRREntity const*,std::vector<AIRREntity>>::operator++(void)
jmp loc_6ABC5
loc_6ACE1:
jmp short $+2
loc_6ACE3:
lea rdi, [rbp+var_288]
call _ZNSt8__detail20_Node_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorI10AIRREntitySaISA_EEELb0ELb1EEppEv; std::__detail::_Node_const_iterator<std::pair<std::string const,std::vector<AIRREntity>>,false,true>::operator++(void)
jmp loc_6AB3C
loc_6ACF4:
mov [rbp+var_220], 0
loc_6ACFE:
lea rdi, [rbp+var_210]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream()
add rsp, 310h
pop rbp
retn
loc_6AD13:
mov rdi, [rbp+var_218]
call __Unwind_Resume
| long long WriteResults(long long a1, long long a2)
{
long long v3; // [rsp+8h] [rbp-308h]
long long v4; // [rsp+10h] [rbp-300h]
long long v5; // [rsp+18h] [rbp-2F8h]
long long v6; // [rsp+20h] [rbp-2F0h]
long long v7; // [rsp+28h] [rbp-2E8h]
long long v8; // [rsp+30h] [rbp-2E0h]
long long v9; // [rsp+48h] [rbp-2C8h]
long long v10; // [rsp+50h] [rbp-2C0h] BYREF
long long v11; // [rsp+58h] [rbp-2B8h] BYREF
long long v12; // [rsp+60h] [rbp-2B0h]
long long v13; // [rsp+68h] [rbp-2A8h]
long long v14; // [rsp+70h] [rbp-2A0h]
long long v15; // [rsp+78h] [rbp-298h]
long long v16; // [rsp+80h] [rbp-290h] BYREF
long long v17; // [rsp+88h] [rbp-288h] BYREF
long long v18; // [rsp+90h] [rbp-280h]
long long v19; // [rsp+98h] [rbp-278h]
long long v20; // [rsp+A0h] [rbp-270h] BYREF
long long v21; // [rsp+A8h] [rbp-268h] BYREF
long long v22; // [rsp+B0h] [rbp-260h]
long long v23; // [rsp+B8h] [rbp-258h]
long long v24; // [rsp+C0h] [rbp-250h]
long long v25; // [rsp+C8h] [rbp-248h]
long long v26; // [rsp+D0h] [rbp-240h] BYREF
long long v27; // [rsp+D8h] [rbp-238h] BYREF
long long v28; // [rsp+E0h] [rbp-230h]
char v29; // [rsp+EEh] [rbp-222h]
char v30; // [rsp+EFh] [rbp-221h]
int v31; // [rsp+F0h] [rbp-220h]
_BYTE v32[512]; // [rsp+100h] [rbp-210h] BYREF
long long v33; // [rsp+300h] [rbp-10h]
long long v34; // [rsp+308h] [rbp-8h]
v34 = a1;
v33 = a2;
std::ofstream::basic_ofstream(v32, a1, 16LL);
if ( (std::ofstream::is_open(v32) & 1) != 0 )
{
v30 = 0;
v29 = 0;
v28 = v33;
v27 = std::unordered_map<std::string,std::vector<AIRREntity>>::begin(v33);
v26 = std::unordered_map<std::string,std::vector<AIRREntity>>::end(v28);
while ( (std::__detail::operator!=(&v27, &v26) & 1) != 0 )
{
v25 = std::__detail::_Node_const_iterator<std::pair<std::string const,std::vector<AIRREntity>>,false,true>::operator*(&v27);
v24 = std::get<0ul,std::string const,std::vector<AIRREntity>>(v25);
v23 = std::get<1ul,std::string const,std::vector<AIRREntity>>(v25);
v22 = v23;
v21 = std::vector<AIRREntity>::begin(v23);
v20 = std::vector<AIRREntity>::end(v22);
while ( __gnu_cxx::operator!=<AIRREntity const*,std::vector<AIRREntity>>((long long)&v21, (long long)&v20) )
{
v19 = __gnu_cxx::__normal_iterator<AIRREntity const*,std::vector<AIRREntity>>::operator*((long long)&v21);
if ( (std::string::empty(v19 + 32) & 1) == 0 )
v30 = 1;
if ( (std::string::empty(v19 + 64) & 1) == 0 )
v29 = 1;
if ( (v30 & 1) != 0 && (v29 & 1) != 0 )
break;
__gnu_cxx::__normal_iterator<AIRREntity const*,std::vector<AIRREntity>>::operator++(&v21);
}
if ( (v30 & 1) != 0 && (v29 & 1) != 0 )
break;
std::__detail::_Node_const_iterator<std::pair<std::string const,std::vector<AIRREntity>>,false,true>::operator++(&v27);
}
std::operator<<<std::char_traits<char>>(v32, "query\tmatch");
if ( (v30 & 1) != 0 )
std::operator<<<std::char_traits<char>>(v32, "\tv_gene");
if ( (v29 & 1) != 0 )
std::operator<<<std::char_traits<char>>(v32, "\tj_gene");
std::operator<<<std::char_traits<char>>(v32, 10LL);
v18 = v33;
v17 = std::unordered_map<std::string,std::vector<AIRREntity>>::begin(v33);
v16 = std::unordered_map<std::string,std::vector<AIRREntity>>::end(v18);
while ( (std::__detail::operator!=(&v17, &v16) & 1) != 0 )
{
v15 = std::__detail::_Node_const_iterator<std::pair<std::string const,std::vector<AIRREntity>>,false,true>::operator*(&v17);
v14 = std::get<0ul,std::string const,std::vector<AIRREntity>>(v15);
v13 = std::get<1ul,std::string const,std::vector<AIRREntity>>(v15);
v12 = v13;
v11 = std::vector<AIRREntity>::begin(v13);
v10 = std::vector<AIRREntity>::end(v12);
while ( __gnu_cxx::operator!=<AIRREntity const*,std::vector<AIRREntity>>((long long)&v11, (long long)&v10) )
{
v9 = __gnu_cxx::__normal_iterator<AIRREntity const*,std::vector<AIRREntity>>::operator*((long long)&v11);
v6 = std::operator<<<char>(v32, v14);
v5 = std::operator<<<std::char_traits<char>>(v6, 9LL);
std::operator<<<char>(v5, v9);
if ( (v30 & 1) != 0 )
{
v4 = std::operator<<<std::char_traits<char>>(v32, 9LL);
std::operator<<<char>(v4, v9 + 32);
}
if ( (v29 & 1) != 0 )
{
v3 = std::operator<<<std::char_traits<char>>(v32, 9LL);
std::operator<<<char>(v3, v9 + 64);
}
std::operator<<<std::char_traits<char>>(v32, 10LL);
__gnu_cxx::__normal_iterator<AIRREntity const*,std::vector<AIRREntity>>::operator++(&v11);
}
std::__detail::_Node_const_iterator<std::pair<std::string const,std::vector<AIRREntity>>,false,true>::operator++(&v17);
}
v31 = 0;
}
else
{
v8 = std::operator<<<std::char_traits<char>>(&std::cerr, "Error: Unable to write to ");
v7 = std::operator<<<char>(v8, v34);
std::ostream::operator<<(v7, &std::endl<char,std::char_traits<char>>);
v31 = 1;
}
return std::ofstream::~ofstream(v32);
}
| WriteResults:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x310
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RSI,qword ptr [RBP + -0x8]
LEA RDI,[RBP + -0x210]
MOV qword ptr [RBP + -0x2d8],RDI
MOV EDX,0x10
CALL 0x00109b00
MOV RDI,qword ptr [RBP + -0x2d8]
LAB_0016a896:
CALL 0x001094a0
MOV byte ptr [RBP + -0x2c9],AL
JMP 0x0016a8a3
LAB_0016a8a3:
MOV AL,byte ptr [RBP + -0x2c9]
TEST AL,0x1
JNZ 0x0016a92b
JMP 0x0016a8af
LAB_0016a8af:
MOV RDI,qword ptr [0x001a1ff0]
LEA RSI,[0x17216d]
CALL 0x001095e0
MOV qword ptr [RBP + -0x2e0],RAX
JMP 0x0016a8cb
LAB_0016a8cb:
MOV RDI,qword ptr [RBP + -0x2e0]
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x00109550
MOV qword ptr [RBP + -0x2e8],RAX
JMP 0x0016a8e4
LAB_0016a8e4:
MOV RDI,qword ptr [RBP + -0x2e8]
MOV RSI,qword ptr [0x001a1f58]
CALL 0x00109660
JMP 0x0016a8f9
LAB_0016a8f9:
MOV dword ptr [RBP + -0x220],0x1
JMP 0x0016acfe
LAB_0016a92b:
MOV byte ptr [RBP + -0x221],0x0
MOV byte ptr [RBP + -0x222],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x230],RAX
MOV RDI,qword ptr [RBP + -0x230]
CALL 0x0016b160
MOV qword ptr [RBP + -0x238],RAX
MOV RDI,qword ptr [RBP + -0x230]
CALL 0x0016b190
MOV qword ptr [RBP + -0x240],RAX
LAB_0016a96a:
LEA RDI,[RBP + -0x238]
LEA RSI,[RBP + -0x240]
CALL 0x0016b1c0
TEST AL,0x1
JNZ 0x0016a986
JMP 0x0016aaa3
LAB_0016a986:
LEA RDI,[RBP + -0x238]
CALL 0x0016b1f0
MOV qword ptr [RBP + -0x248],RAX
MOV RDI,qword ptr [RBP + -0x248]
CALL 0x001656d0
MOV qword ptr [RBP + -0x250],RAX
MOV RDI,qword ptr [RBP + -0x248]
CALL 0x0016b220
MOV qword ptr [RBP + -0x258],RAX
MOV RAX,qword ptr [RBP + -0x258]
MOV qword ptr [RBP + -0x260],RAX
MOV RDI,qword ptr [RBP + -0x260]
CALL 0x0015f7d0
MOV qword ptr [RBP + -0x268],RAX
MOV RDI,qword ptr [RBP + -0x260]
CALL 0x0015f800
MOV qword ptr [RBP + -0x270],RAX
LAB_0016a9f3:
LEA RDI,[RBP + -0x268]
LEA RSI,[RBP + -0x270]
CALL 0x0015fac0
TEST AL,0x1
JNZ 0x0016aa0c
JMP 0x0016aa7c
LAB_0016aa0c:
LEA RDI,[RBP + -0x268]
CALL 0x0015fb30
MOV qword ptr [RBP + -0x278],RAX
MOV RDI,qword ptr [RBP + -0x278]
ADD RDI,0x20
CALL 0x001099c0
TEST AL,0x1
JNZ 0x0016aa3a
MOV byte ptr [RBP + -0x221],0x1
LAB_0016aa3a:
MOV RDI,qword ptr [RBP + -0x278]
ADD RDI,0x40
CALL 0x001099c0
TEST AL,0x1
JNZ 0x0016aa55
MOV byte ptr [RBP + -0x222],0x1
LAB_0016aa55:
TEST byte ptr [RBP + -0x221],0x1
JZ 0x0016aa69
TEST byte ptr [RBP + -0x222],0x1
JZ 0x0016aa69
JMP 0x0016aa7c
LAB_0016aa69:
JMP 0x0016aa6b
LAB_0016aa6b:
LEA RDI,[RBP + -0x268]
CALL 0x0015fb50
JMP 0x0016a9f3
LAB_0016aa7c:
TEST byte ptr [RBP + -0x221],0x1
JZ 0x0016aa90
TEST byte ptr [RBP + -0x222],0x1
JZ 0x0016aa90
JMP 0x0016aaa3
LAB_0016aa90:
JMP 0x0016aa92
LAB_0016aa92:
LEA RDI,[RBP + -0x238]
CALL 0x0016b240
JMP 0x0016a96a
LAB_0016aaa3:
LEA RSI,[0x172188]
LEA RDI,[RBP + -0x210]
CALL 0x001095e0
JMP 0x0016aab8
LAB_0016aab8:
TEST byte ptr [RBP + -0x221],0x1
JZ 0x0016aad8
LEA RSI,[0x172194]
LEA RDI,[RBP + -0x210]
CALL 0x001095e0
JMP 0x0016aad6
LAB_0016aad6:
JMP 0x0016aad8
LAB_0016aad8:
TEST byte ptr [RBP + -0x222],0x1
JZ 0x0016aaf8
LEA RSI,[0x17219c]
LEA RDI,[RBP + -0x210]
CALL 0x001095e0
JMP 0x0016aaf6
LAB_0016aaf6:
JMP 0x0016aaf8
LAB_0016aaf8:
LEA RDI,[RBP + -0x210]
MOV ESI,0xa
CALL 0x00109750
JMP 0x0016ab0b
LAB_0016ab0b:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x280],RAX
MOV RDI,qword ptr [RBP + -0x280]
CALL 0x0016b160
MOV qword ptr [RBP + -0x288],RAX
MOV RDI,qword ptr [RBP + -0x280]
CALL 0x0016b190
MOV qword ptr [RBP + -0x290],RAX
LAB_0016ab3c:
LEA RDI,[RBP + -0x288]
LEA RSI,[RBP + -0x290]
CALL 0x0016b1c0
TEST AL,0x1
JNZ 0x0016ab58
JMP 0x0016acf4
LAB_0016ab58:
LEA RDI,[RBP + -0x288]
CALL 0x0016b1f0
MOV qword ptr [RBP + -0x298],RAX
MOV RDI,qword ptr [RBP + -0x298]
CALL 0x001656d0
MOV qword ptr [RBP + -0x2a0],RAX
MOV RDI,qword ptr [RBP + -0x298]
CALL 0x0016b220
MOV qword ptr [RBP + -0x2a8],RAX
MOV RAX,qword ptr [RBP + -0x2a8]
MOV qword ptr [RBP + -0x2b0],RAX
MOV RDI,qword ptr [RBP + -0x2b0]
CALL 0x0015f7d0
MOV qword ptr [RBP + -0x2b8],RAX
MOV RDI,qword ptr [RBP + -0x2b0]
CALL 0x0015f800
MOV qword ptr [RBP + -0x2c0],RAX
LAB_0016abc5:
LEA RDI,[RBP + -0x2b8]
LEA RSI,[RBP + -0x2c0]
CALL 0x0015fac0
TEST AL,0x1
JNZ 0x0016abe1
JMP 0x0016ace1
LAB_0016abe1:
LEA RDI,[RBP + -0x2b8]
CALL 0x0015fb30
MOV qword ptr [RBP + -0x2c8],RAX
MOV RSI,qword ptr [RBP + -0x2a0]
LEA RDI,[RBP + -0x210]
CALL 0x00109550
MOV qword ptr [RBP + -0x2f0],RAX
JMP 0x0016ac10
LAB_0016ac10:
MOV RDI,qword ptr [RBP + -0x2f0]
MOV ESI,0x9
CALL 0x00109750
MOV qword ptr [RBP + -0x2f8],RAX
JMP 0x0016ac2a
LAB_0016ac2a:
MOV RDI,qword ptr [RBP + -0x2f8]
MOV RSI,qword ptr [RBP + -0x2c8]
CALL 0x00109550
JMP 0x0016ac3f
LAB_0016ac3f:
TEST byte ptr [RBP + -0x221],0x1
JZ 0x0016ac7d
LEA RDI,[RBP + -0x210]
MOV ESI,0x9
CALL 0x00109750
MOV qword ptr [RBP + -0x300],RAX
JMP 0x0016ac62
LAB_0016ac62:
MOV RDI,qword ptr [RBP + -0x300]
MOV RSI,qword ptr [RBP + -0x2c8]
ADD RSI,0x20
CALL 0x00109550
JMP 0x0016ac7b
LAB_0016ac7b:
JMP 0x0016ac7d
LAB_0016ac7d:
TEST byte ptr [RBP + -0x222],0x1
JZ 0x0016acbb
LEA RDI,[RBP + -0x210]
MOV ESI,0x9
CALL 0x00109750
MOV qword ptr [RBP + -0x308],RAX
JMP 0x0016aca0
LAB_0016aca0:
MOV RDI,qword ptr [RBP + -0x308]
MOV RSI,qword ptr [RBP + -0x2c8]
ADD RSI,0x40
CALL 0x00109550
JMP 0x0016acb9
LAB_0016acb9:
JMP 0x0016acbb
LAB_0016acbb:
LEA RDI,[RBP + -0x210]
MOV ESI,0xa
CALL 0x00109750
LAB_0016accc:
JMP 0x0016acce
LAB_0016acce:
JMP 0x0016acd0
LAB_0016acd0:
LEA RDI,[RBP + -0x2b8]
CALL 0x0015fb50
JMP 0x0016abc5
LAB_0016ace1:
JMP 0x0016ace3
LAB_0016ace3:
LEA RDI,[RBP + -0x288]
CALL 0x0016b240
JMP 0x0016ab3c
LAB_0016acf4:
MOV dword ptr [RBP + -0x220],0x0
LAB_0016acfe:
LEA RDI,[RBP + -0x210]
CALL 0x00109900
ADD RSP,0x310
POP RBP
RET
|
/* WriteResults(std::__cxx11::string const&, std::unordered_map<std::__cxx11::string,
std::vector<AIRREntity, std::allocator<AIRREntity> >, std::hash<std::__cxx11::string >,
std::equal_to<std::__cxx11::string >, std::allocator<std::pair<std::__cxx11::string const,
std::vector<AIRREntity, std::allocator<AIRREntity> > > > > const&) */
void WriteResults(string *param_1,unordered_map *param_2)
{
byte bVar1;
bool bVar2;
ostream *poVar3;
ulong uVar4;
string *psVar5;
int8 local_2c8;
int8 local_2c0;
vector<AIRREntity,std::allocator<AIRREntity>> *local_2b8;
type *local_2b0;
type *local_2a8;
pair *local_2a0;
int8 local_298;
int8 local_290;
unordered_map<std::__cxx11::string,std::vector<AIRREntity,std::allocator<AIRREntity>>,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::vector<AIRREntity,std::allocator<AIRREntity>>>>>
*local_288;
int8 local_280;
int8 local_278;
int8 local_270;
vector<AIRREntity,std::allocator<AIRREntity>> *local_268;
type *local_260;
type *local_258;
pair *local_250;
int8 local_248;
int8 local_240;
unordered_map<std::__cxx11::string,std::vector<AIRREntity,std::allocator<AIRREntity>>,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::vector<AIRREntity,std::allocator<AIRREntity>>>>>
*local_238;
byte local_22a;
byte local_229;
int4 local_228;
ofstream local_218 [512];
unordered_map *local_18;
string *local_10;
local_18 = param_2;
local_10 = param_1;
std::ofstream::ofstream(local_218,param_1,0x10);
/* try { // try from 0016a896 to 0016accb has its CatchHandler @ 0016a908 */
bVar1 = std::ofstream::is_open();
if ((bVar1 & 1) == 0) {
poVar3 = std::operator<<((ostream *)PTR_cerr_001a1ff0,"Error: Unable to write to ");
poVar3 = std::operator<<(poVar3,local_10);
std::ostream::operator<<
(poVar3,(_func_ostream_ptr_ostream_ptr *)PTR_endl<char,std_char_traits<char>>_001a1f58
);
local_228 = 1;
}
else {
local_229 = 0;
local_22a = 0;
local_238 = (unordered_map<std::__cxx11::string,std::vector<AIRREntity,std::allocator<AIRREntity>>,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::vector<AIRREntity,std::allocator<AIRREntity>>>>>
*)local_18;
local_240 = std::
unordered_map<std::__cxx11::string,std::vector<AIRREntity,std::allocator<AIRREntity>>,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::vector<AIRREntity,std::allocator<AIRREntity>>>>>
::begin((unordered_map<std::__cxx11::string,std::vector<AIRREntity,std::allocator<AIRREntity>>,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::vector<AIRREntity,std::allocator<AIRREntity>>>>>
*)local_18);
local_248 = std::
unordered_map<std::__cxx11::string,std::vector<AIRREntity,std::allocator<AIRREntity>>,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::vector<AIRREntity,std::allocator<AIRREntity>>>>>
::end();
while (uVar4 = std::__detail::operator!=
((_Node_iterator_base *)&local_240,(_Node_iterator_base *)&local_248),
(uVar4 & 1) != 0) {
local_250 = (pair *)std::__detail::
_Node_const_iterator<std::pair<std::__cxx11::string_const,std::vector<AIRREntity,std::allocator<AIRREntity>>>,false,true>
::operator*((_Node_const_iterator<std::pair<std::__cxx11::string_const,std::vector<AIRREntity,std::allocator<AIRREntity>>>,false,true>
*)&local_240);
local_258 = std::
get<0ul,std::__cxx11::string_const,std::vector<AIRREntity,std::allocator<AIRREntity>>>
(local_250);
local_268 = (vector<AIRREntity,std::allocator<AIRREntity>> *)
std::
get<1ul,std::__cxx11::string_const,std::vector<AIRREntity,std::allocator<AIRREntity>>>
(local_250);
local_260 = (type *)local_268;
local_270 = std::vector<AIRREntity,std::allocator<AIRREntity>>::begin(local_268);
local_278 = std::vector<AIRREntity,std::allocator<AIRREntity>>::end(local_268);
while (bVar2 = __gnu_cxx::operator!=
((__normal_iterator *)&local_270,(__normal_iterator *)&local_278),
bVar2) {
local_280 = __gnu_cxx::
__normal_iterator<AIRREntity_const*,std::vector<AIRREntity,std::allocator<AIRREntity>>>
::operator*((__normal_iterator<AIRREntity_const*,std::vector<AIRREntity,std::allocator<AIRREntity>>>
*)&local_270);
uVar4 = std::__cxx11::string::empty();
if ((uVar4 & 1) == 0) {
local_229 = 1;
}
uVar4 = std::__cxx11::string::empty();
if ((uVar4 & 1) == 0) {
local_22a = 1;
}
if (((local_229 & 1) != 0) && ((local_22a & 1) != 0)) break;
__gnu_cxx::
__normal_iterator<AIRREntity_const*,std::vector<AIRREntity,std::allocator<AIRREntity>>>::
operator++((__normal_iterator<AIRREntity_const*,std::vector<AIRREntity,std::allocator<AIRREntity>>>
*)&local_270);
}
if (((local_229 & 1) != 0) && ((local_22a & 1) != 0)) break;
std::__detail::
_Node_const_iterator<std::pair<std::__cxx11::string_const,std::vector<AIRREntity,std::allocator<AIRREntity>>>,false,true>
::operator++((_Node_const_iterator<std::pair<std::__cxx11::string_const,std::vector<AIRREntity,std::allocator<AIRREntity>>>,false,true>
*)&local_240);
}
std::operator<<((ostream *)local_218,"query\tmatch");
if ((local_229 & 1) != 0) {
std::operator<<((ostream *)local_218,"\tv_gene");
}
if ((local_22a & 1) != 0) {
std::operator<<((ostream *)local_218,"\tj_gene");
}
std::operator<<((ostream *)local_218,'\n');
local_288 = (unordered_map<std::__cxx11::string,std::vector<AIRREntity,std::allocator<AIRREntity>>,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::vector<AIRREntity,std::allocator<AIRREntity>>>>>
*)local_18;
local_290 = std::
unordered_map<std::__cxx11::string,std::vector<AIRREntity,std::allocator<AIRREntity>>,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::vector<AIRREntity,std::allocator<AIRREntity>>>>>
::begin((unordered_map<std::__cxx11::string,std::vector<AIRREntity,std::allocator<AIRREntity>>,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::vector<AIRREntity,std::allocator<AIRREntity>>>>>
*)local_18);
local_298 = std::
unordered_map<std::__cxx11::string,std::vector<AIRREntity,std::allocator<AIRREntity>>,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::vector<AIRREntity,std::allocator<AIRREntity>>>>>
::end();
while (uVar4 = std::__detail::operator!=
((_Node_iterator_base *)&local_290,(_Node_iterator_base *)&local_298),
(uVar4 & 1) != 0) {
local_2a0 = (pair *)std::__detail::
_Node_const_iterator<std::pair<std::__cxx11::string_const,std::vector<AIRREntity,std::allocator<AIRREntity>>>,false,true>
::operator*((_Node_const_iterator<std::pair<std::__cxx11::string_const,std::vector<AIRREntity,std::allocator<AIRREntity>>>,false,true>
*)&local_290);
local_2a8 = std::
get<0ul,std::__cxx11::string_const,std::vector<AIRREntity,std::allocator<AIRREntity>>>
(local_2a0);
local_2b8 = (vector<AIRREntity,std::allocator<AIRREntity>> *)
std::
get<1ul,std::__cxx11::string_const,std::vector<AIRREntity,std::allocator<AIRREntity>>>
(local_2a0);
local_2b0 = (type *)local_2b8;
local_2c0 = std::vector<AIRREntity,std::allocator<AIRREntity>>::begin(local_2b8);
local_2c8 = std::vector<AIRREntity,std::allocator<AIRREntity>>::end(local_2b8);
while (bVar2 = __gnu_cxx::operator!=
((__normal_iterator *)&local_2c0,(__normal_iterator *)&local_2c8),
bVar2) {
psVar5 = (string *)
__gnu_cxx::
__normal_iterator<AIRREntity_const*,std::vector<AIRREntity,std::allocator<AIRREntity>>>
::operator*((__normal_iterator<AIRREntity_const*,std::vector<AIRREntity,std::allocator<AIRREntity>>>
*)&local_2c0);
poVar3 = std::operator<<((ostream *)local_218,(string *)local_2a8);
poVar3 = std::operator<<(poVar3,'\t');
std::operator<<(poVar3,psVar5);
if ((local_229 & 1) != 0) {
poVar3 = std::operator<<((ostream *)local_218,'\t');
std::operator<<(poVar3,psVar5 + 0x20);
}
if ((local_22a & 1) != 0) {
poVar3 = std::operator<<((ostream *)local_218,'\t');
std::operator<<(poVar3,psVar5 + 0x40);
}
std::operator<<((ostream *)local_218,'\n');
__gnu_cxx::
__normal_iterator<AIRREntity_const*,std::vector<AIRREntity,std::allocator<AIRREntity>>>::
operator++((__normal_iterator<AIRREntity_const*,std::vector<AIRREntity,std::allocator<AIRREntity>>>
*)&local_2c0);
}
std::__detail::
_Node_const_iterator<std::pair<std::__cxx11::string_const,std::vector<AIRREntity,std::allocator<AIRREntity>>>,false,true>
::operator++((_Node_const_iterator<std::pair<std::__cxx11::string_const,std::vector<AIRREntity,std::allocator<AIRREntity>>>,false,true>
*)&local_290);
}
local_228 = 0;
}
std::ofstream::~ofstream(local_218);
return;
}
| |
43,835 | WriteResults(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<AIRREntity, std::allocator<AIRREntity>>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::vector<AIRREntity, std::allocator<AIRREntity>>>>> const&) | MikePodsytnik[P]TCRtrie/src/TrieInterface.cpp | static void WriteResults(const std::string& outPath, const std::unordered_map<std::string, std::vector<AIRREntity>>& results) {
std::ofstream outFile(outPath);
if (!outFile.is_open()) {
std::cerr << "Error: Unable to write to " << outPath << std::endl;
return;
}
bool hasVGene = false, hasJGene = false;
for (const auto& [_, matches] : results) {
for (const auto& m : matches) {
if (!m.vGene.empty()) hasVGene = true;
if (!m.jGene.empty()) hasJGene = true;
if (hasVGene && hasJGene) break;
}
if (hasVGene && hasJGene) break;
}
outFile << "query\tmatch";
if (hasVGene) outFile << "\tv_gene";
if (hasJGene) outFile << "\tj_gene";
outFile << '\n';
for (const auto& [query, matches] : results) {
for (const auto& match : matches) {
outFile << query << '\t' << match.junctionAA;
if (hasVGene) outFile << '\t' << match.vGene;
if (hasJGene) outFile << '\t' << match.jGene;
outFile << '\n';
}
}
} | O1 | cpp | WriteResults(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<AIRREntity, std::allocator<AIRREntity>>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::vector<AIRREntity, std::allocator<AIRREntity>>>>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp # imm = 0x218
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
movl $0x10, %edx
callq 0x77f0
leaq 0x88(%rsp), %rdi
callq 0x70e0
testb %al, %al
je 0x3548c
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x354e6
xorl %ebp, %ebp
movl $0x1, %ecx
xorl %r15d, %r15d
movq 0x28(%rax), %rdx
movq 0x30(%rax), %rsi
cmpq %rsi, %rdx
je 0x35476
cmpq $0x0, 0x28(%rdx)
movzbl %bpl, %ebp
cmovnel %ecx, %ebp
cmpq $0x0, 0x48(%rdx)
movzbl %r15b, %r15d
cmovnel %ecx, %r15d
testb $0x1, %bpl
je 0x35470
testb $0x1, %r15b
jne 0x35476
addq $0x60, %rdx
jmp 0x35446
testb $0x1, %bpl
je 0x35482
testb $0x1, %r15b
jne 0x354eb
movq (%rax), %rax
testq %rax, %rax
jne 0x3543e
jmp 0x354eb
movq 0x14b5d(%rip), %rdi # 0x49ff0
leaq 0x49eb(%rip), %rsi # 0x39e85
movl $0x1a, %edx
callq 0x74b0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0x14b3e(%rip), %rdi # 0x49ff0
callq 0x74b0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x7400
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7030
movq %rax, %rdi
callq 0x72c0
jmp 0x3564b
xorl %r15d, %r15d
xorl %ebp, %ebp
leaq 0x49ae(%rip), %rsi # 0x39ea0
leaq 0x18(%rsp), %rdi
movl $0xb, %edx
callq 0x74b0
testb $0x1, %bpl
je 0x3551d
leaq 0x499e(%rip), %rsi # 0x39eac
leaq 0x18(%rsp), %rdi
movl $0x7, %edx
callq 0x74b0
testb $0x1, %r15b
je 0x35539
leaq 0x498a(%rip), %rsi # 0x39eb4
leaq 0x18(%rsp), %rdi
movl $0x7, %edx
callq 0x74b0
leaq 0xf(%rsp), %rsi
movb $0xa, (%rsi)
leaq 0x18(%rsp), %rdi
movl $0x1, %edx
callq 0x74b0
movq 0x10(%rbx), %r12
testq %r12, %r12
je 0x3564b
leaq 0xf(%rsp), %r14
movq 0x28(%r12), %r13
movq 0x30(%r12), %rax
movq %rax, 0x10(%rsp)
cmpq %rax, %r13
je 0x3563e
addq $0x48, %r13
movq 0x8(%r12), %rsi
movq 0x10(%r12), %rdx
leaq 0x18(%rsp), %rdi
callq 0x74b0
movb $0x9, 0xf(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x74b0
leaq -0x48(%r13), %rbx
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %rax, %rdi
callq 0x74b0
testb $0x1, %bpl
je 0x355e7
movb $0x9, 0xf(%rsp)
movl $0x1, %edx
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x74b0
movq -0x28(%r13), %rsi
movq -0x20(%r13), %rdx
movq %rax, %rdi
callq 0x74b0
testb $0x1, %r15b
je 0x35614
movb $0x9, 0xf(%rsp)
movl $0x1, %edx
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x74b0
movq -0x8(%r13), %rsi
movq (%r13), %rdx
movq %rax, %rdi
callq 0x74b0
movb $0xa, 0xf(%rsp)
movl $0x1, %edx
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x74b0
addq $0x60, %r13
addq $0x60, %rbx
cmpq 0x10(%rsp), %rbx
jne 0x3557e
movq (%r12), %r12
testq %r12, %r12
jne 0x35562
movq 0x14926(%rip), %rax # 0x49f78
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x20(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x18(%rsp,%rcx)
callq 0x7370
leaq 0x110(%rsp), %rdi
callq 0x7150
addq $0x218, %rsp # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x35693
jmp 0x35693
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x7610
movq %rbx, %rdi
callq 0x7780
| _ZL12WriteResultsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt13unordered_mapIS4_St6vectorI10AIRREntitySaIS9_EESt4hashIS4_ESt8equal_toIS4_ESaISt4pairIS5_SB_EEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 218h
mov rbx, rsi
mov r14, rdi
lea rdi, [rsp+248h+var_230]
mov rsi, r14
mov edx, 10h
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ofstream::basic_ofstream(std::string const&,std::_Ios_Openmode)
lea rdi, [rsp+248h+var_1C0]
call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void)
test al, al
jz short loc_3548C
mov rax, [rbx+10h]
test rax, rax
jz loc_354E6
xor ebp, ebp
mov ecx, 1
xor r15d, r15d
loc_3543E:
mov rdx, [rax+28h]
mov rsi, [rax+30h]
loc_35446:
cmp rdx, rsi
jz short loc_35476
cmp qword ptr [rdx+28h], 0
movzx ebp, bpl
cmovnz ebp, ecx
cmp qword ptr [rdx+48h], 0
movzx r15d, r15b
cmovnz r15d, ecx
test bpl, 1
jz short loc_35470
test r15b, 1
jnz short loc_35476
loc_35470:
add rdx, 60h ; '`'
jmp short loc_35446
loc_35476:
test bpl, 1
jz short loc_35482
test r15b, 1
jnz short loc_354EB
loc_35482:
mov rax, [rax]
test rax, rax
jnz short loc_3543E
jmp short loc_354EB
loc_3548C:
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, aErrorUnableToW; "Error: Unable to write to "
mov edx, 1Ah
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [r14]
mov rdx, [r14+8]
mov rdi, cs:_ZSt4cerr_ptr
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rbx, rax
mov rax, [rax]
mov rdi, [rax-18h]
add rdi, rbx
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, rbx; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
jmp loc_3564B
loc_354E6:
xor r15d, r15d
xor ebp, ebp
loc_354EB:
lea rsi, aQueryMatch; "query\tmatch"
lea rdi, [rsp+248h+var_230]
mov edx, 0Bh
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
test bpl, 1
jz short loc_3551D
lea rsi, aVGene_0; "\tv_gene"
lea rdi, [rsp+248h+var_230]
mov edx, 7
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_3551D:
test r15b, 1
jz short loc_35539
lea rsi, aJGene_0; "\tj_gene"
lea rdi, [rsp+248h+var_230]
mov edx, 7
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_35539:
lea rsi, [rsp+248h+var_239]
mov byte ptr [rsi], 0Ah
lea rdi, [rsp+248h+var_230]
mov edx, 1
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r12, [rbx+10h]
test r12, r12
jz loc_3564B
lea r14, [rsp+248h+var_239]
loc_35562:
mov r13, [r12+28h]
mov rax, [r12+30h]
mov [rsp+248h+var_238], rax
cmp r13, rax
jz loc_3563E
add r13, 48h ; 'H'
loc_3557E:
mov rsi, [r12+8]
mov rdx, [r12+10h]
lea rdi, [rsp+248h+var_230]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov [rsp+248h+var_239], 9
mov edx, 1
mov rdi, rax
mov rsi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rbx, [r13-48h]
mov rsi, [rbx]
mov rdx, [rbx+8]
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)
test bpl, 1
jz short loc_355E7
mov [rsp+248h+var_239], 9
mov edx, 1
lea rdi, [rsp+248h+var_230]
mov rsi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [r13-28h]
mov rdx, [r13-20h]
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_355E7:
test r15b, 1
jz short loc_35614
mov [rsp+248h+var_239], 9
mov edx, 1
lea rdi, [rsp+248h+var_230]
mov rsi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [r13-8]
mov rdx, [r13+0]
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_35614:
mov [rsp+248h+var_239], 0Ah
mov edx, 1
lea rdi, [rsp+248h+var_230]
mov rsi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
add r13, 60h ; '`'
add rbx, 60h ; '`'
cmp rbx, [rsp+248h+var_238]
jnz loc_3557E
loc_3563E:
mov r12, [r12]
test r12, r12
jnz loc_35562
loc_3564B:
mov rax, cs:_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE_ptr
mov rcx, [rax]
mov rax, [rax+18h]
lea rdi, [rsp+248h+var_228]
mov [rdi-8], rcx
mov rcx, [rcx-18h]
mov [rsp+rcx+248h+var_230], rax
call __ZNSt13basic_filebufIcSt11char_traitsIcEED2Ev; std::filebuf::~filebuf()
lea rdi, [rsp+248h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
add rsp, 218h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_35693
jmp short $+2
loc_35693:
mov rbx, rax
lea rdi, [rsp+arg_10]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream()
mov rdi, rbx
call __Unwind_Resume
| void WriteResults(_QWORD *a1, long long a2)
{
_QWORD *v2; // rax
char v3; // bp
char v4; // r15
long long i; // rdx
std::ostream *v6; // rbx
char v7; // al
std::ostream *v8; // rax
_QWORD *j; // r12
_QWORD *v10; // r13
_QWORD *v11; // r13
long long v12; // rax
long long v13; // rax
_QWORD *v14; // rbx
long long v15; // rax
long long v16; // rax
long long v17; // rax
char v18; // [rsp+Fh] [rbp-239h] BYREF
_QWORD *v19; // [rsp+10h] [rbp-238h]
long long v20; // [rsp+18h] [rbp-230h] BYREF
char v21[136]; // [rsp+88h] [rbp-1C0h] BYREF
char v22[312]; // [rsp+110h] [rbp-138h] BYREF
std::ofstream::basic_ofstream(&v20, a1, 16LL);
if ( (unsigned __int8)std::__basic_file<char>::is_open(v21) )
{
v2 = *(_QWORD **)(a2 + 16);
if ( v2 )
{
v3 = 0;
v4 = 0;
do
{
for ( i = v2[5]; i != v2[6]; i += 96LL )
{
if ( *(_QWORD *)(i + 40) )
v3 = 1;
if ( *(_QWORD *)(i + 72) )
v4 = 1;
if ( (v3 & 1) != 0 && (v4 & 1) != 0 )
break;
}
if ( (v3 & 1) != 0 && (v4 & 1) != 0 )
break;
v2 = (_QWORD *)*v2;
}
while ( v2 );
}
else
{
v4 = 0;
v3 = 0;
}
std::__ostream_insert<char,std::char_traits<char>>(&v20, "query\tmatch", 11LL);
if ( (v3 & 1) != 0 )
std::__ostream_insert<char,std::char_traits<char>>(&v20, "\tv_gene", 7LL);
if ( (v4 & 1) != 0 )
std::__ostream_insert<char,std::char_traits<char>>(&v20, "\tj_gene", 7LL);
v18 = 10;
std::__ostream_insert<char,std::char_traits<char>>(&v20, &v18, 1LL);
for ( j = *(_QWORD **)(a2 + 16); j; j = (_QWORD *)*j )
{
v10 = (_QWORD *)j[5];
v19 = (_QWORD *)j[6];
if ( v10 != v19 )
{
v11 = v10 + 9;
do
{
v12 = std::__ostream_insert<char,std::char_traits<char>>(&v20, j[1], j[2]);
v18 = 9;
v13 = std::__ostream_insert<char,std::char_traits<char>>(v12, &v18, 1LL);
v14 = v11 - 9;
std::__ostream_insert<char,std::char_traits<char>>(v13, *(v11 - 9), *(v11 - 8));
if ( (v3 & 1) != 0 )
{
v18 = 9;
v15 = std::__ostream_insert<char,std::char_traits<char>>(&v20, &v18, 1LL);
std::__ostream_insert<char,std::char_traits<char>>(v15, *(v11 - 5), *(v11 - 4));
}
if ( (v4 & 1) != 0 )
{
v18 = 9;
v16 = std::__ostream_insert<char,std::char_traits<char>>(&v20, &v18, 1LL);
std::__ostream_insert<char,std::char_traits<char>>(v16, *(v11 - 1), *v11);
}
v18 = 10;
std::__ostream_insert<char,std::char_traits<char>>(&v20, &v18, 1LL);
v11 += 12;
}
while ( v14 + 12 != v19 );
}
}
}
else
{
std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, "Error: Unable to write to ", 26LL);
v6 = (std::ostream *)std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, *a1, a1[1]);
v7 = std::ios::widen((char *)v6 + *(_QWORD *)(*(_QWORD *)v6 - 24LL), 10LL);
v8 = (std::ostream *)std::ostream::put(v6, v7);
std::ostream::flush(v8);
}
v17 = `VTT for'std::ofstream[3];
v20 = `VTT for'std::ofstream[0];
*(_QWORD *)(v21 + *(_QWORD *)(`VTT for'std::ofstream[0] - 24LL) + 96) = v17;
std::filebuf::~filebuf();
std::ios_base::~ios_base((std::ios_base *)v22);
}
| WriteResults:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x218
MOV RBX,RSI
MOV R14,RDI
LEA RDI,[RSP + 0x18]
MOV RSI,R14
MOV EDX,0x10
CALL 0x001077f0
LEA RDI,[RSP + 0x88]
CALL 0x001070e0
TEST AL,AL
JZ 0x0013548c
MOV RAX,qword ptr [RBX + 0x10]
TEST RAX,RAX
JZ 0x001354e6
XOR EBP,EBP
MOV ECX,0x1
XOR R15D,R15D
LAB_0013543e:
MOV RDX,qword ptr [RAX + 0x28]
MOV RSI,qword ptr [RAX + 0x30]
LAB_00135446:
CMP RDX,RSI
JZ 0x00135476
CMP qword ptr [RDX + 0x28],0x0
MOVZX EBP,BPL
CMOVNZ EBP,ECX
CMP qword ptr [RDX + 0x48],0x0
MOVZX R15D,R15B
CMOVNZ R15D,ECX
TEST BPL,0x1
JZ 0x00135470
TEST R15B,0x1
JNZ 0x00135476
LAB_00135470:
ADD RDX,0x60
JMP 0x00135446
LAB_00135476:
TEST BPL,0x1
JZ 0x00135482
TEST R15B,0x1
JNZ 0x001354eb
LAB_00135482:
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JNZ 0x0013543e
JMP 0x001354eb
LAB_0013548c:
MOV RDI,qword ptr [0x00149ff0]
LEA RSI,[0x139e85]
MOV EDX,0x1a
CALL 0x001074b0
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
MOV RDI,qword ptr [0x00149ff0]
CALL 0x001074b0
MOV RBX,RAX
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,RBX
MOV ESI,0xa
CALL 0x00107400
MOVSX ESI,AL
MOV RDI,RBX
CALL 0x00107030
MOV RDI,RAX
CALL 0x001072c0
JMP 0x0013564b
LAB_001354e6:
XOR R15D,R15D
XOR EBP,EBP
LAB_001354eb:
LEA RSI,[0x139ea0]
LEA RDI,[RSP + 0x18]
MOV EDX,0xb
CALL 0x001074b0
TEST BPL,0x1
JZ 0x0013551d
LEA RSI,[0x139eac]
LEA RDI,[RSP + 0x18]
MOV EDX,0x7
CALL 0x001074b0
LAB_0013551d:
TEST R15B,0x1
JZ 0x00135539
LEA RSI,[0x139eb4]
LEA RDI,[RSP + 0x18]
MOV EDX,0x7
CALL 0x001074b0
LAB_00135539:
LEA RSI,[RSP + 0xf]
MOV byte ptr [RSI],0xa
LEA RDI,[RSP + 0x18]
MOV EDX,0x1
CALL 0x001074b0
MOV R12,qword ptr [RBX + 0x10]
TEST R12,R12
JZ 0x0013564b
LEA R14,[RSP + 0xf]
LAB_00135562:
MOV R13,qword ptr [R12 + 0x28]
MOV RAX,qword ptr [R12 + 0x30]
MOV qword ptr [RSP + 0x10],RAX
CMP R13,RAX
JZ 0x0013563e
ADD R13,0x48
LAB_0013557e:
MOV RSI,qword ptr [R12 + 0x8]
MOV RDX,qword ptr [R12 + 0x10]
LAB_00135588:
LEA RDI,[RSP + 0x18]
CALL 0x001074b0
MOV byte ptr [RSP + 0xf],0x9
MOV EDX,0x1
MOV RDI,RAX
MOV RSI,R14
CALL 0x001074b0
LEA RBX,[R13 + -0x48]
MOV RSI,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
MOV RDI,RAX
CALL 0x001074b0
TEST BPL,0x1
JZ 0x001355e7
MOV byte ptr [RSP + 0xf],0x9
MOV EDX,0x1
LEA RDI,[RSP + 0x18]
MOV RSI,R14
CALL 0x001074b0
MOV RSI,qword ptr [R13 + -0x28]
MOV RDX,qword ptr [R13 + -0x20]
MOV RDI,RAX
CALL 0x001074b0
LAB_001355e7:
TEST R15B,0x1
JZ 0x00135614
MOV byte ptr [RSP + 0xf],0x9
MOV EDX,0x1
LEA RDI,[RSP + 0x18]
MOV RSI,R14
CALL 0x001074b0
MOV RSI,qword ptr [R13 + -0x8]
MOV RDX,qword ptr [R13]
MOV RDI,RAX
CALL 0x001074b0
LAB_00135614:
MOV byte ptr [RSP + 0xf],0xa
MOV EDX,0x1
LEA RDI,[RSP + 0x18]
MOV RSI,R14
CALL 0x001074b0
LAB_0013562b:
ADD R13,0x60
ADD RBX,0x60
CMP RBX,qword ptr [RSP + 0x10]
JNZ 0x0013557e
LAB_0013563e:
MOV R12,qword ptr [R12]
TEST R12,R12
JNZ 0x00135562
LAB_0013564b:
MOV RAX,qword ptr [0x00149f78]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x18]
LEA RDI,[RSP + 0x20]
MOV qword ptr [RDI + -0x8],RCX
MOV RCX,qword ptr [RCX + -0x18]
MOV qword ptr [RSP + RCX*0x1 + 0x18],RAX
CALL 0x00107370
LEA RDI,[RSP + 0x110]
CALL 0x00107150
ADD RSP,0x218
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WriteResults(std::__cxx11::string const&, std::unordered_map<std::__cxx11::string,
std::vector<AIRREntity, std::allocator<AIRREntity> >, std::hash<std::__cxx11::string >,
std::equal_to<std::__cxx11::string >, std::allocator<std::pair<std::__cxx11::string const,
std::vector<AIRREntity, std::allocator<AIRREntity> > > > > const&) */
void WriteResults(string *param_1,unordered_map *param_2)
{
bool bVar1;
bool bVar2;
char cVar3;
long *plVar4;
ostream *poVar5;
long lVar6;
long *plVar7;
long *plVar8;
char local_239;
long *local_238;
long local_230;
filebuf local_228 [240];
ios_base local_138 [264];
std::ofstream::ofstream((ofstream *)&local_230,param_1,0x10);
cVar3 = std::__basic_file<char>::is_open();
if (cVar3 == '\0') {
/* try { // try from 0013548c to 001354e0 has its CatchHandler @ 00135691 */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_00149ff0,"Error: Unable to write to ",0x1a);
poVar5 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_00149ff0,*(char **)param_1,*(long *)(param_1 + 8));
std::ios::widen((char)*(int8 *)(*(long *)poVar5 + -0x18) + (char)poVar5);
std::ostream::put((char)poVar5);
std::ostream::flush();
}
else {
plVar4 = *(long **)(param_2 + 0x10);
if (plVar4 == (long *)0x0) {
bVar2 = false;
bVar1 = false;
}
else {
bVar1 = false;
bVar2 = false;
do {
for (lVar6 = plVar4[5]; lVar6 != plVar4[6]; lVar6 = lVar6 + 0x60) {
if (*(long *)(lVar6 + 0x28) != 0) {
bVar1 = true;
}
if (*(long *)(lVar6 + 0x48) != 0) {
bVar2 = true;
}
if ((bVar1) && (bVar2)) break;
}
} while (((!bVar1) || (!bVar2)) && (plVar4 = (long *)*plVar4, plVar4 != (long *)0x0));
}
/* try { // try from 001354eb to 0013554f has its CatchHandler @ 0013568f */
std::__ostream_insert<char,std::char_traits<char>>((ostream *)&local_230,"query\tmatch",0xb);
if (bVar1) {
std::__ostream_insert<char,std::char_traits<char>>((ostream *)&local_230,"\tv_gene",7);
}
if (bVar2) {
std::__ostream_insert<char,std::char_traits<char>>((ostream *)&local_230,"\tj_gene",7);
}
local_239 = '\n';
std::__ostream_insert<char,std::char_traits<char>>((ostream *)&local_230,&local_239,1);
plVar4 = *(long **)(param_2 + 0x10);
if (plVar4 != (long *)0x0) {
do {
local_238 = (long *)plVar4[6];
if ((long *)plVar4[5] != local_238) {
plVar8 = (long *)plVar4[5] + 9;
do {
/* try { // try from 00135588 to 0013562a has its CatchHandler @ 00135693 */
poVar5 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)&local_230,(char *)plVar4[1],plVar4[2]);
local_239 = '\t';
poVar5 = std::__ostream_insert<char,std::char_traits<char>>(poVar5,&local_239,1);
std::__ostream_insert<char,std::char_traits<char>>(poVar5,(char *)plVar8[-9],plVar8[-8])
;
if (bVar1) {
local_239 = '\t';
poVar5 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)&local_230,&local_239,1);
std::__ostream_insert<char,std::char_traits<char>>
(poVar5,(char *)plVar8[-5],plVar8[-4]);
}
if (bVar2) {
local_239 = '\t';
poVar5 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)&local_230,&local_239,1);
std::__ostream_insert<char,std::char_traits<char>>(poVar5,(char *)plVar8[-1],*plVar8);
}
local_239 = '\n';
std::__ostream_insert<char,std::char_traits<char>>((ostream *)&local_230,&local_239,1);
plVar7 = plVar8 + 3;
plVar8 = plVar8 + 0xc;
} while (plVar7 != local_238);
}
plVar4 = (long *)*plVar4;
} while (plVar4 != (long *)0x0);
}
}
local_230 = *(long *)PTR_VTT_00149f78;
*(int8 *)(local_228 + *(long *)(local_230 + -0x18) + -8) =
*(int8 *)(PTR_VTT_00149f78 + 0x18);
std::filebuf::~filebuf(local_228);
std::ios_base::~ios_base(local_138);
return;
}
| |
43,836 | WriteResults(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<AIRREntity, std::allocator<AIRREntity>>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::vector<AIRREntity, std::allocator<AIRREntity>>>>> const&) | MikePodsytnik[P]TCRtrie/src/TrieInterface.cpp | static void WriteResults(const std::string& outPath, const std::unordered_map<std::string, std::vector<AIRREntity>>& results) {
std::ofstream outFile(outPath);
if (!outFile.is_open()) {
std::cerr << "Error: Unable to write to " << outPath << std::endl;
return;
}
bool hasVGene = false, hasJGene = false;
for (const auto& [_, matches] : results) {
for (const auto& m : matches) {
if (!m.vGene.empty()) hasVGene = true;
if (!m.jGene.empty()) hasJGene = true;
if (hasVGene && hasJGene) break;
}
if (hasVGene && hasJGene) break;
}
outFile << "query\tmatch";
if (hasVGene) outFile << "\tv_gene";
if (hasJGene) outFile << "\tj_gene";
outFile << '\n';
for (const auto& [query, matches] : results) {
for (const auto& match : matches) {
outFile << query << '\t' << match.junctionAA;
if (hasVGene) outFile << '\t' << match.vGene;
if (hasJGene) outFile << '\t' << match.jGene;
outFile << '\n';
}
}
} | O2 | cpp | WriteResults(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<AIRREntity, std::allocator<AIRREntity>>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::vector<AIRREntity, std::allocator<AIRREntity>>>>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp # imm = 0x208
movq %rsi, %r15
movq %rdi, %r14
leaq 0x8(%rsp), %rdi
pushq $0x10
popq %rdx
movq %r14, %rsi
callq 0x77e0
leaq 0x78(%rsp), %rdi
callq 0x70f0
testb %al, %al
je 0x272b6
addq $0x10, %r15
xorl %ebx, %ebx
pushq $0x1
popq %rax
movq %r15, (%rsp)
movq %r15, %rcx
xorl %r15d, %r15d
movq (%rcx), %rcx
testq %rcx, %rcx
je 0x271d6
movq 0x28(%rcx), %rdx
movq 0x30(%rcx), %rsi
cmpq %rsi, %rdx
je 0x271cb
cmpq $0x0, 0x28(%rdx)
movzbl %r15b, %r15d
cmovnel %eax, %r15d
cmpq $0x0, 0x48(%rdx)
movzbl %bl, %ebx
cmovnel %eax, %ebx
testb $0x1, %r15b
je 0x271c5
testb $0x1, %bl
jne 0x271cb
addq $0x60, %rdx
jmp 0x2719d
testb $0x1, %r15b
je 0x2718d
testb $0x1, %bl
je 0x2718d
leaq 0x4ce3(%rip), %rsi # 0x2bec0
leaq 0x8(%rsp), %rdi
callq 0x7460
testb $0x1, %r15b
je 0x271fe
leaq 0x4cd8(%rip), %rsi # 0x2becc
leaq 0x8(%rsp), %rdi
callq 0x7460
testb $0x1, %bl
je 0x27214
leaq 0x4cca(%rip), %rsi # 0x2bed4
leaq 0x8(%rsp), %rdi
callq 0x7460
leaq 0x8(%rsp), %rdi
pushq $0xa
popq %rsi
callq 0x7510
leaq 0x8(%rsp), %r14
movq (%rsp), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x272dc
leaq 0x8(%rax), %r12
movq 0x28(%rax), %r13
movq %rax, (%rsp)
movq 0x30(%rax), %rbp
cmpq %rbp, %r13
je 0x27226
movq %r14, %rdi
movq %r12, %rsi
callq 0x7400
movq %rax, %rdi
pushq $0x9
popq %rsi
callq 0x7510
movq %rax, %rdi
movq %r13, %rsi
callq 0x7400
testb $0x1, %r15b
je 0x27289
movq %r14, %rdi
pushq $0x9
popq %rsi
callq 0x7510
leaq 0x20(%r13), %rsi
movq %rax, %rdi
callq 0x7400
testb $0x1, %bl
je 0x272a5
movq %r14, %rdi
pushq $0x9
popq %rsi
callq 0x7510
leaq 0x40(%r13), %rsi
movq %rax, %rdi
callq 0x7400
movq %r14, %rdi
pushq $0xa
popq %rsi
callq 0x7510
addq $0x60, %r13
jmp 0x27246
movq 0x18d33(%rip), %rdi # 0x3fff0
leaq 0x4be1(%rip), %rsi # 0x2bea5
callq 0x7460
movq %rax, %rdi
movq %r14, %rsi
callq 0x7400
movq %rax, %rdi
callq 0x7200
leaq 0x8(%rsp), %rdi
callq 0x7640
addq $0x208, %rsp # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x272fc
jmp 0x272fc
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x7640
movq %rbx, %rdi
callq 0x7770
nop
| _ZL12WriteResultsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt13unordered_mapIS4_St6vectorI10AIRREntitySaIS9_EESt4hashIS4_ESt8equal_toIS4_ESaISt4pairIS5_SB_EEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 208h
mov r15, rsi
mov r14, rdi
lea rdi, [rsp+238h+var_230]
push 10h
pop rdx
mov rsi, r14
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ofstream::basic_ofstream(std::string const&,std::_Ios_Openmode)
lea rdi, [rsp+238h+var_1C0]
call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void)
test al, al
jz loc_272B6
add r15, 10h
xor ebx, ebx
push 1
pop rax
mov [rsp+238h+var_238], r15
mov rcx, r15
xor r15d, r15d
loc_2718D:
mov rcx, [rcx]
test rcx, rcx
jz short loc_271D6
mov rdx, [rcx+28h]
mov rsi, [rcx+30h]
loc_2719D:
cmp rdx, rsi
jz short loc_271CB
cmp qword ptr [rdx+28h], 0
movzx r15d, r15b
cmovnz r15d, eax
cmp qword ptr [rdx+48h], 0
movzx ebx, bl
cmovnz ebx, eax
test r15b, 1
jz short loc_271C5
test bl, 1
jnz short loc_271CB
loc_271C5:
add rdx, 60h ; '`'
jmp short loc_2719D
loc_271CB:
test r15b, 1
jz short loc_2718D
test bl, 1
jz short loc_2718D
loc_271D6:
lea rsi, aQueryMatch; "query\tmatch"
lea rdi, [rsp+238h+var_230]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
test r15b, 1
jz short loc_271FE
lea rsi, aVGene_0; "\tv_gene"
lea rdi, [rsp+238h+var_230]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
loc_271FE:
test bl, 1
jz short loc_27214
lea rsi, aJGene_0; "\tj_gene"
lea rdi, [rsp+238h+var_230]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
loc_27214:
lea rdi, [rsp+238h+var_230]
push 0Ah
pop rsi
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
lea r14, [rsp+238h+var_230]
loc_27226:
mov rax, [rsp+238h+var_238]
mov rax, [rax]
test rax, rax
jz loc_272DC
lea r12, [rax+8]
mov r13, [rax+28h]
mov [rsp+238h+var_238], rax
mov rbp, [rax+30h]
loc_27246:
cmp r13, rbp
jz short loc_27226
mov rdi, r14
mov rsi, r12
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov rdi, rax
push 9
pop rsi
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
mov rdi, rax
mov rsi, r13
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
test r15b, 1
jz short loc_27289
mov rdi, r14
push 9
pop rsi
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
lea rsi, [r13+20h]
mov rdi, rax
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
loc_27289:
test bl, 1
jz short loc_272A5
mov rdi, r14
push 9
pop rsi
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
lea rsi, [r13+40h]
mov rdi, rax
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
loc_272A5:
mov rdi, r14
push 0Ah
pop rsi
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
add r13, 60h ; '`'
jmp short loc_27246
loc_272B6:
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, aErrorUnableToW; "Error: Unable to write to "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
mov rsi, r14
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov rdi, rax
call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &)
loc_272DC:
lea rdi, [rsp+238h+var_230]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream()
add rsp, 208h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_272FC
jmp short $+2
loc_272FC:
mov rbx, rax
lea rdi, [rsp+arg_0]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream()
mov rdi, rbx
call __Unwind_Resume
| long long WriteResults(long long a1, long long a2)
{
char v2; // bl
_QWORD *v3; // rcx
char v4; // r15
long long i; // rdx
_QWORD *v6; // rax
_QWORD *v7; // r12
long long v8; // r13
long long v9; // rbp
long long v10; // rax
long long v11; // rax
long long v12; // rax
long long v13; // rax
long long v14; // rax
long long v15; // rax
_QWORD *v17; // [rsp+0h] [rbp-238h]
_BYTE v18[112]; // [rsp+8h] [rbp-230h] BYREF
char v19[448]; // [rsp+78h] [rbp-1C0h] BYREF
std::ofstream::basic_ofstream(v18, a1, 16LL);
if ( (unsigned __int8)std::__basic_file<char>::is_open(v19) )
{
v2 = 0;
v17 = (_QWORD *)(a2 + 16);
v3 = (_QWORD *)(a2 + 16);
v4 = 0;
do
{
v3 = (_QWORD *)*v3;
if ( !v3 )
break;
for ( i = v3[5]; i != v3[6]; i += 96LL )
{
if ( *(_QWORD *)(i + 40) )
v4 = 1;
if ( *(_QWORD *)(i + 72) )
v2 = 1;
if ( (v4 & 1) != 0 && (v2 & 1) != 0 )
break;
}
}
while ( (v4 & 1) == 0 || (v2 & 1) == 0 );
std::operator<<<std::char_traits<char>>(v18, "query\tmatch");
if ( (v4 & 1) != 0 )
std::operator<<<std::char_traits<char>>(v18, "\tv_gene");
if ( (v2 & 1) != 0 )
std::operator<<<std::char_traits<char>>(v18, "\tj_gene");
std::operator<<<std::char_traits<char>>(v18, 10LL);
while ( 1 )
{
v6 = (_QWORD *)*v17;
if ( !*v17 )
break;
v7 = v6 + 1;
v8 = v6[5];
v17 = (_QWORD *)*v17;
v9 = v6[6];
while ( v8 != v9 )
{
v10 = std::operator<<<char>(v18, v7);
v11 = std::operator<<<std::char_traits<char>>(v10, 9LL);
std::operator<<<char>(v11, v8);
if ( (v4 & 1) != 0 )
{
v12 = std::operator<<<std::char_traits<char>>(v18, 9LL);
std::operator<<<char>(v12, v8 + 32);
}
if ( (v2 & 1) != 0 )
{
v13 = std::operator<<<std::char_traits<char>>(v18, 9LL);
std::operator<<<char>(v13, v8 + 64);
}
std::operator<<<std::char_traits<char>>(v18, 10LL);
v8 += 96LL;
}
}
}
else
{
v14 = std::operator<<<std::char_traits<char>>(&std::cerr, "Error: Unable to write to ");
v15 = std::operator<<<char>(v14, a1);
std::endl<char,std::char_traits<char>>(v15);
}
return std::ofstream::~ofstream(v18);
}
| WriteResults:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x208
MOV R15,RSI
MOV R14,RDI
LEA RDI,[RSP + 0x8]
PUSH 0x10
POP RDX
MOV RSI,R14
CALL 0x001077e0
LEA RDI,[RSP + 0x78]
CALL 0x001070f0
TEST AL,AL
JZ 0x001272b6
ADD R15,0x10
XOR EBX,EBX
PUSH 0x1
POP RAX
MOV qword ptr [RSP],R15
MOV RCX,R15
XOR R15D,R15D
LAB_0012718d:
MOV RCX,qword ptr [RCX]
TEST RCX,RCX
JZ 0x001271d6
MOV RDX,qword ptr [RCX + 0x28]
MOV RSI,qword ptr [RCX + 0x30]
LAB_0012719d:
CMP RDX,RSI
JZ 0x001271cb
CMP qword ptr [RDX + 0x28],0x0
MOVZX R15D,R15B
CMOVNZ R15D,EAX
CMP qword ptr [RDX + 0x48],0x0
MOVZX EBX,BL
CMOVNZ EBX,EAX
TEST R15B,0x1
JZ 0x001271c5
TEST BL,0x1
JNZ 0x001271cb
LAB_001271c5:
ADD RDX,0x60
JMP 0x0012719d
LAB_001271cb:
TEST R15B,0x1
JZ 0x0012718d
TEST BL,0x1
JZ 0x0012718d
LAB_001271d6:
LEA RSI,[0x12bec0]
LEA RDI,[RSP + 0x8]
CALL 0x00107460
TEST R15B,0x1
JZ 0x001271fe
LEA RSI,[0x12becc]
LEA RDI,[RSP + 0x8]
CALL 0x00107460
LAB_001271fe:
TEST BL,0x1
JZ 0x00127214
LEA RSI,[0x12bed4]
LEA RDI,[RSP + 0x8]
CALL 0x00107460
LAB_00127214:
LEA RDI,[RSP + 0x8]
PUSH 0xa
POP RSI
CALL 0x00107510
LEA R14,[RSP + 0x8]
LAB_00127226:
MOV RAX,qword ptr [RSP]
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x001272dc
LEA R12,[RAX + 0x8]
MOV R13,qword ptr [RAX + 0x28]
MOV qword ptr [RSP],RAX
MOV RBP,qword ptr [RAX + 0x30]
LAB_00127246:
CMP R13,RBP
JZ 0x00127226
LAB_0012724b:
MOV RDI,R14
MOV RSI,R12
CALL 0x00107400
MOV RDI,RAX
PUSH 0x9
POP RSI
CALL 0x00107510
MOV RDI,RAX
MOV RSI,R13
CALL 0x00107400
TEST R15B,0x1
JZ 0x00127289
MOV RDI,R14
PUSH 0x9
POP RSI
CALL 0x00107510
LEA RSI,[R13 + 0x20]
MOV RDI,RAX
CALL 0x00107400
LAB_00127289:
TEST BL,0x1
JZ 0x001272a5
MOV RDI,R14
PUSH 0x9
POP RSI
CALL 0x00107510
LEA RSI,[R13 + 0x40]
MOV RDI,RAX
CALL 0x00107400
LAB_001272a5:
MOV RDI,R14
PUSH 0xa
POP RSI
CALL 0x00107510
ADD R13,0x60
JMP 0x00127246
LAB_001272b6:
MOV RDI,qword ptr [0x0013fff0]
LEA RSI,[0x12bea5]
CALL 0x00107460
MOV RDI,RAX
MOV RSI,R14
CALL 0x00107400
MOV RDI,RAX
CALL 0x00107200
LAB_001272dc:
LEA RDI,[RSP + 0x8]
CALL 0x00107640
ADD RSP,0x208
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WriteResults(std::__cxx11::string const&, std::unordered_map<std::__cxx11::string,
std::vector<AIRREntity, std::allocator<AIRREntity> >, std::hash<std::__cxx11::string >,
std::equal_to<std::__cxx11::string >, std::allocator<std::pair<std::__cxx11::string const,
std::vector<AIRREntity, std::allocator<AIRREntity> > > > > const&) */
void WriteResults(string *param_1,unordered_map *param_2)
{
string *psVar1;
bool bVar2;
bool bVar3;
char cVar4;
ostream *poVar5;
unordered_map *puVar6;
long lVar7;
string *psVar8;
unordered_map *local_238;
ofstream local_230 [512];
std::ofstream::ofstream(local_230,param_1,0x10);
cVar4 = std::__basic_file<char>::is_open();
if (cVar4 == '\0') {
/* try { // try from 001272b6 to 001272db has its CatchHandler @ 001272fa */
poVar5 = std::operator<<((ostream *)PTR_cerr_0013fff0,"Error: Unable to write to ");
poVar5 = std::operator<<(poVar5,param_1);
std::endl<char,std::char_traits<char>>(poVar5);
}
else {
local_238 = param_2 + 0x10;
bVar3 = false;
bVar2 = false;
puVar6 = local_238;
do {
puVar6 = *(unordered_map **)puVar6;
if (puVar6 == (unordered_map *)0x0) break;
for (lVar7 = *(long *)(puVar6 + 0x28); lVar7 != *(long *)(puVar6 + 0x30); lVar7 = lVar7 + 0x60
) {
if (*(long *)(lVar7 + 0x28) != 0) {
bVar2 = true;
}
if (*(long *)(lVar7 + 0x48) != 0) {
bVar3 = true;
}
if ((bVar2) && (bVar3)) break;
}
} while ((!bVar2) || (!bVar3));
/* try { // try from 001271d6 to 00127220 has its CatchHandler @ 001272f8 */
std::operator<<((ostream *)local_230,"query\tmatch");
if (bVar2) {
std::operator<<((ostream *)local_230,"\tv_gene");
}
if (bVar3) {
std::operator<<((ostream *)local_230,"\tj_gene");
}
std::operator<<((ostream *)local_230,'\n');
while (local_238 = *(unordered_map **)local_238, local_238 != (unordered_map *)0x0) {
psVar1 = *(string **)(local_238 + 0x30);
for (psVar8 = *(string **)(local_238 + 0x28); psVar8 != psVar1; psVar8 = psVar8 + 0x60) {
/* try { // try from 0012724b to 001272af has its CatchHandler @ 001272fc */
poVar5 = std::operator<<((ostream *)local_230,(string *)(local_238 + 8));
poVar5 = std::operator<<(poVar5,'\t');
std::operator<<(poVar5,psVar8);
if (bVar2) {
poVar5 = std::operator<<((ostream *)local_230,'\t');
std::operator<<(poVar5,psVar8 + 0x20);
}
if (bVar3) {
poVar5 = std::operator<<((ostream *)local_230,'\t');
std::operator<<(poVar5,psVar8 + 0x40);
}
std::operator<<((ostream *)local_230,'\n');
}
}
}
std::ofstream::~ofstream(local_230);
return;
}
| |
43,837 | WriteResults(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<AIRREntity, std::allocator<AIRREntity>>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::vector<AIRREntity, std::allocator<AIRREntity>>>>> const&) | MikePodsytnik[P]TCRtrie/src/TrieInterface.cpp | static void WriteResults(const std::string& outPath, const std::unordered_map<std::string, std::vector<AIRREntity>>& results) {
std::ofstream outFile(outPath);
if (!outFile.is_open()) {
std::cerr << "Error: Unable to write to " << outPath << std::endl;
return;
}
bool hasVGene = false, hasJGene = false;
for (const auto& [_, matches] : results) {
for (const auto& m : matches) {
if (!m.vGene.empty()) hasVGene = true;
if (!m.jGene.empty()) hasJGene = true;
if (hasVGene && hasJGene) break;
}
if (hasVGene && hasJGene) break;
}
outFile << "query\tmatch";
if (hasVGene) outFile << "\tv_gene";
if (hasJGene) outFile << "\tj_gene";
outFile << '\n';
for (const auto& [query, matches] : results) {
for (const auto& match : matches) {
outFile << query << '\t' << match.junctionAA;
if (hasVGene) outFile << '\t' << match.vGene;
if (hasJGene) outFile << '\t' << match.jGene;
outFile << '\n';
}
}
} | O3 | cpp | WriteResults(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<AIRREntity, std::allocator<AIRREntity>>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::vector<AIRREntity, std::allocator<AIRREntity>>>>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp # imm = 0x218
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
movl $0x10, %edx
callq 0x77f0
leaq 0x88(%rsp), %rdi
callq 0x70e0
testb %al, %al
je 0x34c5a
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x34cb4
xorl %ebp, %ebp
movl $0x1, %ecx
xorl %r15d, %r15d
movq 0x28(%rax), %rdx
movq 0x30(%rax), %rsi
cmpq %rsi, %rdx
je 0x34c44
cmpq $0x0, 0x28(%rdx)
movzbl %bpl, %ebp
cmovnel %ecx, %ebp
cmpq $0x0, 0x48(%rdx)
movzbl %r15b, %r15d
cmovnel %ecx, %r15d
testb $0x1, %bpl
je 0x34c3e
testb $0x1, %r15b
jne 0x34c44
addq $0x60, %rdx
jmp 0x34c14
testb $0x1, %bpl
je 0x34c50
testb $0x1, %r15b
jne 0x34cb9
movq (%rax), %rax
testq %rax, %rax
jne 0x34c0c
jmp 0x34cb9
movq 0x1538f(%rip), %rdi # 0x49ff0
leaq 0x4e1d(%rip), %rsi # 0x39a85
movl $0x1a, %edx
callq 0x74b0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0x15370(%rip), %rdi # 0x49ff0
callq 0x74b0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x7400
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7030
movq %rax, %rdi
callq 0x72c0
jmp 0x34e19
xorl %r15d, %r15d
xorl %ebp, %ebp
leaq 0x4de0(%rip), %rsi # 0x39aa0
leaq 0x18(%rsp), %rdi
movl $0xb, %edx
callq 0x74b0
testb $0x1, %bpl
je 0x34ceb
leaq 0x4dd0(%rip), %rsi # 0x39aac
leaq 0x18(%rsp), %rdi
movl $0x7, %edx
callq 0x74b0
testb $0x1, %r15b
je 0x34d07
leaq 0x4dbc(%rip), %rsi # 0x39ab4
leaq 0x18(%rsp), %rdi
movl $0x7, %edx
callq 0x74b0
leaq 0xf(%rsp), %rsi
movb $0xa, (%rsi)
leaq 0x18(%rsp), %rdi
movl $0x1, %edx
callq 0x74b0
movq 0x10(%rbx), %r12
testq %r12, %r12
je 0x34e19
leaq 0xf(%rsp), %r14
movq 0x28(%r12), %r13
movq 0x30(%r12), %rax
movq %rax, 0x10(%rsp)
cmpq %rax, %r13
je 0x34e0c
addq $0x48, %r13
movq 0x8(%r12), %rsi
movq 0x10(%r12), %rdx
leaq 0x18(%rsp), %rdi
callq 0x74b0
movb $0x9, 0xf(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x74b0
leaq -0x48(%r13), %rbx
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %rax, %rdi
callq 0x74b0
testb $0x1, %bpl
je 0x34db5
movb $0x9, 0xf(%rsp)
movl $0x1, %edx
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x74b0
movq -0x28(%r13), %rsi
movq -0x20(%r13), %rdx
movq %rax, %rdi
callq 0x74b0
testb $0x1, %r15b
je 0x34de2
movb $0x9, 0xf(%rsp)
movl $0x1, %edx
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x74b0
movq -0x8(%r13), %rsi
movq (%r13), %rdx
movq %rax, %rdi
callq 0x74b0
movb $0xa, 0xf(%rsp)
movl $0x1, %edx
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x74b0
addq $0x60, %r13
addq $0x60, %rbx
cmpq 0x10(%rsp), %rbx
jne 0x34d4c
movq (%r12), %r12
testq %r12, %r12
jne 0x34d30
movq 0x15158(%rip), %rax # 0x49f78
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x20(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x18(%rsp,%rcx)
callq 0x7370
leaq 0x110(%rsp), %rdi
callq 0x7150
addq $0x218, %rsp # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x34e61
jmp 0x34e61
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x7610
movq %rbx, %rdi
callq 0x7780
| _ZL12WriteResultsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt13unordered_mapIS4_St6vectorI10AIRREntitySaIS9_EESt4hashIS4_ESt8equal_toIS4_ESaISt4pairIS5_SB_EEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 218h
mov rbx, rsi
mov r14, rdi
lea rdi, [rsp+248h+var_230]
mov rsi, r14
mov edx, 10h
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ofstream::basic_ofstream(std::string const&,std::_Ios_Openmode)
lea rdi, [rsp+248h+var_1C0]
call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void)
test al, al
jz short loc_34C5A
mov rax, [rbx+10h]
test rax, rax
jz loc_34CB4
xor ebp, ebp
mov ecx, 1
xor r15d, r15d
loc_34C0C:
mov rdx, [rax+28h]
mov rsi, [rax+30h]
loc_34C14:
cmp rdx, rsi
jz short loc_34C44
cmp qword ptr [rdx+28h], 0
movzx ebp, bpl
cmovnz ebp, ecx
cmp qword ptr [rdx+48h], 0
movzx r15d, r15b
cmovnz r15d, ecx
test bpl, 1
jz short loc_34C3E
test r15b, 1
jnz short loc_34C44
loc_34C3E:
add rdx, 60h ; '`'
jmp short loc_34C14
loc_34C44:
test bpl, 1
jz short loc_34C50
test r15b, 1
jnz short loc_34CB9
loc_34C50:
mov rax, [rax]
test rax, rax
jnz short loc_34C0C
jmp short loc_34CB9
loc_34C5A:
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, aErrorUnableToW; "Error: Unable to write to "
mov edx, 1Ah
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [r14]
mov rdx, [r14+8]
mov rdi, cs:_ZSt4cerr_ptr
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rbx, rax
mov rax, [rax]
mov rdi, [rax-18h]
add rdi, rbx
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, rbx; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
jmp loc_34E19
loc_34CB4:
xor r15d, r15d
xor ebp, ebp
loc_34CB9:
lea rsi, aQueryMatch; "query\tmatch"
lea rdi, [rsp+248h+var_230]
mov edx, 0Bh
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
test bpl, 1
jz short loc_34CEB
lea rsi, aVGene_0; "\tv_gene"
lea rdi, [rsp+248h+var_230]
mov edx, 7
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_34CEB:
test r15b, 1
jz short loc_34D07
lea rsi, aJGene_0; "\tj_gene"
lea rdi, [rsp+248h+var_230]
mov edx, 7
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_34D07:
lea rsi, [rsp+248h+var_239]
mov byte ptr [rsi], 0Ah
lea rdi, [rsp+248h+var_230]
mov edx, 1
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r12, [rbx+10h]
test r12, r12
jz loc_34E19
lea r14, [rsp+248h+var_239]
loc_34D30:
mov r13, [r12+28h]
mov rax, [r12+30h]
mov [rsp+248h+var_238], rax
cmp r13, rax
jz loc_34E0C
add r13, 48h ; 'H'
loc_34D4C:
mov rsi, [r12+8]
mov rdx, [r12+10h]
lea rdi, [rsp+248h+var_230]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov [rsp+248h+var_239], 9
mov edx, 1
mov rdi, rax
mov rsi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rbx, [r13-48h]
mov rsi, [rbx]
mov rdx, [rbx+8]
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)
test bpl, 1
jz short loc_34DB5
mov [rsp+248h+var_239], 9
mov edx, 1
lea rdi, [rsp+248h+var_230]
mov rsi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [r13-28h]
mov rdx, [r13-20h]
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_34DB5:
test r15b, 1
jz short loc_34DE2
mov [rsp+248h+var_239], 9
mov edx, 1
lea rdi, [rsp+248h+var_230]
mov rsi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [r13-8]
mov rdx, [r13+0]
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_34DE2:
mov [rsp+248h+var_239], 0Ah
mov edx, 1
lea rdi, [rsp+248h+var_230]
mov rsi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
add r13, 60h ; '`'
add rbx, 60h ; '`'
cmp rbx, [rsp+248h+var_238]
jnz loc_34D4C
loc_34E0C:
mov r12, [r12]
test r12, r12
jnz loc_34D30
loc_34E19:
mov rax, cs:_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE_ptr
mov rcx, [rax]
mov rax, [rax+18h]
lea rdi, [rsp+248h+var_228]
mov [rdi-8], rcx
mov rcx, [rcx-18h]
mov [rsp+rcx+248h+var_230], rax
call __ZNSt13basic_filebufIcSt11char_traitsIcEED2Ev; std::filebuf::~filebuf()
lea rdi, [rsp+248h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
add rsp, 218h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_34E61
jmp short $+2
loc_34E61:
mov rbx, rax
lea rdi, [rsp+arg_10]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream()
mov rdi, rbx
call __Unwind_Resume
| void WriteResults(_QWORD *a1, long long a2)
{
_QWORD *v2; // rax
char v3; // bp
char v4; // r15
long long i; // rdx
std::ostream *v6; // rbx
char v7; // al
std::ostream *v8; // rax
_QWORD *j; // r12
_QWORD *v10; // r13
_QWORD *v11; // r13
long long v12; // rax
long long v13; // rax
_QWORD *v14; // rbx
long long v15; // rax
long long v16; // rax
long long v17; // rax
char v18; // [rsp+Fh] [rbp-239h] BYREF
_QWORD *v19; // [rsp+10h] [rbp-238h]
long long v20; // [rsp+18h] [rbp-230h] BYREF
char v21[136]; // [rsp+88h] [rbp-1C0h] BYREF
char v22[312]; // [rsp+110h] [rbp-138h] BYREF
std::ofstream::basic_ofstream(&v20, a1, 16LL);
if ( (unsigned __int8)std::__basic_file<char>::is_open(v21) )
{
v2 = *(_QWORD **)(a2 + 16);
if ( v2 )
{
v3 = 0;
v4 = 0;
do
{
for ( i = v2[5]; i != v2[6]; i += 96LL )
{
if ( *(_QWORD *)(i + 40) )
v3 = 1;
if ( *(_QWORD *)(i + 72) )
v4 = 1;
if ( (v3 & 1) != 0 && (v4 & 1) != 0 )
break;
}
if ( (v3 & 1) != 0 && (v4 & 1) != 0 )
break;
v2 = (_QWORD *)*v2;
}
while ( v2 );
}
else
{
v4 = 0;
v3 = 0;
}
std::__ostream_insert<char,std::char_traits<char>>(&v20, "query\tmatch", 11LL);
if ( (v3 & 1) != 0 )
std::__ostream_insert<char,std::char_traits<char>>(&v20, "\tv_gene", 7LL);
if ( (v4 & 1) != 0 )
std::__ostream_insert<char,std::char_traits<char>>(&v20, "\tj_gene", 7LL);
v18 = 10;
std::__ostream_insert<char,std::char_traits<char>>(&v20, &v18, 1LL);
for ( j = *(_QWORD **)(a2 + 16); j; j = (_QWORD *)*j )
{
v10 = (_QWORD *)j[5];
v19 = (_QWORD *)j[6];
if ( v10 != v19 )
{
v11 = v10 + 9;
do
{
v12 = std::__ostream_insert<char,std::char_traits<char>>(&v20, j[1], j[2]);
v18 = 9;
v13 = std::__ostream_insert<char,std::char_traits<char>>(v12, &v18, 1LL);
v14 = v11 - 9;
std::__ostream_insert<char,std::char_traits<char>>(v13, *(v11 - 9), *(v11 - 8));
if ( (v3 & 1) != 0 )
{
v18 = 9;
v15 = std::__ostream_insert<char,std::char_traits<char>>(&v20, &v18, 1LL);
std::__ostream_insert<char,std::char_traits<char>>(v15, *(v11 - 5), *(v11 - 4));
}
if ( (v4 & 1) != 0 )
{
v18 = 9;
v16 = std::__ostream_insert<char,std::char_traits<char>>(&v20, &v18, 1LL);
std::__ostream_insert<char,std::char_traits<char>>(v16, *(v11 - 1), *v11);
}
v18 = 10;
std::__ostream_insert<char,std::char_traits<char>>(&v20, &v18, 1LL);
v11 += 12;
}
while ( v14 + 12 != v19 );
}
}
}
else
{
std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, "Error: Unable to write to ", 26LL);
v6 = (std::ostream *)std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, *a1, a1[1]);
v7 = std::ios::widen((char *)v6 + *(_QWORD *)(*(_QWORD *)v6 - 24LL), 10LL);
v8 = (std::ostream *)std::ostream::put(v6, v7);
std::ostream::flush(v8);
}
v17 = `VTT for'std::ofstream[3];
v20 = `VTT for'std::ofstream[0];
*(_QWORD *)(v21 + *(_QWORD *)(`VTT for'std::ofstream[0] - 24LL) + 96) = v17;
std::filebuf::~filebuf();
std::ios_base::~ios_base((std::ios_base *)v22);
}
| WriteResults:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x218
MOV RBX,RSI
MOV R14,RDI
LEA RDI,[RSP + 0x18]
MOV RSI,R14
MOV EDX,0x10
CALL 0x001077f0
LEA RDI,[RSP + 0x88]
CALL 0x001070e0
TEST AL,AL
JZ 0x00134c5a
MOV RAX,qword ptr [RBX + 0x10]
TEST RAX,RAX
JZ 0x00134cb4
XOR EBP,EBP
MOV ECX,0x1
XOR R15D,R15D
LAB_00134c0c:
MOV RDX,qword ptr [RAX + 0x28]
MOV RSI,qword ptr [RAX + 0x30]
LAB_00134c14:
CMP RDX,RSI
JZ 0x00134c44
CMP qword ptr [RDX + 0x28],0x0
MOVZX EBP,BPL
CMOVNZ EBP,ECX
CMP qword ptr [RDX + 0x48],0x0
MOVZX R15D,R15B
CMOVNZ R15D,ECX
TEST BPL,0x1
JZ 0x00134c3e
TEST R15B,0x1
JNZ 0x00134c44
LAB_00134c3e:
ADD RDX,0x60
JMP 0x00134c14
LAB_00134c44:
TEST BPL,0x1
JZ 0x00134c50
TEST R15B,0x1
JNZ 0x00134cb9
LAB_00134c50:
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JNZ 0x00134c0c
JMP 0x00134cb9
LAB_00134c5a:
MOV RDI,qword ptr [0x00149ff0]
LEA RSI,[0x139a85]
MOV EDX,0x1a
CALL 0x001074b0
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
MOV RDI,qword ptr [0x00149ff0]
CALL 0x001074b0
MOV RBX,RAX
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,RBX
MOV ESI,0xa
CALL 0x00107400
MOVSX ESI,AL
MOV RDI,RBX
CALL 0x00107030
MOV RDI,RAX
CALL 0x001072c0
JMP 0x00134e19
LAB_00134cb4:
XOR R15D,R15D
XOR EBP,EBP
LAB_00134cb9:
LEA RSI,[0x139aa0]
LEA RDI,[RSP + 0x18]
MOV EDX,0xb
CALL 0x001074b0
TEST BPL,0x1
JZ 0x00134ceb
LEA RSI,[0x139aac]
LEA RDI,[RSP + 0x18]
MOV EDX,0x7
CALL 0x001074b0
LAB_00134ceb:
TEST R15B,0x1
JZ 0x00134d07
LEA RSI,[0x139ab4]
LEA RDI,[RSP + 0x18]
MOV EDX,0x7
CALL 0x001074b0
LAB_00134d07:
LEA RSI,[RSP + 0xf]
MOV byte ptr [RSI],0xa
LEA RDI,[RSP + 0x18]
MOV EDX,0x1
CALL 0x001074b0
MOV R12,qword ptr [RBX + 0x10]
TEST R12,R12
JZ 0x00134e19
LEA R14,[RSP + 0xf]
LAB_00134d30:
MOV R13,qword ptr [R12 + 0x28]
MOV RAX,qword ptr [R12 + 0x30]
MOV qword ptr [RSP + 0x10],RAX
CMP R13,RAX
JZ 0x00134e0c
ADD R13,0x48
LAB_00134d4c:
MOV RSI,qword ptr [R12 + 0x8]
MOV RDX,qword ptr [R12 + 0x10]
LAB_00134d56:
LEA RDI,[RSP + 0x18]
CALL 0x001074b0
MOV byte ptr [RSP + 0xf],0x9
MOV EDX,0x1
MOV RDI,RAX
MOV RSI,R14
CALL 0x001074b0
LEA RBX,[R13 + -0x48]
MOV RSI,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
MOV RDI,RAX
CALL 0x001074b0
TEST BPL,0x1
JZ 0x00134db5
MOV byte ptr [RSP + 0xf],0x9
MOV EDX,0x1
LEA RDI,[RSP + 0x18]
MOV RSI,R14
CALL 0x001074b0
MOV RSI,qword ptr [R13 + -0x28]
MOV RDX,qword ptr [R13 + -0x20]
MOV RDI,RAX
CALL 0x001074b0
LAB_00134db5:
TEST R15B,0x1
JZ 0x00134de2
MOV byte ptr [RSP + 0xf],0x9
MOV EDX,0x1
LEA RDI,[RSP + 0x18]
MOV RSI,R14
CALL 0x001074b0
MOV RSI,qword ptr [R13 + -0x8]
MOV RDX,qword ptr [R13]
MOV RDI,RAX
CALL 0x001074b0
LAB_00134de2:
MOV byte ptr [RSP + 0xf],0xa
MOV EDX,0x1
LEA RDI,[RSP + 0x18]
MOV RSI,R14
CALL 0x001074b0
LAB_00134df9:
ADD R13,0x60
ADD RBX,0x60
CMP RBX,qword ptr [RSP + 0x10]
JNZ 0x00134d4c
LAB_00134e0c:
MOV R12,qword ptr [R12]
TEST R12,R12
JNZ 0x00134d30
LAB_00134e19:
MOV RAX,qword ptr [0x00149f78]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x18]
LEA RDI,[RSP + 0x20]
MOV qword ptr [RDI + -0x8],RCX
MOV RCX,qword ptr [RCX + -0x18]
MOV qword ptr [RSP + RCX*0x1 + 0x18],RAX
CALL 0x00107370
LEA RDI,[RSP + 0x110]
CALL 0x00107150
ADD RSP,0x218
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WriteResults(std::__cxx11::string const&, std::unordered_map<std::__cxx11::string,
std::vector<AIRREntity, std::allocator<AIRREntity> >, std::hash<std::__cxx11::string >,
std::equal_to<std::__cxx11::string >, std::allocator<std::pair<std::__cxx11::string const,
std::vector<AIRREntity, std::allocator<AIRREntity> > > > > const&) */
void WriteResults(string *param_1,unordered_map *param_2)
{
bool bVar1;
bool bVar2;
char cVar3;
long *plVar4;
ostream *poVar5;
long lVar6;
long *plVar7;
long *plVar8;
char local_239;
long *local_238;
long local_230;
filebuf local_228 [240];
ios_base local_138 [264];
std::ofstream::ofstream((ofstream *)&local_230,param_1,0x10);
cVar3 = std::__basic_file<char>::is_open();
if (cVar3 == '\0') {
/* try { // try from 00134c5a to 00134cae has its CatchHandler @ 00134e5f */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_00149ff0,"Error: Unable to write to ",0x1a);
poVar5 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_00149ff0,*(char **)param_1,*(long *)(param_1 + 8));
std::ios::widen((char)*(int8 *)(*(long *)poVar5 + -0x18) + (char)poVar5);
std::ostream::put((char)poVar5);
std::ostream::flush();
}
else {
plVar4 = *(long **)(param_2 + 0x10);
if (plVar4 == (long *)0x0) {
bVar2 = false;
bVar1 = false;
}
else {
bVar1 = false;
bVar2 = false;
do {
for (lVar6 = plVar4[5]; lVar6 != plVar4[6]; lVar6 = lVar6 + 0x60) {
if (*(long *)(lVar6 + 0x28) != 0) {
bVar1 = true;
}
if (*(long *)(lVar6 + 0x48) != 0) {
bVar2 = true;
}
if ((bVar1) && (bVar2)) break;
}
} while (((!bVar1) || (!bVar2)) && (plVar4 = (long *)*plVar4, plVar4 != (long *)0x0));
}
/* try { // try from 00134cb9 to 00134d1d has its CatchHandler @ 00134e5d */
std::__ostream_insert<char,std::char_traits<char>>((ostream *)&local_230,"query\tmatch",0xb);
if (bVar1) {
std::__ostream_insert<char,std::char_traits<char>>((ostream *)&local_230,"\tv_gene",7);
}
if (bVar2) {
std::__ostream_insert<char,std::char_traits<char>>((ostream *)&local_230,"\tj_gene",7);
}
local_239 = '\n';
std::__ostream_insert<char,std::char_traits<char>>((ostream *)&local_230,&local_239,1);
plVar4 = *(long **)(param_2 + 0x10);
if (plVar4 != (long *)0x0) {
do {
local_238 = (long *)plVar4[6];
if ((long *)plVar4[5] != local_238) {
plVar8 = (long *)plVar4[5] + 9;
do {
/* try { // try from 00134d56 to 00134df8 has its CatchHandler @ 00134e61 */
poVar5 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)&local_230,(char *)plVar4[1],plVar4[2]);
local_239 = '\t';
poVar5 = std::__ostream_insert<char,std::char_traits<char>>(poVar5,&local_239,1);
std::__ostream_insert<char,std::char_traits<char>>(poVar5,(char *)plVar8[-9],plVar8[-8])
;
if (bVar1) {
local_239 = '\t';
poVar5 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)&local_230,&local_239,1);
std::__ostream_insert<char,std::char_traits<char>>
(poVar5,(char *)plVar8[-5],plVar8[-4]);
}
if (bVar2) {
local_239 = '\t';
poVar5 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)&local_230,&local_239,1);
std::__ostream_insert<char,std::char_traits<char>>(poVar5,(char *)plVar8[-1],*plVar8);
}
local_239 = '\n';
std::__ostream_insert<char,std::char_traits<char>>((ostream *)&local_230,&local_239,1);
plVar7 = plVar8 + 3;
plVar8 = plVar8 + 0xc;
} while (plVar7 != local_238);
}
plVar4 = (long *)*plVar4;
} while (plVar4 != (long *)0x0);
}
}
local_230 = *(long *)PTR_VTT_00149f78;
*(int8 *)(local_228 + *(long *)(local_230 + -0x18) + -8) =
*(int8 *)(PTR_VTT_00149f78 + 0x18);
std::filebuf::~filebuf(local_228);
std::ios_base::~ios_base(local_138);
return;
}
| |
43,838 | cr_compress | bluesky950520[P]quickjs/libunicode.c | static void cr_compress(CharRange *cr)
{
int i, j, k, len;
uint32_t *pt;
pt = cr->points;
len = cr->len;
i = 0;
j = 0;
k = 0;
while ((i + 1) < len) {
if (pt[i] == pt[i + 1]) {
/* empty interval */
i += 2;
} else {
j = i;
while ((j + 3) < len && pt[j + 1] == pt[j + 2])
j += 2;
/* just copy */
pt[k] = pt[i];
pt[k + 1] = pt[j + 1];
k += 2;
i = j + 2;
}
}
cr->len = k;
} | O1 | c | cr_compress:
movslq (%rdi), %rax
xorl %esi, %esi
cmpq $0x2, %rax
jl 0x988a8
pushq %rbp
pushq %r14
pushq %rbx
movq 0x8(%rdi), %rcx
leaq -0x3(%rax), %rdx
xorl %r9d, %r9d
movl $0x1, %r11d
movabsq $0x200000000, %r8 # imm = 0x200000000
xorl %esi, %esi
movslq %r9d, %rbx
movl (%rcx,%rbx,4), %r10d
movslq %r11d, %r11
cmpl (%rcx,%r11,4), %r10d
je 0x98891
movq %rbx, %r14
shlq $0x20, %r14
movq %rbx, %r9
movq %r14, %r11
cmpq %rdx, %rbx
jge 0x98879
movl 0x4(%rcx,%r9,4), %ebp
leaq 0x2(%r9), %rbx
leaq (%r11,%r8), %r14
cmpl 0x8(%rcx,%r9,4), %ebp
je 0x9885a
movslq %esi, %rsi
movl %r10d, (%rcx,%rsi,4)
sarq $0x1e, %r11
movl 0x4(%rcx,%r11), %r10d
movl %r10d, 0x4(%rcx,%rsi,4)
addl $0x2, %esi
leal 0x2(%r9), %r10d
addl $0x3, %r9d
movl %r9d, %r11d
cmpl %eax, %r9d
movl %r10d, %r9d
jl 0x98843
popq %rbx
popq %r14
popq %rbp
movl %esi, (%rdi)
retq
| cr_compress:
movsxd rax, dword ptr [rdi]
xor esi, esi
cmp rax, 2
jl loc_988A8
push rbp
push r14
push rbx
mov rcx, [rdi+8]
lea rdx, [rax-3]
xor r9d, r9d
mov r11d, 1
mov r8, 200000000h
xor esi, esi
loc_98843:
movsxd rbx, r9d
mov r10d, [rcx+rbx*4]
movsxd r11, r11d
cmp r10d, [rcx+r11*4]
jz short loc_98891
mov r14, rbx
shl r14, 20h
loc_9885A:
mov r9, rbx
mov r11, r14
cmp rbx, rdx
jge short loc_98879
mov ebp, [rcx+r9*4+4]
lea rbx, [r9+2]
lea r14, [r11+r8]
cmp ebp, [rcx+r9*4+8]
jz short loc_9885A
loc_98879:
movsxd rsi, esi
mov [rcx+rsi*4], r10d
sar r11, 1Eh
mov r10d, [rcx+r11+4]
mov [rcx+rsi*4+4], r10d
add esi, 2
loc_98891:
lea r10d, [r9+2]
add r9d, 3
mov r11d, r9d
cmp r9d, eax
mov r9d, r10d
jl short loc_98843
pop rbx
pop r14
pop rbp
loc_988A8:
mov [rdi], esi
retn
| long long cr_compress(int *a1)
{
long long result; // rax
int v2; // esi
long long v3; // rcx
long long v4; // r9
int v5; // r11d
long long v6; // rbx
int v7; // r10d
long long v8; // r14
long long v9; // r11
int v10; // ebp
result = *a1;
v2 = 0;
if ( result >= 2 )
{
v3 = *((_QWORD *)a1 + 1);
LODWORD(v4) = 0;
v5 = 1;
v2 = 0;
do
{
v6 = (int)v4;
v7 = *(_DWORD *)(v3 + 4LL * (int)v4);
if ( v7 != *(_DWORD *)(v3 + 4LL * v5) )
{
v8 = (long long)(int)v4 << 32;
do
{
v4 = v6;
v9 = v8;
if ( v6 >= result - 3 )
break;
v10 = *(_DWORD *)(v3 + 4 * v6 + 4);
v6 += 2LL;
v8 += 0x200000000LL;
}
while ( v10 == *(_DWORD *)(v3 + 4 * v4 + 8) );
*(_DWORD *)(v3 + 4LL * v2) = v7;
*(_DWORD *)(v3 + 4LL * v2 + 4) = *(_DWORD *)(v3 + (v9 >> 30) + 4);
v2 += 2;
}
v5 = v4 + 3;
LODWORD(v4) = v4 + 2;
}
while ( v5 < (int)result );
}
*a1 = v2;
return result;
}
| cr_compress:
MOVSXD RAX,dword ptr [RDI]
XOR ESI,ESI
CMP RAX,0x2
JL 0x001988a8
PUSH RBP
PUSH R14
PUSH RBX
MOV RCX,qword ptr [RDI + 0x8]
LEA RDX,[RAX + -0x3]
XOR R9D,R9D
MOV R11D,0x1
MOV R8,0x200000000
XOR ESI,ESI
LAB_00198843:
MOVSXD RBX,R9D
MOV R10D,dword ptr [RCX + RBX*0x4]
MOVSXD R11,R11D
CMP R10D,dword ptr [RCX + R11*0x4]
JZ 0x00198891
MOV R14,RBX
SHL R14,0x20
LAB_0019885a:
MOV R9,RBX
MOV R11,R14
CMP RBX,RDX
JGE 0x00198879
MOV EBP,dword ptr [RCX + R9*0x4 + 0x4]
LEA RBX,[R9 + 0x2]
LEA R14,[R11 + R8*0x1]
CMP EBP,dword ptr [RCX + R9*0x4 + 0x8]
JZ 0x0019885a
LAB_00198879:
MOVSXD RSI,ESI
MOV dword ptr [RCX + RSI*0x4],R10D
SAR R11,0x1e
MOV R10D,dword ptr [RCX + R11*0x1 + 0x4]
MOV dword ptr [RCX + RSI*0x4 + 0x4],R10D
ADD ESI,0x2
LAB_00198891:
LEA R10D,[R9 + 0x2]
ADD R9D,0x3
MOV R11D,R9D
CMP R9D,EAX
MOV R9D,R10D
JL 0x00198843
POP RBX
POP R14
POP RBP
LAB_001988a8:
MOV dword ptr [RDI],ESI
RET
|
void cr_compress(int *param_1)
{
int iVar1;
int iVar2;
long lVar3;
long lVar4;
ulong uVar5;
int iVar6;
int iVar7;
ulong uVar8;
long lVar9;
iVar1 = *param_1;
iVar6 = 0;
if (1 < (long)iVar1) {
lVar3 = *(long *)(param_1 + 2);
uVar8 = 0;
iVar7 = 1;
iVar6 = 0;
do {
uVar5 = (ulong)(int)uVar8;
iVar2 = *(int *)(lVar3 + uVar5 * 4);
if (iVar2 != *(int *)(lVar3 + (long)iVar7 * 4)) {
lVar4 = uVar5 << 0x20;
do {
lVar9 = lVar4;
uVar8 = uVar5;
if ((long)iVar1 + -3 <= (long)uVar8) break;
uVar5 = uVar8 + 2;
lVar4 = lVar9 + 0x200000000;
} while (*(int *)(lVar3 + 4 + uVar8 * 4) == *(int *)(lVar3 + 8 + uVar8 * 4));
*(int *)(lVar3 + (long)iVar6 * 4) = iVar2;
*(int4 *)(lVar3 + 4 + (long)iVar6 * 4) = *(int4 *)(lVar3 + 4 + (lVar9 >> 0x1e));
iVar6 = iVar6 + 2;
}
iVar7 = (int)uVar8 + 3;
uVar8 = (ulong)((int)uVar8 + 2);
} while (iVar7 < iVar1);
}
*param_1 = iVar6;
return;
}
| |
43,839 | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool) | monkey531[P]llama/common/json.hpp | json_sax_dom_callback_parser(BasicJsonType& r,
const parser_callback_t cb,
const bool allow_exceptions_ = true)
: root(r), callback(cb), allow_exceptions(allow_exceptions_)
{
keep_stack.push_back(true);
} | O1 | cpp | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdi, %rbx
movq %rsi, (%rdi)
leaq 0x20(%rdi), %r14
leaq 0x80(%rdi), %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x48(%rdi)
movups %xmm0, 0x58(%rdi)
movups %xmm0, 0x68(%rdi)
movb $0x0, 0x78(%rdi)
movq %r12, %rdi
movq %rdx, %rsi
callq 0x591d6
movb %bpl, 0xa0(%rbx)
leaq 0xa8(%rbx), %r13
movb $0x9, 0xa8(%rbx)
movq $0x0, 0xb0(%rbx)
movq %r13, %rdi
movl $0x1, %esi
callq 0x59800
movq %r14, %rdi
movl $0x1, %esi
callq 0x5d17a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq %r13, %rdi
xorl %esi, %esi
callq 0x59800
movq %r13, %rdi
callq 0x5efec
movq 0x90(%rbx), %rax
testq %rax, %rax
je 0x5ac6c
movq %r12, %rdi
movq %r12, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x5ac6c
jmp 0x5ac93
movq %rax, %r15
leaq 0x48(%rbx), %rdi
callq 0x5d382
movq %r14, %rdi
callq 0x5d382
leaq 0x8(%rbx), %rdi
movq %rbx, %rsi
callq 0x1c4e2
movq %r15, %rdi
callq 0x1bfb0
jmp 0x5ac93
movq %rax, %rdi
callq 0x2337b
nop
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ERSF_St8functionIFbiNS1_13parse_event_tESH_EEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebp, ecx
mov rbx, rdi
mov [rdi], rsi
lea r14, [rdi+20h]
lea r12, [rdi+80h]
xorps xmm0, xmm0
movups xmmword ptr [rdi+8], xmm0
movups xmmword ptr [rdi+18h], xmm0
movups xmmword ptr [rdi+28h], xmm0
movups xmmword ptr [rdi+38h], xmm0
movups xmmword ptr [rdi+48h], xmm0
movups xmmword ptr [rdi+58h], xmm0
movups xmmword ptr [rdi+68h], xmm0
mov byte ptr [rdi+78h], 0
mov rdi, r12
mov rsi, rdx
call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)> const&)
mov [rbx+0A0h], bpl
lea r13, [rbx+0A8h]
mov byte ptr [rbx+0A8h], 9
mov qword ptr [rbx+0B0h], 0
mov rdi, r13
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
mov esi, 1
call _ZNSt6vectorIbSaIbEE9push_backEb; std::vector<bool>::push_back(bool)
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r15, rax
mov rdi, r13
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r13
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, [rbx+90h]
test rax, rax
jz short loc_5AC6C
mov rdi, r12
mov rsi, r12
mov edx, 3
call rax
jmp short loc_5AC6C
jmp short loc_5AC93
mov r15, rax
loc_5AC6C:
lea rdi, [rbx+48h]
call _ZNSt13_Bvector_baseISaIbEE13_M_deallocateEv; std::_Bvector_base<std::allocator<bool>>::_M_deallocate(void)
mov rdi, r14
call _ZNSt13_Bvector_baseISaIbEE13_M_deallocateEv; std::_Bvector_base<std::allocator<bool>>::_M_deallocate(void)
lea rdi, [rbx+8]
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ERSF_St8functionIFbiNS1_13parse_event_tESH_EEb_cold_1; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&,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) [clone]
mov rdi, r15
call __Unwind_Resume
jmp short $+2
loc_5AC93:
mov rdi, rax
call __clang_call_terminate
| long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::json_sax_dom_callback_parser(
long long a1,
long long a2,
long long a3,
char a4)
{
*(_QWORD *)a1 = a2;
*(_OWORD *)(a1 + 8) = 0LL;
*(_OWORD *)(a1 + 24) = 0LL;
*(_OWORD *)(a1 + 40) = 0LL;
*(_OWORD *)(a1 + 56) = 0LL;
*(_OWORD *)(a1 + 72) = 0LL;
*(_OWORD *)(a1 + 88) = 0LL;
*(_OWORD *)(a1 + 104) = 0LL;
*(_BYTE *)(a1 + 120) = 0;
std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::function(
(_OWORD *)(a1 + 128),
a3);
*(_BYTE *)(a1 + 160) = a4;
*(_BYTE *)(a1 + 168) = 9;
*(_QWORD *)(a1 + 176) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a1 + 168));
return std::vector<bool>::push_back(a1 + 32, 1LL);
}
| json_sax_dom_callback_parser:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBP,ECX
MOV RBX,RDI
MOV qword ptr [RDI],RSI
LEA R14,[RDI + 0x20]
LEA R12,[RDI + 0x80]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x8],XMM0
MOVUPS xmmword ptr [RDI + 0x18],XMM0
MOVUPS xmmword ptr [RDI + 0x28],XMM0
MOVUPS xmmword ptr [RDI + 0x38],XMM0
MOVUPS xmmword ptr [RDI + 0x48],XMM0
MOVUPS xmmword ptr [RDI + 0x58],XMM0
MOVUPS xmmword ptr [RDI + 0x68],XMM0
MOV byte ptr [RDI + 0x78],0x0
LAB_0015abe3:
MOV RDI,R12
MOV RSI,RDX
CALL 0x001591d6
MOV byte ptr [RBX + 0xa0],BPL
LEA R13,[RBX + 0xa8]
MOV byte ptr [RBX + 0xa8],0x9
MOV qword ptr [RBX + 0xb0],0x0
MOV RDI,R13
MOV ESI,0x1
CALL 0x00159800
LAB_0015ac1b:
MOV RDI,R14
MOV ESI,0x1
CALL 0x0015d17a
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>
>::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&)>, bool) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::json_sax_dom_callback_parser
(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,int8 param_1,function *param_3,
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
param_4)
{
*(int8 *)this = param_1;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
*(int8 *)(this + 0x50) = 0;
*(int8 *)(this + 0x58) = 0;
*(int8 *)(this + 0x60) = 0;
*(int8 *)(this + 0x68) = 0;
*(int8 *)(this + 0x70) = 0;
this[0x78] = (json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
)0x0;
/* try { // try from 0015abe3 to 0015abed has its CatchHandler @ 0015ac69 */
std::
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
::function((function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
*)(this + 0x80),param_3);
this[0xa0] = param_4;
this[0xa8] = (json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
)0x9;
*(int8 *)(this + 0xb0) = 0;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant((bool)((char)this + -0x58));
/* try { // try from 0015ac1b to 0015ac27 has its CatchHandler @ 0015ac37 */
std::vector<bool,std::allocator<bool>>::push_back
((vector<bool,std::allocator<bool>> *)(this + 0x20),true);
return;
}
| |
43,840 | ma_unique_hash | eloqsql/storage/maria/ma_unique.c | ha_checksum _ma_unique_hash(MARIA_UNIQUEDEF *def, const uchar *record)
{
const uchar *pos, *end;
ha_checksum crc= 0;
ulong seed1=0, seed2= 4;
HA_KEYSEG *keyseg;
for (keyseg=def->seg ; keyseg < def->end ; keyseg++)
{
enum ha_base_keytype type=(enum ha_base_keytype) keyseg->type;
uint length=keyseg->length;
if (keyseg->null_bit)
{
if (record[keyseg->null_pos] & keyseg->null_bit)
{
/*
Change crc in a way different from an empty string or 0.
(This is an optimisation; The code will work even if this isn't
done)
*/
crc=((crc << 8) + 511+
(crc >> (8*sizeof(ha_checksum)-8)));
continue;
}
}
pos= record+keyseg->start;
if (keyseg->flag & HA_VAR_LENGTH_PART)
{
uint pack_length= keyseg->bit_start;
uint tmp_length= (pack_length == 1 ? (uint) *pos :
uint2korr(pos));
pos+= pack_length; /* Skip VARCHAR length */
set_if_smaller(length,tmp_length);
}
else if (keyseg->flag & HA_BLOB_PART)
{
uint tmp_length= _ma_calc_blob_length(keyseg->bit_start,pos);
memcpy((void*) &pos,pos+keyseg->bit_start,sizeof(char*));
if (!length || length > tmp_length)
length=tmp_length; /* The whole blob */
}
end= pos+length;
if (type == HA_KEYTYPE_TEXT || type == HA_KEYTYPE_VARTEXT1 ||
type == HA_KEYTYPE_VARTEXT2)
{
my_ci_hash_sort(keyseg->charset,
(const uchar*) pos, length,
&seed1, &seed2);
crc+= seed1;
}
else
{
my_hash_sort_bin((CHARSET_INFO*) 0, pos, (size_t) (end-pos),
&seed1, &seed2);
crc+= seed1;
}
}
return crc;
} | O0 | c | ma_unique_hash:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x24(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x4, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x6aad0
movq -0x40(%rbp), %rax
movzbl 0x18(%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x40(%rbp), %rax
movzwl 0x14(%rax), %eax
movl %eax, -0x48(%rbp)
movq -0x40(%rbp), %rax
cmpb $0x0, 0x19(%rax)
je 0x6a980
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
movl 0xc(%rcx), %ecx
movzbl (%rax,%rcx), %eax
movq -0x40(%rbp), %rcx
movzbl 0x19(%rcx), %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x6a97e
movl -0x24(%rbp), %eax
shll $0x8, %eax
addl $0x1ff, %eax # imm = 0x1FF
movl -0x24(%rbp), %ecx
shrl $0x18, %ecx
addl %ecx, %eax
movl %eax, -0x24(%rbp)
jmp 0x6aabf
jmp 0x6a980
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
movl 0x8(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x40(%rbp), %rax
movzwl 0x12(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x6a9f1
movq -0x40(%rbp), %rax
movzbl 0x1a(%rax), %eax
movl %eax, -0x4c(%rbp)
cmpl $0x1, -0x4c(%rbp)
jne 0x6a9bf
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x58(%rbp)
jmp 0x6a9c9
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x4c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x50(%rbp), %eax
jbe 0x6a9ed
movl -0x50(%rbp), %eax
movl %eax, -0x48(%rbp)
jmp 0x6a9ef
jmp 0x6aa44
movq -0x40(%rbp), %rax
movzwl 0x12(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x6aa42
movq -0x40(%rbp), %rax
movzbl 0x1a(%rax), %edi
movq -0x18(%rbp), %rsi
callq 0x509f0
movl %eax, -0x54(%rbp)
movq -0x18(%rbp), %rax
movq -0x40(%rbp), %rcx
movzbl 0x1a(%rcx), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx), %rax
movq %rax, -0x18(%rbp)
cmpl $0x0, -0x48(%rbp)
je 0x6aa3a
movl -0x48(%rbp), %eax
cmpl -0x54(%rbp), %eax
jbe 0x6aa40
movl -0x54(%rbp), %eax
movl %eax, -0x48(%rbp)
jmp 0x6aa42
jmp 0x6aa44
movq -0x18(%rbp), %rax
movl -0x48(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
cmpl $0x1, -0x44(%rbp)
je 0x6aa64
cmpl $0xf, -0x44(%rbp)
je 0x6aa64
cmpl $0x11, -0x44(%rbp)
jne 0x6aa90
movq -0x40(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
movl -0x48(%rbp), %eax
movl %eax, %edx
leaq -0x30(%rbp), %rcx
leaq -0x38(%rbp), %r8
callq 0x6aae0
movq -0x30(%rbp), %rcx
movl -0x24(%rbp), %eax
addq %rcx, %rax
movl %eax, -0x24(%rbp)
jmp 0x6aabd
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
xorl %eax, %eax
movl %eax, %edi
leaq -0x30(%rbp), %rcx
leaq -0x38(%rbp), %r8
callq 0x113ac0
movq -0x30(%rbp), %rcx
movl -0x24(%rbp), %eax
addq %rcx, %rax
movl %eax, -0x24(%rbp)
jmp 0x6aabf
movq -0x40(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x40(%rbp)
jmp 0x6a913
movl -0x24(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| _ma_unique_hash:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_24], 0
mov [rbp+var_30], 0
mov [rbp+var_38], 4
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_40], rax
loc_6A913:
mov rax, [rbp+var_40]
mov rcx, [rbp+var_8]
cmp rax, [rcx+10h]
jnb loc_6AAD0
mov rax, [rbp+var_40]
movzx eax, byte ptr [rax+18h]
mov [rbp+var_44], eax
mov rax, [rbp+var_40]
movzx eax, word ptr [rax+14h]
mov [rbp+var_48], eax
mov rax, [rbp+var_40]
cmp byte ptr [rax+19h], 0
jz short loc_6A980
mov rax, [rbp+var_10]
mov rcx, [rbp+var_40]
mov ecx, [rcx+0Ch]
movzx eax, byte ptr [rax+rcx]
mov rcx, [rbp+var_40]
movzx ecx, byte ptr [rcx+19h]
and eax, ecx
cmp eax, 0
jz short loc_6A97E
mov eax, [rbp+var_24]
shl eax, 8
add eax, 1FFh
mov ecx, [rbp+var_24]
shr ecx, 18h
add eax, ecx
mov [rbp+var_24], eax
jmp loc_6AABF
loc_6A97E:
jmp short $+2
loc_6A980:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_40]
mov ecx, [rcx+8]
add rax, rcx
mov [rbp+var_18], rax
mov rax, [rbp+var_40]
movzx eax, word ptr [rax+12h]
and eax, 8
cmp eax, 0
jz short loc_6A9F1
mov rax, [rbp+var_40]
movzx eax, byte ptr [rax+1Ah]
mov [rbp+var_4C], eax
cmp [rbp+var_4C], 1
jnz short loc_6A9BF
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
mov [rbp+var_58], eax
jmp short loc_6A9C9
loc_6A9BF:
mov rax, [rbp+var_18]
movzx eax, word ptr [rax]
mov [rbp+var_58], eax
loc_6A9C9:
mov eax, [rbp+var_58]
mov [rbp+var_50], eax
mov ecx, [rbp+var_4C]
mov rax, [rbp+var_18]
mov ecx, ecx
add rax, rcx
mov [rbp+var_18], rax
mov eax, [rbp+var_48]
cmp eax, [rbp+var_50]
jbe short loc_6A9ED
mov eax, [rbp+var_50]
mov [rbp+var_48], eax
loc_6A9ED:
jmp short $+2
loc_6A9EF:
jmp short loc_6AA44
loc_6A9F1:
mov rax, [rbp+var_40]
movzx eax, word ptr [rax+12h]
and eax, 20h
cmp eax, 0
jz short loc_6AA42
mov rax, [rbp+var_40]
movzx edi, byte ptr [rax+1Ah]
mov rsi, [rbp+var_18]
call _ma_calc_blob_length
mov [rbp+var_54], eax
mov rax, [rbp+var_18]
mov rcx, [rbp+var_40]
movzx ecx, byte ptr [rcx+1Ah]
movsxd rcx, ecx
mov rax, [rax+rcx]
mov [rbp+var_18], rax
cmp [rbp+var_48], 0
jz short loc_6AA3A
mov eax, [rbp+var_48]
cmp eax, [rbp+var_54]
jbe short loc_6AA40
loc_6AA3A:
mov eax, [rbp+var_54]
mov [rbp+var_48], eax
loc_6AA40:
jmp short $+2
loc_6AA42:
jmp short $+2
loc_6AA44:
mov rax, [rbp+var_18]
mov ecx, [rbp+var_48]
add rax, rcx
mov [rbp+var_20], rax
cmp [rbp+var_44], 1
jz short loc_6AA64
cmp [rbp+var_44], 0Fh
jz short loc_6AA64
cmp [rbp+var_44], 11h
jnz short loc_6AA90
loc_6AA64:
mov rax, [rbp+var_40]
mov rdi, [rax]
mov rsi, [rbp+var_18]
mov eax, [rbp+var_48]
mov edx, eax
lea rcx, [rbp+var_30]
lea r8, [rbp+var_38]
call my_ci_hash_sort
mov rcx, [rbp+var_30]
mov eax, [rbp+var_24]
add rax, rcx
mov [rbp+var_24], eax
jmp short loc_6AABD
loc_6AA90:
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rax, [rbp+var_18]
sub rdx, rax
xor eax, eax
mov edi, eax
lea rcx, [rbp+var_30]
lea r8, [rbp+var_38]
call my_hash_sort_bin
mov rcx, [rbp+var_30]
mov eax, [rbp+var_24]
add rax, rcx
mov [rbp+var_24], eax
loc_6AABD:
jmp short $+2
loc_6AABF:
mov rax, [rbp+var_40]
add rax, 20h ; ' '
mov [rbp+var_40], rax
jmp loc_6A913
loc_6AAD0:
mov eax, [rbp+var_24]
add rsp, 60h
pop rbp
retn
| long long ma_unique_hash(long long a1, long long a2)
{
unsigned int v3; // [rsp+8h] [rbp-58h]
unsigned int v4; // [rsp+Ch] [rbp-54h]
unsigned int v5; // [rsp+18h] [rbp-48h]
int v6; // [rsp+1Ch] [rbp-44h]
unsigned long long i; // [rsp+20h] [rbp-40h]
long long v8; // [rsp+28h] [rbp-38h] BYREF
long long v9; // [rsp+30h] [rbp-30h] BYREF
unsigned int v10; // [rsp+3Ch] [rbp-24h]
unsigned __int8 *v11; // [rsp+40h] [rbp-20h]
unsigned __int8 *v12; // [rsp+48h] [rbp-18h]
long long v13; // [rsp+50h] [rbp-10h]
long long v14; // [rsp+58h] [rbp-8h]
v14 = a1;
v13 = a2;
v10 = 0;
v9 = 0LL;
v8 = 4LL;
for ( i = *(_QWORD *)(a1 + 8); i < *(_QWORD *)(v14 + 16); i += 32LL )
{
v6 = *(unsigned __int8 *)(i + 24);
v5 = *(unsigned __int16 *)(i + 20);
if ( *(_BYTE *)(i + 25) && (*(_BYTE *)(i + 25) & *(_BYTE *)(v13 + *(unsigned int *)(i + 12))) != 0 )
{
v10 = HIBYTE(v10) + (v10 << 8) + 511;
}
else
{
v12 = (unsigned __int8 *)(*(unsigned int *)(i + 8) + v13);
if ( (*(_WORD *)(i + 18) & 8) != 0 )
{
if ( *(_BYTE *)(i + 26) == 1 )
v3 = *v12;
else
v3 = *(unsigned __int16 *)v12;
v12 += *(unsigned __int8 *)(i + 26);
if ( v5 > v3 )
v5 = v3;
}
else if ( (*(_WORD *)(i + 18) & 0x20) != 0 )
{
v4 = ma_calc_blob_length(*(unsigned __int8 *)(i + 26), v12);
v12 = *(unsigned __int8 **)&v12[*(unsigned __int8 *)(i + 26)];
if ( !v5 || v5 > v4 )
v5 = v4;
}
v11 = &v12[v5];
if ( v6 == 1 || v6 == 15 || v6 == 17 )
{
my_ci_hash_sort(*(_QWORD *)i, v12, v5, &v9, &v8);
v10 += v9;
}
else
{
my_hash_sort_bin(0LL, v12, v11 - v12, &v9, &v8);
v10 += v9;
}
}
}
return v10;
}
| _ma_unique_hash:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x24],0x0
MOV qword ptr [RBP + -0x30],0x0
MOV qword ptr [RBP + -0x38],0x4
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x40],RAX
LAB_0016a913:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x10]
JNC 0x0016aad0
MOV RAX,qword ptr [RBP + -0x40]
MOVZX EAX,byte ptr [RAX + 0x18]
MOV dword ptr [RBP + -0x44],EAX
MOV RAX,qword ptr [RBP + -0x40]
MOVZX EAX,word ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x48],EAX
MOV RAX,qword ptr [RBP + -0x40]
CMP byte ptr [RAX + 0x19],0x0
JZ 0x0016a980
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RCX + 0xc]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV RCX,qword ptr [RBP + -0x40]
MOVZX ECX,byte ptr [RCX + 0x19]
AND EAX,ECX
CMP EAX,0x0
JZ 0x0016a97e
MOV EAX,dword ptr [RBP + -0x24]
SHL EAX,0x8
ADD EAX,0x1ff
MOV ECX,dword ptr [RBP + -0x24]
SHR ECX,0x18
ADD EAX,ECX
MOV dword ptr [RBP + -0x24],EAX
JMP 0x0016aabf
LAB_0016a97e:
JMP 0x0016a980
LAB_0016a980:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RCX + 0x8]
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOVZX EAX,word ptr [RAX + 0x12]
AND EAX,0x8
CMP EAX,0x0
JZ 0x0016a9f1
MOV RAX,qword ptr [RBP + -0x40]
MOVZX EAX,byte ptr [RAX + 0x1a]
MOV dword ptr [RBP + -0x4c],EAX
CMP dword ptr [RBP + -0x4c],0x1
JNZ 0x0016a9bf
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x58],EAX
JMP 0x0016a9c9
LAB_0016a9bf:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RAX]
MOV dword ptr [RBP + -0x58],EAX
LAB_0016a9c9:
MOV EAX,dword ptr [RBP + -0x58]
MOV dword ptr [RBP + -0x50],EAX
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOV EAX,dword ptr [RBP + -0x48]
CMP EAX,dword ptr [RBP + -0x50]
JBE 0x0016a9ed
MOV EAX,dword ptr [RBP + -0x50]
MOV dword ptr [RBP + -0x48],EAX
LAB_0016a9ed:
JMP 0x0016a9ef
LAB_0016a9ef:
JMP 0x0016aa44
LAB_0016a9f1:
MOV RAX,qword ptr [RBP + -0x40]
MOVZX EAX,word ptr [RAX + 0x12]
AND EAX,0x20
CMP EAX,0x0
JZ 0x0016aa42
MOV RAX,qword ptr [RBP + -0x40]
MOVZX EDI,byte ptr [RAX + 0x1a]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001509f0
MOV dword ptr [RBP + -0x54],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x40]
MOVZX ECX,byte ptr [RCX + 0x1a]
MOVSXD RCX,ECX
MOV RAX,qword ptr [RAX + RCX*0x1]
MOV qword ptr [RBP + -0x18],RAX
CMP dword ptr [RBP + -0x48],0x0
JZ 0x0016aa3a
MOV EAX,dword ptr [RBP + -0x48]
CMP EAX,dword ptr [RBP + -0x54]
JBE 0x0016aa40
LAB_0016aa3a:
MOV EAX,dword ptr [RBP + -0x54]
MOV dword ptr [RBP + -0x48],EAX
LAB_0016aa40:
JMP 0x0016aa42
LAB_0016aa42:
JMP 0x0016aa44
LAB_0016aa44:
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x48]
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
CMP dword ptr [RBP + -0x44],0x1
JZ 0x0016aa64
CMP dword ptr [RBP + -0x44],0xf
JZ 0x0016aa64
CMP dword ptr [RBP + -0x44],0x11
JNZ 0x0016aa90
LAB_0016aa64:
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x48]
MOV EDX,EAX
LEA RCX,[RBP + -0x30]
LEA R8,[RBP + -0x38]
CALL 0x0016aae0
MOV RCX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RBP + -0x24]
ADD RAX,RCX
MOV dword ptr [RBP + -0x24],EAX
JMP 0x0016aabd
LAB_0016aa90:
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
SUB RDX,RAX
XOR EAX,EAX
MOV EDI,EAX
LEA RCX,[RBP + -0x30]
LEA R8,[RBP + -0x38]
CALL 0x00213ac0
MOV RCX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RBP + -0x24]
ADD RAX,RCX
MOV dword ptr [RBP + -0x24],EAX
LAB_0016aabd:
JMP 0x0016aabf
LAB_0016aabf:
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x20
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0016a913
LAB_0016aad0:
MOV EAX,dword ptr [RBP + -0x24]
ADD RSP,0x60
POP RBP
RET
|
uint _ma_unique_hash(long param_1,long param_2)
{
char cVar1;
uint uVar2;
uint local_60;
uint local_50;
int8 *local_48;
int8 local_40;
int8 local_38;
uint local_2c;
byte *local_28;
ushort *local_20;
long local_18;
long local_10;
local_2c = 0;
local_38 = 0;
local_40 = 4;
local_18 = param_2;
local_10 = param_1;
for (local_48 = *(int8 **)(param_1 + 8); local_48 < *(int8 **)(local_10 + 0x10);
local_48 = local_48 + 4) {
cVar1 = *(char *)(local_48 + 3);
local_50 = (uint)*(ushort *)((long)local_48 + 0x14);
if ((*(char *)((long)local_48 + 0x19) == '\0') ||
((*(byte *)(local_18 + (ulong)*(uint *)((long)local_48 + 0xc)) &
*(byte *)((long)local_48 + 0x19)) == 0)) {
local_20 = (ushort *)(local_18 + (ulong)*(uint *)(local_48 + 1));
if ((*(ushort *)((long)local_48 + 0x12) & 8) == 0) {
if ((*(ushort *)((long)local_48 + 0x12) & 0x20) != 0) {
uVar2 = _ma_calc_blob_length(*(int1 *)((long)local_48 + 0x1a),local_20);
local_20 = *(ushort **)
((long)local_20 + (long)(int)(uint)*(byte *)((long)local_48 + 0x1a));
if ((local_50 == 0) || (uVar2 < local_50)) {
local_50 = uVar2;
}
}
}
else {
if (*(byte *)((long)local_48 + 0x1a) == 1) {
local_60 = (uint)(byte)*local_20;
}
else {
local_60 = (uint)*local_20;
}
local_20 = (ushort *)((long)local_20 + (ulong)(uint)*(byte *)((long)local_48 + 0x1a));
if (local_60 < local_50) {
local_50 = local_60;
}
}
local_28 = (byte *)((long)local_20 + (ulong)local_50);
if (((cVar1 == '\x01') || (cVar1 == '\x0f')) || (cVar1 == '\x11')) {
my_ci_hash_sort(*local_48,local_20,local_50,&local_38,&local_40);
local_2c = local_2c + (int)local_38;
}
else {
my_hash_sort_bin(0,local_20,(long)local_28 - (long)local_20,&local_38,&local_40);
local_2c = local_2c + (int)local_38;
}
}
else {
local_2c = local_2c * 0x100 + 0x1ff + (local_2c >> 0x18);
}
}
return local_2c;
}
| |
43,841 | mysql_client_plugin_init | eloqsql/build_O0/libmariadb/libmariadb/ma_client_plugin.c | int mysql_client_plugin_init()
{
MYSQL mysql;
struct st_mysql_client_plugin **builtin;
va_list unused;
LINT_INIT_STRUCT(unused);
if (initialized)
return 0;
memset(&mysql, 0, sizeof(mysql)); /* dummy mysql for set_mysql_extended_error */
pthread_mutex_init(&LOCK_load_client_plugin, NULL);
ma_init_alloc_root(&mem_root, 128, 128);
memset(&plugin_list, 0, sizeof(plugin_list));
initialized= 1;
pthread_mutex_lock(&LOCK_load_client_plugin);
for (builtin= mysql_client_builtins; *builtin; builtin++)
add_plugin(&mysql, *builtin, 0, 0, unused);
pthread_mutex_unlock(&LOCK_load_client_plugin);
load_env_plugins(&mysql);
return 0;
} | O0 | c | mysql_client_plugin_init:
pushq %rbp
movq %rsp, %rbp
subq $0x540, %rsp # imm = 0x540
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
leaq -0x530(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x13250
cmpb $0x0, 0x2c6fe(%rip) # 0x61c60
je 0x35573
movl $0x0, -0x504(%rbp)
jmp 0x35644
leaq -0x500(%rbp), %rdi
xorl %esi, %esi
movl $0x4f8, %edx # imm = 0x4F8
callq 0x13250
leaq 0x2c6db(%rip), %rdi # 0x61c68
xorl %eax, %eax
movl %eax, %esi
callq 0x13670
leaq 0x2c6f3(%rip), %rdi # 0x61c90
movl $0x80, %edx
movq %rdx, %rsi
callq 0x24750
leaq 0x2c71f(%rip), %rdi # 0x61cd0
xorl %esi, %esi
movl $0x40, %edx
callq 0x13250
movb $0x1, 0x2c69c(%rip) # 0x61c60
leaq 0x2c69d(%rip), %rdi # 0x61c68
callq 0x13660
leaq 0x29809(%rip), %rax # 0x5ede0
movq %rax, -0x510(%rbp)
movq -0x510(%rbp), %rax
cmpq $0x0, (%rax)
je 0x35622
movq -0x510(%rbp), %rax
movq (%rax), %rsi
leaq -0x530(%rbp), %r8
leaq -0x500(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x35680
movq -0x510(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x510(%rbp)
jmp 0x355de
leaq 0x2c63f(%rip), %rdi # 0x61c68
callq 0x13310
leaq -0x500(%rbp), %rdi
callq 0x358b0
movl $0x0, -0x504(%rbp)
movl -0x504(%rbp), %eax
movl %eax, -0x534(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x35671
movl -0x534(%rbp), %eax
addq $0x540, %rsp # imm = 0x540
popq %rbp
retq
callq 0x134b0
nopw %cs:(%rax,%rax)
| mysql_client_plugin_init:
push rbp
mov rbp, rsp
sub rsp, 540h
mov rax, fs:28h
mov [rbp+var_8], rax
lea rdi, [rbp+var_530]
xor esi, esi
mov edx, 18h
call _memset
cmp cs:initialized, 0
jz short loc_35573
mov [rbp+var_504], 0
jmp loc_35644
loc_35573:
lea rdi, [rbp+var_500]
xor esi, esi
mov edx, 4F8h
call _memset
lea rdi, LOCK_load_client_plugin
xor eax, eax
mov esi, eax
call _pthread_mutex_init
lea rdi, mem_root
mov edx, 80h
mov rsi, rdx
call ma_init_alloc_root
lea rdi, plugin_list
xor esi, esi
mov edx, 40h ; '@'
call _memset
mov cs:initialized, 1
lea rdi, LOCK_load_client_plugin
call _pthread_mutex_lock
lea rax, mysql_client_builtins
mov [rbp+var_510], rax
loc_355DE:
mov rax, [rbp+var_510]
cmp qword ptr [rax], 0
jz short loc_35622
mov rax, [rbp+var_510]
mov rsi, [rax]
lea r8, [rbp+var_530]
lea rdi, [rbp+var_500]
xor eax, eax
mov edx, eax
xor ecx, ecx
call add_plugin
mov rax, [rbp+var_510]
add rax, 8
mov [rbp+var_510], rax
jmp short loc_355DE
loc_35622:
lea rdi, LOCK_load_client_plugin
call _pthread_mutex_unlock
lea rdi, [rbp+var_500]
call load_env_plugins
mov [rbp+var_504], 0
loc_35644:
mov eax, [rbp+var_504]
mov [rbp+var_534], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_35671
mov eax, [rbp+var_534]
add rsp, 540h
pop rbp
retn
loc_35671:
call ___stack_chk_fail
| long long mysql_client_plugin_init()
{
_BYTE v1[32]; // [rsp+10h] [rbp-530h] BYREF
_QWORD *i; // [rsp+30h] [rbp-510h]
_BYTE v4[1272]; // [rsp+40h] [rbp-500h] BYREF
unsigned long long v5; // [rsp+538h] [rbp-8h]
v5 = __readfsqword(0x28u);
memset(v1, 0LL, 24LL);
if ( initialized )
{
return 0;
}
else
{
memset(v4, 0LL, sizeof(v4));
pthread_mutex_init(&LOCK_load_client_plugin, 0LL);
ma_init_alloc_root(mem_root, 128LL, 128LL);
memset(&plugin_list, 0LL, 64LL);
initialized = 1;
pthread_mutex_lock(&LOCK_load_client_plugin);
for ( i = &mysql_client_builtins; *i; ++i )
add_plugin(v4, *i, 0LL, 0LL, v1);
pthread_mutex_unlock(&LOCK_load_client_plugin);
load_env_plugins(v4);
return 0;
}
}
| mysql_client_plugin_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x540
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
LEA RDI,[RBP + -0x530]
XOR ESI,ESI
MOV EDX,0x18
CALL 0x00113250
CMP byte ptr [0x00161c60],0x0
JZ 0x00135573
MOV dword ptr [RBP + -0x504],0x0
JMP 0x00135644
LAB_00135573:
LEA RDI,[RBP + -0x500]
XOR ESI,ESI
MOV EDX,0x4f8
CALL 0x00113250
LEA RDI,[0x161c68]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00113670
LEA RDI,[0x161c90]
MOV EDX,0x80
MOV RSI,RDX
CALL 0x00124750
LEA RDI,[0x161cd0]
XOR ESI,ESI
MOV EDX,0x40
CALL 0x00113250
MOV byte ptr [0x00161c60],0x1
LEA RDI,[0x161c68]
CALL 0x00113660
LEA RAX,[0x15ede0]
MOV qword ptr [RBP + -0x510],RAX
LAB_001355de:
MOV RAX,qword ptr [RBP + -0x510]
CMP qword ptr [RAX],0x0
JZ 0x00135622
MOV RAX,qword ptr [RBP + -0x510]
MOV RSI,qword ptr [RAX]
LEA R8,[RBP + -0x530]
LEA RDI,[RBP + -0x500]
XOR EAX,EAX
MOV EDX,EAX
XOR ECX,ECX
CALL 0x00135680
MOV RAX,qword ptr [RBP + -0x510]
ADD RAX,0x8
MOV qword ptr [RBP + -0x510],RAX
JMP 0x001355de
LAB_00135622:
LEA RDI,[0x161c68]
CALL 0x00113310
LEA RDI,[RBP + -0x500]
CALL 0x001358b0
MOV dword ptr [RBP + -0x504],0x0
LAB_00135644:
MOV EAX,dword ptr [RBP + -0x504]
MOV dword ptr [RBP + -0x534],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00135671
MOV EAX,dword ptr [RBP + -0x534]
ADD RSP,0x540
POP RBP
RET
LAB_00135671:
CALL 0x001134b0
|
int4 mysql_client_plugin_init(void)
{
long in_FS_OFFSET;
int1 local_538 [32];
int **local_518;
int4 local_50c;
int1 local_508 [1272];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
memset(local_538,0,0x18);
if (initialized == '\0') {
memset(local_508,0,0x4f8);
pthread_mutex_init((pthread_mutex_t *)LOCK_load_client_plugin,(pthread_mutexattr_t *)0x0);
ma_init_alloc_root(mem_root);
memset(plugin_list,0,0x40);
initialized = '\x01';
pthread_mutex_lock((pthread_mutex_t *)LOCK_load_client_plugin);
for (local_518 = &mysql_client_builtins; *local_518 != (int *)0x0;
local_518 = local_518 + 1) {
add_plugin(local_508,*local_518,0,0,local_538);
}
pthread_mutex_unlock((pthread_mutex_t *)LOCK_load_client_plugin);
load_env_plugins(local_508);
}
local_50c = 0;
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return 0;
}
| |
43,842 | minja::SetNode::SetNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&) | monkey531[P]llama/common/minja.hpp | SetNode(const Location & location, const std::string & ns, const std::vector<std::string> & vns, std::shared_ptr<Expression> && v)
: TemplateNode(location), ns(ns), var_names(vns), value(std::move(v)) {} | O3 | cpp | minja::SetNode::SetNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movq %rdi, %rbx
leaq 0x8cff9(%rip), %r13 # 0x12afd8
addq $0x10, %r13
movq %r13, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0x9e00f
movq 0x8df87(%rip), %rcx # 0x12bf88
cmpb $0x0, (%rcx)
je 0x9e00b
incl 0x8(%rax)
jmp 0x9e00f
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rbx)
leaq 0x8d32a(%rip), %rax # 0x12b348
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x20(%rbx), %r12
leaq 0x30(%rbx), %rbp
movq %rbp, 0x20(%rbx)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x21b7e
leaq 0x40(%rbx), %rdi
movq %r15, %rsi
callq 0x54850
xorl %eax, %eax
movq %rax, 0x60(%rbx)
movups (%r14), %xmm0
movq %rax, 0x8(%r14)
movups %xmm0, 0x58(%rbx)
movq %rax, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%r12), %rdi
cmpq %rbp, %rdi
je 0x9e090
movq (%rbp), %rsi
incq %rsi
callq 0x1a8d0
jmp 0x9e090
movq %rax, %r14
movq %r13, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x9e0a1
callq 0x6d59a
movq %r14, %rdi
callq 0x1afc0
nop
| _ZN5minja7SetNodeC2ERKNS_8LocationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS9_SaIS9_EEOSt10shared_ptrINS_10ExpressionEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r8
mov r15, rcx
mov rbx, rdi
lea r13, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode
add r13, 10h
mov [rdi], r13
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_9E00F
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_9E00B
inc dword ptr [rax+8]
jmp short loc_9E00F
loc_9E00B:
lock inc dword ptr [rax+8]
loc_9E00F:
mov rax, [rsi+10h]
mov [rbx+18h], rax
lea rax, _ZTVN5minja7SetNodeE; `vtable for'minja::SetNode
add rax, 10h
mov [rbx], rax
lea r12, [rbx+20h]
lea rbp, [rbx+30h]
mov [rbx+20h], rbp
mov rsi, [rdx]
mov rdx, [rdx+8]
add rdx, rsi
mov rdi, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rdi, [rbx+40h]
mov rsi, r15
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&)
xor eax, eax
mov [rbx+60h], rax
movups xmm0, xmmword ptr [r14]
mov [r14+8], rax
movups xmmword ptr [rbx+58h], xmm0
mov [r14], rax
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, [r12]; void *
cmp rdi, rbp
jz short loc_9E090
mov rsi, [rbp+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9E090
mov r14, rax
loc_9E090:
mov [rbx], r13
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_9E0A1
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9E0A1:
mov rdi, r14
call __Unwind_Resume
| long long minja::SetNode::SetNode(long long a1, _QWORD *a2, long long a3, _QWORD *a4, __int128 *a5)
{
long long v7; // rax
long long result; // rax
__int128 v9; // xmm0
*(_QWORD *)a1 = &`vtable for'minja::TemplateNode + 2;
*(_QWORD *)(a1 + 8) = *a2;
v7 = a2[1];
*(_QWORD *)(a1 + 16) = v7;
if ( v7 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v7 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v7 + 8));
}
*(_QWORD *)(a1 + 24) = a2[2];
*(_QWORD *)a1 = &`vtable for'minja::SetNode + 2;
*(_QWORD *)(a1 + 32) = a1 + 48;
std::string::_M_construct<char *>(a1 + 32, *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8));
std::vector<std::string>::vector(a1 + 64, a4);
result = 0LL;
*(_QWORD *)(a1 + 96) = 0LL;
v9 = *a5;
*((_QWORD *)a5 + 1) = 0LL;
*(_OWORD *)(a1 + 88) = v9;
*(_QWORD *)a5 = 0LL;
return result;
}
| SetNode:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R8
MOV R15,RCX
MOV RBX,RDI
LEA R13,[0x22afd8]
ADD R13,0x10
MOV qword ptr [RDI],R13
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],RAX
TEST RAX,RAX
JZ 0x0019e00f
MOV RCX,qword ptr [0x0022bf88]
CMP byte ptr [RCX],0x0
JZ 0x0019e00b
INC dword ptr [RAX + 0x8]
JMP 0x0019e00f
LAB_0019e00b:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0019e00f:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RBX + 0x18],RAX
LEA RAX,[0x22b348]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
LEA R12,[RBX + 0x20]
LEA RBP,[RBX + 0x30]
MOV qword ptr [RBX + 0x20],RBP
MOV RSI,qword ptr [RDX]
MOV RDX,qword ptr [RDX + 0x8]
ADD RDX,RSI
LAB_0019e03b:
MOV RDI,R12
CALL 0x00121b7e
LEA RDI,[RBX + 0x40]
LAB_0019e047:
MOV RSI,R15
CALL 0x00154850
LAB_0019e04f:
XOR EAX,EAX
MOV qword ptr [RBX + 0x60],RAX
MOVUPS XMM0,xmmword ptr [R14]
MOV qword ptr [R14 + 0x8],RAX
MOVUPS xmmword ptr [RBX + 0x58],XMM0
MOV qword ptr [R14],RAX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::SetNode::SetNode(minja::Location const&, std::__cxx11::string const&,
std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&,
std::shared_ptr<minja::Expression>&&) */
void __thiscall
minja::SetNode::SetNode
(SetNode *this,Location *param_1,string *param_2,vector *param_3,shared_ptr *param_4)
{
long lVar1;
int8 uVar2;
*(int ***)this = &PTR___cxa_pure_virtual_0022afe8;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_0022bf88 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10);
*(int ***)this = &PTR_do_render_0022b358;
*(SetNode **)(this + 0x20) = this + 0x30;
/* try { // try from 0019e03b to 0019e042 has its CatchHandler @ 0019e08d */
std::__cxx11::string::_M_construct<char*>
(this + 0x20,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2);
/* try { // try from 0019e047 to 0019e04e has its CatchHandler @ 0019e073 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x40),
param_3);
*(int8 *)(this + 0x60) = 0;
uVar2 = *(int8 *)(param_4 + 8);
*(int8 *)(param_4 + 8) = 0;
*(int8 *)(this + 0x58) = *(int8 *)param_4;
*(int8 *)(this + 0x60) = uVar2;
*(int8 *)param_4 = 0;
return;
}
| |
43,843 | my_interval_timer | eloqsql/mysys/my_getsystime.c | ulonglong my_interval_timer()
{
#ifdef HAVE_CLOCK_GETTIME
struct timespec tp;
clock_gettime(CLOCK_MONOTONIC, &tp);
return tp.tv_sec*1000000000ULL+tp.tv_nsec;
#elif defined(HAVE_GETHRTIME)
return gethrtime();
#elif defined(_WIN32)
DBUG_ASSERT(query_performance_frequency);
LARGE_INTEGER t_cnt;
QueryPerformanceCounter(&t_cnt);
return (t_cnt.QuadPart / query_performance_frequency * 1000000000ULL) +
((t_cnt.QuadPart % query_performance_frequency) * 1000000000ULL /
query_performance_frequency);
#else
/* TODO: check for other possibilities for hi-res timestamping */
struct timeval tv;
gettimeofday(&tv,NULL);
return tv.tv_sec*1000000000ULL+tv.tv_usec*1000ULL;
#endif
} | O0 | c | my_interval_timer:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x1, %edi
leaq -0x10(%rbp), %rsi
callq 0x252c0
imulq $0x3b9aca00, -0x10(%rbp), %rax # imm = 0x3B9ACA00
addq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| my_interval_timer:
push rbp
mov rbp, rsp
sub rsp, 10h
mov edi, 1
lea rsi, [rbp+var_10]
call _clock_gettime
imul rax, [rbp+var_10], 3B9ACA00h
add rax, [rbp+var_8]
add rsp, 10h
pop rbp
retn
| long long my_interval_timer()
{
_QWORD v1[2]; // [rsp+0h] [rbp-10h] BYREF
clock_gettime(1LL, v1);
return v1[1] + 1000000000LL * v1[0];
}
| my_interval_timer:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV EDI,0x1
LEA RSI,[RBP + -0x10]
CALL 0x001252c0
IMUL RAX,qword ptr [RBP + -0x10],0x3b9aca00
ADD RAX,qword ptr [RBP + -0x8]
ADD RSP,0x10
POP RBP
RET
|
long my_interval_timer(void)
{
timespec local_18;
clock_gettime(1,&local_18);
return local_18.tv_sec * 1000000000 + local_18.tv_nsec;
}
| |
43,844 | my_string_repertoire | eloqsql/strings/ctype.c | my_repertoire_t
my_string_repertoire(CHARSET_INFO *cs, const char *str, size_t length)
{
if (cs->mbminlen == 1 && !(cs->state & MY_CS_NONASCII))
{
return my_string_repertoire_8bit(cs, str, length);
}
else
{
const char *strend= str + length;
my_wc_t wc;
int chlen;
for (;
(chlen= my_ci_mb_wc(cs, &wc, (uchar*) str, (uchar*) strend)) > 0;
str+= chlen)
{
if (wc > 0x7F)
return MY_REPERTOIRE_UNICODE30;
}
}
return MY_REPERTOIRE_ASCII;
} | O0 | c | my_string_repertoire:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, 0x98(%rax)
jne 0x6f998
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x2000, %eax # imm = 0x2000
cmpl $0x0, %eax
jne 0x6f998
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x6f740
movl %eax, -0x4(%rbp)
jmp 0x6f9fb
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq -0x30(%rbp), %rsi
callq *%rax
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
jle 0x6f9f2
cmpq $0x7f, -0x30(%rbp)
jbe 0x6f9dd
movl $0x3, -0x4(%rbp)
jmp 0x6f9fb
jmp 0x6f9df
movl -0x34(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x6f9a4
jmp 0x6f9f4
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_string_repertoire:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
cmp dword ptr [rax+98h], 1
jnz short loc_6F998
mov rax, [rbp+var_10]
mov eax, [rax+0Ch]
and eax, 2000h
cmp eax, 0
jnz short loc_6F998
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call my_string_repertoire_8bit
mov [rbp+var_4], eax
jmp short loc_6F9FB
loc_6F998:
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_28], rax
loc_6F9A4:
mov rax, [rbp+var_10]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_28]
lea rsi, [rbp+var_30]
call rax
mov [rbp+var_34], eax
cmp eax, 0
jle short loc_6F9F2
cmp [rbp+var_30], 7Fh
jbe short loc_6F9DD
mov [rbp+var_4], 3
jmp short loc_6F9FB
loc_6F9DD:
jmp short $+2
loc_6F9DF:
mov ecx, [rbp+var_34]
mov rax, [rbp+var_18]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_18], rax
jmp short loc_6F9A4
loc_6F9F2:
jmp short $+2
loc_6F9F4:
mov [rbp+var_4], 1
loc_6F9FB:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long my_string_repertoire(long long a1, unsigned __int8 *a2, long long a3)
{
int v4; // [rsp+Ch] [rbp-34h]
unsigned long long v5; // [rsp+10h] [rbp-30h] BYREF
unsigned __int8 *v6; // [rsp+18h] [rbp-28h]
long long v7; // [rsp+20h] [rbp-20h]
unsigned __int8 *v8; // [rsp+28h] [rbp-18h]
long long v9; // [rsp+30h] [rbp-10h]
v9 = a1;
v8 = a2;
v7 = a3;
if ( *(_DWORD *)(a1 + 152) != 1 || (*(_DWORD *)(v9 + 12) & 0x2000) != 0 )
{
v6 = &v8[v7];
while ( 1 )
{
v4 = (*(long long ( **)(long long, unsigned long long *, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(v9 + 184) + 40LL))(
v9,
&v5,
v8,
v6);
if ( v4 <= 0 )
break;
if ( v5 > 0x7F )
return 3;
v8 += v4;
}
return 1;
}
else
{
return (unsigned int)my_string_repertoire_8bit(v9, v8, v7);
}
}
| my_string_repertoire:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x98],0x1
JNZ 0x0016f998
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,0x2000
CMP EAX,0x0
JNZ 0x0016f998
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x0016f740
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0016f9fb
LAB_0016f998:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x28],RAX
LAB_0016f9a4:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x28]
LEA RSI,[RBP + -0x30]
CALL RAX
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
JLE 0x0016f9f2
CMP qword ptr [RBP + -0x30],0x7f
JBE 0x0016f9dd
MOV dword ptr [RBP + -0x4],0x3
JMP 0x0016f9fb
LAB_0016f9dd:
JMP 0x0016f9df
LAB_0016f9df:
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0016f9a4
LAB_0016f9f2:
JMP 0x0016f9f4
LAB_0016f9f4:
MOV dword ptr [RBP + -0x4],0x1
LAB_0016f9fb:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int4 my_string_repertoire(long param_1,long param_2,long param_3)
{
int iVar1;
ulong local_38;
long local_30;
long local_28;
long local_20;
long local_18;
int4 local_c;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
if ((*(int *)(param_1 + 0x98) == 1) && ((*(uint *)(param_1 + 0xc) & 0x2000) == 0)) {
local_c = my_string_repertoire_8bit(param_1,param_2,param_3);
}
else {
local_30 = param_2 + param_3;
while (iVar1 = (**(code **)(*(long *)(local_18 + 0xb8) + 0x28))
(local_18,&local_38,local_20,local_30), 0 < iVar1) {
if (0x7f < local_38) {
return 3;
}
local_20 = local_20 + iVar1;
}
local_c = 1;
}
return local_c;
}
| |
43,845 | std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> string_split<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char) | monkey531[P]llama/common/common.h | std::vector<std::string> string_split<std::string>(const std::string & input, char separator)
{
std::vector<std::string> parts;
size_t begin_pos = 0;
size_t separator_pos = input.find(separator);
while (separator_pos != std::string::npos) {
std::string part = input.substr(begin_pos, separator_pos - begin_pos);
parts.emplace_back(part);
begin_pos = separator_pos + 1;
separator_pos = input.find(separator, begin_pos);
}
parts.emplace_back(input.substr(begin_pos, separator_pos - begin_pos));
return parts;
} | O0 | 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):
subq $0x88, %rsp
movq %rdi, (%rsp)
movb %dl, %al
movq %rdi, %rcx
movq %rcx, 0x8(%rsp)
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movb %al, 0x77(%rsp)
movb $0x0, 0x76(%rsp)
callq 0x655f0
movq $0x0, 0x68(%rsp)
movq 0x78(%rsp), %rdi
xorl %eax, %eax
movl %eax, %edx
movsbl 0x77(%rsp), %esi
callq 0x5b370
movq %rax, 0x60(%rsp)
cmpq $-0x1, 0x60(%rsp)
je 0x86a3d
movq 0x78(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq 0x60(%rsp), %rcx
subq %rdx, %rcx
leaq 0x40(%rsp), %rdi
callq 0x5b1e0
jmp 0x869cb
movq (%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x982e0
jmp 0x869db
movq 0x60(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x68(%rsp)
movq 0x78(%rsp), %rdi
movb 0x77(%rsp), %al
movq 0x68(%rsp), %rdx
movsbl %al, %esi
callq 0x5b370
movq %rax, 0x60(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x5b648
jmp 0x869a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
jmp 0x86ab3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x5b648
jmp 0x86ab3
movq 0x78(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq 0x60(%rsp), %rcx
subq %rdx, %rcx
leaq 0x10(%rsp), %rdi
callq 0x5b1e0
jmp 0x86a5b
movq (%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x98360
jmp 0x86a6b
leaq 0x10(%rsp), %rdi
callq 0x5b648
movb $0x1, 0x76(%rsp)
testb $0x1, 0x76(%rsp)
jne 0x86aa6
jmp 0x86a9d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x5b648
jmp 0x86ab3
movq (%rsp), %rdi
callq 0x65630
movq 0x8(%rsp), %rax
addq $0x88, %rsp
retq
movq (%rsp), %rdi
callq 0x65630
movq 0x38(%rsp), %rdi
callq 0x5ac00
nopw %cs:(%rax,%rax)
| _ZL12string_splitINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIT_SaIS7_EERKS5_c:
sub rsp, 88h
mov [rsp+88h+var_88], rdi
mov al, dl
mov rcx, rdi
mov [rsp+88h+var_80], rcx
mov [rsp+88h+var_8], rdi
mov [rsp+88h+var_10], rsi
mov [rsp+88h+var_11], al
mov [rsp+88h+var_12], 0
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev; std::vector<std::string>::vector(void)
mov [rsp+88h+var_20], 0
mov rdi, [rsp+88h+var_10]
xor eax, eax
mov edx, eax
movsx esi, [rsp+88h+var_11]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
mov [rsp+88h+var_28], rax
loc_869A1:
cmp [rsp+88h+var_28], 0FFFFFFFFFFFFFFFFh
jz loc_86A3D
mov rsi, [rsp+88h+var_10]
mov rdx, [rsp+88h+var_20]
mov rcx, [rsp+88h+var_28]
sub rcx, rdx
lea rdi, [rsp+88h+var_48]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
jmp short $+2
loc_869CB:
mov rdi, [rsp+88h+var_88]
lea rsi, [rsp+88h+var_48]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJRS5_EEES9_DpOT_; std::vector<std::string>::emplace_back<std::string&>(std::string&)
jmp short $+2
loc_869DB:
mov rax, [rsp+88h+var_28]
add rax, 1
mov [rsp+88h+var_20], rax
mov rdi, [rsp+88h+var_10]
mov al, [rsp+88h+var_11]
mov rdx, [rsp+88h+var_20]
movsx esi, al
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
mov [rsp+88h+var_28], rax
lea rdi, [rsp+88h+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_869A1
mov rcx, rax
mov eax, edx
mov [rsp+arg_30], rcx
mov [rsp+arg_2C], eax
jmp loc_86AB3
mov rcx, rax
mov eax, edx
mov [rsp+arg_30], rcx
mov [rsp+arg_2C], eax
lea rdi, [rsp+arg_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_86AB3
loc_86A3D:
mov rsi, [rsp+88h+var_10]
mov rdx, [rsp+88h+var_20]
mov rcx, [rsp+88h+var_28]
sub rcx, rdx
lea rdi, [rsp+88h+var_78]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
jmp short $+2
loc_86A5B:
mov rdi, [rsp+88h+var_88]
lea rsi, [rsp+88h+var_78]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
jmp short $+2
loc_86A6B:
lea rdi, [rsp+88h+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov [rsp+88h+var_12], 1
test [rsp+88h+var_12], 1
jnz short loc_86AA6
jmp short loc_86A9D
mov rcx, rax
mov eax, edx
mov [rsp+arg_30], rcx
mov [rsp+arg_2C], eax
lea rdi, [rsp+arg_8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_86AB3
loc_86A9D:
mov rdi, [rsp+88h+var_88]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
loc_86AA6:
mov rax, [rsp+88h+var_80]
add rsp, 88h
retn
loc_86AB3:
mov rdi, [rsp+0]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, [rsp+arg_30]
call __Unwind_Resume
| long long string_split<std::string>(long long a1, long long a2, char a3)
{
_BYTE v4[48]; // [rsp+10h] [rbp-78h] BYREF
_BYTE v5[32]; // [rsp+40h] [rbp-48h] BYREF
long long v6; // [rsp+60h] [rbp-28h]
long long v7; // [rsp+68h] [rbp-20h]
char v8; // [rsp+76h] [rbp-12h]
char v9; // [rsp+77h] [rbp-11h]
long long v10; // [rsp+78h] [rbp-10h]
long long v11; // [rsp+80h] [rbp-8h]
v11 = a1;
v10 = a2;
v9 = a3;
v8 = 0;
std::vector<std::string>::vector(a1);
v7 = 0LL;
v6 = std::string::find(a2, (unsigned int)v9, 0LL);
while ( v6 != -1 )
{
std::string::substr(v5, v10, v7, v6 - v7);
std::vector<std::string>::emplace_back<std::string&>(a1, v5);
v7 = v6 + 1;
v6 = std::string::find(v10, (unsigned int)v9, v6 + 1);
std::string::~string(v5);
}
std::string::substr(v4, v10, v7, -1 - v7);
std::vector<std::string>::emplace_back<std::string>(a1, v4);
std::string::~string(v4);
return a1;
}
| string_split<std::__cxx11::string>:
SUB RSP,0x88
MOV qword ptr [RSP],RDI
MOV AL,DL
MOV RCX,RDI
MOV qword ptr [RSP + 0x8],RCX
MOV qword ptr [RSP + 0x80],RDI
MOV qword ptr [RSP + 0x78],RSI
MOV byte ptr [RSP + 0x77],AL
MOV byte ptr [RSP + 0x76],0x0
CALL 0x001655f0
MOV qword ptr [RSP + 0x68],0x0
MOV RDI,qword ptr [RSP + 0x78]
XOR EAX,EAX
MOV EDX,EAX
MOVSX ESI,byte ptr [RSP + 0x77]
CALL 0x0015b370
MOV qword ptr [RSP + 0x60],RAX
LAB_001869a1:
CMP qword ptr [RSP + 0x60],-0x1
JZ 0x00186a3d
MOV RSI,qword ptr [RSP + 0x78]
MOV RDX,qword ptr [RSP + 0x68]
MOV RCX,qword ptr [RSP + 0x60]
SUB RCX,RDX
LAB_001869bf:
LEA RDI,[RSP + 0x40]
CALL 0x0015b1e0
JMP 0x001869cb
LAB_001869cb:
MOV RDI,qword ptr [RSP]
LEA RSI,[RSP + 0x40]
CALL 0x001982e0
JMP 0x001869db
LAB_001869db:
MOV RAX,qword ptr [RSP + 0x60]
ADD RAX,0x1
MOV qword ptr [RSP + 0x68],RAX
MOV RDI,qword ptr [RSP + 0x78]
MOV AL,byte ptr [RSP + 0x77]
MOV RDX,qword ptr [RSP + 0x68]
MOVSX ESI,AL
CALL 0x0015b370
MOV qword ptr [RSP + 0x60],RAX
LEA RDI,[RSP + 0x40]
CALL 0x0015b648
JMP 0x001869a1
LAB_00186a3d:
MOV RSI,qword ptr [RSP + 0x78]
MOV RDX,qword ptr [RSP + 0x68]
MOV RCX,qword ptr [RSP + 0x60]
SUB RCX,RDX
LAB_00186a4f:
LEA RDI,[RSP + 0x10]
CALL 0x0015b1e0
JMP 0x00186a5b
LAB_00186a5b:
MOV RDI,qword ptr [RSP]
LEA RSI,[RSP + 0x10]
CALL 0x00198360
LAB_00186a69:
JMP 0x00186a6b
LAB_00186a6b:
LEA RDI,[RSP + 0x10]
CALL 0x0015b648
MOV byte ptr [RSP + 0x76],0x1
TEST byte ptr [RSP + 0x76],0x1
JNZ 0x00186aa6
JMP 0x00186a9d
LAB_00186a9d:
MOV RDI,qword ptr [RSP]
CALL 0x00165630
LAB_00186aa6:
MOV RAX,qword ptr [RSP + 0x8]
ADD RSP,0x88
RET
|
/* WARNING: Removing unreachable block (ram,0x00186a81) */
/* std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >
string_split<std::__cxx11::string >(std::__cxx11::string const&, char) */
string * string_split<std::__cxx11::string>(string *param_1,char param_2)
{
char in_DL;
int7 in_register_00000031;
string local_78 [48];
string local_48 [32];
long local_28;
long local_20;
int1 local_12;
char local_11;
ulong local_10;
string *local_8;
local_10 = CONCAT71(in_register_00000031,param_2);
local_12 = 0;
local_11 = in_DL;
local_8 = param_1;
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1);
local_20 = 0;
local_28 = std::__cxx11::string::find((char)local_10,(ulong)(uint)(int)local_11);
while (local_28 != -1) {
/* try { // try from 001869bf to 001869c8 has its CatchHandler @ 00186a10 */
std::__cxx11::string::substr((ulong)local_48,local_10);
/* try { // try from 001869cb to 001869d8 has its CatchHandler @ 00186a23 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string&>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1,local_48
);
local_20 = local_28 + 1;
local_28 = std::__cxx11::string::find((char)local_10,(ulong)(uint)(int)local_11);
std::__cxx11::string::~string(local_48);
}
/* try { // try from 00186a4f to 00186a58 has its CatchHandler @ 00186a10 */
std::__cxx11::string::substr((ulong)local_78,local_10);
/* try { // try from 00186a5b to 00186a68 has its CatchHandler @ 00186a83 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1,local_78);
std::__cxx11::string::~string(local_78);
return param_1;
}
| |
43,846 | lunasvg::SVGFitToViewBox::getClipRect(lunasvg::Size const&) const | dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp | Rect SVGFitToViewBox::getClipRect(const Size& viewportSize) const
{
const auto& viewBoxRect = m_viewBox.value();
if(viewBoxRect.isEmpty() || viewportSize.isEmpty())
return Rect(0, 0, viewportSize.w, viewportSize.h);
return m_preserveAspectRatio.getClipRect(viewBoxRect, viewportSize);
} | O1 | cpp | lunasvg::SVGFitToViewBox::getClipRect(lunasvg::Size const&) const:
movq %rsi, %rdx
xorps %xmm0, %xmm0
ucomiss 0x14(%rdi), %xmm0
jae 0x101a0
ucomiss 0x18(%rdi), %xmm0
jae 0x101a0
ucomiss (%rdx), %xmm0
jae 0x101a0
ucomiss 0x4(%rdx), %xmm0
jae 0x101a0
pushq %rax
leaq 0xc(%rdi), %rsi
addq $0x20, %rdi
callq 0x2027e
addq $0x8, %rsp
retq
movsd (%rdx), %xmm1
xorps %xmm0, %xmm0
retq
| _ZNK7lunasvg15SVGFitToViewBox11getClipRectERKNS_4SizeE:
mov rdx, rsi
xorps xmm0, xmm0
ucomiss xmm0, dword ptr [rdi+14h]
jnb short loc_101A0
ucomiss xmm0, dword ptr [rdi+18h]
jnb short loc_101A0
ucomiss xmm0, dword ptr [rdx]
jnb short loc_101A0
ucomiss xmm0, dword ptr [rdx+4]
jnb short loc_101A0
push rax
lea rsi, [rdi+0Ch]
add rdi, 20h ; ' '
call _ZNK7lunasvg22SVGPreserveAspectRatio11getClipRectERKNS_4RectERKNS_4SizeE; lunasvg::SVGPreserveAspectRatio::getClipRect(lunasvg::Rect const&,lunasvg::Size const&)
add rsp, 8
retn
loc_101A0:
movsd xmm1, qword ptr [rdx]
xorps xmm0, xmm0
retn
| double lunasvg::SVGFitToViewBox::getClipRect(long long a1, float *a2)
{
double result; // xmm0_8
result = 0.0;
if ( *(float *)(a1 + 20) <= 0.0 || *(float *)(a1 + 24) <= 0.0 || *a2 <= 0.0 || a2[1] <= 0.0 )
return 0.0;
lunasvg::SVGPreserveAspectRatio::getClipRect(a1 + 32, a1 + 12, a2);
return result;
}
| getClipRect:
MOV RDX,RSI
XORPS XMM0,XMM0
UCOMISS XMM0,dword ptr [RDI + 0x14]
JNC 0x001101a0
UCOMISS XMM0,dword ptr [RDI + 0x18]
JNC 0x001101a0
UCOMISS XMM0,dword ptr [RDX]
JNC 0x001101a0
UCOMISS XMM0,dword ptr [RDX + 0x4]
JNC 0x001101a0
PUSH RAX
LEA RSI,[RDI + 0xc]
ADD RDI,0x20
CALL 0x0012027e
ADD RSP,0x8
RET
LAB_001101a0:
MOVSD XMM1,qword ptr [RDX]
XORPS XMM0,XMM0
RET
|
/* lunasvg::SVGFitToViewBox::getClipRect(lunasvg::Size const&) const */
int8 __thiscall lunasvg::SVGFitToViewBox::getClipRect(SVGFitToViewBox *this,Size *param_1)
{
int8 uVar1;
if ((((0.0 < *(float *)(this + 0x14)) && (0.0 < *(float *)(this + 0x18))) &&
(0.0 < *(float *)param_1)) && (0.0 < *(float *)(param_1 + 4))) {
uVar1 = SVGPreserveAspectRatio::getClipRect
((SVGPreserveAspectRatio *)(this + 0x20),(Rect *)(this + 0xc),param_1);
return uVar1;
}
return 0;
}
| |
43,847 | std::vector<unsigned int, std::allocator<unsigned int>> alaya::find_exact_gt<float, float, unsigned int>(std::vector<float, std::allocator<float>> const&, std::vector<float, std::allocator<float>> const&, unsigned int, unsigned int, std::unordered_set<unsigned int, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<unsigned int>>*) | AlayaLite/include/utils/evaluate.hpp | auto find_exact_gt(const std::vector<DataType> &queries, const std::vector<DataType> &data_view,
uint32_t dim, uint32_t topk,
std::unordered_set<IDType> *deleted = nullptr) -> std::vector<IDType> {
if (queries.empty() || data_view.empty() || queries.size() % dim != 0 ||
data_view.size() % dim != 0) {
LOG_ERROR("The input data to find ground truth is invalid.");
return {};
}
auto query_num = queries.size() / dim;
auto data_num = data_view.size() / dim;
std::vector<IDType> res(topk * query_num, 0);
for (IDType i = 0; i < query_num; i++) {
std::vector<std::pair<IDType, DistanceType>> dists;
for (uint32_t j = 0; j < data_view.size() / dim; j++) {
if (deleted && deleted->find(j) != deleted->end()) {
continue;
}
float dist = l2_sqr(queries.data() + i * dim, data_view.data() + j * dim, dim);
dists.emplace_back(j, dist);
}
std::sort(dists.begin(), dists.end(),
[](const auto &lhs, const auto &rhs) { return lhs.second < rhs.second; });
for (uint32_t j = 0; j < topk; j++) {
res[i * topk + j] = dists[j].first;
}
}
return res;
} | O0 | cpp | std::vector<unsigned int, std::allocator<unsigned int>> alaya::find_exact_gt<float, float, unsigned int>(std::vector<float, std::allocator<float>> const&, std::vector<float, std::allocator<float>> const&, unsigned int, unsigned int, std::unordered_set<unsigned int, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<unsigned int>>*):
subq $0x198, %rsp # imm = 0x198
movq %rdi, 0x60(%rsp)
movq %rdi, %rax
movq %rax, 0x68(%rsp)
movq %rdi, 0x190(%rsp)
movq %rsi, 0x188(%rsp)
movq %rdx, 0x180(%rsp)
movl %ecx, 0x17c(%rsp)
movl %r8d, 0x178(%rsp)
movq %r9, 0x170(%rsp)
movq 0x188(%rsp), %rdi
callq 0x598d0
testb $0x1, %al
jne 0x579b7
movq 0x180(%rsp), %rdi
callq 0x598d0
testb $0x1, %al
jne 0x579b7
movq 0x188(%rsp), %rdi
callq 0x1c440
movl 0x17c(%rsp), %ecx
xorl %edx, %edx
divq %rcx
cmpq $0x0, %rdx
jne 0x579b7
movq 0x180(%rsp), %rdi
callq 0x1c440
movl 0x17c(%rsp), %ecx
xorl %edx, %edx
divq %rcx
cmpq $0x0, %rdx
je 0x57b7a
leaq 0xf72ab(%rip), %rax # 0x14ec69
movq %rax, 0x160(%rsp)
movq $0x3f, 0x168(%rsp)
leaq 0x11f(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0x15de0
movq 0x58(%rsp), %rdx
leaq 0xf72b9(%rip), %rsi # 0x14eca9
leaq 0x120(%rsp), %rdi
callq 0x1bd40
jmp 0x579ff
leaq 0xe7(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0x15de0
movq 0x50(%rsp), %rdx
leaq 0xf58ae(%rip), %rsi # 0x14d2cb
leaq 0xe8(%rsp), %rdi
callq 0x1bd40
jmp 0x57a2c
leaq 0x140(%rsp), %rdi
leaq 0x120(%rsp), %rsi
leaq 0xe8(%rsp), %rdx
callq 0x1c330
jmp 0x57a4b
movl $0x23, 0xe0(%rsp)
movq 0x160(%rsp), %rdi
movq 0x168(%rsp), %rsi
leaq 0x140(%rsp), %rdx
leaq 0xe0(%rsp), %rcx
callq 0x59920
jmp 0x57a7d
leaq 0x140(%rsp), %rdi
callq 0x1c160
leaq 0xe8(%rsp), %rdi
callq 0x1c160
leaq 0xe7(%rsp), %rdi
callq 0x157f0
leaq 0x120(%rsp), %rdi
callq 0x1c160
leaq 0x11f(%rsp), %rdi
callq 0x157f0
movq 0x60(%rsp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x15400
movq 0x60(%rsp), %rdi
callq 0x1fd40
jmp 0x57eec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
jmp 0x57b68
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
jmp 0x57b4e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
jmp 0x57b41
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
leaq 0x140(%rsp), %rdi
callq 0x1c160
leaq 0xe8(%rsp), %rdi
callq 0x1c160
leaq 0xe7(%rsp), %rdi
callq 0x157f0
leaq 0x120(%rsp), %rdi
callq 0x1c160
leaq 0x11f(%rsp), %rdi
callq 0x157f0
jmp 0x57ef9
movq 0x188(%rsp), %rdi
callq 0x1c440
movl 0x17c(%rsp), %ecx
xorl %edx, %edx
movq %rdx, 0x38(%rsp)
divq %rcx
movq %rax, 0xd8(%rsp)
movq 0x180(%rsp), %rdi
callq 0x1c440
movq 0x38(%rsp), %rdx
movl 0x17c(%rsp), %ecx
divq %rcx
movq %rax, 0xd0(%rsp)
movb $0x0, 0xcf(%rsp)
movl 0x178(%rsp), %eax
movq 0xd8(%rsp), %rcx
imulq %rcx, %rax
movq %rax, 0x40(%rsp)
movl $0x0, 0xc8(%rsp)
leaq 0xc7(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x1df70
movq 0x60(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rcx
leaq 0xc8(%rsp), %rdx
callq 0x2c410
jmp 0x57c1f
leaq 0xc7(%rsp), %rdi
callq 0x1e000
movl $0x0, 0xc0(%rsp)
movl 0xc0(%rsp), %eax
cmpq 0xd8(%rsp), %rax
jae 0x57ece
leaq 0xa8(%rsp), %rdi
callq 0x59980
movl $0x0, 0xa4(%rsp)
movl 0xa4(%rsp), %eax
movq %rax, 0x30(%rsp)
movq 0x180(%rsp), %rdi
callq 0x1c440
movl 0x17c(%rsp), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq 0x30(%rsp), %rax
cmpq %rcx, %rax
jae 0x57e0c
xorl %eax, %eax
cmpq $0x0, 0x170(%rsp)
movb %al, 0x2f(%rsp)
je 0x57d04
movq 0x170(%rsp), %rdi
leaq 0xa4(%rsp), %rsi
callq 0x599b0
movq %rax, 0x20(%rsp)
jmp 0x57cc7
movq 0x20(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x170(%rsp), %rdi
callq 0x599e0
movq %rax, 0x90(%rsp)
leaq 0x98(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x59990
xorb $-0x1, %al
movb %al, 0x2f(%rsp)
movb 0x2f(%rsp), %al
testb $0x1, %al
jne 0x57d0e
jmp 0x57d69
jmp 0x57df6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
leaq 0xc7(%rsp), %rdi
callq 0x1e000
jmp 0x57ef9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0x59c00
movq 0x60(%rsp), %rdi
callq 0x1e170
jmp 0x57ef9
movq 0x188(%rsp), %rdi
callq 0x59a90
movl 0xc0(%rsp), %ecx
movl 0x17c(%rsp), %edx
imull %edx, %ecx
leaq (%rax,%rcx,4), %rax
movq %rax, 0x10(%rsp)
movq 0x180(%rsp), %rdi
callq 0x59a90
movq 0x10(%rsp), %rdi
movl 0xa4(%rsp), %ecx
movl 0x17c(%rsp), %edx
movl %edx, %esi
imull %esi, %ecx
leaq (%rax,%rcx,4), %rsi
callq 0x59a10
movss %xmm0, 0x1c(%rsp)
jmp 0x57dc6
movss 0x1c(%rsp), %xmm0
movss %xmm0, 0x8c(%rsp)
leaq 0xa8(%rsp), %rdi
leaq 0xa4(%rsp), %rsi
leaq 0x8c(%rsp), %rdx
callq 0x59ab0
jmp 0x57df4
jmp 0x57df6
movl 0xa4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xa4(%rsp)
jmp 0x57c64
leaq 0xa8(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x59b80
movq 0x8(%rsp), %rdi
movq %rax, 0x80(%rsp)
callq 0x59bb0
movq %rax, 0x78(%rsp)
movq 0x80(%rsp), %rdi
movq 0x78(%rsp), %rsi
callq 0x59b40
jmp 0x57e49
movl $0x0, 0x70(%rsp)
movl 0x70(%rsp), %eax
cmpl 0x178(%rsp), %eax
jae 0x57eab
movl 0x70(%rsp), %eax
movl %eax, %esi
leaq 0xa8(%rsp), %rdi
callq 0x59be0
movq 0x60(%rsp), %rdi
movl (%rax), %eax
movl %eax, 0x4(%rsp)
movl 0xc0(%rsp), %eax
imull 0x178(%rsp), %eax
addl 0x70(%rsp), %eax
movl %eax, %eax
movl %eax, %esi
callq 0x1e040
movl 0x4(%rsp), %ecx
movl %ecx, (%rax)
movl 0x70(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x70(%rsp)
jmp 0x57e51
leaq 0xa8(%rsp), %rdi
callq 0x59c00
movl 0xc0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc0(%rsp)
jmp 0x57c37
movb $0x1, 0xcf(%rsp)
testb $0x1, 0xcf(%rsp)
jne 0x57eea
movq 0x60(%rsp), %rdi
callq 0x1e170
jmp 0x57eec
movq 0x68(%rsp), %rax
addq $0x198, %rsp # imm = 0x198
retq
movq 0x110(%rsp), %rdi
callq 0x15dd0
nopw %cs:(%rax,%rax)
| _ZN5alaya13find_exact_gtIffjEESt6vectorIT1_SaIS2_EERKS1_IT_SaIS5_EES9_jjPSt13unordered_setIS2_St4hashIS2_ESt8equal_toIS2_ES3_E:
sub rsp, 198h
mov qword ptr [rsp+198h+var_138], rdi; int
mov rax, rdi
mov qword ptr [rsp+198h+var_130], rax; int
mov [rsp+198h+var_8], rdi
mov [rsp+198h+var_10], rsi
mov [rsp+198h+var_18], rdx
mov [rsp+198h+var_1C], ecx
mov [rsp+198h+var_20], r8d
mov [rsp+198h+var_28], r9
mov rdi, [rsp+198h+var_10]
call _ZNKSt6vectorIfSaIfEE5emptyEv; std::vector<float>::empty(void)
test al, 1
jnz short loc_579B7
mov rdi, [rsp+198h+var_18]
call _ZNKSt6vectorIfSaIfEE5emptyEv; std::vector<float>::empty(void)
test al, 1
jnz short loc_579B7
mov rdi, [rsp+198h+var_10]
call _ZNKSt6vectorIfSaIfEE4sizeEv; std::vector<float>::size(void)
mov ecx, [rsp+198h+var_1C]
xor edx, edx
div rcx
cmp rdx, 0
jnz short loc_579B7
mov rdi, [rsp+198h+var_18]
call _ZNKSt6vectorIfSaIfEE4sizeEv; std::vector<float>::size(void)
mov ecx, [rsp+198h+var_1C]
xor edx, edx
div rcx
cmp rdx, 0
jz loc_57B7A
loc_579B7:
lea rax, aAlayaTheInputD; "[Alaya] [{}:{}] The input data to find "...
mov [rsp+198h+var_38], rax
mov [rsp+198h+var_30], 3Fh ; '?'
lea rdi, [rsp+198h+var_79]
mov qword ptr [rsp+198h+var_140], rdi; int
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, qword ptr [rsp+198h+var_140]
lea rsi, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/AlayaL"...
lea rdi, [rsp+198h+var_79+1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_579FF:
lea rdi, [rsp+198h+var_B1]
mov qword ptr [rsp+198h+var_148], rdi; int
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, qword ptr [rsp+198h+var_148]
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github2025/AlayaL"...
lea rdi, [rsp+198h+var_B1+1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_57A2C:
lea rdi, [rsp+198h+var_58]; std::filesystem::__cxx11::path::_List *
lea rsi, [rsp+198h+var_79+1]
lea rdx, [rsp+198h+var_B1+1]
call _Z17get_relative_pathRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_; get_relative_path(std::string const&,std::string const&)
jmp short $+2
loc_57A4B:
mov [rsp+198h+var_B8], 23h ; '#'
mov rdi, [rsp+198h+var_38]
mov rsi, [rsp+198h+var_30]
lea rdx, [rsp+198h+var_58]
lea rcx, [rsp+198h+var_B8]
call _ZN6spdlog5errorIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEEEvN3fmt3v1019basic_format_stringIcJDpNS8_13type_identityIT_E4typeEEEEDpOSB_; spdlog::error<std::string,int>(fmt::v10::basic_format_string<char,fmt::v10::type_identity<std::string,int>::type>,std::string,int&&)
jmp short $+2
loc_57A7D:
lea rdi, [rsp+198h+var_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+198h+var_B1+1]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+198h+var_B1]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rsp+198h+var_79+1]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+198h+var_79]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rdi, qword ptr [rsp+198h+var_138]
xor esi, esi
mov edx, 18h
call _memset
mov rdi, qword ptr [rsp+198h+var_138]
call _ZNSt6vectorIjSaIjEEC2Ev; std::vector<uint>::vector(void)
jmp loc_57EEC
mov rcx, rax
mov eax, edx
mov [rsp+arg_108], rcx
mov [rsp+arg_104], eax
jmp short loc_57B68
mov rcx, rax
mov eax, edx
mov [rsp+arg_108], rcx
mov [rsp+arg_104], eax
jmp short loc_57B4E
mov rcx, rax
mov eax, edx
mov [rsp+arg_108], rcx
mov [rsp+arg_104], eax
jmp short loc_57B41
mov rcx, rax
mov eax, edx
mov [rsp+arg_108], rcx
mov [rsp+arg_104], eax
lea rdi, [rsp+arg_138]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_57B41:
lea rdi, [rsp+arg_E0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_57B4E:
lea rdi, [rsp+arg_DF]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rsp+arg_118]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_57B68:
lea rdi, [rsp+arg_117]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_57EF9
loc_57B7A:
mov rdi, [rsp+198h+var_10]
call _ZNKSt6vectorIfSaIfEE4sizeEv; std::vector<float>::size(void)
mov ecx, [rsp+198h+var_1C]
xor edx, edx
mov [rsp+198h+var_160], rdx
div rcx
mov [rsp+198h+var_C0], rax
mov rdi, [rsp+198h+var_18]
call _ZNKSt6vectorIfSaIfEE4sizeEv; std::vector<float>::size(void)
mov rdx, [rsp+198h+var_160]
mov ecx, [rsp+198h+var_1C]
div rcx
mov [rsp+198h+var_C8], rax
mov [rsp+198h+var_C9], 0
mov eax, [rsp+198h+var_20]
mov rcx, [rsp+198h+var_C0]
imul rax, rcx
mov [rsp+198h+var_158], rax
mov [rsp+198h+var_D0], 0
lea rdi, [rsp+198h+var_D1]
mov [rsp+198h+var_150], rdi
call _ZNSaIjEC2Ev; std::allocator<uint>::allocator(void)
mov rdi, qword ptr [rsp+198h+var_138]
mov rsi, [rsp+198h+var_158]
mov rcx, [rsp+198h+var_150]
lea rdx, [rsp+198h+var_D0]
call _ZNSt6vectorIjSaIjEEC2EmRKjRKS0_; std::vector<uint>::vector(ulong,uint const&,std::allocator<uint> const&)
jmp short $+2
loc_57C1F:
lea rdi, [rsp+198h+var_D1]
call _ZNSaIjED2Ev; std::allocator<uint>::~allocator()
mov [rsp+198h+var_D8], 0
loc_57C37:
mov eax, [rsp+198h+var_D8]
cmp rax, [rsp+198h+var_C0]
jnb loc_57ECE
lea rdi, [rsp+198h+var_F0]
call _ZNSt6vectorISt4pairIjfESaIS1_EEC2Ev; std::vector<std::pair<uint,float>>::vector(void)
mov [rsp+198h+var_F4], 0
loc_57C64:
mov eax, [rsp+198h+var_F4]
mov [rsp+198h+var_168], rax
mov rdi, [rsp+198h+var_18]
call _ZNKSt6vectorIfSaIfEE4sizeEv; std::vector<float>::size(void)
mov ecx, [rsp+198h+var_1C]
xor edx, edx
div rcx
mov rcx, rax
mov rax, [rsp+198h+var_168]
cmp rax, rcx
jnb loc_57E0C
xor eax, eax
cmp [rsp+198h+var_28], 0
mov [rsp+198h+var_169], al
jz short loc_57D04
mov rdi, [rsp+198h+var_28]
lea rsi, [rsp+198h+var_F4]
call _ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE4findERKj; std::unordered_set<uint>::find(uint const&)
mov [rsp+198h+var_178], rax
jmp short $+2
loc_57CC7:
mov rax, [rsp+198h+var_178]
mov [rsp+198h+var_100], rax
mov rdi, [rsp+198h+var_28]
call _ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE3endEv; std::unordered_set<uint>::end(void)
mov [rsp+198h+var_108], rax
lea rdi, [rsp+198h+var_100]
lea rsi, [rsp+198h+var_108]
call _ZNSt8__detaileqERKNS_19_Node_iterator_baseIjLb0EEES3_; std::__detail::operator==(std::__detail::_Node_iterator_base<uint,false> const&,std::__detail::_Node_iterator_base<uint,false> const&)
xor al, 0FFh
mov [rsp+198h+var_169], al
loc_57D04:
mov al, [rsp+198h+var_169]
test al, 1
jnz short loc_57D0E
jmp short loc_57D69
loc_57D0E:
jmp loc_57DF6
mov rcx, rax
mov eax, edx
mov [rsp+arg_108], rcx
mov [rsp+arg_104], eax
lea rdi, [rsp+arg_BF]
call _ZNSaIjED2Ev; std::allocator<uint>::~allocator()
jmp loc_57EF9
mov rcx, rax
mov eax, edx
mov [rsp+arg_108], rcx
mov [rsp+arg_104], eax
lea rdi, [rsp+arg_A0]
call _ZNSt6vectorISt4pairIjfESaIS1_EED2Ev; std::vector<std::pair<uint,float>>::~vector()
mov rdi, [rsp+arg_58]
call _ZNSt6vectorIjSaIjEED2Ev; std::vector<uint>::~vector()
jmp loc_57EF9
loc_57D69:
mov rdi, [rsp+198h+var_10]
call _ZNKSt6vectorIfSaIfEE4dataEv; std::vector<float>::data(void)
mov ecx, [rsp+198h+var_D8]
mov edx, [rsp+198h+var_1C]
imul ecx, edx
lea rax, [rax+rcx*4]
mov [rsp+198h+var_188], rax
mov rdi, [rsp+198h+var_18]
call _ZNKSt6vectorIfSaIfEE4dataEv; std::vector<float>::data(void)
mov rdi, [rsp+198h+var_188]
mov ecx, [rsp+198h+var_F4]
mov edx, [rsp+198h+var_1C]
mov esi, edx
imul ecx, esi
lea rsi, [rax+rcx*4]
call _ZN5alaya6l2_sqrIKffEET0_PT_S4_m; alaya::l2_sqr<float const,float>(float const *,float const *,ulong)
movss [rsp+198h+var_17C], xmm0
jmp short $+2
loc_57DC6:
movss xmm0, [rsp+198h+var_17C]
movss [rsp+198h+var_10C], xmm0
lea rdi, [rsp+198h+var_F0]
lea rsi, [rsp+198h+var_F4]
lea rdx, [rsp+198h+var_10C]
call _ZNSt6vectorISt4pairIjfESaIS1_EE12emplace_backIJRjRfEEERS1_DpOT_; std::vector<std::pair<uint,float>>::emplace_back<uint &,float &>(uint &,float &)
jmp short $+2
loc_57DF4:
jmp short $+2
loc_57DF6:
mov eax, [rsp+198h+var_F4]
add eax, 1
mov [rsp+198h+var_F4], eax
jmp loc_57C64
loc_57E0C:
lea rdi, [rsp+198h+var_F0]
mov [rsp+198h+var_190], rdi
call _ZNSt6vectorISt4pairIjfESaIS1_EE5beginEv; std::vector<std::pair<uint,float>>::begin(void)
mov rdi, [rsp+198h+var_190]
mov [rsp+198h+var_118], rax
call _ZNSt6vectorISt4pairIjfESaIS1_EE3endEv; std::vector<std::pair<uint,float>>::end(void)
mov [rsp+198h+var_120], rax
mov rdi, [rsp+198h+var_118]
mov rsi, [rsp+198h+var_120]
call _ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIjfESt6vectorIS3_SaIS3_EEEEZN5alaya13find_exact_gtIffjEES5_IT1_SaISB_EERKS5_IT_SaISE_EESI_jjPSt13unordered_setISB_St4hashISB_ESt8equal_toISB_ESC_EEUlRKSE_RKT0_E_EvSE_SE_SS_
jmp short $+2
loc_57E49:
mov [rsp+198h+var_128], 0
loc_57E51:
mov eax, [rsp+198h+var_128]
cmp eax, [rsp+198h+var_20]
jnb short loc_57EAB
mov eax, [rsp+198h+var_128]
mov esi, eax
lea rdi, [rsp+198h+var_F0]
call _ZNSt6vectorISt4pairIjfESaIS1_EEixEm; std::vector<std::pair<uint,float>>::operator[](ulong)
mov rdi, qword ptr [rsp+198h+var_138]
mov eax, [rax]
mov [rsp+198h+var_194], eax
mov eax, [rsp+198h+var_D8]
imul eax, [rsp+198h+var_20]
add eax, [rsp+198h+var_128]
mov eax, eax
mov esi, eax
call _ZNSt6vectorIjSaIjEEixEm; std::vector<uint>::operator[](ulong)
mov ecx, [rsp+198h+var_194]
mov [rax], ecx
mov eax, [rsp+198h+var_128]
add eax, 1
mov [rsp+198h+var_128], eax
jmp short loc_57E51
loc_57EAB:
lea rdi, [rsp+198h+var_F0]
call _ZNSt6vectorISt4pairIjfESaIS1_EED2Ev; std::vector<std::pair<uint,float>>::~vector()
mov eax, [rsp+198h+var_D8]
add eax, 1
mov [rsp+198h+var_D8], eax
jmp loc_57C37
loc_57ECE:
mov [rsp+198h+var_C9], 1
test [rsp+198h+var_C9], 1
jnz short loc_57EEA
mov rdi, qword ptr [rsp+198h+var_138]
call _ZNSt6vectorIjSaIjEED2Ev; std::vector<uint>::~vector()
loc_57EEA:
jmp short $+2
loc_57EEC:
mov rax, qword ptr [rsp+198h+var_130]
add rsp, 198h
retn
loc_57EF9:
mov rdi, [rsp+arg_108]
call __Unwind_Resume
| _QWORD * alaya::find_exact_gt<float,float,unsigned int>(
_QWORD *a1,
_QWORD *a2,
_QWORD *a3,
unsigned int a4,
unsigned int a5,
long long a6)
{
unsigned long long v6; // rdx
long long v7; // rdx
int v8; // ecx
int v9; // r8d
int v10; // r9d
long long v11; // rsi
long long p_j; // rsi
unsigned long long v13; // rax
unsigned long long v14; // rdx
long long v15; // rax
long long v16; // rax
int v18; // [rsp+4h] [rbp-194h]
long long v19; // [rsp+10h] [rbp-188h]
char v20; // [rsp+2Fh] [rbp-169h]
unsigned long long v21; // [rsp+30h] [rbp-168h]
long long v22; // [rsp+40h] [rbp-158h]
unsigned int k; // [rsp+70h] [rbp-128h]
long long v24; // [rsp+80h] [rbp-118h]
float v25; // [rsp+8Ch] [rbp-10Ch] BYREF
long long v26; // [rsp+90h] [rbp-108h] BYREF
long long v27; // [rsp+98h] [rbp-100h] BYREF
unsigned int j; // [rsp+A4h] [rbp-F4h] BYREF
_BYTE v29[24]; // [rsp+A8h] [rbp-F0h] BYREF
unsigned int i; // [rsp+C0h] [rbp-D8h]
char v31; // [rsp+C7h] [rbp-D1h] BYREF
int v32; // [rsp+C8h] [rbp-D0h] BYREF
char v33; // [rsp+CFh] [rbp-C9h]
unsigned long long v34; // [rsp+D0h] [rbp-C8h]
unsigned long long v35; // [rsp+D8h] [rbp-C0h]
int v36; // [rsp+E0h] [rbp-B8h] BYREF
int v37[14]; // [rsp+E7h] [rbp-B1h] BYREF
int v38[8]; // [rsp+11Fh] [rbp-79h] BYREF
_BYTE v39[32]; // [rsp+140h] [rbp-58h] BYREF
const char *v40; // [rsp+160h] [rbp-38h]
long long v41; // [rsp+168h] [rbp-30h]
long long v42; // [rsp+170h] [rbp-28h]
unsigned int v43; // [rsp+178h] [rbp-20h]
unsigned int v44; // [rsp+17Ch] [rbp-1Ch]
_QWORD *v45; // [rsp+180h] [rbp-18h]
_QWORD *v46; // [rsp+188h] [rbp-10h]
_QWORD *v47; // [rsp+190h] [rbp-8h]
v47 = a1;
v46 = a2;
v45 = a3;
v44 = a4;
v43 = a5;
v42 = a6;
if ( (std::vector<float>::empty(a2) & 1) != 0
|| (std::vector<float>::empty(v45) & 1) != 0
|| (v6 = std::vector<float>::size(v46) % (unsigned long long)v44) != 0
|| (v6 = std::vector<float>::size(v45) % (unsigned long long)v44) != 0 )
{
v40 = "[Alaya] [{}:{}] The input data to find ground truth is invalid.";
v41 = 63LL;
std::allocator<char>::allocator(v38, a2, v6);
std::string::basic_string<std::allocator<char>>(
(long long)v38 + 1,
(long long)"/workspace/llm4binary/github2025/AlayaLite/include/utils/evaluate.hpp",
(long long)v38);
std::allocator<char>::allocator(v37, "/workspace/llm4binary/github2025/AlayaLite/include/utils/evaluate.hpp", v7);
std::string::basic_string<std::allocator<char>>(
(long long)v37 + 1,
(long long)"/workspace/llm4binary/github2025/AlayaLite",
(long long)v37);
get_relative_path((std::filesystem::__cxx11::path::_List *)v39, (long long)v38 + 1, (long long)v37 + 1, v8, v9, v10);
v36 = 35;
v11 = v41;
spdlog::error<std::string,int>(v40, v41, v39, &v36);
std::string::~string(v39);
std::string::~string((char *)v37 + 1);
std::allocator<char>::~allocator(v37, v11);
std::string::~string((char *)v38 + 1);
std::allocator<char>::~allocator(v38, v11);
memset(a1, 0LL, 24LL);
std::vector<unsigned int>::vector((long long)a1);
}
else
{
v35 = std::vector<float>::size(v46) / (unsigned long long)v44;
v34 = std::vector<float>::size(v45) / (unsigned long long)v44;
v33 = 0;
v22 = v35 * v43;
v32 = 0;
std::allocator<unsigned int>::allocator((long long)&v31);
p_j = v22;
std::vector<unsigned int>::vector((long long)a1, v22, (long long)&v32, (long long)&v31);
std::allocator<unsigned int>::~allocator();
for ( i = 0; i < v35; ++i )
{
std::vector<std::pair<unsigned int,float>>::vector(v29);
for ( j = 0; ; ++j )
{
v21 = j;
v13 = std::vector<float>::size(v45);
v14 = v13 % v44;
if ( v21 >= v13 / v44 )
break;
v20 = 0;
if ( v42 )
{
v27 = std::unordered_set<unsigned int>::find(v42, &j, v14);
v26 = std::unordered_set<unsigned int>::end(v42);
p_j = (long long)&v26;
v20 = ~(unsigned __int8)std::__detail::operator==(&v27, &v26);
}
if ( (v20 & 1) == 0 )
{
v15 = std::vector<float>::data(v46, p_j, v14);
v19 = v15 + 4LL * v44 * i;
v16 = std::vector<float>::data(v45, p_j, v44);
v25 = alaya::l2_sqr<float const,float>(v19, v16 + 4LL * v44 * j);
p_j = (long long)&j;
std::vector<std::pair<unsigned int,float>>::emplace_back<unsigned int &,float &>(v29, &j, &v25);
}
}
v24 = std::vector<std::pair<unsigned int,float>>::begin(v29, p_j, v14);
p_j = std::vector<std::pair<unsigned int,float>>::end(v29);
ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIjfESt6vectorIS3_SaIS3_EEEEZN5alaya13find_exact_gtIffjEES5_IT1_SaISB_EERKS5_IT_SaISE_EESI_jjPSt13unordered_setISB_St4hashISB_ESt8equal_toISB_ESC_EEUlRKSE_RKT0_E_EvSE_SE_SS_(
v24,
p_j);
for ( k = 0; k < v43; ++k )
{
v18 = *(_DWORD *)std::vector<std::pair<unsigned int,float>>::operator[](v29, k);
p_j = k + v43 * i;
*(_DWORD *)std::vector<unsigned int>::operator[](a1, p_j) = v18;
}
std::vector<std::pair<unsigned int,float>>::~vector(v29);
}
v33 = 1;
}
return a1;
}
| find_exact_gt<float,float,unsigned_int>:
SUB RSP,0x198
MOV qword ptr [RSP + 0x60],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x68],RAX
MOV qword ptr [RSP + 0x190],RDI
MOV qword ptr [RSP + 0x188],RSI
MOV qword ptr [RSP + 0x180],RDX
MOV dword ptr [RSP + 0x17c],ECX
MOV dword ptr [RSP + 0x178],R8D
MOV qword ptr [RSP + 0x170],R9
MOV RDI,qword ptr [RSP + 0x188]
CALL 0x001598d0
TEST AL,0x1
JNZ 0x001579b7
MOV RDI,qword ptr [RSP + 0x180]
CALL 0x001598d0
TEST AL,0x1
JNZ 0x001579b7
MOV RDI,qword ptr [RSP + 0x188]
CALL 0x0011c440
MOV ECX,dword ptr [RSP + 0x17c]
XOR EDX,EDX
DIV RCX
CMP RDX,0x0
JNZ 0x001579b7
MOV RDI,qword ptr [RSP + 0x180]
CALL 0x0011c440
MOV ECX,dword ptr [RSP + 0x17c]
XOR EDX,EDX
DIV RCX
CMP RDX,0x0
JZ 0x00157b7a
LAB_001579b7:
LEA RAX,[0x24ec69]
MOV qword ptr [RSP + 0x160],RAX
MOV qword ptr [RSP + 0x168],0x3f
LEA RDI,[RSP + 0x11f]
MOV qword ptr [RSP + 0x58],RDI
CALL 0x00115de0
MOV RDX,qword ptr [RSP + 0x58]
LAB_001579e9:
LEA RSI,[0x24eca9]
LEA RDI,[RSP + 0x120]
CALL 0x0011bd40
JMP 0x001579ff
LAB_001579ff:
LEA RDI,[RSP + 0xe7]
MOV qword ptr [RSP + 0x50],RDI
CALL 0x00115de0
MOV RDX,qword ptr [RSP + 0x50]
LAB_00157a16:
LEA RSI,[0x24d2cb]
LEA RDI,[RSP + 0xe8]
CALL 0x0011bd40
JMP 0x00157a2c
LAB_00157a2c:
LEA RDI,[RSP + 0x140]
LEA RSI,[RSP + 0x120]
LEA RDX,[RSP + 0xe8]
CALL 0x0011c330
JMP 0x00157a4b
LAB_00157a4b:
MOV dword ptr [RSP + 0xe0],0x23
MOV RDI,qword ptr [RSP + 0x160]
MOV RSI,qword ptr [RSP + 0x168]
LAB_00157a66:
LEA RDX,[RSP + 0x140]
LEA RCX,[RSP + 0xe0]
CALL 0x00159920
LAB_00157a7b:
JMP 0x00157a7d
LAB_00157a7d:
LEA RDI,[RSP + 0x140]
CALL 0x0011c160
LEA RDI,[RSP + 0xe8]
CALL 0x0011c160
LEA RDI,[RSP + 0xe7]
CALL 0x001157f0
LEA RDI,[RSP + 0x120]
CALL 0x0011c160
LEA RDI,[RSP + 0x11f]
CALL 0x001157f0
MOV RDI,qword ptr [RSP + 0x60]
XOR ESI,ESI
MOV EDX,0x18
CALL 0x00115400
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x0011fd40
JMP 0x00157eec
LAB_00157b7a:
MOV RDI,qword ptr [RSP + 0x188]
CALL 0x0011c440
MOV ECX,dword ptr [RSP + 0x17c]
XOR EDX,EDX
MOV qword ptr [RSP + 0x38],RDX
DIV RCX
MOV qword ptr [RSP + 0xd8],RAX
MOV RDI,qword ptr [RSP + 0x180]
CALL 0x0011c440
MOV RDX,qword ptr [RSP + 0x38]
MOV ECX,dword ptr [RSP + 0x17c]
DIV RCX
MOV qword ptr [RSP + 0xd0],RAX
MOV byte ptr [RSP + 0xcf],0x0
MOV EAX,dword ptr [RSP + 0x178]
MOV RCX,qword ptr [RSP + 0xd8]
IMUL RAX,RCX
MOV qword ptr [RSP + 0x40],RAX
MOV dword ptr [RSP + 0xc8],0x0
LEA RDI,[RSP + 0xc7]
MOV qword ptr [RSP + 0x48],RDI
CALL 0x0011df70
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RSP + 0x48]
LAB_00157c10:
LEA RDX,[RSP + 0xc8]
CALL 0x0012c410
JMP 0x00157c1f
LAB_00157c1f:
LEA RDI,[RSP + 0xc7]
CALL 0x0011e000
MOV dword ptr [RSP + 0xc0],0x0
LAB_00157c37:
MOV EAX,dword ptr [RSP + 0xc0]
CMP RAX,qword ptr [RSP + 0xd8]
JNC 0x00157ece
LEA RDI,[RSP + 0xa8]
CALL 0x00159980
MOV dword ptr [RSP + 0xa4],0x0
LAB_00157c64:
MOV EAX,dword ptr [RSP + 0xa4]
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0x180]
CALL 0x0011c440
MOV ECX,dword ptr [RSP + 0x17c]
XOR EDX,EDX
DIV RCX
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x30]
CMP RAX,RCX
JNC 0x00157e0c
XOR EAX,EAX
CMP qword ptr [RSP + 0x170],0x0
MOV byte ptr [RSP + 0x2f],AL
JZ 0x00157d04
MOV RDI,qword ptr [RSP + 0x170]
LAB_00157cb3:
LEA RSI,[RSP + 0xa4]
CALL 0x001599b0
MOV qword ptr [RSP + 0x20],RAX
JMP 0x00157cc7
LAB_00157cc7:
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x98],RAX
MOV RDI,qword ptr [RSP + 0x170]
CALL 0x001599e0
MOV qword ptr [RSP + 0x90],RAX
LEA RDI,[RSP + 0x98]
LEA RSI,[RSP + 0x90]
CALL 0x00159990
XOR AL,0xff
MOV byte ptr [RSP + 0x2f],AL
LAB_00157d04:
MOV AL,byte ptr [RSP + 0x2f]
TEST AL,0x1
JNZ 0x00157d0e
JMP 0x00157d69
LAB_00157d0e:
JMP 0x00157df6
LAB_00157d69:
MOV RDI,qword ptr [RSP + 0x188]
CALL 0x00159a90
MOV ECX,dword ptr [RSP + 0xc0]
MOV EDX,dword ptr [RSP + 0x17c]
IMUL ECX,EDX
LEA RAX,[RAX + RCX*0x4]
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x180]
CALL 0x00159a90
MOV RDI,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP + 0xa4]
MOV EDX,dword ptr [RSP + 0x17c]
MOV ESI,EDX
IMUL ECX,ESI
LEA RSI,[RAX + RCX*0x4]
CALL 0x00159a10
MOVSS dword ptr [RSP + 0x1c],XMM0
JMP 0x00157dc6
LAB_00157dc6:
MOVSS XMM0,dword ptr [RSP + 0x1c]
MOVSS dword ptr [RSP + 0x8c],XMM0
LEA RDI,[RSP + 0xa8]
LEA RSI,[RSP + 0xa4]
LEA RDX,[RSP + 0x8c]
CALL 0x00159ab0
JMP 0x00157df4
LAB_00157df4:
JMP 0x00157df6
LAB_00157df6:
MOV EAX,dword ptr [RSP + 0xa4]
ADD EAX,0x1
MOV dword ptr [RSP + 0xa4],EAX
JMP 0x00157c64
LAB_00157e0c:
LEA RDI,[RSP + 0xa8]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x00159b80
MOV RDI,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x80],RAX
CALL 0x00159bb0
MOV qword ptr [RSP + 0x78],RAX
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x78]
CALL 0x00159b40
LAB_00157e47:
JMP 0x00157e49
LAB_00157e49:
MOV dword ptr [RSP + 0x70],0x0
LAB_00157e51:
MOV EAX,dword ptr [RSP + 0x70]
CMP EAX,dword ptr [RSP + 0x178]
JNC 0x00157eab
MOV EAX,dword ptr [RSP + 0x70]
MOV ESI,EAX
LEA RDI,[RSP + 0xa8]
CALL 0x00159be0
MOV RDI,qword ptr [RSP + 0x60]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x4],EAX
MOV EAX,dword ptr [RSP + 0xc0]
IMUL EAX,dword ptr [RSP + 0x178]
ADD EAX,dword ptr [RSP + 0x70]
MOV EAX,EAX
MOV ESI,EAX
CALL 0x0011e040
MOV ECX,dword ptr [RSP + 0x4]
MOV dword ptr [RAX],ECX
MOV EAX,dword ptr [RSP + 0x70]
ADD EAX,0x1
MOV dword ptr [RSP + 0x70],EAX
JMP 0x00157e51
LAB_00157eab:
LEA RDI,[RSP + 0xa8]
CALL 0x00159c00
MOV EAX,dword ptr [RSP + 0xc0]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc0],EAX
JMP 0x00157c37
LAB_00157ece:
MOV byte ptr [RSP + 0xcf],0x1
TEST byte ptr [RSP + 0xcf],0x1
JNZ 0x00157eea
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x0011e170
LAB_00157eea:
JMP 0x00157eec
LAB_00157eec:
MOV RAX,qword ptr [RSP + 0x68]
ADD RSP,0x198
RET
|
/* WARNING: Removing unreachable block (ram,0x00157ee0) */
/* std::vector<unsigned int, std::allocator<unsigned int> > alaya::find_exact_gt<float, float,
unsigned int>(std::vector<float, std::allocator<float> > const&, std::vector<float,
std::allocator<float> > const&, unsigned int, unsigned int, std::unordered_set<unsigned int,
std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<unsigned int> >*) */
alaya * __thiscall
alaya::find_exact_gt<float,float,unsigned_int>
(alaya *this,vector *param_1,vector *param_2,uint param_3,uint param_4,
unordered_set *param_5)
{
int4 uVar1;
ulong uVar2;
ulong uVar3;
long lVar4;
long lVar5;
int8 uVar6;
int8 uVar7;
int4 *puVar8;
uint uVar9;
byte local_169;
uint local_128;
float local_10c;
int8 local_108;
int8 local_100;
uint local_f4;
vector<std::pair<unsigned_int,float>,std::allocator<std::pair<unsigned_int,float>>> local_f0 [24];
uint local_d8;
allocator<unsigned_int> local_d1;
uint local_d0;
int1 local_c9;
ulong local_c8;
ulong local_c0;
int4 local_b8;
allocator local_b1;
string local_b0 [55];
allocator local_79;
string local_78 [32];
string local_58 [32];
spdlog *local_38;
int8 local_30;
unordered_set *local_28;
uint local_20;
uint local_1c;
vector<float,std::allocator<float>> *local_18;
vector *local_10;
alaya *local_8;
local_28 = param_5;
local_20 = param_4;
local_1c = param_3;
local_18 = (vector<float,std::allocator<float>> *)param_2;
local_10 = param_1;
local_8 = this;
uVar2 = std::vector<float,std::allocator<float>>::empty
((vector<float,std::allocator<float>> *)param_1);
if (((((uVar2 & 1) == 0) &&
(uVar2 = std::vector<float,std::allocator<float>>::empty(local_18), (uVar2 & 1) == 0)) &&
(uVar2 = std::vector<float,std::allocator<float>>::size
((vector<float,std::allocator<float>> *)local_10),
uVar2 % (ulong)local_1c == 0)) &&
(uVar2 = std::vector<float,std::allocator<float>>::size(local_18), uVar2 % (ulong)local_1c == 0
)) {
local_c0 = std::vector<float,std::allocator<float>>::size
((vector<float,std::allocator<float>> *)local_10);
local_c0 = local_c0 / local_1c;
local_c8 = std::vector<float,std::allocator<float>>::size(local_18);
local_c8 = local_c8 / local_1c;
local_c9 = 0;
uVar2 = local_20 * local_c0;
local_d0 = 0;
std::allocator<unsigned_int>::allocator(&local_d1);
/* try { // try from 00157c10 to 00157c1c has its CatchHandler @ 00157d13 */
std::vector<unsigned_int,std::allocator<unsigned_int>>::vector
((vector<unsigned_int,std::allocator<unsigned_int>> *)this,uVar2,&local_d0,
(allocator *)&local_d1);
std::allocator<unsigned_int>::~allocator(&local_d1);
for (local_d8 = 0; local_d8 < local_c0; local_d8 = local_d8 + 1) {
std::vector<std::pair<unsigned_int,float>,std::allocator<std::pair<unsigned_int,float>>>::
vector(local_f0);
for (local_f4 = 0; uVar2 = (ulong)local_f4,
uVar3 = std::vector<float,std::allocator<float>>::size(local_18), uVar2 < uVar3 / local_1c
; local_f4 = local_f4 + 1) {
local_169 = 0;
if (local_28 != (unordered_set *)0x0) {
/* try { // try from 00157cb3 to 00157e46 has its CatchHandler @ 00157d39 */
local_100 = std::
unordered_set<unsigned_int,std::hash<unsigned_int>,std::equal_to<unsigned_int>,std::allocator<unsigned_int>>
::find((unordered_set<unsigned_int,std::hash<unsigned_int>,std::equal_to<unsigned_int>,std::allocator<unsigned_int>>
*)local_28,&local_f4);
local_108 = std::
unordered_set<unsigned_int,std::hash<unsigned_int>,std::equal_to<unsigned_int>,std::allocator<unsigned_int>>
::end();
local_169 = std::__detail::operator==
((_Node_iterator_base *)&local_100,(_Node_iterator_base *)&local_108
);
local_169 = local_169 ^ 0xff;
}
if ((local_169 & 1) == 0) {
lVar4 = std::vector<float,std::allocator<float>>::data
((vector<float,std::allocator<float>> *)local_10);
uVar9 = local_d8 * local_1c;
lVar5 = std::vector<float,std::allocator<float>>::data(local_18);
local_10c = l2_sqr<float_const,float>
((float *)(lVar4 + (ulong)uVar9 * 4),
(float *)(lVar5 + (ulong)(local_f4 * local_1c) * 4),(ulong)local_1c
);
std::vector<std::pair<unsigned_int,float>,std::allocator<std::pair<unsigned_int,float>>>::
emplace_back<unsigned_int&,float&>(local_f0,&local_f4,&local_10c);
}
}
uVar6 = std::
vector<std::pair<unsigned_int,float>,std::allocator<std::pair<unsigned_int,float>>>::
begin(local_f0);
uVar7 = std::
vector<std::pair<unsigned_int,float>,std::allocator<std::pair<unsigned_int,float>>>::
end(local_f0);
std::
sort<__gnu_cxx::__normal_iterator<std::pair<unsigned_int,float>*,std::vector<std::pair<unsigned_int,float>,std::allocator<std::pair<unsigned_int,float>>>>,alaya::find_exact_gt<float,float,unsigned_int>(std::vector<float,std::allocator<float>>const&,std::vector<float,std::allocator<float>>const&,unsigned_int,unsigned_int,std::unordered_set<unsigned_int,std::hash<unsigned_int>,std::equal_to<unsigned_int>,std::allocator<unsigned_int>>*)::_lambda(auto:1_const&,auto:2_const&)_1_>
(uVar6,uVar7);
for (local_128 = 0; local_128 < local_20; local_128 = local_128 + 1) {
puVar8 = (int4 *)
std::
vector<std::pair<unsigned_int,float>,std::allocator<std::pair<unsigned_int,float>>>
::operator[](local_f0,(ulong)local_128);
uVar1 = *puVar8;
puVar8 = (int4 *)
std::vector<unsigned_int,std::allocator<unsigned_int>>::operator[]
((vector<unsigned_int,std::allocator<unsigned_int>> *)this,
(ulong)(local_d8 * local_20 + local_128));
*puVar8 = uVar1;
}
std::vector<std::pair<unsigned_int,float>,std::allocator<std::pair<unsigned_int,float>>>::
~vector(local_f0);
}
}
else {
local_38 = (spdlog *)0x24ec69;
local_30 = 0x3f;
std::allocator<char>::allocator();
/* try { // try from 001579e9 to 001579fc has its CatchHandler @ 00157ade */
std::__cxx11::string::string<std::allocator<char>>
(local_78,"/workspace/llm4binary/github2025/AlayaLite/include/utils/evaluate.hpp",
&local_79);
std::allocator<char>::allocator();
/* try { // try from 00157a16 to 00157a29 has its CatchHandler @ 00157af4 */
std::__cxx11::string::string<std::allocator<char>>
(local_b0,"/workspace/llm4binary/github2025/AlayaLite",&local_b1);
/* try { // try from 00157a2c to 00157a48 has its CatchHandler @ 00157b0a */
get_relative_path(local_58,local_78);
local_b8 = 0x23;
/* try { // try from 00157a66 to 00157a7a has its CatchHandler @ 00157b20 */
spdlog::error<std::__cxx11::string,int>(local_38,local_30,local_58,&local_b8);
std::__cxx11::string::~string(local_58);
std::__cxx11::string::~string(local_b0);
std::allocator<char>::~allocator((allocator<char> *)&local_b1);
std::__cxx11::string::~string(local_78);
std::allocator<char>::~allocator((allocator<char> *)&local_79);
memset(this,0,0x18);
std::vector<unsigned_int,std::allocator<unsigned_int>>::vector
((vector<unsigned_int,std::allocator<unsigned_int>> *)this);
}
return this;
}
| |
43,848 | WindowDropCallback | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/platforms/rcore_desktop_glfw.c | static void WindowDropCallback(GLFWwindow *window, int count, const char **paths)
{
if (count > 0)
{
// In case previous dropped filepaths have not been freed, we free them
if (CORE.Window.dropFileCount > 0)
{
for (unsigned int i = 0; i < CORE.Window.dropFileCount; i++) RL_FREE(CORE.Window.dropFilepaths[i]);
RL_FREE(CORE.Window.dropFilepaths);
CORE.Window.dropFileCount = 0;
CORE.Window.dropFilepaths = NULL;
}
// WARNING: Paths are freed by GLFW when the callback returns, we must keep an internal copy
CORE.Window.dropFileCount = count;
CORE.Window.dropFilepaths = (char **)RL_CALLOC(CORE.Window.dropFileCount, sizeof(char *));
for (unsigned int i = 0; i < CORE.Window.dropFileCount; i++)
{
CORE.Window.dropFilepaths[i] = (char *)RL_CALLOC(MAX_FILEPATH_LENGTH, sizeof(char));
strcpy(CORE.Window.dropFilepaths[i], paths[i]);
}
}
} | O0 | c | WindowDropCallback:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0xcc2c6
cmpl $0x0, 0x14eb3c(%rip) # 0x21ad30
jbe 0xcc247
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl 0x14eb2a(%rip), %eax # 0x21ad30
jae 0xcc226
movq 0x14eb19(%rip), %rax # 0x21ad28
movl -0x1c(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
callq 0xa640
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xcc1fd
movq 0x14eafb(%rip), %rdi # 0x21ad28
callq 0xa640
movl $0x0, 0x14eaf4(%rip) # 0x21ad30
movq $0x0, 0x14eae1(%rip) # 0x21ad28
movl -0xc(%rbp), %eax
movl %eax, 0x14eae0(%rip) # 0x21ad30
movl 0x14eada(%rip), %eax # 0x21ad30
movl %eax, %edi
movl $0x8, %esi
callq 0xa340
movq %rax, 0x14eabf(%rip) # 0x21ad28
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl 0x14eab7(%rip), %eax # 0x21ad30
jae 0xcc2c4
movl $0x1000, %edi # imm = 0x1000
movl $0x1, %esi
callq 0xa340
movq %rax, %rdx
movq 0x14ea94(%rip), %rax # 0x21ad28
movl -0x20(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movq 0x14ea86(%rip), %rax # 0x21ad28
movl -0x20(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rax
movl -0x20(%rbp), %ecx
movq (%rax,%rcx,8), %rsi
callq 0xa4a0
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xcc270
jmp 0xcc2c6
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| WindowDropCallback:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
cmp [rbp+var_C], 0
jle loc_CC2C6
cmp cs:dword_21AD30, 0
jbe short loc_CC247
mov [rbp+var_1C], 0
loc_CC1FD:
mov eax, [rbp+var_1C]
cmp eax, cs:dword_21AD30
jnb short loc_CC226
mov rax, cs:qword_21AD28
mov ecx, [rbp+var_1C]
mov rdi, [rax+rcx*8]
call _free
mov eax, [rbp+var_1C]
add eax, 1
mov [rbp+var_1C], eax
jmp short loc_CC1FD
loc_CC226:
mov rdi, cs:qword_21AD28
call _free
mov cs:dword_21AD30, 0
mov cs:qword_21AD28, 0
loc_CC247:
mov eax, [rbp+var_C]
mov cs:dword_21AD30, eax
mov eax, cs:dword_21AD30
mov edi, eax
mov esi, 8
call _calloc
mov cs:qword_21AD28, rax
mov [rbp+var_20], 0
loc_CC270:
mov eax, [rbp+var_20]
cmp eax, cs:dword_21AD30
jnb short loc_CC2C4
mov edi, 1000h
mov esi, 1
call _calloc
mov rdx, rax
mov rax, cs:qword_21AD28
mov ecx, [rbp+var_20]
mov [rax+rcx*8], rdx
mov rax, cs:qword_21AD28
mov ecx, [rbp+var_20]
mov rdi, [rax+rcx*8]
mov rax, [rbp+var_18]
mov ecx, [rbp+var_20]
mov rsi, [rax+rcx*8]
call _strcpy
mov eax, [rbp+var_20]
add eax, 1
mov [rbp+var_20], eax
jmp short loc_CC270
loc_CC2C4:
jmp short $+2
loc_CC2C6:
add rsp, 20h
pop rbp
retn
| void WindowDropCallback(long long a1, int a2, long long a3)
{
unsigned int j; // [rsp+0h] [rbp-20h]
unsigned int i; // [rsp+4h] [rbp-1Ch]
if ( a2 > 0 )
{
if ( dword_21AD30 )
{
for ( i = 0; i < dword_21AD30; ++i )
free(*(_QWORD *)(qword_21AD28 + 8LL * i));
free(qword_21AD28);
dword_21AD30 = 0;
qword_21AD28 = 0LL;
}
dword_21AD30 = a2;
qword_21AD28 = calloc((unsigned int)a2, 8LL);
for ( j = 0; j < dword_21AD30; ++j )
{
*(_QWORD *)(qword_21AD28 + 8LL * j) = calloc(4096LL, 1LL);
strcpy(*(_QWORD *)(qword_21AD28 + 8LL * j), *(_QWORD *)(a3 + 8LL * j));
}
}
}
| WindowDropCallback:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
CMP dword ptr [RBP + -0xc],0x0
JLE 0x001cc2c6
CMP dword ptr [0x0031ad30],0x0
JBE 0x001cc247
MOV dword ptr [RBP + -0x1c],0x0
LAB_001cc1fd:
MOV EAX,dword ptr [RBP + -0x1c]
CMP EAX,dword ptr [0x0031ad30]
JNC 0x001cc226
MOV RAX,qword ptr [0x0031ad28]
MOV ECX,dword ptr [RBP + -0x1c]
MOV RDI,qword ptr [RAX + RCX*0x8]
CALL 0x0010a640
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x001cc1fd
LAB_001cc226:
MOV RDI,qword ptr [0x0031ad28]
CALL 0x0010a640
MOV dword ptr [0x0031ad30],0x0
MOV qword ptr [0x0031ad28],0x0
LAB_001cc247:
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [0x0031ad30],EAX
MOV EAX,dword ptr [0x0031ad30]
MOV EDI,EAX
MOV ESI,0x8
CALL 0x0010a340
MOV qword ptr [0x0031ad28],RAX
MOV dword ptr [RBP + -0x20],0x0
LAB_001cc270:
MOV EAX,dword ptr [RBP + -0x20]
CMP EAX,dword ptr [0x0031ad30]
JNC 0x001cc2c4
MOV EDI,0x1000
MOV ESI,0x1
CALL 0x0010a340
MOV RDX,RAX
MOV RAX,qword ptr [0x0031ad28]
MOV ECX,dword ptr [RBP + -0x20]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV RAX,qword ptr [0x0031ad28]
MOV ECX,dword ptr [RBP + -0x20]
MOV RDI,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x20]
MOV RSI,qword ptr [RAX + RCX*0x8]
CALL 0x0010a4a0
MOV EAX,dword ptr [RBP + -0x20]
ADD EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
JMP 0x001cc270
LAB_001cc2c4:
JMP 0x001cc2c6
LAB_001cc2c6:
ADD RSP,0x20
POP RBP
RET
|
void WindowDropCallback(int8 param_1,uint param_2,long param_3)
{
void *pvVar1;
int4 local_28;
int4 local_24;
if (0 < (int)param_2) {
if (DAT_0031ad30 != 0) {
for (local_24 = 0; local_24 < DAT_0031ad30; local_24 = local_24 + 1) {
free(*(void **)((long)DAT_0031ad28 + (ulong)local_24 * 8));
}
free(DAT_0031ad28);
DAT_0031ad28 = (void *)0x0;
}
DAT_0031ad30 = param_2;
DAT_0031ad28 = calloc((ulong)param_2,8);
for (local_28 = 0; local_28 < DAT_0031ad30; local_28 = local_28 + 1) {
pvVar1 = calloc(0x1000,1);
*(void **)((long)DAT_0031ad28 + (ulong)local_28 * 8) = pvVar1;
strcpy(*(char **)((long)DAT_0031ad28 + (ulong)local_28 * 8),
*(char **)(param_3 + (ulong)local_28 * 8));
}
}
return;
}
| |
43,849 | WindowDropCallback | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/platforms/rcore_desktop_glfw.c | static void WindowDropCallback(GLFWwindow *window, int count, const char **paths)
{
if (count > 0)
{
// In case previous dropped filepaths have not been freed, we free them
if (CORE.Window.dropFileCount > 0)
{
for (unsigned int i = 0; i < CORE.Window.dropFileCount; i++) RL_FREE(CORE.Window.dropFilepaths[i]);
RL_FREE(CORE.Window.dropFilepaths);
CORE.Window.dropFileCount = 0;
CORE.Window.dropFilepaths = NULL;
}
// WARNING: Paths are freed by GLFW when the callback returns, we must keep an internal copy
CORE.Window.dropFileCount = count;
CORE.Window.dropFilepaths = (char **)RL_CALLOC(CORE.Window.dropFileCount, sizeof(char *));
for (unsigned int i = 0; i < CORE.Window.dropFileCount; i++)
{
CORE.Window.dropFilepaths[i] = (char *)RL_CALLOC(MAX_FILEPATH_LENGTH, sizeof(char));
strcpy(CORE.Window.dropFilepaths[i], paths[i]);
}
}
} | O2 | c | WindowDropCallback:
testl %esi, %esi
jle 0x60035
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movl 0xc7cef(%rip), %eax # 0x127c90
testl %eax, %eax
je 0x5ffcf
xorl %r14d, %r14d
movl %eax, %eax
movq 0xc7cd7(%rip), %rdi # 0x127c88
cmpq %rax, %r14
jae 0x5ffca
movq (%rdi,%r14,8), %rdi
callq 0x9640
incq %r14
movl 0xc7cc8(%rip), %eax # 0x127c90
jmp 0x5ffa8
callq 0x9640
movl %ebp, 0xc7cbb(%rip) # 0x127c90
movl %ebp, %edi
pushq $0x8
popq %rsi
callq 0x9320
movq %rax, 0xc7ca2(%rip) # 0x127c88
xorl %r15d, %r15d
pushq $0x1
popq %r14
movl %ebp, %eax
cmpq %rax, %r15
jae 0x6002b
movl $0x1000, %edi # imm = 0x1000
movq %r14, %rsi
callq 0x9320
movq 0xc7c80(%rip), %rcx # 0x127c88
movq %rax, (%rcx,%r15,8)
movq 0xc7c75(%rip), %rax # 0x127c88
movq (%rax,%r15,8), %rdi
movq (%rbx,%r15,8), %rsi
callq 0x94a0
incq %r15
movl 0xc7c67(%rip), %ebp # 0x127c90
jmp 0x5ffed
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| WindowDropCallback:
test esi, esi
jle locret_60035
push rbp
push r15
push r14
push rbx
push rax
mov rbx, rdx
mov ebp, esi
mov eax, cs:dword_127C90
test eax, eax
jz short loc_5FFCF
xor r14d, r14d
loc_5FFA8:
mov eax, eax
mov rdi, cs:qword_127C88
cmp r14, rax
jnb short loc_5FFCA
mov rdi, [rdi+r14*8]
call _free
inc r14
mov eax, cs:dword_127C90
jmp short loc_5FFA8
loc_5FFCA:
call _free
loc_5FFCF:
mov cs:dword_127C90, ebp
mov edi, ebp
push 8
pop rsi
call _calloc
mov cs:qword_127C88, rax
xor r15d, r15d
push 1
pop r14
loc_5FFED:
mov eax, ebp
cmp r15, rax
jnb short loc_6002B
mov edi, 1000h
mov rsi, r14
call _calloc
mov rcx, cs:qword_127C88
mov [rcx+r15*8], rax
mov rax, cs:qword_127C88
mov rdi, [rax+r15*8]
mov rsi, [rbx+r15*8]
call _strcpy
inc r15
mov ebp, cs:dword_127C90
jmp short loc_5FFED
loc_6002B:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
locret_60035:
retn
| long long WindowDropCallback(long long a1, int a2, long long a3)
{
long long result; // rax
unsigned int v5; // ebp
unsigned int v6; // eax
unsigned long long i; // r14
unsigned long long j; // r15
if ( a2 > 0 )
{
v5 = a2;
v6 = dword_127C90;
if ( dword_127C90 )
{
for ( i = 0LL; i < v6; ++i )
{
free(*(_QWORD *)(qword_127C88 + 8 * i));
v6 = dword_127C90;
}
free(qword_127C88);
}
dword_127C90 = a2;
qword_127C88 = calloc((unsigned int)a2, 8LL);
for ( j = 0LL; ; ++j )
{
result = v5;
if ( j >= v5 )
break;
*(_QWORD *)(qword_127C88 + 8 * j) = calloc(4096LL, 1LL);
strcpy(*(_QWORD *)(qword_127C88 + 8 * j), *(_QWORD *)(a3 + 8 * j));
v5 = dword_127C90;
}
}
return result;
}
| WindowDropCallback:
TEST ESI,ESI
JLE 0x00160035
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV EBP,ESI
MOV EAX,dword ptr [0x00227c90]
TEST EAX,EAX
JZ 0x0015ffcf
XOR R14D,R14D
LAB_0015ffa8:
MOV EAX,EAX
MOV RDI,qword ptr [0x00227c88]
CMP R14,RAX
JNC 0x0015ffca
MOV RDI,qword ptr [RDI + R14*0x8]
CALL 0x00109640
INC R14
MOV EAX,dword ptr [0x00227c90]
JMP 0x0015ffa8
LAB_0015ffca:
CALL 0x00109640
LAB_0015ffcf:
MOV dword ptr [0x00227c90],EBP
MOV EDI,EBP
PUSH 0x8
POP RSI
CALL 0x00109320
MOV qword ptr [0x00227c88],RAX
XOR R15D,R15D
PUSH 0x1
POP R14
LAB_0015ffed:
MOV EAX,EBP
CMP R15,RAX
JNC 0x0016002b
MOV EDI,0x1000
MOV RSI,R14
CALL 0x00109320
MOV RCX,qword ptr [0x00227c88]
MOV qword ptr [RCX + R15*0x8],RAX
MOV RAX,qword ptr [0x00227c88]
MOV RDI,qword ptr [RAX + R15*0x8]
MOV RSI,qword ptr [RBX + R15*0x8]
CALL 0x001094a0
INC R15
MOV EBP,dword ptr [0x00227c90]
JMP 0x0015ffed
LAB_0016002b:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
LAB_00160035:
RET
|
void WindowDropCallback(int8 param_1,uint param_2,long param_3)
{
void *pvVar1;
ulong uVar2;
ulong uVar3;
if (0 < (int)param_2) {
uVar2 = (ulong)param_2;
if (DAT_00227c90 != 0) {
for (uVar3 = 0; uVar3 < DAT_00227c90; uVar3 = uVar3 + 1) {
free(*(void **)((long)DAT_00227c88 + uVar3 * 8));
}
free(DAT_00227c88);
}
DAT_00227c90 = param_2;
DAT_00227c88 = calloc((ulong)param_2,8);
for (uVar3 = 0; uVar3 < uVar2; uVar3 = uVar3 + 1) {
pvVar1 = calloc(0x1000,1);
*(void **)((long)DAT_00227c88 + uVar3 * 8) = pvVar1;
strcpy(*(char **)((long)DAT_00227c88 + uVar3 * 8),*(char **)(param_3 + uVar3 * 8));
uVar2 = (ulong)DAT_00227c90;
}
}
return;
}
| |
43,850 | minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long) | llama.cpp/common/minja/minja.hpp | static std::string error_location_suffix(const std::string & source, size_t pos) {
auto get_line = [&](size_t line) {
auto start = source.begin();
for (size_t i = 1; i < line; ++i) {
start = std::find(start, source.end(), '\n') + 1;
}
auto end = std::find(start, source.end(), '\n');
return std::string(start, end);
};
auto start = source.begin();
auto end = source.end();
auto it = start + pos;
auto line = std::count(start, it, '\n') + 1;
auto max_line = std::count(start, end, '\n') + 1;
auto col = pos - std::string(start, it).rfind('\n');
std::ostringstream out;
out << " at row " << line << ", column " << col << ":\n";
if (line > 1) out << get_line(line - 1) << "\n";
out << get_line(line) << "\n";
out << std::string(col - 1, ' ') << "^\n";
if (line < max_line) out << get_line(line + 1) << "\n";
return out.str();
} | O3 | cpp | minja::error_location_suffix(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 $0x1b8, %rsp # imm = 0x1B8
movq %rdx, %r8
movq %rsi, %r14
movq %rdi, 0x38(%rsp)
movq (%rsi), %rsi
movq 0x8(%r14), %rax
testq %rdx, %rdx
je 0xa8e32
xorl %ecx, %ecx
xorl %r12d, %r12d
xorl %edx, %edx
cmpb $0xa, (%rsi,%rcx)
sete %dl
addq %rdx, %r12
incq %rcx
cmpq %rcx, %r8
jne 0xa8e1c
jmp 0xa8e35
xorl %r12d, %r12d
leaq (%rsi,%r8), %rdx
testq %rax, %rax
movq %r8, 0x28(%rsp)
je 0xa8e5f
xorl %ecx, %ecx
xorl %r15d, %r15d
xorl %edi, %edi
cmpb $0xa, (%rsi,%rcx)
sete %dil
addq %rdi, %r15
incq %rcx
cmpq %rcx, %rax
jne 0xa8e48
jmp 0xa8e62
xorl %r15d, %r15d
leaq 0x50(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
callq 0x3a64a
movq %rbx, %rdi
movl $0xa, %esi
movq $-0x1, %rdx
callq 0x21720
movq %rax, %r13
movq (%rbx), %rdi
cmpq %rbp, %rdi
je 0xa8eac
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x21180
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
callq 0x22070
leaq 0x81232(%rip), %rsi # 0x12a0f2
movl $0x8, %edx
movq %rbx, %rdi
callq 0x220d0
movq 0x28(%rsp), %rbx
leaq 0x1(%r12), %rsi
leaq 0x40(%rsp), %rdi
movq %rsi, 0x30(%rsp)
callq 0x21640
movq %rax, %rbp
leaq 0x746e0(%rip), %rsi # 0x11d5d0
movl $0x9, %edx
movq %rax, %rdi
callq 0x220d0
subq %r13, %rbx
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x218a0
leaq 0x86a00(%rip), %rsi # 0x12f912
movl $0x2, %edx
movq %rax, %rdi
callq 0x220d0
testq %r12, %r12
jle 0xa8fd6
movq (%r14), %r13
cmpq $0x1, %r12
jne 0xa8f36
movq %r13, %rsi
jmp 0xa8f62
leaq -0x1(%r12), %rbp
movq (%r14), %rsi
addq 0x8(%r14), %rsi
movb $0xa, 0x7(%rsp)
movq %r13, %rdi
leaq 0x7(%rsp), %rdx
callq 0xd71e1
movq %rax, %r13
incq %r13
decq %rbp
jne 0xa8f3b
movq (%r14), %rsi
addq 0x8(%r14), %rsi
leaq 0x7(%rsp), %rdx
movb $0xa, (%rdx)
movq %r13, %rdi
callq 0xd71e1
leaq 0x18(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x3a64a
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x40(%rsp), %rdi
callq 0x220d0
leaq 0x80ac6(%rip), %rsi # 0x129a78
movl $0x1, %edx
movq %rax, %rdi
callq 0x220d0
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0xa8fd6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21180
movq (%r14), %r13
cmpq $0x2, 0x30(%rsp)
jb 0xa901a
movq %rbx, 0x28(%rsp)
leaq 0x7(%rsp), %rbp
movq %r12, %rbx
movq (%r14), %rsi
addq 0x8(%r14), %rsi
movb $0xa, 0x7(%rsp)
movq %r13, %rdi
movq %rbp, %rdx
callq 0xd71e1
movq %rax, %r13
incq %r13
decq %rbx
jne 0xa8fee
movq (%r14), %rsi
movq 0x28(%rsp), %rbx
jmp 0xa901d
movq %r13, %rsi
addq 0x8(%r14), %rsi
leaq 0x7(%rsp), %rdx
movb $0xa, (%rdx)
movq %r13, %rdi
callq 0xd71e1
leaq 0x18(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x3a64a
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x40(%rsp), %rdi
callq 0x220d0
leaq 0x80a0b(%rip), %rsi # 0x129a78
movl $0x1, %edx
movq %rax, %rdi
callq 0x220d0
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0xa9091
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21180
decq %rbx
leaq 0x8(%rsp), %rdi
movq %rbp, (%rdi)
movq %rbx, %rsi
movl $0x20, %edx
callq 0x21a00
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x40(%rsp), %rdi
callq 0x220d0
leaq 0x81037(%rip), %rsi # 0x12a0fb
movl $0x2, %edx
movq %rax, %rdi
callq 0x220d0
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0xa90e8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21180
cmpq %r15, %r12
jge 0xa919c
movq (%r14), %r15
cmpq $-0x3, %r12
ja 0xa912b
leaq 0x7(%rsp), %r13
movq 0x30(%rsp), %rbx
movq (%r14), %rsi
addq 0x8(%r14), %rsi
movb $0xa, 0x7(%rsp)
movq %r15, %rdi
movq %r13, %rdx
callq 0xd71e1
movq %rax, %r15
incq %r15
decq %rbx
jne 0xa9104
movq (%r14), %rsi
jmp 0xa912e
movq %r15, %rsi
addq 0x8(%r14), %rsi
leaq 0x7(%rsp), %rdx
movb $0xa, (%rdx)
movq %r15, %rdi
callq 0xd71e1
leaq 0x8(%rsp), %rdi
movq %rbp, (%rdi)
movq $0x0, 0x8(%rdi)
movq %r15, %rsi
movq %rax, %rdx
callq 0x3a64a
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x40(%rsp), %rdi
callq 0x220d0
leaq 0x80900(%rip), %rsi # 0x129a78
movl $0x1, %edx
movq %rax, %rdi
callq 0x220d0
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0xa919c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21180
leaq 0x48(%rsp), %rsi
movq 0x38(%rsp), %rdi
callq 0x21670
movq 0xc4da6(%rip), %rsi # 0x16df58
leaq 0x40(%rsp), %rdi
callq 0x21cb0
leaq 0xb0(%rsp), %rdi
callq 0x21c80
addq $0x1b8, %rsp # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa9205
jmp 0xa9205
jmp 0xa91e9
jmp 0xa9205
jmp 0xa9205
jmp 0xa91e9
jmp 0xa91e9
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0xa9208
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21180
jmp 0xa9208
movq %rax, %rbx
movq 0xc4d49(%rip), %rsi # 0x16df58
leaq 0x40(%rsp), %rdi
callq 0x21cb0
leaq 0xb0(%rsp), %rdi
callq 0x21c80
movq %rbx, %rdi
callq 0x21b20
| _ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1B8h
mov r8, rdx
mov r14, rsi
mov [rsp+1E8h+var_1B0], rdi
mov rsi, [rsi]
mov rax, [r14+8]
test rdx, rdx
jz short loc_A8E32
xor ecx, ecx
xor r12d, r12d
loc_A8E1C:
xor edx, edx
cmp byte ptr [rsi+rcx], 0Ah
setz dl
add r12, rdx
inc rcx
cmp r8, rcx
jnz short loc_A8E1C
jmp short loc_A8E35
loc_A8E32:
xor r12d, r12d
loc_A8E35:
lea rdx, [rsi+r8]
test rax, rax
mov [rsp+1E8h+var_1C0], r8
jz short loc_A8E5F
xor ecx, ecx
xor r15d, r15d
loc_A8E48:
xor edi, edi
cmp byte ptr [rsi+rcx], 0Ah
setz dil
add r15, rdi
inc rcx
cmp rax, rcx
jnz short loc_A8E48
jmp short loc_A8E62
loc_A8E5F:
xor r15d, r15d
loc_A8E62:
lea rbp, [rsp+1E8h+var_198]
mov [rbp-10h], rbp
mov qword ptr [rbp-8], 0
lea rbx, [rsp+1E8h+var_1A8]
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag)
mov rdi, rbx
mov esi, 0Ah
mov rdx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEcm; std::string::rfind(char,ulong)
mov r13, rax
mov rdi, [rbx]; void *
cmp rdi, rbp
jz short loc_A8EAC
mov rsi, [rsp+1E8h+var_198]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A8EAC:
lea rbx, [rsp+1E8h+var_1A8]
mov rdi, rbx
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
lea rsi, aAtRow; " at row "
mov edx, 8
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 rbx, [rsp+1E8h+var_1C0]
lea rsi, [r12+1]
lea rdi, [rsp+1E8h+var_1A8]
mov [rsp+1E8h+var_1B8], rsi
call __ZNSo9_M_insertIlEERSoT_; std::ostream::_M_insert<long>(long)
mov rbp, rax
lea rsi, aColumn; ", column "
mov edx, 9
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)
sub rbx, r13
mov rdi, rbp
mov rsi, rbx
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
lea rsi, aJsonSchemaConv+1Dh; ":\n"
mov edx, 2
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)
test r12, r12
jle loc_A8FD6
mov r13, [r14]
cmp r12, 1
jnz short loc_A8F36
mov rsi, r13
jmp short loc_A8F62
loc_A8F36:
lea rbp, [r12-1]
loc_A8F3B:
mov rsi, [r14]
add rsi, [r14+8]
mov [rsp+1E8h+var_1E1], 0Ah
mov rdi, r13
lea rdx, [rsp+1E8h+var_1E1]
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag)
mov r13, rax
inc r13
dec rbp
jnz short loc_A8F3B
mov rsi, [r14]
loc_A8F62:
add rsi, [r14+8]
lea rdx, [rsp+1E8h+var_1E1]
mov byte ptr [rdx], 0Ah
mov rdi, r13
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag)
lea rbp, [rsp+1E8h+var_1D0]
mov [rbp-10h], rbp
mov qword ptr [rbp-8], 0
lea rdi, [rsp+1E8h+var_1E0]
mov rsi, r13
mov rdx, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag)
mov rsi, [rsp+1E8h+var_1E0]
mov rdx, [rsp+1E8h+var_1D8]
lea rdi, [rsp+1E8h+var_1A8]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, aExampleToolCal+1Ch; "\n"
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)
mov rdi, [rsp+1E8h+var_1E0]; void *
cmp rdi, rbp
jz short loc_A8FD6
mov rsi, [rsp+1E8h+var_1D0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A8FD6:
mov r13, [r14]
cmp [rsp+1E8h+var_1B8], 2
jb short loc_A901A
mov [rsp+1E8h+var_1C0], rbx
lea rbp, [rsp+1E8h+var_1E1]
mov rbx, r12
loc_A8FEE:
mov rsi, [r14]
add rsi, [r14+8]
mov [rsp+1E8h+var_1E1], 0Ah
mov rdi, r13
mov rdx, rbp
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag)
mov r13, rax
inc r13
dec rbx
jnz short loc_A8FEE
mov rsi, [r14]
mov rbx, [rsp+1E8h+var_1C0]
jmp short loc_A901D
loc_A901A:
mov rsi, r13
loc_A901D:
add rsi, [r14+8]
lea rdx, [rsp+1E8h+var_1E1]
mov byte ptr [rdx], 0Ah
mov rdi, r13
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag)
lea rbp, [rsp+1E8h+var_1D0]
mov [rbp-10h], rbp
mov qword ptr [rbp-8], 0
lea rdi, [rsp+1E8h+var_1E0]
mov rsi, r13
mov rdx, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag)
mov rsi, [rsp+1E8h+var_1E0]
mov rdx, [rsp+1E8h+var_1D8]
lea rdi, [rsp+1E8h+var_1A8]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, aExampleToolCal+1Ch; "\n"
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)
mov rdi, [rsp+1E8h+var_1E0]; void *
cmp rdi, rbp
jz short loc_A9091
mov rsi, [rsp+1E8h+var_1D0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A9091:
dec rbx
lea rdi, [rsp+1E8h+var_1E0]
mov [rdi], rbp
mov rsi, rbx
mov edx, 20h ; ' '
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov rsi, [rsp+1E8h+var_1E0]
mov rdx, [rsp+1E8h+var_1D8]
lea rdi, [rsp+1E8h+var_1A8]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, asc_12A0FB; "^\n"
mov edx, 2
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)
mov rdi, [rsp+1E8h+var_1E0]; void *
cmp rdi, rbp
jz short loc_A90E8
mov rsi, [rsp+1E8h+var_1D0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A90E8:
cmp r12, r15
jge loc_A919C
mov r15, [r14]
cmp r12, 0FFFFFFFFFFFFFFFDh
ja short loc_A912B
lea r13, [rsp+1E8h+var_1E1]
mov rbx, [rsp+1E8h+var_1B8]
loc_A9104:
mov rsi, [r14]
add rsi, [r14+8]
mov [rsp+1E8h+var_1E1], 0Ah
mov rdi, r15
mov rdx, r13
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag)
mov r15, rax
inc r15
dec rbx
jnz short loc_A9104
mov rsi, [r14]
jmp short loc_A912E
loc_A912B:
mov rsi, r15
loc_A912E:
add rsi, [r14+8]
lea rdx, [rsp+1E8h+var_1E1]
mov byte ptr [rdx], 0Ah
mov rdi, r15
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag)
lea rdi, [rsp+1E8h+var_1E0]
mov [rdi], rbp
mov qword ptr [rdi+8], 0
mov rsi, r15
mov rdx, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag)
mov rsi, [rsp+1E8h+var_1E0]
mov rdx, [rsp+1E8h+var_1D8]
lea rdi, [rsp+1E8h+var_1A8]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, aExampleToolCal+1Ch; "\n"
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)
mov rdi, [rsp+1E8h+var_1E0]; void *
cmp rdi, rbp
jz short loc_A919C
mov rsi, [rsp+1E8h+var_1D0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A919C:
lea rsi, [rsp+1E8h+var_1A0]
mov rdi, [rsp+1E8h+var_1B0]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+1E8h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+1E8h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
add rsp, 1B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_A9205
jmp short loc_A9205
jmp short loc_A91E9
jmp short loc_A9205
jmp short loc_A9205
jmp short loc_A91E9
jmp short $+2
loc_A91E9:
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, rbp
jz short loc_A9208
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A9208
loc_A9205:
mov rbx, rax
loc_A9208:
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_38]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+arg_A8]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rbx
call __Unwind_Resume
| void minja::error_location_suffix(long long a1, long long a2, long long a3)
{
_BYTE *v4; // rsi
long long v5; // rax
long long v6; // rcx
long long v7; // r12
long long v8; // rcx
long long v9; // r15
long long v10; // r13
long long v11; // rbp
long long v12; // rbx
long long v13; // rax
_BYTE *v14; // r13
_BYTE *v15; // rsi
long long v16; // rbp
long long v17; // rsi
_BYTE *v18; // rsi
long long v19; // rax
long long v20; // rax
_BYTE *v21; // r13
long long v22; // rbx
long long v23; // rsi
_BYTE *v24; // rsi
_BYTE *v25; // rsi
long long v26; // rax
long long v27; // rax
long long v28; // rax
_BYTE *v29; // r15
unsigned long long v30; // rbx
long long v31; // rsi
_BYTE *v32; // rsi
_BYTE *v33; // rsi
long long v34; // rax
long long v35; // rax
char v36; // [rsp+7h] [rbp-1E1h] BYREF
void *v37; // [rsp+8h] [rbp-1E0h] BYREF
long long v38; // [rsp+10h] [rbp-1D8h]
_QWORD v39[2]; // [rsp+18h] [rbp-1D0h] BYREF
long long v40; // [rsp+28h] [rbp-1C0h]
unsigned long long v41; // [rsp+30h] [rbp-1B8h]
long long v42; // [rsp+38h] [rbp-1B0h]
_QWORD *v43; // [rsp+40h] [rbp-1A8h] BYREF
long long v44; // [rsp+48h] [rbp-1A0h] BYREF
_QWORD v45[12]; // [rsp+50h] [rbp-198h] BYREF
char v46[312]; // [rsp+B0h] [rbp-138h] BYREF
v42 = a1;
v4 = *(_BYTE **)a2;
v5 = *(_QWORD *)(a2 + 8);
if ( a3 )
{
v6 = 0LL;
v7 = 0LL;
do
v7 += v4[v6++] == 10;
while ( a3 != v6 );
}
else
{
v7 = 0LL;
}
v40 = a3;
if ( v5 )
{
v8 = 0LL;
v9 = 0LL;
do
v9 += v4[v8++] == 10;
while ( v5 != v8 );
}
else
{
v9 = 0LL;
}
v43 = v45;
v44 = 0LL;
std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>((long long)&v43, v4, (long long)&v4[a3]);
v10 = std::string::rfind(&v43, 10LL, -1LL);
if ( v43 != v45 )
operator delete(v43, v45[0] + 1LL);
std::ostringstream::basic_ostringstream(&v43);
std::__ostream_insert<char,std::char_traits<char>>(&v43, " at row ", 8LL);
v41 = v7 + 1;
v11 = std::ostream::_M_insert<long>(&v43);
std::__ostream_insert<char,std::char_traits<char>>(v11, ", column ", 9LL);
v12 = v40 - v10;
v13 = std::ostream::_M_insert<unsigned long>(v11, v40 - v10);
std::__ostream_insert<char,std::char_traits<char>>(v13, ":\n", 2LL);
if ( v7 > 0 )
{
v14 = *(_BYTE **)a2;
if ( v7 == 1 )
{
v15 = *(_BYTE **)a2;
}
else
{
v16 = v7 - 1;
do
{
v17 = *(_QWORD *)(a2 + 8) + *(_QWORD *)a2;
v36 = 10;
v14 = (_BYTE *)(std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
v14,
v17,
&v36)
+ 1);
--v16;
}
while ( v16 );
v15 = *(_BYTE **)a2;
}
v18 = &v15[*(_QWORD *)(a2 + 8)];
v36 = 10;
v19 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
v14,
v18,
&v36);
v37 = v39;
v38 = 0LL;
std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>((long long)&v37, v14, v19);
v20 = std::__ostream_insert<char,std::char_traits<char>>(&v43, v37, v38);
std::__ostream_insert<char,std::char_traits<char>>(v20, "\n", 1LL);
if ( v37 != v39 )
operator delete(v37, v39[0] + 1LL);
}
v21 = *(_BYTE **)a2;
if ( v41 < 2 )
{
v24 = *(_BYTE **)a2;
}
else
{
v40 = v12;
v22 = v7;
do
{
v23 = *(_QWORD *)(a2 + 8) + *(_QWORD *)a2;
v36 = 10;
v21 = (_BYTE *)(std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
v21,
v23,
&v36)
+ 1);
--v22;
}
while ( v22 );
v24 = *(_BYTE **)a2;
v12 = v40;
}
v25 = &v24[*(_QWORD *)(a2 + 8)];
v36 = 10;
v26 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
v21,
v25,
&v36);
v37 = v39;
v38 = 0LL;
std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>((long long)&v37, v21, v26);
v27 = std::__ostream_insert<char,std::char_traits<char>>(&v43, v37, v38);
std::__ostream_insert<char,std::char_traits<char>>(v27, "\n", 1LL);
if ( v37 != v39 )
operator delete(v37, v39[0] + 1LL);
v37 = v39;
std::string::_M_construct(&v37, v12 - 1, 32LL);
v28 = std::__ostream_insert<char,std::char_traits<char>>(&v43, v37, v38);
std::__ostream_insert<char,std::char_traits<char>>(v28, "^\n", 2LL);
if ( v37 != v39 )
operator delete(v37, v39[0] + 1LL);
if ( v7 < v9 )
{
v29 = *(_BYTE **)a2;
if ( (unsigned long long)v7 > 0xFFFFFFFFFFFFFFFDLL )
{
v32 = *(_BYTE **)a2;
}
else
{
v30 = v41;
do
{
v31 = *(_QWORD *)(a2 + 8) + *(_QWORD *)a2;
v36 = 10;
v29 = (_BYTE *)(std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
v29,
v31,
&v36)
+ 1);
--v30;
}
while ( v30 );
v32 = *(_BYTE **)a2;
}
v33 = &v32[*(_QWORD *)(a2 + 8)];
v36 = 10;
v34 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
v29,
v33,
&v36);
v37 = v39;
v38 = 0LL;
std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>((long long)&v37, v29, v34);
v35 = std::__ostream_insert<char,std::char_traits<char>>(&v43, v37, v38);
std::__ostream_insert<char,std::char_traits<char>>(v35, "\n", 1LL);
if ( v37 != v39 )
operator delete(v37, v39[0] + 1LL);
}
std::stringbuf::str(v42, &v44);
std::ostringstream::~ostringstream(&v43, &`VTT for'std::ostringstream);
std::ios_base::~ios_base((std::ios_base *)v46);
}
| error_location_suffix:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1b8
MOV R8,RDX
MOV R14,RSI
MOV qword ptr [RSP + 0x38],RDI
MOV RSI,qword ptr [RSI]
MOV RAX,qword ptr [R14 + 0x8]
TEST RDX,RDX
JZ 0x001a8e32
XOR ECX,ECX
XOR R12D,R12D
LAB_001a8e1c:
XOR EDX,EDX
CMP byte ptr [RSI + RCX*0x1],0xa
SETZ DL
ADD R12,RDX
INC RCX
CMP R8,RCX
JNZ 0x001a8e1c
JMP 0x001a8e35
LAB_001a8e32:
XOR R12D,R12D
LAB_001a8e35:
LEA RDX,[RSI + R8*0x1]
TEST RAX,RAX
MOV qword ptr [RSP + 0x28],R8
JZ 0x001a8e5f
XOR ECX,ECX
XOR R15D,R15D
LAB_001a8e48:
XOR EDI,EDI
CMP byte ptr [RSI + RCX*0x1],0xa
SETZ DIL
ADD R15,RDI
INC RCX
CMP RAX,RCX
JNZ 0x001a8e48
JMP 0x001a8e62
LAB_001a8e5f:
XOR R15D,R15D
LAB_001a8e62:
LEA RBP,[RSP + 0x50]
MOV qword ptr [RBP + -0x10],RBP
MOV qword ptr [RBP + -0x8],0x0
LEA RBX,[RSP + 0x40]
MOV RDI,RBX
CALL 0x0013a64a
MOV RDI,RBX
MOV ESI,0xa
MOV RDX,-0x1
CALL 0x00121720
MOV R13,RAX
MOV RDI,qword ptr [RBX]
CMP RDI,RBP
JZ 0x001a8eac
MOV RSI,qword ptr [RSP + 0x50]
INC RSI
CALL 0x00121180
LAB_001a8eac:
LEA RBX,[RSP + 0x40]
MOV RDI,RBX
CALL 0x00122070
LAB_001a8eb9:
LEA RSI,[0x22a0f2]
MOV EDX,0x8
MOV RDI,RBX
CALL 0x001220d0
MOV RBX,qword ptr [RSP + 0x28]
LEA RSI,[R12 + 0x1]
LEA RDI,[RSP + 0x40]
MOV qword ptr [RSP + 0x30],RSI
CALL 0x00121640
MOV RBP,RAX
LEA RSI,[0x21d5d0]
MOV EDX,0x9
MOV RDI,RAX
CALL 0x001220d0
SUB RBX,R13
MOV RDI,RBP
MOV RSI,RBX
CALL 0x001218a0
LEA RSI,[0x22f912]
MOV EDX,0x2
MOV RDI,RAX
CALL 0x001220d0
TEST R12,R12
JLE 0x001a8fd6
MOV R13,qword ptr [R14]
CMP R12,0x1
JNZ 0x001a8f36
MOV RSI,R13
JMP 0x001a8f62
LAB_001a8f36:
LEA RBP,[R12 + -0x1]
LAB_001a8f3b:
MOV RSI,qword ptr [R14]
ADD RSI,qword ptr [R14 + 0x8]
MOV byte ptr [RSP + 0x7],0xa
MOV RDI,R13
LEA RDX,[RSP + 0x7]
CALL 0x001d71e1
MOV R13,RAX
INC R13
DEC RBP
JNZ 0x001a8f3b
MOV RSI,qword ptr [R14]
LAB_001a8f62:
ADD RSI,qword ptr [R14 + 0x8]
LEA RDX,[RSP + 0x7]
MOV byte ptr [RDX],0xa
MOV RDI,R13
CALL 0x001d71e1
LEA RBP,[RSP + 0x18]
MOV qword ptr [RBP + -0x10],RBP
MOV qword ptr [RBP + -0x8],0x0
LAB_001a8f87:
LEA RDI,[RSP + 0x8]
MOV RSI,R13
MOV RDX,RAX
CALL 0x0013a64a
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_001a8fa1:
LEA RDI,[RSP + 0x40]
CALL 0x001220d0
LEA RSI,[0x229a78]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x001220d0
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,RBP
JZ 0x001a8fd6
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00121180
LAB_001a8fd6:
MOV R13,qword ptr [R14]
CMP qword ptr [RSP + 0x30],0x2
JC 0x001a901a
MOV qword ptr [RSP + 0x28],RBX
LEA RBP,[RSP + 0x7]
MOV RBX,R12
LAB_001a8fee:
MOV RSI,qword ptr [R14]
ADD RSI,qword ptr [R14 + 0x8]
MOV byte ptr [RSP + 0x7],0xa
MOV RDI,R13
MOV RDX,RBP
CALL 0x001d71e1
MOV R13,RAX
INC R13
DEC RBX
JNZ 0x001a8fee
MOV RSI,qword ptr [R14]
MOV RBX,qword ptr [RSP + 0x28]
JMP 0x001a901d
LAB_001a901a:
MOV RSI,R13
LAB_001a901d:
ADD RSI,qword ptr [R14 + 0x8]
LEA RDX,[RSP + 0x7]
MOV byte ptr [RDX],0xa
MOV RDI,R13
CALL 0x001d71e1
LEA RBP,[RSP + 0x18]
MOV qword ptr [RBP + -0x10],RBP
MOV qword ptr [RBP + -0x8],0x0
LAB_001a9042:
LEA RDI,[RSP + 0x8]
MOV RSI,R13
MOV RDX,RAX
CALL 0x0013a64a
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_001a905c:
LEA RDI,[RSP + 0x40]
CALL 0x001220d0
LEA RSI,[0x229a78]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x001220d0
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,RBP
JZ 0x001a9091
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00121180
LAB_001a9091:
DEC RBX
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],RBP
LAB_001a909c:
MOV RSI,RBX
MOV EDX,0x20
CALL 0x00121a00
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_001a90b3:
LEA RDI,[RSP + 0x40]
CALL 0x001220d0
LEA RSI,[0x22a0fb]
MOV EDX,0x2
MOV RDI,RAX
CALL 0x001220d0
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,RBP
JZ 0x001a90e8
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00121180
LAB_001a90e8:
CMP R12,R15
JGE 0x001a919c
MOV R15,qword ptr [R14]
CMP R12,-0x3
JA 0x001a912b
LEA R13,[RSP + 0x7]
MOV RBX,qword ptr [RSP + 0x30]
LAB_001a9104:
MOV RSI,qword ptr [R14]
ADD RSI,qword ptr [R14 + 0x8]
MOV byte ptr [RSP + 0x7],0xa
MOV RDI,R15
MOV RDX,R13
CALL 0x001d71e1
MOV R15,RAX
INC R15
DEC RBX
JNZ 0x001a9104
MOV RSI,qword ptr [R14]
JMP 0x001a912e
LAB_001a912b:
MOV RSI,R15
LAB_001a912e:
ADD RSI,qword ptr [R14 + 0x8]
LEA RDX,[RSP + 0x7]
MOV byte ptr [RDX],0xa
MOV RDI,R15
CALL 0x001d71e1
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],RBP
MOV qword ptr [RDI + 0x8],0x0
LAB_001a9152:
MOV RSI,R15
MOV RDX,RAX
CALL 0x0013a64a
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_001a9167:
LEA RDI,[RSP + 0x40]
CALL 0x001220d0
LEA RSI,[0x229a78]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x001220d0
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,RBP
JZ 0x001a919c
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00121180
LAB_001a919c:
LEA RSI,[RSP + 0x48]
LAB_001a91a1:
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x00121670
LAB_001a91ab:
MOV RSI,qword ptr [0x0026df58]
LEA RDI,[RSP + 0x40]
CALL 0x00121cb0
LEA RDI,[RSP + 0xb0]
CALL 0x00121c80
ADD RSP,0x1b8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::error_location_suffix(std::__cxx11::string const&, unsigned long) */
void __thiscall minja::error_location_suffix(minja *this,string *param_1,ulong param_2)
{
long lVar1;
ostream *poVar2;
int8 uVar3;
ulong uVar4;
long lVar5;
ulong uVar6;
long lVar7;
ulong uVar8;
long lVar9;
int1 local_1e1;
long *local_1e0;
long local_1d8;
long local_1d0 [2];
ulong local_1c0;
ulong local_1b8;
minja *local_1b0;
long *local_1a8;
int8 local_1a0;
long local_198 [12];
ios_base local_138 [264];
lVar1 = *(long *)param_1;
if (param_2 == 0) {
uVar8 = 0;
}
else {
uVar4 = 0;
uVar8 = 0;
do {
uVar8 = uVar8 + (*(char *)(lVar1 + uVar4) == '\n');
uVar4 = uVar4 + 1;
} while (param_2 != uVar4);
}
if (*(long *)(param_1 + 8) == 0) {
lVar9 = 0;
}
else {
lVar5 = 0;
lVar9 = 0;
do {
lVar9 = lVar9 + (ulong)(*(char *)(lVar1 + lVar5) == '\n');
lVar5 = lVar5 + 1;
} while (*(long *)(param_1 + 8) != lVar5);
}
local_1a0 = 0;
local_1c0 = param_2;
local_1b0 = this;
local_1a8 = local_198;
std::__cxx11::string::_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>
(&local_1a8,lVar1,lVar1 + param_2);
lVar1 = std::__cxx11::string::rfind((char)&local_1a8,10);
if (local_1a8 != local_198) {
operator_delete(local_1a8,local_198[0] + 1);
}
std::__cxx11::ostringstream::ostringstream((ostringstream *)&local_1a8);
/* try { // try from 001a8eb9 to 001a8f1e has its CatchHandler @ 001a9205 */
std::__ostream_insert<char,std::char_traits<char>>((ostream *)&local_1a8," at row ",8);
uVar4 = local_1c0;
local_1b8 = uVar8 + 1;
poVar2 = std::ostream::_M_insert<long>((long)&local_1a8);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,", column ",9);
uVar4 = uVar4 - lVar1;
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,":\n",2);
if (0 < (long)uVar8) {
lVar1 = *(long *)param_1;
lVar5 = lVar1;
if (uVar8 != 1) {
lVar7 = uVar8 - 1;
do {
local_1e1 = 10;
lVar5 = std::
__find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar5,*(long *)param_1 + *(long *)(param_1 + 8),&local_1e1);
lVar5 = lVar5 + 1;
lVar7 = lVar7 + -1;
} while (lVar7 != 0);
lVar1 = *(long *)param_1;
}
local_1e1 = 10;
uVar3 = std::
__find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar5,lVar1 + *(long *)(param_1 + 8));
local_1d8 = 0;
/* try { // try from 001a8f87 to 001a8f96 has its CatchHandler @ 001a91dd */
local_1e0 = local_1d0;
std::__cxx11::string::
_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>
(&local_1e0,lVar5,uVar3);
/* try { // try from 001a8fa1 to 001a8fbe has its CatchHandler @ 001a91e5 */
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)&local_1a8,(char *)local_1e0,local_1d8);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\n",1);
if (local_1e0 != local_1d0) {
operator_delete(local_1e0,local_1d0[0] + 1);
}
}
lVar1 = *(long *)param_1;
lVar5 = lVar1;
if (1 < local_1b8) {
uVar6 = uVar8;
local_1c0 = uVar4;
do {
local_1e1 = 10;
lVar5 = std::
__find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar5,*(long *)param_1 + *(long *)(param_1 + 8),&local_1e1);
lVar5 = lVar5 + 1;
uVar6 = uVar6 - 1;
} while (uVar6 != 0);
lVar1 = *(long *)param_1;
uVar4 = local_1c0;
}
local_1e1 = 10;
uVar3 = std::
__find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar5,lVar1 + *(long *)(param_1 + 8));
local_1d8 = 0;
/* try { // try from 001a9042 to 001a9051 has its CatchHandler @ 001a91e3 */
local_1e0 = local_1d0;
std::__cxx11::string::_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>
(&local_1e0,lVar5,uVar3);
/* try { // try from 001a905c to 001a9079 has its CatchHandler @ 001a91e9 */
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)&local_1a8,(char *)local_1e0,local_1d8);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\n",1);
if (local_1e0 != local_1d0) {
operator_delete(local_1e0,local_1d0[0] + 1);
}
local_1e0 = local_1d0;
/* try { // try from 001a909c to 001a90a8 has its CatchHandler @ 001a91e1 */
std::__cxx11::string::_M_construct((ulong)&local_1e0,(char)uVar4 + -1);
/* try { // try from 001a90b3 to 001a90d0 has its CatchHandler @ 001a91e7 */
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)&local_1a8,(char *)local_1e0,local_1d8);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"^\n",2);
if (local_1e0 != local_1d0) {
operator_delete(local_1e0,local_1d0[0] + 1);
}
if ((long)uVar8 < lVar9) {
lVar1 = *(long *)param_1;
lVar9 = lVar1;
if (uVar8 < 0xfffffffffffffffe) {
uVar8 = local_1b8;
do {
local_1e1 = 10;
lVar9 = std::
__find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar9,*(long *)param_1 + *(long *)(param_1 + 8),&local_1e1);
lVar9 = lVar9 + 1;
uVar8 = uVar8 - 1;
} while (uVar8 != 0);
lVar1 = *(long *)param_1;
}
local_1e1 = 10;
uVar3 = std::
__find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar9,lVar1 + *(long *)(param_1 + 8));
local_1d8 = 0;
local_1e0 = local_1d0;
/* try { // try from 001a9152 to 001a915c has its CatchHandler @ 001a91db */
std::__cxx11::string::
_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>
(&local_1e0,lVar9,uVar3);
/* try { // try from 001a9167 to 001a9184 has its CatchHandler @ 001a91df */
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)&local_1a8,(char *)local_1e0,local_1d8);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\n",1);
if (local_1e0 != local_1d0) {
operator_delete(local_1e0,local_1d0[0] + 1);
}
}
/* try { // try from 001a91a1 to 001a91aa has its CatchHandler @ 001a9205 */
std::__cxx11::stringbuf::str();
std::__cxx11::ostringstream::~ostringstream((ostringstream *)&local_1a8);
std::ios_base::~ios_base(local_138);
return;
}
| |
43,851 | stop_waiting_locked | eloqsql/mysys/waiting_threads.c | static int stop_waiting_locked(WT_THD *thd)
{
int ret;
WT_RESOURCE *rc= thd->waiting_for;
DBUG_ENTER("stop_waiting_locked");
DBUG_ASSERT(rc->waiter_count);
DBUG_ASSERT(rc->state == ACTIVE);
rc->waiter_count--;
thd->waiting_for= 0;
ret= unlock_lock_and_free_resource(thd, rc);
DBUG_RETURN((thd->killed || ret) ? WT_DEADLOCK : WT_OK);
} | O3 | c | stop_waiting_locked:
pushq %rbp
movq %rsp, %rbp
movq 0x28(%rdi), %rsi
decl 0x10(%rsi)
movq $0x0, 0x28(%rdi)
popq %rbp
jmp 0xa71e9
| stop_waiting_locked:
push rbp
mov rbp, rsp
mov rsi, [rdi+28h]
dec dword ptr [rsi+10h]
mov qword ptr [rdi+28h], 0
pop rbp
jmp unlock_lock_and_free_resource
| long long stop_waiting_locked(long long a1)
{
--*(_DWORD *)(*(_QWORD *)(a1 + 40) + 16LL);
*(_QWORD *)(a1 + 40) = 0LL;
return unlock_lock_and_free_resource(a1);
}
| stop_waiting_locked:
PUSH RBP
MOV RBP,RSP
MOV RSI,qword ptr [RDI + 0x28]
DEC dword ptr [RSI + 0x10]
MOV qword ptr [RDI + 0x28],0x0
POP RBP
JMP 0x001a71e9
|
void stop_waiting_locked(long param_1)
{
int *piVar1;
piVar1 = (int *)(*(long *)(param_1 + 0x28) + 0x10);
*piVar1 = *piVar1 + -1;
*(int8 *)(param_1 + 0x28) = 0;
unlock_lock_and_free_resource();
return;
}
| |
43,852 | nlohmann::json_abi_v3_11_3::detail::invalid_iterator nlohmann::json_abi_v3_11_3::detail::invalid_iterator::create<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*) | monkey531[P]llama/common/json.hpp | static invalid_iterator create(int id_, const std::string& what_arg, BasicJsonContext context)
{
const std::string w = concat(exception::name("invalid_iterator", id_), exception::diagnostics(context), what_arg);
return {id_, w.c_str()};
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::invalid_iterator nlohmann::json_abi_v3_11_3::detail::invalid_iterator::create<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rcx, %r15
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x48ecf(%rip), %rsi # 0xb1094
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x2724a
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl %ebp, %edx
callq 0x3dd66
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x41fee
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %r14, %rcx
callq 0x3dcfd
leaq 0x8(%rsp), %rdi
callq 0x24218
leaq 0x48(%rsp), %rdi
callq 0x24218
leaq 0x28(%rsp), %rdi
callq 0x24218
movq 0x68(%rsp), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4317e
leaq 0x68(%rsp), %rdi
callq 0x24218
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
jmp 0x68281
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x24218
jmp 0x6826d
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x24218
jmp 0x6827c
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x24218
jmp 0x6828b
movq %rax, %rbx
movq %rbx, %rdi
callq 0x23fd0
nop
| _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_:
push rbp
push r15
push r14
push rbx
sub rsp, 88h
mov r15, rcx
mov r14, rdx
mov ebp, esi
mov rbx, rdi
lea rsi, aInvalidIterato; "invalid_iterator"
lea rdi, [rsp+0A8h+var_80]
lea rdx, [rsp+0A8h+var_A1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, [rsp+0A8h+var_60]
lea rsi, [rsp+0A8h+var_80]
mov edx, ebp
call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int)
lea rdi, [rsp+0A8h+var_A0]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_36detail9exception11diagnosticsINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEESC_PKT_; nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const*)
lea rdi, [rsp+0A8h+var_40]
lea rsi, [rsp+0A8h+var_60]
lea rdx, [rsp+0A8h+var_A0]
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS8_S8_RKS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>(std::string,std::string,std::string const&)
lea rdi, [rsp+0A8h+var_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0A8h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0A8h+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdx, [rsp+0A8h+var_40]; char *
mov rdi, rbx; this
mov esi, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorC2EiPKc; nlohmann::json_abi_v3_11_3::detail::invalid_iterator::invalid_iterator(int,char const*)
lea rdi, [rsp+0A8h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 88h
pop rbx
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_60]
jmp short loc_68281
mov rbx, rax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_6826D
mov rbx, rax
loc_6826D:
lea rdi, [rsp+arg_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_6827C
mov rbx, rax
loc_6827C:
lea rdi, [rsp+arg_20]; void *
loc_68281:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_6828B
mov rbx, rax
loc_6828B:
mov rdi, rbx
call __Unwind_Resume
| nlohmann::json_abi_v3_11_3::detail::invalid_iterator * ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
nlohmann::json_abi_v3_11_3::detail::invalid_iterator *this,
int a2,
long long a3)
{
_QWORD v5[4]; // [rsp+8h] [rbp-A0h] BYREF
_QWORD v6[4]; // [rsp+28h] [rbp-80h] BYREF
_BYTE v7[32]; // [rsp+48h] [rbp-60h] BYREF
char *v8[8]; // [rsp+68h] [rbp-40h] BYREF
std::string::basic_string<std::allocator<char>>(v6, (long long)"invalid_iterator");
nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v7, (long long)v6, a2);
nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<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>>(v5);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>(
(long long)v8,
(long long)v7,
(long long)v5,
a3);
std::string::~string(v5);
std::string::~string(v7);
std::string::~string(v6);
nlohmann::json_abi_v3_11_3::detail::invalid_iterator::invalid_iterator(this, a2, v8[0]);
std::string::~string(v8);
return this;
}
| _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x88
MOV R15,RCX
MOV R14,RDX
MOV EBP,ESI
MOV RBX,RDI
LAB_001681be:
LEA RSI,[0x1b1094]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x7]
CALL 0x0012724a
LAB_001681d4:
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x28]
MOV EDX,EBP
CALL 0x0013dd66
LAB_001681e5:
LEA RDI,[RSP + 0x8]
MOV RSI,R15
CALL 0x00141fee
LAB_001681f2:
LEA RDI,[RSP + 0x68]
LEA RSI,[RSP + 0x48]
LEA RDX,[RSP + 0x8]
MOV RCX,R14
CALL 0x0013dcfd
LEA RDI,[RSP + 0x8]
CALL 0x00124218
LEA RDI,[RSP + 0x48]
CALL 0x00124218
LEA RDI,[RSP + 0x28]
CALL 0x00124218
MOV RDX,qword ptr [RSP + 0x68]
LAB_0016822c:
MOV RDI,RBX
MOV ESI,EBP
CALL 0x0014317e
LAB_00168236:
LEA RDI,[RSP + 0x68]
CALL 0x00124218
MOV RAX,RBX
ADD RSP,0x88
POP RBX
POP R14
POP R15
POP RBP
RET
|
invalid_iterator *
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(invalid_iterator *param_1,int param_2,string *param_3)
{
allocator local_a1;
string local_a0 [32];
string local_80 [32];
exception local_60 [32];
char *local_40 [4];
/* try { // try from 001681be to 001681d3 has its CatchHandler @ 00168288 */
std::__cxx11::string::string<std::allocator<char>>(local_80,"invalid_iterator",&local_a1);
/* try { // try from 001681d4 to 001681e4 has its CatchHandler @ 00168279 */
nlohmann::json_abi_v3_11_3::detail::exception::name(local_60,local_80,param_2);
/* try { // try from 001681e5 to 001681f1 has its CatchHandler @ 0016826a */
nlohmann::json_abi_v3_11_3::detail::exception::
diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(local_a0);
/* try { // try from 001681f2 to 00168208 has its CatchHandler @ 0016825b */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,std::__cxx11::string,std::__cxx11::string,std::__cxx11::string_const&>
((detail *)local_40,(string *)local_60,local_a0,param_3);
std::__cxx11::string::~string(local_a0);
std::__cxx11::string::~string((string *)local_60);
std::__cxx11::string::~string(local_80);
/* try { // try from 0016822c to 00168235 has its CatchHandler @ 00168251 */
nlohmann::json_abi_v3_11_3::detail::invalid_iterator::invalid_iterator
(param_1,param_2,local_40[0]);
std::__cxx11::string::~string((string *)local_40);
return param_1;
}
| |
43,853 | mysql_next_result | eloqsql/libmariadb/libmariadb/mariadb_lib.c | int STDCALL mysql_next_result(MYSQL *mysql)
{
/* make sure communication is not blocking */
if (mysql->status != MYSQL_STATUS_READY)
{
SET_CLIENT_ERROR(mysql, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0);
return(1);
}
/* clear error, and mysql status variables */
CLEAR_CLIENT_ERROR(mysql);
mysql->affected_rows = (ulonglong) ~0;
if (mysql->server_status & SERVER_MORE_RESULTS_EXIST)
{
return(mysql->methods->db_read_query_result(mysql));
}
return(-1);
} | O3 | c | mysql_next_result:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
addq $0x297, %rdi # imm = 0x297
cmpl $0x0, 0x488(%rbx)
je 0x1a4a5
movl $0x7de, 0x90(%rbx) # imm = 0x7DE
leaq 0x306bc(%rip), %rax # 0x4ab20
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
xorl %r14d, %r14d
movb %r14b, 0x29c(%rbx)
leaq 0x97(%rbx), %rdi
leaq 0x306a7(%rip), %rax # 0x4ab30
movq 0x70(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13220
movb %r14b, 0x296(%rbx)
movl $0x1, %eax
jmp 0x1a4ee
movl $0x0, 0x90(%rbx)
movw $0x30, 0x4(%rdi)
movl $0x30303030, (%rdi) # imm = 0x30303030
movb $0x0, 0x97(%rbx)
movq 0x2a0(%rbx), %rax
testq %rax, %rax
je 0x1a4d5
movl $0x0, 0x4(%rax)
movq $-0x1, 0x338(%rbx)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testb $0x8, 0x380(%rbx)
jne 0x1a4f3
popq %rbx
popq %r14
popq %rbp
retq
movq 0x4d0(%rbx), %rax
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmpq *0x20(%rax)
| mysql_next_result:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
add rdi, 297h
cmp dword ptr [rbx+488h], 0
jz short loc_1A4A5
mov dword ptr [rbx+90h], 7DEh
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+29Ch], r14b
lea rdi, [rbx+97h]
lea rax, client_errors
mov rsi, [rax+70h]
mov edx, 1FFh
call _strncpy
mov [rbx+296h], r14b
mov eax, 1
jmp short loc_1A4EE
loc_1A4A5:
mov dword ptr [rbx+90h], 0
mov word ptr [rdi+4], 30h ; '0'
mov dword ptr [rdi], 30303030h
mov byte ptr [rbx+97h], 0
mov rax, [rbx+2A0h]
test rax, rax
jz short loc_1A4D5
mov dword ptr [rax+4], 0
loc_1A4D5:
mov qword ptr [rbx+338h], 0FFFFFFFFFFFFFFFFh
mov eax, 0FFFFFFFFh
test byte ptr [rbx+380h], 8
jnz short loc_1A4F3
loc_1A4EE:
pop rbx
pop r14
pop rbp
retn
loc_1A4F3:
mov rax, [rbx+4D0h]
mov rdi, rbx
pop rbx
pop r14
pop rbp
jmp qword ptr [rax+20h]
| long long mysql_next_result(long long a1)
{
char *v2; // rdi
long long result; // rax
long long v4; // rax
v2 = (char *)(a1 + 663);
if ( *(_DWORD *)(a1 + 1160) )
{
*(_DWORD *)(a1 + 144) = 2014;
strncpy(v2, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 668) = 0;
strncpy(a1 + 151, client_errors[14], 511LL);
*(_BYTE *)(a1 + 662) = 0;
return 1LL;
}
else
{
*(_DWORD *)(a1 + 144) = 0;
strcpy(v2, "00000");
*(_BYTE *)(a1 + 151) = 0;
v4 = *(_QWORD *)(a1 + 672);
if ( v4 )
*(_DWORD *)(v4 + 4) = 0;
*(_QWORD *)(a1 + 824) = -1LL;
result = 0xFFFFFFFFLL;
if ( (*(_BYTE *)(a1 + 896) & 8) != 0 )
return (*(long long ( **)(long long))(*(_QWORD *)(a1 + 1232) + 32LL))(a1);
}
return result;
}
| mysql_next_result:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
ADD RDI,0x297
CMP dword ptr [RBX + 0x488],0x0
JZ 0x0011a4a5
MOV dword ptr [RBX + 0x90],0x7de
LEA RAX,[0x14ab20]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
XOR R14D,R14D
MOV byte ptr [RBX + 0x29c],R14B
LEA RDI,[RBX + 0x97]
LEA RAX,[0x14ab30]
MOV RSI,qword ptr [RAX + 0x70]
MOV EDX,0x1ff
CALL 0x00113220
MOV byte ptr [RBX + 0x296],R14B
MOV EAX,0x1
JMP 0x0011a4ee
LAB_0011a4a5:
MOV dword ptr [RBX + 0x90],0x0
MOV word ptr [RDI + 0x4],0x30
MOV dword ptr [RDI],0x30303030
MOV byte ptr [RBX + 0x97],0x0
MOV RAX,qword ptr [RBX + 0x2a0]
TEST RAX,RAX
JZ 0x0011a4d5
MOV dword ptr [RAX + 0x4],0x0
LAB_0011a4d5:
MOV qword ptr [RBX + 0x338],-0x1
MOV EAX,0xffffffff
TEST byte ptr [RBX + 0x380],0x8
JNZ 0x0011a4f3
LAB_0011a4ee:
POP RBX
POP R14
POP RBP
RET
LAB_0011a4f3:
MOV RAX,qword ptr [RBX + 0x4d0]
MOV RDI,RBX
POP RBX
POP R14
POP RBP
JMP qword ptr [RAX + 0x20]
|
int8 mysql_next_result(long param_1)
{
int8 uVar1;
if (*(int *)(param_1 + 0x488) == 0) {
*(int4 *)(param_1 + 0x90) = 0;
*(int2 *)(param_1 + 0x29b) = 0x30;
builtin_strncpy((char *)(param_1 + 0x297),"0000",4);
*(int1 *)(param_1 + 0x97) = 0;
if (*(long *)(param_1 + 0x2a0) != 0) {
*(int4 *)(*(long *)(param_1 + 0x2a0) + 4) = 0;
}
*(int8 *)(param_1 + 0x338) = 0xffffffffffffffff;
uVar1 = 0xffffffff;
if ((*(byte *)(param_1 + 0x380) & 8) != 0) {
/* WARNING: Could not recover jumptable at 0x0011a501. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar1 = (**(code **)(*(long *)(param_1 + 0x4d0) + 0x20))(param_1);
return uVar1;
}
}
else {
*(int4 *)(param_1 + 0x90) = 0x7de;
strncpy((char *)(param_1 + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x29c) = 0;
strncpy((char *)(param_1 + 0x97),PTR_s_Commands_out_of_sync__you_can_t_r_0014aba0,0x1ff);
*(int1 *)(param_1 + 0x296) = 0;
uVar1 = 1;
}
return uVar1;
}
| |
43,854 | ma_pvio_cache_read | eloqsql/libmariadb/libmariadb/ma_pvio.c | ssize_t ma_pvio_cache_read(MARIADB_PVIO *pvio, uchar *buffer, size_t length)
{
ssize_t r;
if (!pvio)
return -1;
if (!pvio->cache)
return ma_pvio_read(pvio, buffer, length);
if (pvio->cache + pvio->cache_size > pvio->cache_pos)
{
ssize_t remaining = pvio->cache + pvio->cache_size - pvio->cache_pos;
assert(remaining > 0);
r= MIN((ssize_t)length, remaining);
memcpy(buffer, pvio->cache_pos, r);
pvio->cache_pos+= r;
}
else if (length >= PVIO_READ_AHEAD_CACHE_MIN_SIZE)
{
r= ma_pvio_read(pvio, buffer, length);
}
else
{
r= ma_pvio_read(pvio, pvio->cache, PVIO_READ_AHEAD_CACHE_SIZE);
if (r > 0)
{
if (length < (size_t)r)
{
pvio->cache_size= r;
pvio->cache_pos= pvio->cache + length;
r= length;
}
memcpy(buffer, pvio->cache, r);
}
}
return r;
} | O0 | c | ma_pvio_cache_read:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x23888
movq $-0x1, -0x8(%rbp)
jmp 0x239c9
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x238ad
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x23480
movq %rax, -0x8(%rbp)
jmp 0x239c9
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
addq 0x18(%rcx), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x23934
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
addq 0x18(%rcx), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jge 0x238fa
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x23902
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x28(%rbp), %rdx
callq 0x13360
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
jmp 0x239c1
cmpq $0x800, -0x20(%rbp) # imm = 0x800
jb 0x23955
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x23480
movq %rax, -0x28(%rbp)
jmp 0x239bf
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movl $0x4000, %edx # imm = 0x4000
callq 0x23480
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jle 0x239bd
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x239a8
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
addq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x28(%rbp), %rdx
callq 0x13360
jmp 0x239bf
jmp 0x239c1
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_pvio_cache_read:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
cmp [rbp+var_10], 0
jnz short loc_23888
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp loc_239C9
loc_23888:
mov rax, [rbp+var_10]
cmp qword ptr [rax+8], 0
jnz short loc_238AD
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call ma_pvio_read
mov [rbp+var_8], rax
jmp loc_239C9
loc_238AD:
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rcx, [rbp+var_10]
add rax, [rcx+18h]
mov rcx, [rbp+var_10]
cmp rax, [rcx+10h]
jbe short loc_23934
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rcx, [rbp+var_10]
add rax, [rcx+18h]
mov rcx, [rbp+var_10]
mov rcx, [rcx+10h]
sub rax, rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_20]
cmp rax, [rbp+var_30]
jge short loc_238FA
mov rax, [rbp+var_20]
mov [rbp+var_38], rax
jmp short loc_23902
loc_238FA:
mov rax, [rbp+var_30]
mov [rbp+var_38], rax
loc_23902:
mov rax, [rbp+var_38]
mov [rbp+var_28], rax
mov rdi, [rbp+var_18]
mov rax, [rbp+var_10]
mov rsi, [rax+10h]
mov rdx, [rbp+var_28]
call _memcpy
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
add rcx, [rax+10h]
mov [rax+10h], rcx
jmp loc_239C1
loc_23934:
cmp [rbp+var_20], 800h
jb short loc_23955
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call ma_pvio_read
mov [rbp+var_28], rax
jmp short loc_239BF
loc_23955:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_10]
mov rsi, [rax+8]
mov edx, 4000h
call ma_pvio_read
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jle short loc_239BD
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jnb short loc_239A8
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
mov [rax+18h], rcx
mov rax, [rbp+var_10]
mov rcx, [rax+8]
add rcx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax+10h], rcx
mov rax, [rbp+var_20]
mov [rbp+var_28], rax
loc_239A8:
mov rdi, [rbp+var_18]
mov rax, [rbp+var_10]
mov rsi, [rax+8]
mov rdx, [rbp+var_28]
call _memcpy
loc_239BD:
jmp short $+2
loc_239BF:
jmp short $+2
loc_239C1:
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_239C9:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long ma_pvio_cache_read(_QWORD *a1, long long a2, unsigned long long a3)
{
unsigned long long v4; // [rsp+8h] [rbp-38h]
long long v5; // [rsp+18h] [rbp-28h]
if ( !a1 )
return -1LL;
if ( !a1[1] )
return ma_pvio_read(a1, a2, a3);
if ( a1[3] + a1[1] <= a1[2] )
{
if ( a3 < 0x800 )
{
v5 = ma_pvio_read(a1, a1[1], 0x4000LL);
if ( v5 > 0 )
{
if ( a3 < v5 )
{
a1[3] = v5;
a1[2] = a3 + a1[1];
v5 = a3;
}
memcpy(a2, a1[1], v5);
}
}
else
{
return ma_pvio_read(a1, a2, a3);
}
}
else
{
if ( (signed long long)a3 >= a1[3] + a1[1] - a1[2] )
v4 = a1[3] + a1[1] - a1[2];
else
v4 = a3;
v5 = v4;
memcpy(a2, a1[2], v4);
a1[2] += v4;
}
return v5;
}
| ma_pvio_cache_read:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x00123888
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x001239c9
LAB_00123888:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x8],0x0
JNZ 0x001238ad
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00123480
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001239c9
LAB_001238ad:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RCX + 0x18]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x10]
JBE 0x00123934
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RCX + 0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x10]
SUB RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x30]
JGE 0x001238fa
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00123902
LAB_001238fa:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x38],RAX
LAB_00123902:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x00113360
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x001239c1
LAB_00123934:
CMP qword ptr [RBP + -0x20],0x800
JC 0x00123955
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00123480
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001239bf
LAB_00123955:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x8]
MOV EDX,0x4000
CALL 0x00123480
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JLE 0x001239bd
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JNC 0x001239a8
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x8]
ADD RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x28],RAX
LAB_001239a8:
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x00113360
LAB_001239bd:
JMP 0x001239bf
LAB_001239bf:
JMP 0x001239c1
LAB_001239c1:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_001239c9:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
ulong ma_pvio_cache_read(long param_1,void *param_2,ulong param_3)
{
size_t local_40;
ulong local_30;
ulong local_10;
if (param_1 == 0) {
local_10 = 0xffffffffffffffff;
}
else if (*(long *)(param_1 + 8) == 0) {
local_10 = ma_pvio_read(param_1,param_2,param_3);
}
else {
if (*(ulong *)(param_1 + 0x10) < (ulong)(*(long *)(param_1 + 8) + *(long *)(param_1 + 0x18))) {
local_40 = (*(long *)(param_1 + 8) + *(long *)(param_1 + 0x18)) - *(long *)(param_1 + 0x10);
if ((long)param_3 < (long)local_40) {
local_40 = param_3;
}
local_30 = local_40;
memcpy(param_2,*(void **)(param_1 + 0x10),local_40);
*(size_t *)(param_1 + 0x10) = local_40 + *(long *)(param_1 + 0x10);
}
else if (param_3 < 0x800) {
local_30 = ma_pvio_read(param_1,*(int8 *)(param_1 + 8),0x4000);
if (0 < (long)local_30) {
if (param_3 < local_30) {
*(ulong *)(param_1 + 0x18) = local_30;
*(ulong *)(param_1 + 0x10) = *(long *)(param_1 + 8) + param_3;
local_30 = param_3;
}
memcpy(param_2,*(void **)(param_1 + 8),local_30);
}
}
else {
local_30 = ma_pvio_read(param_1,param_2,param_3);
}
local_10 = local_30;
}
return local_10;
}
| |
43,855 | my_uca_coll_init_utf8mb3 | eloqsql/strings/ctype-uca.c | static my_bool
my_uca_coll_init_utf8mb3(struct charset_info_st *cs, MY_CHARSET_LOADER *loader)
{
if (my_coll_init_uca(cs, loader))
return TRUE;
if (my_uca_collation_can_optimize_no_contractions(cs))
my_uca_handler_map(cs, &my_uca_package_utf8mb3,
&my_uca_package_no_contractions_utf8mb3);
return FALSE;
} | O0 | c | my_uca_coll_init_utf8mb3:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x7dac0
cmpb $0x0, %al
je 0x7ef57
movb $0x1, -0x1(%rbp)
jmp 0x7ef7f
movq -0x10(%rbp), %rdi
callq 0x89ab0
cmpb $0x0, %al
je 0x7ef7b
movq -0x10(%rbp), %rdi
leaq 0x286201(%rip), %rsi # 0x305170
leaq 0x28621a(%rip), %rdx # 0x305190
callq 0x89b10
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| my_uca_coll_init_utf8mb3:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call my_coll_init_uca
cmp al, 0
jz short loc_7EF57
mov [rbp+var_1], 1
jmp short loc_7EF7F
loc_7EF57:
mov rdi, [rbp+var_10]
call my_uca_collation_can_optimize_no_contractions
cmp al, 0
jz short loc_7EF7B
mov rdi, [rbp+var_10]
lea rsi, my_uca_package_utf8mb3
lea rdx, my_uca_package_no_contractions_utf8mb3
call my_uca_handler_map
loc_7EF7B:
mov [rbp+var_1], 0
loc_7EF7F:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
| char my_uca_coll_init_utf8mb3(long long a1, long long a2)
{
if ( (unsigned __int8)my_coll_init_uca(a1, a2) )
return 1;
if ( (unsigned __int8)my_uca_collation_can_optimize_no_contractions(a1) )
my_uca_handler_map(a1, my_uca_package_utf8mb3, my_uca_package_no_contractions_utf8mb3);
return 0;
}
| my_uca_coll_init_utf8mb3:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0017dac0
CMP AL,0x0
JZ 0x0017ef57
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0017ef7f
LAB_0017ef57:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00189ab0
CMP AL,0x0
JZ 0x0017ef7b
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x405170]
LEA RDX,[0x405190]
CALL 0x00189b10
LAB_0017ef7b:
MOV byte ptr [RBP + -0x1],0x0
LAB_0017ef7f:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 my_uca_coll_init_utf8mb3(int8 param_1,int8 param_2)
{
char cVar1;
int1 local_9;
cVar1 = my_coll_init_uca(param_1,param_2);
if (cVar1 == '\0') {
cVar1 = my_uca_collation_can_optimize_no_contractions(param_1);
if (cVar1 != '\0') {
my_uca_handler_map(param_1,my_uca_package_utf8mb3,my_uca_package_no_contractions_utf8mb3);
}
local_9 = 0;
}
else {
local_9 = 1;
}
return local_9;
}
| |
43,856 | my_strxfrm_pad_desc_and_reverse | eloqsql/strings/ctype-simple.c | size_t
my_strxfrm_pad_desc_and_reverse(CHARSET_INFO *cs,
uchar *str, uchar *frmend, uchar *strend,
uint nweights, uint flags, uint level)
{
if (nweights && frmend < strend && (flags & MY_STRXFRM_PAD_WITH_SPACE))
{
uint fill_length= MY_MIN((uint) (strend - frmend), nweights * cs->mbminlen);
my_ci_fill(cs, (char*) frmend, fill_length, cs->pad_char);
frmend+= fill_length;
}
my_strxfrm_desc_and_reverse(str, frmend, flags, level);
if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && frmend < strend)
{
size_t fill_length= strend - frmend;
my_ci_fill(cs, (char*) frmend, fill_length, cs->pad_char);
frmend= strend;
}
return frmend - str;
} | O0 | c | my_strxfrm_pad_desc_and_reverse:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl %r9d, -0x28(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x42d93
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x42d93
movl -0x28(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x42d93
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rdx
imull 0x98(%rdx), %ecx
cmpl %ecx, %eax
jae 0x42d4f
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x3c(%rbp)
jmp 0x42d60
movl -0x24(%rbp), %eax
movq -0x8(%rbp), %rcx
imull 0x98(%rcx), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x2c(%rbp), %eax
movl %eax, %edx
movq -0x8(%rbp), %rax
movzbl 0xb0(%rax), %ecx
callq 0x46280
movl -0x2c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x28(%rbp), %edx
movl 0x10(%rbp), %ecx
callq 0x46140
movl -0x28(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x42df0
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x42df0
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x8(%rbp), %rax
movzbl 0xb0(%rax), %ecx
callq 0x46280
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_strxfrm_pad_desc_and_reverse:
push rbp
mov rbp, rsp
sub rsp, 40h
mov eax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_24], r8d
mov [rbp+var_28], r9d
cmp [rbp+var_24], 0
jz loc_42D93
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnb short loc_42D93
mov eax, [rbp+var_28]
and eax, 40h
cmp eax, 0
jz short loc_42D93
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rax, rcx
mov ecx, [rbp+var_24]
mov rdx, [rbp+var_8]
imul ecx, [rdx+98h]
cmp eax, ecx
jnb short loc_42D4F
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rax, rcx
mov [rbp+var_3C], eax
jmp short loc_42D60
loc_42D4F:
mov eax, [rbp+var_24]
mov rcx, [rbp+var_8]
imul eax, [rcx+98h]
mov [rbp+var_3C], eax
loc_42D60:
mov eax, [rbp+var_3C]
mov [rbp+var_2C], eax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
mov eax, [rbp+var_2C]
mov edx, eax
mov rax, [rbp+var_8]
movzx ecx, byte ptr [rax+0B0h]
call my_ci_fill_0
mov ecx, [rbp+var_2C]
mov rax, [rbp+var_18]
mov ecx, ecx
add rax, rcx
mov [rbp+var_18], rax
loc_42D93:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov edx, [rbp+var_28]
mov ecx, [rbp+arg_0]
call my_strxfrm_desc_and_reverse
mov eax, [rbp+var_28]
and eax, 80h
cmp eax, 0
jz short loc_42DF0
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnb short loc_42DF0
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rax, rcx
mov [rbp+var_38], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_38]
mov rax, [rbp+var_8]
movzx ecx, byte ptr [rax+0B0h]
call my_ci_fill_0
mov rax, [rbp+var_20]
mov [rbp+var_18], rax
loc_42DF0:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
sub rax, rcx
add rsp, 40h
pop rbp
retn
| long long my_strxfrm_pad_desc_and_reverse(
long long a1,
long long a2,
unsigned long long a3,
unsigned long long a4,
int a5,
unsigned int a6,
unsigned int a7)
{
unsigned int v8; // [rsp+4h] [rbp-3Ch]
unsigned long long v11; // [rsp+28h] [rbp-18h]
v11 = a3;
if ( a5 && a3 < a4 && (a6 & 0x40) != 0 )
{
if ( (int)a4 - (int)a3 >= (unsigned int)(*(_DWORD *)(a1 + 152) * a5) )
v8 = *(_DWORD *)(a1 + 152) * a5;
else
v8 = a4 - a3;
my_ci_fill_0(a1, a3, v8, *(unsigned __int8 *)(a1 + 176));
v11 += v8;
}
my_strxfrm_desc_and_reverse(a2, v11, a6, a7);
if ( (a6 & 0x80) != 0 && v11 < a4 )
{
my_ci_fill_0(a1, v11, a4 - v11, *(unsigned __int8 *)(a1 + 176));
v11 = a4;
}
return v11 - a2;
}
| my_strxfrm_pad_desc_and_reverse:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV dword ptr [RBP + -0x24],R8D
MOV dword ptr [RBP + -0x28],R9D
CMP dword ptr [RBP + -0x24],0x0
JZ 0x00142d93
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x00142d93
MOV EAX,dword ptr [RBP + -0x28]
AND EAX,0x40
CMP EAX,0x0
JZ 0x00142d93
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV ECX,dword ptr [RBP + -0x24]
MOV RDX,qword ptr [RBP + -0x8]
IMUL ECX,dword ptr [RDX + 0x98]
CMP EAX,ECX
JNC 0x00142d4f
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x00142d60
LAB_00142d4f:
MOV EAX,dword ptr [RBP + -0x24]
MOV RCX,qword ptr [RBP + -0x8]
IMUL EAX,dword ptr [RCX + 0x98]
MOV dword ptr [RBP + -0x3c],EAX
LAB_00142d60:
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x2c],EAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x2c]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RAX + 0xb0]
CALL 0x00146280
MOV ECX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
LAB_00142d93:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x28]
MOV ECX,dword ptr [RBP + 0x10]
CALL 0x00146140
MOV EAX,dword ptr [RBP + -0x28]
AND EAX,0x80
CMP EAX,0x0
JZ 0x00142df0
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x00142df0
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RAX + 0xb0]
CALL 0x00146280
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x18],RAX
LAB_00142df0:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,RCX
ADD RSP,0x40
POP RBP
RET
|
long my_strxfrm_pad_desc_and_reverse
(long param_1,long param_2,ulong param_3,ulong param_4,int param_5,uint param_6,
int4 param_7)
{
int4 local_44;
int8 local_20;
local_20 = param_3;
if (((param_5 != 0) && (param_3 < param_4)) && ((param_6 & 0x40) != 0)) {
if ((uint)((int)param_4 - (int)param_3) < (uint)(param_5 * *(int *)(param_1 + 0x98))) {
local_44 = (int)param_4 - (int)param_3;
}
else {
local_44 = param_5 * *(int *)(param_1 + 0x98);
}
my_ci_fill(param_1,param_3,local_44,*(int1 *)(param_1 + 0xb0));
local_20 = param_3 + local_44;
}
my_strxfrm_desc_and_reverse(param_2,local_20,param_6,param_7);
if (((param_6 & 0x80) != 0) && (local_20 < param_4)) {
my_ci_fill(param_1,local_20,param_4 - local_20,*(int1 *)(param_1 + 0xb0));
local_20 = param_4;
}
return local_20 - param_2;
}
| |
43,857 | dbuf_write | bluesky950520[P]quickjs/cutils.c | int dbuf_write(DynBuf *s, size_t offset, const void *data, size_t len)
{
size_t end;
end = offset + len;
if (dbuf_realloc(s, end))
return -1;
memcpy(s->buf + offset, data, len);
if (end > s->size)
s->size = end;
return 0;
} | O1 | c | dbuf_write:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
leaq (%rcx,%rsi), %r14
movq %r14, %rsi
callq 0x1a761
movl %eax, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x1a804
addq (%rbx), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0xe5a0
xorl %eax, %eax
cmpq 0x8(%rbx), %r14
jbe 0x1a804
movq %r14, 0x8(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| dbuf_write:
push r15
push r14
push r13
push r12
push rbx
mov r15, rcx
mov r12, rdx
mov r13, rsi
mov rbx, rdi
lea r14, [rcx+rsi]
mov rsi, r14
call dbuf_realloc
mov ecx, eax
mov eax, 0FFFFFFFFh
test ecx, ecx
jnz short loc_1A804
add r13, [rbx]
mov rdi, r13
mov rsi, r12
mov rdx, r15
call _memcpy
xor eax, eax
cmp r14, [rbx+8]
jbe short loc_1A804
mov [rbx+8], r14
loc_1A804:
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| long long dbuf_write(_QWORD *a1, long long a2, long long a3, long long a4)
{
unsigned long long v6; // r14
int v7; // ecx
long long result; // rax
v6 = a4 + a2;
v7 = dbuf_realloc((long long)a1, a4 + a2);
result = 0xFFFFFFFFLL;
if ( !v7 )
{
memcpy(*a1 + a2, a3, a4);
result = 0LL;
if ( v6 > a1[1] )
a1[1] = v6;
}
return result;
}
| dbuf_write:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R15,RCX
MOV R12,RDX
MOV R13,RSI
MOV RBX,RDI
LEA R14,[RCX + RSI*0x1]
MOV RSI,R14
CALL 0x0011a761
MOV ECX,EAX
MOV EAX,0xffffffff
TEST ECX,ECX
JNZ 0x0011a804
ADD R13,qword ptr [RBX]
MOV RDI,R13
MOV RSI,R12
MOV RDX,R15
CALL 0x0010e5a0
XOR EAX,EAX
CMP R14,qword ptr [RBX + 0x8]
JBE 0x0011a804
MOV qword ptr [RBX + 0x8],R14
LAB_0011a804:
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
int8 dbuf_write(long *param_1,long param_2,void *param_3,size_t param_4)
{
ulong uVar1;
int iVar2;
int8 uVar3;
uVar1 = param_4 + param_2;
iVar2 = dbuf_realloc(param_1,uVar1);
uVar3 = 0xffffffff;
if (iVar2 == 0) {
memcpy((void *)(param_2 + *param_1),param_3,param_4);
uVar3 = 0;
if ((ulong)param_1[1] < uVar1) {
param_1[1] = uVar1;
}
}
return uVar3;
}
| |
43,858 | dbuf_write | bluesky950520[P]quickjs/cutils.c | int dbuf_write(DynBuf *s, size_t offset, const void *data, size_t len)
{
size_t end;
end = offset + len;
if (dbuf_realloc(s, end))
return -1;
memcpy(s->buf + offset, data, len);
if (end > s->size)
s->size = end;
return 0;
} | O3 | c | dbuf_write:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
leaq (%rcx,%rsi), %r14
movq %r14, %rsi
callq 0x1b069
movl %eax, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x1b10c
addq (%rbx), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0xe5a0
xorl %eax, %eax
cmpq 0x8(%rbx), %r14
jbe 0x1b10c
movq %r14, 0x8(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| dbuf_write:
push r15
push r14
push r13
push r12
push rbx
mov r15, rcx
mov r12, rdx
mov r13, rsi
mov rbx, rdi
lea r14, [rcx+rsi]
mov rsi, r14
call dbuf_realloc
mov ecx, eax
mov eax, 0FFFFFFFFh
test ecx, ecx
jnz short loc_1B10C
add r13, [rbx]
mov rdi, r13
mov rsi, r12
mov rdx, r15
call _memcpy
xor eax, eax
cmp r14, [rbx+8]
jbe short loc_1B10C
mov [rbx+8], r14
loc_1B10C:
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| long long dbuf_write(_QWORD *a1, long long a2, long long a3, long long a4)
{
unsigned long long v6; // r14
int v7; // ecx
long long result; // rax
v6 = a4 + a2;
v7 = dbuf_realloc((long long)a1, a4 + a2);
result = 0xFFFFFFFFLL;
if ( !v7 )
{
memcpy(*a1 + a2, a3, a4);
result = 0LL;
if ( v6 > a1[1] )
a1[1] = v6;
}
return result;
}
| dbuf_write:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R15,RCX
MOV R12,RDX
MOV R13,RSI
MOV RBX,RDI
LEA R14,[RCX + RSI*0x1]
MOV RSI,R14
CALL 0x0011b069
MOV ECX,EAX
MOV EAX,0xffffffff
TEST ECX,ECX
JNZ 0x0011b10c
ADD R13,qword ptr [RBX]
MOV RDI,R13
MOV RSI,R12
MOV RDX,R15
CALL 0x0010e5a0
XOR EAX,EAX
CMP R14,qword ptr [RBX + 0x8]
JBE 0x0011b10c
MOV qword ptr [RBX + 0x8],R14
LAB_0011b10c:
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
int8 dbuf_write(long *param_1,long param_2,void *param_3,size_t param_4)
{
ulong uVar1;
int iVar2;
int8 uVar3;
uVar1 = param_4 + param_2;
iVar2 = dbuf_realloc(param_1,uVar1);
uVar3 = 0xffffffff;
if (iVar2 == 0) {
memcpy((void *)(param_2 + *param_1),param_3,param_4);
uVar3 = 0;
if ((ulong)param_1[1] < uVar1) {
param_1[1] = uVar1;
}
}
return uVar3;
}
| |
43,859 | my_get_err_msg | eloqsql/mysys/my_error.c | const char *my_get_err_msg(uint nr)
{
const char *format;
struct my_err_head *meh_p;
/* Search for the range this error is in. */
for (meh_p= my_errmsgs_list; meh_p; meh_p= meh_p->meh_next)
if (nr <= meh_p->meh_last)
break;
/*
If we found the range this error number is in, get the format string.
If the string is empty, or a NULL pointer, or if we're out of return,
we return NULL.
*/
if (!(format= (meh_p && (nr >= meh_p->meh_first)) ?
meh_p->get_errmsgs(nr)[nr - meh_p->meh_first] : NULL) ||
!*format)
return NULL;
return format;
} | O0 | c | my_get_err_msg:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0xc(%rbp)
movq 0x1cfda6(%rip), %rax # 0x2bf848
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xefaca
movl -0xc(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x14(%rcx), %eax
ja 0xefabb
jmp 0xefaca
jmp 0xefabd
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0xefaa6
cmpq $0x0, -0x20(%rbp)
je 0xefb00
movl -0xc(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jb 0xefb00
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movl -0xc(%rbp), %edi
callq *%rax
movl -0xc(%rbp), %ecx
movq -0x20(%rbp), %rdx
subl 0x10(%rdx), %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
jmp 0xefb08
xorl %eax, %eax
movq %rax, -0x28(%rbp)
jmp 0xefb08
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0xefb1f
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
jne 0xefb29
movq $0x0, -0x8(%rbp)
jmp 0xefb31
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| my_get_err_msg:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_C], edi
mov rax, cs:my_errmsgs_list
mov [rbp+var_20], rax
loc_EFAA6:
cmp [rbp+var_20], 0
jz short loc_EFACA
mov eax, [rbp+var_C]
mov rcx, [rbp+var_20]
cmp eax, [rcx+14h]
ja short loc_EFABB
jmp short loc_EFACA
loc_EFABB:
jmp short $+2
loc_EFABD:
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_20], rax
jmp short loc_EFAA6
loc_EFACA:
cmp [rbp+var_20], 0
jz short loc_EFB00
mov eax, [rbp+var_C]
mov rcx, [rbp+var_20]
cmp eax, [rcx+10h]
jb short loc_EFB00
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov edi, [rbp+var_C]
call rax
mov ecx, [rbp+var_C]
mov rdx, [rbp+var_20]
sub ecx, [rdx+10h]
mov ecx, ecx
mov rax, [rax+rcx*8]
mov [rbp+var_28], rax
jmp short loc_EFB08
loc_EFB00:
xor eax, eax
mov [rbp+var_28], rax
jmp short $+2
loc_EFB08:
mov rax, [rbp+var_28]
mov [rbp+var_18], rax
cmp rax, 0
jz short loc_EFB1F
mov rax, [rbp+var_18]
cmp byte ptr [rax], 0
jnz short loc_EFB29
loc_EFB1F:
mov [rbp+var_8], 0
jmp short loc_EFB31
loc_EFB29:
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
loc_EFB31:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| _BYTE * my_get_err_msg(unsigned int a1)
{
_BYTE *v2; // [rsp+8h] [rbp-28h]
long long *i; // [rsp+10h] [rbp-20h]
for ( i = my_errmsgs_list; i && a1 > *((_DWORD *)i + 5); i = (long long *)*i )
;
if ( i && a1 >= *((_DWORD *)i + 4) )
v2 = *(_BYTE **)(((long long ( *)(_QWORD))i[1])(a1) + 8LL * (a1 - *((_DWORD *)i + 4)));
else
v2 = 0LL;
if ( v2 && *v2 )
return v2;
else
return 0LL;
}
| my_get_err_msg:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV dword ptr [RBP + -0xc],EDI
MOV RAX,qword ptr [0x003bf848]
MOV qword ptr [RBP + -0x20],RAX
LAB_001efaa6:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001efaca
MOV EAX,dword ptr [RBP + -0xc]
MOV RCX,qword ptr [RBP + -0x20]
CMP EAX,dword ptr [RCX + 0x14]
JA 0x001efabb
JMP 0x001efaca
LAB_001efabb:
JMP 0x001efabd
LAB_001efabd:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001efaa6
LAB_001efaca:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001efb00
MOV EAX,dword ptr [RBP + -0xc]
MOV RCX,qword ptr [RBP + -0x20]
CMP EAX,dword ptr [RCX + 0x10]
JC 0x001efb00
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV EDI,dword ptr [RBP + -0xc]
CALL RAX
MOV ECX,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x20]
SUB ECX,dword ptr [RDX + 0x10]
MOV ECX,ECX
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001efb08
LAB_001efb00:
XOR EAX,EAX
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001efb08
LAB_001efb08:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JZ 0x001efb1f
MOV RAX,qword ptr [RBP + -0x18]
CMP byte ptr [RAX],0x0
JNZ 0x001efb29
LAB_001efb1f:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001efb31
LAB_001efb29:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
LAB_001efb31:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
char * my_get_err_msg(uint param_1)
{
long lVar1;
char *local_30;
int8 *local_28;
char *local_10;
for (local_28 = (int8 *)my_errmsgs_list;
(local_28 != (int8 *)0x0 && (*(uint *)((long)local_28 + 0x14) < param_1));
local_28 = (int8 *)*local_28) {
}
if ((local_28 == (int8 *)0x0) || (param_1 < *(uint *)(local_28 + 2))) {
local_30 = (char *)0x0;
}
else {
lVar1 = (*(code *)local_28[1])(param_1);
local_30 = *(char **)(lVar1 + (ulong)(param_1 - *(int *)(local_28 + 2)) * 8);
}
if ((local_30 == (char *)0x0) || (*local_30 == '\0')) {
local_10 = (char *)0x0;
}
else {
local_10 = local_30;
}
return local_10;
}
| |
43,860 | Common::ShowMessageAlert(std::basic_string_view<char, std::char_traits<char>>, bool, Common::Log::LogType, Common::MsgType, char const*, int) | Dolphin-anty/Source/Core/Common/MsgHandler.cpp | static bool ShowMessageAlert(std::string_view text, bool yes_no, Common::Log::LogType log_type,
MsgType style, const char* file, int line)
{
const char* caption = GetCaption(style);
// Directly call GenericLogFmt rather than using the normal log macros so that we can use the
// caller's line file and line number
Common::Log::GenericLogFmt<2>(Common::Log::LogLevel::LERROR, log_type, file, line,
FMT_STRING("{}: {}"), caption, text);
// Panic alerts.
if (style == MsgType::Warning && s_abort_on_panic_alert)
{
std::abort();
}
// Don't ignore questions, especially AskYesNo, PanicYesNo could be ignored
if (s_msg_handler != nullptr &&
(s_alert_enabled || style == MsgType::Question || style == MsgType::Critical))
{
return s_msg_handler(caption, text.data(), yes_no, style);
}
return true;
} | O0 | cpp | Common::ShowMessageAlert(std::basic_string_view<char, std::char_traits<char>>, bool, Common::Log::LogType, Common::MsgType, char const*, int):
subq $0x68, %rsp
movb %dl, %al
movl 0x70(%rsp), %edx
movq %rdi, 0x50(%rsp)
movq %rsi, 0x58(%rsp)
andb $0x1, %al
movb %al, 0x4f(%rsp)
movl %ecx, 0x48(%rsp)
movl %r8d, 0x44(%rsp)
movq %r9, 0x38(%rsp)
movl 0x44(%rsp), %edi
callq 0x12660
movq %rax, 0x30(%rsp)
movl 0x48(%rsp), %eax
movl %eax, 0x1c(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x20(%rsp)
movl 0x70(%rsp), %eax
movl %eax, 0x28(%rsp)
leaq 0x2e(%rsp), %rdi
callq 0x12980
movl 0x1c(%rsp), %esi
movq 0x20(%rsp), %rdx
movl 0x28(%rsp), %ecx
movl $0x2, %edi
leaq 0x2f(%rsp), %r8
leaq 0x30(%rsp), %r9
leaq 0x50(%rsp), %rax
movq %rax, (%rsp)
callq 0x12840
cmpl $0x2, 0x44(%rsp)
jne 0x12429
testb $0x1, 0xb4386(%rip) # 0xc67a8
je 0x12429
callq 0x9bd0
cmpq $0x0, 0xb4297(%rip) # 0xc66c8
je 0x1248f
testb $0x1, 0xb429e(%rip) # 0xc66d8
jne 0x1244a
cmpl $0x1, 0x44(%rsp)
je 0x1244a
cmpl $0x3, 0x44(%rsp)
jne 0x1248f
movq 0xb4277(%rip), %rax # 0xc66c8
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x13120
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq 0x10(%rsp), %rax
movb 0x4f(%rsp), %dl
movl 0x44(%rsp), %ecx
andb $0x1, %dl
movzbl %dl, %edx
callq *%rax
andb $0x1, %al
movb %al, 0x67(%rsp)
jmp 0x12494
movb $0x1, 0x67(%rsp)
movb 0x67(%rsp), %al
andb $0x1, %al
addq $0x68, %rsp
retq
nop
| _ZN6CommonL16ShowMessageAlertESt17basic_string_viewIcSt11char_traitsIcEEbNS_3Log7LogTypeENS_7MsgTypeEPKci:
sub rsp, 68h
mov al, dl
mov edx, [rsp+68h+arg_0]
mov [rsp+68h+var_18], rdi
mov [rsp+68h+var_10], rsi
and al, 1
mov [rsp+68h+var_19], al
mov [rsp+68h+var_20], ecx
mov [rsp+68h+var_24], r8d
mov [rsp+68h+var_30], r9
mov edi, [rsp+68h+var_24]
call _ZN6Common12_GLOBAL__N_110GetCaptionENS_7MsgTypeE; Common::`anonymous namespace'::GetCaption(Common::MsgType)
mov [rsp+68h+var_38], rax
mov eax, [rsp+68h+var_20]
mov [rsp+68h+var_4C], eax
mov rax, [rsp+68h+var_30]
mov [rsp+68h+var_48], rax
mov eax, [rsp+68h+arg_0]
mov [rsp+68h+var_40], eax
lea rdi, [rsp+68h+var_3A]
call _ZZN6CommonL16ShowMessageAlertESt17basic_string_viewIcSt11char_traitsIcEEbNS_3Log7LogTypeENS_7MsgTypeEPKciENK3$_0clEv; Common::ShowMessageAlert(std::string_view,bool,Common::Log::LogType,Common::MsgType,char const*,int)::$_0::operator()(void)
mov esi, [rsp+68h+var_4C]
mov rdx, [rsp+68h+var_48]
mov ecx, [rsp+68h+var_40]
mov edi, 2
lea r8, [rsp+68h+var_39]
lea r9, [rsp+68h+var_38]
lea rax, [rsp+68h+var_18]
mov [rsp+68h+var_68], rax
call _ZN6Common3Log13GenericLogFmtILm2EZZNS_L16ShowMessageAlertESt17basic_string_viewIcSt11char_traitsIcEEbNS0_7LogTypeENS_7MsgTypeEPKciENK3$_0clEvE18FMT_COMPILE_STRINGJS9_S5_EEEvNS0_8LogLevelES6_S9_iRKT0_DpRKT1_; Common::Log::GenericLogFmt<2ul,Common::ShowMessageAlert(std::string_view,bool,Common::Log::LogType,Common::MsgType,char const*,int)::$_0::operator() const(void)::FMT_COMPILE_STRING,char const*,std::string_view>(Common::Log::LogLevel,Common::Log::LogType,char const*,int,Common::ShowMessageAlert(std::string_view,bool,Common::Log::LogType,Common::MsgType,char const*,int)::$_0::operator() const(void)::FMT_COMPILE_STRING const&,char const*,std::string_view const&)
cmp [rsp+68h+var_24], 2
jnz short loc_12429
test cs:_ZN6Common12_GLOBAL__N_122s_abort_on_panic_alertE, 1; Common::`anonymous namespace'::s_abort_on_panic_alert
jz short loc_12429
call _abort
loc_12429:
cmp cs:_ZN6Common12_GLOBAL__N_113s_msg_handlerE, 0; Common::`anonymous namespace'::s_msg_handler
jz short loc_1248F
test cs:_ZN6Common12_GLOBAL__N_115s_alert_enabledE, 1; Common::`anonymous namespace'::s_alert_enabled
jnz short loc_1244A
cmp [rsp+68h+var_24], 1
jz short loc_1244A
cmp [rsp+68h+var_24], 3
jnz short loc_1248F
loc_1244A:
mov rax, cs:_ZN6Common12_GLOBAL__N_113s_msg_handlerE; Common::`anonymous namespace'::s_msg_handler
mov [rsp+68h+var_58], rax
mov rax, [rsp+68h+var_38]
mov [rsp+68h+var_60], rax
lea rdi, [rsp+68h+var_18]
call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE4dataEv; std::string_view::data(void)
mov rdi, [rsp+68h+var_60]
mov rsi, rax
mov rax, [rsp+68h+var_58]
mov dl, [rsp+68h+var_19]
mov ecx, [rsp+68h+var_24]
and dl, 1
movzx edx, dl
call rax
and al, 1
mov [rsp+68h+var_1], al
jmp short loc_12494
loc_1248F:
mov [rsp+68h+var_1], 1
loc_12494:
mov al, [rsp+68h+var_1]
and al, 1
add rsp, 68h
retn
| char Common::ShowMessageAlert(
long long a1,
long long a2,
char a3,
int a4,
unsigned int a5,
long long a6,
unsigned int a7)
{
long long v7; // rax
long long v9; // [rsp+8h] [rbp-60h]
long long ( *v10)(); // [rsp+10h] [rbp-58h]
int v11; // [rsp+1Ch] [rbp-4Ch]
int v12; // [rsp+20h] [rbp-48h]
char v13; // [rsp+2Eh] [rbp-3Ah] BYREF
char v14; // [rsp+2Fh] [rbp-39h] BYREF
long long Caption; // [rsp+30h] [rbp-38h] BYREF
long long v16; // [rsp+38h] [rbp-30h]
unsigned int v17; // [rsp+44h] [rbp-24h]
int v18; // [rsp+48h] [rbp-20h]
char v19; // [rsp+4Fh] [rbp-19h]
_QWORD v20[2]; // [rsp+50h] [rbp-18h] BYREF
v20[0] = a1;
v20[1] = a2;
v19 = a3 & 1;
v18 = a4;
v17 = a5;
v16 = a6;
Caption = Common::`anonymous namespace'::GetCaption(a5, a2, a7);
v11 = v18;
v12 = v16;
Common::ShowMessageAlert(std::string_view,bool,Common::Log::LogType,Common::MsgType,char const*,int)::$_0::operator()(&v13);
Common::Log::GenericLogFmt<2ul,Common::ShowMessageAlert(std::string_view,bool,Common::Log::LogType,Common::MsgType,char const*,int)::$_0::operator() const(void)::FMT_COMPILE_STRING,char const*,std::string_view>(
2,
v11,
v12,
a7,
(unsigned int)&v14,
(unsigned int)&Caption,
(long long)v20);
if ( v17 == 2 && (Common::`anonymous namespace'::s_abort_on_panic_alert & 1) != 0 )
abort();
if ( !Common::`anonymous namespace'::s_msg_handler[0]
|| (Common::`anonymous namespace'::s_alert_enabled & 1) == 0 && v17 != 1 && v17 != 3 )
{
return 1;
}
v10 = Common::`anonymous namespace'::s_msg_handler[0];
v9 = Caption;
v7 = std::string_view::data(v20);
return ((long long ( *)(long long, long long, _QWORD, _QWORD))v10)(v9, v7, v19 & 1, v17) & 1;
}
| ShowMessageAlert:
SUB RSP,0x68
MOV AL,DL
MOV EDX,dword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x58],RSI
AND AL,0x1
MOV byte ptr [RSP + 0x4f],AL
MOV dword ptr [RSP + 0x48],ECX
MOV dword ptr [RSP + 0x44],R8D
MOV qword ptr [RSP + 0x38],R9
MOV EDI,dword ptr [RSP + 0x44]
CALL 0x00112660
MOV qword ptr [RSP + 0x30],RAX
MOV EAX,dword ptr [RSP + 0x48]
MOV dword ptr [RSP + 0x1c],EAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x20],RAX
MOV EAX,dword ptr [RSP + 0x70]
MOV dword ptr [RSP + 0x28],EAX
LEA RDI,[RSP + 0x2e]
CALL 0x00112980
MOV ESI,dword ptr [RSP + 0x1c]
MOV RDX,qword ptr [RSP + 0x20]
MOV ECX,dword ptr [RSP + 0x28]
MOV EDI,0x2
LEA R8,[RSP + 0x2f]
LEA R9,[RSP + 0x30]
LEA RAX,[RSP + 0x50]
MOV qword ptr [RSP],RAX
CALL 0x00112840
CMP dword ptr [RSP + 0x44],0x2
JNZ 0x00112429
TEST byte ptr [0x001c67a8],0x1
JZ 0x00112429
CALL 0x00109bd0
LAB_00112429:
CMP qword ptr [0x001c66c8],0x0
JZ 0x0011248f
TEST byte ptr [0x001c66d8],0x1
JNZ 0x0011244a
CMP dword ptr [RSP + 0x44],0x1
JZ 0x0011244a
CMP dword ptr [RSP + 0x44],0x3
JNZ 0x0011248f
LAB_0011244a:
MOV RAX,qword ptr [0x001c66c8]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x8],RAX
LEA RDI,[RSP + 0x50]
CALL 0x00113120
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV DL,byte ptr [RSP + 0x4f]
MOV ECX,dword ptr [RSP + 0x44]
AND DL,0x1
MOVZX EDX,DL
CALL RAX
AND AL,0x1
MOV byte ptr [RSP + 0x67],AL
JMP 0x00112494
LAB_0011248f:
MOV byte ptr [RSP + 0x67],0x1
LAB_00112494:
MOV AL,byte ptr [RSP + 0x67]
AND AL,0x1
ADD RSP,0x68
RET
|
/* Common::ShowMessageAlert(std::basic_string_view<char, std::char_traits<char> >, bool,
Common::Log::LogType, Common::MsgType, char const*, int) */
byte __thiscall
Common::ShowMessageAlert
(Common *this,int8 param_2,byte param_3,int4 param_4,int param_5,
int8 param_6,int4 param_7)
{
int *puVar1;
int8 uVar2;
int4 uVar3;
int8 uVar4;
__0 local_3a;
int1 local_39;
int8 local_38;
int8 local_30;
int local_24;
int4 local_20;
byte local_19;
Common *local_18;
int8 local_10;
byte local_1;
local_19 = param_3 & 1;
local_30 = param_6;
local_24 = param_5;
local_20 = param_4;
local_18 = this;
local_10 = param_2;
local_38 = (anonymous_namespace)::GetCaption(param_5,param_2,param_7);
uVar3 = local_20;
uVar2 = local_30;
ShowMessageAlert(std::basic_string_view<char,std::char_traits<char>>,bool,Common::Log::LogType,Common::MsgType,char_const*,int)
::$_0::operator()(&local_3a);
Log::operator()(2,uVar3,uVar2,param_7,&local_39,&local_38,&local_18);
uVar2 = local_38;
puVar1 = (anonymous_namespace)::s_msg_handler;
if ((local_24 == 2) && (((anonymous_namespace)::s_abort_on_panic_alert & 1) != 0)) {
/* WARNING: Subroutine does not return */
abort();
}
if (((anonymous_namespace)::s_msg_handler == (int *)0x0) ||
(((((anonymous_namespace)::s_alert_enabled & 1) == 0 && (local_24 != 1)) && (local_24 != 3))))
{
local_1 = 1;
}
else {
uVar4 = std::basic_string_view<char,std::char_traits<char>>::data
((basic_string_view<char,std::char_traits<char>> *)&local_18);
local_1 = (*(code *)puVar1)(uVar2,uVar4,local_19 & 1,local_24);
local_1 = local_1 & 1;
}
return local_1;
}
| |
43,861 | mariadb_compression_algorithm_str | eloqsql/libmariadb/libmariadb/ma_compress.c | const char *_mariadb_compression_algorithm_str(enum enum_ma_compression_algorithm algorithm)
{
switch(algorithm) {
case COMPRESSION_NONE:
case COMPRESSION_ZLIB:
case COMPRESSION_ZSTD:
return compression_algorithms[algorithm] ;
default:
return compression_algorithms[COMPRESSION_UNKNOWN];
}
} | O3 | c | mariadb_compression_algorithm_str:
pushq %rbp
movq %rsp, %rbp
movl %edi, %eax
shlq $0x3, %rax
cmpl $0x3, %edi
leaq 0x29c40(%rip), %rcx # 0x47b00
movl $0x18, %edx
cmovbq %rax, %rdx
movq (%rcx,%rdx), %rax
popq %rbp
retq
| _mariadb_compression_algorithm_str:
push rbp
mov rbp, rsp
mov eax, edi
shl rax, 3
cmp edi, 3
lea rcx, compression_algorithms
mov edx, 18h
cmovb rdx, rax
mov rax, [rcx+rdx]
pop rbp
retn
| char * mariadb_compression_algorithm_str(unsigned int a1)
{
long long v1; // rdx
v1 = 3LL;
if ( a1 < 3 )
v1 = a1;
return compression_algorithms[v1];
}
| _mariadb_compression_algorithm_str:
PUSH RBP
MOV RBP,RSP
MOV EAX,EDI
SHL RAX,0x3
CMP EDI,0x3
LEA RCX,[0x147b00]
MOV EDX,0x18
CMOVC RDX,RAX
MOV RAX,qword ptr [RCX + RDX*0x1]
POP RBP
RET
|
int8 _mariadb_compression_algorithm_str(uint param_1)
{
long lVar1;
lVar1 = 0x18;
if (param_1 < 3) {
lVar1 = (ulong)param_1 << 3;
}
return *(int8 *)(compression_algorithms + lVar1);
}
| |
43,862 | common_chat_format_example[abi:cxx11](minja::chat_template const&, bool) | monkey531[P]llama/common/common.cpp | std::string common_chat_format_example(const common_chat_template & tmpl, bool use_jinja) {
std::vector<common_chat_msg> msgs = {
{"system", "You are a helpful assistant", {}},
{"user", "Hello", {}},
{"assistant", "Hi there", {}},
{"user", "How are you?", {}},
};
return common_chat_apply_template(tmpl, msgs, true, use_jinja);
} | O3 | cpp | common_chat_format_example[abi:cxx11](minja::chat_template const&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp # imm = 0x208
movl %edx, %r14d
movq %rsi, %rbp
movq %rdi, %r15
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x2d0df(%rip), %rsi # 0xad850
leaq 0x2d0de(%rip), %rdx # 0xad856
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0x590a2
movl %r14d, 0xc(%rsp)
leaq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x2d0b7(%rip), %rsi # 0xad857
leaq 0x2d0cb(%rip), %rdx # 0xad872
callq 0x590a2
leaq 0x68(%rsp), %r14
leaq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, -0x28(%rax)
movq $0x0, -0x18(%rax)
movq %rax, -0x10(%rax)
leaq 0x34c60(%rip), %rdx # 0xb543b
movq %rdx, %rsi
callq 0x590a2
movq %rbp, %r12
leaq 0xa0(%rsp), %r14
leaq 0xb0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x2d072(%rip), %rsi # 0xad873
leaq 0x2d06f(%rip), %rdx # 0xad877
movq %r14, %rdi
callq 0x590a2
leaq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x2d04d(%rip), %rsi # 0xad878
leaq 0x2d04b(%rip), %rdx # 0xad87d
callq 0x590a2
leaq 0xe0(%rsp), %r13
leaq 0xf8(%rsp), %rdi
leaq 0x108(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, -0x28(%rax)
movq $0x0, -0x18(%rax)
movq %rax, -0x10(%rax)
leaq 0x34bd2(%rip), %rdx # 0xb543b
movq %rdx, %rsi
callq 0x590a2
leaq 0x118(%rsp), %r14
leaq 0x128(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x2cfdd(%rip), %rsi # 0xad869
leaq 0x2cfdf(%rip), %rdx # 0xad872
movq %r14, %rdi
callq 0x590a2
leaq 0x138(%rsp), %rdi
leaq 0x148(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x2cfc8(%rip), %rsi # 0xad87e
leaq 0x2cfc9(%rip), %rdx # 0xad886
callq 0x590a2
leaq 0x158(%rsp), %r13
leaq 0x170(%rsp), %rdi
leaq 0x180(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, -0x28(%rax)
movq $0x0, -0x18(%rax)
movq %rax, -0x10(%rax)
leaq 0x34b47(%rip), %rdx # 0xb543b
movq %rdx, %rsi
callq 0x590a2
leaq 0x190(%rsp), %r14
leaq 0x1a0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x2cf5c(%rip), %rsi # 0xad873
leaq 0x2cf59(%rip), %rdx # 0xad877
movq %r14, %rdi
callq 0x590a2
leaq 0x1b0(%rsp), %rdi
leaq 0x1c0(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x40510(%rip), %rsi # 0xc0e51
leaq 0x40515(%rip), %rdx # 0xc0e5d
callq 0x590a2
leaq 0x1d0(%rsp), %r13
leaq 0x1e8(%rsp), %rdi
leaq 0x1f8(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, -0x28(%rax)
movq $0x0, -0x18(%rax)
movq %rax, -0x10(%rax)
leaq 0x34abc(%rip), %rdx # 0xb543b
movq %rdx, %rsi
callq 0x590a2
leaq 0x10(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0xb(%rsp), %rcx
movl $0x4, %edx
callq 0x82dfe
movl $0x1e0, %r14d # imm = 0x1E0
leaq (%rsp,%r14), %rax
addq $0x18, %rax
movq -0x10(%rax), %rdi
cmpq %rdi, %rax
je 0x809c2
movq (%rax), %rsi
incq %rsi
callq 0x186a0
leaq (%rsp,%r14), %rbx
addq $-0x10, %rbx
movq %rbx, %rdi
callq 0x2ad7e
movq -0x20(%rbx), %rdi
leaq (%rsp,%r14), %rax
addq $-0x20, %rax
cmpq %rdi, %rax
je 0x809ee
movq (%rax), %rsi
incq %rsi
callq 0x186a0
leaq (%rsp,%r14), %rax
addq $-0x40, %rax
movq -0x10(%rax), %rdi
cmpq %rdi, %rax
je 0x80a0a
movq (%rax), %rsi
incq %rsi
callq 0x186a0
addq $-0x78, %r14
jne 0x809a6
movzbl 0xc(%rsp), %r8d
leaq 0x10(%rsp), %rdx
movq %r15, %rdi
movq %r12, %rsi
movl $0x1, %ecx
callq 0x7fda8
leaq 0x10(%rsp), %rdi
callq 0x2ae06
movq %r15, %rax
addq $0x208, %rsp # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
leaq 0x10(%rsp), %rdi
callq 0x2ae06
jmp 0x80b8e
movq %rax, %r15
movl $0x168, %ebx # imm = 0x168
leaq (%rsp,%rbx), %rdi
addq $0x28, %rdi
callq 0x2adae
addq $-0x78, %rbx
cmpq $-0x78, %rbx
jne 0x80a64
jmp 0x80b8e
movq %rax, %r15
movq %r13, %rdi
callq 0x2ad7e
movq 0x1b0(%rsp), %rdi
cmpq %rbp, %rdi
je 0x80aad
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x80aad
movq %rax, %r15
movq 0x190(%rsp), %rdi
leaq 0x1a0(%rsp), %rax
cmpq %rax, %rdi
je 0x80b7d
movq 0x1a0(%rsp), %rsi
jmp 0x80b70
jmp 0x80b7a
movq %rax, %r15
movq %r13, %rdi
callq 0x2ad7e
movq 0x138(%rsp), %rdi
cmpq %rbp, %rdi
je 0x80b05
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x80b05
movq %rax, %r15
movq 0x118(%rsp), %rdi
leaq 0x128(%rsp), %rax
cmpq %rax, %rdi
je 0x80b7d
movq 0x128(%rsp), %rsi
jmp 0x80b70
jmp 0x80b7a
movq %rax, %r15
movq %r13, %rdi
callq 0x2ad7e
movq 0xc0(%rsp), %rdi
cmpq %rbp, %rdi
je 0x80b53
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x80b53
movq %rax, %r15
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x80b7d
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x80b7d
movq %rax, %r15
addq $-0x78, %r14
movq %r14, %rdi
callq 0x2adae
cmpq %rbx, %r14
jne 0x80b7d
movq %r15, %rdi
callq 0x18b90
movq %rax, %r15
movq %r14, %rdi
callq 0x2ad7e
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x80bbd
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x80bbd
movq %rax, %r15
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x80b8e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x80b8e
movq %rax, %r15
jmp 0x80b8e
| _Z26common_chat_format_exampleB5cxx11RKN5minja13chat_templateEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 208h
mov r14d, edx
mov rbp, rsi
mov r15, rdi
lea r13, [rsp+238h+var_200]
mov [r13-10h], r13
lea rsi, aSystem; "system"
lea rdx, aSystem+6; ""
lea rbx, [rsp+238h+var_210]
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov [rsp+238h+var_22C], r14d
lea rdi, [rsp+238h+var_1F0]
lea r12, [rsp+238h+var_1E0]
mov [r12-10h], r12
lea rsi, aYouAreAHelpful_1; "You are a helpful assistant"
lea rdx, aYouAreAHelpful_1+1Bh; ""
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 r14, [rsp+238h+var_1D0]
lea rdi, [rsp+238h+var_1B8]
lea rax, [rsp+238h+var_1A8]
xorps xmm0, xmm0
movups xmmword ptr [rax-28h], xmm0
mov qword ptr [rax-18h], 0
mov [rax-10h], rax
lea rdx, aSJinja+16h; ""
mov rsi, rdx
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 r12, rbp
lea r14, [rsp+238h+var_198]
lea rax, [rsp+238h+var_188]
mov [rax-10h], rax
lea rsi, aUser; "user"
lea rdx, aUser+4; ""
mov rdi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rsp+238h+var_178]
lea rbp, [rsp+238h+var_168]
mov [rbp-10h], rbp
lea rsi, aHello; "Hello"
lea rdx, aHello+5; ""
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 r13, [rsp+238h+var_158]
lea rdi, [rsp+238h+var_140]
lea rax, [rsp+238h+var_130]
xorps xmm0, xmm0
movups xmmword ptr [rax-28h], xmm0
mov qword ptr [rax-18h], 0
mov [rax-10h], rax
lea rdx, aSJinja+16h; ""
mov rsi, rdx
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 r14, [rsp+238h+var_120]
lea rax, [rsp+238h+var_110]
mov [rax-10h], rax
lea rsi, aYouAreAHelpful_1+12h; "assistant"
lea rdx, aYouAreAHelpful_1+1Bh; ""
mov rdi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rsp+238h+var_100]
lea rbp, [rsp+238h+var_F0]
mov [rbp-10h], rbp
lea rsi, aHiThere; "Hi there"
lea rdx, aHiThere+8; ""
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 r13, [rsp+238h+var_E0]
lea rdi, [rsp+238h+var_C8]
lea rax, [rsp+238h+var_B8]
xorps xmm0, xmm0
movups xmmword ptr [rax-28h], xmm0
mov qword ptr [rax-18h], 0
mov [rax-10h], rax
lea rdx, aSJinja+16h; ""
mov rsi, rdx
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 r14, [rsp+238h+var_A8]
lea rax, [rsp+238h+var_98]
mov [rax-10h], rax
lea rsi, aUser; "user"
lea rdx, aUser+4; ""
mov rdi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rsp+238h+var_88]
lea rbp, [rsp+238h+var_78]
mov [rbp-10h], rbp
lea rsi, aHowAreYou_0; "How are you?"
lea rdx, aHowAreYou_0+0Ch; ""
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 r13, [rsp+238h+var_68]
lea rdi, [rsp+238h+var_50]
lea rax, [rsp+238h+var_40]
xorps xmm0, xmm0
movups xmmword ptr [rax-28h], xmm0
mov qword ptr [rax-18h], 0
mov [rax-10h], rax
lea rdx, aSJinja+16h; ""
mov rsi, rdx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rsp+238h+var_228]
lea rsi, [rsp+238h+var_210]
lea rcx, [rsp+238h+var_22D]
mov edx, 4
call _ZNSt6vectorI15common_chat_msgSaIS0_EEC2ESt16initializer_listIS0_ERKS1_; std::vector<common_chat_msg>::vector(std::initializer_list<common_chat_msg>,std::allocator<common_chat_msg> const&)
mov r14d, 1E0h
loc_809A6:
lea rax, [rsp+r14+238h+var_238]
add rax, 18h
mov rdi, [rax-10h]; void *
cmp rax, rdi
jz short loc_809C2
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_809C2:
lea rbx, [rsp+r14+238h+var_238]
add rbx, 0FFFFFFFFFFFFFFF0h
mov rdi, rbx
call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector()
mov rdi, [rbx-20h]; void *
lea rax, [rsp+r14+238h+var_238]
add rax, 0FFFFFFFFFFFFFFE0h
cmp rax, rdi
jz short loc_809EE
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_809EE:
lea rax, [rsp+r14+238h+var_238]
add rax, 0FFFFFFFFFFFFFFC0h
mov rdi, [rax-10h]; void *
cmp rax, rdi
jz short loc_80A0A
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_80A0A:
add r14, 0FFFFFFFFFFFFFF88h
jnz short loc_809A6
movzx r8d, byte ptr [rsp+238h+var_22C]
lea rdx, [rsp+238h+var_228]
mov rdi, r15
mov rsi, r12
mov ecx, 1
call _Z26common_chat_apply_templateB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EEbb; common_chat_apply_template(minja::chat_template const&,std::vector<common_chat_msg> const&,bool,bool)
lea rdi, [rsp+238h+var_228]
call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector()
mov rax, r15
add rsp, 208h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r15, rax
lea rdi, [rsp+arg_8]
call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector()
jmp loc_80B8E
mov r15, rax
mov ebx, 168h
loc_80A64:
lea rdi, [rsp+rbx+0]
add rdi, 28h ; '('; this
call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg()
add rbx, 0FFFFFFFFFFFFFF88h
cmp rbx, 0FFFFFFFFFFFFFF88h
jnz short loc_80A64
jmp loc_80B8E
mov r15, rax
mov rdi, r13
call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector()
mov rdi, [rsp+arg_1A8]; void *
cmp rdi, rbp
jz short loc_80AAD
mov rsi, [rsp+arg_1B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_80AAD
mov r15, rax
loc_80AAD:
mov rdi, [rsp+arg_188]
lea rax, [rsp+arg_198]
cmp rdi, rax
jz loc_80B7D
mov rsi, [rsp+arg_198]
jmp loc_80B70
jmp loc_80B7A
mov r15, rax
mov rdi, r13
call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector()
mov rdi, [rsp+arg_130]; void *
cmp rdi, rbp
jz short loc_80B05
mov rsi, [rsp+arg_140]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_80B05
mov r15, rax
loc_80B05:
mov rdi, [rsp+arg_110]
lea rax, [rsp+arg_120]
cmp rdi, rax
jz short loc_80B7D
mov rsi, [rsp+arg_120]
jmp short loc_80B70
jmp short loc_80B7A
mov r15, rax
mov rdi, r13
call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector()
mov rdi, [rsp+arg_B8]; void *
cmp rdi, rbp
jz short loc_80B53
mov rsi, [rsp+arg_C8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_80B53
mov r15, rax
loc_80B53:
mov rdi, [rsp+arg_98]; void *
lea rax, [rsp+arg_A8]
cmp rdi, rax
jz short loc_80B7D
mov rsi, [rsp+arg_A8]
loc_80B70:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_80B7D
loc_80B7A:
mov r15, rax
loc_80B7D:
add r14, 0FFFFFFFFFFFFFF88h
mov rdi, r14; this
call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg()
cmp r14, rbx
jnz short loc_80B7D
loc_80B8E:
mov rdi, r15
call __Unwind_Resume
mov r15, rax
mov rdi, r14
call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector()
mov rdi, [rsp+arg_40]; void *
cmp rdi, r12
jz short loc_80BBD
mov rsi, [rsp+arg_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_80BBD
mov r15, rax
loc_80BBD:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r13
jz short loc_80B8E
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_80B8E
mov r15, rax
jmp short loc_80B8E
| _QWORD * common_chat_format_example[abi:cxx11](_QWORD *a1, const common_chat_inputs *a2, int a3)
{
unsigned long long v5; // r14
long long *v6; // rdi
_QWORD *v7; // rdi
_QWORD *v8; // rax
_QWORD *v9; // rax
_QWORD *v10; // rdi
_BYTE v12[11]; // [rsp+0h] [rbp-238h] BYREF
char v13; // [rsp+Bh] [rbp-22Dh] BYREF
int v14; // [rsp+Ch] [rbp-22Ch]
long long v15[3]; // [rsp+10h] [rbp-228h] BYREF
_QWORD v16[2]; // [rsp+28h] [rbp-210h] BYREF
char v17; // [rsp+38h] [rbp-200h] BYREF
char *v18; // [rsp+48h] [rbp-1F0h] BYREF
char v19; // [rsp+58h] [rbp-1E0h] BYREF
__int128 v20; // [rsp+68h] [rbp-1D0h]
long long v21; // [rsp+78h] [rbp-1C0h]
char *v22; // [rsp+80h] [rbp-1B8h] BYREF
char v23; // [rsp+90h] [rbp-1A8h] BYREF
char *v24; // [rsp+A0h] [rbp-198h] BYREF
char v25; // [rsp+B0h] [rbp-188h] BYREF
char *v26; // [rsp+C0h] [rbp-178h] BYREF
char v27; // [rsp+D0h] [rbp-168h] BYREF
__int128 v28; // [rsp+E0h] [rbp-158h]
long long v29; // [rsp+F0h] [rbp-148h]
char *v30; // [rsp+F8h] [rbp-140h] BYREF
char v31; // [rsp+108h] [rbp-130h] BYREF
char *v32; // [rsp+118h] [rbp-120h] BYREF
char v33; // [rsp+128h] [rbp-110h] BYREF
char *v34; // [rsp+138h] [rbp-100h] BYREF
char v35; // [rsp+148h] [rbp-F0h] BYREF
__int128 v36; // [rsp+158h] [rbp-E0h]
long long v37; // [rsp+168h] [rbp-D0h]
char *v38; // [rsp+170h] [rbp-C8h] BYREF
char v39; // [rsp+180h] [rbp-B8h] BYREF
char *v40; // [rsp+190h] [rbp-A8h] BYREF
char v41; // [rsp+1A0h] [rbp-98h] BYREF
char *v42; // [rsp+1B0h] [rbp-88h] BYREF
char v43; // [rsp+1C0h] [rbp-78h] BYREF
__int128 v44; // [rsp+1D0h] [rbp-68h]
long long v45; // [rsp+1E0h] [rbp-58h]
char *v46; // [rsp+1E8h] [rbp-50h] BYREF
char v47; // [rsp+1F8h] [rbp-40h] BYREF
v16[0] = &v17;
std::string::_M_construct<char const*>((long long)v16, "system", (long long)"");
v14 = a3;
v18 = &v19;
std::string::_M_construct<char const*>((long long)&v18, "You are a helpful assistant", (long long)"");
v20 = 0LL;
v21 = 0LL;
v22 = &v23;
std::string::_M_construct<char const*>((long long)&v22, "", (long long)"");
v24 = &v25;
std::string::_M_construct<char const*>((long long)&v24, "user", (long long)"");
v26 = &v27;
std::string::_M_construct<char const*>((long long)&v26, "Hello", (long long)"");
v28 = 0LL;
v29 = 0LL;
v30 = &v31;
std::string::_M_construct<char const*>((long long)&v30, "", (long long)"");
v32 = &v33;
std::string::_M_construct<char const*>((long long)&v32, "assistant", (long long)"");
v34 = &v35;
std::string::_M_construct<char const*>((long long)&v34, "Hi there", (long long)"");
v36 = 0LL;
v37 = 0LL;
v38 = &v39;
std::string::_M_construct<char const*>((long long)&v38, "", (long long)"");
v40 = &v41;
std::string::_M_construct<char const*>((long long)&v40, "user", (long long)"");
v42 = &v43;
std::string::_M_construct<char const*>((long long)&v42, "How are you?", (long long)"");
v44 = 0LL;
v45 = 0LL;
v46 = &v47;
std::string::_M_construct<char const*>((long long)&v46, "", (long long)"");
std::vector<common_chat_msg>::vector(v15, v16, 4LL, &v13);
v5 = 480LL;
do
{
v6 = *(long long **)&v12[v5 + 8];
if ( &v15[v5 / 8 + 1] != v6 )
operator delete(v6, v15[v5 / 8 + 1] + 1);
std::vector<common_tool_call>::~vector(&v12[v5 - 16]);
v7 = *(_QWORD **)&v12[v5 - 48];
v8 = &v12[v5 - 32];
if ( v8 != v7 )
operator delete(v7, *v8 + 1LL);
v9 = &v12[v5 - 64];
v10 = (_QWORD *)*(v9 - 2);
if ( v9 != v10 )
operator delete(v10, *v9 + 1LL);
v5 -= 120LL;
}
while ( v5 );
common_chat_apply_template[abi:cxx11](a1, a2, v15, 1u, (unsigned __int8)v14);
std::vector<common_chat_msg>::~vector(v15);
return a1;
}
| common_chat_format_example[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x208
MOV R14D,EDX
MOV RBP,RSI
MOV R15,RDI
LEA R13,[RSP + 0x38]
MOV qword ptr [R13 + -0x10],R13
LAB_0018076a:
LEA RSI,[0x1ad850]
LEA RDX,[0x1ad856]
LEA RBX,[RSP + 0x28]
MOV RDI,RBX
CALL 0x001590a2
MOV dword ptr [RSP + 0xc],R14D
LEA RDI,[RSP + 0x48]
LEA R12,[RSP + 0x58]
MOV qword ptr [R12 + -0x10],R12
LAB_00180799:
LEA RSI,[0x1ad857]
LEA RDX,[0x1ad872]
CALL 0x001590a2
LEA R14,[RSP + 0x68]
LEA RDI,[RSP + 0x80]
LEA RAX,[RSP + 0x90]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + -0x28],XMM0
MOV qword ptr [RAX + -0x18],0x0
MOV qword ptr [RAX + -0x10],RAX
LAB_001807d4:
LEA RDX,[0x1b543b]
MOV RSI,RDX
CALL 0x001590a2
MOV R12,RBP
LEA R14,[RSP + 0xa0]
LEA RAX,[RSP + 0xb0]
MOV qword ptr [RAX + -0x10],RAX
LAB_001807fa:
LEA RSI,[0x1ad873]
LEA RDX,[0x1ad877]
MOV RDI,R14
CALL 0x001590a2
LEA RDI,[RSP + 0xc0]
LEA RBP,[RSP + 0xd0]
MOV qword ptr [RBP + -0x10],RBP
LAB_00180824:
LEA RSI,[0x1ad878]
LEA RDX,[0x1ad87d]
CALL 0x001590a2
LEA R13,[RSP + 0xe0]
LEA RDI,[RSP + 0xf8]
LEA RAX,[RSP + 0x108]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + -0x28],XMM0
MOV qword ptr [RAX + -0x18],0x0
MOV qword ptr [RAX + -0x10],RAX
LAB_00180862:
LEA RDX,[0x1b543b]
MOV RSI,RDX
CALL 0x001590a2
LEA R14,[RSP + 0x118]
LEA RAX,[RSP + 0x128]
MOV qword ptr [RAX + -0x10],RAX
LAB_00180885:
LEA RSI,[0x1ad869]
LEA RDX,[0x1ad872]
MOV RDI,R14
CALL 0x001590a2
LEA RDI,[RSP + 0x138]
LEA RBP,[RSP + 0x148]
MOV qword ptr [RBP + -0x10],RBP
LAB_001808af:
LEA RSI,[0x1ad87e]
LEA RDX,[0x1ad886]
CALL 0x001590a2
LEA R13,[RSP + 0x158]
LEA RDI,[RSP + 0x170]
LEA RAX,[RSP + 0x180]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + -0x28],XMM0
MOV qword ptr [RAX + -0x18],0x0
MOV qword ptr [RAX + -0x10],RAX
LAB_001808ed:
LEA RDX,[0x1b543b]
MOV RSI,RDX
CALL 0x001590a2
LEA R14,[RSP + 0x190]
LEA RAX,[RSP + 0x1a0]
MOV qword ptr [RAX + -0x10],RAX
LAB_00180910:
LEA RSI,[0x1ad873]
LEA RDX,[0x1ad877]
MOV RDI,R14
CALL 0x001590a2
LEA RDI,[RSP + 0x1b0]
LEA RBP,[RSP + 0x1c0]
MOV qword ptr [RBP + -0x10],RBP
LAB_0018093a:
LEA RSI,[0x1c0e51]
LEA RDX,[0x1c0e5d]
CALL 0x001590a2
LEA R13,[RSP + 0x1d0]
LEA RDI,[RSP + 0x1e8]
LEA RAX,[RSP + 0x1f8]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + -0x28],XMM0
MOV qword ptr [RAX + -0x18],0x0
MOV qword ptr [RAX + -0x10],RAX
LAB_00180978:
LEA RDX,[0x1b543b]
MOV RSI,RDX
CALL 0x001590a2
LAB_00180987:
LEA RDI,[RSP + 0x10]
LEA RSI,[RSP + 0x28]
LEA RCX,[RSP + 0xb]
MOV EDX,0x4
CALL 0x00182dfe
MOV R14D,0x1e0
LAB_001809a6:
LEA RAX,[RSP + R14*0x1]
ADD RAX,0x18
MOV RDI,qword ptr [RAX + -0x10]
CMP RAX,RDI
JZ 0x001809c2
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x001186a0
LAB_001809c2:
LEA RBX,[RSP + R14*0x1]
ADD RBX,-0x10
MOV RDI,RBX
CALL 0x0012ad7e
MOV RDI,qword ptr [RBX + -0x20]
LEA RAX,[RSP + R14*0x1]
ADD RAX,-0x20
CMP RAX,RDI
JZ 0x001809ee
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x001186a0
LAB_001809ee:
LEA RAX,[RSP + R14*0x1]
ADD RAX,-0x40
MOV RDI,qword ptr [RAX + -0x10]
CMP RAX,RDI
JZ 0x00180a0a
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x001186a0
LAB_00180a0a:
ADD R14,-0x78
JNZ 0x001809a6
LAB_00180a10:
MOVZX R8D,byte ptr [RSP + 0xc]
LEA RDX,[RSP + 0x10]
MOV RDI,R15
MOV RSI,R12
MOV ECX,0x1
CALL 0x0017fda8
LAB_00180a2b:
LEA RDI,[RSP + 0x10]
CALL 0x0012ae06
MOV RAX,R15
ADD RSP,0x208
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_chat_format_example[abi:cxx11](minja::chat_template const&, bool) */
chat_template * common_chat_format_example_abi_cxx11_(chat_template *param_1,bool param_2)
{
long *plVar1;
long *plVar2;
int7 in_register_00000031;
long lVar3;
long alStack_288 [8];
vector<common_tool_call,std::allocator<common_tool_call>> avStack_248 [8];
int8 uStack_240;
int8 uStack_230;
vector<common_chat_msg,std::allocator<common_chat_msg>> local_228 [8];
long alStack_220 [2];
int1 *local_210 [2];
int1 local_200 [16];
int1 *local_1f0 [2];
int1 local_1e0 [16];
int8 local_1d0;
int8 uStack_1c8;
int8 local_1c0;
int1 *local_1b8 [2];
int1 local_1a8 [16];
int1 *local_198 [2];
int1 local_188 [16];
int1 *local_178 [2];
int1 local_168 [16];
int8 local_158;
int8 uStack_150;
int8 local_148;
int1 *local_140 [2];
int1 local_130 [16];
int1 *local_120 [2];
int1 local_110 [16];
int1 *local_100 [2];
int1 local_f0 [16];
int8 local_e0;
int8 uStack_d8;
int8 local_d0;
int1 *local_c8 [2];
int1 local_b8 [16];
int1 *local_a8 [2];
int1 local_98 [16];
int1 *local_88 [2];
int1 local_78 [16];
int8 local_68;
int8 uStack_60;
int8 local_58;
int1 *local_50 [2];
int1 local_40 [16];
local_210[0] = local_200;
/* try { // try from 0018076a to 00180784 has its CatchHandler @ 00180bd6 */
uStack_240 = 0x180785;
std::__cxx11::string::_M_construct<char_const*>(local_210,"system","");
local_1f0[0] = local_1e0;
/* try { // try from 00180799 to 001807ab has its CatchHandler @ 00180bba */
uStack_240 = 0x1807ac;
std::__cxx11::string::_M_construct<char_const*>(local_1f0,"You are a helpful assistant","");
local_1b8[0] = local_1a8;
local_1d0 = 0;
uStack_1c8 = 0;
local_1c0 = 0;
/* try { // try from 001807d4 to 001807e2 has its CatchHandler @ 00180b96 */
uStack_240 = 0x1807e3;
std::__cxx11::string::_M_construct<char_const*>(local_1b8,"");
local_198[0] = local_188;
/* try { // try from 001807fa to 0018080f has its CatchHandler @ 00180b7a */
uStack_240 = 0x180810;
std::__cxx11::string::_M_construct<char_const*>(local_198,&DAT_001ad873,&DAT_001ad877);
local_178[0] = local_168;
/* try { // try from 00180824 to 00180836 has its CatchHandler @ 00180b50 */
uStack_240 = 0x180837;
std::__cxx11::string::_M_construct<char_const*>(local_178,"Hello","");
local_140[0] = local_130;
local_158 = 0;
uStack_150 = 0;
local_148 = 0;
/* try { // try from 00180862 to 00180870 has its CatchHandler @ 00180b26 */
uStack_240 = 0x180871;
std::__cxx11::string::_M_construct<char_const*>(local_140,"");
local_120[0] = local_110;
/* try { // try from 00180885 to 0018089a has its CatchHandler @ 00180b24 */
uStack_240 = 0x18089b;
std::__cxx11::string::_M_construct<char_const*>(local_120,"assistant","");
local_100[0] = local_f0;
/* try { // try from 001808af to 001808c1 has its CatchHandler @ 00180b02 */
uStack_240 = 0x1808c2;
std::__cxx11::string::_M_construct<char_const*>(local_100,"Hi there","");
local_c8[0] = local_b8;
local_e0 = 0;
uStack_d8 = 0;
local_d0 = 0;
/* try { // try from 001808ed to 001808fb has its CatchHandler @ 00180ad8 */
uStack_240 = 0x1808fc;
std::__cxx11::string::_M_construct<char_const*>(local_c8,"");
local_a8[0] = local_98;
/* try { // try from 00180910 to 00180925 has its CatchHandler @ 00180ad3 */
uStack_240 = 0x180926;
std::__cxx11::string::_M_construct<char_const*>(local_a8,&DAT_001ad873,&DAT_001ad877);
local_88[0] = local_78;
/* try { // try from 0018093a to 0018094c has its CatchHandler @ 00180aaa */
uStack_240 = 0x18094d;
std::__cxx11::string::_M_construct<char_const*>(local_88,"How are you?","");
local_50[0] = local_40;
local_68 = 0;
uStack_60 = 0;
local_58 = 0;
/* try { // try from 00180978 to 00180986 has its CatchHandler @ 00180a80 */
uStack_240 = 0x180987;
std::__cxx11::string::_M_construct<char_const*>(local_50,"");
/* try { // try from 00180987 to 0018099f has its CatchHandler @ 00180a5c */
uStack_240 = 0x1809a0;
std::vector<common_chat_msg,std::allocator<common_chat_msg>>::vector
(local_228,local_210,4,(long)&uStack_230 + 3);
lVar3 = 0x1e0;
do {
if ((long *)((long)alStack_220 + lVar3) != *(long **)((long)&uStack_230 + lVar3)) {
uStack_240 = 0x1809c2;
operator_delete(*(long **)((long)&uStack_230 + lVar3),*(long *)((long)alStack_220 + lVar3) + 1
);
}
uStack_240 = 0x1809d2;
std::vector<common_tool_call,std::allocator<common_tool_call>>::~vector(avStack_248 + lVar3);
plVar2 = *(long **)((long)alStack_288 + lVar3 + 0x20);
plVar1 = (long *)((long)alStack_288 + lVar3 + 0x30);
if (plVar1 != plVar2) {
uStack_240 = 0x1809ee;
operator_delete(plVar2,*plVar1 + 1);
}
plVar2 = (long *)((long)alStack_288 + lVar3 + 0x10);
if (plVar2 != *(long **)((long)alStack_288 + lVar3)) {
uStack_240 = 0x180a0a;
operator_delete(*(long **)((long)alStack_288 + lVar3),*plVar2 + 1);
}
lVar3 = lVar3 + -0x78;
} while (lVar3 != 0);
/* try { // try from 00180a10 to 00180a2a has its CatchHandler @ 00180a4a */
uStack_240 = 0x180a2b;
common_chat_apply_template_abi_cxx11_
(param_1,(vector *)CONCAT71(in_register_00000031,param_2),SUB81(local_228,0),true);
uStack_240 = 0x180a35;
std::vector<common_chat_msg,std::allocator<common_chat_msg>>::~vector(local_228);
return param_1;
}
| |
43,863 | my_coll_parser_scan_reset_before | eloqsql/strings/ctype-uca.c | static int
my_coll_parser_scan_reset_before(MY_COLL_RULE_PARSER *p)
{
MY_COLL_LEXEM *lexem= my_coll_parser_curr(p);
if (!lex_cmp(lexem, C_STRING_WITH_LEN("[before primary]")) ||
!lex_cmp(lexem, C_STRING_WITH_LEN("[before 1]")))
{
p->rule.before_level= 1;
}
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[before secondary]")) ||
!lex_cmp(lexem, C_STRING_WITH_LEN("[before 2]")))
{
p->rule.before_level= 2;
}
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[before tertiary]")) ||
!lex_cmp(lexem, C_STRING_WITH_LEN("[before 3]")))
{
p->rule.before_level= 3;
}
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[before quaternary]")) ||
!lex_cmp(lexem, C_STRING_WITH_LEN("[before 4]")))
{
p->rule.before_level= 4;
}
else
{
p->rule.before_level= 0;
return 0; /* Don't scan thr next character */
}
return my_coll_parser_scan(p);
} | O0 | c | my_coll_parser_scan_reset_before:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0xad020
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x36b59(%rip), %rsi # 0xe46cd
movl $0x10, %edx
callq 0xad7a0
cmpl $0x0, %eax
je 0xadb9d
movq -0x18(%rbp), %rdi
leaq 0x36b50(%rip), %rsi # 0xe46de
movl $0xa, %edx
callq 0xad7a0
cmpl $0x0, %eax
jne 0xadbb1
movq -0x10(%rbp), %rax
movq $0x1, 0xe0(%rax)
jmp 0xadca1
movq -0x18(%rbp), %rdi
leaq 0x36b2d(%rip), %rsi # 0xe46e9
movl $0x12, %edx
callq 0xad7a0
cmpl $0x0, %eax
je 0xadbe5
movq -0x18(%rbp), %rdi
leaq 0x36b26(%rip), %rsi # 0xe46fc
movl $0xa, %edx
callq 0xad7a0
cmpl $0x0, %eax
jne 0xadbf9
movq -0x10(%rbp), %rax
movq $0x2, 0xe0(%rax)
jmp 0xadc9f
movq -0x18(%rbp), %rdi
leaq 0x36b03(%rip), %rsi # 0xe4707
movl $0x11, %edx
callq 0xad7a0
cmpl $0x0, %eax
je 0xadc2d
movq -0x18(%rbp), %rdi
leaq 0x36afb(%rip), %rsi # 0xe4719
movl $0xa, %edx
callq 0xad7a0
cmpl $0x0, %eax
jne 0xadc3e
movq -0x10(%rbp), %rax
movq $0x3, 0xe0(%rax)
jmp 0xadc9d
movq -0x18(%rbp), %rdi
leaq 0x36adb(%rip), %rsi # 0xe4724
movl $0x13, %edx
callq 0xad7a0
cmpl $0x0, %eax
je 0xadc72
movq -0x18(%rbp), %rdi
leaq 0x36ad5(%rip), %rsi # 0xe4738
movl $0xa, %edx
callq 0xad7a0
cmpl $0x0, %eax
jne 0xadc83
movq -0x10(%rbp), %rax
movq $0x4, 0xe0(%rax)
jmp 0xadc9b
movq -0x10(%rbp), %rax
movq $0x0, 0xe0(%rax)
movl $0x0, -0x4(%rbp)
jmp 0xadcad
jmp 0xadc9d
jmp 0xadc9f
jmp 0xadca1
movq -0x10(%rbp), %rdi
callq 0xad800
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_coll_parser_scan_reset_before:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov rdi, [rbp+var_10]
call my_coll_parser_curr
mov [rbp+var_18], rax
mov rdi, [rbp+var_18]
lea rsi, aBeforePrimary; "[before primary]"
mov edx, 10h
call lex_cmp
cmp eax, 0
jz short loc_ADB9D
mov rdi, [rbp+var_18]
lea rsi, aBefore1; "[before 1]"
mov edx, 0Ah
call lex_cmp
cmp eax, 0
jnz short loc_ADBB1
loc_ADB9D:
mov rax, [rbp+var_10]
mov qword ptr [rax+0E0h], 1
jmp loc_ADCA1
loc_ADBB1:
mov rdi, [rbp+var_18]
lea rsi, aBeforeSecondar; "[before secondary]"
mov edx, 12h
call lex_cmp
cmp eax, 0
jz short loc_ADBE5
mov rdi, [rbp+var_18]
lea rsi, aBefore2; "[before 2]"
mov edx, 0Ah
call lex_cmp
cmp eax, 0
jnz short loc_ADBF9
loc_ADBE5:
mov rax, [rbp+var_10]
mov qword ptr [rax+0E0h], 2
jmp loc_ADC9F
loc_ADBF9:
mov rdi, [rbp+var_18]
lea rsi, aBeforeTertiary; "[before tertiary]"
mov edx, 11h
call lex_cmp
cmp eax, 0
jz short loc_ADC2D
mov rdi, [rbp+var_18]
lea rsi, aBefore3; "[before 3]"
mov edx, 0Ah
call lex_cmp
cmp eax, 0
jnz short loc_ADC3E
loc_ADC2D:
mov rax, [rbp+var_10]
mov qword ptr [rax+0E0h], 3
jmp short loc_ADC9D
loc_ADC3E:
mov rdi, [rbp+var_18]
lea rsi, aBeforeQuaterna; "[before quaternary]"
mov edx, 13h
call lex_cmp
cmp eax, 0
jz short loc_ADC72
mov rdi, [rbp+var_18]
lea rsi, aBefore4; "[before 4]"
mov edx, 0Ah
call lex_cmp
cmp eax, 0
jnz short loc_ADC83
loc_ADC72:
mov rax, [rbp+var_10]
mov qword ptr [rax+0E0h], 4
jmp short loc_ADC9B
loc_ADC83:
mov rax, [rbp+var_10]
mov qword ptr [rax+0E0h], 0
mov [rbp+var_4], 0
jmp short loc_ADCAD
loc_ADC9B:
jmp short $+2
loc_ADC9D:
jmp short $+2
loc_ADC9F:
jmp short $+2
loc_ADCA1:
mov rdi, [rbp+var_10]
call my_coll_parser_scan
mov [rbp+var_4], eax
loc_ADCAD:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long my_coll_parser_scan_reset_before(long long a1)
{
long long v2; // [rsp+8h] [rbp-18h]
v2 = my_coll_parser_curr(a1);
if ( !(unsigned int)lex_cmp(v2, (long long)"[before primary]", 0x10uLL)
|| !(unsigned int)lex_cmp(v2, (long long)"[before 1]", 0xAuLL) )
{
*(_QWORD *)(a1 + 224) = 1LL;
return (unsigned int)my_coll_parser_scan(a1);
}
if ( !(unsigned int)lex_cmp(v2, (long long)"[before secondary]", 0x12uLL)
|| !(unsigned int)lex_cmp(v2, (long long)"[before 2]", 0xAuLL) )
{
*(_QWORD *)(a1 + 224) = 2LL;
return (unsigned int)my_coll_parser_scan(a1);
}
if ( !(unsigned int)lex_cmp(v2, (long long)"[before tertiary]", 0x11uLL)
|| !(unsigned int)lex_cmp(v2, (long long)"[before 3]", 0xAuLL) )
{
*(_QWORD *)(a1 + 224) = 3LL;
return (unsigned int)my_coll_parser_scan(a1);
}
if ( !(unsigned int)lex_cmp(v2, (long long)"[before quaternary]", 0x13uLL)
|| !(unsigned int)lex_cmp(v2, (long long)"[before 4]", 0xAuLL) )
{
*(_QWORD *)(a1 + 224) = 4LL;
return (unsigned int)my_coll_parser_scan(a1);
}
*(_QWORD *)(a1 + 224) = 0LL;
return 0;
}
| my_coll_parser_scan_reset_before:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001ad020
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x1e46cd]
MOV EDX,0x10
CALL 0x001ad7a0
CMP EAX,0x0
JZ 0x001adb9d
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x1e46de]
MOV EDX,0xa
CALL 0x001ad7a0
CMP EAX,0x0
JNZ 0x001adbb1
LAB_001adb9d:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xe0],0x1
JMP 0x001adca1
LAB_001adbb1:
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x1e46e9]
MOV EDX,0x12
CALL 0x001ad7a0
CMP EAX,0x0
JZ 0x001adbe5
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x1e46fc]
MOV EDX,0xa
CALL 0x001ad7a0
CMP EAX,0x0
JNZ 0x001adbf9
LAB_001adbe5:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xe0],0x2
JMP 0x001adc9f
LAB_001adbf9:
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x1e4707]
MOV EDX,0x11
CALL 0x001ad7a0
CMP EAX,0x0
JZ 0x001adc2d
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x1e4719]
MOV EDX,0xa
CALL 0x001ad7a0
CMP EAX,0x0
JNZ 0x001adc3e
LAB_001adc2d:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xe0],0x3
JMP 0x001adc9d
LAB_001adc3e:
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x1e4724]
MOV EDX,0x13
CALL 0x001ad7a0
CMP EAX,0x0
JZ 0x001adc72
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x1e4738]
MOV EDX,0xa
CALL 0x001ad7a0
CMP EAX,0x0
JNZ 0x001adc83
LAB_001adc72:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xe0],0x4
JMP 0x001adc9b
LAB_001adc83:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xe0],0x0
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001adcad
LAB_001adc9b:
JMP 0x001adc9d
LAB_001adc9d:
JMP 0x001adc9f
LAB_001adc9f:
JMP 0x001adca1
LAB_001adca1:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001ad800
MOV dword ptr [RBP + -0x4],EAX
LAB_001adcad:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 my_coll_parser_scan_reset_before(long param_1)
{
int iVar1;
int4 uVar2;
int8 uVar3;
uVar3 = my_coll_parser_curr(param_1);
iVar1 = lex_cmp(uVar3,"[before primary]",0x10);
if ((iVar1 == 0) || (iVar1 = lex_cmp(uVar3,"[before 1]",10), iVar1 == 0)) {
*(int8 *)(param_1 + 0xe0) = 1;
}
else {
iVar1 = lex_cmp(uVar3,"[before secondary]",0x12);
if ((iVar1 == 0) || (iVar1 = lex_cmp(uVar3,"[before 2]",10), iVar1 == 0)) {
*(int8 *)(param_1 + 0xe0) = 2;
}
else {
iVar1 = lex_cmp(uVar3,"[before tertiary]",0x11);
if ((iVar1 == 0) || (iVar1 = lex_cmp(uVar3,"[before 3]",10), iVar1 == 0)) {
*(int8 *)(param_1 + 0xe0) = 3;
}
else {
iVar1 = lex_cmp(uVar3,"[before quaternary]",0x13);
if ((iVar1 != 0) && (iVar1 = lex_cmp(uVar3,"[before 4]",10), iVar1 != 0)) {
*(int8 *)(param_1 + 0xe0) = 0;
return 0;
}
*(int8 *)(param_1 + 0xe0) = 4;
}
}
}
uVar2 = my_coll_parser_scan(param_1);
return uVar2;
}
| |
43,864 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<char const*>>::scan_number() | llama.cpp/common/./json.hpp | token_type scan_number() // lgtm [cpp/use-of-goto]
{
// reset token_buffer to store the number's bytes
reset();
// the type of the parsed number; initially set to unsigned; will be
// changed if minus sign, decimal point or exponent is read
token_type number_type = token_type::value_unsigned;
// state (init): we just found out we need to scan a number
switch (current)
{
case '-':
{
add(current);
goto scan_number_minus;
}
case '0':
{
add(current);
goto scan_number_zero;
}
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any1;
}
// all other characters are rejected outside scan_number()
default: // LCOV_EXCL_LINE
JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE
}
scan_number_minus:
// state: we just parsed a leading minus sign
number_type = token_type::value_integer;
switch (get())
{
case '0':
{
add(current);
goto scan_number_zero;
}
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any1;
}
default:
{
error_message = "invalid number; expected digit after '-'";
return token_type::parse_error;
}
}
scan_number_zero:
// state: we just parse a zero (maybe with a leading minus sign)
switch (get())
{
case '.':
{
add(decimal_point_char);
goto scan_number_decimal1;
}
case 'e':
case 'E':
{
add(current);
goto scan_number_exponent;
}
default:
goto scan_number_done;
}
scan_number_any1:
// state: we just parsed a number 0-9 (maybe with a leading minus sign)
switch (get())
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any1;
}
case '.':
{
add(decimal_point_char);
goto scan_number_decimal1;
}
case 'e':
case 'E':
{
add(current);
goto scan_number_exponent;
}
default:
goto scan_number_done;
}
scan_number_decimal1:
// state: we just parsed a decimal point
number_type = token_type::value_float;
switch (get())
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_decimal2;
}
default:
{
error_message = "invalid number; expected digit after '.'";
return token_type::parse_error;
}
}
scan_number_decimal2:
// we just parsed at least one number after a decimal point
switch (get())
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_decimal2;
}
case 'e':
case 'E':
{
add(current);
goto scan_number_exponent;
}
default:
goto scan_number_done;
}
scan_number_exponent:
// we just parsed an exponent
number_type = token_type::value_float;
switch (get())
{
case '+':
case '-':
{
add(current);
goto scan_number_sign;
}
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any2;
}
default:
{
error_message =
"invalid number; expected '+', '-', or digit after exponent";
return token_type::parse_error;
}
}
scan_number_sign:
// we just parsed an exponent sign
switch (get())
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any2;
}
default:
{
error_message = "invalid number; expected digit after exponent sign";
return token_type::parse_error;
}
}
scan_number_any2:
// we just parsed a number after the exponent or exponent sign
switch (get())
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any2;
}
default:
goto scan_number_done;
}
scan_number_done:
// unget the character after the number (we only read it to know that
// we are done scanning a number)
unget();
char* endptr = nullptr; // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg)
errno = 0;
// try to parse integers first and fall back to floats
if (number_type == token_type::value_unsigned)
{
const auto x = std::strtoull(token_buffer.data(), &endptr, 10);
// we checked the number format before
JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size());
if (errno == 0)
{
value_unsigned = static_cast<number_unsigned_t>(x);
if (value_unsigned == x)
{
return token_type::value_unsigned;
}
}
}
else if (number_type == token_type::value_integer)
{
const auto x = std::strtoll(token_buffer.data(), &endptr, 10);
// we checked the number format before
JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size());
if (errno == 0)
{
value_integer = static_cast<number_integer_t>(x);
if (value_integer == x)
{
return token_type::value_integer;
}
}
}
// this code is reached if we parse a floating-point number or if an
// integer conversion above failed
strtof(value_float, token_buffer.data(), &endptr);
// we checked the number format before
JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size());
return token_type::value_float;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<char const*>>::scan_number():
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x3652a
movl 0x14(%rbx), %eax
movl $0x5, %ebp
leal -0x31(%rax), %ecx
cmpl $0x9, %ecx
jae 0x36300
leaq 0x50(%rbx), %r14
movsbl %al, %esi
movq %r14, %rdi
callq 0x1cd90
movq %rbx, %rdi
callq 0x1d772
leal -0x30(%rax), %ecx
cmpl $0xa, %ecx
jae 0x362af
movsbl 0x14(%rbx), %esi
jmp 0x36291
cmpl $0x2e, %eax
je 0x363dc
cmpl $0x45, %eax
je 0x362c6
cmpl $0x65, %eax
jne 0x36411
movsbl 0x14(%rbx), %esi
movq %r14, %rdi
callq 0x1cd90
movq %rbx, %rdi
callq 0x1d772
leal -0x30(%rax), %ecx
cmpl $0xa, %ecx
jb 0x36345
cmpl $0x2d, %eax
je 0x364ac
cmpl $0x2b, %eax
je 0x364ac
leaq 0x909f5(%rip), %rax # 0xc6cf0
jmp 0x36406
cmpl $0x30, %eax
je 0x363a6
cmpl $0x2d, %eax
jne 0x3631c
leaq 0x50(%rbx), %rdi
movl $0x2d, %esi
callq 0x1cd90
movq %rbx, %rdi
callq 0x1d772
leal -0x31(%rax), %ecx
cmpl $0x9, %ecx
jb 0x3648b
cmpl $0x30, %eax
je 0x36513
leaq 0x9095e(%rip), %rax # 0xc6c9e
jmp 0x36406
leaq 0x50(%rbx), %r14
movsbl 0x14(%rbx), %esi
movq %r14, %rdi
callq 0x1cd90
movq %rbx, %rdi
callq 0x1d772
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x36385
leaq 0x50(%rbx), %r14
movsbl 0x14(%rbx), %esi
movq %r14, %rdi
callq 0x1cd90
movq %rbx, %rdi
callq 0x1d772
addl $-0x30, %eax
cmpl $0xa, %eax
jb 0x36369
movq %rbx, %rdi
callq 0x1d7e8
movq $0x0, 0x8(%rsp)
callq 0x1cbe0
movl $0x0, (%rax)
jmp 0x36467
leaq 0x50(%rbx), %rdi
movl $0x30, %esi
callq 0x1cd90
movl $0x5, %ebp
movq %rbx, %rdi
callq 0x1d772
cmpl $0x65, %eax
je 0x36498
cmpl $0x45, %eax
je 0x36498
cmpl $0x2e, %eax
jne 0x36411
leaq 0x50(%rbx), %r14
movsbl 0x90(%rbx), %esi
movq %r14, %rdi
callq 0x1cd90
movq %rbx, %rdi
callq 0x1d772
addl $-0x30, %eax
cmpl $0x9, %eax
jbe 0x364dc
leaq 0x908c1(%rip), %rax # 0xc6cc7
movq %rax, 0x70(%rbx)
movl $0xe, %eax
jmp 0x36482
movq %rbx, %rdi
callq 0x1d7e8
movq $0x0, 0x8(%rsp)
callq 0x1cbe0
movq %rax, %r14
movl $0x0, (%rax)
movq 0x50(%rbx), %rdi
leaq 0x8(%rsp), %rsi
movl $0xa, %edx
cmpl $0x5, %ebp
jne 0x3645c
callq 0x1c9d0
cmpl $0x0, (%r14)
jne 0x36467
movq %rax, 0x80(%rbx)
movl $0x5, %eax
jmp 0x36482
callq 0x1c950
cmpl $0x0, (%r14)
je 0x364a1
movq 0x50(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1cdf0
movsd %xmm0, 0x88(%rbx)
movl $0x7, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl 0x14(%rbx), %eax
movl $0x6, %ebp
jmp 0x3628a
leaq 0x50(%rbx), %r14
jmp 0x362c6
movq %rax, 0x78(%rbx)
movl $0x6, %eax
jmp 0x36482
movsbl 0x14(%rbx), %esi
leaq 0x50(%rbx), %r14
movq %r14, %rdi
callq 0x1cd90
movq %rbx, %rdi
callq 0x1d772
addl $-0x30, %eax
cmpl $0xa, %eax
jb 0x36349
leaq 0x90854(%rip), %rax # 0xc6d2b
jmp 0x36406
leaq 0x50(%rbx), %r14
movsbl 0x14(%rbx), %esi
movq %r14, %rdi
callq 0x1cd90
movq %rbx, %rdi
callq 0x1d772
leal -0x30(%rax), %ecx
cmpl $0xa, %ecx
jb 0x364e0
cmpl $0x65, %eax
je 0x362c6
cmpl $0x45, %eax
je 0x362c6
jmp 0x36385
movsbl 0x14(%rbx), %esi
leaq 0x50(%rbx), %rdi
callq 0x1cd90
movl $0x6, %ebp
jmp 0x363b9
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIPKcEEE11scan_numberEv:
push rbp
push r14
push rbx
sub rsp, 10h
mov rbx, rdi
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIPKcEEE5resetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<char const*>>::reset(void)
mov eax, [rbx+14h]
mov ebp, 5
lea ecx, [rax-31h]
cmp ecx, 9
jnb short loc_36300
loc_3628A:
lea r14, [rbx+50h]
movsx esi, al
loc_36291:
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIPKcEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<char const*>>::get(void)
lea ecx, [rax-30h]
cmp ecx, 0Ah
jnb short loc_362AF
movsx esi, byte ptr [rbx+14h]
jmp short loc_36291
loc_362AF:
cmp eax, 2Eh ; '.'
jz loc_363DC
cmp eax, 45h ; 'E'
jz short loc_362C6
cmp eax, 65h ; 'e'
jnz loc_36411
loc_362C6:
movsx esi, byte ptr [rbx+14h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIPKcEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<char const*>>::get(void)
lea ecx, [rax-30h]
cmp ecx, 0Ah
jb short loc_36345
cmp eax, 2Dh ; '-'
jz loc_364AC
cmp eax, 2Bh ; '+'
jz loc_364AC
lea rax, aInvalidNumberE; "invalid number; expected '+', '-', or d"...
jmp loc_36406
loc_36300:
cmp eax, 30h ; '0'
jz loc_363A6
cmp eax, 2Dh ; '-'
jnz short loc_3631C
lea rdi, [rbx+50h]
mov esi, 2Dh ; '-'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
loc_3631C:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIPKcEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<char const*>>::get(void)
lea ecx, [rax-31h]
cmp ecx, 9
jb loc_3648B
cmp eax, 30h ; '0'
jz loc_36513
lea rax, aInvalidNumberE_0; "invalid number; expected digit after '-"...
jmp loc_36406
loc_36345:
lea r14, [rbx+50h]
loc_36349:
movsx esi, byte ptr [rbx+14h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIPKcEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<char const*>>::get(void)
add eax, 0FFFFFFD0h
cmp eax, 9
ja short loc_36385
lea r14, [rbx+50h]
loc_36369:
movsx esi, byte ptr [rbx+14h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIPKcEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<char const*>>::get(void)
add eax, 0FFFFFFD0h
cmp eax, 0Ah
jb short loc_36369
loc_36385:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIPKcEEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<char const*>>::unget(void)
mov [rsp+28h+var_20], 0
call ___errno_location
mov dword ptr [rax], 0
jmp loc_36467
loc_363A6:
lea rdi, [rbx+50h]
mov esi, 30h ; '0'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov ebp, 5
loc_363B9:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIPKcEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<char const*>>::get(void)
cmp eax, 65h ; 'e'
jz loc_36498
cmp eax, 45h ; 'E'
jz loc_36498
cmp eax, 2Eh ; '.'
jnz short loc_36411
lea r14, [rbx+50h]
loc_363DC:
movsx esi, byte ptr [rbx+90h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIPKcEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<char const*>>::get(void)
add eax, 0FFFFFFD0h
cmp eax, 9
jbe loc_364DC
lea rax, aInvalidNumberE_1; "invalid number; expected digit after '."...
loc_36406:
mov [rbx+70h], rax
mov eax, 0Eh
jmp short loc_36482
loc_36411:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIPKcEEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<char const*>>::unget(void)
mov [rsp+28h+var_20], 0
call ___errno_location
mov r14, rax
mov dword ptr [rax], 0
mov rdi, [rbx+50h]
lea rsi, [rsp+28h+var_20]
mov edx, 0Ah
cmp ebp, 5
jnz short loc_3645C
call _strtoull
cmp dword ptr [r14], 0
jnz short loc_36467
mov [rbx+80h], rax
mov eax, 5
jmp short loc_36482
loc_3645C:
call _strtoll
cmp dword ptr [r14], 0
jz short loc_364A1
loc_36467:
mov rdi, [rbx+50h]
lea rsi, [rsp+28h+var_20]
call _strtod
movsd qword ptr [rbx+88h], xmm0
mov eax, 7
loc_36482:
add rsp, 10h
pop rbx
pop r14
pop rbp
retn
loc_3648B:
mov eax, [rbx+14h]
mov ebp, 6
jmp loc_3628A
loc_36498:
lea r14, [rbx+50h]
jmp loc_362C6
loc_364A1:
mov [rbx+78h], rax
mov eax, 6
jmp short loc_36482
loc_364AC:
movsx esi, byte ptr [rbx+14h]
lea r14, [rbx+50h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIPKcEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<char const*>>::get(void)
add eax, 0FFFFFFD0h
cmp eax, 0Ah
jb loc_36349
lea rax, aInvalidNumberE_2; "invalid number; expected digit after ex"...
jmp loc_36406
loc_364DC:
lea r14, [rbx+50h]
loc_364E0:
movsx esi, byte ptr [rbx+14h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIPKcEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<char const*>>::get(void)
lea ecx, [rax-30h]
cmp ecx, 0Ah
jb short loc_364E0
cmp eax, 65h ; 'e'
jz loc_362C6
cmp eax, 45h ; 'E'
jz loc_362C6
jmp loc_36385
loc_36513:
movsx esi, byte ptr [rbx+14h]
lea rdi, [rbx+50h]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov ebp, 6
jmp loc_363B9
| long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<char const*>>::scan_number(
long long a1)
{
int v2; // eax
int v3; // ebp
long long v4; // r14
long long i; // rsi
int v6; // eax
int v7; // eax
const char *v8; // rax
int v9; // eax
long long v10; // r14
int v11; // eax
_DWORD *v13; // r14
long long v14; // rdi
long long v15; // rax
long long v16; // rax
int v17; // eax
_QWORD v18[4]; // [rsp+8h] [rbp-20h] BYREF
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<char const*>>::reset();
v2 = *(_DWORD *)(a1 + 20);
v3 = 5;
if ( (unsigned int)(v2 - 49) >= 9 )
{
if ( v2 == 48 )
{
std::string::push_back(a1 + 80, 48LL);
v3 = 5;
}
else
{
if ( v2 == 45 )
std::string::push_back(a1 + 80, 45LL);
v9 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<char const*>>::get((__m128i *)a1);
if ( (unsigned int)(v9 - 49) < 9 )
{
v2 = *(_DWORD *)(a1 + 20);
v3 = 6;
goto LABEL_2;
}
if ( v9 != 48 )
{
v8 = "invalid number; expected digit after '-'";
goto LABEL_29;
}
std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 20));
v3 = 6;
}
v11 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<char const*>>::get((__m128i *)a1);
if ( v11 == 101 || v11 == 69 )
{
v4 = a1 + 80;
goto LABEL_8;
}
if ( v11 != 46 )
goto LABEL_30;
v4 = a1 + 80;
LABEL_27:
std::string::push_back(v4, (unsigned int)*(char *)(a1 + 144));
if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<char const*>>::get((__m128i *)a1)
- 48 > 9 )
{
v8 = "invalid number; expected digit after '.'";
goto LABEL_29;
}
v4 = a1 + 80;
do
{
std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 20));
v17 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<char const*>>::get((__m128i *)a1);
}
while ( (unsigned int)(v17 - 48) < 0xA );
if ( v17 != 101 && v17 != 69 )
{
LABEL_21:
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<char const*>>::unget(a1);
v18[0] = 0LL;
*(_DWORD *)__errno_location() = 0;
goto LABEL_34;
}
LABEL_8:
std::string::push_back(v4, (unsigned int)*(char *)(a1 + 20));
v7 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<char const*>>::get((__m128i *)a1);
if ( (unsigned int)(v7 - 48) < 0xA )
{
v10 = a1 + 80;
}
else
{
if ( v7 != 45 && v7 != 43 )
{
v8 = "invalid number; expected '+', '-', or digit after exponent";
LABEL_29:
*(_QWORD *)(a1 + 112) = v8;
return 14LL;
}
v10 = a1 + 80;
std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 20));
if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<char const*>>::get((__m128i *)a1)
- 48 >= 0xA )
{
v8 = "invalid number; expected digit after exponent sign";
goto LABEL_29;
}
}
std::string::push_back(v10, (unsigned int)*(char *)(a1 + 20));
if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<char const*>>::get((__m128i *)a1)
- 48 <= 9 )
{
do
std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 20));
while ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<char const*>>::get((__m128i *)a1)
- 48 < 0xA );
}
goto LABEL_21;
}
LABEL_2:
v4 = a1 + 80;
for ( i = (unsigned int)(char)v2; ; i = (unsigned int)*(char *)(a1 + 20) )
{
std::string::push_back(a1 + 80, i);
v6 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<char const*>>::get((__m128i *)a1);
if ( (unsigned int)(v6 - 48) >= 0xA )
break;
}
if ( v6 == 46 )
goto LABEL_27;
if ( v6 == 69 || v6 == 101 )
goto LABEL_8;
LABEL_30:
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<char const*>>::unget(a1);
v18[0] = 0LL;
v13 = (_DWORD *)__errno_location();
*v13 = 0;
v14 = *(_QWORD *)(a1 + 80);
if ( v3 == 5 )
{
v15 = strtoull(v14, v18, 10LL);
if ( !*v13 )
{
*(_QWORD *)(a1 + 128) = v15;
return 5LL;
}
goto LABEL_34;
}
v16 = strtoll(v14, v18, 10LL);
if ( *v13 )
{
LABEL_34:
*(double *)(a1 + 136) = strtod(*(_QWORD *)(a1 + 80), v18);
return 7LL;
}
*(_QWORD *)(a1 + 120) = v16;
return 6LL;
}
| scan_number:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
CALL 0x0013652a
MOV EAX,dword ptr [RBX + 0x14]
MOV EBP,0x5
LEA ECX,[RAX + -0x31]
CMP ECX,0x9
JNC 0x00136300
LAB_0013628a:
LEA R14,[RBX + 0x50]
MOVSX ESI,AL
LAB_00136291:
MOV RDI,R14
CALL 0x0011cd90
MOV RDI,RBX
CALL 0x0011d772
LEA ECX,[RAX + -0x30]
CMP ECX,0xa
JNC 0x001362af
MOVSX ESI,byte ptr [RBX + 0x14]
JMP 0x00136291
LAB_001362af:
CMP EAX,0x2e
JZ 0x001363dc
CMP EAX,0x45
JZ 0x001362c6
CMP EAX,0x65
JNZ 0x00136411
LAB_001362c6:
MOVSX ESI,byte ptr [RBX + 0x14]
MOV RDI,R14
CALL 0x0011cd90
MOV RDI,RBX
CALL 0x0011d772
LEA ECX,[RAX + -0x30]
CMP ECX,0xa
JC 0x00136345
CMP EAX,0x2d
JZ 0x001364ac
CMP EAX,0x2b
JZ 0x001364ac
LEA RAX,[0x1c6cf0]
JMP 0x00136406
LAB_00136300:
CMP EAX,0x30
JZ 0x001363a6
CMP EAX,0x2d
JNZ 0x0013631c
LEA RDI,[RBX + 0x50]
MOV ESI,0x2d
CALL 0x0011cd90
LAB_0013631c:
MOV RDI,RBX
CALL 0x0011d772
LEA ECX,[RAX + -0x31]
CMP ECX,0x9
JC 0x0013648b
CMP EAX,0x30
JZ 0x00136513
LEA RAX,[0x1c6c9e]
JMP 0x00136406
LAB_00136345:
LEA R14,[RBX + 0x50]
LAB_00136349:
MOVSX ESI,byte ptr [RBX + 0x14]
MOV RDI,R14
CALL 0x0011cd90
MOV RDI,RBX
CALL 0x0011d772
ADD EAX,-0x30
CMP EAX,0x9
JA 0x00136385
LEA R14,[RBX + 0x50]
LAB_00136369:
MOVSX ESI,byte ptr [RBX + 0x14]
MOV RDI,R14
CALL 0x0011cd90
MOV RDI,RBX
CALL 0x0011d772
ADD EAX,-0x30
CMP EAX,0xa
JC 0x00136369
LAB_00136385:
MOV RDI,RBX
CALL 0x0011d7e8
MOV qword ptr [RSP + 0x8],0x0
CALL 0x0011cbe0
MOV dword ptr [RAX],0x0
JMP 0x00136467
LAB_001363a6:
LEA RDI,[RBX + 0x50]
MOV ESI,0x30
CALL 0x0011cd90
MOV EBP,0x5
LAB_001363b9:
MOV RDI,RBX
CALL 0x0011d772
CMP EAX,0x65
JZ 0x00136498
CMP EAX,0x45
JZ 0x00136498
CMP EAX,0x2e
JNZ 0x00136411
LEA R14,[RBX + 0x50]
LAB_001363dc:
MOVSX ESI,byte ptr [RBX + 0x90]
MOV RDI,R14
CALL 0x0011cd90
MOV RDI,RBX
CALL 0x0011d772
ADD EAX,-0x30
CMP EAX,0x9
JBE 0x001364dc
LEA RAX,[0x1c6cc7]
LAB_00136406:
MOV qword ptr [RBX + 0x70],RAX
MOV EAX,0xe
JMP 0x00136482
LAB_00136411:
MOV RDI,RBX
CALL 0x0011d7e8
MOV qword ptr [RSP + 0x8],0x0
CALL 0x0011cbe0
MOV R14,RAX
MOV dword ptr [RAX],0x0
MOV RDI,qword ptr [RBX + 0x50]
LEA RSI,[RSP + 0x8]
MOV EDX,0xa
CMP EBP,0x5
JNZ 0x0013645c
CALL 0x0011c9d0
CMP dword ptr [R14],0x0
JNZ 0x00136467
MOV qword ptr [RBX + 0x80],RAX
MOV EAX,0x5
JMP 0x00136482
LAB_0013645c:
CALL 0x0011c950
CMP dword ptr [R14],0x0
JZ 0x001364a1
LAB_00136467:
MOV RDI,qword ptr [RBX + 0x50]
LEA RSI,[RSP + 0x8]
CALL 0x0011cdf0
MOVSD qword ptr [RBX + 0x88],XMM0
MOV EAX,0x7
LAB_00136482:
ADD RSP,0x10
POP RBX
POP R14
POP RBP
RET
LAB_0013648b:
MOV EAX,dword ptr [RBX + 0x14]
MOV EBP,0x6
JMP 0x0013628a
LAB_00136498:
LEA R14,[RBX + 0x50]
JMP 0x001362c6
LAB_001364a1:
MOV qword ptr [RBX + 0x78],RAX
MOV EAX,0x6
JMP 0x00136482
LAB_001364ac:
MOVSX ESI,byte ptr [RBX + 0x14]
LEA R14,[RBX + 0x50]
MOV RDI,R14
CALL 0x0011cd90
MOV RDI,RBX
CALL 0x0011d772
ADD EAX,-0x30
CMP EAX,0xa
JC 0x00136349
LEA RAX,[0x1c6d2b]
JMP 0x00136406
LAB_001364dc:
LEA R14,[RBX + 0x50]
LAB_001364e0:
MOVSX ESI,byte ptr [RBX + 0x14]
MOV RDI,R14
CALL 0x0011cd90
MOV RDI,RBX
CALL 0x0011d772
LEA ECX,[RAX + -0x30]
CMP ECX,0xa
JC 0x001364e0
CMP EAX,0x65
JZ 0x001362c6
CMP EAX,0x45
JZ 0x001362c6
JMP 0x00136385
LAB_00136513:
MOVSX ESI,byte ptr [RBX + 0x14]
LEA RDI,[RBX + 0x50]
CALL 0x0011cd90
MOV EBP,0x6
JMP 0x001363b9
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<char const*>
>::scan_number() */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<char_const*>>
::scan_number(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<char_const*>>
*this)
{
char cVar1;
int iVar2;
char *pcVar3;
int *piVar4;
ulonglong uVar5;
longlong lVar6;
int iVar7;
double dVar8;
char *local_20;
reset(this);
iVar2 = *(int *)(this + 0x14);
iVar7 = 5;
cVar1 = (char)this;
if (iVar2 - 0x31U < 9) {
LAB_0013628a:
do {
std::__cxx11::string::push_back(cVar1 + 'P');
iVar2 = get(this);
} while (iVar2 - 0x30U < 10);
if (iVar2 != 0x2e) {
if ((iVar2 != 0x45) && (iVar2 != 0x65)) {
LAB_00136411:
unget(this);
local_20 = (char *)0x0;
piVar4 = __errno_location();
*piVar4 = 0;
if (iVar7 == 5) {
uVar5 = strtoull(*(char **)(this + 0x50),&local_20,10);
if (*piVar4 == 0) {
*(ulonglong *)(this + 0x80) = uVar5;
return 5;
}
}
else {
lVar6 = strtoll(*(char **)(this + 0x50),&local_20,10);
if (*piVar4 == 0) {
*(longlong *)(this + 0x78) = lVar6;
return 6;
}
}
goto LAB_00136467;
}
goto LAB_001362c6;
}
LAB_001363dc:
std::__cxx11::string::push_back(cVar1 + 'P');
iVar2 = get(this);
if (9 < iVar2 - 0x30U) {
pcVar3 = "invalid number; expected digit after \'.\'";
goto LAB_00136406;
}
do {
std::__cxx11::string::push_back(cVar1 + 'P');
iVar2 = get(this);
} while (iVar2 - 0x30U < 10);
if ((iVar2 == 0x65) || (iVar2 == 0x45)) goto LAB_001362c6;
}
else {
if (iVar2 == 0x30) {
std::__cxx11::string::push_back(cVar1 + 'P');
iVar7 = 5;
}
else {
if (iVar2 == 0x2d) {
std::__cxx11::string::push_back(cVar1 + 'P');
}
iVar2 = get(this);
if (iVar2 - 0x31U < 9) {
iVar7 = 6;
goto LAB_0013628a;
}
if (iVar2 != 0x30) {
pcVar3 = "invalid number; expected digit after \'-\'";
goto LAB_00136406;
}
std::__cxx11::string::push_back(cVar1 + 'P');
iVar7 = 6;
}
iVar2 = get(this);
if ((iVar2 != 0x65) && (iVar2 != 0x45)) {
if (iVar2 != 0x2e) goto LAB_00136411;
goto LAB_001363dc;
}
LAB_001362c6:
std::__cxx11::string::push_back(cVar1 + 'P');
iVar2 = get(this);
if (9 < iVar2 - 0x30U) {
if ((iVar2 != 0x2d) && (iVar2 != 0x2b)) {
pcVar3 = "invalid number; expected \'+\', \'-\', or digit after exponent";
LAB_00136406:
*(char **)(this + 0x70) = pcVar3;
return 0xe;
}
std::__cxx11::string::push_back(cVar1 + 'P');
iVar2 = get(this);
if (9 < iVar2 - 0x30U) {
pcVar3 = "invalid number; expected digit after exponent sign";
goto LAB_00136406;
}
}
std::__cxx11::string::push_back(cVar1 + 'P');
iVar2 = get(this);
if (iVar2 - 0x30U < 10) {
do {
std::__cxx11::string::push_back(cVar1 + 'P');
iVar2 = get(this);
} while (iVar2 - 0x30U < 10);
}
}
unget(this);
local_20 = (char *)0x0;
piVar4 = __errno_location();
*piVar4 = 0;
LAB_00136467:
dVar8 = strtod(*(char **)(this + 0x50),&local_20);
*(double *)(this + 0x88) = dVar8;
return 7;
}
| |
43,865 | nglog::(anonymous namespace)::LogFileObject::SetBasename(char const*) | ng-log[P]ng-log/src/logging.cc | void LogFileObject::SetBasename(const char* basename) {
std::lock_guard<std::mutex> l{mutex_};
base_filename_selected_ = true;
if (base_filename_ != basename) {
// Get rid of old log file since we are changing names
if (file_ != nullptr) {
file_ = nullptr;
rollover_attempt_ = kRolloverAttemptFrequency - 1;
}
base_filename_ = basename;
}
} | O0 | cpp | nglog::(anonymous namespace)::LogFileObject::SetBasename(char const*):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x30(%rbp)
addq $0x8, %rsi
leaq -0x18(%rbp), %rdi
callq 0x198f0
movq -0x30(%rbp), %rdi
movb $0x1, 0x30(%rdi)
addq $0x38, %rdi
movq -0x10(%rbp), %rsi
callq 0x1e430
movb %al, -0x25(%rbp)
jmp 0x1853f
movb -0x25(%rbp), %al
testb $0x1, %al
jne 0x18548
jmp 0x185b2
movq -0x30(%rbp), %rdi
addq $0x98, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1bc70
testb $0x1, %al
jne 0x18562
jmp 0x1859d
movq -0x30(%rbp), %rdi
addq $0x98, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1b5e0
movq -0x30(%rbp), %rax
movl $0x1f, 0xb0(%rax)
jmp 0x1859d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x19920
jmp 0x185c1
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x38, %rdi
callq 0x99e0
jmp 0x185b0
jmp 0x185b2
leaq -0x18(%rbp), %rdi
callq 0x19920
addq $0x30, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x9cc0
nopw (%rax,%rax)
| _ZN5nglog12_GLOBAL__N_113LogFileObject11SetBasenameEPKc:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rsi, [rbp+var_8]
mov [rbp+var_30], rsi
add rsi, 8
lea rdi, [rbp+var_18]
call _ZNSt10lock_guardISt5mutexEC2ERS0_; std::lock_guard<std::mutex>::lock_guard(std::mutex&)
mov rdi, [rbp+var_30]
mov byte ptr [rdi+30h], 1
add rdi, 38h ; '8'
mov rsi, [rbp+var_10]
call _ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator!=<char>(std::string const&,char const*)
mov [rbp+var_25], al
jmp short $+2
loc_1853F:
mov al, [rbp+var_25]
test al, 1
jnz short loc_18548
jmp short loc_185B2
loc_18548:
mov rdi, [rbp+var_30]
add rdi, 98h
xor eax, eax
mov esi, eax
call _ZStneI8_IO_FILESt14default_deleteIS0_EEbRKSt10unique_ptrIT_T0_EDn; std::operator!=<_IO_FILE,std::default_delete<_IO_FILE>>(std::unique_ptr<_IO_FILE> const&,decltype(nullptr))
test al, 1
jnz short loc_18562
jmp short loc_1859D
loc_18562:
mov rdi, [rbp+var_30]
add rdi, 98h
xor eax, eax
mov esi, eax
call _ZNSt10unique_ptrI8_IO_FILESt14default_deleteIS0_EEaSEDn; std::unique_ptr<_IO_FILE>::operator=(decltype(nullptr))
mov rax, [rbp+var_30]
mov dword ptr [rax+0B0h], 1Fh
jmp short loc_1859D
mov rcx, rax
mov eax, edx
mov [rbp+var_20], rcx
mov [rbp+var_24], eax
lea rdi, [rbp+var_18]
call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard()
jmp short loc_185C1
loc_1859D:
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_10]
add rdi, 38h ; '8'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*)
jmp short $+2
loc_185B0:
jmp short $+2
loc_185B2:
lea rdi, [rbp+var_18]
call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard()
add rsp, 30h
pop rbp
retn
loc_185C1:
mov rdi, [rbp+var_20]
call __Unwind_Resume
| long long nglog::`anonymous namespace'::LogFileObject::SetBasename(
nglog::_anonymous_namespace_::LogFileObject *this,
const char *a2)
{
_BYTE v3[8]; // [rsp+18h] [rbp-18h] BYREF
const char *v4; // [rsp+20h] [rbp-10h]
nglog::_anonymous_namespace_::LogFileObject *v5; // [rsp+28h] [rbp-8h]
v5 = this;
v4 = a2;
std::lock_guard<std::mutex>::lock_guard(v3, (char *)this + 8);
*((_BYTE *)this + 48) = 1;
if ( (std::operator!=<char>((char *)this + 56, v4) & 1) != 0 )
{
if ( (std::operator!=<_IO_FILE,std::default_delete<_IO_FILE>>((char *)this + 152, 0LL) & 1) != 0 )
{
std::unique_ptr<_IO_FILE>::operator=((char *)this + 152, 0LL);
*((_DWORD *)this + 44) = 31;
}
std::string::operator=((char *)this + 56, v4);
}
return std::lock_guard<std::mutex>::~lock_guard(v3);
}
| SetBasename:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RSI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x30],RSI
ADD RSI,0x8
LEA RDI,[RBP + -0x18]
CALL 0x001198f0
MOV RDI,qword ptr [RBP + -0x30]
MOV byte ptr [RDI + 0x30],0x1
ADD RDI,0x38
MOV RSI,qword ptr [RBP + -0x10]
LAB_00118535:
CALL 0x0011e430
MOV byte ptr [RBP + -0x25],AL
JMP 0x0011853f
LAB_0011853f:
MOV AL,byte ptr [RBP + -0x25]
TEST AL,0x1
JNZ 0x00118548
JMP 0x001185b2
LAB_00118548:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x98
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0011bc70
TEST AL,0x1
JNZ 0x00118562
JMP 0x0011859d
LAB_00118562:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x98
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0011b5e0
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0xb0],0x1f
JMP 0x0011859d
LAB_0011859d:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x10]
ADD RDI,0x38
CALL 0x001099e0
LAB_001185ae:
JMP 0x001185b0
LAB_001185b0:
JMP 0x001185b2
LAB_001185b2:
LEA RDI,[RBP + -0x18]
CALL 0x00119920
ADD RSP,0x30
POP RBP
RET
|
/* nglog::(anonymous namespace)::LogFileObject::SetBasename(char const*) */
void __thiscall
nglog::(anonymous_namespace)::LogFileObject::SetBasename(LogFileObject *this,char *param_1)
{
bool bVar1;
lock_guard<std::mutex> local_20 [8];
char *local_18;
LogFileObject *local_10;
local_18 = param_1;
local_10 = this;
std::lock_guard<std::mutex>::lock_guard(local_20,(mutex *)(this + 8));
this[0x30] = (LogFileObject)0x1;
/* try { // try from 00118535 to 001185ad has its CatchHandler @ 00118586 */
bVar1 = std::operator!=((string *)(this + 0x38),local_18);
if (bVar1) {
bVar1 = std::operator!=((unique_ptr *)(this + 0x98),(_func_decltype_nullptr *)0x0);
if (bVar1) {
std::unique_ptr<_IO_FILE,std::default_delete<_IO_FILE>>::operator=
((unique_ptr<_IO_FILE,std::default_delete<_IO_FILE>> *)(this + 0x98),
(_func_decltype_nullptr *)0x0);
*(int4 *)(this + 0xb0) = 0x1f;
}
std::__cxx11::string::operator=((string *)(this + 0x38),local_18);
}
std::lock_guard<std::mutex>::~lock_guard(local_20);
return;
}
| |
43,866 | my_mb_wc_utf8mb3_quick | eloqsql/strings/ctype-utf8.h | static inline int
my_mb_wc_utf8mb3_quick(my_wc_t * pwc, const uchar *s, const uchar *e)
{
uchar c;
if (s >= e)
return MY_CS_TOOSMALL;
c= s[0];
if (c < 0x80)
{
*pwc = c;
return 1;
}
else if (c < 0xc2)
return MY_CS_ILSEQ;
else if (c < 0xe0)
{
if (s+2 > e) /* We need 2 characters */
return MY_CS_TOOSMALL2;
if (!(IS_CONTINUATION_BYTE(s[1])))
return MY_CS_ILSEQ;
*pwc= UTF8MB2_CODE(c, s[1]);
return 2;
}
else if (c < 0xf0)
{
if (s+3 > e) /* We need 3 characters */
return MY_CS_TOOSMALL3;
if (!IS_UTF8MB3_STEP2(c, s[1], s[2]))
return MY_CS_ILSEQ;
*pwc= UTF8MB3_CODE(c, s[1], s[2]);
return 3;
}
return MY_CS_ILSEQ;
} | O0 | c | my_mb_wc_utf8mb3_quick:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jb 0x52786
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x52903
movq -0x18(%rbp), %rax
movb (%rax), %al
movb %al, -0x21(%rbp)
movzbl -0x21(%rbp), %eax
cmpl $0x80, %eax
jge 0x527b3
movzbl -0x21(%rbp), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x52903
movzbl -0x21(%rbp), %eax
cmpl $0xc2, %eax
jge 0x527ca
movl $0x0, -0x4(%rbp)
jmp 0x52903
movzbl -0x21(%rbp), %eax
cmpl $0xe0, %eax
jge 0x52840
movq -0x18(%rbp), %rax
addq $0x2, %rax
cmpq -0x20(%rbp), %rax
jbe 0x527ef
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x52903
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jl 0x5280d
movl $0x0, -0x4(%rbp)
jmp 0x52903
movzbl -0x21(%rbp), %eax
andl $0x1f, %eax
movslq %eax, %rcx
shlq $0x6, %rcx
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cltq
orq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x52903
movzbl -0x21(%rbp), %eax
cmpl $0xf0, %eax
jge 0x528f6
movq -0x18(%rbp), %rax
addq $0x3, %rax
cmpq -0x20(%rbp), %rax
jbe 0x52869
movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99
jmp 0x52903
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x528a7
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x528a7
movzbl -0x21(%rbp), %eax
cmpl $0xe1, %eax
jge 0x528b0
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xa0, %eax
jge 0x528b0
movl $0x0, -0x4(%rbp)
jmp 0x52903
movzbl -0x21(%rbp), %eax
andl $0xf, %eax
movslq %eax, %rcx
shlq $0xc, %rcx
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cltq
shlq $0x6, %rax
orq %rax, %rcx
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cltq
orq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x3, -0x4(%rbp)
jmp 0x52903
jmp 0x528f8
jmp 0x528fa
jmp 0x528fc
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
| my_mb_wc_utf8mb3_quick:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jb short loc_52786
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_52903
loc_52786:
mov rax, [rbp+var_18]
mov al, [rax]
mov [rbp+var_21], al
movzx eax, [rbp+var_21]
cmp eax, 80h
jge short loc_527B3
movzx eax, [rbp+var_21]
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_52903
loc_527B3:
movzx eax, [rbp+var_21]
cmp eax, 0C2h
jge short loc_527CA
mov [rbp+var_4], 0
jmp loc_52903
loc_527CA:
movzx eax, [rbp+var_21]
cmp eax, 0E0h
jge short loc_52840
mov rax, [rbp+var_18]
add rax, 2
cmp rax, [rbp+var_20]
jbe short loc_527EF
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_52903
loc_527EF:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jl short loc_5280D
mov [rbp+var_4], 0
jmp loc_52903
loc_5280D:
movzx eax, [rbp+var_21]
and eax, 1Fh
movsxd rcx, eax
shl rcx, 6
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cdqe
or rcx, rax
mov rax, [rbp+var_10]
mov [rax], rcx
mov [rbp+var_4], 2
jmp loc_52903
loc_52840:
movzx eax, [rbp+var_21]
cmp eax, 0F0h
jge loc_528F6
mov rax, [rbp+var_18]
add rax, 3
cmp rax, [rbp+var_20]
jbe short loc_52869
mov [rbp+var_4], 0FFFFFF99h
jmp loc_52903
loc_52869:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_528A7
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_528A7
movzx eax, [rbp+var_21]
cmp eax, 0E1h
jge short loc_528B0
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
cmp eax, 0A0h
jge short loc_528B0
loc_528A7:
mov [rbp+var_4], 0
jmp short loc_52903
loc_528B0:
movzx eax, [rbp+var_21]
and eax, 0Fh
movsxd rcx, eax
shl rcx, 0Ch
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cdqe
shl rax, 6
or rcx, rax
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cdqe
or rcx, rax
mov rax, [rbp+var_10]
mov [rax], rcx
mov [rbp+var_4], 3
jmp short loc_52903
loc_528F6:
jmp short $+2
loc_528F8:
jmp short $+2
loc_528FA:
jmp short $+2
loc_528FC:
mov [rbp+var_4], 0
loc_52903:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_mb_wc_utf8mb3_quick(unsigned long long *a1, unsigned __int8 *a2, unsigned long long a3)
{
unsigned __int8 v4; // [rsp+1h] [rbp-21h]
if ( (unsigned long long)a2 < a3 )
{
v4 = *a2;
if ( *a2 >= 0x80u )
{
if ( v4 >= 0xC2u )
{
if ( v4 >= 0xE0u )
{
if ( v4 >= 0xF0u )
{
return 0;
}
else if ( (unsigned long long)(a2 + 3) <= a3 )
{
if ( (a2[1] ^ 0x80) < 64 && (a2[2] ^ 0x80) < 64 && (v4 >= 0xE1u || a2[1] >= 0xA0u) )
{
*a1 = a2[2] ^ 0x80u | ((long long)(a2[1] ^ 0x80u) << 6) | ((unsigned long long)(v4 & 0xF) << 12);
return 3;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-103;
}
}
else if ( (unsigned long long)(a2 + 2) <= a3 )
{
if ( (a2[1] ^ 0x80) < 64 )
{
*a1 = a2[1] ^ 0x80u | ((unsigned long long)(v4 & 0x1F) << 6);
return 2;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-102;
}
}
else
{
return 0;
}
}
else
{
*a1 = v4;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
| my_mb_wc_utf8mb3_quick:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JC 0x00152786
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x00152903
LAB_00152786:
MOV RAX,qword ptr [RBP + -0x18]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x21],AL
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0x80
JGE 0x001527b3
MOVZX EAX,byte ptr [RBP + -0x21]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00152903
LAB_001527b3:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xc2
JGE 0x001527ca
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00152903
LAB_001527ca:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xe0
JGE 0x00152840
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x001527ef
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x00152903
LAB_001527ef:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JL 0x0015280d
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00152903
LAB_0015280d:
MOVZX EAX,byte ptr [RBP + -0x21]
AND EAX,0x1f
MOVSXD RCX,EAX
SHL RCX,0x6
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CDQE
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x2
JMP 0x00152903
LAB_00152840:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf0
JGE 0x001528f6
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x3
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x00152869
MOV dword ptr [RBP + -0x4],0xffffff99
JMP 0x00152903
LAB_00152869:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x001528a7
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x001528a7
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xe1
JGE 0x001528b0
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xa0
JGE 0x001528b0
LAB_001528a7:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00152903
LAB_001528b0:
MOVZX EAX,byte ptr [RBP + -0x21]
AND EAX,0xf
MOVSXD RCX,EAX
SHL RCX,0xc
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CDQE
SHL RAX,0x6
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CDQE
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x3
JMP 0x00152903
LAB_001528f6:
JMP 0x001528f8
LAB_001528f8:
JMP 0x001528fa
LAB_001528fa:
JMP 0x001528fc
LAB_001528fc:
MOV dword ptr [RBP + -0x4],0x0
LAB_00152903:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_mb_wc_utf8mb3_quick(ulong *param_1,byte *param_2,byte *param_3)
{
byte bVar1;
int4 local_c;
if (param_2 < param_3) {
bVar1 = *param_2;
if (bVar1 < 0x80) {
*param_1 = (ulong)bVar1;
local_c = 1;
}
else if (bVar1 < 0xc2) {
local_c = 0;
}
else if (bVar1 < 0xe0) {
if (param_3 < param_2 + 2) {
local_c = 0xffffff9a;
}
else if ((param_2[1] ^ 0x80) < 0x40) {
*param_1 = (long)(int)(bVar1 & 0x1f) << 6 | (long)(int)(param_2[1] ^ 0x80);
local_c = 2;
}
else {
local_c = 0;
}
}
else if (bVar1 < 0xf0) {
if (param_3 < param_2 + 3) {
local_c = 0xffffff99;
}
else if ((((param_2[1] ^ 0x80) < 0x40) && ((param_2[2] ^ 0x80) < 0x40)) &&
((0xe0 < bVar1 || (0x9f < param_2[1])))) {
*param_1 = (long)(int)(bVar1 & 0xf) << 0xc | (long)(int)(param_2[1] ^ 0x80) << 6 |
(long)(int)(param_2[2] ^ 0x80);
local_c = 3;
}
else {
local_c = 0;
}
}
else {
local_c = 0;
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
| |
43,867 | on_language_set(LanguageSetEvent const&) | untodesu[P]voxelius/game/client/play_menu.cc | static void on_language_set(const LanguageSetEvent &event)
{
str_tab_servers = language::resolve_gui("play_menu.tab.servers");
str_join = language::resolve_gui("play_menu.join");
str_connect = language::resolve_gui("play_menu.connect");
str_add = language::resolve_gui("play_menu.add");
str_edit = language::resolve_gui("play_menu.edit");
str_remove = language::resolve_gui("play_menu.remove");
str_refresh = language::resolve_gui("play_menu.refresh");
str_status_init = language::resolve("play_menu.status.init");
str_status_ping = language::resolve("play_menu.status.ping");
str_status_fail = language::resolve("play_menu.status.fail");
str_outdated_client = language::resolve("play_menu.outdated_client");
str_outdated_server = language::resolve("play_menu.outdated_server");
} | O0 | cpp | on_language_set(LanguageSetEvent const&):
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
leaq -0x28(%rbp), %rdi
leaq 0x287b2b(%rip), %rsi # 0x372de5
callq 0xd81a0
leaq 0x423442(%rip), %rdi # 0x50e708
leaq -0x28(%rbp), %rsi
callq 0x2c9c0
leaq -0x28(%rbp), %rdi
callq 0x2d648
leaq -0x48(%rbp), %rdi
leaq 0x287b18(%rip), %rsi # 0x372dfb
callq 0xd81a0
leaq 0x423439(%rip), %rdi # 0x50e728
leaq -0x48(%rbp), %rsi
callq 0x2c9c0
leaq -0x48(%rbp), %rdi
callq 0x2d648
leaq -0x68(%rbp), %rdi
leaq 0x287afe(%rip), %rsi # 0x372e0a
callq 0xd81a0
leaq 0x423430(%rip), %rdi # 0x50e748
leaq -0x68(%rbp), %rsi
callq 0x2c9c0
leaq -0x68(%rbp), %rdi
callq 0x2d648
leaq -0x88(%rbp), %rdi
leaq 0x287ae4(%rip), %rsi # 0x372e1c
callq 0xd81a0
leaq 0x423424(%rip), %rdi # 0x50e768
leaq -0x88(%rbp), %rsi
callq 0x2c9c0
leaq -0x88(%rbp), %rdi
callq 0x2d648
leaq -0xa8(%rbp), %rdi
leaq 0x287ac0(%rip), %rsi # 0x372e2a
callq 0xd81a0
leaq 0x423412(%rip), %rdi # 0x50e788
leaq -0xa8(%rbp), %rsi
callq 0x2c9c0
leaq -0xa8(%rbp), %rdi
callq 0x2d648
leaq -0xc8(%rbp), %rdi
leaq 0x287a9d(%rip), %rsi # 0x372e39
callq 0xd81a0
leaq 0x423400(%rip), %rdi # 0x50e7a8
leaq -0xc8(%rbp), %rsi
callq 0x2c9c0
leaq -0xc8(%rbp), %rdi
callq 0x2d648
leaq -0xe8(%rbp), %rdi
leaq 0x287a7c(%rip), %rsi # 0x372e4a
callq 0xd81a0
leaq 0x4233ee(%rip), %rdi # 0x50e7c8
leaq -0xe8(%rbp), %rsi
callq 0x2c9c0
leaq -0xe8(%rbp), %rdi
callq 0x2d648
leaq 0x287a63(%rip), %rdi # 0x372e5c
callq 0xd80b0
movq %rax, %rsi
leaq 0x4233e0(%rip), %rdi # 0x50e7e8
callq 0x2c7f0
leaq 0x287a5e(%rip), %rdi # 0x372e72
callq 0xd80b0
movq %rax, %rsi
leaq 0x4233e5(%rip), %rdi # 0x50e808
callq 0x2c7f0
leaq 0x287a59(%rip), %rdi # 0x372e88
callq 0xd80b0
movq %rax, %rsi
leaq 0x4233ea(%rip), %rdi # 0x50e828
callq 0x2c7f0
leaq 0x287a54(%rip), %rdi # 0x372e9e
callq 0xd80b0
movq %rax, %rsi
leaq 0x4233ef(%rip), %rdi # 0x50e848
callq 0x2c7f0
leaq 0x287a53(%rip), %rdi # 0x372eb8
callq 0xd80b0
movq %rax, %rsi
leaq 0x4233f4(%rip), %rdi # 0x50e868
callq 0x2c7f0
addq $0xf0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZL15on_language_setRK16LanguageSetEvent_1:
push rbp
mov rbp, rsp
sub rsp, 0F0h
mov [rbp+var_8], rdi
lea rdi, [rbp+var_28]
lea rsi, aPlayMenuTabSer; "play_menu.tab.servers"
call _ZN8language11resolve_guiB5cxx11EPKc; language::resolve_gui(char const*)
lea rdi, _ZL15str_tab_serversB5cxx11; str_tab_servers
lea rsi, [rbp+var_28]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
lea rdi, [rbp+var_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_48]
lea rsi, aPlayMenuJoin; "play_menu.join"
call _ZN8language11resolve_guiB5cxx11EPKc; language::resolve_gui(char const*)
lea rdi, _ZL8str_joinB5cxx11; str_join
lea rsi, [rbp+var_48]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
lea rdi, [rbp+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_68]
lea rsi, aPlayMenuConnec; "play_menu.connect"
call _ZN8language11resolve_guiB5cxx11EPKc; language::resolve_gui(char const*)
lea rdi, _ZL11str_connectB5cxx11_0; str_connect
lea rsi, [rbp+var_68]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
lea rdi, [rbp+var_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_88]
lea rsi, aPlayMenuAdd; "play_menu.add"
call _ZN8language11resolve_guiB5cxx11EPKc; language::resolve_gui(char const*)
lea rdi, _ZL7str_addB5cxx11; str_add
lea rsi, [rbp+var_88]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
lea rdi, [rbp+var_88]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_A8]
lea rsi, aPlayMenuEdit; "play_menu.edit"
call _ZN8language11resolve_guiB5cxx11EPKc; language::resolve_gui(char const*)
lea rdi, _ZL8str_editB5cxx11; str_edit
lea rsi, [rbp+var_A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
lea rdi, [rbp+var_A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_C8]
lea rsi, aPlayMenuRemove; "play_menu.remove"
call _ZN8language11resolve_guiB5cxx11EPKc; language::resolve_gui(char const*)
lea rdi, _ZL10str_removeB5cxx11; str_remove
lea rsi, [rbp+var_C8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
lea rdi, [rbp+var_C8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_E8]
lea rsi, aPlayMenuRefres; "play_menu.refresh"
call _ZN8language11resolve_guiB5cxx11EPKc; language::resolve_gui(char const*)
lea rdi, _ZL11str_refreshB5cxx11; str_refresh
lea rsi, [rbp+var_E8]; char *
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
lea rdi, [rbp+var_E8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, aPlayMenuStatus; "play_menu.status.init"
call _ZN8language7resolveEPKc; language::resolve(char const*)
mov rsi, rax; char *
lea rdi, _ZL15str_status_initB5cxx11; str_status_init
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*)
lea rdi, aPlayMenuStatus_0; "play_menu.status.ping"
call _ZN8language7resolveEPKc; language::resolve(char const*)
mov rsi, rax; char *
lea rdi, _ZL15str_status_pingB5cxx11; str_status_ping
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*)
lea rdi, aPlayMenuStatus_1; "play_menu.status.fail"
call _ZN8language7resolveEPKc; language::resolve(char const*)
mov rsi, rax; char *
lea rdi, _ZL15str_status_failB5cxx11; str_status_fail
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*)
lea rdi, aPlayMenuOutdat; "play_menu.outdated_client"
call _ZN8language7resolveEPKc; language::resolve(char const*)
mov rsi, rax; char *
lea rdi, _ZL19str_outdated_clientB5cxx11; str_outdated_client
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*)
lea rdi, aPlayMenuOutdat_0; "play_menu.outdated_server"
call _ZN8language7resolveEPKc; language::resolve(char const*)
mov rsi, rax
lea rdi, _ZL19str_outdated_serverB5cxx11; str_outdated_server
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*)
add rsp, 0F0h
pop rbp
retn
| long long on_language_set(const LanguageSetEvent *a1)
{
language *v1; // rsi
language *v2; // rsi
language *v3; // rsi
language *v4; // rsi
language *v5; // rax
char v7[32]; // [rsp+8h] [rbp-E8h] BYREF
_BYTE v8[32]; // [rsp+28h] [rbp-C8h] BYREF
_BYTE v9[32]; // [rsp+48h] [rbp-A8h] BYREF
_BYTE v10[32]; // [rsp+68h] [rbp-88h] BYREF
_BYTE v11[32]; // [rsp+88h] [rbp-68h] BYREF
_BYTE v12[32]; // [rsp+A8h] [rbp-48h] BYREF
_BYTE v13[32]; // [rsp+C8h] [rbp-28h] BYREF
const LanguageSetEvent *v14; // [rsp+E8h] [rbp-8h]
v14 = a1;
language::resolve_gui[abi:cxx11]((language *)v13, (language *)"play_menu.tab.servers");
std::string::operator=(&str_tab_servers[abi:cxx11]);
std::string::~string(v13);
language::resolve_gui[abi:cxx11]((language *)v12, (language *)"play_menu.join");
std::string::operator=(&str_join[abi:cxx11]);
std::string::~string(v12);
language::resolve_gui[abi:cxx11]((language *)v11, (language *)"play_menu.connect");
std::string::operator=(&str_connect[abi:cxx11]);
std::string::~string(v11);
language::resolve_gui[abi:cxx11]((language *)v10, (language *)"play_menu.add");
std::string::operator=(&str_add[abi:cxx11]);
std::string::~string(v10);
language::resolve_gui[abi:cxx11]((language *)v9, (language *)"play_menu.edit");
std::string::operator=(&str_edit[abi:cxx11]);
std::string::~string(v9);
language::resolve_gui[abi:cxx11]((language *)v8, (language *)"play_menu.remove");
std::string::operator=(&str_remove[abi:cxx11]);
std::string::~string(v8);
language::resolve_gui[abi:cxx11]((language *)v7, (language *)"play_menu.refresh");
std::string::operator=(&str_refresh[abi:cxx11]);
std::string::~string(v7);
v1 = language::resolve((language *)"play_menu.status.init", v7);
std::string::operator=(&str_status_init[abi:cxx11], v1);
v2 = language::resolve((language *)"play_menu.status.ping", (const char *)v1);
std::string::operator=(&str_status_ping[abi:cxx11], v2);
v3 = language::resolve((language *)"play_menu.status.fail", (const char *)v2);
std::string::operator=(&str_status_fail[abi:cxx11], v3);
v4 = language::resolve((language *)"play_menu.outdated_client", (const char *)v3);
std::string::operator=(&str_outdated_client[abi:cxx11], v4);
v5 = language::resolve((language *)"play_menu.outdated_server", (const char *)v4);
return std::string::operator=(&str_outdated_server[abi:cxx11], v5);
}
| on_language_set:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xf0
MOV qword ptr [RBP + -0x8],RDI
LEA RDI,[RBP + -0x28]
LEA RSI,[0x472de5]
CALL 0x001d81a0
LEA RDI,[0x60e708]
LEA RSI,[RBP + -0x28]
CALL 0x0012c9c0
LEA RDI,[RBP + -0x28]
CALL 0x0012d648
LEA RDI,[RBP + -0x48]
LEA RSI,[0x472dfb]
CALL 0x001d81a0
LEA RDI,[0x60e728]
LEA RSI,[RBP + -0x48]
CALL 0x0012c9c0
LEA RDI,[RBP + -0x48]
CALL 0x0012d648
LEA RDI,[RBP + -0x68]
LEA RSI,[0x472e0a]
CALL 0x001d81a0
LEA RDI,[0x60e748]
LEA RSI,[RBP + -0x68]
CALL 0x0012c9c0
LEA RDI,[RBP + -0x68]
CALL 0x0012d648
LEA RDI,[RBP + -0x88]
LEA RSI,[0x472e1c]
CALL 0x001d81a0
LEA RDI,[0x60e768]
LEA RSI,[RBP + -0x88]
CALL 0x0012c9c0
LEA RDI,[RBP + -0x88]
CALL 0x0012d648
LEA RDI,[RBP + -0xa8]
LEA RSI,[0x472e2a]
CALL 0x001d81a0
LEA RDI,[0x60e788]
LEA RSI,[RBP + -0xa8]
CALL 0x0012c9c0
LEA RDI,[RBP + -0xa8]
CALL 0x0012d648
LEA RDI,[RBP + -0xc8]
LEA RSI,[0x472e39]
CALL 0x001d81a0
LEA RDI,[0x60e7a8]
LEA RSI,[RBP + -0xc8]
CALL 0x0012c9c0
LEA RDI,[RBP + -0xc8]
CALL 0x0012d648
LEA RDI,[RBP + -0xe8]
LEA RSI,[0x472e4a]
CALL 0x001d81a0
LEA RDI,[0x60e7c8]
LEA RSI,[RBP + -0xe8]
CALL 0x0012c9c0
LEA RDI,[RBP + -0xe8]
CALL 0x0012d648
LEA RDI,[0x472e5c]
CALL 0x001d80b0
MOV RSI,RAX
LEA RDI,[0x60e7e8]
CALL 0x0012c7f0
LEA RDI,[0x472e72]
CALL 0x001d80b0
MOV RSI,RAX
LEA RDI,[0x60e808]
CALL 0x0012c7f0
LEA RDI,[0x472e88]
CALL 0x001d80b0
MOV RSI,RAX
LEA RDI,[0x60e828]
CALL 0x0012c7f0
LEA RDI,[0x472e9e]
CALL 0x001d80b0
MOV RSI,RAX
LEA RDI,[0x60e848]
CALL 0x0012c7f0
LEA RDI,[0x472eb8]
CALL 0x001d80b0
MOV RSI,RAX
LEA RDI,[0x60e868]
CALL 0x0012c7f0
ADD RSP,0xf0
POP RBP
RET
|
/* on_language_set(LanguageSetEvent const&) */
void on_language_set(LanguageSetEvent *param_1)
{
char *pcVar1;
language local_f0 [32];
language local_d0 [32];
language local_b0 [32];
language local_90 [32];
language local_70 [32];
language local_50 [32];
language local_30 [32];
LanguageSetEvent *local_10;
local_10 = param_1;
language::resolve_gui_abi_cxx11_(local_30,"play_menu.tab.servers");
std::__cxx11::string::operator=((string *)str_tab_servers_abi_cxx11_,(string *)local_30);
std::__cxx11::string::~string((string *)local_30);
language::resolve_gui_abi_cxx11_(local_50,"play_menu.join");
std::__cxx11::string::operator=((string *)str_join_abi_cxx11_,(string *)local_50);
std::__cxx11::string::~string((string *)local_50);
language::resolve_gui_abi_cxx11_(local_70,"play_menu.connect");
std::__cxx11::string::operator=((string *)str_connect_abi_cxx11_,(string *)local_70);
std::__cxx11::string::~string((string *)local_70);
language::resolve_gui_abi_cxx11_(local_90,"play_menu.add");
std::__cxx11::string::operator=((string *)str_add_abi_cxx11_,(string *)local_90);
std::__cxx11::string::~string((string *)local_90);
language::resolve_gui_abi_cxx11_(local_b0,"play_menu.edit");
std::__cxx11::string::operator=((string *)str_edit_abi_cxx11_,(string *)local_b0);
std::__cxx11::string::~string((string *)local_b0);
language::resolve_gui_abi_cxx11_(local_d0,"play_menu.remove");
std::__cxx11::string::operator=((string *)str_remove_abi_cxx11_,(string *)local_d0);
std::__cxx11::string::~string((string *)local_d0);
language::resolve_gui_abi_cxx11_(local_f0,"play_menu.refresh");
std::__cxx11::string::operator=((string *)str_refresh_abi_cxx11_,(string *)local_f0);
std::__cxx11::string::~string((string *)local_f0);
pcVar1 = (char *)language::resolve("play_menu.status.init");
std::__cxx11::string::operator=((string *)str_status_init_abi_cxx11_,pcVar1);
pcVar1 = (char *)language::resolve("play_menu.status.ping");
std::__cxx11::string::operator=((string *)str_status_ping_abi_cxx11_,pcVar1);
pcVar1 = (char *)language::resolve("play_menu.status.fail");
std::__cxx11::string::operator=((string *)str_status_fail_abi_cxx11_,pcVar1);
pcVar1 = (char *)language::resolve("play_menu.outdated_client");
std::__cxx11::string::operator=((string *)str_outdated_client_abi_cxx11_,pcVar1);
pcVar1 = (char *)language::resolve("play_menu.outdated_server");
std::__cxx11::string::operator=((string *)str_outdated_server_abi_cxx11_,pcVar1);
return;
}
| |
43,868 | google::protobuf::(anonymous namespace)::ReportReflectionUsageError(google::protobuf::Descriptor const*, google::protobuf::FieldDescriptor const*, char const*, char const*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/generated_message_reflection.cc | void ReportReflectionUsageError(const Descriptor* descriptor,
const FieldDescriptor* field,
const char* method, const char* description) {
GOOGLE_LOG(FATAL) << "Protocol Buffer reflection usage error:\n"
" Method : google::protobuf::Reflection::"
<< method
<< "\n"
" Message type: "
<< descriptor->full_name()
<< "\n"
" Field : "
<< field->full_name()
<< "\n"
" Problem : "
<< description;
} | O3 | cpp | google::protobuf::(anonymous namespace)::ReportReflectionUsageError(google::protobuf::Descriptor const*, google::protobuf::FieldDescriptor const*, char const*, char const*):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
leaq 0x54046(%rip), %rdx # 0xb9ae8
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movl $0x3, %esi
movl $0x7e, %ecx
callq 0x169ca
leaq 0x54912(%rip), %rsi # 0xba3d2
movq %r13, %rdi
callq 0x164c8
movq %rax, %rdi
movq %r12, %rsi
callq 0x164c8
leaq 0x5494f(%rip), %rsi # 0xba429
movq %rax, %rdi
callq 0x164c8
movq 0x8(%r15), %rsi
addq $0x20, %rsi
movq %rax, %rdi
callq 0x164da
leaq 0x54942(%rip), %rsi # 0xba43b
movq %rax, %rdi
callq 0x164c8
movq 0x8(%r14), %rsi
addq $0x20, %rsi
movq %rax, %rdi
callq 0x164da
leaq 0x54935(%rip), %rsi # 0xba44d
movq %rax, %rdi
callq 0x164c8
movq %rax, %rdi
movq %rbx, %rsi
callq 0x164c8
leaq 0x7(%rsp), %rdi
movq %rax, %rsi
callq 0x165a2
leaq 0x8(%rsp), %rdi
callq 0x169e8
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x65b52
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x169e8
movq %rbx, %rdi
callq 0xf570
nop
| _ZN6google8protobuf12_GLOBAL__N_126ReportReflectionUsageErrorEPKNS0_10DescriptorEPKNS0_15FieldDescriptorEPKcS9_:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 40h
mov rbx, rcx
mov r12, rdx
mov r14, rsi
mov r15, rdi
lea rdx, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/aimrt_"...
lea r13, [rsp+68h+var_60]
mov rdi, r13
mov esi, 3
mov ecx, 7Eh ; '~'
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
lea rsi, aProtocolBuffer; "Protocol Buffer reflection usage error:"...
mov rdi, r13
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov rdi, rax
mov rsi, r12
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
lea rsi, aMessageType; "\n Message type: "
mov rdi, rax
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov rsi, [r15+8]
add rsi, 20h ; ' '
mov rdi, rax
call _ZN6google8protobuf8internal10LogMessagelsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::internal::LogMessage::operator<<(std::string const&)
lea rsi, aField; "\n Field : "
mov rdi, rax
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov rsi, [r14+8]
add rsi, 20h ; ' '
mov rdi, rax
call _ZN6google8protobuf8internal10LogMessagelsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::internal::LogMessage::operator<<(std::string const&)
lea rsi, aProblem; "\n Problem : "
mov rdi, rax
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov rdi, rax
mov rsi, rbx
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
lea rdi, [rsp+68h+var_61]
mov rsi, rax
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
lea rdi, [rsp+68h+var_60]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
add rsp, 40h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
jmp short $+2
loc_65B52:
mov rbx, rax
lea rdi, [rsp+arg_0]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
mov rdi, rbx
call __Unwind_Resume
| void google::protobuf::`anonymous namespace'::ReportReflectionUsageError(
google::protobuf::_anonymous_namespace_ *this,
const google::protobuf::Descriptor *a2,
const google::protobuf::FieldDescriptor *a3,
const char *a4,
const char *a5)
{
long long v7; // rax
long long v8; // rax
long long v9; // rax
long long v10; // rax
long long v11; // rax
long long v12; // rax
long long v13; // rax
google::protobuf::internal::LogMessage *v14; // rax
char v15; // [rsp+7h] [rbp-61h] BYREF
_BYTE v16[96]; // [rsp+8h] [rbp-60h] BYREF
google::protobuf::internal::LogMessage::LogMessage(
(long long)v16,
3,
(long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/generated_message_reflection.cc",
126);
v7 = google::protobuf::internal::LogMessage::operator<<(
(long long)v16,
(long long)"Protocol Buffer reflection usage error:\n Method : google::protobuf::Reflection::");
v8 = google::protobuf::internal::LogMessage::operator<<(v7, (long long)a3);
v9 = google::protobuf::internal::LogMessage::operator<<(v8, (long long)"\n Message type: ");
v10 = google::protobuf::internal::LogMessage::operator<<(v9, *((_QWORD *)this + 1) + 32LL);
v11 = google::protobuf::internal::LogMessage::operator<<(v10, (long long)"\n Field : ");
v12 = google::protobuf::internal::LogMessage::operator<<(v11, *((_QWORD *)a2 + 1) + 32LL);
v13 = google::protobuf::internal::LogMessage::operator<<(v12, (long long)"\n Problem : ");
v14 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<(v13, (long long)a4);
google::protobuf::internal::LogFinisher::operator=((long long)&v15, v14);
google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v16);
}
| ReportReflectionUsageError:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV RBX,RCX
MOV R12,RDX
MOV R14,RSI
MOV R15,RDI
LEA RDX,[0x1b9ae8]
LEA R13,[RSP + 0x8]
MOV RDI,R13
MOV ESI,0x3
MOV ECX,0x7e
CALL 0x001169ca
LAB_00165ab9:
LEA RSI,[0x1ba3d2]
MOV RDI,R13
CALL 0x001164c8
MOV RDI,RAX
MOV RSI,R12
CALL 0x001164c8
LEA RSI,[0x1ba429]
MOV RDI,RAX
CALL 0x001164c8
MOV RSI,qword ptr [R15 + 0x8]
ADD RSI,0x20
MOV RDI,RAX
CALL 0x001164da
LEA RSI,[0x1ba43b]
MOV RDI,RAX
CALL 0x001164c8
MOV RSI,qword ptr [R14 + 0x8]
ADD RSI,0x20
MOV RDI,RAX
CALL 0x001164da
LEA RSI,[0x1ba44d]
MOV RDI,RAX
CALL 0x001164c8
MOV RDI,RAX
MOV RSI,RBX
CALL 0x001164c8
LAB_00165b2b:
LEA RDI,[RSP + 0x7]
MOV RSI,RAX
CALL 0x001165a2
LAB_00165b38:
LEA RDI,[RSP + 0x8]
CALL 0x001169e8
ADD RSP,0x40
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* google::protobuf::(anonymous namespace)::ReportReflectionUsageError(google::protobuf::Descriptor
const*, google::protobuf::FieldDescriptor const*, char const*, char const*) */
void google::protobuf::(anonymous_namespace)::ReportReflectionUsageError
(Descriptor *param_1,FieldDescriptor *param_2,char *param_3,char *param_4)
{
LogMessage *pLVar1;
LogFinisher local_61;
LogMessage local_60 [56];
internal::LogMessage::LogMessage
(local_60,3,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/generated_message_reflection.cc"
,0x7e);
/* try { // try from 00165ab9 to 00165b2a has its CatchHandler @ 00165b52 */
pLVar1 = (LogMessage *)
internal::LogMessage::operator<<
(local_60,
"Protocol Buffer reflection usage error:\n Method : google::protobuf::Reflection::"
);
pLVar1 = (LogMessage *)internal::LogMessage::operator<<(pLVar1,param_3);
pLVar1 = (LogMessage *)internal::LogMessage::operator<<(pLVar1,"\n Message type: ");
pLVar1 = (LogMessage *)
internal::LogMessage::operator<<(pLVar1,(string *)(*(long *)(param_1 + 8) + 0x20));
pLVar1 = (LogMessage *)internal::LogMessage::operator<<(pLVar1,"\n Field : ");
pLVar1 = (LogMessage *)
internal::LogMessage::operator<<(pLVar1,(string *)(*(long *)(param_2 + 8) + 0x20));
pLVar1 = (LogMessage *)internal::LogMessage::operator<<(pLVar1,"\n Problem : ");
pLVar1 = (LogMessage *)internal::LogMessage::operator<<(pLVar1,param_4);
/* try { // try from 00165b2b to 00165b37 has its CatchHandler @ 00165b50 */
internal::LogFinisher::operator=(&local_61,pLVar1);
internal::LogMessage::~LogMessage(local_60);
return;
}
| |
43,869 | common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, bool) | monkey531[P]llama/common/sampling.cpp | std::vector<llama_token> common_sampler_sample_and_accept_n(struct common_sampler * gsmpl, struct llama_context * ctx, const llama_tokens & draft, bool grammar_first) {
std::vector<int> idxs(draft.size() + 1);
for (size_t i = 0; i < idxs.size(); ++i) {
idxs[i] = i;
}
return common_sampler_sample_and_accept_n(gsmpl, ctx, idxs, draft, grammar_first);
} | O1 | cpp | common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x8(%rcx), %rsi
subq (%rcx), %rsi
sarq $0x2, %rsi
incq %rsi
leaq 0x10(%rsp), %r13
leaq 0xf(%rsp), %rdx
movq %r13, %rdi
callq 0x9d71e
movq (%r13), %rax
movq 0x8(%r13), %rdx
subq %rax, %rdx
je 0xf2cda
sarq $0x2, %rdx
cmpq $0x1, %rdx
adcq $0x0, %rdx
leaq 0x1(%rdx), %rcx
andq $-0x2, %rcx
decq %rdx
movq %rdx, %xmm0
pshufd $0x44, %xmm0, %xmm0 # xmm0 = xmm0[0,1,0,1]
movdqa 0x19f88(%rip), %xmm1 # 0x10cbf0
xorl %edx, %edx
movdqa 0x19f8e(%rip), %xmm2 # 0x10cc00
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x19f8e(%rip), %xmm4 # 0x10cc10
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7 # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5 # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %esi
notl %esi
testb $0x1, %sil
je 0xf2cb7
movl %edx, (%rax,%rdx,4)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %esi
testb $0x1, %sil
je 0xf2ccd
leal 0x1(%rdx), %esi
movl %esi, 0x4(%rax,%rdx,4)
addq $0x2, %rdx
paddq %xmm4, %xmm1
cmpq %rdx, %rcx
jne 0xf2c82
movzbl %bpl, %r9d
leaq 0x10(%rsp), %rcx
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %r8
callq 0xf2a59
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xf2d0b
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1dc40
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xf2d37
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1dc40
movq %rbx, %rdi
callq 0x1e650
| _Z34common_sampler_sample_and_accept_nP14common_samplerP13llama_contextRKSt6vectorIiSaIiEEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebp, r8d
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov rbx, rdi
mov rsi, [rcx+8]
sub rsi, [rcx]
sar rsi, 2
inc rsi
lea r13, [rsp+58h+var_48]
lea rdx, [rsp+58h+var_49]
mov rdi, r13
call _ZNSt6vectorIiSaIiEEC2EmRKS0_; std::vector<int>::vector(ulong,std::allocator<int> const&)
mov rax, [r13+0]
mov rdx, [r13+8]
sub rdx, rax
jz loc_F2CDA
sar rdx, 2
cmp rdx, 1
adc rdx, 0
lea rcx, [rdx+1]
and rcx, 0FFFFFFFFFFFFFFFEh
dec rdx
movq xmm0, rdx
pshufd xmm0, xmm0, 44h ; 'D'
movdqa xmm1, cs:xmmword_10CBF0
xor edx, edx
movdqa xmm2, cs:xmmword_10CC00
pxor xmm0, xmm2
pcmpeqd xmm3, xmm3
movdqa xmm4, cs:xmmword_10CC10
loc_F2C82:
movdqa xmm5, xmm1
pxor xmm5, xmm2
movdqa xmm6, xmm5
pcmpgtd xmm6, xmm0
pcmpeqd xmm5, xmm0
pshufd xmm7, xmm5, 0F5h
pand xmm7, xmm6
pshufd xmm5, xmm6, 0F5h
por xmm5, xmm7
movd esi, xmm5
not esi
test sil, 1
jz short loc_F2CB7
mov [rax+rdx*4], edx
loc_F2CB7:
pxor xmm5, xmm3
pextrw esi, xmm5, 4
test sil, 1
jz short loc_F2CCD
lea esi, [rdx+1]
mov [rax+rdx*4+4], esi
loc_F2CCD:
add rdx, 2
paddq xmm1, xmm4
cmp rcx, rdx
jnz short loc_F2C82
loc_F2CDA:
movzx r9d, bpl
lea rcx, [rsp+58h+var_48]
mov rdi, rbx
mov rsi, r12
mov rdx, r15
mov r8, r14
call _Z34common_sampler_sample_and_accept_nP14common_samplerP13llama_contextRKSt6vectorIiSaIiEES7_b; common_sampler_sample_and_accept_n(common_sampler *,llama_context *,std::vector<int> const&,std::vector<int> const&,bool)
mov rdi, [rsp+58h+var_48]; void *
test rdi, rdi
jz short loc_F2D0B
mov rsi, [rsp+58h+var_38]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_F2D0B:
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_8]; void *
test rdi, rdi
jz short loc_F2D37
mov rsi, [rsp+arg_18]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_F2D37:
mov rdi, rbx
call __Unwind_Resume
| long long * common_sampler_sample_and_accept_n(
long long *a1,
_QWORD *a2,
long long a3,
_QWORD *a4,
unsigned __int8 a5)
{
_DWORD *v8; // rax
long long v9; // rdx
unsigned long long v10; // rcx
__m128i v11; // xmm0
__m128i si128; // xmm1
long long v13; // rdx
__m128i v14; // xmm2
__m128i v15; // xmm0
__m128i v16; // xmm4
__m128i v17; // xmm5
__m128i v18; // xmm6
__m128i v19; // xmm5
void *v21; // [rsp+10h] [rbp-48h] BYREF
_BYTE *v22; // [rsp+18h] [rbp-40h]
long long v23; // [rsp+20h] [rbp-38h]
std::vector<int>::vector((long long)&v21, ((long long)(a4[1] - *a4) >> 2) + 1);
v8 = v21;
if ( v22 != v21 )
{
v9 = ((v22 - (_BYTE *)v21) >> 2 == 0) + ((v22 - (_BYTE *)v21) >> 2);
v10 = (v9 + 1) & 0xFFFFFFFFFFFFFFFELL;
v11 = _mm_shuffle_epi32((__m128i)(unsigned long long)(v9 - 1), 68);
si128 = _mm_load_si128((const __m128i *)&xmmword_10CBF0);
v13 = 0LL;
v14 = _mm_load_si128((const __m128i *)&xmmword_10CC00);
v15 = _mm_xor_si128(v11, v14);
v16 = _mm_load_si128((const __m128i *)&xmmword_10CC10);
do
{
v17 = _mm_xor_si128(si128, v14);
v18 = _mm_cmpgt_epi32(v17, v15);
v19 = _mm_or_si128(
_mm_shuffle_epi32(v18, 245),
_mm_and_si128(_mm_shuffle_epi32(_mm_cmpeq_epi32(v17, v15), 245), v18));
if ( (~_mm_cvtsi128_si32(v19) & 1) != 0 )
v8[v13] = v13;
if ( (_mm_extract_epi16(_mm_xor_si128(v19, (__m128i)-1LL), 4) & 1) != 0 )
v8[v13 + 1] = v13 + 1;
v13 += 2LL;
si128 = _mm_add_epi64(si128, v16);
}
while ( v10 != v13 );
}
common_sampler_sample_and_accept_n(a1, a2, a3, &v21, a4, a5);
if ( v21 )
operator delete(v21, v23 - (_QWORD)v21);
return a1;
}
| common_sampler_sample_and_accept_n:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBP,R8D
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
MOV RSI,qword ptr [RCX + 0x8]
SUB RSI,qword ptr [RCX]
SAR RSI,0x2
INC RSI
LEA R13,[RSP + 0x10]
LEA RDX,[RSP + 0xf]
MOV RDI,R13
CALL 0x0019d71e
MOV RAX,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
SUB RDX,RAX
JZ 0x001f2cda
SAR RDX,0x2
CMP RDX,0x1
ADC RDX,0x0
LEA RCX,[RDX + 0x1]
AND RCX,-0x2
DEC RDX
MOVQ XMM0,RDX
PSHUFD XMM0,XMM0,0x44
MOVDQA XMM1,xmmword ptr [0x0020cbf0]
XOR EDX,EDX
MOVDQA XMM2,xmmword ptr [0x0020cc00]
PXOR XMM0,XMM2
PCMPEQD XMM3,XMM3
MOVDQA XMM4,xmmword ptr [0x0020cc10]
LAB_001f2c82:
MOVDQA XMM5,XMM1
PXOR XMM5,XMM2
MOVDQA XMM6,XMM5
PCMPGTD XMM6,XMM0
PCMPEQD XMM5,XMM0
PSHUFD XMM7,XMM5,0xf5
PAND XMM7,XMM6
PSHUFD XMM5,XMM6,0xf5
POR XMM5,XMM7
MOVD ESI,XMM5
NOT ESI
TEST SIL,0x1
JZ 0x001f2cb7
MOV dword ptr [RAX + RDX*0x4],EDX
LAB_001f2cb7:
PXOR XMM5,XMM3
PEXTRW ESI,XMM5,0x4
TEST SIL,0x1
JZ 0x001f2ccd
LEA ESI,[RDX + 0x1]
MOV dword ptr [RAX + RDX*0x4 + 0x4],ESI
LAB_001f2ccd:
ADD RDX,0x2
PADDQ XMM1,XMM4
CMP RCX,RDX
JNZ 0x001f2c82
LAB_001f2cda:
MOVZX R9D,BPL
LEA RCX,[RSP + 0x10]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
MOV R8,R14
CALL 0x001f2a59
LAB_001f2cf4:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x001f2d0b
MOV RSI,qword ptr [RSP + 0x20]
SUB RSI,RDI
CALL 0x0011dc40
LAB_001f2d0b:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int,
std::allocator<int> > const&, bool) */
common_sampler *
common_sampler_sample_and_accept_n
(common_sampler *param_1,llama_context *param_2,vector *param_3,bool param_4)
{
int1 auVar1 [16];
long lVar2;
long lVar3;
int7 in_register_00000009;
long lVar4;
long lVar5;
ulong uVar6;
int1 auVar7 [16];
int1 auVar8 [16];
int1 auVar9 [16];
void *local_48;
long local_40;
long local_38;
std::vector<int,std::allocator<int>>::vector
((ulong)&local_48,
(allocator *)
((((long *)CONCAT71(in_register_00000009,param_4))[1] -
*(long *)CONCAT71(in_register_00000009,param_4) >> 2) + 1));
lVar3 = _UNK_0020cc18;
lVar2 = _DAT_0020cc10;
auVar1 = _DAT_0020cc00;
if (local_40 - (long)local_48 != 0) {
lVar4 = local_40 - (long)local_48 >> 2;
lVar4 = lVar4 + (ulong)(lVar4 == 0);
lVar5 = lVar4 + -1;
auVar7._8_4_ = (int)lVar5;
auVar7._0_8_ = lVar5;
auVar7._12_4_ = (int)((ulong)lVar5 >> 0x20);
uVar6 = 0;
auVar7 = auVar7 ^ _DAT_0020cc00;
auVar8 = _DAT_0020cbf0;
do {
auVar9 = auVar8 ^ auVar1;
if ((bool)(~(auVar9._4_4_ == auVar7._4_4_ && auVar7._0_4_ < auVar9._0_4_ ||
auVar7._4_4_ < auVar9._4_4_) & 1)) {
*(int *)((long)local_48 + uVar6 * 4) = (int)uVar6;
}
if ((auVar9._12_4_ != auVar7._12_4_ || auVar9._8_4_ <= auVar7._8_4_) &&
auVar9._12_4_ <= auVar7._12_4_) {
*(int *)((long)local_48 + uVar6 * 4 + 4) = (int)uVar6 + 1;
}
uVar6 = uVar6 + 2;
lVar5 = auVar8._8_8_;
auVar8._0_8_ = auVar8._0_8_ + lVar2;
auVar8._8_8_ = lVar5 + lVar3;
} while ((lVar4 + 1U & 0xfffffffffffffffe) != uVar6);
}
/* try { // try from 001f2cda to 001f2cf3 has its CatchHandler @ 001f2d1d */
common_sampler_sample_and_accept_n(param_1,param_2,param_3,(vector *)&local_48,param_4);
if (local_48 != (void *)0x0) {
operator_delete(local_48,local_38 - (long)local_48);
}
return param_1;
}
| |
43,870 | build_arg_list | bluesky950520[P]quickjs/quickjs.c | static JSValue *build_arg_list(JSContext *ctx, uint32_t *plen,
JSValue array_arg)
{
uint32_t len, i;
JSValue *tab, ret;
JSObject *p;
if (JS_VALUE_GET_TAG(array_arg) != JS_TAG_OBJECT) {
JS_ThrowTypeError(ctx, "not a object");
return NULL;
}
if (js_get_length32(ctx, &len, array_arg))
return NULL;
if (len > JS_MAX_LOCAL_VARS) {
// XXX: check for stack overflow?
JS_ThrowRangeError(ctx, "too many arguments in function call (only %d allowed)",
JS_MAX_LOCAL_VARS);
return NULL;
}
/* avoid allocating 0 bytes */
tab = js_mallocz(ctx, sizeof(tab[0]) * max_uint32(1, len));
if (!tab)
return NULL;
p = JS_VALUE_GET_OBJ(array_arg);
if ((p->class_id == JS_CLASS_ARRAY || p->class_id == JS_CLASS_ARGUMENTS) &&
p->fast_array &&
len == p->u.array.count) {
for(i = 0; i < len; i++) {
tab[i] = js_dup(p->u.array.u.values[i]);
}
} else {
for(i = 0; i < len; i++) {
ret = JS_GetPropertyUint32(ctx, array_arg, i);
if (JS_IsException(ret)) {
free_arg_list(ctx, tab, i);
return NULL;
}
tab[i] = ret;
}
}
*plen = len;
return tab;
} | O0 | c | build_arg_list:
subq $0xa8, %rsp
movq %rdx, 0x90(%rsp)
movq %rcx, 0x98(%rsp)
movq %rdi, 0x88(%rsp)
movq %rsi, 0x80(%rsp)
movq 0x98(%rsp), %rax
cmpl $-0x1, %eax
je 0x6be75
movq 0x88(%rsp), %rdi
leaq 0xa8834(%rip), %rsi # 0x114687
movb $0x0, %al
callq 0x335f0
movq %rax, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
movq $0x0, 0xa0(%rsp)
jmp 0x6c0e3
movq 0x88(%rsp), %rdi
movq 0x90(%rsp), %rdx
movq 0x98(%rsp), %rcx
leaq 0x7c(%rsp), %rsi
callq 0x73e60
cmpl $0x0, %eax
je 0x6bead
movq $0x0, 0xa0(%rsp)
jmp 0x6c0e3
cmpl $0xffff, 0x7c(%rsp) # imm = 0xFFFF
jbe 0x6beed
movq 0x88(%rsp), %rdi
leaq 0xa87ce(%rip), %rsi # 0x114694
movl $0xffff, %edx # imm = 0xFFFF
movb $0x0, %al
callq 0x2f960
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq $0x0, 0xa0(%rsp)
jmp 0x6c0e3
movq 0x88(%rsp), %rax
movq %rax, 0x10(%rsp)
movl 0x7c(%rsp), %esi
movl $0x1, %edi
callq 0x53c70
movq 0x10(%rsp), %rdi
movl %eax, %eax
movl %eax, %esi
shlq $0x4, %rsi
callq 0x28020
movq %rax, 0x70(%rsp)
cmpq $0x0, 0x70(%rsp)
jne 0x6bf38
movq $0x0, 0xa0(%rsp)
jmp 0x6c0e3
movq 0x90(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
movzwl 0x6(%rax), %eax
cmpl $0x2, %eax
je 0x6bf65
movq 0x58(%rsp), %rax
movzwl 0x6(%rax), %eax
cmpl $0x8, %eax
jne 0x6c008
movq 0x58(%rsp), %rax
movb 0x5(%rax), %al
shrb $0x3, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x6c008
movl 0x7c(%rsp), %eax
movq 0x58(%rsp), %rcx
cmpl 0x40(%rcx), %eax
jne 0x6c008
movl $0x0, 0x78(%rsp)
movl 0x78(%rsp), %eax
cmpl 0x7c(%rsp), %eax
jae 0x6c003
movq 0x70(%rsp), %rax
movl 0x78(%rsp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x58(%rsp), %rax
movq 0x38(%rax), %rax
movl 0x78(%rsp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x279c0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x28(%rsp), %rcx
movq %rcx, (%rax)
movq 0x30(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl 0x78(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x78(%rsp)
jmp 0x6bf94
jmp 0x6c0c8
movl $0x0, 0x78(%rsp)
movl 0x78(%rsp), %eax
cmpl 0x7c(%rsp), %eax
jae 0x6c0c6
movq 0x88(%rsp), %rdi
movl 0x78(%rsp), %ecx
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
callq 0x37750
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x60(%rsp), %rdi
movq 0x68(%rsp), %rsi
callq 0x29fb0
cmpl $0x0, %eax
je 0x6c095
movq 0x88(%rsp), %rdi
movq 0x70(%rsp), %rsi
movl 0x78(%rsp), %edx
callq 0x6c100
movq $0x0, 0xa0(%rsp)
jmp 0x6c0e3
movq 0x70(%rsp), %rax
movl 0x78(%rsp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x60(%rsp), %rcx
movq %rcx, (%rax)
movq 0x68(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl 0x78(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x78(%rsp)
jmp 0x6c010
jmp 0x6c0c8
movl 0x7c(%rsp), %ecx
movq 0x80(%rsp), %rax
movl %ecx, (%rax)
movq 0x70(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rax
addq $0xa8, %rsp
retq
nopw %cs:(%rax,%rax)
| build_arg_list:
sub rsp, 0A8h
mov [rsp+0A8h+var_18], rdx
mov [rsp+0A8h+var_10], rcx
mov [rsp+0A8h+var_20], rdi
mov [rsp+0A8h+var_28], rsi
mov rax, [rsp+0A8h+var_10]
cmp eax, 0FFFFFFFFh
jz short loc_6BE75
mov rdi, [rsp+0A8h+var_20]
lea rsi, aNotAObject; "not a object"
mov al, 0
call JS_ThrowTypeError
mov [rsp+0A8h+var_60], rax
mov [rsp+0A8h+var_58], rdx
mov [rsp+0A8h+var_8], 0
jmp loc_6C0E3
loc_6BE75:
mov rdi, [rsp+0A8h+var_20]
mov rdx, [rsp+0A8h+var_18]
mov rcx, [rsp+0A8h+var_10]
lea rsi, [rsp+0A8h+var_2C]
call js_get_length32
cmp eax, 0
jz short loc_6BEAD
mov [rsp+0A8h+var_8], 0
jmp loc_6C0E3
loc_6BEAD:
cmp [rsp+0A8h+var_2C], 0FFFFh
jbe short loc_6BEED
mov rdi, [rsp+0A8h+var_20]
lea rsi, aTooManyArgumen; "too many arguments in function call (on"...
mov edx, 0FFFFh
mov al, 0
call JS_ThrowRangeError
mov [rsp+0A8h+var_70], rax
mov [rsp+0A8h+var_68], rdx
mov [rsp+0A8h+var_8], 0
jmp loc_6C0E3
loc_6BEED:
mov rax, [rsp+0A8h+var_20]
mov [rsp+0A8h+var_98], rax
mov esi, [rsp+0A8h+var_2C]
mov edi, 1
call max_uint32
mov rdi, [rsp+0A8h+var_98]
mov eax, eax
mov esi, eax
shl rsi, 4
call js_mallocz
mov [rsp+0A8h+var_38], rax
cmp [rsp+0A8h+var_38], 0
jnz short loc_6BF38
mov [rsp+0A8h+var_8], 0
jmp loc_6C0E3
loc_6BF38:
mov rax, [rsp+0A8h+var_18]
mov [rsp+0A8h+var_50], rax
mov rax, [rsp+0A8h+var_50]
movzx eax, word ptr [rax+6]
cmp eax, 2
jz short loc_6BF65
mov rax, [rsp+0A8h+var_50]
movzx eax, word ptr [rax+6]
cmp eax, 8
jnz loc_6C008
loc_6BF65:
mov rax, [rsp+0A8h+var_50]
mov al, [rax+5]
shr al, 3
and al, 1
movzx eax, al
cmp eax, 0
jz loc_6C008
mov eax, [rsp+0A8h+var_2C]
mov rcx, [rsp+0A8h+var_50]
cmp eax, [rcx+40h]
jnz short loc_6C008
mov [rsp+0A8h+var_30], 0
loc_6BF94:
mov eax, [rsp+0A8h+var_30]
cmp eax, [rsp+0A8h+var_2C]
jnb short loc_6C003
mov rax, [rsp+0A8h+var_38]
mov ecx, [rsp+0A8h+var_30]
shl rcx, 4
add rax, rcx
mov [rsp+0A8h+var_A0], rax
mov rax, [rsp+0A8h+var_50]
mov rax, [rax+38h]
mov ecx, [rsp+0A8h+var_30]
shl rcx, 4
add rax, rcx
mov rdi, [rax]
mov rsi, [rax+8]
call js_dup
mov rcx, rax
mov rax, [rsp+0A8h+var_A0]
mov [rsp+0A8h+var_80], rcx
mov [rsp+0A8h+var_78], rdx
mov rcx, [rsp+0A8h+var_80]
mov [rax], rcx
mov rcx, [rsp+0A8h+var_78]
mov [rax+8], rcx
mov eax, [rsp+0A8h+var_30]
add eax, 1
mov [rsp+0A8h+var_30], eax
jmp short loc_6BF94
loc_6C003:
jmp loc_6C0C8
loc_6C008:
mov [rsp+0A8h+var_30], 0
loc_6C010:
mov eax, [rsp+0A8h+var_30]
cmp eax, [rsp+0A8h+var_2C]
jnb loc_6C0C6
mov rdi, [rsp+0A8h+var_20]
mov ecx, [rsp+0A8h+var_30]
mov rsi, [rsp+0A8h+var_18]
mov rdx, [rsp+0A8h+var_10]
call JS_GetPropertyUint32
mov [rsp+0A8h+var_90], rax
mov [rsp+0A8h+var_88], rdx
mov rax, [rsp+0A8h+var_90]
mov [rsp+0A8h+var_48], rax
mov rax, [rsp+0A8h+var_88]
mov [rsp+0A8h+var_40], rax
mov rdi, [rsp+0A8h+var_48]
mov rsi, [rsp+0A8h+var_40]
call JS_IsException_1
cmp eax, 0
jz short loc_6C095
mov rdi, [rsp+0A8h+var_20]
mov rsi, [rsp+0A8h+var_38]
mov edx, [rsp+0A8h+var_30]
call free_arg_list
mov [rsp+0A8h+var_8], 0
jmp short loc_6C0E3
loc_6C095:
mov rax, [rsp+0A8h+var_38]
mov ecx, [rsp+0A8h+var_30]
shl rcx, 4
add rax, rcx
mov rcx, [rsp+0A8h+var_48]
mov [rax], rcx
mov rcx, [rsp+0A8h+var_40]
mov [rax+8], rcx
mov eax, [rsp+0A8h+var_30]
add eax, 1
mov [rsp+0A8h+var_30], eax
jmp loc_6C010
loc_6C0C6:
jmp short $+2
loc_6C0C8:
mov ecx, [rsp+0A8h+var_2C]
mov rax, [rsp+0A8h+var_28]
mov [rax], ecx
mov rax, [rsp+0A8h+var_38]
mov [rsp+0A8h+var_8], rax
loc_6C0E3:
mov rax, [rsp+0A8h+var_8]
add rsp, 0A8h
retn
| long long build_arg_list(
long long a1,
_DWORD *a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v14; // rcx
long long v15; // r8
long long v16; // r9
__m128 v17; // xmm4
__m128 v18; // xmm5
unsigned int v19; // eax
long long v20; // rax
long long v21; // rdx
long long v22; // rdx
long long *v23; // rax
char v25; // [rsp+0h] [rbp-A8h]
_QWORD *v26; // [rsp+8h] [rbp-A0h]
long long v27; // [rsp+10h] [rbp-98h]
long long PropertyUint32; // [rsp+18h] [rbp-90h]
long long v29; // [rsp+58h] [rbp-50h]
long long v30; // [rsp+68h] [rbp-40h]
long long v31; // [rsp+70h] [rbp-38h]
unsigned int i; // [rsp+78h] [rbp-30h]
unsigned int j; // [rsp+78h] [rbp-30h]
unsigned int v34; // [rsp+7Ch] [rbp-2Ch] BYREF
_DWORD *v35; // [rsp+80h] [rbp-28h]
long long v36; // [rsp+88h] [rbp-20h]
long long v37; // [rsp+90h] [rbp-18h]
long long v38; // [rsp+98h] [rbp-10h]
v37 = a3;
v38 = a4;
v36 = a1;
v35 = a2;
if ( (_DWORD)a4 == -1 )
{
if ( (unsigned int)js_get_length32(v36, &v34, v37, v38) )
{
return 0LL;
}
else if ( v34 <= 0xFFFF )
{
v27 = v36;
v19 = max_uint32(1u, v34);
v31 = js_mallocz(v27, 16LL * v19);
if ( v31 )
{
v29 = v37;
if ( (*(_WORD *)(v37 + 6) == 2 || *(_WORD *)(v37 + 6) == 8)
&& (*(_BYTE *)(v37 + 5) & 8) != 0
&& v34 == *(_DWORD *)(v37 + 64) )
{
for ( i = 0; i < v34; ++i )
{
v26 = (_QWORD *)(16LL * i + v31);
v20 = 16LL * i + *(_QWORD *)(v29 + 56);
*v26 = js_dup(*(_DWORD **)v20, *(_QWORD *)(v20 + 8));
v26[1] = v21;
}
}
else
{
for ( j = 0; j < v34; ++j )
{
PropertyUint32 = JS_GetPropertyUint32(v36, v37, v38, j);
v30 = v22;
if ( JS_IsException_1(PropertyUint32, v22) )
{
free_arg_list(v36, v31, j);
return 0LL;
}
v23 = (long long *)(16LL * j + v31);
*v23 = PropertyUint32;
v23[1] = v30;
}
}
*v35 = v34;
return v31;
}
else
{
return 0LL;
}
}
else
{
JS_ThrowRangeError(
v36,
(long long)"too many arguments in function call (only %d allowed)",
0xFFFFLL,
v14,
v15,
v16,
a7,
a8,
a9,
a10,
v17,
v18,
a13,
a14,
v25);
return 0LL;
}
}
else
{
JS_ThrowTypeError(v36, (long long)"not a object", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v25);
return 0LL;
}
}
| build_arg_list:
SUB RSP,0xa8
MOV qword ptr [RSP + 0x90],RDX
MOV qword ptr [RSP + 0x98],RCX
MOV qword ptr [RSP + 0x88],RDI
MOV qword ptr [RSP + 0x80],RSI
MOV RAX,qword ptr [RSP + 0x98]
CMP EAX,-0x1
JZ 0x0016be75
MOV RDI,qword ptr [RSP + 0x88]
LEA RSI,[0x214687]
MOV AL,0x0
CALL 0x001335f0
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x50],RDX
MOV qword ptr [RSP + 0xa0],0x0
JMP 0x0016c0e3
LAB_0016be75:
MOV RDI,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x90]
MOV RCX,qword ptr [RSP + 0x98]
LEA RSI,[RSP + 0x7c]
CALL 0x00173e60
CMP EAX,0x0
JZ 0x0016bead
MOV qword ptr [RSP + 0xa0],0x0
JMP 0x0016c0e3
LAB_0016bead:
CMP dword ptr [RSP + 0x7c],0xffff
JBE 0x0016beed
MOV RDI,qword ptr [RSP + 0x88]
LEA RSI,[0x214694]
MOV EDX,0xffff
MOV AL,0x0
CALL 0x0012f960
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
MOV qword ptr [RSP + 0xa0],0x0
JMP 0x0016c0e3
LAB_0016beed:
MOV RAX,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0x10],RAX
MOV ESI,dword ptr [RSP + 0x7c]
MOV EDI,0x1
CALL 0x00153c70
MOV RDI,qword ptr [RSP + 0x10]
MOV EAX,EAX
MOV ESI,EAX
SHL RSI,0x4
CALL 0x00128020
MOV qword ptr [RSP + 0x70],RAX
CMP qword ptr [RSP + 0x70],0x0
JNZ 0x0016bf38
MOV qword ptr [RSP + 0xa0],0x0
JMP 0x0016c0e3
LAB_0016bf38:
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOVZX EAX,word ptr [RAX + 0x6]
CMP EAX,0x2
JZ 0x0016bf65
MOV RAX,qword ptr [RSP + 0x58]
MOVZX EAX,word ptr [RAX + 0x6]
CMP EAX,0x8
JNZ 0x0016c008
LAB_0016bf65:
MOV RAX,qword ptr [RSP + 0x58]
MOV AL,byte ptr [RAX + 0x5]
SHR AL,0x3
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x0016c008
MOV EAX,dword ptr [RSP + 0x7c]
MOV RCX,qword ptr [RSP + 0x58]
CMP EAX,dword ptr [RCX + 0x40]
JNZ 0x0016c008
MOV dword ptr [RSP + 0x78],0x0
LAB_0016bf94:
MOV EAX,dword ptr [RSP + 0x78]
CMP EAX,dword ptr [RSP + 0x7c]
JNC 0x0016c003
MOV RAX,qword ptr [RSP + 0x70]
MOV ECX,dword ptr [RSP + 0x78]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RAX + 0x38]
MOV ECX,dword ptr [RSP + 0x78]
SHL RCX,0x4
ADD RAX,RCX
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x001279c0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x28],RCX
MOV qword ptr [RSP + 0x30],RDX
MOV RCX,qword ptr [RSP + 0x28]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0x30]
MOV qword ptr [RAX + 0x8],RCX
MOV EAX,dword ptr [RSP + 0x78]
ADD EAX,0x1
MOV dword ptr [RSP + 0x78],EAX
JMP 0x0016bf94
LAB_0016c003:
JMP 0x0016c0c8
LAB_0016c008:
MOV dword ptr [RSP + 0x78],0x0
LAB_0016c010:
MOV EAX,dword ptr [RSP + 0x78]
CMP EAX,dword ptr [RSP + 0x7c]
JNC 0x0016c0c6
MOV RDI,qword ptr [RSP + 0x88]
MOV ECX,dword ptr [RSP + 0x78]
MOV RSI,qword ptr [RSP + 0x90]
MOV RDX,qword ptr [RSP + 0x98]
CALL 0x00137750
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],RDX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x68],RAX
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x68]
CALL 0x00129fb0
CMP EAX,0x0
JZ 0x0016c095
MOV RDI,qword ptr [RSP + 0x88]
MOV RSI,qword ptr [RSP + 0x70]
MOV EDX,dword ptr [RSP + 0x78]
CALL 0x0016c100
MOV qword ptr [RSP + 0xa0],0x0
JMP 0x0016c0e3
LAB_0016c095:
MOV RAX,qword ptr [RSP + 0x70]
MOV ECX,dword ptr [RSP + 0x78]
SHL RCX,0x4
ADD RAX,RCX
MOV RCX,qword ptr [RSP + 0x60]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0x68]
MOV qword ptr [RAX + 0x8],RCX
MOV EAX,dword ptr [RSP + 0x78]
ADD EAX,0x1
MOV dword ptr [RSP + 0x78],EAX
JMP 0x0016c010
LAB_0016c0c6:
JMP 0x0016c0c8
LAB_0016c0c8:
MOV ECX,dword ptr [RSP + 0x7c]
MOV RAX,qword ptr [RSP + 0x80]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0xa0],RAX
LAB_0016c0e3:
MOV RAX,qword ptr [RSP + 0xa0]
ADD RSP,0xa8
RET
|
long build_arg_list(int8 param_1,uint *param_2,long param_3,int8 param_4)
{
int8 uVar1;
long lVar2;
int iVar3;
uint uVar4;
int8 *puVar5;
int1 auVar6 [16];
uint local_30;
uint local_2c;
uint *local_28;
int8 local_20;
long local_18;
int8 local_10;
long local_8;
local_28 = param_2;
local_20 = param_1;
local_18 = param_3;
local_10 = param_4;
if ((int)param_4 == -1) {
iVar3 = js_get_length32(param_1,&local_2c,param_3,param_4);
uVar1 = local_20;
if (iVar3 == 0) {
if (local_2c < 0x10000) {
uVar4 = max_uint32(1,local_2c);
local_8 = js_mallocz(uVar1,(ulong)uVar4 << 4);
lVar2 = local_18;
if (local_8 == 0) {
local_8 = 0;
}
else {
if ((((*(short *)(local_18 + 6) == 2) || (*(short *)(local_18 + 6) == 8)) &&
((*(byte *)(local_18 + 5) >> 3 & 1) != 0)) && (local_2c == *(uint *)(local_18 + 0x40))
) {
for (local_30 = 0; local_30 < local_2c; local_30 = local_30 + 1) {
puVar5 = (int8 *)(*(long *)(lVar2 + 0x38) + (ulong)local_30 * 0x10);
auVar6 = js_dup(*puVar5,puVar5[1]);
*(int1 (*) [16])(local_8 + (ulong)local_30 * 0x10) = auVar6;
}
}
else {
for (local_30 = 0; local_30 < local_2c; local_30 = local_30 + 1) {
auVar6 = JS_GetPropertyUint32(local_20,local_18,local_10,local_30);
iVar3 = JS_IsException(auVar6._0_8_,auVar6._8_8_);
if (iVar3 != 0) {
free_arg_list(local_20,local_8,local_30);
return 0;
}
*(int1 (*) [16])(local_8 + (ulong)local_30 * 0x10) = auVar6;
}
}
*local_28 = local_2c;
}
}
else {
JS_ThrowRangeError(local_20,"too many arguments in function call (only %d allowed)",0xffff);
local_8 = 0;
}
}
else {
local_8 = 0;
}
}
else {
JS_ThrowTypeError(param_1,"not a object");
local_8 = 0;
}
return local_8;
}
| |
43,871 | build_arg_list | bluesky950520[P]quickjs/quickjs.c | static JSValue *build_arg_list(JSContext *ctx, uint32_t *plen,
JSValue array_arg)
{
uint32_t len, i;
JSValue *tab, ret;
JSObject *p;
if (JS_VALUE_GET_TAG(array_arg) != JS_TAG_OBJECT) {
JS_ThrowTypeError(ctx, "not a object");
return NULL;
}
if (js_get_length32(ctx, &len, array_arg))
return NULL;
if (len > JS_MAX_LOCAL_VARS) {
// XXX: check for stack overflow?
JS_ThrowRangeError(ctx, "too many arguments in function call (only %d allowed)",
JS_MAX_LOCAL_VARS);
return NULL;
}
/* avoid allocating 0 bytes */
tab = js_mallocz(ctx, sizeof(tab[0]) * max_uint32(1, len));
if (!tab)
return NULL;
p = JS_VALUE_GET_OBJ(array_arg);
if ((p->class_id == JS_CLASS_ARRAY || p->class_id == JS_CLASS_ARGUMENTS) &&
p->fast_array &&
len == p->u.array.count) {
for(i = 0; i < len; i++) {
tab[i] = js_dup(p->u.array.u.values[i]);
}
} else {
for(i = 0; i < len; i++) {
ret = JS_GetPropertyUint32(ctx, array_arg, i);
if (JS_IsException(ret)) {
free_arg_list(ctx, tab, i);
return NULL;
}
tab[i] = ret;
}
}
*plen = len;
return tab;
} | O2 | c | build_arg_list:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r13
movq %rdi, %r12
cmpl $-0x1, %r13d
jne 0x3b447
movq %rdx, %r15
movq %rsi, %rbx
leaq 0x4(%rsp), %rsi
movq %r12, %rdi
movq %r13, %rcx
callq 0x3d0a2
testl %eax, %eax
je 0x3b46d
xorl %r14d, %r14d
jmp 0x3b45b
leaq 0x4e19d(%rip), %rsi # 0x895eb
xorl %r14d, %r14d
movq %r12, %rdi
xorl %eax, %eax
callq 0x201fd
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x4(%rsp), %esi
cmpq $0x10000, %rsi # imm = 0x10000
jb 0x3b495
leaq 0x4e177(%rip), %rsi # 0x895f8
xorl %r14d, %r14d
movq %r12, %rdi
movl $0xffff, %edx # imm = 0xFFFF
xorl %eax, %eax
callq 0x1e863
jmp 0x3b45b
cmpl $0x1, %esi
movq %rsi, 0x8(%rsp)
adcl $0x0, %esi
shll $0x4, %esi
movq %r12, %rdi
callq 0x1adf1
testq %rax, %rax
je 0x3b442
movq %rax, %r14
movq %rbx, 0x10(%rsp)
movzwl 0x6(%r15), %eax
cmpl $0x8, %eax
movq 0x8(%rsp), %rdi
je 0x3b4cc
cmpl $0x2, %eax
jne 0x3b50a
testb $0x8, 0x5(%r15)
je 0x3b50a
cmpl 0x40(%r15), %edi
jne 0x3b50a
movq %rdi, %rax
shlq $0x4, %rax
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x3b543
movq 0x38(%r15), %rsi
movq (%rsi,%rcx), %rdx
movq 0x8(%rsi,%rcx), %rsi
cmpl $-0x9, %esi
jb 0x3b4fb
incl (%rdx)
movq %rdx, (%r14,%rcx)
movq %rsi, 0x8(%r14,%rcx)
addq $0x10, %rcx
jmp 0x3b4e2
movq %r14, %rbx
addq $0x8, %rbx
xorl %ebp, %ebp
cmpq %rbp, %rdi
je 0x3b543
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %rbp, %rcx
callq 0x21d28
cmpl $0x6, %edx
je 0x3b54f
movq %rax, -0x8(%rbx)
movq %rdx, (%rbx)
incq %rbp
addq $0x10, %rbx
movq 0x8(%rsp), %rdi
jmp 0x3b513
movq 0x10(%rsp), %rax
movl %edi, (%rax)
jmp 0x3b45b
movq %r12, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x3b561
jmp 0x3b442
| build_arg_list:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r13, rcx
mov r12, rdi
cmp r13d, 0FFFFFFFFh
jnz short loc_3B447
mov r15, rdx
mov rbx, rsi
lea rsi, [rsp+48h+var_44]
mov rdi, r12
mov rcx, r13
call js_get_length32
test eax, eax
jz short loc_3B46D
loc_3B442:
xor r14d, r14d
jmp short loc_3B45B
loc_3B447:
lea rsi, aNotAObject; "not a object"
xor r14d, r14d
mov rdi, r12
xor eax, eax
call JS_ThrowTypeError
loc_3B45B:
mov rax, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3B46D:
mov esi, [rsp+48h+var_44]
cmp rsi, 10000h
jb short loc_3B495
lea rsi, aTooManyArgumen; "too many arguments in function call (on"...
xor r14d, r14d
mov rdi, r12
mov edx, 0FFFFh
xor eax, eax
call JS_ThrowRangeError
jmp short loc_3B45B
loc_3B495:
cmp esi, 1
mov [rsp+48h+var_40], rsi
adc esi, 0
shl esi, 4
mov rdi, r12
call js_mallocz
test rax, rax
jz short loc_3B442
mov r14, rax
mov [rsp+48h+var_38], rbx
movzx eax, word ptr [r15+6]
cmp eax, 8
mov rdi, [rsp+48h+var_40]
jz short loc_3B4CC
cmp eax, 2
jnz short loc_3B50A
loc_3B4CC:
test byte ptr [r15+5], 8
jz short loc_3B50A
cmp edi, [r15+40h]
jnz short loc_3B50A
mov rax, rdi
shl rax, 4
xor ecx, ecx
loc_3B4E2:
cmp rax, rcx
jz short loc_3B543
mov rsi, [r15+38h]
mov rdx, [rsi+rcx]
mov rsi, [rsi+rcx+8]
cmp esi, 0FFFFFFF7h
jb short loc_3B4FB
inc dword ptr [rdx]
loc_3B4FB:
mov [r14+rcx], rdx
mov [r14+rcx+8], rsi
add rcx, 10h
jmp short loc_3B4E2
loc_3B50A:
mov rbx, r14
add rbx, 8
xor ebp, ebp
loc_3B513:
cmp rdi, rbp
jz short loc_3B543
mov rdi, r12
mov rsi, r15
mov rdx, r13
mov rcx, rbp
call JS_GetPropertyInt64
cmp edx, 6
jz short loc_3B54F
mov [rbx-8], rax
mov [rbx], rdx
inc rbp
add rbx, 10h
mov rdi, [rsp+48h+var_40]
jmp short loc_3B513
loc_3B543:
mov rax, [rsp+48h+var_38]
mov [rax], edi
jmp loc_3B45B
loc_3B54F:
mov rdi, r12
mov rsi, r14
mov edx, ebp
call free_arg_list
jmp loc_3B442
| long long build_arg_list(
long long a1,
_DWORD *a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v16; // rcx
long long v17; // r8
long long v18; // r9
__m128 v19; // xmm4
__m128 v20; // xmm5
long long v21; // r14
long long v23; // rax
int v24; // eax
long long v25; // rdi
long long v26; // rax
long long i; // rcx
long long v28; // rsi
_DWORD *v29; // rdx
long long v30; // rsi
_QWORD *v31; // rbx
unsigned long long j; // rbp
unsigned long long PropertyInt64; // rax
long long v34; // rdx
char v35; // [rsp+0h] [rbp-48h]
unsigned int v36; // [rsp+4h] [rbp-44h] BYREF
long long v37; // [rsp+8h] [rbp-40h]
_DWORD *v38; // [rsp+10h] [rbp-38h]
if ( (_DWORD)a4 == -1 )
{
if ( (unsigned int)js_get_length32(a1, &v36, a3, a4) )
return 0LL;
if ( v36 >= 0x10000uLL )
{
v21 = 0LL;
JS_ThrowRangeError(
a1,
(long long)"too many arguments in function call (only %d allowed)",
0xFFFFLL,
v16,
v17,
v18,
a7,
a8,
a9,
a10,
v19,
v20,
a13,
a14,
v35);
return v21;
}
v37 = v36;
v23 = js_mallocz(a1, 16 * ((v36 == 0) + v36));
if ( !v23 )
{
return 0LL;
}
else
{
v21 = v23;
v38 = a2;
v24 = *(unsigned __int16 *)(a3 + 6);
v25 = v37;
if ( (v24 == 8 || v24 == 2) && (*(_BYTE *)(a3 + 5) & 8) != 0 && (_DWORD)v37 == *(_DWORD *)(a3 + 64) )
{
v26 = 16 * v37;
for ( i = 0LL; v26 != i; i += 16LL )
{
v28 = *(_QWORD *)(a3 + 56);
v29 = *(_DWORD **)(v28 + i);
v30 = *(_QWORD *)(v28 + i + 8);
if ( (unsigned int)v30 >= 0xFFFFFFF7 )
++*v29;
*(_QWORD *)(v21 + i) = v29;
*(_QWORD *)(v21 + i + 8) = v30;
}
}
else
{
v31 = (_QWORD *)(v21 + 8);
for ( j = 0LL; v25 != j; ++j )
{
PropertyInt64 = JS_GetPropertyInt64(a1, a3, -1, j);
if ( (_DWORD)v34 == 6 )
{
free_arg_list(a1, v21, (unsigned int)j);
return 0LL;
}
*(v31 - 1) = PropertyInt64;
*v31 = v34;
v31 += 2;
v25 = v37;
}
}
*v38 = v25;
}
}
else
{
v21 = 0LL;
JS_ThrowTypeError(a1, (long long)"not a object", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v35);
}
return v21;
}
| build_arg_list:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R13,RCX
MOV R12,RDI
CMP R13D,-0x1
JNZ 0x0013b447
MOV R15,RDX
MOV RBX,RSI
LEA RSI,[RSP + 0x4]
MOV RDI,R12
MOV RCX,R13
CALL 0x0013d0a2
TEST EAX,EAX
JZ 0x0013b46d
LAB_0013b442:
XOR R14D,R14D
JMP 0x0013b45b
LAB_0013b447:
LEA RSI,[0x1895eb]
XOR R14D,R14D
MOV RDI,R12
XOR EAX,EAX
CALL 0x001201fd
LAB_0013b45b:
MOV RAX,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013b46d:
MOV ESI,dword ptr [RSP + 0x4]
CMP RSI,0x10000
JC 0x0013b495
LEA RSI,[0x1895f8]
XOR R14D,R14D
MOV RDI,R12
MOV EDX,0xffff
XOR EAX,EAX
CALL 0x0011e863
JMP 0x0013b45b
LAB_0013b495:
CMP ESI,0x1
MOV qword ptr [RSP + 0x8],RSI
ADC ESI,0x0
SHL ESI,0x4
MOV RDI,R12
CALL 0x0011adf1
TEST RAX,RAX
JZ 0x0013b442
MOV R14,RAX
MOV qword ptr [RSP + 0x10],RBX
MOVZX EAX,word ptr [R15 + 0x6]
CMP EAX,0x8
MOV RDI,qword ptr [RSP + 0x8]
JZ 0x0013b4cc
CMP EAX,0x2
JNZ 0x0013b50a
LAB_0013b4cc:
TEST byte ptr [R15 + 0x5],0x8
JZ 0x0013b50a
CMP EDI,dword ptr [R15 + 0x40]
JNZ 0x0013b50a
MOV RAX,RDI
SHL RAX,0x4
XOR ECX,ECX
LAB_0013b4e2:
CMP RAX,RCX
JZ 0x0013b543
MOV RSI,qword ptr [R15 + 0x38]
MOV RDX,qword ptr [RSI + RCX*0x1]
MOV RSI,qword ptr [RSI + RCX*0x1 + 0x8]
CMP ESI,-0x9
JC 0x0013b4fb
INC dword ptr [RDX]
LAB_0013b4fb:
MOV qword ptr [R14 + RCX*0x1],RDX
MOV qword ptr [R14 + RCX*0x1 + 0x8],RSI
ADD RCX,0x10
JMP 0x0013b4e2
LAB_0013b50a:
MOV RBX,R14
ADD RBX,0x8
XOR EBP,EBP
LAB_0013b513:
CMP RDI,RBP
JZ 0x0013b543
MOV RDI,R12
MOV RSI,R15
MOV RDX,R13
MOV RCX,RBP
CALL 0x00121d28
CMP EDX,0x6
JZ 0x0013b54f
MOV qword ptr [RBX + -0x8],RAX
MOV qword ptr [RBX],RDX
INC RBP
ADD RBX,0x10
MOV RDI,qword ptr [RSP + 0x8]
JMP 0x0013b513
LAB_0013b543:
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX],EDI
JMP 0x0013b45b
LAB_0013b54f:
MOV RDI,R12
MOV RSI,R14
MOV EDX,EBP
CALL 0x0013b561
JMP 0x0013b442
|
long build_arg_list(int8 param_1,int4 *param_2,long param_3,int8 param_4)
{
int *piVar1;
int8 uVar2;
int iVar3;
long lVar4;
long lVar5;
int8 *puVar6;
ulong uVar7;
int1 auVar8 [16];
uint local_44;
ulong local_40;
int4 *local_38;
if ((int)param_4 != -1) {
JS_ThrowTypeError(param_1,"not a object");
return 0;
}
iVar3 = js_get_length32(param_1,&local_44);
if (iVar3 == 0) {
local_40 = (ulong)local_44;
if (0xffff < local_40) {
JS_ThrowRangeError(param_1,"too many arguments in function call (only %d allowed)",0xffff);
return 0;
}
lVar4 = js_mallocz(param_1,(local_44 + (local_44 == 0)) * 0x10);
if (lVar4 != 0) {
local_38 = param_2;
if ((((*(short *)(param_3 + 6) == 8) || (*(short *)(param_3 + 6) == 2)) &&
((*(byte *)(param_3 + 5) & 8) != 0)) && ((int)local_40 == *(int *)(param_3 + 0x40))) {
for (lVar5 = 0; local_40 << 4 != lVar5; lVar5 = lVar5 + 0x10) {
piVar1 = *(int **)(*(long *)(param_3 + 0x38) + lVar5);
uVar2 = *(int8 *)(*(long *)(param_3 + 0x38) + 8 + lVar5);
if (0xfffffff6 < (uint)uVar2) {
*piVar1 = *piVar1 + 1;
}
*(int **)(lVar4 + lVar5) = piVar1;
*(int8 *)(lVar4 + 8 + lVar5) = uVar2;
}
}
else {
puVar6 = (int8 *)(lVar4 + 8);
for (uVar7 = 0; local_40 != uVar7; uVar7 = uVar7 + 1) {
auVar8 = JS_GetPropertyInt64(param_1,param_3,param_4,uVar7);
if (auVar8._8_4_ == 6) {
free_arg_list(param_1,lVar4,uVar7 & 0xffffffff);
return 0;
}
puVar6[-1] = auVar8._0_8_;
*puVar6 = auVar8._8_8_;
puVar6 = puVar6 + 2;
}
}
*local_38 = (int)local_40;
return lVar4;
}
}
return 0;
}
| |
43,872 | set_table_share_key(PFS_table_share_key*, bool, char const*, unsigned long, char const*, unsigned long) | eloqsql/storage/perfschema/pfs_instr_class.cc | static void set_table_share_key(PFS_table_share_key *key,
bool temporary,
const char *schema_name, size_t schema_name_length,
const char *table_name, size_t table_name_length)
{
assert(schema_name_length <= NAME_LEN);
assert(table_name_length <= NAME_LEN);
char *saved_schema_name;
char *saved_table_name;
char *ptr= &key->m_hash_key[0];
ptr[0]= (temporary ? OBJECT_TYPE_TEMPORARY_TABLE : OBJECT_TYPE_TABLE);
ptr++;
saved_schema_name= ptr;
memcpy(ptr, schema_name, schema_name_length);
ptr+= schema_name_length;
ptr[0]= 0;
ptr++;
saved_table_name= ptr;
memcpy(ptr, table_name, table_name_length);
ptr+= table_name_length;
ptr[0]= 0;
ptr++;
key->m_key_length= (uint)(ptr - &key->m_hash_key[0]);
if (lower_case_table_names)
{
my_casedn_str(files_charset_info, saved_schema_name);
my_casedn_str(files_charset_info, saved_table_name);
}
} | O0 | cpp | set_table_share_key(PFS_table_share_key*, bool, char const*, unsigned long, char const*, unsigned long):
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movb -0x9(%rbp), %dl
movl $0x4, %eax
movl $0x6, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movb %al, %cl
movq -0x48(%rbp), %rax
movb %cl, (%rax)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x48(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x26280
movq -0x20(%rbp), %rax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movb $0x0, (%rax)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x48(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x26280
movq -0x30(%rbp), %rax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movb $0x0, (%rax)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x184(%rax)
leaq 0x3dbb7f(%rip), %rax # 0x417860
cmpl $0x0, (%rax)
je 0x3bd30
leaq 0x3dbb7b(%rip), %rax # 0x417868
movq (%rax), %rax
movq 0xb8(%rax), %rax
movq 0x48(%rax), %rax
leaq 0x3dbb66(%rip), %rcx # 0x417868
movq (%rcx), %rdi
movq -0x38(%rbp), %rsi
callq *%rax
leaq 0x3dbb56(%rip), %rax # 0x417868
movq (%rax), %rax
movq 0xb8(%rax), %rax
movq 0x48(%rax), %rax
leaq 0x3dbb41(%rip), %rcx # 0x417868
movq (%rcx), %rdi
movq -0x40(%rbp), %rsi
callq *%rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZL19set_table_share_keyP19PFS_table_share_keybPKcmS2_m:
push rbp
mov rbp, rsp
sub rsp, 50h
mov al, sil
mov [rbp+var_8], rdi
and al, 1
mov [rbp+var_9], al
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_8]
mov [rbp+var_48], rax
mov dl, [rbp+var_9]
mov eax, 4
mov ecx, 6
test dl, 1
cmovnz eax, ecx
mov cl, al
mov rax, [rbp+var_48]
mov [rax], cl
mov rax, [rbp+var_48]
add rax, 1
mov [rbp+var_48], rax
mov rax, [rbp+var_48]
mov [rbp+var_38], rax
mov rdi, [rbp+var_48]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call _memcpy
mov rax, [rbp+var_20]
add rax, [rbp+var_48]
mov [rbp+var_48], rax
mov rax, [rbp+var_48]
mov byte ptr [rax], 0
mov rax, [rbp+var_48]
add rax, 1
mov [rbp+var_48], rax
mov rax, [rbp+var_48]
mov [rbp+var_40], rax
mov rdi, [rbp+var_48]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_30]
call _memcpy
mov rax, [rbp+var_30]
add rax, [rbp+var_48]
mov [rbp+var_48], rax
mov rax, [rbp+var_48]
mov byte ptr [rax], 0
mov rax, [rbp+var_48]
add rax, 1
mov [rbp+var_48], rax
mov rax, [rbp+var_48]
mov rcx, [rbp+var_8]
sub rax, rcx
mov ecx, eax
mov rax, [rbp+var_8]
mov [rax+184h], ecx
lea rax, lower_case_table_names
cmp dword ptr [rax], 0
jz short loc_3BD30
lea rax, files_charset_info
mov rax, [rax]
mov rax, [rax+0B8h]
mov rax, [rax+48h]
lea rcx, files_charset_info
mov rdi, [rcx]
mov rsi, [rbp+var_38]
call rax
lea rax, files_charset_info
mov rax, [rax]
mov rax, [rax+0B8h]
mov rax, [rax+48h]
lea rcx, files_charset_info
mov rdi, [rcx]
mov rsi, [rbp+var_40]
call rax
loc_3BD30:
add rsp, 50h
pop rbp
retn
| _DWORD * set_table_share_key(long long a1, char a2, long long a3, long long a4, long long a5, long long a6)
{
char v6; // al
_DWORD *result; // rax
_BYTE *v8; // [rsp+8h] [rbp-48h]
_BYTE *v9; // [rsp+8h] [rbp-48h]
_BYTE *v10; // [rsp+10h] [rbp-40h]
v6 = 4;
if ( (a2 & 1) != 0 )
v6 = 6;
*(_BYTE *)a1 = v6;
memcpy(a1 + 1, a3, a4);
v8 = (_BYTE *)(a1 + 1 + a4);
*v8 = 0;
v10 = v8 + 1;
memcpy(v8 + 1, a5, a6);
v9 = &v8[a6 + 1];
*v9 = 0;
*(_DWORD *)(a1 + 388) = (_DWORD)v9 + 1 - a1;
result = lower_case_table_names;
if ( lower_case_table_names[0] )
{
(*(void ( **)(_QWORD, long long))(*(_QWORD *)(files_charset_info + 184LL) + 72LL))(
files_charset_info,
a1 + 1);
return (_DWORD *)(*(long long ( **)(_QWORD, _BYTE *))(*(_QWORD *)(files_charset_info + 184LL) + 72LL))(
files_charset_info,
v10);
}
return result;
}
| set_table_share_key:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV AL,SIL
MOV qword ptr [RBP + -0x8],RDI
AND AL,0x1
MOV byte ptr [RBP + -0x9],AL
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 + -0x8]
MOV qword ptr [RBP + -0x48],RAX
MOV DL,byte ptr [RBP + -0x9]
MOV EAX,0x4
MOV ECX,0x6
TEST DL,0x1
CMOVNZ EAX,ECX
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x48]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x1
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00126280
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x1
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x00126280
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x1
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x8]
SUB RAX,RCX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x184],ECX
LEA RAX,[0x517860]
CMP dword ptr [RAX],0x0
JZ 0x0013bd30
LEA RAX,[0x517868]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x48]
LEA RCX,[0x517868]
MOV RDI,qword ptr [RCX]
MOV RSI,qword ptr [RBP + -0x38]
CALL RAX
LEA RAX,[0x517868]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x48]
LEA RCX,[0x517868]
MOV RDI,qword ptr [RCX]
MOV RSI,qword ptr [RBP + -0x40]
CALL RAX
LAB_0013bd30:
ADD RSP,0x50
POP RBP
RET
|
/* set_table_share_key(PFS_table_share_key*, bool, char const*, unsigned long, char const*, unsigned
long) */
void set_table_share_key(PFS_table_share_key *param_1,bool param_2,char *param_3,ulong param_4,
char *param_5,ulong param_6)
{
PFS_table_share_key PVar1;
PFS_table_share_key *__dest;
PFS_table_share_key *__dest_00;
PVar1 = (PFS_table_share_key)0x4;
if (param_2) {
PVar1 = (PFS_table_share_key)0x6;
}
*param_1 = PVar1;
__dest = param_1 + 1;
memcpy(__dest,param_3,param_4);
__dest[param_4] = (PFS_table_share_key)0x0;
__dest_00 = __dest + param_4 + 1;
memcpy(__dest_00,param_5,param_6);
__dest_00[param_6] = (PFS_table_share_key)0x0;
*(int *)(param_1 + 0x184) = ((int)(__dest_00 + param_6) + 1) - (int)param_1;
if (lower_case_table_names != 0) {
(**(code **)(*(long *)(files_charset_info + 0xb8) + 0x48))(files_charset_info,__dest);
(**(code **)(*(long *)(files_charset_info + 0xb8) + 0x48))(files_charset_info,__dest_00);
}
return;
}
| |
43,873 | js_typed_array_fill | bluesky950520[P]quickjs/quickjs.c | static JSValue js_typed_array_fill(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSObject *p;
int len, k, final, shift;
uint64_t v64;
p = get_typed_array(ctx, this_val);
if (!p)
return JS_EXCEPTION;
if (typed_array_is_oob(p))
return JS_ThrowTypeErrorArrayBufferOOB(ctx);
len = p->u.array.count;
if (p->class_id == JS_CLASS_UINT8C_ARRAY) {
int32_t v;
if (JS_ToUint8ClampFree(ctx, &v, js_dup(argv[0])))
return JS_EXCEPTION;
v64 = v;
} else if (p->class_id <= JS_CLASS_UINT32_ARRAY) {
uint32_t v;
if (JS_ToUint32(ctx, &v, argv[0]))
return JS_EXCEPTION;
v64 = v;
} else
if (p->class_id <= JS_CLASS_BIG_UINT64_ARRAY) {
if (JS_ToBigInt64(ctx, (int64_t *)&v64, argv[0]))
return JS_EXCEPTION;
} else {
double d;
if (JS_ToFloat64(ctx, &d, argv[0]))
return JS_EXCEPTION;
if (p->class_id == JS_CLASS_FLOAT16_ARRAY) {
v64 = tofp16(d);
} else if (p->class_id == JS_CLASS_FLOAT32_ARRAY) {
union {
float f;
uint32_t u32;
} u;
u.f = d;
v64 = u.u32;
} else {
JSFloat64Union u;
u.d = d;
v64 = u.u64;
}
}
k = 0;
if (argc > 1) {
if (JS_ToInt32Clamp(ctx, &k, argv[1], 0, len, len))
return JS_EXCEPTION;
}
final = len;
if (argc > 2 && !JS_IsUndefined(argv[2])) {
if (JS_ToInt32Clamp(ctx, &final, argv[2], 0, len, len))
return JS_EXCEPTION;
}
if (typed_array_is_oob(p))
return JS_ThrowTypeErrorArrayBufferOOB(ctx);
// RAB may have been resized by evil .valueOf method
final = min_int(final, p->u.array.count);
shift = typed_array_size_log2(p->class_id);
switch(shift) {
case 0:
if (k < final) {
memset(p->u.array.u.uint8_ptr + k, v64, final - k);
}
break;
case 1:
for(; k < final; k++) {
p->u.array.u.uint16_ptr[k] = v64;
}
break;
case 2:
for(; k < final; k++) {
p->u.array.u.uint32_ptr[k] = v64;
}
break;
case 3:
for(; k < final; k++) {
p->u.array.u.uint64_ptr[k] = v64;
}
break;
default:
abort();
}
return js_dup(this_val);
} | O1 | c | js_typed_array_fill:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %r13
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
movq %rsi, 0x18(%rsp)
cmpl $-0x1, %ebx
jne 0x803d4
movq 0x18(%rsp), %r15
movzwl 0x6(%r15), %eax
addl $-0x15, %eax
cmpw $0xc, %ax
jb 0x803e8
leaq 0x2092e(%rip), %rsi # 0xa0d09
xorl %r15d, %r15d
movq %r12, %rdi
xorl %eax, %eax
callq 0x21953
testq %r15, %r15
je 0x805da
movq %r15, %rdi
callq 0x38ab0
testl %eax, %eax
je 0x80415
leaq 0x20916(%rip), %rsi # 0xa0d1a
xorl %ebp, %ebp
movq %r12, %rdi
xorl %eax, %eax
callq 0x21953
jmp 0x805dc
movl 0x40(%r15), %eax
movl %eax, 0x2c(%rsp)
movzwl 0x6(%r15), %eax
cmpw $0x15, %ax
jne 0x8045d
movq (%r13), %rdx
movq 0x8(%r13), %rcx
movq %rdx, 0x18(%rsp)
cmpl $-0x9, %ecx
jb 0x80441
movq 0x18(%rsp), %rax
incl (%rax)
leaq 0x14(%rsp), %rsi
movq %r12, %rdi
callq 0x3cff8
testl %eax, %eax
jne 0x805da
movslq 0x14(%rsp), %rax
jmp 0x80499
cmpw $0x1b, %ax
ja 0x8058c
movq (%r13), %rdx
movq 0x8(%r13), %rcx
movq %rdx, 0x18(%rsp)
cmpl $-0x9, %ecx
jb 0x80480
movq 0x18(%rsp), %rax
incl (%rax)
leaq 0x14(%rsp), %rsi
movq %r12, %rdi
callq 0x26daf
testl %eax, %eax
jne 0x805da
movl 0x14(%rsp), %eax
movq %rax, 0x20(%rsp)
movl $0x0, 0x14(%rsp)
movl %ebp, 0x34(%rsp)
cmpl $0x2, %ebp
jl 0x804da
movq 0x10(%r13), %rdx
movq 0x18(%r13), %rcx
movl 0x2c(%rsp), %r9d
movl %r9d, (%rsp)
leaq 0x14(%rsp), %rsi
xorl %ebp, %ebp
movq %r12, %rdi
xorl %r8d, %r8d
callq 0x26b42
testl %eax, %eax
jne 0x805dc
movl 0x2c(%rsp), %eax
movl %eax, 0x30(%rsp)
cmpl $0x3, 0x34(%rsp)
jl 0x80519
movq 0x28(%r13), %rcx
cmpl $0x3, %ecx
je 0x80519
movq 0x20(%r13), %rdx
movl 0x2c(%rsp), %r9d
movl %r9d, (%rsp)
leaq 0x30(%rsp), %rsi
xorl %ebp, %ebp
movq %r12, %rdi
xorl %r8d, %r8d
callq 0x26b42
testl %eax, %eax
jne 0x805dc
movq %r15, %rdi
callq 0x38ab0
testl %eax, %eax
jne 0x803fd
movl 0x30(%rsp), %ecx
movl 0x40(%r15), %eax
cmpl %eax, %ecx
cmovll %ecx, %eax
movl %eax, 0x30(%rsp)
movzwl 0x6(%r15), %ecx
leaq 0x1bc89(%rip), %rdx # 0x9c1cf
movzbl -0x15(%rcx,%rdx), %ecx
cmpq $0x3, %rcx
ja 0x806d0
leaq 0x1bb20(%rip), %rdx # 0x9c07c
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movslq 0x14(%rsp), %rcx
cmpl %ecx, %eax
jle 0x80691
movq %rcx, %rdi
addq 0x38(%r15), %rdi
subl %ecx, %eax
movslq %eax, %rdx
movl 0x20(%rsp), %esi
callq 0xe340
jmp 0x80691
cmpw $0x1d, %ax
ja 0x805c1
movq (%r13), %rdx
movq 0x8(%r13), %rcx
movq %rdx, 0x18(%rsp)
cmpl $-0x9, %ecx
jb 0x805ab
movq 0x18(%rsp), %rax
incl (%rax)
leaq 0x20(%rsp), %rsi
movq %r12, %rdi
callq 0x277c4
testl %eax, %eax
jne 0x805da
jmp 0x8049e
movq (%r13), %rdx
movq 0x8(%r13), %rcx
leaq 0x18(%rsp), %rsi
movq %r12, %rdi
callq 0x26a6d
testl %eax, %eax
je 0x805fb
xorl %ebp, %ebp
xorl %eax, %eax
movl $0x6, %ebx
orq %rax, %rbp
movq %rbp, %rax
movq %rbx, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzwl 0x6(%r15), %eax
cmpl $0x1f, %eax
je 0x806b7
cmpl $0x1e, %eax
jne 0x806c6
movsd 0x18(%rsp), %xmm0
callq 0x3d08a
movzwl %ax, %eax
jmp 0x80499
movl 0x14(%rsp), %ecx
cmpl %eax, %ecx
jge 0x8068d
movslq %ecx, %rcx
movl 0x20(%rsp), %edx
cltq
movq 0x38(%r15), %rsi
movl %edx, (%rsi,%rcx,4)
incq %rcx
cmpq %rcx, %rax
jne 0x80636
jmp 0x8068d
movl 0x14(%rsp), %ecx
cmpl %eax, %ecx
jge 0x8068d
movslq %ecx, %rcx
cltq
movq 0x20(%rsp), %rdx
movq 0x38(%r15), %rsi
movq %rdx, (%rsi,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x80654
jmp 0x8068d
movl 0x14(%rsp), %ecx
cmpl %eax, %ecx
jge 0x8068d
movslq %ecx, %rcx
movzwl 0x20(%rsp), %edx
cltq
movq 0x38(%r15), %rsi
movw %dx, (%rsi,%rcx,2)
incq %rcx
cmpq %rcx, %rax
jne 0x8067d
movl %ecx, 0x14(%rsp)
movq %r14, 0x18(%rsp)
cmpl $-0x9, %ebx
jb 0x806a2
movq 0x18(%rsp), %rax
incl (%rax)
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
andq %r14, %rax
movl %r14d, %ebp
jmp 0x805e3
cvtsd2ss 0x18(%rsp), %xmm0
movd %xmm0, %eax
jmp 0x80499
movq 0x18(%rsp), %rax
jmp 0x80499
callq 0xe090
| js_typed_array_fill:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r13, r8
mov ebp, ecx
mov rbx, rdx
mov r14, rsi
mov r12, rdi
mov [rsp+68h+var_50], rsi
cmp ebx, 0FFFFFFFFh
jnz short loc_803D4
mov r15, [rsp+68h+var_50]
movzx eax, word ptr [r15+6]
add eax, 0FFFFFFEBh
cmp ax, 0Ch
jb short loc_803E8
loc_803D4:
lea rsi, aNotATypedarray; "not a TypedArray"
xor r15d, r15d
mov rdi, r12
xor eax, eax
call JS_ThrowTypeError
loc_803E8:
test r15, r15
jz loc_805DA
mov rdi, r15
call typed_array_is_oob
test eax, eax
jz short loc_80415
loc_803FD:
lea rsi, aArraybufferIsD_0; "ArrayBuffer is detached or resized"
xor ebp, ebp
mov rdi, r12
xor eax, eax
call JS_ThrowTypeError
jmp loc_805DC
loc_80415:
mov eax, [r15+40h]
mov [rsp+68h+var_3C], eax
movzx eax, word ptr [r15+6]
cmp ax, 15h
jnz short loc_8045D
mov rdx, [r13+0]
mov rcx, [r13+8]
mov [rsp+68h+var_50], rdx
cmp ecx, 0FFFFFFF7h
jb short loc_80441
mov rax, [rsp+68h+var_50]
inc dword ptr [rax]
loc_80441:
lea rsi, [rsp+68h+var_54]
mov rdi, r12
call JS_ToUint8ClampFree
test eax, eax
jnz loc_805DA
movsxd rax, [rsp+68h+var_54]
jmp short loc_80499
loc_8045D:
cmp ax, 1Bh
ja loc_8058C
mov rdx, [r13+0]
mov rcx, [r13+8]
mov [rsp+68h+var_50], rdx
cmp ecx, 0FFFFFFF7h
jb short loc_80480
mov rax, [rsp+68h+var_50]
inc dword ptr [rax]
loc_80480:
lea rsi, [rsp+68h+var_54]
mov rdi, r12
call JS_ToInt32Free
test eax, eax
jnz loc_805DA
mov eax, [rsp+68h+var_54]
loc_80499:
mov [rsp+68h+var_48], rax
loc_8049E:
mov [rsp+68h+var_54], 0
mov [rsp+68h+var_34], ebp
cmp ebp, 2
jl short loc_804DA
mov rdx, [r13+10h]
mov rcx, [r13+18h]
mov r9d, [rsp+68h+var_3C]
mov [rsp+68h+var_68], r9d
lea rsi, [rsp+68h+var_54]
xor ebp, ebp
mov rdi, r12
xor r8d, r8d
call JS_ToInt32Clamp
test eax, eax
jnz loc_805DC
loc_804DA:
mov eax, [rsp+68h+var_3C]
mov [rsp+68h+var_38], eax
cmp [rsp+68h+var_34], 3
jl short loc_80519
mov rcx, [r13+28h]
cmp ecx, 3
jz short loc_80519
mov rdx, [r13+20h]
mov r9d, [rsp+68h+var_3C]
mov [rsp+68h+var_68], r9d
lea rsi, [rsp+68h+var_38]
xor ebp, ebp
mov rdi, r12
xor r8d, r8d
call JS_ToInt32Clamp
test eax, eax
jnz loc_805DC
loc_80519:
mov rdi, r15
call typed_array_is_oob
test eax, eax
jnz loc_803FD
mov ecx, [rsp+68h+var_38]
mov eax, [r15+40h]
cmp ecx, eax
cmovl eax, ecx
mov [rsp+68h+var_38], eax
movzx ecx, word ptr [r15+6]
lea rdx, typed_array_size_log2
movzx ecx, byte ptr [rcx+rdx-15h]
cmp rcx, 3
ja loc_806D0
lea rdx, jpt_80563
movsxd rcx, ds:(jpt_80563 - 9C07Ch)[rdx+rcx*4]; switch 4 cases
add rcx, rdx
jmp rcx; switch jump
loc_80565:
movsxd rcx, [rsp+68h+var_54]; jumptable 0000000000080563 case 0
cmp eax, ecx
jle loc_80691
mov rdi, rcx
add rdi, [r15+38h]
sub eax, ecx
movsxd rdx, eax
mov esi, dword ptr [rsp+68h+var_48]
call _memset
jmp loc_80691
loc_8058C:
cmp ax, 1Dh
ja short loc_805C1
mov rdx, [r13+0]
mov rcx, [r13+8]
mov [rsp+68h+var_50], rdx
cmp ecx, 0FFFFFFF7h
jb short loc_805AB
mov rax, [rsp+68h+var_50]
inc dword ptr [rax]
loc_805AB:
lea rsi, [rsp+68h+var_48]
mov rdi, r12
call JS_ToBigInt64Free
test eax, eax
jnz short loc_805DA
jmp loc_8049E
loc_805C1:
mov rdx, [r13+0]
mov rcx, [r13+8]
lea rsi, [rsp+68h+var_50]
mov rdi, r12
call JS_ToFloat64
test eax, eax
jz short loc_805FB
loc_805DA:
xor ebp, ebp
loc_805DC:
xor eax, eax
mov ebx, 6
loc_805E3:
or rbp, rax
mov rax, rbp
mov rdx, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_805FB:
movzx eax, word ptr [r15+6]
cmp eax, 1Fh
jz loc_806B7
cmp eax, 1Eh
jnz loc_806C6
movsd xmm0, [rsp+68h+var_50]
call tofp16
movzx eax, ax
jmp loc_80499
loc_80625:
mov ecx, [rsp+68h+var_54]; jumptable 0000000000080563 case 2
cmp ecx, eax
jge short loc_8068D
movsxd rcx, ecx
mov edx, dword ptr [rsp+68h+var_48]
cdqe
loc_80636:
mov rsi, [r15+38h]
mov [rsi+rcx*4], edx
inc rcx
cmp rax, rcx
jnz short loc_80636
jmp short loc_8068D
loc_80647:
mov ecx, [rsp+68h+var_54]; jumptable 0000000000080563 case 3
cmp ecx, eax
jge short loc_8068D
movsxd rcx, ecx
cdqe
loc_80654:
mov rdx, [rsp+68h+var_48]
mov rsi, [r15+38h]
mov [rsi+rcx*8], rdx
inc rcx
cmp rax, rcx
jnz short loc_80654
jmp short loc_8068D
loc_8066B:
mov ecx, [rsp+68h+var_54]; jumptable 0000000000080563 case 1
cmp ecx, eax
jge short loc_8068D
movsxd rcx, ecx
movzx edx, word ptr [rsp+68h+var_48]
cdqe
loc_8067D:
mov rsi, [r15+38h]
mov [rsi+rcx*2], dx
inc rcx
cmp rax, rcx
jnz short loc_8067D
loc_8068D:
mov [rsp+68h+var_54], ecx
loc_80691:
mov [rsp+68h+var_50], r14
cmp ebx, 0FFFFFFF7h
jb short loc_806A2
mov rax, [rsp+68h+var_50]
inc dword ptr [rax]
loc_806A2:
mov rax, 0FFFFFFFF00000000h
and rax, r14
mov ebp, r14d
jmp loc_805E3
loc_806B7:
cvtsd2ss xmm0, [rsp+68h+var_50]
movd eax, xmm0
jmp loc_80499
loc_806C6:
mov rax, [rsp+68h+var_50]
jmp loc_80499
loc_806D0:
call _abort
| unsigned long long js_typed_array_fill(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
int v15; // ebp
unsigned int v16; // ebx
long long v17; // r15
long long v18; // rdx
long long v19; // rcx
long long v20; // r8
long long v21; // r9
__m128 v22; // xmm4
__m128 v23; // xmm5
long long v24; // rbp
unsigned __int16 v25; // ax
double v26; // rdx
long long v27; // rcx
double v28; // rax
unsigned long long v29; // rdx
long long v30; // rcx
long long v31; // rcx
int v32; // eax
long long v33; // rcx
unsigned long long v34; // rax
int v36; // eax
long long v37; // rcx
int v38; // edx
__int16 v39; // dx
char v40; // [rsp+0h] [rbp-68h]
int v41; // [rsp+14h] [rbp-54h] BYREF
double v42; // [rsp+18h] [rbp-50h] BYREF
double v43; // [rsp+20h] [rbp-48h] BYREF
int v44; // [rsp+2Ch] [rbp-3Ch]
int v45; // [rsp+30h] [rbp-38h] BYREF
int v46; // [rsp+34h] [rbp-34h]
v15 = a4;
v16 = a3;
v42 = *(double *)&a2;
if ( (_DWORD)a3 != -1 || (v17 = *(_QWORD *)&v42, (unsigned __int16)(*(_WORD *)(*(_QWORD *)&v42 + 6LL) - 21) >= 0xCu) )
{
v17 = 0LL;
JS_ThrowTypeError(a1, (long long)"not a TypedArray", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v40);
}
if ( !v17 )
goto LABEL_36;
if ( typed_array_is_oob(v17) )
{
LABEL_6:
v24 = 0LL;
JS_ThrowTypeError(
a1,
(long long)"ArrayBuffer is detached or resized",
v18,
v19,
v20,
v21,
a7,
a8,
a9,
a10,
v22,
v23,
a13,
a14,
v40);
LABEL_37:
v34 = 0LL;
return v34 | v24;
}
v44 = *(_DWORD *)(v17 + 64);
v25 = *(_WORD *)(v17 + 6);
if ( v25 == 21 )
{
v26 = *(double *)a5;
v27 = *(_QWORD *)(a5 + 8);
v42 = *(double *)a5;
if ( (unsigned int)v27 >= 0xFFFFFFF7 )
++**(_DWORD **)&v42;
if ( !(unsigned int)JS_ToUint8ClampFree(a1, &v41, *(long long *)&v26, v27) )
{
*(_QWORD *)&v28 = v41;
LABEL_17:
v43 = v28;
goto LABEL_18;
}
goto LABEL_36;
}
if ( v25 <= 0x1Bu )
{
v29 = *(_QWORD *)a5;
v30 = *(_QWORD *)(a5 + 8);
v42 = *(double *)a5;
if ( (unsigned int)v30 >= 0xFFFFFFF7 )
++**(_DWORD **)&v42;
if ( !(unsigned int)JS_ToInt32Free(a1, &v41, v29, v30) )
{
*(_QWORD *)&v28 = (unsigned int)v41;
goto LABEL_17;
}
LABEL_36:
v24 = 0LL;
goto LABEL_37;
}
if ( v25 > 0x1Du )
{
if ( !(unsigned int)JS_ToFloat64(a1, &v42, *(_DWORD **)a5, *(_QWORD *)(a5 + 8)) )
{
v36 = *(unsigned __int16 *)(v17 + 6);
if ( v36 == 31 )
{
a7.m128_f32[0] = v42;
*(_QWORD *)&v28 = (unsigned int)_mm_cvtsi128_si32((__m128i)a7);
}
else if ( v36 == 30 )
{
a7 = (__m128)*(unsigned long long *)&v42;
*(_QWORD *)&v28 = (unsigned __int16)tofp16(v42);
}
else
{
v28 = v42;
}
goto LABEL_17;
}
goto LABEL_36;
}
v33 = *(_QWORD *)(a5 + 8);
v42 = *(double *)a5;
if ( (unsigned int)v33 >= 0xFFFFFFF7 )
++**(_DWORD **)&v42;
if ( (unsigned int)JS_ToBigInt64Free(a1, &v43) )
goto LABEL_36;
LABEL_18:
v41 = 0;
v46 = v15;
if ( v15 >= 2 )
{
v24 = 0LL;
if ( (unsigned int)JS_ToInt32Clamp(a1, &v41, *(_DWORD **)(a5 + 16), *(_QWORD *)(a5 + 24), 0, v44, v44) )
goto LABEL_37;
}
v45 = v44;
if ( v46 >= 3 )
{
v31 = *(_QWORD *)(a5 + 40);
if ( (_DWORD)v31 != 3 )
{
v24 = 0LL;
if ( (unsigned int)JS_ToInt32Clamp(a1, &v45, *(_DWORD **)(a5 + 32), v31, 0, v44, v44) )
goto LABEL_37;
}
}
if ( typed_array_is_oob(v17) )
goto LABEL_6;
v32 = *(_DWORD *)(v17 + 64);
if ( v45 < v32 )
v32 = v45;
v45 = v32;
if ( (unsigned __int8)typed_array_size_log2[*(unsigned __int16 *)(v17 + 6) - 21] > 3uLL )
abort((const char *)v17);
switch ( typed_array_size_log2[*(unsigned __int16 *)(v17 + 6) - 21] )
{
case 0:
if ( v32 > v41 )
memset(*(_QWORD *)(v17 + 56) + v41, LODWORD(v43), v32 - v41);
goto LABEL_54;
case 1:
LODWORD(v37) = v41;
if ( v41 < v32 )
{
v37 = v41;
v39 = LOWORD(v43);
do
*(_WORD *)(*(_QWORD *)(v17 + 56) + 2 * v37++) = v39;
while ( v32 != v37 );
}
goto LABEL_53;
case 2:
LODWORD(v37) = v41;
if ( v41 < v32 )
{
v37 = v41;
v38 = LODWORD(v43);
do
*(_DWORD *)(*(_QWORD *)(v17 + 56) + 4 * v37++) = v38;
while ( v32 != v37 );
}
goto LABEL_53;
case 3:
LODWORD(v37) = v41;
if ( v41 < v32 )
{
v37 = v41;
do
*(double *)(*(_QWORD *)(v17 + 56) + 8 * v37++) = v43;
while ( v32 != v37 );
}
LABEL_53:
v41 = v37;
LABEL_54:
v42 = *(double *)&a2;
if ( v16 >= 0xFFFFFFF7 )
++**(_DWORD **)&v42;
v34 = a2 & 0xFFFFFFFF00000000LL;
v24 = (unsigned int)a2;
break;
}
return v34 | v24;
}
| js_typed_array_fill:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R13,R8
MOV EBP,ECX
MOV RBX,RDX
MOV R14,RSI
MOV R12,RDI
MOV qword ptr [RSP + 0x18],RSI
CMP EBX,-0x1
JNZ 0x001803d4
MOV R15,qword ptr [RSP + 0x18]
MOVZX EAX,word ptr [R15 + 0x6]
ADD EAX,-0x15
CMP AX,0xc
JC 0x001803e8
LAB_001803d4:
LEA RSI,[0x1a0d09]
XOR R15D,R15D
MOV RDI,R12
XOR EAX,EAX
CALL 0x00121953
LAB_001803e8:
TEST R15,R15
JZ 0x001805da
MOV RDI,R15
CALL 0x00138ab0
TEST EAX,EAX
JZ 0x00180415
LAB_001803fd:
LEA RSI,[0x1a0d1a]
XOR EBP,EBP
MOV RDI,R12
XOR EAX,EAX
CALL 0x00121953
JMP 0x001805dc
LAB_00180415:
MOV EAX,dword ptr [R15 + 0x40]
MOV dword ptr [RSP + 0x2c],EAX
MOVZX EAX,word ptr [R15 + 0x6]
CMP AX,0x15
JNZ 0x0018045d
MOV RDX,qword ptr [R13]
MOV RCX,qword ptr [R13 + 0x8]
MOV qword ptr [RSP + 0x18],RDX
CMP ECX,-0x9
JC 0x00180441
MOV RAX,qword ptr [RSP + 0x18]
INC dword ptr [RAX]
LAB_00180441:
LEA RSI,[RSP + 0x14]
MOV RDI,R12
CALL 0x0013cff8
TEST EAX,EAX
JNZ 0x001805da
MOVSXD RAX,dword ptr [RSP + 0x14]
JMP 0x00180499
LAB_0018045d:
CMP AX,0x1b
JA 0x0018058c
MOV RDX,qword ptr [R13]
MOV RCX,qword ptr [R13 + 0x8]
MOV qword ptr [RSP + 0x18],RDX
CMP ECX,-0x9
JC 0x00180480
MOV RAX,qword ptr [RSP + 0x18]
INC dword ptr [RAX]
LAB_00180480:
LEA RSI,[RSP + 0x14]
MOV RDI,R12
CALL 0x00126daf
TEST EAX,EAX
JNZ 0x001805da
MOV EAX,dword ptr [RSP + 0x14]
LAB_00180499:
MOV qword ptr [RSP + 0x20],RAX
LAB_0018049e:
MOV dword ptr [RSP + 0x14],0x0
MOV dword ptr [RSP + 0x34],EBP
CMP EBP,0x2
JL 0x001804da
MOV RDX,qword ptr [R13 + 0x10]
MOV RCX,qword ptr [R13 + 0x18]
MOV R9D,dword ptr [RSP + 0x2c]
MOV dword ptr [RSP],R9D
LEA RSI,[RSP + 0x14]
XOR EBP,EBP
MOV RDI,R12
XOR R8D,R8D
CALL 0x00126b42
TEST EAX,EAX
JNZ 0x001805dc
LAB_001804da:
MOV EAX,dword ptr [RSP + 0x2c]
MOV dword ptr [RSP + 0x30],EAX
CMP dword ptr [RSP + 0x34],0x3
JL 0x00180519
MOV RCX,qword ptr [R13 + 0x28]
CMP ECX,0x3
JZ 0x00180519
MOV RDX,qword ptr [R13 + 0x20]
MOV R9D,dword ptr [RSP + 0x2c]
MOV dword ptr [RSP],R9D
LEA RSI,[RSP + 0x30]
XOR EBP,EBP
MOV RDI,R12
XOR R8D,R8D
CALL 0x00126b42
TEST EAX,EAX
JNZ 0x001805dc
LAB_00180519:
MOV RDI,R15
CALL 0x00138ab0
TEST EAX,EAX
JNZ 0x001803fd
MOV ECX,dword ptr [RSP + 0x30]
MOV EAX,dword ptr [R15 + 0x40]
CMP ECX,EAX
CMOVL EAX,ECX
MOV dword ptr [RSP + 0x30],EAX
MOVZX ECX,word ptr [R15 + 0x6]
LEA RDX,[0x19c1cf]
MOVZX ECX,byte ptr [RCX + RDX*0x1 + -0x15]
CMP RCX,0x3
JA 0x001806d0
LEA RDX,[0x19c07c]
MOVSXD RCX,dword ptr [RDX + RCX*0x4]
ADD RCX,RDX
switchD:
JMP RCX
caseD_0:
MOVSXD RCX,dword ptr [RSP + 0x14]
CMP EAX,ECX
JLE 0x00180691
MOV RDI,RCX
ADD RDI,qword ptr [R15 + 0x38]
SUB EAX,ECX
MOVSXD RDX,EAX
MOV ESI,dword ptr [RSP + 0x20]
CALL 0x0010e340
JMP 0x00180691
LAB_0018058c:
CMP AX,0x1d
JA 0x001805c1
MOV RDX,qword ptr [R13]
MOV RCX,qword ptr [R13 + 0x8]
MOV qword ptr [RSP + 0x18],RDX
CMP ECX,-0x9
JC 0x001805ab
MOV RAX,qword ptr [RSP + 0x18]
INC dword ptr [RAX]
LAB_001805ab:
LEA RSI,[RSP + 0x20]
MOV RDI,R12
CALL 0x001277c4
TEST EAX,EAX
JNZ 0x001805da
JMP 0x0018049e
LAB_001805c1:
MOV RDX,qword ptr [R13]
MOV RCX,qword ptr [R13 + 0x8]
LEA RSI,[RSP + 0x18]
MOV RDI,R12
CALL 0x00126a6d
TEST EAX,EAX
JZ 0x001805fb
LAB_001805da:
XOR EBP,EBP
LAB_001805dc:
XOR EAX,EAX
MOV EBX,0x6
LAB_001805e3:
OR RBP,RAX
MOV RAX,RBP
MOV RDX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001805fb:
MOVZX EAX,word ptr [R15 + 0x6]
CMP EAX,0x1f
JZ 0x001806b7
CMP EAX,0x1e
JNZ 0x001806c6
MOVSD XMM0,qword ptr [RSP + 0x18]
CALL 0x0013d08a
MOVZX EAX,AX
JMP 0x00180499
caseD_2:
MOV ECX,dword ptr [RSP + 0x14]
CMP ECX,EAX
JGE 0x0018068d
MOVSXD RCX,ECX
MOV EDX,dword ptr [RSP + 0x20]
CDQE
LAB_00180636:
MOV RSI,qword ptr [R15 + 0x38]
MOV dword ptr [RSI + RCX*0x4],EDX
INC RCX
CMP RAX,RCX
JNZ 0x00180636
JMP 0x0018068d
caseD_3:
MOV ECX,dword ptr [RSP + 0x14]
CMP ECX,EAX
JGE 0x0018068d
MOVSXD RCX,ECX
CDQE
LAB_00180654:
MOV RDX,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [R15 + 0x38]
MOV qword ptr [RSI + RCX*0x8],RDX
INC RCX
CMP RAX,RCX
JNZ 0x00180654
JMP 0x0018068d
caseD_1:
MOV ECX,dword ptr [RSP + 0x14]
CMP ECX,EAX
JGE 0x0018068d
MOVSXD RCX,ECX
MOVZX EDX,word ptr [RSP + 0x20]
CDQE
LAB_0018067d:
MOV RSI,qword ptr [R15 + 0x38]
MOV word ptr [RSI + RCX*0x2],DX
INC RCX
CMP RAX,RCX
JNZ 0x0018067d
LAB_0018068d:
MOV dword ptr [RSP + 0x14],ECX
LAB_00180691:
MOV qword ptr [RSP + 0x18],R14
CMP EBX,-0x9
JC 0x001806a2
MOV RAX,qword ptr [RSP + 0x18]
INC dword ptr [RAX]
LAB_001806a2:
MOV RAX,-0x100000000
AND RAX,R14
MOV EBP,R14D
JMP 0x001805e3
LAB_001806b7:
CVTSD2SS XMM0,qword ptr [RSP + 0x18]
MOVD EAX,XMM0
JMP 0x00180499
LAB_001806c6:
MOV RAX,qword ptr [RSP + 0x18]
JMP 0x00180499
default:
CALL 0x0010e090
|
int1 [16]
js_typed_array_fill(int8 param_1,int *param_2,int8 param_3,int param_4,
int8 *param_5)
{
ushort uVar1;
int iVar2;
ulong uVar3;
long lVar4;
ulong uVar5;
int *piVar6;
int1 auVar7 [16];
uint local_54;
int *local_50;
int *local_48;
int local_3c;
int local_38;
int local_34;
local_50 = param_2;
if (((uint)param_3 != 0xffffffff) ||
(piVar6 = param_2, 0xb < (ushort)(*(short *)((long)param_2 + 6) - 0x15U))) {
piVar6 = (int *)0x0;
JS_ThrowTypeError(param_1,"not a TypedArray");
}
if (piVar6 != (int *)0x0) {
iVar2 = typed_array_is_oob(piVar6);
if (iVar2 == 0) {
local_3c = piVar6[0x10];
uVar1 = *(ushort *)((long)piVar6 + 6);
if (uVar1 == 0x15) {
local_50 = (int *)*param_5;
if (0xfffffff6 < (uint)param_5[1]) {
*local_50 = *local_50 + 1;
}
iVar2 = JS_ToUint8ClampFree(param_1,&local_54);
if (iVar2 == 0) {
local_48 = (int *)(long)(int)local_54;
goto LAB_0018049e;
}
}
else if (uVar1 < 0x1c) {
local_50 = (int *)*param_5;
if (0xfffffff6 < (uint)param_5[1]) {
*local_50 = *local_50 + 1;
}
iVar2 = JS_ToInt32Free(param_1,&local_54);
if (iVar2 == 0) {
local_48 = (int *)(ulong)local_54;
goto LAB_0018049e;
}
}
else if (uVar1 < 0x1e) {
local_50 = (int *)*param_5;
if (0xfffffff6 < (uint)param_5[1]) {
*local_50 = *local_50 + 1;
}
iVar2 = JS_ToBigInt64Free(param_1,&local_48);
if (iVar2 == 0) {
LAB_0018049e:
local_54 = 0;
local_34 = param_4;
if (((param_4 < 2) ||
(iVar2 = JS_ToInt32Clamp(param_1,&local_54,param_5[2],param_5[3],0,local_3c,local_3c),
iVar2 == 0)) &&
((local_38 = local_3c, local_34 < 3 ||
(((int)param_5[5] == 3 ||
(iVar2 = JS_ToInt32Clamp(param_1,&local_38,param_5[4],param_5[5],0,local_3c,local_3c)
, iVar2 == 0)))))) {
iVar2 = typed_array_is_oob(piVar6);
if (iVar2 == 0) {
iVar2 = piVar6[0x10];
if (local_38 < piVar6[0x10]) {
iVar2 = local_38;
}
local_38 = iVar2;
switch("toSorted"[(ulong)*(ushort *)((long)piVar6 + 6) + 6]) {
case '\0':
if ((int)local_54 < iVar2) {
memset((void *)((long)(int)local_54 + *(long *)(piVar6 + 0xe)),(int)local_48,
(long)(int)(iVar2 - local_54));
}
break;
case '\x01':
if ((int)local_54 < iVar2) {
lVar4 = (long)(int)local_54;
do {
*(int2 *)(*(long *)(piVar6 + 0xe) + lVar4 * 2) = local_48._0_2_;
lVar4 = lVar4 + 1;
} while (iVar2 != lVar4);
}
break;
case '\x02':
if ((int)local_54 < iVar2) {
lVar4 = (long)(int)local_54;
do {
*(int *)(*(long *)(piVar6 + 0xe) + lVar4 * 4) = (int)local_48;
lVar4 = lVar4 + 1;
} while (iVar2 != lVar4);
}
break;
case '\x03':
if ((int)local_54 < iVar2) {
lVar4 = (long)(int)local_54;
do {
*(int **)(*(long *)(piVar6 + 0xe) + lVar4 * 8) = local_48;
lVar4 = lVar4 + 1;
} while (iVar2 != lVar4);
}
break;
default:
/* WARNING: Subroutine does not return */
abort();
}
if (0xfffffff6 < (uint)param_3) {
*param_2 = *param_2 + 1;
}
uVar3 = (ulong)param_2 & 0xffffffff00000000;
uVar5 = (ulong)param_2 & 0xffffffff;
goto LAB_001805e3;
}
goto LAB_001803fd;
}
}
}
else {
iVar2 = JS_ToFloat64(param_1,&local_50,*param_5,param_5[1]);
if (iVar2 == 0) {
if (*(short *)((long)piVar6 + 6) == 0x1f) {
local_48 = (int *)(ulong)(uint)(float)(double)local_50;
}
else {
local_48 = local_50;
if (*(short *)((long)piVar6 + 6) == 0x1e) {
uVar1 = tofp16((int)local_50);
local_48 = (int *)(ulong)uVar1;
}
}
goto LAB_0018049e;
}
}
}
else {
LAB_001803fd:
JS_ThrowTypeError(param_1,"ArrayBuffer is detached or resized");
}
}
uVar5 = 0;
uVar3 = 0;
param_3 = 6;
LAB_001805e3:
auVar7._8_8_ = param_3;
auVar7._0_8_ = uVar5 | uVar3;
return auVar7;
}
| |
43,874 | google::protobuf::internal::ExtensionSet::AddMessage(google::protobuf::FieldDescriptor const*, google::protobuf::MessageFactory*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set_heavy.cc | MessageLite* ExtensionSet::AddMessage(const FieldDescriptor* descriptor,
MessageFactory* factory) {
Extension* extension = MaybeNewRepeatedExtension(descriptor);
// RepeatedPtrField<Message> does not know how to Add() since it cannot
// allocate an abstract object, so we have to be tricky.
MessageLite* result =
reinterpret_cast<internal::RepeatedPtrFieldBase*>(
extension->repeated_message_value)
->AddFromCleared<GenericTypeHandler<MessageLite> >();
if (result == nullptr) {
const MessageLite* prototype;
if (extension->repeated_message_value->empty()) {
prototype = factory->GetPrototype(descriptor->message_type());
GOOGLE_CHECK(prototype != nullptr);
} else {
prototype = &extension->repeated_message_value->Get(0);
}
result = prototype->New(arena_);
extension->repeated_message_value->AddAllocated(result);
}
return result;
} | O3 | cpp | google::protobuf::internal::ExtensionSet::AddMessage(google::protobuf::FieldDescriptor const*, google::protobuf::MessageFactory*):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
callq 0x621b0
movq %rax, %rbx
movq (%rax), %rax
movq 0x10(%rax), %rcx
testq %rcx, %rcx
je 0x622af
movslq 0x8(%rax), %rdx
cmpl (%rcx), %edx
jge 0x622af
leal 0x1(%rdx), %esi
movl %esi, 0x8(%rax)
movq 0x8(%rcx,%rdx,8), %r13
testq %r13, %r13
jne 0x622f2
movq (%rbx), %rax
cmpl $0x0, 0x8(%rax)
je 0x622bf
movq 0x10(%rax), %rax
movq 0x8(%rax), %rdi
jmp 0x622db
movq %r12, %rdi
callq 0x1e7ba
movq (%r15), %rcx
movq %r15, %rdi
movq %rax, %rsi
callq *0x10(%rcx)
testq %rax, %rax
je 0x62303
movq %rax, %rdi
movq (%r14), %rsi
movq (%rdi), %rax
callq *0x18(%rax)
movq %rax, %r13
movq (%rbx), %rdi
movq %rax, %rsi
callq 0x63b7a
movq %r13, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x5733e(%rip), %rdx # 0xb9648
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x3, %esi
movl $0xfa, %ecx
callq 0x169ca
leaq 0x57390(%rip), %rsi # 0xb96b8
movq %rbx, %rdi
callq 0x164c8
leaq 0x7(%rsp), %rdi
movq %rax, %rsi
callq 0x165a2
leaq 0x8(%rsp), %rdi
callq 0x169e8
jmp 0x62349
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x169e8
movq %rbx, %rdi
callq 0xf570
| _ZN6google8protobuf8internal12ExtensionSet10AddMessageEPKNS0_15FieldDescriptorEPNS0_14MessageFactoryE:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 40h
mov r15, rdx
mov r12, rsi
mov r14, rdi
call _ZN6google8protobuf8internal12ExtensionSet25MaybeNewRepeatedExtensionEPKNS0_15FieldDescriptorE; google::protobuf::internal::ExtensionSet::MaybeNewRepeatedExtension(google::protobuf::FieldDescriptor const*)
mov rbx, rax
mov rax, [rax]
mov rcx, [rax+10h]
test rcx, rcx
jz short loc_622AF
movsxd rdx, dword ptr [rax+8]
cmp edx, [rcx]
jge short loc_622AF
lea esi, [rdx+1]
mov [rax+8], esi
mov r13, [rcx+rdx*8+8]
test r13, r13
jnz short loc_622F2
mov rax, [rbx]
loc_622AF:
cmp dword ptr [rax+8], 0
jz short loc_622BF
mov rax, [rax+10h]
mov rdi, [rax+8]
jmp short loc_622DB
loc_622BF:
mov rdi, r12; this
call _ZNK6google8protobuf15FieldDescriptor12message_typeEv; google::protobuf::FieldDescriptor::message_type(void)
mov rcx, [r15]
mov rdi, r15
mov rsi, rax
call qword ptr [rcx+10h]
test rax, rax
jz short loc_62303
mov rdi, rax
loc_622DB:
mov rsi, [r14]
mov rax, [rdi]
call qword ptr [rax+18h]
mov r13, rax
mov rdi, [rbx]
mov rsi, rax
call _ZN6google8protobuf8internal20RepeatedPtrFieldBase20AddAllocatedInternalINS0_16RepeatedPtrFieldINS0_11MessageLiteEE11TypeHandlerEEEvPNT_4TypeESt17integral_constantIbLb0EE; google::protobuf::internal::RepeatedPtrFieldBase::AddAllocatedInternal<google::protobuf::RepeatedPtrField<google::protobuf::MessageLite>::TypeHandler>(google::protobuf::RepeatedPtrField<google::protobuf::MessageLite>::TypeHandler::Type *,std::integral_constant<bool,false>)
loc_622F2:
mov rax, r13
add rsp, 40h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_62303:
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github2025/aimrt_"...
lea rbx, [rsp+68h+var_60]
mov rdi, rbx
mov esi, 3
mov ecx, 0FAh
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
lea rsi, aCheckFailedPro; "CHECK failed: prototype != nullptr: "
mov rdi, rbx
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
lea rdi, [rsp+68h+var_61]
mov rsi, rax
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
lea rdi, [rsp+68h+var_60]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
jmp short $+2
loc_62349:
mov rbx, rax
lea rdi, [rsp+68h+var_60]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
mov rdi, rbx
call __Unwind_Resume
| long long google::protobuf::internal::ExtensionSet::AddMessage(
google::protobuf::Arena **this,
const google::protobuf::FieldDescriptor *a2,
google::protobuf::MessageFactory *a3)
{
google::protobuf::internal::ExtensionSet::Extension *v5; // rbx
long long v6; // rax
_DWORD *v7; // rcx
long long v8; // rdx
long long v9; // r13
long long v10; // rdi
long long v11; // rax
long long v12; // rax
google::protobuf::internal::LogMessage *v14; // rsi
long long v15; // rax
long long v16; // rbx
char v17; // [rsp+7h] [rbp-61h] BYREF
_BYTE v18[96]; // [rsp+8h] [rbp-60h] BYREF
v5 = google::protobuf::internal::ExtensionSet::MaybeNewRepeatedExtension(this, a2);
v6 = *(_QWORD *)v5;
v7 = *(_DWORD **)(*(_QWORD *)v5 + 16LL);
if ( v7 )
{
v8 = *(int *)(v6 + 8);
if ( (int)v8 < *v7 )
{
*(_DWORD *)(v6 + 8) = v8 + 1;
v9 = *(_QWORD *)&v7[2 * v8 + 2];
if ( v9 )
return v9;
v6 = *(_QWORD *)v5;
}
}
if ( *(_DWORD *)(v6 + 8) )
{
v10 = *(_QWORD *)(*(_QWORD *)(v6 + 16) + 8LL);
}
else
{
v11 = google::protobuf::FieldDescriptor::message_type(a2);
v12 = (*(long long ( **)(google::protobuf::MessageFactory *, long long))(*(_QWORD *)a3 + 16LL))(a3, v11);
if ( !v12 )
{
google::protobuf::internal::LogMessage::LogMessage(
(long long)v18,
3,
(long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set_heavy.cc",
250);
v14 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<(
(long long)v18,
(long long)"CHECK failed: prototype != nullptr: ");
google::protobuf::internal::LogFinisher::operator=((long long)&v17, v14);
google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v18);
v16 = v15;
google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v18);
_Unwind_Resume(v16);
}
v10 = v12;
}
v9 = (*(long long ( **)(long long, google::protobuf::Arena *))(*(_QWORD *)v10 + 24LL))(v10, *this);
google::protobuf::internal::RepeatedPtrFieldBase::AddAllocatedInternal<google::protobuf::RepeatedPtrField<google::protobuf::MessageLite>::TypeHandler>(
*(_QWORD *)v5,
v9);
return v9;
}
| AddMessage:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R15,RDX
MOV R12,RSI
MOV R14,RDI
CALL 0x001621b0
MOV RBX,RAX
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x10]
TEST RCX,RCX
JZ 0x001622af
MOVSXD RDX,dword ptr [RAX + 0x8]
CMP EDX,dword ptr [RCX]
JGE 0x001622af
LEA ESI,[RDX + 0x1]
MOV dword ptr [RAX + 0x8],ESI
MOV R13,qword ptr [RCX + RDX*0x8 + 0x8]
TEST R13,R13
JNZ 0x001622f2
MOV RAX,qword ptr [RBX]
LAB_001622af:
CMP dword ptr [RAX + 0x8],0x0
JZ 0x001622bf
MOV RAX,qword ptr [RAX + 0x10]
MOV RDI,qword ptr [RAX + 0x8]
JMP 0x001622db
LAB_001622bf:
MOV RDI,R12
CALL 0x0011e7ba
MOV RCX,qword ptr [R15]
MOV RDI,R15
MOV RSI,RAX
CALL qword ptr [RCX + 0x10]
TEST RAX,RAX
JZ 0x00162303
MOV RDI,RAX
LAB_001622db:
MOV RSI,qword ptr [R14]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
MOV R13,RAX
MOV RDI,qword ptr [RBX]
MOV RSI,RAX
CALL 0x00163b7a
LAB_001622f2:
MOV RAX,R13
ADD RSP,0x40
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_00162303:
LEA RDX,[0x1b9648]
LEA RBX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x3
MOV ECX,0xfa
CALL 0x001169ca
LAB_00162321:
LEA RSI,[0x1b96b8]
MOV RDI,RBX
CALL 0x001164c8
LAB_00162330:
LEA RDI,[RSP + 0x7]
MOV RSI,RAX
CALL 0x001165a2
LAB_0016233d:
LEA RDI,[RSP + 0x8]
CALL 0x001169e8
LAB_00162347:
JMP 0x00162349
LAB_00162349:
MOV RBX,RAX
LEA RDI,[RSP + 0x8]
CALL 0x001169e8
MOV RDI,RBX
CALL 0x0010f570
|
/* google::protobuf::internal::ExtensionSet::AddMessage(google::protobuf::FieldDescriptor const*,
google::protobuf::MessageFactory*) */
long __thiscall
google::protobuf::internal::ExtensionSet::AddMessage
(ExtensionSet *this,FieldDescriptor *param_1,MessageFactory *param_2)
{
int iVar1;
int *piVar2;
long *plVar3;
int8 uVar4;
long *plVar5;
long lVar6;
LogMessage *pLVar7;
LogFinisher local_61;
LogMessage local_60 [56];
plVar3 = (long *)MaybeNewRepeatedExtension(this,param_1);
lVar6 = *plVar3;
piVar2 = *(int **)(lVar6 + 0x10);
if (piVar2 != (int *)0x0) {
iVar1 = *(int *)(lVar6 + 8);
if (iVar1 < *piVar2) {
*(int *)(lVar6 + 8) = iVar1 + 1;
if (*(long *)(piVar2 + (long)iVar1 * 2 + 2) != 0) {
return *(long *)(piVar2 + (long)iVar1 * 2 + 2);
}
lVar6 = *plVar3;
}
}
if (*(int *)(lVar6 + 8) == 0) {
uVar4 = FieldDescriptor::message_type(param_1);
plVar5 = (long *)(**(code **)(*(long *)param_2 + 0x10))(param_2,uVar4);
if (plVar5 == (long *)0x0) {
LogMessage::LogMessage
(local_60,3,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set_heavy.cc"
,0xfa);
/* try { // try from 00162321 to 0016232f has its CatchHandler @ 00162349 */
pLVar7 = (LogMessage *)LogMessage::operator<<(local_60,"CHECK failed: prototype != nullptr: ")
;
/* try { // try from 00162330 to 0016233c has its CatchHandler @ 00162347 */
LogFinisher::operator=(&local_61,pLVar7);
uVar4 = LogMessage::~LogMessage(local_60);
/* catch() { ... } // from try @ 00162330 with catch @ 00162347 */
/* catch() { ... } // from try @ 00162321 with catch @ 00162349 */
LogMessage::~LogMessage(local_60);
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar4);
}
}
else {
plVar5 = *(long **)(*(long *)(lVar6 + 0x10) + 8);
}
lVar6 = (**(code **)(*plVar5 + 0x18))(plVar5,*(int8 *)this);
RepeatedPtrFieldBase::
AddAllocatedInternal<google::protobuf::RepeatedPtrField<google::protobuf::MessageLite>::TypeHandler>
(*plVar3,lVar6);
return lVar6;
}
| |
43,875 | js_date_constructor | bluesky950520[P]quickjs/quickjs.c | static JSValue js_date_constructor(JSContext *ctx, JSValue new_target,
int argc, JSValue *argv)
{
// Date(y, mon, d, h, m, s, ms)
JSValue rv;
int i, n;
double a, val;
if (JS_IsUndefined(new_target)) {
/* invoked as function */
argc = 0;
}
n = argc;
if (n == 0) {
val = date_now();
} else if (n == 1) {
JSValue v, dv;
if (JS_VALUE_GET_TAG(argv[0]) == JS_TAG_OBJECT) {
JSObject *p = JS_VALUE_GET_OBJ(argv[0]);
if (p->class_id == JS_CLASS_DATE && JS_IsNumber(p->u.object_data)) {
if (JS_ToFloat64(ctx, &val, p->u.object_data))
return JS_EXCEPTION;
val = time_clip(val);
goto has_val;
}
}
v = JS_ToPrimitive(ctx, argv[0], HINT_NONE);
if (JS_IsString(v)) {
dv = js_Date_parse(ctx, JS_UNDEFINED, 1, &v);
JS_FreeValue(ctx, v);
if (JS_IsException(dv))
return JS_EXCEPTION;
if (JS_ToFloat64Free(ctx, &val, dv))
return JS_EXCEPTION;
} else {
if (JS_ToFloat64Free(ctx, &val, v))
return JS_EXCEPTION;
}
val = time_clip(val);
} else {
double fields[] = { 0, 0, 1, 0, 0, 0, 0 };
if (n > 7)
n = 7;
for(i = 0; i < n; i++) {
if (JS_ToFloat64(ctx, &a, argv[i]))
return JS_EXCEPTION;
if (!isfinite(a))
break;
fields[i] = trunc(a);
if (i == 0 && fields[0] >= 0 && fields[0] < 100)
fields[0] += 1900;
}
val = (i == n) ? set_date_fields(fields, 1) : NAN;
}
has_val:
rv = js_create_from_ctor(ctx, new_target, JS_CLASS_DATE);
if (!JS_IsException(rv))
JS_SetObjectData(ctx, rv, js_float64(val));
if (!JS_IsException(rv) && JS_IsUndefined(new_target)) {
/* invoked as a function, return (new Date()).toString(); */
JSValue s;
s = get_date_string(ctx, rv, 0, NULL, 0x13);
JS_FreeValue(ctx, rv);
rv = s;
}
return rv;
} | O0 | c | js_date_constructor:
subq $0x148, %rsp # imm = 0x148
movq %rsi, 0x128(%rsp)
movq %rdx, 0x130(%rsp)
movq %rdi, 0x120(%rsp)
movl %ecx, 0x11c(%rsp)
movq %r8, 0x110(%rsp)
movq 0x128(%rsp), %rdi
movq 0x130(%rsp), %rsi
callq 0x2cfa0
cmpl $0x0, %eax
je 0x53f03
movl $0x0, 0x11c(%rsp)
movl 0x11c(%rsp), %eax
movl %eax, 0xf8(%rsp)
cmpl $0x0, 0xf8(%rsp)
jne 0x53f33
callq 0x984f0
cvtsi2sd %rax, %xmm0
movsd %xmm0, 0xe8(%rsp)
jmp 0x54368
cmpl $0x1, 0xf8(%rsp)
jne 0x541d7
movq 0x110(%rsp), %rax
movq 0x8(%rax), %rax
cmpl $-0x1, %eax
jne 0x53ff8
movq 0x110(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
movzwl 0x6(%rax), %eax
cmpl $0xa, %eax
jne 0x53ff6
movq 0xc0(%rsp), %rax
movq 0x30(%rax), %rdi
movq 0x38(%rax), %rsi
callq 0x4f410
cmpl $0x0, %eax
je 0x53ff6
movq 0x120(%rsp), %rdi
movq 0xc0(%rsp), %rax
movq 0x30(%rax), %rdx
movq 0x38(%rax), %rcx
leaq 0xe8(%rsp), %rsi
callq 0x372c0
cmpl $0x0, %eax
je 0x53fda
movl $0x0, 0x138(%rsp)
movq $0x6, 0x140(%rsp)
jmp 0x544e8
movsd 0xe8(%rsp), %xmm0
callq 0x53e40
movsd %xmm0, 0xe8(%rsp)
jmp 0x5436a
jmp 0x53ff8
movq 0x120(%rsp), %rdi
movq 0x110(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movl $0x2, %ecx
callq 0x382c0
movq %rax, 0xb0(%rsp)
movq %rdx, 0xb8(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0xe0(%rsp)
movq 0xd8(%rsp), %rdi
movq 0xe0(%rsp), %rsi
callq 0x4f450
cmpl $0x0, %eax
je 0x54173
movq 0x120(%rsp), %rdi
movl $0x0, 0x90(%rsp)
movq $0x3, 0x98(%rsp)
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
movl $0x1, %ecx
leaq 0xd8(%rsp), %r8
callq 0x98510
movq %rax, 0xa0(%rsp)
movq %rdx, 0xa8(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0xd0(%rsp)
movq 0x120(%rsp), %rdi
movq 0xd8(%rsp), %rsi
movq 0xe0(%rsp), %rdx
callq 0x229d0
movq 0xc8(%rsp), %rdi
movq 0xd0(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0x5412b
movl $0x0, 0x138(%rsp)
movq $0x6, 0x140(%rsp)
jmp 0x544e8
movq 0x120(%rsp), %rdi
movq 0xc8(%rsp), %rdx
movq 0xd0(%rsp), %rcx
leaq 0xe8(%rsp), %rsi
callq 0x37330
cmpl $0x0, %eax
je 0x54171
movl $0x0, 0x138(%rsp)
movq $0x6, 0x140(%rsp)
jmp 0x544e8
jmp 0x541bb
movq 0x120(%rsp), %rdi
movq 0xd8(%rsp), %rdx
movq 0xe0(%rsp), %rcx
leaq 0xe8(%rsp), %rsi
callq 0x37330
cmpl $0x0, %eax
je 0x541b9
movl $0x0, 0x138(%rsp)
movq $0x6, 0x140(%rsp)
jmp 0x544e8
jmp 0x541bb
movsd 0xe8(%rsp), %xmm0
callq 0x53e40
movsd %xmm0, 0xe8(%rsp)
jmp 0x54366
leaq 0x50(%rsp), %rdi
xorl %esi, %esi
movl $0x38, %edx
callq 0xe340
movsd 0xb7ec0(%rip), %xmm0 # 0x10c0b0
movsd %xmm0, 0x60(%rsp)
cmpl $0x7, 0xf8(%rsp)
jle 0x5420b
movl $0x7, 0xf8(%rsp)
movl $0x0, 0xfc(%rsp)
movl 0xfc(%rsp), %eax
cmpl 0xf8(%rsp), %eax
jge 0x54320
movq 0x120(%rsp), %rdi
movq 0x110(%rsp), %rax
movslq 0xfc(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
leaq 0xf0(%rsp), %rsi
callq 0x372c0
cmpl $0x0, %eax
je 0x5427e
movl $0x0, 0x138(%rsp)
movq $0x6, 0x140(%rsp)
jmp 0x544e8
movsd 0xf0(%rsp), %xmm0
movq %xmm0, %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
andq %rcx, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
subq %rcx, %rax
setl %al
testb $0x1, %al
jne 0x542af
jmp 0x54320
movsd 0xf0(%rsp), %xmm0
callq 0xe140
movslq 0xfc(%rsp), %rax
movsd %xmm0, 0x50(%rsp,%rax,8)
cmpl $0x0, 0xfc(%rsp)
jne 0x54308
movsd 0x50(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x54308
movsd 0xb7e1c(%rip), %xmm0 # 0x10c108
ucomisd 0x50(%rsp), %xmm0
jbe 0x54308
movsd 0xb7e14(%rip), %xmm0 # 0x10c110
addsd 0x50(%rsp), %xmm0
movsd %xmm0, 0x50(%rsp)
jmp 0x5430a
movl 0xfc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xfc(%rsp)
jmp 0x54216
movl 0xfc(%rsp), %eax
cmpl 0xf8(%rsp), %eax
jne 0x54347
leaq 0x50(%rsp), %rdi
movl $0x1, %esi
callq 0x98160
movsd %xmm0, 0x8(%rsp)
jmp 0x54357
movsd 0xb7db1(%rip), %xmm0 # 0x10c100
movsd %xmm0, 0x8(%rsp)
jmp 0x54357
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0xe8(%rsp)
jmp 0x54368
jmp 0x5436a
movq 0x120(%rsp), %rdi
movq 0x128(%rsp), %rsi
movq 0x130(%rsp), %rdx
movl $0xa, %ecx
callq 0x53b40
movq %rax, 0x40(%rsp)
movq %rdx, 0x48(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x100(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x108(%rsp)
movq 0x100(%rsp), %rdi
movq 0x108(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
jne 0x54411
movq 0x120(%rsp), %rax
movq %rax, (%rsp)
movsd 0xe8(%rsp), %xmm0
callq 0x4c3a0
movq (%rsp), %rdi
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x100(%rsp), %rsi
movq 0x108(%rsp), %rdx
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %r8
callq 0x53d50
movq 0x100(%rsp), %rdi
movq 0x108(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
jne 0x544c8
movq 0x128(%rsp), %rdi
movq 0x130(%rsp), %rsi
callq 0x2cfa0
cmpl $0x0, %eax
je 0x544c8
movq 0x120(%rsp), %rdi
movq 0x100(%rsp), %rsi
movq 0x108(%rsp), %rdx
xorl %ecx, %ecx
xorl %eax, %eax
movl %eax, %r8d
movl $0x13, %r9d
callq 0x96870
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x120(%rsp), %rdi
movq 0x100(%rsp), %rsi
movq 0x108(%rsp), %rdx
callq 0x229d0
movq 0x20(%rsp), %rax
movq %rax, 0x100(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x108(%rsp)
movq 0x100(%rsp), %rax
movq %rax, 0x138(%rsp)
movq 0x108(%rsp), %rax
movq %rax, 0x140(%rsp)
movq 0x138(%rsp), %rax
movq 0x140(%rsp), %rdx
addq $0x148, %rsp # imm = 0x148
retq
| js_date_constructor:
sub rsp, 148h
mov [rsp+148h+var_20], rsi
mov [rsp+148h+var_18], rdx
mov [rsp+148h+var_28], rdi
mov [rsp+148h+var_2C], ecx
mov [rsp+148h+var_38], r8
mov rdi, [rsp+148h+var_20]
mov rsi, [rsp+148h+var_18]
call JS_IsUndefined_0
cmp eax, 0
jz short loc_53F03
mov [rsp+148h+var_2C], 0
loc_53F03:
mov eax, [rsp+148h+var_2C]
mov [rsp+148h+var_50], eax
cmp [rsp+148h+var_50], 0
jnz short loc_53F33
call date_now
cvtsi2sd xmm0, rax
movsd [rsp+148h+var_60], xmm0
jmp loc_54368
loc_53F33:
cmp [rsp+148h+var_50], 1
jnz loc_541D7
mov rax, [rsp+148h+var_38]
mov rax, [rax+8]
cmp eax, 0FFFFFFFFh
jnz loc_53FF8
mov rax, [rsp+148h+var_38]
mov rax, [rax]
mov [rsp+148h+var_88], rax
mov rax, [rsp+148h+var_88]
movzx eax, word ptr [rax+6]
cmp eax, 0Ah
jnz short loc_53FF6
mov rax, [rsp+148h+var_88]
mov rdi, [rax+30h]
mov rsi, [rax+38h]
call JS_IsNumber
cmp eax, 0
jz short loc_53FF6
mov rdi, [rsp+148h+var_28]
mov rax, [rsp+148h+var_88]
mov rdx, [rax+30h]
mov rcx, [rax+38h]
lea rsi, [rsp+148h+var_60]
call JS_ToFloat64
cmp eax, 0
jz short loc_53FDA
mov dword ptr [rsp+148h+var_10], 0
mov [rsp+148h+var_8], 6
jmp loc_544E8
loc_53FDA:
movsd xmm0, [rsp+148h+var_60]
call time_clip
movsd [rsp+148h+var_60], xmm0
jmp loc_5436A
loc_53FF6:
jmp short $+2
loc_53FF8:
mov rdi, [rsp+148h+var_28]
mov rax, [rsp+148h+var_38]
mov rsi, [rax]
mov rdx, [rax+8]
mov ecx, 2
call JS_ToPrimitive
mov [rsp+148h+var_98], rax
mov [rsp+148h+var_90], rdx
mov rax, [rsp+148h+var_98]
mov [rsp+148h+var_70], rax
mov rax, [rsp+148h+var_90]
mov [rsp+148h+var_68], rax
mov rdi, [rsp+148h+var_70]
mov rsi, [rsp+148h+var_68]
call JS_IsString_0
cmp eax, 0
jz loc_54173
mov rdi, [rsp+148h+var_28]
mov dword ptr [rsp+148h+var_B8], 0
mov [rsp+148h+var_B0], 3
mov rsi, [rsp+148h+var_B8]
mov rdx, [rsp+148h+var_B0]
mov ecx, 1
lea r8, [rsp+148h+var_70]
call js_Date_parse
mov [rsp+148h+var_A8], rax
mov [rsp+148h+var_A0], rdx
mov rax, [rsp+148h+var_A8]
mov [rsp+148h+var_80], rax
mov rax, [rsp+148h+var_A0]
mov [rsp+148h+var_78], rax
mov rdi, [rsp+148h+var_28]
mov rsi, [rsp+148h+var_70]
mov rdx, [rsp+148h+var_68]
call JS_FreeValue
mov rdi, [rsp+148h+var_80]
mov rsi, [rsp+148h+var_78]
call JS_IsException_1
cmp eax, 0
jz short loc_5412B
mov dword ptr [rsp+148h+var_10], 0
mov [rsp+148h+var_8], 6
jmp loc_544E8
loc_5412B:
mov rdi, [rsp+148h+var_28]
mov rdx, [rsp+148h+var_80]
mov rcx, [rsp+148h+var_78]
lea rsi, [rsp+148h+var_60]
call JS_ToFloat64Free
cmp eax, 0
jz short loc_54171
mov dword ptr [rsp+148h+var_10], 0
mov [rsp+148h+var_8], 6
jmp loc_544E8
loc_54171:
jmp short loc_541BB
loc_54173:
mov rdi, [rsp+148h+var_28]
mov rdx, [rsp+148h+var_70]
mov rcx, [rsp+148h+var_68]
lea rsi, [rsp+148h+var_60]
call JS_ToFloat64Free
cmp eax, 0
jz short loc_541B9
mov dword ptr [rsp+148h+var_10], 0
mov [rsp+148h+var_8], 6
jmp loc_544E8
loc_541B9:
jmp short $+2
loc_541BB:
movsd xmm0, [rsp+148h+var_60]
call time_clip
movsd [rsp+148h+var_60], xmm0
jmp loc_54366
loc_541D7:
lea rdi, [rsp+148h+var_F8]
xor esi, esi
mov edx, 38h ; '8'
call _memset
movsd xmm0, cs:qword_10C0B0
movsd [rsp+148h+var_E8], xmm0
cmp [rsp+148h+var_50], 7
jle short loc_5420B
mov [rsp+148h+var_50], 7
loc_5420B:
mov [rsp+148h+var_4C], 0
loc_54216:
mov eax, [rsp+148h+var_4C]
cmp eax, [rsp+148h+var_50]
jge loc_54320
mov rdi, [rsp+148h+var_28]
mov rax, [rsp+148h+var_38]
movsxd rcx, [rsp+148h+var_4C]
shl rcx, 4
add rax, rcx
mov rdx, [rax]
mov rcx, [rax+8]
lea rsi, [rsp+148h+var_58]
call JS_ToFloat64
cmp eax, 0
jz short loc_5427E
mov dword ptr [rsp+148h+var_10], 0
mov [rsp+148h+var_8], 6
jmp loc_544E8
loc_5427E:
movsd xmm0, [rsp+148h+var_58]
movq rax, xmm0
mov rcx, 7FFFFFFFFFFFFFFFh
and rax, rcx
mov rcx, 7FF0000000000000h
sub rax, rcx
setl al
test al, 1
jnz short loc_542AF
jmp short loc_54320
loc_542AF:
movsd xmm0, [rsp+148h+var_58]
call _trunc
movsxd rax, [rsp+148h+var_4C]
movsd [rsp+rax*8+148h+var_F8], xmm0
cmp [rsp+148h+var_4C], 0
jnz short loc_54308
movsd xmm0, [rsp+148h+var_F8]
xorps xmm1, xmm1
ucomisd xmm0, xmm1
jb short loc_54308
movsd xmm0, cs:qword_10C108
ucomisd xmm0, [rsp+148h+var_F8]
jbe short loc_54308
movsd xmm0, cs:qword_10C110
addsd xmm0, [rsp+148h+var_F8]
movsd [rsp+148h+var_F8], xmm0
loc_54308:
jmp short $+2
loc_5430A:
mov eax, [rsp+148h+var_4C]
add eax, 1
mov [rsp+148h+var_4C], eax
jmp loc_54216
loc_54320:
mov eax, [rsp+148h+var_4C]
cmp eax, [rsp+148h+var_50]
jnz short loc_54347
lea rdi, [rsp+148h+var_F8]
mov esi, 1
call set_date_fields
movsd [rsp+148h+var_140], xmm0
jmp short loc_54357
loc_54347:
movsd xmm0, cs:qword_10C100
movsd [rsp+148h+var_140], xmm0
jmp short $+2
loc_54357:
movsd xmm0, [rsp+148h+var_140]
movsd [rsp+148h+var_60], xmm0
loc_54366:
jmp short $+2
loc_54368:
jmp short $+2
loc_5436A:
mov rdi, [rsp+148h+var_28]
mov rsi, [rsp+148h+var_20]
mov rdx, [rsp+148h+var_18]
mov ecx, 0Ah
call js_create_from_ctor
mov [rsp+148h+var_108], rax
mov [rsp+148h+var_100], rdx
mov rax, [rsp+148h+var_108]
mov [rsp+148h+var_48], rax
mov rax, [rsp+148h+var_100]
mov [rsp+148h+var_40], rax
mov rdi, [rsp+148h+var_48]
mov rsi, [rsp+148h+var_40]
call JS_IsException_1
cmp eax, 0
jnz short loc_54411
mov rax, [rsp+148h+var_28]
mov [rsp+148h+var_148], rax
movsd xmm0, [rsp+148h+var_60]
call js_float64
mov rdi, [rsp+148h+var_148]
mov [rsp+148h+var_118], rax
mov [rsp+148h+var_110], rdx
mov rsi, [rsp+148h+var_48]
mov rdx, [rsp+148h+var_40]
mov rcx, [rsp+148h+var_118]
mov r8, [rsp+148h+var_110]
call JS_SetObjectData
loc_54411:
mov rdi, [rsp+148h+var_48]
mov rsi, [rsp+148h+var_40]
call JS_IsException_1
cmp eax, 0
jnz loc_544C8
mov rdi, [rsp+148h+var_20]
mov rsi, [rsp+148h+var_18]
call JS_IsUndefined_0
cmp eax, 0
jz short loc_544C8
mov rdi, [rsp+148h+var_28]
mov rsi, [rsp+148h+var_48]
mov rdx, [rsp+148h+var_40]
xor ecx, ecx
xor eax, eax
mov r8d, eax
mov r9d, 13h
call get_date_string
mov [rsp+148h+var_138], rax
mov [rsp+148h+var_130], rdx
mov rax, [rsp+148h+var_138]
mov [rsp+148h+var_128], rax
mov rax, [rsp+148h+var_130]
mov [rsp+148h+var_120], rax
mov rdi, [rsp+148h+var_28]
mov rsi, [rsp+148h+var_48]
mov rdx, [rsp+148h+var_40]
call JS_FreeValue
mov rax, [rsp+148h+var_128]
mov [rsp+148h+var_48], rax
mov rax, [rsp+148h+var_120]
mov [rsp+148h+var_40], rax
loc_544C8:
mov rax, [rsp+148h+var_48]
mov [rsp+148h+var_10], rax
mov rax, [rsp+148h+var_40]
mov [rsp+148h+var_8], rax
loc_544E8:
mov rax, [rsp+148h+var_10]
mov rdx, [rsp+148h+var_8]
add rsp, 148h
retn
| long long js_date_constructor(
long long a1,
long long a2,
long long a3,
int a4,
long long *a5,
double a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
long long v13; // rdx
long long v14; // rdx
double v15; // xmm0_8
long long v16; // rdx
__m128 v17; // xmm0
long long v18; // rdx
double v19; // xmm4_8
double v20; // xmm5_8
long long v21; // rdx
long long v23; // [rsp+0h] [rbp-148h]
double v24; // [rsp+8h] [rbp-140h]
long long date_string; // [rsp+10h] [rbp-138h]
long long v26; // [rsp+28h] [rbp-120h]
long long v27; // [rsp+30h] [rbp-118h]
double v28[8]; // [rsp+50h] [rbp-F8h] BYREF
long long v29; // [rsp+90h] [rbp-B8h]
long long v30; // [rsp+98h] [rbp-B0h]
long long v31; // [rsp+A0h] [rbp-A8h]
long long v32; // [rsp+A8h] [rbp-A0h]
long long v33; // [rsp+B0h] [rbp-98h]
long long v34; // [rsp+B8h] [rbp-90h]
_DWORD *v35; // [rsp+C0h] [rbp-88h]
long long v36; // [rsp+C8h] [rbp-80h]
long long v37; // [rsp+D0h] [rbp-78h]
long long v38; // [rsp+D8h] [rbp-70h] BYREF
long long v39; // [rsp+E0h] [rbp-68h]
double v40; // [rsp+E8h] [rbp-60h] BYREF
double v41; // [rsp+F0h] [rbp-58h] BYREF
int v42; // [rsp+F8h] [rbp-50h]
int i; // [rsp+FCh] [rbp-4Ch]
long long v44; // [rsp+100h] [rbp-48h]
long long v45; // [rsp+108h] [rbp-40h]
long long *v46; // [rsp+110h] [rbp-38h]
int v47; // [rsp+11Ch] [rbp-2Ch]
long long v48; // [rsp+120h] [rbp-28h]
long long v49; // [rsp+128h] [rbp-20h]
long long v50; // [rsp+130h] [rbp-18h]
long long v51; // [rsp+138h] [rbp-10h]
long long v52; // [rsp+140h] [rbp-8h]
v49 = a2;
v50 = a3;
v48 = a1;
v47 = a4;
v46 = a5;
if ( JS_IsUndefined_0(a2, a3) )
v47 = 0;
v42 = v47;
if ( v47 )
{
if ( v42 == 1 )
{
if ( (unsigned int)v46[1] == -1
&& (v35 = (_DWORD *)*v46, *((_WORD *)v35 + 3) == 10)
&& JS_IsNumber(*((_QWORD *)v35 + 6), *((_QWORD *)v35 + 7)) )
{
if ( (unsigned int)JS_ToFloat64(v48, (long long)&v40, *((_DWORD **)v35 + 6), *((_QWORD *)v35 + 7)) )
{
LODWORD(v51) = 0;
v52 = 6LL;
return v51;
}
v40 = time_clip(v40);
}
else
{
v33 = JS_ToPrimitive(v48, (_DWORD *)*v46, v46[1], 2u);
v34 = v13;
v38 = v33;
v39 = v13;
if ( JS_IsString_0(v33, v13) )
{
LODWORD(v29) = 0;
v30 = 3LL;
v31 = js_Date_parse(v48, v29, 3LL, 1LL, &v38);
v32 = v14;
v36 = v31;
v37 = v14;
JS_FreeValue(v48, v38, v39);
if ( JS_IsException_1(v31, v37) )
{
LODWORD(v51) = 0;
v52 = 6LL;
return v51;
}
if ( (unsigned int)JS_ToFloat64Free(v48, &v40, v36, v37) )
{
LODWORD(v51) = 0;
v52 = 6LL;
return v51;
}
}
else if ( (unsigned int)JS_ToFloat64Free(v48, &v40, v38, v39) )
{
LODWORD(v51) = 0;
v52 = 6LL;
return v51;
}
v40 = time_clip(v40);
}
}
else
{
memset(v28, 0LL, 56LL);
v28[2] = 1.0;
if ( v42 > 7 )
v42 = 7;
for ( i = 0; i < v42; ++i )
{
if ( (unsigned int)JS_ToFloat64(v48, (long long)&v41, (_DWORD *)v46[2 * i], v46[2 * i + 1]) )
{
LODWORD(v51) = 0;
v52 = 6LL;
return v51;
}
if ( (*(_QWORD *)&v41 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL )
break;
v15 = trunc(v41);
v28[i] = v15;
if ( !i )
{
a7 = 0LL;
if ( v28[0] >= 0.0 && v28[0] < 100.0 )
v28[0] = v28[0] + 1900.0;
}
}
if ( i == v42 )
v24 = set_date_fields(v28, 1LL);
else
v24 = NAN;
v40 = v24;
}
}
else
{
v40 = (double)(int)date_now();
}
v44 = js_create_from_ctor(v48, v49, v50, 10);
v45 = v16;
if ( !JS_IsException_1(v44, v16) )
{
v23 = v48;
v17 = (__m128)*(unsigned long long *)&v40;
v27 = js_float64(v40);
JS_SetObjectData(v23, v44, v45, v27, v18, v17, a7, a8, a9, v19, v20, a12, a13);
}
if ( !JS_IsException_1(v44, v45) && JS_IsUndefined_0(v49, v50) )
{
date_string = get_date_string(v48, v44, v45, 0LL, 0LL, 19LL);
v26 = v21;
JS_FreeValue(v48, v44, v45);
v44 = date_string;
v45 = v26;
}
v51 = v44;
v52 = v45;
return v51;
}
| js_date_constructor:
SUB RSP,0x148
MOV qword ptr [RSP + 0x128],RSI
MOV qword ptr [RSP + 0x130],RDX
MOV qword ptr [RSP + 0x120],RDI
MOV dword ptr [RSP + 0x11c],ECX
MOV qword ptr [RSP + 0x110],R8
MOV RDI,qword ptr [RSP + 0x128]
MOV RSI,qword ptr [RSP + 0x130]
CALL 0x0012cfa0
CMP EAX,0x0
JZ 0x00153f03
MOV dword ptr [RSP + 0x11c],0x0
LAB_00153f03:
MOV EAX,dword ptr [RSP + 0x11c]
MOV dword ptr [RSP + 0xf8],EAX
CMP dword ptr [RSP + 0xf8],0x0
JNZ 0x00153f33
CALL 0x001984f0
CVTSI2SD XMM0,RAX
MOVSD qword ptr [RSP + 0xe8],XMM0
JMP 0x00154368
LAB_00153f33:
CMP dword ptr [RSP + 0xf8],0x1
JNZ 0x001541d7
MOV RAX,qword ptr [RSP + 0x110]
MOV RAX,qword ptr [RAX + 0x8]
CMP EAX,-0x1
JNZ 0x00153ff8
MOV RAX,qword ptr [RSP + 0x110]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0xc0],RAX
MOV RAX,qword ptr [RSP + 0xc0]
MOVZX EAX,word ptr [RAX + 0x6]
CMP EAX,0xa
JNZ 0x00153ff6
MOV RAX,qword ptr [RSP + 0xc0]
MOV RDI,qword ptr [RAX + 0x30]
MOV RSI,qword ptr [RAX + 0x38]
CALL 0x0014f410
CMP EAX,0x0
JZ 0x00153ff6
MOV RDI,qword ptr [RSP + 0x120]
MOV RAX,qword ptr [RSP + 0xc0]
MOV RDX,qword ptr [RAX + 0x30]
MOV RCX,qword ptr [RAX + 0x38]
LEA RSI,[RSP + 0xe8]
CALL 0x001372c0
CMP EAX,0x0
JZ 0x00153fda
MOV dword ptr [RSP + 0x138],0x0
MOV qword ptr [RSP + 0x140],0x6
JMP 0x001544e8
LAB_00153fda:
MOVSD XMM0,qword ptr [RSP + 0xe8]
CALL 0x00153e40
MOVSD qword ptr [RSP + 0xe8],XMM0
JMP 0x0015436a
LAB_00153ff6:
JMP 0x00153ff8
LAB_00153ff8:
MOV RDI,qword ptr [RSP + 0x120]
MOV RAX,qword ptr [RSP + 0x110]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
MOV ECX,0x2
CALL 0x001382c0
MOV qword ptr [RSP + 0xb0],RAX
MOV qword ptr [RSP + 0xb8],RDX
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0xd8],RAX
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0xe0],RAX
MOV RDI,qword ptr [RSP + 0xd8]
MOV RSI,qword ptr [RSP + 0xe0]
CALL 0x0014f450
CMP EAX,0x0
JZ 0x00154173
MOV RDI,qword ptr [RSP + 0x120]
MOV dword ptr [RSP + 0x90],0x0
MOV qword ptr [RSP + 0x98],0x3
MOV RSI,qword ptr [RSP + 0x90]
MOV RDX,qword ptr [RSP + 0x98]
MOV ECX,0x1
LEA R8,[RSP + 0xd8]
CALL 0x00198510
MOV qword ptr [RSP + 0xa0],RAX
MOV qword ptr [RSP + 0xa8],RDX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0xc8],RAX
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0xd0],RAX
MOV RDI,qword ptr [RSP + 0x120]
MOV RSI,qword ptr [RSP + 0xd8]
MOV RDX,qword ptr [RSP + 0xe0]
CALL 0x001229d0
MOV RDI,qword ptr [RSP + 0xc8]
MOV RSI,qword ptr [RSP + 0xd0]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x0015412b
MOV dword ptr [RSP + 0x138],0x0
MOV qword ptr [RSP + 0x140],0x6
JMP 0x001544e8
LAB_0015412b:
MOV RDI,qword ptr [RSP + 0x120]
MOV RDX,qword ptr [RSP + 0xc8]
MOV RCX,qword ptr [RSP + 0xd0]
LEA RSI,[RSP + 0xe8]
CALL 0x00137330
CMP EAX,0x0
JZ 0x00154171
MOV dword ptr [RSP + 0x138],0x0
MOV qword ptr [RSP + 0x140],0x6
JMP 0x001544e8
LAB_00154171:
JMP 0x001541bb
LAB_00154173:
MOV RDI,qword ptr [RSP + 0x120]
MOV RDX,qword ptr [RSP + 0xd8]
MOV RCX,qword ptr [RSP + 0xe0]
LEA RSI,[RSP + 0xe8]
CALL 0x00137330
CMP EAX,0x0
JZ 0x001541b9
MOV dword ptr [RSP + 0x138],0x0
MOV qword ptr [RSP + 0x140],0x6
JMP 0x001544e8
LAB_001541b9:
JMP 0x001541bb
LAB_001541bb:
MOVSD XMM0,qword ptr [RSP + 0xe8]
CALL 0x00153e40
MOVSD qword ptr [RSP + 0xe8],XMM0
JMP 0x00154366
LAB_001541d7:
LEA RDI,[RSP + 0x50]
XOR ESI,ESI
MOV EDX,0x38
CALL 0x0010e340
MOVSD XMM0,qword ptr [0x0020c0b0]
MOVSD qword ptr [RSP + 0x60],XMM0
CMP dword ptr [RSP + 0xf8],0x7
JLE 0x0015420b
MOV dword ptr [RSP + 0xf8],0x7
LAB_0015420b:
MOV dword ptr [RSP + 0xfc],0x0
LAB_00154216:
MOV EAX,dword ptr [RSP + 0xfc]
CMP EAX,dword ptr [RSP + 0xf8]
JGE 0x00154320
MOV RDI,qword ptr [RSP + 0x120]
MOV RAX,qword ptr [RSP + 0x110]
MOVSXD RCX,dword ptr [RSP + 0xfc]
SHL RCX,0x4
ADD RAX,RCX
MOV RDX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0xf0]
CALL 0x001372c0
CMP EAX,0x0
JZ 0x0015427e
MOV dword ptr [RSP + 0x138],0x0
MOV qword ptr [RSP + 0x140],0x6
JMP 0x001544e8
LAB_0015427e:
MOVSD XMM0,qword ptr [RSP + 0xf0]
MOVQ RAX,XMM0
MOV RCX,0x7fffffffffffffff
AND RAX,RCX
MOV RCX,0x7ff0000000000000
SUB RAX,RCX
SETL AL
TEST AL,0x1
JNZ 0x001542af
JMP 0x00154320
LAB_001542af:
MOVSD XMM0,qword ptr [RSP + 0xf0]
CALL 0x0010e140
MOVSXD RAX,dword ptr [RSP + 0xfc]
MOVSD qword ptr [RSP + RAX*0x8 + 0x50],XMM0
CMP dword ptr [RSP + 0xfc],0x0
JNZ 0x00154308
MOVSD XMM0,qword ptr [RSP + 0x50]
XORPS XMM1,XMM1
UCOMISD XMM0,XMM1
JC 0x00154308
MOVSD XMM0,qword ptr [0x0020c108]
UCOMISD XMM0,qword ptr [RSP + 0x50]
JBE 0x00154308
MOVSD XMM0,qword ptr [0x0020c110]
ADDSD XMM0,qword ptr [RSP + 0x50]
MOVSD qword ptr [RSP + 0x50],XMM0
LAB_00154308:
JMP 0x0015430a
LAB_0015430a:
MOV EAX,dword ptr [RSP + 0xfc]
ADD EAX,0x1
MOV dword ptr [RSP + 0xfc],EAX
JMP 0x00154216
LAB_00154320:
MOV EAX,dword ptr [RSP + 0xfc]
CMP EAX,dword ptr [RSP + 0xf8]
JNZ 0x00154347
LEA RDI,[RSP + 0x50]
MOV ESI,0x1
CALL 0x00198160
MOVSD qword ptr [RSP + 0x8],XMM0
JMP 0x00154357
LAB_00154347:
MOVSD XMM0,qword ptr [0x0020c100]
MOVSD qword ptr [RSP + 0x8],XMM0
JMP 0x00154357
LAB_00154357:
MOVSD XMM0,qword ptr [RSP + 0x8]
MOVSD qword ptr [RSP + 0xe8],XMM0
LAB_00154366:
JMP 0x00154368
LAB_00154368:
JMP 0x0015436a
LAB_0015436a:
MOV RDI,qword ptr [RSP + 0x120]
MOV RSI,qword ptr [RSP + 0x128]
MOV RDX,qword ptr [RSP + 0x130]
MOV ECX,0xa
CALL 0x00153b40
MOV qword ptr [RSP + 0x40],RAX
MOV qword ptr [RSP + 0x48],RDX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x100],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x108],RAX
MOV RDI,qword ptr [RSP + 0x100]
MOV RSI,qword ptr [RSP + 0x108]
CALL 0x00122a00
CMP EAX,0x0
JNZ 0x00154411
MOV RAX,qword ptr [RSP + 0x120]
MOV qword ptr [RSP],RAX
MOVSD XMM0,qword ptr [RSP + 0xe8]
CALL 0x0014c3a0
MOV RDI,qword ptr [RSP]
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x38],RDX
MOV RSI,qword ptr [RSP + 0x100]
MOV RDX,qword ptr [RSP + 0x108]
MOV RCX,qword ptr [RSP + 0x30]
MOV R8,qword ptr [RSP + 0x38]
CALL 0x00153d50
LAB_00154411:
MOV RDI,qword ptr [RSP + 0x100]
MOV RSI,qword ptr [RSP + 0x108]
CALL 0x00122a00
CMP EAX,0x0
JNZ 0x001544c8
MOV RDI,qword ptr [RSP + 0x128]
MOV RSI,qword ptr [RSP + 0x130]
CALL 0x0012cfa0
CMP EAX,0x0
JZ 0x001544c8
MOV RDI,qword ptr [RSP + 0x120]
MOV RSI,qword ptr [RSP + 0x100]
MOV RDX,qword ptr [RSP + 0x108]
XOR ECX,ECX
XOR EAX,EAX
MOV R8D,EAX
MOV R9D,0x13
CALL 0x00196870
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,qword ptr [RSP + 0x120]
MOV RSI,qword ptr [RSP + 0x100]
MOV RDX,qword ptr [RSP + 0x108]
CALL 0x001229d0
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x100],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x108],RAX
LAB_001544c8:
MOV RAX,qword ptr [RSP + 0x100]
MOV qword ptr [RSP + 0x138],RAX
MOV RAX,qword ptr [RSP + 0x108]
MOV qword ptr [RSP + 0x140],RAX
LAB_001544e8:
MOV RAX,qword ptr [RSP + 0x138]
MOV RDX,qword ptr [RSP + 0x140]
ADD RSP,0x148
RET
|
int1 [16]
js_date_constructor(int8 param_1,int8 param_2,int8 param_3,int param_4,
long *param_5)
{
int8 uVar1;
int iVar2;
long lVar3;
double dVar4;
int1 auVar5 [16];
double local_140;
double local_f8 [8];
int4 local_b8;
uint uStack_b4;
int8 local_b0;
int1 local_a8 [16];
int1 local_98 [16];
long local_88;
int1 local_80 [16];
int1 local_70 [16];
double local_60;
double local_58;
int local_50;
int local_4c;
int1 local_48 [16];
long *local_38;
int 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;
iVar2 = JS_IsUndefined(param_2);
if (iVar2 != 0) {
local_2c = 0;
}
local_50 = local_2c;
if (local_2c == 0) {
lVar3 = date_now();
local_60 = (double)lVar3;
}
else if (local_2c == 1) {
if ((((int)local_38[1] == -1) && (local_88 = *local_38, *(short *)(local_88 + 6) == 10)) &&
(iVar2 = JS_IsNumber(*(int8 *)(local_88 + 0x30),*(int8 *)(local_88 + 0x38)),
iVar2 != 0)) {
iVar2 = JS_ToFloat64(local_28,&local_60,*(int8 *)(local_88 + 0x30),
*(int8 *)(local_88 + 0x38));
if (iVar2 != 0) {
local_10 = 0;
local_8 = 6;
goto LAB_001544e8;
}
local_60 = (double)time_clip(local_60);
}
else {
local_98 = JS_ToPrimitive(local_28,*local_38,local_38[1],2);
local_70 = local_98;
iVar2 = JS_IsString(local_98._0_8_,local_98._8_8_);
if (iVar2 == 0) {
iVar2 = JS_ToFloat64Free(local_28,&local_60,local_70._0_8_,local_70._8_8_);
if (iVar2 != 0) {
local_10 = 0;
local_8 = 6;
goto LAB_001544e8;
}
}
else {
local_b8 = 0;
local_b0 = 3;
local_a8 = js_Date_parse(local_28,(ulong)uStack_b4 << 0x20,3,1,local_70);
local_80 = local_a8;
JS_FreeValue(local_28,local_70._0_8_,local_70._8_8_);
iVar2 = JS_IsException(local_80._0_8_,local_80._8_8_);
if (iVar2 != 0) {
local_10 = 0;
local_8 = 6;
goto LAB_001544e8;
}
iVar2 = JS_ToFloat64Free(local_28,&local_60,local_80._0_8_,local_80._8_8_);
if (iVar2 != 0) {
local_10 = 0;
local_8 = 6;
goto LAB_001544e8;
}
}
local_60 = (double)time_clip(local_60);
}
}
else {
memset(local_f8,0,0x38);
local_f8[2] = (double)DAT_0020c0b0;
if (7 < local_50) {
local_50 = 7;
}
for (local_4c = 0; local_4c < local_50; local_4c = local_4c + 1) {
iVar2 = JS_ToFloat64(local_28,&local_58,local_38[(long)local_4c * 2],
(local_38 + (long)local_4c * 2)[1]);
if (iVar2 != 0) {
local_10 = 0;
local_8 = 6;
goto LAB_001544e8;
}
if (0x7fefffffffffffff < (ulong)ABS(local_58)) break;
dVar4 = trunc(local_58);
local_f8[local_4c] = dVar4;
if (((local_4c == 0) && (0.0 <= local_f8[0])) && (local_f8[0] < DAT_0020c108)) {
local_f8[0] = DAT_0020c110 + local_f8[0];
}
}
if (local_4c == local_50) {
local_140 = (double)set_date_fields(local_f8,1);
}
else {
local_140 = DAT_0020c100;
}
local_60 = local_140;
}
local_48 = js_create_from_ctor(local_28,local_20,local_18,10);
iVar2 = JS_IsException(local_48._0_8_,local_48._8_8_);
uVar1 = local_28;
if (iVar2 == 0) {
auVar5 = js_float64(local_60);
JS_SetObjectData(uVar1,local_48._0_8_,local_48._8_8_,auVar5._0_8_,auVar5._8_8_);
}
iVar2 = JS_IsException(local_48._0_8_,local_48._8_8_);
auVar5 = local_48;
if (iVar2 == 0) {
iVar2 = JS_IsUndefined(local_20,local_18);
auVar5 = local_48;
if (iVar2 != 0) {
auVar5 = get_date_string(local_28,local_48._0_8_,local_48._8_8_,0,0,0x13);
JS_FreeValue(local_28,local_48._0_8_,local_48._8_8_);
}
}
local_48._8_8_ = auVar5._8_8_;
local_10 = auVar5._0_4_;
uStack_c = auVar5._4_4_;
local_8 = local_48._8_8_;
LAB_001544e8:
auVar5._4_4_ = uStack_c;
auVar5._0_4_ = local_10;
auVar5._8_8_ = local_8;
return auVar5;
}
| |
43,876 | js_date_constructor | bluesky950520[P]quickjs/quickjs.c | static JSValue js_date_constructor(JSContext *ctx, JSValue new_target,
int argc, JSValue *argv)
{
// Date(y, mon, d, h, m, s, ms)
JSValue rv;
int i, n;
double a, val;
if (JS_IsUndefined(new_target)) {
/* invoked as function */
argc = 0;
}
n = argc;
if (n == 0) {
val = date_now();
} else if (n == 1) {
JSValue v, dv;
if (JS_VALUE_GET_TAG(argv[0]) == JS_TAG_OBJECT) {
JSObject *p = JS_VALUE_GET_OBJ(argv[0]);
if (p->class_id == JS_CLASS_DATE && JS_IsNumber(p->u.object_data)) {
if (JS_ToFloat64(ctx, &val, p->u.object_data))
return JS_EXCEPTION;
val = time_clip(val);
goto has_val;
}
}
v = JS_ToPrimitive(ctx, argv[0], HINT_NONE);
if (JS_IsString(v)) {
dv = js_Date_parse(ctx, JS_UNDEFINED, 1, &v);
JS_FreeValue(ctx, v);
if (JS_IsException(dv))
return JS_EXCEPTION;
if (JS_ToFloat64Free(ctx, &val, dv))
return JS_EXCEPTION;
} else {
if (JS_ToFloat64Free(ctx, &val, v))
return JS_EXCEPTION;
}
val = time_clip(val);
} else {
double fields[] = { 0, 0, 1, 0, 0, 0, 0 };
if (n > 7)
n = 7;
for(i = 0; i < n; i++) {
if (JS_ToFloat64(ctx, &a, argv[i]))
return JS_EXCEPTION;
if (!isfinite(a))
break;
fields[i] = trunc(a);
if (i == 0 && fields[0] >= 0 && fields[0] < 100)
fields[0] += 1900;
}
val = (i == n) ? set_date_fields(fields, 1) : NAN;
}
has_val:
rv = js_create_from_ctor(ctx, new_target, JS_CLASS_DATE);
if (!JS_IsException(rv))
JS_SetObjectData(ctx, rv, js_float64(val));
if (!JS_IsException(rv) && JS_IsUndefined(new_target)) {
/* invoked as a function, return (new Date()).toString(); */
JSValue s;
s = get_date_string(ctx, rv, 0, NULL, 0x13);
JS_FreeValue(ctx, rv);
rv = s;
}
return rv;
} | O1 | c | js_date_constructor:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %r8, %r12
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movl %r15d, %ebp
xorl %eax, %eax
cmpq $0x3, %rbp
cmovnel %ecx, %eax
cmpl $0x1, %eax
je 0x3634b
testl %eax, %eax
jne 0x363a0
callq 0x1bafb
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
addq %rax, %rdx
cvtsi2sd %rdx, %xmm0
jmp 0x364d0
cmpl $-0x1, 0x8(%r12)
jne 0x36528
movq (%r12), %rdx
xorl %r13d, %r13d
movb $0x1, %al
cmpw $0xa, 0x6(%rdx)
jne 0x36520
movq 0x38(%rdx), %rcx
cmpl $0x7, %ecx
je 0x3637c
testl %ecx, %ecx
jne 0x36520
movq 0x30(%rdx), %rdx
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x26a6d
testl %eax, %eax
je 0x364db
movl $0x1, %r13d
jmp 0x3651e
movq %r15, 0x18(%rsp)
pxor %xmm0, %xmm0
movdqa %xmm0, 0x40(%rsp)
movdqa %xmm0, 0x50(%rsp)
movdqa %xmm0, 0x30(%rsp)
movq $0x0, 0x60(%rsp)
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, 0x40(%rsp)
cmpl $0x7, %eax
movl $0x7, %ecx
cmovll %eax, %ecx
testl %eax, %eax
jle 0x3649a
movq %r14, 0x10(%rsp)
movq %rbp, 0x28(%rsp)
movl %ecx, 0x24(%rsp)
movl %ecx, %r14d
addq $0x8, %r12
xorl %r15d, %r15d
leaq 0x70(%rsp), %r13
movabsq $0x7fefffffffffffff, %rbp # imm = 0x7FEFFFFFFFFFFFFF
movq -0x8(%r12), %rdx
movq (%r12), %rcx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x26a6d
testl %eax, %eax
jne 0x366ed
movq 0x70(%rsp), %xmm0
movq %xmm0, %rax
btrq $0x3f, %rax
cmpq %rbp, %rax
jg 0x3649f
callq 0xe140
movq %xmm0, 0x30(%rsp,%r15,8)
testq %r15, %r15
jne 0x3647b
movsd 0x30(%rsp), %xmm0
ucomisd 0x66d9b(%rip), %xmm0 # 0x9d1f8
jb 0x3647b
movsd 0x66d81(%rip), %xmm1 # 0x9d1e8
ucomisd %xmm0, %xmm1
jbe 0x3647b
addsd 0x66d7b(%rip), %xmm0 # 0x9d1f0
movsd %xmm0, 0x30(%rsp)
incq %r15
addq $0x10, %r12
cmpq %r15, %r14
jne 0x3640d
movl 0x24(%rsp), %ecx
movl %ecx, %r15d
movq 0x28(%rsp), %rbp
movq 0x10(%rsp), %r14
jmp 0x364ad
xorl %r15d, %r15d
jmp 0x364ad
movq 0x28(%rsp), %rbp
movq 0x10(%rsp), %r14
movl 0x24(%rsp), %ecx
cmpl %ecx, %r15d
jne 0x364c3
leaq 0x30(%rsp), %rdi
movl $0x1, %esi
callq 0x563b1
jmp 0x364cb
movq 0x66d15(%rip), %xmm0 # 0x9d1e0
movq 0x18(%rsp), %r15
movq %xmm0, 0x8(%rsp)
jmp 0x3664b
movsd 0x8(%rsp), %xmm0
movapd 0x66b77(%rip), %xmm1 # 0x9d060
andpd %xmm0, %xmm1
movsd 0x66ce3(%rip), %xmm2 # 0x9d1d8
ucomisd %xmm1, %xmm2
jae 0x36505
movsd 0x66cdd(%rip), %xmm1 # 0x9d1e0
jmp 0x36512
callq 0xe140
xorpd %xmm1, %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movl $0x2, %r13d
xorl %eax, %eax
testb %al, %al
je 0x36641
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %rsi, 0x30(%rsp)
cmpl $-0x9, %edx
jb 0x36542
movq 0x30(%rsp), %rax
incl (%rax)
movq %rbx, %rdi
movl $0x2, %ecx
callq 0x3d3c3
movq %rax, %r12
movq %rdx, %r13
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
cmpl $-0x7, %r13d
jne 0x365a9
movq %r14, 0x10(%rsp)
movq %rbp, %r14
leaq 0x30(%rsp), %r8
movq %rbx, %rdi
callq 0x5674f
movq %rax, 0x18(%rsp)
movq %rdx, %rbp
movq 0x18(%rbx), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x1ccb2
movl $0x1, %r13d
cmpl $0x6, %ebp
jne 0x365bf
movq %r14, %rbp
movq 0x10(%rsp), %r14
jmp 0x36641
cmpl $0x2, %r13d
ja 0x365d5
xorps %xmm0, %xmm0
cvtsi2sd %r12d, %xmm0
movsd %xmm0, 0x8(%rsp)
jmp 0x36601
cmpl $0x2, %ebp
ja 0x365e6
xorps %xmm0, %xmm0
cvtsi2sdl 0x18(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
jmp 0x365f9
cmpl $0x7, %r13d
jne 0x366f9
movq %r12, 0x8(%rsp)
jmp 0x36601
cmpl $0x7, %ebp
jne 0x3671f
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %r14, %rbp
movq 0x10(%rsp), %r14
movsd 0x8(%rsp), %xmm0
movapd 0x66a51(%rip), %xmm1 # 0x9d060
andpd %xmm0, %xmm1
movsd 0x66bbd(%rip), %xmm2 # 0x9d1d8
ucomisd %xmm1, %xmm2
jae 0x3662b
movsd 0x66bb7(%rip), %xmm1 # 0x9d1e0
jmp 0x36638
callq 0xe140
xorpd %xmm1, %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
xorl %r13d, %r13d
testb $0x1, %r13b
jne 0x366ed
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl $0xa, %ecx
callq 0x36142
movq %rax, %r15
movq %rdx, %r14
movl %r14d, %eax
cmpq $0x6, %rax
je 0x366c8
cmpl $0x6, %eax
sete %r12b
cmpl $0x3, %ebp
setne %bpl
movq 0x8(%rsp), %rcx
movl $0x7, %r8d
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x3624e
orb %r12b, %bpl
jne 0x366c8
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl $0x13, %r9d
callq 0x552b3
movq %rax, %r12
movq %rdx, %r13
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1ccb2
movq %r12, %r15
movq %r13, %r14
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %r15, %rcx
movl %r15d, %eax
orq %rcx, %rax
movq %r14, %rdx
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x6, %r14d
xorl %eax, %eax
xorl %ecx, %ecx
jmp 0x366d8
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r12, %rdx
movq %r13, %rcx
callq 0x3d31b
movl $0x1, %r13d
testl %eax, %eax
jne 0x36641
jmp 0x36601
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq 0x18(%rsp), %rdx
movq %rbp, %rcx
callq 0x3d31b
testl %eax, %eax
movq %r14, %rbp
movq 0x10(%rsp), %r14
jne 0x36641
jmp 0x36601
| js_date_constructor:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov r12, r8
mov r15, rdx
mov r14, rsi
mov rbx, rdi
mov ebp, r15d
xor eax, eax
cmp rbp, 3
cmovnz eax, ecx
cmp eax, 1
jz short loc_3634B
test eax, eax
jnz short loc_363A0
call js__gettimeofday_us
mov rcx, 20C49BA5E353F7CFh
imul rcx
mov rax, rdx
shr rax, 3Fh
sar rdx, 7
add rdx, rax
cvtsi2sd xmm0, rdx
jmp loc_364D0
loc_3634B:
cmp dword ptr [r12+8], 0FFFFFFFFh
jnz loc_36528
mov rdx, [r12]
xor r13d, r13d
mov al, 1
cmp word ptr [rdx+6], 0Ah
jnz loc_36520
mov rcx, [rdx+38h]
cmp ecx, 7
jz short loc_3637C
test ecx, ecx
jnz loc_36520
loc_3637C:
mov rdx, [rdx+30h]
lea rsi, [rsp+0A8h+var_A0]
mov rdi, rbx
call JS_ToFloat64
test eax, eax
jz loc_364DB
mov r13d, 1
jmp loc_3651E
loc_363A0:
mov [rsp+0A8h+var_90], r15
pxor xmm0, xmm0
movdqa [rsp+0A8h+var_68], xmm0
movdqa [rsp+0A8h+var_58], xmm0
movdqa [rsp+0A8h+var_78], xmm0
mov [rsp+0A8h+var_48], 0
mov rcx, 3FF0000000000000h
mov qword ptr [rsp+0A8h+var_68], rcx
cmp eax, 7
mov ecx, 7
cmovl ecx, eax
test eax, eax
jle loc_3649A
mov [rsp+0A8h+var_98], r14
mov [rsp+0A8h+var_80], rbp
mov [rsp+0A8h+var_84], ecx
mov r14d, ecx
add r12, 8
xor r15d, r15d
lea r13, [rsp+0A8h+var_38]
mov rbp, 7FEFFFFFFFFFFFFFh
loc_3640D:
mov rdx, [r12-8]
mov rcx, [r12]
mov rdi, rbx
mov rsi, r13
call JS_ToFloat64
test eax, eax
jnz loc_366ED
movq xmm0, [rsp+0A8h+var_38]
movq rax, xmm0
btr rax, 3Fh ; '?'
cmp rax, rbp
jg short loc_3649F
call _trunc
movq qword ptr [rsp+r15*8+0A8h+var_78], xmm0
test r15, r15
jnz short loc_3647B
movsd xmm0, qword ptr [rsp+0A8h+var_78]
ucomisd xmm0, cs:qword_9D1F8
jb short loc_3647B
movsd xmm1, cs:qword_9D1E8
ucomisd xmm1, xmm0
jbe short loc_3647B
addsd xmm0, cs:qword_9D1F0
movsd qword ptr [rsp+0A8h+var_78], xmm0
loc_3647B:
inc r15
add r12, 10h
cmp r14, r15
jnz short loc_3640D
mov ecx, [rsp+0A8h+var_84]
mov r15d, ecx
mov rbp, [rsp+0A8h+var_80]
mov r14, [rsp+0A8h+var_98]
jmp short loc_364AD
loc_3649A:
xor r15d, r15d
jmp short loc_364AD
loc_3649F:
mov rbp, [rsp+0A8h+var_80]
mov r14, [rsp+0A8h+var_98]
mov ecx, [rsp+0A8h+var_84]
loc_364AD:
cmp r15d, ecx
jnz short loc_364C3
lea rdi, [rsp+0A8h+var_78]
mov esi, 1
call set_date_fields
jmp short loc_364CB
loc_364C3:
movq xmm0, cs:qword_9D1E0
loc_364CB:
mov r15, [rsp+0A8h+var_90]
loc_364D0:
movq [rsp+0A8h+var_A0], xmm0
jmp loc_3664B
loc_364DB:
movsd xmm0, [rsp+0A8h+var_A0]
movapd xmm1, cs:xmmword_9D060
andpd xmm1, xmm0
movsd xmm2, cs:qword_9D1D8
ucomisd xmm2, xmm1
jnb short loc_36505
movsd xmm1, cs:qword_9D1E0
jmp short loc_36512
loc_36505:
call _trunc
xorpd xmm1, xmm1
addsd xmm1, xmm0
loc_36512:
movsd [rsp+0A8h+var_A0], xmm1
mov r13d, 2
loc_3651E:
xor eax, eax
loc_36520:
test al, al
jz loc_36641
loc_36528:
mov rsi, [r12]
mov rdx, [r12+8]
mov qword ptr [rsp+0A8h+var_78], rsi
cmp edx, 0FFFFFFF7h
jb short loc_36542
mov rax, qword ptr [rsp+0A8h+var_78]
inc dword ptr [rax]
loc_36542:
mov rdi, rbx
mov ecx, 2
call JS_ToPrimitiveFree
mov r12, rax
mov r13, rdx
mov qword ptr [rsp+0A8h+var_78], rax
mov qword ptr [rsp+0A8h+var_78+8], rdx
cmp r13d, 0FFFFFFF9h
jnz short loc_365A9
mov [rsp+0A8h+var_98], r14
mov r14, rbp
lea r8, [rsp+0A8h+var_78]
mov rdi, rbx
call js_Date_parse
mov [rsp+0A8h+var_90], rax
mov rbp, rdx
mov rdi, [rbx+18h]
mov rsi, r12
mov rdx, r13
call JS_FreeValueRT
mov r13d, 1
cmp ebp, 6
jnz short loc_365BF
mov rbp, r14
mov r14, [rsp+0A8h+var_98]
jmp loc_36641
loc_365A9:
cmp r13d, 2
ja short loc_365D5
xorps xmm0, xmm0
cvtsi2sd xmm0, r12d
movsd [rsp+0A8h+var_A0], xmm0
jmp short loc_36601
loc_365BF:
cmp ebp, 2
ja short loc_365E6
xorps xmm0, xmm0
cvtsi2sd xmm0, dword ptr [rsp+0A8h+var_90]
movsd [rsp+0A8h+var_A0], xmm0
jmp short loc_365F9
loc_365D5:
cmp r13d, 7
jnz loc_366F9
mov [rsp+0A8h+var_A0], r12
jmp short loc_36601
loc_365E6:
cmp ebp, 7
jnz loc_3671F
mov rax, [rsp+0A8h+var_90]
mov [rsp+0A8h+var_A0], rax
loc_365F9:
mov rbp, r14
mov r14, [rsp+0A8h+var_98]
loc_36601:
movsd xmm0, [rsp+0A8h+var_A0]
movapd xmm1, cs:xmmword_9D060
andpd xmm1, xmm0
movsd xmm2, cs:qword_9D1D8
ucomisd xmm2, xmm1
jnb short loc_3662B
movsd xmm1, cs:qword_9D1E0
jmp short loc_36638
loc_3662B:
call _trunc
xorpd xmm1, xmm1
addsd xmm1, xmm0
loc_36638:
movsd [rsp+0A8h+var_A0], xmm1
xor r13d, r13d
loc_36641:
test r13b, 1
jnz loc_366ED
loc_3664B:
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov ecx, 0Ah
call js_create_from_ctor
mov r15, rax
mov r14, rdx
mov eax, r14d
cmp rax, 6
jz short loc_366C8
cmp eax, 6
setz r12b
cmp ebp, 3
setnz bpl
mov rcx, [rsp+0A8h+var_A0]
mov r8d, 7
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call JS_SetObjectData
or bpl, r12b
jnz short loc_366C8
mov rdi, rbx
mov rsi, r15
mov rdx, r14
mov r9d, 13h
call get_date_string
mov r12, rax
mov r13, rdx
mov rdi, [rbx+18h]
mov rsi, r15
mov rdx, r14
call JS_FreeValueRT
mov r15, r12
mov r14, r13
loc_366C8:
mov rcx, 0FFFFFFFF00000000h
and rcx, r15
mov eax, r15d
loc_366D8:
or rax, rcx
mov rdx, r14
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_366ED:
mov r14d, 6
xor eax, eax
xor ecx, ecx
jmp short loc_366D8
loc_366F9:
lea rsi, [rsp+0A8h+var_A0]
mov rdi, rbx
mov rdx, r12
mov rcx, r13
call __JS_ToFloat64Free
mov r13d, 1
test eax, eax
jnz loc_36641
jmp loc_36601
loc_3671F:
lea rsi, [rsp+0A8h+var_A0]
mov rdi, rbx
mov rdx, [rsp+0A8h+var_90]
mov rcx, rbp
call __JS_ToFloat64Free
test eax, eax
mov rbp, r14
mov r14, [rsp+0A8h+var_98]
jnz loc_36641
jmp loc_36601
| unsigned long long js_date_constructor(
long long a1,
long long a2,
_DWORD *a3,
int a4,
_DWORD *a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
long long v14; // r15
long long v15; // r14
long long v16; // rbx
int v17; // ebp
int v18; // eax
long long v19; // rdx
char v20; // r13
char v21; // al
long long v22; // rcx
long long v23; // rdx
unsigned int v24; // ecx
long long v25; // r14
_QWORD *v26; // r12
long long v27; // r15
long long v28; // rdx
double *v29; // rsi
long long v30; // rdx
__int128 v31; // rax
long long v32; // rcx
__int128 v33; // kr00_16
int v34; // r14d
unsigned int v35; // edx
unsigned int v36; // ebp
long long v37; // rdx
long long v38; // r9
unsigned long long v39; // r15
double v40; // xmm4_8
double v41; // xmm5_8
long long v42; // r14
bool v43; // r12
long long v44; // rcx
long long v45; // r8
long long date_string; // r12
unsigned long long v47; // rcx
long long v48; // rax
char v50; // [rsp+0h] [rbp-A8h]
double v51; // [rsp+8h] [rbp-A0h] BYREF
long long v52; // [rsp+10h] [rbp-98h]
double v53; // [rsp+18h] [rbp-90h]
unsigned int v54; // [rsp+24h] [rbp-84h]
long long v55; // [rsp+28h] [rbp-80h]
_OWORD v56[3]; // [rsp+30h] [rbp-78h] BYREF
long long v57; // [rsp+60h] [rbp-48h]
__m128i v58[3]; // [rsp+70h] [rbp-38h] BYREF
v14 = (long long)a3;
v15 = a2;
v16 = a1;
v17 = (int)a3;
v18 = 0;
if ( (unsigned int)a3 != 3LL )
v18 = a4;
if ( v18 != 1 )
{
if ( !v18 )
{
*(double *)a6.m128_u64 = (double)(int)(js__gettimeofday_us() / 1000);
LABEL_30:
v51 = *(double *)a6.m128_u64;
goto LABEL_56;
}
v53 = *(double *)&a3;
a6 = 0LL;
v56[2] = 0LL;
v56[0] = 0LL;
v57 = 0LL;
v56[1] = 0x3FF0000000000000uLL;
v24 = 7;
if ( v18 < 7 )
v24 = v18;
if ( v18 <= 0 )
{
LODWORD(v27) = 0;
LABEL_26:
if ( (_DWORD)v27 == v24 )
set_date_fields(v56, 1LL);
else
a6 = (__m128)_mm_loadl_epi64((const __m128i *)&qword_9D1E0);
v14 = *(_QWORD *)&v53;
goto LABEL_30;
}
v52 = a2;
v55 = (unsigned int)a3;
v54 = v24;
v25 = v24;
v26 = a5 + 2;
v27 = 0LL;
while ( !(unsigned int)JS_ToFloat64(a1, (double *)v58[0].m128i_i64, (_DWORD *)*(v26 - 1), *v26) )
{
a6 = (__m128)_mm_loadl_epi64(v58);
if ( (a6.m128_u64[0] & 0x7FFFFFFFFFFFFFFFLL) > 0x7FEFFFFFFFFFFFFFLL )
{
v17 = v55;
v15 = v52;
v24 = v54;
goto LABEL_26;
}
*(double *)a6.m128_u64 = trunc(a1, v58, v28);
*((_QWORD *)v56 + v27) = a6.m128_u64[0];
if ( !v27 )
{
a6 = (__m128)*(unsigned long long *)&v56[0];
if ( *(double *)v56 >= 0.0 )
{
a7 = (__m128)0x4059000000000000uLL;
if ( *(double *)v56 < 100.0 )
{
*(double *)a6.m128_u64 = *(double *)v56 + 1900.0;
*(double *)v56 = *(double *)v56 + 1900.0;
}
}
}
++v27;
v26 += 2;
if ( v25 == v27 )
{
v24 = v54;
LODWORD(v27) = v54;
v17 = v55;
v15 = v52;
goto LABEL_26;
}
}
LABEL_61:
v48 = 0LL;
v47 = 0LL;
return v47 | v48;
}
if ( a5[2] != -1 )
goto LABEL_37;
v19 = *(_QWORD *)a5;
v20 = 0;
v21 = 1;
if ( *(_WORD *)(*(_QWORD *)a5 + 6LL) == 10 )
{
v22 = *(_QWORD *)(v19 + 56);
if ( (_DWORD)v22 == 7 || !(_DWORD)v22 )
{
if ( (unsigned int)JS_ToFloat64(a1, &v51, *(_DWORD **)(v19 + 48), v22) )
{
v20 = 1;
}
else
{
a6 = (__m128)*(unsigned long long *)&v51;
a8 = (__m128)0x433EB208C2DC0000uLL;
if ( fabs(v51) <= 8.64e15 )
{
*(double *)a6.m128_u64 = trunc(a1, &v51, v23);
a7 = 0LL;
*(double *)a7.m128_u64 = *(double *)a6.m128_u64 + 0.0;
}
else
{
a7 = (__m128)0x7FF8000000000000uLL;
}
v51 = *(double *)a7.m128_u64;
v20 = 2;
}
v21 = 0;
}
}
if ( v21 )
{
LABEL_37:
v29 = *(double **)a5;
v30 = *((_QWORD *)a5 + 1);
*(_QWORD *)&v56[0] = *(_QWORD *)a5;
if ( (unsigned int)v30 >= 0xFFFFFFF7 )
++**(_DWORD **)&v56[0];
*(_QWORD *)&v31 = JS_ToPrimitiveFree(a1, v29, v30, 2LL);
v33 = v31;
v56[0] = v31;
if ( DWORD2(v31) == -7 )
{
v52 = v15;
v34 = v17;
v53 = COERCE_DOUBLE(js_Date_parse(a1, v29, *((_QWORD *)&v31 + 1), v32, v56));
v36 = v35;
a1 = *(_QWORD *)(a1 + 24);
v29 = (double *)v33;
JS_FreeValueRT(a1, (_DWORD *)v33, *((long long *)&v33 + 1));
v20 = 1;
if ( v36 == 6 )
{
v17 = v34;
v15 = v52;
goto LABEL_55;
}
if ( v36 > 2 )
{
if ( v36 != 7 )
{
v29 = &v51;
a1 = v16;
LODWORD(v31) = _JS_ToFloat64Free(v16, &v51, *(_QWORD *)&v53);
v17 = v34;
v15 = v52;
if ( (_DWORD)v31 )
goto LABEL_55;
goto LABEL_51;
}
v51 = v53;
}
else
{
v51 = (double)SLODWORD(v53);
}
v17 = v34;
v15 = v52;
}
else if ( DWORD2(v31) > 2 )
{
if ( DWORD2(v31) == 7 )
{
v51 = *(double *)&v31;
}
else
{
v29 = &v51;
v20 = 1;
if ( (unsigned int)_JS_ToFloat64Free(a1, &v51, v31) )
goto LABEL_55;
}
}
else
{
v51 = (double)(int)v31;
}
LABEL_51:
a6 = (__m128)*(unsigned long long *)&v51;
a8 = (__m128)0x433EB208C2DC0000uLL;
if ( fabs(v51) <= 8.64e15 )
{
*(double *)a6.m128_u64 = trunc(a1, v29, *((_QWORD *)&v31 + 1));
a7 = 0LL;
*(double *)a7.m128_u64 = *(double *)a6.m128_u64 + 0.0;
}
else
{
a7 = (__m128)0x7FF8000000000000uLL;
}
v51 = *(double *)a7.m128_u64;
v20 = 0;
}
LABEL_55:
if ( (v20 & 1) != 0 )
goto LABEL_61;
LABEL_56:
v39 = js_create_from_ctor(v16, v15, v14, 10);
v42 = v37;
if ( (unsigned int)v37 != 6LL )
{
v43 = (_DWORD)v37 == 6;
JS_SetObjectData(v16, v39, v37, *(_DWORD **)&v51, 7LL, a6, a7, a8, a9, v40, v41, a12, a13, v38, v50);
if ( !v43 && v17 == 3 )
{
date_string = get_date_string(v16, v39, v42, v44, v45, 19LL);
JS_FreeValueRT(*(_QWORD *)(v16 + 24), (_DWORD *)v39, v42);
v39 = date_string;
}
}
v47 = v39 & 0xFFFFFFFF00000000LL;
v48 = (unsigned int)v39;
return v47 | v48;
}
| js_date_constructor:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV R12,R8
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
MOV EBP,R15D
XOR EAX,EAX
CMP RBP,0x3
CMOVNZ EAX,ECX
CMP EAX,0x1
JZ 0x0013634b
TEST EAX,EAX
JNZ 0x001363a0
CALL 0x0011bafb
MOV RCX,0x20c49ba5e353f7cf
IMUL RCX
MOV RAX,RDX
SHR RAX,0x3f
SAR RDX,0x7
ADD RDX,RAX
CVTSI2SD XMM0,RDX
JMP 0x001364d0
LAB_0013634b:
CMP dword ptr [R12 + 0x8],-0x1
JNZ 0x00136528
MOV RDX,qword ptr [R12]
XOR R13D,R13D
MOV AL,0x1
CMP word ptr [RDX + 0x6],0xa
JNZ 0x00136520
MOV RCX,qword ptr [RDX + 0x38]
CMP ECX,0x7
JZ 0x0013637c
TEST ECX,ECX
JNZ 0x00136520
LAB_0013637c:
MOV RDX,qword ptr [RDX + 0x30]
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00126a6d
TEST EAX,EAX
JZ 0x001364db
MOV R13D,0x1
JMP 0x0013651e
LAB_001363a0:
MOV qword ptr [RSP + 0x18],R15
PXOR XMM0,XMM0
MOVDQA xmmword ptr [RSP + 0x40],XMM0
MOVDQA xmmword ptr [RSP + 0x50],XMM0
MOVDQA xmmword ptr [RSP + 0x30],XMM0
MOV qword ptr [RSP + 0x60],0x0
MOV RCX,0x3ff0000000000000
MOV qword ptr [RSP + 0x40],RCX
CMP EAX,0x7
MOV ECX,0x7
CMOVL ECX,EAX
TEST EAX,EAX
JLE 0x0013649a
MOV qword ptr [RSP + 0x10],R14
MOV qword ptr [RSP + 0x28],RBP
MOV dword ptr [RSP + 0x24],ECX
MOV R14D,ECX
ADD R12,0x8
XOR R15D,R15D
LEA R13,[RSP + 0x70]
MOV RBP,0x7fefffffffffffff
LAB_0013640d:
MOV RDX,qword ptr [R12 + -0x8]
MOV RCX,qword ptr [R12]
MOV RDI,RBX
MOV RSI,R13
CALL 0x00126a6d
TEST EAX,EAX
JNZ 0x001366ed
MOVQ XMM0,qword ptr [RSP + 0x70]
MOVQ RAX,XMM0
BTR RAX,0x3f
CMP RAX,RBP
JG 0x0013649f
CALL 0x0010e140
MOVQ qword ptr [RSP + R15*0x8 + 0x30],XMM0
TEST R15,R15
JNZ 0x0013647b
MOVSD XMM0,qword ptr [RSP + 0x30]
UCOMISD XMM0,qword ptr [0x0019d1f8]
JC 0x0013647b
MOVSD XMM1,qword ptr [0x0019d1e8]
UCOMISD XMM1,XMM0
JBE 0x0013647b
ADDSD XMM0,qword ptr [0x0019d1f0]
MOVSD qword ptr [RSP + 0x30],XMM0
LAB_0013647b:
INC R15
ADD R12,0x10
CMP R14,R15
JNZ 0x0013640d
MOV ECX,dword ptr [RSP + 0x24]
MOV R15D,ECX
MOV RBP,qword ptr [RSP + 0x28]
MOV R14,qword ptr [RSP + 0x10]
JMP 0x001364ad
LAB_0013649a:
XOR R15D,R15D
JMP 0x001364ad
LAB_0013649f:
MOV RBP,qword ptr [RSP + 0x28]
MOV R14,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP + 0x24]
LAB_001364ad:
CMP R15D,ECX
JNZ 0x001364c3
LEA RDI,[RSP + 0x30]
MOV ESI,0x1
CALL 0x001563b1
JMP 0x001364cb
LAB_001364c3:
MOVQ XMM0,qword ptr [0x0019d1e0]
LAB_001364cb:
MOV R15,qword ptr [RSP + 0x18]
LAB_001364d0:
MOVQ qword ptr [RSP + 0x8],XMM0
JMP 0x0013664b
LAB_001364db:
MOVSD XMM0,qword ptr [RSP + 0x8]
MOVAPD XMM1,xmmword ptr [0x0019d060]
ANDPD XMM1,XMM0
MOVSD XMM2,qword ptr [0x0019d1d8]
UCOMISD XMM2,XMM1
JNC 0x00136505
MOVSD XMM1,qword ptr [0x0019d1e0]
JMP 0x00136512
LAB_00136505:
CALL 0x0010e140
XORPD XMM1,XMM1
ADDSD XMM1,XMM0
LAB_00136512:
MOVSD qword ptr [RSP + 0x8],XMM1
MOV R13D,0x2
LAB_0013651e:
XOR EAX,EAX
LAB_00136520:
TEST AL,AL
JZ 0x00136641
LAB_00136528:
MOV RSI,qword ptr [R12]
MOV RDX,qword ptr [R12 + 0x8]
MOV qword ptr [RSP + 0x30],RSI
CMP EDX,-0x9
JC 0x00136542
MOV RAX,qword ptr [RSP + 0x30]
INC dword ptr [RAX]
LAB_00136542:
MOV RDI,RBX
MOV ECX,0x2
CALL 0x0013d3c3
MOV R12,RAX
MOV R13,RDX
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x38],RDX
CMP R13D,-0x7
JNZ 0x001365a9
MOV qword ptr [RSP + 0x10],R14
MOV R14,RBP
LEA R8,[RSP + 0x30]
MOV RDI,RBX
CALL 0x0015674f
MOV qword ptr [RSP + 0x18],RAX
MOV RBP,RDX
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R12
MOV RDX,R13
CALL 0x0011ccb2
MOV R13D,0x1
CMP EBP,0x6
JNZ 0x001365bf
MOV RBP,R14
MOV R14,qword ptr [RSP + 0x10]
JMP 0x00136641
LAB_001365a9:
CMP R13D,0x2
JA 0x001365d5
XORPS XMM0,XMM0
CVTSI2SD XMM0,R12D
MOVSD qword ptr [RSP + 0x8],XMM0
JMP 0x00136601
LAB_001365bf:
CMP EBP,0x2
JA 0x001365e6
XORPS XMM0,XMM0
CVTSI2SD XMM0,dword ptr [RSP + 0x18]
MOVSD qword ptr [RSP + 0x8],XMM0
JMP 0x001365f9
LAB_001365d5:
CMP R13D,0x7
JNZ 0x001366f9
MOV qword ptr [RSP + 0x8],R12
JMP 0x00136601
LAB_001365e6:
CMP EBP,0x7
JNZ 0x0013671f
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x8],RAX
LAB_001365f9:
MOV RBP,R14
MOV R14,qword ptr [RSP + 0x10]
LAB_00136601:
MOVSD XMM0,qword ptr [RSP + 0x8]
MOVAPD XMM1,xmmword ptr [0x0019d060]
ANDPD XMM1,XMM0
MOVSD XMM2,qword ptr [0x0019d1d8]
UCOMISD XMM2,XMM1
JNC 0x0013662b
MOVSD XMM1,qword ptr [0x0019d1e0]
JMP 0x00136638
LAB_0013662b:
CALL 0x0010e140
XORPD XMM1,XMM1
ADDSD XMM1,XMM0
LAB_00136638:
MOVSD qword ptr [RSP + 0x8],XMM1
XOR R13D,R13D
LAB_00136641:
TEST R13B,0x1
JNZ 0x001366ed
LAB_0013664b:
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
MOV ECX,0xa
CALL 0x00136142
MOV R15,RAX
MOV R14,RDX
MOV EAX,R14D
CMP RAX,0x6
JZ 0x001366c8
CMP EAX,0x6
SETZ R12B
CMP EBP,0x3
SETNZ BPL
MOV RCX,qword ptr [RSP + 0x8]
MOV R8D,0x7
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL 0x0013624e
OR BPL,R12B
JNZ 0x001366c8
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
MOV R9D,0x13
CALL 0x001552b3
MOV R12,RAX
MOV R13,RDX
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R15
MOV RDX,R14
CALL 0x0011ccb2
MOV R15,R12
MOV R14,R13
LAB_001366c8:
MOV RCX,-0x100000000
AND RCX,R15
MOV EAX,R15D
LAB_001366d8:
OR RAX,RCX
MOV RDX,R14
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001366ed:
MOV R14D,0x6
XOR EAX,EAX
XOR ECX,ECX
JMP 0x001366d8
LAB_001366f9:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
MOV RDX,R12
MOV RCX,R13
CALL 0x0013d31b
MOV R13D,0x1
TEST EAX,EAX
JNZ 0x00136641
JMP 0x00136601
LAB_0013671f:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
MOV RDX,qword ptr [RSP + 0x18]
MOV RCX,RBP
CALL 0x0013d31b
TEST EAX,EAX
MOV RBP,R14
MOV R14,qword ptr [RSP + 0x10]
JNZ 0x00136641
JMP 0x00136601
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int1 [16]
js_date_constructor(long param_1,int8 param_2,double param_3,ulong param_4,long *param_5)
{
bool bVar1;
int iVar2;
int iVar3;
long lVar4;
ulong uVar5;
uint uVar6;
bool bVar7;
int8 uVar8;
ulong uVar9;
double dVar10;
int1 auVar11 [16];
double local_a0;
int8 local_98;
double local_90;
uint local_84;
ulong local_80;
int1 local_78 [16];
int1 local_68 [16];
int1 local_58 [16];
int8 local_48;
double local_38;
iVar3 = SUB84(param_3,0);
uVar9 = 0;
if (((ulong)param_3 & 0xffffffff) != 3) {
uVar9 = param_4 & 0xffffffff;
}
iVar2 = (int)uVar9;
if (iVar2 == 1) {
if ((int)param_5[1] == -1) {
lVar4 = *param_5;
bVar7 = false;
bVar1 = true;
if ((*(short *)(lVar4 + 6) == 10) &&
((iVar2 = (int)*(int8 *)(lVar4 + 0x38), iVar2 == 7 || (iVar2 == 0)))) {
iVar2 = JS_ToFloat64(param_1,&local_a0,*(int8 *)(lVar4 + 0x30));
if (iVar2 == 0) {
dVar10 = DAT_0019d1e0;
if ((double)(_DAT_0019d060 & (ulong)local_a0) <= DAT_0019d1d8) {
dVar10 = trunc(local_a0);
dVar10 = dVar10 + 0.0;
}
bVar7 = false;
local_a0 = dVar10;
}
else {
bVar7 = true;
}
bVar1 = false;
}
if (bVar1) goto LAB_00136528;
}
else {
LAB_00136528:
local_78._0_8_ = *param_5;
lVar4 = param_5[1];
if (0xfffffff6 < (uint)lVar4) {
*(int *)local_78._0_8_ = *(int *)local_78._0_8_ + 1;
}
local_78 = JS_ToPrimitiveFree(param_1,local_78._0_8_,lVar4,2);
uVar8 = local_78._8_8_;
dVar10 = local_78._0_8_;
uVar6 = local_78._8_4_;
if (uVar6 == 0xfffffff9) {
local_98 = param_2;
auVar11 = js_Date_parse(param_1);
local_90 = auVar11._0_8_;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),dVar10,uVar8);
bVar7 = true;
uVar6 = auVar11._8_4_;
param_2 = local_98;
if (uVar6 == 6) goto LAB_00136641;
if (uVar6 < 3) {
dVar10 = (double)local_90._0_4_;
}
else {
if (uVar6 != 7) {
iVar2 = __JS_ToFloat64Free(param_1,&local_a0,local_90,auVar11._8_8_);
param_2 = local_98;
goto joined_r0x00136714;
}
local_a0 = local_90;
dVar10 = local_a0;
}
}
else if (uVar6 < 3) {
dVar10 = (double)local_78._0_4_;
}
else if (uVar6 != 7) {
iVar2 = __JS_ToFloat64Free(param_1,&local_a0,dVar10,uVar8);
joined_r0x00136714:
bVar7 = true;
dVar10 = local_a0;
if (iVar2 != 0) goto LAB_00136641;
}
local_a0 = dVar10;
dVar10 = DAT_0019d1e0;
if ((double)(_DAT_0019d060 & (ulong)local_a0) <= DAT_0019d1d8) {
dVar10 = trunc(local_a0);
dVar10 = dVar10 + 0.0;
}
bVar7 = false;
local_a0 = dVar10;
}
LAB_00136641:
if (bVar7) {
LAB_001366ed:
uVar8 = 6;
uVar9 = 0;
uVar5 = 0;
goto LAB_001366d8;
}
}
else if (iVar2 == 0) {
lVar4 = js__gettimeofday_us();
local_a0 = (double)(lVar4 / 1000);
}
else {
local_58 = (int1 [16])0x0;
local_78 = (int1 [16])0x0;
local_48 = 0;
local_68 = ZEXT816(0x3ff0000000000000);
uVar5 = 7;
if (iVar2 < 7) {
uVar5 = uVar9;
}
local_90 = param_3;
if (iVar2 < 1) {
uVar9 = 0;
}
else {
local_84 = (uint)uVar5;
param_5 = param_5 + 1;
uVar9 = 0;
local_98 = param_2;
local_80 = (ulong)param_3 & 0xffffffff;
do {
iVar3 = JS_ToFloat64(param_1,&local_38,param_5[-1],*param_5);
if (iVar3 != 0) goto LAB_001366ed;
if (0x7fefffffffffffff < (ulong)ABS(local_38)) {
iVar3 = (int)local_80;
uVar5 = (ulong)local_84;
param_2 = local_98;
goto LAB_001364ad;
}
dVar10 = trunc(local_38);
*(double *)(local_78 + uVar9 * 8) = dVar10;
if (((uVar9 == 0) && (_DAT_0019d1f8 <= (double)local_78._0_8_)) &&
((double)local_78._0_8_ < DAT_0019d1e8)) {
local_78._0_8_ = (double)local_78._0_8_ + _DAT_0019d1f0;
}
uVar9 = uVar9 + 1;
param_5 = param_5 + 2;
} while (uVar5 != uVar9);
uVar5 = (ulong)local_84;
uVar9 = (ulong)local_84;
iVar3 = (int)local_80;
param_2 = local_98;
}
LAB_001364ad:
param_3 = local_90;
local_a0 = DAT_0019d1e0;
if ((int)uVar9 == (int)uVar5) {
local_a0 = (double)set_date_fields(local_78,1);
param_3 = local_90;
}
}
auVar11 = js_create_from_ctor(param_1,param_2,param_3,10);
uVar9 = auVar11._8_8_;
uVar8 = auVar11._0_8_;
if (((uVar9 & 0xffffffff) != 6) &&
(JS_SetObjectData(param_1,uVar8,uVar9,local_a0,7), iVar3 == 3 && auVar11._8_4_ != 6)) {
auVar11 = get_date_string(param_1,uVar8,uVar9);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar8,uVar9);
}
uVar8 = auVar11._8_8_;
uVar5 = auVar11._0_8_ & 0xffffffff00000000;
uVar9 = auVar11._0_8_ & 0xffffffff;
LAB_001366d8:
auVar11._0_8_ = uVar9 | uVar5;
auVar11._8_8_ = uVar8;
return auVar11;
}
| |
43,877 | binding_system_get_binding_scope | tsotchke[P]eshkol/src/frontend/binding/core/binding_management.c | uint64_t binding_system_get_binding_scope(BindingSystem* system, uint64_t binding_id) {
assert(system != NULL);
// Search for binding
for (size_t i = 0; i < system->binding_table.count; i++) {
if (system->binding_table.binding_ids[i] == binding_id) {
// Found binding
return system->binding_table.scope_ids[i];
}
}
// Binding not found
return 0;
} | O0 | c | binding_system_get_binding_scope:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xb779
jmp 0xb798
leaq 0x1feb5(%rip), %rdi # 0x2b635
leaq 0x1d018(%rip), %rsi # 0x2879f
movl $0x8d, %edx
leaq 0x1d142(%rip), %rcx # 0x288d5
callq 0x2160
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x48(%rcx), %rax
jae 0xb7ea
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq -0x18(%rbp), %rax
jne 0xb7da
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
jmp 0xb7f2
jmp 0xb7dc
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xb7a0
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| binding_system_get_binding_scope:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
cmp [rbp+var_10], 0
jz short loc_B779
jmp short loc_B798
loc_B779:
lea rdi, aBindingSystemN_0+8; "system != NULL"
lea rsi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github/2025_star3"...
mov edx, 8Dh
lea rcx, aUint64TBinding_4; "uint64_t binding_system_get_binding_sco"...
call ___assert_fail
loc_B798:
mov [rbp+var_20], 0
loc_B7A0:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
cmp rax, [rcx+48h]
jnb short loc_B7EA
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov rcx, [rbp+var_20]
mov rax, [rax+rcx*8]
cmp rax, [rbp+var_18]
jnz short loc_B7DA
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov rcx, [rbp+var_20]
mov rax, [rax+rcx*8]
mov [rbp+var_8], rax
jmp short loc_B7F2
loc_B7DA:
jmp short $+2
loc_B7DC:
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_B7A0
loc_B7EA:
mov [rbp+var_8], 0
loc_B7F2:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| long long binding_system_get_binding_scope(_QWORD *a1, long long a2)
{
unsigned long long i; // [rsp+0h] [rbp-20h]
if ( !a1 )
__assert_fail(
"system != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/binding/core/binding_management.c",
141LL,
"uint64_t binding_system_get_binding_scope(BindingSystem *, uint64_t)");
for ( i = 0LL; i < a1[9]; ++i )
{
if ( *(_QWORD *)(a1[3] + 8 * i) == a2 )
return *(_QWORD *)(a1[4] + 8 * i);
}
return 0LL;
}
| binding_system_get_binding_scope:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0010b779
JMP 0x0010b798
LAB_0010b779:
LEA RDI,[0x12b635]
LEA RSI,[0x12879f]
MOV EDX,0x8d
LEA RCX,[0x1288d5]
CALL 0x00102160
LAB_0010b798:
MOV qword ptr [RBP + -0x20],0x0
LAB_0010b7a0:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x48]
JNC 0x0010b7ea
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + RCX*0x8]
CMP RAX,qword ptr [RBP + -0x18]
JNZ 0x0010b7da
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0010b7f2
LAB_0010b7da:
JMP 0x0010b7dc
LAB_0010b7dc:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0010b7a0
LAB_0010b7ea:
MOV qword ptr [RBP + -0x8],0x0
LAB_0010b7f2:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
int8 binding_system_get_binding_scope(long param_1,long param_2)
{
ulong local_28;
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("system != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/binding/core/binding_management.c"
,0x8d,"uint64_t binding_system_get_binding_scope(BindingSystem *, uint64_t)");
}
local_28 = 0;
while( true ) {
if (*(ulong *)(param_1 + 0x48) <= local_28) {
return 0;
}
if (*(long *)(*(long *)(param_1 + 0x18) + local_28 * 8) == param_2) break;
local_28 = local_28 + 1;
}
return *(int8 *)(*(long *)(param_1 + 0x20) + local_28 * 8);
}
| |
43,878 | binding_system_get_binding_scope | tsotchke[P]eshkol/src/frontend/binding/core/binding_management.c | uint64_t binding_system_get_binding_scope(BindingSystem* system, uint64_t binding_id) {
assert(system != NULL);
// Search for binding
for (size_t i = 0; i < system->binding_table.count; i++) {
if (system->binding_table.binding_ids[i] == binding_id) {
// Found binding
return system->binding_table.scope_ids[i];
}
}
// Binding not found
return 0;
} | O3 | c | binding_system_get_binding_scope:
pushq %rax
testq %rdi, %rdi
je 0x8378
movq 0x48(%rdi), %rcx
testq %rcx, %rcx
je 0x836a
movq 0x18(%rdi), %rdx
xorl %eax, %eax
xorl %r8d, %r8d
cmpq %rsi, (%rdx,%r8,8)
je 0x836e
incq %r8
cmpq %r8, %rcx
jne 0x835a
jmp 0x8376
xorl %eax, %eax
jmp 0x8376
movq 0x20(%rdi), %rax
movq (%rax,%r8,8), %rax
popq %rcx
retq
leaq 0x130b2(%rip), %rdi # 0x1b431
leaq 0x1329e(%rip), %rsi # 0x1b624
leaq 0x133cd(%rip), %rcx # 0x1b75a
movl $0x8d, %edx
callq 0x2180
| binding_system_get_binding_scope:
push rax
test rdi, rdi
jz short loc_8378
mov rcx, [rdi+48h]
test rcx, rcx
jz short loc_836A
mov rdx, [rdi+18h]
xor eax, eax
xor r8d, r8d
loc_835A:
cmp [rdx+r8*8], rsi
jz short loc_836E
inc r8
cmp rcx, r8
jnz short loc_835A
jmp short loc_8376
loc_836A:
xor eax, eax
jmp short loc_8376
loc_836E:
mov rax, [rdi+20h]
mov rax, [rax+r8*8]
loc_8376:
pop rcx
retn
loc_8378:
lea rdi, aSystemNull; "system != NULL"
lea rsi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aUint64TBinding_4; "uint64_t binding_system_get_binding_sco"...
mov edx, 8Dh
call ___assert_fail
| long long binding_system_get_binding_scope(_QWORD *a1, long long a2)
{
long long v2; // rcx
long long result; // rax
long long v4; // r8
if ( !a1 )
__assert_fail(
"system != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/binding/core/binding_management.c",
141LL,
"uint64_t binding_system_get_binding_scope(BindingSystem *, uint64_t)");
v2 = a1[9];
if ( !v2 )
return 0LL;
result = 0LL;
v4 = 0LL;
while ( *(_QWORD *)(a1[3] + 8 * v4) != a2 )
{
if ( v2 == ++v4 )
return result;
}
return *(_QWORD *)(a1[4] + 8 * v4);
}
| binding_system_get_binding_scope:
PUSH RAX
TEST RDI,RDI
JZ 0x00108378
MOV RCX,qword ptr [RDI + 0x48]
TEST RCX,RCX
JZ 0x0010836a
MOV RDX,qword ptr [RDI + 0x18]
XOR EAX,EAX
XOR R8D,R8D
LAB_0010835a:
CMP qword ptr [RDX + R8*0x8],RSI
JZ 0x0010836e
INC R8
CMP RCX,R8
JNZ 0x0010835a
JMP 0x00108376
LAB_0010836a:
XOR EAX,EAX
JMP 0x00108376
LAB_0010836e:
MOV RAX,qword ptr [RDI + 0x20]
MOV RAX,qword ptr [RAX + R8*0x8]
LAB_00108376:
POP RCX
RET
LAB_00108378:
LEA RDI,[0x11b431]
LEA RSI,[0x11b624]
LEA RCX,[0x11b75a]
MOV EDX,0x8d
CALL 0x00102180
|
int8 binding_system_get_binding_scope(long param_1,long param_2)
{
long lVar1;
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("system != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/binding/core/binding_management.c"
,0x8d,"uint64_t binding_system_get_binding_scope(BindingSystem *, uint64_t)");
}
if (*(long *)(param_1 + 0x48) != 0) {
lVar1 = 0;
do {
if (*(long *)(*(long *)(param_1 + 0x18) + lVar1 * 8) == param_2) {
return *(int8 *)(*(long *)(param_1 + 0x20) + lVar1 * 8);
}
lVar1 = lVar1 + 1;
} while (*(long *)(param_1 + 0x48) != lVar1);
}
return 0;
}
| |
43,879 | quantize_row_q4_K_reference | 7CodeWizard[P]stablediffusion/ggml/src/ggml-quants.c | void quantize_row_q4_K_reference(const float * restrict x, block_q4_K * restrict y, int k) {
assert(k % QK_K == 0);
const int nb = k / QK_K;
uint8_t L[QK_K];
uint8_t Laux[32];
float weights[32];
float mins[QK_K/32];
float scales[QK_K/32];
for (int i = 0; i < nb; i++) {
float max_scale = 0; // as we are deducting the min, scales are always positive
float max_min = 0;
for (int j = 0; j < QK_K/32; ++j) {
//scales[j] = make_qkx1_quants(32, 15, x + 32*j, L + 32*j, &mins[j], 9, 0.5f);
float sum_x2 = 0;
for (int l = 0; l < 32; ++l) sum_x2 += x[32*j + l] * x[32*j + l];
float av_x = sqrtf(sum_x2/32);
for (int l = 0; l < 32; ++l) weights[l] = av_x + fabsf(x[32*j + l]);
scales[j] = make_qkx2_quants(32, 15, x + 32*j, weights, L + 32*j, &mins[j], Laux, -1.f, 0.1f, 20, false);
float scale = scales[j];
if (scale > max_scale) {
max_scale = scale;
}
float min = mins[j];
if (min > max_min) {
max_min = min;
}
}
#if QK_K == 256
float inv_scale = max_scale > 0 ? 63.f/max_scale : 0.f;
float inv_min = max_min > 0 ? 63.f/max_min : 0.f;
for (int j = 0; j < QK_K/32; ++j) {
uint8_t ls = nearest_int(inv_scale*scales[j]);
uint8_t lm = nearest_int(inv_min*mins[j]);
ls = MIN(63, ls);
lm = MIN(63, lm);
if (j < 4) {
y[i].scales[j] = ls;
y[i].scales[j+4] = lm;
} else {
y[i].scales[j+4] = (ls & 0xF) | ((lm & 0xF) << 4);
y[i].scales[j-4] |= ((ls >> 4) << 6);
y[i].scales[j-0] |= ((lm >> 4) << 6);
}
}
y[i].d = GGML_FP32_TO_FP16(max_scale/63.f);
y[i].dmin = GGML_FP32_TO_FP16(max_min/63.f);
uint8_t sc, m;
for (int j = 0; j < QK_K/32; ++j) {
get_scale_min_k4(j, y[i].scales, &sc, &m);
const float d = GGML_FP16_TO_FP32(y[i].d) * sc;
if (!d) continue;
const float dm = GGML_FP16_TO_FP32(y[i].dmin) * m;
for (int ii = 0; ii < 32; ++ii) {
int l = nearest_int((x[32*j + ii] + dm)/d);
l = MAX(0, MIN(15, l));
L[32*j + ii] = l;
}
}
#else
const float s_factor = 15.f;
float inv_scale = max_scale > 0 ? s_factor/max_scale : 0.f;
float inv_min = max_min > 0 ? s_factor/max_min : 0.f;
int d1 = nearest_int(inv_scale*scales[0]);
int m1 = nearest_int(inv_min*mins[0]);
int d2 = nearest_int(inv_scale*scales[1]);
int m2 = nearest_int(inv_min*mins[1]);
y[i].scales[0] = d1 | (m1 << 4);
y[i].scales[1] = d2 | (m2 << 4);
y[i].d[0] = GGML_FP32_TO_FP16(max_scale/s_factor);
y[i].d[1] = GGML_FP32_TO_FP16(max_min/s_factor);
float sumlx = 0;
int suml2 = 0;
for (int j = 0; j < QK_K/32; ++j) {
const uint8_t sd = y[i].scales[j] & 0xF;
const uint8_t sm = y[i].scales[j] >> 4;
const float d = GGML_FP16_TO_FP32(y[i].d[0]) * sd;
if (!d) continue;
const float m = GGML_FP16_TO_FP32(y[i].d[1]) * sm;
for (int ii = 0; ii < 32; ++ii) {
int l = nearest_int((x[32*j + ii] + m)/d);
l = MAX(0, MIN(15, l));
L[32*j + ii] = l;
sumlx += (x[32*j + ii] + m)*l*sd;
suml2 += l*l*sd*sd;
}
}
if (suml2) {
y[i].d[0] = GGML_FP32_TO_FP16(sumlx/suml2);
}
#endif
uint8_t * q = y[i].qs;
for (int j = 0; j < QK_K; j += 64) {
for (int l = 0; l < 32; ++l) q[l] = L[j + l] | (L[j + l + 32] << 4);
q += 32;
}
x += QK_K;
}
} | O2 | c | quantize_row_q4_K_reference:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp # imm = 0x238
movl %edx, %eax
movq %rdi, %rbp
movl $0x100, %ecx # imm = 0x100
cltd
idivl %ecx
xorl %r14d, %r14d
testl %eax, %eax
cmovlel %r14d, %eax
movq %rax, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
leaq 0x8(%rsi), %rax
vmovss 0x10fa0(%rip), %xmm5 # 0xa4d60
vbroadcastss 0xd2c3(%rip), %xmm0 # 0xa108c
vmovaps %xmm0, 0x40(%rsp)
cmpq 0x28(%rsp), %r14
je 0x94123
movq %rax, 0x8(%rsp)
vxorps %xmm6, %xmm6, %xmm6
movq %rbp, %r15
xorl %r13d, %r13d
cmpq $0x8, %r13
je 0x93ee5
movq %r13, %rbx
shlq $0x5, %rbx
vxorps %xmm0, %xmm0, %xmm0
xorl %eax, %eax
cmpq $0x20, %rax
je 0x93e16
vmovss (%r15,%rax,4), %xmm1
vfmadd231ss %xmm1, %xmm1, %xmm0 # xmm0 = (xmm1 * xmm1) + xmm0
incq %rax
jmp 0x93e00
vmulss 0x10f52(%rip), %xmm0, %xmm0 # 0xa4d70
vucomiss 0x59e6(%rip), %xmm0 # 0x9980c
vmovaps %xmm6, 0x10(%rsp)
jb 0x93e34
vsqrtss %xmm0, %xmm0, %xmm0
jmp 0x93e39
callq 0xab20
vmovaps 0x40(%rsp), %xmm2
xorl %eax, %eax
cmpq $0x20, %rax
je 0x93e63
vmovss (%r15,%rax,4), %xmm1
vandps %xmm2, %xmm1, %xmm1
vaddss %xmm1, %xmm0, %xmm1
vmovss %xmm1, 0xb0(%rsp,%rax,4)
incq %rax
jmp 0x93e41
leaq (,%rbx,4), %rdx
addq %rbp, %rdx
leaq (%rsp,%rbx), %r8
addq $0x130, %r8 # imm = 0x130
leaq (%rsp,%r13,4), %r12
addq $0x70, %r12
subq $0x8, %rsp
pushq $0x20
popq %rdi
pushq $0xf
popq %rsi
leaq 0xb8(%rsp), %rcx
movq %r12, %r9
vmovss 0x5996(%rip), %xmm0 # 0x99834
pushq $0x0
pushq $0x14
leaq 0xa8(%rsp), %rax
pushq %rax
callq 0x9319a
addq $0x20, %rsp
vmovss %xmm0, 0x50(%rsp,%r13,4)
vmovss (%r12), %xmm1
vinsertps $0x10, %xmm0, %xmm1, %xmm0 # xmm0 = xmm1[0],xmm0[0],xmm1[2,3]
vmovaps 0x10(%rsp), %xmm6
vmaxps %xmm6, %xmm0, %xmm6
incq %r13
subq $-0x80, %r15
vmovss 0x10e80(%rip), %xmm5 # 0xa4d60
jmp 0x93de9
vmovshdup %xmm6, %xmm0 # xmm0 = xmm6[1,1,3,3]
vmovss 0x10e83(%rip), %xmm3 # 0xa4d74
vdivss %xmm0, %xmm3, %xmm1
vxorps %xmm4, %xmm4, %xmm4
vcmpltss %xmm0, %xmm4, %xmm2
vandps %xmm1, %xmm2, %xmm1
vdivss %xmm6, %xmm3, %xmm2
vcmpltss %xmm6, %xmm4, %xmm3
vandps %xmm2, %xmm3, %xmm2
xorl %eax, %eax
movq 0x8(%rsp), %r8
movl $0xff, %r9d
pushq $0x3f
popq %r10
cmpq $0x8, %rax
je 0x93f94
vmulss 0x50(%rsp,%rax,4), %xmm1, %xmm3
vaddss %xmm5, %xmm3, %xmm3
vmovd %xmm3, %ecx
andl %r9d, %ecx
cmpl %r10d, %ecx
jb 0x93f3f
movl %r10d, %ecx
vmulss 0x70(%rsp,%rax,4), %xmm2, %xmm3
vaddss %xmm5, %xmm3, %xmm3
vmovd %xmm3, %edx
andl %r9d, %edx
cmpl %r10d, %edx
jb 0x93f58
movl %r10d, %edx
cmpq $0x3, %rax
ja 0x93f69
movb %cl, -0x4(%r8,%rax)
movb %dl, (%r8,%rax)
jmp 0x93f8f
movl %ecx, %esi
andl $0xf, %esi
movl %edx, %edi
shll $0x4, %edi
orl %esi, %edi
movb %dil, (%r8,%rax)
shlb $0x2, %cl
andb $-0x40, %cl
orb %cl, -0x8(%r8,%rax)
shlb $0x2, %dl
andb $-0x40, %dl
orb %dl, -0x4(%r8,%rax)
incq %rax
jmp 0x93f20
vmovss 0x10dd8(%rip), %xmm1 # 0xa4d74
vdivss %xmm1, %xmm0, %xmm0
vcvtps2ph $0x0, %xmm0, %xmm0
vmovd %xmm0, %eax
movq %r14, 0x30(%rsp)
imulq $0x90, %r14, %rcx
movq 0x20(%rsp), %rdx
leaq (%rdx,%rcx), %r15
leaq (%rdx,%rcx), %r12
addq $0x4, %r12
movw %ax, -0x4(%r12)
vdivss %xmm1, %xmm6, %xmm0
vcvtps2ph $0x0, %xmm0, %xmm0
vmovd %xmm0, %r14d
movw %r14w, -0x2(%r12)
movl $0xffff, %ecx # imm = 0xFFFF
andl %ecx, %eax
leaq 0xc92a0(%rip), %rdx # 0x15d290
vmovss (%rdx,%rax,4), %xmm0
vmovss %xmm0, 0x10(%rsp)
andl %ecx, %r14d
movq %rbp, 0x38(%rsp)
movq %rbp, %rbx
leaq 0x130(%rsp), %rbp
xorl %r13d, %r13d
cmpq $0x8, %r13
je 0x940bc
movl %r13d, %edi
movq %r12, %rsi
leaq 0x7(%rsp), %rdx
leaq 0x6(%rsp), %rcx
callq 0x94135
vmovss 0x10d28(%rip), %xmm5 # 0xa4d60
movzbl 0x7(%rsp), %eax
vcvtsi2ss %eax, %xmm7, %xmm0
vmulss 0x10(%rsp), %xmm0, %xmm0
vucomiss 0x57bd(%rip), %xmm0 # 0x9980c
jne 0x94053
jnp 0x940ac
movzbl 0x6(%rsp), %eax
vcvtsi2ss %eax, %xmm7, %xmm1
leaq 0xc922d(%rip), %rax # 0x15d290
vmulss (%rax,%r14,4), %xmm1, %xmm1
xorl %eax, %eax
cmpq $0x20, %rax
je 0x940ac
vaddss (%rbx,%rax,4), %xmm1, %xmm2
vdivss %xmm0, %xmm2, %xmm2
vaddss %xmm5, %xmm2, %xmm2
vmovd %xmm2, %ecx
andl $0x7fffff, %ecx # imm = 0x7FFFFF
movl $0x40000f, %edx # imm = 0x40000F
cmpl %edx, %ecx
jb 0x94096
movl $0x40000f, %ecx # imm = 0x40000F
cmpl $0x400001, %ecx # imm = 0x400001
jae 0x940a3
movl $0x400000, %ecx # imm = 0x400000
movb %cl, (%rbp,%rax)
incq %rax
jmp 0x9406b
incq %r13
addq $0x20, %rbp
subq $-0x80, %rbx
jmp 0x94011
addq $0x10, %r15
leaq 0x150(%rsp), %rax
xorl %ecx, %ecx
movq 0x38(%rsp), %rbp
movq 0x30(%rsp), %r14
cmpq $0xff, %rcx
ja 0x94109
xorl %edx, %edx
cmpq $0x20, %rdx
je 0x940fb
movb (%rax,%rdx), %sil
shlb $0x4, %sil
orb -0x20(%rax,%rdx), %sil
movb %sil, (%r15,%rdx)
incq %rdx
jmp 0x940df
addq $0x20, %r15
addq $0x40, %rcx
addq $0x40, %rax
jmp 0x940d4
addq $0x400, %rbp # imm = 0x400
incq %r14
movq 0x8(%rsp), %rax
addq $0x90, %rax
jmp 0x93dcf
addq $0x238, %rsp # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| quantize_row_q4_K_reference:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 238h
mov eax, edx
mov rbp, rdi
mov ecx, 100h
cdq
idiv ecx
xor r14d, r14d
test eax, eax
cmovle eax, r14d
mov [rsp+268h+var_240], rax
mov [rsp+268h+var_248], rsi
lea rax, [rsi+8]
vmovss xmm5, cs:dword_A4D60
vbroadcastss xmm0, cs:dword_A108C
vmovaps [rsp+268h+var_228], xmm0
loc_93DCF:
cmp r14, [rsp+268h+var_240]
jz loc_94123
mov [rsp+268h+var_260], rax
vxorps xmm6, xmm6, xmm6
mov r15, rbp
xor r13d, r13d
loc_93DE9:
cmp r13, 8
jz loc_93EE5
mov rbx, r13
shl rbx, 5
vxorps xmm0, xmm0, xmm0
xor eax, eax
loc_93E00:
cmp rax, 20h ; ' '
jz short loc_93E16
vmovss xmm1, dword ptr [r15+rax*4]
vfmadd231ss xmm0, xmm1, xmm1
inc rax
jmp short loc_93E00
loc_93E16:
vmulss xmm0, xmm0, cs:dword_A4D70
vucomiss xmm0, cs:dword_9980C
vmovaps [rsp+268h+var_258], xmm6
jb short loc_93E34
vsqrtss xmm0, xmm0, xmm0
jmp short loc_93E39
loc_93E34:
call _sqrtf
loc_93E39:
vmovaps xmm2, [rsp+268h+var_228]
xor eax, eax
loc_93E41:
cmp rax, 20h ; ' '
jz short loc_93E63
vmovss xmm1, dword ptr [r15+rax*4]
vandps xmm1, xmm1, xmm2
vaddss xmm1, xmm0, xmm1
vmovss [rsp+rax*4+268h+var_1B8], xmm1
inc rax
jmp short loc_93E41
loc_93E63:
lea rdx, ds:0[rbx*4]
add rdx, rbp
lea r8, [rsp+rbx+268h+var_268]
add r8, 130h
lea r12, [rsp+r13*4+268h+var_268]
add r12, 70h ; 'p'
sub rsp, 8
push 20h ; ' '
pop rdi
push 0Fh
pop rsi
lea rcx, [rsp+270h+var_1B8]
mov r9, r12
vmovss xmm0, cs:dword_99834
push 0
push 14h
lea rax, [rsp+280h+var_1D8]
push rax
call make_qkx2_quants
add rsp, 20h
vmovss [rsp+r13*4+268h+var_218], xmm0
vmovss xmm1, dword ptr [r12]
vinsertps xmm0, xmm1, xmm0, 10h
vmovaps xmm6, [rsp+268h+var_258]
vmaxps xmm6, xmm0, xmm6
inc r13
sub r15, 0FFFFFFFFFFFFFF80h
vmovss xmm5, cs:dword_A4D60
jmp loc_93DE9
loc_93EE5:
vmovshdup xmm0, xmm6
vmovss xmm3, cs:dword_A4D74
vdivss xmm1, xmm3, xmm0
vxorps xmm4, xmm4, xmm4
vcmpltss xmm2, xmm4, xmm0
vandps xmm1, xmm2, xmm1
vdivss xmm2, xmm3, xmm6
vcmpltss xmm3, xmm4, xmm6
vandps xmm2, xmm3, xmm2
xor eax, eax
mov r8, [rsp+268h+var_260]
mov r9d, 0FFh
push 3Fh ; '?'
pop r10
loc_93F20:
cmp rax, 8
jz short loc_93F94
vmulss xmm3, xmm1, [rsp+rax*4+268h+var_218]
vaddss xmm3, xmm3, xmm5
vmovd ecx, xmm3
and ecx, r9d
cmp ecx, r10d
jb short loc_93F3F
mov ecx, r10d
loc_93F3F:
vmulss xmm3, xmm2, [rsp+rax*4+268h+var_1F8]
vaddss xmm3, xmm3, xmm5
vmovd edx, xmm3
and edx, r9d
cmp edx, r10d
jb short loc_93F58
mov edx, r10d
loc_93F58:
cmp rax, 3
ja short loc_93F69
mov [r8+rax-4], cl
mov [r8+rax], dl
jmp short loc_93F8F
loc_93F69:
mov esi, ecx
and esi, 0Fh
mov edi, edx
shl edi, 4
or edi, esi
mov [r8+rax], dil
shl cl, 2
and cl, 0C0h
or [r8+rax-8], cl
shl dl, 2
and dl, 0C0h
or [r8+rax-4], dl
loc_93F8F:
inc rax
jmp short loc_93F20
loc_93F94:
vmovss xmm1, cs:dword_A4D74
vdivss xmm0, xmm0, xmm1
vcvtps2ph xmm0, xmm0, 0
vmovd eax, xmm0
mov [rsp+268h+var_238], r14
imul rcx, r14, 90h
mov rdx, [rsp+268h+var_248]
lea r15, [rdx+rcx]
lea r12, [rdx+rcx]
add r12, 4
mov [r12-4], ax
vdivss xmm0, xmm6, xmm1
vcvtps2ph xmm0, xmm0, 0
vmovd r14d, xmm0
mov [r12-2], r14w
mov ecx, 0FFFFh
and eax, ecx
lea rdx, ggml_table_f32_f16
vmovss xmm0, dword ptr [rdx+rax*4]
vmovss dword ptr [rsp+268h+var_258], xmm0
and r14d, ecx
mov [rsp+268h+var_230], rbp
mov rbx, rbp
lea rbp, [rsp+268h+var_138]
xor r13d, r13d
loc_94011:
cmp r13, 8
jz loc_940BC
mov edi, r13d
mov rsi, r12
lea rdx, [rsp+268h+var_261]
lea rcx, [rsp+268h+var_262]
call get_scale_min_k4
vmovss xmm5, cs:dword_A4D60
movzx eax, [rsp+268h+var_261]
vcvtsi2ss xmm0, xmm7, eax
vmulss xmm0, xmm0, dword ptr [rsp+268h+var_258]
vucomiss xmm0, cs:dword_9980C
jnz short loc_94053
jnp short loc_940AC
loc_94053:
movzx eax, [rsp+268h+var_262]
vcvtsi2ss xmm1, xmm7, eax
lea rax, ggml_table_f32_f16
vmulss xmm1, xmm1, dword ptr [rax+r14*4]
xor eax, eax
loc_9406B:
cmp rax, 20h ; ' '
jz short loc_940AC
vaddss xmm2, xmm1, dword ptr [rbx+rax*4]
vdivss xmm2, xmm2, xmm0
vaddss xmm2, xmm2, xmm5
vmovd ecx, xmm2
and ecx, 7FFFFFh
mov edx, 40000Fh
cmp ecx, edx
jb short loc_94096
mov ecx, 40000Fh
loc_94096:
cmp ecx, 400001h
jnb short loc_940A3
mov ecx, 400000h
loc_940A3:
mov [rbp+rax+0], cl
inc rax
jmp short loc_9406B
loc_940AC:
inc r13
add rbp, 20h ; ' '
sub rbx, 0FFFFFFFFFFFFFF80h
jmp loc_94011
loc_940BC:
add r15, 10h
lea rax, [rsp+268h+var_118]
xor ecx, ecx
mov rbp, [rsp+268h+var_230]
mov r14, [rsp+268h+var_238]
loc_940D4:
cmp rcx, 0FFh
ja short loc_94109
xor edx, edx
loc_940DF:
cmp rdx, 20h ; ' '
jz short loc_940FB
mov sil, [rax+rdx]
shl sil, 4
or sil, [rax+rdx-20h]
mov [r15+rdx], sil
inc rdx
jmp short loc_940DF
loc_940FB:
add r15, 20h ; ' '
add rcx, 40h ; '@'
add rax, 40h ; '@'
jmp short loc_940D4
loc_94109:
add rbp, 400h
inc r14
mov rax, [rsp+268h+var_260]
add rax, 90h
jmp loc_93DCF
loc_94123:
add rsp, 238h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long quantize_row_q4_K_reference(
long long a1,
long long a2,
int a3,
double a4,
__m128 _XMM1,
double a6,
__m128 _XMM3,
__m128 _XMM4,
double a9,
__m128 _XMM6,
__m128 _XMM7)
{
long long v12; // rax
long long v13; // r14
long long result; // rax
unsigned long long v38; // rax
long long v39; // r8
long long v40; // r9
_WORD *v49; // r15
long long v54; // rbx
_OWORD *v55; // rbp
long long i; // r13
char v57; // pf
char v59; // zf
long long j; // rax
unsigned int v66; // ecx
_WORD *v67; // r15
char *v68; // rax
unsigned long long v69; // rcx
long long v70; // rbp
long long v71; // r14
long long k; // rdx
char v73; // [rsp+6h] [rbp-262h] BYREF
char v74; // [rsp+7h] [rbp-261h] BYREF
long long v75; // [rsp+8h] [rbp-260h]
long long v77; // [rsp+20h] [rbp-248h]
long long v78; // [rsp+28h] [rbp-240h]
long long v79; // [rsp+30h] [rbp-238h]
long long v80; // [rsp+38h] [rbp-230h]
_DWORD v82[16]; // [rsp+50h] [rbp-218h] BYREF
_BYTE v83[32]; // [rsp+90h] [rbp-1D8h] BYREF
_DWORD v84[32]; // [rsp+B0h] [rbp-1B8h] BYREF
_OWORD v85[2]; // [rsp+130h] [rbp-138h] BYREF
char v86; // [rsp+150h] [rbp-118h] BYREF
v12 = (unsigned int)(a3 / 256);
v13 = 0LL;
if ( (int)v12 <= 0 )
v12 = 0LL;
v78 = v12;
v77 = a2;
result = a2 + 8;
__asm
{
vmovss xmm5, cs:dword_A4D60
vbroadcastss xmm0, cs:dword_A108C
vmovaps [rsp+268h+var_228], xmm0
}
while ( v13 != v78 )
{
v75 = result;
__asm { vxorps xmm6, xmm6, xmm6 }
_R15 = a1;
_R13 = 0LL;
while ( _R13 != 8 )
{
__asm { vxorps xmm0, xmm0, xmm0 }
for ( _RAX = 0LL; _RAX != 32; ++_RAX )
{
__asm
{
vmovss xmm1, dword ptr [r15+rax*4]
vfmadd231ss xmm0, xmm1, xmm1
}
}
__asm
{
vmulss xmm0, xmm0, cs:dword_A4D70
vucomiss xmm0, cs:dword_9980C
vmovaps [rsp+268h+var_258], xmm6
vsqrtss xmm0, xmm0, xmm0
vmovaps xmm2, [rsp+268h+var_228]
}
for ( _RAX = 0LL; _RAX != 32; ++_RAX )
{
__asm
{
vmovss xmm1, dword ptr [r15+rax*4]
vandps xmm1, xmm1, xmm2
vaddss xmm1, xmm0, xmm1
vmovss [rsp+rax*4+268h+var_1B8], xmm1
}
}
_R12 = &v82[_R13 + 8];
__asm { vmovss xmm0, cs:dword_99834 }
_XMM0 = make_qkx2_quants(
0x20uLL,
15,
a1 + (_R13 << 7),
(long long)v84,
(long long)&v85[2 * _R13],
(long long)_R12,
_XMM0,
*(double *)_XMM1.m128_u64,
*(double *)&_XMM2,
*(double *)_XMM3.m128_u64,
*(double *)_XMM4.m128_u64,
*(double *)&_XMM5,
*(double *)_XMM6.m128_u64,
_XMM7,
(long long)v83,
20,
0);
__asm
{
vmovss [rsp+r13*4+268h+var_218], xmm0
vmovss xmm1, dword ptr [r12]
vinsertps xmm0, xmm1, xmm0, 10h
vmovaps xmm6, [rsp+268h+var_258]
vmaxps xmm6, xmm0, xmm6
}
++_R13;
_R15 += 128LL;
__asm { vmovss xmm5, cs:dword_A4D60 }
}
__asm
{
vmovshdup xmm0, xmm6
vmovss xmm3, cs:dword_A4D74
vdivss xmm1, xmm3, xmm0
vxorps xmm4, xmm4, xmm4
vcmpltss xmm2, xmm4, xmm0
vandps xmm1, xmm2, xmm1
vdivss xmm2, xmm3, xmm6
vcmpltss xmm3, xmm4, xmm6
vandps xmm2, xmm3, xmm2
}
v38 = 0LL;
v39 = v75;
v40 = 255LL;
while ( v38 != 8 )
{
__asm
{
vmulss xmm3, xmm1, [rsp+rax*4+268h+var_218]
vaddss xmm3, xmm3, xmm5
vmovd ecx, xmm3
}
if ( (unsigned __int8)_ECX >= 0x3Fu )
LOBYTE(_ECX) = 63;
__asm
{
vmulss xmm3, xmm2, [rsp+rax*4+268h+var_1F8]
vaddss xmm3, xmm3, xmm5
vmovd edx, xmm3
}
if ( (unsigned __int8)_EDX >= 0x3Fu )
LOBYTE(_EDX) = 63;
if ( v38 > 3 )
{
*(_BYTE *)(v39 + v38) = _ECX & 0xF | (16 * _EDX);
*(_BYTE *)(v39 + v38 - 8) |= (4 * _ECX) & 0xC0;
*(_BYTE *)(v39 + v38 - 4) |= (4 * _EDX) & 0xC0;
}
else
{
*(_BYTE *)(v39 + v38 - 4) = _ECX;
*(_BYTE *)(v39 + v38) = _EDX;
}
++v38;
}
__asm
{
vmovss xmm1, cs:dword_A4D74
vdivss xmm0, xmm0, xmm1
vcvtps2ph xmm0, xmm0, 0
vmovd eax, xmm0
}
v79 = v13;
v49 = (_WORD *)(v77 + 144 * v13);
*v49 = _RAX;
__asm
{
vdivss xmm0, xmm6, xmm1
vcvtps2ph xmm0, xmm0, 0
vmovd r14d, xmm0
}
v49[1] = _R14D;
_RAX = (unsigned __int16)_RAX;
_RDX = &ggml_table_f32_f16;
__asm
{
vmovss xmm0, dword ptr [rdx+rax*4]
vmovss dword ptr [rsp+268h+var_258], xmm0
}
v80 = a1;
v54 = a1;
v55 = v85;
for ( i = 0LL; i != 8; ++i )
{
get_scale_min_k4((unsigned int)i, v49 + 2, &v74, &v73, v39, v40);
__asm
{
vmovss xmm5, cs:dword_A4D60
vcvtsi2ss xmm0, xmm7, eax
vmulss xmm0, xmm0, dword ptr [rsp+268h+var_258]
vucomiss xmm0, cs:dword_9980C
}
if ( !v59 || v57 )
{
__asm
{
vcvtsi2ss xmm1, xmm7, eax
vmulss xmm1, xmm1, dword ptr [rax+r14*4]
}
for ( j = 0LL; j != 32; ++j )
{
__asm
{
vaddss xmm2, xmm1, dword ptr [rbx+rax*4]
vdivss xmm2, xmm2, xmm0
vaddss xmm2, xmm2, xmm5
vmovd ecx, xmm2
}
v66 = _ECX & 0x7FFFFF;
if ( v66 >= 0x40000F )
v66 = 4194319;
if ( v66 < 0x400001 )
LOBYTE(v66) = 0;
*((_BYTE *)v55 + j) = v66;
}
}
v55 += 2;
v54 += 128LL;
}
v67 = v49 + 8;
v68 = &v86;
v69 = 0LL;
v70 = v80;
v71 = v79;
while ( v69 <= 0xFF )
{
for ( k = 0LL; k != 32; ++k )
*((_BYTE *)v67 + k) = v68[k - 32] | (16 * v68[k]);
v67 += 16;
v69 += 64LL;
v68 += 64;
}
a1 = v70 + 1024;
v13 = v71 + 1;
result = v75 + 144;
}
return result;
}
| quantize_row_q4_K_reference:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x238
MOV EAX,EDX
MOV RBP,RDI
MOV ECX,0x100
CDQ
IDIV ECX
XOR R14D,R14D
TEST EAX,EAX
CMOVLE EAX,R14D
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x20],RSI
LEA RAX,[RSI + 0x8]
VMOVSS XMM5,dword ptr [0x001a4d60]
VBROADCASTSS XMM0,dword ptr [0x001a108c]
VMOVAPS xmmword ptr [RSP + 0x40],XMM0
LAB_00193dcf:
CMP R14,qword ptr [RSP + 0x28]
JZ 0x00194123
MOV qword ptr [RSP + 0x8],RAX
VXORPS XMM6,XMM6,XMM6
MOV R15,RBP
XOR R13D,R13D
LAB_00193de9:
CMP R13,0x8
JZ 0x00193ee5
MOV RBX,R13
SHL RBX,0x5
VXORPS XMM0,XMM0,XMM0
XOR EAX,EAX
LAB_00193e00:
CMP RAX,0x20
JZ 0x00193e16
VMOVSS XMM1,dword ptr [R15 + RAX*0x4]
VFMADD231SS XMM0,XMM1,XMM1
INC RAX
JMP 0x00193e00
LAB_00193e16:
VMULSS XMM0,XMM0,dword ptr [0x001a4d70]
VUCOMISS XMM0,dword ptr [0x0019980c]
VMOVAPS xmmword ptr [RSP + 0x10],XMM6
JC 0x00193e34
VSQRTSS XMM0,XMM0,XMM0
JMP 0x00193e39
LAB_00193e34:
CALL 0x0010ab20
LAB_00193e39:
VMOVAPS XMM2,xmmword ptr [RSP + 0x40]
XOR EAX,EAX
LAB_00193e41:
CMP RAX,0x20
JZ 0x00193e63
VMOVSS XMM1,dword ptr [R15 + RAX*0x4]
VANDPS XMM1,XMM1,XMM2
VADDSS XMM1,XMM0,XMM1
VMOVSS dword ptr [RSP + RAX*0x4 + 0xb0],XMM1
INC RAX
JMP 0x00193e41
LAB_00193e63:
LEA RDX,[RBX*0x4]
ADD RDX,RBP
LEA R8,[RSP + RBX*0x1]
ADD R8,0x130
LEA R12,[RSP + R13*0x4]
ADD R12,0x70
SUB RSP,0x8
PUSH 0x20
POP RDI
PUSH 0xf
POP RSI
LEA RCX,[RSP + 0xb8]
MOV R9,R12
VMOVSS XMM0,dword ptr [0x00199834]
PUSH 0x0
PUSH 0x14
LEA RAX,[RSP + 0xa8]
PUSH RAX
CALL 0x0019319a
ADD RSP,0x20
VMOVSS dword ptr [RSP + R13*0x4 + 0x50],XMM0
VMOVSS XMM1,dword ptr [R12]
VINSERTPS XMM0,XMM1,XMM0,0x10
VMOVAPS XMM6,xmmword ptr [RSP + 0x10]
VMAXPS XMM6,XMM0,XMM6
INC R13
SUB R15,-0x80
VMOVSS XMM5,dword ptr [0x001a4d60]
JMP 0x00193de9
LAB_00193ee5:
VMOVSHDUP XMM0,XMM6
VMOVSS XMM3,dword ptr [0x001a4d74]
VDIVSS XMM1,XMM3,XMM0
VXORPS XMM4,XMM4,XMM4
VCMPLTSS XMM2,XMM4,XMM0
VANDPS XMM1,XMM2,XMM1
VDIVSS XMM2,XMM3,XMM6
VCMPLTSS XMM3,XMM4,XMM6
VANDPS XMM2,XMM3,XMM2
XOR EAX,EAX
MOV R8,qword ptr [RSP + 0x8]
MOV R9D,0xff
PUSH 0x3f
POP R10
LAB_00193f20:
CMP RAX,0x8
JZ 0x00193f94
VMULSS XMM3,XMM1,dword ptr [RSP + RAX*0x4 + 0x50]
VADDSS XMM3,XMM3,XMM5
VMOVD ECX,XMM3
AND ECX,R9D
CMP ECX,R10D
JC 0x00193f3f
MOV ECX,R10D
LAB_00193f3f:
VMULSS XMM3,XMM2,dword ptr [RSP + RAX*0x4 + 0x70]
VADDSS XMM3,XMM3,XMM5
VMOVD EDX,XMM3
AND EDX,R9D
CMP EDX,R10D
JC 0x00193f58
MOV EDX,R10D
LAB_00193f58:
CMP RAX,0x3
JA 0x00193f69
MOV byte ptr [R8 + RAX*0x1 + -0x4],CL
MOV byte ptr [R8 + RAX*0x1],DL
JMP 0x00193f8f
LAB_00193f69:
MOV ESI,ECX
AND ESI,0xf
MOV EDI,EDX
SHL EDI,0x4
OR EDI,ESI
MOV byte ptr [R8 + RAX*0x1],DIL
SHL CL,0x2
AND CL,0xc0
OR byte ptr [R8 + RAX*0x1 + -0x8],CL
SHL DL,0x2
AND DL,0xc0
OR byte ptr [R8 + RAX*0x1 + -0x4],DL
LAB_00193f8f:
INC RAX
JMP 0x00193f20
LAB_00193f94:
VMOVSS XMM1,dword ptr [0x001a4d74]
VDIVSS XMM0,XMM0,XMM1
VCVTPS2PH XMM0,XMM0,0x0
VMOVD EAX,XMM0
MOV qword ptr [RSP + 0x30],R14
IMUL RCX,R14,0x90
MOV RDX,qword ptr [RSP + 0x20]
LEA R15,[RDX + RCX*0x1]
LEA R12,[RDX + RCX*0x1]
ADD R12,0x4
MOV word ptr [R12 + -0x4],AX
VDIVSS XMM0,XMM6,XMM1
VCVTPS2PH XMM0,XMM0,0x0
VMOVD R14D,XMM0
MOV word ptr [R12 + -0x2],R14W
MOV ECX,0xffff
AND EAX,ECX
LEA RDX,[0x25d290]
VMOVSS XMM0,dword ptr [RDX + RAX*0x4]
VMOVSS dword ptr [RSP + 0x10],XMM0
AND R14D,ECX
MOV qword ptr [RSP + 0x38],RBP
MOV RBX,RBP
LEA RBP,[RSP + 0x130]
XOR R13D,R13D
LAB_00194011:
CMP R13,0x8
JZ 0x001940bc
MOV EDI,R13D
MOV RSI,R12
LEA RDX,[RSP + 0x7]
LEA RCX,[RSP + 0x6]
CALL 0x00194135
VMOVSS XMM5,dword ptr [0x001a4d60]
MOVZX EAX,byte ptr [RSP + 0x7]
VCVTSI2SS XMM0,XMM7,EAX
VMULSS XMM0,XMM0,dword ptr [RSP + 0x10]
VUCOMISS XMM0,dword ptr [0x0019980c]
JNZ 0x00194053
JNP 0x001940ac
LAB_00194053:
MOVZX EAX,byte ptr [RSP + 0x6]
VCVTSI2SS XMM1,XMM7,EAX
LEA RAX,[0x25d290]
VMULSS XMM1,XMM1,dword ptr [RAX + R14*0x4]
XOR EAX,EAX
LAB_0019406b:
CMP RAX,0x20
JZ 0x001940ac
VADDSS XMM2,XMM1,dword ptr [RBX + RAX*0x4]
VDIVSS XMM2,XMM2,XMM0
VADDSS XMM2,XMM2,XMM5
VMOVD ECX,XMM2
AND ECX,0x7fffff
MOV EDX,0x40000f
CMP ECX,EDX
JC 0x00194096
MOV ECX,0x40000f
LAB_00194096:
CMP ECX,0x400001
JNC 0x001940a3
MOV ECX,0x400000
LAB_001940a3:
MOV byte ptr [RBP + RAX*0x1],CL
INC RAX
JMP 0x0019406b
LAB_001940ac:
INC R13
ADD RBP,0x20
SUB RBX,-0x80
JMP 0x00194011
LAB_001940bc:
ADD R15,0x10
LEA RAX,[RSP + 0x150]
XOR ECX,ECX
MOV RBP,qword ptr [RSP + 0x38]
MOV R14,qword ptr [RSP + 0x30]
LAB_001940d4:
CMP RCX,0xff
JA 0x00194109
XOR EDX,EDX
LAB_001940df:
CMP RDX,0x20
JZ 0x001940fb
MOV SIL,byte ptr [RAX + RDX*0x1]
SHL SIL,0x4
OR SIL,byte ptr [RAX + RDX*0x1 + -0x20]
MOV byte ptr [R15 + RDX*0x1],SIL
INC RDX
JMP 0x001940df
LAB_001940fb:
ADD R15,0x20
ADD RCX,0x40
ADD RAX,0x40
JMP 0x001940d4
LAB_00194109:
ADD RBP,0x400
INC R14
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,0x90
JMP 0x00193dcf
LAB_00194123:
ADD RSP,0x238
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void quantize_row_q4_K_reference(long param_1,long param_2,int param_3)
{
int2 *puVar1;
byte *pbVar2;
float fVar3;
int1 auVar4 [16];
long lVar5;
ulong uVar6;
byte bVar7;
ulong uVar8;
uint uVar9;
int1 *puVar10;
long lVar11;
long lVar12;
float fVar13;
int1 auVar14 [16];
int1 auVar15 [16];
int1 auVar16 [16];
int1 auVar17 [64];
byte local_262;
byte local_261;
long local_260;
int1 local_258 [16];
long local_248;
ulong local_240;
ulong local_238;
long local_230;
int4 local_228;
int4 uStack_224;
int4 uStack_220;
int4 uStack_21c;
float afStack_218 [8];
float local_1f8 [8];
int1 local_1d8 [32];
float local_1b8 [32];
int1 local_138 [32];
int1 local_118 [232];
int1 extraout_var [56];
uVar8 = 0;
local_240 = (long)param_3 / 0x100 & 0xffffffff;
if ((int)((long)param_3 / 0x100) < 1) {
local_240 = uVar8;
}
local_260 = param_2 + 8;
local_228 = DAT_001a108c;
uStack_224 = DAT_001a108c;
uStack_220 = DAT_001a108c;
uStack_21c = DAT_001a108c;
local_248 = param_2;
fVar13 = DAT_001a4d60;
while (uVar8 != local_240) {
auVar16 = ZEXT816(0) << 0x40;
lVar12 = param_1;
for (lVar11 = 0; lVar11 != 8; lVar11 = lVar11 + 1) {
auVar14 = ZEXT816(0) << 0x40;
for (lVar5 = 0; lVar5 != 0x20; lVar5 = lVar5 + 1) {
auVar15 = ZEXT416(*(uint *)(lVar12 + lVar5 * 4));
auVar14 = vfmadd231ss_fma(auVar14,auVar15,auVar15);
}
fVar13 = auVar14._0_4_ * DAT_001a4d70;
local_258 = auVar16;
if (fVar13 < DAT_0019980c) {
fVar13 = sqrtf(fVar13);
}
else {
auVar16 = vsqrtss_avx(ZEXT416((uint)fVar13),ZEXT416((uint)fVar13));
fVar13 = auVar16._0_4_;
}
auVar16._4_4_ = uStack_224;
auVar16._0_4_ = local_228;
auVar16._8_4_ = uStack_220;
auVar16._12_4_ = uStack_21c;
for (lVar5 = 0; lVar5 != 0x20; lVar5 = lVar5 + 1) {
auVar14 = vandps_avx(ZEXT416(*(uint *)(lVar12 + lVar5 * 4)),auVar16);
local_1b8[lVar5] = fVar13 + auVar14._0_4_;
}
auVar17._0_8_ =
make_qkx2_quants(DAT_00199834,0x20,0xf,lVar11 * 0x80 + param_1,local_1b8,
local_138 + lVar11 * 0x20,local_1f8 + lVar11,local_1d8,0x14,0);
auVar17._8_56_ = extraout_var;
afStack_218[lVar11] = (float)auVar17._0_8_;
auVar16 = vinsertps_avx(ZEXT416((uint)local_1f8[lVar11]),auVar17._0_16_,0x10);
auVar16 = vmaxps_avx(auVar16,local_258);
lVar12 = lVar12 + 0x80;
fVar13 = DAT_001a4d60;
}
auVar4 = vmovshdup_avx(auVar16);
auVar14 = vcmpss_avx(ZEXT816(0) << 0x40,auVar4,1);
auVar14 = vandps_avx(auVar14,ZEXT416((uint)(DAT_001a4d74 / auVar4._0_4_)));
auVar15 = vcmpss_avx(ZEXT816(0) << 0x40,auVar16,1);
auVar15 = vandps_avx(auVar15,ZEXT416((uint)(DAT_001a4d74 / auVar16._0_4_)));
for (uVar6 = 0; fVar3 = DAT_001a4d74, uVar6 != 8; uVar6 = uVar6 + 1) {
fVar3 = auVar14._0_4_ * afStack_218[uVar6] + fVar13;
bVar7 = SUB41(fVar3,0);
if (0x3e < ((uint)fVar3 & 0xff)) {
bVar7 = 0x3f;
}
uVar9 = (uint)(auVar15._0_4_ * local_1f8[uVar6] + fVar13) & 0xff;
if (0x3e < uVar9) {
uVar9 = 0x3f;
}
if (uVar6 < 4) {
*(byte *)(local_260 + -4 + uVar6) = bVar7;
*(byte *)(local_260 + uVar6) = (byte)uVar9;
}
else {
*(byte *)(local_260 + uVar6) = (byte)(uVar9 << 4) | bVar7 & 0xf;
pbVar2 = (byte *)(local_260 + -8 + uVar6);
*pbVar2 = *pbVar2 | (bVar7 & 0x30) << 2;
pbVar2 = (byte *)(local_260 + -4 + uVar6);
*pbVar2 = *pbVar2 | ((byte)uVar9 & 0x30) << 2;
}
}
auVar14._0_4_ = auVar4._0_4_ / DAT_001a4d74;
auVar14._4_12_ = auVar4._4_12_;
auVar14 = vcvtps2ph_f16c(auVar14,0);
lVar12 = local_248 + uVar8 * 0x90;
puVar1 = (int2 *)(local_248 + uVar8 * 0x90);
*puVar1 = auVar14._0_2_;
auVar15._0_4_ = auVar16._0_4_ / fVar3;
auVar15._4_12_ = auVar16._4_12_;
auVar16 = vcvtps2ph_f16c(auVar15,0);
puVar1[1] = auVar16._0_2_;
local_258._0_4_ = (&ggml_table_f32_f16)[auVar14._0_4_ & 0xffff];
puVar10 = local_138;
local_238 = uVar8;
local_230 = param_1;
for (uVar6 = 0; uVar6 != 8; uVar6 = uVar6 + 1) {
get_scale_min_k4(uVar6 & 0xffffffff,puVar1 + 2,&local_261);
fVar13 = (float)local_261 * (float)local_258._0_4_;
if ((fVar13 != DAT_0019980c) || (NAN(fVar13) || NAN(DAT_0019980c))) {
fVar3 = (float)(&ggml_table_f32_f16)[auVar16._0_4_ & 0xffff];
for (lVar11 = 0; lVar11 != 0x20; lVar11 = lVar11 + 1) {
uVar9 = (uint)(((float)local_262 * fVar3 + *(float *)(param_1 + lVar11 * 4)) / fVar13 +
DAT_001a4d60) & 0x7fffff;
if (0x40000e < uVar9) {
uVar9 = 0x40000f;
}
if (uVar9 < 0x400001) {
uVar9 = 0;
}
puVar10[lVar11] = (char)uVar9;
}
}
puVar10 = puVar10 + 0x20;
param_1 = param_1 + 0x80;
fVar13 = DAT_001a4d60;
}
lVar12 = lVar12 + 0x10;
puVar10 = local_118;
for (uVar8 = 0; uVar8 < 0x100; uVar8 = uVar8 + 0x40) {
for (lVar11 = 0; lVar11 != 0x20; lVar11 = lVar11 + 1) {
*(int1 *)(lVar12 + lVar11) = puVar10[lVar11] << 4 | puVar10[lVar11 + -0x20];
}
lVar12 = lVar12 + 0x20;
puVar10 = puVar10 + 0x40;
}
param_1 = local_230 + 0x400;
local_260 = local_260 + 0x90;
uVar8 = local_238 + 1;
}
return;
}
| |
43,880 | quantize_row_q4_K_reference | 7CodeWizard[P]stablediffusion/ggml/src/ggml-quants.c | void quantize_row_q4_K_reference(const float * restrict x, block_q4_K * restrict y, int k) {
assert(k % QK_K == 0);
const int nb = k / QK_K;
uint8_t L[QK_K];
uint8_t Laux[32];
float weights[32];
float mins[QK_K/32];
float scales[QK_K/32];
for (int i = 0; i < nb; i++) {
float max_scale = 0; // as we are deducting the min, scales are always positive
float max_min = 0;
for (int j = 0; j < QK_K/32; ++j) {
//scales[j] = make_qkx1_quants(32, 15, x + 32*j, L + 32*j, &mins[j], 9, 0.5f);
float sum_x2 = 0;
for (int l = 0; l < 32; ++l) sum_x2 += x[32*j + l] * x[32*j + l];
float av_x = sqrtf(sum_x2/32);
for (int l = 0; l < 32; ++l) weights[l] = av_x + fabsf(x[32*j + l]);
scales[j] = make_qkx2_quants(32, 15, x + 32*j, weights, L + 32*j, &mins[j], Laux, -1.f, 0.1f, 20, false);
float scale = scales[j];
if (scale > max_scale) {
max_scale = scale;
}
float min = mins[j];
if (min > max_min) {
max_min = min;
}
}
#if QK_K == 256
float inv_scale = max_scale > 0 ? 63.f/max_scale : 0.f;
float inv_min = max_min > 0 ? 63.f/max_min : 0.f;
for (int j = 0; j < QK_K/32; ++j) {
uint8_t ls = nearest_int(inv_scale*scales[j]);
uint8_t lm = nearest_int(inv_min*mins[j]);
ls = MIN(63, ls);
lm = MIN(63, lm);
if (j < 4) {
y[i].scales[j] = ls;
y[i].scales[j+4] = lm;
} else {
y[i].scales[j+4] = (ls & 0xF) | ((lm & 0xF) << 4);
y[i].scales[j-4] |= ((ls >> 4) << 6);
y[i].scales[j-0] |= ((lm >> 4) << 6);
}
}
y[i].d = GGML_FP32_TO_FP16(max_scale/63.f);
y[i].dmin = GGML_FP32_TO_FP16(max_min/63.f);
uint8_t sc, m;
for (int j = 0; j < QK_K/32; ++j) {
get_scale_min_k4(j, y[i].scales, &sc, &m);
const float d = GGML_FP16_TO_FP32(y[i].d) * sc;
if (!d) continue;
const float dm = GGML_FP16_TO_FP32(y[i].dmin) * m;
for (int ii = 0; ii < 32; ++ii) {
int l = nearest_int((x[32*j + ii] + dm)/d);
l = MAX(0, MIN(15, l));
L[32*j + ii] = l;
}
}
#else
const float s_factor = 15.f;
float inv_scale = max_scale > 0 ? s_factor/max_scale : 0.f;
float inv_min = max_min > 0 ? s_factor/max_min : 0.f;
int d1 = nearest_int(inv_scale*scales[0]);
int m1 = nearest_int(inv_min*mins[0]);
int d2 = nearest_int(inv_scale*scales[1]);
int m2 = nearest_int(inv_min*mins[1]);
y[i].scales[0] = d1 | (m1 << 4);
y[i].scales[1] = d2 | (m2 << 4);
y[i].d[0] = GGML_FP32_TO_FP16(max_scale/s_factor);
y[i].d[1] = GGML_FP32_TO_FP16(max_min/s_factor);
float sumlx = 0;
int suml2 = 0;
for (int j = 0; j < QK_K/32; ++j) {
const uint8_t sd = y[i].scales[j] & 0xF;
const uint8_t sm = y[i].scales[j] >> 4;
const float d = GGML_FP16_TO_FP32(y[i].d[0]) * sd;
if (!d) continue;
const float m = GGML_FP16_TO_FP32(y[i].d[1]) * sm;
for (int ii = 0; ii < 32; ++ii) {
int l = nearest_int((x[32*j + ii] + m)/d);
l = MAX(0, MIN(15, l));
L[32*j + ii] = l;
sumlx += (x[32*j + ii] + m)*l*sd;
suml2 += l*l*sd*sd;
}
}
if (suml2) {
y[i].d[0] = GGML_FP32_TO_FP16(sumlx/suml2);
}
#endif
uint8_t * q = y[i].qs;
for (int j = 0; j < QK_K; j += 64) {
for (int l = 0; l < 32; ++l) q[l] = L[j + l] | (L[j + l + 32] << 4);
q += 32;
}
x += QK_K;
}
} | O3 | c | quantize_row_q4_K_reference:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp # imm = 0x258
movq %rsi, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
cmpl $0x100, %edx # imm = 0x100
jl 0xb6ebd
movq %rdi, %r14
movq 0x8(%rsp), %rax
shrl $0x8, %eax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
leaq 0x8(%rax), %rbp
xorl %r15d, %r15d
vxorps %xmm6, %xmm6, %xmm6
vbroadcastss 0xd755(%rip), %ymm0 # 0xc4290
vmovups %ymm0, 0x30(%rsp)
movl $0xff, %ebx
vpbroadcastb 0x114b3(%rip), %ymm1 # 0xc8002
vmovdqu %ymm1, 0x50(%rsp)
movq %r15, 0x18(%rsp)
vxorps %xmm9, %xmm9, %xmm9
movq %r14, %r15
xorl %r12d, %r12d
movq %r12, %r13
shlq $0x5, %r13
vxorps %xmm0, %xmm0, %xmm0
xorl %eax, %eax
vmovss (%r15,%rax,4), %xmm1
vfmadd231ss %xmm1, %xmm1, %xmm0 # xmm0 = (xmm1 * xmm1) + xmm0
incq %rax
cmpq $0x20, %rax
jne 0xb6b72
vmulss 0x11436(%rip), %xmm0, %xmm0 # 0xc7fc4
vucomiss %xmm6, %xmm0
vmovaps %xmm9, 0x20(%rsp)
jb 0xb6ba0
vsqrtss %xmm0, %xmm0, %xmm0
jmp 0xb6ba8
vzeroupper
callq 0xab30
vmovups 0x30(%rsp), %ymm2
vbroadcastss %xmm0, %ymm0
xorl %eax, %eax
vandps (%r15,%rax,4), %ymm2, %ymm1
vaddps %ymm1, %ymm0, %ymm1
vmovups %ymm1, 0xd0(%rsp,%rax,4)
addq $0x8, %rax
cmpq $0x20, %rax
jne 0xb6bb5
leaq (%r14,%r13,4), %rdx
leaq (%rsp,%r13), %r8
addq $0x150, %r8 # imm = 0x150
leaq (%rsp,%r12,4), %r13
addq $0x90, %r13
subq $0x8, %rsp
movl $0x20, %edi
movl $0xf, %esi
leaq 0xd8(%rsp), %rcx
movq %r13, %r9
vmovss 0x5cfb(%rip), %xmm0 # 0xbc908
pushq $0x0
pushq $0x14
leaq 0xc8(%rsp), %rax
pushq %rax
vzeroupper
callq 0xb5db5
addq $0x20, %rsp
vmovss %xmm0, 0x70(%rsp,%r12,4)
vinsertps $0x10, (%r13), %xmm0, %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[2,3]
vmovaps 0x20(%rsp), %xmm9
vmaxps %xmm9, %xmm0, %xmm9
incq %r12
subq $-0x80, %r15
cmpq $0x8, %r12
vxorps %xmm6, %xmm6, %xmm6
vmovss 0x1134e(%rip), %xmm5 # 0xc7fa4
vbroadcastss 0x11345(%rip), %ymm7 # 0xc7fa4
vmovd 0x11699(%rip), %xmm8 # 0xc8300
jne 0xb6b65
vmovss 0x11353(%rip), %xmm2 # 0xc7fc8
vdivss %xmm9, %xmm2, %xmm0
vcmpltss %xmm9, %xmm6, %xmm1
vandps %xmm0, %xmm1, %xmm1
vmovshdup %xmm9, %xmm0 # xmm0 = xmm9[1,1,3,3]
vdivss %xmm0, %xmm2, %xmm2
vcmpltss %xmm0, %xmm6, %xmm3
vandps %xmm2, %xmm3, %xmm2
xorl %eax, %eax
movq 0x18(%rsp), %r15
leaq 0xc55dc(%rip), %r12 # 0x17c280
vmulss 0x70(%rsp,%rax,4), %xmm1, %xmm3
vaddss %xmm5, %xmm3, %xmm4
vmulss 0x90(%rsp,%rax,4), %xmm2, %xmm3
vmovd %xmm4, %ecx
andl %ebx, %ecx
movl $0x3f, %esi
cmpl %esi, %ecx
jb 0xb6ccb
movl $0x3f, %ecx
vaddss %xmm5, %xmm3, %xmm3
vmovd %xmm3, %edx
andl %ebx, %edx
cmpl %esi, %edx
jb 0xb6cde
movl $0x3f, %edx
cmpq $0x3, %rax
ja 0xb6cee
movb %cl, -0x4(%rbp,%rax)
movb %dl, (%rbp,%rax)
jmp 0xb6d13
movl %ecx, %esi
andl $0xf, %esi
movl %edx, %edi
shll $0x4, %edi
orl %esi, %edi
movb %dil, (%rbp,%rax)
shlb $0x2, %cl
andb $-0x40, %cl
orb %cl, -0x8(%rbp,%rax)
shlb $0x2, %dl
andb $-0x40, %dl
orb %dl, -0x4(%rbp,%rax)
incq %rax
cmpq $0x8, %rax
jne 0xb6ca4
vmovss 0x112a4(%rip), %xmm2 # 0xc7fc8
vdivss %xmm2, %xmm9, %xmm1
vcvtps2ph $0x0, %xmm1, %xmm1
vmovd %xmm1, %edx
leaq (%r15,%r15,8), %rsi
shlq $0x4, %rsi
movq 0x10(%rsp), %rdi
leaq (%rdi,%rsi), %rax
movw %dx, (%rdi,%rsi)
vdivss %xmm2, %xmm0, %xmm0
vcvtps2ph $0x0, %xmm0, %xmm0
vmovd %xmm0, %ecx
movw %cx, 0x2(%rdi,%rsi)
movl $0xffff, %esi # imm = 0xFFFF
andl %esi, %edx
vmovss (%r12,%rdx,4), %xmm0
andl %esi, %ecx
movq %r14, %rdx
leaq 0x150(%rsp), %rsi
xorl %edi, %edi
cmpq $0x3, %rdi
ja 0xb6d90
movb 0x4(%rax,%rdi), %r9b
movb 0x8(%rax,%rdi), %r8b
andb $0x3f, %r9b
andb $0x3f, %r8b
jmp 0xb6dbf
movb 0x8(%rax,%rdi), %r10b
movl %r10d, %r11d
andb $0xf, %r11b
movb (%rax,%rdi), %r9b
movb 0x4(%rax,%rdi), %r8b
shrb $0x2, %r9b
andb $0x30, %r9b
orb %r11b, %r9b
shrb $0x4, %r10b
shrb $0x2, %r8b
andb $0x30, %r8b
orb %r10b, %r8b
movzbl %r9b, %r9d
vcvtsi2ss %r9d, %xmm10, %xmm1
vmulss %xmm1, %xmm0, %xmm2
vucomiss %xmm6, %xmm2
jne 0xb6dd4
jnp 0xb6e4b
movzbl %r8b, %r8d
vcvtsi2ss %r8d, %xmm10, %xmm1
vmulss (%r12,%rcx,4), %xmm1, %xmm1
vbroadcastss %xmm1, %ymm1
vbroadcastss %xmm2, %ymm2
xorl %r8d, %r8d
vaddps (%rdx,%r8,4), %ymm1, %ymm3
vdivps %ymm2, %ymm3, %ymm3
vaddps %ymm7, %ymm3, %ymm3
vbroadcastss 0x111a1(%rip), %ymm4 # 0xc7fa8
vpbroadcastd 0x111bc(%rip), %ymm5 # 0xc7fcc
vandps %ymm4, %ymm3, %ymm3
vpminud %ymm5, %ymm3, %ymm3
vpbroadcastd 0x1118e(%rip), %ymm4 # 0xc7fb0
vpmaxud %ymm4, %ymm3, %ymm3
vextracti128 $0x1, %ymm3, %xmm4
vpshufb %xmm8, %xmm4, %xmm4
vpshufb %xmm8, %xmm3, %xmm3
vpunpckldq %xmm4, %xmm3, %xmm3 # xmm3 = xmm3[0],xmm4[0],xmm3[1],xmm4[1]
vmovq %xmm3, (%rsi,%r8)
addq $0x8, %r8
cmpq $0x20, %r8
jne 0xb6df0
incq %rdi
addq $0x20, %rsi
subq $-0x80, %rdx
cmpq $0x8, %rdi
jne 0xb6d76
addq $0x10, %rax
movq $-0x40, %rcx
vmovdqu 0x50(%rsp), %ymm1
vmovdqu 0x1b0(%rsp,%rcx), %ymm0
vpsllw $0x4, %ymm0, %ymm0
vpand %ymm1, %ymm0, %ymm0
vpor 0x190(%rsp,%rcx), %ymm0, %ymm0
vmovdqu %ymm0, (%rax)
addq $0x20, %rax
addq $0x40, %rcx
cmpq $0xc0, %rcx
jb 0xb6e71
addq $0x400, %r14 # imm = 0x400
incq %r15
addq $0x90, %rbp
cmpq 0x8(%rsp), %r15
jne 0xb6b55
addq $0x258, %rsp # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
vzeroupper
retq
| quantize_row_q4_K_reference:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 258h
mov [rsp+288h+var_278], rsi
mov [rsp+288h+var_280], rdx
cmp edx, 100h
jl loc_B6EBD
mov r14, rdi
mov rax, [rsp+288h+var_280]
shr eax, 8
mov [rsp+288h+var_280], rax
mov rax, [rsp+288h+var_278]
lea rbp, [rax+8]
xor r15d, r15d
vxorps xmm6, xmm6, xmm6
vbroadcastss ymm0, cs:dword_C4290
vmovups [rsp+288h+var_258], ymm0
mov ebx, 0FFh
vpbroadcastb ymm1, cs:byte_C8002
vmovdqu [rsp+288h+var_238], ymm1
loc_B6B55:
mov [rsp+288h+var_270], r15
vxorps xmm9, xmm9, xmm9
mov r15, r14
xor r12d, r12d
loc_B6B65:
mov r13, r12
shl r13, 5
vxorps xmm0, xmm0, xmm0
xor eax, eax
loc_B6B72:
vmovss xmm1, dword ptr [r15+rax*4]
vfmadd231ss xmm0, xmm1, xmm1
inc rax
cmp rax, 20h ; ' '
jnz short loc_B6B72
vmulss xmm0, xmm0, cs:dword_C7FC4
vucomiss xmm0, xmm6
vmovaps [rsp+288h+var_268], xmm9
jb short loc_B6BA0
vsqrtss xmm0, xmm0, xmm0
jmp short loc_B6BA8
loc_B6BA0:
vzeroupper
call _sqrtf
loc_B6BA8:
vmovups ymm2, [rsp+288h+var_258]
vbroadcastss ymm0, xmm0
xor eax, eax
loc_B6BB5:
vandps ymm1, ymm2, ymmword ptr [r15+rax*4]
vaddps ymm1, ymm0, ymm1
vmovups [rsp+rax*4+288h+var_1B8], ymm1
add rax, 8
cmp rax, 20h ; ' '
jnz short loc_B6BB5
lea rdx, [r14+r13*4]
lea r8, [rsp+r13+288h+var_288]
add r8, 150h
lea r13, [rsp+r12*4+288h+var_288]
add r13, 90h
sub rsp, 8
mov edi, 20h ; ' '
mov esi, 0Fh
lea rcx, [rsp+290h+var_1B8]
mov r9, r13
vmovss xmm0, cs:dword_BC908
push 0
push 14h
lea rax, [rsp+2A0h+var_1D8]
push rax
vzeroupper
call make_qkx2_quants
add rsp, 20h
vmovss [rsp+r12*4+288h+var_218], xmm0
vinsertps xmm0, xmm0, dword ptr [r13+0], 10h
vmovaps xmm9, [rsp+288h+var_268]
vmaxps xmm9, xmm0, xmm9
inc r12
sub r15, 0FFFFFFFFFFFFFF80h
cmp r12, 8
vxorps xmm6, xmm6, xmm6
vmovss xmm5, cs:dword_C7FA4
vbroadcastss ymm7, cs:dword_C7FA4
vmovd xmm8, cs:dword_C8300
jnz loc_B6B65
vmovss xmm2, cs:dword_C7FC8
vdivss xmm0, xmm2, xmm9
vcmpltss xmm1, xmm6, xmm9
vandps xmm1, xmm1, xmm0
vmovshdup xmm0, xmm9
vdivss xmm2, xmm2, xmm0
vcmpltss xmm3, xmm6, xmm0
vandps xmm2, xmm3, xmm2
xor eax, eax
mov r15, [rsp+288h+var_270]
lea r12, ggml_table_f32_f16
loc_B6CA4:
vmulss xmm3, xmm1, [rsp+rax*4+288h+var_218]
vaddss xmm4, xmm3, xmm5
vmulss xmm3, xmm2, [rsp+rax*4+288h+var_1F8]
vmovd ecx, xmm4
and ecx, ebx
mov esi, 3Fh ; '?'
cmp ecx, esi
jb short loc_B6CCB
mov ecx, 3Fh ; '?'
loc_B6CCB:
vaddss xmm3, xmm3, xmm5
vmovd edx, xmm3
and edx, ebx
cmp edx, esi
jb short loc_B6CDE
mov edx, 3Fh ; '?'
loc_B6CDE:
cmp rax, 3
ja short loc_B6CEE
mov [rbp+rax-4], cl
mov [rbp+rax+0], dl
jmp short loc_B6D13
loc_B6CEE:
mov esi, ecx
and esi, 0Fh
mov edi, edx
shl edi, 4
or edi, esi
mov [rbp+rax+0], dil
shl cl, 2
and cl, 0C0h
or [rbp+rax-8], cl
shl dl, 2
and dl, 0C0h
or [rbp+rax-4], dl
loc_B6D13:
inc rax
cmp rax, 8
jnz short loc_B6CA4
vmovss xmm2, cs:dword_C7FC8
vdivss xmm1, xmm9, xmm2
vcvtps2ph xmm1, xmm1, 0
vmovd edx, xmm1
lea rsi, [r15+r15*8]
shl rsi, 4
mov rdi, [rsp+288h+var_278]
lea rax, [rdi+rsi]
mov [rdi+rsi], dx
vdivss xmm0, xmm0, xmm2
vcvtps2ph xmm0, xmm0, 0
vmovd ecx, xmm0
mov [rdi+rsi+2], cx
mov esi, 0FFFFh
and edx, esi
vmovss xmm0, dword ptr [r12+rdx*4]
and ecx, esi
mov rdx, r14
lea rsi, [rsp+288h+var_138]
xor edi, edi
loc_B6D76:
cmp rdi, 3
ja short loc_B6D90
mov r9b, [rax+rdi+4]
mov r8b, [rax+rdi+8]
and r9b, 3Fh
and r8b, 3Fh
jmp short loc_B6DBF
loc_B6D90:
mov r10b, [rax+rdi+8]
mov r11d, r10d
and r11b, 0Fh
mov r9b, [rax+rdi]
mov r8b, [rax+rdi+4]
shr r9b, 2
and r9b, 30h
or r9b, r11b
shr r10b, 4
shr r8b, 2
and r8b, 30h
or r8b, r10b
loc_B6DBF:
movzx r9d, r9b
vcvtsi2ss xmm1, xmm10, r9d
vmulss xmm2, xmm0, xmm1
vucomiss xmm2, xmm6
jnz short loc_B6DD4
jnp short loc_B6E4B
loc_B6DD4:
movzx r8d, r8b
vcvtsi2ss xmm1, xmm10, r8d
vmulss xmm1, xmm1, dword ptr [r12+rcx*4]
vbroadcastss ymm1, xmm1
vbroadcastss ymm2, xmm2
xor r8d, r8d
loc_B6DF0:
vaddps ymm3, ymm1, ymmword ptr [rdx+r8*4]
vdivps ymm3, ymm3, ymm2
vaddps ymm3, ymm3, ymm7
vbroadcastss ymm4, cs:dword_C7FA8
vpbroadcastd ymm5, cs:dword_C7FCC
vandps ymm3, ymm3, ymm4
vpminud ymm3, ymm3, ymm5
vpbroadcastd ymm4, cs:dword_C7FB0
vpmaxud ymm3, ymm3, ymm4
vextracti128 xmm4, ymm3, 1
vpshufb xmm4, xmm4, xmm8
vpshufb xmm3, xmm3, xmm8
vpunpckldq xmm3, xmm3, xmm4
vmovq qword ptr [rsi+r8], xmm3
add r8, 8
cmp r8, 20h ; ' '
jnz short loc_B6DF0
loc_B6E4B:
inc rdi
add rsi, 20h ; ' '
sub rdx, 0FFFFFFFFFFFFFF80h
cmp rdi, 8
jnz loc_B6D76
add rax, 10h
mov rcx, 0FFFFFFFFFFFFFFC0h
vmovdqu ymm1, [rsp+288h+var_238]
loc_B6E71:
vmovdqu ymm0, [rsp+rcx+288h+var_D8]
vpsllw ymm0, ymm0, 4
vpand ymm0, ymm0, ymm1
vpor ymm0, ymm0, [rsp+rcx+288h+var_F8]
vmovdqu ymmword ptr [rax], ymm0
add rax, 20h ; ' '
add rcx, 40h ; '@'
cmp rcx, 0C0h
jb short loc_B6E71
add r14, 400h
inc r15
add rbp, 90h
cmp r15, [rsp+288h+var_280]
jnz loc_B6B55
loc_B6EBD:
add rsp, 258h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
vzeroupper
retn
| void quantize_row_q4_K_reference(
long long a1,
long long a2,
int a3,
__m128 _XMM0,
double a5,
__m128 _XMM2,
__m128 _XMM3,
__m128 _XMM4,
__m128 _XMM5,
__m128 _XMM6,
__m128 a11)
{
long long v14; // rbp
long long v15; // r15
unsigned long long v44; // rax
_WORD *v54; // rax
long long v58; // rdx
unsigned long long i; // rdi
bool v61; // zf
bool v62; // pf
unsigned __int8 v63; // r10
long long v88; // [rsp+8h] [rbp-280h]
long long v90; // [rsp+18h] [rbp-270h]
_DWORD v94[16]; // [rsp+70h] [rbp-218h] BYREF
_BYTE v95[32]; // [rsp+B0h] [rbp-1D8h] BYREF
__m256 v96; // [rsp+D0h] [rbp-1B8h] BYREF
_OWORD v97[4]; // [rsp+150h] [rbp-138h] BYREF
if ( a3 >= 256 )
{
v88 = (unsigned int)a3 >> 8;
v14 = a2 + 8;
v15 = 0LL;
__asm
{
vxorps xmm6, xmm6, xmm6
vbroadcastss ymm0, cs:dword_C4290
vmovups [rsp+288h+var_258], ymm0
vpbroadcastb ymm1, cs:byte_C8002
vmovdqu [rsp+288h+var_238], ymm1
}
do
{
v90 = v15;
__asm { vxorps xmm9, xmm9, xmm9 }
_R15 = a1;
_R12 = 0LL;
do
{
__asm { vxorps xmm0, xmm0, xmm0 }
for ( _RAX = 0LL; _RAX != 32; ++_RAX )
{
__asm
{
vmovss xmm1, dword ptr [r15+rax*4]
vfmadd231ss xmm0, xmm1, xmm1
}
}
__asm
{
vmulss xmm0, xmm0, cs:dword_C7FC4
vucomiss xmm0, xmm6
vmovaps [rsp+288h+var_268], xmm9
vsqrtss xmm0, xmm0, xmm0
vmovups ymm2, [rsp+288h+var_258]
vbroadcastss ymm0, xmm0
}
for ( _RAX = 0LL; _RAX != 32; _RAX += 8LL )
{
__asm
{
vandps ymm1, ymm2, ymmword ptr [r15+rax*4]
vaddps ymm1, ymm0, ymm1
vmovups [rsp+rax*4+288h+var_1B8], ymm1
}
}
__asm
{
vmovss xmm0, cs:dword_BC908
vzeroupper
}
_XMM0 = make_qkx2_quants(
32,
15,
a1 + (_R12 << 7),
(long long)&v96,
(long long)&v97[2 * _R12],
(long long)&v94[_R12 + 8],
_XMM0,
*(double *)&_XMM1,
*(double *)_XMM2.m128_u64,
_XMM3,
_XMM4,
_XMM5,
_XMM6,
a11,
(long long)v95,
20,
0);
__asm
{
vmovss [rsp+r12*4+288h+var_218], xmm0
vinsertps xmm0, xmm0, dword ptr [r13+0], 10h
vmovaps xmm9, [rsp+288h+var_268]
vmaxps xmm9, xmm0, xmm9
}
++_R12;
_R15 += 128LL;
__asm
{
vxorps xmm6, xmm6, xmm6
vmovss xmm5, cs:dword_C7FA4
vbroadcastss ymm7, cs:dword_C7FA4
vmovd xmm8, cs:dword_C8300
}
}
while ( _R12 != 8 );
__asm
{
vmovss xmm2, cs:dword_C7FC8
vdivss xmm0, xmm2, xmm9
vcmpltss xmm1, xmm6, xmm9
vandps xmm1, xmm1, xmm0
vmovshdup xmm0, xmm9
vdivss xmm2, xmm2, xmm0
vcmpltss xmm3, xmm6, xmm0
vandps xmm2, xmm3, xmm2
}
v44 = 0LL;
_R12 = &ggml_table_f32_f16;
do
{
__asm
{
vmulss xmm3, xmm1, [rsp+rax*4+288h+var_218]
vaddss xmm4, xmm3, xmm5
vmulss xmm3, xmm2, [rsp+rax*4+288h+var_1F8]
vmovd ecx, xmm4
}
if ( (unsigned __int8)_ECX >= 0x3Fu )
LOBYTE(_ECX) = 63;
__asm
{
vaddss xmm3, xmm3, xmm5
vmovd edx, xmm3
}
if ( (unsigned __int8)_EDX >= 0x3Fu )
LOBYTE(_EDX) = 63;
if ( v44 > 3 )
{
*(_BYTE *)(v14 + v44) = _ECX & 0xF | (16 * _EDX);
*(_BYTE *)(v14 + v44 - 8) |= (4 * _ECX) & 0xC0;
*(_BYTE *)(v14 + v44 - 4) |= (4 * _EDX) & 0xC0;
}
else
{
*(_BYTE *)(v14 + v44 - 4) = _ECX;
*(_BYTE *)(v14 + v44) = _EDX;
}
++v44;
}
while ( v44 != 8 );
__asm
{
vmovss xmm2, cs:dword_C7FC8
vdivss xmm1, xmm9, xmm2
vcvtps2ph xmm1, xmm1, 0
vmovd edx, xmm1
}
v54 = (_WORD *)(a2 + 144 * v90);
*v54 = _RDX;
__asm
{
vdivss xmm0, xmm0, xmm2
vcvtps2ph xmm0, xmm0, 0
vmovd ecx, xmm0
}
v54[1] = _ECX;
_RDX = (unsigned __int16)_RDX;
__asm { vmovss xmm0, dword ptr [r12+rdx*4] }
v58 = a1;
_RSI = v97;
for ( i = 0LL; i != 8; ++i )
{
if ( i > 3 )
{
v63 = *((_BYTE *)v54 + i + 8);
v61 = ((v63 >> 4) | (*((_BYTE *)v54 + i + 4) >> 2) & 0x30) == 0;
v62 = __SETP__((v63 >> 4) | (*((_BYTE *)v54 + i + 4) >> 2) & 0x30, 0);
}
else
{
v61 = (*((_BYTE *)v54 + i + 8) & 0x3F) == 0;
v62 = __SETP__(*((_BYTE *)v54 + i + 8) & 0x3F, 0);
}
__asm
{
vcvtsi2ss xmm1, xmm10, r9d
vmulss xmm2, xmm0, xmm1
vucomiss xmm2, xmm6
}
if ( !v61 || v62 )
{
__asm
{
vcvtsi2ss xmm1, xmm10, r8d
vmulss xmm1, xmm1, dword ptr [r12+rcx*4]
vbroadcastss ymm1, xmm1
vbroadcastss ymm2, xmm2
}
for ( _R8 = 0LL; _R8 != 32; _R8 += 8LL )
{
__asm
{
vaddps ymm3, ymm1, ymmword ptr [rdx+r8*4]
vdivps ymm3, ymm3, ymm2
vaddps ymm3, ymm3, ymm7
vbroadcastss ymm4, cs:dword_C7FA8
vpbroadcastd ymm5, cs:dword_C7FCC
vandps ymm3, ymm3, ymm4
vpminud ymm3, ymm3, ymm5
vpbroadcastd ymm4, cs:dword_C7FB0
vpmaxud ymm3, ymm3, ymm4
vextracti128 xmm4, ymm3, 1
vpshufb xmm4, xmm4, xmm8
vpshufb xmm3, xmm3, xmm8
vpunpckldq xmm3, xmm3, xmm4
vmovq qword ptr [rsi+r8], xmm3
}
}
}
_RSI += 2;
v58 += 128LL;
}
_RAX = v54 + 8;
_RCX = -64LL;
__asm { vmovdqu ymm1, [rsp+288h+var_238] }
do
{
__asm
{
vmovdqu ymm0, [rsp+rcx+288h+var_D8]
vpsllw ymm0, ymm0, 4
vpand ymm0, ymm0, ymm1
vpor ymm0, ymm0, [rsp+rcx+288h+var_F8]
vmovdqu ymmword ptr [rax], ymm0
}
_RAX += 16;
_RCX += 64LL;
}
while ( _RCX < 0xC0 );
a1 += 1024LL;
v15 = v90 + 1;
v14 += 144LL;
}
while ( v90 + 1 != v88 );
}
__asm { vzeroupper }
}
| |||
43,881 | init_functions | eloqsql/mysys/mf_iocache.c | static void
init_functions(IO_CACHE* info)
{
enum cache_type type= info->type;
info->read_function = 0; /* Force a core if used */
info->write_function = 0; /* Force a core if used */
switch (type) {
case READ_NET:
/*
Must be initialized by the caller. The problem is that
_my_b_net_read has to be defined in sql directory because of
the dependency on THD, and therefore cannot be visible to
programs that link against mysys but know nothing about THD, such
as myisamchk
*/
DBUG_ASSERT(!(info->myflags & MY_ENCRYPT));
break;
case SEQ_READ_APPEND:
info->read_function = _my_b_seq_read;
DBUG_ASSERT(!(info->myflags & MY_ENCRYPT));
break;
case READ_CACHE:
if (info->myflags & MY_ENCRYPT)
{
DBUG_ASSERT(info->share == 0);
info->read_function = _my_b_encr_read;
break;
}
/* fall through */
case WRITE_CACHE:
if (info->myflags & MY_ENCRYPT)
{
info->write_function = _my_b_encr_write;
break;
}
/* fall through */
case READ_FIFO:
DBUG_ASSERT(!(info->myflags & MY_ENCRYPT));
info->read_function = info->share ? _my_b_cache_read_r : _my_b_cache_read;
info->write_function = info->share ? _my_b_cache_write_r : _my_b_cache_write;
break;
case TYPE_NOT_SET:
DBUG_ASSERT(0);
break;
}
if (type == READ_CACHE || type == WRITE_CACHE || type == SEQ_READ_APPEND)
info->myflags|= MY_FULL_IO;
else
info->myflags&= ~MY_FULL_IO;
} | O3 | c | init_functions:
pushq %rbp
movq %rsp, %rbp
movl 0xb0(%rdi), %eax
xorps %xmm0, %xmm0
movups %xmm0, 0xa0(%rdi)
decl %eax
cmpl $0x3, %eax
ja 0x95589
leaq 0xa0(%rdi), %rcx
leaq 0x8174c(%rip), %rdx # 0x116c74
movslq (%rdx,%rax,4), %rsi
addq %rdx, %rsi
jmpq *%rsi
testb $0x40, 0xf8(%rdi)
je 0x9554f
leaq 0x3d3167(%rip), %rax # 0x4686a8
movq (%rax), %rax
jmp 0x955a3
testb $0x40, 0xf8(%rdi)
jne 0x955a8
cmpq $0x0, 0x98(%rdi)
leaq 0x18ea(%rip), %rcx # 0x96e48
leaq 0x8b1(%rip), %rdx # 0x95e16
cmoveq %rcx, %rdx
movq %rdx, 0xa0(%rdi)
leaq 0x1cea(%rip), %rcx # 0x97261
leaq 0xbde(%rip), %rdx # 0x9615c
cmoveq %rcx, %rdx
movq %rdx, 0xa8(%rdi)
cmpl $0x2, %eax
jbe 0x955b9
movl $0xfffffdff, %eax # imm = 0xFFFFFDFF
andq %rax, 0xf8(%rdi)
jmp 0x955c0
leaq 0x1409(%rip), %rax # 0x969ac
movq %rax, (%rcx)
jmp 0x955b9
leaq 0x3d3101(%rip), %rax # 0x4686b0
movq (%rax), %rax
movq %rax, 0xa8(%rdi)
orb $0x2, 0xf9(%rdi)
popq %rbp
retq
| init_functions:
push rbp
mov rbp, rsp
mov eax, [rdi+0B0h]
xorps xmm0, xmm0
movups xmmword ptr [rdi+0A0h], xmm0
dec eax; switch 4 cases
cmp eax, 3
ja short def_9552F; jumptable 000000000009552F default case
lea rcx, [rdi+0A0h]
lea rdx, jpt_9552F
movsxd rsi, ds:(jpt_9552F - 116C74h)[rdx+rax*4]
add rsi, rdx
jmp rsi; switch jump
loc_95531:
test byte ptr [rdi+0F8h], 40h; jumptable 000000000009552F case 1
jz short loc_9554F; jumptable 000000000009552F case 4
lea rax, _my_b_encr_read
mov rax, [rax]
jmp short loc_955A3
loc_95546:
test byte ptr [rdi+0F8h], 40h; jumptable 000000000009552F case 2
jnz short loc_955A8
loc_9554F:
cmp qword ptr [rdi+98h], 0; jumptable 000000000009552F case 4
lea rcx, _my_b_cache_read
lea rdx, _my_b_cache_read_r
cmovz rdx, rcx
mov [rdi+0A0h], rdx
lea rcx, _my_b_cache_write
lea rdx, _my_b_cache_write_r
cmovz rdx, rcx
mov [rdi+0A8h], rdx
def_9552F:
cmp eax, 2; jumptable 000000000009552F default case
jbe short loc_955B9
mov eax, 0FFFFFDFFh
and [rdi+0F8h], rax
jmp short loc_955C0
loc_9559C:
lea rax, _my_b_seq_read; jumptable 000000000009552F case 3
loc_955A3:
mov [rcx], rax
jmp short loc_955B9
loc_955A8:
lea rax, _my_b_encr_write
mov rax, [rax]
mov [rdi+0A8h], rax
loc_955B9:
or byte ptr [rdi+0F9h], 2
loc_955C0:
pop rbp
retn
| long long init_functions(long long a1)
{
int v1; // eax
long long result; // rax
bool v3; // zf
long long ( *v4)(); // rdx
long long ( *v5)(); // rdx
v1 = *(_DWORD *)(a1 + 176);
*(_OWORD *)(a1 + 160) = 0LL;
result = (unsigned int)(v1 - 1);
switch ( (int)result )
{
case 0:
if ( (*(_BYTE *)(a1 + 248) & 0x40) == 0 )
goto LABEL_5;
result = my_b_encr_read;
goto LABEL_13;
case 1:
if ( (*(_BYTE *)(a1 + 248) & 0x40) == 0 )
goto LABEL_5;
result = my_b_encr_write;
*(_QWORD *)(a1 + 168) = my_b_encr_write;
goto LABEL_15;
case 2:
result = (long long)my_b_seq_read;
LABEL_13:
*(_QWORD *)(a1 + 160) = result;
goto LABEL_15;
case 3:
LABEL_5:
v3 = *(_QWORD *)(a1 + 152) == 0LL;
v4 = my_b_cache_read_r;
if ( !*(_QWORD *)(a1 + 152) )
v4 = my_b_cache_read;
*(_QWORD *)(a1 + 160) = v4;
v5 = my_b_cache_write_r;
if ( v3 )
v5 = my_b_cache_write;
*(_QWORD *)(a1 + 168) = v5;
goto LABEL_10;
default:
LABEL_10:
if ( (unsigned int)result <= 2 )
{
LABEL_15:
*(_BYTE *)(a1 + 249) |= 2u;
}
else
{
result = 4294966783LL;
*(_QWORD *)(a1 + 248) &= 0xFFFFFDFFuLL;
}
return result;
}
}
| init_functions:
PUSH RBP
MOV RBP,RSP
MOV EAX,dword ptr [RDI + 0xb0]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0xa0],XMM0
DEC EAX
CMP EAX,0x3
JA 0x00195589
LEA RCX,[RDI + 0xa0]
LEA RDX,[0x216c74]
MOVSXD RSI,dword ptr [RDX + RAX*0x4]
ADD RSI,RDX
switchD:
JMP RSI
caseD_0:
TEST byte ptr [RDI + 0xf8],0x40
JZ 0x0019554f
LEA RAX,[0x5686a8]
MOV RAX,qword ptr [RAX]
JMP 0x001955a3
caseD_1:
TEST byte ptr [RDI + 0xf8],0x40
JNZ 0x001955a8
caseD_3:
CMP qword ptr [RDI + 0x98],0x0
LEA RCX,[0x196e48]
LEA RDX,[0x195e16]
CMOVZ RDX,RCX
MOV qword ptr [RDI + 0xa0],RDX
LEA RCX,[0x197261]
LEA RDX,[0x19615c]
CMOVZ RDX,RCX
MOV qword ptr [RDI + 0xa8],RDX
LAB_00195589:
CMP EAX,0x2
JBE 0x001955b9
MOV EAX,0xfffffdff
AND qword ptr [RDI + 0xf8],RAX
JMP 0x001955c0
caseD_2:
LEA RAX,[0x1969ac]
LAB_001955a3:
MOV qword ptr [RCX],RAX
JMP 0x001955b9
LAB_001955a8:
LEA RAX,[0x5686b0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RDI + 0xa8],RAX
LAB_001955b9:
OR byte ptr [RDI + 0xf9],0x2
LAB_001955c0:
POP RBP
RET
|
void init_functions(long param_1)
{
uint uVar1;
code *pcVar2;
bool bVar3;
*(int8 *)(param_1 + 0xa0) = 0;
*(int8 *)(param_1 + 0xa8) = 0;
uVar1 = *(int *)(param_1 + 0xb0) - 1;
if (3 < uVar1) goto LAB_00195589;
switch(uVar1) {
case 0:
pcVar2 = _my_b_encr_read;
if ((*(byte *)(param_1 + 0xf8) & 0x40) == 0) goto switchD_0019552f_caseD_3;
break;
case 1:
if ((*(byte *)(param_1 + 0xf8) & 0x40) != 0) {
*(int8 *)(param_1 + 0xa8) = _my_b_encr_write;
goto LAB_001955b9;
}
case 3:
switchD_0019552f_caseD_3:
bVar3 = *(long *)(param_1 + 0x98) == 0;
pcVar2 = _my_b_cache_read_r;
if (bVar3) {
pcVar2 = _my_b_cache_read;
}
*(code **)(param_1 + 0xa0) = pcVar2;
pcVar2 = _my_b_cache_write_r;
if (bVar3) {
pcVar2 = _my_b_cache_write;
}
*(code **)(param_1 + 0xa8) = pcVar2;
LAB_00195589:
if (2 < uVar1) {
*(ulong *)(param_1 + 0xf8) = *(ulong *)(param_1 + 0xf8) & 0xfffffdff;
return;
}
goto LAB_001955b9;
case 2:
pcVar2 = _my_b_seq_read;
}
*(code **)(param_1 + 0xa0) = pcVar2;
LAB_001955b9:
*(byte *)(param_1 + 0xf9) = *(byte *)(param_1 + 0xf9) | 2;
return;
}
| |
43,882 | parse_connection_string | eloqsql/libmariadb/libmariadb/mariadb_lib.c | static int parse_connection_string(MYSQL *mysql, const char *unused __attribute__((unused)),
const char *conn_str, ssize_t len)
{
char *conn_save,
*end, *pos,
*key= NULL, *val= NULL;
my_bool in_curly_brace= 0;
if (len == -1)
len= strlen(conn_str);
/* don't modify original dsn */
conn_save= (char *)malloc(len + 1);
memcpy(conn_save, conn_str, len);
conn_save[len]= 0;
/* start and end */
pos= conn_save;
end= conn_save + len;
while (pos <= end)
{
/* ignore white space, unless it is between curly braces */
if (isspace(*pos) && !in_curly_brace)
{
pos++;
continue;
}
switch (*pos) {
case '{':
if (!key)
goto error;
if (!in_curly_brace)
{
in_curly_brace= 1;
if (pos < end)
{
pos++;
val= pos;
continue;
}
}
break;
case '}':
if (in_curly_brace)
{
if (!key)
goto error;
if (pos < end && *(pos + 1) == '}')
{
memmove(pos, pos + 1, end - pos - 1);
end--;
pos += 2;
continue;
}
if (in_curly_brace)
in_curly_brace= 0;
else
goto error;
*pos++= 0;
continue;
}
break;
case '=':
if (in_curly_brace)
{
pos++;
continue;
}
if (!key)
goto error;
*pos++= 0;
if (pos < end)
val= pos;
continue;
break;
case ';':
if (in_curly_brace)
{
pos++;
continue;
}
if (!key)
goto error;
*pos++= 0;
if (key && strcasecmp(key, "connection") != 0)
_mariadb_set_conf_option(mysql, key, val);
key= val= NULL;
continue;
break;
}
if (!key && *pos)
key= pos;
pos++;
}
if (key && strcasecmp(key, "connection") != 0)
_mariadb_set_conf_option(mysql, key, val);
free(conn_save);
return 0;
error:
my_set_error(mysql, CR_CONNSTR_PARSE_ERROR, SQLSTATE_UNKNOWN, 0, pos - conn_save);
free(conn_save);
return 1;
} | O3 | c | parse_connection_string:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r15
movq %rdx, %r14
movq %rdi, %rbx
cmpq $-0x1, %rcx
jne 0x1ab5d
movq %r14, %rdi
callq 0x131c0
movq %rax, %r15
leaq 0x1(%r15), %rdi
callq 0x13620
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x133a0
movb $0x0, (%r12,%r15)
testq %r15, %r15
js 0x1ad18
movq %rbx, -0x38(%rbp)
addq %r12, %r15
xorl %ebx, %ebx
callq 0x134d0
movq %rax, %r14
xorl %esi, %esi
xorl %r13d, %r13d
movq %r12, -0x30(%rbp)
movq (%r14), %rcx
movsbq (%r12), %rax
testb $0x20, 0x1(%rcx,%rax,2)
sete %cl
testb %bl, %bl
setne %dl
orb %cl, %dl
je 0x1ac82
movzbl %al, %eax
cmpl $0x7a, %eax
jg 0x1abf3
cmpl $0x3b, %eax
je 0x1ac2c
cmpl $0x3d, %eax
jne 0x1acc8
testb %bl, %bl
jne 0x1ac30
testq %r13, %r13
je 0x1ad23
movb $0x0, (%r12)
incq %r12
cmpq %r15, %r12
cmovbq %r12, %rsi
jmp 0x1ac85
cmpl $0x7d, %eax
je 0x1ac3a
cmpl $0x7b, %eax
jne 0x1acc8
testq %r13, %r13
je 0x1ad23
testb %bl, %bl
setne %al
cmpq %r15, %r12
setae %cl
orb %al, %cl
movb $0x1, %bl
jne 0x1acd9
incq %r12
movb $0x1, %bl
movq %r12, %rsi
jmp 0x1acdc
testb %bl, %bl
je 0x1ac89
incq %r12
movb $0x1, %bl
jmp 0x1acdc
testb %bl, %bl
je 0x1acc6
testq %r13, %r13
je 0x1ad23
cmpq %r15, %r12
jae 0x1ac7d
cmpb $0x7d, 0x1(%r12)
jne 0x1ac7d
movq %rsi, %rbx
leaq 0x1(%r12), %rsi
movq %r12, %rdx
notq %rdx
addq %r15, %rdx
movq %r12, %rdi
callq 0x13750
movq %rbx, %rsi
decq %r15
addq $0x2, %r12
jmp 0x1ac33
movb $0x0, (%r12)
incq %r12
xorl %ebx, %ebx
jmp 0x1acdc
testq %r13, %r13
je 0x1ad23
movq %rsi, %rbx
movb $0x0, (%r12)
incq %r12
movq %r13, %rdi
leaq 0x2042a(%rip), %rsi # 0x3b0d1
callq 0x134e0
testl %eax, %eax
je 0x1acbf
movq -0x38(%rbp), %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x1ad6c
xorl %r13d, %r13d
xorl %esi, %esi
jmp 0x1ac85
xorl %ebx, %ebx
testq %r13, %r13
jne 0x1acd9
testl %eax, %eax
je 0x1acd6
movq %r12, %r13
jmp 0x1acd9
xorl %r13d, %r13d
incq %r12
cmpq %r15, %r12
jbe 0x1ab9f
xorl %r14d, %r14d
testq %r13, %r13
je 0x1ad1d
movq %rsi, %rbx
leaq 0x203da(%rip), %rsi # 0x3b0d1
movq %r13, %rdi
callq 0x134e0
testl %eax, %eax
movq -0x30(%rbp), %r12
je 0x1ad52
movq -0x38(%rbp), %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x1ad6c
jmp 0x1ad52
xorl %r14d, %r14d
jmp 0x1ad52
movq -0x30(%rbp), %r12
jmp 0x1ad52
leaq 0x352d6(%rip), %rax # 0x50000
movq (%rax), %rdx
movq -0x30(%rbp), %rax
subq %rax, %r12
movq -0x38(%rbp), %rdi
movl $0x1393, %esi # imm = 0x1393
xorl %ecx, %ecx
movq %r12, %r8
movq %rax, %r12
xorl %eax, %eax
callq 0x1a0a1
movl $0x1, %r14d
movq %r12, %rdi
callq 0x13580
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| parse_connection_string:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15, rcx
mov r14, rdx
mov rbx, rdi
cmp rcx, 0FFFFFFFFFFFFFFFFh
jnz short loc_1AB5D
mov rdi, r14
call _strlen
mov r15, rax
loc_1AB5D:
lea rdi, [r15+1]
call _malloc
mov r12, rax
mov rdi, rax
mov rsi, r14
mov rdx, r15
call _memcpy
mov byte ptr [r12+r15], 0
test r15, r15
js loc_1AD18
mov [rbp+var_38], rbx
add r15, r12
xor ebx, ebx
call ___ctype_b_loc
mov r14, rax
xor esi, esi
xor r13d, r13d
mov [rbp+var_30], r12
loc_1AB9F:
mov rcx, [r14]
movsx rax, byte ptr [r12]
test byte ptr [rcx+rax*2+1], 20h
setz cl
test bl, bl
setnz dl
or dl, cl
jz loc_1AC82
movzx eax, al
cmp eax, 7Ah ; 'z'
jg short loc_1ABF3
cmp eax, 3Bh ; ';'
jz short loc_1AC2C
cmp eax, 3Dh ; '='
jnz loc_1ACC8
test bl, bl
jnz short loc_1AC30
test r13, r13
jz loc_1AD23
mov byte ptr [r12], 0
inc r12
cmp r12, r15
cmovb rsi, r12
jmp loc_1AC85
loc_1ABF3:
cmp eax, 7Dh ; '}'
jz short loc_1AC3A
cmp eax, 7Bh ; '{'
jnz loc_1ACC8
test r13, r13
jz loc_1AD23
test bl, bl
setnz al
cmp r12, r15
setnb cl
or cl, al
mov bl, 1
jnz loc_1ACD9
inc r12
mov bl, 1
mov rsi, r12
jmp loc_1ACDC
loc_1AC2C:
test bl, bl
jz short loc_1AC89
loc_1AC30:
inc r12
loc_1AC33:
mov bl, 1
jmp loc_1ACDC
loc_1AC3A:
test bl, bl
jz loc_1ACC6
test r13, r13
jz loc_1AD23
cmp r12, r15
jnb short loc_1AC7D
cmp byte ptr [r12+1], 7Dh ; '}'
jnz short loc_1AC7D
mov rbx, rsi
lea rsi, [r12+1]
mov rdx, r12
not rdx
add rdx, r15
mov rdi, r12
call _memmove
mov rsi, rbx
dec r15
add r12, 2
jmp short loc_1AC33
loc_1AC7D:
mov byte ptr [r12], 0
loc_1AC82:
inc r12
loc_1AC85:
xor ebx, ebx
jmp short loc_1ACDC
loc_1AC89:
test r13, r13
jz loc_1AD23
mov rbx, rsi
mov byte ptr [r12], 0
inc r12
mov rdi, r13
lea rsi, aConnection; "connection"
call _strcasecmp
test eax, eax
jz short loc_1ACBF
mov rdi, [rbp+var_38]
mov rsi, r13
mov rdx, rbx
call _mariadb_set_conf_option
loc_1ACBF:
xor r13d, r13d
xor esi, esi
jmp short loc_1AC85
loc_1ACC6:
xor ebx, ebx
loc_1ACC8:
test r13, r13
jnz short loc_1ACD9
test eax, eax
jz short loc_1ACD6
mov r13, r12
jmp short loc_1ACD9
loc_1ACD6:
xor r13d, r13d
loc_1ACD9:
inc r12
loc_1ACDC:
cmp r12, r15
jbe loc_1AB9F
xor r14d, r14d
test r13, r13
jz short loc_1AD1D
mov rbx, rsi
lea rsi, aConnection; "connection"
mov rdi, r13
call _strcasecmp
test eax, eax
mov r12, [rbp+var_30]
jz short loc_1AD52
mov rdi, [rbp+var_38]
mov rsi, r13
mov rdx, rbx
call _mariadb_set_conf_option
jmp short loc_1AD52
loc_1AD18:
xor r14d, r14d
jmp short loc_1AD52
loc_1AD1D:
mov r12, [rbp+var_30]
jmp short loc_1AD52
loc_1AD23:
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov rax, [rbp+var_30]
sub r12, rax
mov rdi, [rbp+var_38]
mov esi, 1393h
xor ecx, ecx
mov r8, r12
mov r12, rax
xor eax, eax
call my_set_error
mov r14d, 1
loc_1AD52:
mov rdi, r12
call _free
mov eax, r14d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long parse_connection_string(long long a1, long long a2, long long a3, long long a4)
{
long long v4; // r15
unsigned long long v6; // r12
unsigned long long v7; // r15
char v8; // bl
_QWORD *v9; // r14
unsigned long long v10; // rsi
unsigned long long v11; // r13
long long v12; // rax
bool v13; // zf
unsigned int v14; // r14d
unsigned long long v15; // r8
unsigned long long v17; // [rsp+10h] [rbp-30h]
v4 = a4;
if ( a4 == -1 )
v4 = strlen(a3);
v6 = malloc(v4 + 1);
memcpy(v6, a3, v4);
*(_BYTE *)(v6 + v4) = 0;
if ( v4 < 0 )
{
v14 = 0;
goto LABEL_47;
}
v7 = v6 + v4;
v8 = 0;
v9 = (_QWORD *)__ctype_b_loc();
v10 = 0LL;
v11 = 0LL;
v17 = v6;
do
{
v12 = *(char *)v6;
if ( (*(_BYTE *)(*v9 + 2 * v12 + 1) & 0x20) != 0 && v8 == 0 )
goto LABEL_28;
if ( (unsigned __int8)v12 > 0x7Au )
{
if ( (unsigned __int8)v12 == 125 )
{
if ( v8 )
{
if ( !v11 )
goto LABEL_46;
if ( v6 < v7 && *(_BYTE *)(v6 + 1) == 125 )
{
memmove(v6, v6 + 1, v7 + ~v6);
--v7;
v6 += 2LL;
goto LABEL_21;
}
*(_BYTE *)v6 = 0;
LABEL_28:
++v6;
LABEL_29:
v8 = 0;
continue;
}
v8 = 0;
}
else if ( (unsigned __int8)v12 == 123 )
{
if ( !v11 )
goto LABEL_46;
v13 = v8 == 0 && v6 < v7;
v8 = 1;
if ( v13 )
{
++v6;
v8 = 1;
v10 = v6;
continue;
}
goto LABEL_39;
}
}
else
{
if ( (unsigned __int8)v12 == 59 )
{
if ( v8 )
{
LABEL_20:
++v6;
LABEL_21:
v8 = 1;
continue;
}
if ( !v11 )
{
LABEL_46:
v15 = v6 - v17;
v6 = v17;
my_set_error(a1, 5011, (long long)SQLSTATE_UNKNOWN, 0LL, v15);
v14 = 1;
goto LABEL_47;
}
*(_BYTE *)v6++ = 0;
if ( (unsigned int)strcasecmp(v11, "connection") )
mariadb_set_conf_option(a1, v11, v10);
v11 = 0LL;
v10 = 0LL;
goto LABEL_29;
}
if ( (unsigned __int8)v12 == 61 )
{
if ( v8 )
goto LABEL_20;
if ( !v11 )
goto LABEL_46;
*(_BYTE *)v6++ = 0;
if ( v6 < v7 )
v10 = v6;
goto LABEL_29;
}
}
if ( !v11 )
{
if ( (_BYTE)v12 )
v11 = v6;
else
v11 = 0LL;
}
LABEL_39:
++v6;
}
while ( v6 <= v7 );
v14 = 0;
if ( v11 )
{
v6 = v17;
if ( (unsigned int)strcasecmp(v11, "connection") )
mariadb_set_conf_option(a1, v11, v10);
}
else
{
v6 = v17;
}
LABEL_47:
free(v6);
return v14;
}
| parse_connection_string:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15,RCX
MOV R14,RDX
MOV RBX,RDI
CMP RCX,-0x1
JNZ 0x0011ab5d
MOV RDI,R14
CALL 0x001131c0
MOV R15,RAX
LAB_0011ab5d:
LEA RDI,[R15 + 0x1]
CALL 0x00113620
MOV R12,RAX
MOV RDI,RAX
MOV RSI,R14
MOV RDX,R15
CALL 0x001133a0
MOV byte ptr [R12 + R15*0x1],0x0
TEST R15,R15
JS 0x0011ad18
MOV qword ptr [RBP + -0x38],RBX
ADD R15,R12
XOR EBX,EBX
CALL 0x001134d0
MOV R14,RAX
XOR ESI,ESI
XOR R13D,R13D
MOV qword ptr [RBP + -0x30],R12
LAB_0011ab9f:
MOV RCX,qword ptr [R14]
MOVSX RAX,byte ptr [R12]
TEST byte ptr [RCX + RAX*0x2 + 0x1],0x20
SETZ CL
TEST BL,BL
SETNZ DL
OR DL,CL
JZ 0x0011ac82
MOVZX EAX,AL
CMP EAX,0x7a
JG 0x0011abf3
CMP EAX,0x3b
JZ 0x0011ac2c
CMP EAX,0x3d
JNZ 0x0011acc8
TEST BL,BL
JNZ 0x0011ac30
TEST R13,R13
JZ 0x0011ad23
MOV byte ptr [R12],0x0
INC R12
CMP R12,R15
CMOVC RSI,R12
JMP 0x0011ac85
LAB_0011abf3:
CMP EAX,0x7d
JZ 0x0011ac3a
CMP EAX,0x7b
JNZ 0x0011acc8
TEST R13,R13
JZ 0x0011ad23
TEST BL,BL
SETNZ AL
CMP R12,R15
SETNC CL
OR CL,AL
MOV BL,0x1
JNZ 0x0011acd9
INC R12
MOV BL,0x1
MOV RSI,R12
JMP 0x0011acdc
LAB_0011ac2c:
TEST BL,BL
JZ 0x0011ac89
LAB_0011ac30:
INC R12
LAB_0011ac33:
MOV BL,0x1
JMP 0x0011acdc
LAB_0011ac3a:
TEST BL,BL
JZ 0x0011acc6
TEST R13,R13
JZ 0x0011ad23
CMP R12,R15
JNC 0x0011ac7d
CMP byte ptr [R12 + 0x1],0x7d
JNZ 0x0011ac7d
MOV RBX,RSI
LEA RSI,[R12 + 0x1]
MOV RDX,R12
NOT RDX
ADD RDX,R15
MOV RDI,R12
CALL 0x00113750
MOV RSI,RBX
DEC R15
ADD R12,0x2
JMP 0x0011ac33
LAB_0011ac7d:
MOV byte ptr [R12],0x0
LAB_0011ac82:
INC R12
LAB_0011ac85:
XOR EBX,EBX
JMP 0x0011acdc
LAB_0011ac89:
TEST R13,R13
JZ 0x0011ad23
MOV RBX,RSI
MOV byte ptr [R12],0x0
INC R12
MOV RDI,R13
LEA RSI,[0x13b0d1]
CALL 0x001134e0
TEST EAX,EAX
JZ 0x0011acbf
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,R13
MOV RDX,RBX
CALL 0x0011ad6c
LAB_0011acbf:
XOR R13D,R13D
XOR ESI,ESI
JMP 0x0011ac85
LAB_0011acc6:
XOR EBX,EBX
LAB_0011acc8:
TEST R13,R13
JNZ 0x0011acd9
TEST EAX,EAX
JZ 0x0011acd6
MOV R13,R12
JMP 0x0011acd9
LAB_0011acd6:
XOR R13D,R13D
LAB_0011acd9:
INC R12
LAB_0011acdc:
CMP R12,R15
JBE 0x0011ab9f
XOR R14D,R14D
TEST R13,R13
JZ 0x0011ad1d
MOV RBX,RSI
LEA RSI,[0x13b0d1]
MOV RDI,R13
CALL 0x001134e0
TEST EAX,EAX
MOV R12,qword ptr [RBP + -0x30]
JZ 0x0011ad52
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,R13
MOV RDX,RBX
CALL 0x0011ad6c
JMP 0x0011ad52
LAB_0011ad18:
XOR R14D,R14D
JMP 0x0011ad52
LAB_0011ad1d:
MOV R12,qword ptr [RBP + -0x30]
JMP 0x0011ad52
LAB_0011ad23:
LEA RAX,[0x150000]
MOV RDX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x30]
SUB R12,RAX
MOV RDI,qword ptr [RBP + -0x38]
MOV ESI,0x1393
XOR ECX,ECX
MOV R8,R12
MOV R12,RAX
XOR EAX,EAX
CALL 0x0011a0a1
MOV R14D,0x1
LAB_0011ad52:
MOV RDI,R12
CALL 0x00113580
MOV EAX,R14D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
parse_connection_string(int8 param_1,int8 param_2,char *param_3,size_t param_4)
{
byte bVar1;
bool bVar2;
bool bVar3;
int iVar4;
byte *__dest;
ushort **ppuVar5;
byte *pbVar6;
byte *__dest_00;
byte *__s1;
int8 uVar7;
byte *pbVar8;
if (param_4 == 0xffffffffffffffff) {
param_4 = strlen(param_3);
}
__dest = (byte *)malloc(param_4 + 1);
memcpy(__dest,param_3,param_4);
__dest[param_4] = 0;
if ((long)param_4 < 0) {
uVar7 = 0;
}
else {
pbVar8 = __dest + param_4;
bVar2 = false;
ppuVar5 = __ctype_b_loc();
pbVar6 = (byte *)0x0;
__s1 = (byte *)0x0;
__dest_00 = __dest;
do {
bVar1 = *__dest_00;
if (!bVar2 && (*(byte *)((long)*ppuVar5 + (long)(char)bVar1 * 2 + 1) & 0x20) != 0)
goto LAB_0011ac85;
if (bVar1 < 0x7b) {
if (bVar1 == 0x3b) {
if (bVar2) {
LAB_0011ac30:
__dest_00 = __dest_00 + 1;
LAB_0011ac33:
bVar2 = true;
goto LAB_0011acdc;
}
if (__s1 == (byte *)0x0) goto LAB_0011ad23;
*__dest_00 = 0;
iVar4 = strcasecmp((char *)__s1,"connection");
if (iVar4 != 0) {
_mariadb_set_conf_option(param_1,__s1,pbVar6);
}
__s1 = (byte *)0x0;
pbVar6 = (byte *)0x0;
}
else {
if (bVar1 != 0x3d) goto LAB_0011acc8;
if (bVar2) goto LAB_0011ac30;
if (__s1 == (byte *)0x0) goto LAB_0011ad23;
*__dest_00 = 0;
if (__dest_00 + 1 < pbVar8) {
pbVar6 = __dest_00 + 1;
}
}
LAB_0011ac85:
bVar2 = false;
__dest_00 = __dest_00 + 1;
}
else {
if (bVar1 == 0x7d) {
if (bVar2) {
if (__s1 == (byte *)0x0) goto LAB_0011ad23;
if ((pbVar8 <= __dest_00) || (__dest_00[1] != 0x7d)) {
*__dest_00 = 0;
goto LAB_0011ac85;
}
memmove(__dest_00,__dest_00 + 1,(size_t)(pbVar8 + ~(ulong)__dest_00));
pbVar8 = pbVar8 + -1;
__dest_00 = __dest_00 + 2;
goto LAB_0011ac33;
}
bVar2 = false;
LAB_0011acc8:
if ((__s1 == (byte *)0x0) && (__s1 = __dest_00, bVar1 == 0)) {
__s1 = (byte *)0x0;
}
}
else {
if (bVar1 != 0x7b) goto LAB_0011acc8;
if (__s1 == (byte *)0x0) {
LAB_0011ad23:
my_set_error(param_1,0x1393,SQLSTATE_UNKNOWN,0,(long)__dest_00 - (long)__dest);
uVar7 = 1;
goto LAB_0011ad52;
}
bVar3 = !bVar2;
bVar2 = true;
if (__dest_00 < pbVar8 && bVar3) {
pbVar6 = __dest_00 + 1;
bVar2 = true;
__dest_00 = pbVar6;
goto LAB_0011acdc;
}
}
__dest_00 = __dest_00 + 1;
}
LAB_0011acdc:
} while (__dest_00 <= pbVar8);
uVar7 = 0;
if ((__s1 != (byte *)0x0) && (iVar4 = strcasecmp((char *)__s1,"connection"), iVar4 != 0)) {
_mariadb_set_conf_option(param_1,__s1,pbVar6);
}
}
LAB_0011ad52:
free(__dest);
return uVar7;
}
| |
43,883 | mi_split_page | eloqsql/storage/myisam/mi_write.c | int _mi_split_page(register MI_INFO *info, register MI_KEYDEF *keyinfo,
uchar *key, uchar *buff, uchar *key_buff,
my_bool insert_last_key)
{
uint length,a_length,key_ref_length,t_length,nod_flag,key_length;
uchar *key_pos,*pos, *UNINIT_VAR(after_key);
my_off_t new_pos;
MI_KEY_PARAM s_temp;
DBUG_ENTER("mi_split_page");
DBUG_DUMP("buff",(uchar*) buff,mi_getint(buff));
if (info->s->keyinfo+info->lastinx == keyinfo)
info->page_changed=1; /* Info->buff is used */
info->buff_used=1;
nod_flag=mi_test_if_nod(buff);
key_ref_length=2+nod_flag;
if (insert_last_key)
key_pos=_mi_find_last_pos(keyinfo,buff,key_buff, &key_length, &after_key);
else
key_pos=_mi_find_half_pos(nod_flag,keyinfo,buff,key_buff, &key_length,
&after_key);
if (!key_pos)
DBUG_RETURN(-1);
length=(uint) (key_pos-buff);
a_length=mi_getint(buff);
mi_putint(buff,length,nod_flag);
key_pos=after_key;
if (nod_flag)
{
DBUG_PRINT("test",("Splitting nod"));
pos=key_pos-nod_flag;
memcpy((uchar*) info->buff+2,(uchar*) pos,(size_t) nod_flag);
}
/* Move middle item to key and pointer to new page */
if ((new_pos=_mi_new(info,keyinfo,DFLT_INIT_HITS)) == HA_OFFSET_ERROR)
DBUG_RETURN(-1);
_mi_kpointer(info,_mi_move_key(keyinfo,key,key_buff),new_pos);
/* Store new page */
if (!(*keyinfo->get_key)(keyinfo,nod_flag,&key_pos,key_buff))
DBUG_RETURN(-1);
t_length=(*keyinfo->pack_key)(keyinfo,nod_flag,(uchar *) 0,
(uchar*) 0, (uchar*) 0,
key_buff, &s_temp);
length=(uint) ((buff+a_length)-key_pos);
memcpy((uchar*) info->buff+key_ref_length+t_length,(uchar*) key_pos,
(size_t) length);
(*keyinfo->store_key)(keyinfo,info->buff+key_ref_length,&s_temp);
mi_putint(info->buff,length+t_length+key_ref_length,nod_flag);
if (_mi_write_keypage(info,keyinfo,new_pos,DFLT_INIT_HITS,info->buff))
DBUG_RETURN(-1);
DBUG_DUMP("key",(uchar*) key,_mi_keylength(keyinfo,key));
DBUG_RETURN(2); /* Middle key up */
} | O3 | c | mi_split_page:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x518, %rsp # imm = 0x518
movq %r8, %r13
movq %rdx, %r15
movq %rdi, %r12
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq (%rdi), %rdx
movslq 0x1d4(%rdi), %rax
imulq $0x70, %rax, %rax
addq 0x218(%rdx), %rax
cmpq %rsi, %rax
jne 0x45e03
movb $0x1, 0x33c(%r12)
movb $0x1, 0x33d(%r12)
movzbl (%rcx), %eax
xorl %edi, %edi
testb %al, %al
jns 0x45e1b
movl 0x17c(%rdx), %edi
testb %r9b, %r9b
movq %rsi, -0x518(%rbp)
movq %rdi, -0x530(%rbp)
movq %rcx, -0x528(%rbp)
je 0x45ed3
movq %r12, -0x508(%rbp)
movzbl 0x1(%rcx), %edx
andl $0x7f, %eax
shll $0x8, %eax
addl %edx, %eax
addl $-0x2, %eax
leaq 0x2(%rcx), %r12
movq %r12, -0x510(%rbp)
testb $0x2e, 0xa(%rsi)
je 0x45ef1
movq %r15, -0x4f8(%rbp)
movl %eax, %eax
leaq (%r12,%rax), %r15
addq $-0x2, %r15
movq %r13, -0x500(%rbp)
movb $0x0, (%r13)
xorl %eax, %eax
leaq -0x4f0(%rbp), %r14
movq %r12, %r13
movq %r13, %rbx
movq %r12, %r13
movl %eax, %edx
movq -0x500(%rbp), %rdi
movq %r14, %rsi
callq 0x282c0
movq -0x518(%rbp), %rdi
xorl %esi, %esi
leaq -0x510(%rbp), %rdx
movq %r14, %rcx
callq *0x48(%rdi)
testl %eax, %eax
je 0x45f27
movq -0x510(%rbp), %r12
cmpq %r15, %r12
jb 0x45e8d
movq %r13, -0x520(%rbp)
jmp 0x45f4f
leaq -0x534(%rbp), %r8
leaq -0x520(%rbp), %r9
movq %rcx, %rdx
movq %r13, %rcx
callq 0x46148
movq %rax, %rbx
jmp 0x45f64
movzwl 0x12(%rsi), %ecx
xorl %edx, %edx
divl %ecx
addl $-0x2, %eax
imull %ecx, %eax
addq %rax, %r12
leaq (%r12,%rcx), %rax
movq %rax, -0x520(%rbp)
movq %r13, %rdi
movq %r12, %rsi
movq %rcx, %rdx
callq 0x282c0
movq %r12, %rbx
movq -0x508(%rbp), %r12
jmp 0x45f64
movq -0x518(%rbp), %rax
movq (%rax), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %edi
callq 0x35bda
callq 0x5ecfe
movl $0x7e, (%rax)
xorl %ebx, %ebx
movq -0x508(%rbp), %r12
movq -0x500(%rbp), %r13
movq -0x4f8(%rbp), %r15
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
testq %rbx, %rbx
je 0x46120
movq -0x528(%rbp), %rcx
subq %rcx, %rbx
movzbl 0x1(%rcx), %eax
movq %rax, -0x4f8(%rbp)
movzbl (%rcx), %r14d
xorl %eax, %eax
movq -0x530(%rbp), %rdx
testl %edx, %edx
setne %al
shll $0xf, %eax
movq %rax, -0x508(%rbp)
addl %ebx, %eax
movb %bl, 0x1(%rcx)
movb %ah, (%rcx)
movq -0x520(%rbp), %rsi
movq %rsi, -0x510(%rbp)
testl %edx, %edx
je 0x45fd2
movl %edx, %edx
subq %rdx, %rsi
movq 0x100(%r12), %rdi
addq $0x2, %rdi
callq 0x282c0
movq %r12, %rdi
movq -0x518(%rbp), %rbx
movq %rbx, %rsi
movl $0x3, %edx
callq 0x3ebc2
movq %rax, -0x500(%rbp)
cmpq $-0x1, %rax
je 0x4611b
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x41ff7
movq %r12, %rdi
movq %rax, %rsi
movq -0x500(%rbp), %rdx
callq 0x4149d
leaq -0x510(%rbp), %rdx
movq %rbx, %rdi
movq -0x530(%rbp), %r15
movl %r15d, %esi
movq %r13, %rcx
callq *0x48(%rbx)
testl %eax, %eax
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
je 0x46120
andl $0x7f, %r14d
shll $0x8, %r14d
addq -0x4f8(%rbp), %r14
leal 0x2(%r15), %eax
movl %eax, -0x4f8(%rbp)
leaq -0x4f0(%rbp), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
movl %r15d, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r13, %r9
callq *0x50(%rbx)
movl %eax, %r15d
movq -0x528(%rbp), %r13
addq %r14, %r13
movq -0x510(%rbp), %rsi
subq %rsi, %r13
movl -0x4f8(%rbp), %r14d
movq 0x100(%r12), %rax
addq %r14, %rax
movl %r15d, %edi
addq %rax, %rdi
movl %r13d, %edx
callq 0x282c0
addq 0x100(%r12), %r14
movq %rbx, %rdi
movq %r14, %rsi
leaq -0x4f0(%rbp), %rdx
callq *0x58(%rbx)
addl -0x4f8(%rbp), %r15d
addl %r13d, %r15d
movq -0x508(%rbp), %rcx
addl %r15d, %ecx
movq 0x100(%r12), %rax
movb %r15b, 0x1(%rax)
movq 0x100(%r12), %rax
movb %ch, (%rax)
movq 0x100(%r12), %r8
movq %r12, %rdi
movq %rbx, %rsi
movq -0x500(%rbp), %rdx
movl $0x3, %ecx
callq 0x3ea10
xorl %ecx, %ecx
negl %eax
sbbl %ecx, %ecx
orl $0x2, %ecx
jmp 0x46120
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x46143
movl %ecx, %eax
addq $0x518, %rsp # imm = 0x518
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x28400
| _mi_split_page:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 518h
mov r13, r8
mov r15, rdx
mov r12, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rdx, [rdi]
movsxd rax, dword ptr [rdi+1D4h]
imul rax, 70h ; 'p'
add rax, [rdx+218h]
cmp rax, rsi
jnz short loc_45E03
mov byte ptr [r12+33Ch], 1
loc_45E03:
mov byte ptr [r12+33Dh], 1
movzx eax, byte ptr [rcx]
xor edi, edi
test al, al
jns short loc_45E1B
mov edi, [rdx+17Ch]
loc_45E1B:
test r9b, r9b
mov [rbp+var_518], rsi
mov [rbp+var_530], rdi
mov [rbp+var_528], rcx
jz loc_45ED3
mov [rbp+var_508], r12
movzx edx, byte ptr [rcx+1]
and eax, 7Fh
shl eax, 8
add eax, edx
add eax, 0FFFFFFFEh
lea r12, [rcx+2]
mov [rbp+var_510], r12
test byte ptr [rsi+0Ah], 2Eh
jz loc_45EF1
mov [rbp+var_4F8], r15
mov eax, eax
lea r15, [r12+rax]
add r15, 0FFFFFFFFFFFFFFFEh
mov [rbp+var_500], r13
mov byte ptr [r13+0], 0
xor eax, eax
lea r14, [rbp+var_4F0]
mov r13, r12
loc_45E8D:
mov rbx, r13
mov r13, r12
mov edx, eax
mov rdi, [rbp+var_500]
mov rsi, r14
call _memcpy
mov rdi, [rbp+var_518]
xor esi, esi
lea rdx, [rbp+var_510]
mov rcx, r14
call qword ptr [rdi+48h]
test eax, eax
jz short loc_45F27
mov r12, [rbp+var_510]
cmp r12, r15
jb short loc_45E8D
mov [rbp+var_520], r13
jmp short loc_45F4F
loc_45ED3:
lea r8, [rbp+var_534]
lea r9, [rbp+var_520]
mov rdx, rcx
mov rcx, r13
call _mi_find_half_pos
mov rbx, rax
jmp short loc_45F64
loc_45EF1:
movzx ecx, word ptr [rsi+12h]
xor edx, edx
div ecx
add eax, 0FFFFFFFEh
imul eax, ecx
add r12, rax
lea rax, [r12+rcx]
mov [rbp+var_520], rax
mov rdi, r13
mov rsi, r12
mov rdx, rcx
call _memcpy
mov rbx, r12
mov r12, [rbp+var_508]
jmp short loc_45F64
loc_45F27:
mov rax, [rbp+var_518]
mov rax, [rax]
mov rsi, [rax+268h]
mov edi, 7Eh ; '~'
call mi_report_error
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
xor ebx, ebx
loc_45F4F:
mov r12, [rbp+var_508]
mov r13, [rbp+var_500]
mov r15, [rbp+var_4F8]
loc_45F64:
mov ecx, 0FFFFFFFFh
test rbx, rbx
jz loc_46120
mov rcx, [rbp+var_528]
sub rbx, rcx
movzx eax, byte ptr [rcx+1]
mov [rbp+var_4F8], rax
movzx r14d, byte ptr [rcx]
xor eax, eax
mov rdx, [rbp+var_530]
test edx, edx
setnz al
shl eax, 0Fh
mov [rbp+var_508], rax
add eax, ebx
mov [rcx+1], bl
mov [rcx], ah
mov rsi, [rbp+var_520]
mov [rbp+var_510], rsi
test edx, edx
jz short loc_45FD2
mov edx, edx
sub rsi, rdx
mov rdi, [r12+100h]
add rdi, 2
call _memcpy
loc_45FD2:
mov rdi, r12
mov rbx, [rbp+var_518]
mov rsi, rbx
mov edx, 3
call _mi_new
mov [rbp+var_500], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jz loc_4611B
mov rdi, rbx
mov rsi, r15
mov rdx, r13
call _mi_move_key
mov rdi, r12
mov rsi, rax
mov rdx, [rbp+var_500]
call _mi_kpointer
lea rdx, [rbp+var_510]
mov rdi, rbx
mov r15, [rbp+var_530]
mov esi, r15d
mov rcx, r13
call qword ptr [rbx+48h]
test eax, eax
mov ecx, 0FFFFFFFFh
jz loc_46120
and r14d, 7Fh
shl r14d, 8
add r14, [rbp+var_4F8]
lea eax, [r15+2]
mov dword ptr [rbp+var_4F8], eax
lea rax, [rbp+var_4F0]
mov [rsp+540h+var_540], rax
mov rdi, rbx
mov esi, r15d
xor edx, edx
xor ecx, ecx
xor r8d, r8d
mov r9, r13
call qword ptr [rbx+50h]
mov r15d, eax
mov r13, [rbp+var_528]
add r13, r14
mov rsi, [rbp+var_510]
sub r13, rsi
mov r14d, dword ptr [rbp+var_4F8]
mov rax, [r12+100h]
add rax, r14
mov edi, r15d
add rdi, rax
mov edx, r13d
call _memcpy
add r14, [r12+100h]
mov rdi, rbx
mov rsi, r14
lea rdx, [rbp+var_4F0]
call qword ptr [rbx+58h]
add r15d, dword ptr [rbp+var_4F8]
add r15d, r13d
mov rcx, [rbp+var_508]
add ecx, r15d
mov rax, [r12+100h]
mov [rax+1], r15b
mov rax, [r12+100h]
mov [rax], ch
mov r8, [r12+100h]
mov rdi, r12
mov rsi, rbx
mov rdx, [rbp+var_500]
mov ecx, 3
call _mi_write_keypage
xor ecx, ecx
neg eax
sbb ecx, ecx
or ecx, 2
jmp short loc_46120
loc_4611B:
mov ecx, 0FFFFFFFFh
loc_46120:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_46143
mov eax, ecx
add rsp, 518h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_46143:
call ___stack_chk_fail
| long long mi_split_page(long long a1, unsigned __int16 *a2, long long a3, char *a4, unsigned __int8 *a5, char a6)
{
unsigned __int8 *v6; // r13
long long *v8; // r12
long long v9; // rdx
char v10; // al
long long v11; // rdi
unsigned int v12; // eax
char *v13; // r12
char *v14; // r15
unsigned int v15; // eax
char *v16; // r13
long long half_pos; // rbx
long long v18; // rcx
long long v19; // r12
const char *v20; // rsi
unsigned int v21; // ecx
char *v22; // rcx
__int16 v23; // bx
char v24; // r14
unsigned int v25; // edx
bool v26; // zf
__int16 v27; // ax
unsigned __int16 *v28; // rbx
_BYTE *v29; // rax
unsigned int v30; // r15d
int v31; // eax
int v32; // r14d
long long v33; // r15
unsigned int v34; // r13d
long long v35; // r14
__int16 v36; // cx
char v38[4]; // [rsp+Ch] [rbp-534h] BYREF
long long v39; // [rsp+10h] [rbp-530h]
char *v40; // [rsp+18h] [rbp-528h]
char *v41; // [rsp+20h] [rbp-520h] BYREF
unsigned __int16 *v42; // [rsp+28h] [rbp-518h]
char *v43; // [rsp+30h] [rbp-510h] BYREF
long long *v44; // [rsp+38h] [rbp-508h]
unsigned __int8 *v45; // [rsp+40h] [rbp-500h]
long long v46; // [rsp+48h] [rbp-4F8h]
_BYTE v47[1216]; // [rsp+50h] [rbp-4F0h] BYREF
unsigned long long v48; // [rsp+510h] [rbp-30h]
v6 = a5;
v8 = (long long *)a1;
v48 = __readfsqword(0x28u);
v9 = *(_QWORD *)a1;
if ( (unsigned __int16 *)(*(_QWORD *)(*(_QWORD *)a1 + 536LL) + 112LL * *(int *)(a1 + 468)) == a2 )
*(_BYTE *)(a1 + 828) = 1;
*(_BYTE *)(a1 + 829) = 1;
v10 = *a4;
v11 = 0LL;
if ( *a4 < 0 )
v11 = *(unsigned int *)(v9 + 380);
v42 = a2;
v39 = v11;
v40 = a4;
if ( a6 )
{
v44 = v8;
v12 = (unsigned __int8)a4[1] + ((v10 & 0x7F) << 8) - 2;
v13 = a4 + 2;
v43 = a4 + 2;
if ( (a2[5] & 0x2E) != 0 )
{
v46 = a3;
v14 = &a4[v12];
v45 = a5;
*a5 = 0;
v15 = 0;
v16 = a4 + 2;
while ( 1 )
{
half_pos = (long long)v16;
v16 = v13;
memcpy(v45, v47, v15);
v15 = (*((long long ( **)(unsigned __int16 *, _QWORD, char **, _BYTE *))v42 + 9))(v42, 0LL, &v43, v47);
if ( !v15 )
break;
v13 = v43;
if ( v43 >= v14 )
{
v41 = v16;
goto LABEL_14;
}
}
v20 = *(const char **)(*(_QWORD *)v42 + 616LL);
mi_report_error(126, (long long)v20);
*(_DWORD *)my_thread_var(126LL, v20) = 126;
half_pos = 0LL;
LABEL_14:
v8 = v44;
v6 = v45;
a3 = v46;
}
else
{
v18 = a2[9];
v19 = (long long)&v13[(unsigned int)v18 * (v12 / a2[9] - 2)];
v41 = (char *)(v19 + v18);
memcpy(a5, v19, v18);
half_pos = v19;
v8 = v44;
}
}
else
{
half_pos = mi_find_half_pos(v11, a2, a4, a5, v38, &v41);
}
v21 = -1;
if ( half_pos )
{
v22 = v40;
v23 = half_pos - (_WORD)v40;
v46 = (unsigned __int8)v40[1];
v24 = *v40;
v25 = v39;
v26 = (_DWORD)v39 == 0;
v44 = (long long *)((unsigned __int8)((_DWORD)v39 != 0) << 15);
v27 = v23 + (((_DWORD)v39 != 0) << 15);
v40[1] = v23;
*v22 = HIBYTE(v27);
v43 = v41;
if ( !v26 )
memcpy(v8[32] + 2, &v41[-v25], v25);
v28 = v42;
v45 = (unsigned __int8 *)mi_new(v8, (long long)v42);
if ( v45 == (unsigned __int8 *)-1LL )
{
return (unsigned int)-1;
}
else
{
v29 = (_BYTE *)mi_move_key((long long)v28, a3, v6);
mi_kpointer((long long)v8, v29, (unsigned long long)v45);
v30 = v39;
v31 = (*((long long ( **)(unsigned __int16 *, _QWORD, char **, unsigned __int8 *))v28 + 9))(
v28,
(unsigned int)v39,
&v43,
v6);
v21 = -1;
if ( v31 )
{
v32 = v46 + ((v24 & 0x7F) << 8);
LODWORD(v46) = v30 + 2;
v33 = (*((unsigned int ( **)(unsigned __int16 *, _QWORD, _QWORD, _QWORD, _QWORD, unsigned __int8 *, _BYTE *))v28
+ 10))(
v28,
v30,
0LL,
0LL,
0LL,
v6,
v47);
v34 = v32 + (_DWORD)v40 - (_DWORD)v43;
v35 = (unsigned int)v46;
memcpy((unsigned int)v46 + v8[32] + v33, v43, v34);
(*((void ( **)(unsigned __int16 *, long long, _BYTE *))v28 + 11))(v28, v8[32] + v35, v47);
LOWORD(v33) = v34 + v46 + v33;
v36 = v33 + (_WORD)v44;
*(_BYTE *)(v8[32] + 1) = v33;
*(_BYTE *)v8[32] = HIBYTE(v36);
return (unsigned int)mi_write_keypage(v8, (long long)v28, (unsigned long long)v45, 3u, (_BYTE *)v8[32]) != 0
? -1
: 2;
}
}
}
return v21;
}
| _mi_split_page:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x518
MOV R13,R8
MOV R15,RDX
MOV R12,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RDX,qword ptr [RDI]
MOVSXD RAX,dword ptr [RDI + 0x1d4]
IMUL RAX,RAX,0x70
ADD RAX,qword ptr [RDX + 0x218]
CMP RAX,RSI
JNZ 0x00145e03
MOV byte ptr [R12 + 0x33c],0x1
LAB_00145e03:
MOV byte ptr [R12 + 0x33d],0x1
MOVZX EAX,byte ptr [RCX]
XOR EDI,EDI
TEST AL,AL
JNS 0x00145e1b
MOV EDI,dword ptr [RDX + 0x17c]
LAB_00145e1b:
TEST R9B,R9B
MOV qword ptr [RBP + -0x518],RSI
MOV qword ptr [RBP + -0x530],RDI
MOV qword ptr [RBP + -0x528],RCX
JZ 0x00145ed3
MOV qword ptr [RBP + -0x508],R12
MOVZX EDX,byte ptr [RCX + 0x1]
AND EAX,0x7f
SHL EAX,0x8
ADD EAX,EDX
ADD EAX,-0x2
LEA R12,[RCX + 0x2]
MOV qword ptr [RBP + -0x510],R12
TEST byte ptr [RSI + 0xa],0x2e
JZ 0x00145ef1
MOV qword ptr [RBP + -0x4f8],R15
MOV EAX,EAX
LEA R15,[R12 + RAX*0x1]
ADD R15,-0x2
MOV qword ptr [RBP + -0x500],R13
MOV byte ptr [R13],0x0
XOR EAX,EAX
LEA R14,[RBP + -0x4f0]
MOV R13,R12
LAB_00145e8d:
MOV RBX,R13
MOV R13,R12
MOV EDX,EAX
MOV RDI,qword ptr [RBP + -0x500]
MOV RSI,R14
CALL 0x001282c0
MOV RDI,qword ptr [RBP + -0x518]
XOR ESI,ESI
LEA RDX,[RBP + -0x510]
MOV RCX,R14
CALL qword ptr [RDI + 0x48]
TEST EAX,EAX
JZ 0x00145f27
MOV R12,qword ptr [RBP + -0x510]
CMP R12,R15
JC 0x00145e8d
MOV qword ptr [RBP + -0x520],R13
JMP 0x00145f4f
LAB_00145ed3:
LEA R8,[RBP + -0x534]
LEA R9,[RBP + -0x520]
MOV RDX,RCX
MOV RCX,R13
CALL 0x00146148
MOV RBX,RAX
JMP 0x00145f64
LAB_00145ef1:
MOVZX ECX,word ptr [RSI + 0x12]
XOR EDX,EDX
DIV ECX
ADD EAX,-0x2
IMUL EAX,ECX
ADD R12,RAX
LEA RAX,[R12 + RCX*0x1]
MOV qword ptr [RBP + -0x520],RAX
MOV RDI,R13
MOV RSI,R12
MOV RDX,RCX
CALL 0x001282c0
MOV RBX,R12
MOV R12,qword ptr [RBP + -0x508]
JMP 0x00145f64
LAB_00145f27:
MOV RAX,qword ptr [RBP + -0x518]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x268]
MOV EDI,0x7e
CALL 0x00135bda
CALL 0x0015ecfe
MOV dword ptr [RAX],0x7e
XOR EBX,EBX
LAB_00145f4f:
MOV R12,qword ptr [RBP + -0x508]
MOV R13,qword ptr [RBP + -0x500]
MOV R15,qword ptr [RBP + -0x4f8]
LAB_00145f64:
MOV ECX,0xffffffff
TEST RBX,RBX
JZ 0x00146120
MOV RCX,qword ptr [RBP + -0x528]
SUB RBX,RCX
MOVZX EAX,byte ptr [RCX + 0x1]
MOV qword ptr [RBP + -0x4f8],RAX
MOVZX R14D,byte ptr [RCX]
XOR EAX,EAX
MOV RDX,qword ptr [RBP + -0x530]
TEST EDX,EDX
SETNZ AL
SHL EAX,0xf
MOV qword ptr [RBP + -0x508],RAX
ADD EAX,EBX
MOV byte ptr [RCX + 0x1],BL
MOV byte ptr [RCX],AH
MOV RSI,qword ptr [RBP + -0x520]
MOV qword ptr [RBP + -0x510],RSI
TEST EDX,EDX
JZ 0x00145fd2
MOV EDX,EDX
SUB RSI,RDX
MOV RDI,qword ptr [R12 + 0x100]
ADD RDI,0x2
CALL 0x001282c0
LAB_00145fd2:
MOV RDI,R12
MOV RBX,qword ptr [RBP + -0x518]
MOV RSI,RBX
MOV EDX,0x3
CALL 0x0013ebc2
MOV qword ptr [RBP + -0x500],RAX
CMP RAX,-0x1
JZ 0x0014611b
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
CALL 0x00141ff7
MOV RDI,R12
MOV RSI,RAX
MOV RDX,qword ptr [RBP + -0x500]
CALL 0x0014149d
LEA RDX,[RBP + -0x510]
MOV RDI,RBX
MOV R15,qword ptr [RBP + -0x530]
MOV ESI,R15D
MOV RCX,R13
CALL qword ptr [RBX + 0x48]
TEST EAX,EAX
MOV ECX,0xffffffff
JZ 0x00146120
AND R14D,0x7f
SHL R14D,0x8
ADD R14,qword ptr [RBP + -0x4f8]
LEA EAX,[R15 + 0x2]
MOV dword ptr [RBP + -0x4f8],EAX
LEA RAX,[RBP + -0x4f0]
MOV qword ptr [RSP],RAX
MOV RDI,RBX
MOV ESI,R15D
XOR EDX,EDX
XOR ECX,ECX
XOR R8D,R8D
MOV R9,R13
CALL qword ptr [RBX + 0x50]
MOV R15D,EAX
MOV R13,qword ptr [RBP + -0x528]
ADD R13,R14
MOV RSI,qword ptr [RBP + -0x510]
SUB R13,RSI
MOV R14D,dword ptr [RBP + -0x4f8]
MOV RAX,qword ptr [R12 + 0x100]
ADD RAX,R14
MOV EDI,R15D
ADD RDI,RAX
MOV EDX,R13D
CALL 0x001282c0
ADD R14,qword ptr [R12 + 0x100]
MOV RDI,RBX
MOV RSI,R14
LEA RDX,[RBP + -0x4f0]
CALL qword ptr [RBX + 0x58]
ADD R15D,dword ptr [RBP + -0x4f8]
ADD R15D,R13D
MOV RCX,qword ptr [RBP + -0x508]
ADD ECX,R15D
MOV RAX,qword ptr [R12 + 0x100]
MOV byte ptr [RAX + 0x1],R15B
MOV RAX,qword ptr [R12 + 0x100]
MOV byte ptr [RAX],CH
MOV R8,qword ptr [R12 + 0x100]
MOV RDI,R12
MOV RSI,RBX
MOV RDX,qword ptr [RBP + -0x500]
MOV ECX,0x3
CALL 0x0013ea10
XOR ECX,ECX
NEG EAX
SBB ECX,ECX
OR ECX,0x2
JMP 0x00146120
LAB_0014611b:
MOV ECX,0xffffffff
LAB_00146120:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00146143
MOV EAX,ECX
ADD RSP,0x518
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00146143:
CALL 0x00128400
|
uint _mi_split_page(long *param_1,long *param_2,ulong param_3,byte *param_4,int1 *param_5,
char param_6)
{
byte bVar1;
ushort uVar2;
long *plVar3;
uint uVar4;
int iVar5;
int4 *puVar6;
int8 uVar7;
byte *__src;
long *plVar8;
byte *pbVar9;
long lVar10;
ulong uVar11;
byte *pbVar12;
long in_FS_OFFSET;
int1 local_53c [4];
ulong local_538;
byte *local_530;
byte *local_528;
long *local_520;
byte *local_518;
long *local_510;
int1 *local_508;
ulong local_500;
int1 local_4f8 [1216];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
if ((long *)((long)*(int *)((long)param_1 + 0x1d4) * 0x70 + *(long *)(*param_1 + 0x218)) ==
param_2) {
*(int1 *)((long)param_1 + 0x33c) = 1;
}
*(int1 *)((long)param_1 + 0x33d) = 1;
local_538 = 0;
if ((char)*param_4 < '\0') {
local_538 = (ulong)*(uint *)(*param_1 + 0x17c);
}
local_530 = param_4;
local_520 = param_2;
if (param_6 == '\0') {
__src = (byte *)_mi_find_half_pos(local_538,param_2,param_4,param_5,local_53c,&local_528);
plVar8 = param_1;
pbVar9 = local_528;
}
else {
uVar4 = ((*param_4 & 0x7f) * 0x100 + (uint)param_4[1]) - 2;
local_518 = param_4 + 2;
local_510 = param_1;
if ((*(byte *)((long)param_2 + 10) & 0x2e) == 0) {
uVar2 = *(ushort *)((long)param_2 + 0x12);
__src = local_518 + (uVar4 / uVar2 - 2) * (uint)uVar2;
local_528 = __src + uVar2;
memcpy(param_5,__src,(ulong)uVar2);
plVar8 = local_510;
pbVar9 = local_528;
}
else {
pbVar12 = local_518 + ((ulong)uVar4 - 2);
*param_5 = 0;
uVar4 = 0;
pbVar9 = local_518;
local_508 = param_5;
local_500 = param_3;
do {
__src = pbVar9;
pbVar9 = local_518;
memcpy(local_508,local_4f8,(ulong)uVar4);
uVar4 = (*(code *)local_520[9])(local_520,0,&local_518,local_4f8);
if (uVar4 == 0) {
mi_report_error(0x7e,*(int8 *)(*local_520 + 0x268));
puVar6 = (int4 *)_my_thread_var();
*puVar6 = 0x7e;
__src = (byte *)0x0;
plVar8 = local_510;
param_5 = local_508;
param_3 = local_500;
pbVar9 = local_528;
break;
}
plVar8 = local_510;
param_5 = local_508;
param_3 = local_500;
} while (local_518 < pbVar12);
}
}
local_528 = pbVar9;
uVar4 = 0xffffffff;
if (__src != (byte *)0x0) {
local_500 = (ulong)local_530[1];
bVar1 = *local_530;
iVar5 = (int)local_538;
local_510 = (long *)((ulong)(iVar5 != 0) << 0xf);
local_530[1] = (byte)((long)__src - (long)local_530);
*local_530 = (byte)((uint)(iVar5 != 0) * 0x8000 + (int)((long)__src - (long)local_530) >> 8);
local_518 = local_528;
if (iVar5 != 0) {
memcpy((void *)(plVar8[0x20] + 2),local_528 + -(local_538 & 0xffffffff),local_538 & 0xffffffff
);
}
plVar3 = local_520;
local_508 = (int1 *)_mi_new(plVar8,local_520,3);
if (local_508 == (int1 *)0xffffffffffffffff) {
uVar4 = 0xffffffff;
}
else {
uVar7 = _mi_move_key(plVar3,param_3,param_5);
_mi_kpointer(plVar8,uVar7,local_508);
uVar11 = local_538;
iVar5 = (*(code *)plVar3[9])(plVar3,local_538 & 0xffffffff,&local_518,param_5);
uVar4 = 0xffffffff;
if (iVar5 != 0) {
lVar10 = ((bVar1 & 0x7f) << 8) + local_500;
local_500 = CONCAT44(local_500._4_4_,(int)uVar11 + 2);
uVar4 = (*(code *)plVar3[10])(plVar3,uVar11 & 0xffffffff,0,0,0,param_5,local_4f8);
pbVar9 = local_530 + (lVar10 - (long)local_518);
uVar11 = local_500 & 0xffffffff;
memcpy((void *)((ulong)uVar4 + plVar8[0x20] + uVar11),local_518,(ulong)pbVar9 & 0xffffffff);
(*(code *)plVar3[0xb])(plVar3,uVar11 + plVar8[0x20],local_4f8);
iVar5 = uVar4 + (int)local_500 + (int)pbVar9;
*(char *)(plVar8[0x20] + 1) = (char)iVar5;
*(char *)plVar8[0x20] = (char)((uint)((int)local_510 + iVar5) >> 8);
iVar5 = _mi_write_keypage(plVar8,plVar3,local_508,3,plVar8[0x20]);
uVar4 = -(uint)(iVar5 != 0) | 2;
}
}
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar4;
}
| |
43,884 | sp_add_point_to_mbr | eloqsql/storage/myisam/sp_key.c | static int sp_add_point_to_mbr(uchar *(*wkb), uchar *end, uint n_dims,
uchar byte_order __attribute__((unused)),
double *mbr)
{
double ord;
double *mbr_end= mbr + n_dims * 2;
while (mbr < mbr_end)
{
if ((*wkb) > end - 8)
return -1;
float8get(ord, (const uchar*) *wkb);
(*wkb)+= 8;
if (ord < *mbr)
*mbr= ord;
mbr++;
if (ord > *mbr)
*mbr= ord;
mbr++;
}
return 0;
} | O0 | c | sp_add_point_to_mbr:
pushq %rbp
movq %rsp, %rbp
movb %cl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movb %al, -0x1d(%rbp)
movq %r8, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
shll %ecx
movl %ecx, %ecx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0xd977e
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
jbe 0xd9709
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xd9785
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x8, %rcx
movq %rcx, (%rax)
movsd -0x30(%rbp), %xmm1
movq -0x28(%rbp), %rax
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xd9745
movsd -0x30(%rbp), %xmm0
movq -0x28(%rbp), %rax
movsd %xmm0, (%rax)
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
movsd -0x30(%rbp), %xmm0
movq -0x28(%rbp), %rax
ucomisd (%rax), %xmm0
jbe 0xd976d
movsd -0x30(%rbp), %xmm0
movq -0x28(%rbp), %rax
movsd %xmm0, (%rax)
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
jmp 0xd96de
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
| sp_add_point_to_mbr_0:
push rbp
mov rbp, rsp
mov al, cl
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_1D], al
mov [rbp+var_28], r8
mov rax, [rbp+var_28]
mov ecx, [rbp+var_1C]
shl ecx, 1
mov ecx, ecx
shl rcx, 3
add rax, rcx
mov [rbp+var_38], rax
loc_D96DE:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_38]
jnb loc_D977E
mov rax, [rbp+var_10]
mov rax, [rax]
mov rcx, [rbp+var_18]
add rcx, 0FFFFFFFFFFFFFFF8h
cmp rax, rcx
jbe short loc_D9709
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_D9785
loc_D9709:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 8
mov [rax], rcx
movsd xmm1, [rbp+var_30]
mov rax, [rbp+var_28]
movsd xmm0, qword ptr [rax]
ucomisd xmm0, xmm1
jbe short loc_D9745
movsd xmm0, [rbp+var_30]
mov rax, [rbp+var_28]
movsd qword ptr [rax], xmm0
loc_D9745:
mov rax, [rbp+var_28]
add rax, 8
mov [rbp+var_28], rax
movsd xmm0, [rbp+var_30]
mov rax, [rbp+var_28]
ucomisd xmm0, qword ptr [rax]
jbe short loc_D976D
movsd xmm0, [rbp+var_30]
mov rax, [rbp+var_28]
movsd qword ptr [rax], xmm0
loc_D976D:
mov rax, [rbp+var_28]
add rax, 8
mov [rbp+var_28], rax
jmp loc_D96DE
loc_D977E:
mov [rbp+var_4], 0
loc_D9785:
mov eax, [rbp+var_4]
pop rbp
retn
| long long sp_add_point_to_mbr_0(unsigned long long *a1, long long a2, int a3, long long a4, double *a5)
{
double v6; // [rsp+8h] [rbp-30h]
double *i; // [rsp+10h] [rbp-28h]
double *v8; // [rsp+10h] [rbp-28h]
for ( i = a5; i < &a5[2 * a3]; i = v8 + 1 )
{
if ( *a1 > a2 - 8 )
return (unsigned int)-1;
v6 = *(double *)*a1;
*a1 += 8LL;
if ( *i > v6 )
*i = v6;
v8 = i + 1;
if ( v6 > *v8 )
*v8 = v6;
}
return 0;
}
| sp_add_point_to_mbr:
PUSH RBP
MOV RBP,RSP
MOV AL,CL
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV byte ptr [RBP + -0x1d],AL
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RBP + -0x1c]
SHL ECX,0x1
MOV ECX,ECX
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
LAB_001d96de:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x001d977e
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x18]
ADD RCX,-0x8
CMP RAX,RCX
JBE 0x001d9709
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001d9785
LAB_001d9709:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x8
MOV qword ptr [RAX],RCX
MOVSD XMM1,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOVSD XMM0,qword ptr [RAX]
UCOMISD XMM0,XMM1
JBE 0x001d9745
MOVSD XMM0,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOVSD qword ptr [RAX],XMM0
LAB_001d9745:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x8
MOV qword ptr [RBP + -0x28],RAX
MOVSD XMM0,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
UCOMISD XMM0,qword ptr [RAX]
JBE 0x001d976d
MOVSD XMM0,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOVSD qword ptr [RAX],XMM0
LAB_001d976d:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x8
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001d96de
LAB_001d977e:
MOV dword ptr [RBP + -0x4],0x0
LAB_001d9785:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4
sp_add_point_to_mbr(ulong *param_1,long param_2,int param_3,int8 param_4,double *param_5)
{
double dVar1;
double *pdVar2;
double *local_30;
local_30 = param_5;
while( true ) {
if (param_5 + (uint)(param_3 << 1) <= local_30) {
return 0;
}
if (param_2 - 8U < *param_1) break;
dVar1 = *(double *)*param_1;
*param_1 = *param_1 + 8;
if (dVar1 < *local_30) {
*local_30 = dVar1;
}
pdVar2 = local_30 + 1;
if (*pdVar2 <= dVar1 && dVar1 != *pdVar2) {
*pdVar2 = dVar1;
}
local_30 = local_30 + 2;
}
return 0xffffffff;
}
| |
43,885 | nlohmann::json_abi_v3_11_3::detail::iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::end() const | monkey531[P]llama/common/./json.hpp | iteration_proxy_value<IteratorType> end() const noexcept
{
return iteration_proxy_value<IteratorType>(container->end());
} | O1 | cpp | nlohmann::json_abi_v3_11_3::detail::iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::end() const:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
movq (%rsi), %rax
movq %rax, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsp)
movq %rdx, 0x18(%rsp)
movzbl (%rax), %ecx
cmpl $0x2, %ecx
je 0x982f6
cmpl $0x1, %ecx
jne 0x98301
movq $0x0, 0x8(%rsp)
jmp 0x98306
movq $0x0, 0x10(%rsp)
jmp 0x98306
movq %rdx, 0x18(%rsp)
cmpl $0x2, %ecx
je 0x9831f
cmpl $0x1, %ecx
jne 0x9832e
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x98337
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0x98337
movq $0x1, 0x18(%rsp)
movq %rsp, %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x732b6
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
retq
nop
| _ZNK8nlohmann16json_abi_v3_11_36detail15iteration_proxyINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3endEv:
push rbx
sub rsp, 20h
mov rbx, rdi
mov rdx, 8000000000000000h
mov rax, [rsi]
mov [rsp+28h+var_28], rax
xorps xmm0, xmm0
movups [rsp+28h+var_20], xmm0
mov [rsp+28h+var_10], rdx
movzx ecx, byte ptr [rax]
cmp ecx, 2
jz short loc_982F6
cmp ecx, 1
jnz short loc_98301
mov qword ptr [rsp+28h+var_20], 0
jmp short loc_98306
loc_982F6:
mov qword ptr [rsp+28h+var_20+8], 0
jmp short loc_98306
loc_98301:
mov [rsp+28h+var_10], rdx
loc_98306:
cmp ecx, 2
jz short loc_9831F
cmp ecx, 1
jnz short loc_9832E
mov rax, [rax+8]
mov rax, [rax+8]
mov qword ptr [rsp+28h+var_20], rax
jmp short loc_98337
loc_9831F:
mov rax, [rax+8]
mov rax, [rax+8]
mov qword ptr [rsp+28h+var_20+8], rax
jmp short loc_98337
loc_9832E:
mov [rsp+28h+var_10], 1
loc_98337:
mov rsi, rsp
mov rdi, rbx
xor edx, edx
call _ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEEC2ESH_m; nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<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>>>::iteration_proxy_value(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>>,ulong)
mov rax, rbx
add rsp, 20h
pop rbx
retn
| long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy<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>>>::end(
long long a1,
unsigned __int8 **a2)
{
unsigned __int8 *v2; // rax
int v3; // ecx
unsigned __int8 *v5; // [rsp+0h] [rbp-28h] BYREF
__int128 v6; // [rsp+8h] [rbp-20h]
long long v7; // [rsp+18h] [rbp-10h]
v2 = *a2;
v5 = v2;
v6 = 0LL;
v7 = 0x8000000000000000LL;
v3 = *v2;
if ( v3 == 2 )
{
*((_QWORD *)&v6 + 1) = 0LL;
}
else if ( v3 == 1 )
{
*(_QWORD *)&v6 = 0LL;
}
else
{
v7 = 0x8000000000000000LL;
}
if ( v3 == 2 )
{
*((_QWORD *)&v6 + 1) = *(_QWORD *)(*((_QWORD *)v2 + 1) + 8LL);
}
else if ( v3 == 1 )
{
*(_QWORD *)&v6 = *(_QWORD *)(*((_QWORD *)v2 + 1) + 8LL);
}
else
{
v7 = 1LL;
}
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<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>>>::iteration_proxy_value(
a1,
(__int128 *)&v5,
0LL);
return a1;
}
| end:
PUSH RBX
SUB RSP,0x20
MOV RBX,RDI
MOV RDX,-0x8000000000000000
MOV RAX,qword ptr [RSI]
MOV qword ptr [RSP],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x8],XMM0
MOV qword ptr [RSP + 0x18],RDX
MOVZX ECX,byte ptr [RAX]
CMP ECX,0x2
JZ 0x001982f6
CMP ECX,0x1
JNZ 0x00198301
MOV qword ptr [RSP + 0x8],0x0
JMP 0x00198306
LAB_001982f6:
MOV qword ptr [RSP + 0x10],0x0
JMP 0x00198306
LAB_00198301:
MOV qword ptr [RSP + 0x18],RDX
LAB_00198306:
CMP ECX,0x2
JZ 0x0019831f
CMP ECX,0x1
JNZ 0x0019832e
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RAX
JMP 0x00198337
LAB_0019831f:
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x10],RAX
JMP 0x00198337
LAB_0019832e:
MOV qword ptr [RSP + 0x18],0x1
LAB_00198337:
MOV RSI,RSP
MOV RDI,RBX
XOR EDX,EDX
CALL 0x001732b6
MOV RAX,RBX
ADD RSP,0x20
POP RBX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy<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> > >::end() const */
void nlohmann::json_abi_v3_11_3::detail::
iteration_proxy<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>>>
::end(void)
{
iteration_proxy_value<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>>>
::iteration_proxy_value();
return;
}
| |
43,886 | 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 0x30c7c7(%rip), %r15 # 0x3368c8
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 0x616e7
movl %eax, %r14d
testq %rbx, %rbx
je 0x2a13a
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_2A13A
mov rax, [r15]
mov rdi, rbx
mov esi, r14d
call qword ptr [rax+1B8h]
loc_2A13A:
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,[0x4368c8]
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 0x001616e7
MOV R14D,EAX
TEST RBX,RBX
JZ 0x0012a13a
MOV RAX,qword ptr [R15]
MOV RDI,RBX
MOV ESI,R14D
CALL qword ptr [RAX + 0x1b8]
LAB_0012a13a:
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;
}
| |
43,887 | parse_rgb_component | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-paint.c | static bool parse_rgb_component(const char** begin, const char* end, float* component)
{
float value = 0;
if(!plutovg_parse_number(begin, end, &value))
return false;
if(plutovg_skip_delim(begin, end, '%'))
value *= 2.55f;
*component = plutovg_clamp(value, 0.f, 255.f) / 255.f;
return true;
} | O1 | c | parse_rgb_component:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0xc(%rsp), %rdx
movl $0x0, (%rdx)
callq 0x29b9e
testb %al, %al
je 0x29a98
movq (%r14), %rcx
cmpq %r15, %rcx
jae 0x29a70
cmpb $0x25, (%rcx)
jne 0x29a70
incq %rcx
movq %rcx, (%r14)
movss 0xc(%rsp), %xmm0
mulss 0x1b6a6(%rip), %xmm0 # 0x45110
movss %xmm0, 0xc(%rsp)
movss 0xc(%rsp), %xmm0
movss 0x196ca(%rip), %xmm1 # 0x43148
movaps %xmm1, %xmm2
minss %xmm0, %xmm2
divss %xmm1, %xmm2
xorps %xmm1, %xmm1
cmpltss %xmm1, %xmm0
andnps %xmm2, %xmm0
movss %xmm0, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
| parse_rgb_component:
push r15
push r14
push rbx
sub rsp, 10h
mov rbx, rdx
mov r15, rsi
mov r14, rdi
lea rdx, [rsp+28h+var_1C]
mov dword ptr [rdx], 0
call plutovg_parse_number
test al, al
jz short loc_29A98
mov rcx, [r14]
cmp rcx, r15
jnb short loc_29A70
cmp byte ptr [rcx], 25h ; '%'
jnz short loc_29A70
inc rcx
mov [r14], rcx
movss xmm0, [rsp+28h+var_1C]
mulss xmm0, cs:dword_45110
movss [rsp+28h+var_1C], xmm0
loc_29A70:
movss xmm0, [rsp+28h+var_1C]
movss xmm1, cs:dword_43148
movaps xmm2, xmm1
minss xmm2, xmm0
divss xmm2, xmm1
xorps xmm1, xmm1
cmpltss xmm0, xmm1
andnps xmm0, xmm2
movss dword ptr [rbx], xmm0
loc_29A98:
add rsp, 10h
pop rbx
pop r14
pop r15
retn
| long long parse_rgb_component(_BYTE **a1, unsigned long long a2, _DWORD *a3)
{
long long result; // rax
_BYTE *v5; // rcx
__m128 v6; // xmm2
unsigned int v7[7]; // [rsp+Ch] [rbp-1Ch] BYREF
*(float *)v7 = 0.0;
result = plutovg_parse_number(a1, a2, v7);
if ( (_BYTE)result )
{
v5 = *a1;
if ( (unsigned long long)*a1 < a2 && *v5 == 37 )
{
*a1 = v5 + 1;
*(float *)v7 = *(float *)v7 * 2.55;
}
v6 = (__m128)0x437F0000u;
v6.m128_f32[0] = fminf(255.0, *(float *)v7) / 255.0;
*a3 = _mm_andnot_ps(_mm_cmplt_ss((__m128)v7[0], (__m128)0LL), v6).m128_u32[0];
}
return result;
}
| parse_rgb_component:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV RBX,RDX
MOV R15,RSI
MOV R14,RDI
LEA RDX,[RSP + 0xc]
MOV dword ptr [RDX],0x0
CALL 0x00129b9e
TEST AL,AL
JZ 0x00129a98
MOV RCX,qword ptr [R14]
CMP RCX,R15
JNC 0x00129a70
CMP byte ptr [RCX],0x25
JNZ 0x00129a70
INC RCX
MOV qword ptr [R14],RCX
MOVSS XMM0,dword ptr [RSP + 0xc]
MULSS XMM0,dword ptr [0x00145110]
MOVSS dword ptr [RSP + 0xc],XMM0
LAB_00129a70:
MOVSS XMM0,dword ptr [RSP + 0xc]
MOVSS XMM1,dword ptr [0x00143148]
MOVAPS XMM2,XMM1
MINSS XMM2,XMM0
DIVSS XMM2,XMM1
XORPS XMM1,XMM1
CMPLTSS XMM0,XMM1
ANDNPS XMM0,XMM2
MOVSS dword ptr [RBX],XMM0
LAB_00129a98:
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
void parse_rgb_component(int8 *param_1,char *param_2,uint *param_3)
{
char *pcVar1;
char cVar2;
float fVar3;
float local_1c;
local_1c = 0.0;
cVar2 = plutovg_parse_number();
if (cVar2 != '\0') {
pcVar1 = (char *)*param_1;
if ((pcVar1 < param_2) && (*pcVar1 == '%')) {
*param_1 = pcVar1 + 1;
local_1c = (float)s_A33__transparent_0014510f._1_4_ * 0.0;
}
fVar3 = DAT_00143148;
if (local_1c <= DAT_00143148) {
fVar3 = local_1c;
}
*param_3 = ~-(uint)(local_1c < 0.0) & (uint)(fVar3 / DAT_00143148);
}
return;
}
| |
43,888 | parse_rgb_component | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-paint.c | static bool parse_rgb_component(const char** begin, const char* end, float* component)
{
float value = 0;
if(!plutovg_parse_number(begin, end, &value))
return false;
if(plutovg_skip_delim(begin, end, '%'))
value *= 2.55f;
*component = plutovg_clamp(value, 0.f, 255.f) / 255.f;
return true;
} | O2 | c | parse_rgb_component:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0xc(%rsp), %rdx
andl $0x0, (%rdx)
callq 0x24ef1
testb %al, %al
je 0x24e6e
movq (%r14), %rcx
cmpq %r15, %rcx
jae 0x24e46
cmpb $0x25, (%rcx)
movss 0xc(%rsp), %xmm0
jne 0x24e4c
incq %rcx
movq %rcx, (%r14)
mulss 0x17350(%rip), %xmm0 # 0x3c194
jmp 0x24e4c
movss 0xc(%rsp), %xmm0
movss 0x152f0(%rip), %xmm1 # 0x3a144
movaps %xmm1, %xmm2
minss %xmm0, %xmm2
divss %xmm1, %xmm2
xorps %xmm1, %xmm1
cmpltss %xmm1, %xmm0
andnps %xmm2, %xmm0
movss %xmm0, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
| parse_rgb_component:
push r15
push r14
push rbx
sub rsp, 10h
mov rbx, rdx
mov r15, rsi
mov r14, rdi
lea rdx, [rsp+28h+var_1C]
and dword ptr [rdx], 0
call plutovg_parse_number
test al, al
jz short loc_24E6E
mov rcx, [r14]
cmp rcx, r15
jnb short loc_24E46
cmp byte ptr [rcx], 25h ; '%'
movss xmm0, [rsp+28h+var_1C]
jnz short loc_24E4C
inc rcx
mov [r14], rcx
mulss xmm0, cs:dword_3C194
jmp short loc_24E4C
loc_24E46:
movss xmm0, [rsp+28h+var_1C]
loc_24E4C:
movss xmm1, cs:dword_3A144
movaps xmm2, xmm1
minss xmm2, xmm0
divss xmm2, xmm1
xorps xmm1, xmm1
cmpltss xmm0, xmm1
andnps xmm0, xmm2
movss dword ptr [rbx], xmm0
loc_24E6E:
add rsp, 10h
pop rbx
pop r14
pop r15
retn
| long long parse_rgb_component(_BYTE **a1, unsigned long long a2, _DWORD *a3)
{
long long result; // rax
_BYTE *v5; // rcx
__m128 v6; // xmm0
__m128 v7; // xmm2
_DWORD v8[7]; // [rsp+Ch] [rbp-1Ch] BYREF
v8[0] = 0;
result = plutovg_parse_number(a1, a2, v8);
if ( (_BYTE)result )
{
v5 = *a1;
if ( (unsigned long long)*a1 >= a2 )
{
v6 = (__m128)v8[0];
}
else
{
v6 = (__m128)v8[0];
if ( *v5 == 37 )
{
*a1 = v5 + 1;
v6.m128_f32[0] = v6.m128_f32[0] * 2.55;
}
}
v7 = (__m128)0x437F0000u;
v7.m128_f32[0] = fminf(255.0, v6.m128_f32[0]) / 255.0;
*a3 = _mm_andnot_ps(_mm_cmplt_ss(v6, (__m128)0LL), v7).m128_u32[0];
}
return result;
}
| parse_rgb_component:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV RBX,RDX
MOV R15,RSI
MOV R14,RDI
LEA RDX,[RSP + 0xc]
AND dword ptr [RDX],0x0
CALL 0x00124ef1
TEST AL,AL
JZ 0x00124e6e
MOV RCX,qword ptr [R14]
CMP RCX,R15
JNC 0x00124e46
CMP byte ptr [RCX],0x25
MOVSS XMM0,dword ptr [RSP + 0xc]
JNZ 0x00124e4c
INC RCX
MOV qword ptr [R14],RCX
MULSS XMM0,dword ptr [0x0013c194]
JMP 0x00124e4c
LAB_00124e46:
MOVSS XMM0,dword ptr [RSP + 0xc]
LAB_00124e4c:
MOVSS XMM1,dword ptr [0x0013a144]
MOVAPS XMM2,XMM1
MINSS XMM2,XMM0
DIVSS XMM2,XMM1
XORPS XMM1,XMM1
CMPLTSS XMM0,XMM1
ANDNPS XMM0,XMM2
MOVSS dword ptr [RBX],XMM0
LAB_00124e6e:
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
void parse_rgb_component(int8 *param_1,char *param_2,uint *param_3)
{
char *pcVar1;
char cVar2;
float fVar3;
float fVar4;
cVar2 = plutovg_parse_number();
if (cVar2 != '\0') {
pcVar1 = (char *)*param_1;
if (pcVar1 < param_2) {
fVar3 = 0.0;
if (*pcVar1 == '%') {
*param_1 = pcVar1 + 1;
fVar3 = (float)s_A33__transparent_0013c193._1_4_ * 0.0;
}
}
else {
fVar3 = 0.0;
}
fVar4 = DAT_0013a144;
if (fVar3 <= DAT_0013a144) {
fVar4 = fVar3;
}
*param_3 = ~-(uint)(fVar3 < 0.0) & (uint)(fVar4 / DAT_0013a144);
}
return;
}
| |
43,889 | init_key_cache_internal | eloqsql/mysys/mf_keycache.c | static
int init_key_cache_internal(KEY_CACHE *keycache, uint key_cache_block_size,
size_t use_mem, uint division_limit,
uint age_threshold, uint changed_blocks_hash_size,
uint partitions,
my_bool use_op_lock)
{
void *keycache_cb;
int blocks;
if (keycache->key_cache_inited)
{
if (use_op_lock)
pthread_mutex_lock(&keycache->op_lock);
keycache_cb= keycache->keycache_cb;
}
else
{
if (partitions == 0)
{
if (!(keycache_cb= (void *) my_malloc(key_memory_KEY_CACHE,
sizeof(SIMPLE_KEY_CACHE_CB),
MYF(0))))
return 0;
((SIMPLE_KEY_CACHE_CB *) keycache_cb)->key_cache_inited= 0;
keycache->key_cache_type= SIMPLE_KEY_CACHE;
keycache->interface_funcs= &simple_key_cache_funcs;
}
else
{
if (!(keycache_cb= (void *) my_malloc(key_memory_KEY_CACHE,
sizeof(PARTITIONED_KEY_CACHE_CB),
MYF(0))))
return 0;
((PARTITIONED_KEY_CACHE_CB *) keycache_cb)->key_cache_inited= 0;
keycache->key_cache_type= PARTITIONED_KEY_CACHE;
keycache->interface_funcs= &partitioned_key_cache_funcs;
}
/*
Initialize op_lock if it's not initialized before.
The mutex may have been initialized before if we are being called
from repartition_key_cache_internal().
*/
if (use_op_lock)
pthread_mutex_init(&keycache->op_lock, MY_MUTEX_INIT_FAST);
keycache->keycache_cb= keycache_cb;
keycache->key_cache_inited= 1;
if (use_op_lock)
pthread_mutex_lock(&keycache->op_lock);
}
if (partitions != 0)
{
((PARTITIONED_KEY_CACHE_CB *) keycache_cb)->partitions= partitions;
}
keycache->can_be_used= 0;
blocks= keycache->interface_funcs->init(keycache_cb, key_cache_block_size,
use_mem, division_limit,
age_threshold, changed_blocks_hash_size);
keycache->partitions= partitions ?
((PARTITIONED_KEY_CACHE_CB *) keycache_cb)->partitions :
0;
DBUG_ASSERT(partitions <= MAX_KEY_CACHE_PARTITIONS);
keycache->key_cache_mem_size=
keycache->partitions ?
((PARTITIONED_KEY_CACHE_CB *) keycache_cb)->key_cache_mem_size :
((SIMPLE_KEY_CACHE_CB *) keycache_cb)->key_cache_mem_size;
if (blocks > 0)
keycache->can_be_used= 1;
if (use_op_lock)
pthread_mutex_unlock(&keycache->op_lock);
return blocks;
} | O3 | c | init_key_cache_internal:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %r12d
movl %ecx, %r13d
movq %rdx, %r14
movq %rdi, %rbx
movl 0x10(%rbp), %ecx
cmpb $0x0, 0x48(%rdi)
je 0x980d8
cmpb $0x0, 0x18(%rbp)
je 0x980cf
leaq 0x58(%rbx), %rdi
movl %r8d, %r15d
movl %r13d, -0x2c(%rbp)
movl %esi, %r13d
callq 0x29200
movl %r13d, %esi
movl 0x10(%rbp), %ecx
movl -0x2c(%rbp), %r13d
movl %r15d, %r8d
movq 0x8(%rbx), %r15
jmp 0x98185
movl %esi, -0x30(%rbp)
movl %r8d, -0x34(%rbp)
movl %r12d, -0x2c(%rbp)
leaq 0xb7010e(%rip), %rax # 0xc081f8
movl (%rax), %edi
xorl %r12d, %r12d
testl %ecx, %ecx
je 0x9811a
movl $0x20, %esi
xorl %edx, %edx
callq 0x9fd51
testq %rax, %rax
je 0x981f0
movq %rax, %r15
leaq 0x2ed646(%rip), %rax # 0x385758
movl $0x1, %r12d
jmp 0x98139
movl $0x170, %esi # imm = 0x170
xorl %edx, %edx
callq 0x9fd51
testq %rax, %rax
je 0x981f0
movq %rax, %r15
leaq 0x2ed5cf(%rip), %rax # 0x385708
movb $0x0, (%r15)
movl %r12d, (%rbx)
movq %rax, 0x10(%rbx)
cmpb $0x0, 0x18(%rbp)
je 0x9816f
leaq 0x58(%rbx), %r12
leaq 0xb7041b(%rip), %rsi # 0xc08570
movq %r12, %rdi
callq 0x29320
movq %r15, 0x8(%rbx)
movb $0x1, 0x48(%rbx)
movq %r12, %rdi
callq 0x29200
jmp 0x98177
movq %r15, 0x8(%rbx)
movb $0x1, 0x48(%rbx)
movl -0x2c(%rbp), %r12d
movl -0x34(%rbp), %r8d
movl 0x10(%rbp), %ecx
movl -0x30(%rbp), %esi
testl %ecx, %ecx
je 0x9818d
movl %ecx, 0x1c(%r15)
movb $0x0, 0x49(%rbx)
movq 0x10(%rbx), %rax
movq %r15, %rdi
movq %r14, %rdx
movl %ecx, %r14d
movl %r13d, %ecx
movl %r12d, %r9d
callq *(%rax)
movl %eax, %r12d
testl %r14d, %r14d
je 0x981c3
movl 0x1c(%r15), %eax
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leaq 0x8(,%rcx,8), %rcx
jmp 0x981ca
xorl %eax, %eax
movl $0x8, %ecx
movl %eax, 0x4c(%rbx)
movq (%r15,%rcx), %rax
movq %rax, 0x50(%rbx)
testl %r12d, %r12d
jle 0x981de
movb $0x1, 0x49(%rbx)
cmpb $0x0, 0x18(%rbp)
je 0x981f0
addq $0x58, %rbx
movq %rbx, %rdi
callq 0x291c0
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| init_key_cache_internal:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r12d, r9d
mov r13d, ecx
mov r14, rdx
mov rbx, rdi
mov ecx, [rbp+arg_0]
cmp byte ptr [rdi+48h], 0
jz short loc_980D8
cmp [rbp+arg_8], 0
jz short loc_980CF
lea rdi, [rbx+58h]
mov r15d, r8d
mov [rbp+var_2C], r13d
mov r13d, esi
call _pthread_mutex_lock
mov esi, r13d
mov ecx, [rbp+arg_0]
mov r13d, [rbp+var_2C]
mov r8d, r15d
loc_980CF:
mov r15, [rbx+8]
jmp loc_98185
loc_980D8:
mov [rbp+var_30], esi
mov [rbp+var_34], r8d
mov [rbp+var_2C], r12d
lea rax, key_memory_KEY_CACHE
mov edi, [rax]
xor r12d, r12d
test ecx, ecx
jz short loc_9811A
mov esi, 20h ; ' '
xor edx, edx
call my_malloc
test rax, rax
jz loc_981F0
mov r15, rax
lea rax, partitioned_key_cache_funcs
mov r12d, 1
jmp short loc_98139
loc_9811A:
mov esi, 170h
xor edx, edx
call my_malloc
test rax, rax
jz loc_981F0
mov r15, rax
lea rax, simple_key_cache_funcs
loc_98139:
mov byte ptr [r15], 0
mov [rbx], r12d
mov [rbx+10h], rax
cmp [rbp+arg_8], 0
jz short loc_9816F
lea r12, [rbx+58h]
lea rsi, my_fast_mutexattr
mov rdi, r12
call _pthread_mutex_init
mov [rbx+8], r15
mov byte ptr [rbx+48h], 1
mov rdi, r12
call _pthread_mutex_lock
jmp short loc_98177
loc_9816F:
mov [rbx+8], r15
mov byte ptr [rbx+48h], 1
loc_98177:
mov r12d, [rbp+var_2C]
mov r8d, [rbp+var_34]
mov ecx, [rbp+arg_0]
mov esi, [rbp+var_30]
loc_98185:
test ecx, ecx
jz short loc_9818D
mov [r15+1Ch], ecx
loc_9818D:
mov byte ptr [rbx+49h], 0
mov rax, [rbx+10h]
mov rdi, r15
mov rdx, r14
mov r14d, ecx
mov ecx, r13d
mov r9d, r12d
call qword ptr [rax]
mov r12d, eax
test r14d, r14d
jz short loc_981C3
mov eax, [r15+1Ch]
xor ecx, ecx
test eax, eax
setnz cl
lea rcx, ds:8[rcx*8]
jmp short loc_981CA
loc_981C3:
xor eax, eax
mov ecx, 8
loc_981CA:
mov [rbx+4Ch], eax
mov rax, [r15+rcx]
mov [rbx+50h], rax
test r12d, r12d
jle short loc_981DE
mov byte ptr [rbx+49h], 1
loc_981DE:
cmp [rbp+arg_8], 0
jz short loc_981F0
add rbx, 58h ; 'X'
mov rdi, rbx
call _pthread_mutex_unlock
loc_981F0:
mov eax, r12d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long init_key_cache_internal(
long long a1,
long long a2,
long long a3,
unsigned int a4,
long long a5,
unsigned int a6,
int a7,
char a8)
{
unsigned int v8; // r12d
int v11; // ecx
unsigned int v12; // r15d
long long v13; // r15
unsigned int v14; // r12d
long long v15; // rax
long long ( **v16)(); // rax
long long v17; // rax
long long v18; // rdx
int v19; // r14d
int v20; // eax
long long v21; // rcx
unsigned int v23; // [rsp+Ch] [rbp-34h]
v8 = a6;
v11 = a7;
if ( *(_BYTE *)(a1 + 72) )
{
if ( a8 )
{
v12 = a5;
pthread_mutex_lock(a1 + 88);
a2 = (unsigned int)a2;
v11 = a7;
a5 = v12;
}
v13 = *(_QWORD *)(a1 + 8);
}
else
{
v23 = a5;
v14 = 0;
if ( a7 )
{
v15 = my_malloc(key_memory_KEY_CACHE, 32LL, 0LL);
if ( !v15 )
return v14;
v13 = v15;
v16 = partitioned_key_cache_funcs;
v14 = 1;
}
else
{
v17 = my_malloc(key_memory_KEY_CACHE, 368LL, 0LL);
if ( !v17 )
return v14;
v13 = v17;
v16 = simple_key_cache_funcs;
}
*(_BYTE *)v13 = 0;
*(_DWORD *)a1 = v14;
*(_QWORD *)(a1 + 16) = v16;
if ( a8 )
{
pthread_mutex_init(a1 + 88, &my_fast_mutexattr);
*(_QWORD *)(a1 + 8) = v13;
*(_BYTE *)(a1 + 72) = 1;
pthread_mutex_lock(a1 + 88);
}
else
{
*(_QWORD *)(a1 + 8) = v13;
*(_BYTE *)(a1 + 72) = 1;
}
v8 = a6;
a5 = v23;
v11 = a7;
a2 = (unsigned int)a2;
}
if ( v11 )
*(_DWORD *)(v13 + 28) = v11;
*(_BYTE *)(a1 + 73) = 0;
v18 = a3;
v19 = v11;
v14 = (**(long long ( ***)(long long, long long, long long, _QWORD, long long, _QWORD))(a1 + 16))(
v13,
a2,
v18,
a4,
a5,
v8);
if ( v19 )
{
v20 = *(_DWORD *)(v13 + 28);
v21 = 8LL * (v20 != 0) + 8;
}
else
{
v20 = 0;
v21 = 8LL;
}
*(_DWORD *)(a1 + 76) = v20;
*(_QWORD *)(a1 + 80) = *(_QWORD *)(v13 + v21);
if ( (int)v14 > 0 )
*(_BYTE *)(a1 + 73) = 1;
if ( a8 )
pthread_mutex_unlock(a1 + 88);
return v14;
}
| init_key_cache_internal:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R12D,R9D
MOV R13D,ECX
MOV R14,RDX
MOV RBX,RDI
MOV ECX,dword ptr [RBP + 0x10]
CMP byte ptr [RDI + 0x48],0x0
JZ 0x001980d8
CMP byte ptr [RBP + 0x18],0x0
JZ 0x001980cf
LEA RDI,[RBX + 0x58]
MOV R15D,R8D
MOV dword ptr [RBP + -0x2c],R13D
MOV R13D,ESI
CALL 0x00129200
MOV ESI,R13D
MOV ECX,dword ptr [RBP + 0x10]
MOV R13D,dword ptr [RBP + -0x2c]
MOV R8D,R15D
LAB_001980cf:
MOV R15,qword ptr [RBX + 0x8]
JMP 0x00198185
LAB_001980d8:
MOV dword ptr [RBP + -0x30],ESI
MOV dword ptr [RBP + -0x34],R8D
MOV dword ptr [RBP + -0x2c],R12D
LEA RAX,[0xd081f8]
MOV EDI,dword ptr [RAX]
XOR R12D,R12D
TEST ECX,ECX
JZ 0x0019811a
MOV ESI,0x20
XOR EDX,EDX
CALL 0x0019fd51
TEST RAX,RAX
JZ 0x001981f0
MOV R15,RAX
LEA RAX,[0x485758]
MOV R12D,0x1
JMP 0x00198139
LAB_0019811a:
MOV ESI,0x170
XOR EDX,EDX
CALL 0x0019fd51
TEST RAX,RAX
JZ 0x001981f0
MOV R15,RAX
LEA RAX,[0x485708]
LAB_00198139:
MOV byte ptr [R15],0x0
MOV dword ptr [RBX],R12D
MOV qword ptr [RBX + 0x10],RAX
CMP byte ptr [RBP + 0x18],0x0
JZ 0x0019816f
LEA R12,[RBX + 0x58]
LEA RSI,[0xd08570]
MOV RDI,R12
CALL 0x00129320
MOV qword ptr [RBX + 0x8],R15
MOV byte ptr [RBX + 0x48],0x1
MOV RDI,R12
CALL 0x00129200
JMP 0x00198177
LAB_0019816f:
MOV qword ptr [RBX + 0x8],R15
MOV byte ptr [RBX + 0x48],0x1
LAB_00198177:
MOV R12D,dword ptr [RBP + -0x2c]
MOV R8D,dword ptr [RBP + -0x34]
MOV ECX,dword ptr [RBP + 0x10]
MOV ESI,dword ptr [RBP + -0x30]
LAB_00198185:
TEST ECX,ECX
JZ 0x0019818d
MOV dword ptr [R15 + 0x1c],ECX
LAB_0019818d:
MOV byte ptr [RBX + 0x49],0x0
MOV RAX,qword ptr [RBX + 0x10]
MOV RDI,R15
MOV RDX,R14
MOV R14D,ECX
MOV ECX,R13D
MOV R9D,R12D
CALL qword ptr [RAX]
MOV R12D,EAX
TEST R14D,R14D
JZ 0x001981c3
MOV EAX,dword ptr [R15 + 0x1c]
XOR ECX,ECX
TEST EAX,EAX
SETNZ CL
LEA RCX,[0x8 + RCX*0x8]
JMP 0x001981ca
LAB_001981c3:
XOR EAX,EAX
MOV ECX,0x8
LAB_001981ca:
MOV dword ptr [RBX + 0x4c],EAX
MOV RAX,qword ptr [R15 + RCX*0x1]
MOV qword ptr [RBX + 0x50],RAX
TEST R12D,R12D
JLE 0x001981de
MOV byte ptr [RBX + 0x49],0x1
LAB_001981de:
CMP byte ptr [RBP + 0x18],0x0
JZ 0x001981f0
ADD RBX,0x58
MOV RDI,RBX
CALL 0x001291c0
LAB_001981f0:
MOV EAX,R12D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int init_key_cache_internal
(int4 *param_1,ulong param_2,int8 param_3,int4 param_4,ulong param_5
,int4 param_6,int param_7,char param_8)
{
int iVar1;
int iVar2;
int1 *puVar3;
int1 *puVar4;
long lVar5;
int4 uVar6;
if (*(char *)(param_1 + 0x12) == '\0') {
uVar6 = 0;
if (param_7 == 0) {
puVar3 = (int1 *)my_malloc(key_memory_KEY_CACHE,0x170,0);
if (puVar3 == (int1 *)0x0) {
return 0;
}
puVar4 = simple_key_cache_funcs;
}
else {
puVar3 = (int1 *)my_malloc(key_memory_KEY_CACHE,0x20,0);
if (puVar3 == (int1 *)0x0) {
return 0;
}
puVar4 = partitioned_key_cache_funcs;
uVar6 = 1;
}
*puVar3 = 0;
*param_1 = uVar6;
*(int1 **)(param_1 + 4) = puVar4;
if (param_8 == '\0') {
*(int1 **)(param_1 + 2) = puVar3;
*(int1 *)(param_1 + 0x12) = 1;
}
else {
pthread_mutex_init((pthread_mutex_t *)(param_1 + 0x16),
(pthread_mutexattr_t *)&my_fast_mutexattr);
*(int1 **)(param_1 + 2) = puVar3;
*(int1 *)(param_1 + 0x12) = 1;
pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x16));
}
param_5 = param_5 & 0xffffffff;
param_2 = param_2 & 0xffffffff;
}
else {
if (param_8 != '\0') {
param_5 = param_5 & 0xffffffff;
param_2 = param_2 & 0xffffffff;
pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x16));
}
puVar3 = *(int1 **)(param_1 + 2);
}
if (param_7 != 0) {
*(int *)(puVar3 + 0x1c) = param_7;
}
*(int1 *)((long)param_1 + 0x49) = 0;
iVar1 = (*(code *)**(int8 **)(param_1 + 4))(puVar3,param_2,param_3,param_4,param_5,param_6);
if (param_7 == 0) {
iVar2 = 0;
lVar5 = 8;
}
else {
iVar2 = *(int *)(puVar3 + 0x1c);
lVar5 = (ulong)(iVar2 != 0) * 8 + 8;
}
param_1[0x13] = iVar2;
*(int8 *)(param_1 + 0x14) = *(int8 *)(puVar3 + lVar5);
if (0 < iVar1) {
*(int1 *)((long)param_1 + 0x49) = 1;
}
if (param_8 != '\0') {
pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x16));
}
return iVar1;
}
| |
43,890 | ma_set_dynamic | eloqsql/libmariadb/libmariadb/ma_array.c | my_bool ma_set_dynamic(DYNAMIC_ARRAY *array, void * element, uint idx)
{
if (idx >= array->elements)
{
if (idx >= array->max_element)
{
uint size;
char *new_ptr;
size=(idx+array->alloc_increment)/array->alloc_increment;
size*= array->alloc_increment;
if (!(new_ptr=(char*) realloc(array->buffer,size*
array->size_of_element)))
return TRUE;
array->buffer=new_ptr;
array->max_element=size;
}
memset((array->buffer+array->elements*array->size_of_element), 0,
(idx - array->elements)*array->size_of_element);
array->elements=idx+1;
}
memcpy(array->buffer+(idx * array->size_of_element),element,
(size_t) array->size_of_element);
return FALSE;
} | O0 | c | ma_set_dynamic:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jb 0x42e0b
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jb 0x42dc6
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
addl 0x10(%rcx), %eax
movq -0x10(%rbp), %rcx
xorl %edx, %edx
divl 0x10(%rcx)
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
imull -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl -0x20(%rbp), %eax
movq -0x10(%rbp), %rcx
imull 0x14(%rcx), %eax
movl %eax, %eax
movl %eax, %esi
callq 0x13700
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x42db1
movb $0x1, -0x1(%rbp)
jmp 0x42e38
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl -0x20(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
imull 0x14(%rcx), %eax
movl %eax, %eax
addq %rax, %rdi
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
subl 0x8(%rcx), %eax
movq -0x10(%rbp), %rcx
imull 0x14(%rcx), %eax
movl %eax, %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x13250
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
imull 0x14(%rcx), %eax
movl %eax, %eax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, %edx
callq 0x13360
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_set_dynamic:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov eax, [rbp+var_1C]
mov rcx, [rbp+var_10]
cmp eax, [rcx+8]
jb loc_42E0B
mov eax, [rbp+var_1C]
mov rcx, [rbp+var_10]
cmp eax, [rcx+0Ch]
jb short loc_42DC6
mov eax, [rbp+var_1C]
mov rcx, [rbp+var_10]
add eax, [rcx+10h]
mov rcx, [rbp+var_10]
xor edx, edx
div dword ptr [rcx+10h]
mov [rbp+var_20], eax
mov rax, [rbp+var_10]
mov eax, [rax+10h]
imul eax, [rbp+var_20]
mov [rbp+var_20], eax
mov rax, [rbp+var_10]
mov rdi, [rax]
mov eax, [rbp+var_20]
mov rcx, [rbp+var_10]
imul eax, [rcx+14h]
mov eax, eax
mov esi, eax
call _realloc
mov [rbp+var_28], rax
cmp rax, 0
jnz short loc_42DB1
mov [rbp+var_1], 1
jmp loc_42E38
loc_42DB1:
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
mov [rax], rcx
mov ecx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax+0Ch], ecx
loc_42DC6:
mov rax, [rbp+var_10]
mov rdi, [rax]
mov rax, [rbp+var_10]
mov eax, [rax+8]
mov rcx, [rbp+var_10]
imul eax, [rcx+14h]
mov eax, eax
add rdi, rax
mov eax, [rbp+var_1C]
mov rcx, [rbp+var_10]
sub eax, [rcx+8]
mov rcx, [rbp+var_10]
imul eax, [rcx+14h]
mov eax, eax
mov edx, eax
xor esi, esi
call _memset
mov ecx, [rbp+var_1C]
add ecx, 1
mov rax, [rbp+var_10]
mov [rax+8], ecx
loc_42E0B:
mov rax, [rbp+var_10]
mov rdi, [rax]
mov eax, [rbp+var_1C]
mov rcx, [rbp+var_10]
imul eax, [rcx+14h]
mov eax, eax
add rdi, rax
mov rsi, [rbp+var_18]
mov rax, [rbp+var_10]
mov eax, [rax+14h]
mov edx, eax
call _memcpy
mov [rbp+var_1], 0
loc_42E38:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char ma_set_dynamic(long long a1, long long a2, unsigned int a3)
{
long long v4; // [rsp+8h] [rbp-28h]
unsigned int v5; // [rsp+10h] [rbp-20h]
if ( a3 < *(_DWORD *)(a1 + 8) )
goto LABEL_7;
if ( a3 < *(_DWORD *)(a1 + 12) )
{
LABEL_6:
memset(
(unsigned int)(*(_DWORD *)(a1 + 20) * *(_DWORD *)(a1 + 8)) + *(_QWORD *)a1,
0LL,
*(_DWORD *)(a1 + 20) * (a3 - *(_DWORD *)(a1 + 8)));
*(_DWORD *)(a1 + 8) = a3 + 1;
LABEL_7:
memcpy(*(_DWORD *)(a1 + 20) * a3 + *(_QWORD *)a1, a2, *(unsigned int *)(a1 + 20));
return 0;
}
v5 = (*(_DWORD *)(a1 + 16) + a3) / *(_DWORD *)(a1 + 16) * *(_DWORD *)(a1 + 16);
v4 = realloc(*(_QWORD *)a1, *(_DWORD *)(a1 + 20) * v5);
if ( v4 )
{
*(_QWORD *)a1 = v4;
*(_DWORD *)(a1 + 12) = v5;
goto LABEL_6;
}
return 1;
}
| ma_set_dynamic:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV EAX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0x8]
JC 0x00142e0b
MOV EAX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0xc]
JC 0x00142dc6
MOV EAX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RBP + -0x10]
ADD EAX,dword ptr [RCX + 0x10]
MOV RCX,qword ptr [RBP + -0x10]
XOR EDX,EDX
DIV dword ptr [RCX + 0x10]
MOV dword ptr [RBP + -0x20],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x10]
IMUL EAX,dword ptr [RBP + -0x20]
MOV dword ptr [RBP + -0x20],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV EAX,dword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
IMUL EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
MOV ESI,EAX
CALL 0x00113700
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
JNZ 0x00142db1
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00142e38
LAB_00142db1:
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV ECX,dword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xc],ECX
LAB_00142dc6:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
IMUL EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
ADD RDI,RAX
MOV EAX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RBP + -0x10]
SUB EAX,dword ptr [RCX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
IMUL EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
MOV EDX,EAX
XOR ESI,ESI
CALL 0x00113250
MOV ECX,dword ptr [RBP + -0x1c]
ADD ECX,0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x8],ECX
LAB_00142e0b:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV EAX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RBP + -0x10]
IMUL EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
ADD RDI,RAX
MOV RSI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x14]
MOV EDX,EAX
CALL 0x00113360
MOV byte ptr [RBP + -0x1],0x0
LAB_00142e38:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 ma_set_dynamic(long *param_1,void *param_2,uint param_3)
{
int iVar1;
void *pvVar2;
if (*(uint *)(param_1 + 1) <= param_3) {
if (*(uint *)((long)param_1 + 0xc) <= param_3) {
iVar1 = (int)param_1[2] * ((param_3 + (int)param_1[2]) / *(uint *)(param_1 + 2));
pvVar2 = realloc((void *)*param_1,(ulong)(uint)(iVar1 * *(int *)((long)param_1 + 0x14)));
if (pvVar2 == (void *)0x0) {
return 1;
}
*param_1 = (long)pvVar2;
*(int *)((long)param_1 + 0xc) = iVar1;
}
memset((void *)(*param_1 + (ulong)(uint)((int)param_1[1] * *(int *)((long)param_1 + 0x14))),0,
(ulong)((param_3 - (int)param_1[1]) * *(int *)((long)param_1 + 0x14)));
*(uint *)(param_1 + 1) = param_3 + 1;
}
memcpy((void *)(*param_1 + (ulong)(param_3 * *(int *)((long)param_1 + 0x14))),param_2,
(ulong)*(uint *)((long)param_1 + 0x14));
return 0;
}
| |
43,891 | ma_set_dynamic | eloqsql/libmariadb/libmariadb/ma_array.c | my_bool ma_set_dynamic(DYNAMIC_ARRAY *array, void * element, uint idx)
{
if (idx >= array->elements)
{
if (idx >= array->max_element)
{
uint size;
char *new_ptr;
size=(idx+array->alloc_increment)/array->alloc_increment;
size*= array->alloc_increment;
if (!(new_ptr=(char*) realloc(array->buffer,size*
array->size_of_element)))
return TRUE;
array->buffer=new_ptr;
array->max_element=size;
}
memset((array->buffer+array->elements*array->size_of_element), 0,
(idx - array->elements)*array->size_of_element);
array->elements=idx+1;
}
memcpy(array->buffer+(idx * array->size_of_element),element,
(size_t) array->size_of_element);
return FALSE;
} | O3 | c | ma_set_dynamic:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
movl 0x8(%rdi), %eax
cmpl %edx, %eax
ja 0x2f9d0
movq (%r15), %rcx
cmpl %r14d, 0xc(%r15)
ja 0x2f9ad
movl 0x10(%r15), %esi
movl %esi, %r12d
addl %r14d, %r12d
movl %r12d, %eax
xorl %edx, %edx
divl %esi
subl %edx, %r12d
movl 0x14(%r15), %esi
imull %r12d, %esi
movq %rcx, %rdi
callq 0x13730
testq %rax, %rax
je 0x2f9f1
movq %rax, %rcx
movq %rax, (%r15)
movl %r12d, 0xc(%r15)
movl 0x8(%r15), %eax
movl 0x14(%r15), %esi
movl %r14d, %edx
subl %eax, %edx
imull %esi, %edx
movl %esi, %edi
imull %eax, %edi
addq %rcx, %rdi
xorl %esi, %esi
callq 0x13260
leal 0x1(%r14), %eax
movl %eax, 0x8(%r15)
movl 0x14(%r15), %edx
imull %edx, %r14d
addq (%r15), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x13390
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %al
jmp 0x2f9e8
| ma_set_dynamic:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r14d, edx
mov rbx, rsi
mov r15, rdi
mov eax, [rdi+8]
cmp eax, edx
ja short loc_2F9D0
mov rcx, [r15]
cmp [r15+0Ch], r14d
ja short loc_2F9AD
mov esi, [r15+10h]
mov r12d, esi
add r12d, r14d
mov eax, r12d
xor edx, edx
div esi
sub r12d, edx
mov esi, [r15+14h]
imul esi, r12d
mov rdi, rcx
call _realloc
test rax, rax
jz short loc_2F9F1
mov rcx, rax
mov [r15], rax
mov [r15+0Ch], r12d
mov eax, [r15+8]
loc_2F9AD:
mov esi, [r15+14h]
mov edx, r14d
sub edx, eax
imul edx, esi
mov edi, esi
imul edi, eax
add rdi, rcx
xor esi, esi
call _memset
lea eax, [r14+1]
mov [r15+8], eax
loc_2F9D0:
mov edx, [r15+14h]
imul r14d, edx
add r14, [r15]
mov rdi, r14
mov rsi, rbx
call _memcpy
xor eax, eax
loc_2F9E8:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_2F9F1:
mov al, 1
jmp short loc_2F9E8
| long long ma_set_dynamic(long long *a1, long long a2, unsigned int a3)
{
unsigned int v4; // eax
long long v5; // rcx
unsigned int v6; // r12d
long long v7; // rax
v4 = *((_DWORD *)a1 + 2);
if ( v4 > a3 )
goto LABEL_6;
v5 = *a1;
if ( *((_DWORD *)a1 + 3) > a3 )
{
LABEL_5:
memset(v5 + v4 * *((_DWORD *)a1 + 5), 0LL, *((_DWORD *)a1 + 5) * (a3 - v4));
*((_DWORD *)a1 + 2) = a3 + 1;
LABEL_6:
memcpy(*a1 + *((_DWORD *)a1 + 5) * a3, a2, *((unsigned int *)a1 + 5));
return 0LL;
}
v6 = a3 + *((_DWORD *)a1 + 4) - (a3 + *((_DWORD *)a1 + 4)) % *((_DWORD *)a1 + 4);
v7 = realloc(*a1, v6 * *((_DWORD *)a1 + 5));
if ( v7 )
{
v5 = v7;
*a1 = v7;
*((_DWORD *)a1 + 3) = v6;
v4 = *((_DWORD *)a1 + 2);
goto LABEL_5;
}
return 1LL;
}
| ma_set_dynamic:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R14D,EDX
MOV RBX,RSI
MOV R15,RDI
MOV EAX,dword ptr [RDI + 0x8]
CMP EAX,EDX
JA 0x0012f9d0
MOV RCX,qword ptr [R15]
CMP dword ptr [R15 + 0xc],R14D
JA 0x0012f9ad
MOV ESI,dword ptr [R15 + 0x10]
MOV R12D,ESI
ADD R12D,R14D
MOV EAX,R12D
XOR EDX,EDX
DIV ESI
SUB R12D,EDX
MOV ESI,dword ptr [R15 + 0x14]
IMUL ESI,R12D
MOV RDI,RCX
CALL 0x00113730
TEST RAX,RAX
JZ 0x0012f9f1
MOV RCX,RAX
MOV qword ptr [R15],RAX
MOV dword ptr [R15 + 0xc],R12D
MOV EAX,dword ptr [R15 + 0x8]
LAB_0012f9ad:
MOV ESI,dword ptr [R15 + 0x14]
MOV EDX,R14D
SUB EDX,EAX
IMUL EDX,ESI
MOV EDI,ESI
IMUL EDI,EAX
ADD RDI,RCX
XOR ESI,ESI
CALL 0x00113260
LEA EAX,[R14 + 0x1]
MOV dword ptr [R15 + 0x8],EAX
LAB_0012f9d0:
MOV EDX,dword ptr [R15 + 0x14]
IMUL R14D,EDX
ADD R14,qword ptr [R15]
MOV RDI,R14
MOV RSI,RBX
CALL 0x00113390
XOR EAX,EAX
LAB_0012f9e8:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0012f9f1:
MOV AL,0x1
JMP 0x0012f9e8
|
int8 ma_set_dynamic(long *param_1,void *param_2,uint param_3)
{
void *__ptr;
uint uVar1;
int iVar2;
uVar1 = *(uint *)(param_1 + 1);
if (uVar1 <= param_3) {
__ptr = (void *)*param_1;
if (*(uint *)((long)param_1 + 0xc) <= param_3) {
uVar1 = *(uint *)(param_1 + 2) + param_3;
iVar2 = uVar1 - uVar1 % *(uint *)(param_1 + 2);
__ptr = realloc(__ptr,(ulong)(uint)(*(int *)((long)param_1 + 0x14) * iVar2));
if (__ptr == (void *)0x0) {
return 1;
}
*param_1 = (long)__ptr;
*(int *)((long)param_1 + 0xc) = iVar2;
uVar1 = *(uint *)(param_1 + 1);
}
memset((void *)((ulong)(*(int *)((long)param_1 + 0x14) * uVar1) + (long)__ptr),0,
(ulong)((param_3 - uVar1) * *(int *)((long)param_1 + 0x14)));
*(uint *)(param_1 + 1) = param_3 + 1;
}
memcpy((void *)((ulong)(param_3 * *(uint *)((long)param_1 + 0x14)) + *param_1),param_2,
(ulong)*(uint *)((long)param_1 + 0x14));
return 0;
}
| |
43,892 | ftxui::xframe(std::shared_ptr<ftxui::Node>) | Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/dom/frame.cpp | Element xframe(Element child) {
return std::make_shared<Frame>(unpack(std::move(child)), true, false);
} | O1 | cpp | ftxui::xframe(std::shared_ptr<ftxui::Node>):
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
movq (%rsi), %rcx
leaq 0x38(%rsp), %rax
movq %rcx, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq 0x8(%rsi), %rdx
movq %rcx, 0x8(%rsi)
movq %rdx, 0x8(%rax)
movq %rcx, (%rsi)
movq %rsp, %rdi
movq %rax, %rsi
callq 0x22c33
movl $0x70, %edi
callq 0xb3e0
movq %rax, %r14
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%r14)
leaq 0x211fe(%rip), %rax # 0x59ac0
movq %rax, (%r14)
movq %r14, %r15
addq $0x10, %r15
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rax, 0x20(%rsp)
movq %rcx, 0x28(%rsp)
movq 0x10(%rsp), %rdx
movq %rdx, 0x30(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
xorl %edi, %edi
movq %rdi, 0x10(%rsp)
leaq 0x48(%rsp), %rsi
movq %rax, (%rsi)
movq %rcx, 0x8(%rsi)
movq %rdx, 0x10(%rsi)
movaps %xmm0, 0x20(%rsp)
movq %rdi, 0x30(%rsp)
movq %r15, %rdi
callq 0x240f2
leaq 0x48(%rsp), %rdi
callq 0x151c0
leaq 0x211e6(%rip), %rax # 0x59b10
movq %rax, 0x10(%r14)
movw $0x1, 0x6c(%r14)
leaq 0x20(%rsp), %rdi
callq 0x151c0
movq %r15, (%rbx)
movq %r14, 0x8(%rbx)
movq %rsp, %rdi
callq 0x151c0
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x3895d
callq 0x14c7c
movq %rbx, %rax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x151c0
leaq 0x20(%rsp), %rdi
callq 0x151c0
movl $0x70, %esi
movq %r14, %rdi
callq 0xb400
jmp 0x38993
movq %rax, %rbx
movq %rsp, %rdi
callq 0x151c0
jmp 0x389a0
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x389af
callq 0x14c7c
movq %rbx, %rdi
callq 0xb780
| _ZN5ftxui6xframeESt10shared_ptrINS_4NodeEE:
push r15
push r14
push rbx
sub rsp, 60h
mov rbx, rdi
mov rcx, [rsi]
lea rax, [rsp+78h+var_40]
mov [rax], rcx
xor ecx, ecx
mov [rax+8], rcx
mov rdx, [rsi+8]
mov [rsi+8], rcx
mov [rax+8], rdx
mov [rsi], rcx
mov rdi, rsp
mov rsi, rax
call _ZN5ftxui6unpackIJSt10shared_ptrINS_4NodeEEEEESt6vectorIS3_SaIS3_EEDpT_; ftxui::unpack<std::shared_ptr<ftxui::Node>>(std::shared_ptr<ftxui::Node>)
mov edi, 70h ; 'p'; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rax, 100000001h
mov [r14+8], rax
lea rax, off_59AC0
mov [r14], rax
mov r15, r14
add r15, 10h
mov rax, qword ptr [rsp+78h+var_78]
mov rcx, qword ptr [rsp+78h+var_78+8]
mov qword ptr [rsp+78h+var_58], rax
mov qword ptr [rsp+78h+var_58+8], rcx
mov rdx, [rsp+78h+var_68]
mov [rsp+78h+var_48], rdx
xorps xmm0, xmm0
movaps [rsp+78h+var_78], xmm0
xor edi, edi
mov [rsp+78h+var_68], rdi
lea rsi, [rsp+78h+var_30]
mov [rsi], rax
mov [rsi+8], rcx
mov [rsi+10h], rdx
movaps [rsp+78h+var_58], xmm0
mov [rsp+78h+var_48], rdi
mov rdi, r15
call _ZN5ftxui4NodeC2ESt6vectorISt10shared_ptrIS0_ESaIS3_EE; ftxui::Node::Node(std::vector<std::shared_ptr<ftxui::Node>>)
lea rdi, [rsp+78h+var_30]
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
lea rax, off_59B10
mov [r14+10h], rax
mov word ptr [r14+6Ch], 1
lea rdi, [rsp+78h+var_58]
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
mov [rbx], r15
mov [rbx+8], r14
mov rdi, rsp
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
mov rdi, [rsp+78h+var_38]
test rdi, rdi
jz short loc_3895D
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_3895D:
mov rax, rbx
add rsp, 60h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_40]
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
lea rdi, [rsp+arg_18]
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
mov esi, 70h ; 'p'; unsigned __int64
mov rdi, r14; void *
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_38993
mov rbx, rax
loc_38993:
mov rdi, rsp
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
jmp short loc_389A0
mov rbx, rax
loc_389A0:
mov rdi, [rsp+arg_38]
test rdi, rdi
jz short loc_389AF
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_389AF:
mov rdi, rbx
call __Unwind_Resume
| _QWORD * ftxui::xframe(_QWORD *a1, long long *a2)
{
volatile signed __int32 *v2; // rdx
long long v3; // r14
__int128 v4; // kr00_16
long long v5; // rdx
__int128 v7; // [rsp+0h] [rbp-78h] BYREF
long long v8; // [rsp+10h] [rbp-68h]
__int128 v9; // [rsp+20h] [rbp-58h] BYREF
long long v10; // [rsp+30h] [rbp-48h]
long long v11; // [rsp+38h] [rbp-40h] BYREF
volatile signed __int32 *v12; // [rsp+40h] [rbp-38h]
__int128 v13; // [rsp+48h] [rbp-30h] BYREF
long long v14; // [rsp+58h] [rbp-20h]
v11 = *a2;
v12 = 0LL;
v2 = (volatile signed __int32 *)a2[1];
a2[1] = 0LL;
v12 = v2;
*a2 = 0LL;
ftxui::unpack<std::shared_ptr<ftxui::Node>>((long long)&v7, &v11);
v3 = operator new(0x70uLL);
*(_QWORD *)(v3 + 8) = 0x100000001LL;
*(_QWORD *)v3 = off_59AC0;
v4 = v7;
v5 = v8;
v7 = 0LL;
v8 = 0LL;
v13 = v4;
v14 = v5;
v9 = 0LL;
v10 = 0LL;
ftxui::Node::Node(v3 + 16, &v13);
std::vector<std::shared_ptr<ftxui::Node>>::~vector((void **)&v13);
*(_QWORD *)(v3 + 16) = off_59B10;
*(_WORD *)(v3 + 108) = 1;
std::vector<std::shared_ptr<ftxui::Node>>::~vector((void **)&v9);
*a1 = v3 + 16;
a1[1] = v3;
std::vector<std::shared_ptr<ftxui::Node>>::~vector((void **)&v7);
if ( v12 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v12);
return a1;
}
| xframe:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x60
MOV RBX,RDI
MOV RCX,qword ptr [RSI]
LEA RAX,[RSP + 0x38]
MOV qword ptr [RAX],RCX
XOR ECX,ECX
MOV qword ptr [RAX + 0x8],RCX
MOV RDX,qword ptr [RSI + 0x8]
MOV qword ptr [RSI + 0x8],RCX
MOV qword ptr [RAX + 0x8],RDX
MOV qword ptr [RSI],RCX
LAB_00138895:
MOV RDI,RSP
MOV RSI,RAX
CALL 0x00122c33
LAB_001388a0:
MOV EDI,0x70
CALL 0x0010b3e0
MOV R14,RAX
MOV RAX,0x100000001
MOV qword ptr [R14 + 0x8],RAX
LEA RAX,[0x159ac0]
MOV qword ptr [R14],RAX
MOV R15,R14
ADD R15,0x10
MOV RAX,qword ptr [RSP]
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RCX
MOV RDX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x30],RDX
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
XOR EDI,EDI
MOV qword ptr [RSP + 0x10],RDI
LEA RSI,[RSP + 0x48]
MOV qword ptr [RSI],RAX
MOV qword ptr [RSI + 0x8],RCX
MOV qword ptr [RSI + 0x10],RDX
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOV qword ptr [RSP + 0x30],RDI
LAB_00138911:
MOV RDI,R15
CALL 0x001240f2
LAB_00138919:
LEA RDI,[RSP + 0x48]
CALL 0x001151c0
LEA RAX,[0x159b10]
MOV qword ptr [R14 + 0x10],RAX
MOV word ptr [R14 + 0x6c],0x1
LEA RDI,[RSP + 0x20]
CALL 0x001151c0
MOV qword ptr [RBX],R15
MOV qword ptr [RBX + 0x8],R14
MOV RDI,RSP
CALL 0x001151c0
MOV RDI,qword ptr [RSP + 0x40]
TEST RDI,RDI
JZ 0x0013895d
CALL 0x00114c7c
LAB_0013895d:
MOV RAX,RBX
ADD RSP,0x60
POP RBX
POP R14
POP R15
RET
|
/* ftxui::xframe(std::shared_ptr<ftxui::Node>) */
ftxui * __thiscall ftxui::xframe(ftxui *this,int8 *param_2)
{
int8 *puVar1;
int8 local_78;
int8 uStack_70;
int8 local_68;
int8 local_58;
int8 uStack_50;
int8 local_48;
int8 local_40;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_38;
int8 local_30;
int8 local_28;
int8 local_20;
local_40 = *param_2;
local_38 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_2[1];
param_2[1] = 0;
*param_2 = 0;
/* try { // try from 00138895 to 0013889f has its CatchHandler @ 0013899d */
unpack<std::shared_ptr<ftxui::Node>>((ftxui *)&local_78,&local_40);
/* try { // try from 001388a0 to 001388a9 has its CatchHandler @ 00138990 */
puVar1 = (int8 *)operator_new(0x70);
local_20 = local_68;
local_28 = uStack_70;
local_30 = local_78;
puVar1[1] = 0x100000001;
*puVar1 = &PTR___Sp_counted_ptr_inplace_00159ac0;
local_78 = 0;
uStack_70 = 0;
local_68 = 0;
local_58 = 0;
uStack_50 = 0;
local_48 = 0;
/* try { // try from 00138911 to 00138918 has its CatchHandler @ 0013896a */
Node::Node((Node *)(puVar1 + 2));
std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector
((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *)
&local_30);
puVar1[2] = &PTR__Node_00159b10;
*(int2 *)((long)puVar1 + 0x6c) = 1;
std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector
((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *)
&local_58);
*(Node **)this = (Node *)(puVar1 + 2);
*(int8 **)(this + 8) = puVar1;
std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector
((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *)
&local_78);
if (local_38 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_38);
}
return this;
}
| |
43,893 | line_dbl | corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/pairing.c | static void line_dbl(vec384fp6 line, POINTonE2 *T, const POINTonE2 *Q)
{
vec384x ZZ, A, B, C, D, E, F;
/*
* https://www.hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#doubling-dbl-2009-alnr
*/
sqr_fp2(A, Q->X); /* A = X1^2 */
sqr_fp2(B, Q->Y); /* B = Y1^2 */
sqr_fp2(ZZ, Q->Z); /* ZZ = Z1^2 */
sqr_fp2(C, B); /* C = B^2 */
add_fp2(D, Q->X, B); /* X1+B */
sqr_fp2(D, D); /* (X1+B)^2 */
sub_fp2(D, D, A); /* (X1+B)^2-A */
sub_fp2(D, D, C); /* (X1+B)^2-A-C */
add_fp2(D, D, D); /* D = 2*((X1+B)^2-A-C) */
mul_by_3_fp2(E, A); /* E = 3*A */
sqr_fp2(F, E); /* F = E^2 */
add_fp2(line[0], E, Q->X); /* 3*A+X1 for line evaluation */
sub_fp2(T->X, F, D);
sub_fp2(T->X, T->X, D); /* X3 = F-2*D */
add_fp2(T->Z, Q->Y, Q->Z);
sqr_fp2(T->Z, T->Z);
sub_fp2(T->Z, T->Z, B);
sub_fp2(T->Z, T->Z, ZZ); /* Z3 = (Y1+Z1)^2-B-ZZ */
mul_by_8_fp2(C, C); /* 8*C */
sub_fp2(T->Y, D, T->X); /* D-X3 */
mul_fp2(T->Y, T->Y, E); /* E*(D-X3) */
sub_fp2(T->Y, T->Y, C); /* Y3 = E*(D-X3)-8*C */
/*
* line evaluation
*/
sqr_fp2(line[0], line[0]);
sub_fp2(line[0], line[0], A);
sub_fp2(line[0], line[0], F); /* (3*A+X1)^2 - X1^2 - 9*A^2 */
lshift_fp2(B, B, 2);
sub_fp2(line[0], line[0], B); /* 6*X1^3 - 4*Y1^2 */
mul_fp2(line[1], E, ZZ); /* 3*X1^2 * Z1^2 */
mul_fp2(line[2], T->Z, ZZ); /* Z3 * Z1^2 */
} | O0 | c | line_dbl:
pushq %rbp
movq %rsp, %rbp
subq $0x2c0, %rsp # imm = 0x2C0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0xe0(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x312a0
leaq -0x140(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x60, %rsi
callq 0x312a0
leaq -0x80(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0xc0, %rsi
callq 0x312a0
leaq -0x1a0(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x312a0
leaq -0x200(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x140(%rbp), %rdx
callq 0x31000
leaq -0x200(%rbp), %rdi
leaq -0x200(%rbp), %rsi
callq 0x312a0
leaq -0x200(%rbp), %rdi
leaq -0x200(%rbp), %rsi
leaq -0xe0(%rbp), %rdx
callq 0x31070
leaq -0x200(%rbp), %rdi
leaq -0x200(%rbp), %rsi
leaq -0x1a0(%rbp), %rdx
callq 0x31070
leaq -0x200(%rbp), %rdi
leaq -0x200(%rbp), %rsi
leaq -0x200(%rbp), %rdx
callq 0x31000
leaq -0x260(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x310e0
leaq -0x2c0(%rbp), %rdi
leaq -0x260(%rbp), %rsi
callq 0x312a0
movq -0x8(%rbp), %rdi
leaq -0x260(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x31000
movq -0x10(%rbp), %rdi
leaq -0x2c0(%rbp), %rsi
leaq -0x200(%rbp), %rdx
callq 0x31070
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x200(%rbp), %rdx
callq 0x31070
movq -0x10(%rbp), %rdi
addq $0xc0, %rdi
movq -0x18(%rbp), %rsi
addq $0x60, %rsi
movq -0x18(%rbp), %rdx
addq $0xc0, %rdx
callq 0x31000
movq -0x10(%rbp), %rdi
addq $0xc0, %rdi
movq -0x10(%rbp), %rsi
addq $0xc0, %rsi
callq 0x312a0
movq -0x10(%rbp), %rdi
addq $0xc0, %rdi
movq -0x10(%rbp), %rsi
addq $0xc0, %rsi
leaq -0x140(%rbp), %rdx
callq 0x31070
movq -0x10(%rbp), %rdi
addq $0xc0, %rdi
movq -0x10(%rbp), %rsi
addq $0xc0, %rsi
leaq -0x80(%rbp), %rdx
callq 0x31070
leaq -0x1a0(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0x31140
movq -0x10(%rbp), %rdi
addq $0x60, %rdi
leaq -0x200(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x31070
movq -0x10(%rbp), %rdi
addq $0x60, %rdi
movq -0x10(%rbp), %rsi
addq $0x60, %rsi
leaq -0x260(%rbp), %rdx
callq 0x31230
movq -0x10(%rbp), %rdi
addq $0x60, %rdi
movq -0x10(%rbp), %rsi
addq $0x60, %rsi
leaq -0x1a0(%rbp), %rdx
callq 0x31070
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x312a0
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
leaq -0xe0(%rbp), %rdx
callq 0x31070
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
leaq -0x2c0(%rbp), %rdx
callq 0x31070
leaq -0x140(%rbp), %rdi
leaq -0x140(%rbp), %rsi
movl $0x2, %edx
callq 0x311a0
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
leaq -0x140(%rbp), %rdx
callq 0x31070
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
leaq -0x260(%rbp), %rsi
leaq -0x80(%rbp), %rdx
callq 0x31230
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
movq -0x10(%rbp), %rsi
addq $0xc0, %rsi
leaq -0x80(%rbp), %rdx
callq 0x31230
addq $0x2c0, %rsp # imm = 0x2C0
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| line_dbl:
push rbp
mov rbp, rsp
sub rsp, 2C0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
lea rdi, [rbp+var_E0]
mov rsi, [rbp+var_18]
call sqr_fp2
lea rdi, [rbp+var_140]
mov rsi, [rbp+var_18]
add rsi, 60h ; '`'
call sqr_fp2
lea rdi, [rbp+var_80]
mov rsi, [rbp+var_18]
add rsi, 0C0h
call sqr_fp2
lea rdi, [rbp+var_1A0]
lea rsi, [rbp+var_140]
call sqr_fp2
lea rdi, [rbp+var_200]
mov rsi, [rbp+var_18]
lea rdx, [rbp+var_140]
call add_fp2
lea rdi, [rbp+var_200]
lea rsi, [rbp+var_200]
call sqr_fp2
lea rdi, [rbp+var_200]
lea rsi, [rbp+var_200]
lea rdx, [rbp+var_E0]
call _sub_fp2
lea rdi, [rbp+var_200]
lea rsi, [rbp+var_200]
lea rdx, [rbp+var_1A0]
call _sub_fp2
lea rdi, [rbp+var_200]
lea rsi, [rbp+var_200]
lea rdx, [rbp+var_200]
call add_fp2
lea rdi, [rbp+var_260]
lea rsi, [rbp+var_E0]
call mul_by_3_fp2
lea rdi, [rbp+var_2C0]
lea rsi, [rbp+var_260]
call sqr_fp2
mov rdi, [rbp+var_8]
lea rsi, [rbp+var_260]
mov rdx, [rbp+var_18]
call add_fp2
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_2C0]
lea rdx, [rbp+var_200]
call _sub_fp2
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_10]
lea rdx, [rbp+var_200]
call _sub_fp2
mov rdi, [rbp+var_10]
add rdi, 0C0h
mov rsi, [rbp+var_18]
add rsi, 60h ; '`'
mov rdx, [rbp+var_18]
add rdx, 0C0h
call add_fp2
mov rdi, [rbp+var_10]
add rdi, 0C0h
mov rsi, [rbp+var_10]
add rsi, 0C0h
call sqr_fp2
mov rdi, [rbp+var_10]
add rdi, 0C0h
mov rsi, [rbp+var_10]
add rsi, 0C0h
lea rdx, [rbp+var_140]
call _sub_fp2
mov rdi, [rbp+var_10]
add rdi, 0C0h
mov rsi, [rbp+var_10]
add rsi, 0C0h
lea rdx, [rbp+var_80]
call _sub_fp2
lea rdi, [rbp+var_1A0]
lea rsi, [rbp+var_1A0]
call mul_by_8_fp2
mov rdi, [rbp+var_10]
add rdi, 60h ; '`'
lea rsi, [rbp+var_200]
mov rdx, [rbp+var_10]
call _sub_fp2
mov rdi, [rbp+var_10]
add rdi, 60h ; '`'
mov rsi, [rbp+var_10]
add rsi, 60h ; '`'
lea rdx, [rbp+var_260]
call mul_fp2
mov rdi, [rbp+var_10]
add rdi, 60h ; '`'
mov rsi, [rbp+var_10]
add rsi, 60h ; '`'
lea rdx, [rbp+var_1A0]
call _sub_fp2
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_8]
call sqr_fp2
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_8]
lea rdx, [rbp+var_E0]
call _sub_fp2
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_8]
lea rdx, [rbp+var_2C0]
call _sub_fp2
lea rdi, [rbp+var_140]
lea rsi, [rbp+var_140]
mov edx, 2
call lshift_fp2
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_8]
lea rdx, [rbp+var_140]
call _sub_fp2
mov rdi, [rbp+var_8]
add rdi, 60h ; '`'
lea rsi, [rbp+var_260]
lea rdx, [rbp+var_80]
call mul_fp2
mov rdi, [rbp+var_8]
add rdi, 0C0h
mov rsi, [rbp+var_10]
add rsi, 0C0h
lea rdx, [rbp+var_80]
call mul_fp2
add rsp, 2C0h
pop rbp
retn
| long long line_dbl(long long a1, long long a2, long long a3)
{
_BYTE v4[96]; // [rsp+0h] [rbp-2C0h] BYREF
_BYTE v5[96]; // [rsp+60h] [rbp-260h] BYREF
_BYTE v6[96]; // [rsp+C0h] [rbp-200h] BYREF
_BYTE v7[96]; // [rsp+120h] [rbp-1A0h] BYREF
_BYTE v8[96]; // [rsp+180h] [rbp-140h] BYREF
_BYTE v9[96]; // [rsp+1E0h] [rbp-E0h] BYREF
_BYTE v10[104]; // [rsp+240h] [rbp-80h] BYREF
long long v11; // [rsp+2A8h] [rbp-18h]
long long v12; // [rsp+2B0h] [rbp-10h]
long long v13; // [rsp+2B8h] [rbp-8h]
v13 = a1;
v12 = a2;
v11 = a3;
sqr_fp2((long long)v9, a3);
sqr_fp2((long long)v8, v11 + 96);
sqr_fp2((long long)v10, v11 + 192);
sqr_fp2((long long)v7, (long long)v8);
add_fp2((long long)v6, v11, (long long)v8);
sqr_fp2((long long)v6, (long long)v6);
sub_fp2((long long)v6, (long long)v6, (long long)v9);
sub_fp2((long long)v6, (long long)v6, (long long)v7);
add_fp2((long long)v6, (long long)v6, (long long)v6);
mul_by_3_fp2((long long)v5, (long long)v9);
sqr_fp2((long long)v4, (long long)v5);
add_fp2(v13, (long long)v5, v11);
sub_fp2(v12, (long long)v4, (long long)v6);
sub_fp2(v12, v12, (long long)v6);
add_fp2(v12 + 192, v11 + 96, v11 + 192);
sqr_fp2(v12 + 192, v12 + 192);
sub_fp2(v12 + 192, v12 + 192, (long long)v8);
sub_fp2(v12 + 192, v12 + 192, (long long)v10);
mul_by_8_fp2((long long)v7, (long long)v7);
sub_fp2(v12 + 96, (long long)v6, v12);
mul_fp2(v12 + 96, v12 + 96, (long long)v5);
sub_fp2(v12 + 96, v12 + 96, (long long)v7);
sqr_fp2(v13, v13);
sub_fp2(v13, v13, (long long)v9);
sub_fp2(v13, v13, (long long)v4);
lshift_fp2((long long)v8, (long long)v8, 2LL);
sub_fp2(v13, v13, (long long)v8);
mul_fp2(v13 + 96, (long long)v5, (long long)v10);
return mul_fp2(v13 + 192, v12 + 192, (long long)v10);
}
| line_dbl:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x2c0
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
LEA RDI,[RBP + -0xe0]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001312a0
LEA RDI,[RBP + -0x140]
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x60
CALL 0x001312a0
LEA RDI,[RBP + -0x80]
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0xc0
CALL 0x001312a0
LEA RDI,[RBP + -0x1a0]
LEA RSI,[RBP + -0x140]
CALL 0x001312a0
LEA RDI,[RBP + -0x200]
MOV RSI,qword ptr [RBP + -0x18]
LEA RDX,[RBP + -0x140]
CALL 0x00131000
LEA RDI,[RBP + -0x200]
LEA RSI,[RBP + -0x200]
CALL 0x001312a0
LEA RDI,[RBP + -0x200]
LEA RSI,[RBP + -0x200]
LEA RDX,[RBP + -0xe0]
CALL 0x00131070
LEA RDI,[RBP + -0x200]
LEA RSI,[RBP + -0x200]
LEA RDX,[RBP + -0x1a0]
CALL 0x00131070
LEA RDI,[RBP + -0x200]
LEA RSI,[RBP + -0x200]
LEA RDX,[RBP + -0x200]
CALL 0x00131000
LEA RDI,[RBP + -0x260]
LEA RSI,[RBP + -0xe0]
CALL 0x001310e0
LEA RDI,[RBP + -0x2c0]
LEA RSI,[RBP + -0x260]
CALL 0x001312a0
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[RBP + -0x260]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x00131000
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x2c0]
LEA RDX,[RBP + -0x200]
CALL 0x00131070
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDX,[RBP + -0x200]
CALL 0x00131070
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0xc0
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x60
MOV RDX,qword ptr [RBP + -0x18]
ADD RDX,0xc0
CALL 0x00131000
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0xc0
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0xc0
CALL 0x001312a0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0xc0
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0xc0
LEA RDX,[RBP + -0x140]
CALL 0x00131070
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0xc0
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0xc0
LEA RDX,[RBP + -0x80]
CALL 0x00131070
LEA RDI,[RBP + -0x1a0]
LEA RSI,[RBP + -0x1a0]
CALL 0x00131140
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x60
LEA RSI,[RBP + -0x200]
MOV RDX,qword ptr [RBP + -0x10]
CALL 0x00131070
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x60
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x60
LEA RDX,[RBP + -0x260]
CALL 0x00131230
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x60
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x60
LEA RDX,[RBP + -0x1a0]
CALL 0x00131070
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x001312a0
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x8]
LEA RDX,[RBP + -0xe0]
CALL 0x00131070
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x8]
LEA RDX,[RBP + -0x2c0]
CALL 0x00131070
LEA RDI,[RBP + -0x140]
LEA RSI,[RBP + -0x140]
MOV EDX,0x2
CALL 0x001311a0
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x8]
LEA RDX,[RBP + -0x140]
CALL 0x00131070
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x60
LEA RSI,[RBP + -0x260]
LEA RDX,[RBP + -0x80]
CALL 0x00131230
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0xc0
LEA RDX,[RBP + -0x80]
CALL 0x00131230
ADD RSP,0x2c0
POP RBP
RET
|
void line_dbl(long param_1,long param_2,long param_3)
{
int1 local_2c8 [96];
int1 local_268 [96];
int1 local_208 [96];
int1 local_1a8 [96];
int1 local_148 [96];
int1 local_e8 [96];
int1 local_88 [104];
long local_20;
long local_18;
long local_10;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
sqr_fp2(local_e8,param_3);
sqr_fp2(local_148,local_20 + 0x60);
sqr_fp2(local_88,local_20 + 0xc0);
sqr_fp2(local_1a8,local_148);
add_fp2(local_208,local_20,local_148);
sqr_fp2(local_208,local_208);
sub_fp2(local_208,local_208,local_e8);
sub_fp2(local_208,local_208,local_1a8);
add_fp2(local_208,local_208,local_208);
mul_by_3_fp2(local_268,local_e8);
sqr_fp2(local_2c8,local_268);
add_fp2(local_10,local_268,local_20);
sub_fp2(local_18,local_2c8,local_208);
sub_fp2(local_18,local_18,local_208);
add_fp2(local_18 + 0xc0,local_20 + 0x60,local_20 + 0xc0);
sqr_fp2(local_18 + 0xc0,local_18 + 0xc0);
sub_fp2(local_18 + 0xc0,local_18 + 0xc0,local_148);
sub_fp2(local_18 + 0xc0,local_18 + 0xc0,local_88);
mul_by_8_fp2(local_1a8,local_1a8);
sub_fp2(local_18 + 0x60,local_208,local_18);
mul_fp2(local_18 + 0x60,local_18 + 0x60,local_268);
sub_fp2(local_18 + 0x60,local_18 + 0x60,local_1a8);
sqr_fp2(local_10,local_10);
sub_fp2(local_10,local_10,local_e8);
sub_fp2(local_10,local_10,local_2c8);
lshift_fp2(local_148,local_148,2);
sub_fp2(local_10,local_10,local_148);
mul_fp2(local_10 + 0x60,local_268,local_88);
mul_fp2(local_10 + 0xc0,local_18 + 0xc0,local_88);
return;
}
| |
43,894 | OpenSubdiv::v3_6_0::Tmr::TopologyMap::GetByteSize(bool) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/topologyMap.cpp | size_t
TopologyMap::GetByteSize(bool includeNeighborhoods) const {
size_t size = 0;
for (int i = 0; i < GetNumSubdivisionPlans(); ++i)
if (SubdivisionPlan const* plan = _plansTable[i].get())
size += plan->GetByteSize(includeNeighborhoods);
return size;
} | O0 | cpp | OpenSubdiv::v3_6_0::Tmr::TopologyMap::GetByteSize(bool) const:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x30(%rbp), %rdi
movl -0x1c(%rbp), %eax
movl %eax, -0x34(%rbp)
callq 0xcd870
movl %eax, %ecx
movl -0x34(%rbp), %eax
cmpl %ecx, %eax
jge 0x1e418d
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
movslq -0x1c(%rbp), %rsi
callq 0xce8c0
movq %rax, %rdi
callq 0xd15e0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x1e4180
movq -0x28(%rbp), %rdi
movb -0x9(%rbp), %al
andb $0x1, %al
movzbl %al, %esi
callq 0xd2b40
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x1e4182
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1e412b
movq -0x18(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _ZNK10OpenSubdiv6v3_6_03Tmr11TopologyMap11GetByteSizeEb:
push rbp
mov rbp, rsp
sub rsp, 40h
mov al, sil
mov [rbp+var_8], rdi
and al, 1
mov [rbp+var_9], al
mov rax, [rbp+var_8]
mov [rbp+var_30], rax
mov [rbp+var_18], 0
mov [rbp+var_1C], 0
loc_1E412B:
mov rdi, [rbp+var_30]; this
mov eax, [rbp+var_1C]
mov [rbp+var_34], eax
call __ZNK10OpenSubdiv6v3_6_03Tmr11TopologyMap22GetNumSubdivisionPlansEv; OpenSubdiv::v3_6_0::Tmr::TopologyMap::GetNumSubdivisionPlans(void)
mov ecx, eax
mov eax, [rbp+var_34]
cmp eax, ecx
jge short loc_1E418D
mov rdi, [rbp+var_30]
add rdi, 70h ; 'p'
movsxd rsi, [rbp+var_1C]
call __ZNKSt6vectorISt10unique_ptrIKN10OpenSubdiv6v3_6_03Tmr15SubdivisionPlanESt14default_deleteIS5_EESaIS8_EEixEm; std::vector<std::unique_ptr<OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan const>>::operator[](ulong)
mov rdi, rax
call __ZNKSt10unique_ptrIKN10OpenSubdiv6v3_6_03Tmr15SubdivisionPlanESt14default_deleteIS4_EE3getEv; std::unique_ptr<OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan const>::get(void)
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jz short loc_1E4180
mov rdi, [rbp+var_28]; this
mov al, [rbp+var_9]
and al, 1
movzx esi, al; bool
call __ZNK10OpenSubdiv6v3_6_03Tmr15SubdivisionPlan11GetByteSizeEb; OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::GetByteSize(bool)
add rax, [rbp+var_18]
mov [rbp+var_18], rax
loc_1E4180:
jmp short $+2
loc_1E4182:
mov eax, [rbp+var_1C]
add eax, 1
mov [rbp+var_1C], eax
jmp short loc_1E412B
loc_1E418D:
mov rax, [rbp+var_18]
add rsp, 40h
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Tmr::TopologyMap::GetByteSize(
OpenSubdiv::v3_6_0::Tmr::TopologyMap *this,
char a2)
{
long long v2; // rax
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan *v4; // [rsp+18h] [rbp-28h]
int i; // [rsp+24h] [rbp-1Ch]
long long v6; // [rsp+28h] [rbp-18h]
v6 = 0LL;
for ( i = 0; i < (int)OpenSubdiv::v3_6_0::Tmr::TopologyMap::GetNumSubdivisionPlans(this); ++i )
{
v2 = std::vector<std::unique_ptr<OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan const>>::operator[]((char *)this + 112, i);
v4 = (OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan *)std::unique_ptr<OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan const>::get(v2);
if ( v4 )
v6 += OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::GetByteSize(v4, a2 & 1);
}
return v6;
}
| construct_at<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ValueTag,OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ValueTag_const&>:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x10]
MOV CL,byte ptr [RCX]
MOV byte ptr [RAX],CL
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* decltype (::new ((void*)(0))
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ValueTag((std::declval<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ValueTag
const&>)())) std::construct_at<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ValueTag,
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ValueTag
const&>(OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ValueTag*,
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ValueTag const&) */
void std::
construct_at<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ValueTag,OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ValueTag_const&>
(ValueTag *param_1,ValueTag *param_2)
{
*param_1 = *param_2;
return;
}
| |
43,895 | 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, 0x1f755(%rip) # 0x41b10
jne 0x223ed
movq %rdi, %rbx
movl $0x2f, %esi
callq 0x75b0
leaq 0x1(%rax), %rcx
testq %rax, %rax
cmoveq %rbx, %rcx
movq %rcx, 0x1f734(%rip) # 0x41b10
leaq 0x6c(%rip), %rdi # 0x2244f
addq $0x60, %rsp
popq %rbx
jmp 0xc15b
leaq 0x2d48(%rip), %rsi # 0x2513c
movq %rsp, %rbx
movq %rbx, %rdi
movl $0x12b, %edx # imm = 0x12B
callq 0xf05c
movq %rbx, %rdi
callq 0xb7ce
movq %rax, %rbx
leaq 0x2d6f(%rip), %rsi # 0x25185
movl $0x26, %edx
movq %rax, %rdi
callq 0x7600
leaq 0x2d82(%rip), %rsi # 0x251ac
movl $0x25, %edx
movq %rbx, %rdi
callq 0x7600
movq %rsp, %rdi
callq 0xf0a0
movq %rsp, %rdi
callq 0xf0a0
movq %rax, %rdi
callq 0x9923
| _ZN5nglog5tools26InitializeLoggingUtilitiesEPKc:
push rbx
sub rsp, 60h
cmp cs:_ZN5nglogL31g_program_invocation_short_nameE, 0; nglog::g_program_invocation_short_name
jnz short loc_223ED
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_223ED:
lea rsi, aWorkspaceLlm4b_4; "/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 [0x00141b10],0x0
JNZ 0x001223ed
MOV RBX,RDI
MOV ESI,0x2f
CALL 0x001075b0
LEA RCX,[RAX + 0x1]
TEST RAX,RAX
CMOVZ RCX,RBX
MOV qword ptr [0x00141b10],RCX
LEA RDI,[0x12244f]
ADD RSP,0x60
POP RBX
JMP 0x0010c15b
LAB_001223ed:
LEA RSI,[0x12513c]
MOV RBX,RSP
MOV RDI,RBX
MOV EDX,0x12b
CALL 0x0010f05c
LAB_00122404:
MOV RDI,RBX
CALL 0x0010b7ce
MOV RBX,RAX
LEA RSI,[0x125185]
MOV EDX,0x26
MOV RDI,RAX
CALL 0x00107600
LEA RSI,[0x1251ac]
MOV EDX,0x25
MOV RDI,RBX
CALL 0x00107600
LAB_00122437:
MOV RDI,RSP
CALL 0x0010f0a0
LAB_0012243f:
MOV RDI,RSP
CALL 0x0010f0a0
LAB_00122447:
MOV RDI,RAX
CALL 0x00109923
|
/* 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 00122404 to 00122436 has its CatchHandler @ 0012243f */
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 @ 00122404 with catch @ 0012243f
try { // try from 0012243f to 00122446 has its CatchHandler @ 00122447 */
uVar3 = LogMessageFatal::~LogMessageFatal(aLStack_68);
/* catch(type#1 @ 00000000) { ... } // from try @ 0012243f with catch @ 00122447
*/
/* WARNING: Subroutine does not return */
__clang_call_terminate(uVar3);
}
| |
43,896 | 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, 0x2303f(%rip) # 0x41b80
je 0x1eb55
andq $0x0, 0x23035(%rip) # 0x41b80
addq $0x60, %rsp
popq %rbx
jmp 0x8580
leaq 0x35f4(%rip), %rsi # 0x22150
movq %rsp, %rbx
movq %rbx, %rdi
movl $0x134, %edx # imm = 0x134
callq 0xe49a
movq %rbx, %rdi
callq 0xbdd2
leaq 0x366b(%rip), %rsi # 0x221e6
movq %rax, %rdi
callq 0x8590
leaq 0x3682(%rip), %rsi # 0x2220c
movq %rax, %rdi
callq 0x8590
movq %rsp, %rdi
callq 0xe4a8
movq %rsp, %rdi
callq 0xe4a8
movq %rax, %rdi
callq 0xa2c5
| _ZN5nglog5tools24ShutdownLoggingUtilitiesEv:
push rbx
sub rsp, 60h
cmp cs:_ZN5nglogL31g_program_invocation_short_nameE, 0; nglog::g_program_invocation_short_name
jz short loc_1EB55
and cs:_ZN5nglogL31g_program_invocation_short_nameE, 0; nglog::g_program_invocation_short_name
add rsp, 60h
pop rbx
jmp _closelog
loc_1EB55:
lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
mov rbx, rsp
mov rdi, rbx; this
mov edx, 134h; int
call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int)
mov rdi, rbx; this
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
lea rsi, aCheckFailedIsl_0; "Check failed: IsLoggingInitialized() "
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
lea rsi, aYouCalledShutd; "You called ShutdownLogging() without ca"...
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::ShutdownLoggingUtilities(nglog::tools *this)
{
long long v2; // rax
long long v3; // rax
_BYTE v4[104]; // [rsp+0h] [rbp-68h] BYREF
if ( !nglog::g_program_invocation_short_name )
{
nglog::LogMessageFatal::LogMessageFatal(
(nglog::LogMessageFatal *)v4,
(nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/utilities.cc",
308);
v2 = nglog::LogMessage::stream((nglog::LogMessage *)v4);
v3 = std::operator<<<std::char_traits<char>>(v2, "Check failed: IsLoggingInitialized() ");
std::operator<<<std::char_traits<char>>(
v3,
"You called ShutdownLogging() without calling InitializeLogging() first!");
nglog::LogMessageFatal::~LogMessageFatal(
(nglog::LogMessageFatal *)v4,
(nglog::internal::LogMessageData *)"You called ShutdownLogging() without calling InitializeLogging() first!");
}
nglog::g_program_invocation_short_name = 0LL;
return closelog(this);
}
| ShutdownLoggingUtilities:
PUSH RBX
SUB RSP,0x60
CMP qword ptr [0x00141b80],0x0
JZ 0x0011eb55
AND qword ptr [0x00141b80],0x0
ADD RSP,0x60
POP RBX
JMP 0x00108580
LAB_0011eb55:
LEA RSI,[0x122150]
MOV RBX,RSP
MOV RDI,RBX
MOV EDX,0x134
CALL 0x0010e49a
LAB_0011eb6c:
MOV RDI,RBX
CALL 0x0010bdd2
LEA RSI,[0x1221e6]
MOV RDI,RAX
CALL 0x00108590
LEA RSI,[0x12220c]
MOV RDI,RAX
CALL 0x00108590
LAB_0011eb92:
MOV RDI,RSP
CALL 0x0010e4a8
LAB_0011eb9a:
MOV RDI,RSP
CALL 0x0010e4a8
LAB_0011eba2:
MOV RDI,RAX
CALL 0x0010a2c5
|
/* nglog::tools::ShutdownLoggingUtilities() */
void nglog::tools::ShutdownLoggingUtilities(void)
{
ostream *poVar1;
int8 uVar2;
LogMessageFatal aLStack_68 [96];
if (g_program_invocation_short_name != 0) {
g_program_invocation_short_name = 0;
closelog();
return;
}
LogMessageFatal::LogMessageFatal
(aLStack_68,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/utilities.cc",
0x134);
/* try { // try from 0011eb6c to 0011eb91 has its CatchHandler @ 0011eb9a */
poVar1 = (ostream *)LogMessage::stream((LogMessage *)aLStack_68);
poVar1 = std::operator<<(poVar1,"Check failed: IsLoggingInitialized() ");
std::operator<<(poVar1,"You called ShutdownLogging() without calling InitializeLogging() first!");
LogMessageFatal::~LogMessageFatal(aLStack_68);
/* catch(type#1 @ 00000000) { ... } // from try @ 0011eb6c with catch @ 0011eb9a
try { // try from 0011eb9a to 0011eba1 has its CatchHandler @ 0011eba2 */
uVar2 = LogMessageFatal::~LogMessageFatal(aLStack_68);
/* catch(type#1 @ 00000000) { ... } // from try @ 0011eb9a with catch @ 0011eba2
*/
/* WARNING: Subroutine does not return */
__clang_call_terminate(uVar2);
}
| |
43,897 | nglog::tools::InitializeLoggingUtilities(char const*) | ng-log[P]ng-log/src/utilities.cc | bool IsLoggingInitialized() {
return g_program_invocation_short_name != nullptr;
} | O3 | cpp | nglog::tools::InitializeLoggingUtilities(char const*):
pushq %rbx
subq $0x60, %rsp
cmpq $0x0, 0x1fb0d(%rip) # 0x41b10
jne 0x22035
movq %rdi, %rbx
movl $0x2f, %esi
callq 0x75b0
leaq 0x1(%rax), %rcx
testq %rax, %rax
cmoveq %rbx, %rcx
movq %rcx, 0x1faec(%rip) # 0x41b10
leaq 0x6c(%rip), %rdi # 0x22097
addq $0x60, %rsp
popq %rbx
jmp 0xbf55
leaq 0x30d8(%rip), %rsi # 0x25114
movq %rsp, %rbx
movq %rbx, %rdi
movl $0x12b, %edx # imm = 0x12B
callq 0xee3a
movq %rbx, %rdi
callq 0xb5b2
movq %rax, %rbx
leaq 0x30ff(%rip), %rsi # 0x2515d
movl $0x26, %edx
movq %rax, %rdi
callq 0x7600
leaq 0x3112(%rip), %rsi # 0x25184
movl $0x25, %edx
movq %rbx, %rdi
callq 0x7600
movq %rsp, %rdi
callq 0xee7e
movq %rsp, %rdi
callq 0xee7e
movq %rax, %rdi
callq 0x9777
| _ZN5nglog5tools26InitializeLoggingUtilitiesEPKc:
push rbx
sub rsp, 60h
cmp cs:_ZN5nglogL31g_program_invocation_short_nameE, 0; nglog::g_program_invocation_short_name
jnz short loc_22035
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_22035:
lea rsi, aWorkspaceLlm4b_4; "/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 [0x00141b10],0x0
JNZ 0x00122035
MOV RBX,RDI
MOV ESI,0x2f
CALL 0x001075b0
LEA RCX,[RAX + 0x1]
TEST RAX,RAX
CMOVZ RCX,RBX
MOV qword ptr [0x00141b10],RCX
LEA RDI,[0x122097]
ADD RSP,0x60
POP RBX
JMP 0x0010bf55
LAB_00122035:
LEA RSI,[0x125114]
MOV RBX,RSP
MOV RDI,RBX
MOV EDX,0x12b
CALL 0x0010ee3a
LAB_0012204c:
MOV RDI,RBX
CALL 0x0010b5b2
MOV RBX,RAX
LEA RSI,[0x12515d]
MOV EDX,0x26
MOV RDI,RAX
CALL 0x00107600
LEA RSI,[0x125184]
MOV EDX,0x25
MOV RDI,RBX
CALL 0x00107600
LAB_0012207f:
MOV RDI,RSP
CALL 0x0010ee7e
LAB_00122087:
MOV RDI,RSP
CALL 0x0010ee7e
LAB_0012208f:
MOV RDI,RAX
CALL 0x00109777
|
/* 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 0012204c to 0012207e has its CatchHandler @ 00122087 */
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 @ 0012204c with catch @ 00122087
try { // try from 00122087 to 0012208e has its CatchHandler @ 0012208f */
uVar3 = LogMessageFatal::~LogMessageFatal(aLStack_68);
/* catch(type#1 @ 00000000) { ... } // from try @ 00122087 with catch @ 0012208f
*/
/* WARNING: Subroutine does not return */
__clang_call_terminate(uVar3);
}
| |
43,898 | ftxui::(anonymous namespace)::Text::~Text() | Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/dom/text.cpp | explicit Text(std::string text) : text_(std::move(text)) {} | O3 | cpp | ftxui::(anonymous namespace)::Text::~Text():
pushq %rbx
movq %rdi, %rbx
leaq 0x324a5(%rip), %rax # 0x57990
movq %rax, (%rdi)
movq 0x60(%rdi), %rdi
leaq 0x70(%rbx), %rax
cmpq %rax, %rdi
je 0x25506
movq (%rax), %rsi
incq %rsi
callq 0xb400
movq %rbx, %rdi
callq 0x23e42
movl $0x80, %esi
movq %rbx, %rdi
popq %rbx
jmp 0xb400
| _ZN5ftxui12_GLOBAL__N_14TextD0Ev:
push rbx
mov rbx, rdi
lea rax, off_57990
mov [rdi], rax
mov rdi, [rdi+60h]; void *
lea rax, [rbx+70h]
cmp rdi, rax
jz short loc_25506
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_25506:
mov rdi, rbx; this
call _ZN5ftxui4NodeD2Ev; ftxui::Node::~Node()
mov esi, 80h; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
| void ftxui::`anonymous namespace'::Text::~Text(ftxui::_anonymous_namespace_::Text *this)
{
char *v2; // rdi
*(_QWORD *)this = off_57990;
v2 = (char *)*((_QWORD *)this + 12);
if ( v2 != (char *)this + 112 )
operator delete(v2, *((_QWORD *)this + 14) + 1LL);
ftxui::Node::~Node(this);
operator delete(this, 0x80uLL);
}
| ~Text:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x157990]
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x60]
LEA RAX,[RBX + 0x70]
CMP RDI,RAX
JZ 0x00125506
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x0010b400
LAB_00125506:
MOV RDI,RBX
CALL 0x00123e42
MOV ESI,0x80
MOV RDI,RBX
POP RBX
JMP 0x0010b400
|
/* ftxui::(anonymous namespace)::Text::~Text() */
void __thiscall ftxui::(anonymous_namespace)::Text::~Text(Text *this)
{
*(int ***)this = &PTR__Text_00157990;
if (*(Text **)(this + 0x60) != this + 0x70) {
operator_delete(*(Text **)(this + 0x60),*(long *)(this + 0x70) + 1);
}
Node::~Node((Node *)this);
operator_delete(this,0x80);
return;
}
| |
43,899 | LefDefParser::lefiTrackPattern::layerName(int) const | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiMisc.cpp | const char *
lefiTrackPattern::layerName(int index) const
{
char msg[160];
if (index < 0 || index >= numLayers_) {
sprintf(msg, "ERROR (LEFPARS-1377): The index number %d given for the TRACK PATTERN is invalid.\nValid index is from 0 to %d", index, numLayers_);
lefiError(0, 1377, msg);
return 0;
}
return layerNames_[index];
} | O3 | cpp | LefDefParser::lefiTrackPattern::layerName(int) const:
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movl %esi, %edx
testl %esi, %esi
setns %al
movl 0x28(%rdi), %ecx
cmpl %esi, %ecx
setg %sil
testb %sil, %al
je 0xd967
movq 0x30(%rdi), %rax
movl %edx, %ecx
movq (%rax,%rcx,8), %rbx
jmp 0xd98c
leaq 0x4c9a3(%rip), %rsi # 0x5a311
xorl %ebx, %ebx
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2050
xorl %edi, %edi
movl $0x561, %esi # imm = 0x561
movq %r14, %rdx
callq 0x33d78
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r14
retq
| _ZNK12LefDefParser16lefiTrackPattern9layerNameEi:
push r14
push rbx
sub rsp, 0A8h
mov edx, esi
test esi, esi
setns al
mov ecx, [rdi+28h]
cmp ecx, esi
setnle sil
test al, sil
jz short loc_D967
mov rax, [rdi+30h]
mov ecx, edx
mov rbx, [rax+rcx*8]
jmp short loc_D98C
loc_D967:
lea rsi, aErrorLefpars13_16; "ERROR (LEFPARS-1377): The index number "...
xor ebx, ebx
mov r14, rsp
mov rdi, r14
xor eax, eax
call _sprintf
xor edi, edi; this
mov esi, 561h; int
mov rdx, r14; int
call _ZN12LefDefParser9lefiErrorEiiPKc; LefDefParser::lefiError(int,int,char const*)
loc_D98C:
mov rax, rbx
add rsp, 0A8h
pop rbx
pop r14
retn
| long long LefDefParser::lefiTrackPattern::layerName(LefDefParser::lefiTrackPattern *this, unsigned int a2)
{
long long v2; // rbx
const char *v3; // rcx
_BYTE v5[184]; // [rsp+0h] [rbp-B8h] BYREF
if ( *((_DWORD *)this + 10) > (int)a2 && (a2 & 0x80000000) == 0 )
return *(_QWORD *)(*((_QWORD *)this + 6) + 8LL * a2);
v2 = 0LL;
sprintf(
v5,
"ERROR (LEFPARS-1377): The index number %d given for the TRACK PATTERN is invalid.\nValid index is from 0 to %d",
a2);
LefDefParser::lefiError(0LL, 1377, (int)v5, v3);
return v2;
}
| layerName:
PUSH R14
PUSH RBX
SUB RSP,0xa8
MOV EDX,ESI
TEST ESI,ESI
SETNS AL
MOV ECX,dword ptr [RDI + 0x28]
CMP ECX,ESI
SETG SIL
TEST AL,SIL
JZ 0x0010d967
MOV RAX,qword ptr [RDI + 0x30]
MOV ECX,EDX
MOV RBX,qword ptr [RAX + RCX*0x8]
JMP 0x0010d98c
LAB_0010d967:
LEA RSI,[0x15a311]
XOR EBX,EBX
MOV R14,RSP
MOV RDI,R14
XOR EAX,EAX
CALL 0x00102050
XOR EDI,EDI
MOV ESI,0x561
MOV RDX,R14
CALL 0x00133d78
LAB_0010d98c:
MOV RAX,RBX
ADD RSP,0xa8
POP RBX
POP R14
RET
|
/* LefDefParser::lefiTrackPattern::layerName(int) const */
int8 __thiscall LefDefParser::lefiTrackPattern::layerName(lefiTrackPattern *this,int param_1)
{
int8 uVar1;
char acStack_b8 [168];
if (param_1 < 0 || *(int *)(this + 0x28) <= param_1) {
uVar1 = 0;
sprintf(acStack_b8,
"ERROR (LEFPARS-1377): The index number %d given for the TRACK PATTERN is invalid.\nValid index is from 0 to %d"
);
lefiError(0,0x561,acStack_b8);
}
else {
uVar1 = *(int8 *)(*(long *)(this + 0x30) + (ulong)(uint)param_1 * 8);
}
return uVar1;
}
|
Subsets and Splits
C++ Functions With Standard Library Dependencies
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.