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
|
|---|---|---|---|---|---|---|---|---|---|---|---|
61,000
|
my_error_unregister
|
eloqsql/mysys/my_error.c
|
my_bool my_error_unregister(uint first, uint last)
{
struct my_err_head *meh_p;
struct my_err_head **search_meh_pp;
/* Search for the registration in the list. */
for (search_meh_pp= &my_errmsgs_list;
*search_meh_pp;
search_meh_pp= &(*search_meh_pp)->meh_next)
{
if (((*search_meh_pp)->meh_first == first) &&
((*search_meh_pp)->meh_last == last))
break;
}
if (! *search_meh_pp)
return TRUE;
/* Remove header from the chain. */
meh_p= *search_meh_pp;
*search_meh_pp= meh_p->meh_next;
my_free(meh_p);
return FALSE;
}
|
O3
|
c
|
my_error_unregister:
movq 0x2dec49(%rip), %r8 # 0x33d608
movb $0x1, %al
testq %r8, %r8
je 0x5e9fd
pushq %rbp
movq %rsp, %rbp
leaq 0x2dec37(%rip), %rdx # 0x33d608
movq %r8, %rcx
cmpl %edi, 0x10(%r8)
jne 0x5e9df
cmpl %esi, 0x14(%rcx)
je 0x5e9ec
movq (%rcx), %r8
movq %rcx, %rdx
testq %r8, %r8
jne 0x5e9d1
jmp 0x5e9fc
movq (%rcx), %rax
movq %rax, (%rdx)
movq %rcx, %rdi
callq 0x62112
xorl %eax, %eax
popq %rbp
retq
|
my_error_unregister:
mov r8, cs:my_errmsgs_list
mov al, 1
test r8, r8
jz short locret_5E9FD
push rbp
mov rbp, rsp
lea rdx, my_errmsgs_list
loc_5E9D1:
mov rcx, r8
cmp [r8+10h], edi
jnz short loc_5E9DF
cmp [rcx+14h], esi
jz short loc_5E9EC
loc_5E9DF:
mov r8, [rcx]
mov rdx, rcx
test r8, r8
jnz short loc_5E9D1
jmp short loc_5E9FC
loc_5E9EC:
mov rax, [rcx]
mov [rdx], rax
mov rdi, rcx
call my_free
xor eax, eax
loc_5E9FC:
pop rbp
locret_5E9FD:
retn
|
char my_error_unregister(int a1, int a2)
{
long long *v2; // r8
char result; // al
long long **v4; // rdx
long long *v5; // rcx
v2 = my_errmsgs_list;
result = 1;
if ( my_errmsgs_list )
{
v4 = &my_errmsgs_list;
while ( 1 )
{
v5 = v2;
if ( *((_DWORD *)v2 + 4) == a1 && *((_DWORD *)v2 + 5) == a2 )
break;
v2 = (long long *)*v2;
v4 = (long long **)v5;
if ( !*v5 )
return result;
}
*v4 = (long long *)*v2;
my_free(v2);
return 0;
}
return result;
}
|
my_error_unregister:
MOV R8,qword ptr [0x0043d608]
MOV AL,0x1
TEST R8,R8
JZ 0x0015e9fd
PUSH RBP
MOV RBP,RSP
LEA RDX,[0x43d608]
LAB_0015e9d1:
MOV RCX,R8
CMP dword ptr [R8 + 0x10],EDI
JNZ 0x0015e9df
CMP dword ptr [RCX + 0x14],ESI
JZ 0x0015e9ec
LAB_0015e9df:
MOV R8,qword ptr [RCX]
MOV RDX,RCX
TEST R8,R8
JNZ 0x0015e9d1
JMP 0x0015e9fc
LAB_0015e9ec:
MOV RAX,qword ptr [RCX]
MOV qword ptr [RDX],RAX
MOV RDI,RCX
CALL 0x00162112
XOR EAX,EAX
LAB_0015e9fc:
POP RBP
LAB_0015e9fd:
RET
|
int8 my_error_unregister(int param_1,int param_2)
{
int **ppuVar1;
int **ppuVar2;
int **ppuVar3;
if (my_errmsgs_list != (int *)0x0) {
ppuVar2 = &my_errmsgs_list;
ppuVar3 = (int **)my_errmsgs_list;
do {
if ((*(int *)(ppuVar3 + 2) == param_1) && (*(int *)((long)ppuVar3 + 0x14) == param_2)) {
*ppuVar2 = *ppuVar3;
my_free(ppuVar3);
return 0;
}
ppuVar1 = (int **)*ppuVar3;
ppuVar2 = ppuVar3;
ppuVar3 = ppuVar1;
} while (ppuVar1 != (int **)0x0);
}
return 1;
}
|
|
61,001
|
get_wrlock
|
eloqsql/storage/maria/ma_pagecache.c
|
static my_bool get_wrlock(PAGECACHE *pagecache,
PAGECACHE_BLOCK_LINK *block)
{
PAGECACHE_FILE file= block->hash_link->file;
pgcache_page_no_t pageno= block->hash_link->pageno;
pthread_t locker= pthread_self();
DBUG_ENTER("get_wrlock");
DBUG_PRINT("info", ("the block %p "
"files %d(%d) pages %lu(%lu)",
block, file.file, block->hash_link->file.file,
(ulong) pageno, (ulong) block->hash_link->pageno));
PCBLOCK_INFO(block);
/*
We assume that the same thread will try write lock on block on which it
has already read lock.
*/
while ((block->wlocks && !pthread_equal(block->write_locker, locker)) ||
block->rlocks)
{
/* Lock failed we will wait */
if (pagecache_wait_lock(pagecache, block, file, pageno,
MY_PTHREAD_LOCK_WRITE))
DBUG_RETURN(1);
}
/* we are doing it by global cache mutex protection, so it is OK */
block->wlocks++;
block->write_locker= locker;
DBUG_PRINT("info", ("WR lock set, block %p", block));
DBUG_RETURN(0);
}
|
O0
|
c
|
get_wrlock:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rsi
addq $0x18, %rsi
leaq -0x60(%rbp), %rdi
movl $0x48, %edx
callq 0x2a0b0
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x60(%rax), %rax
movq %rax, -0x68(%rbp)
callq 0x2a590
movq %rax, -0x70(%rbp)
jmp 0x5dd58
jmp 0x5dd5a
jmp 0x5dd5c
jmp 0x5dd5e
movq -0x18(%rbp), %rax
cmpl $0x0, 0x68(%rax)
je 0x5dd85
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x70(%rbp), %rsi
callq 0x2a9a0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x71(%rbp)
je 0x5dd93
movq -0x18(%rbp), %rax
cmpl $0x0, 0x6c(%rax)
setne %al
movb %al, -0x71(%rbp)
movb -0x71(%rbp), %al
testb $0x1, %al
jne 0x5dd9c
jmp 0x5dded
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x40(%rax)
movups -0x60(%rbp), %xmm0
movups -0x50(%rbp), %xmm1
movups -0x40(%rbp), %xmm2
movups -0x30(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
movl $0x1, %ecx
callq 0x5e0c0
cmpb $0x0, %al
je 0x5dde8
jmp 0x5dde2
movb $0x1, -0x1(%rbp)
jmp 0x5de0e
jmp 0x5dd5e
movq -0x18(%rbp), %rax
movl 0x68(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x68(%rax)
movq -0x70(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x38(%rax)
jmp 0x5de08
jmp 0x5de0a
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0xc0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
get_wrlock:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_18]
mov rsi, [rax+20h]
add rsi, 18h
lea rdi, [rbp+var_60]
mov edx, 48h ; 'H'
call _memcpy
mov rax, [rbp+var_18]
mov rax, [rax+20h]
mov rax, [rax+60h]
mov [rbp+var_68], rax
call _pthread_self
mov [rbp+var_70], rax
jmp short $+2
loc_5DD58:
jmp short $+2
loc_5DD5A:
jmp short $+2
loc_5DD5C:
jmp short $+2
loc_5DD5E:
mov rax, [rbp+var_18]
cmp dword ptr [rax+68h], 0
jz short loc_5DD85
mov rax, [rbp+var_18]
mov rdi, [rax+38h]
mov rsi, [rbp+var_70]
call _pthread_equal
mov ecx, eax
mov al, 1
cmp ecx, 0
mov [rbp+var_71], al
jz short loc_5DD93
loc_5DD85:
mov rax, [rbp+var_18]
cmp dword ptr [rax+6Ch], 0
setnz al
mov [rbp+var_71], al
loc_5DD93:
mov al, [rbp+var_71]
test al, 1
jnz short loc_5DD9C
jmp short loc_5DDED
loc_5DD9C:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_68]
mov rcx, [rbp+var_20]
mov rax, rsp
mov [rax+40h], rcx
movups xmm0, [rbp+var_60]
movups xmm1, [rbp+var_50]
movups xmm2, [rbp+var_40]
movups xmm3, [rbp+var_30]
movups xmmword ptr [rax+30h], xmm3
movups xmmword ptr [rax+20h], xmm2
movups xmmword ptr [rax+10h], xmm1
movups xmmword ptr [rax], xmm0
mov ecx, 1
call pagecache_wait_lock
cmp al, 0
jz short loc_5DDE8
jmp short $+2
loc_5DDE2:
mov [rbp+var_1], 1
jmp short loc_5DE0E
loc_5DDE8:
jmp loc_5DD5E
loc_5DDED:
mov rax, [rbp+var_18]
mov ecx, [rax+68h]
add ecx, 1
mov [rax+68h], ecx
mov rcx, [rbp+var_70]
mov rax, [rbp+var_18]
mov [rax+38h], rcx
jmp short $+2
loc_5DE08:
jmp short $+2
loc_5DE0A:
mov [rbp+var_1], 0
loc_5DE0E:
mov al, [rbp+var_1]
add rsp, 0C0h
pop rbp
retn
|
char get_wrlock(long long a1, long long a2)
{
int v2; // r8d
int v3; // r9d
bool v5; // [rsp+4Fh] [rbp-71h]
long long v6; // [rsp+50h] [rbp-70h]
long long v7; // [rsp+58h] [rbp-68h]
_OWORD v8[4]; // [rsp+60h] [rbp-60h] BYREF
long long v9; // [rsp+A0h] [rbp-20h]
long long v10; // [rsp+A8h] [rbp-18h]
long long v11; // [rsp+B0h] [rbp-10h]
v11 = a1;
v10 = a2;
memcpy(v8, *(_QWORD *)(a2 + 32) + 24LL, 72LL);
v7 = *(_QWORD *)(*(_QWORD *)(v10 + 32) + 96LL);
v6 = pthread_self();
while ( 1 )
{
if ( !*(_DWORD *)(v10 + 104) || (v5 = 1, (unsigned int)pthread_equal(*(_QWORD *)(v10 + 56), v6)) )
v5 = *(_DWORD *)(v10 + 108) != 0;
if ( !v5 )
break;
if ( (unsigned __int8)pagecache_wait_lock(v11, v10, v7, 1, v2, v3, v8[0], v8[1], v8[2], v8[3], v9) )
return 1;
}
++*(_DWORD *)(v10 + 104);
*(_QWORD *)(v10 + 56) = v6;
return 0;
}
|
get_wrlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x20]
ADD RSI,0x18
LEA RDI,[RBP + -0x60]
MOV EDX,0x48
CALL 0x0012a0b0
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RAX + 0x60]
MOV qword ptr [RBP + -0x68],RAX
CALL 0x0012a590
MOV qword ptr [RBP + -0x70],RAX
JMP 0x0015dd58
LAB_0015dd58:
JMP 0x0015dd5a
LAB_0015dd5a:
JMP 0x0015dd5c
LAB_0015dd5c:
JMP 0x0015dd5e
LAB_0015dd5e:
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x68],0x0
JZ 0x0015dd85
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x38]
MOV RSI,qword ptr [RBP + -0x70]
CALL 0x0012a9a0
MOV ECX,EAX
MOV AL,0x1
CMP ECX,0x0
MOV byte ptr [RBP + -0x71],AL
JZ 0x0015dd93
LAB_0015dd85:
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x6c],0x0
SETNZ AL
MOV byte ptr [RBP + -0x71],AL
LAB_0015dd93:
MOV AL,byte ptr [RBP + -0x71]
TEST AL,0x1
JNZ 0x0015dd9c
JMP 0x0015dded
LAB_0015dd9c:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,RSP
MOV qword ptr [RAX + 0x40],RCX
MOVUPS XMM0,xmmword ptr [RBP + -0x60]
MOVUPS XMM1,xmmword ptr [RBP + -0x50]
MOVUPS XMM2,xmmword ptr [RBP + -0x40]
MOVUPS XMM3,xmmword ptr [RBP + -0x30]
MOVUPS xmmword ptr [RAX + 0x30],XMM3
MOVUPS xmmword ptr [RAX + 0x20],XMM2
MOVUPS xmmword ptr [RAX + 0x10],XMM1
MOVUPS xmmword ptr [RAX],XMM0
MOV ECX,0x1
CALL 0x0015e0c0
CMP AL,0x0
JZ 0x0015dde8
JMP 0x0015dde2
LAB_0015dde2:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015de0e
LAB_0015dde8:
JMP 0x0015dd5e
LAB_0015dded:
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RAX + 0x68]
ADD ECX,0x1
MOV dword ptr [RAX + 0x68],ECX
MOV RCX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x38],RCX
JMP 0x0015de08
LAB_0015de08:
JMP 0x0015de0a
LAB_0015de0a:
MOV byte ptr [RBP + -0x1],0x0
LAB_0015de0e:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0xc0
POP RBP
RET
|
int1
get_wrlock(int8 param_1,long param_2,int8 param_3,int8 param_4,int8 param_5,
int8 param_6)
{
int8 uVar1;
char cVar2;
int iVar3;
pthread_t __thread2;
bool bVar4;
int4 local_68 [2];
int4 uStack_60;
int4 local_58;
int4 uStack_50;
int4 local_48;
int4 uStack_40;
int4 local_38;
int4 uStack_30;
int8 local_28;
long local_20;
int8 local_18;
local_20 = param_2;
local_18 = param_1;
memcpy(local_68,(void *)(*(long *)(param_2 + 0x20) + 0x18),0x48);
uVar1 = *(int8 *)(*(long *)(local_20 + 0x20) + 0x60);
__thread2 = pthread_self();
do {
if (*(int *)(local_20 + 0x68) == 0) {
LAB_0015dd85:
bVar4 = *(int *)(local_20 + 0x6c) != 0;
}
else {
iVar3 = pthread_equal(*(pthread_t *)(local_20 + 0x38),__thread2);
bVar4 = true;
if (iVar3 != 0) goto LAB_0015dd85;
}
if (!bVar4) {
*(int *)(local_20 + 0x68) = *(int *)(local_20 + 0x68) + 1;
*(pthread_t *)(local_20 + 0x38) = __thread2;
return 0;
}
cVar2 = pagecache_wait_lock(local_18,local_20,uVar1,1,param_5,param_6,local_68[0],uStack_60,
local_58,uStack_50,local_48,uStack_40,local_38,uStack_30,local_28);
if (cVar2 != '\0') {
return 1;
}
} while( true );
}
|
|
61,002
|
ma_get_block_info
|
eloqsql/storage/maria/ma_dynrec.c
|
uint _ma_get_block_info(MARIA_HA *handler, MARIA_BLOCK_INFO *info, File file,
my_off_t filepos)
{
uint return_val=0;
uchar *header=info->header;
if (file >= 0)
{
/*
We do not use my_pread() here because we want to have the file
pointer set to the end of the header after this function.
my_pread() may leave the file pointer untouched.
*/
mysql_file_seek(file,filepos,MY_SEEK_SET,MYF(0));
if (mysql_file_read(file, header, sizeof(info->header),MYF(0)) !=
sizeof(info->header))
{
/*
This is either an error or just reading at end of file.
Don't give a fatal error for this case.
*/
my_errno= HA_ERR_WRONG_IN_RECORD;
return BLOCK_ERROR;
}
}
DBUG_DUMP("header",header,MARIA_BLOCK_INFO_HEADER_LENGTH);
if (info->second_read)
{
if (info->header[0] <= 6 || info->header[0] == 13)
return_val=BLOCK_SYNC_ERROR;
}
else
{
if (info->header[0] > 6 && info->header[0] != 13)
return_val=BLOCK_SYNC_ERROR;
}
info->next_filepos= HA_OFFSET_ERROR; /* Dummy if no next block */
switch (info->header[0]) {
case 0:
if ((info->block_len=(uint) mi_uint3korr(header+1)) <
MARIA_MIN_BLOCK_LENGTH ||
(info->block_len & (MARIA_DYN_ALIGN_SIZE -1)))
goto err;
info->filepos=filepos;
info->next_filepos=mi_sizekorr(header+4);
info->prev_filepos=mi_sizekorr(header+12);
#if SIZEOF_OFF_T == 4
if ((mi_uint4korr(header+4) != 0 &&
(mi_uint4korr(header+4) != (ulong) ~0 ||
info->next_filepos != (ulong) ~0)) ||
(mi_uint4korr(header+12) != 0 &&
(mi_uint4korr(header+12) != (ulong) ~0 ||
info->prev_filepos != (ulong) ~0)))
goto err;
#endif
return return_val | BLOCK_DELETED; /* Deleted block */
case 1:
info->rec_len=info->data_len=info->block_len=mi_uint2korr(header+1);
info->filepos=filepos+3;
return return_val | BLOCK_FIRST | BLOCK_LAST;
case 2:
info->rec_len=info->data_len=info->block_len=mi_uint3korr(header+1);
info->filepos=filepos+4;
return return_val | BLOCK_FIRST | BLOCK_LAST;
case 13:
info->rec_len=mi_uint4korr(header+1);
info->block_len=info->data_len=mi_uint3korr(header+5);
info->next_filepos=mi_sizekorr(header+8);
info->second_read=1;
info->filepos=filepos+16;
return return_val | BLOCK_FIRST;
case 3:
info->rec_len=info->data_len=mi_uint2korr(header+1);
info->block_len=info->rec_len+ (uint) header[3];
info->filepos=filepos+4;
return return_val | BLOCK_FIRST | BLOCK_LAST;
case 4:
info->rec_len=info->data_len=mi_uint3korr(header+1);
info->block_len=info->rec_len+ (uint) header[4];
info->filepos=filepos+5;
return return_val | BLOCK_FIRST | BLOCK_LAST;
case 5:
info->rec_len=mi_uint2korr(header+1);
info->block_len=info->data_len=mi_uint2korr(header+3);
info->next_filepos=mi_sizekorr(header+5);
info->second_read=1;
info->filepos=filepos+13;
return return_val | BLOCK_FIRST;
case 6:
info->rec_len=mi_uint3korr(header+1);
info->block_len=info->data_len=mi_uint3korr(header+4);
info->next_filepos=mi_sizekorr(header+7);
info->second_read=1;
info->filepos=filepos+15;
return return_val | BLOCK_FIRST;
/* The following blocks are identical to 1-6 without rec_len */
case 7:
info->data_len=info->block_len=mi_uint2korr(header+1);
info->filepos=filepos+3;
return return_val | BLOCK_LAST;
case 8:
info->data_len=info->block_len=mi_uint3korr(header+1);
info->filepos=filepos+4;
return return_val | BLOCK_LAST;
case 9:
info->data_len=mi_uint2korr(header+1);
info->block_len=info->data_len+ (uint) header[3];
info->filepos=filepos+4;
return return_val | BLOCK_LAST;
case 10:
info->data_len=mi_uint3korr(header+1);
info->block_len=info->data_len+ (uint) header[4];
info->filepos=filepos+5;
return return_val | BLOCK_LAST;
case 11:
info->data_len=info->block_len=mi_uint2korr(header+1);
info->next_filepos=mi_sizekorr(header+3);
info->second_read=1;
info->filepos=filepos+11;
return return_val;
case 12:
info->data_len=info->block_len=mi_uint3korr(header+1);
info->next_filepos=mi_sizekorr(header+4);
info->second_read=1;
info->filepos=filepos+12;
return return_val;
}
err:
if (!handler->in_check_table)
{
/* We may be scanning the table for new rows; Don't give an error */
_ma_set_fatal_error(handler, HA_ERR_WRONG_IN_RECORD);
}
return BLOCK_ERROR;
}
|
O3
|
c
|
ma_get_block_info:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %r14
movq %rsi, %rbx
movq %rdi, %r12
testl %edx, %edx
js 0x43d8c
movl %edx, %r15d
leaq 0x34332c(%rip), %r13 # 0x387050
movq (%r13), %rax
leaq -0x78(%rbp), %rdi
movl %edx, %esi
movl $0x8, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x440da
movl %r15d, %edi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xa2218
movq (%r13), %rax
leaq -0x78(%rbp), %rdi
movl %r15d, %esi
movl $0x6, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x440ed
movl $0x14, %edx
movl %r15d, %edi
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0xa1edc
cmpq $0x14, %rax
jne 0x43e25
movl 0x50(%rbx), %ecx
xorl %r15d, %r15d
testl %ecx, %ecx
sete %dl
movzbl (%rbx), %eax
cmpq $0xd, %rax
ja 0x43dba
testl %ecx, %ecx
leaq 0x9e27b(%rip), %rcx # 0xe2024
leaq 0x9e23c(%rip), %rdx # 0xe1fec
cmoveq %rcx, %rdx
movl (%rdx,%rax,4), %r15d
jmp 0x43dc1
movb %dl, %r15b
shll $0x4, %r15d
movq $-0x1, 0x40(%rbx)
cmpb $0xd, %al
ja 0x43e3b
leaq 0x9e1a0(%rip), %rcx # 0xe1f74
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzbl 0x3(%rbx), %ecx
movzbl 0x2(%rbx), %edx
shll $0x8, %edx
movzbl 0x1(%rbx), %eax
shll $0x10, %eax
orl %edx, %eax
orq %rcx, %rax
movq %rax, 0x28(%rbx)
testb $0x3, %cl
jne 0x43e3b
cmpl $0x14, %eax
jb 0x43e3b
movq %r14, 0x38(%rbx)
movq 0x4(%rbx), %rax
movq 0xc(%rbx), %rcx
bswapq %rax
movq %rax, 0x40(%rbx)
bswapq %rcx
movq %rcx, 0x48(%rbx)
orl $0x4, %r15d
jmp 0x440c8
callq 0xa319a
movl $0x7f, (%rax)
movl $0x8, %r15d
jmp 0x440c8
movl $0x8, %r15d
cmpb $0x0, 0x683(%r12)
jne 0x440c8
movq %r12, %rdi
movl $0x7f, %esi
callq 0x37328
jmp 0x440c8
movzwl 0x1(%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movq %rax, 0x28(%rbx)
movq %rax, 0x20(%rbx)
movq 0x3(%rbx), %rax
bswapq %rax
movq %rax, 0x40(%rbx)
movl $0x1, 0x50(%rbx)
addq $0xb, %r14
jmp 0x43ef1
movzwl 0x2(%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movzbl 0x1(%rbx), %ecx
shll $0x10, %ecx
orq %rax, %rcx
movq %rcx, 0x20(%rbx)
movq %rcx, 0x18(%rbx)
movzbl 0x4(%rbx), %eax
addq %rcx, %rax
movq %rax, 0x28(%rbx)
addq $0x5, %r14
jmp 0x43f97
movzwl 0x2(%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movzbl 0x1(%rbx), %ecx
shll $0x10, %ecx
orq %rax, %rcx
movq %rcx, 0x28(%rbx)
movq %rcx, 0x20(%rbx)
movq 0x4(%rbx), %rax
bswapq %rax
movq %rax, 0x40(%rbx)
movl $0x1, 0x50(%rbx)
addq $0xc, %r14
movq %r14, 0x38(%rbx)
jmp 0x440c8
movzwl 0x1(%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movq %rax, 0x20(%rbx)
movzbl 0x3(%rbx), %ecx
addq %rax, %rcx
movq %rcx, 0x28(%rbx)
jmp 0x440bc
movzwl 0x2(%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movzbl 0x1(%rbx), %ecx
shll $0x10, %ecx
orq %rax, %rcx
movq %rcx, 0x28(%rbx)
movq %rcx, 0x20(%rbx)
movq %rcx, 0x18(%rbx)
jmp 0x43f5a
movzwl 0x1(%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movq %rax, 0x20(%rbx)
movq %rax, 0x18(%rbx)
movzbl 0x3(%rbx), %ecx
addq %rax, %rcx
movq %rcx, 0x28(%rbx)
addq $0x4, %r14
jmp 0x43f97
movzwl 0x1(%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movq %rax, 0x28(%rbx)
movq %rax, 0x20(%rbx)
addq $0x3, %r14
jmp 0x440c0
movzwl 0x1(%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movq %rax, 0x28(%rbx)
movq %rax, 0x20(%rbx)
movq %rax, 0x18(%rbx)
addq $0x3, %r14
movq %r14, 0x38(%rbx)
orl $0x3, %r15d
jmp 0x440c8
movzwl 0x1(%rbx), %eax
rolw $0x8, %ax
movzwl 0x3(%rbx), %ecx
movzwl %ax, %eax
rolw $0x8, %cx
movq %rax, 0x18(%rbx)
movzwl %cx, %eax
movq %rax, 0x20(%rbx)
movq %rax, 0x28(%rbx)
movq 0x5(%rbx), %rax
bswapq %rax
movq %rax, 0x40(%rbx)
movl $0x1, 0x50(%rbx)
addq $0xd, %r14
jmp 0x4406b
movl 0x1(%rbx), %eax
bswapl %eax
movq %rax, 0x18(%rbx)
movzwl 0x6(%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movzbl 0x5(%rbx), %ecx
shll $0x10, %ecx
orq %rax, %rcx
movq %rcx, 0x20(%rbx)
movq %rcx, 0x28(%rbx)
movq 0x8(%rbx), %rax
bswapq %rax
movq %rax, 0x40(%rbx)
movl $0x1, 0x50(%rbx)
addq $0x10, %r14
jmp 0x4406b
movzwl 0x2(%rbx), %eax
movzwl 0x5(%rbx), %ecx
rolw $0x8, %ax
movzwl %ax, %eax
movzbl 0x1(%rbx), %edx
shll $0x10, %edx
orq %rax, %rdx
movq %rdx, 0x18(%rbx)
rolw $0x8, %cx
movzwl %cx, %eax
movzbl 0x4(%rbx), %ecx
shll $0x10, %ecx
orq %rax, %rcx
movq %rcx, 0x20(%rbx)
movq %rcx, 0x28(%rbx)
movq 0x7(%rbx), %rax
bswapq %rax
movq %rax, 0x40(%rbx)
movl $0x1, 0x50(%rbx)
addq $0xf, %r14
movq %r14, 0x38(%rbx)
orl $0x1, %r15d
jmp 0x440c8
movzwl 0x2(%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movzbl 0x1(%rbx), %ecx
shll $0x10, %ecx
orq %rax, %rcx
movq %rcx, 0x20(%rbx)
movzbl 0x4(%rbx), %eax
addq %rcx, %rax
movq %rax, 0x28(%rbx)
addq $0x5, %r14
jmp 0x440c0
movzwl 0x2(%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movzbl 0x1(%rbx), %ecx
shll $0x10, %ecx
orq %rax, %rcx
movq %rcx, 0x28(%rbx)
movq %rcx, 0x20(%rbx)
addq $0x4, %r14
movq %r14, 0x38(%rbx)
orl $0x2, %r15d
movl %r15d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rdi
movl %r15d, %esi
movq %r14, %rdx
callq 0x29f57
jmp 0x43d51
leaq -0x30(%rbp), %r13
movq %rax, %rdi
movl %r15d, %esi
movq %rbx, %rdx
movq %r13, %rcx
callq 0x29fb1
movq (%r13), %rax
jmp 0x43d82
|
_ma_get_block_info:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r14, rcx
mov rbx, rsi
mov r12, rdi
test edx, edx
js short loc_43D8C
mov r15d, edx
lea r13, PSI_server
mov rax, [r13+0]
lea rdi, [rbp+var_78]
mov esi, edx
mov edx, 8
call qword ptr [rax+158h]
test rax, rax
jnz loc_440DA
mov edi, r15d
mov rsi, r14
xor edx, edx
xor ecx, ecx
call my_seek
loc_43D51:
mov rax, [r13+0]
lea rdi, [rbp+var_78]
mov esi, r15d
mov edx, 6
call qword ptr [rax+158h]
test rax, rax
jnz loc_440ED
mov edx, 14h
mov edi, r15d
mov rsi, rbx
xor ecx, ecx
call my_read
loc_43D82:
cmp rax, 14h
jnz loc_43E25
loc_43D8C:
mov ecx, [rbx+50h]
xor r15d, r15d
test ecx, ecx
setz dl
movzx eax, byte ptr [rbx]
cmp rax, 0Dh
ja short loc_43DBA
test ecx, ecx
lea rcx, unk_E2024
lea rdx, unk_E1FEC
cmovz rdx, rcx
mov r15d, [rdx+rax*4]
jmp short loc_43DC1
loc_43DBA:
mov r15b, dl
shl r15d, 4
loc_43DC1:
mov qword ptr [rbx+40h], 0FFFFFFFFFFFFFFFFh
cmp al, 0Dh; switch 14 cases
ja short def_43DDB; jumptable 0000000000043DDB default case
lea rcx, jpt_43DDB
movsxd rax, ds:(jpt_43DDB - 0E1F74h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_43DDD:
movzx ecx, byte ptr [rbx+3]; jumptable 0000000000043DDB case 0
movzx edx, byte ptr [rbx+2]
shl edx, 8
movzx eax, byte ptr [rbx+1]
shl eax, 10h
or eax, edx
or rax, rcx
mov [rbx+28h], rax
test cl, 3
jnz short def_43DDB; jumptable 0000000000043DDB default case
cmp eax, 14h
jb short def_43DDB; jumptable 0000000000043DDB default case
mov [rbx+38h], r14
mov rax, [rbx+4]
mov rcx, [rbx+0Ch]
bswap rax
mov [rbx+40h], rax
bswap rcx
mov [rbx+48h], rcx
or r15d, 4
jmp loc_440C8
loc_43E25:
call _my_thread_var
mov dword ptr [rax], 7Fh
mov r15d, 8
jmp loc_440C8
def_43DDB:
mov r15d, 8; jumptable 0000000000043DDB default case
cmp byte ptr [r12+683h], 0
jnz loc_440C8
mov rdi, r12
mov esi, 7Fh
call _ma_set_fatal_error
jmp loc_440C8
loc_43E62:
movzx eax, word ptr [rbx+1]; jumptable 0000000000043DDB case 11
rol ax, 8
movzx eax, ax
mov [rbx+28h], rax
mov [rbx+20h], rax
mov rax, [rbx+3]
bswap rax
mov [rbx+40h], rax
mov dword ptr [rbx+50h], 1
add r14, 0Bh
jmp short loc_43EF1
loc_43E8D:
movzx eax, word ptr [rbx+2]; jumptable 0000000000043DDB case 4
rol ax, 8
movzx eax, ax
movzx ecx, byte ptr [rbx+1]
shl ecx, 10h
or rcx, rax
mov [rbx+20h], rcx
mov [rbx+18h], rcx
movzx eax, byte ptr [rbx+4]
add rax, rcx
mov [rbx+28h], rax
add r14, 5
jmp loc_43F97
loc_43EBE:
movzx eax, word ptr [rbx+2]; jumptable 0000000000043DDB case 12
rol ax, 8
movzx eax, ax
movzx ecx, byte ptr [rbx+1]
shl ecx, 10h
or rcx, rax
mov [rbx+28h], rcx
mov [rbx+20h], rcx
mov rax, [rbx+4]
bswap rax
mov [rbx+40h], rax
mov dword ptr [rbx+50h], 1
add r14, 0Ch
loc_43EF1:
mov [rbx+38h], r14
jmp loc_440C8
loc_43EFA:
movzx eax, word ptr [rbx+1]; jumptable 0000000000043DDB case 9
rol ax, 8
movzx eax, ax
mov [rbx+20h], rax
movzx ecx, byte ptr [rbx+3]
add rcx, rax
mov [rbx+28h], rcx
jmp loc_440BC
loc_43F19:
movzx eax, word ptr [rbx+2]; jumptable 0000000000043DDB case 2
rol ax, 8
movzx eax, ax
movzx ecx, byte ptr [rbx+1]
shl ecx, 10h
or rcx, rax
mov [rbx+28h], rcx
mov [rbx+20h], rcx
mov [rbx+18h], rcx
jmp short loc_43F5A
loc_43F3C:
movzx eax, word ptr [rbx+1]; jumptable 0000000000043DDB case 3
rol ax, 8
movzx eax, ax
mov [rbx+20h], rax
mov [rbx+18h], rax
movzx ecx, byte ptr [rbx+3]
add rcx, rax
mov [rbx+28h], rcx
loc_43F5A:
add r14, 4
jmp short loc_43F97
loc_43F60:
movzx eax, word ptr [rbx+1]; jumptable 0000000000043DDB case 7
rol ax, 8
movzx eax, ax
mov [rbx+28h], rax
mov [rbx+20h], rax
add r14, 3
jmp loc_440C0
loc_43F7C:
movzx eax, word ptr [rbx+1]; jumptable 0000000000043DDB case 1
rol ax, 8
movzx eax, ax
mov [rbx+28h], rax
mov [rbx+20h], rax
mov [rbx+18h], rax
add r14, 3
loc_43F97:
mov [rbx+38h], r14
or r15d, 3
jmp loc_440C8
loc_43FA4:
movzx eax, word ptr [rbx+1]; jumptable 0000000000043DDB case 5
rol ax, 8
movzx ecx, word ptr [rbx+3]
movzx eax, ax
rol cx, 8
mov [rbx+18h], rax
movzx eax, cx
mov [rbx+20h], rax
mov [rbx+28h], rax
mov rax, [rbx+5]
bswap rax
mov [rbx+40h], rax
mov dword ptr [rbx+50h], 1
add r14, 0Dh
jmp loc_4406B
loc_43FE1:
mov eax, [rbx+1]; jumptable 0000000000043DDB case 13
bswap eax
mov [rbx+18h], rax
movzx eax, word ptr [rbx+6]
rol ax, 8
movzx eax, ax
movzx ecx, byte ptr [rbx+5]
shl ecx, 10h
or rcx, rax
mov [rbx+20h], rcx
mov [rbx+28h], rcx
mov rax, [rbx+8]
bswap rax
mov [rbx+40h], rax
mov dword ptr [rbx+50h], 1
add r14, 10h
jmp short loc_4406B
loc_4401F:
movzx eax, word ptr [rbx+2]; jumptable 0000000000043DDB case 6
movzx ecx, word ptr [rbx+5]
rol ax, 8
movzx eax, ax
movzx edx, byte ptr [rbx+1]
shl edx, 10h
or rdx, rax
mov [rbx+18h], rdx
rol cx, 8
movzx eax, cx
movzx ecx, byte ptr [rbx+4]
shl ecx, 10h
or rcx, rax
mov [rbx+20h], rcx
mov [rbx+28h], rcx
mov rax, [rbx+7]
bswap rax
mov [rbx+40h], rax
mov dword ptr [rbx+50h], 1
add r14, 0Fh
loc_4406B:
mov [rbx+38h], r14
or r15d, 1
jmp short loc_440C8
loc_44075:
movzx eax, word ptr [rbx+2]; jumptable 0000000000043DDB case 10
rol ax, 8
movzx eax, ax
movzx ecx, byte ptr [rbx+1]
shl ecx, 10h
or rcx, rax
mov [rbx+20h], rcx
movzx eax, byte ptr [rbx+4]
add rax, rcx
mov [rbx+28h], rax
add r14, 5
jmp short loc_440C0
loc_4409F:
movzx eax, word ptr [rbx+2]; jumptable 0000000000043DDB case 8
rol ax, 8
movzx eax, ax
movzx ecx, byte ptr [rbx+1]
shl ecx, 10h
or rcx, rax
mov [rbx+28h], rcx
mov [rbx+20h], rcx
loc_440BC:
add r14, 4
loc_440C0:
mov [rbx+38h], r14
or r15d, 2
loc_440C8:
mov eax, r15d
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_440DA:
mov rdi, rax
mov esi, r15d
mov rdx, r14
call _ma_get_block_info_cold_1
jmp loc_43D51
loc_440ED:
lea r13, [rbp+var_30]
mov rdi, rax
mov esi, r15d
mov rdx, rbx
mov rcx, r13
call _ma_get_block_info_cold_2
mov rax, [r13+0]
jmp loc_43D82
|
long long ma_get_block_info(long long a1, unsigned __int8 *a2, long long a3, long long a4, long long a5, int a6)
{
unsigned int v8; // r15d
long long v9; // rax
long long v10; // rax
long long v11; // rdi
long long v12; // rax
long long v13; // rcx
int v14; // r15d
unsigned long long v15; // rax
bool v16; // zf
unsigned int v17; // r15d
long long v18; // rax
unsigned long long v19; // rcx
unsigned __int16 v20; // ax
long long v21; // r14
unsigned long long v22; // rcx
long long v23; // r14
unsigned long long v24; // rcx
unsigned __int16 v25; // ax
unsigned long long v26; // rcx
unsigned __int16 v27; // ax
unsigned __int16 v28; // ax
long long v29; // r14
unsigned __int16 v30; // ax
unsigned __int16 v31; // cx
long long v32; // r14
unsigned long long v33; // rcx
__int16 v34; // cx
unsigned long long v35; // rcx
unsigned long long v36; // rcx
unsigned long long v37; // rcx
_BYTE v39[72]; // [rsp+8h] [rbp-78h] BYREF
long long v40[6]; // [rsp+50h] [rbp-30h] BYREF
if ( (int)a3 < 0 )
goto LABEL_7;
v8 = a3;
v9 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v39, (unsigned int)a3, 8LL);
if ( v9 )
ma_get_block_info_cold_1(v9, v8, a4);
else
my_seek(v8, a4, 0LL, 0LL);
v10 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v39, v8, 6LL);
if ( v10 )
{
v11 = v10;
ma_get_block_info_cold_2(v10, v8, (long long)a2, v40);
v12 = v40[0];
}
else
{
v11 = v8;
v12 = my_read(v8, a2, 20LL, 0LL);
}
if ( v12 == 20 )
{
LABEL_7:
v13 = *((unsigned int *)a2 + 20);
v14 = 0;
LOBYTE(a3) = (_DWORD)v13 == 0;
v15 = *a2;
if ( v15 > 0xD )
{
LOBYTE(v14) = (_DWORD)v13 == 0;
v17 = 16 * v14;
}
else
{
v16 = (_DWORD)v13 == 0;
v13 = (long long)&unk_E2024;
a3 = (long long)&unk_E1FEC;
if ( v16 )
a3 = (long long)&unk_E2024;
v17 = *(_DWORD *)(a3 + 4 * v15);
}
*((_QWORD *)a2 + 8) = -1LL;
switch ( (char)v15 )
{
case 0:
v13 = a2[3];
a3 = a2[2] << 8;
v18 = v13 | (unsigned int)a3 | (a2[1] << 16);
*((_QWORD *)a2 + 5) = v18;
if ( (v13 & 3) != 0 || (unsigned int)v18 < 0x14 )
goto LABEL_17;
*((_QWORD *)a2 + 7) = a4;
v19 = *(_QWORD *)(a2 + 12);
*((_QWORD *)a2 + 8) = _byteswap_uint64(*(_QWORD *)(a2 + 4));
*((_QWORD *)a2 + 9) = _byteswap_uint64(v19);
v17 |= 4u;
return v17;
case 1:
v30 = __ROL2__(*(_WORD *)(a2 + 1), 8);
*((_QWORD *)a2 + 5) = v30;
*((_QWORD *)a2 + 4) = v30;
*((_QWORD *)a2 + 3) = v30;
v23 = a4 + 3;
goto LABEL_29;
case 2:
v26 = (unsigned __int16)__ROL2__(*((_WORD *)a2 + 1), 8) | (unsigned long long)(a2[1] << 16);
*((_QWORD *)a2 + 5) = v26;
*((_QWORD *)a2 + 4) = v26;
*((_QWORD *)a2 + 3) = v26;
goto LABEL_26;
case 3:
v27 = __ROL2__(*(_WORD *)(a2 + 1), 8);
*((_QWORD *)a2 + 4) = v27;
*((_QWORD *)a2 + 3) = v27;
*((_QWORD *)a2 + 5) = v27 + (unsigned long long)a2[3];
LABEL_26:
v23 = a4 + 4;
goto LABEL_29;
case 4:
v22 = (unsigned __int16)__ROL2__(*((_WORD *)a2 + 1), 8) | (unsigned long long)(a2[1] << 16);
*((_QWORD *)a2 + 4) = v22;
*((_QWORD *)a2 + 3) = v22;
*((_QWORD *)a2 + 5) = v22 + a2[4];
v23 = a4 + 5;
LABEL_29:
*((_QWORD *)a2 + 7) = v23;
v17 |= 3u;
return v17;
case 5:
v31 = __ROL2__(*(_WORD *)(a2 + 3), 8);
*((_QWORD *)a2 + 3) = (unsigned __int16)__ROL2__(*(_WORD *)(a2 + 1), 8);
*((_QWORD *)a2 + 4) = v31;
*((_QWORD *)a2 + 5) = v31;
*((_QWORD *)a2 + 8) = _byteswap_uint64(*(_QWORD *)(a2 + 5));
*((_DWORD *)a2 + 20) = 1;
v32 = a4 + 13;
goto LABEL_33;
case 6:
v34 = *(_WORD *)(a2 + 5);
*((_QWORD *)a2 + 3) = (unsigned __int16)__ROL2__(*((_WORD *)a2 + 1), 8) | (unsigned long long)(a2[1] << 16);
v35 = (unsigned __int16)__ROL2__(v34, 8) | (unsigned long long)(a2[4] << 16);
*((_QWORD *)a2 + 4) = v35;
*((_QWORD *)a2 + 5) = v35;
*((_QWORD *)a2 + 8) = _byteswap_uint64(*(_QWORD *)(a2 + 7));
*((_DWORD *)a2 + 20) = 1;
v32 = a4 + 15;
goto LABEL_33;
case 7:
v28 = __ROL2__(*(_WORD *)(a2 + 1), 8);
*((_QWORD *)a2 + 5) = v28;
*((_QWORD *)a2 + 4) = v28;
v29 = a4 + 3;
goto LABEL_37;
case 8:
v37 = (unsigned __int16)__ROL2__(*((_WORD *)a2 + 1), 8) | (unsigned long long)(a2[1] << 16);
*((_QWORD *)a2 + 5) = v37;
*((_QWORD *)a2 + 4) = v37;
goto LABEL_36;
case 9:
v25 = __ROL2__(*(_WORD *)(a2 + 1), 8);
*((_QWORD *)a2 + 4) = v25;
*((_QWORD *)a2 + 5) = v25 + (unsigned long long)a2[3];
LABEL_36:
v29 = a4 + 4;
goto LABEL_37;
case 10:
v36 = (unsigned __int16)__ROL2__(*((_WORD *)a2 + 1), 8) | (unsigned long long)(a2[1] << 16);
*((_QWORD *)a2 + 4) = v36;
*((_QWORD *)a2 + 5) = v36 + a2[4];
v29 = a4 + 5;
LABEL_37:
*((_QWORD *)a2 + 7) = v29;
v17 |= 2u;
return v17;
case 11:
v20 = __ROL2__(*(_WORD *)(a2 + 1), 8);
*((_QWORD *)a2 + 5) = v20;
*((_QWORD *)a2 + 4) = v20;
*((_QWORD *)a2 + 8) = _byteswap_uint64(*(_QWORD *)(a2 + 3));
*((_DWORD *)a2 + 20) = 1;
v21 = a4 + 11;
goto LABEL_22;
case 12:
v24 = (unsigned __int16)__ROL2__(*((_WORD *)a2 + 1), 8) | (unsigned long long)(a2[1] << 16);
*((_QWORD *)a2 + 5) = v24;
*((_QWORD *)a2 + 4) = v24;
*((_QWORD *)a2 + 8) = _byteswap_uint64(*(_QWORD *)(a2 + 4));
*((_DWORD *)a2 + 20) = 1;
v21 = a4 + 12;
LABEL_22:
*((_QWORD *)a2 + 7) = v21;
break;
case 13:
*((_QWORD *)a2 + 3) = _byteswap_ulong(*(_DWORD *)(a2 + 1));
v33 = (unsigned __int16)__ROL2__(*((_WORD *)a2 + 3), 8) | (unsigned long long)(a2[5] << 16);
*((_QWORD *)a2 + 4) = v33;
*((_QWORD *)a2 + 5) = v33;
*((_QWORD *)a2 + 8) = _byteswap_uint64(*((_QWORD *)a2 + 1));
*((_DWORD *)a2 + 20) = 1;
v32 = a4 + 16;
LABEL_33:
*((_QWORD *)a2 + 7) = v32;
v17 |= 1u;
break;
default:
LABEL_17:
v17 = 8;
if ( !*(_BYTE *)(a1 + 1667) )
ma_set_fatal_error((_DWORD *)a1, 127, a3, v13, a5, a6);
break;
}
}
else
{
*(_DWORD *)my_thread_var(v11) = 127;
return 8;
}
return v17;
}
|
_ma_get_block_info:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R14,RCX
MOV RBX,RSI
MOV R12,RDI
TEST EDX,EDX
JS 0x00143d8c
MOV R15D,EDX
LEA R13,[0x487050]
MOV RAX,qword ptr [R13]
LEA RDI,[RBP + -0x78]
MOV ESI,EDX
MOV EDX,0x8
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x001440da
MOV EDI,R15D
MOV RSI,R14
XOR EDX,EDX
XOR ECX,ECX
CALL 0x001a2218
LAB_00143d51:
MOV RAX,qword ptr [R13]
LEA RDI,[RBP + -0x78]
MOV ESI,R15D
MOV EDX,0x6
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x001440ed
MOV EDX,0x14
MOV EDI,R15D
MOV RSI,RBX
XOR ECX,ECX
CALL 0x001a1edc
LAB_00143d82:
CMP RAX,0x14
JNZ 0x00143e25
LAB_00143d8c:
MOV ECX,dword ptr [RBX + 0x50]
XOR R15D,R15D
TEST ECX,ECX
SETZ DL
MOVZX EAX,byte ptr [RBX]
CMP RAX,0xd
JA 0x00143dba
TEST ECX,ECX
LEA RCX,[0x1e2024]
LEA RDX,[0x1e1fec]
CMOVZ RDX,RCX
MOV R15D,dword ptr [RDX + RAX*0x4]
JMP 0x00143dc1
LAB_00143dba:
MOV R15B,DL
SHL R15D,0x4
LAB_00143dc1:
MOV qword ptr [RBX + 0x40],-0x1
CMP AL,0xd
JA 0x00143e3b
LEA RCX,[0x1e1f74]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
MOVZX ECX,byte ptr [RBX + 0x3]
MOVZX EDX,byte ptr [RBX + 0x2]
SHL EDX,0x8
MOVZX EAX,byte ptr [RBX + 0x1]
SHL EAX,0x10
OR EAX,EDX
OR RAX,RCX
MOV qword ptr [RBX + 0x28],RAX
TEST CL,0x3
JNZ 0x00143e3b
CMP EAX,0x14
JC 0x00143e3b
MOV qword ptr [RBX + 0x38],R14
MOV RAX,qword ptr [RBX + 0x4]
MOV RCX,qword ptr [RBX + 0xc]
BSWAP RAX
MOV qword ptr [RBX + 0x40],RAX
BSWAP RCX
MOV qword ptr [RBX + 0x48],RCX
OR R15D,0x4
JMP 0x001440c8
LAB_00143e25:
CALL 0x001a319a
MOV dword ptr [RAX],0x7f
MOV R15D,0x8
JMP 0x001440c8
default:
MOV R15D,0x8
CMP byte ptr [R12 + 0x683],0x0
JNZ 0x001440c8
MOV RDI,R12
MOV ESI,0x7f
CALL 0x00137328
JMP 0x001440c8
caseD_b:
MOVZX EAX,word ptr [RBX + 0x1]
ROL AX,0x8
MOVZX EAX,AX
MOV qword ptr [RBX + 0x28],RAX
MOV qword ptr [RBX + 0x20],RAX
MOV RAX,qword ptr [RBX + 0x3]
BSWAP RAX
MOV qword ptr [RBX + 0x40],RAX
MOV dword ptr [RBX + 0x50],0x1
ADD R14,0xb
JMP 0x00143ef1
caseD_4:
MOVZX EAX,word ptr [RBX + 0x2]
ROL AX,0x8
MOVZX EAX,AX
MOVZX ECX,byte ptr [RBX + 0x1]
SHL ECX,0x10
OR RCX,RAX
MOV qword ptr [RBX + 0x20],RCX
MOV qword ptr [RBX + 0x18],RCX
MOVZX EAX,byte ptr [RBX + 0x4]
ADD RAX,RCX
MOV qword ptr [RBX + 0x28],RAX
ADD R14,0x5
JMP 0x00143f97
caseD_c:
MOVZX EAX,word ptr [RBX + 0x2]
ROL AX,0x8
MOVZX EAX,AX
MOVZX ECX,byte ptr [RBX + 0x1]
SHL ECX,0x10
OR RCX,RAX
MOV qword ptr [RBX + 0x28],RCX
MOV qword ptr [RBX + 0x20],RCX
MOV RAX,qword ptr [RBX + 0x4]
BSWAP RAX
MOV qword ptr [RBX + 0x40],RAX
MOV dword ptr [RBX + 0x50],0x1
ADD R14,0xc
LAB_00143ef1:
MOV qword ptr [RBX + 0x38],R14
JMP 0x001440c8
caseD_9:
MOVZX EAX,word ptr [RBX + 0x1]
ROL AX,0x8
MOVZX EAX,AX
MOV qword ptr [RBX + 0x20],RAX
MOVZX ECX,byte ptr [RBX + 0x3]
ADD RCX,RAX
MOV qword ptr [RBX + 0x28],RCX
JMP 0x001440bc
caseD_2:
MOVZX EAX,word ptr [RBX + 0x2]
ROL AX,0x8
MOVZX EAX,AX
MOVZX ECX,byte ptr [RBX + 0x1]
SHL ECX,0x10
OR RCX,RAX
MOV qword ptr [RBX + 0x28],RCX
MOV qword ptr [RBX + 0x20],RCX
MOV qword ptr [RBX + 0x18],RCX
JMP 0x00143f5a
caseD_3:
MOVZX EAX,word ptr [RBX + 0x1]
ROL AX,0x8
MOVZX EAX,AX
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],RAX
MOVZX ECX,byte ptr [RBX + 0x3]
ADD RCX,RAX
MOV qword ptr [RBX + 0x28],RCX
LAB_00143f5a:
ADD R14,0x4
JMP 0x00143f97
caseD_7:
MOVZX EAX,word ptr [RBX + 0x1]
ROL AX,0x8
MOVZX EAX,AX
MOV qword ptr [RBX + 0x28],RAX
MOV qword ptr [RBX + 0x20],RAX
ADD R14,0x3
JMP 0x001440c0
caseD_1:
MOVZX EAX,word ptr [RBX + 0x1]
ROL AX,0x8
MOVZX EAX,AX
MOV qword ptr [RBX + 0x28],RAX
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],RAX
ADD R14,0x3
LAB_00143f97:
MOV qword ptr [RBX + 0x38],R14
OR R15D,0x3
JMP 0x001440c8
caseD_5:
MOVZX EAX,word ptr [RBX + 0x1]
ROL AX,0x8
MOVZX ECX,word ptr [RBX + 0x3]
MOVZX EAX,AX
ROL CX,0x8
MOV qword ptr [RBX + 0x18],RAX
MOVZX EAX,CX
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x28],RAX
MOV RAX,qword ptr [RBX + 0x5]
BSWAP RAX
MOV qword ptr [RBX + 0x40],RAX
MOV dword ptr [RBX + 0x50],0x1
ADD R14,0xd
JMP 0x0014406b
caseD_d:
MOV EAX,dword ptr [RBX + 0x1]
BSWAP EAX
MOV qword ptr [RBX + 0x18],RAX
MOVZX EAX,word ptr [RBX + 0x6]
ROL AX,0x8
MOVZX EAX,AX
MOVZX ECX,byte ptr [RBX + 0x5]
SHL ECX,0x10
OR RCX,RAX
MOV qword ptr [RBX + 0x20],RCX
MOV qword ptr [RBX + 0x28],RCX
MOV RAX,qword ptr [RBX + 0x8]
BSWAP RAX
MOV qword ptr [RBX + 0x40],RAX
MOV dword ptr [RBX + 0x50],0x1
ADD R14,0x10
JMP 0x0014406b
caseD_6:
MOVZX EAX,word ptr [RBX + 0x2]
MOVZX ECX,word ptr [RBX + 0x5]
ROL AX,0x8
MOVZX EAX,AX
MOVZX EDX,byte ptr [RBX + 0x1]
SHL EDX,0x10
OR RDX,RAX
MOV qword ptr [RBX + 0x18],RDX
ROL CX,0x8
MOVZX EAX,CX
MOVZX ECX,byte ptr [RBX + 0x4]
SHL ECX,0x10
OR RCX,RAX
MOV qword ptr [RBX + 0x20],RCX
MOV qword ptr [RBX + 0x28],RCX
MOV RAX,qword ptr [RBX + 0x7]
BSWAP RAX
MOV qword ptr [RBX + 0x40],RAX
MOV dword ptr [RBX + 0x50],0x1
ADD R14,0xf
LAB_0014406b:
MOV qword ptr [RBX + 0x38],R14
OR R15D,0x1
JMP 0x001440c8
caseD_a:
MOVZX EAX,word ptr [RBX + 0x2]
ROL AX,0x8
MOVZX EAX,AX
MOVZX ECX,byte ptr [RBX + 0x1]
SHL ECX,0x10
OR RCX,RAX
MOV qword ptr [RBX + 0x20],RCX
MOVZX EAX,byte ptr [RBX + 0x4]
ADD RAX,RCX
MOV qword ptr [RBX + 0x28],RAX
ADD R14,0x5
JMP 0x001440c0
caseD_8:
MOVZX EAX,word ptr [RBX + 0x2]
ROL AX,0x8
MOVZX EAX,AX
MOVZX ECX,byte ptr [RBX + 0x1]
SHL ECX,0x10
OR RCX,RAX
MOV qword ptr [RBX + 0x28],RCX
MOV qword ptr [RBX + 0x20],RCX
LAB_001440bc:
ADD R14,0x4
LAB_001440c0:
MOV qword ptr [RBX + 0x38],R14
OR R15D,0x2
LAB_001440c8:
MOV EAX,R15D
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001440da:
MOV RDI,RAX
MOV ESI,R15D
MOV RDX,R14
CALL 0x00129f57
JMP 0x00143d51
LAB_001440ed:
LEA R13,[RBP + -0x30]
MOV RDI,RAX
MOV ESI,R15D
MOV RDX,RBX
MOV RCX,R13
CALL 0x00129fb1
MOV RAX,qword ptr [R13]
JMP 0x00143d82
|
uint _ma_get_block_info(long param_1,byte *param_2,int param_3,long param_4)
{
uint uVar1;
ulong uVar2;
long lVar3;
int4 *puVar4;
ulong uVar5;
int *puVar6;
uint uVar7;
int1 local_80 [72];
long local_38;
if (-1 < param_3) {
lVar3 = (**(code **)(PSI_server + 0x158))(local_80,param_3,8);
if (lVar3 == 0) {
my_seek(param_3,param_4,0,0);
}
else {
_ma_get_block_info_cold_1(lVar3,param_3,param_4);
}
lVar3 = (**(code **)(PSI_server + 0x158))(local_80,param_3,6);
if (lVar3 == 0) {
local_38 = my_read(param_3,param_2,0x14,0);
}
else {
_ma_get_block_info_cold_2(lVar3,param_3,param_2,&local_38);
}
if (local_38 != 0x14) {
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0x7f;
return 8;
}
}
uVar5 = (ulong)*param_2;
if (uVar5 < 0xe) {
puVar6 = &DAT_001e1fec;
if (*(int *)(param_2 + 0x50) == 0) {
puVar6 = &DAT_001e2024;
}
uVar7 = *(uint *)(puVar6 + uVar5 * 4);
}
else {
uVar7 = (uint)(*(int *)(param_2 + 0x50) == 0) << 4;
}
param_2[0x40] = 0xff;
param_2[0x41] = 0xff;
param_2[0x42] = 0xff;
param_2[0x43] = 0xff;
param_2[0x44] = 0xff;
param_2[0x45] = 0xff;
param_2[0x46] = 0xff;
param_2[0x47] = 0xff;
switch(uVar5) {
case 0:
uVar5 = (ulong)((uint)param_2[1] << 0x10 | (uint)param_2[2] << 8) | (ulong)param_2[3];
*(ulong *)(param_2 + 0x28) = uVar5;
if (((param_2[3] & 3) == 0) && (0x13 < (uint)uVar5)) {
*(long *)(param_2 + 0x38) = param_4;
uVar5 = *(ulong *)(param_2 + 4);
uVar2 = *(ulong *)(param_2 + 0xc);
*(ulong *)(param_2 + 0x40) =
uVar5 >> 0x38 | (uVar5 & 0xff000000000000) >> 0x28 | (uVar5 & 0xff0000000000) >> 0x18 |
(uVar5 & 0xff00000000) >> 8 | (uVar5 & 0xff000000) << 8 | (uVar5 & 0xff0000) << 0x18 |
(uVar5 & 0xff00) << 0x28 | uVar5 << 0x38;
*(ulong *)(param_2 + 0x48) =
uVar2 >> 0x38 | (uVar2 & 0xff000000000000) >> 0x28 | (uVar2 & 0xff0000000000) >> 0x18 |
(uVar2 & 0xff00000000) >> 8 | (uVar2 & 0xff000000) << 8 | (uVar2 & 0xff0000) << 0x18 |
(uVar2 & 0xff00) << 0x28 | uVar2 << 0x38;
return uVar7 | 4;
}
default:
if (*(char *)(param_1 + 0x683) != '\0') {
return 8;
}
_ma_set_fatal_error(param_1,0x7f);
return 8;
case 1:
uVar5 = (ulong)(ushort)(*(ushort *)(param_2 + 1) << 8 | *(ushort *)(param_2 + 1) >> 8);
*(ulong *)(param_2 + 0x28) = uVar5;
*(ulong *)(param_2 + 0x20) = uVar5;
*(ulong *)(param_2 + 0x18) = uVar5;
param_4 = param_4 + 3;
goto LAB_00143f97;
case 2:
uVar5 = (ulong)CONCAT12(param_2[1],*(ushort *)(param_2 + 2) << 8 | *(ushort *)(param_2 + 2) >> 8
);
*(ulong *)(param_2 + 0x28) = uVar5;
*(ulong *)(param_2 + 0x20) = uVar5;
*(ulong *)(param_2 + 0x18) = uVar5;
goto LAB_00143f5a;
case 3:
uVar5 = (ulong)(ushort)(*(ushort *)(param_2 + 1) << 8 | *(ushort *)(param_2 + 1) >> 8);
*(ulong *)(param_2 + 0x20) = uVar5;
*(ulong *)(param_2 + 0x18) = uVar5;
*(ulong *)(param_2 + 0x28) = param_2[3] + uVar5;
LAB_00143f5a:
param_4 = param_4 + 4;
LAB_00143f97:
*(long *)(param_2 + 0x38) = param_4;
return uVar7 | 3;
case 4:
uVar5 = (ulong)CONCAT12(param_2[1],*(ushort *)(param_2 + 2) << 8 | *(ushort *)(param_2 + 2) >> 8
);
*(ulong *)(param_2 + 0x20) = uVar5;
*(ulong *)(param_2 + 0x18) = uVar5;
*(ulong *)(param_2 + 0x28) = param_2[4] + uVar5;
param_4 = param_4 + 5;
goto LAB_00143f97;
case 5:
*(ulong *)(param_2 + 0x18) =
(ulong)(ushort)(*(ushort *)(param_2 + 1) << 8 | *(ushort *)(param_2 + 1) >> 8);
uVar5 = (ulong)(ushort)(*(ushort *)(param_2 + 3) << 8 | *(ushort *)(param_2 + 3) >> 8);
*(ulong *)(param_2 + 0x20) = uVar5;
*(ulong *)(param_2 + 0x28) = uVar5;
uVar5 = *(ulong *)(param_2 + 5);
*(ulong *)(param_2 + 0x40) =
uVar5 >> 0x38 | (uVar5 & 0xff000000000000) >> 0x28 | (uVar5 & 0xff0000000000) >> 0x18 |
(uVar5 & 0xff00000000) >> 8 | (uVar5 & 0xff000000) << 8 | (uVar5 & 0xff0000) << 0x18 |
(uVar5 & 0xff00) << 0x28 | uVar5 << 0x38;
param_2[0x50] = 1;
param_2[0x51] = 0;
param_2[0x52] = 0;
param_2[0x53] = 0;
param_4 = param_4 + 0xd;
break;
case 6:
*(ulong *)(param_2 + 0x18) =
(ulong)CONCAT12(param_2[1],*(ushort *)(param_2 + 2) << 8 | *(ushort *)(param_2 + 2) >> 8);
uVar5 = (ulong)CONCAT12(param_2[4],*(ushort *)(param_2 + 5) << 8 | *(ushort *)(param_2 + 5) >> 8
);
*(ulong *)(param_2 + 0x20) = uVar5;
*(ulong *)(param_2 + 0x28) = uVar5;
uVar5 = *(ulong *)(param_2 + 7);
*(ulong *)(param_2 + 0x40) =
uVar5 >> 0x38 | (uVar5 & 0xff000000000000) >> 0x28 | (uVar5 & 0xff0000000000) >> 0x18 |
(uVar5 & 0xff00000000) >> 8 | (uVar5 & 0xff000000) << 8 | (uVar5 & 0xff0000) << 0x18 |
(uVar5 & 0xff00) << 0x28 | uVar5 << 0x38;
param_2[0x50] = 1;
param_2[0x51] = 0;
param_2[0x52] = 0;
param_2[0x53] = 0;
param_4 = param_4 + 0xf;
break;
case 7:
uVar5 = (ulong)(ushort)(*(ushort *)(param_2 + 1) << 8 | *(ushort *)(param_2 + 1) >> 8);
*(ulong *)(param_2 + 0x28) = uVar5;
*(ulong *)(param_2 + 0x20) = uVar5;
param_4 = param_4 + 3;
goto LAB_001440c0;
case 8:
uVar5 = (ulong)CONCAT12(param_2[1],*(ushort *)(param_2 + 2) << 8 | *(ushort *)(param_2 + 2) >> 8
);
*(ulong *)(param_2 + 0x28) = uVar5;
*(ulong *)(param_2 + 0x20) = uVar5;
goto LAB_001440bc;
case 9:
uVar5 = (ulong)(ushort)(*(ushort *)(param_2 + 1) << 8 | *(ushort *)(param_2 + 1) >> 8);
*(ulong *)(param_2 + 0x20) = uVar5;
*(ulong *)(param_2 + 0x28) = param_2[3] + uVar5;
LAB_001440bc:
param_4 = param_4 + 4;
LAB_001440c0:
*(long *)(param_2 + 0x38) = param_4;
return uVar7 | 2;
case 10:
uVar5 = (ulong)CONCAT12(param_2[1],*(ushort *)(param_2 + 2) << 8 | *(ushort *)(param_2 + 2) >> 8
);
*(ulong *)(param_2 + 0x20) = uVar5;
*(ulong *)(param_2 + 0x28) = param_2[4] + uVar5;
param_4 = param_4 + 5;
goto LAB_001440c0;
case 0xb:
uVar5 = (ulong)(ushort)(*(ushort *)(param_2 + 1) << 8 | *(ushort *)(param_2 + 1) >> 8);
*(ulong *)(param_2 + 0x28) = uVar5;
*(ulong *)(param_2 + 0x20) = uVar5;
uVar5 = *(ulong *)(param_2 + 3);
*(ulong *)(param_2 + 0x40) =
uVar5 >> 0x38 | (uVar5 & 0xff000000000000) >> 0x28 | (uVar5 & 0xff0000000000) >> 0x18 |
(uVar5 & 0xff00000000) >> 8 | (uVar5 & 0xff000000) << 8 | (uVar5 & 0xff0000) << 0x18 |
(uVar5 & 0xff00) << 0x28 | uVar5 << 0x38;
param_2[0x50] = 1;
param_2[0x51] = 0;
param_2[0x52] = 0;
param_2[0x53] = 0;
param_4 = param_4 + 0xb;
goto LAB_00143ef1;
case 0xc:
uVar5 = (ulong)CONCAT12(param_2[1],*(ushort *)(param_2 + 2) << 8 | *(ushort *)(param_2 + 2) >> 8
);
*(ulong *)(param_2 + 0x28) = uVar5;
*(ulong *)(param_2 + 0x20) = uVar5;
uVar5 = *(ulong *)(param_2 + 4);
*(ulong *)(param_2 + 0x40) =
uVar5 >> 0x38 | (uVar5 & 0xff000000000000) >> 0x28 | (uVar5 & 0xff0000000000) >> 0x18 |
(uVar5 & 0xff00000000) >> 8 | (uVar5 & 0xff000000) << 8 | (uVar5 & 0xff0000) << 0x18 |
(uVar5 & 0xff00) << 0x28 | uVar5 << 0x38;
param_2[0x50] = 1;
param_2[0x51] = 0;
param_2[0x52] = 0;
param_2[0x53] = 0;
param_4 = param_4 + 0xc;
LAB_00143ef1:
*(long *)(param_2 + 0x38) = param_4;
return uVar7;
case 0xd:
uVar1 = *(uint *)(param_2 + 1);
*(ulong *)(param_2 + 0x18) =
(ulong)(uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18);
uVar5 = (ulong)CONCAT12(param_2[5],*(ushort *)(param_2 + 6) << 8 | *(ushort *)(param_2 + 6) >> 8
);
*(ulong *)(param_2 + 0x20) = uVar5;
*(ulong *)(param_2 + 0x28) = uVar5;
uVar5 = *(ulong *)(param_2 + 8);
*(ulong *)(param_2 + 0x40) =
uVar5 >> 0x38 | (uVar5 & 0xff000000000000) >> 0x28 | (uVar5 & 0xff0000000000) >> 0x18 |
(uVar5 & 0xff00000000) >> 8 | (uVar5 & 0xff000000) << 8 | (uVar5 & 0xff0000) << 0x18 |
(uVar5 & 0xff00) << 0x28 | uVar5 << 0x38;
param_2[0x50] = 1;
param_2[0x51] = 0;
param_2[0x52] = 0;
param_2[0x53] = 0;
param_4 = param_4 + 0x10;
}
*(long *)(param_2 + 0x38) = param_4;
return uVar7 | 1;
}
|
|
61,003
|
YAML::detail::node* YAML::detail::node_data::get<char [5]>(char const (&) [5], std::shared_ptr<YAML::detail::memory_holder>) const
|
aimrt_mujoco_sim/_deps/yaml-cpp-src/include/yaml-cpp/node/detail/impl.h
|
inline node* node_data::get(const Key& key,
shared_memory_holder pMemory) const {
switch (m_type) {
case NodeType::Map:
break;
case NodeType::Undefined:
case NodeType::Null:
return nullptr;
case NodeType::Sequence:
if (node* pNode = get_idx<Key>::get(m_sequence, key, pMemory))
return pNode;
return nullptr;
case NodeType::Scalar:
throw BadSubscript(m_mark, key);
}
auto it = std::find_if(m_map.begin(), m_map.end(), [&](const kv_pair m) {
return m.first->equals(key, pMemory);
});
return it != m_map.end() ? it->second : nullptr;
}
|
O0
|
c
|
YAML::detail::node* YAML::detail::node_data::get<char [5]>(char const (&) [5], std::shared_ptr<YAML::detail::memory_holder>) const:
subq $0xc8, %rsp
movq %rdx, 0x38(%rsp)
movq %rdi, 0xb8(%rsp)
movq %rsi, 0xb0(%rsp)
movq %rdx, 0xa8(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x40(%rsp)
movl 0x10(%rax), %eax
movq %rax, 0x48(%rsp)
subq $0x4, %rax
ja 0x254284
movq 0x48(%rsp), %rax
leaq 0x38dd79(%rip), %rcx # 0x5e1eb8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x254284
movq $0x0, 0xc0(%rsp)
jmp 0x254340
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rax
addq $0x60, %rax
movq %rax, 0x18(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x90(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x1e4c50
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x254360
movq %rax, 0x30(%rsp)
jmp 0x2541ab
leaq 0x90(%rsp), %rdi
callq 0x1e4c80
movq 0x30(%rsp), %rax
movq %rax, 0xa0(%rsp)
cmpq $0x0, 0xa0(%rsp)
je 0x25420b
movq 0xa0(%rsp), %rax
movq %rax, 0xc0(%rsp)
jmp 0x254340
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x1e4c80
jmp 0x254350
movq $0x0, 0xc0(%rsp)
jmp 0x254340
movl $0x40, %edi
callq 0x192f50
movq 0x40(%rsp), %rsi
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x10(%rsp)
addq $0x4, %rsi
movq 0xb0(%rsp), %rdx
callq 0x254380
jmp 0x254249
movq 0x10(%rsp), %rdi
leaq 0x4f1563(%rip), %rsi # 0x7457b8
leaq 0x10ea24(%rip), %rdx # 0x362c80
callq 0x198050
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
callq 0x19ea50
jmp 0x254350
movq 0x40(%rsp), %rdi
addq $0x80, %rdi
callq 0x1e65b0
movq 0x40(%rsp), %rdi
movq %rax, 0x70(%rsp)
addq $0x80, %rdi
callq 0x1e65e0
movq %rax, %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x68(%rsp)
movq 0xb0(%rsp), %rcx
movq %rcx, 0x58(%rsp)
movq %rax, 0x60(%rsp)
movq 0x70(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq 0x60(%rsp), %rcx
callq 0x254420
movq 0x40(%rsp), %rdi
movq %rax, 0x78(%rsp)
addq $0x80, %rdi
callq 0x1e65e0
movq %rax, 0x50(%rsp)
leaq 0x78(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x1e6610
xorb $-0x1, %al
testb $0x1, %al
jne 0x254315
jmp 0x25432a
leaq 0x78(%rsp), %rdi
callq 0x1e6650
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x254333
xorl %eax, %eax
movq %rax, 0x8(%rsp)
jmp 0x254333
movq 0x8(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
addq $0xc8, %rsp
retq
movq 0x88(%rsp), %rdi
callq 0x198ce0
nopl (%rax)
|
_ZNK4YAML6detail9node_data3getIA18_cEEPNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE:
sub rsp, 0C8h
mov [rsp+0C8h+var_90], rdx
mov [rsp+0C8h+var_10], rdi
mov [rsp+0C8h+var_18], rsi
mov [rsp+0C8h+var_20], rdx
mov rax, [rsp+0C8h+var_10]
mov [rsp+0C8h+var_88], rax
mov eax, [rax+10h]
mov [rsp+0C8h+var_80], rax
sub rax, 4; switch 5 cases
ja def_254146; jumptable 0000000000254146 default case
mov rax, [rsp+0C8h+var_80]
lea rcx, jpt_254146
movsxd rax, ds:(jpt_254146 - 5E1EB8h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_254148:
jmp def_254146; jumptable 0000000000254146 case 4
loc_25414D:
mov [rsp+0C8h+var_8], 0; jumptable 0000000000254146 cases 0,1
jmp loc_254340
loc_25415E:
mov rsi, [rsp+0C8h+var_90]; jumptable 0000000000254146 case 3
mov rax, [rsp+0C8h+var_88]
add rax, 60h ; '`'
mov [rsp+0C8h+var_B0], rax
mov rax, [rsp+0C8h+var_18]
mov [rsp+0C8h+var_A8], rax
lea rdi, [rsp+0C8h+var_38]
mov [rsp+0C8h+var_A0], rdi
call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEEC2ERKS3_; std::shared_ptr<YAML::detail::memory_holder>::shared_ptr(std::shared_ptr<YAML::detail::memory_holder> const&)
mov rdi, [rsp+0C8h+var_B0]
mov rsi, [rsp+0C8h+var_A8]
mov rdx, [rsp+0C8h+var_A0]
call _ZN4YAML6detail7get_idxIA18_cvE3getERKSt6vectorIPNS0_4nodeESaIS6_EERA18_KcSt10shared_ptrINS0_13memory_holderEE; YAML::detail::get_idx<char [18],void>::get(std::vector<YAML::detail::node *> const&,char const(&)[18],std::shared_ptr<YAML::detail::memory_holder>)
mov [rsp+0C8h+var_98], rax
jmp short $+2
loc_2541AB:
lea rdi, [rsp+0C8h+var_38]
call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEED2Ev; std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr()
mov rax, [rsp+0C8h+var_98]
mov [rsp+0C8h+var_28], rax
cmp [rsp+0C8h+var_28], 0
jz short loc_25420B
mov rax, [rsp+0C8h+var_28]
mov [rsp+0C8h+var_8], rax
jmp loc_254340
mov rcx, rax
mov eax, edx
mov [rsp+0C8h+var_40], rcx
mov [rsp+0C8h+var_44], eax
lea rdi, [rsp+0C8h+var_38]
call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEED2Ev; std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr()
jmp loc_254350
loc_25420B:
mov [rsp+0C8h+var_8], 0
jmp loc_254340
loc_25421C:
mov edi, 40h ; '@'; jumptable 0000000000254146 case 2
call ___cxa_allocate_exception
mov rsi, [rsp+0C8h+var_88]
mov rdi, rax
mov rax, rdi
mov [rsp+0C8h+var_B8], rax
add rsi, 4
mov rdx, [rsp+0C8h+var_18]
call _ZN4YAML12BadSubscriptC2IA18_cEERKNS_4MarkERKT_; YAML::BadSubscript::BadSubscript<char [18]>(YAML::Mark const&,char [18] const&)
jmp short $+2
loc_254249:
mov rdi, [rsp+0C8h+var_B8]; void *
lea rsi, _ZTIN4YAML12BadSubscriptE; lptinfo
lea rdx, _ZN4YAML12BadSubscriptD2Ev; void (*)(void *)
call ___cxa_throw
mov rdi, [rsp+0C8h+var_B8]; void *
mov rcx, rax
mov eax, edx
mov [rsp+0C8h+var_40], rcx
mov [rsp+0C8h+var_44], eax
call ___cxa_free_exception
jmp loc_254350
def_254146:
mov rdi, [rsp+0C8h+var_88]; jumptable 0000000000254146 default case
add rdi, 80h
call _ZNKSt6vectorISt4pairIPN4YAML6detail4nodeES4_ESaIS5_EE5beginEv; std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>::begin(void)
mov rdi, [rsp+0C8h+var_88]
mov [rsp+0C8h+var_58], rax
add rdi, 80h
call _ZNKSt6vectorISt4pairIPN4YAML6detail4nodeES4_ESaIS5_EE3endEv; std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>::end(void)
mov rcx, rax
mov rax, [rsp+0C8h+var_90]
mov [rsp+0C8h+var_60], rcx
mov rcx, [rsp+0C8h+var_18]
mov [rsp+0C8h+var_70], rcx
mov [rsp+0C8h+var_68], rax
mov rdi, [rsp+0C8h+var_58]
mov rsi, [rsp+0C8h+var_60]
mov rdx, [rsp+0C8h+var_70]
mov rcx, [rsp+0C8h+var_68]
call _ZSt7find_ifIN9__gnu_cxx17__normal_iteratorIPKSt4pairIPN4YAML6detail4nodeES6_ESt6vectorIS7_SaIS7_EEEEZNKS4_9node_data3getIA18_cEES6_RKT_St10shared_ptrINS4_13memory_holderEEEUlS7_E_ESH_SH_SH_T0_; std::find_if<__gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> const*,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>,YAML::detail::node_data::get<char [18]>(char [18] const&,std::shared_ptr<YAML::detail::memory_holder>)::{lambda(std::pair<YAML::detail::node *,YAML::detail::node *>)#1}>(char [18],char [18],YAML::detail::node_data::get<char [18]>(char [18] const&,std::shared_ptr<YAML::detail::memory_holder>)::{lambda(std::pair<YAML::detail::node *,YAML::detail::node *>)#1})
mov rdi, [rsp+0C8h+var_88]
mov [rsp+0C8h+var_50], rax
add rdi, 80h
call _ZNKSt6vectorISt4pairIPN4YAML6detail4nodeES4_ESaIS5_EE3endEv; std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>::end(void)
mov [rsp+0C8h+var_78], rax
lea rdi, [rsp+0C8h+var_50]
lea rsi, [rsp+0C8h+var_78]
call _ZN9__gnu_cxxeqIPKSt4pairIPN4YAML6detail4nodeES5_ESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
xor al, 0FFh
test al, 1
jnz short loc_254315
jmp short loc_25432A
loc_254315:
lea rdi, [rsp+0C8h+var_50]
call _ZNK9__gnu_cxx17__normal_iteratorIPKSt4pairIPN4YAML6detail4nodeES5_ESt6vectorIS6_SaIS6_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> const*,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>::operator->(void)
mov rax, [rax+8]
mov [rsp+0C8h+var_C0], rax
jmp short loc_254333
loc_25432A:
xor eax, eax
mov [rsp+0C8h+var_C0], rax
jmp short $+2
loc_254333:
mov rax, [rsp+0C8h+var_C0]
mov [rsp+0C8h+var_8], rax
loc_254340:
mov rax, [rsp+0C8h+var_8]
add rsp, 0C8h
retn
loc_254350:
mov rdi, [rsp+0C8h+var_40]
call __Unwind_Resume
|
long long YAML::detail::node_data::get<char [18]>(long long a1, long long a2, long long a3)
{
int v3; // ecx
int v4; // r8d
int v5; // r9d
long long v7; // [rsp+8h] [rbp-C0h]
void *exception; // [rsp+10h] [rbp-B8h]
long long v9; // [rsp+20h] [rbp-A8h]
long long v10; // [rsp+30h] [rbp-98h]
_QWORD v12[3]; // [rsp+50h] [rbp-78h] BYREF
long long v13; // [rsp+68h] [rbp-60h]
long long v14; // [rsp+70h] [rbp-58h]
long long v15; // [rsp+78h] [rbp-50h] BYREF
_BYTE v16[16]; // [rsp+90h] [rbp-38h] BYREF
long long v17; // [rsp+A0h] [rbp-28h]
long long v18; // [rsp+A8h] [rbp-20h]
long long v19; // [rsp+B0h] [rbp-18h]
long long v20; // [rsp+B8h] [rbp-10h]
long long v21; // [rsp+C0h] [rbp-8h]
v20 = a1;
v19 = a2;
v18 = a3;
switch ( *(_DWORD *)(a1 + 16) )
{
case 0:
case 1:
v21 = 0LL;
break;
case 2:
exception = __cxa_allocate_exception(0x40uLL);
YAML::BadSubscript::BadSubscript<char [18]>((_DWORD)exception, a1 + 4, v19, v3, v4, v5);
__cxa_throw(exception, (struct type_info *)&`typeinfo for'YAML::BadSubscript, YAML::BadSubscript::~BadSubscript);
case 3:
v9 = v19;
std::shared_ptr<YAML::detail::memory_holder>::shared_ptr((long long)v16, a3);
v10 = YAML::detail::get_idx<char [18],void>::get(a1 + 96, v9, v16);
std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr((long long)v16);
v17 = v10;
if ( v10 )
v21 = v17;
else
v21 = 0LL;
break;
default:
v14 = std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>::begin(a1 + 128);
v13 = std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>::end(a1 + 128);
v12[1] = v19;
v12[2] = a3;
v15 = std::find_if<__gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> const*,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>,YAML::detail::node * YAML::detail::node_data::get<char [18]>(char [18] const&,std::shared_ptr<YAML::detail::memory_holder>)::{lambda(std::pair<YAML::detail::node *,YAML::detail::node *>)#1}>(
v14,
v13,
v19,
a3);
v12[0] = std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>::end(a1 + 128);
if ( __gnu_cxx::operator==<std::pair<YAML::detail::node *,YAML::detail::node *> const*,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>(
(long long)&v15,
(long long)v12) )
{
v7 = 0LL;
}
else
{
v7 = *(_QWORD *)(__gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> const*,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>::operator->((long long)&v15)
+ 8);
}
v21 = v7;
break;
}
return v21;
}
| |||
61,004
|
YAML::detail::node* YAML::detail::node_data::get<char [5]>(char const (&) [5], std::shared_ptr<YAML::detail::memory_holder>) const
|
aimrt_mujoco_sim/_deps/yaml-cpp-src/include/yaml-cpp/node/detail/impl.h
|
inline node* node_data::get(const Key& key,
shared_memory_holder pMemory) const {
switch (m_type) {
case NodeType::Map:
break;
case NodeType::Undefined:
case NodeType::Null:
return nullptr;
case NodeType::Sequence:
if (node* pNode = get_idx<Key>::get(m_sequence, key, pMemory))
return pNode;
return nullptr;
case NodeType::Scalar:
throw BadSubscript(m_mark, key);
}
auto it = std::find_if(m_map.begin(), m_map.end(), [&](const kv_pair m) {
return m.first->equals(key, pMemory);
});
return it != m_map.end() ? it->second : nullptr;
}
|
O3
|
c
|
YAML::detail::node* YAML::detail::node_data::get<char [5]>(char const (&) [5], std::shared_ptr<YAML::detail::memory_holder>) const:
pushq %r15
pushq %r14
pushq %rbx
movl 0x10(%rdi), %eax
cmpl $0x2, %eax
jb 0xe8cfa
movq %rdx, %rcx
cmpl $0x3, %eax
je 0xe8cd7
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x2, %eax
je 0xe8d02
movq 0x80(%rbx), %rdi
movq 0x88(%rbx), %rsi
movq %r14, %rdx
callq 0xe8ddc
cmpq 0x88(%rbx), %rax
je 0xe8cfa
movq 0x8(%rax), %rax
jmp 0xe8cfc
movq 0x8(%rcx), %rdi
testq %rdi, %rdi
je 0xe8cfa
movq 0x1b7fe1(%rip), %rax # 0x2a0cc8
cmpb $0x0, (%rax)
je 0xe8cf1
incl 0x8(%rdi)
jmp 0xe8cf5
lock
incl 0x8(%rdi)
callq 0x81a00
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movl $0x40, %edi
callq 0x80f20
movq %rax, %r15
addq $0x4, %rbx
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xe8d4a
leaq 0x1b1750(%rip), %rsi # 0x29a478
leaq 0x2cae5(%rip), %rdx # 0x115814
movq %r15, %rdi
callq 0x83970
movq %rax, %rbx
movq %r15, %rdi
callq 0x816f0
movq %rbx, %rdi
callq 0x83b70
|
_ZNK4YAML6detail9node_data3getIA27_cEEPNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE:
push r15
push r14
push rbx
mov eax, [rdi+10h]
cmp eax, 2
jb short loc_E8CFA
mov rcx, rdx
cmp eax, 3
jz short loc_E8CD7
mov r14, rsi
mov rbx, rdi
cmp eax, 2
jz short loc_E8D02
mov rdi, [rbx+80h]
mov rsi, [rbx+88h]
mov rdx, r14
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKSt4pairIPN4YAML6detail4nodeES6_ESt6vectorIS7_SaIS7_EEEENS0_5__ops10_Iter_predIZNKS4_9node_data3getIA27_cEES6_RKT_St10shared_ptrINS4_13memory_holderEEEUlS7_E_EEESJ_SJ_SJ_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> const*,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>,__gnu_cxx::__ops::_Iter_pred<YAML::detail::node_data::get<char [27]>(char [27] const&,std::shared_ptr<YAML::detail::memory_holder>)::{lambda(std::pair<YAML::detail::node *,YAML::detail::node *>)#1}>>(char [27],char [27],__gnu_cxx::__ops::_Iter_pred<YAML::detail::node_data::get<char [27]>(char [27] const&,std::shared_ptr<YAML::detail::memory_holder>)::{lambda(std::pair<YAML::detail::node *,YAML::detail::node *>)#1}>,std::random_access_iterator_tag)
cmp rax, [rbx+88h]
jz short loc_E8CFA
mov rax, [rax+8]
jmp short loc_E8CFC
loc_E8CD7:
mov rdi, [rcx+8]
test rdi, rdi
jz short loc_E8CFA
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_E8CF1
inc dword ptr [rdi+8]
jmp short loc_E8CF5
loc_E8CF1:
lock inc dword ptr [rdi+8]
loc_E8CF5:
call __ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_E8CFA:
xor eax, eax
loc_E8CFC:
pop rbx
pop r14
pop r15
retn
loc_E8D02:
mov edi, 40h ; '@'; thrown_size
call ___cxa_allocate_exception
mov r15, rax
add rbx, 4
mov rdi, rax
mov rsi, rbx
mov rdx, r14
call _ZN4YAML12BadSubscriptC2IA27_cEERKNS_4MarkERKT_; YAML::BadSubscript::BadSubscript<char [27]>(YAML::Mark const&,char [27] const&)
lea rsi, _ZTIN4YAML12BadSubscriptE; lptinfo
lea rdx, _ZN4YAML9ExceptionD2Ev; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
mov rbx, rax
mov rdi, r15; void *
call ___cxa_free_exception
mov rdi, rbx
call __Unwind_Resume
|
long long YAML::detail::node_data::get<char [27]>(long long a1, long long a2, long long a3)
{
unsigned int v3; // eax
long long v4; // rax
long long v6; // rdi
void *exception; // r15
int v8; // ecx
int v9; // r8d
int v10; // r9d
v3 = *(_DWORD *)(a1 + 16);
if ( v3 >= 2 )
{
if ( v3 == 3 )
{
v6 = *(_QWORD *)(a3 + 8);
if ( v6 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v6 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v6 + 8));
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6);
}
}
else
{
if ( v3 == 2 )
{
exception = __cxa_allocate_exception(0x40uLL);
YAML::BadSubscript::BadSubscript<char [27]>((_DWORD)exception, a1 + 4, a2, v8, v9, v10);
__cxa_throw(exception, (struct type_info *)&`typeinfo for'YAML::BadSubscript, YAML::Exception::~Exception);
}
v4 = std::__find_if<__gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> const*,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>,__gnu_cxx::__ops::_Iter_pred<YAML::detail::node * YAML::detail::node_data::get<char [27]>(char [27] const&,std::shared_ptr<YAML::detail::memory_holder>)::{lambda(std::pair<YAML::detail::node *,YAML::detail::node *>)#1}>>(
*(_QWORD *)(a1 + 128),
*(_QWORD *)(a1 + 136),
a2,
a3);
if ( v4 != *(_QWORD *)(a1 + 136) )
return *(_QWORD *)(v4 + 8);
}
}
return 0LL;
}
|
get<char[27]>:
PUSH R15
PUSH R14
PUSH RBX
MOV EAX,dword ptr [RDI + 0x10]
CMP EAX,0x2
JC 0x001e8cfa
MOV RCX,RDX
CMP EAX,0x3
JZ 0x001e8cd7
MOV R14,RSI
MOV RBX,RDI
CMP EAX,0x2
JZ 0x001e8d02
MOV RDI,qword ptr [RBX + 0x80]
MOV RSI,qword ptr [RBX + 0x88]
MOV RDX,R14
CALL 0x001e8ddc
CMP RAX,qword ptr [RBX + 0x88]
JZ 0x001e8cfa
MOV RAX,qword ptr [RAX + 0x8]
JMP 0x001e8cfc
LAB_001e8cd7:
MOV RDI,qword ptr [RCX + 0x8]
TEST RDI,RDI
JZ 0x001e8cfa
MOV RAX,qword ptr [0x003a0cc8]
CMP byte ptr [RAX],0x0
JZ 0x001e8cf1
INC dword ptr [RDI + 0x8]
JMP 0x001e8cf5
LAB_001e8cf1:
INC.LOCK dword ptr [RDI + 0x8]
LAB_001e8cf5:
CALL 0x00181a00
LAB_001e8cfa:
XOR EAX,EAX
LAB_001e8cfc:
POP RBX
POP R14
POP R15
RET
LAB_001e8d02:
MOV EDI,0x40
CALL 0x00180f20
MOV R15,RAX
ADD RBX,0x4
LAB_001e8d13:
MOV RDI,RAX
MOV RSI,RBX
MOV RDX,R14
CALL 0x001e8d4a
LAB_001e8d21:
LEA RSI,[0x39a478]
LEA RDX,[0x215814]
MOV RDI,R15
CALL 0x00183970
|
/* YAML::detail::node* YAML::detail::node_data::get<char [27]>(char const (&) [27],
std::shared_ptr<YAML::detail::memory_holder>) const */
node * __thiscall YAML::detail::node_data::get<char[27]>(node_data *this,char *param_1,long param_3)
{
uint uVar1;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *this_00;
long lVar2;
BadSubscript *this_01;
uVar1 = *(uint *)(this + 0x10);
if (1 < uVar1) {
if (uVar1 == 3) {
this_00 = *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(param_3 + 8);
if (this_00 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_003a0cc8 == '\0') {
LOCK();
*(int *)(this_00 + 8) = *(int *)(this_00 + 8) + 1;
UNLOCK();
}
else {
*(int *)(this_00 + 8) = *(int *)(this_00 + 8) + 1;
}
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(this_00);
}
}
else {
if (uVar1 == 2) {
this_01 = (BadSubscript *)__cxa_allocate_exception(0x40);
/* try { // try from 001e8d13 to 001e8d20 has its CatchHandler @ 001e8d37 */
BadSubscript::BadSubscript<char[27]>(this_01,(Mark *)(this + 4),param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(this_01,&BadSubscript::typeinfo,BadInsert::~BadInsert);
}
lVar2 = std::
__find_if<__gnu_cxx::__normal_iterator<std::pair<YAML::detail::node*,YAML::detail::node*>const*,std::vector<std::pair<YAML::detail::node*,YAML::detail::node*>,std::allocator<std::pair<YAML::detail::node*,YAML::detail::node*>>>>,__gnu_cxx::__ops::_Iter_pred<YAML::detail::node_data::get<char[27]>(char_const(&)[27],std::shared_ptr<YAML::detail::memory_holder>)const::_lambda(std::pair<YAML::detail::node*,YAML::detail::node*>)_1_>>
(*(int8 *)(this + 0x80),*(int8 *)(this + 0x88),param_1);
if (lVar2 != *(long *)(this + 0x88)) {
return *(node **)(lVar2 + 8);
}
}
}
return (node *)0x0;
}
|
|
61,005
|
js_error_get_stackTraceLimit
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_error_get_stackTraceLimit(JSContext *ctx, JSValue this_val)
{
JSValue val;
val = JS_ToObject(ctx, this_val);
if (JS_IsException(val))
return val;
JS_FreeValue(ctx, val);
return js_int32(ctx->error_stack_trace_limit);
}
|
O3
|
c
|
js_error_get_stackTraceLimit:
pushq %rbx
movq %rdi, %rbx
callq 0x268d8
cmpl $0x6, %edx
je 0x73827
cmpl $-0x9, %edx
jb 0x7381f
movq 0x18(%rbx), %rdi
movl (%rax), %ecx
leal -0x1(%rcx), %esi
movl %esi, (%rax)
cmpl $0x1, %ecx
jg 0x7381f
movq %rax, %rsi
callq 0x20d90
movl 0x138(%rbx), %eax
xorl %edx, %edx
popq %rbx
retq
|
js_error_get_stackTraceLimit:
push rbx
mov rbx, rdi
call JS_ToObject
cmp edx, 6
jz short loc_73827
cmp edx, 0FFFFFFF7h
jb short loc_7381F
mov rdi, [rbx+18h]
mov ecx, [rax]
lea esi, [rcx-1]
mov [rax], esi
cmp ecx, 1
jg short loc_7381F
mov rsi, rax
call js_free_value_rt
loc_7381F:
mov eax, [rbx+138h]
xor edx, edx
loc_73827:
pop rbx
retn
|
_QWORD * js_error_get_stackTraceLimit(
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)
{
_QWORD *result; // rax
long long v16; // rdx
long long v17; // r8
long long v18; // r9
long long v19; // rdi
long long v20; // rcx
result = (_QWORD *)JS_ToObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
if ( (_DWORD)v16 != 6 )
{
if ( (unsigned int)v16 >= 0xFFFFFFF7 )
{
v19 = *(_QWORD *)(a1 + 24);
v20 = *(unsigned int *)result;
*(_DWORD *)result = v20 - 1;
if ( (int)v20 <= 1 )
js_free_value_rt(v19, result, v16, v20, v17, v18);
}
return (_QWORD *)*(unsigned int *)(a1 + 312);
}
return result;
}
|
js_error_get_stackTraceLimit:
PUSH RBX
MOV RBX,RDI
CALL 0x001268d8
CMP EDX,0x6
JZ 0x00173827
CMP EDX,-0x9
JC 0x0017381f
MOV RDI,qword ptr [RBX + 0x18]
MOV ECX,dword ptr [RAX]
LEA ESI,[RCX + -0x1]
MOV dword ptr [RAX],ESI
CMP ECX,0x1
JG 0x0017381f
MOV RSI,RAX
CALL 0x00120d90
LAB_0017381f:
MOV EAX,dword ptr [RBX + 0x138]
XOR EDX,EDX
LAB_00173827:
POP RBX
RET
|
int * js_error_get_stackTraceLimit(long param_1)
{
int iVar1;
int8 uVar2;
int *piVar3;
int1 auVar4 [12];
auVar4 = JS_ToObject();
piVar3 = auVar4._0_8_;
if (auVar4._8_4_ != 6) {
if (0xfffffff6 < auVar4._8_4_) {
uVar2 = *(int8 *)(param_1 + 0x18);
iVar1 = *piVar3;
*piVar3 = iVar1 + -1;
if (iVar1 < 2) {
js_free_value_rt(uVar2,piVar3);
}
}
piVar3 = (int *)(ulong)*(uint *)(param_1 + 0x138);
}
return piVar3;
}
|
|
61,006
|
rapidjson::GenericMemberIterator<false, rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>> rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::FindMember<rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>> const&)
|
mnn-tts/MNN/3rd_party/rapidjson/document.h
|
MemberIterator FindMember(const GenericValue<Encoding, SourceAllocator>& name) {
RAPIDJSON_ASSERT(IsObject());
RAPIDJSON_ASSERT(name.IsString());
MemberIterator member = MemberBegin();
for ( ; member != MemberEnd(); ++member)
if (name.StringEqual(member->name))
break;
return member;
}
|
O0
|
c
|
rapidjson::GenericMemberIterator<false, rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>> rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::FindMember<rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>> const&):
subq $0x48, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x38(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x1e270
testb $0x1, %al
jne 0x1e0c5
jmp 0x1e0c7
jmp 0x1e0e6
leaq 0x6f5e(%rip), %rdi # 0x2502c
leaq 0x55b6(%rip), %rsi # 0x2368b
movl $0x4e7, %edx # imm = 0x4E7
leaq 0x6f56(%rip), %rcx # 0x25037
callq 0x4100
movq 0x30(%rsp), %rdi
callq 0x1e290
testb $0x1, %al
jne 0x1e0f6
jmp 0x1e0f8
jmp 0x1e117
leaq 0x7030(%rip), %rdi # 0x2512f
leaq 0x5585(%rip), %rsi # 0x2368b
movl $0x4e8, %edx # imm = 0x4E8
leaq 0x6f25(%rip), %rcx # 0x25037
callq 0x4100
movq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x1e2b0
movq 0x18(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x1e340
leaq 0x28(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x1dff0
movq 0x8(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x1e320
testb $0x1, %al
jne 0x1e159
jmp 0x1e18e
movq 0x8(%rsp), %rdi
movq 0x30(%rsp), %rax
movq %rax, (%rsp)
callq 0x1e4c0
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x1e3c0
testb $0x1, %al
jne 0x1e17e
jmp 0x1e180
jmp 0x1e18e
jmp 0x1e182
movq 0x8(%rsp), %rdi
callq 0x1e4d0
jmp 0x1e126
movq 0x10(%rsp), %rax
addq $0x48, %rsp
retq
nopl (%rax,%rax)
|
_ZN9rapidjson12GenericValueINS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEEE10FindMemberIS5_EENS_21GenericMemberIteratorILb0ES2_S5_EERKNS0_IS2_T_EE:
sub rsp, 48h
mov [rsp+48h+var_40], rdi
mov rax, rdi
mov [rsp+48h+var_38], rax
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
mov [rsp+48h+var_18], rdx
mov rdi, [rsp+48h+var_10]
mov [rsp+48h+var_30], rdi
call _ZNK9rapidjson12GenericValueINS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEEE8IsObjectEv; rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::IsObject(void)
test al, 1
jnz short loc_1E0C5
jmp short loc_1E0C7
loc_1E0C5:
jmp short loc_1E0E6
loc_1E0C7:
lea rdi, aIsobject; "IsObject()"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/mnn-tt"...
mov edx, 4E7h
lea rcx, aMemberiterator; "MemberIterator rapidjson::GenericValue<"...
call ___assert_fail
loc_1E0E6:
mov rdi, [rsp+48h+var_18]
call _ZNK9rapidjson12GenericValueINS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEEE8IsStringEv; rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::IsString(void)
test al, 1
jnz short loc_1E0F6
jmp short loc_1E0F8
loc_1E0F6:
jmp short loc_1E117
loc_1E0F8:
lea rdi, aNameIsstring; "name.IsString()"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/mnn-tt"...
mov edx, 4E8h
lea rcx, aMemberiterator; "MemberIterator rapidjson::GenericValue<"...
call ___assert_fail
loc_1E117:
mov rsi, [rsp+48h+var_30]
mov rdi, [rsp+48h+var_40]
call _ZN9rapidjson12GenericValueINS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEEE11MemberBeginEv; rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::MemberBegin(void)
loc_1E126:
mov rsi, [rsp+48h+var_30]
lea rdi, [rsp+48h+var_28]
call _ZN9rapidjson12GenericValueINS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEEE9MemberEndEv; rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::MemberEnd(void)
lea rdi, [rsp+48h+var_20]
lea rsi, [rsp+48h+var_28]
call _ZN9rapidjson21GenericMemberIteratorILb1ENS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEEEC2ERKNS0_ILb0ES2_S5_EE; rapidjson::GenericMemberIterator<true,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::GenericMemberIterator(rapidjson::GenericMemberIterator<false,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>> const&)
mov rdi, [rsp+48h+var_40]
mov rsi, [rsp+48h+var_20]
call _ZNK9rapidjson21GenericMemberIteratorILb0ENS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEEEneENS0_ILb1ES2_S5_EE; rapidjson::GenericMemberIterator<false,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::operator!=(rapidjson::GenericMemberIterator<true,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>)
test al, 1
jnz short loc_1E159
jmp short loc_1E18E
loc_1E159:
mov rdi, [rsp+48h+var_40]
mov rax, [rsp+48h+var_18]
mov [rsp+48h+var_48], rax
call _ZNK9rapidjson21GenericMemberIteratorILb0ENS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEEEptEv; rapidjson::GenericMemberIterator<false,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::operator->(void)
mov rdi, [rsp+48h+var_48]
mov rsi, rax
call _ZNK9rapidjson12GenericValueINS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEEE11StringEqualIS5_EEbRKNS0_IS2_T_EE; rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::StringEqual<rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>(rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>> const&)
test al, 1
jnz short loc_1E17E
jmp short loc_1E180
loc_1E17E:
jmp short loc_1E18E
loc_1E180:
jmp short $+2
loc_1E182:
mov rdi, [rsp+48h+var_40]
call _ZN9rapidjson21GenericMemberIteratorILb0ENS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEEEppEv; rapidjson::GenericMemberIterator<false,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::operator++(void)
jmp short loc_1E126
loc_1E18E:
mov rax, [rsp+48h+var_38]
add rsp, 48h
retn
|
long long rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::FindMember<rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>(
long long a1,
long long a2,
long long a3)
{
long long v3; // rax
long long v5; // [rsp+0h] [rbp-48h]
long long v6; // [rsp+20h] [rbp-28h] BYREF
long long v7; // [rsp+28h] [rbp-20h] BYREF
long long v8; // [rsp+30h] [rbp-18h]
long long v9; // [rsp+38h] [rbp-10h]
long long v10; // [rsp+40h] [rbp-8h]
v10 = a1;
v9 = a2;
v8 = a3;
if ( (rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::IsObject() & 1) == 0 )
__assert_fail(
"IsObject()",
"/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/rapidjson/document.h",
1255LL,
"MemberIterator rapidjson::GenericValue<rapidjson::UTF8<>>::FindMember(const GenericValue<Encoding, SourceAllocator"
"> &) [Encoding = rapidjson::UTF8<>, Allocator = rapidjson::MemoryPoolAllocator<>, SourceAllocator = rapidjson::Mem"
"oryPoolAllocator<>]");
if ( (rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::IsString(v8) & 1) == 0 )
__assert_fail(
"name.IsString()",
"/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/rapidjson/document.h",
1256LL,
"MemberIterator rapidjson::GenericValue<rapidjson::UTF8<>>::FindMember(const GenericValue<Encoding, SourceAllocator"
"> &) [Encoding = rapidjson::UTF8<>, Allocator = rapidjson::MemoryPoolAllocator<>, SourceAllocator = rapidjson::Mem"
"oryPoolAllocator<>]");
rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::MemberBegin(
a1,
a2);
while ( 1 )
{
rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::MemberEnd(
&v6,
a2);
rapidjson::GenericMemberIterator<true,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::GenericMemberIterator(
&v7,
&v6);
if ( (rapidjson::GenericMemberIterator<false,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::operator!=(
a1,
v7) & 1) == 0 )
break;
v5 = v8;
v3 = rapidjson::GenericMemberIterator<false,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::operator->(a1);
if ( (rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::StringEqual<rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>(
v5,
v3) & 1) != 0 )
break;
rapidjson::GenericMemberIterator<false,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::operator++(a1);
}
return a1;
}
|
FindMember<rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>:
SUB RSP,0x48
MOV qword ptr [RSP + 0x8],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x40],RDI
MOV qword ptr [RSP + 0x38],RSI
MOV qword ptr [RSP + 0x30],RDX
MOV RDI,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x18],RDI
CALL 0x0011e270
TEST AL,0x1
JNZ 0x0011e0c5
JMP 0x0011e0c7
LAB_0011e0c5:
JMP 0x0011e0e6
LAB_0011e0c7:
LEA RDI,[0x12502c]
LEA RSI,[0x12368b]
MOV EDX,0x4e7
LEA RCX,[0x125037]
CALL 0x00104100
LAB_0011e0e6:
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x0011e290
TEST AL,0x1
JNZ 0x0011e0f6
JMP 0x0011e0f8
LAB_0011e0f6:
JMP 0x0011e117
LAB_0011e0f8:
LEA RDI,[0x12512f]
LEA RSI,[0x12368b]
MOV EDX,0x4e8
LEA RCX,[0x125037]
CALL 0x00104100
LAB_0011e117:
MOV RSI,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0011e2b0
LAB_0011e126:
MOV RSI,qword ptr [RSP + 0x18]
LEA RDI,[RSP + 0x20]
CALL 0x0011e340
LEA RDI,[RSP + 0x28]
LEA RSI,[RSP + 0x20]
CALL 0x0011dff0
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x0011e320
TEST AL,0x1
JNZ 0x0011e159
JMP 0x0011e18e
LAB_0011e159:
MOV RDI,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP],RAX
CALL 0x0011e4c0
MOV RDI,qword ptr [RSP]
MOV RSI,RAX
CALL 0x0011e3c0
TEST AL,0x1
JNZ 0x0011e17e
JMP 0x0011e180
LAB_0011e17e:
JMP 0x0011e18e
LAB_0011e180:
JMP 0x0011e182
LAB_0011e182:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0011e4d0
JMP 0x0011e126
LAB_0011e18e:
MOV RAX,qword ptr [RSP + 0x10]
ADD RSP,0x48
RET
|
/* rapidjson::GenericMemberIterator<false, rapidjson::UTF8<char>,
rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >
rapidjson::GenericValue<rapidjson::UTF8<char>,
rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>
>::FindMember<rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>
>(rapidjson::GenericValue<rapidjson::UTF8<char>,
rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> > const&) */
GenericValue *
rapidjson::
GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::
FindMember<rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>(GenericValue *param_1)
{
GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>> *this;
bool bVar1;
ulong uVar2;
GenericValue *pGVar3;
GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>
*in_RDX;
GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>
*in_RSI;
GenericMemberIterator local_28 [8];
int8 local_20;
GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>
*local_18;
GenericValue *local_8;
local_18 = in_RDX;
local_8 = param_1;
uVar2 = IsObject(in_RSI);
if ((uVar2 & 1) == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("IsObject()",
"/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/rapidjson/document.h",
0x4e7,
"MemberIterator rapidjson::GenericValue<rapidjson::UTF8<>>::FindMember(const GenericValue<Encoding, SourceAllocator> &) [Encoding = rapidjson::UTF8<>, Allocator = rapidjson::MemoryPoolAllocator<>, SourceAllocator = rapidjson::MemoryPoolAllocator<>]"
);
}
uVar2 = IsString(local_18);
if ((uVar2 & 1) != 0) {
MemberBegin();
while( true ) {
MemberEnd();
GenericMemberIterator<true,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>
::GenericMemberIterator
((GenericMemberIterator<true,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>
*)&local_20,local_28);
uVar2 = GenericMemberIterator<false,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>
::operator!=((GenericMemberIterator<false,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>
*)param_1,local_20);
this = local_18;
if ((uVar2 & 1) == 0) {
return param_1;
}
pGVar3 = (GenericValue *)
GenericMemberIterator<false,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>
::operator->((GenericMemberIterator<false,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>
*)param_1);
bVar1 = StringEqual<rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>(this,pGVar3);
if (bVar1) break;
GenericMemberIterator<false,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>
::operator++((GenericMemberIterator<false,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>
*)param_1);
}
return param_1;
}
/* WARNING: Subroutine does not return */
__assert_fail("name.IsString()",
"/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/rapidjson/document.h",0x4e8,
"MemberIterator rapidjson::GenericValue<rapidjson::UTF8<>>::FindMember(const GenericValue<Encoding, SourceAllocator> &) [Encoding = rapidjson::UTF8<>, Allocator = rapidjson::MemoryPoolAllocator<>, SourceAllocator = rapidjson::MemoryPoolAllocator<>]"
);
}
|
|
61,007
|
reset_events_stages_history_long()
|
eloqsql/storage/perfschema/pfs_events_stages.cc
|
void reset_events_stages_history_long(void)
{
PFS_atomic::store_u32(&events_stages_history_long_index.m_u32, 0);
events_stages_history_long_full= false;
PFS_events_stages *pfs= events_stages_history_long_array;
PFS_events_stages *pfs_last= pfs + events_stages_history_long_size;
for ( ; pfs < pfs_last; pfs++)
pfs->m_class= NULL;
}
|
O3
|
cpp
|
reset_events_stages_history_long():
xorl %eax, %eax
xchgl %eax, 0x38e529(%rip) # 0x3d0700
movb $0x0, 0x38e4e2(%rip) # 0x3d06c0
movq 0x38e3db(%rip), %rax # 0x3d05c0
testq %rax, %rax
jle 0x422d5
pushq %rbp
movq %rsp, %rbp
movq 0x38e547(%rip), %rcx # 0x3d0740
imulq $0x68, %rax, %rax
addq %rcx, %rax
leaq 0x68(%rcx), %rdx
cmpq %rdx, %rax
cmovbeq %rdx, %rax
addq $-0x68, %rax
xorl %esi, %esi
cmpq %rcx, %rax
setne %sil
subq %rcx, %rax
subq %rsi, %rax
movabsq $0x4ec4ec4ec4ec4ec5, %rdx # imm = 0x4EC4EC4EC4EC4EC5
mulq %rdx
shrq $0x5, %rdx
leaq (%rdx,%rsi), %rax
movq %rax, %xmm0
pshufd $0x44, %xmm0, %xmm0 # xmm0 = xmm0[0,1,0,1]
addq $0x98, %rcx
leaq (%rdx,%rsi), %rax
addq $0x2, %rax
andq $-0x2, %rax
xorl %edx, %edx
movdqa 0x3e9c6(%rip), %xmm1 # 0x80c20
movdqa 0x3e9ee(%rip), %xmm2 # 0x80c50
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movq %rdx, %xmm4
pshufd $0x44, %xmm4, %xmm4 # xmm4 = xmm4[0,1,0,1]
por %xmm1, %xmm4
pxor %xmm2, %xmm4
movdqa %xmm4, %xmm5
pcmpgtd %xmm0, %xmm5
pcmpeqd %xmm0, %xmm4
pshufd $0xf5, %xmm4, %xmm6 # xmm6 = xmm4[1,1,3,3]
pand %xmm5, %xmm6
pshufd $0xf5, %xmm5, %xmm4 # xmm4 = xmm5[1,1,3,3]
por %xmm6, %xmm4
movd %xmm4, %esi
notl %esi
testb $0x1, %sil
je 0x422ae
movq $0x0, -0x68(%rcx)
pxor %xmm3, %xmm4
pextrw $0x4, %xmm4, %esi
testb $0x1, %sil
je 0x422c4
movq $0x0, (%rcx)
addq $0x2, %rdx
addq $0xd0, %rcx
cmpq %rdx, %rax
jne 0x4226a
popq %rbp
retq
|
_Z32reset_events_stages_history_longv:
xor eax, eax
xchg eax, cs:events_stages_history_long_index
mov cs:events_stages_history_long_full, 0
mov rax, cs:events_stages_history_long_size
test rax, rax
jle locret_422D5
push rbp
mov rbp, rsp
mov rcx, cs:events_stages_history_long_array
imul rax, 68h ; 'h'
add rax, rcx
lea rdx, [rcx+68h]
cmp rax, rdx
cmovbe rax, rdx
add rax, 0FFFFFFFFFFFFFF98h
xor esi, esi
cmp rax, rcx
setnz sil
sub rax, rcx
sub rax, rsi
mov rdx, 4EC4EC4EC4EC4EC5h
mul rdx
shr rdx, 5
lea rax, [rdx+rsi]
movq xmm0, rax
pshufd xmm0, xmm0, 44h ; 'D'
add rcx, 98h
lea rax, [rdx+rsi]
add rax, 2
and rax, 0FFFFFFFFFFFFFFFEh
xor edx, edx
movdqa xmm1, cs:xmmword_80C20
movdqa xmm2, cs:xmmword_80C50
pxor xmm0, xmm2
pcmpeqd xmm3, xmm3
loc_4226A:
movq xmm4, rdx
pshufd xmm4, xmm4, 44h ; 'D'
por xmm4, xmm1
pxor xmm4, xmm2
movdqa xmm5, xmm4
pcmpgtd xmm5, xmm0
pcmpeqd xmm4, xmm0
pshufd xmm6, xmm4, 0F5h
pand xmm6, xmm5
pshufd xmm4, xmm5, 0F5h
por xmm4, xmm6
movd esi, xmm4
not esi
test sil, 1
jz short loc_422AE
mov qword ptr [rcx-68h], 0
loc_422AE:
pxor xmm4, xmm3
pextrw esi, xmm4, 4
test sil, 1
jz short loc_422C4
mov qword ptr [rcx], 0
loc_422C4:
add rdx, 2
add rcx, 0D0h
cmp rax, rdx
jnz short loc_4226A
pop rbp
locret_422D5:
retn
|
unsigned long long reset_events_stages_history_long(void)
{
unsigned long long result; // rax
unsigned long long v1; // rax
unsigned long long v2; // rax
__m128i v3; // xmm0
_QWORD *v4; // rcx
unsigned long long v5; // rdx
__m128i si128; // xmm1
__m128i v7; // xmm2
__m128i v8; // xmm0
__m128i v9; // xmm4
__m128i v10; // xmm5
__m128i v11; // xmm4
_InterlockedExchange(&events_stages_history_long_index, 0);
events_stages_history_long_full = 0;
result = events_stages_history_long_size;
if ( events_stages_history_long_size > 0 )
{
v1 = events_stages_history_long_array + 104 * events_stages_history_long_size;
if ( v1 <= events_stages_history_long_array + 104 )
v1 = events_stages_history_long_array + 104;
v2 = (v1 - 104 - events_stages_history_long_array - (v1 - 104 != events_stages_history_long_array)) / 0x68
+ (v1 - 104 != events_stages_history_long_array);
v3 = _mm_shuffle_epi32((__m128i)v2, 68);
v4 = (_QWORD *)(events_stages_history_long_array + 152);
result = (v2 + 2) & 0xFFFFFFFFFFFFFFFELL;
v5 = 0LL;
si128 = _mm_load_si128((const __m128i *)&xmmword_80C20);
v7 = _mm_load_si128((const __m128i *)&xmmword_80C50);
v8 = _mm_xor_si128(v3, v7);
do
{
v9 = _mm_xor_si128(_mm_or_si128(_mm_shuffle_epi32((__m128i)v5, 68), si128), v7);
v10 = _mm_cmpgt_epi32(v9, v8);
v11 = _mm_or_si128(
_mm_shuffle_epi32(v10, 245),
_mm_and_si128(_mm_shuffle_epi32(_mm_cmpeq_epi32(v9, v8), 245), v10));
if ( (~_mm_cvtsi128_si32(v11) & 1) != 0 )
*(v4 - 13) = 0LL;
if ( (_mm_extract_epi16(_mm_xor_si128(v11, (__m128i)-1LL), 4) & 1) != 0 )
*v4 = 0LL;
v5 += 2LL;
v4 += 26;
}
while ( result != v5 );
}
return result;
}
|
reset_events_stages_history_long:
XOR EAX,EAX
XCHG dword ptr [0x004d0700],EAX
MOV byte ptr [0x004d06c0],0x0
MOV RAX,qword ptr [0x004d05c0]
TEST RAX,RAX
JLE 0x001422d5
PUSH RBP
MOV RBP,RSP
MOV RCX,qword ptr [0x004d0740]
IMUL RAX,RAX,0x68
ADD RAX,RCX
LEA RDX,[RCX + 0x68]
CMP RAX,RDX
CMOVBE RAX,RDX
ADD RAX,-0x68
XOR ESI,ESI
CMP RAX,RCX
SETNZ SIL
SUB RAX,RCX
SUB RAX,RSI
MOV RDX,0x4ec4ec4ec4ec4ec5
MUL RDX
SHR RDX,0x5
LEA RAX,[RDX + RSI*0x1]
MOVQ XMM0,RAX
PSHUFD XMM0,XMM0,0x44
ADD RCX,0x98
LEA RAX,[RDX + RSI*0x1]
ADD RAX,0x2
AND RAX,-0x2
XOR EDX,EDX
MOVDQA XMM1,xmmword ptr [0x00180c20]
MOVDQA XMM2,xmmword ptr [0x00180c50]
PXOR XMM0,XMM2
PCMPEQD XMM3,XMM3
LAB_0014226a:
MOVQ XMM4,RDX
PSHUFD XMM4,XMM4,0x44
POR XMM4,XMM1
PXOR XMM4,XMM2
MOVDQA XMM5,XMM4
PCMPGTD XMM5,XMM0
PCMPEQD XMM4,XMM0
PSHUFD XMM6,XMM4,0xf5
PAND XMM6,XMM5
PSHUFD XMM4,XMM5,0xf5
POR XMM4,XMM6
MOVD ESI,XMM4
NOT ESI
TEST SIL,0x1
JZ 0x001422ae
MOV qword ptr [RCX + -0x68],0x0
LAB_001422ae:
PXOR XMM4,XMM3
PEXTRW ESI,XMM4,0x4
TEST SIL,0x1
JZ 0x001422c4
MOV qword ptr [RCX],0x0
LAB_001422c4:
ADD RDX,0x2
ADD RCX,0xd0
CMP RAX,RDX
JNZ 0x0014226a
POP RBP
LAB_001422d5:
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* reset_events_stages_history_long() */
void reset_events_stages_history_long(void)
{
long lVar1;
int1 auVar2 [16];
int1 auVar3 [16];
ulong uVar4;
int8 *puVar5;
ulong uVar6;
ulong uVar7;
int1 auVar8 [16];
int1 auVar9 [16];
auVar3 = _DAT_00180c50;
auVar2 = _DAT_00180c20;
LOCK();
events_stages_history_long_index = 0;
UNLOCK();
events_stages_history_long_full = 0;
if (0 < events_stages_history_long_size) {
uVar4 = events_stages_history_long_size * 0x68 + events_stages_history_long_array;
if (uVar4 <= events_stages_history_long_array + 0x68U) {
uVar4 = events_stages_history_long_array + 0x68U;
}
uVar7 = (ulong)(uVar4 - 0x68 != events_stages_history_long_array);
uVar4 = (((uVar4 - 0x68) - events_stages_history_long_array) - uVar7) / 0x68;
lVar1 = uVar4 + uVar7;
auVar8._8_4_ = (int)lVar1;
auVar8._0_8_ = lVar1;
auVar8._12_4_ = (int)((ulong)lVar1 >> 0x20);
puVar5 = (int8 *)(events_stages_history_long_array + 0x98);
uVar6 = 0;
auVar8 = auVar8 ^ _DAT_00180c50;
do {
auVar9._8_4_ = (int)uVar6;
auVar9._0_8_ = uVar6;
auVar9._12_4_ = (int)(uVar6 >> 0x20);
auVar9 = (auVar9 | auVar2) ^ auVar3;
if ((bool)(~(auVar9._4_4_ == auVar8._4_4_ && auVar8._0_4_ < auVar9._0_4_ ||
auVar8._4_4_ < auVar9._4_4_) & 1)) {
puVar5[-0xd] = 0;
}
if ((auVar9._12_4_ != auVar8._12_4_ || auVar9._8_4_ <= auVar8._8_4_) &&
auVar9._12_4_ <= auVar8._12_4_) {
*puVar5 = 0;
}
uVar6 = uVar6 + 2;
puVar5 = puVar5 + 0x1a;
} while ((uVar4 + uVar7 + 2 & 0xfffffffffffffffe) != uVar6);
}
return;
}
|
|
61,008
|
inline_mysql_file_seek
|
eloqsql/include/mysql/psi/mysql_file.h
|
static inline my_off_t
inline_mysql_file_seek(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File file, my_off_t pos, int whence, myf flags)
{
my_off_t result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_SEEK);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
result= my_seek(file, pos, whence, flags);
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
return result;
}
#endif
result= my_seek(file, pos, whence, flags);
return result;
}
|
O0
|
c
|
inline_mysql_file_seek:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq %r9, -0x30(%rbp)
leaq 0x20b270(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x158(%rax), %rax
movl -0x18(%rbp), %esi
leaq -0x88(%rbp), %rdi
movl $0x8, %edx
callq *%rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xb4ee3
leaq 0x20b22a(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x210(%rax), %rax
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
xorl %esi, %esi
callq *%rax
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movl -0x24(%rbp), %edx
movq -0x30(%rbp), %rcx
callq 0xf4ca0
movq %rax, -0x38(%rbp)
leaq 0x20b1f3(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x218(%rax), %rax
movq -0x40(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
callq *%rax
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xb4f02
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movl -0x24(%rbp), %edx
movq -0x30(%rbp), %rcx
callq 0xf4ca0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nop
|
inline_mysql_file_seek_4:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_20], rcx
mov [rbp+var_24], r8d
mov [rbp+var_30], r9
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+158h]
mov esi, [rbp+var_18]
lea rdi, [rbp+var_88]
mov edx, 8
call rax
mov [rbp+var_40], rax
cmp [rbp+var_40], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_B4EE3
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+210h]
mov rdi, [rbp+var_40]
mov rdx, [rbp+var_10]
mov ecx, [rbp+var_14]
xor esi, esi
call rax
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov edx, [rbp+var_24]
mov rcx, [rbp+var_30]
call my_seek
mov [rbp+var_38], rax
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+218h]
mov rdi, [rbp+var_40]
xor ecx, ecx
mov esi, ecx
call rax
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
jmp short loc_B4F02
loc_B4EE3:
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov edx, [rbp+var_24]
mov rcx, [rbp+var_30]
call my_seek
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
loc_B4F02:
mov rax, [rbp+var_8]
add rsp, 90h
pop rbp
retn
|
long long inline_mysql_file_seek_4(
long long a1,
unsigned int a2,
unsigned int a3,
long long a4,
unsigned int a5,
long long a6)
{
_BYTE v7[72]; // [rsp+8h] [rbp-88h] BYREF
long long v8; // [rsp+50h] [rbp-40h]
long long v9; // [rsp+58h] [rbp-38h]
long long v10; // [rsp+60h] [rbp-30h]
unsigned int v11; // [rsp+6Ch] [rbp-24h]
long long v12; // [rsp+70h] [rbp-20h]
unsigned int v13; // [rsp+78h] [rbp-18h]
unsigned int v14; // [rsp+7Ch] [rbp-14h]
long long v15; // [rsp+80h] [rbp-10h]
v15 = a1;
v14 = a2;
v13 = a3;
v12 = a4;
v11 = a5;
v10 = a6;
v8 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v7, a3, 8LL);
if ( !v8 )
return my_seek(v13, v12, v11, v10);
((void ( *)(long long, _QWORD, long long, _QWORD))PSI_server[66])(v8, 0LL, v15, v14);
v9 = my_seek(v13, v12, v11, v10);
((void ( *)(long long, _QWORD))PSI_server[67])(v8, 0LL);
return v9;
}
|
inline_mysql_file_seek:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV dword ptr [RBP + -0x24],R8D
MOV qword ptr [RBP + -0x30],R9
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x158]
MOV ESI,dword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x88]
MOV EDX,0x8
CALL RAX
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x40],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001b4ee3
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x210]
MOV RDI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x14]
XOR ESI,ESI
CALL RAX
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV EDX,dword ptr [RBP + -0x24]
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x001f4ca0
MOV qword ptr [RBP + -0x38],RAX
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV RDI,qword ptr [RBP + -0x40]
XOR ECX,ECX
MOV ESI,ECX
CALL RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001b4f02
LAB_001b4ee3:
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV EDX,dword ptr [RBP + -0x24]
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x001f4ca0
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
LAB_001b4f02:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x90
POP RBP
RET
|
int8
inline_mysql_file_seek
(int8 param_1,int4 param_2,int4 param_3,int8 param_4,
int4 param_5,int8 param_6)
{
int1 local_90 [72];
long local_48;
int8 local_40;
int8 local_38;
int4 local_2c;
int8 local_28;
int4 local_20;
int4 local_1c;
int8 local_18;
int8 local_10;
local_38 = param_6;
local_2c = param_5;
local_28 = param_4;
local_20 = param_3;
local_1c = param_2;
local_18 = param_1;
local_48 = (**(code **)(PSI_server + 0x158))(local_90,param_3,8);
if (local_48 == 0) {
local_10 = my_seek(local_20,local_28,local_2c,local_38);
}
else {
(**(code **)(PSI_server + 0x210))(local_48,0,local_18,local_1c);
local_40 = my_seek(local_20,local_28,local_2c,local_38);
(**(code **)(PSI_server + 0x218))(local_48,0);
local_10 = local_40;
}
return local_10;
}
|
|
61,009
|
my_b_safe_write
|
eloqsql/mysys/mf_iocache.c
|
int my_b_safe_write(IO_CACHE *info, const uchar *Buffer, size_t Count)
{
/*
Sasha: We are not writing this with the ? operator to avoid hitting
a possible compiler bug. At least gcc 2.95 cannot deal with
several layers of ternary operators that evaluated comma(,) operator
expressions inside - I do have a test case if somebody wants it
*/
if (info->type == SEQ_READ_APPEND)
return my_b_append(info, Buffer, Count);
return my_b_write(info, Buffer, Count);
}
|
O3
|
c
|
my_b_safe_write:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
cmpl $0x3, 0xb0(%rdi)
jne 0x2bc6e
movq %r14, %rdi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %rbp
jmp 0x2ba16
movq 0x40(%r14), %rdi
leaq (%rdi,%rbx), %rax
cmpq 0x48(%r14), %rax
jbe 0x2bc8b
movq %r14, %rdi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %rbp
jmp 0x2b20f
testq %rbx, %rbx
je 0x2bc9c
movq %rbx, %rdx
callq 0x24290
addq %rbx, 0x40(%r14)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
|
my_b_safe_write:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdx
mov r14, rdi
cmp dword ptr [rdi+0B0h], 3
jnz short loc_2BC6E
mov rdi, r14
mov rdx, rbx
pop rbx
pop r14
pop rbp
jmp my_b_append
loc_2BC6E:
mov rdi, [r14+40h]
lea rax, [rdi+rbx]
cmp rax, [r14+48h]
jbe short loc_2BC8B
mov rdi, r14
mov rdx, rbx
pop rbx
pop r14
pop rbp
jmp _my_b_write
loc_2BC8B:
test rbx, rbx
jz short loc_2BC9C
mov rdx, rbx
call _memcpy
add [r14+40h], rbx
loc_2BC9C:
xor eax, eax
pop rbx
pop r14
pop rbp
retn
|
long long my_b_safe_write(long long a1, long long a2, unsigned long long a3)
{
long long v6; // rdi
if ( *(_DWORD *)(a1 + 176) == 3 )
return my_b_append(a1, a2, a3);
v6 = *(_QWORD *)(a1 + 64);
if ( v6 + a3 > *(_QWORD *)(a1 + 72) )
return my_b_write(a1, a2, a3);
if ( a3 )
{
memcpy(v6, a2);
*(_QWORD *)(a1 + 64) += a3;
}
return 0LL;
}
|
my_b_safe_write:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDX
MOV R14,RDI
CMP dword ptr [RDI + 0xb0],0x3
JNZ 0x0012bc6e
MOV RDI,R14
MOV RDX,RBX
POP RBX
POP R14
POP RBP
JMP 0x0012ba16
LAB_0012bc6e:
MOV RDI,qword ptr [R14 + 0x40]
LEA RAX,[RDI + RBX*0x1]
CMP RAX,qword ptr [R14 + 0x48]
JBE 0x0012bc8b
MOV RDI,R14
MOV RDX,RBX
POP RBX
POP R14
POP RBP
JMP 0x0012b20f
LAB_0012bc8b:
TEST RBX,RBX
JZ 0x0012bc9c
MOV RDX,RBX
CALL 0x00124290
ADD qword ptr [R14 + 0x40],RBX
LAB_0012bc9c:
XOR EAX,EAX
POP RBX
POP R14
POP RBP
RET
|
int8 my_b_safe_write(long param_1,void *param_2,size_t param_3)
{
int8 uVar1;
if (*(int *)(param_1 + 0xb0) == 3) {
uVar1 = my_b_append(param_1,param_2,param_3);
return uVar1;
}
if (*(ulong *)(param_1 + 0x48) < (long)*(void **)(param_1 + 0x40) + param_3) {
uVar1 = _my_b_write(param_1,param_2,param_3);
return uVar1;
}
if (param_3 != 0) {
memcpy(*(void **)(param_1 + 0x40),param_2,param_3);
*(long *)(param_1 + 0x40) = *(long *)(param_1 + 0x40) + param_3;
}
return 0;
}
|
|
61,010
|
my_rw_tryrdlock
|
eloqsql/mysys/thr_rwlock.c
|
int my_rw_tryrdlock(my_rw_lock_t *rwp)
{
int res;
pthread_mutex_lock(&rwp->lock);
if ((rwp->state < 0 ) || rwp->waiters)
res= EBUSY; /* Can't get lock */
else
{
res=0;
rwp->state++;
}
pthread_mutex_unlock(&rwp->lock);
return(res);
}
|
O3
|
c
|
my_rw_tryrdlock:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x24440
movl 0x88(%rbx), %eax
movl $0x10, %r14d
testl %eax, %eax
js 0x273ed
cmpl $0x0, 0x8c(%rbx)
jne 0x273ed
incl %eax
movl %eax, 0x88(%rbx)
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x24200
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
|
my_rw_tryrdlock:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
call _pthread_mutex_lock
mov eax, [rbx+88h]
mov r14d, 10h
test eax, eax
js short loc_273ED
cmp dword ptr [rbx+8Ch], 0
jnz short loc_273ED
inc eax
mov [rbx+88h], eax
xor r14d, r14d
loc_273ED:
mov rdi, rbx
call _pthread_mutex_unlock
mov eax, r14d
pop rbx
pop r14
pop rbp
retn
|
long long my_rw_tryrdlock(long long a1)
{
int v1; // eax
unsigned int v2; // r14d
pthread_mutex_lock(a1);
v1 = *(_DWORD *)(a1 + 136);
v2 = 16;
if ( v1 >= 0 && !*(_DWORD *)(a1 + 140) )
{
*(_DWORD *)(a1 + 136) = v1 + 1;
v2 = 0;
}
pthread_mutex_unlock(a1);
return v2;
}
|
my_rw_tryrdlock:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
CALL 0x00124440
MOV EAX,dword ptr [RBX + 0x88]
MOV R14D,0x10
TEST EAX,EAX
JS 0x001273ed
CMP dword ptr [RBX + 0x8c],0x0
JNZ 0x001273ed
INC EAX
MOV dword ptr [RBX + 0x88],EAX
XOR R14D,R14D
LAB_001273ed:
MOV RDI,RBX
CALL 0x00124200
MOV EAX,R14D
POP RBX
POP R14
POP RBP
RET
|
int8 my_rw_tryrdlock(pthread_mutex_t *param_1)
{
int8 uVar1;
pthread_mutex_lock(param_1);
uVar1 = 0x10;
if ((-1 < *(int *)((long)param_1 + 0x88)) && (*(int *)((long)param_1 + 0x8c) == 0)) {
*(int *)((long)param_1 + 0x88) = *(int *)((long)param_1 + 0x88) + 1;
uVar1 = 0;
}
pthread_mutex_unlock(param_1);
return uVar1;
}
|
|
61,011
|
fct_update_file_derived_flags(PFS_file*)
|
eloqsql/storage/perfschema/pfs_instr.cc
|
static void fct_update_file_derived_flags(PFS_file *pfs)
{
PFS_file_class *klass= sanitize_file_class(pfs->m_class);
if (likely(klass != NULL))
{
pfs->m_enabled= klass->m_enabled && flag_global_instrumentation;
pfs->m_timed= klass->m_timed;
}
else
{
pfs->m_enabled= false;
pfs->m_timed= false;
}
}
|
O0
|
cpp
|
fct_update_file_derived_flags(PFS_file*):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x220(%rax), %rdi
callq 0x4eab0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x465ed
movq -0x10(%rbp), %rcx
xorl %eax, %eax
testb $0x1, 0x4(%rcx)
movb %al, -0x11(%rbp)
je 0x465cd
leaq 0x3c5438(%rip), %rax # 0x40ba00
movb (%rax), %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %cl
movq -0x8(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x4(%rax)
movq -0x10(%rbp), %rax
movb 0x5(%rax), %cl
movq -0x8(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x5(%rax)
jmp 0x465fd
movq -0x8(%rbp), %rax
movb $0x0, 0x4(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x5(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZL29fct_update_file_derived_flagsP8PFS_file:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rdi, [rax+220h]
call _Z19sanitize_file_classP14PFS_file_class; sanitize_file_class(PFS_file_class *)
mov [rbp+var_10], rax
cmp [rbp+var_10], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_465ED
mov rcx, [rbp+var_10]
xor eax, eax
test byte ptr [rcx+4], 1
mov [rbp+var_11], al
jz short loc_465CD
lea rax, flag_global_instrumentation
mov al, [rax]
mov [rbp+var_11], al
loc_465CD:
mov cl, [rbp+var_11]
mov rax, [rbp+var_8]
and cl, 1
mov [rax+4], cl
mov rax, [rbp+var_10]
mov cl, [rax+5]
mov rax, [rbp+var_8]
and cl, 1
mov [rax+5], cl
jmp short loc_465FD
loc_465ED:
mov rax, [rbp+var_8]
mov byte ptr [rax+4], 0
mov rax, [rbp+var_8]
mov byte ptr [rax+5], 0
loc_465FD:
add rsp, 20h
pop rbp
retn
|
PFS_file_class ** fct_update_file_derived_flags(PFS_file_class **a1)
{
PFS_file_class **result; // rax
char v2; // [rsp+Fh] [rbp-11h]
long long v3; // [rsp+10h] [rbp-10h]
v3 = sanitize_file_class(a1[68]);
if ( v3 )
{
v2 = 0;
if ( (*(_BYTE *)(v3 + 4) & 1) != 0 )
v2 = flag_global_instrumentation;
*((_BYTE *)a1 + 4) = v2 & 1;
result = a1;
*((_BYTE *)a1 + 5) = *(_BYTE *)(v3 + 5) & 1;
}
else
{
*((_BYTE *)a1 + 4) = 0;
result = a1;
*((_BYTE *)a1 + 5) = 0;
}
return result;
}
|
fct_update_file_derived_flags:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x220]
CALL 0x0014eab0
MOV qword ptr [RBP + -0x10],RAX
CMP qword ptr [RBP + -0x10],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x001465ed
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
TEST byte ptr [RCX + 0x4],0x1
MOV byte ptr [RBP + -0x11],AL
JZ 0x001465cd
LEA RAX,[0x50ba00]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x11],AL
LAB_001465cd:
MOV CL,byte ptr [RBP + -0x11]
MOV RAX,qword ptr [RBP + -0x8]
AND CL,0x1
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x10]
MOV CL,byte ptr [RAX + 0x5]
MOV RAX,qword ptr [RBP + -0x8]
AND CL,0x1
MOV byte ptr [RAX + 0x5],CL
JMP 0x001465fd
LAB_001465ed:
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x4],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x5],0x0
LAB_001465fd:
ADD RSP,0x20
POP RBP
RET
|
/* fct_update_file_derived_flags(PFS_file*) */
void fct_update_file_derived_flags(PFS_file *param_1)
{
long lVar1;
byte local_19;
lVar1 = sanitize_file_class(*(PFS_file_class **)(param_1 + 0x220));
if (lVar1 == 0) {
param_1[4] = (PFS_file)0x0;
param_1[5] = (PFS_file)0x0;
}
else {
local_19 = 0;
if ((*(byte *)(lVar1 + 4) & 1) != 0) {
local_19 = flag_global_instrumentation;
}
param_1[4] = (PFS_file)(local_19 & 1);
param_1[5] = (PFS_file)(*(byte *)(lVar1 + 5) & 1);
}
return;
}
|
|
61,012
|
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_object()
|
llama.cpp/common/json.hpp
|
bool end_object()
{
JSON_ASSERT(!ref_stack.empty());
JSON_ASSERT(ref_stack.back()->is_object());
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_object():
pushq %rax
movq 0x10(%rdi), %rax
cmpq %rax, 0x8(%rdi)
je 0x8ff2e
movq -0x8(%rax), %rcx
cmpb $0x1, (%rcx)
jne 0x8ff4a
addq $-0x8, %rax
movq %rax, 0x10(%rdi)
movb $0x1, %al
popq %rcx
retq
leaq 0x8ce4b(%rip), %rdi # 0x11cd80
leaq 0x8526f(%rip), %rdx # 0x1151ab
leaq 0x8de19(%rip), %rcx # 0x11dd5c
movl $0x1aeb, %esi # imm = 0x1AEB
jmp 0x8ff64
leaq 0x8ce2f(%rip), %rdi # 0x11cd80
leaq 0x85253(%rip), %rdx # 0x1151ab
leaq 0x8ddab(%rip), %rcx # 0x11dd0a
movl $0x1aec, %esi # imm = 0x1AEC
xorl %eax, %eax
callq 0x20ed0
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10end_objectEv:
push rax
mov rax, [rdi+10h]
cmp [rdi+8], rax
jz short loc_8FF2E
mov rcx, [rax-8]
cmp byte ptr [rcx], 1
jnz short loc_8FF4A
add rax, 0FFFFFFFFFFFFFFF8h
mov [rdi+10h], rax
mov al, 1
pop rcx
retn
loc_8FF2E:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aRefStackEmpty; "!ref_stack.empty()"
mov esi, 1AEBh
jmp short loc_8FF64
loc_8FF4A:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aRefStackBackIs+20h; "ref_stack.back()->is_object()"
mov esi, 1AECh
loc_8FF64:
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_object(
long long a1)
{
long long v1; // rax
long long v3; // rsi
v1 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(a1 + 8) == v1 )
{
v3 = 6891LL;
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
6891LL,
"GGML_ASSERT(%s) failed",
"!ref_stack.empty()");
}
else
{
if ( **(_BYTE **)(v1 - 8) == 1 )
{
*(_QWORD *)(a1 + 16) = v1 - 8;
return 1;
}
v3 = 6892LL;
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
6892LL,
"GGML_ASSERT(%s) failed",
"ref_stack.back()->is_object()");
}
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>>::key(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
v3);
}
|
end_object:
PUSH RAX
MOV RAX,qword ptr [RDI + 0x10]
CMP qword ptr [RDI + 0x8],RAX
JZ 0x0018ff2e
MOV RCX,qword ptr [RAX + -0x8]
CMP byte ptr [RCX],0x1
JNZ 0x0018ff4a
ADD RAX,-0x8
MOV qword ptr [RDI + 0x10],RAX
MOV AL,0x1
POP RCX
RET
LAB_0018ff2e:
LEA RDI,[0x21cd80]
LEA RDX,[0x2151ab]
LEA RCX,[0x21dd5c]
MOV ESI,0x1aeb
JMP 0x0018ff64
LAB_0018ff4a:
LEA RDI,[0x21cd80]
LEA RDX,[0x2151ab]
LEA RCX,[0x21dd0a]
MOV ESI,0x1aec
LAB_0018ff64:
XOR EAX,EAX
CALL 0x00120ed0
|
/* 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_object() */
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_object(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 = 0x1aeb;
}
else {
if (**(char **)(lVar1 + -8) == '\x01') {
*(long *)(this + 0x10) = lVar1 + -8;
return CONCAT71((int7)((ulong)(lVar1 + -8) >> 8),1);
}
pcVar2 = "ref_stack.back()->is_object()";
uVar3 = 0x1aec;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",uVar3,
"GGML_ASSERT(%s) failed",pcVar2);
}
|
|
61,013
|
my_wc_mb_cp932
|
eloqsql/strings/ctype-cp932.c
|
static int
my_wc_mb_cp932(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
if ((int) wc < 0x80) /* ASCII: [U+0000..U+007F] -> [00-7F] */
{
/*
This branch is for performance purposes on ASCII range,
to avoid using unicode_to_cp932[]: about 10% improvement.
*/
if (s >= e)
return MY_CS_TOOSMALL;
s[0]= (uchar) wc;
return 1;
}
if (wc > 0xFFFF ||
!(code= unicode_to_cp932[wc])) /* Bad Unicode code point */
return MY_CS_ILUNI;
if (code <= 0xFF)
{
/* JIS-X-0201 HALF WIDTH KATAKANA [U+FF61..U+FF9F] -> [A1..DF] */
if (s >= e)
return MY_CS_TOOSMALL;
s[0]= code;
return 1;
}
if (s + 2 > e)
return MY_CS_TOOSMALL2;
MY_PUT_MB2(s, code); /* JIS-X-0208(MS) */
return 2;
}
|
O0
|
c
|
my_wc_mb_cp932:
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 0x466bd
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x466a5
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x46754
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x46754
cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF
ja 0x466de
movq -0x18(%rbp), %rcx
leaq 0xe3e0e(%rip), %rax # 0x12a4e0
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0x466e7
movl $0x0, -0x4(%rbp)
jmp 0x46754
cmpl $0xff, -0x2c(%rbp)
jg 0x46717
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x46703
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x46754
movl -0x2c(%rbp), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x46754
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x4672e
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x46754
movl -0x2c(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl -0x2c(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
|
my_wc_mb_cp932:
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_466BD
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_466A5
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_46754
loc_466A5:
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp loc_46754
loc_466BD:
cmp [rbp+var_18], 0FFFFh
ja short loc_466DE
mov rcx, [rbp+var_18]
lea rax, unicode_to_cp932
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_2C], eax
cmp eax, 0
jnz short loc_466E7
loc_466DE:
mov [rbp+var_4], 0
jmp short loc_46754
loc_466E7:
cmp [rbp+var_2C], 0FFh
jg short loc_46717
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_46703
mov [rbp+var_4], 0FFFFFF9Bh
jmp short loc_46754
loc_46703:
mov eax, [rbp+var_2C]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp short loc_46754
loc_46717:
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_4672E
mov [rbp+var_4], 0FFFFFF9Ah
jmp short loc_46754
loc_4672E:
mov eax, [rbp+var_2C]
sar eax, 8
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov eax, [rbp+var_2C]
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov [rbp+var_4], 2
loc_46754:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long my_wc_mb_cp932(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
unsigned __int16 v5; // [rsp+0h] [rbp-2Ch]
if ( (int)a2 >= 128 )
{
if ( a2 <= 0xFFFF && (v5 = unicode_to_cp932[a2]) != 0 )
{
if ( unicode_to_cp932[a2] > 0xFFu )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
*a3 = HIBYTE(v5);
a3[1] = v5;
return 2;
}
else
{
return (unsigned int)-102;
}
}
else if ( (unsigned long long)a3 < a4 )
{
*a3 = v5;
return 1;
}
else
{
return (unsigned int)-101;
}
}
else
{
return 0;
}
}
else if ( (unsigned long long)a3 < a4 )
{
*a3 = a2;
return 1;
}
else
{
return (unsigned int)-101;
}
}
|
my_wc_mb_cp932:
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 0x001466bd
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x001466a5
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x00146754
LAB_001466a5:
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 0x00146754
LAB_001466bd:
CMP qword ptr [RBP + -0x18],0xffff
JA 0x001466de
MOV RCX,qword ptr [RBP + -0x18]
LEA RAX,[0x22a4e0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x001466e7
LAB_001466de:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00146754
LAB_001466e7:
CMP dword ptr [RBP + -0x2c],0xff
JG 0x00146717
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x00146703
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x00146754
LAB_00146703:
MOV EAX,dword ptr [RBP + -0x2c]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00146754
LAB_00146717:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0014672e
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x00146754
LAB_0014672e:
MOV EAX,dword ptr [RBP + -0x2c]
SAR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x2c]
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV dword ptr [RBP + -0x4],0x2
LAB_00146754:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_wc_mb_cp932(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4)
{
ushort uVar1;
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) && (uVar1 = *(ushort *)(unicode_to_cp932 + param_2 * 2), uVar1 != 0))
{
if (uVar1 < 0x100) {
if (param_3 < param_4) {
*param_3 = (char)uVar1;
local_c = 1;
}
else {
local_c = 0xffffff9b;
}
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
*param_3 = (char)(uVar1 >> 8);
param_3[1] = (char)uVar1;
local_c = 2;
}
}
else {
local_c = 0;
}
return local_c;
}
|
|
61,014
|
pvio_socket_fast_send
|
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
|
int pvio_socket_fast_send(MARIADB_PVIO *pvio)
{
int r= 0;
struct st_pvio_socket *csock= NULL;
if (!pvio || !pvio->data)
return 1;
csock= (struct st_pvio_socket *)pvio->data;
/* Setting IP_TOS is not recommended on Windows. See
http://msdn.microsoft.com/en-us/library/windows/desktop/ms738586(v=vs.85).aspx
*/
#if !defined(_WIN32) && defined(IPTOS_THROUGHPUT)
{
int tos = IPTOS_THROUGHPUT;
r= setsockopt(csock->socket, IPPROTO_IP, IP_TOS,
(const void *)&tos, sizeof(tos));
}
#endif /* !_WIN32 && IPTOS_THROUGHPUT */
if (!r)
{
int opt = 1;
/* turn off nagle algorithm */
r= setsockopt(csock->socket, IPPROTO_TCP, TCP_NODELAY,
#ifdef _WIN32
(const char *)&opt, (int)sizeof(opt));
#else
(const void *)&opt, sizeof(opt));
#endif
}
return r;
}
|
O3
|
c
|
pvio_socket_fast_send:
movl $0x1, %eax
testq %rdi, %rdi
je 0x2f5be
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rbx
testq %rbx, %rbx
je 0x2f5b8
leaq -0x10(%rbp), %rcx
movl $0x8, (%rcx)
movl (%rbx), %edi
xorl %esi, %esi
movl $0x1, %edx
movl $0x4, %r8d
callq 0x137b0
testl %eax, %eax
jne 0x2f5b8
leaq -0xc(%rbp), %rcx
movl $0x1, (%rcx)
movl (%rbx), %edi
movl $0x6, %esi
movl $0x1, %edx
movl $0x4, %r8d
callq 0x137b0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
pvio_socket_fast_send:
mov eax, 1
test rdi, rdi
jz short locret_2F5BE
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, [rdi]
test rbx, rbx
jz short loc_2F5B8
lea rcx, [rbp-10h]
mov dword ptr [rcx], 8
mov edi, [rbx]
xor esi, esi
mov edx, 1
mov r8d, 4
call _setsockopt
test eax, eax
jnz short loc_2F5B8
lea rcx, [rbp-0Ch]
mov dword ptr [rcx], 1
mov edi, [rbx]
mov esi, 6
mov edx, 1
mov r8d, 4
call _setsockopt
loc_2F5B8:
add rsp, 8
pop rbx
pop rbp
locret_2F5BE:
retn
|
long long pvio_socket_fast_send(unsigned int **a1)
{
long long result; // rax
unsigned int *v2; // rbx
_QWORD v3[3]; // [rsp-18h] [rbp-18h] BYREF
result = 1LL;
if ( a1 )
{
v3[0] = 1LL;
v2 = *a1;
if ( *a1 )
{
LODWORD(v3[0]) = 8;
result = setsockopt(*v2, 0LL, 1LL, v3, 4LL);
if ( !(_DWORD)result )
{
HIDWORD(v3[0]) = 1;
return setsockopt(*v2, 6LL, 1LL, (char *)v3 + 4, 4LL);
}
}
}
return result;
}
|
pvio_socket_fast_send:
MOV EAX,0x1
TEST RDI,RDI
JZ 0x0012f5be
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,qword ptr [RDI]
TEST RBX,RBX
JZ 0x0012f5b8
LEA RCX,[RBP + -0x10]
MOV dword ptr [RCX],0x8
MOV EDI,dword ptr [RBX]
XOR ESI,ESI
MOV EDX,0x1
MOV R8D,0x4
CALL 0x001137b0
TEST EAX,EAX
JNZ 0x0012f5b8
LEA RCX,[RBP + -0xc]
MOV dword ptr [RCX],0x1
MOV EDI,dword ptr [RBX]
MOV ESI,0x6
MOV EDX,0x1
MOV R8D,0x4
CALL 0x001137b0
LAB_0012f5b8:
ADD RSP,0x8
POP RBX
POP RBP
LAB_0012f5be:
RET
|
void pvio_socket_fast_send(int8 *param_1)
{
int *piVar1;
int iVar2;
int8 local_18;
if ((param_1 != (int8 *)0x0) && (piVar1 = (int *)*param_1, piVar1 != (int *)0x0)) {
local_18 = 8;
iVar2 = setsockopt(*piVar1,0,1,&local_18,4);
if (iVar2 == 0) {
local_18 = CONCAT44(1,(int4)local_18);
setsockopt(*piVar1,6,1,(void *)((long)&local_18 + 4),4);
}
}
return;
}
|
|
61,015
|
my_context_yield
|
eloqsql/libmariadb/libmariadb/ma_context.c
|
int
my_context_yield(struct my_context *c)
{
uint64_t *save= &c->save[0];
__asm__ __volatile__
(
"movl (%[save]), %%eax\n\t"
"movl %%esp, (%[save])\n\t"
"movl %%eax, %%esp\n\t"
"movl 4(%[save]), %%eax\n\t"
"movl %%ebp, 4(%[save])\n\t"
"movl %%eax, %%ebp\n\t"
"movl 8(%[save]), %%eax\n\t"
"movl %%ebx, 8(%[save])\n\t"
"movl %%eax, %%ebx\n\t"
"movl 12(%[save]), %%eax\n\t"
"movl %%esi, 12(%[save])\n\t"
"movl %%eax, %%esi\n\t"
"movl 16(%[save]), %%eax\n\t"
"movl %%edi, 16(%[save])\n\t"
"movl %%eax, %%edi\n\t"
"movl 24(%[save]), %%eax\n\t"
"call 1f\n"
"1:\n\t"
"popl %%ecx\n\t"
"addl $(2f-1b), %%ecx\n\t"
"movl %%ecx, 24(%[save])\n\t"
"jmp *%%eax\n"
"2:\n"
: [save] "+d" (save)
:
: "eax", "ecx", "memory", "cc"
);
return 0;
}
|
O3
|
c
|
my_context_yield:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
movq %rsp, (%rdi)
movq %rax, %rsp
movq 0x8(%rdi), %rax
movq %rbp, 0x8(%rdi)
movq %rax, %rbp
movq 0x10(%rdi), %rax
movq %rbx, 0x10(%rdi)
movq %rax, %rbx
movq 0x18(%rdi), %rax
movq %r12, 0x18(%rdi)
movq %rax, %r12
movq 0x20(%rdi), %rax
movq %r13, 0x20(%rdi)
movq %rax, %r13
movq 0x28(%rdi), %rax
movq %r14, 0x28(%rdi)
movq %rax, %r14
movq 0x30(%rdi), %rax
movq %r15, 0x30(%rdi)
movq %rax, %r15
movq 0x40(%rdi), %rax
leaq 0x6(%rip), %rcx # 0x2db9d
movq %rcx, 0x40(%rdi)
jmpq *%rax
xorl %eax, %eax
popq %rbp
retq
|
my_context_yield:
push rbp
mov rbp, rsp
mov rax, [rdi]
mov [rdi], rsp
mov rsp, rax
mov rax, [rdi+8]
mov [rdi+8], rbp
mov rbp, rax
mov rax, [rdi+10h]
mov [rdi+10h], rbx
mov rbx, rax
mov rax, [rdi+18h]
mov [rdi+18h], r12
mov r12, rax
mov rax, [rdi+20h]
mov [rdi+20h], r13
mov r13, rax
mov rax, [rdi+28h]
mov [rdi+28h], r14
mov r14, rax
mov rax, [rdi+30h]
mov [rdi+30h], r15
mov r15, rax
mov rax, [rdi+40h]
lea rcx, sub_2DB9D
mov [rdi+40h], rcx
jmp rax
|
long long my_context_yield(_QWORD *a1)
{
long long v1; // rbx
long long v2; // r12
long long v3; // r13
long long v4; // r14
long long v5; // r15
long long (*v6)(void); // rax
long long savedregs; // [rsp+0h] [rbp+0h] BYREF
*a1 = &savedregs;
a1[1] = &savedregs;
a1[2] = v1;
a1[3] = v2;
a1[4] = v3;
a1[5] = v4;
a1[6] = v5;
v6 = (long long (*)(void))a1[8];
a1[8] = sub_2DB9D;
return v6();
}
|
my_context_yield:
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RDI]
MOV qword ptr [RDI],RSP
MOV RSP,RAX
MOV RAX,qword ptr [RDI + 0x8]
MOV qword ptr [RDI + 0x8],RBP
MOV RBP,RAX
MOV RAX,qword ptr [RDI + 0x10]
MOV qword ptr [RDI + 0x10],RBX
MOV RBX,RAX
MOV RAX,qword ptr [RDI + 0x18]
MOV qword ptr [RDI + 0x18],R12
MOV R12,RAX
MOV RAX,qword ptr [RDI + 0x20]
MOV qword ptr [RDI + 0x20],R13
MOV R13,RAX
MOV RAX,qword ptr [RDI + 0x28]
MOV qword ptr [RDI + 0x28],R14
MOV R14,RAX
MOV RAX,qword ptr [RDI + 0x30]
MOV qword ptr [RDI + 0x30],R15
MOV R15,RAX
MOV RAX,qword ptr [RDI + 0x40]
LEA RCX,[0x12db9d]
MOV qword ptr [RDI + 0x40],RCX
JMP RAX
|
void my_context_yield(long param_1)
{
code *UNRECOVERED_JUMPTABLE;
int8 unaff_RBX;
int8 unaff_R12;
int8 unaff_R13;
int8 unaff_R14;
int8 unaff_R15;
*(int1 **)param_1 = &stack0xfffffffffffffff8;
*(int1 **)(param_1 + 8) = &stack0xfffffffffffffff8;
*(int8 *)(param_1 + 0x10) = unaff_RBX;
*(int8 *)(param_1 + 0x18) = unaff_R12;
*(int8 *)(param_1 + 0x20) = unaff_R13;
*(int8 *)(param_1 + 0x28) = unaff_R14;
*(int8 *)(param_1 + 0x30) = unaff_R15;
UNRECOVERED_JUMPTABLE = *(code **)(param_1 + 0x40);
*(int1 **)(param_1 + 0x40) = &LAB_0012db9d;
/* WARNING: Could not recover jumptable at 0x0012db9b. Too many branches */
/* WARNING: Treating indirect jump as call */
(*UNRECOVERED_JUMPTABLE)();
return;
}
|
|
61,016
|
prune_sel_arg_graph(SEL_ARG*, unsigned int)
|
eloqsql/sql/opt_range.cc
|
void prune_sel_arg_graph(SEL_ARG *sel_arg, uint max_part)
{
SEL_ARG *cur;
DBUG_ASSERT(max_part >= sel_arg->part);
for (cur= sel_arg->first(); cur ; cur=cur->next)
{
if (cur->next_key_part)
{
if (cur->next_key_part->part > max_part)
{
// Remove cur->next_key_part.
sel_arg->weight -= cur->next_key_part->weight;
cur->next_key_part= NULL;
}
else
{
uint old_weight= cur->next_key_part->weight;
prune_sel_arg_graph(cur->next_key_part, max_part);
sel_arg->weight -= (old_weight - cur->next_key_part->weight);
}
}
}
}
|
O0
|
cpp
|
prune_sel_arg_graph(SEL_ARG*, unsigned int):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
jmp 0xa4e121
movq -0x8(%rbp), %rdi
callq 0xa3ce20
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xa4e1c7
movq -0x18(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0xa4e1b4
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movzbl 0x3(%rax), %eax
cmpl -0xc(%rbp), %eax
jbe 0xa4e17a
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movl 0x68(%rax), %edx
movq -0x8(%rbp), %rax
movl 0x68(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x68(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x58(%rax)
jmp 0xa4e1b2
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movl 0x68(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rdi
movl -0xc(%rbp), %esi
callq 0xa4e110
movl -0x1c(%rbp), %edx
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
subl 0x68(%rax), %edx
movq -0x8(%rbp), %rax
movl 0x68(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x68(%rax)
jmp 0xa4e1b4
jmp 0xa4e1b6
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0xa4e12e
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
|
_Z19prune_sel_arg_graphP7SEL_ARGj:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
jmp short $+2
loc_A4E121:
mov rdi, [rbp+var_8]; this
call _ZN7SEL_ARG5firstEv; SEL_ARG::first(void)
mov [rbp+var_18], rax
loc_A4E12E:
cmp [rbp+var_18], 0
jz loc_A4E1C7
mov rax, [rbp+var_18]
cmp qword ptr [rax+58h], 0
jz short loc_A4E1B4
mov rax, [rbp+var_18]
mov rax, [rax+58h]
movzx eax, byte ptr [rax+3]
cmp eax, [rbp+var_C]
jbe short loc_A4E17A
mov rax, [rbp+var_18]
mov rax, [rax+58h]
mov edx, [rax+68h]
mov rax, [rbp+var_8]
mov ecx, [rax+68h]
sub ecx, edx
mov [rax+68h], ecx
mov rax, [rbp+var_18]
mov qword ptr [rax+58h], 0
jmp short loc_A4E1B2
loc_A4E17A:
mov rax, [rbp+var_18]
mov rax, [rax+58h]
mov eax, [rax+68h]
mov [rbp+var_1C], eax
mov rax, [rbp+var_18]
mov rdi, [rax+58h]; SEL_ARG *
mov esi, [rbp+var_C]; unsigned int
call _Z19prune_sel_arg_graphP7SEL_ARGj; prune_sel_arg_graph(SEL_ARG *,uint)
mov edx, [rbp+var_1C]
mov rax, [rbp+var_18]
mov rax, [rax+58h]
sub edx, [rax+68h]
mov rax, [rbp+var_8]
mov ecx, [rax+68h]
sub ecx, edx
mov [rax+68h], ecx
loc_A4E1B2:
jmp short $+2
loc_A4E1B4:
jmp short $+2
loc_A4E1B6:
mov rax, [rbp+var_18]
mov rax, [rax+40h]
mov [rbp+var_18], rax
jmp loc_A4E12E
loc_A4E1C7:
add rsp, 20h
pop rbp
retn
|
SEL_ARG * prune_sel_arg_graph(SEL_ARG *a1, unsigned int a2)
{
SEL_ARG *result; // rax
int v3; // [rsp+4h] [rbp-1Ch]
long long i; // [rsp+8h] [rbp-18h]
result = SEL_ARG::first(a1);
for ( i = (long long)result; i; i = (long long)result )
{
if ( *(_QWORD *)(i + 88) )
{
if ( *(unsigned __int8 *)(*(_QWORD *)(i + 88) + 3LL) <= a2 )
{
v3 = *(_DWORD *)(*(_QWORD *)(i + 88) + 104LL);
prune_sel_arg_graph(*(SEL_ARG **)(i + 88), a2);
*((_DWORD *)a1 + 26) -= v3 - *(_DWORD *)(*(_QWORD *)(i + 88) + 104LL);
}
else
{
*((_DWORD *)a1 + 26) -= *(_DWORD *)(*(_QWORD *)(i + 88) + 104LL);
*(_QWORD *)(i + 88) = 0LL;
}
}
result = *(SEL_ARG **)(i + 64);
}
return result;
}
|
Item_func_time_format:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RDI
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
CALL 0x00959960
MOV RAX,qword ptr [RBP + -0x28]
LEA RCX,[0x142dd70]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
MOV byte ptr [RAX + 0xd8],0x1
ADD RSP,0x30
POP RBP
RET
|
/* Item_func_time_format::Item_func_time_format(THD*, Item*, Item*) */
void __thiscall
Item_func_time_format::Item_func_time_format
(Item_func_time_format *this,THD *param_1,Item *param_2,Item *param_3)
{
Item_func_date_format::Item_func_date_format
((Item_func_date_format *)this,param_1,param_2,param_3);
*(int ***)this = &PTR__Item_func_time_format_0142dd80;
this[0xd8] = (Item_func_time_format)0x1;
return;
}
|
|
61,017
|
common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&, common_chat_inputs const&)
|
monkey531[P]llama/common/chat.cpp
|
static common_chat_params common_chat_params_init_functionary_v3_1_llama_3_1(const common_chat_template & tmpl, const struct common_chat_inputs & inputs) {
// https://github.com/MeetKai/functionary/blob/main/tests/prompt_test_v3-llama3.1.txt
common_chat_params data;
json tools = inputs.tools.is_null() ? inputs.tools : json::array();
std::string python_code_argument_name;
auto has_raw_python = false;
data.grammar_lazy = inputs.tool_choice != "required";
data.grammar = build_grammar([&](const common_grammar_builder & builder) {
std::vector<std::string> tool_rules;
foreach_function(inputs.tools, [&](const json & tool) {
const auto & function = tool["function"];
const auto & parameters = function["parameters"];
std::string name = function["name"];
if (name == "python" || name == "ipython") {
if (!parameters.contains("type")) {
throw std::runtime_error("Missing type in python tool");
}
has_raw_python = true;
auto type = parameters.at("type");
if (type == "object") {
auto properties = parameters.at("properties");
for (auto it = properties.begin(); it != properties.end(); ++it) {
if (it.value().at("type") == "string") {
if (!python_code_argument_name.empty()) {
throw std::runtime_error("Multiple string arguments found in python tool");
}
python_code_argument_name = it.key();
}
}
if (python_code_argument_name.empty()) {
throw std::runtime_error("No string argument found in python tool");
}
} else if (type != "string") {
throw std::runtime_error("Invalid type in python tool: " + type.dump());
}
}
tool_rules.push_back(builder.add_rule(name + "-call", "\"<function=" + name + ">\" " + builder.add_schema(name + "-args", parameters) + " \"</function>\" space"));
});
if (has_raw_python) {
tool_rules.push_back(builder.add_rule("python-call", "\"<|python_tag|>\" .*"));
data.grammar_triggers.push_back({"<|python_tag|>", /* .at_start = */ false});
}
auto tool_call = builder.add_rule("tool_call", string_join(tool_rules, " | ")) + " space";
builder.add_rule("root", inputs.parallel_tool_calls ? "(" + tool_call + ")+" : tool_call);
data.grammar_triggers.push_back({"<function=", /* .at_start = */ false});
}, grammar_options);
data.prompt = tmpl.apply(inputs.messages, inputs.tools.empty() ? json() : inputs.tools, inputs.add_generation_prompt);
// TODO: if (has_raw_python)
data.format = COMMON_CHAT_FORMAT_FUNCTIONARY_V3_1_LLAMA_3_1;
return data;
}
|
O3
|
cpp
|
common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&, common_chat_inputs const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl $0x0, (%rdi)
xorl %eax, %eax
movb %al, 0x8(%rdi)
movq %rax, 0x10(%rdi)
leaq 0x28(%rdi), %rcx
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movb %al, 0x28(%rdi)
movb %al, 0x38(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x50(%rdi)
movups %xmm0, 0x60(%rdi)
movups %xmm0, 0x70(%rdi)
movq %rax, 0x80(%rdi)
leaq 0x10(%rdx), %r12
cmpb %al, 0x10(%rdx)
je 0x80cd2
leaq 0x58(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x2, %r8d
callq 0x2a710
jmp 0x80cdf
leaq 0x58(%rsp), %rdi
movq %r12, %rsi
callq 0x2a110
leaq 0x88(%rsp), %rbp
movq %rbp, -0x10(%rbp)
xorl %r13d, %r13d
movq %r13, -0x8(%rbp)
movb %r13b, (%rbp)
movb %r13b, 0x17(%rsp)
leaq 0x20(%r14), %rdi
leaq 0x27c16(%rip), %rsi # 0xa891c
callq 0x68093
movb %al, 0x38(%rbx)
movq %r13, 0x20(%rsp)
movl $0x20, %edi
callq 0x18690
movq %r14, (%rax)
leaq 0x17(%rsp), %rcx
movq %rcx, 0x8(%rax)
leaq 0x78(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq %rbx, 0x18(%rax)
leaq 0x18(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x9fa9(%rip), %rax # 0x8acee
movq %rax, 0x18(%rsi)
leaq 0xa692(%rip), %rax # 0x8b3e2
movq %rax, 0x10(%rsi)
leaq 0x2eaa1(%rip), %rdx # 0xaf7fc
leaq 0x38(%rsp), %rdi
callq 0x95c4c
leaq 0x18(%rbx), %rdi
leaq 0x38(%rsp), %r13
movq %r13, %rsi
callq 0x187f0
movq (%r13), %rdi
leaq 0x48(%rsp), %r13
cmpq %r13, %rdi
je 0x80d91
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x186a0
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x80daa
leaq 0x18(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movzbl (%r12), %eax
testl %eax, %eax
je 0x80dd9
cmpl $0x2, %eax
je 0x80dbd
cmpl $0x1, %eax
jne 0x80dca
movq 0x18(%r14), %rax
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
je 0x80dd9
leaq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0x2a110
jmp 0x80de7
movb $0x0, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movzbl 0x68(%r14), %r8d
leaq 0x68(%rsp), %r9
movb $0x0, (%r9)
movq $0x0, 0x8(%r9)
movl $0x1, (%rsp)
leaq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rcx
movq %r15, %rsi
movq %r14, %rdx
callq 0x647b2
leaq 0x98(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x2b464
movb 0x8(%rbx), %al
leaq 0x98(%rsp), %rdi
movb (%rdi), %cl
movb %cl, 0x8(%rbx)
movb %al, (%rdi)
movq 0x10(%rbx), %rax
movq 0x8(%rdi), %rcx
movq %rcx, 0x10(%rbx)
movq %rax, 0x8(%rdi)
callq 0x49a2a
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0x80e69
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x186a0
leaq 0x68(%rsp), %rdi
callq 0x49a2a
leaq 0x18(%rsp), %rdi
callq 0x49a2a
movl $0x8, (%rbx)
movq 0x78(%rsp), %rdi
cmpq %rbp, %rdi
je 0x80e9d
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x186a0
leaq 0x58(%rsp), %rdi
callq 0x49a2a
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x80f18
jmp 0x80f10
movq %rax, %r14
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0x80edc
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x80edc
movq %rax, %r14
leaq 0x68(%rsp), %rdi
callq 0x49a2a
leaq 0x18(%rsp), %rdi
callq 0x49a2a
jmp 0x80f1b
movq %rax, %r14
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x80f1b
leaq 0x18(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x80f1b
movq %rax, %rdi
callq 0x29f9b
movq %rax, %r14
movq 0x78(%rsp), %rdi
cmpq %rbp, %rdi
je 0x80f35
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x186a0
leaq 0x58(%rsp), %rdi
callq 0x49a2a
movq %rbx, %rdi
callq 0x29e76
movq %r14, %rdi
callq 0x18ba0
movq %rax, %r14
jmp 0x80f3f
|
_ZL50common_chat_params_init_functionary_v3_1_llama_3_1RKN5minja13chat_templateERK18common_chat_inputs:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A8h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov dword ptr [rdi], 0
xor eax, eax
mov [rdi+8], al
mov [rdi+10h], rax
lea rcx, [rdi+28h]
mov [rdi+18h], rcx
mov [rdi+20h], rax
mov [rdi+28h], al
mov [rdi+38h], al
xorps xmm0, xmm0
movups xmmword ptr [rdi+40h], xmm0
movups xmmword ptr [rdi+50h], xmm0
movups xmmword ptr [rdi+60h], xmm0
movups xmmword ptr [rdi+70h], xmm0
mov [rdi+80h], rax
lea r12, [rdx+10h]
cmp [rdx+10h], al
jz short loc_80CD2
lea rdi, [rsp+0D8h+var_80]
xor esi, esi
xor edx, edx
xor ecx, ecx
mov r8d, 2
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)
jmp short loc_80CDF
loc_80CD2:
lea rdi, [rsp+0D8h+var_80]
mov rsi, r12
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
loc_80CDF:
lea rbp, [rsp+0D8h+var_50]
mov [rbp-10h], rbp
xor r13d, r13d
mov [rbp-8], r13
mov [rbp+0], r13b
mov [rsp+0D8h+var_C1], r13b
lea rdi, [r14+20h]
lea rsi, aRequired; "required"
call _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_
mov [rbx+38h], al
mov [rsp+0D8h+var_B8], r13
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
mov [rax], r14
lea rcx, [rsp+0D8h+var_C1]
mov [rax+8], rcx
lea rcx, [rsp+0D8h+var_60]
mov [rax+10h], rcx
mov [rax+18h], rbx
lea rsi, [rsp+0D8h+var_C0]
mov [rsi], rax
lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL50common_chat_params_init_functionary_v3_1_llama_3_1RKN5minja13chat_templateERK18common_chat_inputsE3$_0E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke(std::_Any_data const&,common_grammar_builder const&)
mov [rsi+18h], rax
lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL50common_chat_params_init_functionary_v3_1_llama_3_1RKN5minja13chat_templateERK18common_chat_inputsE3$_0E10_M_managerERSt9_Any_dataRKSD_St18_Manager_operation; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsi+10h], rax
lea rdx, _ZL15grammar_options; grammar_options
lea rdi, [rsp+0D8h+var_A0]
call _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options; build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)
lea rdi, [rbx+18h]
lea r13, [rsp+0D8h+var_A0]
mov rsi, r13
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r13+0]; void *
lea r13, [rsp+0D8h+var_90]
cmp rdi, r13
jz short loc_80D91
mov rsi, [rsp+0D8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_80D91:
mov rax, [rsp+0D8h+var_B0]
test rax, rax
jz short loc_80DAA
lea rdi, [rsp+0D8h+var_C0]
mov rsi, rdi
mov edx, 3
call rax
loc_80DAA:
movzx eax, byte ptr [r12]
test eax, eax
jz short loc_80DD9
cmp eax, 2
jz short loc_80DBD
cmp eax, 1
jnz short loc_80DCA
loc_80DBD:
mov rax, [r14+18h]
mov rcx, [rax]
cmp rcx, [rax+8]
jz short loc_80DD9
loc_80DCA:
lea rdi, [rsp+0D8h+var_C0]
mov rsi, r12
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
jmp short loc_80DE7
loc_80DD9:
mov [rsp+0D8h+var_C0], 0
mov [rsp+0D8h+var_B8], 0
loc_80DE7:
movzx r8d, byte ptr [r14+68h]
lea r9, [rsp+0D8h+var_70]
mov byte ptr [r9], 0
mov qword ptr [r9+8], 0
mov [rsp+0D8h+var_D8], 1
lea rdi, [rsp+0D8h+var_A0]
lea rcx, [rsp+0D8h+var_C0]
mov rsi, r15
mov rdx, r14
call _ZNK5minja13chat_template5applyERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_b; minja::chat_template::apply(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool)
lea rdi, [rsp+0D8h+var_40]
lea rsi, [rsp+0D8h+var_A0]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_
mov al, [rbx+8]
lea rdi, [rsp+0D8h+var_40]
mov cl, [rdi]
mov [rbx+8], cl
mov [rdi], al
mov rax, [rbx+10h]
mov rcx, [rdi+8]
mov [rbx+10h], rcx
mov [rdi+8], rax
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rsp+0D8h+var_A0]; void *
cmp rdi, r13
jz short loc_80E69
mov rsi, [rsp+0D8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_80E69:
lea rdi, [rsp+0D8h+var_70]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [rsp+0D8h+var_C0]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov dword ptr [rbx], 8
mov rdi, [rsp+0D8h+var_60]; void *
cmp rdi, rbp
jz short loc_80E9D
mov rsi, [rsp+0D8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_80E9D:
lea rdi, [rsp+0D8h+var_80]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_80F18
jmp short loc_80F10
mov r14, rax
mov rdi, [rsp+0D8h+var_A0]; void *
cmp rdi, r13
jz short loc_80EDC
mov rsi, [rsp+0D8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_80EDC
mov r14, rax
loc_80EDC:
lea rdi, [rsp+0D8h+var_70]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [rsp+0D8h+var_C0]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_80F1B
mov r14, rax
mov rax, [rsp+0D8h+var_B0]
test rax, rax
jz short loc_80F1B
lea rdi, [rsp+0D8h+var_C0]
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_80F1B
loc_80F10:
mov rdi, rax
call __clang_call_terminate
loc_80F18:
mov r14, rax
loc_80F1B:
mov rdi, [rsp+0D8h+var_60]; void *
cmp rdi, rbp
jz short loc_80F35
mov rsi, [rsp+0D8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_80F35:
lea rdi, [rsp+0D8h+var_80]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_80F3F:
mov rdi, rbx; this
call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params()
mov rdi, r14
call __Unwind_Resume
mov r14, rax
jmp short loc_80F3F
|
void common_chat_params_init_functionary_v3_1_llama_3_1(
const minja::chat_template *a1,
const common_chat_inputs *a2,
long long a3)
{
_BYTE *v4; // r12
long long v5; // rax
int v6; // eax
int v7; // r8d
char v8; // al
long long v9; // rax
char v10; // [rsp+17h] [rbp-C1h] BYREF
void **v11; // [rsp+18h] [rbp-C0h] BYREF
long long v12; // [rsp+20h] [rbp-B8h]
long long ( *v13)(); // [rsp+28h] [rbp-B0h]
long long ( *v14)(); // [rsp+30h] [rbp-A8h]
void *v15[2]; // [rsp+38h] [rbp-A0h] BYREF
_QWORD v16[2]; // [rsp+48h] [rbp-90h] BYREF
void **v17[2]; // [rsp+58h] [rbp-80h] BYREF
void **v18[2]; // [rsp+68h] [rbp-70h] BYREF
void *v19[2]; // [rsp+78h] [rbp-60h] BYREF
_QWORD v20[2]; // [rsp+88h] [rbp-50h] BYREF
_OWORD v21[4]; // [rsp+98h] [rbp-40h] BYREF
*(_DWORD *)a1 = 0;
*((_BYTE *)a1 + 8) = 0;
*((_QWORD *)a1 + 2) = 0LL;
*((_QWORD *)a1 + 3) = (char *)a1 + 40;
*((_QWORD *)a1 + 4) = 0LL;
*((_BYTE *)a1 + 40) = 0;
*((_BYTE *)a1 + 56) = 0;
*((_OWORD *)a1 + 4) = 0LL;
*((_OWORD *)a1 + 5) = 0LL;
*((_OWORD *)a1 + 6) = 0LL;
*((_OWORD *)a1 + 7) = 0LL;
*((_QWORD *)a1 + 16) = 0LL;
v4 = (_BYTE *)(a3 + 16);
if ( *(_BYTE *)(a3 + 16) )
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v17,
0LL,
0LL,
0LL,
2LL);
else
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
(long long)v17,
a3 + 16);
v19[0] = v20;
v19[1] = 0LL;
LOBYTE(v20[0]) = 0;
v10 = 0;
*((_BYTE *)a1 + 56) = ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_(
a3 + 32,
(long long)"required");
v12 = 0LL;
v5 = operator new(0x20uLL);
*(_QWORD *)v5 = a3;
*(_QWORD *)(v5 + 8) = &v10;
*(_QWORD *)(v5 + 16) = v19;
*(_QWORD *)(v5 + 24) = a1;
v11 = (void **)v5;
v14 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke;
v13 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager;
build_grammar[abi:cxx11](v15, &v11, &grammar_options);
std::string::operator=((char *)a1 + 24, v15);
if ( v15[0] != v16 )
operator delete(v15[0], v16[0] + 1LL);
if ( v13 )
((void ( *)(void ***, void ***, long long))v13)(&v11, &v11, 3LL);
v6 = (unsigned __int8)*v4;
if ( !*v4 || (v6 == 2 || v6 == 1) && **(_QWORD **)(a3 + 24) == *(_QWORD *)(*(_QWORD *)(a3 + 24) + 8LL) )
{
LOBYTE(v11) = 0;
v12 = 0LL;
}
else
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
(long long)&v11,
(long long)v4);
}
v7 = *(unsigned __int8 *)(a3 + 104);
LOBYTE(v18[0]) = 0;
v18[1] = 0LL;
minja::chat_template::apply((long long)v15, a2, a3, (unsigned __int8 *)&v11, v7, v18, 1);
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_(v21);
v8 = *((_BYTE *)a1 + 8);
*((_BYTE *)a1 + 8) = v21[0];
LOBYTE(v21[0]) = v8;
v9 = *((_QWORD *)a1 + 2);
*((_QWORD *)a1 + 2) = *((_QWORD *)&v21[0] + 1);
*((_QWORD *)&v21[0] + 1) = v9;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data((void ***)v21);
if ( v15[0] != v16 )
operator delete(v15[0], v16[0] + 1LL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v18);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v11);
*(_DWORD *)a1 = 8;
if ( v19[0] != v20 )
operator delete(v19[0], v20[0] + 1LL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v17);
}
|
common_chat_params_init_functionary_v3_1_llama_3_1:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV dword ptr [RDI],0x0
XOR EAX,EAX
MOV byte ptr [RDI + 0x8],AL
MOV qword ptr [RDI + 0x10],RAX
LEA RCX,[RDI + 0x28]
MOV qword ptr [RDI + 0x18],RCX
MOV qword ptr [RDI + 0x20],RAX
MOV byte ptr [RDI + 0x28],AL
MOV byte ptr [RDI + 0x38],AL
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x40],XMM0
MOVUPS xmmword ptr [RDI + 0x50],XMM0
MOVUPS xmmword ptr [RDI + 0x60],XMM0
MOVUPS xmmword ptr [RDI + 0x70],XMM0
MOV qword ptr [RDI + 0x80],RAX
LEA R12,[RDX + 0x10]
CMP byte ptr [RDX + 0x10],AL
JZ 0x00180cd2
LAB_00180cba:
LEA RDI,[RSP + 0x58]
XOR ESI,ESI
XOR EDX,EDX
XOR ECX,ECX
MOV R8D,0x2
CALL 0x0012a710
JMP 0x00180cdf
LAB_00180cd2:
LEA RDI,[RSP + 0x58]
MOV RSI,R12
CALL 0x0012a110
LAB_00180cdf:
LEA RBP,[RSP + 0x88]
MOV qword ptr [RBP + -0x10],RBP
XOR R13D,R13D
MOV qword ptr [RBP + -0x8],R13
MOV byte ptr [RBP],R13B
MOV byte ptr [RSP + 0x17],R13B
LEA RDI,[R14 + 0x20]
LEA RSI,[0x1a891c]
CALL 0x00168093
MOV byte ptr [RBX + 0x38],AL
MOV qword ptr [RSP + 0x20],R13
LAB_00180d13:
MOV EDI,0x20
CALL 0x00118690
MOV qword ptr [RAX],R14
LEA RCX,[RSP + 0x17]
MOV qword ptr [RAX + 0x8],RCX
LEA RCX,[RSP + 0x78]
MOV qword ptr [RAX + 0x10],RCX
MOV qword ptr [RAX + 0x18],RBX
LEA RSI,[RSP + 0x18]
MOV qword ptr [RSI],RAX
LEA RAX,[0x18acee]
MOV qword ptr [RSI + 0x18],RAX
LEA RAX,[0x18b3e2]
MOV qword ptr [RSI + 0x10],RAX
LAB_00180d54:
LEA RDX,[0x1af7fc]
LEA RDI,[RSP + 0x38]
CALL 0x00195c4c
LEA RDI,[RBX + 0x18]
LEA R13,[RSP + 0x38]
MOV RSI,R13
CALL 0x001187f0
MOV RDI,qword ptr [R13]
LEA R13,[RSP + 0x48]
CMP RDI,R13
JZ 0x00180d91
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x001186a0
LAB_00180d91:
MOV RAX,qword ptr [RSP + 0x28]
TEST RAX,RAX
JZ 0x00180daa
LAB_00180d9b:
LEA RDI,[RSP + 0x18]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_00180daa:
MOVZX EAX,byte ptr [R12]
TEST EAX,EAX
JZ 0x00180dd9
CMP EAX,0x2
JZ 0x00180dbd
CMP EAX,0x1
JNZ 0x00180dca
LAB_00180dbd:
MOV RAX,qword ptr [R14 + 0x18]
MOV RCX,qword ptr [RAX]
CMP RCX,qword ptr [RAX + 0x8]
JZ 0x00180dd9
LAB_00180dca:
LEA RDI,[RSP + 0x18]
MOV RSI,R12
CALL 0x0012a110
JMP 0x00180de7
LAB_00180dd9:
MOV byte ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
LAB_00180de7:
MOVZX R8D,byte ptr [R14 + 0x68]
LEA R9,[RSP + 0x68]
MOV byte ptr [R9],0x0
MOV qword ptr [R9 + 0x8],0x0
LAB_00180dfd:
MOV dword ptr [RSP],0x1
LEA RDI,[RSP + 0x38]
LEA RCX,[RSP + 0x18]
MOV RSI,R15
MOV RDX,R14
CALL 0x001647b2
LAB_00180e19:
LEA RDI,[RSP + 0x98]
LEA RSI,[RSP + 0x38]
CALL 0x0012b464
MOV AL,byte ptr [RBX + 0x8]
LEA RDI,[RSP + 0x98]
MOV CL,byte ptr [RDI]
MOV byte ptr [RBX + 0x8],CL
MOV byte ptr [RDI],AL
MOV RAX,qword ptr [RBX + 0x10]
MOV RCX,qword ptr [RDI + 0x8]
MOV qword ptr [RBX + 0x10],RCX
MOV qword ptr [RDI + 0x8],RAX
CALL 0x00149a2a
MOV RDI,qword ptr [RSP + 0x38]
CMP RDI,R13
JZ 0x00180e69
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x001186a0
LAB_00180e69:
LEA RDI,[RSP + 0x68]
CALL 0x00149a2a
LEA RDI,[RSP + 0x18]
CALL 0x00149a2a
MOV dword ptr [RBX],0x8
MOV RDI,qword ptr [RSP + 0x78]
CMP RDI,RBP
JZ 0x00180e9d
MOV RSI,qword ptr [RSP + 0x88]
INC RSI
CALL 0x001186a0
LAB_00180e9d:
LEA RDI,[RSP + 0x58]
CALL 0x00149a2a
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,
common_chat_inputs const&) */
void common_chat_params_init_functionary_v3_1_llama_3_1
(chat_template *param_1,common_chat_inputs *param_2)
{
basic_json *pbVar1;
basic_json bVar2;
int8 uVar3;
chat_template cVar4;
long in_RDX;
int1 local_c1;
long *local_c0;
int8 local_b8;
code *local_b0;
code *local_a8;
long *local_a0 [2];
long local_90 [2];
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_80 [16];
data local_70 [8];
int8 local_68;
int1 *local_60;
int8 local_58;
int1 local_50;
int7 uStack_4f;
chat_template local_40 [8];
int8 local_38;
*(int4 *)param_1 = 0;
param_1[8] = (chat_template)0x0;
*(int8 *)(param_1 + 0x10) = 0;
*(chat_template **)(param_1 + 0x18) = param_1 + 0x28;
*(int8 *)(param_1 + 0x20) = 0;
param_1[0x28] = (chat_template)0x0;
param_1[0x38] = (chat_template)0x0;
*(int8 *)(param_1 + 0x40) = 0;
*(int8 *)(param_1 + 0x48) = 0;
*(int8 *)(param_1 + 0x50) = 0;
*(int8 *)(param_1 + 0x58) = 0;
*(int8 *)(param_1 + 0x60) = 0;
*(int8 *)(param_1 + 0x68) = 0;
*(int8 *)(param_1 + 0x70) = 0;
*(int8 *)(param_1 + 0x78) = 0;
*(int8 *)(param_1 + 0x80) = 0;
pbVar1 = (basic_json *)(in_RDX + 0x10);
if (*(char *)(in_RDX + 0x10) == '\0') {
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_80,pbVar1);
}
else {
/* try { // try from 00180cba to 00180cde has its CatchHandler @ 00180f4f */
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_80,0,0,0,2);
}
local_58 = 0;
local_50 = 0;
local_c1 = 0;
local_60 = &local_50;
cVar4 = (chat_template)
_ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_
(in_RDX + 0x20,"required");
param_1[0x38] = cVar4;
local_b8 = 0;
/* try { // try from 00180d13 to 00180d1c has its CatchHandler @ 00180f18 */
local_c0 = (long *)operator_new(0x20);
*local_c0 = in_RDX;
local_c0[1] = (long)&local_c1;
local_c0[2] = (long)&local_60;
local_c0[3] = (long)param_1;
local_a8 = std::
_Function_handler<void(common_grammar_builder_const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template_const&,common_chat_inputs_const&)::$_0>
::_M_invoke;
local_b0 = std::
_Function_handler<void(common_grammar_builder_const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template_const&,common_chat_inputs_const&)::$_0>
::_M_manager;
/* try { // try from 00180d54 to 00180d64 has its CatchHandler @ 00180ef2 */
build_grammar_abi_cxx11_((function *)local_a0,(common_grammar_options *)&local_c0);
std::__cxx11::string::operator=((string *)(param_1 + 0x18),(string *)local_a0);
if (local_a0[0] != local_90) {
operator_delete(local_a0[0],local_90[0] + 1);
}
if (local_b0 != (code *)0x0) {
/* try { // try from 00180d9b to 00180da9 has its CatchHandler @ 00180ebb */
(*local_b0)(&local_c0,&local_c0,3);
}
bVar2 = *pbVar1;
if ((bVar2 == (basic_json)0x0) ||
(((bVar2 == (basic_json)0x2 || (bVar2 == (basic_json)0x1)) &&
(**(long **)(in_RDX + 0x18) == (*(long **)(in_RDX + 0x18))[1])))) {
local_c0 = (long *)((ulong)local_c0 & 0xffffffffffffff00);
local_b8 = 0;
}
else {
/* try { // try from 00180dca to 00180dd6 has its CatchHandler @ 00180eb9 */
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)&local_c0,pbVar1);
}
local_70[0] = (data)0x0;
local_68 = 0;
/* try { // try from 00180dfd to 00180e18 has its CatchHandler @ 00180ed9 */
minja::chat_template::apply
((basic_json *)local_a0,(basic_json *)param_2,SUB81(in_RDX,0),(basic_json *)&local_c0,
*(bool *)(in_RDX + 0x68));
/* try { // try from 00180e19 to 00180e2a has its CatchHandler @ 00180ebd */
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_
(local_40,local_a0);
cVar4 = param_1[8];
param_1[8] = local_40[0];
uVar3 = *(int8 *)(param_1 + 0x10);
*(int8 *)(param_1 + 0x10) = local_38;
local_40[0] = cVar4;
local_38 = uVar3;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_40);
if (local_a0[0] != local_90) {
operator_delete(local_a0[0],local_90[0] + 1);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_70);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_c0);
*(int4 *)param_1 = 8;
if (local_60 != &local_50) {
operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_80);
return;
}
|
|
61,018
|
ggml_compute_forward_win_unpart_f32(ggml_compute_params const*, ggml_tensor*)
|
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp
|
static void ggml_compute_forward_win_unpart_f32(
const ggml_compute_params * params,
ggml_tensor * dst) {
GGML_UNUSED(params);
const ggml_tensor * src0 = dst->src[0];
GGML_TENSOR_LOCALS(int64_t, ne0, src0, ne)
GGML_TENSOR_LOCALS(int64_t, ne, dst, ne)
const int32_t w = ((const int32_t *)(dst->op_params))[0];
// padding
const int px = (w - ne1%w)%w;
//const int py = (w - ne2%w)%w;
const int npx = (px + ne1)/w;
//const int npy = (py + ne2)/w;
assert(ne0 == ne00);
// TODO: optimize / multi-thread
for (int64_t i2 = 0; i2 < ne2; ++i2) {
for (int64_t i1 = 0; i1 < ne1; ++i1) {
for (int64_t i0 = 0; i0 < ne0; ++i0) {
const int ip2 = i2/w;
const int ip1 = i1/w;
const int64_t i02 = i2%w;
const int64_t i01 = i1%w;
const int64_t i00 = i0;
const int64_t i = (ip2*npx + ip1)*ne02*ne01*ne00 + i02*ne01*ne00 + i01*ne00 + i00;
const int64_t j = i2*ne1*ne0 + i1*ne0 + i0;
((float *) dst->data)[j] = ((float *) src0->data)[i];
}
}
}
}
|
O0
|
cpp
|
ggml_compute_forward_win_unpart_f32(ggml_compute_params const*, ggml_tensor*):
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq 0x98(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, (%rsp)
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x8(%rsp)
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x10(%rsp)
movq 0x28(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x18(%rsp)
movq 0x28(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rsp)
movq 0x28(%rsp), %rax
movl 0x54(%rax), %eax
movl %eax, -0x24(%rsp)
movslq -0x24(%rsp), %rax
movq %rax, -0x80(%rsp)
movq -0x10(%rsp), %rax
movslq -0x24(%rsp), %rcx
cqto
idivq %rcx
movq -0x80(%rsp), %rax
subq %rdx, %rax
movslq -0x24(%rsp), %rcx
cqto
idivq %rcx
movl %edx, %eax
movl %eax, -0x28(%rsp)
movslq -0x28(%rsp), %rax
addq -0x10(%rsp), %rax
movslq -0x24(%rsp), %rcx
cqto
idivq %rcx
movl %eax, -0x2c(%rsp)
movq $0x0, -0x38(%rsp)
movq -0x38(%rsp), %rax
cmpq -0x18(%rsp), %rax
jge 0xa32f5
movq $0x0, -0x40(%rsp)
movq -0x40(%rsp), %rax
cmpq -0x10(%rsp), %rax
jge 0xa32e0
movq $0x0, -0x48(%rsp)
movq -0x48(%rsp), %rax
cmpq -0x8(%rsp), %rax
jge 0xa32cb
movq -0x38(%rsp), %rax
movslq -0x24(%rsp), %rcx
cqto
idivq %rcx
movl %eax, -0x4c(%rsp)
movq -0x40(%rsp), %rax
movslq -0x24(%rsp), %rcx
cqto
idivq %rcx
movl %eax, -0x50(%rsp)
movq -0x38(%rsp), %rax
movslq -0x24(%rsp), %rcx
cqto
idivq %rcx
movq %rdx, -0x58(%rsp)
movq -0x40(%rsp), %rax
movslq -0x24(%rsp), %rcx
cqto
idivq %rcx
movq %rdx, -0x60(%rsp)
movq -0x48(%rsp), %rax
movq %rax, -0x68(%rsp)
movl -0x4c(%rsp), %eax
imull -0x2c(%rsp), %eax
addl -0x50(%rsp), %eax
cltq
imulq 0x8(%rsp), %rax
imulq 0x10(%rsp), %rax
imulq 0x18(%rsp), %rax
movq -0x58(%rsp), %rcx
imulq 0x10(%rsp), %rcx
imulq 0x18(%rsp), %rcx
addq %rcx, %rax
movq -0x60(%rsp), %rcx
imulq 0x18(%rsp), %rcx
addq %rcx, %rax
addq -0x68(%rsp), %rax
movq %rax, -0x70(%rsp)
movq -0x38(%rsp), %rax
imulq -0x10(%rsp), %rax
imulq -0x8(%rsp), %rax
movq -0x40(%rsp), %rcx
imulq -0x8(%rsp), %rcx
addq %rcx, %rax
addq -0x48(%rsp), %rax
movq %rax, -0x78(%rsp)
movq 0x20(%rsp), %rax
movq 0xf8(%rax), %rax
movq -0x70(%rsp), %rcx
vmovss (%rax,%rcx,4), %xmm0
movq 0x28(%rsp), %rax
movq 0xf8(%rax), %rax
movq -0x78(%rsp), %rcx
vmovss %xmm0, (%rax,%rcx,4)
movq -0x48(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rsp)
jmp 0xa31ae
jmp 0xa32cd
movq -0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rsp)
jmp 0xa3195
jmp 0xa32e2
movq -0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rsp)
jmp 0xa317c
addq $0x38, %rsp
retq
nopw (%rax,%rax)
|
_ZL35ggml_compute_forward_win_unpart_f32PK19ggml_compute_paramsP11ggml_tensor:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov rax, [rsp+38h+var_10]
mov rax, [rax+98h]
mov [rsp+38h+var_18], rax
mov rax, [rsp+38h+var_18]
mov rax, [rax+10h]
mov [rsp+38h+var_20], rax
mov rax, [rsp+38h+var_18]
mov rax, [rax+18h]
mov [rsp+38h+var_28], rax
mov rax, [rsp+38h+var_18]
mov rax, [rax+20h]
mov [rsp+38h+var_30], rax
mov rax, [rsp+38h+var_18]
mov rax, [rax+28h]
mov [rsp+38h+var_38], rax
mov rax, [rsp+38h+var_10]
mov rax, [rax+10h]
mov [rsp+38h+var_40], rax
mov rax, [rsp+38h+var_10]
mov rax, [rax+18h]
mov [rsp+38h+var_48], rax
mov rax, [rsp+38h+var_10]
mov rax, [rax+20h]
mov [rsp+38h+var_50], rax
mov rax, [rsp+38h+var_10]
mov rax, [rax+28h]
mov [rsp+38h+var_58], rax
mov rax, [rsp+38h+var_10]
mov eax, [rax+54h]
mov [rsp+38h+var_5C], eax
movsxd rax, [rsp+38h+var_5C]
mov [rsp+38h+var_B8], rax
mov rax, [rsp+38h+var_48]
movsxd rcx, [rsp+38h+var_5C]
cqo
idiv rcx
mov rax, [rsp+38h+var_B8]
sub rax, rdx
movsxd rcx, [rsp+38h+var_5C]
cqo
idiv rcx
mov eax, edx
mov [rsp+38h+var_60], eax
movsxd rax, [rsp+38h+var_60]
add rax, [rsp+38h+var_48]
movsxd rcx, [rsp+38h+var_5C]
cqo
idiv rcx
mov [rsp+38h+var_64], eax
mov [rsp+38h+var_70], 0
loc_A317C:
mov rax, [rsp+38h+var_70]
cmp rax, [rsp+38h+var_50]
jge loc_A32F5
mov [rsp+38h+var_78], 0
loc_A3195:
mov rax, [rsp+38h+var_78]
cmp rax, [rsp+38h+var_48]
jge loc_A32E0
mov [rsp+38h+var_80], 0
loc_A31AE:
mov rax, [rsp+38h+var_80]
cmp rax, [rsp+38h+var_40]
jge loc_A32CB
mov rax, [rsp+38h+var_70]
movsxd rcx, [rsp+38h+var_5C]
cqo
idiv rcx
mov [rsp+38h+var_84], eax
mov rax, [rsp+38h+var_78]
movsxd rcx, [rsp+38h+var_5C]
cqo
idiv rcx
mov [rsp+38h+var_88], eax
mov rax, [rsp+38h+var_70]
movsxd rcx, [rsp+38h+var_5C]
cqo
idiv rcx
mov [rsp+38h+var_90], rdx
mov rax, [rsp+38h+var_78]
movsxd rcx, [rsp+38h+var_5C]
cqo
idiv rcx
mov [rsp+38h+var_98], rdx
mov rax, [rsp+38h+var_80]
mov [rsp+38h+var_A0], rax
mov eax, [rsp+38h+var_84]
imul eax, [rsp+38h+var_64]
add eax, [rsp+38h+var_88]
cdqe
imul rax, [rsp+38h+var_30]
imul rax, [rsp+38h+var_28]
imul rax, [rsp+38h+var_20]
mov rcx, [rsp+38h+var_90]
imul rcx, [rsp+38h+var_28]
imul rcx, [rsp+38h+var_20]
add rax, rcx
mov rcx, [rsp+38h+var_98]
imul rcx, [rsp+38h+var_20]
add rax, rcx
add rax, [rsp+38h+var_A0]
mov [rsp+38h+var_A8], rax
mov rax, [rsp+38h+var_70]
imul rax, [rsp+38h+var_48]
imul rax, [rsp+38h+var_40]
mov rcx, [rsp+38h+var_78]
imul rcx, [rsp+38h+var_40]
add rax, rcx
add rax, [rsp+38h+var_80]
mov [rsp+38h+var_B0], rax
mov rax, [rsp+38h+var_18]
mov rax, [rax+0F8h]
mov rcx, [rsp+38h+var_A8]
vmovss xmm0, dword ptr [rax+rcx*4]
mov rax, [rsp+38h+var_10]
mov rax, [rax+0F8h]
mov rcx, [rsp+38h+var_B0]
vmovss dword ptr [rax+rcx*4], xmm0
mov rax, [rsp+38h+var_80]
add rax, 1
mov [rsp+38h+var_80], rax
jmp loc_A31AE
loc_A32CB:
jmp short $+2
loc_A32CD:
mov rax, [rsp+38h+var_78]
add rax, 1
mov [rsp+38h+var_78], rax
jmp loc_A3195
loc_A32E0:
jmp short $+2
loc_A32E2:
mov rax, [rsp+38h+var_70]
add rax, 1
mov [rsp+38h+var_70], rax
jmp loc_A317C
loc_A32F5:
add rsp, 38h
retn
|
long long ggml_compute_forward_win_unpart_f32(long long a1, long long a2)
{
long long result; // rax
long long k; // [rsp+38h] [rbp-80h]
long long j; // [rsp+40h] [rbp-78h]
long long i; // [rsp+48h] [rbp-70h]
int v11; // [rsp+5Ch] [rbp-5Ch]
long long v12; // [rsp+68h] [rbp-50h]
long long v13; // [rsp+70h] [rbp-48h]
long long v14; // [rsp+78h] [rbp-40h]
long long v15; // [rsp+88h] [rbp-30h]
long long v16; // [rsp+90h] [rbp-28h]
long long v17; // [rsp+98h] [rbp-20h]
_QWORD *v18; // [rsp+A0h] [rbp-18h]
v18 = *(_QWORD **)(a2 + 152);
v17 = v18[2];
v16 = v18[3];
v15 = v18[4];
v14 = *(_QWORD *)(a2 + 16);
v13 = *(_QWORD *)(a2 + 24);
v12 = *(_QWORD *)(a2 + 32);
v11 = *(_DWORD *)(a2 + 84);
for ( i = 0LL; ; ++i )
{
result = i;
if ( i >= v12 )
break;
for ( j = 0LL; j < v13; ++j )
{
for ( k = 0LL; k < v14; ++k )
{
_RAX = v18[31];
_RCX = k
+ v17 * (j % v11)
+ v17 * v16 * (i % v11)
+ v17 * v16 * v15 * (int)(j / v11 + (v13 + (int)((v11 - v13 % v11) % v11)) / v11 * (i / v11));
__asm { vmovss xmm0, dword ptr [rax+rcx*4] }
_RAX = *(_QWORD *)(a2 + 248);
_RCX = k + v14 * j + v14 * v13 * i;
__asm { vmovss dword ptr [rax+rcx*4], xmm0 }
}
}
}
return result;
}
|
ggml_compute_forward_win_unpart_f32:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + -0x8],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + -0x10],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RSP + -0x18],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RSP + -0x20],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV EAX,dword ptr [RAX + 0x54]
MOV dword ptr [RSP + -0x24],EAX
MOVSXD RAX,dword ptr [RSP + -0x24]
MOV qword ptr [RSP + -0x80],RAX
MOV RAX,qword ptr [RSP + -0x10]
MOVSXD RCX,dword ptr [RSP + -0x24]
CQO
IDIV RCX
MOV RAX,qword ptr [RSP + -0x80]
SUB RAX,RDX
MOVSXD RCX,dword ptr [RSP + -0x24]
CQO
IDIV RCX
MOV EAX,EDX
MOV dword ptr [RSP + -0x28],EAX
MOVSXD RAX,dword ptr [RSP + -0x28]
ADD RAX,qword ptr [RSP + -0x10]
MOVSXD RCX,dword ptr [RSP + -0x24]
CQO
IDIV RCX
MOV dword ptr [RSP + -0x2c],EAX
MOV qword ptr [RSP + -0x38],0x0
LAB_001a317c:
MOV RAX,qword ptr [RSP + -0x38]
CMP RAX,qword ptr [RSP + -0x18]
JGE 0x001a32f5
MOV qword ptr [RSP + -0x40],0x0
LAB_001a3195:
MOV RAX,qword ptr [RSP + -0x40]
CMP RAX,qword ptr [RSP + -0x10]
JGE 0x001a32e0
MOV qword ptr [RSP + -0x48],0x0
LAB_001a31ae:
MOV RAX,qword ptr [RSP + -0x48]
CMP RAX,qword ptr [RSP + -0x8]
JGE 0x001a32cb
MOV RAX,qword ptr [RSP + -0x38]
MOVSXD RCX,dword ptr [RSP + -0x24]
CQO
IDIV RCX
MOV dword ptr [RSP + -0x4c],EAX
MOV RAX,qword ptr [RSP + -0x40]
MOVSXD RCX,dword ptr [RSP + -0x24]
CQO
IDIV RCX
MOV dword ptr [RSP + -0x50],EAX
MOV RAX,qword ptr [RSP + -0x38]
MOVSXD RCX,dword ptr [RSP + -0x24]
CQO
IDIV RCX
MOV qword ptr [RSP + -0x58],RDX
MOV RAX,qword ptr [RSP + -0x40]
MOVSXD RCX,dword ptr [RSP + -0x24]
CQO
IDIV RCX
MOV qword ptr [RSP + -0x60],RDX
MOV RAX,qword ptr [RSP + -0x48]
MOV qword ptr [RSP + -0x68],RAX
MOV EAX,dword ptr [RSP + -0x4c]
IMUL EAX,dword ptr [RSP + -0x2c]
ADD EAX,dword ptr [RSP + -0x50]
CDQE
IMUL RAX,qword ptr [RSP + 0x8]
IMUL RAX,qword ptr [RSP + 0x10]
IMUL RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + -0x58]
IMUL RCX,qword ptr [RSP + 0x10]
IMUL RCX,qword ptr [RSP + 0x18]
ADD RAX,RCX
MOV RCX,qword ptr [RSP + -0x60]
IMUL RCX,qword ptr [RSP + 0x18]
ADD RAX,RCX
ADD RAX,qword ptr [RSP + -0x68]
MOV qword ptr [RSP + -0x70],RAX
MOV RAX,qword ptr [RSP + -0x38]
IMUL RAX,qword ptr [RSP + -0x10]
IMUL RAX,qword ptr [RSP + -0x8]
MOV RCX,qword ptr [RSP + -0x40]
IMUL RCX,qword ptr [RSP + -0x8]
ADD RAX,RCX
ADD RAX,qword ptr [RSP + -0x48]
MOV qword ptr [RSP + -0x78],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0xf8]
MOV RCX,qword ptr [RSP + -0x70]
VMOVSS XMM0,dword ptr [RAX + RCX*0x4]
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0xf8]
MOV RCX,qword ptr [RSP + -0x78]
VMOVSS dword ptr [RAX + RCX*0x4],XMM0
MOV RAX,qword ptr [RSP + -0x48]
ADD RAX,0x1
MOV qword ptr [RSP + -0x48],RAX
JMP 0x001a31ae
LAB_001a32cb:
JMP 0x001a32cd
LAB_001a32cd:
MOV RAX,qword ptr [RSP + -0x40]
ADD RAX,0x1
MOV qword ptr [RSP + -0x40],RAX
JMP 0x001a3195
LAB_001a32e0:
JMP 0x001a32e2
LAB_001a32e2:
MOV RAX,qword ptr [RSP + -0x38]
ADD RAX,0x1
MOV qword ptr [RSP + -0x38],RAX
JMP 0x001a317c
LAB_001a32f5:
ADD RSP,0x38
RET
|
/* ggml_compute_forward_win_unpart_f32(ggml_compute_params const*, ggml_tensor*) */
void ggml_compute_forward_win_unpart_f32(ggml_compute_params *param_1,ggml_tensor *param_2)
{
int iVar1;
long lVar2;
long lVar3;
long lVar4;
long lVar5;
long lVar6;
long lVar7;
long lVar8;
long local_80;
long local_78;
long local_70;
lVar2 = *(long *)(param_2 + 0x98);
lVar3 = *(long *)(lVar2 + 0x10);
lVar4 = *(long *)(lVar2 + 0x18);
lVar5 = *(long *)(lVar2 + 0x20);
lVar6 = *(long *)(param_2 + 0x10);
lVar7 = *(long *)(param_2 + 0x18);
lVar8 = *(long *)(param_2 + 0x20);
iVar1 = *(int *)(param_2 + 0x54);
for (local_70 = 0; local_70 < lVar8; local_70 = local_70 + 1) {
for (local_78 = 0; local_78 < lVar7; local_78 = local_78 + 1) {
for (local_80 = 0; local_80 < lVar6; local_80 = local_80 + 1) {
*(int4 *)
(*(long *)(param_2 + 0xf8) + (local_70 * lVar7 * lVar6 + local_78 * lVar6 + local_80) * 4)
= *(int4 *)
(*(long *)(lVar2 + 0xf8) +
(((int)(local_70 / (long)iVar1) *
(int)(((int)(((long)iVar1 - lVar7 % (long)iVar1) % (long)iVar1) + lVar7) /
(long)iVar1) + (int)(local_78 / (long)iVar1)) * lVar5 * lVar4 * lVar3 +
(local_70 % (long)iVar1) * lVar4 * lVar3 + (local_78 % (long)iVar1) * lVar3 +
local_80) * 4);
}
}
}
return;
}
|
|
61,019
|
ma_alloc_buffer
|
eloqsql/storage/maria/ma_open.c
|
my_bool _ma_alloc_buffer(uchar **old_addr, size_t *old_size,
size_t new_size, myf flag)
{
if (*old_size < new_size)
{
uchar *addr;
if (!(addr= (uchar*) my_realloc(PSI_INSTRUMENT_ME, *old_addr, new_size,
MYF(MY_ALLOW_ZERO_PTR | flag))))
return 1;
*old_addr= addr;
*old_size= new_size;
}
return 0;
}
|
O0
|
c
|
ma_alloc_buffer:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
cmpq -0x20(%rbp), %rax
jae 0x654f5
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
orq $0x40, %rcx
xorl %edi, %edi
callq 0xf3a00
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x654df
movb $0x1, -0x1(%rbp)
jmp 0x654f9
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ma_alloc_buffer:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_18]
mov rax, [rax]
cmp rax, [rbp+var_20]
jnb short loc_654F5
mov rax, [rbp+var_10]
mov rsi, [rax]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
or rcx, 40h
xor edi, edi
call my_realloc
mov [rbp+var_30], rax
cmp rax, 0
jnz short loc_654DF
mov [rbp+var_1], 1
jmp short loc_654F9
loc_654DF:
mov rcx, [rbp+var_30]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_18]
mov [rax], rcx
loc_654F5:
mov [rbp+var_1], 0
loc_654F9:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
|
char ma_alloc_buffer(long long *a1, unsigned long long *a2, unsigned long long a3, long long a4)
{
long long v5; // [rsp+0h] [rbp-30h]
if ( *a2 >= a3 )
return 0;
v5 = my_realloc(0LL, *a1, a3, a4 | 0x40);
if ( v5 )
{
*a1 = v5;
*a2 = a3;
return 0;
}
return 1;
}
|
_ma_alloc_buffer:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x001654f5
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
OR RCX,0x40
XOR EDI,EDI
CALL 0x001f3a00
MOV qword ptr [RBP + -0x30],RAX
CMP RAX,0x0
JNZ 0x001654df
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001654f9
LAB_001654df:
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
LAB_001654f5:
MOV byte ptr [RBP + -0x1],0x0
LAB_001654f9:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 _ma_alloc_buffer(long *param_1,ulong *param_2,ulong param_3,ulong param_4)
{
long lVar1;
if (*param_2 < param_3) {
lVar1 = my_realloc(0,*param_1,param_3,param_4 | 0x40);
if (lVar1 == 0) {
return 1;
}
*param_1 = lVar1;
*param_2 = param_3;
}
return 0;
}
|
|
61,020
|
bool httplib::detail::write_content<httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)::'lambda'()>(httplib::Stream&, std::function<bool (unsigned long, unsigned long, httplib::DataSink&)> const&, unsigned long, unsigned long, httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)::'lambda'(), httplib::Error&)
|
nickolajgrishuk[P]metricz-cpp/build_O1/_deps/httplib-src/httplib.h
|
inline bool write_content(Stream &strm, const ContentProvider &content_provider,
size_t offset, size_t length, T is_shutting_down,
Error &error) {
size_t end_offset = offset + length;
auto ok = true;
DataSink data_sink;
data_sink.write = [&](const char *d, size_t l) -> bool {
if (ok) {
if (strm.is_writable() && write_data(strm, d, l)) {
offset += l;
} else {
ok = false;
}
}
return ok;
};
while (offset < end_offset && !is_shutting_down()) {
if (!strm.is_writable()) {
error = Error::Write;
return false;
} else if (!content_provider(offset, end_offset - offset, data_sink)) {
error = Error::Canceled;
return false;
} else if (!ok) {
error = Error::Write;
return false;
}
}
error = Error::Success;
return true;
}
|
O1
|
c
|
bool httplib::detail::write_content<httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)::'lambda'()>(httplib::Stream&, std::function<bool (unsigned long, unsigned long, httplib::DataSink&)> const&, unsigned long, unsigned long, httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&, httplib::Response&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)::'lambda'(), httplib::Error&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d8, %rsp # imm = 0x1D8
movq %r9, 0x18(%rsp)
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r13
leaq 0x10(%rsp), %rax
movq %rdx, (%rax)
leaq 0xf(%rsp), %rbp
movb $0x1, (%rbp)
leaq 0x40(%rsp), %rdi
callq 0x1f064
leaq 0x28(%rsp), %rsi
movq %rbp, (%rsi)
movq %r13, 0x8(%rsi)
leaq 0x10(%rsp), %rax
movq %rax, 0x10(%rsi)
leaq 0x40(%rsp), %rdi
callq 0x1f124
addq %rbx, %r15
movb $0x1, %bpl
xorl %ebx, %ebx
cmpq %r15, 0x10(%rsp)
jae 0x1efc4
movl 0x28(%r14), %eax
cmpl $-0x1, %eax
je 0x1efc4
movq (%r13), %rax
movq %r13, %rdi
callq *0x18(%rax)
movl $0x5, %ebx
testb %al, %al
je 0x1efc2
movq 0x10(%rsp), %rax
movq %r15, %rcx
subq %rax, %rcx
movq %rax, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
cmpq $0x0, 0x10(%r12)
je 0x1f03c
movq %r12, %rdi
leaq 0x28(%rsp), %rsi
leaq 0x20(%rsp), %rdx
leaq 0x40(%rsp), %rcx
callq *0x18(%r12)
testb %al, %al
je 0x1efbd
cmpb $0x0, 0xf(%rsp)
jne 0x1ef50
jmp 0x1efc2
movl $0x7, %ebx
xorl %ebp, %ebp
movq 0x18(%rsp), %rax
movl %ebx, (%rax)
movq 0x20fae(%rip), %rax # 0x3ff80
addq $0x10, %rax
leaq 0x1c8(%rsp), %rdi
movq %rax, -0x38(%rdi)
callq 0x87c0
leaq 0x88(%rsp), %rbx
movq %rbx, %rdi
callq 0x81c0
movq -0x18(%rbx), %rax
testq %rax, %rax
je 0x1f00f
leaq 0x60(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0x1f028
leaq 0x40(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movl %ebp, %eax
addq $0x1d8, %rsp # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x81f0
jmp 0x1f043
movq %rax, %rdi
callq 0x9349
jmp 0x1f04f
jmp 0x1f04f
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x1f1c4
movq %rbx, %rdi
callq 0x8990
|
_ZN7httplib6detail13write_contentIZNS_6Server27write_content_with_providerERNS_6StreamERKNS_7RequestERNS_8ResponseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESH_EUlvE_EEbS4_RKSt8functionIFbmmRNS_8DataSinkEEEmmT_RNS_5ErrorE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1D8h
mov [rsp+208h+var_1F0], r9
mov r14, r8
mov r15, rcx
mov rbx, rdx
mov r12, rsi
mov r13, rdi
lea rax, [rsp+208h+var_1F8]
mov [rax], rdx
lea rbp, [rsp+208h+var_1F9]
mov byte ptr [rbp+0], 1
lea rdi, [rsp+208h+var_1C8]; this
call _ZN7httplib8DataSinkC2Ev; httplib::DataSink::DataSink(void)
lea rsi, [rsp+208h+var_1E0]
mov [rsi], rbp
mov [rsi+8], r13
lea rax, [rsp+208h+var_1F8]
mov [rsi+10h], rax
lea rdi, [rsp+208h+var_1C8]
call _ZNSt8functionIFbPKcmEEaSIZN7httplib6detail13write_contentIZNS5_6Server27write_content_with_providerERNS5_6StreamERKNS5_7RequestERNS5_8ResponseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESN_EUlvE_EEbSA_RKS_IFbmmRNS5_8DataSinkEEEmmT_RNS5_5ErrorEEUlS1_mE_EENSt9enable_ifIXsrNS3_9_CallableISV_NSZ_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISV_E4typeEE4typeES3_EE5valueESt5decayISV_EE4type4typeESt15__invoke_resultIRS1B_JS1_mEEEE5valueERS3_E4typeEOSV_
add r15, rbx
loc_1EF50:
mov bpl, 1
xor ebx, ebx
cmp [rsp+208h+var_1F8], r15
jnb short loc_1EFC4
mov eax, [r14+28h]
cmp eax, 0FFFFFFFFh
jz short loc_1EFC4
mov rax, [r13+0]
mov rdi, r13
call qword ptr [rax+18h]
mov ebx, 5
test al, al
jz short loc_1EFC2
mov rax, [rsp+208h+var_1F8]
mov rcx, r15
sub rcx, rax
mov [rsp+208h+var_1E0], rax
mov [rsp+208h+var_1E8], rcx
cmp qword ptr [r12+10h], 0
jz loc_1F03C
mov rdi, r12
lea rsi, [rsp+208h+var_1E0]
lea rdx, [rsp+208h+var_1E8]
lea rcx, [rsp+208h+var_1C8]
call qword ptr [r12+18h]
test al, al
jz short loc_1EFBD
cmp [rsp+208h+var_1F9], 0
jnz short loc_1EF50
jmp short loc_1EFC2
loc_1EFBD:
mov ebx, 7
loc_1EFC2:
xor ebp, ebp
loc_1EFC4:
mov rax, [rsp+208h+var_1F0]
mov [rax], ebx
mov rax, cs:_ZTVSt15basic_streambufIcSt11char_traitsIcEE_ptr
add rax, 10h
lea rdi, [rsp+208h+var_40]; this
mov [rdi-38h], rax
call __ZNSt6localeD1Ev; std::locale::~locale()
lea rbx, [rsp+208h+var_180]
mov rdi, rbx; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rax, [rbx-18h]
test rax, rax
jz short loc_1F00F
lea rdi, [rsp+208h+var_1A8]
mov rsi, rdi
mov edx, 3
call rax
loc_1F00F:
mov rax, [rsp+208h+var_1B8]
test rax, rax
jz short loc_1F028
lea rdi, [rsp+208h+var_1C8]
mov rsi, rdi
mov edx, 3
call rax
loc_1F028:
mov eax, ebp
add rsp, 1D8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_1F03C:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
jmp short $+2
loc_1F043:
mov rdi, rax
call __clang_call_terminate
jmp short loc_1F04F
jmp short $+2
loc_1F04F:
mov rbx, rax
lea rdi, [rsp+208h+var_1C8]; this
call _ZN7httplib8DataSinkD2Ev; httplib::DataSink::~DataSink()
mov rdi, rbx
call __Unwind_Resume
|
long long httplib::detail::write_content<httplib::Server::write_content_with_provider(httplib::Stream &,httplib::Request const&,httplib::Response &,std::string const&,std::string const&)::{lambda(void)#1}>(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
long long a5,
int *a6)
{
char *v9; // rbp
unsigned long long v10; // r15
int v11; // ebx
char v13; // [rsp+Fh] [rbp-1F9h] BYREF
unsigned long long v14; // [rsp+10h] [rbp-1F8h] BYREF
int *v15; // [rsp+18h] [rbp-1F0h]
unsigned long long v16; // [rsp+20h] [rbp-1E8h] BYREF
_QWORD v17[3]; // [rsp+28h] [rbp-1E0h] BYREF
_BYTE v18[16]; // [rsp+40h] [rbp-1C8h] BYREF
void ( *v19)(_BYTE *, _BYTE *, long long); // [rsp+50h] [rbp-1B8h]
_BYTE v20[16]; // [rsp+60h] [rbp-1A8h] BYREF
void ( *v21)(_BYTE *, _BYTE *, long long); // [rsp+70h] [rbp-198h]
char v22[264]; // [rsp+88h] [rbp-180h] BYREF
char *v23; // [rsp+190h] [rbp-78h]
char v24[64]; // [rsp+1C8h] [rbp-40h] BYREF
v15 = a6;
v14 = a3;
v9 = &v13;
v13 = 1;
httplib::DataSink::DataSink((httplib::DataSink *)v18);
v17[0] = &v13;
v17[1] = a1;
v17[2] = &v14;
std::function<bool ()(char const*,unsigned long)>::operator=<bool httplib::detail::write_content<httplib::Server::write_content_with_provider(httplib::Stream &,httplib::Request const&,httplib::Response &,std::string const&,std::string const&)::{lambda(void)#1}>(httplib::Stream &,std::function const&<bool ()(unsigned long,unsigned long,httplib::DataSink &)>,unsigned long,unsigned long,httplib::Server::write_content_with_provider(httplib::Stream &,httplib::Request const&,httplib::Response &,std::string const&,std::string const&)::{lambda(void)#1},httplib::Error &)::{lambda(char const*,unsigned long)#1}>(v18);
v10 = a3 + a4;
while ( 1 )
{
LOBYTE(v9) = 1;
v11 = 0;
if ( v14 >= v10 || *(_DWORD *)(a5 + 40) == -1 )
break;
v11 = 5;
if ( !(*(unsigned __int8 ( **)(long long))(*(_QWORD *)a1 + 24LL))(a1) )
goto LABEL_10;
v17[0] = v14;
v16 = v10 - v14;
if ( !*(_QWORD *)(a2 + 16) )
std::__throw_bad_function_call();
if ( !(*(unsigned __int8 ( **)(long long, _QWORD *, unsigned long long *, _BYTE *))(a2 + 24))(
a2,
v17,
&v16,
v18) )
{
v11 = 7;
LABEL_10:
LODWORD(v9) = 0;
break;
}
if ( !v13 )
goto LABEL_10;
}
*v15 = v11;
v23 = (char *)&`vtable for'std::streambuf + 16;
std::locale::~locale((std::locale *)v24);
std::ios_base::~ios_base((std::ios_base *)v22);
if ( v21 )
v21(v20, v20, 3LL);
if ( v19 )
v19(v18, v18, 3LL);
return (unsigned int)v9;
}
|
write_content<httplib::Server::write_content_with_provider(httplib::Stream&,httplib::Request_const&,httplib::Response&,std::__cxx11::string_const&,std::__cxx11::string_const&)::{lambda()#1}>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1d8
MOV qword ptr [RSP + 0x18],R9
MOV R14,R8
MOV R15,RCX
MOV RBX,RDX
MOV R12,RSI
MOV R13,RDI
LEA RAX,[RSP + 0x10]
MOV qword ptr [RAX],RDX
LEA RBP,[RSP + 0xf]
MOV byte ptr [RBP],0x1
LEA RDI,[RSP + 0x40]
CALL 0x0011f064
LEA RSI,[RSP + 0x28]
MOV qword ptr [RSI],RBP
MOV qword ptr [RSI + 0x8],R13
LEA RAX,[RSP + 0x10]
MOV qword ptr [RSI + 0x10],RAX
LAB_0011ef43:
LEA RDI,[RSP + 0x40]
CALL 0x0011f124
ADD R15,RBX
LAB_0011ef50:
MOV BPL,0x1
XOR EBX,EBX
CMP qword ptr [RSP + 0x10],R15
JNC 0x0011efc4
MOV EAX,dword ptr [R14 + 0x28]
CMP EAX,-0x1
JZ 0x0011efc4
MOV RAX,qword ptr [R13]
LAB_0011ef69:
MOV RDI,R13
CALL qword ptr [RAX + 0x18]
MOV EBX,0x5
TEST AL,AL
JZ 0x0011efc2
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,R15
SUB RCX,RAX
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x20],RCX
CMP qword ptr [R12 + 0x10],0x0
JZ 0x0011f03c
MOV RDI,R12
LEA RSI,[RSP + 0x28]
LEA RDX,[RSP + 0x20]
LEA RCX,[RSP + 0x40]
CALL qword ptr [R12 + 0x18]
TEST AL,AL
JZ 0x0011efbd
CMP byte ptr [RSP + 0xf],0x0
JNZ 0x0011ef50
JMP 0x0011efc2
LAB_0011efbd:
MOV EBX,0x7
LAB_0011efc2:
XOR EBP,EBP
LAB_0011efc4:
MOV RAX,qword ptr [RSP + 0x18]
MOV dword ptr [RAX],EBX
MOV RAX,qword ptr [0x0013ff80]
ADD RAX,0x10
LEA RDI,[RSP + 0x1c8]
MOV qword ptr [RDI + -0x38],RAX
CALL 0x001087c0
LEA RBX,[RSP + 0x88]
MOV RDI,RBX
CALL 0x001081c0
MOV RAX,qword ptr [RBX + -0x18]
TEST RAX,RAX
JZ 0x0011f00f
LEA RDI,[RSP + 0x60]
LAB_0011f005:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_0011f00f:
MOV RAX,qword ptr [RSP + 0x50]
TEST RAX,RAX
JZ 0x0011f028
LAB_0011f019:
LEA RDI,[RSP + 0x40]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_0011f028:
MOV EAX,EBP
ADD RSP,0x1d8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0011f03c:
CALL 0x001081f0
|
/* bool
httplib::detail::write_content<httplib::Server::write_content_with_provider(httplib::Stream&,
httplib::Request const&, httplib::Response&, std::__cxx11::string const&, std::__cxx11::string
const&)::{lambda()#1}>(httplib::Stream&, std::function<bool (unsigned long, unsigned long,
httplib::DataSink&)> const&, unsigned long, unsigned long,
httplib::Server::write_content_with_provider(httplib::Stream&, httplib::Request const&,
httplib::Response&, std::__cxx11::string const&, std::__cxx11::string const&)::{lambda()#1},
httplib::Error&) */
bool httplib::detail::
write_content<httplib::Server::write_content_with_provider(httplib::Stream&,httplib::Request_const&,httplib::Response&,std::__cxx11::string_const&,std::__cxx11::string_const&)::_lambda()_1_>
(long *param_1,long param_2,char *param_3,long param_4,long param_5,
int4 *param_6)
{
char cVar1;
int4 uVar2;
bool bVar3;
char local_1f9;
char *local_1f8;
int4 *local_1f0;
long local_1e8;
char *local_1e0;
long *local_1d8;
int1 **local_1d0;
DataSink local_1c8 [16];
code *local_1b8;
int1 local_1a8 [16];
code *local_198;
ios_base local_180 [264];
int *local_78;
locale local_40 [16];
local_1f9 = '\x01';
local_1f8 = param_3;
local_1f0 = param_6;
DataSink::DataSink(local_1c8);
local_1d0 = &local_1f8;
/* try { // try from 0011ef43 to 0011ef4c has its CatchHandler @ 0011f04b */
local_1e0 = &local_1f9;
local_1d8 = param_1;
std::function<bool(char_const*,unsigned_long)>::operator=
((function<bool(char_const*,unsigned_long)> *)local_1c8,
(_lambda_char_const__unsigned_long__1_ *)&local_1e0);
while( true ) {
bVar3 = true;
uVar2 = 0;
if ((param_3 + param_4 <= local_1f8) || (uVar2 = 0, *(int *)(param_5 + 0x28) == -1))
goto LAB_0011efc4;
/* try { // try from 0011ef69 to 0011efaf has its CatchHandler @ 0011f04f */
cVar1 = (**(code **)(*param_1 + 0x18))(param_1);
uVar2 = 5;
if (cVar1 == '\0') goto LAB_0011efc2;
local_1e8 = (long)(param_3 + param_4) - (long)local_1f8;
local_1e0 = local_1f8;
if (*(long *)(param_2 + 0x10) == 0) {
/* WARNING: Subroutine does not return */
/* try { // try from 0011f03c to 0011f040 has its CatchHandler @ 0011f04d */
std::__throw_bad_function_call();
}
cVar1 = (**(code **)(param_2 + 0x18))(param_2,&local_1e0,&local_1e8,local_1c8);
if (cVar1 == '\0') break;
if (local_1f9 == '\0') {
LAB_0011efc2:
bVar3 = false;
LAB_0011efc4:
*local_1f0 = uVar2;
local_78 = PTR_vtable_0013ff80 + 0x10;
std::locale::~locale(local_40);
std::ios_base::~ios_base(local_180);
if (local_198 != (code *)0x0) {
/* try { // try from 0011f005 to 0011f00e has its CatchHandler @ 0011f043 */
(*local_198)(local_1a8,local_1a8,3);
}
if (local_1b8 != (code *)0x0) {
/* try { // try from 0011f019 to 0011f027 has its CatchHandler @ 0011f041 */
(*local_1b8)(local_1c8,local_1c8,3);
}
return bVar3;
}
}
uVar2 = 7;
goto LAB_0011efc2;
}
|
|
61,021
|
js_function_proto_int32
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_function_proto_int32(JSContext *ctx,
JSValue this_val,
int magic)
{
JSFunctionBytecode *b = JS_GetFunctionBytecode(this_val);
if (b) {
int *field = (int *) ((char *)b + magic);
return js_int32(*field);
}
return JS_UNDEFINED;
}
|
O1
|
c
|
js_function_proto_int32:
movq %rsi, -0x8(%rsp)
cmpl $-0x1, %edx
jne 0x71cf7
movq -0x8(%rsp), %rdx
movzwl 0x6(%rdx), %esi
xorl %eax, %eax
cmpq $0x38, %rsi
ja 0x71cf9
movabsq $0x110000000012000, %rdi # imm = 0x110000000012000
btq %rsi, %rdi
jae 0x71cf9
movq 0x30(%rdx), %rax
jmp 0x71cf9
xorl %eax, %eax
testq %rax, %rax
je 0x71d07
movslq %ecx, %rcx
movl (%rax,%rcx), %eax
xorl %edx, %edx
retq
movl $0x3, %edx
xorl %eax, %eax
retq
|
js_function_proto_int32:
mov [rsp+var_8], rsi
cmp edx, 0FFFFFFFFh
jnz short loc_71CF7
mov rdx, [rsp+var_8]
movzx esi, word ptr [rdx+6]
xor eax, eax
cmp rsi, 38h ; '8'
ja short loc_71CF9
mov rdi, 110000000012000h
bt rdi, rsi
jnb short loc_71CF9
mov rax, [rdx+30h]
jmp short loc_71CF9
loc_71CF7:
xor eax, eax
loc_71CF9:
test rax, rax
jz short loc_71D07
movsxd rcx, ecx
mov eax, [rax+rcx]
xor edx, edx
retn
loc_71D07:
mov edx, 3
xor eax, eax
retn
|
long long js_function_proto_int32(long long a1, long long a2, int a3, int a4)
{
unsigned long long v4; // rsi
long long v5; // rax
long long v6; // rdi
if ( a3 == -1 )
{
v4 = *(unsigned __int16 *)(a2 + 6);
v5 = 0LL;
if ( v4 <= 0x38 )
{
v6 = 0x110000000012000LL;
if ( _bittest64(&v6, v4) )
v5 = *(_QWORD *)(a2 + 48);
}
}
else
{
v5 = 0LL;
}
if ( v5 )
return *(unsigned int *)(v5 + a4);
else
return 0LL;
}
| |||
61,022
|
js_function_proto_int32
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_function_proto_int32(JSContext *ctx,
JSValue this_val,
int magic)
{
JSFunctionBytecode *b = JS_GetFunctionBytecode(this_val);
if (b) {
int *field = (int *) ((char *)b + magic);
return js_int32(*field);
}
return JS_UNDEFINED;
}
|
O2
|
c
|
js_function_proto_int32:
movq %rdx, %rax
pushq $0x3
popq %rdx
cmpl $-0x1, %eax
jne 0x5feb1
movzwl 0x6(%rsi), %edi
xorl %eax, %eax
cmpq $0x38, %rdi
ja 0x5feb3
movabsq $0x110000000012000, %r8 # imm = 0x110000000012000
btq %rdi, %r8
jae 0x5feb3
movq 0x30(%rsi), %rax
testq %rax, %rax
je 0x5feb1
movslq %ecx, %rcx
movl (%rax,%rcx), %eax
xorl %edx, %edx
retq
xorl %eax, %eax
retq
|
js_function_proto_int32:
mov rax, rdx
push 3
pop rdx
cmp eax, 0FFFFFFFFh
jnz short loc_5FEB1
movzx edi, word ptr [rsi+6]
xor eax, eax
cmp rdi, 38h ; '8'
ja short locret_5FEB3
mov r8, 110000000012000h
bt r8, rdi
jnb short locret_5FEB3
mov rax, [rsi+30h]
test rax, rax
jz short loc_5FEB1
movsxd rcx, ecx
mov eax, [rax+rcx]
xor edx, edx
retn
loc_5FEB1:
xor eax, eax
locret_5FEB3:
retn
|
long long js_function_proto_int32(long long a1, long long a2, int a3, int a4)
{
unsigned long long v4; // rdi
long long result; // rax
long long v6; // r8
long long v7; // rax
if ( a3 != -1 )
return 0LL;
v4 = *(unsigned __int16 *)(a2 + 6);
result = 0LL;
if ( v4 <= 0x38 )
{
v6 = 0x110000000012000LL;
if ( _bittest64(&v6, v4) )
{
v7 = *(_QWORD *)(a2 + 48);
if ( v7 )
return *(unsigned int *)(v7 + a4);
return 0LL;
}
}
return result;
}
|
js_function_proto_int32:
MOV RAX,RDX
PUSH 0x3
POP RDX
CMP EAX,-0x1
JNZ 0x0015feb1
MOVZX EDI,word ptr [RSI + 0x6]
XOR EAX,EAX
CMP RDI,0x38
JA 0x0015feb3
MOV R8,0x110000000012000
BT R8,RDI
JNC 0x0015feb3
MOV RAX,qword ptr [RSI + 0x30]
TEST RAX,RAX
JZ 0x0015feb1
MOVSXD RCX,ECX
MOV EAX,dword ptr [RAX + RCX*0x1]
XOR EDX,EDX
RET
LAB_0015feb1:
XOR EAX,EAX
LAB_0015feb3:
RET
|
int1 [16] js_function_proto_int32(int8 param_1,long param_2,int param_3,int param_4)
{
if ((((param_3 == -1) && ((ulong)*(ushort *)(param_2 + 6) < 0x39)) &&
((0x110000000012000U >> ((ulong)*(ushort *)(param_2 + 6) & 0x3f) & 1) != 0)) &&
(*(long *)(param_2 + 0x30) != 0)) {
return ZEXT416(*(uint *)(*(long *)(param_2 + 0x30) + (long)param_4));
}
return ZEXT816(3) << 0x40;
}
|
|
61,023
|
js_function_proto_int32
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_function_proto_int32(JSContext *ctx,
JSValue this_val,
int magic)
{
JSFunctionBytecode *b = JS_GetFunctionBytecode(this_val);
if (b) {
int *field = (int *) ((char *)b + magic);
return js_int32(*field);
}
return JS_UNDEFINED;
}
|
O3
|
c
|
js_function_proto_int32:
movq %rdx, %rax
movl $0x3, %edx
cmpl $-0x1, %eax
jne 0x743c6
movzwl 0x6(%rsi), %edi
xorl %eax, %eax
cmpq $0x38, %rdi
ja 0x743c8
movabsq $0x110000000012000, %r8 # imm = 0x110000000012000
btq %rdi, %r8
jae 0x743c8
movq 0x30(%rsi), %rax
testq %rax, %rax
je 0x743c6
movslq %ecx, %rcx
movl (%rax,%rcx), %eax
xorl %edx, %edx
retq
xorl %eax, %eax
retq
|
js_function_proto_int32:
mov rax, rdx
mov edx, 3
cmp eax, 0FFFFFFFFh
jnz short loc_743C6
movzx edi, word ptr [rsi+6]
xor eax, eax
cmp rdi, 38h ; '8'
ja short locret_743C8
mov r8, 110000000012000h
bt r8, rdi
jnb short locret_743C8
mov rax, [rsi+30h]
test rax, rax
jz short loc_743C6
movsxd rcx, ecx
mov eax, [rax+rcx]
xor edx, edx
retn
loc_743C6:
xor eax, eax
locret_743C8:
retn
|
long long js_function_proto_int32(long long a1, long long a2, int a3, int a4)
{
unsigned long long v4; // rdi
long long result; // rax
long long v6; // r8
long long v7; // rax
if ( a3 != -1 )
return 0LL;
v4 = *(unsigned __int16 *)(a2 + 6);
result = 0LL;
if ( v4 <= 0x38 )
{
v6 = 0x110000000012000LL;
if ( _bittest64(&v6, v4) )
{
v7 = *(_QWORD *)(a2 + 48);
if ( v7 )
return *(unsigned int *)(v7 + a4);
return 0LL;
}
}
return result;
}
|
js_function_proto_int32:
MOV RAX,RDX
MOV EDX,0x3
CMP EAX,-0x1
JNZ 0x001743c6
MOVZX EDI,word ptr [RSI + 0x6]
XOR EAX,EAX
CMP RDI,0x38
JA 0x001743c8
MOV R8,0x110000000012000
BT R8,RDI
JNC 0x001743c8
MOV RAX,qword ptr [RSI + 0x30]
TEST RAX,RAX
JZ 0x001743c6
MOVSXD RCX,ECX
MOV EAX,dword ptr [RAX + RCX*0x1]
XOR EDX,EDX
RET
LAB_001743c6:
XOR EAX,EAX
LAB_001743c8:
RET
|
int1 [16] js_function_proto_int32(int8 param_1,long param_2,int param_3,int param_4)
{
if ((((param_3 == -1) && ((ulong)*(ushort *)(param_2 + 6) < 0x39)) &&
((0x110000000012000U >> ((ulong)*(ushort *)(param_2 + 6) & 0x3f) & 1) != 0)) &&
(*(long *)(param_2 + 0x30) != 0)) {
return ZEXT416(*(uint *)(*(long *)(param_2 + 0x30) + (long)param_4));
}
return ZEXT816(3) << 0x40;
}
|
|
61,024
|
bitmap_subtract
|
eloqsql/mysys/my_bitmap.c
|
void bitmap_subtract(MY_BITMAP *map, const MY_BITMAP *map2)
{
my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end;
DBUG_ASSERT(map->bitmap);
DBUG_ASSERT(map2->bitmap);
DBUG_ASSERT(map->n_bits==map2->n_bits);
end= map->last_word_ptr;
while (to <= end)
*to++ &= ~(*from++);
}
|
O0
|
c
|
bitmap_subtract:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x11db24
jmp 0x11db26
jmp 0x11db28
jmp 0x11db2a
jmp 0x11db2c
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
ja 0x11db6b
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x20(%rbp)
movl (%rax), %ecx
xorl $-0x1, %ecx
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x18(%rbp)
andl (%rax), %ecx
movl %ecx, (%rax)
jmp 0x11db38
popq %rbp
retq
nopl (%rax)
|
bitmap_subtract:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_18], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_20], rax
jmp short $+2
loc_11DB24:
jmp short $+2
loc_11DB26:
jmp short $+2
loc_11DB28:
jmp short $+2
loc_11DB2A:
jmp short $+2
loc_11DB2C:
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_28], rax
loc_11DB38:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_28]
ja short loc_11DB6B
mov rax, [rbp+var_20]
mov rcx, rax
add rcx, 4
mov [rbp+var_20], rcx
mov ecx, [rax]
xor ecx, 0FFFFFFFFh
mov rax, [rbp+var_18]
mov rdx, rax
add rdx, 4
mov [rbp+var_18], rdx
and ecx, [rax]
mov [rax], ecx
jmp short loc_11DB38
loc_11DB6B:
pop rbp
retn
|
_DWORD * bitmap_subtract(_QWORD *a1, _QWORD *a2)
{
_DWORD *result; // rax
_DWORD *v3; // rax
int v4; // ecx
_DWORD *v5; // rax
unsigned long long v6; // [rsp+0h] [rbp-28h]
_DWORD *v7; // [rsp+8h] [rbp-20h]
_DWORD *v8; // [rsp+10h] [rbp-18h]
v8 = (_DWORD *)*a1;
v7 = (_DWORD *)*a2;
v6 = a1[1];
while ( 1 )
{
result = v8;
if ( (unsigned long long)v8 > v6 )
break;
v3 = v7++;
v4 = ~*v3;
v5 = v8++;
*v5 &= v4;
}
return result;
}
| |||
61,025
|
bitmap_subtract
|
eloqsql/mysys/my_bitmap.c
|
void bitmap_subtract(MY_BITMAP *map, const MY_BITMAP *map2)
{
my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end;
DBUG_ASSERT(map->bitmap);
DBUG_ASSERT(map2->bitmap);
DBUG_ASSERT(map->n_bits==map2->n_bits);
end= map->last_word_ptr;
while (to <= end)
*to++ &= ~(*from++);
}
|
O3
|
c
|
bitmap_subtract:
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
cmpq %rcx, %rax
ja 0xbec8a
pushq %rbp
movq %rsp, %rbp
movq (%rsi), %rdx
movl (%rdx), %esi
notl %esi
andl %esi, (%rax)
addq $0x4, %rdx
addq $0x4, %rax
cmpq %rcx, %rax
jbe 0xbec76
popq %rbp
retq
|
bitmap_subtract:
mov rax, [rdi]
mov rcx, [rdi+8]
cmp rax, rcx
ja short locret_BEC8A
push rbp
mov rbp, rsp
mov rdx, [rsi]
loc_BEC76:
mov esi, [rdx]
not esi
and [rax], esi
add rdx, 4
add rax, 4
cmp rax, rcx
jbe short loc_BEC76
pop rbp
locret_BEC8A:
retn
|
_DWORD * bitmap_subtract(long long a1, _DWORD **a2)
{
_DWORD *result; // rax
unsigned long long v3; // rcx
_DWORD *v4; // rdx
result = *(_DWORD **)a1;
v3 = *(_QWORD *)(a1 + 8);
if ( *(_QWORD *)a1 <= v3 )
{
v4 = *a2;
do
*result++ &= ~*v4++;
while ( (unsigned long long)result <= v3 );
}
return result;
}
|
bitmap_subtract:
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
CMP RAX,RCX
JA 0x001bec8a
PUSH RBP
MOV RBP,RSP
MOV RDX,qword ptr [RSI]
LAB_001bec76:
MOV ESI,dword ptr [RDX]
NOT ESI
AND dword ptr [RAX],ESI
ADD RDX,0x4
ADD RAX,0x4
CMP RAX,RCX
JBE 0x001bec76
POP RBP
LAB_001bec8a:
RET
|
void bitmap_subtract(int8 *param_1,int8 *param_2)
{
uint *puVar1;
uint *puVar2;
uint *puVar3;
puVar2 = (uint *)*param_1;
puVar1 = (uint *)param_1[1];
if (puVar2 <= puVar1) {
puVar3 = (uint *)*param_2;
do {
*puVar2 = *puVar2 & ~*puVar3;
puVar3 = puVar3 + 1;
puVar2 = puVar2 + 1;
} while (puVar2 <= puVar1);
}
return;
}
|
|
61,026
|
find_longest_bitstream
|
eloqsql/storage/myisam/mi_packrec.c
|
static uint find_longest_bitstream(uint16 *table, uint16 *end)
{
uint length= 1;
uint length2;
if (!(*table & IS_CHAR))
{
uint16 *next= table + *table;
if (next > end || next == table)
{
DBUG_PRINT("error", ("ERROR: illegal pointer in decode tree"));
return OFFSET_TABLE_SIZE;
}
length= find_longest_bitstream(next, end) + 1;
}
table++;
if (!(*table & IS_CHAR))
{
uint16 *next= table + *table;
if (next > end || next == table)
{
DBUG_PRINT("error", ("ERROR: illegal pointer in decode tree"));
return OFFSET_TABLE_SIZE;
}
length2= find_longest_bitstream(next, end) + 1;
length=MY_MAX(length,length2);
}
return length;
}
|
O3
|
c
|
find_longest_bitstream:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movswq (%rdi), %rax
testq %rax, %rax
js 0x85194
leaq (%r14,%rax,2), %rdi
cmpq %rbx, %rdi
seta %cl
testw %ax, %ax
sete %al
orb %cl, %al
movl $0x200, %eax # imm = 0x200
jne 0x851d7
movq %rbx, %rsi
callq 0x85152
movl %eax, %r15d
incl %r15d
jmp 0x8519a
movl $0x1, %r15d
movswq 0x2(%r14), %rax
testq %rax, %rax
js 0x851d4
addq $0x2, %r14
leaq (%r14,%rax,2), %rdi
cmpq %rbx, %rdi
setbe %cl
testw %ax, %ax
setne %dl
movl $0x200, %eax # imm = 0x200
testb %cl, %dl
je 0x851d7
movq %rbx, %rsi
callq 0x85152
incl %eax
cmpl %eax, %r15d
cmoval %r15d, %eax
jmp 0x851d7
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
find_longest_bitstream_0:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
movsx rax, word ptr [rdi]
test rax, rax
js short loc_85194
lea rdi, [r14+rax*2]
cmp rdi, rbx
setnbe cl
test ax, ax
setz al
or al, cl
mov eax, 200h
jnz short loc_851D7
mov rsi, rbx
call find_longest_bitstream_0
mov r15d, eax
inc r15d
jmp short loc_8519A
loc_85194:
mov r15d, 1
loc_8519A:
movsx rax, word ptr [r14+2]
test rax, rax
js short loc_851D4
add r14, 2
lea rdi, [r14+rax*2]
cmp rdi, rbx
setbe cl
test ax, ax
setnz dl
mov eax, 200h
test dl, cl
jz short loc_851D7
mov rsi, rbx
call find_longest_bitstream_0
inc eax
cmp r15d, eax
cmova eax, r15d
jmp short loc_851D7
loc_851D4:
mov eax, r15d
loc_851D7:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long find_longest_bitstream_0(__int16 *a1, unsigned long long a2)
{
long long v3; // rax
__int16 *v4; // rdi
bool v5; // zf
long long result; // rax
unsigned int v7; // r15d
long long v8; // rax
unsigned long long v9; // rdi
bool v10; // dl
v3 = *a1;
if ( v3 < 0 )
{
v7 = 1;
}
else
{
v4 = &a1[v3];
v5 = (unsigned long long)v4 <= a2 && (_WORD)v3 != 0;
result = 512LL;
if ( !v5 )
return result;
v7 = find_longest_bitstream_0(v4) + 1;
}
v8 = a1[1];
if ( v8 < 0 )
return v7;
v9 = (unsigned long long)&a1[v8 + 1];
v10 = (_WORD)v8 != 0;
result = 512LL;
if ( v9 <= a2 && v10 )
{
result = (unsigned int)find_longest_bitstream_0(v9) + 1;
if ( v7 > (unsigned int)result )
return v7;
}
return result;
}
|
find_longest_bitstream:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOVSX RAX,word ptr [RDI]
TEST RAX,RAX
JS 0x00185194
LEA RDI,[R14 + RAX*0x2]
CMP RDI,RBX
SETA CL
TEST AX,AX
SETZ AL
OR AL,CL
MOV EAX,0x200
JNZ 0x001851d7
MOV RSI,RBX
CALL 0x00185152
MOV R15D,EAX
INC R15D
JMP 0x0018519a
LAB_00185194:
MOV R15D,0x1
LAB_0018519a:
MOVSX RAX,word ptr [R14 + 0x2]
TEST RAX,RAX
JS 0x001851d4
ADD R14,0x2
LEA RDI,[R14 + RAX*0x2]
CMP RDI,RBX
SETBE CL
TEST AX,AX
SETNZ DL
MOV EAX,0x200
TEST DL,CL
JZ 0x001851d7
MOV RSI,RBX
CALL 0x00185152
INC EAX
CMP R15D,EAX
CMOVA EAX,R15D
JMP 0x001851d7
LAB_001851d4:
MOV EAX,R15D
LAB_001851d7:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
uint find_longest_bitstream(short *param_1,short *param_2)
{
short sVar1;
int iVar2;
uint uVar3;
uint uVar4;
sVar1 = *param_1;
if ((long)sVar1 < 0) {
uVar4 = 1;
}
else {
if (sVar1 == 0 || param_2 < param_1 + sVar1) {
return 0x200;
}
iVar2 = find_longest_bitstream(param_1 + sVar1,param_2);
uVar4 = iVar2 + 1;
}
sVar1 = param_1[1];
uVar3 = uVar4;
if (-1 < (long)sVar1) {
uVar3 = 0x200;
if (sVar1 != 0 && param_1 + (long)sVar1 + 1 <= param_2) {
iVar2 = find_longest_bitstream(param_1 + (long)sVar1 + 1,param_2);
uVar3 = iVar2 + 1U;
if (iVar2 + 1U < uVar4) {
uVar3 = uVar4;
}
}
}
return uVar3;
}
|
|
61,027
|
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 0x8d39f(%rip), %r13 # 0x12ffc8
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 0xa2c59
movq 0x8e32d(%rip), %rcx # 0x130f78
cmpb $0x0, (%rcx)
je 0xa2c55
incl 0x8(%rax)
jmp 0xa2c59
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rbx)
leaq 0x8d6d0(%rip), %rax # 0x130338
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 0x268c4
leaq 0x40(%rbx), %rdi
movq %r15, %rsi
callq 0x5997c
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 0xa2cda
movq (%rbp), %rsi
incq %rsi
callq 0x1b930
jmp 0xa2cda
movq %rax, %r14
movq %r13, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xa2ceb
callq 0x267a6
movq %r14, %rdi
callq 0x1c0d0
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_A2C59
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_A2C55
inc dword ptr [rax+8]
jmp short loc_A2C59
loc_A2C55:
lock inc dword ptr [rax+8]
loc_A2C59:
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_A2CDA
mov rsi, [rbp+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A2CDA
mov r14, rax
loc_A2CDA:
mov [rbx], r13
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_A2CEB
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A2CEB:
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,[0x22ffc8]
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 0x001a2c59
MOV RCX,qword ptr [0x00230f78]
CMP byte ptr [RCX],0x0
JZ 0x001a2c55
INC dword ptr [RAX + 0x8]
JMP 0x001a2c59
LAB_001a2c55:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001a2c59:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RBX + 0x18],RAX
LEA RAX,[0x230338]
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_001a2c85:
MOV RDI,R12
CALL 0x001268c4
LEA RDI,[RBX + 0x40]
LAB_001a2c91:
MOV RSI,R15
CALL 0x0015997c
LAB_001a2c99:
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_0022ffd8;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_00230f78 == '\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_00230348;
*(SetNode **)(this + 0x20) = this + 0x30;
/* try { // try from 001a2c85 to 001a2c8c has its CatchHandler @ 001a2cd7 */
std::__cxx11::string::_M_construct<char*>
(this + 0x20,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2);
/* try { // try from 001a2c91 to 001a2c98 has its CatchHandler @ 001a2cbd */
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;
}
|
|
61,028
|
CLI::BadNameString::MultiPositionalNames(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
|
MikePodsytnik[P]TCRtrie/build_O1/_deps/cli11-src/include/CLI/Error.hpp
|
static BadNameString MultiPositionalNames(std::string name) {
return BadNameString("Only one positional name allowed, remove: " + name);
}
|
O1
|
cpp
|
CLI::BadNameString::MultiPositionalNames(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>):
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rdx
movq %rdi, %rbx
leaq 0x1adc6(%rip), %rsi # 0x376ee
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x11ef8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1cb6c
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1c95b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7430
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1c984
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7430
movq %rbx, %rdi
callq 0x7780
|
_ZN3CLI13BadNameString20MultiPositionalNamesENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r14; __int64
push rbx; int
sub rsp, 28h
mov rdx, rsi
mov rbx, rdi
lea rsi, aOnlyOnePositio; "Only one positional name allowed, remov"...
lea r14, [rsp+38h+var_30]
mov rdi, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov rdi, rbx; int
mov rsi, r14
call _ZN3CLI13BadNameStringC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::BadNameString::BadNameString(std::string)
lea rax, [rsp+38h+var_20]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1C95B
mov rsi, [rsp+38h+var_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1C95B:
mov rax, rbx
add rsp, 28h
pop rbx
pop r14
retn
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1C984
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1C984:
mov rdi, rbx
call __Unwind_Resume
|
long long CLI::BadNameString::MultiPositionalNames(long long a1, _QWORD *a2)
{
void *v3; // [rsp+0h] [rbp-38h]
void *v4[2]; // [rsp+8h] [rbp-30h] BYREF
_QWORD v5[2]; // [rsp+18h] [rbp-20h] BYREF
int v6; // [rsp+28h] [rbp-10h]
long long v7; // [rsp+30h] [rbp-8h]
std::operator+<char>((long long)v4, (long long)"Only one positional name allowed, remove: ", a2);
CLI::BadNameString::BadNameString(a1, v3, (int)v4[0], (long long)v4[1], v5[0], (void *)v5[1], v6, v7);
if ( v4[0] != v5 )
operator delete(v4[0], v5[0] + 1LL);
return a1;
}
|
MultiPositionalNames:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RDX,RSI
MOV RBX,RDI
LEA RSI,[0x1376ee]
LEA R14,[RSP + 0x8]
MOV RDI,R14
CALL 0x00111ef8
LAB_0011c935:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011cb6c
LAB_0011c940:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0011c95b
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00107430
LAB_0011c95b:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* CLI::BadNameString::MultiPositionalNames(std::__cxx11::string) */
BadNameString * CLI::BadNameString::MultiPositionalNames(BadNameString *param_1)
{
long *local_30 [2];
long local_20 [2];
std::operator+((char *)local_30,(string *)"Only one positional name allowed, remove: ");
/* try { // try from 0011c935 to 0011c93f has its CatchHandler @ 0011c966 */
BadNameString(param_1,local_30);
if (local_30[0] != local_20) {
operator_delete(local_30[0],local_20[0] + 1);
}
return param_1;
}
|
|
61,029
|
google::protobuf::compiler::cpp::FileGenerator::GenerateMetadataPragma(google::protobuf::io::Printer*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/cpp/file.cc
|
void FileGenerator::GenerateMetadataPragma(io::Printer* printer,
const std::string& info_path) {
Formatter format(printer, variables_);
if (!info_path.empty() && !options_.annotation_pragma_name.empty() &&
!options_.annotation_guard_name.empty()) {
format.Set("guard", options_.annotation_guard_name);
format.Set("pragma", options_.annotation_pragma_name);
format.Set("info_path", info_path);
format(
"#ifdef $guard$\n"
"#pragma $pragma$ \"$info_path$\"\n"
"#endif // $guard$\n");
}
}
|
O0
|
cpp
|
google::protobuf::compiler::cpp::FileGenerator::GenerateMetadataPragma(google::protobuf::io::Printer*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0xf8, %rsp
movq %rdi, 0xf0(%rsp)
movq %rsi, 0xe8(%rsp)
movq %rdx, 0xe0(%rsp)
movq 0xf0(%rsp), %rdx
movq %rdx, 0x18(%rsp)
movq 0xe8(%rsp), %rsi
addq $0x290, %rdx # imm = 0x290
leaq 0xa8(%rsp), %rdi
callq 0xdf0d0
movq 0xe0(%rsp), %rdi
callq 0x212d0
testb $0x1, %al
jne 0xd90e8
movq 0x18(%rsp), %rdi
addq $0x38, %rdi
addq $0x48, %rdi
callq 0x212d0
testb $0x1, %al
jne 0xd90e8
movq 0x18(%rsp), %rdi
addq $0x38, %rdi
addq $0x68, %rdi
callq 0x212d0
testb $0x1, %al
jne 0xd90e8
leaq 0x87(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x21a00
movq 0x10(%rsp), %rdx
leaq 0x2e1190(%rip), %rsi # 0x3ba0af
leaq 0x88(%rsp), %rdi
callq 0x21890
jmp 0xd8f2e
movq 0x18(%rsp), %rdx
addq $0xa0, %rdx
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0xe15b0
jmp 0xd8f51
leaq 0x88(%rsp), %rdi
callq 0x21cc8
leaq 0x87(%rsp), %rdi
callq 0x21cb0
leaq 0x4f(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x21a00
movq 0x8(%rsp), %rdx
leaq 0x2e112f(%rip), %rsi # 0x3ba0b5
leaq 0x50(%rsp), %rdi
callq 0x21890
jmp 0xd8f92
movq 0x18(%rsp), %rdx
subq $-0x80, %rdx
leaq 0xa8(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0xe15b0
jmp 0xd8faf
leaq 0x50(%rsp), %rdi
callq 0x21cc8
leaq 0x4f(%rsp), %rdi
callq 0x21cb0
leaq 0x27(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x21a00
movq (%rsp), %rdx
leaq 0x2e10e0(%rip), %rsi # 0x3ba0bc
leaq 0x28(%rsp), %rdi
callq 0x21890
jmp 0xd8fe8
movq 0xe0(%rsp), %rdx
leaq 0xa8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0xe15b0
jmp 0xd9004
leaq 0x28(%rsp), %rdi
callq 0x21cc8
leaq 0x27(%rsp), %rdi
callq 0x21cb0
leaq 0x2e10a7(%rip), %rsi # 0x3ba0c6
leaq 0xa8(%rsp), %rdi
callq 0x5ae90
jmp 0xd902e
jmp 0xd90e8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
jmp 0xd905e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
leaq 0x88(%rsp), %rdi
callq 0x21cc8
leaq 0x87(%rsp), %rdi
callq 0x21cb0
jmp 0xd90fd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
jmp 0xd9098
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x21cc8
leaq 0x4f(%rsp), %rdi
callq 0x21cb0
jmp 0xd90fd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
jmp 0xd90cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x21cc8
leaq 0x27(%rsp), %rdi
callq 0x21cb0
jmp 0xd90fd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
jmp 0xd90fd
leaq 0xa8(%rsp), %rdi
callq 0xdf130
addq $0xf8, %rsp
retq
leaq 0xa8(%rsp), %rdi
callq 0xdf130
movq 0x78(%rsp), %rdi
callq 0x21700
nopw %cs:(%rax,%rax)
|
_ZN6google8protobuf8compiler3cpp13FileGenerator22GenerateMetadataPragmaEPNS0_2io7PrinterERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 0F8h
mov [rsp+0F8h+var_8], rdi
mov [rsp+0F8h+var_10], rsi
mov [rsp+0F8h+var_18], rdx
mov rdx, [rsp+0F8h+var_8]
mov [rsp+0F8h+var_E0], rdx
mov rsi, [rsp+0F8h+var_10]
add rdx, 290h
lea rdi, [rsp+0F8h+var_50]
call _ZN6google8protobuf8compiler3cpp9FormatterC2EPNS0_2io7PrinterERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESD_St4lessISD_ESaISt4pairIKSD_SD_EEE; google::protobuf::compiler::cpp::Formatter::Formatter(google::protobuf::io::Printer *,std::map<std::string,std::string> const&)
mov rdi, [rsp+0F8h+var_18]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz loc_D90E8
mov rdi, [rsp+0F8h+var_E0]
add rdi, 38h ; '8'
add rdi, 48h ; 'H'
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz loc_D90E8
mov rdi, [rsp+0F8h+var_E0]
add rdi, 38h ; '8'
add rdi, 68h ; 'h'
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz loc_D90E8
lea rdi, [rsp+0F8h+var_71]
mov [rsp+0F8h+var_E8], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rsp+0F8h+var_E8]
lea rsi, aGuard; "guard"
lea rdi, [rsp+0F8h+var_70]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&)
jmp short $+2
loc_D8F2E:
mov rdx, [rsp+0F8h+var_E0]
add rdx, 0A0h
lea rdi, [rsp+0F8h+var_50]
lea rsi, [rsp+0F8h+var_70]
call _ZN6google8protobuf8compiler3cpp9Formatter3SetINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRKSA_RKT_; google::protobuf::compiler::cpp::Formatter::Set<std::string>(std::string const&,std::string const&)
jmp short $+2
loc_D8F51:
lea rdi, [rsp+0F8h+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+0F8h+var_71]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rsp+0F8h+var_A9]
mov [rsp+0F8h+var_F0], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rsp+0F8h+var_F0]
lea rsi, aPragma; "pragma"
lea rdi, [rsp+0F8h+var_A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&)
jmp short $+2
loc_D8F92:
mov rdx, [rsp+0F8h+var_E0]
sub rdx, 0FFFFFFFFFFFFFF80h
lea rdi, [rsp+0F8h+var_50]
lea rsi, [rsp+0F8h+var_A8]
call _ZN6google8protobuf8compiler3cpp9Formatter3SetINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRKSA_RKT_; google::protobuf::compiler::cpp::Formatter::Set<std::string>(std::string const&,std::string const&)
jmp short $+2
loc_D8FAF:
lea rdi, [rsp+0F8h+var_A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+0F8h+var_A9]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rsp+0F8h+var_D1]
mov [rsp+0F8h+var_F8], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rsp+0F8h+var_F8]
lea rsi, aInfoPath; "info_path"
lea rdi, [rsp+0F8h+var_D0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&)
jmp short $+2
loc_D8FE8:
mov rdx, [rsp+0F8h+var_18]
lea rdi, [rsp+0F8h+var_50]
lea rsi, [rsp+0F8h+var_D0]
call _ZN6google8protobuf8compiler3cpp9Formatter3SetINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRKSA_RKT_; google::protobuf::compiler::cpp::Formatter::Set<std::string>(std::string const&,std::string const&)
jmp short $+2
loc_D9004:
lea rdi, [rsp+0F8h+var_D0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+0F8h+var_D1]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rsi, aIfdefGuardPrag; "#ifdef $guard$\n#pragma $pragma$ \"$inf"...
lea rdi, [rsp+0F8h+var_50]
call _ZNK6google8protobuf8compiler3cpp9FormatterclIJEEEvPKcDpRKT_
jmp short $+2
loc_D902E:
jmp loc_D90E8
mov rcx, rax
mov eax, edx
mov [rsp+arg_70], rcx
mov [rsp+arg_6C], eax
jmp short loc_D905E
mov rcx, rax
mov eax, edx
mov [rsp+arg_70], rcx
mov [rsp+arg_6C], eax
lea rdi, [rsp+arg_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_D905E:
lea rdi, [rsp+arg_7F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_D90FD
mov rcx, rax
mov eax, edx
mov [rsp+arg_70], rcx
mov [rsp+arg_6C], eax
jmp short loc_D9098
mov rcx, rax
mov eax, edx
mov [rsp+arg_70], rcx
mov [rsp+arg_6C], eax
lea rdi, [rsp+arg_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_D9098:
lea rdi, [rsp+arg_47]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_D90FD
mov rcx, rax
mov eax, edx
mov [rsp+arg_70], rcx
mov [rsp+arg_6C], eax
jmp short loc_D90CC
mov rcx, rax
mov eax, edx
mov [rsp+arg_70], rcx
mov [rsp+arg_6C], eax
lea rdi, [rsp+arg_20]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_D90CC:
lea rdi, [rsp+arg_1F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_D90FD
mov rcx, rax
mov eax, edx
mov [rsp+arg_70], rcx
mov [rsp+arg_6C], eax
jmp short loc_D90FD
loc_D90E8:
lea rdi, [rsp+0F8h+var_50]; this
call _ZN6google8protobuf8compiler3cpp9FormatterD2Ev; google::protobuf::compiler::cpp::Formatter::~Formatter()
add rsp, 0F8h
retn
loc_D90FD:
lea rdi, [rsp+arg_A0]; this
call _ZN6google8protobuf8compiler3cpp9FormatterD2Ev; google::protobuf::compiler::cpp::Formatter::~Formatter()
mov rdi, [rsp+arg_70]
call __Unwind_Resume
|
void google::protobuf::compiler::cpp::FileGenerator::GenerateMetadataPragma(
long long a1,
long long a2,
long long a3)
{
int v3; // ecx
int v4; // r8d
int v5; // r9d
int v6; // ecx
int v7; // r8d
int v8; // r9d
int v9; // ecx
int v10; // r8d
int v11; // r9d
int v12; // edx
int v13; // ecx
int v14; // r8d
int v15; // r9d
char v16; // [rsp+27h] [rbp-D1h] BYREF
_BYTE v17[39]; // [rsp+28h] [rbp-D0h] BYREF
char v18; // [rsp+4Fh] [rbp-A9h] BYREF
_BYTE v19[55]; // [rsp+50h] [rbp-A8h] BYREF
char v20; // [rsp+87h] [rbp-71h] BYREF
_BYTE v21[32]; // [rsp+88h] [rbp-70h] BYREF
_BYTE v22[56]; // [rsp+A8h] [rbp-50h] BYREF
long long v23; // [rsp+E0h] [rbp-18h]
long long v24; // [rsp+E8h] [rbp-10h]
long long v25; // [rsp+F0h] [rbp-8h]
v25 = a1;
v24 = a2;
v23 = a3;
google::protobuf::compiler::cpp::Formatter::Formatter(v22, a2, a1 + 656);
if ( (std::string::empty(v23) & 1) == 0
&& (std::string::empty(a1 + 128) & 1) == 0
&& (std::string::empty(a1 + 160) & 1) == 0 )
{
std::allocator<char>::allocator(&v20, a2);
std::string::basic_string(v21, "guard", &v20);
google::protobuf::compiler::cpp::Formatter::Set<std::string>(
(unsigned int)v22,
(unsigned int)v21,
a1 + 160,
v3,
v4,
v5);
std::string::~string(v21);
std::allocator<char>::~allocator(&v20);
std::allocator<char>::allocator(&v18, v21);
std::string::basic_string(v19, "pragma", &v18);
google::protobuf::compiler::cpp::Formatter::Set<std::string>(
(unsigned int)v22,
(unsigned int)v19,
a1 + 128,
v6,
v7,
v8);
std::string::~string(v19);
std::allocator<char>::~allocator(&v18);
std::allocator<char>::allocator(&v16, v19);
std::string::basic_string(v17, "info_path", &v16);
google::protobuf::compiler::cpp::Formatter::Set<std::string>(
(unsigned int)v22,
(unsigned int)v17,
v23,
v9,
v10,
v11);
std::string::~string(v17);
std::allocator<char>::~allocator(&v16);
google::protobuf::compiler::cpp::Formatter::operator()<>(
(unsigned int)v22,
(unsigned int)"#ifdef $guard$\n#pragma $pragma$ \"$info_path$\"\n#endif // $guard$\n",
v12,
v13,
v14,
v15);
}
google::protobuf::compiler::cpp::Formatter::~Formatter((google::protobuf::compiler::cpp::Formatter *)v22);
}
|
GenerateMetadataPragma:
SUB RSP,0xf8
MOV qword ptr [RSP + 0xf0],RDI
MOV qword ptr [RSP + 0xe8],RSI
MOV qword ptr [RSP + 0xe0],RDX
MOV RDX,qword ptr [RSP + 0xf0]
MOV qword ptr [RSP + 0x18],RDX
MOV RSI,qword ptr [RSP + 0xe8]
ADD RDX,0x290
LEA RDI,[RSP + 0xa8]
CALL 0x001df0d0
MOV RDI,qword ptr [RSP + 0xe0]
CALL 0x001212d0
TEST AL,0x1
JNZ 0x001d90e8
MOV RDI,qword ptr [RSP + 0x18]
ADD RDI,0x38
ADD RDI,0x48
CALL 0x001212d0
TEST AL,0x1
JNZ 0x001d90e8
MOV RDI,qword ptr [RSP + 0x18]
ADD RDI,0x38
ADD RDI,0x68
CALL 0x001212d0
TEST AL,0x1
JNZ 0x001d90e8
LEA RDI,[RSP + 0x87]
MOV qword ptr [RSP + 0x10],RDI
CALL 0x00121a00
MOV RDX,qword ptr [RSP + 0x10]
LAB_001d8f18:
LEA RSI,[0x4ba0af]
LEA RDI,[RSP + 0x88]
CALL 0x00121890
JMP 0x001d8f2e
LAB_001d8f2e:
MOV RDX,qword ptr [RSP + 0x18]
ADD RDX,0xa0
LAB_001d8f3a:
LEA RDI,[RSP + 0xa8]
LEA RSI,[RSP + 0x88]
CALL 0x001e15b0
JMP 0x001d8f51
LAB_001d8f51:
LEA RDI,[RSP + 0x88]
CALL 0x00121cc8
LEA RDI,[RSP + 0x87]
CALL 0x00121cb0
LEA RDI,[RSP + 0x4f]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x00121a00
MOV RDX,qword ptr [RSP + 0x8]
LAB_001d8f7f:
LEA RSI,[0x4ba0b5]
LEA RDI,[RSP + 0x50]
CALL 0x00121890
JMP 0x001d8f92
LAB_001d8f92:
MOV RDX,qword ptr [RSP + 0x18]
SUB RDX,-0x80
LAB_001d8f9b:
LEA RDI,[RSP + 0xa8]
LEA RSI,[RSP + 0x50]
CALL 0x001e15b0
JMP 0x001d8faf
LAB_001d8faf:
LEA RDI,[RSP + 0x50]
CALL 0x00121cc8
LEA RDI,[RSP + 0x4f]
CALL 0x00121cb0
LEA RDI,[RSP + 0x27]
MOV qword ptr [RSP],RDI
CALL 0x00121a00
MOV RDX,qword ptr [RSP]
LAB_001d8fd5:
LEA RSI,[0x4ba0bc]
LEA RDI,[RSP + 0x28]
CALL 0x00121890
JMP 0x001d8fe8
LAB_001d8fe8:
MOV RDX,qword ptr [RSP + 0xe0]
LAB_001d8ff0:
LEA RDI,[RSP + 0xa8]
LEA RSI,[RSP + 0x28]
CALL 0x001e15b0
JMP 0x001d9004
LAB_001d9004:
LEA RDI,[RSP + 0x28]
CALL 0x00121cc8
LEA RDI,[RSP + 0x27]
CALL 0x00121cb0
LAB_001d9018:
LEA RSI,[0x4ba0c6]
LEA RDI,[RSP + 0xa8]
CALL 0x0015ae90
LAB_001d902c:
JMP 0x001d902e
LAB_001d902e:
JMP 0x001d90e8
LAB_001d90e8:
LEA RDI,[RSP + 0xa8]
CALL 0x001df130
ADD RSP,0xf8
RET
|
/* google::protobuf::compiler::cpp::FileGenerator::GenerateMetadataPragma(google::protobuf::io::Printer*,
std::__cxx11::string const&) */
void __thiscall
google::protobuf::compiler::cpp::FileGenerator::GenerateMetadataPragma
(FileGenerator *this,Printer *param_1,string *param_2)
{
byte bVar1;
allocator local_d1;
string local_d0 [39];
allocator local_a9;
string local_a8 [55];
allocator local_71;
string local_70 [32];
Formatter local_50 [56];
string *local_18;
Printer *local_10;
FileGenerator *local_8;
local_18 = param_2;
local_10 = param_1;
local_8 = this;
Formatter::Formatter(local_50,param_1,(map *)(this + 0x290));
bVar1 = std::__cxx11::string::empty();
if ((bVar1 & 1) == 0) {
bVar1 = std::__cxx11::string::empty();
if ((bVar1 & 1) == 0) {
bVar1 = std::__cxx11::string::empty();
if ((bVar1 & 1) == 0) {
std::allocator<char>::allocator();
/* try { // try from 001d8f18 to 001d8f2b has its CatchHandler @ 001d9033 */
std::__cxx11::string::string(local_70,"guard",&local_71);
/* try { // try from 001d8f3a to 001d8f4e has its CatchHandler @ 001d9043 */
Formatter::Set<std::__cxx11::string>(local_50,local_70,(string *)(this + 0xa0));
std::__cxx11::string::~string(local_70);
std::allocator<char>::~allocator((allocator<char> *)&local_71);
std::allocator<char>::allocator();
/* try { // try from 001d8f7f to 001d8f8f has its CatchHandler @ 001d9070 */
std::__cxx11::string::string(local_a8,"pragma",&local_a9);
/* try { // try from 001d8f9b to 001d8fac has its CatchHandler @ 001d9080 */
Formatter::Set<std::__cxx11::string>(local_50,local_a8,(string *)(this + 0x80));
std::__cxx11::string::~string(local_a8);
std::allocator<char>::~allocator((allocator<char> *)&local_a9);
std::allocator<char>::allocator();
/* try { // try from 001d8fd5 to 001d8fe5 has its CatchHandler @ 001d90a4 */
std::__cxx11::string::string(local_d0,"info_path",&local_d1);
/* try { // try from 001d8ff0 to 001d9001 has its CatchHandler @ 001d90b4 */
Formatter::Set<std::__cxx11::string>(local_50,local_d0,local_18);
std::__cxx11::string::~string(local_d0);
std::allocator<char>::~allocator((allocator<char> *)&local_d1);
/* try { // try from 001d9018 to 001d902b has its CatchHandler @ 001d90d8 */
Formatter::operator()<>
(local_50,"#ifdef $guard$\n#pragma $pragma$ \"$info_path$\"\n#endif // $guard$\n"
);
}
}
}
Formatter::~Formatter(local_50);
return;
}
|
|
61,030
|
my_symlink
|
eloqsql/mysys/my_symlink.c
|
int my_symlink(const char *content, const char *linkname, myf MyFlags)
{
#ifndef HAVE_READLINK
return 0;
#else
int result;
DBUG_ENTER("my_symlink");
DBUG_PRINT("enter",("content: %s linkname: %s", content, linkname));
result= 0;
if (symlink(content, linkname))
{
result= -1;
my_errno=errno;
if (MyFlags & MY_WME)
my_error(EE_CANT_SYMLINK, MYF(0), linkname, content, errno);
}
else if ((MyFlags & MY_SYNC_DIR) && my_sync_dir_by_file(linkname, MyFlags))
result= -1;
DBUG_RETURN(result);
#endif /* HAVE_READLINK */
}
|
O3
|
c
|
my_symlink:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r12
callq 0x29050
testl %eax, %eax
je 0xa0d4a
callq 0x29790
movq %rax, %r13
movl (%rax), %r14d
callq 0xa1ab2
movl %r14d, (%rax)
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
testb $0x10, %r15b
je 0xa0d66
movl (%r13), %r8d
movl $0x19, %edi
xorl %esi, %esi
movq %rbx, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x9dfc3
jmp 0xa0d66
xorl %r14d, %r14d
testw %r15w, %r15w
jns 0xa0d66
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa15d3
xorl %r14d, %r14d
negl %eax
sbbl %r14d, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_symlink:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rdx
mov rbx, rsi
mov r12, rdi
call _symlink
test eax, eax
jz short loc_A0D4A
call ___errno_location
mov r13, rax
mov r14d, [rax]
call _my_thread_var
mov [rax], r14d
mov r14d, 0FFFFFFFFh
test r15b, 10h
jz short loc_A0D66
mov r8d, [r13+0]
mov edi, 19h
xor esi, esi
mov rdx, rbx
mov rcx, r12
xor eax, eax
call my_error
jmp short loc_A0D66
loc_A0D4A:
xor r14d, r14d
test r15w, r15w
jns short loc_A0D66
mov rdi, rbx
mov rsi, r15
call my_sync_dir_by_file
xor r14d, r14d
neg eax
sbb r14d, r14d
loc_A0D66:
mov eax, r14d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_symlink(long long a1, long long a2, long long a3)
{
unsigned int *v4; // r13
unsigned int v5; // r14d
unsigned int v6; // r14d
if ( (unsigned int)symlink(a1) )
{
v4 = (unsigned int *)__errno_location(a1);
v5 = *v4;
*(_DWORD *)my_thread_var(a1) = v5;
v6 = -1;
if ( (a3 & 0x10) != 0 )
my_error(0x19u, 0LL, a2, a1, *v4);
}
else
{
v6 = 0;
if ( (a3 & 0x8000u) != 0LL )
return (unsigned int)-((unsigned int)my_sync_dir_by_file(a2, a3) != 0);
}
return v6;
}
|
my_symlink:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDX
MOV RBX,RSI
MOV R12,RDI
CALL 0x00129050
TEST EAX,EAX
JZ 0x001a0d4a
CALL 0x00129790
MOV R13,RAX
MOV R14D,dword ptr [RAX]
CALL 0x001a1ab2
MOV dword ptr [RAX],R14D
MOV R14D,0xffffffff
TEST R15B,0x10
JZ 0x001a0d66
MOV R8D,dword ptr [R13]
MOV EDI,0x19
XOR ESI,ESI
MOV RDX,RBX
MOV RCX,R12
XOR EAX,EAX
CALL 0x0019dfc3
JMP 0x001a0d66
LAB_001a0d4a:
XOR R14D,R14D
TEST R15W,R15W
JNS 0x001a0d66
MOV RDI,RBX
MOV RSI,R15
CALL 0x001a15d3
XOR R14D,R14D
NEG EAX
SBB R14D,R14D
LAB_001a0d66:
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int my_symlink(char *param_1,char *param_2,ulong param_3)
{
int iVar1;
int *piVar2;
int *piVar3;
iVar1 = symlink(param_1,param_2);
if (iVar1 == 0) {
iVar1 = 0;
if ((short)param_3 < 0) {
iVar1 = my_sync_dir_by_file(param_2,param_3);
iVar1 = -(uint)(iVar1 != 0);
}
}
else {
piVar2 = __errno_location();
iVar1 = *piVar2;
piVar3 = (int *)_my_thread_var();
*piVar3 = iVar1;
iVar1 = -1;
if ((param_3 & 0x10) != 0) {
my_error(0x19,0,param_2,param_1,*piVar2);
}
}
return iVar1;
}
|
|
61,031
|
my_caseup_8bit
|
eloqsql/strings/ctype-simple.c
|
size_t my_caseup_8bit(CHARSET_INFO * cs, const char *src, size_t srclen,
char *dst, size_t dstlen __attribute__((unused)))
{
const char *end= src + srclen;
register const uchar *map= cs->to_upper;
DBUG_ASSERT(srclen <= dstlen);
for ( ; src != end ; src++)
*dst++= (char) map[(uchar) *src];
return srclen;
}
|
O0
|
c
|
my_caseup_8bit:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x7a002
jmp 0x7a004
movq -0x10(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0x7a03b
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
movb (%rax,%rcx), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x7a004
movq -0x18(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_caseup_8bit:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_30], rax
mov rax, [rbp+var_8]
mov rax, [rax+50h]
mov [rbp+var_38], rax
jmp short $+2
loc_7A002:
jmp short $+2
loc_7A004:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_30]
jz short loc_7A03B
mov rax, [rbp+var_38]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx]
mov cl, [rax+rcx]
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_7A004
loc_7A03B:
mov rax, [rbp+var_18]
pop rbp
retn
|
long long my_caseup_8bit(long long a1, unsigned __int8 *a2, long long a3, _BYTE *a4)
{
_BYTE *v4; // rax
long long v6; // [rsp+0h] [rbp-38h]
unsigned __int8 *v8; // [rsp+28h] [rbp-10h]
v8 = a2;
v6 = *(_QWORD *)(a1 + 80);
while ( v8 != &a2[a3] )
{
v4 = a4++;
*v4 = *(_BYTE *)(v6 + *v8++);
}
return a3;
}
|
my_caseup_8bit:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x50]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0017a002
LAB_0017a002:
JMP 0x0017a004
LAB_0017a004:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x30]
JZ 0x0017a03b
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0017a004
LAB_0017a03b:
MOV RAX,qword ptr [RBP + -0x18]
POP RBP
RET
|
long my_caseup_8bit(long param_1,byte *param_2,long param_3,int1 *param_4)
{
long lVar1;
int1 *local_28;
byte *local_18;
lVar1 = *(long *)(param_1 + 0x50);
local_28 = param_4;
for (local_18 = param_2; local_18 != param_2 + param_3; local_18 = local_18 + 1) {
*local_28 = *(int1 *)(lVar1 + (ulong)*local_18);
local_28 = local_28 + 1;
}
return param_3;
}
|
|
61,032
|
JS_WriteObjectAtoms
|
bluesky950520[P]quickjs/quickjs.c
|
static int JS_WriteObjectAtoms(BCWriterState *s)
{
JSRuntime *rt = s->ctx->rt;
DynBuf dbuf1;
int i, atoms_size;
dbuf1 = s->dbuf;
js_dbuf_init(s->ctx, &s->dbuf);
bc_put_u8(s, BC_VERSION);
bc_put_leb128(s, s->idx_to_atom_count);
for(i = 0; i < s->idx_to_atom_count; i++) {
JSAtom atom = s->idx_to_atom[i];
if (__JS_AtomIsConst(atom)) {
bc_put_u8(s, 0 /* the type */);
/* TODO(saghul): encoding for tagged integers and keyword-ish atoms could be
more efficient. */
bc_put_u32(s, atom);
} else {
JSAtomStruct *p = rt->atom_array[atom];
uint8_t type = p->atom_type;
assert(type != JS_ATOM_TYPE_PRIVATE);
bc_put_u8(s, type);
JS_WriteString(s, p);
}
}
/* XXX: should check for OOM in above phase */
/* move the atoms at the start */
/* XXX: could just append dbuf1 data, but it uses more memory if
dbuf1 is larger than dbuf */
atoms_size = s->dbuf.size;
if (dbuf_realloc(&dbuf1, dbuf1.size + atoms_size))
goto fail;
memmove(dbuf1.buf + atoms_size, dbuf1.buf, dbuf1.size);
memcpy(dbuf1.buf, s->dbuf.buf, atoms_size);
dbuf1.size += atoms_size;
dbuf_free(&s->dbuf);
s->dbuf = dbuf1;
return 0;
fail:
dbuf_free(&dbuf1);
return -1;
}
|
O0
|
c
|
JS_WriteObjectAtoms:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq 0x58(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x58(%rsp), %rsi
addq $0x8, %rsi
leaq 0x20(%rsp), %rdi
movl $0x30, %edx
callq 0xe5b0
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movq 0x58(%rsp), %rsi
addq $0x8, %rsi
callq 0x4b230
movq 0x58(%rsp), %rdi
movl $0x13, %esi
callq 0x77ba0
movq 0x58(%rsp), %rdi
movq 0x58(%rsp), %rax
movl 0x58(%rax), %esi
callq 0x78730
movl $0x0, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movq 0x58(%rsp), %rcx
cmpl 0x58(%rcx), %eax
jge 0x4ba39
movq 0x58(%rsp), %rax
movq 0x50(%rax), %rax
movslq 0x1c(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %edi
callq 0x28000
cmpl $0x0, %eax
je 0x4b9e2
movq 0x58(%rsp), %rdi
xorl %esi, %esi
callq 0x77ba0
movq 0x58(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x7a0f0
jmp 0x4ba27
movq 0x50(%rsp), %rax
movq 0x68(%rax), %rax
movl 0x14(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq 0x4(%rax), %rax
shrq $0x3e, %rax
movb %al, 0x7(%rsp)
movq 0x58(%rsp), %rdi
movzbl 0x7(%rsp), %esi
callq 0x77ba0
movq 0x58(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x77c50
jmp 0x4ba29
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x4b991
movq 0x58(%rsp), %rax
movq 0x10(%rax), %rax
movl %eax, 0x18(%rsp)
movq 0x28(%rsp), %rsi
movslq 0x18(%rsp), %rax
addq %rax, %rsi
leaq 0x20(%rsp), %rdi
callq 0x1e3f0
cmpl $0x0, %eax
je 0x4ba64
jmp 0x4bad7
movq 0x20(%rsp), %rdi
movslq 0x18(%rsp), %rax
addq %rax, %rdi
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0xe710
movq 0x20(%rsp), %rdi
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rsi
movslq 0x18(%rsp), %rdx
callq 0xe5b0
movslq 0x18(%rsp), %rax
addq 0x28(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x58(%rsp), %rdi
addq $0x8, %rdi
callq 0x1e930
movq 0x58(%rsp), %rdi
addq $0x8, %rdi
leaq 0x20(%rsp), %rsi
movl $0x30, %edx
callq 0xe5b0
movl $0x0, 0x64(%rsp)
jmp 0x4bae9
leaq 0x20(%rsp), %rdi
callq 0x1e930
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
|
JS_WriteObjectAtoms:
sub rsp, 68h
mov [rsp+68h+var_10], rdi
mov rax, [rsp+68h+var_10]
mov rax, [rax]
mov rax, [rax+18h]
mov [rsp+68h+var_18], rax
mov rsi, [rsp+68h+var_10]
add rsi, 8
lea rdi, [rsp+68h+var_48]
mov edx, 30h ; '0'
call _memcpy
mov rax, [rsp+68h+var_10]
mov rdi, [rax]
mov rsi, [rsp+68h+var_10]
add rsi, 8
call js_dbuf_init
mov rdi, [rsp+68h+var_10]
mov esi, 13h
call bc_put_u8
mov rdi, [rsp+68h+var_10]
mov rax, [rsp+68h+var_10]
mov esi, [rax+58h]
call bc_put_leb128
mov [rsp+68h+var_4C], 0
loc_4B991:
mov eax, [rsp+68h+var_4C]
mov rcx, [rsp+68h+var_10]
cmp eax, [rcx+58h]
jge loc_4BA39
mov rax, [rsp+68h+var_10]
mov rax, [rax+50h]
movsxd rcx, [rsp+68h+var_4C]
mov eax, [rax+rcx*4]
mov [rsp+68h+var_54], eax
mov edi, [rsp+68h+var_54]
call __JS_AtomIsConst
cmp eax, 0
jz short loc_4B9E2
mov rdi, [rsp+68h+var_10]
xor esi, esi
call bc_put_u8
mov rdi, [rsp+68h+var_10]
mov esi, [rsp+68h+var_54]
call bc_put_u32
jmp short loc_4BA27
loc_4B9E2:
mov rax, [rsp+68h+var_18]
mov rax, [rax+68h]
mov ecx, [rsp+68h+var_54]
mov rax, [rax+rcx*8]
mov [rsp+68h+var_60], rax
mov rax, [rsp+68h+var_60]
mov rax, [rax+4]
shr rax, 3Eh
mov [rsp+68h+var_61], al
mov rdi, [rsp+68h+var_10]
movzx esi, [rsp+68h+var_61]
call bc_put_u8
mov rdi, [rsp+68h+var_10]
mov rsi, [rsp+68h+var_60]
call JS_WriteString
loc_4BA27:
jmp short $+2
loc_4BA29:
mov eax, [rsp+68h+var_4C]
add eax, 1
mov [rsp+68h+var_4C], eax
jmp loc_4B991
loc_4BA39:
mov rax, [rsp+68h+var_10]
mov rax, [rax+10h]
mov [rsp+68h+var_50], eax
mov rsi, [rsp+68h+var_40]
movsxd rax, [rsp+68h+var_50]
add rsi, rax
lea rdi, [rsp+68h+var_48]
call dbuf_realloc
cmp eax, 0
jz short loc_4BA64
jmp short loc_4BAD7
loc_4BA64:
mov rdi, [rsp+68h+var_48]
movsxd rax, [rsp+68h+var_50]
add rdi, rax
mov rsi, [rsp+68h+var_48]
mov rdx, [rsp+68h+var_40]
call _memmove
mov rdi, [rsp+68h+var_48]
mov rax, [rsp+68h+var_10]
mov rsi, [rax+8]
movsxd rdx, [rsp+68h+var_50]
call _memcpy
movsxd rax, [rsp+68h+var_50]
add rax, [rsp+68h+var_40]
mov [rsp+68h+var_40], rax
mov rdi, [rsp+68h+var_10]
add rdi, 8
call dbuf_free
mov rdi, [rsp+68h+var_10]
add rdi, 8
lea rsi, [rsp+68h+var_48]
mov edx, 30h ; '0'
call _memcpy
mov [rsp+68h+var_4], 0
jmp short loc_4BAE9
loc_4BAD7:
lea rdi, [rsp+68h+var_48]
call dbuf_free
mov [rsp+68h+var_4], 0FFFFFFFFh
loc_4BAE9:
mov eax, [rsp+68h+var_4]
add rsp, 68h
retn
|
long long JS_WriteObjectAtoms(long long a1)
{
long long v2; // [rsp+8h] [rbp-60h]
unsigned int v3; // [rsp+14h] [rbp-54h]
int v4; // [rsp+18h] [rbp-50h]
int i; // [rsp+1Ch] [rbp-4Ch]
long long v6; // [rsp+20h] [rbp-48h] BYREF
long long v7; // [rsp+28h] [rbp-40h]
long long v8; // [rsp+50h] [rbp-18h]
long long v9; // [rsp+58h] [rbp-10h]
v9 = a1;
v8 = *(_QWORD *)(*(_QWORD *)a1 + 24LL);
memcpy(&v6, a1 + 8, 48LL);
js_dbuf_init(*(_QWORD *)v9, v9 + 8);
bc_put_u8(v9, 19LL);
bc_put_leb128(v9, *(unsigned int *)(v9 + 88));
for ( i = 0; i < *(_DWORD *)(v9 + 88); ++i )
{
v3 = *(_DWORD *)(*(_QWORD *)(v9 + 80) + 4LL * i);
if ( _JS_AtomIsConst(v3) )
{
bc_put_u8(v9, 0LL);
bc_put_u32(v9, v3);
}
else
{
v2 = *(_QWORD *)(*(_QWORD *)(v8 + 104) + 8LL * v3);
bc_put_u8(v9, *(_QWORD *)(v2 + 4) >> 62);
JS_WriteString(v9, v2);
}
}
v4 = *(_QWORD *)(v9 + 16);
if ( (unsigned int)dbuf_realloc((long long)&v6, v4 + v7) )
{
dbuf_free((long long)&v6);
return (unsigned int)-1;
}
else
{
memmove(v4 + v6, v6, v7);
memcpy(v6, *(_QWORD *)(v9 + 8), v4);
v7 += v4;
dbuf_free(v9 + 8);
memcpy(v9 + 8, &v6, 48LL);
return 0;
}
}
|
JS_WriteObjectAtoms:
SUB RSP,0x68
MOV qword ptr [RSP + 0x58],RDI
MOV RAX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x50],RAX
MOV RSI,qword ptr [RSP + 0x58]
ADD RSI,0x8
LEA RDI,[RSP + 0x20]
MOV EDX,0x30
CALL 0x0010e5b0
MOV RAX,qword ptr [RSP + 0x58]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RSP + 0x58]
ADD RSI,0x8
CALL 0x0014b230
MOV RDI,qword ptr [RSP + 0x58]
MOV ESI,0x13
CALL 0x00177ba0
MOV RDI,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x58]
MOV ESI,dword ptr [RAX + 0x58]
CALL 0x00178730
MOV dword ptr [RSP + 0x1c],0x0
LAB_0014b991:
MOV EAX,dword ptr [RSP + 0x1c]
MOV RCX,qword ptr [RSP + 0x58]
CMP EAX,dword ptr [RCX + 0x58]
JGE 0x0014ba39
MOV RAX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RAX + 0x50]
MOVSXD RCX,dword ptr [RSP + 0x1c]
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV dword ptr [RSP + 0x14],EAX
MOV EDI,dword ptr [RSP + 0x14]
CALL 0x00128000
CMP EAX,0x0
JZ 0x0014b9e2
MOV RDI,qword ptr [RSP + 0x58]
XOR ESI,ESI
CALL 0x00177ba0
MOV RDI,qword ptr [RSP + 0x58]
MOV ESI,dword ptr [RSP + 0x14]
CALL 0x0017a0f0
JMP 0x0014ba27
LAB_0014b9e2:
MOV RAX,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RAX + 0x68]
MOV ECX,dword ptr [RSP + 0x14]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x4]
SHR RAX,0x3e
MOV byte ptr [RSP + 0x7],AL
MOV RDI,qword ptr [RSP + 0x58]
MOVZX ESI,byte ptr [RSP + 0x7]
CALL 0x00177ba0
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x00177c50
LAB_0014ba27:
JMP 0x0014ba29
LAB_0014ba29:
MOV EAX,dword ptr [RSP + 0x1c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x1c],EAX
JMP 0x0014b991
LAB_0014ba39:
MOV RAX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RAX + 0x10]
MOV dword ptr [RSP + 0x18],EAX
MOV RSI,qword ptr [RSP + 0x28]
MOVSXD RAX,dword ptr [RSP + 0x18]
ADD RSI,RAX
LEA RDI,[RSP + 0x20]
CALL 0x0011e3f0
CMP EAX,0x0
JZ 0x0014ba64
JMP 0x0014bad7
LAB_0014ba64:
MOV RDI,qword ptr [RSP + 0x20]
MOVSXD RAX,dword ptr [RSP + 0x18]
ADD RDI,RAX
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
CALL 0x0010e710
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RAX + 0x8]
MOVSXD RDX,dword ptr [RSP + 0x18]
CALL 0x0010e5b0
MOVSXD RAX,dword ptr [RSP + 0x18]
ADD RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,qword ptr [RSP + 0x58]
ADD RDI,0x8
CALL 0x0011e930
MOV RDI,qword ptr [RSP + 0x58]
ADD RDI,0x8
LEA RSI,[RSP + 0x20]
MOV EDX,0x30
CALL 0x0010e5b0
MOV dword ptr [RSP + 0x64],0x0
JMP 0x0014bae9
LAB_0014bad7:
LEA RDI,[RSP + 0x20]
CALL 0x0011e930
MOV dword ptr [RSP + 0x64],0xffffffff
LAB_0014bae9:
MOV EAX,dword ptr [RSP + 0x64]
ADD RSP,0x68
RET
|
int4 JS_WriteObjectAtoms(long *param_1)
{
uint uVar1;
long lVar2;
int iVar3;
int iVar4;
int local_4c;
void *local_48;
size_t local_40;
long local_18;
long *local_10;
int4 local_4;
local_18 = *(long *)(*param_1 + 0x18);
local_10 = param_1;
memcpy(&local_48,param_1 + 1,0x30);
js_dbuf_init(*local_10,local_10 + 1);
bc_put_u8(local_10,0x13);
bc_put_leb128(local_10,(int)local_10[0xb]);
for (local_4c = 0; local_4c < (int)local_10[0xb]; local_4c = local_4c + 1) {
uVar1 = *(uint *)(local_10[10] + (long)local_4c * 4);
iVar3 = __JS_AtomIsConst(uVar1);
if (iVar3 == 0) {
lVar2 = *(long *)(*(long *)(local_18 + 0x68) + (ulong)uVar1 * 8);
bc_put_u8(local_10,(byte)((ulong)*(int8 *)(lVar2 + 4) >> 0x3e));
JS_WriteString(local_10,lVar2);
}
else {
bc_put_u8(local_10,0);
bc_put_u32(local_10);
}
}
iVar3 = (int)local_10[2];
iVar4 = dbuf_realloc(&local_48,local_40 + (long)iVar3);
if (iVar4 == 0) {
memmove((void *)((long)local_48 + (long)iVar3),local_48,local_40);
memcpy(local_48,(void *)local_10[1],(long)iVar3);
local_40 = (long)iVar3 + local_40;
dbuf_free(local_10 + 1);
memcpy(local_10 + 1,&local_48,0x30);
local_4 = 0;
}
else {
dbuf_free(&local_48);
local_4 = 0xffffffff;
}
return local_4;
}
|
|
61,033
|
mz_error
|
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
|
const char *mz_error(int err) {
static struct {
int m_err;
const char *m_pDesc;
} s_error_descs[] = {{MZ_OK, ""},
{MZ_STREAM_END, "stream end"},
{MZ_NEED_DICT, "need dictionary"},
{MZ_ERRNO, "file error"},
{MZ_STREAM_ERROR, "stream error"},
{MZ_DATA_ERROR, "data error"},
{MZ_MEM_ERROR, "out of memory"},
{MZ_BUF_ERROR, "buf error"},
{MZ_VERSION_ERROR, "version error"},
{MZ_PARAM_ERROR, "parameter error"}};
mz_uint i;
for (i = 0; i < sizeof(s_error_descs) / sizeof(s_error_descs[0]); ++i)
if (s_error_descs[i].m_err == err)
return s_error_descs[i].m_pDesc;
return NULL;
}
|
O2
|
c
|
mz_error:
xorl %eax, %eax
leaq 0x7855f(%rip), %rcx # 0xd50f0
xorl %edx, %edx
leaq 0x10(%rdx), %rsi
cmpq $0xb0, %rsi
je 0x5cbad
cmpl %edi, (%rdx,%rcx)
movq %rsi, %rdx
jne 0x5cb93
movq -0x8(%rsi,%rcx), %rax
retq
|
mz_error:
xor eax, eax
lea rcx, mz_error_s_error_descs
xor edx, edx
loc_5CB93:
lea rsi, [rdx+10h]
cmp rsi, 0B0h
jz short locret_5CBAD
cmp [rdx+rcx], edi
mov rdx, rsi
jnz short loc_5CB93
mov rax, [rsi+rcx-8]
locret_5CBAD:
retn
|
long long mz_error(int a1)
{
long long result; // rax
long long i; // rdx
long long v3; // rsi
result = 0LL;
for ( i = 0LL; ; i += 16LL )
{
v3 = i + 16;
if ( i == 160 )
break;
if ( *(_DWORD *)((char *)&mz_error_s_error_descs + i) == a1 )
return *(_QWORD *)((char *)&mz_error_s_error_descs + v3 - 8);
}
return result;
}
|
mz_error:
XOR EAX,EAX
LEA RCX,[0x1d50f0]
XOR EDX,EDX
LAB_0015cb93:
LEA RSI,[RDX + 0x10]
CMP RSI,0xb0
JZ 0x0015cbad
CMP dword ptr [RDX + RCX*0x1],EDI
MOV RDX,RSI
JNZ 0x0015cb93
MOV RAX,qword ptr [RSI + RCX*0x1 + -0x8]
LAB_0015cbad:
RET
|
int8 mz_error(int param_1)
{
long lVar1;
long lVar2;
lVar1 = 0;
do {
lVar2 = lVar1;
if (lVar2 + 0x10 == 0xb0) {
return 0;
}
lVar1 = lVar2 + 0x10;
} while (*(int *)((long)&mz_error_s_error_descs + lVar2) != param_1);
return *(int8 *)((long)&PTR_DAT_001d50f8 + lVar2);
}
|
|
61,034
|
maria_rtree_find_next
|
eloqsql/storage/maria/ma_rt_index.c
|
int maria_rtree_find_next(MARIA_HA *info, uint keynr, uint32 search_flag)
{
my_off_t root;
uint32 nod_cmp_flag;
MARIA_KEYDEF *keyinfo= info->s->keyinfo + keynr;
DBUG_ASSERT(info->last_key.keyinfo == keyinfo);
/*
At the moment index can only properly handle the
MBR_INTERSECT, so we use it for all sorts of queries.
TODO: better searsh for CONTAINS/WITHIN.
*/
search_flag= nod_cmp_flag= MBR_INTERSECT;
if (info->update & HA_STATE_DELETED)
return maria_rtree_find_first(info, &info->last_key, search_flag);
if (!info->keyread_buff_used)
{
uchar *key= info->int_keypos;
while (key < info->int_maxpos)
{
if (!maria_rtree_key_cmp(keyinfo->seg,
info->first_mbr_key, key,
info->last_rkey_length, search_flag))
{
uchar *after_key= key + keyinfo->keylength;
MARIA_KEY tmp_key;
/*
We don't need to set all MARIA_KEY elements here as
_ma_row_pos_from_key only uses a few of them.
*/
tmp_key.keyinfo= keyinfo;
tmp_key.data= key;
tmp_key.data_length= keyinfo->keylength - info->s->base.rec_reflength;
info->cur_row.lastpos= _ma_row_pos_from_key(&tmp_key);
memcpy(info->last_key.data, key, info->last_key.data_length);
if (after_key < info->int_maxpos)
info->int_keypos= after_key;
else
info->keyread_buff_used= 1;
return 0;
}
key+= keyinfo->keylength;
}
}
if ((root= info->s->state.key_root[keynr]) == HA_OFFSET_ERROR)
{
my_errno= HA_ERR_END_OF_FILE;
return -1;
}
/*
TODO better search for CONTAINS/WITHIN.
nod_cmp_flag= (((search_flag & (MBR_EQUAL | MBR_WITHIN)) ?
MBR_WITHIN : MBR_INTERSECT));
*/
return maria_rtree_find_req(info, keyinfo, search_flag, nod_cmp_flag, root,
0);
}
|
O0
|
c
|
maria_rtree_find_next:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x570(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x118, %rcx, %rcx # imm = 0x118
addq %rcx, %rax
movq %rax, -0x30(%rbp)
jmp 0x8ee13
movl $0x400, -0x24(%rbp) # imm = 0x400
movl $0x400, -0x18(%rbp) # imm = 0x400
movq -0x10(%rbp), %rax
movl 0x624(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x8ee52
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x200, %rsi # imm = 0x200
movl -0x18(%rbp), %edx
callq 0x8e770
movl %eax, -0x4(%rbp)
jmp 0x8efde
movq -0x10(%rbp), %rax
cmpb $0x0, 0x685(%rax)
jne 0x8ef8e
movq -0x10(%rbp), %rax
movq 0x3b0(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x3b8(%rcx), %rax
jae 0x8ef8c
movq -0x30(%rbp), %rax
movq 0xc0(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x398(%rax), %rsi
movq -0x38(%rbp), %rdx
movq -0x10(%rbp), %rax
movl 0x630(%rax), %ecx
movl -0x18(%rbp), %r8d
callq 0x91c60
cmpl $0x0, %eax
jne 0x8ef6e
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
movzwl 0xaa(%rcx), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x30(%rbp), %rax
movzwl 0xaa(%rax), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
subl 0x3e0(%rcx), %eax
movl %eax, -0x50(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x6c3d0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x10(%rbp), %rax
movq 0x200(%rax), %rdi
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x210(%rax), %eax
movl %eax, %edx
callq 0x2a090
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x3b8(%rcx), %rax
jae 0x8ef5a
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x3b0(%rax)
jmp 0x8ef65
movq -0x10(%rbp), %rax
movb $0x1, 0x685(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x8efde
movq -0x30(%rbp), %rax
movzwl 0xaa(%rax), %ecx
movq -0x38(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
jmp 0x8ee72
jmp 0x8ef8e
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x118(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
cmpq $-0x1, %rax
jne 0x8efc1
callq 0xf7440
movl $0x89, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8efde
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x18(%rbp), %edx
movl -0x24(%rbp), %ecx
movq -0x20(%rbp), %r8
xorl %r9d, %r9d
callq 0x8e860
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
maria_rtree_find_next:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+570h]
mov ecx, [rbp+var_14]
imul rcx, 118h
add rax, rcx
mov [rbp+var_30], rax
jmp short $+2
loc_8EE13:
mov [rbp+var_24], 400h
mov [rbp+var_18], 400h
mov rax, [rbp+var_10]
mov eax, [rax+624h]
and eax, 8
cmp eax, 0
jz short loc_8EE52
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_10]
add rsi, 200h
mov edx, [rbp+var_18]
call maria_rtree_find_first
mov [rbp+var_4], eax
jmp loc_8EFDE
loc_8EE52:
mov rax, [rbp+var_10]
cmp byte ptr [rax+685h], 0
jnz loc_8EF8E
mov rax, [rbp+var_10]
mov rax, [rax+3B0h]
mov [rbp+var_38], rax
loc_8EE72:
mov rax, [rbp+var_38]
mov rcx, [rbp+var_10]
cmp rax, [rcx+3B8h]
jnb loc_8EF8C
mov rax, [rbp+var_30]
mov rdi, [rax+0C0h]
mov rax, [rbp+var_10]
mov rsi, [rax+398h]
mov rdx, [rbp+var_38]
mov rax, [rbp+var_10]
mov ecx, [rax+630h]
mov r8d, [rbp+var_18]
call maria_rtree_key_cmp
cmp eax, 0
jnz loc_8EF6E
mov rax, [rbp+var_38]
mov rcx, [rbp+var_30]
movzx ecx, word ptr [rcx+0AAh]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_40], rax
mov rax, [rbp+var_30]
mov [rbp+var_58], rax
mov rax, [rbp+var_38]
mov [rbp+var_60], rax
mov rax, [rbp+var_30]
movzx eax, word ptr [rax+0AAh]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
sub eax, [rcx+3E0h]
mov [rbp+var_50], eax
lea rdi, [rbp+var_60]
call _ma_row_pos_from_key
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+98h], rcx
mov rax, [rbp+var_10]
mov rdi, [rax+200h]
mov rsi, [rbp+var_38]
mov rax, [rbp+var_10]
mov eax, [rax+210h]
mov edx, eax
call _memcpy
mov rax, [rbp+var_40]
mov rcx, [rbp+var_10]
cmp rax, [rcx+3B8h]
jnb short loc_8EF5A
mov rcx, [rbp+var_40]
mov rax, [rbp+var_10]
mov [rax+3B0h], rcx
jmp short loc_8EF65
loc_8EF5A:
mov rax, [rbp+var_10]
mov byte ptr [rax+685h], 1
loc_8EF65:
mov [rbp+var_4], 0
jmp short loc_8EFDE
loc_8EF6E:
mov rax, [rbp+var_30]
movzx ecx, word ptr [rax+0AAh]
mov rax, [rbp+var_38]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_38], rax
jmp loc_8EE72
loc_8EF8C:
jmp short $+2
loc_8EF8E:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+118h]
mov ecx, [rbp+var_14]
mov rax, [rax+rcx*8]
mov [rbp+var_20], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_8EFC1
call _my_thread_var
mov dword ptr [rax], 89h
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_8EFDE
loc_8EFC1:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_30]
mov edx, [rbp+var_18]
mov ecx, [rbp+var_24]
mov r8, [rbp+var_20]
xor r9d, r9d
call maria_rtree_find_req
mov [rbp+var_4], eax
loc_8EFDE:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
|
long long maria_rtree_find_next(_DWORD *a1, const char *a2, unsigned int a3)
{
long long v3; // rax
_QWORD v5[2]; // [rsp+0h] [rbp-60h] BYREF
int v6; // [rsp+10h] [rbp-50h]
unsigned long long v7; // [rsp+20h] [rbp-40h]
unsigned long long i; // [rsp+28h] [rbp-38h]
long long v9; // [rsp+30h] [rbp-30h]
unsigned int v10; // [rsp+3Ch] [rbp-24h]
unsigned long long v11; // [rsp+40h] [rbp-20h]
unsigned int v12; // [rsp+48h] [rbp-18h]
unsigned int v13; // [rsp+4Ch] [rbp-14h]
_DWORD *v14; // [rsp+50h] [rbp-10h]
v14 = a1;
v13 = (unsigned int)a2;
v12 = a3;
v9 = 280LL * (unsigned int)a2 + *(_QWORD *)(*(_QWORD *)a1 + 1392LL);
v10 = 1024;
v12 = 1024;
if ( (a1[393] & 8) != 0 )
{
return (unsigned int)maria_rtree_find_first((long long)v14, (const char *)v14 + 512);
}
else
{
if ( !*((_BYTE *)v14 + 1669) )
{
for ( i = *((_QWORD *)v14 + 118); i < *((_QWORD *)v14 + 119); i += *(unsigned __int16 *)(v9 + 170) )
{
a1 = *(_DWORD **)(v9 + 192);
a2 = (const char *)*((_QWORD *)v14 + 115);
if ( !(unsigned int)maria_rtree_key_cmp(a1, a2, i, (unsigned int)v14[396], v12) )
{
v7 = *(unsigned __int16 *)(v9 + 170) + i;
v5[1] = v9;
v5[0] = i;
v6 = *(unsigned __int16 *)(v9 + 170) - *(_DWORD *)(*(_QWORD *)v14 + 992LL);
v3 = ma_row_pos_from_key((long long)v5);
*((_QWORD *)v14 + 19) = v3;
memcpy(*((_QWORD *)v14 + 64), i, (unsigned int)v14[132]);
if ( v7 >= *((_QWORD *)v14 + 119) )
*((_BYTE *)v14 + 1669) = 1;
else
*((_QWORD *)v14 + 118) = v7;
return 0;
}
}
}
v11 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)v14 + 280LL) + 8LL * v13);
if ( v11 == -1LL )
{
*(_DWORD *)my_thread_var(a1, a2) = 137;
return (unsigned int)-1;
}
else
{
return (unsigned int)maria_rtree_find_req((long long)v14, v9, v12, v10, v11, 0);
}
}
}
|
maria_rtree_find_next:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x570]
MOV ECX,dword ptr [RBP + -0x14]
IMUL RCX,RCX,0x118
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0018ee13
LAB_0018ee13:
MOV dword ptr [RBP + -0x24],0x400
MOV dword ptr [RBP + -0x18],0x400
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x624]
AND EAX,0x8
CMP EAX,0x0
JZ 0x0018ee52
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x200
MOV EDX,dword ptr [RBP + -0x18]
CALL 0x0018e770
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0018efde
LAB_0018ee52:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX + 0x685],0x0
JNZ 0x0018ef8e
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x3b0]
MOV qword ptr [RBP + -0x38],RAX
LAB_0018ee72:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x3b8]
JNC 0x0018ef8c
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x398]
MOV RDX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x630]
MOV R8D,dword ptr [RBP + -0x18]
CALL 0x00191c60
CMP EAX,0x0
JNZ 0x0018ef6e
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x30]
MOVZX ECX,word ptr [RCX + 0xaa]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX + 0xaa]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
SUB EAX,dword ptr [RCX + 0x3e0]
MOV dword ptr [RBP + -0x50],EAX
LEA RDI,[RBP + -0x60]
CALL 0x0016c3d0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x98],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x200]
MOV RSI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x210]
MOV EDX,EAX
CALL 0x0012a090
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x3b8]
JNC 0x0018ef5a
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x3b0],RCX
JMP 0x0018ef65
LAB_0018ef5a:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x685],0x1
LAB_0018ef65:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0018efde
LAB_0018ef6e:
MOV RAX,qword ptr [RBP + -0x30]
MOVZX ECX,word ptr [RAX + 0xaa]
MOV RAX,qword ptr [RBP + -0x38]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0018ee72
LAB_0018ef8c:
JMP 0x0018ef8e
LAB_0018ef8e:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x118]
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,-0x1
JNZ 0x0018efc1
CALL 0x001f7440
MOV dword ptr [RAX],0x89
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0018efde
LAB_0018efc1:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x30]
MOV EDX,dword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x24]
MOV R8,qword ptr [RBP + -0x20]
XOR R9D,R9D
CALL 0x0018e860
MOV dword ptr [RBP + -0x4],EAX
LAB_0018efde:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
int4 maria_rtree_find_next(long *param_1,uint param_2)
{
int iVar1;
long lVar2;
int4 *puVar3;
void *local_68;
long local_60;
int local_58;
ulong local_48;
void *local_40;
long local_38;
int4 local_2c;
long local_28;
int4 local_20;
uint local_1c;
long *local_18;
int4 local_c;
local_38 = *(long *)(*param_1 + 0x570) + (ulong)param_2 * 0x118;
local_2c = 0x400;
local_20 = 0x400;
local_1c = param_2;
local_18 = param_1;
if ((*(uint *)((long)param_1 + 0x624) & 8) == 0) {
if (*(char *)((long)param_1 + 0x685) == '\0') {
for (local_40 = (void *)param_1[0x76]; local_40 < (void *)local_18[0x77];
local_40 = (void *)((long)local_40 + (long)(int)(uint)*(ushort *)(local_38 + 0xaa))) {
iVar1 = maria_rtree_key_cmp(*(int8 *)(local_38 + 0xc0),local_18[0x73],local_40,
(int)local_18[0xc6],local_20);
if (iVar1 == 0) {
local_48 = (long)local_40 + (long)(int)(uint)*(ushort *)(local_38 + 0xaa);
local_60 = local_38;
local_68 = local_40;
local_58 = (uint)*(ushort *)(local_38 + 0xaa) - *(int *)(*local_18 + 0x3e0);
lVar2 = _ma_row_pos_from_key(&local_68);
local_18[0x13] = lVar2;
memcpy((void *)local_18[0x40],local_40,(ulong)*(uint *)(local_18 + 0x42));
if (local_48 < (ulong)local_18[0x77]) {
local_18[0x76] = local_48;
}
else {
*(int1 *)((long)local_18 + 0x685) = 1;
}
return 0;
}
}
}
local_28 = *(long *)(*(long *)(*local_18 + 0x118) + (ulong)local_1c * 8);
if (local_28 == -1) {
puVar3 = (int4 *)_my_thread_var();
*puVar3 = 0x89;
local_c = 0xffffffff;
}
else {
local_c = maria_rtree_find_req(local_18,local_38,local_20,local_2c,local_28,0);
}
}
else {
local_c = maria_rtree_find_first(param_1,param_1 + 0x40,0x400);
}
return local_c;
}
|
|
61,035
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [5], 0>(char const (&) [5])
|
llama.cpp/common/json.hpp
|
reference at(KeyType && key)
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return set_parent(it->second);
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [5], 0>(char const (&) [5]):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0xba32b
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0xba315
movq %rbx, %rdi
movq %r15, %rsi
callq 0x22120
testl %eax, %eax
je 0xba30a
addq $0x30, %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
jne 0xba2eb
jmp 0xba30d
movq %rbx, %rax
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rbx
cmpq %rbx, %rax
je 0xba389
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x21700
movq %rax, %rbx
movq %r14, %rdi
callq 0x8dda0
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x63ff4(%rip), %rsi # 0x11e341
leaq 0x20(%rsp), %rdi
callq 0x835b7
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x8dbc8
xorl %ebp, %ebp
leaq 0xa9cb8(%rip), %rsi # 0x164030
leaq -0x403f1(%rip), %rdx # 0x79f8e
movq %rbx, %rdi
callq 0x21b50
jmp 0xba402
movl $0x20, %edi
callq 0x21700
movq %rax, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x21740
leaq (%rax,%r15), %rdx
movq %rsp, %rdi
movq %r15, %rsi
callq 0x2c720
leaq 0x63f99(%rip), %rsi # 0x11e357
leaq 0x63f98(%rip), %rcx # 0x11e35d
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x8363f
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x8c32c
xorl %ebp, %ebp
leaq 0xa9bbd(%rip), %rsi # 0x163fb0
leaq -0x4046c(%rip), %rdx # 0x79f8e
movq %rbx, %rdi
callq 0x21b50
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xba420
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x211a0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xba46b
movq 0x10(%rsp), %rsi
jmp 0xba463
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xba475
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x211a0
jmp 0xba475
jmp 0xba472
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xba46b
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x211a0
testb %bpl, %bpl
jne 0xba475
jmp 0xba47d
movq %rax, %r14
movq %rbx, %rdi
callq 0x220a0
movq %r14, %rdi
callq 0x21c10
nop
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
push rbp; void *
push r15; int
push r14; __int64
push r12; int
push rbx; void *
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_BA32B
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
mov rax, [r12+8]
cmp rbx, rax
jz short loc_BA315
loc_BA2EB:
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_BA30A
add rbx, 30h ; '0'
mov rax, [r12+8]
cmp rbx, rax
jnz short loc_BA2EB
jmp short loc_BA30D
loc_BA30A:
mov rax, rbx
loc_BA30D:
mov rcx, [r14+8]
mov rbx, [rcx+8]
loc_BA315:
cmp rax, rbx
jz short loc_BA389
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_BA32B:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
mov rdx, rsp
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_BA402
loc_BA389:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r12, [rsp+68h+var_58]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
mov rdi, rsp
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_BA402:
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_BA420
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BA420:
mov rdi, [rsp+68h+var_68]
cmp rdi, r12
jz short loc_BA46B
mov rsi, [rsp+68h+var_58]
jmp short loc_BA463
mov r14, rax
mov rdi, [rsp+68h+var_68]; void *
cmp rdi, r12
jz short loc_BA475
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_BA475
jmp short loc_BA472
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_BA46B
mov rsi, [rsp+68h+var_38]
loc_BA463:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BA46B:
test bpl, bpl
jnz short loc_BA475
jmp short loc_BA47D
loc_BA472:
mov r14, rax
loc_BA475:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_BA47D:
mov rdi, r14
call __Unwind_Resume
|
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_(
long long a1,
_BYTE *a2)
{
long long *v2; // r12
long long v3; // rbx
long long v4; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx
long long v8; // rax
void *v9[2]; // [rsp+0h] [rbp-68h] BYREF
long long v10; // [rsp+10h] [rbp-58h] BYREF
_QWORD v11[2]; // [rsp+20h] [rbp-48h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = (void *)nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(
(long long)v11,
"cannot use at() with ",
(const char **)v9);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
304,
v11);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v2 = *(long long **)(a1 + 8);
v3 = *v2;
v4 = v2[1];
if ( *v2 != v4 )
{
while ( (unsigned int)std::string::compare(v3, a2) )
{
v3 += 48LL;
v4 = v2[1];
if ( v3 == v4 )
goto LABEL_7;
}
v4 = v3;
LABEL_7:
v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL);
}
if ( v4 == v3 )
{
v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = &v10;
v8 = strlen(a2);
std::string::_M_construct<char const*>((long long)v9, a2, (long long)&a2[v8]);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
(long long)v11,
"key '",
v9,
"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
v7,
403,
v11);
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v4 + 32;
}
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x001ba32b
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x001ba315
LAB_001ba2eb:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00122120
TEST EAX,EAX
JZ 0x001ba30a
ADD RBX,0x30
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JNZ 0x001ba2eb
JMP 0x001ba30d
LAB_001ba30a:
MOV RAX,RBX
LAB_001ba30d:
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x8]
LAB_001ba315:
CMP RAX,RBX
JZ 0x001ba389
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001ba32b:
MOV EDI,0x20
CALL 0x00121700
MOV RBX,RAX
MOV RDI,R14
CALL 0x0018dda0
MOV RDX,RSP
MOV qword ptr [RDX],RAX
LAB_001ba346:
LEA RSI,[0x21e341]
LEA RDI,[RSP + 0x20]
CALL 0x001835b7
MOV BPL,0x1
LAB_001ba35a:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x0018dbc8
XOR EBP,EBP
LEA RSI,[0x264030]
LEA RDX,[0x179f8e]
MOV RDI,RBX
CALL 0x00121b50
LAB_001ba389:
MOV EDI,0x20
CALL 0x00121700
MOV RBX,RAX
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x00121740
LEA RDX,[RAX + R15*0x1]
LAB_001ba3ac:
MOV RDI,RSP
MOV RSI,R15
CALL 0x0012c720
LAB_001ba3b7:
LEA RSI,[0x21e357]
LEA RCX,[0x21e35d]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x0018363f
MOV BPL,0x1
LAB_001ba3d5:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x0018c32c
XOR EBP,EBP
LEA RSI,[0x263fb0]
LEA RDX,[0x179f8e]
MOV RDI,RBX
CALL 0x00121b50
|
char * _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
long *plVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
size_t sVar5;
char *pcVar6;
char *local_68 [2];
char local_58 [16];
detail local_48 [32];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 001ba346 to 001ba356 has its CatchHandler @ 001ba472 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_48,"cannot use at() with ",local_68);
/* try { // try from 001ba35a to 001ba386 has its CatchHandler @ 001ba44d */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x130,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
plVar1 = *(long **)(param_1 + 8);
pcVar6 = (char *)*plVar1;
pcVar3 = (char *)plVar1[1];
if (pcVar6 != pcVar3) {
do {
pcVar3 = pcVar6;
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) break;
pcVar6 = pcVar3 + 0x30;
pcVar3 = (char *)plVar1[1];
} while (pcVar6 != pcVar3);
pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8);
}
if (pcVar3 == pcVar6) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = local_58;
sVar5 = strlen(param_2);
/* try { // try from 001ba3ac to 001ba3b6 has its CatchHandler @ 001ba44b */
std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5);
/* try { // try from 001ba3b7 to 001ba3d1 has its CatchHandler @ 001ba430 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_48,"key \'",(string *)local_68,"\' not found");
/* try { // try from 001ba3d5 to 001ba401 has its CatchHandler @ 001ba402 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x193,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return pcVar3 + 0x20;
}
|
|
61,036
|
parse_prefixed_json_tool_call_array(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)
|
monkey531[P]llama/common/chat.cpp
|
static common_chat_msg parse_prefixed_json_tool_call_array(const std::string& input, const std::string & prefix, size_t rstrip_prefix = 0) {
auto content_end = input.find(prefix);
size_t tc_start = std::string::npos;
common_chat_msg result;
result.role = "assistant";
const auto process_tool_calls = [&](const json & tool_calls) {
for (const auto & tool_call : tool_calls) {
const auto & arguments = tool_call["arguments"];
result.tool_calls.push_back({
tool_call["name"],
arguments.is_string() ? arguments.get<std::string>() : arguments.dump(),
tool_call.contains("id") ? tool_call["id"] : "",
});
}
};
if (content_end == std::string::npos) {
result.content = input;
} else {
tc_start = content_end + prefix.size() - rstrip_prefix;
result.content = input.substr(0, content_end);
auto tool_calls = json::parse(input.substr(tc_start));
process_tool_calls(tool_calls);
}
return result;
}
|
O3
|
cpp
|
parse_prefixed_json_tool_call_array(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbp
movq (%rdx), %rsi
movq 0x8(%rdx), %rcx
xorl %r13d, %r13d
movq %r14, %rdi
xorl %edx, %edx
callq 0x18bd0
movq %rax, %r15
leaq 0x10(%rbp), %rax
movq %rax, (%rbp)
movq %r13, 0x8(%rbp)
movb %r13b, 0x10(%rbp)
leaq 0x30(%rbp), %rax
movq %rax, 0x20(%rbp)
movq %r13, 0x28(%rbp)
movb %r13b, 0x30(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rbp)
movq %r13, 0x50(%rbp)
leaq 0x68(%rbp), %rax
movq %rax, 0x58(%rbp)
movq %r13, 0x60(%rbp)
movb %r13b, 0x68(%rbp)
leaq 0x1660d(%rip), %rcx # 0xac394
movl $0x9, %r8d
movq %rbp, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %rbp, 0x48(%rsp)
callq 0x18a90
leaq 0x20(%rbp), %r13
cmpq $-0x1, %r15
je 0x95ecb
movq 0x8(%r12), %r12
leaq 0x60(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %r15, %rcx
callq 0x18730
subq %rbx, %r15
addq %r12, %r15
leaq 0x60(%rsp), %rbx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x18850
movq (%rbx), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x95df3
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x186e0
leaq 0x60(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
movq $-0x1, %rcx
callq 0x18730
xorps %xmm0, %xmm0
leaq 0xd0(%rsp), %rdx
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
leaq 0x50(%rsp), %rbx
leaq 0x60(%rsp), %rsi
movq %rbx, %rdi
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0x6bade
movq 0xe0(%rsp), %rax
testq %rax, %rax
je 0x95e55
leaq 0xd0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x95e71
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x186e0
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rbx, 0x28(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rsp)
movq %rax, 0x40(%rsp)
movzbl 0x50(%rsp), %ecx
testl %ecx, %ecx
je 0x95f06
cmpl $0x2, %ecx
je 0x95edb
cmpl $0x1, %ecx
jne 0x95f11
movq 0x58(%rsp), %rcx
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
movq %rbx, 0x8(%rsp)
movq $0x0, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movq 0x8(%rcx), %rax
movq %rax, 0x10(%rsp)
jmp 0x95f2d
movq %r13, %rdi
movq %r14, %rsi
callq 0x183e0
jmp 0x960db
movq 0x58(%rsp), %rcx
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
movq %rbx, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq %rax, 0x20(%rsp)
movq 0x8(%rcx), %rax
movq %rax, 0x18(%rsp)
jmp 0x95f2d
movq $0x1, 0x40(%rsp)
jmp 0x95f1a
movq $0x0, 0x40(%rsp)
movq %rbx, 0x8(%rsp)
movups %xmm0, 0x10(%rsp)
movq $0x1, 0x20(%rsp)
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x514dc
testb %al, %al
jne 0x960d1
movq 0x48(%rsp), %rax
leaq 0x40(%rax), %r14
leaq 0x28(%rsp), %r13
leaq 0x60(%rsp), %r12
leaq 0xc0(%rsp), %r15
movq %r13, %rdi
callq 0x51170
movq %rax, %rbx
movq %rax, %rdi
leaq 0x192d4(%rip), %rsi # 0xaf248
callq 0x6c3cc
movq %rax, %rbp
movq %rbx, %rdi
leaq 0x19875(%rip), %rsi # 0xaf7fb
callq 0x6c3cc
movq %r12, %rdi
movq %rax, %rsi
callq 0x42b9a
cmpb $0x3, (%rbp)
jne 0x95fae
leaq 0x80(%rsp), %rdi
movq %rbp, %rsi
callq 0x42b9a
jmp 0x95fce
leaq 0x80(%rsp), %rdi
movq %rbp, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movl $0x20, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x2f19c
movq %rbx, %rdi
leaq 0x16824(%rip), %rsi # 0xac7fc
callq 0x6c36a
testb %al, %al
je 0x95ffd
movq %rbx, %rdi
leaq 0x16811(%rip), %rsi # 0xac7fc
callq 0x6c3cc
movq %r15, %rdi
movq %rax, %rsi
callq 0x2dfb0
jmp 0x9600c
movq %r15, %rdi
leaq 0x1478e(%rip), %rsi # 0xaa795
callq 0x7f166
leaq 0xa0(%rsp), %rdi
movq %r15, %rsi
callq 0x42b9a
movq %r14, %rdi
movq %r12, %rsi
callq 0x98fc8
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x9604c
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x186e0
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x96071
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x186e0
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x9608d
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x186e0
movq %r15, %rdi
callq 0x4d7e0
movq 0x28(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x2, %eax
je 0x960af
cmpl $0x1, %eax
jne 0x960b7
addq $0x30, 0x30(%rsp)
jmp 0x960bc
addq $0x10, 0x38(%rsp)
jmp 0x960bc
incq 0x40(%rsp)
movq %r13, %rdi
leaq 0x8(%rsp), %rsi
callq 0x514dc
testb %al, %al
je 0x95f5f
leaq 0x50(%rsp), %rdi
callq 0x4d7e0
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x96149
jmp 0x9613d
jmp 0x961ca
movq %rax, %r14
movq 0xe0(%rsp), %rax
testq %rax, %rax
je 0x96118
leaq 0xd0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x961d7
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x186e0
jmp 0x961d7
movq %rax, %rdi
callq 0x1f25d
jmp 0x96149
jmp 0x96149
movq %rax, %r14
jmp 0x961d7
movq %rax, %r14
jmp 0x961ac
movq %rax, %r14
leaq 0xc0(%rsp), %rdi
callq 0x4d7e0
jmp 0x96187
movq %rax, %r14
leaq 0x60(%rsp), %rdi
callq 0x98d80
leaq 0xc0(%rsp), %rdi
callq 0x4d7e0
jmp 0x961cd
movq %rax, %r14
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x961ac
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x186e0
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x961cd
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x186e0
jmp 0x961cd
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x4d7e0
movq 0x48(%rsp), %rdi
callq 0x2e1ec
movq %r14, %rdi
callq 0x18c10
|
_ZL35parse_prefixed_json_tool_call_arrayRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_m:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0F8h
mov rbx, rcx
mov r12, rdx
mov r14, rsi
mov rbp, rdi
mov rsi, [rdx]
mov rcx, [rdx+8]
xor r13d, r13d
mov rdi, r14
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong)
mov r15, rax
lea rax, [rbp+10h]
mov [rbp+0], rax
mov [rbp+8], r13
mov [rbp+10h], r13b
lea rax, [rbp+30h]
mov [rbp+20h], rax
mov [rbp+28h], r13
mov [rbp+30h], r13b
xorps xmm0, xmm0
movups xmmword ptr [rbp+40h], xmm0
mov [rbp+50h], r13
lea rax, [rbp+68h]
mov [rbp+58h], rax
mov [rbp+60h], r13
mov [rbp+68h], r13b
lea rcx, aYouAreAHelpful+12h; "assistant"
mov r8d, 9
mov rdi, rbp
xor esi, esi
xor edx, edx
mov [rsp+128h+var_E0], rbp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
lea r13, [rbp+20h]
cmp r15, 0FFFFFFFFFFFFFFFFh
jz loc_95ECB
mov r12, [r12+8]
lea rdi, [rsp+128h+var_C8]
mov rsi, r14
xor edx, edx
mov rcx, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
sub r15, rbx
add r15, r12
lea rbx, [rsp+128h+var_C8]
mov rdi, r13
mov rsi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [rbx]; void *
lea rax, [rsp+128h+var_B8]
cmp rdi, rax
jz short loc_95DF3
mov rsi, [rsp+128h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_95DF3:
lea rdi, [rsp+128h+var_C8]
mov rsi, r14
mov rdx, r15
mov rcx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
xorps xmm0, xmm0
lea rdx, [rsp+128h+var_58]
movaps xmmword ptr [rdx+10h], xmm0
movaps xmmword ptr [rdx], xmm0
lea rbx, [rsp+128h+var_D8]
lea rsi, [rsp+128h+var_C8]
mov rdi, rbx
mov ecx, 1
xor r8d, r8d
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5parseIS9_EESD_OT_St8functionIFbiNS0_6detail13parse_event_tERSD_EEbb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::parse<std::string>(std::string &&,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)>,bool,bool)
mov rax, [rsp+128h+var_48]
test rax, rax
jz short loc_95E55
lea rdi, [rsp+128h+var_58]
mov rsi, rdi
mov edx, 3
call rax
loc_95E55:
mov rdi, [rsp+128h+var_C8]; void *
lea rax, [rsp+128h+var_B8]
cmp rdi, rax
jz short loc_95E71
mov rsi, [rsp+128h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_95E71:
mov rax, 8000000000000000h
mov [rsp+128h+var_100], rbx
xorps xmm0, xmm0
movups [rsp+128h+var_F8], xmm0
mov [rsp+128h+var_E8], rax
movzx ecx, [rsp+128h+var_D8]
test ecx, ecx
jz short loc_95F06
cmp ecx, 2
jz short loc_95EDB
cmp ecx, 1
jnz short loc_95F11
mov rcx, [rsp+128h+var_D0]
mov rdx, [rcx]
mov qword ptr [rsp+128h+var_F8], rdx
mov [rsp+128h+var_120], rbx
mov qword ptr [rsp+128h+var_118+8], 0
mov [rsp+128h+var_108], rax
mov rax, [rcx+8]
mov qword ptr [rsp+128h+var_118], rax
jmp short loc_95F2D
loc_95ECB:
mov rdi, r13
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
jmp loc_960DB
loc_95EDB:
mov rcx, [rsp+128h+var_D0]
mov rdx, [rcx]
mov qword ptr [rsp+128h+var_F8+8], rdx
mov [rsp+128h+var_120], rbx
mov qword ptr [rsp+128h+var_118], 0
mov [rsp+128h+var_108], rax
mov rax, [rcx+8]
mov qword ptr [rsp+128h+var_118+8], rax
jmp short loc_95F2D
loc_95F06:
mov [rsp+128h+var_E8], 1
jmp short loc_95F1A
loc_95F11:
mov [rsp+128h+var_E8], 0
loc_95F1A:
mov [rsp+128h+var_120], rbx
movups [rsp+128h+var_118], xmm0
mov [rsp+128h+var_108], 1
loc_95F2D:
lea rdi, [rsp+128h+var_100]
lea rsi, [rsp+128h+var_120]
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
test al, al
jnz loc_960D1
mov rax, [rsp+128h+var_E0]
lea r14, [rax+40h]
lea r13, [rsp+128h+var_100]
lea r12, [rsp+128h+var_C8]
lea r15, [rsp+128h+var_68]
loc_95F5F:
mov rdi, r13
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEdeEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::operator*(void)
mov rbx, rax
mov rdi, rax
lea rsi, aKeywordArgumen+9; "arguments"
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[]<char const>(char const *)
mov rbp, rax
mov rdi, rbx
lea rsi, aNamespacedSetO+2Fh; "name"
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[]<char const>(char const *)
mov rdi, r12
mov rsi, rax
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
cmp byte ptr [rbp+0], 3
jnz short loc_95FAE
lea rdi, [rsp+128h+var_A8]
mov rsi, rbp
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
jmp short loc_95FCE
loc_95FAE:
lea rdi, [rsp+128h+var_A8]
mov rsi, rbp
mov edx, 0FFFFFFFFh
mov ecx, 20h ; ' '
xor r8d, r8d
xor r9d, r9d
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t)
loc_95FCE:
mov rdi, rbx
lea rsi, aToolCallId+0Ah; "id"
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
test al, al
jz short loc_95FFD
mov rdi, rbx
lea rsi, aToolCallId+0Ah; "id"
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[]<char const>(char const *)
mov rdi, r15
mov rsi, rax
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
jmp short loc_9600C
loc_95FFD:
mov rdi, r15
lea rsi, asc_AA728+6Dh; ""
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRA1_KcA1_cTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SK_EE5valueEiE4typeELi0EEEOT_
loc_9600C:
lea rdi, [rsp+128h+var_88]
mov rsi, r15
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
mov rdi, r14
mov rsi, r12
call _ZNSt6vectorI16common_tool_callSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<common_tool_call>::emplace_back<common_tool_call>(common_tool_call &&)
mov rdi, [rsp+128h+var_88]; void *
lea rax, [rsp+128h+var_78]
cmp rdi, rax
jz short loc_9604C
mov rsi, [rsp+128h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9604C:
mov rdi, [rsp+128h+var_A8]; void *
lea rax, [rsp+128h+var_98]
cmp rdi, rax
jz short loc_96071
mov rsi, [rsp+128h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_96071:
mov rdi, [rsp+128h+var_C8]; void *
lea rax, [rsp+128h+var_B8]
cmp rdi, rax
jz short loc_9608D
mov rsi, [rsp+128h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9608D:
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rax, [rsp+128h+var_100]
movzx eax, byte ptr [rax]
cmp eax, 2
jz short loc_960AF
cmp eax, 1
jnz short loc_960B7
add qword ptr [rsp+128h+var_F8], 30h ; '0'
jmp short loc_960BC
loc_960AF:
add qword ptr [rsp+128h+var_F8+8], 10h
jmp short loc_960BC
loc_960B7:
inc [rsp+128h+var_E8]
loc_960BC:
mov rdi, r13
lea rsi, [rsp+128h+var_120]
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
test al, al
jz loc_95F5F
loc_960D1:
lea rdi, [rsp+128h+var_D8]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_960DB:
add rsp, 0F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_96149
jmp short loc_9613D
jmp loc_961CA
mov r14, rax
mov rax, [rsp+128h+var_48]
test rax, rax
jz short loc_96118
lea rdi, [rsp+128h+var_58]
mov rsi, rdi
mov edx, 3
call rax
loc_96118:
mov rdi, [rsp+128h+var_C8]; void *
lea rax, [rsp+128h+var_B8]
cmp rdi, rax
jz loc_961D7
mov rsi, [rsp+128h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_961D7
loc_9613D:
mov rdi, rax
call __clang_call_terminate
jmp short loc_96149
jmp short $+2
loc_96149:
mov r14, rax
jmp loc_961D7
mov r14, rax
jmp short loc_961AC
mov r14, rax
lea rdi, [rsp+128h+var_68]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_96187
mov r14, rax
lea rdi, [rsp+128h+var_C8]; this
call _ZN16common_tool_callD2Ev; common_tool_call::~common_tool_call()
lea rdi, [rsp+128h+var_68]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_961CD
mov r14, rax
loc_96187:
mov rdi, [rsp+128h+var_A8]; void *
lea rax, [rsp+128h+var_98]
cmp rdi, rax
jz short loc_961AC
mov rsi, [rsp+128h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_961AC:
mov rdi, [rsp+128h+var_C8]; void *
lea rax, [rsp+128h+var_B8]
cmp rdi, rax
jz short loc_961CD
mov rsi, [rsp+128h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_961CD
loc_961CA:
mov r14, rax
loc_961CD:
lea rdi, [rsp+128h+var_D8]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_961D7:
mov rdi, [rsp+128h+var_E0]; this
call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg()
mov rdi, r14
call __Unwind_Resume
|
long long parse_prefixed_json_tool_call_array(long long a1, long long a2, _QWORD *a3, long long a4)
{
long long v6; // r15
long long v7; // rdx
long long v8; // rcx
long long v9; // r12
long long v10; // r15
long long result; // rax
char *v12; // r14
long long v13; // rbx
long long v14; // rdx
long long v15; // rcx
_BYTE *v16; // rbp
long long v17; // rdx
long long v18; // rcx
long long v19; // rax
long long v20; // rdx
long long v21; // rcx
long long v22; // rax
int v23; // eax
void ***v24; // [rsp+8h] [rbp-120h] BYREF
__int128 v25; // [rsp+10h] [rbp-118h]
long long v26; // [rsp+20h] [rbp-108h]
void ***v27; // [rsp+28h] [rbp-100h] BYREF
__int128 v28; // [rsp+30h] [rbp-F8h]
long long v29; // [rsp+40h] [rbp-E8h]
common_chat_msg *v30; // [rsp+48h] [rbp-E0h]
void **v31; // [rsp+50h] [rbp-D8h] BYREF
_QWORD *v32; // [rsp+58h] [rbp-D0h]
void *v33[2]; // [rsp+60h] [rbp-C8h] BYREF
_QWORD v34[2]; // [rsp+70h] [rbp-B8h] BYREF
void *v35[2]; // [rsp+80h] [rbp-A8h] BYREF
long long v36; // [rsp+90h] [rbp-98h] BYREF
void *v37; // [rsp+A0h] [rbp-88h] BYREF
long long v38; // [rsp+B0h] [rbp-78h] BYREF
void **v39[2]; // [rsp+C0h] [rbp-68h] BYREF
__int128 v40; // [rsp+D0h] [rbp-58h] BYREF
__int128 v41; // [rsp+E0h] [rbp-48h]
v6 = std::string::find(a2, *a3, 0LL, a3[1]);
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
*(_QWORD *)(a1 + 32) = a1 + 48;
*(_QWORD *)(a1 + 40) = 0LL;
*(_BYTE *)(a1 + 48) = 0;
*(_OWORD *)(a1 + 64) = 0LL;
*(_QWORD *)(a1 + 80) = 0LL;
*(_QWORD *)(a1 + 88) = a1 + 104;
*(_QWORD *)(a1 + 96) = 0LL;
*(_BYTE *)(a1 + 104) = 0;
v30 = (common_chat_msg *)a1;
std::string::_M_replace(a1, 0LL, 0LL, "assistant", 9LL);
if ( v6 == -1 )
return std::string::_M_assign(a1 + 32, a2, v7, v8);
v9 = a3[1];
std::string::substr(v33, a2, 0LL, v6);
v10 = v9 + v6 - a4;
std::string::operator=(a1 + 32, v33);
if ( v33[0] != v34 )
operator delete(v33[0], v34[0] + 1LL);
std::string::substr(v33, a2, v10, -1LL);
v41 = 0LL;
v40 = 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>::parse<std::string>(
(long long)&v31,
(long long *)v33,
(long long)&v40,
1u,
0);
if ( (_QWORD)v41 )
((void ( *)(__int128 *, __int128 *, long long))v41)(&v40, &v40, 3LL);
if ( v33[0] != v34 )
operator delete(v33[0], v34[0] + 1LL);
v27 = &v31;
v28 = 0LL;
v29 = 0x8000000000000000LL;
if ( !(_BYTE)v31 )
{
v29 = 1LL;
LABEL_16:
v24 = &v31;
v25 = 0LL;
v26 = 1LL;
goto LABEL_17;
}
if ( (unsigned __int8)v31 == 2 )
{
*((_QWORD *)&v28 + 1) = *v32;
v24 = &v31;
*(_QWORD *)&v25 = 0LL;
v26 = 0x8000000000000000LL;
*((_QWORD *)&v25 + 1) = v32[1];
goto LABEL_17;
}
if ( (unsigned __int8)v31 != 1 )
{
v29 = 0LL;
goto LABEL_16;
}
*(_QWORD *)&v28 = *v32;
v24 = &v31;
*((_QWORD *)&v25 + 1) = 0LL;
v26 = 0x8000000000000000LL;
*(_QWORD *)&v25 = v32[1];
LABEL_17:
result = ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_(
&v27,
&v24);
if ( !(_BYTE)result )
{
v12 = (char *)v30 + 64;
do
{
v13 = nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator*(&v27);
v16 = (_BYTE *)nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>(
v13,
(long long)"arguments",
v14,
v15);
v19 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>(
v13,
(long long)"name",
v17,
v18);
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
(long long)v33,
v19);
if ( *v16 == 3 )
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
(long long)v35,
(long long)v16);
else
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::dump(
(long long)v35,
(long long)v16,
-1,
32,
0,
0);
if ( ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_(
v13,
(long long)"id") )
{
v22 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>(
v13,
(long long)"id",
v20,
v21);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
(long long)v39,
v22);
}
else
{
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRA1_KcA1_cTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SK_EE5valueEiE4typeELi0EEEOT_((char *)v39);
}
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
(long long)&v37,
(long long)v39);
std::vector<common_tool_call>::emplace_back<common_tool_call>(v12, v33);
if ( v37 != &v38 )
operator delete(v37, v38 + 1);
if ( v35[0] != &v36 )
operator delete(v35[0], v36 + 1);
if ( v33[0] != v34 )
operator delete(v33[0], v34[0] + 1LL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v39);
v23 = *(unsigned __int8 *)v27;
if ( v23 == 2 )
{
*((_QWORD *)&v28 + 1) += 16LL;
}
else if ( v23 == 1 )
{
*(_QWORD *)&v28 = v28 + 48;
}
else
{
++v29;
}
result = ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_(
&v27,
&v24);
}
while ( !(_BYTE)result );
}
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v31);
return result;
}
|
parse_prefixed_json_tool_call_array:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xf8
MOV RBX,RCX
MOV R12,RDX
MOV R14,RSI
MOV RBP,RDI
MOV RSI,qword ptr [RDX]
MOV RCX,qword ptr [RDX + 0x8]
XOR R13D,R13D
MOV RDI,R14
XOR EDX,EDX
CALL 0x00118bd0
MOV R15,RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP],RAX
MOV qword ptr [RBP + 0x8],R13
MOV byte ptr [RBP + 0x10],R13B
LEA RAX,[RBP + 0x30]
MOV qword ptr [RBP + 0x20],RAX
MOV qword ptr [RBP + 0x28],R13
MOV byte ptr [RBP + 0x30],R13B
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBP + 0x40],XMM0
MOV qword ptr [RBP + 0x50],R13
LEA RAX,[RBP + 0x68]
MOV qword ptr [RBP + 0x58],RAX
MOV qword ptr [RBP + 0x60],R13
MOV byte ptr [RBP + 0x68],R13B
LAB_00195d80:
LEA RCX,[0x1ac394]
MOV R8D,0x9
MOV RDI,RBP
XOR ESI,ESI
XOR EDX,EDX
MOV qword ptr [RSP + 0x48],RBP
CALL 0x00118a90
LEA R13,[RBP + 0x20]
CMP R15,-0x1
JZ 0x00195ecb
MOV R12,qword ptr [R12 + 0x8]
LAB_00195db1:
LEA RDI,[RSP + 0x60]
MOV RSI,R14
XOR EDX,EDX
MOV RCX,R15
CALL 0x00118730
SUB R15,RBX
ADD R15,R12
LEA RBX,[RSP + 0x60]
MOV RDI,R13
MOV RSI,RBX
CALL 0x00118850
MOV RDI,qword ptr [RBX]
LEA RAX,[RSP + 0x70]
CMP RDI,RAX
JZ 0x00195df3
MOV RSI,qword ptr [RSP + 0x70]
INC RSI
CALL 0x001186e0
LAB_00195df3:
LEA RDI,[RSP + 0x60]
MOV RSI,R14
MOV RDX,R15
MOV RCX,-0x1
CALL 0x00118730
XORPS XMM0,XMM0
LEA RDX,[RSP + 0xd0]
MOVAPS xmmword ptr [RDX + 0x10],XMM0
MOVAPS xmmword ptr [RDX],XMM0
LAB_00195e1c:
LEA RBX,[RSP + 0x50]
LEA RSI,[RSP + 0x60]
MOV RDI,RBX
MOV ECX,0x1
XOR R8D,R8D
CALL 0x0016bade
MOV RAX,qword ptr [RSP + 0xe0]
TEST RAX,RAX
JZ 0x00195e55
LAB_00195e43:
LEA RDI,[RSP + 0xd0]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_00195e55:
MOV RDI,qword ptr [RSP + 0x60]
LEA RAX,[RSP + 0x70]
CMP RDI,RAX
JZ 0x00195e71
MOV RSI,qword ptr [RSP + 0x70]
INC RSI
CALL 0x001186e0
LAB_00195e71:
MOV RAX,-0x8000000000000000
MOV qword ptr [RSP + 0x28],RBX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x30],XMM0
MOV qword ptr [RSP + 0x40],RAX
MOVZX ECX,byte ptr [RSP + 0x50]
TEST ECX,ECX
JZ 0x00195f06
CMP ECX,0x2
JZ 0x00195edb
CMP ECX,0x1
JNZ 0x00195f11
MOV RCX,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP + 0x8],RBX
MOV qword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RCX + 0x8]
MOV qword ptr [RSP + 0x10],RAX
JMP 0x00195f2d
LAB_00195ecb:
MOV RDI,R13
MOV RSI,R14
CALL 0x001183e0
JMP 0x001960db
LAB_00195edb:
MOV RCX,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x38],RDX
MOV qword ptr [RSP + 0x8],RBX
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RCX + 0x8]
MOV qword ptr [RSP + 0x18],RAX
JMP 0x00195f2d
LAB_00195f06:
MOV qword ptr [RSP + 0x40],0x1
JMP 0x00195f1a
LAB_00195f11:
MOV qword ptr [RSP + 0x40],0x0
LAB_00195f1a:
MOV qword ptr [RSP + 0x8],RBX
MOVUPS xmmword ptr [RSP + 0x10],XMM0
MOV qword ptr [RSP + 0x20],0x1
LAB_00195f2d:
LEA RDI,[RSP + 0x28]
LEA RSI,[RSP + 0x8]
CALL 0x001514dc
TEST AL,AL
JNZ 0x001960d1
MOV RAX,qword ptr [RSP + 0x48]
LEA R14,[RAX + 0x40]
LEA R13,[RSP + 0x28]
LEA R12,[RSP + 0x60]
LEA R15,[RSP + 0xc0]
LAB_00195f5f:
MOV RDI,R13
CALL 0x00151170
MOV RBX,RAX
MOV RDI,RAX
LEA RSI,[0x1af248]
CALL 0x0016c3cc
MOV RBP,RAX
MOV RDI,RBX
LEA RSI,[0x1af7fb]
CALL 0x0016c3cc
MOV RDI,R12
MOV RSI,RAX
CALL 0x00142b9a
CMP byte ptr [RBP],0x3
JNZ 0x00195fae
LAB_00195f9c:
LEA RDI,[RSP + 0x80]
MOV RSI,RBP
CALL 0x00142b9a
JMP 0x00195fce
LAB_00195fae:
LEA RDI,[RSP + 0x80]
MOV RSI,RBP
MOV EDX,0xffffffff
MOV ECX,0x20
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0012f19c
LAB_00195fce:
MOV RDI,RBX
LEA RSI,[0x1ac7fc]
CALL 0x0016c36a
TEST AL,AL
JZ 0x00195ffd
MOV RDI,RBX
LEA RSI,[0x1ac7fc]
CALL 0x0016c3cc
MOV RDI,R15
MOV RSI,RAX
CALL 0x0012dfb0
JMP 0x0019600c
LAB_00195ffd:
MOV RDI,R15
LEA RSI,[0x1aa795]
CALL 0x0017f166
LAB_0019600c:
LEA RDI,[RSP + 0xa0]
MOV RSI,R15
CALL 0x00142b9a
LAB_0019601c:
MOV RDI,R14
MOV RSI,R12
CALL 0x00198fc8
MOV RDI,qword ptr [RSP + 0xa0]
LEA RAX,[RSP + 0xb0]
CMP RDI,RAX
JZ 0x0019604c
MOV RSI,qword ptr [RSP + 0xb0]
INC RSI
CALL 0x001186e0
LAB_0019604c:
MOV RDI,qword ptr [RSP + 0x80]
LEA RAX,[RSP + 0x90]
CMP RDI,RAX
JZ 0x00196071
MOV RSI,qword ptr [RSP + 0x90]
INC RSI
CALL 0x001186e0
LAB_00196071:
MOV RDI,qword ptr [RSP + 0x60]
LEA RAX,[RSP + 0x70]
CMP RDI,RAX
JZ 0x0019608d
MOV RSI,qword ptr [RSP + 0x70]
INC RSI
CALL 0x001186e0
LAB_0019608d:
MOV RDI,R15
CALL 0x0014d7e0
MOV RAX,qword ptr [RSP + 0x28]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x2
JZ 0x001960af
CMP EAX,0x1
JNZ 0x001960b7
ADD qword ptr [RSP + 0x30],0x30
JMP 0x001960bc
LAB_001960af:
ADD qword ptr [RSP + 0x38],0x10
JMP 0x001960bc
LAB_001960b7:
INC qword ptr [RSP + 0x40]
LAB_001960bc:
MOV RDI,R13
LEA RSI,[RSP + 0x8]
CALL 0x001514dc
TEST AL,AL
JZ 0x00195f5f
LAB_001960d1:
LEA RDI,[RSP + 0x50]
CALL 0x0014d7e0
LAB_001960db:
ADD RSP,0xf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* parse_prefixed_json_tool_call_array(std::__cxx11::string const&, std::__cxx11::string const&,
unsigned long) */
void parse_prefixed_json_tool_call_array(string *param_1,string *param_2,ulong param_3)
{
vector<common_tool_call,std::allocator<common_tool_call>> *this;
char cVar1;
long lVar2;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this_00;
basic_json *pbVar3;
basic_json *pbVar4;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*local_120;
long local_118;
long lStack_110;
int8 local_108;
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_100;
long local_f8;
long lStack_f0;
long local_e8;
string *local_e0;
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_d8 [8];
long *local_d0;
long *local_c8 [2];
long local_b8 [2];
long *local_a8 [2];
long local_98 [2];
long *local_88 [2];
long local_78 [2];
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_68 [16];
int8 local_58;
int8 uStack_50;
code *local_48;
int8 uStack_40;
lVar2 = std::__cxx11::string::find((char *)param_2,*(ulong *)param_3,0);
*(string **)param_1 = param_1 + 0x10;
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (string)0x0;
*(string **)(param_1 + 0x20) = param_1 + 0x30;
*(int8 *)(param_1 + 0x28) = 0;
param_1[0x30] = (string)0x0;
*(int8 *)(param_1 + 0x40) = 0;
*(int8 *)(param_1 + 0x48) = 0;
*(int8 *)(param_1 + 0x50) = 0;
*(string **)(param_1 + 0x58) = param_1 + 0x68;
*(int8 *)(param_1 + 0x60) = 0;
param_1[0x68] = (string)0x0;
local_e0 = param_1;
/* try { // try from 00195d80 to 00195d9d has its CatchHandler @ 00196149 */
std::__cxx11::string::_M_replace((ulong)param_1,0,(char *)0x0,0x1ac394);
if (lVar2 == -1) {
/* try { // try from 00195ecb to 00195ed5 has its CatchHandler @ 001960ed */
std::__cxx11::string::_M_assign(param_1 + 0x20);
return;
}
/* try { // try from 00195db1 to 00195dc2 has its CatchHandler @ 00196147 */
std::__cxx11::string::substr((ulong)local_c8,(ulong)param_2);
std::__cxx11::string::operator=(param_1 + 0x20,(string *)local_c8);
if (local_c8[0] != local_b8) {
operator_delete(local_c8[0],local_b8[0] + 1);
}
/* try { // try from 00195df3 to 00195e09 has its CatchHandler @ 00196145 */
std::__cxx11::string::substr((ulong)local_c8,(ulong)param_2);
local_48 = (code *)0x0;
uStack_40 = 0;
local_58 = 0;
uStack_50 = 0;
/* try { // try from 00195e1c to 00195e35 has its CatchHandler @ 001960f6 */
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::parse<std::__cxx11::string>(local_d8,local_c8,&local_58,1,0);
if (local_48 != (code *)0x0) {
/* try { // try from 00195e43 to 00195e54 has its CatchHandler @ 001960ef */
(*local_48)(&local_58,&local_58,3);
}
if (local_c8[0] != local_b8) {
operator_delete(local_c8[0],local_b8[0] + 1);
}
local_f8 = 0;
lStack_f0 = 0;
local_e8 = -0x8000000000000000;
if (local_d8[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>
)0x0) {
local_e8 = 1;
}
else {
if (local_d8[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>
)0x2) {
lStack_f0 = *local_d0;
local_118 = 0;
local_108 = 0x8000000000000000;
lStack_110 = local_d0[1];
goto LAB_00195f2d;
}
if (local_d8[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>
)0x1) {
local_f8 = *local_d0;
lStack_110 = 0;
local_108 = 0x8000000000000000;
local_118 = local_d0[1];
goto LAB_00195f2d;
}
local_e8 = 0;
}
local_118 = 0;
lStack_110 = 0;
local_108 = 1;
LAB_00195f2d:
/* try { // try from 00195f2d to 00195f3b has its CatchHandler @ 001960f1 */
local_120 = local_d8;
local_100 = local_d8;
cVar1 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
(&local_100,&local_120);
if (cVar1 == '\0') {
this = (vector<common_tool_call,std::allocator<common_tool_call>> *)(local_e0 + 0x40);
do {
/* try { // try from 00195f5f to 00195f95 has its CatchHandler @ 001961ca */
this_00 = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)nlohmann::json_abi_v3_11_3::detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::operator*((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_100);
pbVar3 = nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[]<char_const>(this_00,"arguments");
pbVar4 = nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[]<char_const>(this_00,"name");
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
((common_tool_call *)local_c8,pbVar4);
if (*pbVar3 == (basic_json)0x3) {
/* try { // try from 00195f9c to 00195fcd has its CatchHandler @ 00196151 */
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(local_a8,pbVar3);
}
else {
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::dump(local_a8,pbVar3,0xffffffff,0x20,0,0);
}
/* try { // try from 00195fce to 0019600b has its CatchHandler @ 00196184 */
cVar1 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
(this_00,"id");
if (cVar1 == '\0') {
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRA1_KcA1_cTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SK_EE5valueEiE4typeELi0EEEOT_
(local_68,"");
}
else {
pbVar3 = nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[]<char_const>(this_00,"id");
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_68,pbVar3);
}
/* try { // try from 0019600c to 0019601b has its CatchHandler @ 00196156 */
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(local_88,local_68);
/* try { // try from 0019601c to 00196026 has its CatchHandler @ 00196168 */
std::vector<common_tool_call,std::allocator<common_tool_call>>::emplace_back<common_tool_call>
(this,(common_tool_call *)local_c8);
if (local_88[0] != local_78) {
operator_delete(local_88[0],local_78[0] + 1);
}
if (local_a8[0] != local_98) {
operator_delete(local_a8[0],local_98[0] + 1);
}
if (local_c8[0] != local_b8) {
operator_delete(local_c8[0],local_b8[0] + 1);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_68);
if (*local_100 ==
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
lStack_f0 = lStack_f0 + 0x10;
}
else if (*local_100 ==
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
local_f8 = local_f8 + 0x30;
}
else {
local_e8 = local_e8 + 1;
}
/* try { // try from 001960bc to 001960c8 has its CatchHandler @ 001961ca */
cVar1 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_100,&local_120);
} while (cVar1 == '\0');
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_d8);
return;
}
|
|
61,037
|
ggml_compute_forward_soft_max
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
|
static void ggml_compute_forward_soft_max(
const struct ggml_compute_params * params,
struct ggml_tensor * dst) {
const struct ggml_tensor * src0 = dst->src[0];
switch (src0->type) {
case GGML_TYPE_F32:
{
ggml_compute_forward_soft_max_f32(params, dst);
} break;
default:
{
GGML_ABORT("fatal error");
}
}
}
|
O0
|
c
|
ggml_compute_forward_soft_max:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
testl %eax, %eax
jne 0x1692a
jmp 0x1691b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2e320
jmp 0x16944
leaq 0x5d231(%rip), %rdi # 0x73b62
movl $0x22c7, %esi # imm = 0x22C7
leaq 0x5d480(%rip), %rdx # 0x73dbd
movb $0x0, %al
callq 0xe270
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
ggml_compute_forward_soft_max:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov rax, [rax+98h]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov eax, [rax]
test eax, eax
jnz short loc_1692A
jmp short $+2
loc_1691B:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call ggml_compute_forward_soft_max_f32
jmp short loc_16944
loc_1692A:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 22C7h
lea rdx, aFatalError; "fatal error"
mov al, 0
call _ggml_abort
loc_16944:
add rsp, 20h
pop rbp
retn
|
double ggml_compute_forward_soft_max(long long a1, long long a2)
{
double result; // xmm0_8
if ( **(_DWORD **)(a2 + 152) )
return ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
8903LL,
"fatal error");
ggml_compute_forward_soft_max_f32(a1, a2);
return result;
}
|
ggml_compute_forward_soft_max:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
TEST EAX,EAX
JNZ 0x0011692a
JMP 0x0011691b
LAB_0011691b:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x0012e320
JMP 0x00116944
LAB_0011692a:
LEA RDI,[0x173b62]
MOV ESI,0x22c7
LEA RDX,[0x173dbd]
MOV AL,0x0
CALL 0x0010e270
LAB_00116944:
ADD RSP,0x20
POP RBP
RET
|
void ggml_compute_forward_soft_max(int8 param_1,long param_2)
{
if (**(int **)(param_2 + 0x98) == 0) {
ggml_compute_forward_soft_max_f32(param_1,param_2);
}
else {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x22c7,"fatal error");
}
return;
}
|
|
61,038
|
mi_rec_unpack
|
eloqsql/storage/myisam/mi_dynrec.c
|
size_t _mi_rec_unpack(register MI_INFO *info, register uchar *to, uchar *from,
ulong found_length)
{
uint flag,bit,length,rec_length,min_pack_length;
enum en_fieldtype type;
uchar *from_end,*to_end,*packpos;
reg3 MI_COLUMNDEF *rec,*end_field;
DBUG_ENTER("_mi_rec_unpack");
to_end=to + info->s->base.reclength;
from_end=from+found_length;
flag= (uchar) *from; bit=1; packpos=from;
if (found_length < info->s->base.min_pack_length)
goto err;
from+= info->s->base.pack_bits;
min_pack_length=info->s->base.min_pack_length - info->s->base.pack_bits;
for (rec=info->s->rec , end_field=rec+info->s->base.fields ;
rec < end_field ; to+= rec_length, rec++)
{
rec_length=rec->length;
if ((type = (enum en_fieldtype) rec->type) != FIELD_NORMAL &&
(type != FIELD_CHECK))
{
if (type == FIELD_VARCHAR)
{
uint pack_length= HA_VARCHAR_PACKLENGTH(rec_length-1);
if (pack_length == 1)
{
length= (uint) *(uchar*) from;
if (length > rec_length-1)
goto err;
*to= *from++;
}
else
{
get_key_length(length, from);
if (length > rec_length-2)
goto err;
int2store(to,length);
}
if (from+length > from_end)
goto err;
memcpy(to+pack_length, from, length);
from+= length;
min_pack_length--;
continue;
}
if (flag & bit)
{
if (type == FIELD_BLOB || type == FIELD_SKIP_ZERO)
bzero((uchar*) to,rec_length);
else if (type == FIELD_SKIP_ENDSPACE ||
type == FIELD_SKIP_PRESPACE)
{
if (rec->length > 255 && *from & 128)
{
if (from + 1 >= from_end)
goto err;
length= (*from & 127)+ ((uint) (uchar) *(from+1) << 7); from+=2;
}
else
{
if (from == from_end)
goto err;
length= (uchar) *from++;
}
min_pack_length--;
if (length >= rec_length ||
min_pack_length + length > (uint) (from_end - from))
goto err;
if (type == FIELD_SKIP_ENDSPACE)
{
memcpy(to,(uchar*) from,(size_t) length);
bfill((uchar*) to+length,rec_length-length,' ');
}
else
{
bfill((uchar*) to,rec_length-length,' ');
memcpy(to+rec_length-length,(uchar*) from,(size_t) length);
}
from+=length;
}
}
else if (type == FIELD_BLOB)
{
uint size_length=rec_length- portable_sizeof_char_ptr;
ulong blob_length=_mi_calc_blob_length(size_length,from);
ulong from_left= (ulong) (from_end - from);
if (from_left < size_length ||
from_left - size_length < blob_length ||
from_left - size_length - blob_length < min_pack_length)
goto err;
memcpy(to, from, (size_t) size_length);
from+=size_length;
memcpy(to+size_length, &from, sizeof(char*));
from+=blob_length;
}
else
{
if (type == FIELD_SKIP_ENDSPACE || type == FIELD_SKIP_PRESPACE)
min_pack_length--;
if (min_pack_length + rec_length > (uint) (from_end - from))
goto err;
memcpy(to,(uchar*) from,(size_t) rec_length); from+=rec_length;
}
if ((bit= bit << 1) >= 256)
{
flag= (uchar) *++packpos; bit=1;
}
}
else
{
if (min_pack_length > (uint) (from_end - from))
goto err;
min_pack_length-=rec_length;
memcpy(to, (uchar*) from, (size_t) rec_length);
from+=rec_length;
}
}
if (info->s->calc_checksum)
from++;
if (to == to_end && from == from_end && (bit == 1 || !(flag & ~(bit-1))))
DBUG_RETURN(found_length);
err:
my_errno= HA_ERR_WRONG_IN_RECORD;
DBUG_PRINT("error",("to_end: %p -> %p from_end: %p -> %p",
to, to_end, from, from_end));
DBUG_DUMP("from",(uchar*) info->rec_buff,info->s->base.min_pack_length);
DBUG_RETURN(MY_FILE_ERROR);
}
|
O3
|
c
|
mi_rec_unpack:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, -0x58(%rbp)
movq %rdi, -0x70(%rbp)
movq (%rdi), %rax
movq 0x150(%rax), %r15
movq %rcx, -0x60(%rbp)
cmpq %rcx, %r15
jbe 0x33b07
callq 0x624a2
movl $0x7f, (%rax)
movq $-0x1, -0x60(%rbp)
movq -0x60(%rbp), %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %r14
movq 0x140(%rax), %rsi
addq %r14, %rsi
movq -0x60(%rbp), %rcx
movq -0x58(%rbp), %rdx
addq %rdx, %rcx
movq %rcx, -0x38(%rbp)
movzbl (%rdx), %ecx
movl %ecx, -0x44(%rbp)
movl 0x18c(%rax), %ecx
leaq (%rdx,%rcx), %r13
movq 0x168(%rax), %rdx
testq %rdx, %rdx
jle 0x33e44
movq %rsi, -0x68(%rbp)
movq 0x230(%rax), %rbx
leaq (%rdx,%rdx,2), %rax
shlq $0x4, %rax
addq %rbx, %rax
movq %rax, -0x78(%rbp)
subl %ecx, %r15d
movl $0x1, -0x2c(%rbp)
movzwl 0x4(%rbx), %r12d
movl (%rbx), %eax
testl %eax, %eax
je 0x33bb5
cmpl $0x9, %eax
je 0x33bb5
cmpl $0x8, %eax
jne 0x33bde
leal -0x1(%r12), %edx
cmpl $0x100, %edx # imm = 0x100
movl $0x2, %edi
sbbq $0x0, %rdi
movb (%r13), %cl
movzbl %cl, %eax
cmpl $0xff, %edx
ja 0x33c00
cmpl %eax, %edx
jb 0x33ae1
incq %r13
movb %cl, (%r14)
movq %r13, %rsi
jmp 0x33cf3
movq -0x38(%rbp), %rax
subl %r13d, %eax
cmpl %eax, %r15d
ja 0x33ae1
subl %r12d, %r15d
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x282f0
addq %r12, %r13
jmp 0x33e0d
movl -0x2c(%rbp), %ecx
testl %ecx, -0x44(%rbp)
je 0x33c11
leal -0x3(%rax), %ecx
cmpl $0x1, %ecx
ja 0x33c42
movq %r14, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x281f0
jmp 0x33de3
cmpb $-0x1, %cl
je 0x33cce
incq %r13
jmp 0x33cde
cmpl $0x4, %eax
jne 0x33d13
leal -0x9(%r12), %eax
cmpl $0x3, %eax
ja 0x33d91
leaq 0x6be71(%rip), %rcx # 0x9faa0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzbl (%r13), %r8d
jmp 0x33d94
cmpl $0x2, %eax
ja 0x33de3
cmpl $0x100, %r12d # imm = 0x100
jb 0x33c61
movzbl (%r13), %ecx
testb %cl, %cl
js 0x33e20
cmpq -0x38(%rbp), %r13
je 0x33ae1
movzbl (%r13), %esi
incq %r13
movl %r12d, %r8d
subl %esi, %r8d
jbe 0x33ae1
decl %r15d
leal (%rsi,%r15), %ecx
movq -0x38(%rbp), %rdx
subl %r13d, %edx
cmpl %edx, %ecx
ja 0x33ae1
cmpl $0x1, %eax
jne 0x33d45
movl %esi, %edx
movq %rdx, -0x40(%rbp)
movq %r14, %rdi
movq %r13, %rsi
movq %r8, -0x50(%rbp)
callq 0x282f0
movq -0x40(%rbp), %rax
leaq (%r14,%rax), %rdi
movl $0x20, %esi
movq -0x50(%rbp), %rdx
callq 0x281f0
jmp 0x33ddf
movzwl 0x1(%r13), %eax
rolw $0x8, %ax
movzwl %ax, %eax
addq $0x3, %r13
movq %r13, %rsi
movl %r12d, %ecx
addl $-0x2, %ecx
cmpl %ecx, %eax
ja 0x33ae1
movw %ax, (%r14)
movl %eax, %edx
leaq (%rsi,%rdx), %r13
cmpq -0x38(%rbp), %r13
ja 0x33ae1
addq %r14, %rdi
callq 0x282f0
decl %r15d
jmp 0x33e0d
cmpl $0x3, %eax
sbbl $0x0, %r15d
movl %r12d, %eax
addl %r15d, %eax
movq -0x38(%rbp), %rcx
subl %r13d, %ecx
cmpl %ecx, %eax
ja 0x33ae1
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x282f0
addq %r12, %r13
jmp 0x33de3
movq %r14, %rdi
movq %rsi, -0x40(%rbp)
movl $0x20, %esi
movq %r8, %rdx
callq 0x281f0
leaq (%r14,%r12), %rdi
movl -0x40(%rbp), %edx
subq %rdx, %rdi
movq %r13, %rsi
movq %rdx, -0x40(%rbp)
callq 0x282f0
jmp 0x33ddf
movzwl (%r13), %eax
movzbl 0x2(%r13), %r8d
shll $0x10, %r8d
orq %rax, %r8
jmp 0x33d94
movl (%r13), %r8d
jmp 0x33d94
movzwl (%r13), %r8d
jmp 0x33d94
xorl %r8d, %r8d
movl %r12d, %ecx
addl $-0x8, %ecx
movq -0x38(%rbp), %rax
subq %r13, %rax
movl %ecx, %edx
subq %rdx, %rax
jb 0x33ae1
subq %r8, %rax
jb 0x33ae1
movl %r15d, %ecx
cmpq %rcx, %rax
jb 0x33ae1
movq %r14, %rdi
movq %r13, %rsi
movq %r8, -0x40(%rbp)
movq %rdx, -0x50(%rbp)
callq 0x282f0
movq -0x50(%rbp), %rax
addq %rax, %r13
movq %r13, (%r14,%rax)
addq -0x40(%rbp), %r13
movl -0x2c(%rbp), %eax
addl %eax, %eax
cmpl $0x100, %eax # imm = 0x100
jae 0x33df4
movl %eax, -0x2c(%rbp)
jmp 0x33e0d
movq -0x58(%rbp), %rcx
movzbl 0x1(%rcx), %eax
movl %eax, -0x44(%rbp)
incq %rcx
movq %rcx, -0x58(%rbp)
movl $0x1, -0x2c(%rbp)
addq %r12, %r14
addq $0x30, %rbx
cmpq -0x78(%rbp), %rbx
jb 0x33b67
jmp 0x33e4d
leaq 0x1(%r13), %rdx
cmpq -0x38(%rbp), %rdx
jae 0x33ae1
andl $0x7f, %ecx
movzbl 0x1(%r13), %esi
shll $0x7, %esi
orl %ecx, %esi
addq $0x2, %r13
jmp 0x33c73
movl $0x1, -0x2c(%rbp)
jmp 0x33e58
movq -0x70(%rbp), %rax
movq (%rax), %rax
movq -0x68(%rbp), %rsi
cmpq $0x1, 0x2c8(%rax)
sbbq $-0x1, %r13
cmpq %rsi, %r14
jne 0x33ae1
cmpq -0x38(%rbp), %r13
jne 0x33ae1
movl -0x2c(%rbp), %eax
cmpl $0x1, %eax
je 0x33af4
negl %eax
testl %eax, -0x44(%rbp)
jne 0x33ae1
jmp 0x33af4
|
_mi_rec_unpack:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rbp+var_58], rdx
mov [rbp+var_70], rdi
mov rax, [rdi]
mov r15, [rax+150h]
mov [rbp+var_60], rcx
cmp r15, rcx
jbe short loc_33B07
loc_33AE1:
call _my_thread_var
mov dword ptr [rax], 7Fh
mov [rbp+var_60], 0FFFFFFFFFFFFFFFFh
loc_33AF4:
mov rax, [rbp+var_60]
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_33B07:
mov r14, rsi
mov rsi, [rax+140h]
add rsi, r14
mov rcx, [rbp+var_60]
mov rdx, [rbp+var_58]
add rcx, rdx
mov [rbp+var_38], rcx
movzx ecx, byte ptr [rdx]
mov [rbp+var_44], ecx
mov ecx, [rax+18Ch]
lea r13, [rdx+rcx]
mov rdx, [rax+168h]
test rdx, rdx
jle loc_33E44
mov [rbp+var_68], rsi
mov rbx, [rax+230h]
lea rax, [rdx+rdx*2]
shl rax, 4
add rax, rbx
mov [rbp+var_78], rax
sub r15d, ecx
mov [rbp+var_2C], 1
loc_33B67:
movzx r12d, word ptr [rbx+4]
mov eax, [rbx]
test eax, eax
jz short loc_33BB5
cmp eax, 9
jz short loc_33BB5
cmp eax, 8
jnz short loc_33BDE
lea edx, [r12-1]
cmp edx, 100h
mov edi, 2
sbb rdi, 0
mov cl, [r13+0]
movzx eax, cl
cmp edx, 0FFh
ja short loc_33C00
cmp edx, eax
jb loc_33AE1
inc r13
mov [r14], cl
mov rsi, r13
jmp loc_33CF3
loc_33BB5:
mov rax, [rbp+var_38]
sub eax, r13d
cmp r15d, eax
ja loc_33AE1
sub r15d, r12d
mov rdi, r14
mov rsi, r13
mov rdx, r12
call _memcpy
add r13, r12
jmp loc_33E0D
loc_33BDE:
mov ecx, [rbp+var_2C]
test [rbp+var_44], ecx
jz short loc_33C11
lea ecx, [rax-3]
cmp ecx, 1
ja short loc_33C42
mov rdi, r14
xor esi, esi
mov rdx, r12
call _memset
jmp loc_33DE3
loc_33C00:
cmp cl, 0FFh
jz loc_33CCE
inc r13
jmp loc_33CDE
loc_33C11:
cmp eax, 4
jnz loc_33D13
lea eax, [r12-9]; switch 4 cases
cmp eax, 3
ja def_33C36; jumptable 0000000000033C36 default case
lea rcx, jpt_33C36
movsxd rax, ds:(jpt_33C36 - 9FAA0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_33C38:
movzx r8d, byte ptr [r13+0]; jumptable 0000000000033C36 case 9
jmp loc_33D94
loc_33C42:
cmp eax, 2
ja loc_33DE3
cmp r12d, 100h
jb short loc_33C61
movzx ecx, byte ptr [r13+0]
test cl, cl
js loc_33E20
loc_33C61:
cmp r13, [rbp+var_38]
jz loc_33AE1
movzx esi, byte ptr [r13+0]
inc r13
loc_33C73:
mov r8d, r12d
sub r8d, esi
jbe loc_33AE1
dec r15d
lea ecx, [rsi+r15]
mov rdx, [rbp+var_38]
sub edx, r13d
cmp ecx, edx
ja loc_33AE1
cmp eax, 1
jnz loc_33D45
mov edx, esi
mov [rbp+var_40], rdx
mov rdi, r14
mov rsi, r13
mov [rbp+var_50], r8
call _memcpy
mov rax, [rbp+var_40]
lea rdi, [r14+rax]
mov esi, 20h ; ' '
mov rdx, [rbp+var_50]
call _memset
jmp loc_33DDF
loc_33CCE:
movzx eax, word ptr [r13+1]
rol ax, 8
movzx eax, ax
add r13, 3
loc_33CDE:
mov rsi, r13
mov ecx, r12d
add ecx, 0FFFFFFFEh
cmp eax, ecx
ja loc_33AE1
mov [r14], ax
loc_33CF3:
mov edx, eax
lea r13, [rsi+rdx]
cmp r13, [rbp+var_38]
ja loc_33AE1
add rdi, r14
call _memcpy
dec r15d
jmp loc_33E0D
loc_33D13:
cmp eax, 3
sbb r15d, 0
mov eax, r12d
add eax, r15d
mov rcx, [rbp+var_38]
sub ecx, r13d
cmp eax, ecx
ja loc_33AE1
mov rdi, r14
mov rsi, r13
mov rdx, r12
call _memcpy
add r13, r12
jmp loc_33DE3
loc_33D45:
mov rdi, r14
mov [rbp+var_40], rsi
mov esi, 20h ; ' '
mov rdx, r8
call _memset
lea rdi, [r14+r12]
mov edx, dword ptr [rbp+var_40]
sub rdi, rdx
mov rsi, r13
mov [rbp+var_40], rdx
call _memcpy
jmp short loc_33DDF
loc_33D71:
movzx eax, word ptr [r13+0]; jumptable 0000000000033C36 case 11
movzx r8d, byte ptr [r13+2]
shl r8d, 10h
or r8, rax
jmp short loc_33D94
loc_33D84:
mov r8d, [r13+0]; jumptable 0000000000033C36 case 12
jmp short loc_33D94
loc_33D8A:
movzx r8d, word ptr [r13+0]; jumptable 0000000000033C36 case 10
jmp short loc_33D94
def_33C36:
xor r8d, r8d; jumptable 0000000000033C36 default case
loc_33D94:
mov ecx, r12d
add ecx, 0FFFFFFF8h
mov rax, [rbp+var_38]
sub rax, r13
mov edx, ecx
sub rax, rdx
jb loc_33AE1
sub rax, r8
jb loc_33AE1
mov ecx, r15d
cmp rax, rcx
jb loc_33AE1
mov rdi, r14
mov rsi, r13
mov [rbp+var_40], r8
mov [rbp+var_50], rdx
call _memcpy
mov rax, [rbp+var_50]
add r13, rax
mov [r14+rax], r13
loc_33DDF:
add r13, [rbp+var_40]
loc_33DE3:
mov eax, [rbp+var_2C]
add eax, eax
cmp eax, 100h
jnb short loc_33DF4
mov [rbp+var_2C], eax
jmp short loc_33E0D
loc_33DF4:
mov rcx, [rbp+var_58]
movzx eax, byte ptr [rcx+1]
mov [rbp+var_44], eax
inc rcx
mov [rbp+var_58], rcx
mov [rbp+var_2C], 1
loc_33E0D:
add r14, r12
add rbx, 30h ; '0'
cmp rbx, [rbp+var_78]
jb loc_33B67
jmp short loc_33E4D
loc_33E20:
lea rdx, [r13+1]
cmp rdx, [rbp+var_38]
jnb loc_33AE1
and ecx, 7Fh
movzx esi, byte ptr [r13+1]
shl esi, 7
or esi, ecx
add r13, 2
jmp loc_33C73
loc_33E44:
mov [rbp+var_2C], 1
jmp short loc_33E58
loc_33E4D:
mov rax, [rbp+var_70]
mov rax, [rax]
mov rsi, [rbp+var_68]
loc_33E58:
cmp qword ptr [rax+2C8h], 1
sbb r13, 0FFFFFFFFFFFFFFFFh
cmp r14, rsi
jnz loc_33AE1
cmp r13, [rbp+var_38]
jnz loc_33AE1
mov eax, [rbp+var_2C]
cmp eax, 1
jz loc_33AF4
neg eax
test [rbp+var_44], eax
jnz loc_33AE1
jmp loc_33AF4
|
long long mi_rec_unpack(long long a1, long long a2, long long a3, unsigned long long a4)
{
long long v4; // rax
unsigned long long v5; // r15
long long v7; // r14
long long v8; // rcx
unsigned __int8 *v9; // r13
unsigned long long v10; // rbx
unsigned int v11; // r15d
long long v12; // r12
unsigned int v13; // eax
unsigned int v14; // eax
unsigned __int8 *v15; // r13
unsigned long long v16; // r8
unsigned __int8 *v17; // r13
long long v18; // rcx
long long v19; // rcx
long long v20; // rcx
unsigned long long v21; // rax
bool v22; // cf
unsigned long long v23; // rax
long long v24; // rax
unsigned __int8 *v25; // r13
unsigned long long v26; // [rsp+8h] [rbp-78h]
long long *v27; // [rsp+10h] [rbp-70h]
long long v28; // [rsp+18h] [rbp-68h]
unsigned long long v29; // [rsp+20h] [rbp-60h]
long long v30; // [rsp+28h] [rbp-58h]
long long v31; // [rsp+30h] [rbp-50h]
int v32; // [rsp+3Ch] [rbp-44h]
unsigned long long v33; // [rsp+40h] [rbp-40h]
unsigned long long v34; // [rsp+48h] [rbp-38h]
int v35; // [rsp+54h] [rbp-2Ch]
v30 = a3;
v27 = (long long *)a1;
v4 = *(_QWORD *)a1;
v5 = *(_QWORD *)(*(_QWORD *)a1 + 336LL);
v29 = a4;
if ( v5 > a4 )
{
LABEL_2:
*(_DWORD *)my_thread_var(a1, a2, a3) = 127;
return -1LL;
}
v7 = a2;
a2 += *(_QWORD *)(v4 + 320);
v34 = a3 + a4;
v32 = *(unsigned __int8 *)a3;
v8 = *(unsigned int *)(v4 + 396);
v9 = (unsigned __int8 *)(a3 + v8);
a3 = *(_QWORD *)(v4 + 360);
if ( a3 <= 0 )
{
v35 = 1;
goto LABEL_56;
}
v28 = a2;
v10 = *(_QWORD *)(v4 + 560);
v26 = v10 + 48 * a3;
v11 = v5 - v8;
v35 = 1;
do
{
v12 = *(unsigned __int16 *)(v10 + 4);
v13 = *(_DWORD *)v10;
if ( !*(_DWORD *)v10 || v13 == 9 )
{
if ( v11 > (int)v34 - (int)v9 )
goto LABEL_2;
v11 -= v12;
a1 = v7;
a2 = (long long)v9;
memcpy(v7, v9, *(unsigned __int16 *)(v10 + 4), v8);
v9 += v12;
goto LABEL_51;
}
if ( v13 != 8 )
{
if ( (v35 & v32) != 0 )
{
v8 = v13 - 3;
if ( (unsigned int)v8 <= 1 )
{
a1 = v7;
a2 = 0LL;
memset(v7, 0LL, *(unsigned __int16 *)(v10 + 4));
goto LABEL_48;
}
if ( v13 > 2 )
{
LABEL_48:
if ( (unsigned int)(2 * v35) >= 0x100 )
{
v32 = *(unsigned __int8 *)(v30 + 1);
v8 = ++v30;
v35 = 1;
}
else
{
v35 *= 2;
}
goto LABEL_51;
}
if ( (unsigned int)v12 >= 0x100 && (*v9 & 0x80u) != 0 )
{
a3 = (long long)(v9 + 1);
if ( (unsigned long long)(v9 + 1) >= v34 )
goto LABEL_2;
a2 = *v9 & 0x7F | (v9[1] << 7);
v17 = v9 + 2;
}
else
{
if ( v9 == (unsigned __int8 *)v34 )
goto LABEL_2;
a2 = *v9;
v17 = v9 + 1;
}
if ( (unsigned int)v12 <= (unsigned int)a2 )
goto LABEL_2;
--v11;
v18 = (unsigned int)a2 + v11;
a3 = (unsigned int)(v34 - (_DWORD)v17);
if ( (unsigned int)v18 > (unsigned int)a3 )
goto LABEL_2;
if ( v13 == 1 )
{
v33 = (unsigned int)a2;
v31 = (unsigned int)(v12 - a2);
memcpy(v7, v17, (unsigned int)a2, v18);
a1 = v7 + v33;
a2 = 32LL;
memset(v7 + v33, 32LL, v31);
}
else
{
LODWORD(v33) = a2;
memset(v7, 32LL, (unsigned int)(v12 - a2));
a1 = v7 + v12 - (unsigned int)a2;
a2 = (long long)v17;
v33 = (unsigned int)v33;
memcpy(a1, v17, (unsigned int)v33, v20);
}
}
else
{
if ( v13 != 4 )
{
v11 = (__PAIR64__(v11, v13) - 3) >> 32;
v19 = (unsigned int)(v34 - (_DWORD)v9);
if ( v11 + (unsigned int)v12 > (unsigned int)v19 )
goto LABEL_2;
a1 = v7;
a2 = (long long)v9;
memcpy(v7, v9, *(unsigned __int16 *)(v10 + 4), v19);
v9 += v12;
goto LABEL_48;
}
switch ( *(_WORD *)(v10 + 4) )
{
case 9:
v16 = *v9;
break;
case 0xA:
v16 = *(unsigned __int16 *)v9;
break;
case 0xB:
v16 = *(unsigned __int16 *)v9 | (unsigned long long)(v9[2] << 16);
break;
case 0xC:
v16 = *(unsigned int *)v9;
break;
default:
v16 = 0LL;
break;
}
a3 = (unsigned int)(v12 - 8);
v21 = v34 - (_QWORD)v9 - a3;
if ( v34 - (unsigned long long)v9 < a3 )
goto LABEL_2;
v22 = v21 < v16;
v23 = v21 - v16;
if ( v22 || v23 < v11 )
goto LABEL_2;
a1 = v7;
a2 = (long long)v9;
v33 = v16;
memcpy(v7, v9, a3, v11);
v24 = (unsigned int)(v12 - 8);
v17 = &v9[v24];
*(_QWORD *)(v7 + v24) = v17;
}
v9 = &v17[v33];
goto LABEL_48;
}
a3 = (unsigned int)(v12 - 1);
a1 = 2LL - ((unsigned int)a3 < 0x100);
LOBYTE(v8) = *v9;
v14 = *v9;
if ( (unsigned int)a3 > 0xFF )
{
if ( (_BYTE)v8 == 0xFF )
{
v14 = (unsigned __int16)__ROL2__(*(_WORD *)(v9 + 1), 8);
v15 = v9 + 3;
}
else
{
v15 = v9 + 1;
}
a2 = (long long)v15;
v8 = (unsigned int)(v12 - 2);
if ( v14 > (unsigned int)v8 )
goto LABEL_2;
*(_WORD *)v7 = v14;
}
else
{
if ( (unsigned int)a3 < v14 )
goto LABEL_2;
*(_BYTE *)v7 = v8;
a2 = (long long)(v9 + 1);
}
a3 = v14;
v9 = (unsigned __int8 *)(a2 + v14);
if ( (unsigned long long)v9 > v34 )
goto LABEL_2;
a1 += v7;
memcpy(a1, a2, v14, v8);
--v11;
LABEL_51:
v7 += v12;
v10 += 48LL;
}
while ( v10 < v26 );
v4 = *v27;
a2 = v28;
LABEL_56:
v25 = &v9[-(*(_QWORD *)(v4 + 712) == 0LL) + 1];
if ( v7 != a2 || v25 != (unsigned __int8 *)v34 || v35 != 1 && (-v35 & v32) != 0 )
goto LABEL_2;
return v29;
}
|
_mi_rec_unpack:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x58],RDX
MOV qword ptr [RBP + -0x70],RDI
MOV RAX,qword ptr [RDI]
MOV R15,qword ptr [RAX + 0x150]
MOV qword ptr [RBP + -0x60],RCX
CMP R15,RCX
JBE 0x00133b07
LAB_00133ae1:
CALL 0x001624a2
MOV dword ptr [RAX],0x7f
MOV qword ptr [RBP + -0x60],-0x1
LAB_00133af4:
MOV RAX,qword ptr [RBP + -0x60]
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00133b07:
MOV R14,RSI
MOV RSI,qword ptr [RAX + 0x140]
ADD RSI,R14
MOV RCX,qword ptr [RBP + -0x60]
MOV RDX,qword ptr [RBP + -0x58]
ADD RCX,RDX
MOV qword ptr [RBP + -0x38],RCX
MOVZX ECX,byte ptr [RDX]
MOV dword ptr [RBP + -0x44],ECX
MOV ECX,dword ptr [RAX + 0x18c]
LEA R13,[RDX + RCX*0x1]
MOV RDX,qword ptr [RAX + 0x168]
TEST RDX,RDX
JLE 0x00133e44
MOV qword ptr [RBP + -0x68],RSI
MOV RBX,qword ptr [RAX + 0x230]
LEA RAX,[RDX + RDX*0x2]
SHL RAX,0x4
ADD RAX,RBX
MOV qword ptr [RBP + -0x78],RAX
SUB R15D,ECX
MOV dword ptr [RBP + -0x2c],0x1
LAB_00133b67:
MOVZX R12D,word ptr [RBX + 0x4]
MOV EAX,dword ptr [RBX]
TEST EAX,EAX
JZ 0x00133bb5
CMP EAX,0x9
JZ 0x00133bb5
CMP EAX,0x8
JNZ 0x00133bde
LEA EDX,[R12 + -0x1]
CMP EDX,0x100
MOV EDI,0x2
SBB RDI,0x0
MOV CL,byte ptr [R13]
MOVZX EAX,CL
CMP EDX,0xff
JA 0x00133c00
CMP EDX,EAX
JC 0x00133ae1
INC R13
MOV byte ptr [R14],CL
MOV RSI,R13
JMP 0x00133cf3
LAB_00133bb5:
MOV RAX,qword ptr [RBP + -0x38]
SUB EAX,R13D
CMP R15D,EAX
JA 0x00133ae1
SUB R15D,R12D
MOV RDI,R14
MOV RSI,R13
MOV RDX,R12
CALL 0x001282f0
ADD R13,R12
JMP 0x00133e0d
LAB_00133bde:
MOV ECX,dword ptr [RBP + -0x2c]
TEST dword ptr [RBP + -0x44],ECX
JZ 0x00133c11
LEA ECX,[RAX + -0x3]
CMP ECX,0x1
JA 0x00133c42
MOV RDI,R14
XOR ESI,ESI
MOV RDX,R12
CALL 0x001281f0
JMP 0x00133de3
LAB_00133c00:
CMP CL,0xff
JZ 0x00133cce
INC R13
JMP 0x00133cde
LAB_00133c11:
CMP EAX,0x4
JNZ 0x00133d13
LEA EAX,[R12 + -0x9]
CMP EAX,0x3
JA 0x00133d91
LEA RCX,[0x19faa0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_9:
MOVZX R8D,byte ptr [R13]
JMP 0x00133d94
LAB_00133c42:
CMP EAX,0x2
JA 0x00133de3
CMP R12D,0x100
JC 0x00133c61
MOVZX ECX,byte ptr [R13]
TEST CL,CL
JS 0x00133e20
LAB_00133c61:
CMP R13,qword ptr [RBP + -0x38]
JZ 0x00133ae1
MOVZX ESI,byte ptr [R13]
INC R13
LAB_00133c73:
MOV R8D,R12D
SUB R8D,ESI
JBE 0x00133ae1
DEC R15D
LEA ECX,[RSI + R15*0x1]
MOV RDX,qword ptr [RBP + -0x38]
SUB EDX,R13D
CMP ECX,EDX
JA 0x00133ae1
CMP EAX,0x1
JNZ 0x00133d45
MOV EDX,ESI
MOV qword ptr [RBP + -0x40],RDX
MOV RDI,R14
MOV RSI,R13
MOV qword ptr [RBP + -0x50],R8
CALL 0x001282f0
MOV RAX,qword ptr [RBP + -0x40]
LEA RDI,[R14 + RAX*0x1]
MOV ESI,0x20
MOV RDX,qword ptr [RBP + -0x50]
CALL 0x001281f0
JMP 0x00133ddf
LAB_00133cce:
MOVZX EAX,word ptr [R13 + 0x1]
ROL AX,0x8
MOVZX EAX,AX
ADD R13,0x3
LAB_00133cde:
MOV RSI,R13
MOV ECX,R12D
ADD ECX,-0x2
CMP EAX,ECX
JA 0x00133ae1
MOV word ptr [R14],AX
LAB_00133cf3:
MOV EDX,EAX
LEA R13,[RSI + RDX*0x1]
CMP R13,qword ptr [RBP + -0x38]
JA 0x00133ae1
ADD RDI,R14
CALL 0x001282f0
DEC R15D
JMP 0x00133e0d
LAB_00133d13:
CMP EAX,0x3
SBB R15D,0x0
MOV EAX,R12D
ADD EAX,R15D
MOV RCX,qword ptr [RBP + -0x38]
SUB ECX,R13D
CMP EAX,ECX
JA 0x00133ae1
MOV RDI,R14
MOV RSI,R13
MOV RDX,R12
CALL 0x001282f0
ADD R13,R12
JMP 0x00133de3
LAB_00133d45:
MOV RDI,R14
MOV qword ptr [RBP + -0x40],RSI
MOV ESI,0x20
MOV RDX,R8
CALL 0x001281f0
LEA RDI,[R14 + R12*0x1]
MOV EDX,dword ptr [RBP + -0x40]
SUB RDI,RDX
MOV RSI,R13
MOV qword ptr [RBP + -0x40],RDX
CALL 0x001282f0
JMP 0x00133ddf
caseD_b:
MOVZX EAX,word ptr [R13]
MOVZX R8D,byte ptr [R13 + 0x2]
SHL R8D,0x10
OR R8,RAX
JMP 0x00133d94
caseD_c:
MOV R8D,dword ptr [R13]
JMP 0x00133d94
caseD_a:
MOVZX R8D,word ptr [R13]
JMP 0x00133d94
default:
XOR R8D,R8D
LAB_00133d94:
MOV ECX,R12D
ADD ECX,-0x8
MOV RAX,qword ptr [RBP + -0x38]
SUB RAX,R13
MOV EDX,ECX
SUB RAX,RDX
JC 0x00133ae1
SUB RAX,R8
JC 0x00133ae1
MOV ECX,R15D
CMP RAX,RCX
JC 0x00133ae1
MOV RDI,R14
MOV RSI,R13
MOV qword ptr [RBP + -0x40],R8
MOV qword ptr [RBP + -0x50],RDX
CALL 0x001282f0
MOV RAX,qword ptr [RBP + -0x50]
ADD R13,RAX
MOV qword ptr [R14 + RAX*0x1],R13
LAB_00133ddf:
ADD R13,qword ptr [RBP + -0x40]
LAB_00133de3:
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,EAX
CMP EAX,0x100
JNC 0x00133df4
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x00133e0d
LAB_00133df4:
MOV RCX,qword ptr [RBP + -0x58]
MOVZX EAX,byte ptr [RCX + 0x1]
MOV dword ptr [RBP + -0x44],EAX
INC RCX
MOV qword ptr [RBP + -0x58],RCX
MOV dword ptr [RBP + -0x2c],0x1
LAB_00133e0d:
ADD R14,R12
ADD RBX,0x30
CMP RBX,qword ptr [RBP + -0x78]
JC 0x00133b67
JMP 0x00133e4d
LAB_00133e20:
LEA RDX,[R13 + 0x1]
CMP RDX,qword ptr [RBP + -0x38]
JNC 0x00133ae1
AND ECX,0x7f
MOVZX ESI,byte ptr [R13 + 0x1]
SHL ESI,0x7
OR ESI,ECX
ADD R13,0x2
JMP 0x00133c73
LAB_00133e44:
MOV dword ptr [RBP + -0x2c],0x1
JMP 0x00133e58
LAB_00133e4d:
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x68]
LAB_00133e58:
CMP qword ptr [RAX + 0x2c8],0x1
SBB R13,-0x1
CMP R14,RSI
JNZ 0x00133ae1
CMP R13,qword ptr [RBP + -0x38]
JNZ 0x00133ae1
MOV EAX,dword ptr [RBP + -0x2c]
CMP EAX,0x1
JZ 0x00133af4
NEG EAX
TEST dword ptr [RBP + -0x44],EAX
JNZ 0x00133ae1
JMP 0x00133af4
|
ulong _mi_rec_unpack(long *param_1,byte *param_2,byte *param_3,ulong param_4)
{
byte bVar1;
ushort uVar2;
int iVar3;
uint uVar4;
int4 *puVar5;
uint *puVar6;
ulong uVar7;
long lVar8;
uint *puVar9;
uint uVar10;
ulong __n;
uint *puVar11;
byte *pbVar12;
uint uVar13;
ulong __n_00;
byte *__src;
ushort *__src_00;
uint *__src_01;
uint uVar14;
byte *local_60;
uint local_4c;
size_t local_48;
uint local_34;
lVar8 = *param_1;
if (*(ulong *)(lVar8 + 0x150) <= param_4) {
pbVar12 = param_2 + *(long *)(lVar8 + 0x140);
puVar9 = (uint *)(param_3 + param_4);
local_4c = (uint)*param_3;
__src_01 = (uint *)(param_3 + *(uint *)(lVar8 + 0x18c));
if (*(long *)(lVar8 + 0x168) < 1) {
local_34 = 1;
}
else {
puVar11 = *(uint **)(lVar8 + 0x230);
puVar6 = puVar11 + *(long *)(lVar8 + 0x168) * 0xc;
uVar14 = (int)*(ulong *)(lVar8 + 0x150) - *(uint *)(lVar8 + 0x18c);
local_34 = 1;
local_60 = param_3;
do {
uVar2 = (ushort)puVar11[1];
__n_00 = (ulong)uVar2;
uVar4 = *puVar11;
iVar3 = (int)puVar9;
if ((uVar4 == 0) || (uVar4 == 9)) {
if ((uint)(iVar3 - (int)__src_01) < uVar14) goto LAB_00133ae1;
uVar14 = uVar14 - uVar2;
memcpy(param_2,__src_01,__n_00);
__src_01 = (uint *)((long)__src_01 + __n_00);
}
else if (uVar4 == 8) {
uVar10 = uVar2 - 1;
bVar1 = (byte)*__src_01;
uVar4 = (uint)bVar1;
if (uVar10 < 0x100) {
if (uVar10 < bVar1) goto LAB_00133ae1;
__src = (byte *)((long)__src_01 + 1);
*param_2 = bVar1;
}
else {
if (bVar1 == 0xff) {
uVar4 = (uint)(ushort)(*(ushort *)((long)__src_01 + 1) << 8 |
*(ushort *)((long)__src_01 + 1) >> 8);
__src = (byte *)((long)__src_01 + 3);
}
else {
__src = (byte *)((long)__src_01 + 1);
}
if (uVar2 - 2 < uVar4) goto LAB_00133ae1;
*(short *)param_2 = (short)uVar4;
}
__src_01 = (uint *)(__src + uVar4);
if (puVar9 < __src_01) goto LAB_00133ae1;
memcpy(param_2 + (2 - (ulong)(uVar10 < 0x100)),__src,(ulong)uVar4);
uVar14 = uVar14 - 1;
}
else {
if ((local_4c & local_34) == 0) {
if (uVar4 == 4) {
switch(uVar2) {
case 9:
local_48 = (size_t)(byte)*__src_01;
break;
case 10:
local_48 = (size_t)(ushort)*__src_01;
break;
case 0xb:
local_48 = (size_t)(uint3)*__src_01;
break;
case 0xc:
local_48 = (size_t)*__src_01;
break;
default:
local_48 = 0;
}
__n = (ulong)(uVar2 - 8);
uVar7 = ((long)puVar9 - (long)__src_01) - __n;
if ((((ulong)((long)puVar9 - (long)__src_01) < __n) || (uVar7 < local_48)) ||
(uVar7 - local_48 < (ulong)uVar14)) goto LAB_00133ae1;
memcpy(param_2,__src_01,__n);
__src_00 = (ushort *)((long)__src_01 + __n);
*(ushort **)(param_2 + __n) = __src_00;
LAB_00133ddf:
__src_01 = (uint *)((long)__src_00 + local_48);
}
else {
uVar14 = uVar14 - (uVar4 < 3);
if ((uint)(iVar3 - (int)__src_01) < uVar2 + uVar14) goto LAB_00133ae1;
memcpy(param_2,__src_01,__n_00);
__src_01 = (uint *)((long)__src_01 + __n_00);
}
}
else if (uVar4 - 3 < 2) {
memset(param_2,0,__n_00);
}
else if (uVar4 < 3) {
if ((uVar2 < 0x100) || (-1 < (char)(byte)*__src_01)) {
if (__src_01 == puVar9) goto LAB_00133ae1;
local_48 = (size_t)(byte)*__src_01;
__src_00 = (ushort *)((long)__src_01 + 1);
}
else {
if (puVar9 <= (uint *)((long)__src_01 + 1U)) goto LAB_00133ae1;
local_48 = (size_t)((uint)*(byte *)((long)__src_01 + 1) << 7 | (byte)*__src_01 & 0x7f)
;
__src_00 = (ushort *)((long)__src_01 + 2);
}
uVar10 = (uint)local_48;
uVar13 = uVar2 - uVar10;
if ((uVar10 <= uVar2 && uVar13 != 0) &&
(uVar14 = uVar14 - 1, uVar10 + uVar14 <= (uint)(iVar3 - (int)__src_00))) {
if (uVar4 == 1) {
memcpy(param_2,__src_00,local_48);
memset(param_2 + local_48,0x20,(ulong)uVar13);
}
else {
memset(param_2,0x20,(ulong)uVar13);
memcpy(param_2 + (__n_00 - local_48),__src_00,local_48);
}
goto LAB_00133ddf;
}
goto LAB_00133ae1;
}
local_34 = local_34 * 2;
if (0xff < local_34) {
local_4c = (uint)local_60[1];
local_60 = local_60 + 1;
local_34 = 1;
}
}
param_2 = param_2 + __n_00;
puVar11 = puVar11 + 0xc;
} while (puVar11 < puVar6);
lVar8 = *param_1;
}
if ((param_2 == pbVar12) &&
((uint *)((long)__src_01 + (ulong)(*(long *)(lVar8 + 0x2c8) != 0)) == puVar9)) {
if (local_34 == 1) {
return param_4;
}
if ((local_4c & -local_34) == 0) {
return param_4;
}
}
}
LAB_00133ae1:
puVar5 = (int4 *)_my_thread_var();
*puVar5 = 0x7f;
return 0xffffffffffffffff;
}
|
|
61,039
|
LlamaData::initialize_sampler(Opt const&)
|
monkey531[P]llama/examples/run/run.cpp
|
llama_sampler_ptr initialize_sampler(const Opt & opt) {
llama_sampler_ptr sampler(llama_sampler_chain_init(llama_sampler_chain_default_params()));
llama_sampler_chain_add(sampler.get(), llama_sampler_init_min_p(0.05f, 1));
llama_sampler_chain_add(sampler.get(), llama_sampler_init_temp(opt.temperature));
llama_sampler_chain_add(sampler.get(), llama_sampler_init_dist(LLAMA_DEFAULT_SEED));
return sampler;
}
|
O1
|
cpp
|
LlamaData::initialize_sampler(Opt const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
callq 0x19bf0
movzbl %al, %edi
callq 0x19420
movq %rax, %r15
movq %rax, (%rbx)
movss 0x90f7e(%rip), %xmm0 # 0xb20e4
movl $0x1, %edi
callq 0x19ad0
movq %r15, %rdi
movq %rax, %rsi
callq 0x19810
movq (%rbx), %r15
movss 0x104(%r14), %xmm0
callq 0x19460
movq %r15, %rdi
movq %rax, %rsi
callq 0x19810
movq (%rbx), %r14
movl $0xffffffff, %edi # imm = 0xFFFFFFFF
callq 0x19c10
movq %r14, %rdi
movq %rax, %rsi
callq 0x19810
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x211cc
movq %r14, %rdi
callq 0x19e00
nop
|
_ZN9LlamaData18initialize_samplerERK3Opt:
push r15
push r14
push rbx
mov r14, rdx
mov rbx, rdi
call _llama_sampler_chain_default_params
movzx edi, al
call _llama_sampler_chain_init
mov r15, rax
mov [rbx], rax
movss xmm0, cs:dword_B20E4
mov edi, 1
call _llama_sampler_init_min_p
mov rdi, r15
mov rsi, rax
call _llama_sampler_chain_add
mov r15, [rbx]
movss xmm0, dword ptr [r14+104h]
call _llama_sampler_init_temp
mov rdi, r15
mov rsi, rax
call _llama_sampler_chain_add
mov r14, [rbx]
mov edi, 0FFFFFFFFh
call _llama_sampler_init_dist
mov rdi, r14
mov rsi, rax
call _llama_sampler_chain_add
mov rax, rbx
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov rdi, rbx
call _ZNSt10unique_ptrI13llama_sampler21llama_sampler_deleterED2Ev; std::unique_ptr<llama_sampler,llama_sampler_deleter>::~unique_ptr()
mov rdi, r14
call __Unwind_Resume
|
LlamaData * LlamaData::initialize_sampler(LlamaData *this, const Opt *a2, long long a3)
{
unsigned __int8 v4; // al
long long v5; // r15
long long inited; // rax
long long v7; // r15
long long v8; // rax
long long v9; // r14
long long v10; // rax
v4 = llama_sampler_chain_default_params(this, a2);
v5 = llama_sampler_chain_init(v4);
*(_QWORD *)this = v5;
inited = llama_sampler_init_min_p(1LL, 0.050000001);
llama_sampler_chain_add(v5, inited);
v7 = *(_QWORD *)this;
v8 = llama_sampler_init_temp(*(float *)(a3 + 260));
llama_sampler_chain_add(v7, v8);
v9 = *(_QWORD *)this;
v10 = llama_sampler_init_dist(0xFFFFFFFFLL);
llama_sampler_chain_add(v9, v10);
return this;
}
|
initialize_sampler:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RDX
MOV RBX,RDI
CALL 0x00119bf0
MOVZX EDI,AL
CALL 0x00119420
MOV R15,RAX
MOV qword ptr [RBX],RAX
LAB_0012115e:
MOVSS XMM0,dword ptr [0x001b20e4]
MOV EDI,0x1
CALL 0x00119ad0
MOV RDI,R15
MOV RSI,RAX
CALL 0x00119810
MOV R15,qword ptr [RBX]
MOVSS XMM0,dword ptr [R14 + 0x104]
CALL 0x00119460
MOV RDI,R15
MOV RSI,RAX
CALL 0x00119810
MOV R14,qword ptr [RBX]
MOV EDI,0xffffffff
CALL 0x00119c10
MOV RDI,R14
MOV RSI,RAX
CALL 0x00119810
LAB_001211af:
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
|
/* LlamaData::initialize_sampler(Opt const&) */
Opt * LlamaData::initialize_sampler(Opt *param_1)
{
int1 uVar1;
int8 uVar2;
int8 uVar3;
long in_RDX;
uVar1 = llama_sampler_chain_default_params();
uVar2 = llama_sampler_chain_init(uVar1);
*(int8 *)param_1 = uVar2;
/* try { // try from 0012115e to 001211ae has its CatchHandler @ 001211b8 */
uVar3 = llama_sampler_init_min_p(DAT_001b20e4,1);
llama_sampler_chain_add(uVar2,uVar3);
uVar2 = *(int8 *)param_1;
uVar3 = llama_sampler_init_temp(*(int4 *)(in_RDX + 0x104));
llama_sampler_chain_add(uVar2,uVar3);
uVar2 = *(int8 *)param_1;
uVar3 = llama_sampler_init_dist(0xffffffff);
llama_sampler_chain_add(uVar2,uVar3);
return param_1;
}
|
|
61,040
|
tree_search_edge
|
eloqsql/mysys/tree.c
|
void *tree_search_edge(TREE *tree, TREE_ELEMENT **parents,
TREE_ELEMENT ***last_pos, int child_offs)
{
TREE_ELEMENT *element= tree->root;
*parents= &null_element;
while (element != &null_element)
{
*++parents= element;
element= ELEMENT_CHILD(element, child_offs);
}
*last_pos= parents;
return **last_pos != &null_element ?
ELEMENT_KEY(tree, **last_pos) : NULL;
}
|
O3
|
c
|
tree_search_edge:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
leaq 0x2e3d6a(%rip), %r8 # 0x3935c0
movq %r8, (%rsi)
cmpq %r8, %rax
je 0xaf872
movslq %ecx, %rcx
movq %rax, 0x8(%rsi)
addq $0x8, %rsi
movq (%rax,%rcx), %rax
cmpq %r8, %rax
jne 0xaf861
movq %rsi, (%rdx)
movq (%rsi), %rax
cmpq %r8, %rax
je 0xaf88d
movl 0x208(%rdi), %ecx
testq %rcx, %rcx
je 0xaf891
addq %rcx, %rax
jmp 0xaf895
xorl %eax, %eax
jmp 0xaf895
movq 0x18(%rax), %rax
popq %rbp
retq
|
tree_search_edge:
push rbp
mov rbp, rsp
mov rax, [rdi]
lea r8, null_element
mov [rsi], r8
cmp rax, r8
jz short loc_AF872
movsxd rcx, ecx
loc_AF861:
mov [rsi+8], rax
add rsi, 8
mov rax, [rax+rcx]
cmp rax, r8
jnz short loc_AF861
loc_AF872:
mov [rdx], rsi
mov rax, [rsi]
cmp rax, r8
jz short loc_AF88D
mov ecx, [rdi+208h]
test rcx, rcx
jz short loc_AF891
add rax, rcx
jmp short loc_AF895
loc_AF88D:
xor eax, eax
jmp short loc_AF895
loc_AF891:
mov rax, [rax+18h]
loc_AF895:
pop rbp
retn
|
char * tree_search_edge(char **a1, _QWORD *a2, _QWORD *a3, int a4)
{
char *v4; // rax
_QWORD *v5; // rax
v4 = *a1;
for ( *a2 = &null_element; v4 != (char *)&null_element; v4 = *(char **)&v4[a4] )
{
a2[1] = v4;
++a2;
}
*a3 = a2;
v5 = (_QWORD *)*a2;
if ( (_UNKNOWN *)*a2 == &null_element )
return 0LL;
if ( *((_DWORD *)a1 + 130) )
return (char *)v5 + *((unsigned int *)a1 + 130);
return (char *)v5[3];
}
|
tree_search_edge:
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RDI]
LEA R8,[0x4935c0]
MOV qword ptr [RSI],R8
CMP RAX,R8
JZ 0x001af872
MOVSXD RCX,ECX
LAB_001af861:
MOV qword ptr [RSI + 0x8],RAX
ADD RSI,0x8
MOV RAX,qword ptr [RAX + RCX*0x1]
CMP RAX,R8
JNZ 0x001af861
LAB_001af872:
MOV qword ptr [RDX],RSI
MOV RAX,qword ptr [RSI]
CMP RAX,R8
JZ 0x001af88d
MOV ECX,dword ptr [RDI + 0x208]
TEST RCX,RCX
JZ 0x001af891
ADD RAX,RCX
JMP 0x001af895
LAB_001af88d:
XOR EAX,EAX
JMP 0x001af895
LAB_001af891:
MOV RAX,qword ptr [RAX + 0x18]
LAB_001af895:
POP RBP
RET
|
int1 * tree_search_edge(long *param_1,long *param_2,int8 *param_3,int param_4)
{
int1 *puVar1;
puVar1 = (int1 *)*param_1;
*param_2 = (long)null_element;
if (puVar1 != null_element) {
do {
param_2[1] = (long)puVar1;
param_2 = param_2 + 1;
puVar1 = *(int1 **)(puVar1 + param_4);
} while (puVar1 != null_element);
}
*param_3 = param_2;
puVar1 = (int1 *)*param_2;
if (puVar1 == null_element) {
puVar1 = (int1 *)0x0;
}
else if ((ulong)*(uint *)(param_1 + 0x41) == 0) {
puVar1 = *(int1 **)(puVar1 + 0x18);
}
else {
puVar1 = puVar1 + *(uint *)(param_1 + 0x41);
}
return puVar1;
}
|
|
61,041
|
chess::operator<<(std::ostream&, chess::Board const&)
|
Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp
|
inline std::ostream &operator<<(std::ostream &os, const Board &b) {
for (int i = 63; i >= 0; i -= 8) {
for (int j = 7; j >= 0; j--) {
os << " " << static_cast<std::string>(b.board_[i - j]);
}
os << " \n";
}
os << "\n\n";
os << "Side to move: " << static_cast<int>(b.stm_.internal()) << "\n";
os << "Castling rights: " << b.getCastleString() << "\n";
os << "Halfmoves: " << b.halfMoveClock() << "\n";
os << "Fullmoves: " << b.fullMoveNumber() << "\n";
os << "EP: " << b.ep_sq_.index() << "\n";
os << "Hash: " << b.key_ << "\n";
os << std::endl;
return os;
}
|
O0
|
cpp
|
chess::operator<<(std::ostream&, chess::Board const&):
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x3f, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0xf678
movl $0x7, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jl 0xf65a
movq -0x8(%rbp), %rdi
leaq 0x15a1c(%rip), %rsi # 0x25008
callq 0x32c0
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rdi
addq $0x60, %rdi
movl -0x14(%rbp), %eax
movl -0x18(%rbp), %ecx
subl %ecx, %eax
movslq %eax, %rsi
callq 0xa6b0
movq %rax, %rsi
leaq -0x38(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x11480
movq -0x78(%rbp), %rdi
movq -0x70(%rbp), %rsi
callq 0x3280
jmp 0xf62c
leaq -0x38(%rbp), %rdi
callq 0x3180
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xf5db
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x3180
jmp 0xf84e
movq -0x8(%rbp), %rdi
leaq 0x15961(%rip), %rsi # 0x24fc6
callq 0x32c0
movl -0x14(%rbp), %eax
subl $0x8, %eax
movl %eax, -0x14(%rbp)
jmp 0xf5ca
movq -0x8(%rbp), %rdi
leaq 0x15946(%rip), %rsi # 0x24fc9
callq 0x32c0
movq -0x8(%rbp), %rdi
leaq 0x15939(%rip), %rsi # 0x24fcc
callq 0x32c0
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rdi
addq $0xae, %rdi
callq 0x118d0
movq -0x98(%rbp), %rdi
movsbl %al, %esi
callq 0x34c0
movq %rax, %rdi
leaq 0x15902(%rip), %rsi # 0x24fca
callq 0x32c0
movq -0x8(%rbp), %rdi
leaq 0x15903(%rip), %rsi # 0x24fdb
callq 0x32c0
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x68(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x118e0
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x3280
movq %rax, -0x80(%rbp)
jmp 0xf711
movq -0x80(%rbp), %rdi
leaq 0x158ae(%rip), %rsi # 0x24fca
callq 0x32c0
jmp 0xf723
leaq -0x68(%rbp), %rdi
callq 0x3180
movq -0x8(%rbp), %rdi
leaq 0x158b6(%rip), %rsi # 0x24fed
callq 0x32c0
movq %rax, -0xb0(%rbp)
movq -0x10(%rbp), %rdi
callq 0x11d00
movq -0xb0(%rbp), %rdi
movl %eax, %esi
callq 0x33e0
movq %rax, %rdi
leaq 0x15866(%rip), %rsi # 0x24fca
callq 0x32c0
movq -0x8(%rbp), %rdi
leaq 0x15885(%rip), %rsi # 0x24ff9
callq 0x32c0
movq %rax, -0xa8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x11d20
movq -0xa8(%rbp), %rdi
movl %eax, %esi
callq 0x33e0
movq %rax, %rdi
leaq 0x15829(%rip), %rsi # 0x24fca
callq 0x32c0
movq -0x8(%rbp), %rdi
leaq 0x15854(%rip), %rsi # 0x25005
callq 0x32c0
movq %rax, -0xa0(%rbp)
movq -0x10(%rbp), %rdi
addq $0xb0, %rdi
callq 0x4d40
movq -0xa0(%rbp), %rdi
movl %eax, %esi
callq 0x34c0
movq %rax, %rdi
leaq 0x157e5(%rip), %rsi # 0x24fca
callq 0x32c0
movq -0x8(%rbp), %rdi
leaq 0x15815(%rip), %rsi # 0x2500a
callq 0x32c0
movq %rax, %rdi
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rsi
callq 0x3060
movq %rax, %rdi
leaq 0x157b3(%rip), %rsi # 0x24fca
callq 0x32c0
movq -0x8(%rbp), %rdi
movq 0x21781(%rip), %rsi # 0x30fa8
callq 0x3300
movq -0x8(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x3180
movq -0x40(%rbp), %rdi
callq 0x34d0
nopw (%rax,%rax)
|
_ZN5chesslsERSoRKNS_5BoardE:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], 3Fh ; '?'
loc_F5CA:
cmp [rbp+var_14], 0
jl loc_F678
mov [rbp+var_18], 7
loc_F5DB:
cmp [rbp+var_18], 0
jl short loc_F65A
mov rdi, [rbp+var_8]
lea rsi, aEp+3; " "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_78], rax
mov rdi, [rbp+var_10]
add rdi, 60h ; '`'
mov eax, [rbp+var_14]
mov ecx, [rbp+var_18]
sub eax, ecx
movsxd rsi, eax
call _ZNKSt5arrayIN5chess5PieceELm64EEixEm; std::array<chess::Piece,64ul>::operator[](ulong)
mov rsi, rax
lea rdi, [rbp+var_38]
mov [rbp+var_70], rdi
call _ZNK5chess5PiececvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv; chess::Piece::operator std::string(void)
mov rdi, [rbp+var_78]
mov rsi, [rbp+var_70]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
jmp short $+2
loc_F62C:
lea rdi, [rbp+var_38]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov eax, [rbp+var_18]
add eax, 0FFFFFFFFh
mov [rbp+var_18], eax
jmp short loc_F5DB
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
lea rdi, [rbp+var_38]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_F84E
loc_F65A:
mov rdi, [rbp+var_8]
lea rsi, asc_24FC6; " \n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov eax, [rbp+var_14]
sub eax, 8
mov [rbp+var_14], eax
jmp loc_F5CA
loc_F678:
mov rdi, [rbp+var_8]
lea rsi, asc_24FC9; "\n\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, [rbp+var_8]
lea rsi, aSideToMove; "Side to move: "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_98], rax
mov rdi, [rbp+var_10]
add rdi, 0AEh; this
call _ZNK5chess5Color8internalEv; chess::Color::internal(void)
mov rdi, [rbp+var_98]
movsx esi, al
call __ZNSolsEi; std::ostream::operator<<(int)
mov rdi, rax
lea rsi, asc_24FC9+1; "\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, [rbp+var_8]
lea rsi, aCastlingRights; "Castling rights: "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_90], rax
mov rsi, [rbp+var_10]
lea rdi, [rbp+var_68]
mov [rbp+var_88], rdi
call _ZNK5chess5Board15getCastleStringB5cxx11Ev; chess::Board::getCastleString(void)
mov rdi, [rbp+var_90]
mov rsi, [rbp+var_88]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rbp+var_80], rax
jmp short $+2
loc_F711:
mov rdi, [rbp+var_80]
lea rsi, asc_24FC9+1; "\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_F723:
lea rdi, [rbp+var_68]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rbp+var_8]
lea rsi, aHalfmoves; "Halfmoves: "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_B0], rax
mov rdi, [rbp+var_10]; this
call _ZNK5chess5Board13halfMoveClockEv; chess::Board::halfMoveClock(void)
mov rdi, [rbp+var_B0]
mov esi, eax
call __ZNSolsEj; std::ostream::operator<<(uint)
mov rdi, rax
lea rsi, asc_24FC9+1; "\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, [rbp+var_8]
lea rsi, aFullmoves; "Fullmoves: "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_A8], rax
mov rdi, [rbp+var_10]; this
call _ZNK5chess5Board14fullMoveNumberEv; chess::Board::fullMoveNumber(void)
mov rdi, [rbp+var_A8]
mov esi, eax
call __ZNSolsEj; std::ostream::operator<<(uint)
mov rdi, rax
lea rsi, asc_24FC9+1; "\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, [rbp+var_8]
lea rsi, aEp; "EP: "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_A0], rax
mov rdi, [rbp+var_10]
add rdi, 0B0h; this
call _ZNK5chess6Square5indexEv; chess::Square::index(void)
mov rdi, [rbp+var_A0]
mov esi, eax
call __ZNSolsEi; std::ostream::operator<<(int)
mov rdi, rax
lea rsi, asc_24FC9+1; "\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, [rbp+var_8]
lea rsi, aHash; "Hash: "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
mov rax, [rbp+var_10]
mov rsi, [rax+0A0h]
call __ZNSolsEm; std::ostream::operator<<(ulong)
mov rdi, rax
lea rsi, asc_24FC9+1; "\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, [rbp+var_8]
mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr
call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &))
mov rax, [rbp+var_8]
add rsp, 0B0h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
lea rdi, [rbp+var_68]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_F84E:
mov rdi, [rbp+var_40]
call __Unwind_Resume
|
long long chess::operator<<(long long a1, chess::Board *a2)
{
long long v2; // rax
char v3; // al
long long v4; // rax
unsigned int v5; // eax
long long v6; // rax
unsigned int v7; // eax
long long v8; // rax
unsigned int v9; // eax
long long v10; // rax
long long v11; // rax
long long v12; // rax
long long v14; // [rsp+0h] [rbp-B0h]
long long v15; // [rsp+8h] [rbp-A8h]
long long v16; // [rsp+10h] [rbp-A0h]
long long v17; // [rsp+18h] [rbp-98h]
long long v18; // [rsp+20h] [rbp-90h]
long long v19; // [rsp+30h] [rbp-80h]
long long v20; // [rsp+38h] [rbp-78h]
_BYTE v21[36]; // [rsp+48h] [rbp-68h] BYREF
_BYTE v22[32]; // [rsp+78h] [rbp-38h] BYREF
int j; // [rsp+98h] [rbp-18h]
int i; // [rsp+9Ch] [rbp-14h]
chess::Board *v25; // [rsp+A0h] [rbp-10h]
long long v26; // [rsp+A8h] [rbp-8h]
v26 = a1;
v25 = a2;
for ( i = 63; i >= 0; i -= 8 )
{
for ( j = 7; j >= 0; --j )
{
v20 = std::operator<<<std::char_traits<char>>(v26, " ");
v2 = std::array<chess::Piece,64ul>::operator[]((long long)v25 + 96, i - j);
chess::Piece::operator std::string(v22, v2);
std::operator<<<char>(v20, v22);
std::string::~string(v22);
}
std::operator<<<std::char_traits<char>>(v26, " \n");
}
std::operator<<<std::char_traits<char>>(v26, "\n\n");
v17 = std::operator<<<std::char_traits<char>>(v26, "Side to move: ");
v3 = chess::Color::internal((chess::Board *)((char *)v25 + 174));
v4 = std::ostream::operator<<(v17, (unsigned int)v3);
std::operator<<<std::char_traits<char>>(v4, "\n");
v18 = std::operator<<<std::char_traits<char>>(v26, "Castling rights: ");
chess::Board::getCastleString[abi:cxx11](v21, v25);
v19 = std::operator<<<char>(v18, v21);
std::operator<<<std::char_traits<char>>(v19, "\n");
std::string::~string(v21);
v14 = std::operator<<<std::char_traits<char>>(v26, "Halfmoves: ");
v5 = chess::Board::halfMoveClock(v25);
v6 = std::ostream::operator<<(v14, v5);
std::operator<<<std::char_traits<char>>(v6, "\n");
v15 = std::operator<<<std::char_traits<char>>(v26, "Fullmoves: ");
v7 = chess::Board::fullMoveNumber(v25);
v8 = std::ostream::operator<<(v15, v7);
std::operator<<<std::char_traits<char>>(v8, "\n");
v16 = std::operator<<<std::char_traits<char>>(v26, "EP: ");
v9 = chess::Square::index((chess::Board *)((char *)v25 + 176));
v10 = std::ostream::operator<<(v16, v9);
std::operator<<<std::char_traits<char>>(v10, "\n");
v11 = std::operator<<<std::char_traits<char>>(v26, "Hash: ");
v12 = std::ostream::operator<<(v11, *((_QWORD *)v25 + 20));
std::operator<<<std::char_traits<char>>(v12, "\n");
std::ostream::operator<<(v26, &std::endl<char,std::char_traits<char>>);
return v26;
}
|
operator<<:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],0x3f
LAB_0010f5ca:
CMP dword ptr [RBP + -0x14],0x0
JL 0x0010f678
MOV dword ptr [RBP + -0x18],0x7
LAB_0010f5db:
CMP dword ptr [RBP + -0x18],0x0
JL 0x0010f65a
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x125008]
CALL 0x001032c0
MOV qword ptr [RBP + -0x78],RAX
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x60
MOV EAX,dword ptr [RBP + -0x14]
MOV ECX,dword ptr [RBP + -0x18]
SUB EAX,ECX
MOVSXD RSI,EAX
CALL 0x0010a6b0
MOV RSI,RAX
LEA RDI,[RBP + -0x38]
MOV qword ptr [RBP + -0x70],RDI
CALL 0x00111480
MOV RDI,qword ptr [RBP + -0x78]
MOV RSI,qword ptr [RBP + -0x70]
LAB_0010f625:
CALL 0x00103280
LAB_0010f62a:
JMP 0x0010f62c
LAB_0010f62c:
LEA RDI,[RBP + -0x38]
CALL 0x00103180
MOV EAX,dword ptr [RBP + -0x18]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x18],EAX
JMP 0x0010f5db
LAB_0010f65a:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x124fc6]
CALL 0x001032c0
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,0x8
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0010f5ca
LAB_0010f678:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x124fc9]
CALL 0x001032c0
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x124fcc]
CALL 0x001032c0
MOV qword ptr [RBP + -0x98],RAX
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0xae
CALL 0x001118d0
MOV RDI,qword ptr [RBP + -0x98]
MOVSX ESI,AL
CALL 0x001034c0
MOV RDI,RAX
LEA RSI,[0x124fca]
CALL 0x001032c0
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x124fdb]
CALL 0x001032c0
MOV qword ptr [RBP + -0x90],RAX
MOV RSI,qword ptr [RBP + -0x10]
LEA RDI,[RBP + -0x68]
MOV qword ptr [RBP + -0x88],RDI
CALL 0x001118e0
MOV RDI,qword ptr [RBP + -0x90]
MOV RSI,qword ptr [RBP + -0x88]
LAB_0010f706:
CALL 0x00103280
MOV qword ptr [RBP + -0x80],RAX
JMP 0x0010f711
LAB_0010f711:
MOV RDI,qword ptr [RBP + -0x80]
LEA RSI,[0x124fca]
CALL 0x001032c0
LAB_0010f721:
JMP 0x0010f723
LAB_0010f723:
LEA RDI,[RBP + -0x68]
CALL 0x00103180
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x124fed]
CALL 0x001032c0
MOV qword ptr [RBP + -0xb0],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00111d00
MOV RDI,qword ptr [RBP + -0xb0]
MOV ESI,EAX
CALL 0x001033e0
MOV RDI,RAX
LEA RSI,[0x124fca]
CALL 0x001032c0
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x124ff9]
CALL 0x001032c0
MOV qword ptr [RBP + -0xa8],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00111d20
MOV RDI,qword ptr [RBP + -0xa8]
MOV ESI,EAX
CALL 0x001033e0
MOV RDI,RAX
LEA RSI,[0x124fca]
CALL 0x001032c0
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x125005]
CALL 0x001032c0
MOV qword ptr [RBP + -0xa0],RAX
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0xb0
CALL 0x00104d40
MOV RDI,qword ptr [RBP + -0xa0]
MOV ESI,EAX
CALL 0x001034c0
MOV RDI,RAX
LEA RSI,[0x124fca]
CALL 0x001032c0
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x12500a]
CALL 0x001032c0
MOV RDI,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0xa0]
CALL 0x00103060
MOV RDI,RAX
LEA RSI,[0x124fca]
CALL 0x001032c0
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [0x00130fa8]
CALL 0x00103300
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0xb0
POP RBP
RET
|
/* chess::TEMPNAMEPLACEHOLDERVALUE(std::ostream&, chess::Board const&) */
ostream * chess::operator<<(ostream *param_1,Board *param_2)
{
char cVar1;
uint uVar2;
int iVar3;
ostream *poVar4;
string local_70 [48];
Piece local_40 [32];
int local_20;
int local_1c;
Board *local_18;
ostream *local_10;
local_18 = param_2;
local_10 = param_1;
for (local_1c = 0x3f; -1 < local_1c; local_1c = local_1c + -8) {
for (local_20 = 7; -1 < local_20; local_20 = local_20 + -1) {
poVar4 = std::operator<<(local_10," ");
std::array<chess::Piece,64ul>::operator[]
((array<chess::Piece,64ul> *)(local_18 + 0x60),(long)(local_1c - local_20));
Piece::operator_cast_to_string(local_40);
/* try { // try from 0010f625 to 0010f629 has its CatchHandler @ 0010f640 */
std::operator<<(poVar4,(string *)local_40);
std::__cxx11::string::~string((string *)local_40);
}
std::operator<<(local_10," \n");
}
std::operator<<(local_10,"\n\n");
poVar4 = std::operator<<(local_10,"Side to move: ");
cVar1 = Color::internal((Color *)(local_18 + 0xae));
poVar4 = (ostream *)std::ostream::operator<<(poVar4,(int)cVar1);
std::operator<<(poVar4,"\n");
poVar4 = std::operator<<(local_10,"Castling rights: ");
Board::getCastleString_abi_cxx11_();
/* try { // try from 0010f706 to 0010f720 has its CatchHandler @ 0010f839 */
poVar4 = std::operator<<(poVar4,local_70);
std::operator<<(poVar4,"\n");
std::__cxx11::string::~string(local_70);
poVar4 = std::operator<<(local_10,"Halfmoves: ");
uVar2 = Board::halfMoveClock(local_18);
poVar4 = (ostream *)std::ostream::operator<<(poVar4,uVar2);
std::operator<<(poVar4,"\n");
poVar4 = std::operator<<(local_10,"Fullmoves: ");
uVar2 = Board::fullMoveNumber(local_18);
poVar4 = (ostream *)std::ostream::operator<<(poVar4,uVar2);
std::operator<<(poVar4,"\n");
poVar4 = std::operator<<(local_10,"EP: ");
iVar3 = Square::index((Square *)(local_18 + 0xb0));
poVar4 = (ostream *)std::ostream::operator<<(poVar4,iVar3);
std::operator<<(poVar4,"\n");
poVar4 = std::operator<<(local_10,"Hash: ");
poVar4 = (ostream *)std::ostream::operator<<(poVar4,*(ulong *)(local_18 + 0xa0));
std::operator<<(poVar4,"\n");
std::ostream::operator<<
(local_10,(_func_ostream_ptr_ostream_ptr *)PTR_endl<char,std_char_traits<char>>_00130fa8
);
return local_10;
}
|
|
61,042
|
chess::operator<<(std::ostream&, chess::Board const&)
|
Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp
|
inline std::ostream &operator<<(std::ostream &os, const Board &b) {
for (int i = 63; i >= 0; i -= 8) {
for (int j = 7; j >= 0; j--) {
os << " " << static_cast<std::string>(b.board_[i - j]);
}
os << " \n";
}
os << "\n\n";
os << "Side to move: " << static_cast<int>(b.stm_.internal()) << "\n";
os << "Castling rights: " << b.getCastleString() << "\n";
os << "Halfmoves: " << b.halfMoveClock() << "\n";
os << "Fullmoves: " << b.fullMoveNumber() << "\n";
os << "EP: " << b.ep_sq_.index() << "\n";
os << "Hash: " << b.key_ << "\n";
os << std::endl;
return os;
}
|
O1
|
cpp
|
chess::operator<<(std::ostream&, chess::Board const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %rbp
movq %rsi, 0x28(%rsp)
leaq 0x98(%rsi), %r14
movl $0x3f, %eax
leaq 0x9f82(%rip), %r15 # 0x10c98
leaq 0x8(%rsp), %r12
movq %rax, 0x30(%rsp)
xorl %r13d, %r13d
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3250
leaq (%r14,%r13), %rsi
movq %r12, %rdi
callq 0x7d20
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x3250
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x6d68
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3210
incq %r13
cmpq $0x8, %r13
jne 0x6d23
movl $0x2, %edx
movq %rbx, %rdi
leaq 0x9ed6(%rip), %rsi # 0x10c56
callq 0x3250
movq 0x30(%rsp), %rcx
leaq -0x8(%rcx), %rax
addq $-0x8, %r14
cmpq $0x7, %rcx
ja 0x6d1b
leaq 0x9eba(%rip), %rsi # 0x10c59
movl $0x2, %edx
movq %rbx, %rdi
callq 0x3250
leaq 0x9ea9(%rip), %rsi # 0x10c5c
movl $0xe, %edx
movq %rbx, %rdi
callq 0x3250
movq 0x28(%rsp), %r14
movsbl 0xae(%r14), %esi
movq %rbx, %rdi
callq 0x3350
leaq 0x9e7e(%rip), %rsi # 0x10c5a
movl $0x1, %edx
movq %rax, %rdi
callq 0x3250
leaq 0x9e7b(%rip), %rsi # 0x10c6b
movl $0x11, %edx
movq %rbx, %rdi
callq 0x3250
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x7e30
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x3250
leaq 0x9e37(%rip), %rsi # 0x10c5a
movl $0x1, %edx
movq %rax, %rdi
callq 0x3250
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x6e47
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3210
leaq 0x9e2f(%rip), %rsi # 0x10c7d
movl $0xb, %edx
movq %rbx, %rdi
callq 0x3250
movzbl 0xb4(%r14), %esi
movq %rbx, %rdi
callq 0x3140
leaq 0x9de8(%rip), %r15 # 0x10c5a
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x3250
leaq 0x9e00(%rip), %rsi # 0x10c89
movl $0xb, %edx
movq %rbx, %rdi
callq 0x3250
movzwl 0xac(%r14), %esi
shrl %esi
incq %rsi
movq %rbx, %rdi
callq 0x3140
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x3250
leaq 0x9dd3(%rip), %rsi # 0x10c95
movl $0x4, %edx
movq %rbx, %rdi
callq 0x3250
movl 0xb0(%r14), %esi
movq %rbx, %rdi
callq 0x3350
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x3250
leaq 0x9da5(%rip), %rsi # 0x10c9a
movl $0x6, %edx
movq %rbx, %rdi
callq 0x3250
movq 0xa0(%r14), %rsi
movq %rbx, %rdi
callq 0x3140
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x3250
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3150
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6f5c
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x6f76
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3210
movq %rbx, %rdi
callq 0x3360
|
_ZN5chesslsERSoRKNS_5BoardE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, rdi
lea rbp, [rsp+68h+var_50]
mov [rsp+68h+var_40], rsi
lea r14, [rsi+98h]
mov eax, 3Fh ; '?'
lea r15, aEp+3; " "
lea r12, [rsp+68h+var_60]
loc_6D1B:
mov [rsp+68h+var_38], rax
xor r13d, r13d
loc_6D23:
mov edx, 1
mov rdi, rbx
mov rsi, r15
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, [r14+r13]
mov rdi, r12
call _ZNK5chess5PiececvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv; chess::Piece::operator std::string(void)
mov rsi, [rsp+68h+var_60]
mov rdx, [rsp+68h+var_58]
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+68h+var_60]; void *
cmp rdi, rbp
jz short loc_6D68
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6D68:
inc r13
cmp r13, 8
jnz short loc_6D23
mov edx, 2
mov rdi, rbx
lea rsi, asc_10C56; " \n"
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rcx, [rsp+68h+var_38]
lea rax, [rcx-8]
add r14, 0FFFFFFFFFFFFFFF8h
cmp rcx, 7
ja short loc_6D1B
lea rsi, asc_10C59; "\n\n"
mov edx, 2
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)
lea rsi, aSideToMove; "Side to move: "
mov edx, 0Eh
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 r14, [rsp+68h+var_40]
movsx esi, byte ptr [r14+0AEh]
mov rdi, rbx
call __ZNSolsEi; std::ostream::operator<<(int)
lea rsi, asc_10C59+1; "\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)
lea rsi, aCastlingRights; "Castling rights: "
mov edx, 11h
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)
lea r15, [rsp+68h+var_60]
mov rdi, r15
mov rsi, r14
call _ZNK5chess5Board15getCastleStringB5cxx11Ev; chess::Board::getCastleString(void)
mov rsi, [r15]
mov rdx, [r15+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)
lea rsi, asc_10C59+1; "\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+68h+var_60]; void *
cmp rdi, rbp
jz short loc_6E47
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6E47:
lea rsi, aHalfmoves; "Halfmoves: "
mov edx, 0Bh
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)
movzx esi, byte ptr [r14+0B4h]
mov rdi, rbx
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
lea r15, asc_10C59+1; "\n"
mov edx, 1
mov rdi, rax
mov rsi, r15
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, aFullmoves; "Fullmoves: "
mov edx, 0Bh
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)
movzx esi, word ptr [r14+0ACh]
shr esi, 1
inc rsi
mov rdi, rbx
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov edx, 1
mov rdi, rax
mov rsi, r15
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, aEp; "EP: "
mov edx, 4
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 esi, [r14+0B0h]
mov rdi, rbx
call __ZNSolsEi; std::ostream::operator<<(int)
mov edx, 1
mov rdi, rax
mov rsi, r15
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, aHash; "Hash: "
mov edx, 6
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 rsi, [r14+0A0h]
mov rdi, rbx
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov edx, 1
mov rdi, rax
mov rsi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [rbx]
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)
mov rax, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_6F5C:
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, rbp
jz short loc_6F76
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6F76:
mov rdi, rbx
call __Unwind_Resume
|
std::ostream * chess::operator<<(std::ostream *this, long long a2)
{
long long v2; // r14
long long v3; // rax
long long i; // r13
long long v5; // r14
long long v6; // rax
long long v7; // rax
long long v8; // rax
long long v9; // rax
long long v10; // rax
long long v11; // rax
char v12; // al
std::ostream *v13; // rax
void *v15; // [rsp+8h] [rbp-60h] BYREF
long long v16; // [rsp+10h] [rbp-58h]
_QWORD v17[2]; // [rsp+18h] [rbp-50h] BYREF
long long v18; // [rsp+28h] [rbp-40h]
unsigned long long v19; // [rsp+30h] [rbp-38h]
v18 = a2;
v2 = a2 + 152;
v3 = 63LL;
do
{
v19 = v3;
for ( i = 0LL; i != 8; ++i )
{
std::__ostream_insert<char,std::char_traits<char>>(this, " ", 1LL);
chess::Piece::operator std::string(&v15, v2 + i);
std::__ostream_insert<char,std::char_traits<char>>(this, v15, v16);
if ( v15 != v17 )
operator delete(v15, v17[0] + 1LL);
}
std::__ostream_insert<char,std::char_traits<char>>(this, " \n", 2LL);
v3 = v19 - 8;
v2 -= 8LL;
}
while ( v19 > 7 );
std::__ostream_insert<char,std::char_traits<char>>(this, "\n\n", 2LL);
std::__ostream_insert<char,std::char_traits<char>>(this, "Side to move: ", 14LL);
v5 = v18;
v6 = std::ostream::operator<<(this, (unsigned int)*(char *)(v18 + 174));
std::__ostream_insert<char,std::char_traits<char>>(v6, "\n", 1LL);
std::__ostream_insert<char,std::char_traits<char>>(this, "Castling rights: ", 17LL);
chess::Board::getCastleString[abi:cxx11](&v15, v5);
v7 = std::__ostream_insert<char,std::char_traits<char>>(this, v15, v16);
std::__ostream_insert<char,std::char_traits<char>>(v7, "\n", 1LL);
if ( v15 != v17 )
operator delete(v15, v17[0] + 1LL);
std::__ostream_insert<char,std::char_traits<char>>(this, "Halfmoves: ", 11LL);
v8 = std::ostream::_M_insert<unsigned long>(this, *(unsigned __int8 *)(v5 + 180));
std::__ostream_insert<char,std::char_traits<char>>(v8, "\n", 1LL);
std::__ostream_insert<char,std::char_traits<char>>(this, "Fullmoves: ", 11LL);
v9 = std::ostream::_M_insert<unsigned long>(this, (*(unsigned __int16 *)(v5 + 172) >> 1) + 1LL);
std::__ostream_insert<char,std::char_traits<char>>(v9, "\n", 1LL);
std::__ostream_insert<char,std::char_traits<char>>(this, "EP: ", 4LL);
v10 = std::ostream::operator<<(this, *(unsigned int *)(v5 + 176));
std::__ostream_insert<char,std::char_traits<char>>(v10, "\n", 1LL);
std::__ostream_insert<char,std::char_traits<char>>(this, "Hash: ", 6LL);
v11 = std::ostream::_M_insert<unsigned long>(this, *(_QWORD *)(v5 + 160));
std::__ostream_insert<char,std::char_traits<char>>(v11, "\n", 1LL);
v12 = std::ios::widen((char *)this + *(_QWORD *)(*(_QWORD *)this - 24LL), 10LL);
v13 = (std::ostream *)std::ostream::put(this, v12);
std::ostream::flush(v13);
return this;
}
|
operator<<:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RDI
LEA RBP,[RSP + 0x18]
MOV qword ptr [RSP + 0x28],RSI
LEA R14,[RSI + 0x98]
MOV EAX,0x3f
LEA R15,[0x110c98]
LEA R12,[RSP + 0x8]
LAB_00106d1b:
MOV qword ptr [RSP + 0x30],RAX
XOR R13D,R13D
LAB_00106d23:
MOV EDX,0x1
MOV RDI,RBX
MOV RSI,R15
CALL 0x00103250
LEA RSI,[R14 + R13*0x1]
MOV RDI,R12
CALL 0x00107d20
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_00106d49:
MOV RDI,RBX
CALL 0x00103250
LAB_00106d51:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,RBP
JZ 0x00106d68
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00103210
LAB_00106d68:
INC R13
CMP R13,0x8
JNZ 0x00106d23
MOV EDX,0x2
MOV RDI,RBX
LEA RSI,[0x110c56]
CALL 0x00103250
MOV RCX,qword ptr [RSP + 0x30]
LEA RAX,[RCX + -0x8]
ADD R14,-0x8
CMP RCX,0x7
JA 0x00106d1b
LEA RSI,[0x110c59]
MOV EDX,0x2
MOV RDI,RBX
CALL 0x00103250
LEA RSI,[0x110c5c]
MOV EDX,0xe
MOV RDI,RBX
CALL 0x00103250
MOV R14,qword ptr [RSP + 0x28]
MOVSX ESI,byte ptr [R14 + 0xae]
MOV RDI,RBX
CALL 0x00103350
LEA RSI,[0x110c5a]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x00103250
LEA RSI,[0x110c6b]
MOV EDX,0x11
MOV RDI,RBX
CALL 0x00103250
LEA R15,[RSP + 0x8]
MOV RDI,R15
MOV RSI,R14
CALL 0x00107e30
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
LAB_00106e14:
MOV RDI,RBX
CALL 0x00103250
LEA RSI,[0x110c5a]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x00103250
LAB_00106e30:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,RBP
JZ 0x00106e47
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00103210
LAB_00106e47:
LEA RSI,[0x110c7d]
MOV EDX,0xb
MOV RDI,RBX
CALL 0x00103250
MOVZX ESI,byte ptr [R14 + 0xb4]
MOV RDI,RBX
CALL 0x00103140
LEA R15,[0x110c5a]
MOV EDX,0x1
MOV RDI,RAX
MOV RSI,R15
CALL 0x00103250
LEA RSI,[0x110c89]
MOV EDX,0xb
MOV RDI,RBX
CALL 0x00103250
MOVZX ESI,word ptr [R14 + 0xac]
SHR ESI,0x1
INC RSI
MOV RDI,RBX
CALL 0x00103140
MOV EDX,0x1
MOV RDI,RAX
MOV RSI,R15
CALL 0x00103250
LEA RSI,[0x110c95]
MOV EDX,0x4
MOV RDI,RBX
CALL 0x00103250
MOV ESI,dword ptr [R14 + 0xb0]
MOV RDI,RBX
CALL 0x00103350
MOV EDX,0x1
MOV RDI,RAX
MOV RSI,R15
CALL 0x00103250
LEA RSI,[0x110c9a]
MOV EDX,0x6
MOV RDI,RBX
CALL 0x00103250
MOV RSI,qword ptr [R14 + 0xa0]
MOV RDI,RBX
CALL 0x00103140
MOV EDX,0x1
MOV RDI,RAX
MOV RSI,R15
CALL 0x00103250
MOV RAX,qword ptr [RBX]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,RBX
MOV ESI,0xa
CALL 0x001031f0
MOVSX ESI,AL
MOV RDI,RBX
CALL 0x00103030
MOV RDI,RAX
CALL 0x00103150
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* chess::TEMPNAMEPLACEHOLDERVALUE(std::ostream&, chess::Board const&) */
ostream * chess::operator<<(ostream *param_1,Board *param_2)
{
Board *pBVar1;
ulong uVar2;
ostream *poVar3;
long lVar4;
long *local_60;
long local_58;
long local_50 [2];
Board *local_40;
ulong local_38;
uVar2 = 0x3f;
local_40 = param_2;
do {
lVar4 = 0;
local_38 = uVar2;
do {
std::__ostream_insert<char,std::char_traits<char>>(param_1," ",1);
Piece::operator_cast_to_string((Piece *)&local_60);
/* try { // try from 00106d49 to 00106d50 has its CatchHandler @ 00106f5c */
std::__ostream_insert<char,std::char_traits<char>>(param_1,(char *)local_60,local_58);
if (local_60 != local_50) {
operator_delete(local_60,local_50[0] + 1);
}
lVar4 = lVar4 + 1;
} while (lVar4 != 8);
std::__ostream_insert<char,std::char_traits<char>>(param_1," \n",2);
uVar2 = local_38 - 8;
} while (7 < local_38);
std::__ostream_insert<char,std::char_traits<char>>(param_1,"\n\n",2);
std::__ostream_insert<char,std::char_traits<char>>(param_1,"Side to move: ",0xe);
pBVar1 = local_40;
poVar3 = (ostream *)std::ostream::operator<<(param_1,(int)(char)local_40[0xae]);
std::__ostream_insert<char,std::char_traits<char>>(poVar3,"\n",1);
std::__ostream_insert<char,std::char_traits<char>>(param_1,"Castling rights: ",0x11);
Board::getCastleString_abi_cxx11_();
/* try { // try from 00106e14 to 00106e2f has its CatchHandler @ 00106f5a */
poVar3 = std::__ostream_insert<char,std::char_traits<char>>(param_1,(char *)local_60,local_58);
std::__ostream_insert<char,std::char_traits<char>>(poVar3,"\n",1);
if (local_60 != local_50) {
operator_delete(local_60,local_50[0] + 1);
}
std::__ostream_insert<char,std::char_traits<char>>(param_1,"Halfmoves: ",0xb);
poVar3 = std::ostream::_M_insert<unsigned_long>((ulong)param_1);
std::__ostream_insert<char,std::char_traits<char>>(poVar3,"\n",1);
std::__ostream_insert<char,std::char_traits<char>>(param_1,"Fullmoves: ",0xb);
poVar3 = std::ostream::_M_insert<unsigned_long>((ulong)param_1);
std::__ostream_insert<char,std::char_traits<char>>(poVar3,"\n",1);
std::__ostream_insert<char,std::char_traits<char>>(param_1,"EP: ",4);
poVar3 = (ostream *)std::ostream::operator<<(param_1,*(int *)(pBVar1 + 0xb0));
std::__ostream_insert<char,std::char_traits<char>>(poVar3,"\n",1);
std::__ostream_insert<char,std::char_traits<char>>(param_1,"Hash: ",6);
poVar3 = std::ostream::_M_insert<unsigned_long>((ulong)param_1);
std::__ostream_insert<char,std::char_traits<char>>(poVar3,"\n",1);
std::ios::widen((char)*(int8 *)(*(long *)param_1 + -0x18) + (char)param_1);
std::ostream::put((char)param_1);
std::ostream::flush();
return param_1;
}
|
|
61,043
|
evmone::(anonymous namespace)::get_name[abi:cxx11](unsigned char)
|
corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/tracing.cpp
|
std::string get_name(uint8_t opcode)
{
// TODO: Create constexpr tables of names (maybe even per revision).
const auto name = instr::traits[opcode].name;
return (name != nullptr) ? name : "0x" + evmc::hex(opcode);
}
|
O3
|
cpp
|
evmone::(anonymous namespace)::get_name[abi:cxx11](unsigned char):
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl %esi, %eax
shll $0x5, %eax
leaq 0x61b90(%rip), %rcx # 0xabab0
movq (%rax,%rcx), %r14
testq %r14, %r14
je 0x49f4e
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %r14, %rdi
callq 0x210d0
leaq (%rax,%r14), %rdx
movq %rbx, %rdi
movq %r14, %rsi
addq $0x28, %rsp
popq %rbx
popq %r14
jmp 0x4a86e
movzbl %sil, %eax
movl %eax, %ecx
shrl $0x4, %ecx
leaq 0x3d646(%rip), %rdx # 0x875a4
movzbl (%rcx,%rdx), %ecx
andl $0xf, %eax
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movzbl (%rax,%rdx), %eax
shll $0x8, %eax
orl %ecx, %eax
movw %ax, (%r14)
movq $0x2, -0x8(%r14)
movb $0x0, 0x2(%r14)
leaq 0x351d3(%rip), %rcx # 0x7f162
leaq 0x8(%rsp), %rdi
movl $0x2, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x4a94a
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x49fc5
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x49fcb
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x49ff9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21200
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x4a01b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21200
movq %rbx, %rdi
callq 0x213b0
nop
|
_ZN6evmone12_GLOBAL__N_18get_nameB5cxx11Eh:
push r14
push rbx
sub rsp, 28h
mov rbx, rdi
mov eax, esi
shl eax, 5
lea rcx, _ZN6evmone5instr6traitsE; evmone::instr::traits
mov r14, [rax+rcx]
test r14, r14
jz short loc_49F4E
lea rax, [rbx+10h]
mov [rbx], rax
mov rdi, r14
call _strlen
lea rdx, [rax+r14]
mov rdi, rbx
mov rsi, r14
add rsp, 28h
pop rbx
pop r14
jmp _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
loc_49F4E:
movzx eax, sil
mov ecx, eax
shr ecx, 4
lea rdx, a0123456789abcd; "0123456789abcdef"
movzx ecx, byte ptr [rcx+rdx]
and eax, 0Fh
lea r14, [rsp+38h+var_20]
mov [r14-10h], r14
movzx eax, byte ptr [rax+rdx]
shl eax, 8
or eax, ecx
mov [r14], ax
mov qword ptr [r14-8], 2
mov byte ptr [r14+2], 0
lea rcx, aTreeHashRoot0x+11h; "0x"
lea rdi, [rsp+38h+var_30]
mov r8d, 2
xor esi, esi
xor edx, edx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
lea rdx, [rbx+10h]
mov [rbx], rdx
mov rsi, [rax]
mov rcx, rax
add rcx, 10h
cmp rsi, rcx
jz short loc_49FC5
mov [rbx], rsi
mov rdx, [rcx]
mov [rbx+10h], rdx
jmp short loc_49FCB
loc_49FC5:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rdx], xmm0
loc_49FCB:
mov rdx, [rax+8]
mov [rbx+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rdi, [rsp+38h+var_30]; void *
cmp rdi, r14
jz short loc_49FF9
mov rsi, [rsp+38h+var_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_49FF9:
add rsp, 28h
pop rbx
pop r14
retn
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r14
jz short loc_4A01B
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4A01B:
mov rdi, rbx
call __Unwind_Resume
|
void evmone::`anonymous namespace'::get_name[abi:cxx11](long long a1, int a2)
{
long long v2; // r14
long long v3; // rax
__int16 v4; // cx
long long v5; // rax
_OWORD *v6; // rcx
void *v7[2]; // [rsp+8h] [rbp-30h] BYREF
_QWORD v8[4]; // [rsp+18h] [rbp-20h] BYREF
v2 = *(long long *)((char *)&evmone::instr::traits + (unsigned int)(32 * a2));
if ( v2 )
{
*(_QWORD *)a1 = a1 + 16;
v3 = strlen(v2);
std::string::_M_construct<char const*>(a1, v2, v3 + v2);
}
else
{
v4 = (unsigned __int8)a0123456789abcd[(unsigned __int8)a2 >> 4];
v7[0] = v8;
LOWORD(v8[0]) = v4 | ((unsigned __int8)a0123456789abcd[a2 & 0xF] << 8);
v7[1] = &dword_0 + 2;
BYTE2(v8[0]) = 0;
v5 = std::string::replace(v7, 0LL, 0LL, "0x", 2LL);
*(_QWORD *)a1 = a1 + 16;
v6 = (_OWORD *)(v5 + 16);
if ( *(_QWORD *)v5 == v5 + 16 )
{
*(_OWORD *)(a1 + 16) = *v6;
}
else
{
*(_QWORD *)a1 = *(_QWORD *)v5;
*(_QWORD *)(a1 + 16) = *(_QWORD *)v6;
}
*(_QWORD *)(a1 + 8) = *(_QWORD *)(v5 + 8);
*(_QWORD *)v5 = v6;
*(_QWORD *)(v5 + 8) = 0LL;
*(_BYTE *)(v5 + 16) = 0;
if ( v7[0] != v8 )
operator delete(v7[0], v8[0] + 1LL);
}
}
|
get_name[abi:cxx11]:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
MOV EAX,ESI
SHL EAX,0x5
LEA RCX,[0x1abab0]
MOV R14,qword ptr [RAX + RCX*0x1]
TEST R14,R14
JZ 0x00149f4e
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
MOV RDI,R14
CALL 0x001210d0
LEA RDX,[RAX + R14*0x1]
MOV RDI,RBX
MOV RSI,R14
ADD RSP,0x28
POP RBX
POP R14
JMP 0x0014a86e
LAB_00149f4e:
MOVZX EAX,SIL
MOV ECX,EAX
SHR ECX,0x4
LEA RDX,[0x1875a4]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
AND EAX,0xf
LEA R14,[RSP + 0x18]
MOV qword ptr [R14 + -0x10],R14
MOVZX EAX,byte ptr [RAX + RDX*0x1]
SHL EAX,0x8
OR EAX,ECX
MOV word ptr [R14],AX
MOV qword ptr [R14 + -0x8],0x2
MOV byte ptr [R14 + 0x2],0x0
LAB_00149f88:
LEA RCX,[0x17f162]
LEA RDI,[RSP + 0x8]
MOV R8D,0x2
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0014a94a
LAB_00149fa3:
LEA RDX,[RBX + 0x10]
MOV qword ptr [RBX],RDX
MOV RSI,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RSI,RCX
JZ 0x00149fc5
MOV qword ptr [RBX],RSI
MOV RDX,qword ptr [RCX]
MOV qword ptr [RBX + 0x10],RDX
JMP 0x00149fcb
LAB_00149fc5:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RDX],XMM0
LAB_00149fcb:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R14
JZ 0x00149ff9
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00121200
LAB_00149ff9:
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* evmone::(anonymous namespace)::get_name[abi:cxx11](unsigned char) */
void __thiscall
evmone::(anonymous_namespace)::get_name_abi_cxx11_(_anonymous_namespace_ *this,uchar param_1)
{
char *__s;
long lVar1;
size_t sVar2;
long *plVar3;
long *plVar4;
int7 in_register_00000031;
int2 *local_30;
int8 local_28;
int2 local_20;
int1 uStack_1e;
int5 uStack_1d;
__s = *(char **)(instr::traits + (uint)((int)CONCAT71(in_register_00000031,param_1) << 5));
if (__s != (char *)0x0) {
*(_anonymous_namespace_ **)this = this + 0x10;
sVar2 = strlen(__s);
std::__cxx11::string::_M_construct<char_const*>(this,__s,__s + sVar2);
return;
}
local_20 = CONCAT11("0123456789abcdef"[param_1 & 0xf],"0123456789abcdef"[param_1 >> 4]);
local_28 = 2;
uStack_1e = 0;
/* try { // try from 00149f88 to 00149fa2 has its CatchHandler @ 0014a001 */
local_30 = &local_20;
plVar3 = (long *)std::__cxx11::string::replace((string *)&local_30,0,0,"0x",2);
*(_anonymous_namespace_ **)this = this + 0x10;
plVar4 = plVar3 + 2;
if ((long *)*plVar3 == plVar4) {
lVar1 = plVar3[3];
*(long *)(this + 0x10) = *plVar4;
*(long *)(this + 0x18) = lVar1;
}
else {
*(long **)this = (long *)*plVar3;
*(long *)(this + 0x10) = *plVar4;
}
*(long *)(this + 8) = plVar3[1];
*plVar3 = (long)plVar4;
plVar3[1] = 0;
*(int1 *)(plVar3 + 2) = 0;
if (local_30 != &local_20) {
operator_delete(local_30,CONCAT53(uStack_1d,CONCAT12(uStack_1e,local_20)) + 1);
}
return;
}
|
|
61,044
|
minja::CallExpr::CallExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::ArgumentsExpression&&)
|
monkey531[P]llama/common/minja.hpp
|
CallExpr(const Location & location, std::shared_ptr<Expression> && obj, ArgumentsExpression && a)
: Expression(location), object(std::move(obj)), args(std::move(a)) {}
|
O2
|
cpp
|
minja::CallExpr::CallExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::ArgumentsExpression&&):
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
callq 0x62cfa
leaq 0x8fb9a(%rip), %rax # 0xfe8c0
addq $0x10, %rax
movq %rax, (%r15)
andq $0x0, 0x28(%r15)
movups (%r14), %xmm0
andq $0x0, 0x8(%r14)
movups %xmm0, 0x20(%r15)
andq $0x0, (%r14)
addq $0x30, %r15
movq %r15, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x6bbd0
|
_ZN5minja8CallExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEEONS_19ArgumentsExpressionE:
push r15
push r14
push rbx
mov rbx, rcx
mov r14, rdx
mov r15, rdi
call _ZN5minja10ExpressionC2ERKNS_8LocationE; minja::Expression::Expression(minja::Location const&)
lea rax, _ZTVN5minja8CallExprE; `vtable for'minja::CallExpr
add rax, 10h
mov [r15], rax
and qword ptr [r15+28h], 0
movups xmm0, xmmword ptr [r14]
and qword ptr [r14+8], 0
movups xmmword ptr [r15+20h], xmm0
and qword ptr [r14], 0
add r15, 30h ; '0'
mov rdi, r15
mov rsi, rbx
pop rbx
pop r14
pop r15
jmp _ZN5minja19ArgumentsExpressionC2EOS0_; minja::ArgumentsExpression::ArgumentsExpression(minja::ArgumentsExpression&&)
|
long long minja::CallExpr::CallExpr(long long a1, _QWORD *a2, __int128 *a3, long long a4)
{
__int128 v6; // xmm0
minja::Expression::Expression((_QWORD *)a1, a2);
*(_QWORD *)a1 = &`vtable for'minja::CallExpr + 2;
*(_QWORD *)(a1 + 40) = 0LL;
v6 = *a3;
*((_QWORD *)a3 + 1) = 0LL;
*(_OWORD *)(a1 + 32) = v6;
*(_QWORD *)a3 = 0LL;
return minja::ArgumentsExpression::ArgumentsExpression(a1 + 48, a4);
}
|
CallExpr:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RCX
MOV R14,RDX
MOV R15,RDI
CALL 0x00162cfa
LEA RAX,[0x1fe8c0]
ADD RAX,0x10
MOV qword ptr [R15],RAX
AND qword ptr [R15 + 0x28],0x0
MOVUPS XMM0,xmmword ptr [R14]
AND qword ptr [R14 + 0x8],0x0
MOVUPS xmmword ptr [R15 + 0x20],XMM0
AND qword ptr [R14],0x0
ADD R15,0x30
MOV RDI,R15
MOV RSI,RBX
POP RBX
POP R14
POP R15
JMP 0x0016bbd0
|
/* minja::CallExpr::CallExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&,
minja::ArgumentsExpression&&) */
void __thiscall
minja::CallExpr::CallExpr
(CallExpr *this,Location *param_1,shared_ptr *param_2,ArgumentsExpression *param_3)
{
int8 uVar1;
Expression::Expression((Expression *)this,param_1);
*(int ***)this = &PTR_do_evaluate_001fe8d0;
*(int8 *)(this + 0x28) = 0;
uVar1 = *(int8 *)(param_2 + 8);
*(int8 *)(param_2 + 8) = 0;
*(int8 *)(this + 0x20) = *(int8 *)param_2;
*(int8 *)(this + 0x28) = uVar1;
*(int8 *)param_2 = 0;
ArgumentsExpression::ArgumentsExpression((ArgumentsExpression *)(this + 0x30),param_3);
return;
}
|
|
61,045
|
GetImageAlphaBorder
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c
|
Rectangle GetImageAlphaBorder(Image image, float threshold)
{
Rectangle crop = { 0 };
Color *pixels = LoadImageColors(image);
if (pixels != NULL)
{
int xMin = 65536; // Define a big enough number
int xMax = 0;
int yMin = 65536;
int yMax = 0;
for (int y = 0; y < image.height; y++)
{
for (int x = 0; x < image.width; x++)
{
if (pixels[y*image.width + x].a > (unsigned char)(threshold*255.0f))
{
if (x < xMin) xMin = x;
if (x > xMax) xMax = x;
if (y < yMin) yMin = y;
if (y > yMax) yMax = y;
}
}
}
// Check for empty blank image
if ((xMin != 65536) && (xMax != 65536))
{
crop = (Rectangle){ (float)xMin, (float)yMin, (float)((xMax + 1) - xMin), (float)((yMax + 1) - yMin) };
}
UnloadImageColors(pixels);
}
return crop;
}
|
O0
|
c
|
GetImageAlphaBorder:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movss %xmm0, -0x14(%rbp)
leaq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0xa2d0
movq -0x50(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xfc0c0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x102347
movl $0x10000, -0x24(%rbp) # imm = 0x10000
movl $0x0, -0x28(%rbp)
movl $0x10000, -0x2c(%rbp) # imm = 0x10000
movl $0x0, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x50(%rbp), %rcx
movl -0x34(%rbp), %eax
cmpl 0xc(%rcx), %eax
jge 0x1022e4
movl $0x0, -0x38(%rbp)
movq -0x50(%rbp), %rcx
movl -0x38(%rbp), %eax
cmpl 0x8(%rcx), %eax
jge 0x1022d4
movq -0x50(%rbp), %rdx
movq -0x20(%rbp), %rax
movl -0x34(%rbp), %ecx
movl 0x8(%rdx), %edx
imull %edx, %ecx
movl -0x38(%rbp), %edx
addl %edx, %ecx
movslq %ecx, %rcx
movzbl 0x3(%rax,%rcx,4), %eax
movss -0x14(%rbp), %xmm0
movss 0xa5d15(%rip), %xmm1 # 0x1a7f90
mulss %xmm1, %xmm0
cvttss2si %xmm0, %ecx
movzbl %cl, %ecx
cmpl %ecx, %eax
jle 0x1022c4
movl -0x38(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x102298
movl -0x38(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x28(%rbp), %eax
jle 0x1022a6
movl -0x38(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x1022b4
movl -0x34(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x30(%rbp), %eax
jle 0x1022c2
movl -0x34(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0x1022c4
jmp 0x1022c6
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x102240
jmp 0x1022d6
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x102229
cmpl $0x10000, -0x24(%rbp) # imm = 0x10000
je 0x10233e
cmpl $0x10000, -0x28(%rbp) # imm = 0x10000
je 0x10233e
cvtsi2ssl -0x24(%rbp), %xmm0
movss %xmm0, -0x48(%rbp)
cvtsi2ssl -0x2c(%rbp), %xmm0
movss %xmm0, -0x44(%rbp)
movl -0x28(%rbp), %eax
addl $0x1, %eax
subl -0x24(%rbp), %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x40(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
subl -0x2c(%rbp), %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x3c(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x20(%rbp), %rdi
callq 0x101840
movsd -0x10(%rbp), %xmm0
movsd -0x8(%rbp), %xmm1
addq $0x70, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
GetImageAlphaBorder:
push rbp
mov rbp, rsp
sub rsp, 70h
lea rax, [rbp+arg_0]
mov [rbp+var_50], rax
movss [rbp+var_14], xmm0
lea rdi, [rbp+var_10]
xor esi, esi
mov edx, 10h
call _memset
mov rax, [rbp+var_50]
mov rcx, [rax]
mov [rsp+70h+var_70], rcx
mov rcx, [rax+8]
mov [rsp+70h+var_68], rcx
mov rax, [rax+10h]
mov [rsp+70h+var_60], rax
call LoadImageColors
mov [rbp+var_20], rax
cmp [rbp+var_20], 0
jz loc_102347
mov [rbp+var_24], 10000h
mov [rbp+var_28], 0
mov [rbp+var_2C], 10000h
mov [rbp+var_30], 0
mov [rbp+var_34], 0
loc_102229:
mov rcx, [rbp+var_50]
mov eax, [rbp+var_34]
cmp eax, [rcx+0Ch]
jge loc_1022E4
mov [rbp+var_38], 0
loc_102240:
mov rcx, [rbp+var_50]
mov eax, [rbp+var_38]
cmp eax, [rcx+8]
jge loc_1022D4
mov rdx, [rbp+var_50]
mov rax, [rbp+var_20]
mov ecx, [rbp+var_34]
mov edx, [rdx+8]
imul ecx, edx
mov edx, [rbp+var_38]
add ecx, edx
movsxd rcx, ecx
movzx eax, byte ptr [rax+rcx*4+3]
movss xmm0, [rbp+var_14]
movss xmm1, cs:dword_1A7F90
mulss xmm0, xmm1
cvttss2si ecx, xmm0
movzx ecx, cl
cmp eax, ecx
jle short loc_1022C4
mov eax, [rbp+var_38]
cmp eax, [rbp+var_24]
jge short loc_102298
mov eax, [rbp+var_38]
mov [rbp+var_24], eax
loc_102298:
mov eax, [rbp+var_38]
cmp eax, [rbp+var_28]
jle short loc_1022A6
mov eax, [rbp+var_38]
mov [rbp+var_28], eax
loc_1022A6:
mov eax, [rbp+var_34]
cmp eax, [rbp+var_2C]
jge short loc_1022B4
mov eax, [rbp+var_34]
mov [rbp+var_2C], eax
loc_1022B4:
mov eax, [rbp+var_34]
cmp eax, [rbp+var_30]
jle short loc_1022C2
mov eax, [rbp+var_34]
mov [rbp+var_30], eax
loc_1022C2:
jmp short $+2
loc_1022C4:
jmp short $+2
loc_1022C6:
mov eax, [rbp+var_38]
add eax, 1
mov [rbp+var_38], eax
jmp loc_102240
loc_1022D4:
jmp short $+2
loc_1022D6:
mov eax, [rbp+var_34]
add eax, 1
mov [rbp+var_34], eax
jmp loc_102229
loc_1022E4:
cmp [rbp+var_24], 10000h
jz short loc_10233E
cmp [rbp+var_28], 10000h
jz short loc_10233E
cvtsi2ss xmm0, [rbp+var_24]
movss dword ptr [rbp+var_48], xmm0
cvtsi2ss xmm0, [rbp+var_2C]
movss dword ptr [rbp+var_48+4], xmm0
mov eax, [rbp+var_28]
add eax, 1
sub eax, [rbp+var_24]
cvtsi2ss xmm0, eax
movss dword ptr [rbp+var_40], xmm0
mov eax, [rbp+var_30]
add eax, 1
sub eax, [rbp+var_2C]
cvtsi2ss xmm0, eax
movss dword ptr [rbp+var_40+4], xmm0
mov rax, [rbp+var_48]
mov [rbp+var_10], rax
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
loc_10233E:
mov rdi, [rbp+var_20]
call UnloadImageColors
loc_102347:
movsd xmm0, [rbp+var_10]
movsd xmm1, [rbp+var_8]
add rsp, 70h
pop rbp
retn
|
double GetImageAlphaBorder(
float a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7,
long long a8,
long long a9,
long long a10)
{
int v10; // edx
int v11; // r8d
int v12; // r9d
long long v14; // [rsp+28h] [rbp-48h]
long long v15; // [rsp+30h] [rbp-40h]
int j; // [rsp+38h] [rbp-38h]
int i; // [rsp+3Ch] [rbp-34h]
int v18; // [rsp+40h] [rbp-30h]
int v19; // [rsp+44h] [rbp-2Ch]
int v20; // [rsp+48h] [rbp-28h]
int v21; // [rsp+4Ch] [rbp-24h]
long long ImageColors; // [rsp+50h] [rbp-20h]
_QWORD v23[2]; // [rsp+60h] [rbp-10h] BYREF
memset(v23, 0LL, sizeof(v23));
ImageColors = LoadImageColors((unsigned int)v23, 0, v10, a9, v11, v12, a8, a9, a10);
if ( ImageColors )
{
v21 = 0x10000;
v20 = 0;
v19 = 0x10000;
v18 = 0;
for ( i = 0; i < SHIDWORD(a9); ++i )
{
for ( j = 0; j < (int)a9; ++j )
{
if ( *(unsigned __int8 *)(ImageColors + 4LL * (j + (int)a9 * i) + 3) > (int)(unsigned __int8)(int)(float)(a1 * 255.0) )
{
if ( j < v21 )
v21 = j;
if ( j > v20 )
v20 = j;
if ( i < v19 )
v19 = i;
if ( i > v18 )
v18 = i;
}
}
}
if ( v21 != 0x10000 && v20 != 0x10000 )
{
*(float *)&v14 = (float)v21;
*((float *)&v14 + 1) = (float)v19;
*(float *)&v15 = (float)(v20 + 1 - v21);
*((float *)&v15 + 1) = (float)(v18 + 1 - v19);
v23[0] = v14;
v23[1] = v15;
}
UnloadImageColors(ImageColors);
}
return *(double *)v23;
}
| |||
61,046
|
GetImageAlphaBorder
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c
|
Rectangle GetImageAlphaBorder(Image image, float threshold)
{
Rectangle crop = { 0 };
Color *pixels = LoadImageColors(image);
if (pixels != NULL)
{
int xMin = 65536; // Define a big enough number
int xMax = 0;
int yMin = 65536;
int yMax = 0;
for (int y = 0; y < image.height; y++)
{
for (int x = 0; x < image.width; x++)
{
if (pixels[y*image.width + x].a > (unsigned char)(threshold*255.0f))
{
if (x < xMin) xMin = x;
if (x > xMax) xMax = x;
if (y < yMin) yMin = y;
if (y > yMax) yMax = y;
}
}
}
// Check for empty blank image
if ((xMin != 65536) && (xMax != 65536))
{
crop = (Rectangle){ (float)xMin, (float)yMin, (float)((xMax + 1) - xMin), (float)((yMax + 1) - yMin) };
}
UnloadImageColors(pixels);
}
return crop;
}
|
O2
|
c
|
GetImageAlphaBorder:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movss %xmm0, 0x20(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x60(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x7e527
testq %rax, %rax
je 0x823ee
leaq 0x60(%rsp), %rcx
movss 0x20(%rsp), %xmm0
mulss 0x373f9(%rip), %xmm0 # 0xb9718
movslq 0x8(%rcx), %rsi
cvttss2si %xmm0, %edi
xorl %r9d, %r9d
testl %esi, %esi
movl $0x0, %r10d
cmovgl %esi, %r10d
movl 0xc(%rcx), %ebx
testl %ebx, %ebx
cmovlel %r9d, %ebx
movq %rax, %r14
addq $0x3, %r14
shlq $0x2, %rsi
movl $0x10000, %ecx # imm = 0x10000
xorl %edx, %edx
xorl %r8d, %r8d
movl $0x10000, %r11d # imm = 0x10000
cmpq %rbx, %r9
je 0x82396
xorl %r15d, %r15d
cmpq %r15, %r10
je 0x8238e
cmpb %dil, (%r14,%r15,4)
jbe 0x82389
cmpl %r11d, %r15d
cmovll %r15d, %r11d
cmpl %r8d, %r15d
cmovgl %r15d, %r8d
cmpl %ecx, %r9d
cmovll %r9d, %ecx
cmpl %edx, %r9d
cmovgl %r9d, %edx
incq %r15
jmp 0x82362
incq %r9
addq %rsi, %r14
jmp 0x8235a
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
cmpl $0x10000, %r11d # imm = 0x10000
je 0x823d0
cmpl $0x10000, %r8d # imm = 0x10000
je 0x823d0
cvtsi2ss %r11d, %xmm1
cvtsi2ss %ecx, %xmm0
subl %r11d, %r8d
incl %r8d
cvtsi2ss %r8d, %xmm2
unpcklps %xmm0, %xmm1 # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
subl %ecx, %edx
incl %edx
cvtsi2ss %edx, %xmm0
unpcklps %xmm0, %xmm2 # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
movaps %xmm2, 0x30(%rsp)
movaps %xmm1, 0x20(%rsp)
movq %rax, %rdi
callq 0x9640
movaps 0x30(%rsp), %xmm1
movaps 0x20(%rsp), %xmm0
jmp 0x823f4
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
GetImageAlphaBorder:
push r15
push r14
push rbx
sub rsp, 40h
movss dword ptr [rsp+58h+var_38], xmm0
mov rax, [rsp+58h+arg_10]
mov [rsp+58h+var_48], rax
movaps xmm0, [rsp+58h+arg_0]
movups [rsp+58h+var_58], xmm0
call LoadImageColors
test rax, rax
jz loc_823EE
lea rcx, [rsp+58h+arg_0]
movss xmm0, dword ptr [rsp+58h+var_38]
mulss xmm0, cs:dword_B9718
movsxd rsi, dword ptr [rcx+8]
cvttss2si edi, xmm0
xor r9d, r9d
test esi, esi
mov r10d, 0
cmovg r10d, esi
mov ebx, [rcx+0Ch]
test ebx, ebx
cmovle ebx, r9d
mov r14, rax
add r14, 3
shl rsi, 2
mov ecx, 10000h
xor edx, edx
xor r8d, r8d
mov r11d, 10000h
loc_8235A:
cmp r9, rbx
jz short loc_82396
xor r15d, r15d
loc_82362:
cmp r10, r15
jz short loc_8238E
cmp [r14+r15*4], dil
jbe short loc_82389
cmp r15d, r11d
cmovl r11d, r15d
cmp r15d, r8d
cmovg r8d, r15d
cmp r9d, ecx
cmovl ecx, r9d
cmp r9d, edx
cmovg edx, r9d
loc_82389:
inc r15
jmp short loc_82362
loc_8238E:
inc r9
add r14, rsi
jmp short loc_8235A
loc_82396:
xorps xmm1, xmm1
xorps xmm2, xmm2
cmp r11d, 10000h
jz short loc_823D0
cmp r8d, 10000h
jz short loc_823D0
cvtsi2ss xmm1, r11d
cvtsi2ss xmm0, ecx
sub r8d, r11d
inc r8d
cvtsi2ss xmm2, r8d
unpcklps xmm1, xmm0
sub edx, ecx
inc edx
cvtsi2ss xmm0, edx
unpcklps xmm2, xmm0
loc_823D0:
movaps [rsp+58h+var_28], xmm2
movaps [rsp+58h+var_38], xmm1
mov rdi, rax
call _free
movaps xmm1, [rsp+58h+var_28]
movaps xmm0, [rsp+58h+var_38]
jmp short loc_823F4
loc_823EE:
xorps xmm0, xmm0
xorps xmm1, xmm1
loc_823F4:
add rsp, 40h
pop rbx
pop r14
pop r15
retn
|
double GetImageAlphaBorder(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
float a7,
__m128i a8,
long long a9)
{
long long ImageColors; // rax
__m128 v10; // xmm0
long long v11; // r9
long long v12; // r10
long long v13; // rbx
long long v14; // r14
int v15; // ecx
int v16; // edx
int v17; // r8d
int v18; // r11d
long long i; // r15
__m128 v20; // xmm1
ImageColors = LoadImageColors(a8, a1, a2, a3, a4, a5, a6, a8.m128i_i64[0], a8.m128i_i64[1], a9);
if ( !ImageColors )
return 0.0;
v10 = (__m128)LODWORD(a7);
v11 = 0LL;
v12 = 0LL;
if ( a8.m128i_i32[2] > 0 )
v12 = a8.m128i_u32[2];
v13 = a8.m128i_u32[3];
if ( a8.m128i_i32[3] <= 0 )
v13 = 0LL;
v14 = ImageColors + 3;
v15 = 0x10000;
v16 = 0;
v17 = 0;
v18 = 0x10000;
while ( v11 != v13 )
{
for ( i = 0LL; v12 != i; ++i )
{
if ( *(_BYTE *)(v14 + 4 * i) > (unsigned __int8)(int)(float)(a7 * 255.0) )
{
if ( (int)i < v18 )
v18 = i;
if ( (int)i > v17 )
v17 = i;
if ( (int)v11 < v15 )
v15 = v11;
if ( (int)v11 > v16 )
v16 = v11;
}
}
++v11;
v14 += 4LL * a8.m128i_i32[2];
}
v20 = 0LL;
if ( v18 != 0x10000 && v17 != 0x10000 )
{
v20.m128_f32[0] = (float)v18;
v10.m128_f32[0] = (float)v15;
v20.m128_u64[0] = _mm_unpacklo_ps(v20, v10).m128_u64[0];
}
free(ImageColors);
return *(double *)v20.m128_u64;
}
|
GetImageAlphaBorder:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x40
MOVSS dword ptr [RSP + 0x20],XMM0
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x10],RAX
MOVAPS XMM0,xmmword ptr [RSP + 0x60]
MOVUPS xmmword ptr [RSP],XMM0
CALL 0x0017e527
TEST RAX,RAX
JZ 0x001823ee
LEA RCX,[RSP + 0x60]
MOVSS XMM0,dword ptr [RSP + 0x20]
MULSS XMM0,dword ptr [0x001b9718]
MOVSXD RSI,dword ptr [RCX + 0x8]
CVTTSS2SI EDI,XMM0
XOR R9D,R9D
TEST ESI,ESI
MOV R10D,0x0
CMOVG R10D,ESI
MOV EBX,dword ptr [RCX + 0xc]
TEST EBX,EBX
CMOVLE EBX,R9D
MOV R14,RAX
ADD R14,0x3
SHL RSI,0x2
MOV ECX,0x10000
XOR EDX,EDX
XOR R8D,R8D
MOV R11D,0x10000
LAB_0018235a:
CMP R9,RBX
JZ 0x00182396
XOR R15D,R15D
LAB_00182362:
CMP R10,R15
JZ 0x0018238e
CMP byte ptr [R14 + R15*0x4],DIL
JBE 0x00182389
CMP R15D,R11D
CMOVL R11D,R15D
CMP R15D,R8D
CMOVG R8D,R15D
CMP R9D,ECX
CMOVL ECX,R9D
CMP R9D,EDX
CMOVG EDX,R9D
LAB_00182389:
INC R15
JMP 0x00182362
LAB_0018238e:
INC R9
ADD R14,RSI
JMP 0x0018235a
LAB_00182396:
XORPS XMM1,XMM1
XORPS XMM2,XMM2
CMP R11D,0x10000
JZ 0x001823d0
CMP R8D,0x10000
JZ 0x001823d0
CVTSI2SS XMM1,R11D
CVTSI2SS XMM0,ECX
SUB R8D,R11D
INC R8D
CVTSI2SS XMM2,R8D
UNPCKLPS XMM1,XMM0
SUB EDX,ECX
INC EDX
CVTSI2SS XMM0,EDX
UNPCKLPS XMM2,XMM0
LAB_001823d0:
MOVAPS xmmword ptr [RSP + 0x30],XMM2
MOVAPS xmmword ptr [RSP + 0x20],XMM1
MOV RDI,RAX
CALL 0x00109640
MOVAPS XMM1,xmmword ptr [RSP + 0x30]
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
JMP 0x001823f4
LAB_001823ee:
XORPS XMM0,XMM0
XORPS XMM1,XMM1
LAB_001823f4:
ADD RSP,0x40
POP RBX
POP R14
POP R15
RET
|
int8 GetImageAlphaBorder(float param_1)
{
void *__ptr;
int iVar1;
int iVar2;
ulong uVar3;
int iVar4;
int iVar5;
ulong uVar6;
ulong uVar7;
int iVar8;
long lVar9;
ulong uVar10;
float fVar11;
float fVar12;
int iStack0000000000000010;
uint uStack0000000000000014;
__ptr = (void *)LoadImageColors();
if (__ptr == (void *)0x0) {
fVar11 = 0.0;
fVar12 = 0.0;
}
else {
uVar6 = 0;
uVar7 = 0;
if (0 < iStack0000000000000010) {
uVar7 = _iStack0000000000000010 & 0xffffffff;
}
uVar3 = (ulong)uStack0000000000000014;
if ((int)uStack0000000000000014 < 1) {
uVar3 = uVar6;
}
lVar9 = (long)__ptr + 3;
iVar1 = 0x10000;
iVar2 = 0;
iVar4 = 0;
iVar8 = 0x10000;
for (; uVar6 != uVar3; uVar6 = uVar6 + 1) {
for (uVar10 = 0; uVar7 != uVar10; uVar10 = uVar10 + 1) {
if ((byte)(int)(param_1 * DAT_001b9718) < *(byte *)(lVar9 + uVar10 * 4)) {
iVar5 = (int)uVar10;
if (iVar5 < iVar8) {
iVar8 = iVar5;
}
if (iVar4 < iVar5) {
iVar4 = iVar5;
}
iVar5 = (int)uVar6;
if (iVar5 < iVar1) {
iVar1 = iVar5;
}
if (iVar2 < iVar5) {
iVar2 = iVar5;
}
}
}
lVar9 = lVar9 + (long)iStack0000000000000010 * 4;
}
fVar11 = 0.0;
fVar12 = 0.0;
if ((iVar8 != 0x10000) && (iVar4 != 0x10000)) {
fVar11 = (float)iVar8;
fVar12 = (float)iVar1;
}
free(__ptr);
}
return CONCAT44(fVar12,fVar11);
}
|
|
61,047
|
GetImageAlphaBorder
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c
|
Rectangle GetImageAlphaBorder(Image image, float threshold)
{
Rectangle crop = { 0 };
Color *pixels = LoadImageColors(image);
if (pixels != NULL)
{
int xMin = 65536; // Define a big enough number
int xMax = 0;
int yMin = 65536;
int yMax = 0;
for (int y = 0; y < image.height; y++)
{
for (int x = 0; x < image.width; x++)
{
if (pixels[y*image.width + x].a > (unsigned char)(threshold*255.0f))
{
if (x < xMin) xMin = x;
if (x > xMax) xMax = x;
if (y < yMin) yMin = y;
if (y > yMax) yMax = y;
}
}
}
// Check for empty blank image
if ((xMin != 65536) && (xMax != 65536))
{
crop = (Rectangle){ (float)xMin, (float)yMin, (float)((xMax + 1) - xMin), (float)((yMax + 1) - yMin) };
}
UnloadImageColors(pixels);
}
return crop;
}
|
O3
|
c
|
GetImageAlphaBorder:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movss %xmm0, 0x20(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x60(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x92846
testq %rax, %rax
je 0x96acc
leaq 0x60(%rsp), %rcx
movslq 0xc(%rcx), %rdi
xorps %xmm1, %xmm1
testq %rdi, %rdi
jle 0x96ad4
movl 0x8(%rcx), %r9d
movss 0x20(%rsp), %xmm0
mulss 0x3d174(%rip), %xmm0 # 0xd3b94
cvttss2si %xmm0, %r10d
movq %rax, %r11
addq $0x3, %r11
leaq (,%r9,4), %rbx
xorl %r14d, %r14d
movl $0x10000, %edx # imm = 0x10000
xorl %r8d, %r8d
xorl %ecx, %ecx
movl $0x10000, %esi # imm = 0x10000
testl %r9d, %r9d
jle 0x96a78
xorl %r15d, %r15d
cmpb %r10b, (%r11,%r15,4)
jbe 0x96a70
cmpl %edx, %r15d
cmovll %r15d, %edx
cmpl %r8d, %r15d
cmovgl %r15d, %r8d
cmpl %esi, %r14d
cmovll %r14d, %esi
cmpl %ecx, %r14d
cmovgl %r14d, %ecx
incq %r15
cmpq %r15, %r9
jne 0x96a4e
incq %r14
addq %rbx, %r11
cmpq %rdi, %r14
jne 0x96a46
movl $0x10000, %edi # imm = 0x10000
cmpl %edi, %edx
setne %r9b
cmpl %edi, %r8d
setne %dil
xorps %xmm2, %xmm2
testb %dil, %r9b
je 0x96ad7
xorps %xmm1, %xmm1
cvtsi2ss %edx, %xmm1
xorps %xmm0, %xmm0
cvtsi2ss %esi, %xmm0
subl %edx, %r8d
incl %r8d
xorps %xmm2, %xmm2
cvtsi2ss %r8d, %xmm2
unpcklps %xmm0, %xmm1 # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
subl %esi, %ecx
incl %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
unpcklps %xmm0, %xmm2 # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
jmp 0x96ad7
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
jmp 0x96af3
xorps %xmm2, %xmm2
movaps %xmm2, 0x30(%rsp)
movaps %xmm1, 0x20(%rsp)
movq %rax, %rdi
callq 0xa650
movaps 0x30(%rsp), %xmm1
movaps 0x20(%rsp), %xmm0
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
GetImageAlphaBorder:
push r15
push r14
push rbx
sub rsp, 40h
movss dword ptr [rsp+58h+var_38], xmm0
mov rax, [rsp+58h+arg_10]
mov [rsp+58h+var_48], rax
movaps xmm0, [rsp+58h+arg_0]
movups [rsp+58h+var_58], xmm0
call LoadImageColors
test rax, rax
jz loc_96ACC
lea rcx, [rsp+58h+arg_0]
movsxd rdi, dword ptr [rcx+0Ch]
xorps xmm1, xmm1
test rdi, rdi
jle loc_96AD4
mov r9d, [rcx+8]
movss xmm0, dword ptr [rsp+58h+var_38]
mulss xmm0, cs:dword_D3B94
cvttss2si r10d, xmm0
mov r11, rax
add r11, 3
lea rbx, ds:0[r9*4]
xor r14d, r14d
mov edx, 10000h
xor r8d, r8d
xor ecx, ecx
mov esi, 10000h
loc_96A46:
test r9d, r9d
jle short loc_96A78
xor r15d, r15d
loc_96A4E:
cmp [r11+r15*4], r10b
jbe short loc_96A70
cmp r15d, edx
cmovl edx, r15d
cmp r15d, r8d
cmovg r8d, r15d
cmp r14d, esi
cmovl esi, r14d
cmp r14d, ecx
cmovg ecx, r14d
loc_96A70:
inc r15
cmp r9, r15
jnz short loc_96A4E
loc_96A78:
inc r14
add r11, rbx
cmp r14, rdi
jnz short loc_96A46
mov edi, 10000h
cmp edx, edi
setnz r9b
cmp r8d, edi
setnz dil
xorps xmm2, xmm2
test r9b, dil
jz short loc_96AD7
xorps xmm1, xmm1
cvtsi2ss xmm1, edx
xorps xmm0, xmm0
cvtsi2ss xmm0, esi
sub r8d, edx
inc r8d
xorps xmm2, xmm2
cvtsi2ss xmm2, r8d
unpcklps xmm1, xmm0
sub ecx, esi
inc ecx
xorps xmm0, xmm0
cvtsi2ss xmm0, ecx
unpcklps xmm2, xmm0
jmp short loc_96AD7
loc_96ACC:
xorps xmm0, xmm0
xorps xmm1, xmm1
jmp short loc_96AF3
loc_96AD4:
xorps xmm2, xmm2
loc_96AD7:
movaps [rsp+58h+var_28], xmm2
movaps [rsp+58h+var_38], xmm1
mov rdi, rax
call _free
movaps xmm1, [rsp+58h+var_28]
movaps xmm0, [rsp+58h+var_38]
loc_96AF3:
add rsp, 40h
pop rbx
pop r14
pop r15
retn
|
__m128 GetImageAlphaBorder(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
float a7,
__m128i a8,
long long a9)
{
long long ImageColors; // rax
__m128 v10; // xmm1
long long v11; // r11
long long v12; // r14
int v13; // edx
int v14; // r8d
int v15; // ecx
int v16; // esi
long long v17; // r15
__m128 v18; // xmm1
__m128 v19; // xmm0
ImageColors = LoadImageColors(a8, a1, a2, a3, a4, a5, a6, a8.m128i_i64[0], a8.m128i_i64[1], a9);
if ( ImageColors )
{
v10 = 0LL;
if ( a8.m128i_i32[3] > 0LL )
{
v11 = ImageColors + 3;
v12 = 0LL;
v13 = 0x10000;
v14 = 0;
v15 = 0;
v16 = 0x10000;
do
{
if ( a8.m128i_i32[2] > 0 )
{
v17 = 0LL;
do
{
if ( *(_BYTE *)(v11 + 4 * v17) > (unsigned __int8)(int)(float)(a7 * 255.0) )
{
if ( (int)v17 < v13 )
v13 = v17;
if ( (int)v17 > v14 )
v14 = v17;
if ( (int)v12 < v16 )
v16 = v12;
if ( (int)v12 > v15 )
v15 = v12;
}
++v17;
}
while ( a8.m128i_u32[2] != v17 );
}
++v12;
v11 += 4LL * a8.m128i_u32[2];
}
while ( v12 != a8.m128i_i32[3] );
if ( v14 != 0x10000 && v13 != 0x10000 )
{
v18 = 0LL;
v18.m128_f32[0] = (float)v13;
v19 = 0LL;
v19.m128_f32[0] = (float)v16;
v10 = _mm_unpacklo_ps(v18, v19);
}
}
free(ImageColors);
return v10;
}
else
{
return (__m128)0LL;
}
}
|
GetImageAlphaBorder:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x40
MOVSS dword ptr [RSP + 0x20],XMM0
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x10],RAX
MOVAPS XMM0,xmmword ptr [RSP + 0x60]
MOVUPS xmmword ptr [RSP],XMM0
CALL 0x00192846
TEST RAX,RAX
JZ 0x00196acc
LEA RCX,[RSP + 0x60]
MOVSXD RDI,dword ptr [RCX + 0xc]
XORPS XMM1,XMM1
TEST RDI,RDI
JLE 0x00196ad4
MOV R9D,dword ptr [RCX + 0x8]
MOVSS XMM0,dword ptr [RSP + 0x20]
MULSS XMM0,dword ptr [0x001d3b94]
CVTTSS2SI R10D,XMM0
MOV R11,RAX
ADD R11,0x3
LEA RBX,[R9*0x4]
XOR R14D,R14D
MOV EDX,0x10000
XOR R8D,R8D
XOR ECX,ECX
MOV ESI,0x10000
LAB_00196a46:
TEST R9D,R9D
JLE 0x00196a78
XOR R15D,R15D
LAB_00196a4e:
CMP byte ptr [R11 + R15*0x4],R10B
JBE 0x00196a70
CMP R15D,EDX
CMOVL EDX,R15D
CMP R15D,R8D
CMOVG R8D,R15D
CMP R14D,ESI
CMOVL ESI,R14D
CMP R14D,ECX
CMOVG ECX,R14D
LAB_00196a70:
INC R15
CMP R9,R15
JNZ 0x00196a4e
LAB_00196a78:
INC R14
ADD R11,RBX
CMP R14,RDI
JNZ 0x00196a46
MOV EDI,0x10000
CMP EDX,EDI
SETNZ R9B
CMP R8D,EDI
SETNZ DIL
XORPS XMM2,XMM2
TEST R9B,DIL
JZ 0x00196ad7
XORPS XMM1,XMM1
CVTSI2SS XMM1,EDX
XORPS XMM0,XMM0
CVTSI2SS XMM0,ESI
SUB R8D,EDX
INC R8D
XORPS XMM2,XMM2
CVTSI2SS XMM2,R8D
UNPCKLPS XMM1,XMM0
SUB ECX,ESI
INC ECX
XORPS XMM0,XMM0
CVTSI2SS XMM0,ECX
UNPCKLPS XMM2,XMM0
JMP 0x00196ad7
LAB_00196acc:
XORPS XMM0,XMM0
XORPS XMM1,XMM1
JMP 0x00196af3
LAB_00196ad4:
XORPS XMM2,XMM2
LAB_00196ad7:
MOVAPS xmmword ptr [RSP + 0x30],XMM2
MOVAPS xmmword ptr [RSP + 0x20],XMM1
MOV RDI,RAX
CALL 0x0010a650
MOVAPS XMM1,xmmword ptr [RSP + 0x30]
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
LAB_00196af3:
ADD RSP,0x40
POP RBX
POP R14
POP R15
RET
|
int8 GetImageAlphaBorder(float param_1)
{
void *__ptr;
int iVar1;
int iVar2;
int iVar3;
int iVar4;
long lVar5;
int iVar6;
long lVar7;
ulong uVar8;
float fVar9;
float fVar10;
int iStack0000000000000010;
int iStack0000000000000014;
__ptr = (void *)LoadImageColors();
if (__ptr == (void *)0x0) {
fVar9 = 0.0;
fVar10 = 0.0;
}
else {
fVar9 = 0.0;
fVar10 = 0.0;
if (0 < (long)iStack0000000000000014) {
lVar5 = (long)__ptr + 3;
lVar7 = 0;
iVar2 = 0x10000;
iVar4 = 0;
iVar1 = 0;
iVar3 = 0x10000;
do {
if (0 < iStack0000000000000010) {
uVar8 = 0;
do {
if ((byte)(int)(param_1 * DAT_001d3b94) < *(byte *)(lVar5 + uVar8 * 4)) {
iVar6 = (int)uVar8;
if (iVar6 < iVar2) {
iVar2 = iVar6;
}
if (iVar4 < iVar6) {
iVar4 = iVar6;
}
iVar6 = (int)lVar7;
if (iVar6 < iVar3) {
iVar3 = iVar6;
}
if (iVar1 < iVar6) {
iVar1 = iVar6;
}
}
uVar8 = uVar8 + 1;
} while ((_iStack0000000000000010 & 0xffffffff) != uVar8);
}
lVar7 = lVar7 + 1;
lVar5 = lVar5 + (_iStack0000000000000010 & 0xffffffff) * 4;
} while (lVar7 != iStack0000000000000014);
if (iVar2 != 0x10000 && iVar4 != 0x10000) {
fVar9 = (float)iVar2;
fVar10 = (float)iVar3;
}
}
free(__ptr);
}
return CONCAT44(fVar10,fVar9);
}
|
|
61,048
|
ma_sync_table_files
|
eloqsql/storage/maria/ma_extra.c
|
int _ma_sync_table_files(const MARIA_HA *info)
{
return (mysql_file_sync(info->dfile.file, MYF(MY_WME)) ||
mysql_file_sync(info->s->kfile.file, MYF(MY_WME)));
}
|
O3
|
c
|
ma_sync_table_files:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
movl 0x480(%rdi), %r14d
leaq 0x357d76(%rip), %r12 # 0x390b18
movq (%r12), %rax
leaq -0x70(%rbp), %rdi
movl %r14d, %esi
movl $0x10, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x38e1a
movl $0x10, %esi
movl %r14d, %edi
callq 0xa8844
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0x38e0d
movq (%rbx), %rax
movl 0x760(%rax), %ebx
movq (%r12), %rax
leaq -0x70(%rbp), %rdi
movl %ebx, %esi
movl $0x10, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x38e31
movl $0x10, %esi
movl %ebx, %edi
callq 0xa8844
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq -0x24(%rbp), %r15
movq %rax, %rdi
movl %r14d, %esi
movq %r15, %rdx
callq 0x2ae2f
movl (%r15), %ecx
jmp 0x38dcc
leaq -0x24(%rbp), %r14
movq %rax, %rdi
movl %ebx, %esi
movq %r14, %rdx
callq 0x2ae88
movl (%r14), %ecx
jmp 0x38e06
|
_ma_sync_table_files:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 50h
mov rbx, rdi
mov r14d, [rdi+480h]
lea r12, PSI_server
mov rax, [r12]
lea rdi, [rbp+var_70]
mov esi, r14d
mov edx, 10h
call qword ptr [rax+158h]
test rax, rax
jnz short loc_38E1A
mov esi, 10h
mov edi, r14d
call my_sync
mov ecx, eax
loc_38DCC:
mov eax, 1
test ecx, ecx
jnz short loc_38E0D
mov rax, [rbx]
mov ebx, [rax+760h]
mov rax, [r12]
lea rdi, [rbp+var_70]
mov esi, ebx
mov edx, 10h
call qword ptr [rax+158h]
test rax, rax
jnz short loc_38E31
mov esi, 10h
mov edi, ebx
call my_sync
mov ecx, eax
loc_38E06:
xor eax, eax
test ecx, ecx
setnz al
loc_38E0D:
add rsp, 50h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_38E1A:
lea r15, [rbp+var_24]
mov rdi, rax
mov esi, r14d
mov rdx, r15
call _ma_sync_table_files_cold_1
mov ecx, [r15]
jmp short loc_38DCC
loc_38E31:
lea r14, [rbp+var_24]
mov rdi, rax
mov esi, ebx
mov rdx, r14
call _ma_sync_table_files_cold_2
mov ecx, [r14]
jmp short loc_38E06
|
_BOOL8 ma_sync_table_files(_DWORD *a1)
{
unsigned int v1; // r14d
long long v2; // rax
int v3; // ecx
_BOOL8 result; // rax
unsigned int v5; // ebx
long long v6; // rax
int v7; // ecx
_BYTE v8[76]; // [rsp+0h] [rbp-70h] BYREF
_DWORD v9[9]; // [rsp+4Ch] [rbp-24h] BYREF
v1 = a1[288];
v2 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v8, v1, 16LL);
if ( v2 )
{
ma_sync_table_files_cold_1(v2, v1, v9);
v3 = v9[0];
}
else
{
v3 = my_sync(v1, 16LL);
}
result = 1LL;
if ( !v3 )
{
v5 = *(_DWORD *)(*(_QWORD *)a1 + 1888LL);
v6 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v8, v5, 16LL);
if ( v6 )
{
ma_sync_table_files_cold_2(v6, v5, v9);
v7 = v9[0];
}
else
{
v7 = my_sync(v5, 16LL);
}
return v7 != 0;
}
return result;
}
|
_ma_sync_table_files:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x50
MOV RBX,RDI
MOV R14D,dword ptr [RDI + 0x480]
LEA R12,[0x490b18]
MOV RAX,qword ptr [R12]
LEA RDI,[RBP + -0x70]
MOV ESI,R14D
MOV EDX,0x10
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00138e1a
MOV ESI,0x10
MOV EDI,R14D
CALL 0x001a8844
MOV ECX,EAX
LAB_00138dcc:
MOV EAX,0x1
TEST ECX,ECX
JNZ 0x00138e0d
MOV RAX,qword ptr [RBX]
MOV EBX,dword ptr [RAX + 0x760]
MOV RAX,qword ptr [R12]
LEA RDI,[RBP + -0x70]
MOV ESI,EBX
MOV EDX,0x10
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00138e31
MOV ESI,0x10
MOV EDI,EBX
CALL 0x001a8844
MOV ECX,EAX
LAB_00138e06:
XOR EAX,EAX
TEST ECX,ECX
SETNZ AL
LAB_00138e0d:
ADD RSP,0x50
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00138e1a:
LEA R15,[RBP + -0x24]
MOV RDI,RAX
MOV ESI,R14D
MOV RDX,R15
CALL 0x0012ae2f
MOV ECX,dword ptr [R15]
JMP 0x00138dcc
LAB_00138e31:
LEA R14,[RBP + -0x24]
MOV RDI,RAX
MOV ESI,EBX
MOV RDX,R14
CALL 0x0012ae88
MOV ECX,dword ptr [R14]
JMP 0x00138e06
|
bool _ma_sync_table_files(long *param_1)
{
int4 uVar1;
int iVar2;
long lVar3;
bool bVar4;
int1 local_78 [76];
int local_2c;
uVar1 = (int4)param_1[0x90];
lVar3 = (**(code **)(PSI_server + 0x158))(local_78,uVar1,0x10);
if (lVar3 == 0) {
iVar2 = my_sync(uVar1,0x10);
}
else {
_ma_sync_table_files_cold_1(lVar3,uVar1,&local_2c);
iVar2 = local_2c;
}
bVar4 = true;
if (iVar2 == 0) {
uVar1 = *(int4 *)(*param_1 + 0x760);
lVar3 = (**(code **)(PSI_server + 0x158))(local_78,uVar1,0x10);
if (lVar3 == 0) {
local_2c = my_sync(uVar1,0x10);
}
else {
_ma_sync_table_files_cold_2(lVar3,uVar1,&local_2c);
}
bVar4 = local_2c != 0;
}
return bVar4;
}
|
|
61,049
|
mysql_real_connect_start_internal
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
static void
mysql_real_connect_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_real_connect,
(parms->mysql, parms->host, parms->user, parms->passwd, parms->db,
parms->port, parms->unix_socket, parms->client_flags),
parms->mysql,
MYSQL *,
r_ptr)
}
|
O3
|
c
|
mysql_real_connect_start_internal:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movq (%rdi), %rax
movq 0x8(%rdi), %rsi
movq 0x480(%rax), %rcx
movq 0x28(%rcx), %rbx
movq 0x10(%rdi), %rdx
movq 0x18(%rdi), %rcx
movq 0x20(%rdi), %r8
movl 0x28(%rdi), %r9d
movups 0x30(%rdi), %xmm0
movups %xmm0, (%rsp)
movq %rax, %rdi
callq 0x1bf36
movq %rax, 0x8(%rbx)
movl $0x0, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
|
mysql_real_connect_start_internal:
push rbp
mov rbp, rsp
push rbx
sub rsp, 18h
mov rax, [rdi]
mov rsi, [rdi+8]
mov rcx, [rax+480h]
mov rbx, [rcx+28h]
mov rdx, [rdi+10h]
mov rcx, [rdi+18h]
mov r8, [rdi+20h]
mov r9d, [rdi+28h]
movups xmm0, xmmword ptr [rdi+30h]
movups [rsp+20h+var_20], xmm0
mov rdi, rax
call mysql_real_connect
mov [rbx+8], rax
mov dword ptr [rbx], 0
add rsp, 18h
pop rbx
pop rbp
retn
|
long long mysql_real_connect_start_internal(
__m128 *a1,
double a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9)
{
long long v9; // rbx
long long result; // rax
v9 = *(_QWORD *)(*(_QWORD *)(a1->m128_u64[0] + 1152) + 40LL);
result = mysql_real_connect(
a1->m128_u64[0],
a1->m128_i64[1],
a1[1].m128_i64[0],
a1[1].m128_i64[1],
a1[2].m128_i64[0],
a1[2].m128_u32[2],
a1[3],
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a1[3].m128_i64[0],
a1[3].m128_i64[1]);
*(_QWORD *)(v9 + 8) = result;
*(_DWORD *)v9 = 0;
return result;
}
|
mysql_real_connect_start_internal:
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x18
MOV RAX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RAX + 0x480]
MOV RBX,qword ptr [RCX + 0x28]
MOV RDX,qword ptr [RDI + 0x10]
MOV RCX,qword ptr [RDI + 0x18]
MOV R8,qword ptr [RDI + 0x20]
MOV R9D,dword ptr [RDI + 0x28]
MOVUPS XMM0,xmmword ptr [RDI + 0x30]
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,RAX
CALL 0x0011bf36
MOV qword ptr [RBX + 0x8],RAX
MOV dword ptr [RBX],0x0
ADD RSP,0x18
POP RBX
POP RBP
RET
|
void mysql_real_connect_start_internal(long *param_1)
{
int4 *puVar1;
int8 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_real_connect(*param_1,param_1[1],param_1[2],param_1[3],param_1[4],(int)param_1[5],
(int)param_1[6],(int)param_1[7]);
*(int8 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
|
|
61,050
|
ggml_easy::ctx::ctx(ggml_easy::ctx_params const&)
|
ngxson[P]ggml-easy/ggml-easy.h
|
ctx(const ctx_params & params) : log_level(params.log_level), max_nodes(params.max_nodes) {
ggml_log_set(log_cb, &log_level);
backend_cpu = ggml_backend_init_by_type(GGML_BACKEND_DEVICE_TYPE_CPU, nullptr);
backend = params.use_gpu
? ggml_backend_init_by_type(GGML_BACKEND_DEVICE_TYPE_GPU, nullptr)
: nullptr;
if (backend) {
log(GGML_LOG_LEVEL_INFO, "%s: using %s backend\n", __func__, ggml_backend_name(backend));
backend_ptrs.push_back(backend);
backend_buft.push_back(ggml_backend_get_default_buffer_type(backend));
} else {
backend = backend_cpu;
log(GGML_LOG_LEVEL_INFO, "%s: using CPU backend\n", __func__);
}
backend_ptrs.push_back(backend_cpu);
backend_buft.push_back(ggml_backend_get_default_buffer_type(backend_cpu));
sched.reset(
ggml_backend_sched_new(backend_ptrs.data(), backend_buft.data(), backend_ptrs.size(), max_nodes, false)
);
buf_compute_meta.resize(max_nodes * ggml_tensor_overhead() + ggml_graph_overhead());
}
|
O1
|
c
|
ggml_easy::ctx::ctx(ggml_easy::ctx_params const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movl 0x8(%rsi), %eax
movl %eax, (%rdi)
leaq 0x38(%rdi), %rax
movq %rax, 0x8(%rdi)
movq $0x1, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
movl $0x3f800000, 0x28(%rdi) # imm = 0x3F800000
leaq 0x50(%rdi), %r14
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x50(%rdi)
movq $0x0, 0x60(%rdi)
movl 0x4(%rsi), %eax
movl %eax, 0x68(%rdi)
leaq 0x70(%rdi), %rax
movq %rax, 0x8(%rsp)
leaq 0x88(%rdi), %r12
leaq 0xb8(%rdi), %r13
movups %xmm0, 0x70(%rdi)
movups %xmm0, 0x80(%rdi)
movups %xmm0, 0x90(%rdi)
movups %xmm0, 0xa0(%rdi)
movups %xmm0, 0xb0(%rdi)
movups %xmm0, 0xc0(%rdi)
movups %xmm0, 0xd0(%rdi)
movups %xmm0, 0xe0(%rdi)
leaq -0x27ea(%rip), %rdi # 0x4aac
movq %rbx, %rsi
callq 0x4710
xorl %edi, %edi
xorl %esi, %esi
callq 0x4410
leaq 0xa8(%rbx), %rbp
movq %rax, (%rbp)
cmpb $0x1, (%r15)
jne 0x72c9
movl $0x1, %edi
xorl %esi, %esi
callq 0x4410
movq %rax, %rdi
jmp 0x72cb
xorl %edi, %edi
leaq 0xa0(%rbx), %r15
movq %rdi, (%r15)
testq %rdi, %rdi
je 0x731d
callq 0x4610
leaq 0x505c(%rip), %rdx # 0xc342
leaq 0x506b(%rip), %rcx # 0xc358
movq %rbx, %rdi
movl $0x2, %esi
movq %rax, %r8
xorl %eax, %eax
callq 0x8bdc
movq 0x78(%rbx), %rsi
cmpq 0x80(%rbx), %rsi
je 0x734a
movq 0xa0(%rbx), %rax
movq %rax, (%rsi)
addq $0x8, 0x78(%rbx)
jmp 0x7357
movq 0xa8(%rbx), %rax
movq %rax, 0xa0(%rbx)
leaq 0x502a(%rip), %rdx # 0xc35c
leaq 0x501f(%rip), %rcx # 0xc358
movq %rbx, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x8bdc
jmp 0x736f
movq 0x8(%rsp), %rdi
movq %r15, %rdx
callq 0x8d7c
movq (%r15), %rdi
callq 0x4760
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
movq %r12, %rdi
callq 0x8eb8
movq 0x78(%rbx), %rsi
cmpq 0x80(%rbx), %rsi
je 0x738d
movq 0xa8(%rbx), %rax
movq %rax, (%rsi)
addq $0x8, 0x78(%rbx)
jmp 0x739a
movq 0x8(%rsp), %rdi
movq %rbp, %rdx
callq 0x8d7c
movq (%rbp), %rdi
callq 0x4760
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
movq %r12, %rdi
callq 0x8eb8
movq 0x88(%rbx), %rsi
movq 0x70(%rbx), %rdi
movq 0x78(%rbx), %rdx
subq %rdi, %rdx
shrq $0x3, %rdx
movslq 0x68(%rbx), %rcx
xorl %r8d, %r8d
callq 0x47c0
movq %r13, %rdi
movq %rax, %rsi
callq 0x9024
movslq 0x68(%rbx), %rbp
callq 0x46b0
movq %rax, %r15
callq 0x4200
imulq %rbp, %r15
addq %r15, %rax
movq %r14, %rdi
movq %rax, %rsi
callq 0x8c5c
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7416
jmp 0x7416
movq %rax, %rbp
leaq 0xc0(%rbx), %r15
movq 0xd8(%rbx), %rdi
testq %rdi, %rdi
je 0x743b
movq 0xe8(%rbx), %rsi
subq %rdi, %rsi
callq 0x4460
movq %r15, %rdi
callq 0x8c88
movq %r13, %rdi
callq 0x8cb8
movq (%r12), %rdi
testq %rdi, %rdi
je 0x7463
movq 0x98(%rbx), %rsi
subq %rdi, %rsi
callq 0x4460
movq 0x8(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x747f
movq 0x80(%rbx), %rsi
subq %rdi, %rsi
callq 0x4460
leaq 0x8(%rbx), %r15
movq (%r14), %rdi
testq %rdi, %rdi
je 0x7497
movq 0x60(%rbx), %rsi
subq %rdi, %rsi
callq 0x4460
movq %r15, %rdi
callq 0x91ca
movq %rbp, %rdi
callq 0x4730
nop
|
_ZN9ggml_easy3ctxC2ERKNS_10ctx_paramsE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15, rsi
mov rbx, rdi
mov eax, [rsi+8]
mov [rdi], eax
lea rax, [rdi+38h]
mov [rdi+8], rax
mov qword ptr [rdi+10h], 1
xorps xmm0, xmm0
movups xmmword ptr [rdi+18h], xmm0
mov dword ptr [rdi+28h], 3F800000h
lea r14, [rdi+50h]
movups xmmword ptr [rdi+30h], xmm0
movups xmmword ptr [rdi+40h], xmm0
movups xmmword ptr [rdi+50h], xmm0
mov qword ptr [rdi+60h], 0
mov eax, [rsi+4]
mov [rdi+68h], eax
lea rax, [rdi+70h]
mov [rsp+48h+var_40], rax
lea r12, [rdi+88h]
lea r13, [rdi+0B8h]
movups xmmword ptr [rdi+70h], xmm0
movups xmmword ptr [rdi+80h], xmm0
movups xmmword ptr [rdi+90h], xmm0
movups xmmword ptr [rdi+0A0h], xmm0
movups xmmword ptr [rdi+0B0h], xmm0
movups xmmword ptr [rdi+0C0h], xmm0
movups xmmword ptr [rdi+0D0h], xmm0
movups xmmword ptr [rdi+0E0h], xmm0
lea rdi, _ZN9ggml_easy6log_cbE14ggml_log_levelPKcPv; ggml_easy::log_cb(ggml_log_level,char const*,void *)
mov rsi, rbx
call _ggml_log_set
xor edi, edi
xor esi, esi
call _ggml_backend_init_by_type
lea rbp, [rbx+0A8h]
mov [rbp+0], rax
cmp byte ptr [r15], 1
jnz short loc_72C9
mov edi, 1
xor esi, esi
call _ggml_backend_init_by_type
mov rdi, rax
jmp short loc_72CB
loc_72C9:
xor edi, edi
loc_72CB:
lea r15, [rbx+0A0h]
mov [r15], rdi
test rdi, rdi
jz short loc_731D
call _ggml_backend_name
lea rdx, aSUsingSBackend; "%s: using %s backend\n"
lea rcx, aCtx; "ctx"
mov rdi, rbx
mov esi, 2
mov r8, rax
xor eax, eax
call _ZN9ggml_easy3ctx3logE14ggml_log_levelPKcz; ggml_easy::ctx::log(ggml_log_level,char const*,...)
mov rsi, [rbx+78h]
cmp rsi, [rbx+80h]
jz short loc_734A
mov rax, [rbx+0A0h]
mov [rsi], rax
add qword ptr [rbx+78h], 8
jmp short loc_7357
loc_731D:
mov rax, [rbx+0A8h]
mov [rbx+0A0h], rax
lea rdx, aSUsingCpuBacke; "%s: using CPU backend\n"
lea rcx, aCtx; "ctx"
mov rdi, rbx
mov esi, 2
xor eax, eax
call _ZN9ggml_easy3ctx3logE14ggml_log_levelPKcz; ggml_easy::ctx::log(ggml_log_level,char const*,...)
jmp short loc_736F
loc_734A:
mov rdi, [rsp+48h+var_40]
mov rdx, r15
call _ZNSt6vectorIP12ggml_backendSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_; std::vector<ggml_backend *>::_M_realloc_insert<ggml_backend * const&>(__gnu_cxx::__normal_iterator<ggml_backend **,std::vector<ggml_backend *>>,ggml_backend * const&)
loc_7357:
mov rdi, [r15]
call _ggml_backend_get_default_buffer_type
lea rsi, [rsp+48h+var_38]
mov [rsi], rax
mov rdi, r12
call _ZNSt6vectorIP24ggml_backend_buffer_typeSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<ggml_backend_buffer_type *>::emplace_back<ggml_backend_buffer_type *>(ggml_backend_buffer_type * &&)
loc_736F:
mov rsi, [rbx+78h]
cmp rsi, [rbx+80h]
jz short loc_738D
mov rax, [rbx+0A8h]
mov [rsi], rax
add qword ptr [rbx+78h], 8
jmp short loc_739A
loc_738D:
mov rdi, [rsp+48h+var_40]
mov rdx, rbp
call _ZNSt6vectorIP12ggml_backendSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_; std::vector<ggml_backend *>::_M_realloc_insert<ggml_backend * const&>(__gnu_cxx::__normal_iterator<ggml_backend **,std::vector<ggml_backend *>>,ggml_backend * const&)
loc_739A:
mov rdi, [rbp+0]
call _ggml_backend_get_default_buffer_type
lea rsi, [rsp+48h+var_38]
mov [rsi], rax
mov rdi, r12
call _ZNSt6vectorIP24ggml_backend_buffer_typeSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<ggml_backend_buffer_type *>::emplace_back<ggml_backend_buffer_type *>(ggml_backend_buffer_type * &&)
mov rsi, [rbx+88h]
mov rdi, [rbx+70h]
mov rdx, [rbx+78h]
sub rdx, rdi
shr rdx, 3
movsxd rcx, dword ptr [rbx+68h]
xor r8d, r8d
call _ggml_backend_sched_new
mov rdi, r13
mov rsi, rax
call _ZNSt15__uniq_ptr_implI18ggml_backend_sched26ggml_backend_sched_deleterE5resetEPS0_; std::__uniq_ptr_impl<ggml_backend_sched,ggml_backend_sched_deleter>::reset(ggml_backend_sched*)
movsxd rbp, dword ptr [rbx+68h]
call _ggml_tensor_overhead
mov r15, rax
call _ggml_graph_overhead
imul r15, rbp
add rax, r15
mov rdi, r14
mov rsi, rax
call _ZNSt6vectorIhSaIhEE6resizeEm; std::vector<uchar>::resize(ulong)
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_7416
jmp short $+2
loc_7416:
mov rbp, rax
lea r15, [rbx+0C0h]
mov rdi, [rbx+0D8h]; void *
test rdi, rdi
jz short loc_743B
mov rsi, [rbx+0E8h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_743B:
mov rdi, r15
call _ZNSt6vectorIN9ggml_easy3ctx11loaded_ggufESaIS2_EED2Ev; std::vector<ggml_easy::ctx::loaded_gguf>::~vector()
mov rdi, r13
call _ZNSt10unique_ptrI18ggml_backend_sched26ggml_backend_sched_deleterED2Ev; std::unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter>::~unique_ptr()
mov rdi, [r12]; void *
test rdi, rdi
jz short loc_7463
mov rsi, [rbx+98h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7463:
mov rax, [rsp+arg_0]
mov rdi, [rax]; void *
test rdi, rdi
jz short loc_747F
mov rsi, [rbx+80h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_747F:
lea r15, [rbx+8]
mov rdi, [r14]; void *
test rdi, rdi
jz short loc_7497
mov rsi, [rbx+60h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7497:
mov rdi, r15
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESaISA_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSC_18_Mod_range_hashingENSC_20_Default_ranged_hashENSC_20_Prime_rehash_policyENSC_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,ggml_tensor *>,std::allocator<std::pair<std::string const,ggml_tensor *>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
mov rdi, rbp
call __Unwind_Resume
|
long long ggml_easy::ctx::ctx(long long a1, long long a2)
{
long long v3; // r14
long long v4; // r12
long long v5; // r13
_QWORD *v6; // rbp
int v7; // r8d
int v8; // r9d
long long v9; // rdi
int v10; // eax
int v11; // r9d
_QWORD *v12; // rsi
_QWORD *v13; // rsi
long long v14; // rsi
long long v15; // rbp
long long v16; // r15
long long v17; // rax
long long v19; // [rsp+8h] [rbp-40h]
*(_DWORD *)a1 = *(_DWORD *)(a2 + 8);
*(_QWORD *)(a1 + 8) = a1 + 56;
*(_QWORD *)(a1 + 16) = 1LL;
*(_OWORD *)(a1 + 24) = 0LL;
*(_DWORD *)(a1 + 40) = 1065353216;
v3 = a1 + 80;
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)(a1 + 64) = 0LL;
*(_OWORD *)(a1 + 80) = 0LL;
*(_QWORD *)(a1 + 96) = 0LL;
*(_DWORD *)(a1 + 104) = *(_DWORD *)(a2 + 4);
v19 = a1 + 112;
v4 = a1 + 136;
v5 = a1 + 184;
*(_OWORD *)(a1 + 112) = 0LL;
*(_OWORD *)(a1 + 128) = 0LL;
*(_OWORD *)(a1 + 144) = 0LL;
*(_OWORD *)(a1 + 160) = 0LL;
*(_OWORD *)(a1 + 176) = 0LL;
*(_OWORD *)(a1 + 192) = 0LL;
*(_OWORD *)(a1 + 208) = 0LL;
*(_OWORD *)(a1 + 224) = 0LL;
ggml_log_set(ggml_easy::log_cb, a1);
v6 = (_QWORD *)(a1 + 168);
*(_QWORD *)(a1 + 168) = ggml_backend_init_by_type(0LL, 0LL);
if ( *(_BYTE *)a2 == 1 )
v9 = ggml_backend_init_by_type(1LL, 0LL);
else
v9 = 0LL;
*(_QWORD *)(a1 + 160) = v9;
if ( v9 )
{
v10 = ggml_backend_name();
ggml_easy::ctx::log(a1, 2, (unsigned int)"%s: using %s backend\n", (unsigned int)"ctx", v10, v11);
v12 = *(_QWORD **)(a1 + 120);
if ( v12 == *(_QWORD **)(a1 + 128) )
{
std::vector<ggml_backend *>::_M_realloc_insert<ggml_backend * const&>(v19, v12, a1 + 160);
}
else
{
*v12 = *(_QWORD *)(a1 + 160);
*(_QWORD *)(a1 + 120) += 8LL;
}
ggml_backend_get_default_buffer_type(*(_QWORD *)(a1 + 160));
std::vector<ggml_backend_buffer_type *>::emplace_back<ggml_backend_buffer_type *>(v4);
}
else
{
*(_QWORD *)(a1 + 160) = *(_QWORD *)(a1 + 168);
ggml_easy::ctx::log(a1, 2, (unsigned int)"%s: using CPU backend\n", (unsigned int)"ctx", v7, v8);
}
v13 = *(_QWORD **)(a1 + 120);
if ( v13 == *(_QWORD **)(a1 + 128) )
{
std::vector<ggml_backend *>::_M_realloc_insert<ggml_backend * const&>(v19, v13, a1 + 168);
}
else
{
*v13 = *(_QWORD *)(a1 + 168);
*(_QWORD *)(a1 + 120) += 8LL;
}
ggml_backend_get_default_buffer_type(*v6);
std::vector<ggml_backend_buffer_type *>::emplace_back<ggml_backend_buffer_type *>(v4);
v14 = ggml_backend_sched_new(
*(_QWORD *)(a1 + 112),
*(_QWORD *)(a1 + 136),
(*(_QWORD *)(a1 + 120) - *(_QWORD *)(a1 + 112)) >> 3,
*(int *)(a1 + 104),
0LL);
std::__uniq_ptr_impl<ggml_backend_sched,ggml_backend_sched_deleter>::reset(v5, v14);
v15 = *(int *)(a1 + 104);
v16 = ggml_tensor_overhead();
v17 = ggml_graph_overhead();
return std::vector<unsigned char>::resize(v3, v15 * v16 + v17);
}
|
ctx:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15,RSI
MOV RBX,RDI
MOV EAX,dword ptr [RSI + 0x8]
MOV dword ptr [RDI],EAX
LEA RAX,[RDI + 0x38]
MOV qword ptr [RDI + 0x8],RAX
MOV qword ptr [RDI + 0x10],0x1
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x18],XMM0
MOV dword ptr [RDI + 0x28],0x3f800000
LEA R14,[RDI + 0x50]
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOVUPS xmmword ptr [RDI + 0x40],XMM0
MOVUPS xmmword ptr [RDI + 0x50],XMM0
MOV qword ptr [RDI + 0x60],0x0
MOV EAX,dword ptr [RSI + 0x4]
MOV dword ptr [RDI + 0x68],EAX
LEA RAX,[RDI + 0x70]
MOV qword ptr [RSP + 0x8],RAX
LEA R12,[RDI + 0x88]
LEA R13,[RDI + 0xb8]
MOVUPS xmmword ptr [RDI + 0x70],XMM0
MOVUPS xmmword ptr [RDI + 0x80],XMM0
MOVUPS xmmword ptr [RDI + 0x90],XMM0
MOVUPS xmmword ptr [RDI + 0xa0],XMM0
MOVUPS xmmword ptr [RDI + 0xb0],XMM0
MOVUPS xmmword ptr [RDI + 0xc0],XMM0
MOVUPS xmmword ptr [RDI + 0xd0],XMM0
MOVUPS xmmword ptr [RDI + 0xe0],XMM0
LAB_0010728f:
LEA RDI,[0x104aac]
MOV RSI,RBX
CALL 0x00104710
XOR EDI,EDI
XOR ESI,ESI
CALL 0x00104410
LEA RBP,[RBX + 0xa8]
MOV qword ptr [RBP],RAX
CMP byte ptr [R15],0x1
JNZ 0x001072c9
MOV EDI,0x1
XOR ESI,ESI
CALL 0x00104410
MOV RDI,RAX
JMP 0x001072cb
LAB_001072c9:
XOR EDI,EDI
LAB_001072cb:
LEA R15,[RBX + 0xa0]
MOV qword ptr [R15],RDI
TEST RDI,RDI
JZ 0x0010731d
CALL 0x00104610
LEA RDX,[0x10c342]
LEA RCX,[0x10c358]
MOV RDI,RBX
MOV ESI,0x2
MOV R8,RAX
XOR EAX,EAX
CALL 0x00108bdc
MOV RSI,qword ptr [RBX + 0x78]
CMP RSI,qword ptr [RBX + 0x80]
JZ 0x0010734a
MOV RAX,qword ptr [RBX + 0xa0]
MOV qword ptr [RSI],RAX
ADD qword ptr [RBX + 0x78],0x8
JMP 0x00107357
LAB_0010731d:
MOV RAX,qword ptr [RBX + 0xa8]
MOV qword ptr [RBX + 0xa0],RAX
LEA RDX,[0x10c35c]
LEA RCX,[0x10c358]
MOV RDI,RBX
MOV ESI,0x2
XOR EAX,EAX
CALL 0x00108bdc
JMP 0x0010736f
LAB_0010734a:
MOV RDI,qword ptr [RSP + 0x8]
MOV RDX,R15
CALL 0x00108d7c
LAB_00107357:
MOV RDI,qword ptr [R15]
LAB_0010735a:
CALL 0x00104760
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI],RAX
MOV RDI,R12
CALL 0x00108eb8
LAB_0010736f:
MOV RSI,qword ptr [RBX + 0x78]
CMP RSI,qword ptr [RBX + 0x80]
JZ 0x0010738d
MOV RAX,qword ptr [RBX + 0xa8]
MOV qword ptr [RSI],RAX
ADD qword ptr [RBX + 0x78],0x8
JMP 0x0010739a
LAB_0010738d:
MOV RDI,qword ptr [RSP + 0x8]
MOV RDX,RBP
CALL 0x00108d7c
LAB_0010739a:
MOV RDI,qword ptr [RBP]
LAB_0010739e:
CALL 0x00104760
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI],RAX
MOV RDI,R12
CALL 0x00108eb8
MOV RSI,qword ptr [RBX + 0x88]
MOV RDI,qword ptr [RBX + 0x70]
MOV RDX,qword ptr [RBX + 0x78]
SUB RDX,RDI
SHR RDX,0x3
MOVSXD RCX,dword ptr [RBX + 0x68]
LAB_001073cd:
XOR R8D,R8D
CALL 0x001047c0
MOV RDI,R13
MOV RSI,RAX
CALL 0x00109024
MOVSXD RBP,dword ptr [RBX + 0x68]
CALL 0x001046b0
MOV R15,RAX
CALL 0x00104200
IMUL R15,RBP
ADD RAX,R15
MOV RDI,R14
MOV RSI,RAX
CALL 0x00108c5c
LAB_00107403:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* ggml_easy::ctx::ctx(ggml_easy::ctx_params const&) */
void __thiscall ggml_easy::ctx::ctx(ctx *this,ctx_params *param_1)
{
ctx *pcVar1;
ctx *pcVar2;
int iVar3;
int8 *puVar4;
int8 uVar5;
long lVar6;
ggml_backend_sched *pgVar7;
long lVar8;
ggml_backend_buffer_type *local_38;
*(int4 *)this = *(int4 *)(param_1 + 8);
*(ctx **)(this + 8) = this + 0x38;
*(int8 *)(this + 0x10) = 1;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int4 *)(this + 0x28) = 0x3f800000;
*(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;
*(int4 *)(this + 0x68) = *(int4 *)(param_1 + 4);
*(int8 *)(this + 0x70) = 0;
*(int8 *)(this + 0x78) = 0;
*(int8 *)(this + 0x80) = 0;
*(int8 *)(this + 0x88) = 0;
*(int8 *)(this + 0x90) = 0;
*(int8 *)(this + 0x98) = 0;
*(int8 *)(this + 0xa0) = 0;
*(int8 *)(this + 0xa8) = 0;
*(int8 *)(this + 0xb0) = 0;
*(int8 *)(this + 0xb8) = 0;
*(int8 *)(this + 0xc0) = 0;
*(int8 *)(this + 200) = 0;
*(int8 *)(this + 0xd0) = 0;
*(int8 *)(this + 0xd8) = 0;
*(int8 *)(this + 0xe0) = 0;
*(int8 *)(this + 0xe8) = 0;
/* try { // try from 0010728f to 00107356 has its CatchHandler @ 00107416 */
ggml_log_set(log_cb,this);
uVar5 = ggml_backend_init_by_type(0,0);
pcVar1 = this + 0xa8;
*(int8 *)pcVar1 = uVar5;
if (*param_1 == (ctx_params)0x1) {
lVar6 = ggml_backend_init_by_type(1,0);
}
else {
lVar6 = 0;
}
pcVar2 = this + 0xa0;
*(long *)pcVar2 = lVar6;
if (lVar6 == 0) {
*(int8 *)(this + 0xa0) = *(int8 *)(this + 0xa8);
log(this,2,"%s: using CPU backend\n",&DAT_0010c358);
}
else {
uVar5 = ggml_backend_name();
log(this,2,"%s: using %s backend\n",&DAT_0010c358,uVar5);
puVar4 = *(int8 **)(this + 0x78);
if (puVar4 == *(int8 **)(this + 0x80)) {
std::vector<ggml_backend*,std::allocator<ggml_backend*>>::
_M_realloc_insert<ggml_backend*const&>
((vector<ggml_backend*,std::allocator<ggml_backend*>> *)(this + 0x70),puVar4,pcVar2)
;
}
else {
*puVar4 = *(int8 *)(this + 0xa0);
*(long *)(this + 0x78) = *(long *)(this + 0x78) + 8;
}
/* try { // try from 0010735a to 0010736e has its CatchHandler @ 00107412 */
local_38 = (ggml_backend_buffer_type *)
ggml_backend_get_default_buffer_type(*(int8 *)pcVar2);
std::vector<ggml_backend_buffer_type*,std::allocator<ggml_backend_buffer_type*>>::
emplace_back<ggml_backend_buffer_type*>
((vector<ggml_backend_buffer_type*,std::allocator<ggml_backend_buffer_type*>> *)
(this + 0x88),&local_38);
}
puVar4 = *(int8 **)(this + 0x78);
if (puVar4 == *(int8 **)(this + 0x80)) {
/* try { // try from 0010738d to 00107399 has its CatchHandler @ 00107416 */
std::vector<ggml_backend*,std::allocator<ggml_backend*>>::_M_realloc_insert<ggml_backend*const&>
((vector<ggml_backend*,std::allocator<ggml_backend*>> *)(this + 0x70),puVar4,pcVar1);
}
else {
*puVar4 = *(int8 *)(this + 0xa8);
*(long *)(this + 0x78) = *(long *)(this + 0x78) + 8;
}
/* try { // try from 0010739e to 001073b2 has its CatchHandler @ 00107414 */
local_38 = (ggml_backend_buffer_type *)ggml_backend_get_default_buffer_type(*(int8 *)pcVar1)
;
std::vector<ggml_backend_buffer_type*,std::allocator<ggml_backend_buffer_type*>>::
emplace_back<ggml_backend_buffer_type*>
((vector<ggml_backend_buffer_type*,std::allocator<ggml_backend_buffer_type*>> *)
(this + 0x88),&local_38);
/* try { // try from 001073cd to 00107402 has its CatchHandler @ 00107416 */
pgVar7 = (ggml_backend_sched *)
ggml_backend_sched_new
(*(long *)(this + 0x70),*(int8 *)(this + 0x88),
(ulong)(*(long *)(this + 0x78) - *(long *)(this + 0x70)) >> 3,
(long)*(int *)(this + 0x68),0);
std::__uniq_ptr_impl<ggml_backend_sched,ggml_backend_sched_deleter>::reset
((__uniq_ptr_impl<ggml_backend_sched,ggml_backend_sched_deleter> *)(this + 0xb8),pgVar7)
;
iVar3 = *(int *)(this + 0x68);
lVar6 = ggml_tensor_overhead();
lVar8 = ggml_graph_overhead();
std::vector<unsigned_char,std::allocator<unsigned_char>>::resize
((vector<unsigned_char,std::allocator<unsigned_char>> *)(this + 0x50),
lVar8 + lVar6 * iVar3);
return;
}
|
|
61,051
|
LefDefParser::lefwMacroPinAntennaPartialCutArea(double, char const*)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
|
int
lefwMacroPinAntennaPartialCutArea(double value,
const char *layerName)
{
lefw54Num = LEFW_ANTENNAPARTIALCUTAREA;
if (!lefwFile)
return LEFW_UNINITIALIZED;
if (!lefwDidInit)
return LEFW_BAD_ORDER;
if (!lefwIsMacroPin)
return LEFW_BAD_ORDER;
if (versionNum < 5.4)
return LEFW_WRONG_VERSION;
if (lefwAntenna53)
return LEFW_MIX_VERSION_DATA;
if (lefwWriteEncrypt) {
encPrint(lefwFile, (char*) " ANTENNAPARTIALCUTAREA %.11g ", value);
if (layerName)
encPrint(lefwFile, (char*) "LAYER %s ", layerName);
encPrint(lefwFile, (char*) ";\n");
} else {
fprintf(lefwFile, " ANTENNAPARTIALCUTAREA %.11g ", value);
if (layerName)
fprintf(lefwFile, "LAYER %s ", layerName);
fprintf(lefwFile, ";\n");
}
lefwLines++;
lefwState = LEFW_MACRO;
lefwAntenna54 = 1;
return LEFW_OK;
}
|
O0
|
cpp
|
LefDefParser::lefwMacroPinAntennaPartialCutArea(double, char const*):
subq $0x18, %rsp
movsd %xmm0, 0x8(%rsp)
movq %rdi, (%rsp)
movl $0x79, 0x10124(%rip) # 0x32d4c
leaq 0x101d1(%rip), %rax # 0x32e00
cmpq $0x0, (%rax)
jne 0x22c42
movl $0x1, 0x14(%rsp)
jmp 0x22d9a
leaq 0x1040b(%rip), %rax # 0x33054
cmpl $0x0, (%rax)
jne 0x22c5b
movl $0x2, 0x14(%rsp)
jmp 0x22d9a
leaq 0x1043e(%rip), %rax # 0x330a0
cmpl $0x0, (%rax)
jne 0x22c74
movl $0x2, 0x14(%rsp)
jmp 0x22d9a
movsd 0x6584(%rip), %xmm0 # 0x29200
ucomisd 0x100bc(%rip), %xmm0 # 0x32d40
jbe 0x22c93
movl $0x5, 0x14(%rsp)
jmp 0x22d9a
cmpl $0x0, 0x10482(%rip) # 0x3311c
je 0x22ca9
movl $0x6, 0x14(%rsp)
jmp 0x22d9a
cmpl $0x0, 0x1043c(%rip) # 0x330ec
je 0x22d0d
leaq 0x10147(%rip), %rax # 0x32e00
movq (%rax), %rdi
movsd 0x8(%rsp), %xmm0
leaq 0x8d79(%rip), %rsi # 0x2ba42
movb $0x1, %al
callq 0x289b0
cmpq $0x0, (%rsp)
je 0x22cf3
leaq 0x10122(%rip), %rax # 0x32e00
movq (%rax), %rdi
movq (%rsp), %rdx
leaq 0x8e5e(%rip), %rsi # 0x2bb4a
movb $0x0, %al
callq 0x289b0
leaq 0x10106(%rip), %rax # 0x32e00
movq (%rax), %rdi
leaq 0x7250(%rip), %rsi # 0x29f54
movb $0x0, %al
callq 0x289b0
jmp 0x22d66
leaq 0x100ec(%rip), %rax # 0x32e00
movq (%rax), %rdi
movsd 0x8(%rsp), %xmm0
leaq 0x8d1e(%rip), %rsi # 0x2ba42
movb $0x1, %al
callq 0x1100
cmpq $0x0, (%rsp)
je 0x22d4e
leaq 0x100c7(%rip), %rax # 0x32e00
movq (%rax), %rdi
movq (%rsp), %rdx
leaq 0x8e03(%rip), %rsi # 0x2bb4a
movb $0x0, %al
callq 0x1100
leaq 0x100ab(%rip), %rax # 0x32e00
movq (%rax), %rdi
leaq 0x71f5(%rip), %rsi # 0x29f54
movb $0x0, %al
callq 0x1100
leaq 0x102df(%rip), %rax # 0x3304c
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x102d3(%rip), %rax # 0x3304c
movl %ecx, (%rax)
leaq 0x102ce(%rip), %rax # 0x33050
movl $0x21, (%rax)
movl $0x1, 0x10386(%rip) # 0x33118
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
|
_ZN12LefDefParser33lefwMacroPinAntennaPartialCutAreaEdPKc:
sub rsp, 18h
movsd [rsp+18h+var_10], xmm0
mov [rsp+18h+var_18], rdi
mov cs:_ZN12LefDefParserL9lefw54NumE, 79h ; 'y'; LefDefParser::lefw54Num
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
cmp qword ptr [rax], 0
jnz short loc_22C42
mov [rsp+18h+var_4], 1
jmp loc_22D9A
loc_22C42:
lea rax, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit
cmp dword ptr [rax], 0
jnz short loc_22C5B
mov [rsp+18h+var_4], 2
jmp loc_22D9A
loc_22C5B:
lea rax, _ZN12LefDefParser14lefwIsMacroPinE; LefDefParser::lefwIsMacroPin
cmp dword ptr [rax], 0
jnz short loc_22C74
mov [rsp+18h+var_4], 2
jmp loc_22D9A
loc_22C74:
movsd xmm0, cs:dbl_29200
ucomisd xmm0, cs:_ZN12LefDefParserL10versionNumE; LefDefParser::versionNum
jbe short loc_22C93
mov [rsp+18h+var_4], 5
jmp loc_22D9A
loc_22C93:
cmp cs:_ZN12LefDefParserL13lefwAntenna53E, 0; LefDefParser::lefwAntenna53
jz short loc_22CA9
mov [rsp+18h+var_4], 6
jmp loc_22D9A
loc_22CA9:
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt
jz short loc_22D0D
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
movsd xmm0, [rsp+18h+var_10]
lea rsi, aAntennapartial_1; " ANTENNAPARTIALCUTAREA %.11g "
mov al, 1
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
cmp [rsp+18h+var_18], 0
jz short loc_22CF3
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
mov rdx, [rsp+18h+var_18]
lea rsi, aLayerS_2+9; "LAYER %s "
mov al, 0
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
loc_22CF3:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
lea rsi, aDividercharS+11h; ";\n"
mov al, 0
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
jmp short loc_22D66
loc_22D0D:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
movsd xmm0, [rsp+18h+var_10]
lea rsi, aAntennapartial_1; " ANTENNAPARTIALCUTAREA %.11g "
mov al, 1
call _fprintf
cmp [rsp+18h+var_18], 0
jz short loc_22D4E
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
mov rdx, [rsp+18h+var_18]
lea rsi, aLayerS_2+9; "LAYER %s "
mov al, 0
call _fprintf
loc_22D4E:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
lea rsi, aDividercharS+11h; ";\n"
mov al, 0
call _fprintf
loc_22D66:
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
mov [rax], ecx
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
mov dword ptr [rax], 21h ; '!'
mov cs:_ZN12LefDefParserL13lefwAntenna54E, 1; LefDefParser::lefwAntenna54
mov [rsp+18h+var_4], 0
loc_22D9A:
mov eax, [rsp+18h+var_4]
add rsp, 18h
retn
|
long long LefDefParser::lefwMacroPinAntennaPartialCutArea(
LefDefParser *this,
double a2,
const char *a3,
int a4,
int a5,
int a6,
int a7)
{
int v7; // edx
int v8; // ecx
int v9; // r8d
int v10; // r9d
LefDefParser::lefw54Num = 121;
if ( *(_QWORD *)&LefDefParser::lefwFile )
{
if ( LefDefParser::lefwDidInit )
{
if ( LefDefParser::lefwIsMacroPin )
{
if ( *(double *)&LefDefParser::versionNum >= 5.4 )
{
if ( LefDefParser::lefwAntenna53 )
{
return 6;
}
else
{
if ( LefDefParser::lefwWriteEncrypt )
{
LefDefParser::encPrint(
LefDefParser::lefwFile,
(unsigned int)" ANTENNAPARTIALCUTAREA %.11g ",
a4,
a5,
a6,
a7);
if ( this )
LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)"LAYER %s ", (_DWORD)this, v8, v9, v10);
LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)";\n", v7, v8, v9, v10);
}
else
{
fprintf(*(_QWORD *)&LefDefParser::lefwFile, " ANTENNAPARTIALCUTAREA %.11g ", a2);
if ( this )
fprintf(*(_QWORD *)&LefDefParser::lefwFile, "LAYER %s ", (const char *)this);
fprintf(*(_QWORD *)&LefDefParser::lefwFile, ";\n");
}
++LefDefParser::lefwLines;
LefDefParser::lefwState = 33;
LefDefParser::lefwAntenna54 = 1;
return 0;
}
}
else
{
return 5;
}
}
else
{
return 2;
}
}
else
{
return 2;
}
}
else
{
return 1;
}
}
|
lefwMacroPinAntennaPartialCutArea:
SUB RSP,0x18
MOVSD qword ptr [RSP + 0x8],XMM0
MOV qword ptr [RSP],RDI
MOV dword ptr [0x00132d4c],0x79
LEA RAX,[0x132e00]
CMP qword ptr [RAX],0x0
JNZ 0x00122c42
MOV dword ptr [RSP + 0x14],0x1
JMP 0x00122d9a
LAB_00122c42:
LEA RAX,[0x133054]
CMP dword ptr [RAX],0x0
JNZ 0x00122c5b
MOV dword ptr [RSP + 0x14],0x2
JMP 0x00122d9a
LAB_00122c5b:
LEA RAX,[0x1330a0]
CMP dword ptr [RAX],0x0
JNZ 0x00122c74
MOV dword ptr [RSP + 0x14],0x2
JMP 0x00122d9a
LAB_00122c74:
MOVSD XMM0,qword ptr [0x00129200]
UCOMISD XMM0,qword ptr [0x00132d40]
JBE 0x00122c93
MOV dword ptr [RSP + 0x14],0x5
JMP 0x00122d9a
LAB_00122c93:
CMP dword ptr [0x0013311c],0x0
JZ 0x00122ca9
MOV dword ptr [RSP + 0x14],0x6
JMP 0x00122d9a
LAB_00122ca9:
CMP dword ptr [0x001330ec],0x0
JZ 0x00122d0d
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
MOVSD XMM0,qword ptr [RSP + 0x8]
LEA RSI,[0x12ba42]
MOV AL,0x1
CALL 0x001289b0
CMP qword ptr [RSP],0x0
JZ 0x00122cf3
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP]
LEA RSI,[0x12bb4a]
MOV AL,0x0
CALL 0x001289b0
LAB_00122cf3:
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x129f54]
MOV AL,0x0
CALL 0x001289b0
JMP 0x00122d66
LAB_00122d0d:
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
MOVSD XMM0,qword ptr [RSP + 0x8]
LEA RSI,[0x12ba42]
MOV AL,0x1
CALL 0x00101100
CMP qword ptr [RSP],0x0
JZ 0x00122d4e
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP]
LEA RSI,[0x12bb4a]
MOV AL,0x0
CALL 0x00101100
LAB_00122d4e:
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x129f54]
MOV AL,0x0
CALL 0x00101100
LAB_00122d66:
LEA RAX,[0x13304c]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x13304c]
MOV dword ptr [RAX],ECX
LEA RAX,[0x133050]
MOV dword ptr [RAX],0x21
MOV dword ptr [0x00133118],0x1
MOV dword ptr [RSP + 0x14],0x0
LAB_00122d9a:
MOV EAX,dword ptr [RSP + 0x14]
ADD RSP,0x18
RET
|
/* LefDefParser::lefwMacroPinAntennaPartialCutArea(double, char const*) */
int4 LefDefParser::lefwMacroPinAntennaPartialCutArea(double param_1,char *param_2)
{
int4 local_4;
lefw54Num = 0x79;
if (lefwFile == (_IO_FILE *)0x0) {
local_4 = 1;
}
else if (lefwDidInit == 0) {
local_4 = 2;
}
else if (lefwIsMacroPin == 0) {
local_4 = 2;
}
else if (DAT_00129200 <= versionNum) {
if (lefwAntenna53 == 0) {
if (lefwWriteEncrypt == 0) {
fprintf(lefwFile," ANTENNAPARTIALCUTAREA %.11g ",param_1);
if (param_2 != (char *)0x0) {
fprintf(lefwFile,"LAYER %s ",param_2);
}
fprintf(lefwFile,";\n");
}
else {
encPrint(lefwFile," ANTENNAPARTIALCUTAREA %.11g ",param_1);
if (param_2 != (char *)0x0) {
encPrint(lefwFile,"LAYER %s ",param_2);
}
encPrint(lefwFile,";\n");
}
lefwLines = lefwLines + 1;
lefwState = 0x21;
lefwAntenna54 = 1;
local_4 = 0;
}
else {
local_4 = 6;
}
}
else {
local_4 = 5;
}
return local_4;
}
|
|
61,052
|
JS_ThisTimeValue
|
bluesky950520[P]quickjs/quickjs.c
|
static __exception int JS_ThisTimeValue(JSContext *ctx, double *valp, JSValue this_val)
{
if (JS_VALUE_GET_TAG(this_val) == JS_TAG_OBJECT) {
JSObject *p = JS_VALUE_GET_OBJ(this_val);
if (p->class_id == JS_CLASS_DATE && JS_IsNumber(p->u.object_data))
return JS_ToFloat64(ctx, valp, p->u.object_data);
}
JS_ThrowTypeError(ctx, "not a Date object");
return -1;
}
|
O1
|
c
|
JS_ThisTimeValue:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rdx, 0x8(%rsp)
cmpl $-0x1, %ecx
jne 0x56a4d
movq 0x8(%rsp), %rdi
movb $0x1, %dl
cmpw $0xa, 0x6(%rdi)
jne 0x56a49
movq 0x38(%rdi), %rcx
cmpl $0x7, %ecx
je 0x56a39
testl %ecx, %ecx
jne 0x56a49
movq 0x30(%rdi), %rdx
movq %rbx, %rdi
callq 0x27681
xorl %edx, %edx
jmp 0x56a49
testb %dl, %dl
je 0x56a63
leaq 0x49bf3(%rip), %rsi # 0xa0647
movq %rbx, %rdi
xorl %eax, %eax
callq 0x22567
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbx
retq
|
JS_ThisTimeValue:
push rbx
sub rsp, 10h
mov rbx, rdi
mov [rsp+18h+var_10], rdx
cmp ecx, 0FFFFFFFFh
jnz short loc_56A4D
mov rdi, [rsp+18h+var_10]
mov dl, 1
cmp word ptr [rdi+6], 0Ah
jnz short loc_56A49
mov rcx, [rdi+38h]
cmp ecx, 7
jz short loc_56A39
test ecx, ecx
jnz short loc_56A49
loc_56A39:
mov rdx, [rdi+30h]
mov rdi, rbx
call JS_ToFloat64
xor edx, edx
jmp short $+2
loc_56A49:
test dl, dl
jz short loc_56A63
loc_56A4D:
lea rsi, aNotADateObject; "not a Date object"
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
mov eax, 0FFFFFFFFh
loc_56A63:
add rsp, 10h
pop rbx
retn
|
long long JS_ThisTimeValue(
long long a1,
double *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 result; // rax
char v15; // [rsp+0h] [rbp-18h]
long long v16; // [rsp+8h] [rbp-10h]
v16 = a3;
if ( (_DWORD)a4 != -1 )
goto LABEL_7;
LOBYTE(a3) = 1;
if ( *(_WORD *)(v16 + 6) == 10 )
{
a4 = *(_QWORD *)(v16 + 56);
if ( (_DWORD)a4 == 7 || !(_DWORD)a4 )
{
result = JS_ToFloat64(a1, a2, *(_DWORD **)(v16 + 48), a4);
a3 = 0LL;
}
}
if ( (_BYTE)a3 )
{
LABEL_7:
JS_ThrowTypeError(a1, (long long)"not a Date object", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v15);
return 0xFFFFFFFFLL;
}
return result;
}
| |||
61,053
|
JS_ThisTimeValue
|
bluesky950520[P]quickjs/quickjs.c
|
static __exception int JS_ThisTimeValue(JSContext *ctx, double *valp, JSValue this_val)
{
if (JS_VALUE_GET_TAG(this_val) == JS_TAG_OBJECT) {
JSObject *p = JS_VALUE_GET_OBJ(this_val);
if (p->class_id == JS_CLASS_DATE && JS_IsNumber(p->u.object_data))
return JS_ToFloat64(ctx, valp, p->u.object_data);
}
JS_ThrowTypeError(ctx, "not a Date object");
return -1;
}
|
O2
|
c
|
JS_ThisTimeValue:
cmpl $-0x1, %ecx
jne 0x4a425
cmpw $0xa, 0x6(%rdx)
jne 0x4a425
movq 0x38(%rdx), %rcx
cmpl $0x7, %ecx
je 0x4a41c
testl %ecx, %ecx
jne 0x4a425
movq 0x30(%rdx), %rdx
jmp 0x2127f
pushq %rax
leaq 0x3d154(%rip), %rsi # 0x87581
xorl %eax, %eax
callq 0x1c64d
pushq $-0x1
popq %rax
popq %rcx
retq
|
JS_ThisTimeValue:
cmp ecx, 0FFFFFFFFh
jnz short loc_4A425
cmp word ptr [rdx+6], 0Ah
jnz short loc_4A425
mov rcx, [rdx+38h]
cmp ecx, 7
jz short loc_4A41C
test ecx, ecx
jnz short loc_4A425
loc_4A41C:
mov rdx, [rdx+30h]
jmp JS_ToFloat64
loc_4A425:
push rax
lea rsi, aNotADateObject; "not a Date object"
xor eax, eax
call JS_ThrowTypeError
push 0FFFFFFFFFFFFFFFFh
pop rax
pop rcx
retn
|
long long JS_ThisTimeValue(
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 v14; // al
if ( (_DWORD)a4 == -1 && *(_WORD *)(a3 + 6) == 10 )
{
a4 = *(_QWORD *)(a3 + 56);
if ( (_DWORD)a4 == 7 || !(_DWORD)a4 )
return JS_ToFloat64(a1, a2, *(_DWORD **)(a3 + 48), a4);
}
JS_ThrowTypeError(a1, (long long)"not a Date object", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v14);
return -1LL;
}
|
JS_ThisTimeValue:
CMP ECX,-0x1
JNZ 0x0014a425
CMP word ptr [RDX + 0x6],0xa
JNZ 0x0014a425
MOV RCX,qword ptr [RDX + 0x38]
CMP ECX,0x7
JZ 0x0014a41c
TEST ECX,ECX
JNZ 0x0014a425
LAB_0014a41c:
MOV RDX,qword ptr [RDX + 0x30]
JMP 0x0012127f
LAB_0014a425:
PUSH RAX
LEA RSI,[0x187581]
XOR EAX,EAX
CALL 0x0011c64d
PUSH -0x1
POP RAX
POP RCX
RET
|
int8 JS_ThisTimeValue(int8 param_1,int8 param_2,long param_3,int param_4)
{
int8 uVar1;
int iVar2;
if ((param_4 == -1) && (*(short *)(param_3 + 6) == 10)) {
iVar2 = (int)*(int8 *)(param_3 + 0x38);
if ((iVar2 == 7) || (iVar2 == 0)) {
uVar1 = JS_ToFloat64(param_1,param_2,*(int8 *)(param_3 + 0x30));
return uVar1;
}
}
JS_ThrowTypeError(param_1,"not a Date object");
return 0xffffffffffffffff;
}
|
|
61,054
|
mthd_stmt_get_param_metadata
|
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
|
my_bool mthd_stmt_get_param_metadata(MYSQL_STMT *stmt)
{
MYSQL_DATA *result;
if (!(result= stmt->mysql->methods->db_read_rows(stmt->mysql, (MYSQL_FIELD *)0,
7 + ma_extended_type_info_rows(stmt->mysql))))
return(1);
free_rows(result);
return(0);
}
|
O0
|
c
|
mthd_stmt_get_param_metadata:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x4d0(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x5c370
movq -0x28(%rbp), %rdi
movl %eax, %edx
movq -0x20(%rbp), %rax
addl $0x7, %edx
xorl %ecx, %ecx
movl %ecx, %esi
callq *%rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x5c34f
movb $0x1, -0x1(%rbp)
jmp 0x5c35c
movq -0x18(%rbp), %rdi
callq 0x48020
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
mthd_stmt_get_param_metadata:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov rax, [rax+4D0h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rdi, [rax+38h]
call ma_extended_type_info_rows
mov rdi, [rbp+var_28]
mov edx, eax
mov rax, [rbp+var_20]
add edx, 7
xor ecx, ecx
mov esi, ecx
call rax
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_5C34F
mov [rbp+var_1], 1
jmp short loc_5C35C
loc_5C34F:
mov rdi, [rbp+var_18]
call free_rows
mov [rbp+var_1], 0
loc_5C35C:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
|
char mthd_stmt_get_param_metadata(long long a1)
{
int v1; // eax
long long v3; // [rsp+8h] [rbp-28h]
long long ( *v4)(long long, _QWORD, _QWORD); // [rsp+10h] [rbp-20h]
long long v5; // [rsp+18h] [rbp-18h]
v4 = *(long long ( **)(long long, _QWORD, _QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 40LL);
v3 = *(_QWORD *)(a1 + 56);
v1 = ma_extended_type_info_rows(v3);
v5 = v4(v3, 0LL, (unsigned int)(v1 + 7));
if ( !v5 )
return 1;
free_rows(v5);
return 0;
}
|
mthd_stmt_get_param_metadata:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x38]
CALL 0x0015c370
MOV RDI,qword ptr [RBP + -0x28]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x20]
ADD EDX,0x7
XOR ECX,ECX
MOV ESI,ECX
CALL RAX
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x0015c34f
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015c35c
LAB_0015c34f:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00148020
MOV byte ptr [RBP + -0x1],0x0
LAB_0015c35c:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
bool mthd_stmt_get_param_metadata(long param_1)
{
code *pcVar1;
int8 uVar2;
int iVar3;
long lVar4;
bool local_9;
pcVar1 = *(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x28);
uVar2 = *(int8 *)(param_1 + 0x38);
iVar3 = ma_extended_type_info_rows(*(int8 *)(param_1 + 0x38));
lVar4 = (*pcVar1)(uVar2,0,iVar3 + 7);
if (lVar4 != 0) {
free_rows(lVar4);
}
local_9 = lVar4 == 0;
return local_9;
}
|
|
61,055
|
mthd_stmt_get_param_metadata
|
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
|
my_bool mthd_stmt_get_param_metadata(MYSQL_STMT *stmt)
{
MYSQL_DATA *result;
if (!(result= stmt->mysql->methods->db_read_rows(stmt->mysql, (MYSQL_FIELD *)0,
7 + ma_extended_type_info_rows(stmt->mysql))))
return(1);
free_rows(result);
return(0);
}
|
O3
|
c
|
mthd_stmt_get_param_metadata:
pushq %rbp
movq %rsp, %rbp
movq 0x38(%rdi), %rdi
movq 0x4d0(%rdi), %rax
movq 0x4f0(%rdi), %rcx
xorl %edx, %edx
btl $0x3, 0x70(%rcx)
adcl $0x7, %edx
xorl %esi, %esi
callq *0x28(%rax)
testq %rax, %rax
je 0x4fd25
movq %rax, %rdi
callq 0x44756
xorl %eax, %eax
jmp 0x4fd27
movb $0x1, %al
popq %rbp
retq
|
mthd_stmt_get_param_metadata:
push rbp
mov rbp, rsp
mov rdi, [rdi+38h]
mov rax, [rdi+4D0h]
mov rcx, [rdi+4F0h]
xor edx, edx
bt dword ptr [rcx+70h], 3
adc edx, 7
xor esi, esi
call qword ptr [rax+28h]
test rax, rax
jz short loc_4FD25
mov rdi, rax
call free_rows
xor eax, eax
jmp short loc_4FD27
loc_4FD25:
mov al, 1
loc_4FD27:
pop rbp
retn
|
long long mthd_stmt_get_param_metadata(long long a1)
{
long long v1; // rax
v1 = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 40LL))(
*(_QWORD *)(a1 + 56),
0LL,
(unsigned int)_bittest((const signed __int32 *)(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1264LL) + 112LL), 3u) + 7);
if ( !v1 )
return 1LL;
free_rows(v1);
return 0LL;
}
|
mthd_stmt_get_param_metadata:
PUSH RBP
MOV RBP,RSP
MOV RDI,qword ptr [RDI + 0x38]
MOV RAX,qword ptr [RDI + 0x4d0]
MOV RCX,qword ptr [RDI + 0x4f0]
XOR EDX,EDX
BT dword ptr [RCX + 0x70],0x3
ADC EDX,0x7
XOR ESI,ESI
CALL qword ptr [RAX + 0x28]
TEST RAX,RAX
JZ 0x0014fd25
MOV RDI,RAX
CALL 0x00144756
XOR EAX,EAX
JMP 0x0014fd27
LAB_0014fd25:
MOV AL,0x1
LAB_0014fd27:
POP RBP
RET
|
bool mthd_stmt_get_param_metadata(long param_1)
{
long lVar1;
lVar1 = *(long *)(param_1 + 0x38);
lVar1 = (**(code **)(*(long *)(lVar1 + 0x4d0) + 0x28))
(lVar1,0,((*(uint *)(*(long *)(lVar1 + 0x4f0) + 0x70) >> 3 & 1) != 0) + '\a');
if (lVar1 != 0) {
free_rows(lVar1);
}
return lVar1 == 0;
}
|
|
61,056
|
ma_rec_pack
|
eloqsql/storage/maria/ma_dynrec.c
|
uint _ma_rec_pack(MARIA_HA *info, register uchar *to,
register const uchar *from)
{
uint length,new_length,flag,bit,i;
const uchar *pos,*end;
uchar *startpos,*packpos;
enum en_fieldtype type;
reg3 MARIA_COLUMNDEF *column;
MARIA_BLOB *blob;
DBUG_ENTER("_ma_rec_pack");
flag= 0;
bit= 1;
startpos= packpos=to;
to+= info->s->base.pack_bytes;
blob= info->blobs;
column= info->s->columndef;
if (info->s->base.null_bytes)
{
memcpy(to, from, info->s->base.null_bytes);
from+= info->s->base.null_bytes;
to+= info->s->base.null_bytes;
}
for (i=info->s->base.fields ; i-- > 0; from+= length, column++)
{
length=(uint) column->length;
if ((type = (enum en_fieldtype) column->type) != FIELD_NORMAL)
{
if (type == FIELD_BLOB)
{
if (!blob->length)
flag|=bit;
else
{
char *temp_pos;
size_t tmp_length=length-portable_sizeof_char_ptr;
memcpy(to,from,tmp_length);
memcpy(&temp_pos,from+tmp_length,sizeof(char*));
memcpy(to+tmp_length,temp_pos,(size_t) blob->length);
to+=tmp_length+blob->length;
}
blob++;
}
else if (type == FIELD_SKIP_ZERO)
{
if (memcmp(from, maria_zero_string, length) == 0)
flag|=bit;
else
{
memcpy(to, from, (size_t) length);
to+=length;
}
}
else if (type == FIELD_SKIP_ENDSPACE ||
type == FIELD_SKIP_PRESPACE)
{
pos= from; end= from + length;
if (type == FIELD_SKIP_ENDSPACE)
{ /* Pack trailing spaces */
while (end > from && *(end-1) == ' ')
end--;
}
else
{ /* Pack pref-spaces */
while (pos < end && *pos == ' ')
pos++;
}
new_length=(uint) (end-pos);
if (new_length + 1 + MY_TEST(column->length > 255 && new_length > 127)
< length)
{
if (column->length > 255 && new_length > 127)
{
to[0]= (uchar) ((new_length & 127) + 128);
to[1]= (uchar) (new_length >> 7);
to+=2;
}
else
*to++= (uchar) new_length;
memcpy(to, pos, (size_t) new_length); to+=new_length;
flag|=bit;
}
else
{
memcpy(to,from,(size_t) length); to+=length;
}
}
else if (type == FIELD_VARCHAR)
{
uint pack_length= HA_VARCHAR_PACKLENGTH(column->length -1);
uint tmp_length;
if (pack_length == 1)
{
tmp_length= (uint) *from;
*to++= *from;
}
else
{
tmp_length= uint2korr(from);
store_key_length_inc(to,tmp_length);
}
if (tmp_length > column->length)
{
my_errno= HA_ERR_WRONG_IN_RECORD;
DBUG_RETURN(0);
}
memcpy(to, from+pack_length,tmp_length);
to+= tmp_length;
continue;
}
else
{
memcpy(to,from,(size_t) length); to+=length;
continue; /* Normal field */
}
if ((bit= bit << 1) >= 256)
{
*packpos++ = (uchar) flag;
bit=1; flag=0;
}
}
else
{
memcpy(to,from,(size_t) length); to+=length;
}
}
if (bit != 1)
*packpos= (uchar) flag;
if (info->s->calc_checksum)
*to++= (uchar) info->cur_row.checksum;
DBUG_PRINT("exit",("packed length: %d",(int) (to-startpos)));
DBUG_RETURN((uint) (to-startpos));
}
|
O3
|
c
|
ma_rec_pack:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r12
movq %rsi, %rbx
movq (%rdi), %rax
movl 0x3f4(%rax), %r14d
movl 0x3fc(%rax), %edx
addq %rsi, %r14
movq 0x288(%rdi), %rcx
movq %rcx, -0x58(%rbp)
movq 0x588(%rax), %r15
testq %rdx, %rdx
movq %rdi, -0x60(%rbp)
je 0x3c620
movq %rdi, %r13
movq %r14, %rdi
movq %r12, %rsi
callq 0x29080
movq (%r13), %rax
movl 0x3fc(%rax), %ecx
addq %rcx, %r12
addq %rcx, %r14
movq %r14, %rcx
movl 0x3c8(%rax), %r14d
testl %r14d, %r14d
je 0x3c8e6
movq %rbx, -0x48(%rbp)
movq %rbx, -0x40(%rbp)
movl $0x1, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movq %rcx, %rbx
decl %r14d
movzwl 0x8(%r15), %r8d
movl (%r15), %ecx
testl %ecx, %ecx
je 0x3c73d
cmpl $0x3, %ecx
je 0x3c6ca
cmpl $0x4, %ecx
jne 0x3c6f9
movq -0x58(%rbp), %rcx
cmpq $0x0, 0x10(%rcx)
je 0x3c761
movl %r14d, -0x34(%rbp)
movq %rcx, %r14
movq %rbx, %r13
leal -0x8(%r8), %ebx
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq %r8, -0x50(%rbp)
callq 0x29080
movq (%r12,%rbx), %rsi
leaq (%rbx,%r13), %rdi
movq 0x10(%r14), %rdx
callq 0x29080
movq -0x50(%rbp), %r8
addq 0x10(%r14), %rbx
addq %rbx, %r13
movq %r13, %rbx
movq %r14, %rcx
movl -0x34(%rbp), %r14d
movl -0x2c(%rbp), %eax
jmp 0x3c767
movq %r12, %rdi
leaq 0x3c081c(%rip), %rsi # 0x3fcef0
movq %r8, %rdx
movq %r8, %r13
callq 0x29560
testl %eax, %eax
je 0x3c756
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x29080
addq %r13, %rbx
movl -0x2c(%rbp), %eax
jmp 0x3c75c
cmpl $0x2, %ecx
ja 0x3c728
leaq (%r12,%r8), %rax
cmpl $0x1, %ecx
jne 0x3c794
movq %rax, %rcx
cmpq %r12, %rax
jbe 0x3c71d
leaq -0x1(%rcx), %rax
cmpb $0x20, -0x1(%rcx)
je 0x3c70b
movq %r12, %rsi
movq %rcx, %rax
jmp 0x3c7c8
cmpl $0x8, %ecx
jne 0x3c73d
cmpl $0x100, %r8d # imm = 0x100
ja 0x3c7ab
movzbl (%r12), %eax
jmp 0x3c7bb
movq %rbx, %rdi
movq %r12, %rsi
movq %r8, %rdx
movq %r8, %r13
callq 0x29080
movq %r13, %r8
addq %r13, %rbx
jmp 0x3c77f
movl -0x2c(%rbp), %eax
orl %eax, -0x30(%rbp)
movq %r13, %r8
jmp 0x3c76f
movl -0x2c(%rbp), %eax
orl %eax, -0x30(%rbp)
addq $0x18, %rcx
movq %rcx, -0x58(%rbp)
addl %eax, %eax
cmpl $0xff, %eax
ja 0x3c8a4
movl %eax, -0x2c(%rbp)
addq %r8, %r12
addq $0x38, %r15
testl %r14d, %r14d
jne 0x3c64c
jmp 0x3c8d0
movq %r12, %rsi
testq %r8, %r8
je 0x3c7c5
cmpb $0x20, (%rsi)
jne 0x3c7c8
incq %rsi
cmpq %rax, %rsi
jb 0x3c79c
jmp 0x3c7c8
movzwl (%r12), %eax
cmpl $0xfe, %eax
ja 0x3c84f
movb %al, (%rbx)
incq %rbx
jmp 0x3c85c
movq %r12, %rsi
subq %rsi, %rax
cmpl $0x100, %r8d # imm = 0x100
setae %dl
cmpl $0x7f, %eax
seta %cl
andb %dl, %cl
movzbl %cl, %edx
addl %eax, %edx
incl %edx
cmpl %r8d, %edx
jae 0x3c830
movq %rbx, %rdi
movl $0x1, %ebx
testb %cl, %cl
movq %r8, -0x50(%rbp)
movl %eax, %ecx
je 0x3c80b
orb $-0x80, %cl
movl %eax, %edx
shrl $0x7, %edx
movb %dl, 0x1(%rdi)
movl $0x2, %ebx
addq %rdi, %rbx
movb %cl, (%rdi)
movl %eax, %r13d
movq %rbx, %rdi
movq %r13, %rdx
callq 0x29080
addq %r13, %rbx
movl -0x2c(%rbp), %eax
orl %eax, -0x30(%rbp)
movq -0x50(%rbp), %r8
jmp 0x3c76f
movq %rbx, %rdi
movq %r12, %rsi
movq %r8, %rdx
movq %r8, %r13
callq 0x29080
movq %r13, %r8
addq %r13, %rbx
movl -0x2c(%rbp), %eax
jmp 0x3c76f
movb $-0x1, (%rbx)
movb %al, 0x2(%rbx)
movb %ah, 0x1(%rbx)
addq $0x3, %rbx
movzwl 0x8(%r15), %ecx
cmpl %ecx, %eax
ja 0x3c916
cmpl $0x101, %r8d # imm = 0x101
movq %r12, %rsi
sbbq $0x0, %rsi
addq $0x2, %rsi
movl %r14d, -0x34(%rbp)
movq %rbx, %r13
movl %eax, %ebx
movq %r13, %rdi
movq %rbx, %rdx
movq %r8, %r14
callq 0x29080
movq %r14, %r8
addq %rbx, %r13
movq %r13, %rbx
movl -0x34(%rbp), %r14d
jmp 0x3c77f
movq %rbx, %rcx
movq -0x48(%rbp), %rax
movl -0x30(%rbp), %edx
movb %dl, (%rax)
incq %rax
movq %rax, -0x48(%rbp)
movl %r8d, %eax
addq %rax, %r12
addq $0x38, %r15
testl %r14d, %r14d
movq -0x40(%rbp), %rbx
jne 0x3c63b
jmp 0x3c8e6
movq %rbx, %rcx
cmpl $0x1, -0x2c(%rbp)
je 0x3c8e2
movq -0x48(%rbp), %rax
movl -0x30(%rbp), %edx
movb %dl, (%rax)
movq -0x40(%rbp), %rbx
movq -0x60(%rbp), %rdx
movq (%rdx), %rax
cmpq $0x0, 0x6a8(%rax)
je 0x3c902
movb 0xb0(%rdx), %al
movb %al, (%rcx)
incq %rcx
subl %ebx, %ecx
movq %rcx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xa1afa
movl $0x7f, (%rax)
xorl %eax, %eax
jmp 0x3c907
|
_ma_rec_pack:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r12, rdx
mov rbx, rsi
mov rax, [rdi]
mov r14d, [rax+3F4h]
mov edx, [rax+3FCh]
add r14, rsi
mov rcx, [rdi+288h]
mov [rbp+var_58], rcx
mov r15, [rax+588h]
test rdx, rdx
mov [rbp+var_60], rdi
jz short loc_3C620
mov r13, rdi
mov rdi, r14
mov rsi, r12
call _memcpy
mov rax, [r13+0]
mov ecx, [rax+3FCh]
add r12, rcx
add r14, rcx
loc_3C620:
mov rcx, r14
mov r14d, [rax+3C8h]
test r14d, r14d
jz loc_3C8E6
mov [rbp+var_48], rbx
mov [rbp+var_40], rbx
loc_3C63B:
mov [rbp+var_2C], 1
mov [rbp+var_30], 0
mov rbx, rcx
loc_3C64C:
dec r14d
movzx r8d, word ptr [r15+8]
mov ecx, [r15]
test ecx, ecx
jz loc_3C73D
cmp ecx, 3
jz short loc_3C6CA
cmp ecx, 4
jnz loc_3C6F9
mov rcx, [rbp+var_58]
cmp qword ptr [rcx+10h], 0
jz loc_3C761
mov [rbp+var_34], r14d
mov r14, rcx
mov r13, rbx
lea ebx, [r8-8]
mov rdi, r13
mov rsi, r12
mov rdx, rbx
mov [rbp+var_50], r8
call _memcpy
mov rsi, [r12+rbx]
lea rdi, [rbx+r13]
mov rdx, [r14+10h]
call _memcpy
mov r8, [rbp+var_50]
add rbx, [r14+10h]
add r13, rbx
mov rbx, r13
mov rcx, r14
mov r14d, [rbp+var_34]
mov eax, [rbp+var_2C]
jmp loc_3C767
loc_3C6CA:
mov rdi, r12
lea rsi, maria_zero_string
mov rdx, r8
mov r13, r8
call _bcmp
test eax, eax
jz short loc_3C756
mov rdi, rbx
mov rsi, r12
mov rdx, r13
call _memcpy
add rbx, r13
mov eax, [rbp+var_2C]
jmp short loc_3C75C
loc_3C6F9:
cmp ecx, 2
ja short loc_3C728
lea rax, [r12+r8]
cmp ecx, 1
jnz loc_3C794
loc_3C70B:
mov rcx, rax
cmp rax, r12
jbe short loc_3C71D
lea rax, [rcx-1]
cmp byte ptr [rcx-1], 20h ; ' '
jz short loc_3C70B
loc_3C71D:
mov rsi, r12
mov rax, rcx
jmp loc_3C7C8
loc_3C728:
cmp ecx, 8
jnz short loc_3C73D
cmp r8d, 100h
ja short loc_3C7AB
movzx eax, byte ptr [r12]
jmp short loc_3C7BB
loc_3C73D:
mov rdi, rbx
mov rsi, r12
mov rdx, r8
mov r13, r8
call _memcpy
mov r8, r13
add rbx, r13
jmp short loc_3C77F
loc_3C756:
mov eax, [rbp+var_2C]
or [rbp+var_30], eax
loc_3C75C:
mov r8, r13
jmp short loc_3C76F
loc_3C761:
mov eax, [rbp+var_2C]
or [rbp+var_30], eax
loc_3C767:
add rcx, 18h
mov [rbp+var_58], rcx
loc_3C76F:
add eax, eax
cmp eax, 0FFh
ja loc_3C8A4
mov [rbp+var_2C], eax
loc_3C77F:
add r12, r8
add r15, 38h ; '8'
test r14d, r14d
jnz loc_3C64C
jmp loc_3C8D0
loc_3C794:
mov rsi, r12
test r8, r8
jz short loc_3C7C5
loc_3C79C:
cmp byte ptr [rsi], 20h ; ' '
jnz short loc_3C7C8
inc rsi
cmp rsi, rax
jb short loc_3C79C
jmp short loc_3C7C8
loc_3C7AB:
movzx eax, word ptr [r12]
cmp eax, 0FEh
ja loc_3C84F
loc_3C7BB:
mov [rbx], al
inc rbx
jmp loc_3C85C
loc_3C7C5:
mov rsi, r12
loc_3C7C8:
sub rax, rsi
cmp r8d, 100h
setnb dl
cmp eax, 7Fh
setnbe cl
and cl, dl
movzx edx, cl
add edx, eax
inc edx
cmp edx, r8d
jnb short loc_3C830
mov rdi, rbx
mov ebx, 1
test cl, cl
mov [rbp+var_50], r8
mov ecx, eax
jz short loc_3C80B
or cl, 80h
mov edx, eax
shr edx, 7
mov [rdi+1], dl
mov ebx, 2
loc_3C80B:
add rbx, rdi
mov [rdi], cl
mov r13d, eax
mov rdi, rbx
mov rdx, r13
call _memcpy
add rbx, r13
mov eax, [rbp+var_2C]
or [rbp+var_30], eax
mov r8, [rbp+var_50]
jmp loc_3C76F
loc_3C830:
mov rdi, rbx
mov rsi, r12
mov rdx, r8
mov r13, r8
call _memcpy
mov r8, r13
add rbx, r13
mov eax, [rbp+var_2C]
jmp loc_3C76F
loc_3C84F:
mov byte ptr [rbx], 0FFh
mov [rbx+2], al
mov [rbx+1], ah
add rbx, 3
loc_3C85C:
movzx ecx, word ptr [r15+8]
cmp eax, ecx
ja loc_3C916
cmp r8d, 101h
mov rsi, r12
sbb rsi, 0
add rsi, 2
mov [rbp+var_34], r14d
mov r13, rbx
mov ebx, eax
mov rdi, r13
mov rdx, rbx
mov r14, r8
call _memcpy
mov r8, r14
add r13, rbx
mov rbx, r13
mov r14d, [rbp+var_34]
jmp loc_3C77F
loc_3C8A4:
mov rcx, rbx
mov rax, [rbp+var_48]
mov edx, [rbp+var_30]
mov [rax], dl
inc rax
mov [rbp+var_48], rax
mov eax, r8d
add r12, rax
add r15, 38h ; '8'
test r14d, r14d
mov rbx, [rbp+var_40]
jnz loc_3C63B
jmp short loc_3C8E6
loc_3C8D0:
mov rcx, rbx
cmp [rbp+var_2C], 1
jz short loc_3C8E2
mov rax, [rbp+var_48]
mov edx, [rbp+var_30]
mov [rax], dl
loc_3C8E2:
mov rbx, [rbp+var_40]
loc_3C8E6:
mov rdx, [rbp+var_60]
mov rax, [rdx]
cmp qword ptr [rax+6A8h], 0
jz short loc_3C902
mov al, [rdx+0B0h]
mov [rcx], al
inc rcx
loc_3C902:
sub ecx, ebx
mov rax, rcx
loc_3C907:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3C916:
call _my_thread_var
mov dword ptr [rax], 7Fh
xor eax, eax
jmp short loc_3C907
|
long long ma_rec_pack(unsigned __int8 *a1, unsigned __int8 *a2, unsigned __int8 *a3)
{
unsigned __int8 *v4; // rbx
long long v5; // rax
long long v6; // rdx
unsigned __int8 *v7; // r14
long long v8; // r15
unsigned __int8 *v9; // r13
long long v10; // rcx
unsigned __int8 *v11; // rcx
int v12; // r14d
long long v13; // r8
unsigned int v14; // ecx
long long v15; // rcx
unsigned __int8 *v16; // r13
long long v17; // rbx
int v18; // eax
long long v19; // r13
unsigned __int8 *v20; // rax
unsigned __int8 *v21; // rcx
unsigned int v22; // eax
long long v23; // r13
unsigned int v24; // eax
unsigned __int8 *v25; // rbx
unsigned int v26; // eax
bool v27; // cl
unsigned __int8 *v28; // rdi
long long v29; // rbx
bool v30; // zf
unsigned __int8 v31; // cl
long long v32; // r13
long long v33; // r13
long long v34; // rcx
unsigned __int8 *v35; // r13
long long v36; // rbx
long long v37; // r14
unsigned __int8 *v39; // [rsp+0h] [rbp-60h]
long long v40; // [rsp+8h] [rbp-58h]
long long v41; // [rsp+10h] [rbp-50h]
long long v42; // [rsp+10h] [rbp-50h]
unsigned __int8 *v43; // [rsp+18h] [rbp-48h]
int v44; // [rsp+20h] [rbp-40h]
int v45; // [rsp+2Ch] [rbp-34h]
unsigned int v46; // [rsp+30h] [rbp-30h]
int v47; // [rsp+34h] [rbp-2Ch]
v4 = a2;
v5 = *(_QWORD *)a1;
v6 = *(unsigned int *)(*(_QWORD *)a1 + 1020LL);
v7 = &a2[*(unsigned int *)(*(_QWORD *)a1 + 1012LL)];
v40 = *((_QWORD *)a1 + 81);
v8 = *(_QWORD *)(*(_QWORD *)a1 + 1416LL);
v39 = a1;
if ( *(_DWORD *)(*(_QWORD *)a1 + 1020LL) )
{
v9 = a1;
a1 = &a2[*(unsigned int *)(*(_QWORD *)a1 + 1012LL)];
a2 = a3;
memcpy(v7, a3, v6);
v5 = *(_QWORD *)v9;
v10 = *(unsigned int *)(*(_QWORD *)v9 + 1020LL);
a3 += v10;
v7 += v10;
}
v11 = v7;
v12 = *(_DWORD *)(v5 + 968);
if ( v12 )
{
v43 = v4;
v44 = (int)v4;
LABEL_5:
v47 = 1;
v46 = 0;
v4 = v11;
while ( 1 )
{
--v12;
v13 = *(unsigned __int16 *)(v8 + 8);
v14 = *(_DWORD *)v8;
if ( !*(_DWORD *)v8 )
goto LABEL_21;
if ( v14 == 3 )
{
a1 = a3;
a2 = (unsigned __int8 *)&maria_zero_string;
v19 = *(unsigned __int16 *)(v8 + 8);
if ( (unsigned int)bcmp(a3, &maria_zero_string, v19) )
{
a1 = v4;
a2 = a3;
memcpy(v4, a3, v19);
v4 += v19;
v18 = v47;
}
else
{
v18 = v47;
v46 |= v47;
}
v13 = v19;
}
else if ( v14 == 4 )
{
v15 = v40;
if ( *(_QWORD *)(v40 + 16) )
{
v16 = v4;
v17 = (unsigned int)(v13 - 8);
v41 = *(unsigned __int16 *)(v8 + 8);
memcpy(v16, a3, v17);
a2 = *(unsigned __int8 **)&a3[v17];
a1 = &v16[v17];
memcpy(&v16[v17], a2, *(_QWORD *)(v40 + 16));
v13 = v41;
v4 = &v16[*(_QWORD *)(v40 + 16) + v17];
v15 = v40;
v18 = v47;
}
else
{
v18 = v47;
v46 |= v47;
}
v40 = v15 + 24;
}
else
{
if ( v14 > 2 )
{
if ( v14 == 8 )
{
if ( (unsigned int)v13 <= 0x100 )
{
v22 = *a3;
goto LABEL_35;
}
v22 = *(unsigned __int16 *)a3;
if ( v22 > 0xFE )
{
*v4 = -1;
v4[2] = v22;
v4[1] = BYTE1(v22);
v25 = v4 + 3;
}
else
{
LABEL_35:
*v4 = v22;
v25 = v4 + 1;
}
v34 = *(unsigned __int16 *)(v8 + 8);
if ( v22 > (unsigned int)v34 )
{
*(_DWORD *)my_thread_var(a1, a2, v6, v34, v13) = 127;
return 0LL;
}
a2 = &a3[-((unsigned int)v13 < 0x101) + 2];
v45 = v12;
v35 = v25;
v36 = v22;
a1 = v35;
v37 = v13;
memcpy(v35, a2, v22);
v13 = v37;
v4 = &v35[v36];
v12 = v45;
goto LABEL_28;
}
LABEL_21:
a1 = v4;
a2 = a3;
v23 = *(unsigned __int16 *)(v8 + 8);
memcpy(v4, a3, v23);
v13 = v23;
v4 += v23;
goto LABEL_28;
}
v20 = &a3[v13];
if ( v14 == 1 )
{
do
{
v21 = v20;
if ( v20 <= a3 )
break;
--v20;
}
while ( *(v21 - 1) == 32 );
a2 = a3;
LODWORD(v20) = (_DWORD)v21;
}
else
{
a2 = a3;
if ( *(_WORD *)(v8 + 8) )
{
do
{
if ( *a2 != 32 )
break;
++a2;
}
while ( a2 < v20 );
}
else
{
a2 = a3;
}
}
v26 = (_DWORD)v20 - (_DWORD)a2;
v27 = (unsigned int)v13 >= 0x100 && v26 > 0x7F;
if ( v26 + v27 + 1 >= (unsigned int)v13 )
{
a1 = v4;
a2 = a3;
v33 = *(unsigned __int16 *)(v8 + 8);
memcpy(v4, a3, v33);
v13 = v33;
v4 += v33;
v18 = v47;
}
else
{
v28 = v4;
v29 = 1LL;
v30 = !v27;
v42 = *(unsigned __int16 *)(v8 + 8);
v31 = v26;
if ( !v30 )
{
v31 = v26 | 0x80;
v28[1] = v26 >> 7;
v29 = 2LL;
}
*v28 = v31;
v32 = v26;
a1 = &v28[v29];
memcpy(a1, a2, v26);
v4 = &a1[v32];
v18 = v47;
v46 |= v47;
v13 = v42;
}
}
v24 = 2 * v18;
if ( v24 > 0xFF )
{
v11 = v4;
v6 = v46;
*v43++ = v46;
a3 += (unsigned int)v13;
v8 += 56LL;
LODWORD(v4) = v44;
if ( v12 )
goto LABEL_5;
break;
}
v47 = v24;
LABEL_28:
a3 += v13;
v8 += 56LL;
if ( !v12 )
{
v11 = v4;
if ( v47 != 1 )
*v43 = v46;
LODWORD(v4) = v44;
break;
}
}
}
if ( *(_QWORD *)(*(_QWORD *)v39 + 1704LL) )
{
*v11 = v39[176];
LODWORD(v11) = (_DWORD)v11 + 1;
}
return (unsigned int)((_DWORD)v11 - (_DWORD)v4);
}
|
_ma_rec_pack:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R12,RDX
MOV RBX,RSI
MOV RAX,qword ptr [RDI]
MOV R14D,dword ptr [RAX + 0x3f4]
MOV EDX,dword ptr [RAX + 0x3fc]
ADD R14,RSI
MOV RCX,qword ptr [RDI + 0x288]
MOV qword ptr [RBP + -0x58],RCX
MOV R15,qword ptr [RAX + 0x588]
TEST RDX,RDX
MOV qword ptr [RBP + -0x60],RDI
JZ 0x0013c620
MOV R13,RDI
MOV RDI,R14
MOV RSI,R12
CALL 0x00129080
MOV RAX,qword ptr [R13]
MOV ECX,dword ptr [RAX + 0x3fc]
ADD R12,RCX
ADD R14,RCX
LAB_0013c620:
MOV RCX,R14
MOV R14D,dword ptr [RAX + 0x3c8]
TEST R14D,R14D
JZ 0x0013c8e6
MOV qword ptr [RBP + -0x48],RBX
MOV qword ptr [RBP + -0x40],RBX
LAB_0013c63b:
MOV dword ptr [RBP + -0x2c],0x1
MOV dword ptr [RBP + -0x30],0x0
MOV RBX,RCX
LAB_0013c64c:
DEC R14D
MOVZX R8D,word ptr [R15 + 0x8]
MOV ECX,dword ptr [R15]
TEST ECX,ECX
JZ 0x0013c73d
CMP ECX,0x3
JZ 0x0013c6ca
CMP ECX,0x4
JNZ 0x0013c6f9
MOV RCX,qword ptr [RBP + -0x58]
CMP qword ptr [RCX + 0x10],0x0
JZ 0x0013c761
MOV dword ptr [RBP + -0x34],R14D
MOV R14,RCX
MOV R13,RBX
LEA EBX,[R8 + -0x8]
MOV RDI,R13
MOV RSI,R12
MOV RDX,RBX
MOV qword ptr [RBP + -0x50],R8
CALL 0x00129080
MOV RSI,qword ptr [R12 + RBX*0x1]
LEA RDI,[RBX + R13*0x1]
MOV RDX,qword ptr [R14 + 0x10]
CALL 0x00129080
MOV R8,qword ptr [RBP + -0x50]
ADD RBX,qword ptr [R14 + 0x10]
ADD R13,RBX
MOV RBX,R13
MOV RCX,R14
MOV R14D,dword ptr [RBP + -0x34]
MOV EAX,dword ptr [RBP + -0x2c]
JMP 0x0013c767
LAB_0013c6ca:
MOV RDI,R12
LEA RSI,[0x4fcef0]
MOV RDX,R8
MOV R13,R8
CALL 0x00129560
TEST EAX,EAX
JZ 0x0013c756
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
CALL 0x00129080
ADD RBX,R13
MOV EAX,dword ptr [RBP + -0x2c]
JMP 0x0013c75c
LAB_0013c6f9:
CMP ECX,0x2
JA 0x0013c728
LEA RAX,[R12 + R8*0x1]
CMP ECX,0x1
JNZ 0x0013c794
LAB_0013c70b:
MOV RCX,RAX
CMP RAX,R12
JBE 0x0013c71d
LEA RAX,[RCX + -0x1]
CMP byte ptr [RCX + -0x1],0x20
JZ 0x0013c70b
LAB_0013c71d:
MOV RSI,R12
MOV RAX,RCX
JMP 0x0013c7c8
LAB_0013c728:
CMP ECX,0x8
JNZ 0x0013c73d
CMP R8D,0x100
JA 0x0013c7ab
MOVZX EAX,byte ptr [R12]
JMP 0x0013c7bb
LAB_0013c73d:
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R8
MOV R13,R8
CALL 0x00129080
MOV R8,R13
ADD RBX,R13
JMP 0x0013c77f
LAB_0013c756:
MOV EAX,dword ptr [RBP + -0x2c]
OR dword ptr [RBP + -0x30],EAX
LAB_0013c75c:
MOV R8,R13
JMP 0x0013c76f
LAB_0013c761:
MOV EAX,dword ptr [RBP + -0x2c]
OR dword ptr [RBP + -0x30],EAX
LAB_0013c767:
ADD RCX,0x18
MOV qword ptr [RBP + -0x58],RCX
LAB_0013c76f:
ADD EAX,EAX
CMP EAX,0xff
JA 0x0013c8a4
MOV dword ptr [RBP + -0x2c],EAX
LAB_0013c77f:
ADD R12,R8
ADD R15,0x38
TEST R14D,R14D
JNZ 0x0013c64c
JMP 0x0013c8d0
LAB_0013c794:
MOV RSI,R12
TEST R8,R8
JZ 0x0013c7c5
LAB_0013c79c:
CMP byte ptr [RSI],0x20
JNZ 0x0013c7c8
INC RSI
CMP RSI,RAX
JC 0x0013c79c
JMP 0x0013c7c8
LAB_0013c7ab:
MOVZX EAX,word ptr [R12]
CMP EAX,0xfe
JA 0x0013c84f
LAB_0013c7bb:
MOV byte ptr [RBX],AL
INC RBX
JMP 0x0013c85c
LAB_0013c7c5:
MOV RSI,R12
LAB_0013c7c8:
SUB RAX,RSI
CMP R8D,0x100
SETNC DL
CMP EAX,0x7f
SETA CL
AND CL,DL
MOVZX EDX,CL
ADD EDX,EAX
INC EDX
CMP EDX,R8D
JNC 0x0013c830
MOV RDI,RBX
MOV EBX,0x1
TEST CL,CL
MOV qword ptr [RBP + -0x50],R8
MOV ECX,EAX
JZ 0x0013c80b
OR CL,0x80
MOV EDX,EAX
SHR EDX,0x7
MOV byte ptr [RDI + 0x1],DL
MOV EBX,0x2
LAB_0013c80b:
ADD RBX,RDI
MOV byte ptr [RDI],CL
MOV R13D,EAX
MOV RDI,RBX
MOV RDX,R13
CALL 0x00129080
ADD RBX,R13
MOV EAX,dword ptr [RBP + -0x2c]
OR dword ptr [RBP + -0x30],EAX
MOV R8,qword ptr [RBP + -0x50]
JMP 0x0013c76f
LAB_0013c830:
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R8
MOV R13,R8
CALL 0x00129080
MOV R8,R13
ADD RBX,R13
MOV EAX,dword ptr [RBP + -0x2c]
JMP 0x0013c76f
LAB_0013c84f:
MOV byte ptr [RBX],0xff
MOV byte ptr [RBX + 0x2],AL
MOV byte ptr [RBX + 0x1],AH
ADD RBX,0x3
LAB_0013c85c:
MOVZX ECX,word ptr [R15 + 0x8]
CMP EAX,ECX
JA 0x0013c916
CMP R8D,0x101
MOV RSI,R12
SBB RSI,0x0
ADD RSI,0x2
MOV dword ptr [RBP + -0x34],R14D
MOV R13,RBX
MOV EBX,EAX
MOV RDI,R13
MOV RDX,RBX
MOV R14,R8
CALL 0x00129080
MOV R8,R14
ADD R13,RBX
MOV RBX,R13
MOV R14D,dword ptr [RBP + -0x34]
JMP 0x0013c77f
LAB_0013c8a4:
MOV RCX,RBX
MOV RAX,qword ptr [RBP + -0x48]
MOV EDX,dword ptr [RBP + -0x30]
MOV byte ptr [RAX],DL
INC RAX
MOV qword ptr [RBP + -0x48],RAX
MOV EAX,R8D
ADD R12,RAX
ADD R15,0x38
TEST R14D,R14D
MOV RBX,qword ptr [RBP + -0x40]
JNZ 0x0013c63b
JMP 0x0013c8e6
LAB_0013c8d0:
MOV RCX,RBX
CMP dword ptr [RBP + -0x2c],0x1
JZ 0x0013c8e2
MOV RAX,qword ptr [RBP + -0x48]
MOV EDX,dword ptr [RBP + -0x30]
MOV byte ptr [RAX],DL
LAB_0013c8e2:
MOV RBX,qword ptr [RBP + -0x40]
LAB_0013c8e6:
MOV RDX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RDX]
CMP qword ptr [RAX + 0x6a8],0x0
JZ 0x0013c902
MOV AL,byte ptr [RDX + 0xb0]
MOV byte ptr [RCX],AL
INC RCX
LAB_0013c902:
SUB ECX,EBX
MOV RAX,RCX
LAB_0013c907:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013c916:
CALL 0x001a1afa
MOV dword ptr [RAX],0x7f
XOR EAX,EAX
JMP 0x0013c907
|
int _ma_rec_pack(long *param_1,int1 *param_2,ushort *param_3)
{
ushort uVar1;
ushort uVar2;
ushort *puVar3;
int iVar4;
uint uVar5;
ulong uVar6;
int1 *puVar8;
int4 *puVar9;
byte bVar10;
long lVar11;
ushort *puVar12;
uint uVar13;
ulong __n;
int iVar14;
byte *pbVar15;
uint *puVar16;
long local_60;
uint local_38;
uint local_34;
ushort *puVar7;
lVar11 = *param_1;
pbVar15 = param_2 + *(uint *)(lVar11 + 0x3f4);
local_60 = param_1[0x51];
puVar16 = *(uint **)(lVar11 + 0x588);
if ((ulong)*(uint *)(lVar11 + 0x3fc) != 0) {
memcpy(pbVar15,param_3,(ulong)*(uint *)(lVar11 + 0x3fc));
lVar11 = *param_1;
param_3 = (ushort *)((long)param_3 + (ulong)*(uint *)(lVar11 + 0x3fc));
pbVar15 = pbVar15 + *(uint *)(lVar11 + 0x3fc);
}
iVar14 = *(int *)(lVar11 + 0x3c8);
puVar8 = param_2;
joined_r0x0013c62d:
if (iVar14 == 0) {
LAB_0013c8e6:
if (*(long *)(*param_1 + 0x6a8) != 0) {
*pbVar15 = *(byte *)(param_1 + 0x16);
pbVar15 = pbVar15 + 1;
}
return (int)pbVar15 - (int)param_2;
}
local_34 = 1;
local_38 = 0;
do {
iVar14 = iVar14 + -1;
uVar1 = (ushort)puVar16[2];
__n = (ulong)uVar1;
uVar5 = *puVar16;
if (uVar5 == 0) {
LAB_0013c73d:
memcpy(pbVar15,param_3,__n);
pbVar15 = pbVar15 + __n;
}
else {
if (uVar5 == 3) {
iVar4 = bcmp(param_3,maria_zero_string,__n);
if (iVar4 == 0) {
local_38 = local_38 | local_34;
}
else {
memcpy(pbVar15,param_3,__n);
pbVar15 = pbVar15 + __n;
}
}
else if (uVar5 == 4) {
if (*(long *)(local_60 + 0x10) == 0) {
local_38 = local_38 | local_34;
}
else {
uVar6 = (ulong)(uVar1 - 8);
memcpy(pbVar15,param_3,uVar6);
memcpy(pbVar15 + uVar6,*(void **)((long)param_3 + uVar6),*(size_t *)(local_60 + 0x10));
pbVar15 = pbVar15 + uVar6 + *(long *)(local_60 + 0x10);
}
local_60 = local_60 + 0x18;
}
else {
if (2 < uVar5) {
if (uVar5 != 8) goto LAB_0013c73d;
if (uVar1 < 0x101) {
uVar5 = (uint)(byte)*param_3;
LAB_0013c7bb:
uVar13 = uVar5;
*pbVar15 = (byte)uVar13;
pbVar15 = pbVar15 + 1;
}
else {
uVar2 = *param_3;
uVar13 = (uint)uVar2;
uVar5 = (uint)uVar2;
if (uVar2 < 0xff) goto LAB_0013c7bb;
*pbVar15 = 0xff;
pbVar15[2] = (byte)uVar2;
pbVar15[1] = (byte)(uVar2 >> 8);
pbVar15 = pbVar15 + 3;
}
if ((ushort)puVar16[2] < uVar13) {
puVar9 = (int4 *)_my_thread_var();
*puVar9 = 0x7f;
return 0;
}
memcpy(pbVar15,(byte *)((long)param_3 + (2 - (ulong)(uVar1 < 0x101))),(ulong)uVar13);
pbVar15 = pbVar15 + uVar13;
goto LAB_0013c77f;
}
puVar7 = (ushort *)((long)param_3 + __n);
puVar3 = puVar7;
puVar12 = param_3;
if (uVar5 == 1) {
do {
puVar7 = puVar3;
if (puVar7 <= param_3) break;
puVar3 = (ushort *)((long)puVar7 + -1);
} while (*(byte *)((long)puVar7 + -1) == 0x20);
}
else if (__n != 0) {
do {
if ((byte)*puVar12 != 0x20) break;
puVar12 = (ushort *)((long)puVar12 + 1);
} while (puVar12 < puVar7);
}
uVar6 = (long)puVar7 - (long)puVar12;
uVar13 = (uint)uVar1;
uVar5 = (uint)uVar6;
if ((0x7f < uVar5 && 0xff < uVar13) + uVar5 + 1 < uVar13) {
lVar11 = 1;
bVar10 = (byte)uVar6;
if (0x7f < uVar5 && 0xff < uVar13) {
bVar10 = bVar10 | 0x80;
pbVar15[1] = (byte)(uVar6 >> 7);
lVar11 = 2;
}
*pbVar15 = bVar10;
memcpy(pbVar15 + lVar11,puVar12,uVar6 & 0xffffffff);
pbVar15 = pbVar15 + lVar11 + (uVar6 & 0xffffffff);
local_38 = local_38 | local_34;
}
else {
memcpy(pbVar15,param_3,__n);
pbVar15 = pbVar15 + __n;
}
}
local_34 = local_34 * 2;
if (0xff < local_34) break;
}
LAB_0013c77f:
param_3 = (ushort *)((long)param_3 + __n);
puVar16 = puVar16 + 0xe;
if (iVar14 == 0) {
if (local_34 != 1) {
*puVar8 = (char)local_38;
}
goto LAB_0013c8e6;
}
} while( true );
*puVar8 = (char)local_38;
puVar8 = puVar8 + 1;
param_3 = (ushort *)((long)param_3 + __n);
puVar16 = puVar16 + 0xe;
goto joined_r0x0013c62d;
}
|
|
61,057
|
ImPlot3D::ShowPlaneContextMenu(ImPlot3DPlot&, int)
|
zkingston[P]unknot/build_O0/_deps/implot3d-src/implot3d.cpp
|
void ShowPlaneContextMenu(ImPlot3DPlot& plot, int plane_idx) {
for (int i = 0; i < 3; i++) {
if (i == plane_idx)
continue;
ImPlot3DAxis& axis = plot.Axes[i];
ImGui::PushID(i);
if (ImGui::BeginMenu(axis.HasLabel() ? axis.GetLabel() : axis_labels[i])) {
ShowAxisContextMenu(axis);
ImGui::EndMenu();
}
ImGui::PopID();
}
}
|
O0
|
cpp
|
ImPlot3D::ShowPlaneContextMenu(ImPlot3DPlot&, int):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
cmpl $0x3, 0x18(%rsp)
jge 0xcf7d1
movl 0x18(%rsp), %eax
cmpl 0x1c(%rsp), %eax
jne 0xcf73f
jmp 0xcf7c1
movq 0x20(%rsp), %rax
addq $0x78, %rax
movslq 0x18(%rsp), %rcx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movl 0x18(%rsp), %edi
callq 0x513490
movq 0x10(%rsp), %rdi
callq 0xcd430
testb $0x1, %al
jne 0xcf772
jmp 0xcf783
movq 0x10(%rsp), %rdi
callq 0xd8cc0
movq %rax, 0x8(%rsp)
jmp 0xcf798
movslq 0x18(%rsp), %rcx
leaq 0x5be841(%rip), %rax # 0x68dfd0
movq (%rax,%rcx,8), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0x58e6c0
testb $0x1, %al
jne 0xcf7ad
jmp 0xcf7bc
movq 0x10(%rsp), %rdi
callq 0xcf280
callq 0x58e6f0
callq 0x513660
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0xcf725
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
|
_ZN8ImPlot3D20ShowPlaneContextMenuER12ImPlot3DPloti:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov dword ptr [rsp+28h+var_10+4], esi
mov dword ptr [rsp+28h+var_10], 0
loc_CF725:
cmp dword ptr [rsp+28h+var_10], 3
jge loc_CF7D1
mov eax, dword ptr [rsp+28h+var_10]
cmp eax, dword ptr [rsp+28h+var_10+4]
jnz short loc_CF73F
jmp loc_CF7C1
loc_CF73F:
mov rax, [rsp+28h+var_8]
add rax, 78h ; 'x'
movsxd rcx, dword ptr [rsp+28h+var_10]
imul rcx, 70h ; 'p'
add rax, rcx
mov [rsp+28h+var_18], rax
mov edi, dword ptr [rsp+28h+var_10]; this
call _ZN5ImGui6PushIDEi; ImGui::PushID(int)
mov rdi, [rsp+28h+var_18]; this
call _ZNK12ImPlot3DAxis8HasLabelEv; ImPlot3DAxis::HasLabel(void)
test al, 1
jnz short loc_CF772
jmp short loc_CF783
loc_CF772:
mov rdi, [rsp+28h+var_18]; this
call _ZNK12ImPlot3DAxis8GetLabelEv; ImPlot3DAxis::GetLabel(void)
mov [rsp+28h+var_20], rax
jmp short loc_CF798
loc_CF783:
movsxd rcx, dword ptr [rsp+28h+var_10]
lea rax, _ZN8ImPlot3DL11axis_labelsE; ImPlot3D::axis_labels
mov rax, [rax+rcx*8]
mov [rsp+28h+var_20], rax
loc_CF798:
mov rdi, [rsp+28h+var_20]; this
mov esi, (offset dword_0+1); ImPlot3DAxis *
call _ZN5ImGui9BeginMenuEPKcb; ImGui::BeginMenu(char const*,bool)
test al, 1
jnz short loc_CF7AD
jmp short loc_CF7BC
loc_CF7AD:
mov rdi, [rsp+28h+var_18]; this
call _ZN8ImPlot3D19ShowAxisContextMenuER12ImPlot3DAxis; ImPlot3D::ShowAxisContextMenu(ImPlot3DAxis &)
call _ZN5ImGui7EndMenuEv; ImGui::EndMenu(void)
loc_CF7BC:
call _ZN5ImGui5PopIDEv; ImGui::PopID(void)
loc_CF7C1:
mov eax, dword ptr [rsp+28h+var_10]
add eax, 1
mov dword ptr [rsp+28h+var_10], eax
jmp loc_CF725
loc_CF7D1:
add rsp, 28h
retn
|
void ImPlot3D::ShowPlaneContextMenu(ImPlot3D *this, ImPlot3DPlot *a2)
{
bool v2; // dl
ImGui *v3; // rdi
ImGui *Label; // [rsp+8h] [rbp-20h]
ImPlot3DAxis *v5; // [rsp+10h] [rbp-18h]
int i; // [rsp+18h] [rbp-10h]
int v7; // [rsp+1Ch] [rbp-Ch]
v7 = (int)a2;
for ( i = 0; i < 3; ++i )
{
if ( i != v7 )
{
v5 = (ImPlot3D *)((char *)this + 112 * i + 120);
ImGui::PushID((ImGui *)(unsigned int)i, (int)a2);
if ( (ImPlot3DAxis::HasLabel(v5) & 1) != 0 )
Label = (ImGui *)ImPlot3DAxis::GetLabel(v5);
else
Label = (ImGui *)ImPlot3D::axis_labels[i];
v3 = Label;
a2 = (ImPlot3DPlot *)((char *)&dword_0 + 1);
if ( (ImGui::BeginMenu(Label, (const char *)&dword_0 + 1, v2) & 1) != 0 )
{
v3 = (ImPlot3D *)((char *)this + 112 * i + 120);
ImPlot3D::ShowAxisContextMenu(v5, (ImPlot3DAxis *)((char *)&dword_0 + 1));
ImGui::EndMenu(v5);
}
ImGui::PopID(v3);
}
}
}
|
ShowPlaneContextMenu:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV dword ptr [RSP + 0x1c],ESI
MOV dword ptr [RSP + 0x18],0x0
LAB_001cf725:
CMP dword ptr [RSP + 0x18],0x3
JGE 0x001cf7d1
MOV EAX,dword ptr [RSP + 0x18]
CMP EAX,dword ptr [RSP + 0x1c]
JNZ 0x001cf73f
JMP 0x001cf7c1
LAB_001cf73f:
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,0x78
MOVSXD RCX,dword ptr [RSP + 0x18]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOV qword ptr [RSP + 0x10],RAX
MOV EDI,dword ptr [RSP + 0x18]
CALL 0x00613490
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x001cd430
TEST AL,0x1
JNZ 0x001cf772
JMP 0x001cf783
LAB_001cf772:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x001d8cc0
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001cf798
LAB_001cf783:
MOVSXD RCX,dword ptr [RSP + 0x18]
LEA RAX,[0x78dfd0]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RSP + 0x8],RAX
LAB_001cf798:
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,0x1
CALL 0x0068e6c0
TEST AL,0x1
JNZ 0x001cf7ad
JMP 0x001cf7bc
LAB_001cf7ad:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x001cf280
CALL 0x0068e6f0
LAB_001cf7bc:
CALL 0x00613660
LAB_001cf7c1:
MOV EAX,dword ptr [RSP + 0x18]
ADD EAX,0x1
MOV dword ptr [RSP + 0x18],EAX
JMP 0x001cf725
LAB_001cf7d1:
ADD RSP,0x28
RET
|
/* ImPlot3D::ShowPlaneContextMenu(ImPlot3DPlot&, int) */
void ImPlot3D::ShowPlaneContextMenu(ImPlot3DPlot *param_1,int param_2)
{
ImPlot3DAxis *this;
ulong uVar1;
char *local_20;
int local_10;
for (local_10 = 0; local_10 < 3; local_10 = local_10 + 1) {
if (local_10 != param_2) {
this = (ImPlot3DAxis *)(param_1 + (long)local_10 * 0x70 + 0x78);
ImGui::PushID(local_10);
uVar1 = ImPlot3DAxis::HasLabel(this);
if ((uVar1 & 1) == 0) {
local_20 = *(char **)(axis_labels + (long)local_10 * 8);
}
else {
local_20 = (char *)ImPlot3DAxis::GetLabel(this);
}
uVar1 = ImGui::BeginMenu(local_20,true);
if ((uVar1 & 1) != 0) {
ShowAxisContextMenu(this);
ImGui::EndMenu();
}
ImGui::PopID();
}
}
return;
}
|
|
61,058
|
LefDefParser::defiPin::addAPinPartialMetalSideArea(int, char const*)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiPinCap.cpp
|
void defiPin::addAPinPartialMetalSideArea(int value, const char* layer) {
if (numAPinPartialMetalSideArea_ == APinPartialMetalSideAreaAllocated_) {
int i;
int max;
int lim = numAPinPartialMetalSideArea_;
int* nd;
char** nl;
if (APinPartialMetalSideAreaAllocated_ == 0)
max = APinPartialMetalSideAreaAllocated_ = 2;
else
max = APinPartialMetalSideAreaAllocated_ *= 2;
nd = (int*)malloc(sizeof(int)*max);
nl = (char**)malloc(sizeof(char*)*max);
for (i = 0; i < lim; i++) {
nd[i] = APinPartialMetalSideArea_[i];
nl[i] = APinPartialMetalSideAreaLayer_[i];
}
free((char*)(APinPartialMetalSideArea_));
free((char*)(APinPartialMetalSideAreaLayer_));
APinPartialMetalSideArea_ = nd;
APinPartialMetalSideAreaLayer_ = nl;
}
APinPartialMetalSideArea_[numAPinPartialMetalSideArea_] = value;
if (layer) {
APinPartialMetalSideAreaLayer_[numAPinPartialMetalSideArea_] =
(char*)malloc(strlen(layer)+1);
strcpy(APinPartialMetalSideAreaLayer_[numAPinPartialMetalSideArea_],
defData->DEFCASE(layer));
} else
APinPartialMetalSideAreaLayer_[numAPinPartialMetalSideArea_] = NULL;
numAPinPartialMetalSideArea_ += 1;
}
|
O3
|
cpp
|
LefDefParser::defiPin::addAPinPartialMetalSideArea(int, char const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
movl 0x128(%rdi), %r13d
cmpl 0x12c(%rdi), %r13d
jne 0x1e3e6
leal (,%r13,2), %eax
testl %r13d, %r13d
movl $0x2, %ecx
cmovnel %eax, %ecx
movl %ecx, 0x12c(%rbx)
movslq %ecx, %r12
leaq (,%r12,4), %rdi
callq 0x7270
movq %rax, %r15
shlq $0x3, %r12
movq %r12, %rdi
callq 0x7270
movq %rax, %r12
movq 0x130(%rbx), %rdi
testl %r13d, %r13d
jle 0x1e3be
movq 0x138(%rbx), %rax
xorl %ecx, %ecx
movl (%rdi,%rcx,4), %edx
movl %edx, (%r15,%rcx,4)
movq (%rax,%rcx,8), %rdx
movq %rdx, (%r12,%rcx,8)
incq %rcx
cmpq %rcx, %r13
jne 0x1e3a7
callq 0x7220
movq 0x138(%rbx), %rdi
callq 0x7220
movq %r15, 0x130(%rbx)
movq %r12, 0x138(%rbx)
movl 0x128(%rbx), %r13d
jmp 0x1e3ed
movq 0x130(%rbx), %r15
movslq %r13d, %rax
movl %ebp, (%r15,%rax,4)
testq %r14, %r14
je 0x1e449
movq %r14, %rdi
callq 0x70d0
leaq 0x1(%rax), %rdi
callq 0x7270
movq 0x138(%rbx), %rcx
movslq 0x128(%rbx), %rdx
movq %rax, (%rcx,%rdx,8)
movq 0x138(%rbx), %rax
movq 0x1a0(%rbx), %rdi
movq (%rax,%rdx,8), %r15
movq %r14, %rsi
callq 0x1b638
movq %r15, %rdi
movq %rax, %rsi
callq 0x7190
movl 0x128(%rbx), %eax
jmp 0x1e45f
movq 0x138(%rbx), %rcx
movslq 0x128(%rbx), %rax
movq $0x0, (%rcx,%rax,8)
incl %eax
movl %eax, 0x128(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ZN12LefDefParser7defiPin27addAPinPartialMetalSideAreaEiPKc:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rdx
mov ebp, esi
mov rbx, rdi
mov r13d, [rdi+128h]
cmp r13d, [rdi+12Ch]
jnz loc_1E3E6
lea eax, ds:0[r13*2]
test r13d, r13d
mov ecx, 2
cmovnz ecx, eax
mov [rbx+12Ch], ecx
movsxd r12, ecx
lea rdi, ds:0[r12*4]
call _malloc
mov r15, rax
shl r12, 3
mov rdi, r12
call _malloc
mov r12, rax
mov rdi, [rbx+130h]
test r13d, r13d
jle short loc_1E3BE
mov rax, [rbx+138h]
xor ecx, ecx
loc_1E3A7:
mov edx, [rdi+rcx*4]
mov [r15+rcx*4], edx
mov rdx, [rax+rcx*8]
mov [r12+rcx*8], rdx
inc rcx
cmp r13, rcx
jnz short loc_1E3A7
loc_1E3BE:
call _free
mov rdi, [rbx+138h]
call _free
mov [rbx+130h], r15
mov [rbx+138h], r12
mov r13d, [rbx+128h]
jmp short loc_1E3ED
loc_1E3E6:
mov r15, [rbx+130h]
loc_1E3ED:
movsxd rax, r13d
mov [r15+rax*4], ebp
test r14, r14
jz short loc_1E449
mov rdi, r14
call _strlen
lea rdi, [rax+1]
call _malloc
mov rcx, [rbx+138h]
movsxd rdx, dword ptr [rbx+128h]
mov [rcx+rdx*8], rax
mov rax, [rbx+138h]
mov rdi, [rbx+1A0h]; this
mov r15, [rax+rdx*8]
mov rsi, r14; char *
call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*)
mov rdi, r15
mov rsi, rax
call _strcpy
mov eax, [rbx+128h]
jmp short loc_1E45F
loc_1E449:
mov rcx, [rbx+138h]
movsxd rax, dword ptr [rbx+128h]
mov qword ptr [rcx+rax*8], 0
loc_1E45F:
inc eax
mov [rbx+128h], eax
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long LefDefParser::defiPin::addAPinPartialMetalSideArea(
LefDefParser::defiPin *this,
int a2,
const char *a3)
{
long long v5; // r13
int v6; // ecx
long long v7; // r12
long long v8; // r15
long long v9; // r12
_DWORD *v10; // rdi
long long v11; // rax
long long i; // rcx
long long v13; // rax
long long v14; // rax
long long v15; // rdx
long long v16; // r15
const char *v17; // rax
long long v18; // rax
long long result; // rax
v5 = *((unsigned int *)this + 74);
if ( (_DWORD)v5 == *((_DWORD *)this + 75) )
{
v6 = 2;
if ( (_DWORD)v5 )
v6 = 2 * v5;
*((_DWORD *)this + 75) = v6;
v7 = v6;
v8 = malloc(4LL * v6);
v9 = malloc(8 * v7);
v10 = (_DWORD *)*((_QWORD *)this + 38);
if ( (int)v5 > 0 )
{
v11 = *((_QWORD *)this + 39);
for ( i = 0LL; i != v5; ++i )
{
*(_DWORD *)(v8 + 4 * i) = v10[i];
*(_QWORD *)(v9 + 8 * i) = *(_QWORD *)(v11 + 8 * i);
}
}
free(v10);
free(*((void **)this + 39));
*((_QWORD *)this + 38) = v8;
*((_QWORD *)this + 39) = v9;
LODWORD(v5) = *((_DWORD *)this + 74);
}
else
{
v8 = *((_QWORD *)this + 38);
}
*(_DWORD *)(v8 + 4LL * (int)v5) = a2;
if ( a3 )
{
v13 = strlen(a3);
v14 = malloc(v13 + 1);
v15 = *((int *)this + 74);
*(_QWORD *)(*((_QWORD *)this + 39) + 8 * v15) = v14;
v16 = *(_QWORD *)(*((_QWORD *)this + 39) + 8 * v15);
v17 = LefDefParser::defrData::DEFCASE(*((LefDefParser::defrData **)this + 52), a3);
strcpy(v16, v17);
LODWORD(v18) = *((_DWORD *)this + 74);
}
else
{
v18 = *((int *)this + 74);
*(_QWORD *)(*((_QWORD *)this + 39) + 8 * v18) = 0LL;
}
result = (unsigned int)(v18 + 1);
*((_DWORD *)this + 74) = result;
return result;
}
|
addAPinPartialMetalSideArea:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV EBP,ESI
MOV RBX,RDI
MOV R13D,dword ptr [RDI + 0x128]
CMP R13D,dword ptr [RDI + 0x12c]
JNZ 0x0011e3e6
LEA EAX,[R13*0x2]
TEST R13D,R13D
MOV ECX,0x2
CMOVNZ ECX,EAX
MOV dword ptr [RBX + 0x12c],ECX
MOVSXD R12,ECX
LEA RDI,[R12*0x4]
CALL 0x00107270
MOV R15,RAX
SHL R12,0x3
MOV RDI,R12
CALL 0x00107270
MOV R12,RAX
MOV RDI,qword ptr [RBX + 0x130]
TEST R13D,R13D
JLE 0x0011e3be
MOV RAX,qword ptr [RBX + 0x138]
XOR ECX,ECX
LAB_0011e3a7:
MOV EDX,dword ptr [RDI + RCX*0x4]
MOV dword ptr [R15 + RCX*0x4],EDX
MOV RDX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [R12 + RCX*0x8],RDX
INC RCX
CMP R13,RCX
JNZ 0x0011e3a7
LAB_0011e3be:
CALL 0x00107220
MOV RDI,qword ptr [RBX + 0x138]
CALL 0x00107220
MOV qword ptr [RBX + 0x130],R15
MOV qword ptr [RBX + 0x138],R12
MOV R13D,dword ptr [RBX + 0x128]
JMP 0x0011e3ed
LAB_0011e3e6:
MOV R15,qword ptr [RBX + 0x130]
LAB_0011e3ed:
MOVSXD RAX,R13D
MOV dword ptr [R15 + RAX*0x4],EBP
TEST R14,R14
JZ 0x0011e449
MOV RDI,R14
CALL 0x001070d0
LEA RDI,[RAX + 0x1]
CALL 0x00107270
MOV RCX,qword ptr [RBX + 0x138]
MOVSXD RDX,dword ptr [RBX + 0x128]
MOV qword ptr [RCX + RDX*0x8],RAX
MOV RAX,qword ptr [RBX + 0x138]
MOV RDI,qword ptr [RBX + 0x1a0]
MOV R15,qword ptr [RAX + RDX*0x8]
MOV RSI,R14
CALL 0x0011b638
MOV RDI,R15
MOV RSI,RAX
CALL 0x00107190
MOV EAX,dword ptr [RBX + 0x128]
JMP 0x0011e45f
LAB_0011e449:
MOV RCX,qword ptr [RBX + 0x138]
MOVSXD RAX,dword ptr [RBX + 0x128]
MOV qword ptr [RCX + RAX*0x8],0x0
LAB_0011e45f:
INC EAX
MOV dword ptr [RBX + 0x128],EAX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* LefDefParser::defiPin::addAPinPartialMetalSideArea(int, char const*) */
void __thiscall
LefDefParser::defiPin::addAPinPartialMetalSideArea(defiPin *this,int param_1,char *param_2)
{
void *__ptr;
long lVar1;
char *__dest;
int iVar2;
void *pvVar3;
void *pvVar4;
size_t sVar5;
char *__src;
ulong uVar6;
uint uVar7;
uVar7 = *(uint *)(this + 0x128);
if (uVar7 == *(uint *)(this + 300)) {
iVar2 = 2;
if (uVar7 != 0) {
iVar2 = uVar7 * 2;
}
*(int *)(this + 300) = iVar2;
pvVar3 = malloc((long)iVar2 * 4);
pvVar4 = malloc((long)iVar2 << 3);
__ptr = *(void **)(this + 0x130);
if (0 < (int)uVar7) {
lVar1 = *(long *)(this + 0x138);
uVar6 = 0;
do {
*(int4 *)((long)pvVar3 + uVar6 * 4) = *(int4 *)((long)__ptr + uVar6 * 4);
*(int8 *)((long)pvVar4 + uVar6 * 8) = *(int8 *)(lVar1 + uVar6 * 8);
uVar6 = uVar6 + 1;
} while (uVar7 != uVar6);
}
free(__ptr);
free(*(void **)(this + 0x138));
*(void **)(this + 0x130) = pvVar3;
*(void **)(this + 0x138) = pvVar4;
uVar7 = *(uint *)(this + 0x128);
}
else {
pvVar3 = *(void **)(this + 0x130);
}
*(int *)((long)pvVar3 + (long)(int)uVar7 * 4) = param_1;
if (param_2 == (char *)0x0) {
iVar2 = *(int *)(this + 0x128);
*(int8 *)(*(long *)(this + 0x138) + (long)iVar2 * 8) = 0;
}
else {
sVar5 = strlen(param_2);
pvVar3 = malloc(sVar5 + 1);
iVar2 = *(int *)(this + 0x128);
*(void **)(*(long *)(this + 0x138) + (long)iVar2 * 8) = pvVar3;
__dest = *(char **)(*(long *)(this + 0x138) + (long)iVar2 * 8);
__src = (char *)defrData::DEFCASE(*(defrData **)(this + 0x1a0),param_2);
strcpy(__dest,__src);
iVar2 = *(int *)(this + 0x128);
}
*(int *)(this + 0x128) = iVar2 + 1;
return;
}
|
|
61,059
|
check_mb_utf8mb3_sequence
|
eloqsql/libmariadb/libmariadb/ma_charset.c
|
static unsigned int check_mb_utf8mb3_sequence(const char *start, const char *end)
{
uchar c;
if (start >= end) {
return 0;
}
c = (uchar) start[0];
if (c < 0x80) {
return 1; /* single byte character */
}
if (c < 0xC2) {
return 0; /* invalid mb character */
}
if (c < 0xE0) {
if (start + 2 > end) {
return 0; /* too small */
}
if (!(((uchar)start[1] ^ 0x80) < 0x40)) {
return 0;
}
return 2;
}
if (c < 0xF0) {
if (start + 3 > end) {
return 0; /* too small */
}
if (!(((uchar)start[1] ^ 0x80) < 0x40 && ((uchar)start[2] ^ 0x80) < 0x40 &&
(c >= 0xE1 || (uchar)start[1] >= 0xA0))) {
return 0; /* invalid utf8 character */
}
return 3;
}
return 0;
}
|
O0
|
c
|
check_mb_utf8mb3_sequence:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jb 0x683d2
movl $0x0, -0x4(%rbp)
jmp 0x684ce
movq -0x10(%rbp), %rax
movb (%rax), %al
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x80, %eax
jge 0x683f2
movl $0x1, -0x4(%rbp)
jmp 0x684ce
movzbl -0x19(%rbp), %eax
cmpl $0xc2, %eax
jge 0x68409
movl $0x0, -0x4(%rbp)
jmp 0x684ce
movzbl -0x19(%rbp), %eax
cmpl $0xe0, %eax
jge 0x68455
movq -0x10(%rbp), %rax
addq $0x2, %rax
cmpq -0x18(%rbp), %rax
jbe 0x6842e
movl $0x0, -0x4(%rbp)
jmp 0x684ce
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jl 0x6844c
movl $0x0, -0x4(%rbp)
jmp 0x684ce
movl $0x2, -0x4(%rbp)
jmp 0x684ce
movzbl -0x19(%rbp), %eax
cmpl $0xf0, %eax
jge 0x684c7
movq -0x10(%rbp), %rax
addq $0x3, %rax
cmpq -0x18(%rbp), %rax
jbe 0x68477
movl $0x0, -0x4(%rbp)
jmp 0x684ce
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x684b5
movq -0x10(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x684b5
movzbl -0x19(%rbp), %eax
cmpl $0xe1, %eax
jge 0x684be
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xa0, %eax
jge 0x684be
movl $0x0, -0x4(%rbp)
jmp 0x684ce
movl $0x3, -0x4(%rbp)
jmp 0x684ce
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
check_mb_utf8mb3_sequence:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
cmp rax, [rbp+var_18]
jb short loc_683D2
mov [rbp+var_4], 0
jmp loc_684CE
loc_683D2:
mov rax, [rbp+var_10]
mov al, [rax]
mov [rbp+var_19], al
movzx eax, [rbp+var_19]
cmp eax, 80h
jge short loc_683F2
mov [rbp+var_4], 1
jmp loc_684CE
loc_683F2:
movzx eax, [rbp+var_19]
cmp eax, 0C2h
jge short loc_68409
mov [rbp+var_4], 0
jmp loc_684CE
loc_68409:
movzx eax, [rbp+var_19]
cmp eax, 0E0h
jge short loc_68455
mov rax, [rbp+var_10]
add rax, 2
cmp rax, [rbp+var_18]
jbe short loc_6842E
mov [rbp+var_4], 0
jmp loc_684CE
loc_6842E:
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jl short loc_6844C
mov [rbp+var_4], 0
jmp loc_684CE
loc_6844C:
mov [rbp+var_4], 2
jmp short loc_684CE
loc_68455:
movzx eax, [rbp+var_19]
cmp eax, 0F0h
jge short loc_684C7
mov rax, [rbp+var_10]
add rax, 3
cmp rax, [rbp+var_18]
jbe short loc_68477
mov [rbp+var_4], 0
jmp short loc_684CE
loc_68477:
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_684B5
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_684B5
movzx eax, [rbp+var_19]
cmp eax, 0E1h
jge short loc_684BE
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
cmp eax, 0A0h
jge short loc_684BE
loc_684B5:
mov [rbp+var_4], 0
jmp short loc_684CE
loc_684BE:
mov [rbp+var_4], 3
jmp short loc_684CE
loc_684C7:
mov [rbp+var_4], 0
loc_684CE:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long check_mb_utf8mb3_sequence(unsigned __int8 *a1, unsigned long long a2)
{
unsigned __int8 v3; // [rsp+1h] [rbp-19h]
if ( (unsigned long long)a1 < a2 )
{
v3 = *a1;
if ( *a1 >= 0x80u )
{
if ( v3 >= 0xC2u )
{
if ( v3 >= 0xE0u )
{
if ( v3 >= 0xF0u )
{
return 0;
}
else if ( (unsigned long long)(a1 + 3) <= a2 )
{
if ( (a1[1] ^ 0x80) < 64 && (a1[2] ^ 0x80) < 64 && (v3 >= 0xE1u || a1[1] >= 0xA0u) )
return 3;
else
return 0;
}
else
{
return 0;
}
}
else if ( (unsigned long long)(a1 + 2) <= a2 )
{
if ( (a1[1] ^ 0x80) < 64 )
return 2;
else
return 0;
}
else
{
return 0;
}
}
else
{
return 0;
}
}
else
{
return 1;
}
}
else
{
return 0;
}
}
|
check_mb_utf8mb3_sequence:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x18]
JC 0x001683d2
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001684ce
LAB_001683d2:
MOV RAX,qword ptr [RBP + -0x10]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x19],AL
MOVZX EAX,byte ptr [RBP + -0x19]
CMP EAX,0x80
JGE 0x001683f2
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001684ce
LAB_001683f2:
MOVZX EAX,byte ptr [RBP + -0x19]
CMP EAX,0xc2
JGE 0x00168409
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001684ce
LAB_00168409:
MOVZX EAX,byte ptr [RBP + -0x19]
CMP EAX,0xe0
JGE 0x00168455
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x18]
JBE 0x0016842e
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001684ce
LAB_0016842e:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JL 0x0016844c
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001684ce
LAB_0016844c:
MOV dword ptr [RBP + -0x4],0x2
JMP 0x001684ce
LAB_00168455:
MOVZX EAX,byte ptr [RBP + -0x19]
CMP EAX,0xf0
JGE 0x001684c7
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x3
CMP RAX,qword ptr [RBP + -0x18]
JBE 0x00168477
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001684ce
LAB_00168477:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x001684b5
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x001684b5
MOVZX EAX,byte ptr [RBP + -0x19]
CMP EAX,0xe1
JGE 0x001684be
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xa0
JGE 0x001684be
LAB_001684b5:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001684ce
LAB_001684be:
MOV dword ptr [RBP + -0x4],0x3
JMP 0x001684ce
LAB_001684c7:
MOV dword ptr [RBP + -0x4],0x0
LAB_001684ce:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 check_mb_utf8mb3_sequence(byte *param_1,byte *param_2)
{
byte bVar1;
int4 local_c;
if (param_1 < param_2) {
bVar1 = *param_1;
if (bVar1 < 0x80) {
local_c = 1;
}
else if (bVar1 < 0xc2) {
local_c = 0;
}
else if (bVar1 < 0xe0) {
if (param_2 < param_1 + 2) {
local_c = 0;
}
else if ((param_1[1] ^ 0x80) < 0x40) {
local_c = 2;
}
else {
local_c = 0;
}
}
else if (bVar1 < 0xf0) {
if (param_2 < param_1 + 3) {
local_c = 0;
}
else if ((((param_1[1] ^ 0x80) < 0x40) && ((param_1[2] ^ 0x80) < 0x40)) &&
((0xe0 < bVar1 || (0x9f < param_1[1])))) {
local_c = 3;
}
else {
local_c = 0;
}
}
else {
local_c = 0;
}
}
else {
local_c = 0;
}
return local_c;
}
|
|
61,060
|
emitter_thread(emittra::Emittra&)
|
angrymouse[P]emittra/src/benchmark.cpp
|
void emitter_thread(emittra::Emittra& emitter) {
// Precompute event names.
std::vector<std::string> event_names;
event_names.reserve(NUM_THREADS);
for (int i = 0; i < NUM_THREADS; i++) {
event_names.push_back("benchmark_event" + std::to_string(i));
}
// Preconstruct a bulk events vector with 50000 empty event arguments.
const std::vector<std::vector<std::any>> bulk_events(50000);
while (!stop_processing.load(std::memory_order_relaxed)) {
for (int i = 0; i < NUM_THREADS; i++) {
emitter.enqueue_bulk(event_names[i], bulk_events);
}
}
}
|
O1
|
cpp
|
emitter_thread(emittra::Emittra&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl $0x10, %esi
callq 0x3e86
leaq 0x30(%rsp), %r13
xorl %r14d, %r14d
leaq 0x10(%rsp), %rbp
leaq 0x20(%rsp), %r15
cmpl $0xa, %r14d
movl $0x2, %r12d
sbbl $0x0, %r12d
movq %r13, 0x20(%rsp)
movq %r15, %rdi
movq %r12, %rsi
movl $0x2d, %edx
callq 0x3300
movq 0x20(%rsp), %rdi
movl %r12d, %esi
movl %r14d, %edx
callq 0x420f
movl $0xf, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x88dd(%rip), %rcx # 0xc010
callq 0x32e0
movq %rbp, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3759
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x3760
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
callq 0x44ae
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x379b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x37b2
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x32b0
incl %r14d
cmpl $0x10, %r14d
jne 0x36ec
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movl $0x124f80, %edi # imm = 0x124F80
callq 0x32a0
movq %rax, (%rsp)
movq %rax, 0x8(%rsp)
movq %rax, %r14
addq $0x124f80, %r14 # imm = 0x124F80
movq %r14, 0x10(%rsp)
movl $0x124f80, %edx # imm = 0x124F80
movq %rax, %rdi
xorl %esi, %esi
callq 0x3160
movq %r14, 0x8(%rsp)
movb 0xea76(%rip), %al # 0x12281
testb $0x1, %al
jne 0x3845
xorl %r15d, %r15d
movq %rsp, %r14
movq %r15, %rsi
shlq $0x5, %rsi
addq 0x40(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x5f9c
incq %r15
cmpq $0x10, %r15
jne 0x3815
movb 0xea46(%rip), %al # 0x12281
movl $0x0, %r15d
testb $0x1, %al
je 0x3815
movq %rsp, %rdi
callq 0x3f6e
leaq 0x40(%rsp), %rdi
callq 0x3fb0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x386a
jmp 0x386a
movq %rax, %rbx
jmp 0x38b1
movq %rax, %rbx
jmp 0x388d
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x388d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x38b1
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x32b0
jmp 0x38b1
movq %rax, %rbx
movq %rsp, %rdi
callq 0x3f6e
leaq 0x40(%rsp), %rdi
callq 0x3fb0
movq %rbx, %rdi
callq 0x3450
|
_Z14emitter_threadRN7emittra7EmittraE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov rbx, rdi
xorps xmm0, xmm0
lea rdi, [rsp+88h+var_48]
movaps xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
mov esi, 10h
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE7reserveEm; std::vector<std::string>::reserve(ulong)
lea r13, [rsp+88h+var_58]
xor r14d, r14d
lea rbp, [rsp+88h+var_78]
lea r15, [rsp+88h+var_68]
loc_36EC:
cmp r14d, 0Ah
mov r12d, 2
sbb r12d, 0
mov [rsp+88h+var_68], r13
mov rdi, r15
mov rsi, r12
mov edx, 2Dh ; '-'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov rdi, [rsp+88h+var_68]
mov esi, r12d
mov edx, r14d
call _ZNSt8__detail18__to_chars_10_implIjEEvPcjT_; std::__detail::__to_chars_10_impl<uint>(char *,uint,uint)
mov r8d, 0Fh
mov rdi, r15
xor esi, esi
xor edx, edx
lea rcx, aBenchmarkEvent; "benchmark_event"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
mov [rsp+88h+var_88], rbp
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_3759
mov [rsp+88h+var_88], rdx
mov rdx, [rcx]
mov [rsp+88h+var_78], rdx
jmp short loc_3760
loc_3759:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rbp+0], xmm0
loc_3760:
mov rdx, [rax+8]
mov [rsp+88h+var_88+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rdi, [rsp+88h+var_48]
mov rsi, rsp
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
mov rdi, [rsp+88h+var_88]; void *
cmp rdi, rbp
jz short loc_379B
mov rsi, [rsp+88h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_379B:
mov rdi, [rsp+88h+var_68]; void *
cmp rdi, r13
jz short loc_37B2
mov rsi, [rsp+88h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_37B2:
inc r14d
cmp r14d, 10h
jnz loc_36EC
xorps xmm0, xmm0
movaps xmmword ptr [rsp+88h+var_88], xmm0
mov [rsp+88h+var_78], 0
mov edi, 124F80h; unsigned __int64
call __Znwm; operator new(ulong)
mov [rsp+88h+var_88], rax
mov [rsp+88h+var_88+8], rax
mov r14, rax
add r14, 124F80h
mov [rsp+88h+var_78], r14
mov edx, 124F80h
mov rdi, rax
xor esi, esi
call _memset
mov [rsp+88h+var_88+8], r14
mov al, cs:stop_processing
test al, 1
jnz short loc_3845
xor r15d, r15d
mov r14, rsp
loc_3815:
mov rsi, r15
shl rsi, 5
add rsi, [rsp+88h+var_48]
mov rdi, rbx
mov rdx, r14
call _ZN7emittra7Emittra12enqueue_bulkERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS9_ISt3anySaISA_EESaISC_EE; emittra::Emittra::enqueue_bulk(std::string const&,std::vector<std::vector<std::any>> const&)
inc r15
cmp r15, 10h
jnz short loc_3815
mov al, cs:stop_processing
mov r15d, 0
test al, 1
jz short loc_3815
loc_3845:
mov rdi, rsp
call _ZNSt6vectorIS_ISt3anySaIS0_EESaIS2_EED2Ev; std::vector<std::vector<std::any>>::~vector()
lea rdi, [rsp+88h+var_48]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_386A
jmp short $+2
loc_386A:
mov rbx, rax
jmp short loc_38B1
mov rbx, rax
jmp short loc_388D
mov rbx, rax
mov rdi, [rsp+0]; void *
cmp rdi, rbp
jz short loc_388D
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_388D:
mov rdi, [rsp+arg_18]; void *
cmp rdi, r13
jz short loc_38B1
mov rsi, [rsp+arg_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_38B1
mov rbx, rax
mov rdi, rsp
call _ZNSt6vectorIS_ISt3anySaIS0_EESaIS2_EED2Ev; std::vector<std::vector<std::any>>::~vector()
loc_38B1:
lea rdi, [rsp+arg_38]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, rbx
call __Unwind_Resume
|
long long emitter_thread(emittra::Emittra *a1)
{
unsigned int i; // r14d
long long v2; // rax
__int128 *v3; // rcx
char *v4; // r14
int v5; // ecx
int v6; // r8d
int v7; // r9d
long long v8; // r15
void *v10[2]; // [rsp+0h] [rbp-88h] BYREF
__int128 v11; // [rsp+10h] [rbp-78h] BYREF
void *v12[2]; // [rsp+20h] [rbp-68h] BYREF
_QWORD v13[2]; // [rsp+30h] [rbp-58h] BYREF
__int128 v14; // [rsp+40h] [rbp-48h] BYREF
long long v15; // [rsp+50h] [rbp-38h]
v14 = 0LL;
v15 = 0LL;
std::vector<std::string>::reserve(&v14, 16LL);
for ( i = 0; i != 16; ++i )
{
v12[0] = v13;
std::string::_M_construct(v12, ((i | 0x200000000uLL) - 10) >> 32, 45LL);
std::__detail::__to_chars_10_impl<unsigned int>(v12[0], ((i | 0x200000000uLL) - 10) >> 32, i);
v2 = std::string::replace(v12, 0LL, 0LL, "benchmark_event", 15LL);
v10[0] = &v11;
v3 = (__int128 *)(v2 + 16);
if ( *(_QWORD *)v2 == v2 + 16 )
{
v11 = *v3;
}
else
{
v10[0] = *(void **)v2;
*(_QWORD *)&v11 = *(_QWORD *)v3;
}
v10[1] = *(void **)(v2 + 8);
*(_QWORD *)v2 = v3;
*(_QWORD *)(v2 + 8) = 0LL;
*(_BYTE *)(v2 + 16) = 0;
std::vector<std::string>::emplace_back<std::string>(&v14, v10);
if ( v10[0] != &v11 )
operator delete(v10[0], v11 + 1);
if ( v12[0] != v13 )
operator delete(v12[0], v13[0] + 1LL);
}
*(_OWORD *)v10 = 0LL;
*(_QWORD *)&v11 = 0LL;
v10[0] = (void *)operator new(0x124F80uLL);
v10[1] = v10[0];
v4 = (char *)v10[0] + 1200000;
*(_QWORD *)&v11 = (char *)v10[0] + 1200000;
memset(v10[0], 0LL, 1200000LL);
v10[1] = v4;
if ( (stop_processing & 1) == 0 )
{
v8 = 0LL;
do
{
do
emittra::Emittra::enqueue_bulk(
(_DWORD)a1,
v14 + 32 * v8++,
(unsigned int)v10,
v5,
v6,
v7,
v10[0],
v10[1],
v11,
*((long long *)&v11 + 1),
(char)v12[0]);
while ( v8 != 16 );
v8 = 0LL;
}
while ( (stop_processing & 1) == 0 );
}
std::vector<std::vector<std::any>>::~vector(v10);
return std::vector<std::string>::~vector(&v14);
}
|
emitter_thread:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,RDI
XORPS XMM0,XMM0
LEA RDI,[RSP + 0x40]
MOVAPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
LAB_001036d0:
MOV ESI,0x10
CALL 0x00103e86
LEA R13,[RSP + 0x30]
XOR R14D,R14D
LEA RBP,[RSP + 0x10]
LEA R15,[RSP + 0x20]
LAB_001036ec:
CMP R14D,0xa
MOV R12D,0x2
SBB R12D,0x0
MOV qword ptr [RSP + 0x20],R13
LAB_001036ff:
MOV RDI,R15
MOV RSI,R12
MOV EDX,0x2d
CALL 0x00103300
MOV RDI,qword ptr [RSP + 0x20]
MOV ESI,R12D
MOV EDX,R14D
CALL 0x0010420f
LAB_0010371f:
MOV R8D,0xf
MOV RDI,R15
XOR ESI,ESI
XOR EDX,EDX
LEA RCX,[0x10c010]
CALL 0x001032e0
MOV qword ptr [RSP],RBP
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x00103759
MOV qword ptr [RSP],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x10],RDX
JMP 0x00103760
LAB_00103759:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RBP],XMM0
LAB_00103760:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_00103778:
LEA RDI,[RSP + 0x40]
MOV RSI,RSP
CALL 0x001044ae
MOV RDI,qword ptr [RSP]
CMP RDI,RBP
JZ 0x0010379b
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x001032b0
LAB_0010379b:
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,R13
JZ 0x001037b2
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x001032b0
LAB_001037b2:
INC R14D
CMP R14D,0x10
JNZ 0x001036ec
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x10],0x0
LAB_001037cf:
MOV EDI,0x124f80
CALL 0x001032a0
LAB_001037d9:
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RAX
MOV R14,RAX
ADD R14,0x124f80
MOV qword ptr [RSP + 0x10],R14
MOV EDX,0x124f80
MOV RDI,RAX
XOR ESI,ESI
CALL 0x00103160
MOV qword ptr [RSP + 0x8],R14
MOV AL,byte ptr [0x00112281]
TEST AL,0x1
JNZ 0x00103845
XOR R15D,R15D
MOV R14,RSP
LAB_00103815:
MOV RSI,R15
SHL RSI,0x5
ADD RSI,qword ptr [RSP + 0x40]
LAB_00103821:
MOV RDI,RBX
MOV RDX,R14
CALL 0x00105f9c
LAB_0010382c:
INC R15
CMP R15,0x10
JNZ 0x00103815
MOV AL,byte ptr [0x00112281]
MOV R15D,0x0
TEST AL,0x1
JZ 0x00103815
LAB_00103845:
MOV RDI,RSP
CALL 0x00103f6e
LEA RDI,[RSP + 0x40]
CALL 0x00103fb0
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* emitter_thread(emittra::Emittra&) */
void emitter_thread(Emittra *param_1)
{
long *plVar1;
long *plVar2;
uint uVar3;
uint uVar4;
long lVar5;
long *local_88;
void *pvStack_80;
long local_78;
long lStack_70;
long *local_68 [2];
long local_58 [2];
long local_48 [3];
local_48[0] = 0;
local_48[1] = 0;
local_48[2] = 0;
/* try { // try from 001036d0 to 001036d9 has its CatchHandler @ 00103868 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::reserve
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_48,0x10);
uVar4 = 0;
do {
uVar3 = 2 - (uVar4 < 10);
local_68[0] = local_58;
/* try { // try from 001036ff to 0010370e has its CatchHandler @ 0010386a */
std::__cxx11::string::_M_construct((ulong)local_68,(char)uVar3);
std::__detail::__to_chars_10_impl<unsigned_int>((char *)local_68[0],uVar3,uVar4);
/* try { // try from 0010371f to 00103737 has its CatchHandler @ 0010386f */
plVar1 = (long *)std::__cxx11::string::replace((ulong)local_68,0,(char *)0x0,0x10c010);
plVar2 = plVar1 + 2;
if ((long *)*plVar1 == plVar2) {
local_78 = *plVar2;
lStack_70 = plVar1[3];
local_88 = &local_78;
}
else {
local_78 = *plVar2;
local_88 = (long *)*plVar1;
}
pvStack_80 = (void *)plVar1[1];
*plVar1 = (long)plVar2;
plVar1[1] = 0;
*(int1 *)(plVar1 + 2) = 0;
/* try { // try from 00103778 to 00103784 has its CatchHandler @ 00103874 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_48,
(string *)&local_88);
if (local_88 != &local_78) {
operator_delete(local_88,local_78 + 1);
}
if (local_68[0] != local_58) {
operator_delete(local_68[0],local_58[0] + 1);
}
uVar4 = uVar4 + 1;
} while (uVar4 != 0x10);
local_88 = (long *)0x0;
pvStack_80 = (void *)0x0;
local_78 = 0;
/* try { // try from 001037cf to 001037d8 has its CatchHandler @ 00103866 */
local_88 = (long *)operator_new(1200000);
lVar5 = (long)local_88 + 1200000;
pvStack_80 = local_88;
local_78 = lVar5;
memset(local_88,0,1200000);
pvStack_80 = (void *)lVar5;
if ((stop_processing & 1) == 0) {
lVar5 = 0;
do {
do {
/* try { // try from 00103821 to 0010382b has its CatchHandler @ 001038a6 */
emittra::Emittra::enqueue_bulk
(param_1,(string *)(lVar5 * 0x20 + local_48[0]),(vector *)&local_88);
lVar5 = lVar5 + 1;
} while (lVar5 != 0x10);
lVar5 = 0;
} while ((stop_processing & 1) == 0);
}
std::
vector<std::vector<std::any,std::allocator<std::any>>,std::allocator<std::vector<std::any,std::allocator<std::any>>>>
::~vector((vector<std::vector<std::any,std::allocator<std::any>>,std::allocator<std::vector<std::any,std::allocator<std::any>>>>
*)&local_88);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_48);
return;
}
|
|
61,061
|
emitter_thread(emittra::Emittra&)
|
angrymouse[P]emittra/src/benchmark.cpp
|
void emitter_thread(emittra::Emittra& emitter) {
// Precompute event names.
std::vector<std::string> event_names;
event_names.reserve(NUM_THREADS);
for (int i = 0; i < NUM_THREADS; i++) {
event_names.push_back("benchmark_event" + std::to_string(i));
}
// Preconstruct a bulk events vector with 50000 empty event arguments.
const std::vector<std::vector<std::any>> bulk_events(50000);
while (!stop_processing.load(std::memory_order_relaxed)) {
for (int i = 0; i < NUM_THREADS; i++) {
emitter.enqueue_bulk(event_names[i], bulk_events);
}
}
}
|
O2
|
cpp
|
emitter_thread(emittra::Emittra&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
pushq $0x10
popq %rsi
callq 0x3a6c
xorl %ebp, %ebp
leaq 0x38(%rsp), %r14
leaq 0x7a2f(%rip), %r15 # 0xb010
leaq 0x18(%rsp), %r12
movq %rsp, %r13
cmpl $0x10, %ebp
je 0x3625
movq %r14, %rdi
movl %ebp, %esi
callq 0x3b24
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x3b00
movq %r13, %rdi
movq %r12, %rsi
callq 0x4102
movq %r12, %rdi
callq 0x3120
movq %r14, %rdi
callq 0x3120
incl %ebp
jmp 0x35e9
leaq 0x18(%rsp), %rdi
leaq 0x38(%rsp), %rdx
movl $0xc350, %esi # imm = 0xC350
callq 0x3b7e
leaq 0x18(%rsp), %r14
movb 0xfc2d(%rip), %al # 0x13271
testb $0x1, %al
jne 0x366c
xorl %r15d, %r15d
cmpq $0x200, %r15 # imm = 0x200
je 0x363e
movq (%rsp), %rsi
addq %r15, %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x5918
addq $0x20, %r15
jmp 0x364b
leaq 0x18(%rsp), %rdi
callq 0x3bd0
movq %rsp, %rdi
callq 0x3bf2
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3691
jmp 0x3691
movq %rax, %rbx
jmp 0x36c1
movq %rax, %rbx
jmp 0x36a8
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x3120
leaq 0x38(%rsp), %rdi
callq 0x3120
jmp 0x36c1
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x3bd0
movq %rsp, %rdi
callq 0x3bf2
movq %rbx, %rdi
callq 0x3440
|
_Z14emitter_threadRN7emittra7EmittraE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov rbx, rdi
xorps xmm0, xmm0
mov rdi, rsp
movaps xmmword ptr [rdi], xmm0
and qword ptr [rdi+10h], 0
push 10h
pop rsi
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE7reserveEm; std::vector<std::string>::reserve(ulong)
xor ebp, ebp
lea r14, [rsp+88h+var_50]
lea r15, aBenchmarkEvent; "benchmark_event"
lea r12, [rsp+88h+var_70]
mov r13, rsp
loc_35E9:
cmp ebp, 10h
jz short loc_3625
mov rdi, r14; this
mov esi, ebp; int
call _ZNSt7__cxx119to_stringEi; std::to_string(int)
mov rdi, r12
mov rsi, r15
mov rdx, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov rdi, r13
mov rsi, r12
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
mov rdi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
inc ebp
jmp short loc_35E9
loc_3625:
lea rdi, [rsp+88h+var_70]
lea rdx, [rsp+88h+var_50]
mov esi, 0C350h
call _ZNSt6vectorIS_ISt3anySaIS0_EESaIS2_EEC2EmRKS3_; std::vector<std::vector<std::any>>::vector(ulong,std::allocator<std::vector<std::any>> const&)
lea r14, [rsp+88h+var_70]
loc_363E:
mov al, cs:stop_processing
test al, 1
jnz short loc_366C
xor r15d, r15d
loc_364B:
cmp r15, 200h
jz short loc_363E
mov rsi, [rsp+88h+var_88]
add rsi, r15
mov rdi, rbx
mov rdx, r14
call _ZN7emittra7Emittra12enqueue_bulkERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS9_ISt3anySaISA_EESaISC_EE; emittra::Emittra::enqueue_bulk(std::string const&,std::vector<std::vector<std::any>> const&)
add r15, 20h ; ' '
jmp short loc_364B
loc_366C:
lea rdi, [rsp+88h+var_70]
call _ZNSt6vectorIS_ISt3anySaIS0_EESaIS2_EED2Ev; std::vector<std::vector<std::any>>::~vector()
mov rdi, rsp
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_3691
jmp short $+2
loc_3691:
mov rbx, rax
jmp short loc_36C1
mov rbx, rax
jmp short loc_36A8
mov rbx, rax
lea rdi, [rsp+arg_10]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_36A8:
lea rdi, [rsp+arg_30]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_36C1
mov rbx, rax
lea rdi, [rsp+arg_10]
call _ZNSt6vectorIS_ISt3anySaIS0_EESaIS2_EED2Ev; std::vector<std::vector<std::any>>::~vector()
loc_36C1:
mov rdi, rsp
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, rbx
call __Unwind_Resume
|
long long emitter_thread(emittra::Emittra *a1)
{
int i; // ebp
int v2; // ecx
int v3; // r8d
int v4; // r9d
long long j; // r15
__int128 v7; // [rsp+0h] [rbp-88h] BYREF
long long v8; // [rsp+10h] [rbp-78h]
char v9[32]; // [rsp+18h] [rbp-70h] BYREF
_BYTE v10[80]; // [rsp+38h] [rbp-50h] BYREF
v7 = 0LL;
v8 = 0LL;
std::vector<std::string>::reserve(&v7, 16LL);
for ( i = 0; i != 16; ++i )
{
std::to_string((std::__cxx11 *)v10, i);
std::operator+<char>(v9, "benchmark_event", v10);
std::vector<std::string>::emplace_back<std::string>(&v7, v9);
std::string::~string(v9);
std::string::~string(v10);
}
std::vector<std::vector<std::any>>::vector(v9, 50000LL, v10);
while ( (stop_processing & 1) == 0 )
{
for ( j = 0LL; j != 512; j += 32LL )
emittra::Emittra::enqueue_bulk((_DWORD)a1, j + v7, (unsigned int)v9, v2, v3, v4, v7, DWORD2(v7), v8, v9[0], v9[8]);
}
std::vector<std::vector<std::any>>::~vector(v9);
return std::vector<std::string>::~vector(&v7);
}
|
emitter_thread:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,RDI
XORPS XMM0,XMM0
MOV RDI,RSP
MOVAPS xmmword ptr [RDI],XMM0
AND qword ptr [RDI + 0x10],0x0
LAB_001035cb:
PUSH 0x10
POP RSI
CALL 0x00103a6c
XOR EBP,EBP
LEA R14,[RSP + 0x38]
LEA R15,[0x10b010]
LEA R12,[RSP + 0x18]
MOV R13,RSP
LAB_001035e9:
CMP EBP,0x10
JZ 0x00103625
LAB_001035ee:
MOV RDI,R14
MOV ESI,EBP
CALL 0x00103b24
LAB_001035f8:
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
CALL 0x00103b00
LAB_00103606:
MOV RDI,R13
MOV RSI,R12
CALL 0x00104102
MOV RDI,R12
CALL 0x00103120
MOV RDI,R14
CALL 0x00103120
INC EBP
JMP 0x001035e9
LAB_00103625:
LEA RDI,[RSP + 0x18]
LEA RDX,[RSP + 0x38]
MOV ESI,0xc350
CALL 0x00103b7e
LEA R14,[RSP + 0x18]
LAB_0010363e:
MOV AL,byte ptr [0x00113271]
TEST AL,0x1
JNZ 0x0010366c
XOR R15D,R15D
LAB_0010364b:
CMP R15,0x200
JZ 0x0010363e
MOV RSI,qword ptr [RSP]
ADD RSI,R15
LAB_0010365b:
MOV RDI,RBX
MOV RDX,R14
CALL 0x00105918
LAB_00103666:
ADD R15,0x20
JMP 0x0010364b
LAB_0010366c:
LEA RDI,[RSP + 0x18]
CALL 0x00103bd0
MOV RDI,RSP
CALL 0x00103bf2
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* emitter_thread(emittra::Emittra&) */
void emitter_thread(Emittra *param_1)
{
int iVar1;
long lVar2;
long local_88 [3];
string local_70 [32];
__cxx11 local_50 [32];
local_88[0] = 0;
local_88[1] = 0;
local_88[2] = 0;
/* try { // try from 001035cb to 001035d2 has its CatchHandler @ 0010368f */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::reserve
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_88,0x10);
for (iVar1 = 0; iVar1 != 0x10; iVar1 = iVar1 + 1) {
/* try { // try from 001035ee to 001035f7 has its CatchHandler @ 00103691 */
std::__cxx11::to_string(local_50,iVar1);
/* try { // try from 001035f8 to 00103605 has its CatchHandler @ 00103696 */
std::operator+((char *)local_70,(string *)0x10b010);
/* try { // try from 00103606 to 00103610 has its CatchHandler @ 0010369b */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_88,
local_70);
std::__cxx11::string::~string(local_70);
std::__cxx11::string::~string((string *)local_50);
}
/* try { // try from 00103625 to 00103638 has its CatchHandler @ 0010368d */
std::
vector<std::vector<std::any,std::allocator<std::any>>,std::allocator<std::vector<std::any,std::allocator<std::any>>>>
::vector((vector<std::vector<std::any,std::allocator<std::any>>,std::allocator<std::vector<std::any,std::allocator<std::any>>>>
*)local_70,50000,(allocator *)local_50);
while ((stop_processing & 1) == 0) {
for (lVar2 = 0; lVar2 != 0x200; lVar2 = lVar2 + 0x20) {
/* try { // try from 0010365b to 00103665 has its CatchHandler @ 001036b4 */
emittra::Emittra::enqueue_bulk(param_1,(string *)(local_88[0] + lVar2),(vector *)local_70);
}
}
std::
vector<std::vector<std::any,std::allocator<std::any>>,std::allocator<std::vector<std::any,std::allocator<std::any>>>>
::~vector((vector<std::vector<std::any,std::allocator<std::any>>,std::allocator<std::vector<std::any,std::allocator<std::any>>>>
*)local_70);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_88);
return;
}
|
|
61,062
|
my_caseup_utf8mb4
|
eloqsql/strings/ctype-utf8.c
|
static size_t
my_caseup_utf8mb4(CHARSET_INFO *cs, const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
int srcres, dstres;
const char *srcend= src + srclen;
char *dstend= dst + dstlen, *dst0= dst;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(src != dst || cs->caseup_multiply == 1);
while ((src < srcend) &&
(srcres= my_mb_wc_utf8mb4(cs, &wc,
(uchar *) src, (uchar*) srcend)) > 0)
{
my_toupper_utf8mb4(uni_plane, &wc);
if ((dstres= my_wc_mb_utf8mb4(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0)
break;
src+= srcres;
dst+= dstres;
}
return (size_t) (dst - dst0);
}
|
O3
|
c
|
my_caseup_utf8mb4:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, -0x38(%rbp)
movq %rcx, %r13
movq %rcx, -0x30(%rbp)
testq %rdx, %rdx
jle 0xcc28d
movq %rdx, %r15
movq %rsi, %r12
addq %rsi, %r15
movq -0x30(%rbp), %r13
addq %r13, -0x38(%rbp)
movq 0x78(%rdi), %r14
leaq -0x40(%rbp), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0xcf31e
testl %eax, %eax
jle 0xcc28d
movl %eax, %ebx
movq -0x40(%rbp), %rsi
cmpq (%r14), %rsi
ja 0xcc26e
movq 0x8(%r14), %rax
movq %rsi, %rcx
shrq $0x8, %rcx
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0xcc26e
movzbl %sil, %ecx
leaq (%rcx,%rcx,2), %rcx
movl (%rax,%rcx,4), %esi
movq %rsi, -0x40(%rbp)
movq %r13, %rdx
movq -0x38(%rbp), %rcx
callq 0xcc00d
testl %eax, %eax
jle 0xcc28d
movl %ebx, %ecx
addq %rcx, %r12
movl %eax, %eax
addq %rax, %r13
cmpq %r15, %r12
jb 0xcc22d
subq -0x30(%rbp), %r13
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_caseup_utf8mb4:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_38], r8
mov r13, rcx
mov [rbp+var_30], rcx
test rdx, rdx
jle short loc_CC28D
mov r15, rdx
mov r12, rsi
add r15, rsi
mov r13, [rbp+var_30]
add [rbp+var_38], r13
mov r14, [rdi+78h]
loc_CC22D:
lea rdi, [rbp+var_40]
mov rsi, r12
mov rdx, r15
call my_mb_wc_utf8mb4_quick_0
test eax, eax
jle short loc_CC28D
mov ebx, eax
mov rsi, [rbp+var_40]
cmp rsi, [r14]
ja short loc_CC26E
mov rax, [r14+8]
mov rcx, rsi
shr rcx, 8
mov rax, [rax+rcx*8]
test rax, rax
jz short loc_CC26E
movzx ecx, sil
lea rcx, [rcx+rcx*2]
mov esi, [rax+rcx*4]
mov [rbp+var_40], rsi
loc_CC26E:
mov rdx, r13
mov rcx, [rbp+var_38]
call my_wc_mb_utf8mb4
test eax, eax
jle short loc_CC28D
mov ecx, ebx
add r12, rcx
mov eax, eax
add r13, rax
cmp r12, r15
jb short loc_CC22D
loc_CC28D:
sub r13, [rbp+var_30]
mov rax, r13
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
_BYTE * my_caseup_utf8mb4(long long a1, unsigned long long a2, long long a3, _BYTE *a4, unsigned long long a5)
{
_BYTE *v5; // r13
unsigned long long v6; // r12
unsigned long long v7; // r15
unsigned long long *v8; // r14
int v9; // eax
unsigned int v10; // ebx
unsigned long long v11; // rsi
long long v12; // rax
int v13; // eax
unsigned long long v15; // [rsp+0h] [rbp-40h] BYREF
unsigned long long v16; // [rsp+8h] [rbp-38h]
_BYTE *v17; // [rsp+10h] [rbp-30h]
v16 = a5;
v5 = a4;
v17 = a4;
if ( a3 > 0 )
{
v6 = a2;
v7 = a2 + a3;
v5 = v17;
v16 += (unsigned long long)v17;
v8 = *(unsigned long long **)(a1 + 120);
do
{
v9 = my_mb_wc_utf8mb4_quick_0(&v15, v6, v7);
if ( v9 <= 0 )
break;
v10 = v9;
v11 = v15;
if ( v15 <= *v8 )
{
v12 = *(_QWORD *)(v8[1] + 8 * (v15 >> 8));
if ( v12 )
{
v11 = *(unsigned int *)(v12 + 12LL * (unsigned __int8)v15);
v15 = v11;
}
}
v13 = my_wc_mb_utf8mb4((long long)&v15, v11, v5, v16);
if ( v13 <= 0 )
break;
v6 += v10;
v5 += (unsigned int)v13;
}
while ( v6 < v7 );
}
return (_BYTE *)(v5 - v17);
}
|
my_caseup_utf8mb4:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x38],R8
MOV R13,RCX
MOV qword ptr [RBP + -0x30],RCX
TEST RDX,RDX
JLE 0x001cc28d
MOV R15,RDX
MOV R12,RSI
ADD R15,RSI
MOV R13,qword ptr [RBP + -0x30]
ADD qword ptr [RBP + -0x38],R13
MOV R14,qword ptr [RDI + 0x78]
LAB_001cc22d:
LEA RDI,[RBP + -0x40]
MOV RSI,R12
MOV RDX,R15
CALL 0x001cf31e
TEST EAX,EAX
JLE 0x001cc28d
MOV EBX,EAX
MOV RSI,qword ptr [RBP + -0x40]
CMP RSI,qword ptr [R14]
JA 0x001cc26e
MOV RAX,qword ptr [R14 + 0x8]
MOV RCX,RSI
SHR RCX,0x8
MOV RAX,qword ptr [RAX + RCX*0x8]
TEST RAX,RAX
JZ 0x001cc26e
MOVZX ECX,SIL
LEA RCX,[RCX + RCX*0x2]
MOV ESI,dword ptr [RAX + RCX*0x4]
MOV qword ptr [RBP + -0x40],RSI
LAB_001cc26e:
MOV RDX,R13
MOV RCX,qword ptr [RBP + -0x38]
CALL 0x001cc00d
TEST EAX,EAX
JLE 0x001cc28d
MOV ECX,EBX
ADD R12,RCX
MOV EAX,EAX
ADD R13,RAX
CMP R12,R15
JC 0x001cc22d
LAB_001cc28d:
SUB R13,qword ptr [RBP + -0x30]
MOV RAX,R13
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_caseup_utf8mb4(long param_1,ulong param_2,long param_3,long param_4,long param_5)
{
ulong *puVar1;
long lVar2;
uint uVar3;
uint uVar4;
ulong uVar5;
ulong local_48;
long local_40;
long local_38;
local_38 = param_4;
if (0 < param_3) {
uVar5 = param_3 + param_2;
local_40 = param_5 + param_4;
puVar1 = *(ulong **)(param_1 + 0x78);
do {
uVar3 = my_mb_wc_utf8mb4_quick(&local_48,param_2,uVar5);
if ((int)uVar3 < 1) break;
if ((local_48 <= *puVar1) && (lVar2 = *(long *)(puVar1[1] + (local_48 >> 8) * 8), lVar2 != 0))
{
local_48 = (ulong)*(uint *)(lVar2 + (local_48 & 0xff) * 0xc);
}
uVar4 = my_wc_mb_utf8mb4();
if ((int)uVar4 < 1) break;
param_2 = param_2 + uVar3;
param_4 = param_4 + (ulong)uVar4;
} while (param_2 < uVar5);
}
return param_4 - local_38;
}
|
|
61,063
|
std::pair<__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>, bool> nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::emplace<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, minja::Value&&)
|
monkey531[P]llama/common/json.hpp
|
std::pair<iterator, bool> emplace(KeyType && key, T && t)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return {it, false};
}
}
Container::emplace_back(std::forward<KeyType>(key), std::forward<T>(t));
return {std::prev(this->end()), true};
}
|
O3
|
cpp
|
std::pair<__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>, bool> nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::emplace<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, minja::Value&&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq (%rdi), %rbx
cmpq 0x8(%rdi), %rbx
je 0x8f8d3
leaq 0x18(%r14), %r13
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x8f8fc
testb %al, %al
jne 0x8f8ed
addq $0x60, %rbx
cmpq 0x8(%r14), %rbx
jne 0x8f8b7
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x8f940
movq 0x8(%r14), %rbx
addq $-0x60, %rbx
movb $0x1, %dl
jmp 0x8f8ef
xorl %edx, %edx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_:
push r15
push r14
push r13
push r12
push rbx
mov r15, rdx
mov r12, rsi
mov r14, rdi
mov rbx, [rdi]
cmp rbx, [rdi+8]
jz short loc_8F8D3
lea r13, [r14+18h]
loc_8F8B7:
mov rdi, r13
mov rsi, rbx
mov rdx, r12
call _ZNKSt8equal_toIvEclIRKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEERKSC_EEDTeqclsr3stdE7forwardIT_Efp_Eclsr3stdE7forwardIT0_Efp0_EEOSL_OSM_
test al, al
jnz short loc_8F8ED
add rbx, 60h ; '`'
cmp rbx, [r14+8]
jnz short loc_8F8B7
loc_8F8D3:
mov rdi, r14
mov rsi, r12
mov rdx, r15
call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE12emplace_backIJRKSA_SH_EEERSI_DpOT_; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::emplace_back<std::string const&,minja::Value>(std::string const&,minja::Value &&)
mov rbx, [r14+8]
add rbx, 0FFFFFFFFFFFFFFA0h
mov dl, 1
jmp short loc_8F8EF
loc_8F8ED:
xor edx, edx
loc_8F8EF:
mov rax, rbx
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
|
long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_(
long long *a1,
long long a2,
long long a3)
{
long long v4; // rbx
v4 = *a1;
if ( *a1 == a1[1] )
{
LABEL_4:
std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::emplace_back<std::string const&,minja::Value>(
a1,
a2,
a3);
return a1[1] - 96;
}
else
{
while ( !(unsigned __int8)std::equal_to<void>::operator()<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&,std::string const&>(
a1 + 3,
v4,
a2) )
{
v4 += 96LL;
if ( v4 == a1[1] )
goto LABEL_4;
}
}
return v4;
}
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R15,RDX
MOV R12,RSI
MOV R14,RDI
MOV RBX,qword ptr [RDI]
CMP RBX,qword ptr [RDI + 0x8]
JZ 0x0018f8d3
LEA R13,[R14 + 0x18]
LAB_0018f8b7:
MOV RDI,R13
MOV RSI,RBX
MOV RDX,R12
CALL 0x0018f8fc
TEST AL,AL
JNZ 0x0018f8ed
ADD RBX,0x60
CMP RBX,qword ptr [R14 + 0x8]
JNZ 0x0018f8b7
LAB_0018f8d3:
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x0018f940
MOV RBX,qword ptr [R14 + 0x8]
ADD RBX,-0x60
MOV DL,0x1
JMP 0x0018f8ef
LAB_0018f8ed:
XOR EDX,EDX
LAB_0018f8ef:
MOV RAX,RBX
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
int1 [16]
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_
(vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*param_1,string *param_2,Value *param_3)
{
char cVar1;
int8 extraout_RDX;
int8 uVar2;
basic_json *pbVar3;
int1 auVar4 [16];
pbVar3 = *(basic_json **)param_1;
if (pbVar3 != *(basic_json **)(param_1 + 8)) {
do {
cVar1 = std::equal_to<void>::operator()((equal_to<void> *)(param_1 + 0x18),pbVar3,param_2);
if (cVar1 != '\0') {
uVar2 = 0;
goto LAB_0018f8ef;
}
pbVar3 = pbVar3 + 0x60;
} while (pbVar3 != *(basic_json **)(param_1 + 8));
}
std::
vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::emplace_back<std::__cxx11::string_const&,minja::Value>(param_1,param_2,param_3);
pbVar3 = (basic_json *)(*(long *)(param_1 + 8) + -0x60);
uVar2 = CONCAT71((int7)((ulong)extraout_RDX >> 8),1);
LAB_0018f8ef:
auVar4._8_8_ = uVar2;
auVar4._0_8_ = pbVar3;
return auVar4;
}
|
|
61,064
|
minja::LiteralExpr::LiteralExpr(minja::Location const&, minja::Value const&)
|
monkey531[P]llama/common/minja.hpp
|
LiteralExpr(const Location & location, const Value& v)
: Expression(location), value(v) {}
|
O3
|
cpp
|
minja::LiteralExpr::LiteralExpr(minja::Location const&, minja::Value const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x9b97d(%rip), %r15 # 0x1293b8
addq $0x10, %r15
movq %r15, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0x8da6b
movq 0x9d52b(%rip), %rcx # 0x12af88
cmpb $0x0, (%rcx)
je 0x8da67
incl 0x8(%rax)
jmp 0x8da6b
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rbx)
leaq 0x9babe(%rip), %rax # 0x129538
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x20(%rbx), %rdi
movq %rdx, %rsi
callq 0x8d494
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %r15, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x8daa7
callq 0x6d25e
movq %r14, %rdi
callq 0x1af80
nop
|
_ZN5minja11LiteralExprC2ERKNS_8LocationERKNS_5ValueE:
push r15
push r14
push rbx
mov rbx, rdi
lea r15, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression
add r15, 10h
mov [rdi], r15
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_8DA6B
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_8DA67
inc dword ptr [rax+8]
jmp short loc_8DA6B
loc_8DA67:
lock inc dword ptr [rax+8]
loc_8DA6B:
mov rax, [rsi+10h]
mov [rbx+18h], rax
lea rax, _ZTVN5minja11LiteralExprE; `vtable for'minja::LiteralExpr
add rax, 10h
mov [rbx], rax
lea rdi, [rbx+20h]; this
mov rsi, rdx; minja::Value *
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov [rbx], r15
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_8DAA7
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8DAA7:
mov rdi, r14
call __Unwind_Resume
|
long long minja::LiteralExpr::LiteralExpr(_QWORD *a1, _QWORD *a2, const minja::Value *a3)
{
long long v3; // rax
*a1 = &`vtable for'minja::Expression + 2;
a1[1] = *a2;
v3 = a2[1];
a1[2] = v3;
if ( v3 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v3 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v3 + 8));
}
a1[3] = a2[2];
*a1 = &`vtable for'minja::LiteralExpr + 2;
return minja::Value::Value((minja::Value *)(a1 + 4), a3);
}
|
LiteralExpr:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
LEA R15,[0x2293b8]
ADD R15,0x10
MOV qword ptr [RDI],R15
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 0x0018da6b
MOV RCX,qword ptr [0x0022af88]
CMP byte ptr [RCX],0x0
JZ 0x0018da67
INC dword ptr [RAX + 0x8]
JMP 0x0018da6b
LAB_0018da67:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0018da6b:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RBX + 0x18],RAX
LEA RAX,[0x229538]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
LEA RDI,[RBX + 0x20]
LAB_0018da85:
MOV RSI,RDX
CALL 0x0018d494
LAB_0018da8d:
POP RBX
POP R14
POP R15
RET
|
/* minja::LiteralExpr::LiteralExpr(minja::Location const&, minja::Value const&) */
void __thiscall minja::LiteralExpr::LiteralExpr(LiteralExpr *this,Location *param_1,Value *param_2)
{
long lVar1;
*(int ***)this = &PTR___cxa_pure_virtual_002293c8;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_0022af88 == '\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_evaluate_00229548;
/* try { // try from 0018da85 to 0018da8c has its CatchHandler @ 0018da93 */
Value::Value((Value *)(this + 0x20),param_2);
return;
}
|
|
61,065
|
init_default_directories
|
eloqsql/mysys/my_default.c
|
static const char **init_default_directories(MEM_ROOT *alloc)
{
const char **dirs;
char *env;
int errors= 0;
DBUG_ENTER("init_default_directories");
dirs= (const char **)alloc_root(alloc, DEFAULT_DIRS_SIZE * sizeof(char *));
if (dirs == NULL)
DBUG_RETURN(NULL);
bzero((char *) dirs, DEFAULT_DIRS_SIZE * sizeof(char *));
#ifdef _WIN32
{
char fname_buffer[FN_REFLEN];
if (GetSystemWindowsDirectory(fname_buffer, sizeof(fname_buffer)))
errors += add_directory(alloc, fname_buffer, dirs);
if (GetWindowsDirectory(fname_buffer, sizeof(fname_buffer)))
errors += add_directory(alloc, fname_buffer, dirs);
errors += add_directory(alloc, "C:/", dirs);
if (my_get_module_parent(fname_buffer, sizeof(fname_buffer)) != NULL)
{
errors += add_directory(alloc, fname_buffer, dirs);
strcat_s(fname_buffer, sizeof(fname_buffer), "/data");
errors += add_directory(alloc, fname_buffer, dirs);
}
}
#else
#if defined(DEFAULT_SYSCONFDIR)
if (DEFAULT_SYSCONFDIR[0])
errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs);
#else
errors += add_directory(alloc, "/etc/", dirs);
errors += add_directory(alloc, "/etc/mysql/", dirs);
#endif /* DEFAULT_SYSCONFDIR */
#endif
/*
If value of $MARIADB_HOME environment variable name is NULL, check
for $MYSQL_HOME
*/
if ((env= getenv("MARIADB_HOME")))
errors += add_directory(alloc, env, dirs);
else
{
if ((env= getenv("MYSQL_HOME")))
errors += add_directory(alloc, env, dirs);
}
/* Placeholder for --defaults-extra-file=<path> */
errors += add_directory(alloc, "", dirs);
#if !defined(_WIN32)
errors += add_directory(alloc, "~/", dirs);
#endif
DBUG_RETURN(errors > 0 ? NULL : dirs);
}
|
O0
|
c
|
init_default_directories:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movl $0x40, %esi
callq 0x84880
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x7f6db
jmp 0x7f6ce
movq $0x0, -0x8(%rbp)
jmp 0x7f7cf
movq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x40, %edx
callq 0x38300
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x637c5(%rip), %rsi # 0xe2ebf
callq 0x813e0
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x637b1(%rip), %rsi # 0xe2ec5
callq 0x813e0
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
leaq 0x627ae(%rip), %rdi # 0xe1ed4
callq 0x387a0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x7f74e
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x813e0
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x7f77d
leaq 0x6278c(%rip), %rdi # 0xe1ee1
callq 0x387a0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x7f77b
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x813e0
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x7f77d
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x5d3c0(%rip), %rsi # 0xdcb4c
callq 0x813e0
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x6372b(%rip), %rsi # 0xe2ed1
callq 0x813e0
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jle 0x7f7bf
xorl %eax, %eax
movq %rax, -0x30(%rbp)
jmp 0x7f7c7
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
init_default_directories:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_24], 0
mov rdi, [rbp+var_10]
mov esi, 40h ; '@'
call alloc_root
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jnz short loc_7F6DB
jmp short $+2
loc_7F6CE:
mov [rbp+var_8], 0
jmp loc_7F7CF
loc_7F6DB:
mov rdi, [rbp+var_18]
xor esi, esi
mov edx, 40h ; '@'
call _memset
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
lea rsi, aEtc_0; "/etc/"
call add_directory
add eax, [rbp+var_24]
mov [rbp+var_24], eax
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
lea rsi, aEtcMysql_0; "/etc/mysql/"
call add_directory
add eax, [rbp+var_24]
mov [rbp+var_24], eax
lea rdi, aMariadbHome; "MARIADB_HOME"
call _getenv
mov [rbp+var_20], rax
cmp rax, 0
jz short loc_7F74E
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_18]
call add_directory
add eax, [rbp+var_24]
mov [rbp+var_24], eax
jmp short loc_7F77D
loc_7F74E:
lea rdi, aMysqlHome; "MYSQL_HOME"
call _getenv
mov [rbp+var_20], rax
cmp rax, 0
jz short loc_7F77B
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_18]
call add_directory
add eax, [rbp+var_24]
mov [rbp+var_24], eax
loc_7F77B:
jmp short $+2
loc_7F77D:
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
lea rsi, asc_DCB4A+2; ""
call add_directory
add eax, [rbp+var_24]
mov [rbp+var_24], eax
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
lea rsi, asc_E2ED1; "~/"
call add_directory
add eax, [rbp+var_24]
mov [rbp+var_24], eax
cmp [rbp+var_24], 0
jle short loc_7F7BF
xor eax, eax
mov [rbp+var_30], rax
jmp short loc_7F7C7
loc_7F7BF:
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
loc_7F7C7:
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
loc_7F7CF:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
long long init_default_directories(long long a1)
{
int v3; // [rsp+Ch] [rbp-24h]
int v4; // [rsp+Ch] [rbp-24h]
int v5; // [rsp+Ch] [rbp-24h]
long long v6; // [rsp+10h] [rbp-20h]
long long v7; // [rsp+18h] [rbp-18h]
v7 = alloc_root(a1, 64LL);
if ( !v7 )
return 0LL;
memset(v7, 0LL, 64LL);
v3 = add_directory(a1, "/etc/", v7);
v4 = v3 + add_directory(a1, "/etc/mysql/", v7);
v6 = getenv("MARIADB_HOME");
if ( v6 || (v6 = getenv("MYSQL_HOME")) != 0 )
v4 += add_directory(a1, v6, v7);
v5 = v4 + add_directory(a1, "", v7);
if ( (int)(v5 + add_directory(a1, "~/", v7)) <= 0 )
return v7;
else
return 0LL;
}
|
init_default_directories:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x24],0x0
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x40
CALL 0x00184880
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x0017f6db
JMP 0x0017f6ce
LAB_0017f6ce:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0017f7cf
LAB_0017f6db:
MOV RDI,qword ptr [RBP + -0x18]
XOR ESI,ESI
MOV EDX,0x40
CALL 0x00138300
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
LEA RSI,[0x1e2ebf]
CALL 0x001813e0
ADD EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x24],EAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
LEA RSI,[0x1e2ec5]
CALL 0x001813e0
ADD EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x24],EAX
LEA RDI,[0x1e1ed4]
CALL 0x001387a0
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JZ 0x0017f74e
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x001813e0
ADD EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x24],EAX
JMP 0x0017f77d
LAB_0017f74e:
LEA RDI,[0x1e1ee1]
CALL 0x001387a0
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JZ 0x0017f77b
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x001813e0
ADD EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x24],EAX
LAB_0017f77b:
JMP 0x0017f77d
LAB_0017f77d:
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
LEA RSI,[0x1dcb4c]
CALL 0x001813e0
ADD EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x24],EAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
LEA RSI,[0x1e2ed1]
CALL 0x001813e0
ADD EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x24],EAX
CMP dword ptr [RBP + -0x24],0x0
JLE 0x0017f7bf
XOR EAX,EAX
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0017f7c7
LAB_0017f7bf:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
LAB_0017f7c7:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
LAB_0017f7cf:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
void * init_default_directories(int8 param_1)
{
int iVar1;
int iVar2;
char *pcVar3;
void *local_38;
int local_2c;
void *local_10;
local_38 = (void *)alloc_root(param_1);
if (local_38 == (void *)0x0) {
local_10 = (void *)0x0;
}
else {
memset(local_38,0,0x40);
iVar1 = add_directory(param_1,"/etc/",local_38);
local_2c = add_directory(param_1,"/etc/mysql/",local_38);
local_2c = local_2c + iVar1;
pcVar3 = getenv("MARIADB_HOME");
if (pcVar3 == (char *)0x0) {
pcVar3 = getenv("MYSQL_HOME");
if (pcVar3 != (char *)0x0) {
iVar1 = add_directory(param_1,pcVar3,local_38);
local_2c = iVar1 + local_2c;
}
}
else {
iVar1 = add_directory(param_1,pcVar3,local_38);
local_2c = iVar1 + local_2c;
}
iVar1 = add_directory(param_1,&DAT_001dcb4c,local_38);
iVar2 = add_directory(param_1,&DAT_001e2ed1,local_38);
if (0 < iVar2 + iVar1 + local_2c) {
local_38 = (void *)0x0;
}
local_10 = local_38;
}
return local_10;
}
|
|
61,066
|
get_charset_number_internal
|
eloqsql/mysys/charset.c
|
static uint
get_charset_number_internal(const char *charset_name, uint cs_flags)
{
CHARSET_INFO **cs;
for (cs= all_charsets;
cs < all_charsets + array_elements(all_charsets);
cs++)
{
if ( cs[0] && cs[0]->cs_name.str && (cs[0]->state & cs_flags) &&
!my_strcasecmp(&my_charset_latin1, cs[0]->cs_name.str, charset_name))
return cs[0]->number;
}
return 0;
}
|
O0
|
c
|
get_charset_number_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
leaq 0xb9e92a(%rip), %rax # 0xc7a6c0
movq %rax, -0x20(%rbp)
leaq 0xb9e91f(%rip), %rax # 0xc7a6c0
addq $0x4000, %rax # imm = 0x4000
cmpq %rax, -0x20(%rbp)
jae 0xdbe27
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
je 0xdbe14
movq -0x20(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x10(%rax)
je 0xdbe14
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl 0xc(%rax), %eax
andl -0x14(%rbp), %eax
cmpl $0x0, %eax
je 0xdbe14
leaq 0x28a1f2(%rip), %rax # 0x365fd0
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
movq 0x10(%rcx), %rsi
movq -0x10(%rbp), %rdx
leaq 0x28a1d1(%rip), %rdi # 0x365fd0
callq *%rax
cmpl $0x0, %eax
jne 0xdbe14
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0xdbe2e
jmp 0xdbe16
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
jmp 0xdbd9a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
get_charset_number_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
lea rax, all_charsets
mov [rbp+var_20], rax
loc_DBD9A:
lea rax, all_charsets
add rax, 4000h
cmp [rbp+var_20], rax
jnb short loc_DBE27
mov rax, [rbp+var_20]
cmp qword ptr [rax], 0
jz short loc_DBE14
mov rax, [rbp+var_20]
mov rax, [rax]
cmp qword ptr [rax+10h], 0
jz short loc_DBE14
mov rax, [rbp+var_20]
mov rax, [rax]
mov eax, [rax+0Ch]
and eax, [rbp+var_14]
cmp eax, 0
jz short loc_DBE14
lea rax, my_charset_latin1
mov rax, [rax+0C0h]
mov rax, [rax+40h]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
mov rsi, [rcx+10h]
mov rdx, [rbp+var_10]
lea rdi, my_charset_latin1
call rax
cmp eax, 0
jnz short loc_DBE14
mov rax, [rbp+var_20]
mov rax, [rax]
mov eax, [rax]
mov [rbp+var_4], eax
jmp short loc_DBE2E
loc_DBE14:
jmp short $+2
loc_DBE16:
mov rax, [rbp+var_20]
add rax, 8
mov [rbp+var_20], rax
jmp loc_DBD9A
loc_DBE27:
mov [rbp+var_4], 0
loc_DBE2E:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
|
long long get_charset_number_internal(long long a1, int a2)
{
unsigned int **i; // [rsp+0h] [rbp-20h]
for ( i = (unsigned int **)all_charsets; i < &all_charsets[2048]; ++i )
{
if ( *i
&& *((_QWORD *)*i + 2)
&& (a2 & (*i)[3]) != 0
&& !(*(unsigned int ( **)(void *, _QWORD, long long))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
*((_QWORD *)*i + 2),
a1) )
{
return **i;
}
}
return 0;
}
|
get_charset_number_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
LEA RAX,[0xd7a6c0]
MOV qword ptr [RBP + -0x20],RAX
LAB_001dbd9a:
LEA RAX,[0xd7a6c0]
ADD RAX,0x4000
CMP qword ptr [RBP + -0x20],RAX
JNC 0x001dbe27
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX],0x0
JZ 0x001dbe14
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX + 0x10],0x0
JZ 0x001dbe14
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,dword ptr [RBP + -0x14]
CMP EAX,0x0
JZ 0x001dbe14
LEA RAX,[0x465fd0]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
MOV RSI,qword ptr [RCX + 0x10]
MOV RDX,qword ptr [RBP + -0x10]
LEA RDI,[0x465fd0]
CALL RAX
CMP EAX,0x0
JNZ 0x001dbe14
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001dbe2e
LAB_001dbe14:
JMP 0x001dbe16
LAB_001dbe16:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x8
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001dbd9a
LAB_001dbe27:
MOV dword ptr [RBP + -0x4],0x0
LAB_001dbe2e:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 get_charset_number_internal(int8 param_1,uint param_2)
{
int iVar1;
long *local_28;
local_28 = &all_charsets;
while( true ) {
if ((long *)0xd7e6bf < local_28) {
return 0;
}
if ((((*local_28 != 0) && (*(long *)(*local_28 + 0x10) != 0)) &&
((*(uint *)(*local_28 + 0xc) & param_2) != 0)) &&
(iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_00466090 + 0x40))
(&my_charset_latin1,*(int8 *)(*local_28 + 0x10),param_1), iVar1 == 0
)) break;
local_28 = local_28 + 1;
}
return *(int4 *)*local_28;
}
|
|
61,067
|
pcmp
|
eloqsql/strings/ctype-simple.c
|
static int pcmp(const void * f, const void * s)
{
const uni_idx *F= (const uni_idx*) f;
const uni_idx *S= (const uni_idx*) s;
int res;
if (!(res=((S->nchars)-(F->nchars))))
res=((F->uidx.from)-(S->uidx.to));
return res;
}
|
O3
|
c
|
pcmp:
pushq %rbp
movq %rsp, %rbp
movl (%rsi), %eax
subl (%rdi), %eax
jne 0xb68d9
movzwl 0x8(%rdi), %eax
movzwl 0xa(%rsi), %ecx
subl %ecx, %eax
popq %rbp
retq
nop
|
pcmp:
push rbp
mov rbp, rsp
mov eax, [rsi]
sub eax, [rdi]
jnz short loc_B68D9
movzx eax, word ptr [rdi+8]
movzx ecx, word ptr [rsi+0Ah]
sub eax, ecx
loc_B68D9:
pop rbp
retn
|
long long pcmp(long long a1, long long a2)
{
long long result; // rax
result = (unsigned int)(*(_DWORD *)a2 - *(_DWORD *)a1);
if ( *(_DWORD *)a2 == *(_DWORD *)a1 )
return *(unsigned __int16 *)(a1 + 8) - (unsigned int)*(unsigned __int16 *)(a2 + 10);
return result;
}
|
pcmp:
PUSH RBP
MOV RBP,RSP
MOV EAX,dword ptr [RSI]
SUB EAX,dword ptr [RDI]
JNZ 0x001b68d9
MOVZX EAX,word ptr [RDI + 0x8]
MOVZX ECX,word ptr [RSI + 0xa]
SUB EAX,ECX
LAB_001b68d9:
POP RBP
RET
|
int pcmp(int *param_1,int *param_2)
{
int iVar1;
iVar1 = *param_2 - *param_1;
if (iVar1 == 0) {
iVar1 = (uint)*(ushort *)(param_1 + 2) - (uint)*(ushort *)((long)param_2 + 10);
}
return iVar1;
}
|
|
61,068
|
POINTonE1_Deserialize_Z
|
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/e1.c
|
static BLST_ERROR POINTonE1_Deserialize_Z(POINTonE1_affine *out,
const unsigned char in[96])
{
unsigned char in0 = in[0];
if ((in0 & 0xe0) == 0)
return POINTonE1_Deserialize_BE(out, in);
if (in0 & 0x80) /* compressed bit */
return POINTonE1_Uncompress_Z(out, in);
if (in0 & 0x40) { /* infinity bit */
if (byte_is_zero(in0 & 0x3f) & bytes_are_zero(in+1, 95)) {
vec_zero(out, sizeof(*out));
return BLST_SUCCESS;
}
}
return BLST_BAD_ENCODING;
}
|
O3
|
c
|
POINTonE1_Deserialize_Z:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
movzbl (%rsi), %eax
cmpq $0x1f, %rax
ja 0x59de1
movl $0x2f, %eax
xorl %ecx, %ecx
movq %rsi, %rdx
shlq $0x8, %rcx
movzbl (%rdx), %edi
incq %rdx
orq %rdi, %rcx
movq %rax, %rdi
andq $-0x8, %rdi
movq %rcx, -0x88(%rbp,%rdi)
addq $-0x1, %rax
jb 0x59c8e
leaq -0x58(%rbp), %r14
addq $0x30, %rsi
movl $0x2f, %eax
xorl %ecx, %ecx
shlq $0x8, %rcx
movzbl (%rsi), %edx
incq %rsi
orq %rdx, %rcx
movq %rax, %rdx
andq $-0x8, %rdx
movq %rcx, -0x58(%rbp,%rdx)
addq $-0x1, %rax
jb 0x59cbf
leaq -0x88(%rbp), %r15
andb $0x1f, 0x2f(%r15)
leaq 0x33017(%rip), %rdx # 0x8cd08
leaq 0x32fa8(%rip), %rcx # 0x8cca0
leaq -0xc0(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x6f640
movl $0x30, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x70980
movl $0x1, %r15d
testq %rax, %rax
je 0x59e52
leaq 0x32fd8(%rip), %rdx # 0x8cd08
leaq 0x32f69(%rip), %rcx # 0x8cca0
movq %r12, %rdi
movq %r14, %rsi
callq 0x6f640
movl $0x30, %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0x70980
testq %rax, %rax
je 0x59e52
leaq 0x331be(%rip), %rdx # 0x8cf20
leaq 0x32f37(%rip), %r12 # 0x8cca0
leaq -0x88(%rbp), %r13
movabsq $-0x760c000300030003, %r15 # imm = 0x89F3FFFCFFFCFFFD
movq %r13, %rdi
movq %r13, %rsi
movq %r12, %rcx
movq %r15, %r8
callq 0x74ea0
movq %r14, %rdi
movq %r14, %rsi
leaq 0x33188(%rip), %rdx # 0x8cf20
movq %r12, %rcx
movq %r15, %r8
callq 0x74ea0
movq %r13, %rdi
callq 0x595cb
testq %rax, %rax
je 0x59e4c
leaq -0x88(%rbp), %rsi
movl $0xc, %ecx
movq %rbx, %rdi
rep movsq (%rsi), %es:(%rdi)
movl $0x30, %esi
movq %rbx, %rdi
callq 0x70940
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
leal (%rcx,%rcx,2), %r15d
jmp 0x59e52
testb %al, %al
js 0x59e33
movl $0x1, %r15d
cmpb $0x40, %al
jb 0x59e52
andl $0x3f, %eax
decq %rax
shrq $0x3f, %rax
movl $0x1, %edx
xorl %ecx, %ecx
orb (%rsi,%rdx), %cl
incq %rdx
cmpq $0x60, %rdx
jne 0x59e00
movzbl %cl, %ecx
decq %rcx
shrq $0x3f, %rcx
testq %rax, %rcx
je 0x59e52
xorl %eax, %eax
movq $0x0, (%rbx,%rax,8)
incq %rax
cmpq $0xc, %rax
jne 0x59e1d
xorl %r15d, %r15d
jmp 0x59e52
movq %rbx, %rdi
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x59a43
movl $0x2, %r15d
movl %r15d, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
POINTonE1_Deserialize_Z:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov rbx, rdi
movzx eax, byte ptr [rsi]
cmp rax, 1Fh
ja loc_59DE1
mov eax, 2Fh ; '/'
xor ecx, ecx
mov rdx, rsi
loc_59C8E:
shl rcx, 8
movzx edi, byte ptr [rdx]
inc rdx
or rcx, rdi
mov rdi, rax
and rdi, 0FFFFFFFFFFFFFFF8h
mov [rbp+rdi+var_88], rcx
add rax, 0FFFFFFFFFFFFFFFFh
jb short loc_59C8E
lea r14, [rbp+var_58]
add rsi, 30h ; '0'
mov eax, 2Fh ; '/'
xor ecx, ecx
loc_59CBF:
shl rcx, 8
movzx edx, byte ptr [rsi]
inc rsi
or rcx, rdx
mov rdx, rax
and rdx, 0FFFFFFFFFFFFFFF8h
mov [rbp+rdx+var_58], rcx
add rax, 0FFFFFFFFFFFFFFFFh
jb short loc_59CBF
lea r15, [rbp+var_88]
and byte ptr [r15+2Fh], 1Fh
lea rdx, unk_8CD08
lea rcx, BLS12_381_P
lea r12, [rbp+var_C0]
mov rdi, r12
mov rsi, r15
call add_mod_384
mov edx, 30h ; '0'
mov rdi, r12
mov rsi, r15
call vec_is_equal_16x
mov r15d, 1
test rax, rax
jz loc_59E52
lea rdx, unk_8CD08
lea rcx, BLS12_381_P
mov rdi, r12
mov rsi, r14
call add_mod_384
mov edx, 30h ; '0'
mov rdi, r12
mov rsi, r14
call vec_is_equal_16x
test rax, rax
jz loc_59E52
lea rdx, BLS12_381_RR
lea r12, BLS12_381_P
lea r13, [rbp+var_88]
mov r15, 89F3FFFCFFFCFFFDh
mov rdi, r13
mov rsi, r13
mov rcx, r12
mov r8, r15
call mul_mont_384
mov rdi, r14
mov rsi, r14
lea rdx, BLS12_381_RR
mov rcx, r12
mov r8, r15
call mul_mont_384
mov rdi, r13
call POINTonE1_affine_on_curve
test rax, rax
jz loc_59E4C
lea rsi, [rbp+var_88]
mov ecx, 0Ch
mov rdi, rbx
rep movsq
mov esi, 30h ; '0'
mov rdi, rbx
call vec_is_zero_16x
xor ecx, ecx
test rax, rax
setnz cl
lea r15d, [rcx+rcx*2]
jmp short loc_59E52
loc_59DE1:
test al, al
js short loc_59E33
mov r15d, 1
cmp al, 40h ; '@'
jb short loc_59E52
and eax, 3Fh
dec rax
shr rax, 3Fh
mov edx, 1
xor ecx, ecx
loc_59E00:
or cl, [rsi+rdx]
inc rdx
cmp rdx, 60h ; '`'
jnz short loc_59E00
movzx ecx, cl
dec rcx
shr rcx, 3Fh
test rcx, rax
jz short loc_59E52
xor eax, eax
loc_59E1D:
mov qword ptr [rbx+rax*8], 0
inc rax
cmp rax, 0Ch
jnz short loc_59E1D
xor r15d, r15d
jmp short loc_59E52
loc_59E33:
mov rdi, rbx
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp POINTonE1_Uncompress_Z
loc_59E4C:
mov r15d, 2
loc_59E52:
mov eax, r15d
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long POINTonE1_Deserialize_Z(_QWORD *a1, unsigned __int8 *a2)
{
unsigned long long v3; // rax
long long v4; // rax
long long v5; // rcx
unsigned __int8 *v6; // rdx
long long v7; // rdi
bool v8; // cf
unsigned __int8 *v9; // rsi
long long v10; // rax
long long v11; // rcx
long long v12; // rdx
unsigned int v13; // r15d
unsigned long long v14; // rax
long long v15; // rdx
unsigned __int8 v16; // cl
long long i; // rax
_BYTE v19[56]; // [rsp+0h] [rbp-C0h] BYREF
_QWORD v20[17]; // [rsp+38h] [rbp-88h] BYREF
v3 = *a2;
if ( v3 > 0x1F )
{
if ( (v3 & 0x80u) != 0LL )
return POINTonE1_Uncompress_Z(a1, a2);
v13 = 1;
if ( (unsigned __int8)v3 >= 0x40u )
{
v14 = ((v3 & 0x3F) - 1) >> 63;
v15 = 1LL;
v16 = 0;
do
v16 |= a2[v15++];
while ( v15 != 96 );
if ( (v14 & (((unsigned long long)v16 - 1) >> 63)) != 0 )
{
for ( i = 0LL; i != 12; ++i )
a1[i] = 0LL;
return 0;
}
}
}
else
{
v4 = 47LL;
v5 = 0LL;
v6 = a2;
do
{
v7 = *v6++;
v5 = v7 | (v5 << 8);
*(_QWORD *)((char *)v20 + (v4 & 0xFFFFFFFFFFFFFFF8LL)) = v5;
v8 = v4-- != 0;
}
while ( v8 );
v9 = a2 + 48;
v10 = 47LL;
v11 = 0LL;
do
{
v12 = *v9++;
v11 = v12 | (v11 << 8);
*(_QWORD *)((char *)&v20[6] + (v10 & 0xFFFFFFFFFFFFFFF8LL)) = v11;
v8 = v10-- != 0;
}
while ( v8 );
HIBYTE(v20[5]) &= 0x1Fu;
add_mod_384(v19, v20, &unk_8CD08, &BLS12_381_P);
v13 = 1;
if ( vec_is_equal_16x(v19, v20, 48LL) )
{
add_mod_384(v19, &v20[6], &unk_8CD08, &BLS12_381_P);
if ( vec_is_equal_16x(v19, &v20[6], 48LL) )
{
mul_mont_384(v20, v20, &BLS12_381_RR, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384(&v20[6], &v20[6], &BLS12_381_RR, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
if ( POINTonE1_affine_on_curve((long long)v20) )
{
qmemcpy(a1, v20, 0x60uLL);
return 3 * (unsigned int)(vec_is_zero_16x(a1, 48LL) != 0);
}
else
{
return 2;
}
}
}
}
return v13;
}
|
POINTonE1_Deserialize_Z:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV RBX,RDI
MOVZX EAX,byte ptr [RSI]
CMP RAX,0x1f
JA 0x00159de1
MOV EAX,0x2f
XOR ECX,ECX
MOV RDX,RSI
LAB_00159c8e:
SHL RCX,0x8
MOVZX EDI,byte ptr [RDX]
INC RDX
OR RCX,RDI
MOV RDI,RAX
AND RDI,-0x8
MOV qword ptr [RBP + RDI*0x1 + -0x88],RCX
ADD RAX,-0x1
JC 0x00159c8e
LEA R14,[RBP + -0x58]
ADD RSI,0x30
MOV EAX,0x2f
XOR ECX,ECX
LAB_00159cbf:
SHL RCX,0x8
MOVZX EDX,byte ptr [RSI]
INC RSI
OR RCX,RDX
MOV RDX,RAX
AND RDX,-0x8
MOV qword ptr [RBP + RDX*0x1 + -0x58],RCX
ADD RAX,-0x1
JC 0x00159cbf
LEA R15,[RBP + -0x88]
AND byte ptr [R15 + 0x2f],0x1f
LEA RDX,[0x18cd08]
LEA RCX,[0x18cca0]
LEA R12,[RBP + -0xc0]
MOV RDI,R12
MOV RSI,R15
CALL 0x0016f640
MOV EDX,0x30
MOV RDI,R12
MOV RSI,R15
CALL 0x00170980
MOV R15D,0x1
TEST RAX,RAX
JZ 0x00159e52
LEA RDX,[0x18cd08]
LEA RCX,[0x18cca0]
MOV RDI,R12
MOV RSI,R14
CALL 0x0016f640
MOV EDX,0x30
MOV RDI,R12
MOV RSI,R14
CALL 0x00170980
TEST RAX,RAX
JZ 0x00159e52
LEA RDX,[0x18cf20]
LEA R12,[0x18cca0]
LEA R13,[RBP + -0x88]
MOV R15,-0x760c000300030003
MOV RDI,R13
MOV RSI,R13
MOV RCX,R12
MOV R8,R15
CALL 0x00174ea0
MOV RDI,R14
MOV RSI,R14
LEA RDX,[0x18cf20]
MOV RCX,R12
MOV R8,R15
CALL 0x00174ea0
MOV RDI,R13
CALL 0x001595cb
TEST RAX,RAX
JZ 0x00159e4c
LEA RSI,[RBP + -0x88]
MOV ECX,0xc
MOV RDI,RBX
MOVSQ.REP RDI,RSI
MOV ESI,0x30
MOV RDI,RBX
CALL 0x00170940
XOR ECX,ECX
TEST RAX,RAX
SETNZ CL
LEA R15D,[RCX + RCX*0x2]
JMP 0x00159e52
LAB_00159de1:
TEST AL,AL
JS 0x00159e33
MOV R15D,0x1
CMP AL,0x40
JC 0x00159e52
AND EAX,0x3f
DEC RAX
SHR RAX,0x3f
MOV EDX,0x1
XOR ECX,ECX
LAB_00159e00:
OR CL,byte ptr [RSI + RDX*0x1]
INC RDX
CMP RDX,0x60
JNZ 0x00159e00
MOVZX ECX,CL
DEC RCX
SHR RCX,0x3f
TEST RCX,RAX
JZ 0x00159e52
XOR EAX,EAX
LAB_00159e1d:
MOV qword ptr [RBX + RAX*0x8],0x0
INC RAX
CMP RAX,0xc
JNZ 0x00159e1d
XOR R15D,R15D
JMP 0x00159e52
LAB_00159e33:
MOV RDI,RBX
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00159a43
LAB_00159e4c:
MOV R15D,0x2
LAB_00159e52:
MOV EAX,R15D
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong POINTonE1_Deserialize_Z(ulong *param_1,byte *param_2)
{
byte bVar1;
ulong uVar2;
long lVar3;
byte bVar4;
ulong uVar5;
byte *pbVar6;
ulong *puVar7;
ulong *puVar8;
uint uVar9;
bool bVar10;
int1 local_c8 [56];
ulong local_90 [5];
byte local_61;
ulong local_60 [6];
bVar4 = 0;
bVar1 = *param_2;
if (bVar1 < 0x20) {
uVar2 = 0x2f;
uVar5 = 0;
pbVar6 = param_2;
do {
bVar1 = *pbVar6;
pbVar6 = pbVar6 + 1;
uVar5 = uVar5 << 8 | (ulong)bVar1;
*(ulong *)((long)local_90 + (uVar2 & 0xfffffffffffffff8)) = uVar5;
bVar10 = uVar2 != 0;
uVar2 = uVar2 - 1;
} while (bVar10);
param_2 = param_2 + 0x30;
uVar2 = 0x2f;
uVar5 = 0;
do {
bVar1 = *param_2;
param_2 = param_2 + 1;
uVar5 = uVar5 << 8 | (ulong)bVar1;
*(ulong *)((long)local_60 + (uVar2 & 0xfffffffffffffff8)) = uVar5;
bVar10 = uVar2 != 0;
uVar2 = uVar2 - 1;
} while (bVar10);
local_61 = local_61 & 0x1f;
add_mod_384(local_c8,local_90,&DAT_0018cd08,BLS12_381_P);
lVar3 = vec_is_equal_16x(local_c8,local_90,0x30);
uVar9 = 1;
if (lVar3 != 0) {
add_mod_384(local_c8,local_60,&DAT_0018cd08,BLS12_381_P);
lVar3 = vec_is_equal_16x(local_c8,local_60,0x30);
if (lVar3 != 0) {
mul_mont_384(local_90,local_90,BLS12_381_RR,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384(local_60,local_60,BLS12_381_RR,BLS12_381_P,0x89f3fffcfffcfffd);
lVar3 = POINTonE1_affine_on_curve(local_90);
if (lVar3 == 0) {
uVar9 = 2;
}
else {
puVar7 = local_90;
puVar8 = param_1;
for (lVar3 = 0xc; lVar3 != 0; lVar3 = lVar3 + -1) {
*puVar8 = *puVar7;
puVar7 = puVar7 + (ulong)bVar4 * -2 + 1;
puVar8 = puVar8 + (ulong)bVar4 * -2 + 1;
}
lVar3 = vec_is_zero_16x(param_1,0x30);
uVar9 = (uint)(lVar3 != 0) * 3;
}
}
}
}
else {
if ((char)bVar1 < '\0') {
uVar2 = POINTonE1_Uncompress_Z(param_1);
return uVar2;
}
uVar9 = 1;
if (0x3f < bVar1) {
lVar3 = 1;
bVar4 = 0;
do {
bVar4 = bVar4 | param_2[lVar3];
lVar3 = lVar3 + 1;
} while (lVar3 != 0x60);
if ((long)((ulong)bVar4 - 1 & (ulong)(bVar1 & 0x3f) - 1) < 0) {
lVar3 = 0;
do {
param_1[lVar3] = 0;
lVar3 = lVar3 + 1;
} while (lVar3 != 0xc);
uVar9 = 0;
}
}
}
return (ulong)uVar9;
}
|
|
61,069
|
my_uni_utf16
|
eloqsql/strings/ctype-ucs2.c
|
int
my_uni_utf16(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
if (wc <= 0xFFFF)
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
if (MY_UTF16_SURROGATE(wc))
return MY_CS_ILUNI;
*s++= (uchar) (wc >> 8);
*s= (uchar) (wc & 0xFF);
return 2;
}
if (wc <= 0x10FFFF)
{
if (s + 4 > e)
return MY_CS_TOOSMALL4;
*s++= (uchar) ((wc-= 0x10000) >> 18) | 0xD8;
*s++= (uchar) (wc >> 10) & 0xFF;
*s++= (uchar) ((wc >> 8) & 3) | 0xDC;
*s= (uchar) wc & 0xFF;
return 4;
}
return MY_CS_ILUNI;
}
|
O3
|
c
|
my_uni_utf16:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
movq %rsi, %rbx
cmpq $0xffff, %rsi # imm = 0xFFFF
ja 0x7cac7
leaq 0x2(%rdx), %rsi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rsi
ja 0x7cb0f
movl %ebx, %eax
andl $0xf800, %eax # imm = 0xF800
cmpl $0xd800, %eax # imm = 0xD800
je 0x7cb0d
movb %bh, (%rdx)
incq %rdx
movl $0x2, %eax
jmp 0x7cb09
cmpq $0x10ffff, %rbx # imm = 0x10FFFF
ja 0x7cb0d
leaq 0x4(%rdx), %rsi
movl $0xffffff98, %eax # imm = 0xFFFFFF98
cmpq %rcx, %rsi
ja 0x7cb0f
leal -0x10000(%rbx), %eax
movl %eax, %ecx
shrl $0x12, %ecx
orb $-0x28, %cl
movb %cl, (%rdx)
shrl $0xa, %eax
movb %al, 0x1(%rdx)
movl %ebx, %eax
shrl $0x8, %eax
andb $0x3, %al
orb $-0x24, %al
movb %al, 0x2(%rdx)
addq $0x3, %rdx
movl $0x4, %eax
movb %bl, (%rdx)
jmp 0x7cb0f
xorl %eax, %eax
popq %rbx
popq %rbp
retq
|
my_uni_utf16:
push rbp
mov rbp, rsp
push rbx
mov rbx, rsi
cmp rsi, 0FFFFh
ja short loc_7CAC7
lea rsi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rsi, rcx
ja short loc_7CB0F
mov eax, ebx
and eax, 0F800h
cmp eax, 0D800h
jz short loc_7CB0D
mov [rdx], bh
inc rdx
mov eax, 2
jmp short loc_7CB09
loc_7CAC7:
cmp rbx, offset unk_10FFFF
ja short loc_7CB0D
lea rsi, [rdx+4]
mov eax, 0FFFFFF98h
cmp rsi, rcx
ja short loc_7CB0F
lea eax, [rbx-10000h]
mov ecx, eax
shr ecx, 12h
or cl, 0D8h
mov [rdx], cl
shr eax, 0Ah
mov [rdx+1], al
mov eax, ebx
shr eax, 8
and al, 3
or al, 0DCh
mov [rdx+2], al
add rdx, 3
mov eax, 4
loc_7CB09:
mov [rdx], bl
jmp short loc_7CB0F
loc_7CB0D:
xor eax, eax
loc_7CB0F:
pop rbx
pop rbp
retn
|
long long my_uni_utf16(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
long long result; // rax
_BYTE *v5; // rdx
if ( a2 > 0xFFFF )
{
if ( a2 <= (unsigned long long)&unk_10FFFF )
{
result = 4294967192LL;
if ( (unsigned long long)(a3 + 4) > a4 )
return result;
*a3 = ((unsigned int)(a2 - 0x10000) >> 18) | 0xD8;
a3[1] = (unsigned int)(a2 - 0x10000) >> 10;
a3[2] = BYTE1(a2) & 3 | 0xDC;
v5 = a3 + 3;
result = 4LL;
goto LABEL_8;
}
}
else
{
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) > a4 )
return result;
if ( (a2 & 0xF800) != 0xD800 )
{
*a3 = BYTE1(a2);
v5 = a3 + 1;
result = 2LL;
LABEL_8:
*v5 = a2;
return result;
}
}
return 0LL;
}
|
my_uni_utf16:
PUSH RBP
MOV RBP,RSP
PUSH RBX
MOV RBX,RSI
CMP RSI,0xffff
JA 0x0017cac7
LEA RSI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RSI,RCX
JA 0x0017cb0f
MOV EAX,EBX
AND EAX,0xf800
CMP EAX,0xd800
JZ 0x0017cb0d
MOV byte ptr [RDX],BH
INC RDX
MOV EAX,0x2
JMP 0x0017cb09
LAB_0017cac7:
CMP RBX,0x10ffff
JA 0x0017cb0d
LEA RSI,[RDX + 0x4]
MOV EAX,0xffffff98
CMP RSI,RCX
JA 0x0017cb0f
LEA EAX,[RBX + -0x10000]
MOV ECX,EAX
SHR ECX,0x12
OR CL,0xd8
MOV byte ptr [RDX],CL
SHR EAX,0xa
MOV byte ptr [RDX + 0x1],AL
MOV EAX,EBX
SHR EAX,0x8
AND AL,0x3
OR AL,0xdc
MOV byte ptr [RDX + 0x2],AL
ADD RDX,0x3
MOV EAX,0x4
LAB_0017cb09:
MOV byte ptr [RDX],BL
JMP 0x0017cb0f
LAB_0017cb0d:
XOR EAX,EAX
LAB_0017cb0f:
POP RBX
POP RBP
RET
|
int8 my_uni_utf16(int8 param_1,ulong param_2,byte *param_3,byte *param_4)
{
uint uVar1;
int8 uVar2;
byte bVar3;
bVar3 = (byte)(param_2 >> 8);
if (param_2 < 0x10000) {
if (param_4 < param_3 + 2) {
return 0xffffff9a;
}
if (((uint)param_2 & 0xf800) == 0xd800) {
return 0;
}
*param_3 = bVar3;
param_3 = param_3 + 1;
uVar2 = 2;
}
else {
if (0x10ffff < param_2) {
return 0;
}
if (param_4 < param_3 + 4) {
return 0xffffff98;
}
uVar1 = (uint)param_2 - 0x10000;
*param_3 = (byte)(uVar1 >> 0x12) | 0xd8;
param_3[1] = (byte)(uVar1 >> 10);
param_3[2] = bVar3 & 3 | 0xdc;
param_3 = param_3 + 3;
uVar2 = 4;
}
*param_3 = (byte)param_2;
return uVar2;
}
|
|
61,070
|
tree_search_edge
|
eloqsql/mysys/tree.c
|
void *tree_search_edge(TREE *tree, TREE_ELEMENT **parents,
TREE_ELEMENT ***last_pos, int child_offs)
{
TREE_ELEMENT *element= tree->root;
*parents= &null_element;
while (element != &null_element)
{
*++parents= element;
element= ELEMENT_CHILD(element, child_offs);
}
*last_pos= parents;
return **last_pos != &null_element ?
ELEMENT_KEY(tree, **last_pos) : NULL;
}
|
O0
|
c
|
tree_search_edge:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
leaq 0x1c4547(%rip), %rcx # 0x2bfde0
movq %rcx, (%rax)
leaq 0x1c453d(%rip), %rax # 0x2bfde0
cmpq %rax, -0x28(%rbp)
je 0xfb8d2
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, -0x10(%rbp)
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx), %rax
movq %rax, -0x28(%rbp)
jmp 0xfb89c
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
leaq 0x1c44f5(%rip), %rcx # 0x2bfde0
cmpq %rcx, (%rax)
je 0xfb936
movq -0x8(%rbp), %rax
cmpl $0x0, 0x208(%rax)
je 0xfb91a
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x208(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
jmp 0xfb92c
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0xfb93e
xorl %eax, %eax
movq %rax, -0x38(%rbp)
jmp 0xfb93e
movq -0x38(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
tree_search_edge:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
lea rcx, null_element
mov [rax], rcx
loc_FB89C:
lea rax, null_element
cmp [rbp+var_28], rax
jz short loc_FB8D2
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 8
mov [rbp+var_10], rdx
mov [rax+8], rcx
mov rax, [rbp+var_28]
movsxd rcx, [rbp+var_1C]
mov rax, [rax+rcx]
mov [rbp+var_28], rax
jmp short loc_FB89C
loc_FB8D2:
mov rcx, [rbp+var_10]
mov rax, [rbp+var_18]
mov [rax], rcx
mov rax, [rbp+var_18]
mov rax, [rax]
lea rcx, null_element
cmp [rax], rcx
jz short loc_FB936
mov rax, [rbp+var_8]
cmp dword ptr [rax+208h], 0
jz short loc_FB91A
mov rax, [rbp+var_18]
mov rax, [rax]
mov rax, [rax]
mov rcx, [rbp+var_8]
mov ecx, [rcx+208h]
add rax, rcx
mov [rbp+var_30], rax
jmp short loc_FB92C
loc_FB91A:
mov rax, [rbp+var_18]
mov rax, [rax]
mov rax, [rax]
mov rax, [rax+18h]
mov [rbp+var_30], rax
loc_FB92C:
mov rax, [rbp+var_30]
mov [rbp+var_38], rax
jmp short loc_FB93E
loc_FB936:
xor eax, eax
mov [rbp+var_38], rax
jmp short $+2
loc_FB93E:
mov rax, [rbp+var_38]
pop rbp
retn
|
long long tree_search_edge(char **a1, _QWORD *a2, long long a3, int a4)
{
_QWORD *v4; // rax
char *v8; // [rsp+10h] [rbp-28h]
_QWORD *v9; // [rsp+28h] [rbp-10h]
v9 = a2;
v8 = *a1;
*a2 = &null_element;
while ( v8 != (char *)&null_element )
{
v4 = v9++;
v4[1] = v8;
v8 = *(char **)&v8[a4];
}
*(_QWORD *)a3 = v9;
if ( **(_UNKNOWN ***)a3 == &null_element )
return 0LL;
if ( *((_DWORD *)a1 + 130) )
return *((unsigned int *)a1 + 130) + **(_QWORD **)a3;
else
return *(_QWORD *)(**(_QWORD **)a3 + 24LL);
}
|
tree_search_edge:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x3bfde0]
MOV qword ptr [RAX],RCX
LAB_001fb89c:
LEA RAX,[0x3bfde0]
CMP qword ptr [RBP + -0x28],RAX
JZ 0x001fb8d2
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RBP + -0x10],RDX
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RAX + RCX*0x1]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001fb89c
LAB_001fb8d2:
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
LEA RCX,[0x3bfde0]
CMP qword ptr [RAX],RCX
JZ 0x001fb936
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x208],0x0
JZ 0x001fb91a
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RCX + 0x208]
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001fb92c
LAB_001fb91a:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x30],RAX
LAB_001fb92c:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001fb93e
LAB_001fb936:
XOR EAX,EAX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001fb93e
LAB_001fb93e:
MOV RAX,qword ptr [RBP + -0x38]
POP RBP
RET
|
long tree_search_edge(int8 *param_1,int8 *param_2,int8 *param_3,int param_4)
{
long local_40;
long local_38;
int1 *local_30;
int8 *local_18;
local_30 = (int1 *)*param_1;
*param_2 = null_element;
local_18 = param_2;
for (; local_30 != null_element; local_30 = *(int1 **)(local_30 + param_4)) {
local_18[1] = local_30;
local_18 = local_18 + 1;
}
*param_3 = local_18;
if (*(int1 **)*param_3 == null_element) {
local_40 = 0;
}
else {
if (*(int *)(param_1 + 0x41) == 0) {
local_38 = *(long *)(*(long *)*param_3 + 0x18);
}
else {
local_38 = *(long *)*param_3 + (ulong)*(uint *)(param_1 + 0x41);
}
local_40 = local_38;
}
return local_40;
}
|
|
61,071
|
my_strcasecmp_utf8mb4
|
eloqsql/strings/ctype-utf8.c
|
static int
my_strcasecmp_utf8mb4(CHARSET_INFO *cs, const char *s, const char *t)
{
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
while (s[0] && t[0])
{
my_wc_t s_wc,t_wc;
if ((uchar) s[0] < 128)
{
/*
s[0] is between 0 and 127.
It represents a single byte character.
Convert it into weight according to collation.
*/
s_wc= my_unicase_default_page00[(uchar) s[0]].tolower;
s++;
}
else
{
int res= my_mb_wc_utf8mb4_no_range(cs, &s_wc, (const uchar*) s);
/*
In the case of wrong multibyte sequence we will
call strcmp() for byte-to-byte comparison.
*/
if (res <= 0)
return strcmp(s, t);
s+= res;
my_tolower_utf8mb4(uni_plane, &s_wc);
}
/* Do the same for the second string */
if ((uchar) t[0] < 128)
{
/* Convert single byte character into weight */
t_wc= my_unicase_default_page00[(uchar) t[0]].tolower;
t++;
}
else
{
int res= my_mb_wc_utf8mb4_no_range(cs, &t_wc, (const uchar*) t);
if (res <= 0)
return strcmp(s, t);
t+= res;
my_tolower_utf8mb4(uni_plane, &t_wc);
}
/* Now we have two weights, let's compare them */
if ( s_wc != t_wc )
return ((int) s_wc) - ((int) t_wc);
}
return ((int) (uchar) s[0]) - ((int) (uchar) t[0]);
}
|
O3
|
c
|
my_strcasecmp_utf8mb4:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movb (%rsi), %al
testb %al, %al
je 0xd2535
movq %rsi, %r14
movq 0x78(%rdi), %r15
leaq 0x309450(%rip), %r12 # 0x3db8b0
cmpb $0x0, (%rbx)
je 0xd252f
testb %al, %al
js 0xd2482
movzbl %al, %eax
leaq (%rax,%rax,2), %rax
movl 0x4(%r12,%rax,4), %r13d
movq %r13, -0x30(%rbp)
incq %r14
jmp 0xd24c9
leaq -0x30(%rbp), %rdi
movq %r14, %rsi
callq 0xd1fef
testl %eax, %eax
je 0xd2555
movl %eax, %eax
addq %rax, %r14
movq -0x30(%rbp), %r13
cmpq (%r15), %r13
ja 0xd24c9
movq 0x8(%r15), %rax
movq %r13, %rcx
shrq $0x8, %rcx
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0xd24c9
movzbl %r13b, %ecx
leaq (%rcx,%rcx,2), %rcx
movl 0x4(%rax,%rcx,4), %r13d
movq %r13, -0x30(%rbp)
movsbq (%rbx), %rax
testq %rax, %rax
js 0xd24e0
leaq (%rax,%rax,2), %rax
movl 0x4(%r12,%rax,4), %eax
incq %rbx
jmp 0xd251d
leaq -0x38(%rbp), %rdi
movq %rbx, %rsi
callq 0xd1fef
testl %eax, %eax
je 0xd2555
movl %eax, %eax
addq %rax, %rbx
movq -0x38(%rbp), %rax
cmpq (%r15), %rax
ja 0xd251d
movq 0x8(%r15), %rcx
movq %rax, %rdx
shrq $0x8, %rdx
movq (%rcx,%rdx,8), %rcx
testq %rcx, %rcx
je 0xd251d
movzbl %al, %eax
leaq (%rax,%rax,2), %rax
movl 0x4(%rcx,%rax,4), %eax
cmpq %rax, %r13
jne 0xd2550
movb (%r14), %al
testb %al, %al
jne 0xd2460
xorl %eax, %eax
movzbl %al, %r13d
jmp 0xd2538
xorl %r13d, %r13d
movzbl (%rbx), %eax
subl %eax, %r13d
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
subl %eax, %r13d
jmp 0xd253e
movq %r14, %rdi
movq %rbx, %rsi
callq 0x29650
movl %eax, %r13d
jmp 0xd253e
|
my_strcasecmp_utf8mb4:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdx
mov al, [rsi]
test al, al
jz loc_D2535
mov r14, rsi
mov r15, [rdi+78h]
lea r12, my_unicase_default_page00
loc_D2460:
cmp byte ptr [rbx], 0
jz loc_D252F
test al, al
js short loc_D2482
movzx eax, al
lea rax, [rax+rax*2]
mov r13d, [r12+rax*4+4]
mov [rbp+var_30], r13
inc r14
jmp short loc_D24C9
loc_D2482:
lea rdi, [rbp+var_30]
mov rsi, r14
call my_mb_wc_utf8mb4_no_range
test eax, eax
jz loc_D2555
mov eax, eax
add r14, rax
mov r13, [rbp+var_30]
cmp r13, [r15]
ja short loc_D24C9
mov rax, [r15+8]
mov rcx, r13
shr rcx, 8
mov rax, [rax+rcx*8]
test rax, rax
jz short loc_D24C9
movzx ecx, r13b
lea rcx, [rcx+rcx*2]
mov r13d, [rax+rcx*4+4]
mov [rbp+var_30], r13
loc_D24C9:
movsx rax, byte ptr [rbx]
test rax, rax
js short loc_D24E0
lea rax, [rax+rax*2]
mov eax, [r12+rax*4+4]
inc rbx
jmp short loc_D251D
loc_D24E0:
lea rdi, [rbp+var_38]
mov rsi, rbx
call my_mb_wc_utf8mb4_no_range
test eax, eax
jz short loc_D2555
mov eax, eax
add rbx, rax
mov rax, [rbp+var_38]
cmp rax, [r15]
ja short loc_D251D
mov rcx, [r15+8]
mov rdx, rax
shr rdx, 8
mov rcx, [rcx+rdx*8]
test rcx, rcx
jz short loc_D251D
movzx eax, al
lea rax, [rax+rax*2]
mov eax, [rcx+rax*4+4]
loc_D251D:
cmp r13, rax
jnz short loc_D2550
mov al, [r14]
test al, al
jnz loc_D2460
xor eax, eax
loc_D252F:
movzx r13d, al
jmp short loc_D2538
loc_D2535:
xor r13d, r13d
loc_D2538:
movzx eax, byte ptr [rbx]
sub r13d, eax
loc_D253E:
mov eax, r13d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_D2550:
sub r13d, eax
jmp short loc_D253E
loc_D2555:
mov rdi, r14
mov rsi, rbx
call _strcmp
mov r13d, eax
jmp short loc_D253E
|
long long my_strcasecmp_utf8mb4(long long a1, unsigned __int8 *a2, unsigned __int8 *a3)
{
unsigned __int8 v4; // al
unsigned __int8 *v5; // r14
_QWORD *v6; // r15
unsigned long long v7; // r13
unsigned int v8; // eax
long long v9; // rax
long long v10; // rax
unsigned long long v11; // rax
unsigned int v12; // eax
long long v13; // rcx
int v14; // r13d
unsigned long long v17; // [rsp+8h] [rbp-38h] BYREF
unsigned long long v18[6]; // [rsp+10h] [rbp-30h] BYREF
v4 = *a2;
if ( *a2 )
{
v5 = a2;
v6 = *(_QWORD **)(a1 + 120);
while ( 1 )
{
if ( !*a3 )
goto LABEL_19;
if ( (v4 & 0x80u) != 0 )
{
v8 = my_mb_wc_utf8mb4_no_range(v18, v5);
if ( !v8 )
return (unsigned int)strcmp(v5, a3);
v5 += v8;
v7 = v18[0];
if ( v18[0] <= *v6 )
{
v9 = *(_QWORD *)(v6[1] + 8 * (v18[0] >> 8));
if ( v9 )
{
v7 = *(unsigned int *)(v9 + 12LL * LOBYTE(v18[0]) + 4);
v18[0] = v7;
}
}
}
else
{
v7 = (unsigned int)my_unicase_default_page00[3 * v4 + 1];
v18[0] = v7;
++v5;
}
v10 = (char)*a3;
if ( v10 < 0 )
{
v12 = my_mb_wc_utf8mb4_no_range(&v17, a3);
if ( !v12 )
return (unsigned int)strcmp(v5, a3);
a3 += v12;
v11 = v17;
if ( v17 <= *v6 )
{
v13 = *(_QWORD *)(v6[1] + 8 * (v17 >> 8));
if ( v13 )
v11 = *(unsigned int *)(v13 + 12LL * (unsigned __int8)v17 + 4);
}
}
else
{
v11 = (unsigned int)my_unicase_default_page00[3 * v10 + 1];
++a3;
}
if ( v7 != v11 )
return (unsigned int)(v7 - v11);
v4 = *v5;
if ( !*v5 )
{
v4 = 0;
LABEL_19:
v14 = v4;
return (unsigned int)(v14 - *a3);
}
}
}
v14 = 0;
return (unsigned int)(v14 - *a3);
}
|
my_strcasecmp_utf8mb4:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDX
MOV AL,byte ptr [RSI]
TEST AL,AL
JZ 0x001d2535
MOV R14,RSI
MOV R15,qword ptr [RDI + 0x78]
LEA R12,[0x4db8b0]
LAB_001d2460:
CMP byte ptr [RBX],0x0
JZ 0x001d252f
TEST AL,AL
JS 0x001d2482
MOVZX EAX,AL
LEA RAX,[RAX + RAX*0x2]
MOV R13D,dword ptr [R12 + RAX*0x4 + 0x4]
MOV qword ptr [RBP + -0x30],R13
INC R14
JMP 0x001d24c9
LAB_001d2482:
LEA RDI,[RBP + -0x30]
MOV RSI,R14
CALL 0x001d1fef
TEST EAX,EAX
JZ 0x001d2555
MOV EAX,EAX
ADD R14,RAX
MOV R13,qword ptr [RBP + -0x30]
CMP R13,qword ptr [R15]
JA 0x001d24c9
MOV RAX,qword ptr [R15 + 0x8]
MOV RCX,R13
SHR RCX,0x8
MOV RAX,qword ptr [RAX + RCX*0x8]
TEST RAX,RAX
JZ 0x001d24c9
MOVZX ECX,R13B
LEA RCX,[RCX + RCX*0x2]
MOV R13D,dword ptr [RAX + RCX*0x4 + 0x4]
MOV qword ptr [RBP + -0x30],R13
LAB_001d24c9:
MOVSX RAX,byte ptr [RBX]
TEST RAX,RAX
JS 0x001d24e0
LEA RAX,[RAX + RAX*0x2]
MOV EAX,dword ptr [R12 + RAX*0x4 + 0x4]
INC RBX
JMP 0x001d251d
LAB_001d24e0:
LEA RDI,[RBP + -0x38]
MOV RSI,RBX
CALL 0x001d1fef
TEST EAX,EAX
JZ 0x001d2555
MOV EAX,EAX
ADD RBX,RAX
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [R15]
JA 0x001d251d
MOV RCX,qword ptr [R15 + 0x8]
MOV RDX,RAX
SHR RDX,0x8
MOV RCX,qword ptr [RCX + RDX*0x8]
TEST RCX,RCX
JZ 0x001d251d
MOVZX EAX,AL
LEA RAX,[RAX + RAX*0x2]
MOV EAX,dword ptr [RCX + RAX*0x4 + 0x4]
LAB_001d251d:
CMP R13,RAX
JNZ 0x001d2550
MOV AL,byte ptr [R14]
TEST AL,AL
JNZ 0x001d2460
XOR EAX,EAX
LAB_001d252f:
MOVZX R13D,AL
JMP 0x001d2538
LAB_001d2535:
XOR R13D,R13D
LAB_001d2538:
MOVZX EAX,byte ptr [RBX]
SUB R13D,EAX
LAB_001d253e:
MOV EAX,R13D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001d2550:
SUB R13D,EAX
JMP 0x001d253e
LAB_001d2555:
MOV RDI,R14
MOV RSI,RBX
CALL 0x00129650
MOV R13D,EAX
JMP 0x001d253e
|
int my_strcasecmp_utf8mb4(long param_1,byte *param_2,byte *param_3)
{
ulong *puVar1;
long lVar2;
ulong uVar3;
byte bVar4;
uint uVar5;
int iVar6;
ulong uVar7;
ulong local_40;
ulong local_38;
bVar4 = *param_2;
if (bVar4 == 0) {
uVar5 = 0;
}
else {
puVar1 = *(ulong **)(param_1 + 0x78);
do {
if (*param_3 == 0) goto LAB_001d252f;
if ((char)bVar4 < '\0') {
uVar5 = my_mb_wc_utf8mb4_no_range(&local_38,param_2);
if (uVar5 == 0) goto LAB_001d2555;
param_2 = param_2 + uVar5;
if ((local_38 <= *puVar1) &&
(lVar2 = *(long *)(puVar1[1] + (local_38 >> 8) * 8), lVar2 != 0)) {
local_38 = (ulong)*(uint *)(lVar2 + 4 + (local_38 & 0xff) * 0xc);
}
}
else {
local_38 = (ulong)*(uint *)(my_unicase_default_page00 + (ulong)bVar4 * 0xc + 4);
param_2 = param_2 + 1;
}
uVar3 = local_38;
bVar4 = *param_3;
if ((long)(char)bVar4 < 0) {
uVar5 = my_mb_wc_utf8mb4_no_range(&local_40,param_3);
if (uVar5 == 0) {
LAB_001d2555:
iVar6 = strcmp((char *)param_2,(char *)param_3);
return iVar6;
}
param_3 = param_3 + uVar5;
uVar7 = local_40;
if ((local_40 <= *puVar1) &&
(lVar2 = *(long *)(puVar1[1] + (local_40 >> 8) * 8), lVar2 != 0)) {
uVar7 = (ulong)*(uint *)(lVar2 + 4 + (local_40 & 0xff) * 0xc);
}
}
else {
param_3 = param_3 + 1;
uVar7 = (ulong)*(uint *)(my_unicase_default_page00 + (long)(char)bVar4 * 0xc + 4);
}
if (uVar3 != uVar7) {
return (int)uVar3 - (int)uVar7;
}
bVar4 = *param_2;
} while (bVar4 != 0);
bVar4 = 0;
LAB_001d252f:
uVar5 = (uint)bVar4;
}
return uVar5 - *param_3;
}
|
|
61,072
|
my_thread_destory_thr_mutex
|
eloqsql/mysys/my_thr_init.c
|
static void my_thread_destory_thr_mutex(struct st_my_thread_var *var)
{
mysql_mutex_destroy(&var->mutex);
mysql_cond_destroy(&var->suspend);
}
|
O3
|
c
|
my_thread_destory_thr_mutex:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x40(%rdi), %r14
movq 0x80(%rdi), %rdi
testq %rdi, %rdi
je 0x556f3
leaq 0x2d8dbe(%rip), %rax # 0x32e4a0
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x80(%rbx)
movq %r14, %rdi
callq 0x350c0
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
jne 0x55714
addq $0x8, %rbx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x35280
leaq 0x2d8d85(%rip), %rax # 0x32e4a0
movq (%rax), %rax
callq *0x68(%rax)
movq $0x0, 0x38(%rbx)
jmp 0x55704
|
my_thread_destory_thr_mutex:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
lea r14, [rdi+40h]
mov rdi, [rdi+80h]
test rdi, rdi
jz short loc_556F3
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+80h], 0
loc_556F3:
mov rdi, r14
call _pthread_mutex_destroy
mov rdi, [rbx+38h]
test rdi, rdi
jnz short loc_55714
loc_55704:
add rbx, 8
mov rdi, rbx
pop rbx
pop r14
pop rbp
jmp _pthread_cond_destroy
loc_55714:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+68h]
mov qword ptr [rbx+38h], 0
jmp short loc_55704
|
long long my_thread_destory_thr_mutex(long long a1)
{
if ( *(_QWORD *)(a1 + 128) )
{
(*((void (**)(void))PSI_server[0] + 9))();
*(_QWORD *)(a1 + 128) = 0LL;
}
pthread_mutex_destroy(a1 + 64);
if ( *(_QWORD *)(a1 + 56) )
{
(*((void (**)(void))PSI_server[0] + 13))();
*(_QWORD *)(a1 + 56) = 0LL;
}
return pthread_cond_destroy(a1 + 8);
}
|
my_thread_destory_thr_mutex:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
LEA R14,[RDI + 0x40]
MOV RDI,qword ptr [RDI + 0x80]
TEST RDI,RDI
JZ 0x001556f3
LEA RAX,[0x42e4a0]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x80],0x0
LAB_001556f3:
MOV RDI,R14
CALL 0x001350c0
MOV RDI,qword ptr [RBX + 0x38]
TEST RDI,RDI
JNZ 0x00155714
LAB_00155704:
ADD RBX,0x8
MOV RDI,RBX
POP RBX
POP R14
POP RBP
JMP 0x00135280
LAB_00155714:
LEA RAX,[0x42e4a0]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x68]
MOV qword ptr [RBX + 0x38],0x0
JMP 0x00155704
|
void my_thread_destory_thr_mutex(long param_1)
{
if (*(long *)(param_1 + 0x80) != 0) {
(**(code **)(PSI_server + 0x48))();
*(int8 *)(param_1 + 0x80) = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)(param_1 + 0x40));
if (*(long *)(param_1 + 0x38) != 0) {
(**(code **)(PSI_server + 0x68))();
*(int8 *)(param_1 + 0x38) = 0;
}
pthread_cond_destroy((pthread_cond_t *)(param_1 + 8));
return;
}
|
|
61,073
|
trnman_get_min_safe_trid
|
eloqsql/storage/maria/trnman.c
|
TrID trnman_get_min_safe_trid()
{
TrID trid;
mysql_mutex_lock(&LOCK_trn_list);
trid= MY_MIN(active_list_min.next->min_read_from,
global_trid_generator);
mysql_mutex_unlock(&LOCK_trn_list);
return trid;
}
|
O3
|
c
|
trnman_get_min_safe_trid:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
cmpq $0x0, 0x3b7372(%rip) # 0x3ff810
jne 0x484e8
leaq 0x3b7329(%rip), %rdi # 0x3ff7d0
callq 0x29220
movq 0x3b6fdd(%rip), %rax # 0x3ff490
movq 0x80(%rax), %r14
movq 0x3b723f(%rip), %rbx # 0x3ff700
movq 0x3b7348(%rip), %rdi # 0x3ff810
testq %rdi, %rdi
jne 0x484ef
cmpq %rbx, %r14
cmovbq %r14, %rbx
leaq 0x3b72f5(%rip), %rdi # 0x3ff7d0
callq 0x291e0
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
callq 0x2a5b4
jmp 0x484ac
leaq 0x33fbca(%rip), %rax # 0x3880c0
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x484cd
|
trnman_get_min_safe_trid:
push rbp
mov rbp, rsp
push r14
push rbx
cmp cs:qword_3FF810, 0
jnz short loc_484E8
lea rdi, LOCK_trn_list
call _pthread_mutex_lock
loc_484AC:
mov rax, cs:qword_3FF490
mov r14, [rax+80h]
mov rbx, cs:global_trid_generator
mov rdi, cs:qword_3FF810
test rdi, rdi
jnz short loc_484EF
loc_484CD:
cmp r14, rbx
cmovb rbx, r14
lea rdi, LOCK_trn_list
call _pthread_mutex_unlock
mov rax, rbx
pop rbx
pop r14
pop rbp
retn
loc_484E8:
call trnman_get_min_safe_trid_cold_1
jmp short loc_484AC
loc_484EF:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_484CD
|
unsigned long long trnman_get_min_safe_trid()
{
unsigned long long v0; // r14
unsigned long long v1; // rbx
if ( qword_3FF810 )
trnman_get_min_safe_trid_cold_1();
else
pthread_mutex_lock(&LOCK_trn_list);
v0 = *(_QWORD *)(qword_3FF490 + 128);
v1 = global_trid_generator;
if ( qword_3FF810 )
PSI_server[44]();
if ( v0 < v1 )
v1 = v0;
pthread_mutex_unlock(&LOCK_trn_list);
return v1;
}
|
trnman_get_min_safe_trid:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
CMP qword ptr [0x004ff810],0x0
JNZ 0x001484e8
LEA RDI,[0x4ff7d0]
CALL 0x00129220
LAB_001484ac:
MOV RAX,qword ptr [0x004ff490]
MOV R14,qword ptr [RAX + 0x80]
MOV RBX,qword ptr [0x004ff700]
MOV RDI,qword ptr [0x004ff810]
TEST RDI,RDI
JNZ 0x001484ef
LAB_001484cd:
CMP R14,RBX
CMOVC RBX,R14
LEA RDI,[0x4ff7d0]
CALL 0x001291e0
MOV RAX,RBX
POP RBX
POP R14
POP RBP
RET
LAB_001484e8:
CALL 0x0012a5b4
JMP 0x001484ac
LAB_001484ef:
LEA RAX,[0x4880c0]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001484cd
|
ulong trnman_get_min_safe_trid(void)
{
ulong uVar1;
ulong uVar2;
if (LOCK_trn_list._64_8_ == 0) {
pthread_mutex_lock((pthread_mutex_t *)LOCK_trn_list);
}
else {
trnman_get_min_safe_trid_cold_1();
}
uVar2 = global_trid_generator;
uVar1 = *(ulong *)(active_list_min._104_8_ + 0x80);
if (LOCK_trn_list._64_8_ != 0) {
(**(code **)(PSI_server + 0x160))();
}
if (uVar1 < uVar2) {
uVar2 = uVar1;
}
pthread_mutex_unlock((pthread_mutex_t *)LOCK_trn_list);
return uVar2;
}
|
|
61,074
|
JS_FreeContext
|
bluesky950520[P]quickjs/quickjs.c
|
void JS_FreeContext(JSContext *ctx)
{
JSRuntime *rt = ctx->rt;
int i;
if (--ctx->header.ref_count > 0)
return;
assert(ctx->header.ref_count == 0);
#ifdef DUMP_ATOMS
if (check_dump_flag(rt, DUMP_ATOMS))
JS_DumpAtoms(ctx->rt);
#endif
#ifdef DUMP_SHAPES
if (check_dump_flag(rt, DUMP_SHAPES))
JS_DumpShapes(ctx->rt);
#endif
#ifdef DUMP_OBJECTS
if (check_dump_flag(rt, DUMP_OBJECTS)) {
struct list_head *el;
JSGCObjectHeader *p;
printf("JSObjects: {\n");
JS_DumpObjectHeader(ctx->rt);
list_for_each(el, &rt->gc_obj_list) {
p = list_entry(el, JSGCObjectHeader, link);
JS_DumpGCObject(rt, p);
}
printf("}\n");
}
#endif
#ifdef DUMP_MEM
if (check_dump_flag(rt, DUMP_MEM)) {
JSMemoryUsage stats;
JS_ComputeMemoryUsage(rt, &stats);
JS_DumpMemoryUsage(stdout, &stats, rt);
}
#endif
js_free_modules(ctx, JS_FREE_MODULE_ALL);
JS_FreeValue(ctx, ctx->global_obj);
JS_FreeValue(ctx, ctx->global_var_obj);
JS_FreeValue(ctx, ctx->throw_type_error);
JS_FreeValue(ctx, ctx->eval_obj);
JS_FreeValue(ctx, ctx->array_proto_values);
for(i = 0; i < JS_NATIVE_ERROR_COUNT; i++) {
JS_FreeValue(ctx, ctx->native_error_proto[i]);
}
JS_FreeValue(ctx, ctx->error_ctor);
JS_FreeValue(ctx, ctx->error_prepare_stack);
for(i = 0; i < rt->class_count; i++) {
JS_FreeValue(ctx, ctx->class_proto[i]);
}
js_free_rt(rt, ctx->class_proto);
JS_FreeValue(ctx, ctx->iterator_ctor);
JS_FreeValue(ctx, ctx->async_iterator_proto);
JS_FreeValue(ctx, ctx->promise_ctor);
JS_FreeValue(ctx, ctx->array_ctor);
JS_FreeValue(ctx, ctx->regexp_ctor);
JS_FreeValue(ctx, ctx->function_ctor);
JS_FreeValue(ctx, ctx->function_proto);
js_free_shape_null(ctx->rt, ctx->array_shape);
list_del(&ctx->link);
remove_gc_object(&ctx->header);
js_free_rt(ctx->rt, ctx);
}
|
O0
|
c
|
JS_FreeContext:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rcx
movl (%rcx), %eax
addl $-0x1, %eax
movl %eax, (%rcx)
cmpl $0x0, %eax
jle 0x27b7d
jmp 0x27dec
movq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x27e00
movq 0x10(%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x1a0(%rax), %rsi
movq 0x1a8(%rax), %rdx
callq 0x23c90
movq 0x10(%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x1b0(%rax), %rsi
movq 0x1b8(%rax), %rdx
callq 0x23c90
movq 0x10(%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x180(%rax), %rsi
movq 0x188(%rax), %rdx
callq 0x23c90
movq 0x10(%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x190(%rax), %rsi
movq 0x198(%rax), %rdx
callq 0x23c90
movq 0x10(%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x170(%rax), %rsi
movq 0x178(%rax), %rdx
callq 0x23c90
movl $0x0, 0x4(%rsp)
cmpl $0x8, 0x4(%rsp)
jge 0x27c5e
movq 0x10(%rsp), %rdi
movq 0x10(%rsp), %rax
addq $0x98, %rax
movslq 0x4(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x23c90
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x27c22
movq 0x10(%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x118(%rax), %rsi
movq 0x120(%rax), %rdx
callq 0x23c90
movq 0x10(%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x128(%rax), %rsi
movq 0x130(%rax), %rdx
callq 0x23c90
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
movq 0x8(%rsp), %rcx
cmpl 0x78(%rcx), %eax
jge 0x27ce1
movq 0x10(%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x40(%rax), %rax
movslq 0x4(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x23c90
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x27ca0
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x40(%rax), %rsi
callq 0x21960
movq 0x10(%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x140(%rax), %rsi
movq 0x148(%rax), %rdx
callq 0x23c90
movq 0x10(%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x160(%rax), %rsi
movq 0x168(%rax), %rdx
callq 0x23c90
movq 0x10(%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x88(%rax), %rsi
movq 0x90(%rax), %rdx
callq 0x23c90
movq 0x10(%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x68(%rax), %rsi
movq 0x70(%rax), %rdx
callq 0x23c90
movq 0x10(%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x78(%rax), %rsi
movq 0x80(%rax), %rdx
callq 0x23c90
movq 0x10(%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x58(%rax), %rsi
movq 0x60(%rax), %rdx
callq 0x23c90
movq 0x10(%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rsi
movq 0x50(%rax), %rdx
callq 0x23c90
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rsi
callq 0x27eb0
movq 0x10(%rsp), %rdi
addq $0x20, %rdi
callq 0x23c30
movq 0x10(%rsp), %rdi
callq 0x27ee0
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x10(%rsp), %rsi
callq 0x21960
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
|
JS_FreeContext:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov rax, [rsp+18h+var_8]
mov rax, [rax+18h]
mov [rsp+18h+var_10], rax
mov rcx, [rsp+18h+var_8]
mov eax, [rcx]
add eax, 0FFFFFFFFh
mov [rcx], eax
cmp eax, 0
jle short loc_27B7D
jmp loc_27DEC
loc_27B7D:
mov rdi, [rsp+18h+var_8]
xor esi, esi
call js_free_modules
mov rdi, [rsp+18h+var_8]
mov rax, [rsp+18h+var_8]
mov rsi, [rax+1A0h]
mov rdx, [rax+1A8h]
call JS_FreeValue
mov rdi, [rsp+18h+var_8]
mov rax, [rsp+18h+var_8]
mov rsi, [rax+1B0h]
mov rdx, [rax+1B8h]
call JS_FreeValue
mov rdi, [rsp+18h+var_8]
mov rax, [rsp+18h+var_8]
mov rsi, [rax+180h]
mov rdx, [rax+188h]
call JS_FreeValue
mov rdi, [rsp+18h+var_8]
mov rax, [rsp+18h+var_8]
mov rsi, [rax+190h]
mov rdx, [rax+198h]
call JS_FreeValue
mov rdi, [rsp+18h+var_8]
mov rax, [rsp+18h+var_8]
mov rsi, [rax+170h]
mov rdx, [rax+178h]
call JS_FreeValue
mov [rsp+18h+var_14], 0
loc_27C22:
cmp [rsp+18h+var_14], 8
jge short loc_27C5E
mov rdi, [rsp+18h+var_8]
mov rax, [rsp+18h+var_8]
add rax, 98h
movsxd rcx, [rsp+18h+var_14]
shl rcx, 4
add rax, rcx
mov rsi, [rax]
mov rdx, [rax+8]
call JS_FreeValue
mov eax, [rsp+18h+var_14]
add eax, 1
mov [rsp+18h+var_14], eax
jmp short loc_27C22
loc_27C5E:
mov rdi, [rsp+18h+var_8]
mov rax, [rsp+18h+var_8]
mov rsi, [rax+118h]
mov rdx, [rax+120h]
call JS_FreeValue
mov rdi, [rsp+18h+var_8]
mov rax, [rsp+18h+var_8]
mov rsi, [rax+128h]
mov rdx, [rax+130h]
call JS_FreeValue
mov [rsp+18h+var_14], 0
loc_27CA0:
mov eax, [rsp+18h+var_14]
mov rcx, [rsp+18h+var_10]
cmp eax, [rcx+78h]
jge short loc_27CE1
mov rdi, [rsp+18h+var_8]
mov rax, [rsp+18h+var_8]
mov rax, [rax+40h]
movsxd rcx, [rsp+18h+var_14]
shl rcx, 4
add rax, rcx
mov rsi, [rax]
mov rdx, [rax+8]
call JS_FreeValue
mov eax, [rsp+18h+var_14]
add eax, 1
mov [rsp+18h+var_14], eax
jmp short loc_27CA0
loc_27CE1:
mov rdi, [rsp+18h+var_10]
mov rax, [rsp+18h+var_8]
mov rsi, [rax+40h]
call js_free_rt
mov rdi, [rsp+18h+var_8]
mov rax, [rsp+18h+var_8]
mov rsi, [rax+140h]
mov rdx, [rax+148h]
call JS_FreeValue
mov rdi, [rsp+18h+var_8]
mov rax, [rsp+18h+var_8]
mov rsi, [rax+160h]
mov rdx, [rax+168h]
call JS_FreeValue
mov rdi, [rsp+18h+var_8]
mov rax, [rsp+18h+var_8]
mov rsi, [rax+88h]
mov rdx, [rax+90h]
call JS_FreeValue
mov rdi, [rsp+18h+var_8]
mov rax, [rsp+18h+var_8]
mov rsi, [rax+68h]
mov rdx, [rax+70h]
call JS_FreeValue
mov rdi, [rsp+18h+var_8]
mov rax, [rsp+18h+var_8]
mov rsi, [rax+78h]
mov rdx, [rax+80h]
call JS_FreeValue
mov rdi, [rsp+18h+var_8]
mov rax, [rsp+18h+var_8]
mov rsi, [rax+58h]
mov rdx, [rax+60h]
call JS_FreeValue
mov rdi, [rsp+18h+var_8]
mov rax, [rsp+18h+var_8]
mov rsi, [rax+48h]
mov rdx, [rax+50h]
call JS_FreeValue
mov rax, [rsp+18h+var_8]
mov rdi, [rax+18h]
mov rax, [rsp+18h+var_8]
mov rsi, [rax+38h]
call js_free_shape_null
mov rdi, [rsp+18h+var_8]
add rdi, 20h ; ' '
call list_del_0
mov rdi, [rsp+18h+var_8]
call remove_gc_object
mov rax, [rsp+18h+var_8]
mov rdi, [rax+18h]
mov rsi, [rsp+18h+var_8]
call js_free_rt
loc_27DEC:
add rsp, 18h
retn
|
void JS_FreeContext(long long a1)
{
int v1; // eax
long long *v2; // rax
int i; // [rsp+4h] [rbp-14h]
int j; // [rsp+4h] [rbp-14h]
long long v5; // [rsp+8h] [rbp-10h]
v5 = *(_QWORD *)(a1 + 24);
v1 = *(_DWORD *)a1 - 1;
*(_DWORD *)a1 = v1;
if ( v1 <= 0 )
{
js_free_modules(a1, 0LL);
JS_FreeValue(a1, *(_QWORD *)(a1 + 416), *(_QWORD *)(a1 + 424));
JS_FreeValue(a1, *(_QWORD *)(a1 + 432), *(_QWORD *)(a1 + 440));
JS_FreeValue(a1, *(_QWORD *)(a1 + 384), *(_QWORD *)(a1 + 392));
JS_FreeValue(a1, *(_QWORD *)(a1 + 400), *(_QWORD *)(a1 + 408));
JS_FreeValue(a1, *(_QWORD *)(a1 + 368), *(_QWORD *)(a1 + 376));
for ( i = 0; i < 8; ++i )
JS_FreeValue(a1, *(_QWORD *)(16LL * i + a1 + 152), *(_QWORD *)(16LL * i + a1 + 152 + 8));
JS_FreeValue(a1, *(_QWORD *)(a1 + 280), *(_QWORD *)(a1 + 288));
JS_FreeValue(a1, *(_QWORD *)(a1 + 296), *(_QWORD *)(a1 + 304));
for ( j = 0; j < *(_DWORD *)(v5 + 120); ++j )
{
v2 = (long long *)(16LL * j + *(_QWORD *)(a1 + 64));
JS_FreeValue(a1, *v2, v2[1]);
}
js_free_rt(v5, *(_QWORD *)(a1 + 64));
JS_FreeValue(a1, *(_QWORD *)(a1 + 320), *(_QWORD *)(a1 + 328));
JS_FreeValue(a1, *(_QWORD *)(a1 + 352), *(_QWORD *)(a1 + 360));
JS_FreeValue(a1, *(_QWORD *)(a1 + 136), *(_QWORD *)(a1 + 144));
JS_FreeValue(a1, *(_QWORD *)(a1 + 104), *(_QWORD *)(a1 + 112));
JS_FreeValue(a1, *(_QWORD *)(a1 + 120), *(_QWORD *)(a1 + 128));
JS_FreeValue(a1, *(_QWORD *)(a1 + 88), *(_QWORD *)(a1 + 96));
JS_FreeValue(a1, *(_QWORD *)(a1 + 72), *(_QWORD *)(a1 + 80));
js_free_shape_null(*(_QWORD *)(a1 + 24), *(_QWORD *)(a1 + 56));
list_del_0((_QWORD *)(a1 + 32));
remove_gc_object(a1);
js_free_rt(*(_QWORD *)(a1 + 24), a1);
}
}
|
JS_FreeContext:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x8],RAX
MOV RCX,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RCX]
ADD EAX,-0x1
MOV dword ptr [RCX],EAX
CMP EAX,0x0
JLE 0x00127b7d
JMP 0x00127dec
LAB_00127b7d:
MOV RDI,qword ptr [RSP + 0x10]
XOR ESI,ESI
CALL 0x00127e00
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX + 0x1a0]
MOV RDX,qword ptr [RAX + 0x1a8]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX + 0x1b0]
MOV RDX,qword ptr [RAX + 0x1b8]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX + 0x180]
MOV RDX,qword ptr [RAX + 0x188]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX + 0x190]
MOV RDX,qword ptr [RAX + 0x198]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX + 0x170]
MOV RDX,qword ptr [RAX + 0x178]
CALL 0x00123c90
MOV dword ptr [RSP + 0x4],0x0
LAB_00127c22:
CMP dword ptr [RSP + 0x4],0x8
JGE 0x00127c5e
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,0x98
MOVSXD RCX,dword ptr [RSP + 0x4]
SHL RCX,0x4
ADD RAX,RCX
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x00123c90
MOV EAX,dword ptr [RSP + 0x4]
ADD EAX,0x1
MOV dword ptr [RSP + 0x4],EAX
JMP 0x00127c22
LAB_00127c5e:
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX + 0x118]
MOV RDX,qword ptr [RAX + 0x120]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX + 0x128]
MOV RDX,qword ptr [RAX + 0x130]
CALL 0x00123c90
MOV dword ptr [RSP + 0x4],0x0
LAB_00127ca0:
MOV EAX,dword ptr [RSP + 0x4]
MOV RCX,qword ptr [RSP + 0x8]
CMP EAX,dword ptr [RCX + 0x78]
JGE 0x00127ce1
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOVSXD RCX,dword ptr [RSP + 0x4]
SHL RCX,0x4
ADD RAX,RCX
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x00123c90
MOV EAX,dword ptr [RSP + 0x4]
ADD EAX,0x1
MOV dword ptr [RSP + 0x4],EAX
JMP 0x00127ca0
LAB_00127ce1:
MOV RDI,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX + 0x40]
CALL 0x00121960
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX + 0x140]
MOV RDX,qword ptr [RAX + 0x148]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX + 0x160]
MOV RDX,qword ptr [RAX + 0x168]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX + 0x88]
MOV RDX,qword ptr [RAX + 0x90]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX + 0x68]
MOV RDX,qword ptr [RAX + 0x70]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX + 0x78]
MOV RDX,qword ptr [RAX + 0x80]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX + 0x58]
MOV RDX,qword ptr [RAX + 0x60]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX + 0x48]
MOV RDX,qword ptr [RAX + 0x50]
CALL 0x00123c90
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX + 0x38]
CALL 0x00127eb0
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x20
CALL 0x00123c30
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x00127ee0
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x00121960
LAB_00127dec:
ADD RSP,0x18
RET
|
void JS_FreeContext(int *param_1)
{
int iVar1;
long lVar2;
int8 *puVar3;
int local_14;
lVar2 = *(long *)(param_1 + 6);
iVar1 = *param_1;
*param_1 = iVar1 + -1;
if (iVar1 + -1 < 1) {
js_free_modules(param_1,0);
JS_FreeValue(param_1,*(int8 *)(param_1 + 0x68),*(int8 *)(param_1 + 0x6a));
JS_FreeValue(param_1,*(int8 *)(param_1 + 0x6c),*(int8 *)(param_1 + 0x6e));
JS_FreeValue(param_1,*(int8 *)(param_1 + 0x60),*(int8 *)(param_1 + 0x62));
JS_FreeValue(param_1,*(int8 *)(param_1 + 100),*(int8 *)(param_1 + 0x66));
JS_FreeValue(param_1,*(int8 *)(param_1 + 0x5c),*(int8 *)(param_1 + 0x5e));
for (local_14 = 0; local_14 < 8; local_14 = local_14 + 1) {
JS_FreeValue(param_1,*(int8 *)(param_1 + (long)local_14 * 4 + 0x26),
*(int8 *)(param_1 + (long)local_14 * 4 + 0x26 + 2));
}
JS_FreeValue(param_1,*(int8 *)(param_1 + 0x46),*(int8 *)(param_1 + 0x48));
JS_FreeValue(param_1,*(int8 *)(param_1 + 0x4a),*(int8 *)(param_1 + 0x4c));
for (local_14 = 0; local_14 < *(int *)(lVar2 + 0x78); local_14 = local_14 + 1) {
puVar3 = (int8 *)(*(long *)(param_1 + 0x10) + (long)local_14 * 0x10);
JS_FreeValue(param_1,*puVar3,puVar3[1]);
}
js_free_rt(lVar2,*(int8 *)(param_1 + 0x10));
JS_FreeValue(param_1,*(int8 *)(param_1 + 0x50),*(int8 *)(param_1 + 0x52));
JS_FreeValue(param_1,*(int8 *)(param_1 + 0x58),*(int8 *)(param_1 + 0x5a));
JS_FreeValue(param_1,*(int8 *)(param_1 + 0x22),*(int8 *)(param_1 + 0x24));
JS_FreeValue(param_1,*(int8 *)(param_1 + 0x1a),*(int8 *)(param_1 + 0x1c));
JS_FreeValue(param_1,*(int8 *)(param_1 + 0x1e),*(int8 *)(param_1 + 0x20));
JS_FreeValue(param_1,*(int8 *)(param_1 + 0x16),*(int8 *)(param_1 + 0x18));
JS_FreeValue(param_1,*(int8 *)(param_1 + 0x12),*(int8 *)(param_1 + 0x14));
js_free_shape_null(*(int8 *)(param_1 + 6),*(int8 *)(param_1 + 0xe));
list_del(param_1 + 8);
remove_gc_object(param_1);
js_free_rt(*(int8 *)(param_1 + 6),param_1);
}
return;
}
|
|
61,075
|
JS_FreeContext
|
bluesky950520[P]quickjs/quickjs.c
|
void JS_FreeContext(JSContext *ctx)
{
JSRuntime *rt = ctx->rt;
int i;
if (--ctx->header.ref_count > 0)
return;
assert(ctx->header.ref_count == 0);
#ifdef DUMP_ATOMS
if (check_dump_flag(rt, DUMP_ATOMS))
JS_DumpAtoms(ctx->rt);
#endif
#ifdef DUMP_SHAPES
if (check_dump_flag(rt, DUMP_SHAPES))
JS_DumpShapes(ctx->rt);
#endif
#ifdef DUMP_OBJECTS
if (check_dump_flag(rt, DUMP_OBJECTS)) {
struct list_head *el;
JSGCObjectHeader *p;
printf("JSObjects: {\n");
JS_DumpObjectHeader(ctx->rt);
list_for_each(el, &rt->gc_obj_list) {
p = list_entry(el, JSGCObjectHeader, link);
JS_DumpGCObject(rt, p);
}
printf("}\n");
}
#endif
#ifdef DUMP_MEM
if (check_dump_flag(rt, DUMP_MEM)) {
JSMemoryUsage stats;
JS_ComputeMemoryUsage(rt, &stats);
JS_DumpMemoryUsage(stdout, &stats, rt);
}
#endif
js_free_modules(ctx, JS_FREE_MODULE_ALL);
JS_FreeValue(ctx, ctx->global_obj);
JS_FreeValue(ctx, ctx->global_var_obj);
JS_FreeValue(ctx, ctx->throw_type_error);
JS_FreeValue(ctx, ctx->eval_obj);
JS_FreeValue(ctx, ctx->array_proto_values);
for(i = 0; i < JS_NATIVE_ERROR_COUNT; i++) {
JS_FreeValue(ctx, ctx->native_error_proto[i]);
}
JS_FreeValue(ctx, ctx->error_ctor);
JS_FreeValue(ctx, ctx->error_prepare_stack);
for(i = 0; i < rt->class_count; i++) {
JS_FreeValue(ctx, ctx->class_proto[i]);
}
js_free_rt(rt, ctx->class_proto);
JS_FreeValue(ctx, ctx->iterator_ctor);
JS_FreeValue(ctx, ctx->async_iterator_proto);
JS_FreeValue(ctx, ctx->promise_ctor);
JS_FreeValue(ctx, ctx->array_ctor);
JS_FreeValue(ctx, ctx->regexp_ctor);
JS_FreeValue(ctx, ctx->function_ctor);
JS_FreeValue(ctx, ctx->function_proto);
js_free_shape_null(ctx->rt, ctx->array_shape);
list_del(&ctx->link);
remove_gc_object(&ctx->header);
js_free_rt(ctx->rt, ctx);
}
|
O1
|
c
|
JS_FreeContext:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x18(%rdi), %r15
movl (%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rdi)
cmpl $0x1, %eax
jg 0x1fd1d
movq %rdi, %rbx
leaq 0x1e0(%rdi), %r14
movq 0x1e8(%rdi), %rsi
cmpq %r14, %rsi
je 0x1faea
movq 0x8(%rsi), %r12
addq $-0x8, %rsi
movq %rbx, %rdi
callq 0x3b6a0
movq %r12, %rsi
cmpq %r14, %r12
jne 0x1fad2
movq 0x18(%rbx), %rdi
movq 0x1a0(%rbx), %rsi
movq 0x1a8(%rbx), %rdx
callq 0x1d8c6
movq 0x18(%rbx), %rdi
movq 0x1b0(%rbx), %rsi
movq 0x1b8(%rbx), %rdx
callq 0x1d8c6
movq 0x18(%rbx), %rdi
movq 0x180(%rbx), %rsi
movq 0x188(%rbx), %rdx
callq 0x1d8c6
movq 0x18(%rbx), %rdi
movq 0x190(%rbx), %rsi
movq 0x198(%rbx), %rdx
callq 0x1d8c6
movq 0x18(%rbx), %rdi
movq 0x170(%rbx), %rsi
movq 0x178(%rbx), %rdx
callq 0x1d8c6
movl $0xa0, %r14d
movq -0x8(%rbx,%r14), %rsi
movq (%rbx,%r14), %rdx
movq 0x18(%rbx), %rdi
callq 0x1d8c6
addq $0x10, %r14
cmpq $0x120, %r14 # imm = 0x120
jne 0x1fb63
movq 0x18(%rbx), %rdi
movq 0x118(%rbx), %rsi
movq 0x120(%rbx), %rdx
callq 0x1d8c6
movq 0x18(%rbx), %rdi
movq 0x128(%rbx), %rsi
movq 0x130(%rbx), %rdx
callq 0x1d8c6
cmpl $0x0, 0x78(%r15)
jle 0x1fbe6
movl $0x8, %r14d
xorl %r12d, %r12d
movq 0x18(%rbx), %rdi
movq 0x40(%rbx), %rax
movq -0x8(%rax,%r14), %rsi
movq (%rax,%r14), %rdx
callq 0x1d8c6
incq %r12
movslq 0x78(%r15), %rax
addq $0x10, %r14
cmpq %rax, %r12
jl 0x1fbc0
movq 0x40(%rbx), %r14
testq %r14, %r14
je 0x1fc14
decq 0x28(%r15)
movq %r14, %rdi
callq *0x20(%r15)
movq 0x30(%r15), %rcx
movq 0x40(%r15), %rdi
subq %rax, %rcx
addq $-0x8, %rcx
movq %rcx, 0x30(%r15)
movq %r14, %rsi
callq *0x10(%r15)
movq 0x18(%rbx), %rdi
movq 0x140(%rbx), %rsi
movq 0x148(%rbx), %rdx
callq 0x1d8c6
movq 0x18(%rbx), %rdi
movq 0x160(%rbx), %rsi
movq 0x168(%rbx), %rdx
callq 0x1d8c6
movq 0x18(%rbx), %rdi
movq 0x88(%rbx), %rsi
movq 0x90(%rbx), %rdx
callq 0x1d8c6
movq 0x18(%rbx), %rdi
movq 0x68(%rbx), %rsi
movq 0x70(%rbx), %rdx
callq 0x1d8c6
movq 0x18(%rbx), %rdi
movq 0x78(%rbx), %rsi
movq 0x80(%rbx), %rdx
callq 0x1d8c6
movq 0x18(%rbx), %rdi
movq 0x58(%rbx), %rsi
movq 0x60(%rbx), %rdx
callq 0x1d8c6
movq 0x18(%rbx), %rdi
movq 0x48(%rbx), %rsi
movq 0x50(%rbx), %rdx
callq 0x1d8c6
movq 0x38(%rbx), %rsi
testq %rsi, %rsi
je 0x1fcb9
movq 0x18(%rbx), %rdi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jle 0x1fd29
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rcx)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rcx)
movups %xmm0, 0x8(%rbx)
testq %rbx, %rbx
je 0x1fd1d
movq 0x18(%rbx), %r14
decq 0x28(%r14)
movq %rbx, %rdi
callq *0x20(%r14)
movq 0x10(%r14), %rcx
movq 0x30(%r14), %rdx
subq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x30(%r14)
movq 0x40(%r14), %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmpq *%rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x3bc6e
jmp 0x1fcb9
|
JS_FreeContext:
push r15
push r14
push r12
push rbx
push rax
mov r15, [rdi+18h]
mov eax, [rdi]
lea ecx, [rax-1]
mov [rdi], ecx
cmp eax, 1
jg loc_1FD1D
mov rbx, rdi
lea r14, [rdi+1E0h]
mov rsi, [rdi+1E8h]
cmp rsi, r14
jz short loc_1FAEA
loc_1FAD2:
mov r12, [rsi+8]
add rsi, 0FFFFFFFFFFFFFFF8h
mov rdi, rbx
call js_free_module_def
mov rsi, r12
cmp r12, r14
jnz short loc_1FAD2
loc_1FAEA:
mov rdi, [rbx+18h]
mov rsi, [rbx+1A0h]
mov rdx, [rbx+1A8h]
call JS_FreeValueRT
mov rdi, [rbx+18h]
mov rsi, [rbx+1B0h]
mov rdx, [rbx+1B8h]
call JS_FreeValueRT
mov rdi, [rbx+18h]
mov rsi, [rbx+180h]
mov rdx, [rbx+188h]
call JS_FreeValueRT
mov rdi, [rbx+18h]
mov rsi, [rbx+190h]
mov rdx, [rbx+198h]
call JS_FreeValueRT
mov rdi, [rbx+18h]
mov rsi, [rbx+170h]
mov rdx, [rbx+178h]
call JS_FreeValueRT
mov r14d, 0A0h
loc_1FB63:
mov rsi, [rbx+r14-8]
mov rdx, [rbx+r14]
mov rdi, [rbx+18h]
call JS_FreeValueRT
add r14, 10h
cmp r14, 120h
jnz short loc_1FB63
mov rdi, [rbx+18h]
mov rsi, [rbx+118h]
mov rdx, [rbx+120h]
call JS_FreeValueRT
mov rdi, [rbx+18h]
mov rsi, [rbx+128h]
mov rdx, [rbx+130h]
call JS_FreeValueRT
cmp dword ptr [r15+78h], 0
jle short loc_1FBE6
mov r14d, 8
xor r12d, r12d
loc_1FBC0:
mov rdi, [rbx+18h]
mov rax, [rbx+40h]
mov rsi, [rax+r14-8]
mov rdx, [rax+r14]
call JS_FreeValueRT
inc r12
movsxd rax, dword ptr [r15+78h]
add r14, 10h
cmp r12, rax
jl short loc_1FBC0
loc_1FBE6:
mov r14, [rbx+40h]
test r14, r14
jz short loc_1FC14
dec qword ptr [r15+28h]
mov rdi, r14
call qword ptr [r15+20h]
mov rcx, [r15+30h]
mov rdi, [r15+40h]
sub rcx, rax
add rcx, 0FFFFFFFFFFFFFFF8h
mov [r15+30h], rcx
mov rsi, r14
call qword ptr [r15+10h]
loc_1FC14:
mov rdi, [rbx+18h]
mov rsi, [rbx+140h]
mov rdx, [rbx+148h]
call JS_FreeValueRT
mov rdi, [rbx+18h]
mov rsi, [rbx+160h]
mov rdx, [rbx+168h]
call JS_FreeValueRT
mov rdi, [rbx+18h]
mov rsi, [rbx+88h]
mov rdx, [rbx+90h]
call JS_FreeValueRT
mov rdi, [rbx+18h]
mov rsi, [rbx+68h]
mov rdx, [rbx+70h]
call JS_FreeValueRT
mov rdi, [rbx+18h]
mov rsi, [rbx+78h]
mov rdx, [rbx+80h]
call JS_FreeValueRT
mov rdi, [rbx+18h]
mov rsi, [rbx+58h]
mov rdx, [rbx+60h]
call JS_FreeValueRT
mov rdi, [rbx+18h]
mov rsi, [rbx+48h]
mov rdx, [rbx+50h]
call JS_FreeValueRT
mov rsi, [rbx+38h]
test rsi, rsi
jz short loc_1FCB9
mov rdi, [rbx+18h]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jle short loc_1FD29
loc_1FCB9:
mov rax, [rbx+20h]
mov rcx, [rbx+28h]
mov [rax+8], rcx
mov [rcx], rax
xorps xmm0, xmm0
movups xmmword ptr [rbx+20h], xmm0
mov rax, [rbx+8]
mov rcx, [rbx+10h]
mov [rax+8], rcx
mov [rcx], rax
movups xmmword ptr [rbx+8], xmm0
test rbx, rbx
jz short loc_1FD1D
mov r14, [rbx+18h]
dec qword ptr [r14+28h]
mov rdi, rbx
call qword ptr [r14+20h]
mov rcx, [r14+10h]
mov rdx, [r14+30h]
sub rdx, rax
add rdx, 0FFFFFFFFFFFFFFF8h
mov [r14+30h], rdx
mov rdi, [r14+40h]
mov rsi, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp rcx
loc_1FD1D:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_1FD29:
call js_free_shape0
jmp short loc_1FCB9
|
long long JS_FreeContext(unsigned int *a1)
{
long long v1; // r15
long long result; // rax
unsigned int *v4; // rsi
unsigned int *v5; // r12
long long i; // r14
long long v7; // r14
long long v8; // r12
long long v9; // r14
long long v10; // rax
long long v11; // rdi
_DWORD *v12; // rsi
long long v13; // rdi
int v14; // eax
long long v15; // rax
_QWORD *v16; // rcx
long long *v17; // rcx
long long v18; // r14
long long v19; // rax
long long ( *v20)(_QWORD, unsigned int *); // rcx
v1 = *((_QWORD *)a1 + 3);
result = *a1;
*a1 = result - 1;
if ( (int)result <= 1 )
{
v4 = (unsigned int *)*((_QWORD *)a1 + 61);
if ( v4 != a1 + 120 )
{
do
{
v5 = (unsigned int *)*((_QWORD *)v4 + 1);
js_free_module_def(a1, v4 - 2);
v4 = v5;
}
while ( v5 != a1 + 120 );
}
JS_FreeValueRT(*((_QWORD *)a1 + 3), *((_DWORD **)a1 + 52), *((_QWORD *)a1 + 53));
JS_FreeValueRT(*((_QWORD *)a1 + 3), *((_DWORD **)a1 + 54), *((_QWORD *)a1 + 55));
JS_FreeValueRT(*((_QWORD *)a1 + 3), *((_DWORD **)a1 + 48), *((_QWORD *)a1 + 49));
JS_FreeValueRT(*((_QWORD *)a1 + 3), *((_DWORD **)a1 + 50), *((_QWORD *)a1 + 51));
JS_FreeValueRT(*((_QWORD *)a1 + 3), *((_DWORD **)a1 + 46), *((_QWORD *)a1 + 47));
for ( i = 40LL; i != 72; i += 4LL )
JS_FreeValueRT(*((_QWORD *)a1 + 3), *(_DWORD **)&a1[i - 2], *(_QWORD *)&a1[i]);
JS_FreeValueRT(*((_QWORD *)a1 + 3), *((_DWORD **)a1 + 35), *((_QWORD *)a1 + 36));
JS_FreeValueRT(*((_QWORD *)a1 + 3), *((_DWORD **)a1 + 37), *((_QWORD *)a1 + 38));
if ( *(int *)(v1 + 120) > 0 )
{
v7 = 8LL;
v8 = 0LL;
do
{
JS_FreeValueRT(
*((_QWORD *)a1 + 3),
*(_DWORD **)(*((_QWORD *)a1 + 8) + v7 - 8),
*(_QWORD *)(*((_QWORD *)a1 + 8) + v7));
++v8;
v7 += 16LL;
}
while ( v8 < *(int *)(v1 + 120) );
}
v9 = *((_QWORD *)a1 + 8);
if ( v9 )
{
--*(_QWORD *)(v1 + 40);
v10 = (*(long long ( **)(long long))(v1 + 32))(v9);
v11 = *(_QWORD *)(v1 + 64);
*(_QWORD *)(v1 + 48) = *(_QWORD *)(v1 + 48) - v10 - 8;
(*(void ( **)(long long, long long))(v1 + 16))(v11, v9);
}
JS_FreeValueRT(*((_QWORD *)a1 + 3), *((_DWORD **)a1 + 40), *((_QWORD *)a1 + 41));
JS_FreeValueRT(*((_QWORD *)a1 + 3), *((_DWORD **)a1 + 44), *((_QWORD *)a1 + 45));
JS_FreeValueRT(*((_QWORD *)a1 + 3), *((_DWORD **)a1 + 17), *((_QWORD *)a1 + 18));
JS_FreeValueRT(*((_QWORD *)a1 + 3), *((_DWORD **)a1 + 13), *((_QWORD *)a1 + 14));
JS_FreeValueRT(*((_QWORD *)a1 + 3), *((_DWORD **)a1 + 15), *((_QWORD *)a1 + 16));
JS_FreeValueRT(*((_QWORD *)a1 + 3), *((_DWORD **)a1 + 11), *((_QWORD *)a1 + 12));
JS_FreeValueRT(*((_QWORD *)a1 + 3), *((_DWORD **)a1 + 9), *((_QWORD *)a1 + 10));
v12 = (_DWORD *)*((_QWORD *)a1 + 7);
if ( v12 )
{
v13 = *((_QWORD *)a1 + 3);
v14 = (*v12)--;
if ( v14 <= 1 )
js_free_shape0(v13, v12);
}
v15 = *((_QWORD *)a1 + 4);
v16 = (_QWORD *)*((_QWORD *)a1 + 5);
*(_QWORD *)(v15 + 8) = v16;
*v16 = v15;
*((_OWORD *)a1 + 2) = 0LL;
result = *((_QWORD *)a1 + 1);
v17 = (long long *)*((_QWORD *)a1 + 2);
*(_QWORD *)(result + 8) = v17;
*v17 = result;
*(_OWORD *)(a1 + 2) = 0LL;
if ( a1 )
{
v18 = *((_QWORD *)a1 + 3);
--*(_QWORD *)(v18 + 40);
v19 = (*(long long ( **)(unsigned int *))(v18 + 32))(a1);
v20 = *(long long ( **)(_QWORD, unsigned int *))(v18 + 16);
*(_QWORD *)(v18 + 48) = *(_QWORD *)(v18 + 48) - v19 - 8;
return v20(*(_QWORD *)(v18 + 64), a1);
}
}
return result;
}
| |||
61,076
|
ma_close
|
eloqsql/libmariadb/libmariadb/ma_io.c
|
int ma_close(MA_FILE *file)
{
int rc;
if (!file)
return -1;
switch (file->type) {
case MA_FILE_LOCAL:
rc= fclose((FILE *)file->ptr);
free(file);
break;
#ifdef HAVE_REMOTEIO
case MA_FILE_REMOTE:
rc= rio_plugin->methods->mclose(file);
break;
#endif
default:
return -1;
}
return rc;
}
|
O0
|
c
|
ma_close:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x5d4bc
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5d51d
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x18(%rbp)
subl $0x1, %eax
je 0x5d4d6
jmp 0x5d4cc
movl -0x18(%rbp), %eax
subl $0x2, %eax
je 0x5d4f1
jmp 0x5d50e
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x37430
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
callq 0x371c0
jmp 0x5d517
leaq 0x393ad8(%rip), %rax # 0x3f0fd0
movq (%rax), %rax
movq 0x58(%rax), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
movl %eax, -0x14(%rbp)
jmp 0x5d517
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5d51d
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
ma_close:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
cmp [rbp+var_10], 0
jnz short loc_5D4BC
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_5D51D
loc_5D4BC:
mov rax, [rbp+var_10]
mov eax, [rax]
mov [rbp+var_18], eax
sub eax, 1
jz short loc_5D4D6
jmp short $+2
loc_5D4CC:
mov eax, [rbp+var_18]
sub eax, 2
jz short loc_5D4F1
jmp short loc_5D50E
loc_5D4D6:
mov rax, [rbp+var_10]
mov rdi, [rax+8]
call _fclose
mov [rbp+var_14], eax
mov rdi, [rbp+var_10]
call _free
jmp short loc_5D517
loc_5D4F1:
lea rax, rio_plugin
mov rax, [rax]
mov rax, [rax+58h]
mov rax, [rax+8]
mov rdi, [rbp+var_10]
call rax
mov [rbp+var_14], eax
jmp short loc_5D517
loc_5D50E:
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_5D51D
loc_5D517:
mov eax, [rbp+var_14]
mov [rbp+var_4], eax
loc_5D51D:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
|
long long ma_close(long long a1)
{
unsigned int v2; // [rsp+Ch] [rbp-14h]
if ( a1 )
{
if ( *(_DWORD *)a1 == 1 )
{
v2 = fclose(*(_QWORD *)(a1 + 8));
free(a1);
}
else
{
if ( *(_DWORD *)a1 != 2 )
return (unsigned int)-1;
return (unsigned int)(*(long long ( **)(long long))(*(_QWORD *)(rio_plugin + 88LL) + 8LL))(a1);
}
return v2;
}
return (unsigned int)-1;
}
|
ma_close:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x0015d4bc
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0015d51d
LAB_0015d4bc:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x18],EAX
SUB EAX,0x1
JZ 0x0015d4d6
JMP 0x0015d4cc
LAB_0015d4cc:
MOV EAX,dword ptr [RBP + -0x18]
SUB EAX,0x2
JZ 0x0015d4f1
JMP 0x0015d50e
LAB_0015d4d6:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x00137430
MOV dword ptr [RBP + -0x14],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001371c0
JMP 0x0015d517
LAB_0015d4f1:
LEA RAX,[0x4f0fd0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x58]
MOV RAX,qword ptr [RAX + 0x8]
MOV RDI,qword ptr [RBP + -0x10]
CALL RAX
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0015d517
LAB_0015d50e:
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0015d51d
LAB_0015d517:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x4],EAX
LAB_0015d51d:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int ma_close(int *param_1)
{
int local_1c;
int local_c;
if (param_1 == (int *)0x0) {
local_c = -1;
}
else {
if (*param_1 == 1) {
local_1c = fclose(*(FILE **)(param_1 + 2));
free(param_1);
}
else {
if (*param_1 != 2) {
return -1;
}
local_1c = (**(code **)(*(long *)(rio_plugin + 0x58) + 8))(param_1);
}
local_c = local_1c;
}
return local_c;
}
|
|
61,077
|
ggml_vec_dot_q5_1_q8_1
|
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu-quants.c
|
void ggml_vec_dot_q5_1_q8_1(int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc) {
const int qk = QK8_1;
const int nb = n / qk;
int ib = 0;
float sumf = 0;
assert(n % qk == 0);
assert(qk == QK5_1);
assert(nrc == 1);
UNUSED(nrc);
UNUSED(bx);
UNUSED(by);
UNUSED(bs);
const block_q5_1 * GGML_RESTRICT x = vx;
const block_q8_1 * GGML_RESTRICT y = vy;
#if defined(__ARM_NEON)
float32x4_t sumv0 = vdupq_n_f32(0.0f);
float32x4_t sumv1 = vdupq_n_f32(0.0f);
float summs0 = 0.0f;
float summs1 = 0.0f;
uint32_t qh0;
uint32_t qh1;
uint64_t tmp0[4];
uint64_t tmp1[4];
for (; ib + 1 < nb; ib += 2) {
const block_q5_1 * GGML_RESTRICT x0 = &x[ib];
const block_q5_1 * GGML_RESTRICT x1 = &x[ib + 1];
const block_q8_1 * GGML_RESTRICT y0 = &y[ib];
const block_q8_1 * GGML_RESTRICT y1 = &y[ib + 1];
const uint8x16_t m4b = vdupq_n_u8(0x0F);
summs0 += GGML_FP16_TO_FP32(x0->m) * GGML_FP16_TO_FP32(y0->s);
summs1 += GGML_FP16_TO_FP32(x1->m) * GGML_FP16_TO_FP32(y1->s);
// extract the 5th bit via lookup table ((b) << 4)
memcpy(&qh0, x0->qh, sizeof(qh0));
memcpy(&qh1, x1->qh, sizeof(qh1));
tmp0[0] = table_b2b_0[(qh0 >> 0) & 0xFF];
tmp0[1] = table_b2b_0[(qh0 >> 8) & 0xFF];
tmp0[2] = table_b2b_0[(qh0 >> 16) & 0xFF];
tmp0[3] = table_b2b_0[(qh0 >> 24) ];
tmp1[0] = table_b2b_0[(qh1 >> 0) & 0xFF];
tmp1[1] = table_b2b_0[(qh1 >> 8) & 0xFF];
tmp1[2] = table_b2b_0[(qh1 >> 16) & 0xFF];
tmp1[3] = table_b2b_0[(qh1 >> 24) ];
const int8x16_t qhl0 = vld1q_s8((const int8_t *)(tmp0 + 0));
const int8x16_t qhh0 = vld1q_s8((const int8_t *)(tmp0 + 2));
const int8x16_t qhl1 = vld1q_s8((const int8_t *)(tmp1 + 0));
const int8x16_t qhh1 = vld1q_s8((const int8_t *)(tmp1 + 2));
const uint8x16_t v0_0 = vld1q_u8(x0->qs);
const uint8x16_t v0_1 = vld1q_u8(x1->qs);
// 4-bit -> 8-bit
const int8x16_t v0_0l = vreinterpretq_s8_u8(vandq_u8 (v0_0, m4b));
const int8x16_t v0_0h = vreinterpretq_s8_u8(vshrq_n_u8(v0_0, 4));
const int8x16_t v0_1l = vreinterpretq_s8_u8(vandq_u8 (v0_1, m4b));
const int8x16_t v0_1h = vreinterpretq_s8_u8(vshrq_n_u8(v0_1, 4));
// add high bit
const int8x16_t v0_0lf = vorrq_s8(v0_0l, qhl0);
const int8x16_t v0_0hf = vorrq_s8(v0_0h, qhh0);
const int8x16_t v0_1lf = vorrq_s8(v0_1l, qhl1);
const int8x16_t v0_1hf = vorrq_s8(v0_1h, qhh1);
// load y
const int8x16_t v1_0l = vld1q_s8(y0->qs);
const int8x16_t v1_0h = vld1q_s8(y0->qs + 16);
const int8x16_t v1_1l = vld1q_s8(y1->qs);
const int8x16_t v1_1h = vld1q_s8(y1->qs + 16);
sumv0 = vmlaq_n_f32(sumv0, vcvtq_f32_s32(vaddq_s32(
ggml_vdotq_s32(vdupq_n_s32(0), v0_0lf, v1_0l),
ggml_vdotq_s32(vdupq_n_s32(0), v0_0hf, v1_0h))), GGML_FP16_TO_FP32(x0->d)*GGML_FP16_TO_FP32(y0->d));
sumv1 = vmlaq_n_f32(sumv1, vcvtq_f32_s32(vaddq_s32(
ggml_vdotq_s32(vdupq_n_s32(0), v0_1lf, v1_1l),
ggml_vdotq_s32(vdupq_n_s32(0), v0_1hf, v1_1h))), GGML_FP16_TO_FP32(x1->d)*GGML_FP16_TO_FP32(y1->d));
}
sumf = vaddvq_f32(sumv0) + vaddvq_f32(sumv1) + summs0 + summs1;
#elif defined __wasm_simd128__
v128_t sumv = wasm_f32x4_splat(0.0f);
float summs = 0.0f;
uint32_t qh_;
uint64_t tmp[4];
// TODO: check if unrolling this is better
for (; ib < nb; ++ib) {
const block_q5_1 * GGML_RESTRICT x0 = &x[ib];
const block_q8_1 * GGML_RESTRICT y0 = &y[ib];
summs += GGML_FP16_TO_FP32(x0->m) * GGML_FP16_TO_FP32(y0->s);
const v128_t m4b = wasm_i8x16_splat(0x0F);
// extract the 5th bit
memcpy(&qh_, x0->qh, sizeof(qh_));
tmp[0] = table_b2b_0[(qh_ >> 0) & 0xFF];
tmp[1] = table_b2b_0[(qh_ >> 8) & 0xFF];
tmp[2] = table_b2b_0[(qh_ >> 16) & 0xFF];
tmp[3] = table_b2b_0[(qh_ >> 24) ];
const v128_t qhl = wasm_v128_load(tmp + 0);
const v128_t qhh = wasm_v128_load(tmp + 2);
const v128_t v0 = wasm_v128_load(x0->qs);
// 4-bit -> 8-bit
const v128_t v0l = wasm_v128_and (v0, m4b);
const v128_t v0h = wasm_u8x16_shr(v0, 4);
// add high bit
const v128_t v0lf = wasm_v128_or(v0l, qhl);
const v128_t v0hf = wasm_v128_or(v0h, qhh);
// load y
const v128_t v1l = wasm_v128_load(y0->qs);
const v128_t v1h = wasm_v128_load(y0->qs + 16);
// int8x16 -> int16x8
const v128_t v0lfl = wasm_i16x8_extend_low_i8x16 (v0lf);
const v128_t v0lfh = wasm_i16x8_extend_high_i8x16(v0lf);
const v128_t v0hfl = wasm_i16x8_extend_low_i8x16 (v0hf);
const v128_t v0hfh = wasm_i16x8_extend_high_i8x16(v0hf);
const v128_t v1ll = wasm_i16x8_extend_low_i8x16 (v1l);
const v128_t v1lh = wasm_i16x8_extend_high_i8x16(v1l);
const v128_t v1hl = wasm_i16x8_extend_low_i8x16 (v1h);
const v128_t v1hh = wasm_i16x8_extend_high_i8x16(v1h);
// dot product
sumv = wasm_f32x4_add(sumv,
wasm_f32x4_mul(wasm_f32x4_convert_i32x4(wasm_i32x4_add(
wasm_i32x4_add(wasm_i32x4_dot_i16x8(v0lfl, v1ll),
wasm_i32x4_dot_i16x8(v0lfh, v1lh)),
wasm_i32x4_add(wasm_i32x4_dot_i16x8(v0hfl, v1hl),
wasm_i32x4_dot_i16x8(v0hfh, v1hh)))),
wasm_f32x4_splat(GGML_FP16_TO_FP32(x0->d) * GGML_FP16_TO_FP32(y0->d))));
}
sumf = wasm_f32x4_extract_lane(sumv, 0) + wasm_f32x4_extract_lane(sumv, 1) +
wasm_f32x4_extract_lane(sumv, 2) + wasm_f32x4_extract_lane(sumv, 3) + summs;
#elif defined(__AVX2__)
// Initialize accumulator with zeros
__m256 acc = _mm256_setzero_ps();
float summs = 0.0f;
// Main loop
for (; ib < nb; ++ib) {
const __m256 dx = _mm256_set1_ps(GGML_FP16_TO_FP32(x[ib].d));
summs += GGML_FP16_TO_FP32(x[ib].m) * GGML_FP16_TO_FP32(y[ib].s);
__m256i qx = bytes_from_nibbles_32(x[ib].qs);
__m256i bxhi = bytes_from_bits_32(x[ib].qh);
bxhi = _mm256_and_si256(bxhi, _mm256_set1_epi8(0x10));
qx = _mm256_or_si256(qx, bxhi);
const __m256 dy = _mm256_set1_ps(GGML_FP16_TO_FP32(y[ib].d));
const __m256i qy = _mm256_loadu_si256((const __m256i *)y[ib].qs);
const __m256 q = mul_sum_us8_pairs_float(qx, qy);
acc = _mm256_fmadd_ps(q, _mm256_mul_ps(dx, dy), acc);
}
sumf = hsum_float_8(acc) + summs;
#elif defined(__AVX__)
// Initialize accumulator with zeros
__m256 acc = _mm256_setzero_ps();
__m128i mask = _mm_set1_epi8(0x10);
float summs = 0.0f;
// Main loop
for (; ib < nb; ++ib) {
const __m256 dx = _mm256_set1_ps(GGML_FP16_TO_FP32(x[ib].d));
summs += GGML_FP16_TO_FP32(x[ib].m) * GGML_FP16_TO_FP32(y[ib].s);
__m256i bx_0 = bytes_from_nibbles_32(x[ib].qs);
const __m256i bxhi = bytes_from_bits_32(x[ib].qh);
__m128i bxhil = _mm256_castsi256_si128(bxhi);
__m128i bxhih = _mm256_extractf128_si256(bxhi, 1);
bxhil = _mm_and_si128(bxhil, mask);
bxhih = _mm_and_si128(bxhih, mask);
__m128i bxl = _mm256_castsi256_si128(bx_0);
__m128i bxh = _mm256_extractf128_si256(bx_0, 1);
bxl = _mm_or_si128(bxl, bxhil);
bxh = _mm_or_si128(bxh, bxhih);
bx_0 = MM256_SET_M128I(bxh, bxl);
const __m256 dy = _mm256_set1_ps(GGML_FP16_TO_FP32(y[ib].d));
const __m256i by_0 = _mm256_loadu_si256((const __m256i *)y[ib].qs);
const __m256 q = mul_sum_us8_pairs_float(bx_0, by_0);
acc = _mm256_add_ps(_mm256_mul_ps(q, _mm256_mul_ps(dx, dy)), acc);
}
sumf = hsum_float_8(acc) + summs;
#elif defined(__riscv_v_intrinsic)
size_t vl;
size_t vlenb = __riscv_vlenb();
for (; ib < nb; ++ib) {
vl = qk / 2;
vuint8m1_t v0 = __riscv_vle8_v_u8m1(x[ib].qs, vl);
vint8m1_t v0l = __riscv_vreinterpret_v_u8m1_i8m1(__riscv_vand_vx_u8m1(v0, 0x0F, vl));
vint8m1_t v0h = __riscv_vreinterpret_v_u8m1_i8m1(__riscv_vsrl_vx_u8m1(v0, 4, vl));
vint8m2_t v0c;
if (vlenb == 16) {
v0c = __riscv_vcreate_v_i8m1_i8m2(v0l, v0h);
} else {
v0l = __riscv_vslideup_vx_i8m1(v0l, v0h, 16, 32);
v0c = __riscv_vlmul_ext_v_i8m1_i8m2(v0l);
}
vl = qk;
vbool4_t qh = __riscv_vlm_v_b4(x[ib].qh, vl);
vint8m2_t v0f = __riscv_vor_vx_i8m2_mu(qh, v0c, v0c, 0x10, vl);
vint8m2_t v1 = __riscv_vle8_v_i8m2(y[ib].qs, vl);
vint16m4_t mul = __riscv_vwmul_vv_i16m4(v0f, v1, vl);
vint32m1_t zero = __riscv_vmv_v_x_i32m1(0, vl);
vint32m1_t sum = __riscv_vwredsum_vs_i16m4_i32m1(mul, zero, vl);
int32_t sumi = __riscv_vmv_x_s_i32m1_i32(sum);
sumf += (GGML_FP16_TO_FP32(x[ib].d)*GGML_FP16_TO_FP32(y[ib].d))*sumi + GGML_FP16_TO_FP32(x[ib].m)*GGML_FP16_TO_FP32(y[ib].s);
}
#elif defined(__POWER9_VECTOR__)
const vector signed char lowMask = vec_splats((signed char)0xF);
const vector signed int v0 = vec_splats((int32_t)0);
const vector unsigned char v4 = vec_splats((unsigned char)0x4);
vector float vsumf0 = vec_splats(0.0f);
#pragma GCC unroll 4
for (; ib < nb; ++ib) {
__builtin_prefetch(x[ib].qs, 0, 1);
__builtin_prefetch(y[ib].qs, 0, 1);
vector float vxd = vec_splats(GGML_FP16_TO_FP32(x[ib].d));
vector float vyd = vec_splats(GGML_FP16_TO_FP32(y[ib].d));
vector float vd = vec_mul(vxd, vyd);
vector float vxmin = vec_splats(GGML_FP16_TO_FP32(x[ib].m));
vector float vys = {GGML_FP16_TO_FP32(y[ib].s), 0.f, 0.f, 0.f};
vsumf0 = vec_madd(vxmin, vys, vsumf0);
vector unsigned long long aux64x2_0 = {(uint64_t)(table_b2b_0[x[ib].qh[0]]), (uint64_t)(table_b2b_0[x[ib].qh[1]])};
vector unsigned long long aux64x2_1 = {(uint64_t)(table_b2b_0[x[ib].qh[2]]), (uint64_t)(table_b2b_0[x[ib].qh[3]])};
vector signed char qh0 = (vector signed char)aux64x2_0;
vector signed char qh1 = (vector signed char)aux64x2_1;
vector signed char qxs = (vector signed char)vec_xl( 0, x[ib].qs);
vector unsigned char q5x0 = (vector unsigned char)vec_or(vec_and(qxs, lowMask), qh0);
vector unsigned char q5x1 = (vector unsigned char)vec_or(vec_sr(qxs, v4), qh1);
vector signed char q8y0 = vec_xl( 0, y[ib].qs);
vector signed char q8y1 = vec_xl( 16, y[ib].qs);
vector signed int vsumi0 = v0;
vsumi0 = vec_msum(q8y0, q5x0, vsumi0);
vsumi0 = vec_msum(q8y1, q5x1, vsumi0);
vsumf0 = vec_madd(vec_ctf(vsumi0, 0), vd, vsumf0);
}
vsumf0 = vec_add(vsumf0, vec_sld(vsumf0, vsumf0, 4));
vsumf0 = vec_add(vsumf0, vec_sld(vsumf0, vsumf0, 8));
sumf = vec_extract(vsumf0, 0);
#elif defined(__loongarch_asx)
// Initialize accumulator with zeros
__m256 acc = (__m256)__lasx_xvldi(0);
float summs = 0.0f;
// Main loop
for (; ib < nb; ++ib) {
const __m256 dx = __lasx_xvreplfr2vr_s(GGML_FP16_TO_FP32(x[ib].d));
summs += GGML_FP16_TO_FP32(x[ib].m) * GGML_FP16_TO_FP32(y[ib].s);
__m256i qx = bytes_from_nibbles_32(x[ib].qs);
__m256i bxhi = bytes_from_bits_32(x[ib].qh);
bxhi = __lasx_xvand_v(bxhi, __lasx_xvreplgr2vr_b(0x10));
qx = __lasx_xvor_v(qx, bxhi);
const __m256 dy = __lasx_xvreplfr2vr_s(GGML_FP16_TO_FP32(y[ib].d));
const __m256i qy = __lasx_xvld((const __m256i *)y[ib].qs, 0);
const __m256 q = mul_sum_us8_pairs_float(qx, qy);
acc = __lasx_xvfmadd_s(q, __lasx_xvfmul_s(dx, dy), acc);
}
sumf = hsum_float_8(acc) + summs;
#endif
for (; ib < nb; ++ib) {
uint32_t qh;
memcpy(&qh, x[ib].qh, sizeof(qh));
int sumi0 = 0;
int sumi1 = 0;
for (int j = 0; j < qk/2; ++j) {
const uint8_t xh_0 = ((qh >> (j + 0)) << 4) & 0x10;
const uint8_t xh_1 = ((qh >> (j + 12)) ) & 0x10;
const int32_t x0 = (x[ib].qs[j] & 0xF) | xh_0;
const int32_t x1 = (x[ib].qs[j] >> 4) | xh_1;
sumi0 += (x0 * y[ib].qs[j]);
sumi1 += (x1 * y[ib].qs[j + qk/2]);
}
int sumi = sumi0 + sumi1;
sumf += (GGML_FP16_TO_FP32(x[ib].d)*GGML_FP16_TO_FP32(y[ib].d))*sumi + GGML_FP16_TO_FP32(x[ib].m)*GGML_FP16_TO_FP32(y[ib].s);
}
*s = sumf;
}
|
O1
|
c
|
ggml_vec_dot_q5_1_q8_1:
pushq %rbp
pushq %r14
pushq %rbx
leal 0x1f(%rdi), %eax
testl %edi, %edi
cmovnsl %edi, %eax
sarl $0x5, %eax
cmpl $0x20, %edi
jl 0x1ded5
movl %eax, %edi
leaq 0x4(%r9), %rdx
shlq $0x3, %rdi
leaq (%rdi,%rdi,2), %rdi
vxorps %xmm0, %xmm0, %xmm0
vxorps %xmm1, %xmm1, %xmm1
xorl %r8d, %r8d
movq 0x3e14d(%rip), %r10 # 0x5bf60
vmovdqa 0x2c765(%rip), %ymm2 # 0x4a580
vpbroadcastq 0x2ca04(%rip), %ymm3 # 0x4a828
vpcmpeqd %ymm4, %ymm4, %ymm4
vpbroadcastq 0x2c9ff(%rip), %ymm5 # 0x4a830
vpbroadcastq 0x2c9fe(%rip), %ymm6 # 0x4a838
vpbroadcastw 0x2ca4f(%rip), %ymm7 # 0x4a892
movzwl (%rcx,%r8), %r11d
vmovss (%r10,%r11,4), %xmm8
movzwl 0x2(%rcx,%r8), %r11d
vmovss (%r10,%r11,4), %xmm9
movzwl -0x2(%rdx), %r11d
vfmadd231ss (%r10,%r11,4), %xmm9, %xmm0 # xmm0 = (xmm9 * mem) + xmm0
vmovdqu 0x8(%rcx,%r8), %xmm9
vpsrlw $0x4, %xmm9, %xmm10
vinserti128 $0x1, %xmm10, %ymm9, %ymm9
vmovd 0x4(%rcx,%r8), %xmm10
vpermq $0x44, %ymm10, %ymm10 # ymm10 = ymm10[0,1,0,1]
vpshufb %ymm2, %ymm10, %ymm10
vpor %ymm3, %ymm10, %ymm10
vpcmpeqb %ymm4, %ymm10, %ymm10
vpand %ymm5, %ymm10, %ymm10
vpternlogq $0xf8, %ymm6, %ymm9, %ymm10
movzwl -0x4(%rdx), %r11d
vpmaddubsw (%rdx), %ymm10, %ymm9
vpmaddwd %ymm7, %ymm9, %ymm9
vmulss (%r10,%r11,4), %xmm8, %xmm8
vcvtdq2ps %ymm9, %ymm9
vbroadcastss %xmm8, %ymm8
vfmadd231ps %ymm8, %ymm9, %ymm1 # ymm1 = (ymm9 * ymm8) + ymm1
addq $0x24, %rdx
addq $0x18, %r8
cmpq %r8, %rdi
jne 0x1de43
movl %eax, %edx
jmp 0x1dedf
xorl %edx, %edx
vxorps %xmm1, %xmm1, %xmm1
vxorps %xmm0, %xmm0, %xmm0
vextractf128 $0x1, %ymm1, %xmm2
vaddps %xmm1, %xmm2, %xmm1
vshufpd $0x1, %xmm1, %xmm1, %xmm2 # xmm2 = xmm1[1,0]
vaddps %xmm2, %xmm1, %xmm1
vhaddps %xmm1, %xmm1, %xmm1
vaddss %xmm1, %xmm0, %xmm0
cmpl %eax, %edx
jge 0x1e063
movl %edx, %edx
leaq (%rdx,%rdx,2), %rdi
leaq (%rcx,%rdi,8), %rdi
addq $0x8, %rdi
leaq (%rdx,%rdx,8), %r8
vpmovsxbd 0x2c003(%rip), %ymm1 # 0x49f20
vpbroadcastd 0x2c636(%rip), %ymm2 # 0x4a55c
vpbroadcastd 0x2c635(%rip), %ymm3 # 0x4a564
leaq (%r9,%r8,4), %r8
addq $0x14, %r8
vpbroadcastd 0x2beb8(%rip), %ymm4 # 0x49df8
vpbroadcastd 0x2be9b(%rip), %ymm5 # 0x49de4
movq 0x3e010(%rip), %r10 # 0x5bf60
leaq (%rdx,%rdx,2), %r11
leaq (%rcx,%r11,8), %r11
vpbroadcastd 0x4(%r11), %ymm8
vpxor %xmm7, %xmm7, %xmm7
xorl %ebx, %ebx
vpxor %xmm6, %xmm6, %xmm6
vmovdqa %ymm1, %ymm9
vmovdqa %ymm1, %ymm10
vpsrlvd %ymm9, %ymm8, %ymm11
vpslld $0x4, %ymm11, %ymm11
vpaddd %ymm3, %ymm10, %ymm12
vpsrlvd %ymm12, %ymm8, %ymm12
vpmovzxbd (%rdi,%rbx), %ymm13
vpand %ymm4, %ymm13, %ymm14
vpternlogd $0xf8, %ymm2, %ymm11, %ymm14
vpsrld $0x4, %ymm13, %ymm11
vpternlogd $0xf8, %ymm2, %ymm12, %ymm11
vpmovsxbw -0x10(%r8,%rbx), %xmm12
vpmovdw %ymm14, %xmm13
vpmaddwd %xmm12, %xmm13, %xmm12
vpaddd %ymm7, %ymm12, %ymm7
vpmovsxbw (%r8,%rbx), %xmm12
vpmovdw %ymm11, %xmm11
vpmaddwd %xmm12, %xmm11, %xmm11
vpaddd %ymm6, %ymm11, %ymm6
addq $0x8, %rbx
vpaddd %ymm5, %ymm9, %ymm9
vpaddd %ymm5, %ymm10, %ymm10
cmpq $0x10, %rbx
jne 0x1df70
vextracti128 $0x1, %ymm7, %xmm8
vphaddd %xmm7, %xmm8, %xmm7
vphaddd %xmm7, %xmm7, %xmm7
vphaddd %xmm7, %xmm7, %xmm7
vextracti128 $0x1, %ymm6, %xmm8
vphaddd %xmm6, %xmm8, %xmm6
vphaddd %xmm6, %xmm6, %xmm6
vphaddd %xmm6, %xmm6, %xmm6
vmovd %xmm7, %ebx
vmovd %xmm6, %ebp
addl %ebx, %ebp
movzwl (%r11), %ebx
vmovss (%r10,%rbx,4), %xmm6
leaq (%rdx,%rdx,8), %rbx
movzwl (%r9,%rbx,4), %r14d
vmulss (%r10,%r14,4), %xmm6, %xmm6
vcvtsi2ss %ebp, %xmm15, %xmm7
movzwl 0x2(%r11), %r11d
vmovss (%r10,%r11,4), %xmm8
movzwl 0x2(%r9,%rbx,4), %r11d
vmulss (%r10,%r11,4), %xmm8, %xmm8
vfmadd231ss %xmm7, %xmm6, %xmm8 # xmm8 = (xmm6 * xmm7) + xmm8
vaddss %xmm0, %xmm8, %xmm0
incq %rdx
addq $0x18, %rdi
addq $0x24, %r8
cmpl %edx, %eax
jg 0x1df50
vmovss %xmm0, (%rsi)
popq %rbx
popq %r14
popq %rbp
vzeroupper
retq
|
ggml_vec_dot_q5_1_q8_1:
push rbp
push r14
push rbx
lea eax, [rdi+1Fh]
test edi, edi
cmovns eax, edi
sar eax, 5
cmp edi, 20h ; ' '
jl loc_1DED5
mov edi, eax
lea rdx, [r9+4]
shl rdi, 3
lea rdi, [rdi+rdi*2]
vxorps xmm0, xmm0, xmm0
vxorps xmm1, xmm1, xmm1
xor r8d, r8d
mov r10, cs:ggml_table_f32_f16_ptr
vmovdqa ymm2, cs:ymmword_4A580
vpbroadcastq ymm3, cs:qword_4A828
vpcmpeqd ymm4, ymm4, ymm4
vpbroadcastq ymm5, cs:qword_4A830
vpbroadcastq ymm6, cs:qword_4A838
vpbroadcastw ymm7, cs:word_4A892
loc_1DE43:
movzx r11d, word ptr [rcx+r8]
vmovss xmm8, dword ptr [r10+r11*4]
movzx r11d, word ptr [rcx+r8+2]
vmovss xmm9, dword ptr [r10+r11*4]
movzx r11d, word ptr [rdx-2]
vfmadd231ss xmm0, xmm9, dword ptr [r10+r11*4]
vmovdqu xmm9, xmmword ptr [rcx+r8+8]
vpsrlw xmm10, xmm9, 4
vinserti128 ymm9, ymm9, xmm10, 1
vmovd xmm10, dword ptr [rcx+r8+4]
vpermq ymm10, ymm10, 44h ; 'D'
vpshufb ymm10, ymm10, ymm2
vpor ymm10, ymm10, ymm3
vpcmpeqb ymm10, ymm10, ymm4
vpand ymm10, ymm10, ymm5
vpternlogq ymm10, ymm9, ymm6, 0F8h
movzx r11d, word ptr [rdx-4]
vpmaddubsw ymm9, ymm10, ymmword ptr [rdx]
vpmaddwd ymm9, ymm9, ymm7
vmulss xmm8, xmm8, dword ptr [r10+r11*4]
vcvtdq2ps ymm9, ymm9
vbroadcastss ymm8, xmm8
vfmadd231ps ymm1, ymm9, ymm8
add rdx, 24h ; '$'
add r8, 18h
cmp rdi, r8
jnz loc_1DE43
mov edx, eax
jmp short loc_1DEDF
loc_1DED5:
xor edx, edx
vxorps xmm1, xmm1, xmm1
vxorps xmm0, xmm0, xmm0
loc_1DEDF:
vextractf128 xmm2, ymm1, 1
vaddps xmm1, xmm2, xmm1
vshufpd xmm2, xmm1, xmm1, 1
vaddps xmm1, xmm1, xmm2
vhaddps xmm1, xmm1, xmm1
vaddss xmm0, xmm0, xmm1
cmp edx, eax
jge loc_1E063
mov edx, edx
lea rdi, [rdx+rdx*2]
lea rdi, [rcx+rdi*8]
add rdi, 8
lea r8, [rdx+rdx*8]
vpmovsxbd ymm1, cs:qword_49F20
vpbroadcastd ymm2, cs:dword_4A55C
vpbroadcastd ymm3, cs:dword_4A564
lea r8, [r9+r8*4]
add r8, 14h
vpbroadcastd ymm4, cs:dword_49DF8
vpbroadcastd ymm5, dword ptr cs:xmmword_49DE0+4
mov r10, cs:ggml_table_f32_f16_ptr
loc_1DF50:
lea r11, [rdx+rdx*2]
lea r11, [rcx+r11*8]
vpbroadcastd ymm8, dword ptr [r11+4]
vpxor xmm7, xmm7, xmm7
xor ebx, ebx
vpxor xmm6, xmm6, xmm6
vmovdqa ymm9, ymm1
vmovdqa ymm10, ymm1
loc_1DF70:
vpsrlvd ymm11, ymm8, ymm9
vpslld ymm11, ymm11, 4
vpaddd ymm12, ymm10, ymm3
vpsrlvd ymm12, ymm8, ymm12
vpmovzxbd ymm13, qword ptr [rdi+rbx]
vpand ymm14, ymm13, ymm4
vpternlogd ymm14, ymm11, ymm2, 0F8h
vpsrld ymm11, ymm13, 4
vpternlogd ymm11, ymm12, ymm2, 0F8h
vpmovsxbw xmm12, qword ptr [r8+rbx-10h]
vpmovdw xmm13, ymm14
vpmaddwd xmm12, xmm13, xmm12
vpaddd ymm7, ymm12, ymm7
vpmovsxbw xmm12, qword ptr [r8+rbx]
vpmovdw xmm11, ymm11
vpmaddwd xmm11, xmm11, xmm12
vpaddd ymm6, ymm11, ymm6
add rbx, 8
vpaddd ymm9, ymm9, ymm5
vpaddd ymm10, ymm10, ymm5
cmp rbx, 10h
jnz short loc_1DF70
vextracti128 xmm8, ymm7, 1
vphaddd xmm7, xmm8, xmm7
vphaddd xmm7, xmm7, xmm7
vphaddd xmm7, xmm7, xmm7
vextracti128 xmm8, ymm6, 1
vphaddd xmm6, xmm8, xmm6
vphaddd xmm6, xmm6, xmm6
vphaddd xmm6, xmm6, xmm6
vmovd ebx, xmm7
vmovd ebp, xmm6
add ebp, ebx
movzx ebx, word ptr [r11]
vmovss xmm6, dword ptr [r10+rbx*4]
lea rbx, [rdx+rdx*8]
movzx r14d, word ptr [r9+rbx*4]
vmulss xmm6, xmm6, dword ptr [r10+r14*4]
vcvtsi2ss xmm7, xmm15, ebp
movzx r11d, word ptr [r11+2]
vmovss xmm8, dword ptr [r10+r11*4]
movzx r11d, word ptr [r9+rbx*4+2]
vmulss xmm8, xmm8, dword ptr [r10+r11*4]
vfmadd231ss xmm8, xmm6, xmm7
vaddss xmm0, xmm8, xmm0
inc rdx
add rdi, 18h
add r8, 24h ; '$'
cmp eax, edx
jg loc_1DF50
loc_1E063:
vmovss dword ptr [rsi], xmm0
pop rbx
pop r14
pop rbp
vzeroupper
retn
|
long long ggml_vec_dot_q5_1_q8_1(
int a1,
long long _RSI,
__m128 _XMM0,
__m128 _XMM1,
double a5,
double a6,
double a7,
double a8,
__m128 _XMM6,
__m128 _XMM7,
long long a11,
long long _RCX,
long long a13,
long long a14)
{
long long result; // rax
long long v20; // rdx
long long v48; // rdx
result = (unsigned int)(a1 / 32);
if ( a1 < 32 )
{
LODWORD(v48) = 0;
__asm
{
vxorps xmm1, xmm1, xmm1
vxorps xmm0, xmm0, xmm0
}
}
else
{
v20 = a14 + 4;
__asm
{
vxorps xmm0, xmm0, xmm0
vxorps xmm1, xmm1, xmm1
}
_R8 = 0LL;
_R10 = &ggml_table_f32_f16;
__asm
{
vmovdqa ymm2, cs:ymmword_4A580
vpbroadcastq ymm3, cs:qword_4A828
vpcmpeqd ymm4, ymm4, ymm4
vpbroadcastq ymm5, cs:qword_4A830
vpbroadcastq ymm6, cs:qword_4A838
vpbroadcastw ymm7, cs:word_4A892
}
do
{
_R11 = *(unsigned __int16 *)(_RCX + _R8);
__asm { vmovss xmm8, dword ptr [r10+r11*4] }
_R11 = *(unsigned __int16 *)(_RCX + _R8 + 2);
__asm
{
vmovss xmm9, dword ptr [r10+r11*4]
vfmadd231ss xmm0, xmm9, dword ptr [r10+r11*4]
vmovdqu xmm9, xmmword ptr [rcx+r8+8]
vpsrlw xmm10, xmm9, 4
vinserti128 ymm9, ymm9, xmm10, 1
vmovd xmm10, dword ptr [rcx+r8+4]
vpermq ymm10, ymm10, 44h ; 'D'
vpshufb ymm10, ymm10, ymm2
vpor ymm10, ymm10, ymm3
vpcmpeqb ymm10, ymm10, ymm4
vpand ymm10, ymm10, ymm5
vpternlogq ymm10, ymm9, ymm6, 0F8h
vpmaddubsw ymm9, ymm10, ymmword ptr [rdx]
vpmaddwd ymm9, ymm9, ymm7
vmulss xmm8, xmm8, dword ptr [r10+r11*4]
vcvtdq2ps ymm9, ymm9
vbroadcastss ymm8, xmm8
vfmadd231ps ymm1, ymm9, ymm8
}
v20 += 36LL;
_R8 += 24LL;
}
while ( 24LL * (unsigned int)result != _R8 );
LODWORD(v48) = a1 / 32;
}
__asm
{
vextractf128 xmm2, ymm1, 1
vaddps xmm1, xmm2, xmm1
vshufpd xmm2, xmm1, xmm1, 1
vaddps xmm1, xmm1, xmm2
vhaddps xmm1, xmm1, xmm1
vaddss xmm0, xmm0, xmm1
}
if ( (int)v48 < (int)result )
{
v48 = (unsigned int)v48;
_RDI = _RCX + 24LL * (unsigned int)v48 + 8;
__asm
{
vpmovsxbd ymm1, cs:qword_49F20
vpbroadcastd ymm2, cs:dword_4A55C
vpbroadcastd ymm3, cs:dword_4A564
}
_R8 = a14 + 36LL * (unsigned int)v48 + 20;
__asm
{
vpbroadcastd ymm4, cs:dword_49DF8
vpbroadcastd ymm5, dword ptr cs:xmmword_49DE0+4
}
_R10 = &ggml_table_f32_f16;
do
{
_R11 = (unsigned __int16 *)(_RCX + 24 * v48);
__asm
{
vpbroadcastd ymm8, dword ptr [r11+4]
vpxor xmm7, xmm7, xmm7
}
_RBX = 0LL;
__asm
{
vpxor xmm6, xmm6, xmm6
vmovdqa ymm9, ymm1
vmovdqa ymm10, ymm1
}
do
{
__asm
{
vpsrlvd ymm11, ymm8, ymm9
vpslld ymm11, ymm11, 4
vpaddd ymm12, ymm10, ymm3
vpsrlvd ymm12, ymm8, ymm12
vpmovzxbd ymm13, qword ptr [rdi+rbx]
vpand ymm14, ymm13, ymm4
vpternlogd ymm14, ymm11, ymm2, 0F8h
vpsrld ymm11, ymm13, 4
vpternlogd ymm11, ymm12, ymm2, 0F8h
vpmovsxbw xmm12, qword ptr [r8+rbx-10h]
vpmovdw xmm13, ymm14
vpmaddwd xmm12, xmm13, xmm12
vpaddd ymm7, ymm12, ymm7
vpmovsxbw xmm12, qword ptr [r8+rbx]
vpmovdw xmm11, ymm11
vpmaddwd xmm11, xmm11, xmm12
vpaddd ymm6, ymm11, ymm6
}
_RBX += 8LL;
__asm
{
vpaddd ymm9, ymm9, ymm5
vpaddd ymm10, ymm10, ymm5
}
}
while ( _RBX != 16 );
__asm
{
vextracti128 xmm8, ymm7, 1
vphaddd xmm7, xmm8, xmm7
vphaddd xmm7, xmm7, xmm7
vphaddd xmm7, xmm7, xmm7
vextracti128 xmm8, ymm6, 1
vphaddd xmm6, xmm8, xmm6
vphaddd xmm6, xmm6, xmm6
vphaddd xmm6, xmm6, xmm6
vmovd ebx, xmm7
vmovd ebp, xmm6
}
_RBX = *_R11;
__asm
{
vmovss xmm6, dword ptr [r10+rbx*4]
vmulss xmm6, xmm6, dword ptr [r10+r14*4]
vcvtsi2ss xmm7, xmm15, ebp
}
_R11 = _R11[1];
__asm
{
vmovss xmm8, dword ptr [r10+r11*4]
vmulss xmm8, xmm8, dword ptr [r10+r11*4]
vfmadd231ss xmm8, xmm6, xmm7
vaddss xmm0, xmm8, xmm0
}
++v48;
_RDI += 24LL;
_R8 += 36LL;
}
while ( (int)result > (int)v48 );
}
__asm
{
vmovss dword ptr [rsi], xmm0
vzeroupper
}
return result;
}
|
ggml_vec_dot_q5_1_q8_1:
PUSH RBP
PUSH R14
PUSH RBX
LEA EAX,[RDI + 0x1f]
TEST EDI,EDI
CMOVNS EAX,EDI
SAR EAX,0x5
CMP EDI,0x20
JL 0x0011ded5
MOV EDI,EAX
LEA RDX,[R9 + 0x4]
SHL RDI,0x3
LEA RDI,[RDI + RDI*0x2]
VXORPS XMM0,XMM0,XMM0
VXORPS XMM1,XMM1,XMM1
XOR R8D,R8D
MOV R10,qword ptr [0x0015bf60]
VMOVDQA YMM2,ymmword ptr [0x0014a580]
VPBROADCASTQ YMM3,qword ptr [0x0014a828]
VPCMPEQD YMM4,YMM4,YMM4
VPBROADCASTQ YMM5,qword ptr [0x0014a830]
VPBROADCASTQ YMM6,qword ptr [0x0014a838]
VPBROADCASTW YMM7,word ptr [0x0014a892]
LAB_0011de43:
MOVZX R11D,word ptr [RCX + R8*0x1]
VMOVSS XMM8,dword ptr [R10 + R11*0x4]
MOVZX R11D,word ptr [RCX + R8*0x1 + 0x2]
VMOVSS XMM9,dword ptr [R10 + R11*0x4]
MOVZX R11D,word ptr [RDX + -0x2]
VFMADD231SS XMM0,XMM9,dword ptr [R10 + R11*0x4]
VMOVDQU XMM9,xmmword ptr [RCX + R8*0x1 + 0x8]
VPSRLW XMM10,XMM9,0x4
VINSERTI128 YMM9,YMM9,XMM10,0x1
VMOVD XMM10,dword ptr [RCX + R8*0x1 + 0x4]
VPERMQ YMM10,YMM10,0x44
VPSHUFB YMM10,YMM10,YMM2
VPOR YMM10,YMM10,YMM3
VPCMPEQB YMM10,YMM10,YMM4
VPAND YMM10,YMM10,YMM5
VPTERNLOGQ YMM10,YMM9,YMM6,0xf8
MOVZX R11D,word ptr [RDX + -0x4]
VPMADDUBSW YMM9,YMM10,ymmword ptr [RDX]
VPMADDWD YMM9,YMM9,YMM7
VMULSS XMM8,XMM8,dword ptr [R10 + R11*0x4]
VCVTDQ2PS YMM9,YMM9
VBROADCASTSS YMM8,XMM8
VFMADD231PS YMM1,YMM9,YMM8
ADD RDX,0x24
ADD R8,0x18
CMP RDI,R8
JNZ 0x0011de43
MOV EDX,EAX
JMP 0x0011dedf
LAB_0011ded5:
XOR EDX,EDX
VXORPS XMM1,XMM1,XMM1
VXORPS XMM0,XMM0,XMM0
LAB_0011dedf:
VEXTRACTF128 XMM2,YMM1,0x1
VADDPS XMM1,XMM2,XMM1
VSHUFPD XMM2,XMM1,XMM1,0x1
VADDPS XMM1,XMM1,XMM2
VHADDPS XMM1,XMM1,XMM1
VADDSS XMM0,XMM0,XMM1
CMP EDX,EAX
JGE 0x0011e063
MOV EDX,EDX
LEA RDI,[RDX + RDX*0x2]
LEA RDI,[RCX + RDI*0x8]
ADD RDI,0x8
LEA R8,[RDX + RDX*0x8]
VPMOVSXBD YMM1,qword ptr [0x00149f20]
VPBROADCASTD YMM2,dword ptr [0x0014a55c]
VPBROADCASTD YMM3,dword ptr [0x0014a564]
LEA R8,[R9 + R8*0x4]
ADD R8,0x14
VPBROADCASTD YMM4,dword ptr [0x00149df8]
VPBROADCASTD YMM5,dword ptr [0x00149de4]
MOV R10,qword ptr [0x0015bf60]
LAB_0011df50:
LEA R11,[RDX + RDX*0x2]
LEA R11,[RCX + R11*0x8]
VPBROADCASTD YMM8,dword ptr [R11 + 0x4]
VPXOR XMM7,XMM7,XMM7
XOR EBX,EBX
VPXOR XMM6,XMM6,XMM6
VMOVDQA YMM9,YMM1
VMOVDQA YMM10,YMM1
LAB_0011df70:
VPSRLVD YMM11,YMM8,YMM9
VPSLLD YMM11,YMM11,0x4
VPADDD YMM12,YMM10,YMM3
VPSRLVD YMM12,YMM8,YMM12
VPMOVZXBD YMM13,qword ptr [RDI + RBX*0x1]
VPAND YMM14,YMM13,YMM4
VPTERNLOGD YMM14,YMM11,YMM2,0xf8
VPSRLD YMM11,YMM13,0x4
VPTERNLOGD YMM11,YMM12,YMM2,0xf8
VPMOVSXBW XMM12,qword ptr [R8 + RBX*0x1 + -0x10]
VPMOVDW XMM13,YMM14
VPMADDWD XMM12,XMM13,XMM12
VPADDD YMM7,YMM12,YMM7
VPMOVSXBW XMM12,qword ptr [R8 + RBX*0x1]
VPMOVDW XMM11,YMM11
VPMADDWD XMM11,XMM11,XMM12
VPADDD YMM6,YMM11,YMM6
ADD RBX,0x8
VPADDD YMM9,YMM9,YMM5
VPADDD YMM10,YMM10,YMM5
CMP RBX,0x10
JNZ 0x0011df70
VEXTRACTI128 XMM8,YMM7,0x1
VPHADDD XMM7,XMM8,XMM7
VPHADDD XMM7,XMM7,XMM7
VPHADDD XMM7,XMM7,XMM7
VEXTRACTI128 XMM8,YMM6,0x1
VPHADDD XMM6,XMM8,XMM6
VPHADDD XMM6,XMM6,XMM6
VPHADDD XMM6,XMM6,XMM6
VMOVD EBX,XMM7
VMOVD EBP,XMM6
ADD EBP,EBX
MOVZX EBX,word ptr [R11]
VMOVSS XMM6,dword ptr [R10 + RBX*0x4]
LEA RBX,[RDX + RDX*0x8]
MOVZX R14D,word ptr [R9 + RBX*0x4]
VMULSS XMM6,XMM6,dword ptr [R10 + R14*0x4]
VCVTSI2SS XMM7,XMM15,EBP
MOVZX R11D,word ptr [R11 + 0x2]
VMOVSS XMM8,dword ptr [R10 + R11*0x4]
MOVZX R11D,word ptr [R9 + RBX*0x4 + 0x2]
VMULSS XMM8,XMM8,dword ptr [R10 + R11*0x4]
VFMADD231SS XMM8,XMM6,XMM7
VADDSS XMM0,XMM8,XMM0
INC RDX
ADD RDI,0x18
ADD R8,0x24
CMP EAX,EDX
JG 0x0011df50
LAB_0011e063:
VMOVSS dword ptr [RSI],XMM0
POP RBX
POP R14
POP RBP
VZEROUPPER
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void ggml_vec_dot_q5_1_q8_1
(int param_1,float *param_2,int8 param_3,long param_4,int8 param_5,
long param_6)
{
ushort *puVar1;
int4 uVar2;
int1 auVar3 [16];
int1 auVar4 [16];
int1 auVar5 [16];
int1 auVar6 [16];
uint uVar7;
uint uVar9;
int1 (*pauVar10) [32];
ulong uVar11;
long lVar12;
long lVar13;
long lVar14;
int1 auVar15 [32];
int1 auVar16 [32];
float fVar17;
int1 auVar18 [64];
int1 auVar19 [16];
int1 auVar20 [64];
int1 auVar21 [32];
int1 auVar22 [32];
int1 auVar23 [32];
int1 auVar24 [32];
int1 in_ZMM4 [64];
int1 auVar25 [32];
int1 auVar26 [32];
int1 auVar27 [16];
int1 auVar28 [32];
int1 auVar29 [32];
int1 auVar30 [16];
int1 auVar31 [16];
int1 auVar32 [32];
int1 auVar33 [32];
int1 auVar34 [16];
int1 in_register_000015c4 [12];
int iVar8;
iVar8 = param_1 + 0x1f;
if (-1 < param_1) {
iVar8 = param_1;
}
uVar7 = iVar8 >> 5;
if (param_1 < 0x20) {
auVar15 = SUB6432(ZEXT864(0),0);
auVar18 = ZEXT864(0);
uVar9 = 0;
}
else {
pauVar10 = (int1 (*) [32])(param_6 + 4);
auVar18 = ZEXT864(0);
auVar20 = ZEXT864(0);
lVar13 = 0;
auVar22._8_8_ = DAT_0014a828;
auVar22._0_8_ = DAT_0014a828;
auVar22._16_8_ = DAT_0014a828;
auVar22._24_8_ = DAT_0014a828;
auVar21 = vpcmpeqd_avx2(in_ZMM4._0_32_,in_ZMM4._0_32_);
auVar25._8_8_ = DAT_0014a830;
auVar25._0_8_ = DAT_0014a830;
auVar25._16_8_ = DAT_0014a830;
auVar25._24_8_ = DAT_0014a830;
auVar16._8_8_ = DAT_0014a838;
auVar16._0_8_ = DAT_0014a838;
auVar16._16_8_ = DAT_0014a838;
auVar16._24_8_ = DAT_0014a838;
auVar33._2_2_ = DAT_0014a892;
auVar33._0_2_ = DAT_0014a892;
auVar33._4_2_ = DAT_0014a892;
auVar33._6_2_ = DAT_0014a892;
auVar33._8_2_ = DAT_0014a892;
auVar33._10_2_ = DAT_0014a892;
auVar33._12_2_ = DAT_0014a892;
auVar33._14_2_ = DAT_0014a892;
auVar33._16_2_ = DAT_0014a892;
auVar33._18_2_ = DAT_0014a892;
auVar33._20_2_ = DAT_0014a892;
auVar33._22_2_ = DAT_0014a892;
auVar33._24_2_ = DAT_0014a892;
auVar33._26_2_ = DAT_0014a892;
auVar33._28_2_ = DAT_0014a892;
auVar33._30_2_ = DAT_0014a892;
do {
auVar6 = vfmadd231ss_fma(auVar18._0_16_,
ZEXT416(*(uint *)(PTR_ggml_table_f32_f16_0015bf60 +
(ulong)*(ushort *)(param_4 + 2 + lVar13) * 4)),
ZEXT416(*(uint *)(PTR_ggml_table_f32_f16_0015bf60 +
(ulong)*(ushort *)(pauVar10[-1] + 0x1e) * 4)));
auVar18 = ZEXT1664(auVar6);
auVar6 = *(int1 (*) [16])(param_4 + 8 + lVar13);
auVar30 = vpsrlw_avx(auVar6,4);
auVar32._0_16_ = ZEXT116(0) * auVar30 + ZEXT116(1) * auVar6;
auVar32._16_16_ = ZEXT116(0) * SUB4816((int1 [48])0x0,0) + ZEXT116(1) * auVar30;
auVar15 = vpermq_avx2(ZEXT432(*(uint *)(param_4 + 4 + lVar13)),0x44);
auVar15 = vpshufb_avx2(auVar15,_DAT_0014a580);
auVar15 = vpor_avx2(auVar15,auVar22);
auVar15 = vpcmpeqb_avx2(auVar15,auVar21);
auVar15 = vpand_avx2(auVar15,auVar25);
auVar15 = vpternlogq_avx512vl(auVar15,auVar32,auVar16,0xf8);
auVar15 = vpmaddubsw_avx2(auVar15,*pauVar10);
auVar15 = vpmaddwd_avx2(auVar15,auVar33);
fVar17 = *(float *)(PTR_ggml_table_f32_f16_0015bf60 + (ulong)*(ushort *)(param_4 + lVar13) * 4
) *
*(float *)(PTR_ggml_table_f32_f16_0015bf60 +
(ulong)*(ushort *)(pauVar10[-1] + 0x1c) * 4);
auVar15 = vcvtdq2ps_avx(auVar15);
auVar28._4_4_ = fVar17;
auVar28._0_4_ = fVar17;
auVar28._8_4_ = fVar17;
auVar28._12_4_ = fVar17;
auVar28._16_4_ = fVar17;
auVar28._20_4_ = fVar17;
auVar28._24_4_ = fVar17;
auVar28._28_4_ = fVar17;
auVar6 = vfmadd231ps_fma(auVar20._0_32_,auVar15,auVar28);
auVar20 = ZEXT1664(auVar6);
auVar15 = ZEXT1632(auVar6);
pauVar10 = (int1 (*) [32])(pauVar10[1] + 4);
lVar13 = lVar13 + 0x18;
uVar9 = uVar7;
} while ((ulong)uVar7 * 0x18 != lVar13);
}
auVar30._0_4_ = auVar15._16_4_ + auVar15._0_4_;
auVar30._4_4_ = auVar15._20_4_ + auVar15._4_4_;
auVar30._8_4_ = auVar15._24_4_ + auVar15._8_4_;
auVar30._12_4_ = auVar15._28_4_ + auVar15._12_4_;
auVar6 = vshufpd_avx(auVar30,auVar30,1);
auVar19._0_4_ = auVar30._0_4_ + auVar6._0_4_;
auVar19._4_4_ = auVar30._4_4_ + auVar6._4_4_;
auVar19._8_4_ = auVar30._8_4_ + auVar6._8_4_;
auVar19._12_4_ = auVar30._12_4_ + auVar6._12_4_;
auVar6 = vhaddps_avx(auVar19,auVar19);
fVar17 = auVar18._0_4_ + auVar6._0_4_;
if ((int)uVar9 < (int)uVar7) {
uVar11 = (ulong)uVar9;
lVar13 = param_4 + uVar11 * 0x18 + 8;
auVar6._8_8_ = 0;
auVar6._0_8_ = DAT_00149f20;
auVar15 = vpmovsxbd_avx2(auVar6);
auVar21._4_4_ = DAT_0014a55c;
auVar21._0_4_ = DAT_0014a55c;
auVar21._8_4_ = DAT_0014a55c;
auVar21._12_4_ = DAT_0014a55c;
auVar21._16_4_ = DAT_0014a55c;
auVar21._20_4_ = DAT_0014a55c;
auVar21._24_4_ = DAT_0014a55c;
auVar21._28_4_ = DAT_0014a55c;
auVar23._4_4_ = DAT_0014a564;
auVar23._0_4_ = DAT_0014a564;
auVar23._8_4_ = DAT_0014a564;
auVar23._12_4_ = DAT_0014a564;
auVar23._16_4_ = DAT_0014a564;
auVar23._20_4_ = DAT_0014a564;
auVar23._24_4_ = DAT_0014a564;
auVar23._28_4_ = DAT_0014a564;
lVar14 = param_6 + uVar11 * 0x24 + 0x14;
auVar24._4_4_ = DAT_00149df8;
auVar24._0_4_ = DAT_00149df8;
auVar24._8_4_ = DAT_00149df8;
auVar24._12_4_ = DAT_00149df8;
auVar24._16_4_ = DAT_00149df8;
auVar24._20_4_ = DAT_00149df8;
auVar24._24_4_ = DAT_00149df8;
auVar24._28_4_ = DAT_00149df8;
auVar26._4_4_ = DAT_00149de4;
auVar26._0_4_ = DAT_00149de4;
auVar26._8_4_ = DAT_00149de4;
auVar26._12_4_ = DAT_00149de4;
auVar26._16_4_ = DAT_00149de4;
auVar26._20_4_ = DAT_00149de4;
auVar26._24_4_ = DAT_00149de4;
auVar26._28_4_ = DAT_00149de4;
do {
puVar1 = (ushort *)(param_4 + uVar11 * 0x18);
uVar2 = *(int4 *)(puVar1 + 2);
auVar29._4_4_ = uVar2;
auVar29._0_4_ = uVar2;
auVar29._8_4_ = uVar2;
auVar29._12_4_ = uVar2;
auVar29._16_4_ = uVar2;
auVar29._20_4_ = uVar2;
auVar29._24_4_ = uVar2;
auVar29._28_4_ = uVar2;
auVar20 = ZEXT1664((int1 [16])0x0);
lVar12 = 0;
auVar18 = ZEXT1664((int1 [16])0x0);
auVar22 = auVar15;
auVar25 = auVar15;
do {
auVar16 = vpsrlvd_avx2(auVar29,auVar22);
auVar32 = vpslld_avx2(auVar16,4);
auVar16 = vpaddd_avx2(auVar25,auVar23);
auVar28 = vpsrlvd_avx2(auVar29,auVar16);
auVar3._8_8_ = 0;
auVar3._0_8_ = *(ulong *)(lVar13 + lVar12);
auVar33 = vpmovzxbd_avx2(auVar3);
auVar16 = vpand_avx2(auVar33,auVar24);
auVar16 = vpternlogd_avx512vl(auVar16,auVar32,auVar21,0xf8);
auVar33 = vpsrld_avx2(auVar33,4);
auVar33 = vpternlogd_avx512vl(auVar33,auVar28,auVar21,0xf8);
auVar4._8_8_ = 0;
auVar4._0_8_ = *(ulong *)(lVar14 + -0x10 + lVar12);
auVar6 = vpmovsxbw_avx(auVar4);
auVar30 = vpmovdw_avx512vl(auVar16);
auVar34._8_8_ = 0;
auVar34._0_8_ = auVar30._0_8_;
auVar6 = vpmaddwd_avx(auVar34,auVar6);
auVar16 = vpaddd_avx2(ZEXT1632(auVar6),auVar20._0_32_);
auVar20 = ZEXT3264(auVar16);
auVar5._8_8_ = 0;
auVar5._0_8_ = *(ulong *)(lVar14 + lVar12);
auVar6 = vpmovsxbw_avx(auVar5);
auVar30 = vpmovdw_avx512vl(auVar33);
auVar31._8_8_ = 0;
auVar31._0_8_ = auVar30._0_8_;
auVar6 = vpmaddwd_avx(auVar31,auVar6);
auVar33 = vpaddd_avx2(ZEXT1632(auVar6),auVar18._0_32_);
auVar18 = ZEXT3264(auVar33);
lVar12 = lVar12 + 8;
auVar22 = vpaddd_avx2(auVar22,auVar26);
auVar25 = vpaddd_avx2(auVar25,auVar26);
} while (lVar12 != 0x10);
auVar6 = vphaddd_avx(auVar16._16_16_,auVar16._0_16_);
auVar6 = vphaddd_avx(auVar6,auVar6);
auVar6 = vphaddd_avx(auVar6,auVar6);
auVar30 = vphaddd_avx(auVar33._16_16_,auVar33._0_16_);
auVar30 = vphaddd_avx(auVar30,auVar30);
auVar30 = vphaddd_avx(auVar30,auVar30);
auVar27._0_4_ = (float)(auVar30._0_4_ + auVar6._0_4_);
auVar27._4_12_ = in_register_000015c4;
auVar6 = vfmadd231ss_fma(ZEXT416((uint)(*(float *)(PTR_ggml_table_f32_f16_0015bf60 +
(ulong)puVar1[1] * 4) *
*(float *)(PTR_ggml_table_f32_f16_0015bf60 +
(ulong)*(ushort *)
(param_6 + 2 + uVar11 * 0x24) * 4))),
ZEXT416((uint)(*(float *)(PTR_ggml_table_f32_f16_0015bf60 +
(ulong)*puVar1 * 4) *
*(float *)(PTR_ggml_table_f32_f16_0015bf60 +
(ulong)*(ushort *)(param_6 + uVar11 * 0x24) *
4))),auVar27);
fVar17 = auVar6._0_4_ + fVar17;
uVar11 = uVar11 + 1;
lVar13 = lVar13 + 0x18;
lVar14 = lVar14 + 0x24;
} while ((int)uVar11 < (int)uVar7);
}
*param_2 = fVar17;
return;
}
|
|
61,078
|
Catch::XmlReporter::benchmarkStarting(Catch::BenchmarkInfo const&)
|
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp
|
void XmlReporter::benchmarkStarting(BenchmarkInfo const &info) {
m_xml.writeAttribute("samples"_sr, info.samples)
.writeAttribute("resamples"_sr, info.resamples)
.writeAttribute("iterations"_sr, info.iterations)
.writeAttribute("clockResolution"_sr, info.clockResolution)
.writeAttribute("estimatedDuration"_sr, info.estimatedDuration)
.writeComment("All values in nano seconds"_sr);
}
|
O3
|
cpp
|
Catch::XmlReporter::benchmarkStarting(Catch::BenchmarkInfo const&):
pushq %rbx
movq %rsi, %rbx
addq $0x98, %rdi
leaq 0x2c(%rsi), %rcx
leaq 0x6e1c3(%rip), %rsi # 0xdee0d
movl $0x7, %edx
callq 0x79730
leaq 0x30(%rbx), %rcx
leaq 0x6cc84(%rip), %rsi # 0xdd8e3
movl $0x9, %edx
movq %rax, %rdi
callq 0x79730
leaq 0x28(%rbx), %rcx
leaq 0x6e1a0(%rip), %rsi # 0xdee17
movl $0xa, %edx
movq %rax, %rdi
callq 0x79b44
leaq 0x38(%rbx), %rcx
leaq 0x6dc6d(%rip), %rsi # 0xde8fc
movl $0xf, %edx
movq %rax, %rdi
callq 0x79d92
addq $0x20, %rbx
leaq 0x6dc65(%rip), %rsi # 0xde90c
movl $0x11, %edx
movq %rax, %rdi
movq %rbx, %rcx
callq 0x79d92
leaq 0x6dc60(%rip), %rsi # 0xde91e
movl $0x1a, %edx
movq %rax, %rdi
movl $0x3, %ecx
popq %rbx
jmp 0x64824
nop
|
_ZN5Catch11XmlReporter17benchmarkStartingERKNS_13BenchmarkInfoE:
push rbx
mov rbx, rsi
add rdi, 98h
lea rcx, [rsi+2Ch]
lea rsi, aSamples+5; "samples"
mov edx, 7
call _ZN5Catch9XmlWriter14writeAttributeIjvEERS0_NS_9StringRefERKT_; Catch::XmlWriter::writeAttribute<uint,void>(Catch::StringRef,uint const&)
lea rcx, [rbx+30h]
lea rsi, aBenchmarkResam+0Ch; "resamples"
mov edx, 9
mov rdi, rax
call _ZN5Catch9XmlWriter14writeAttributeIjvEERS0_NS_9StringRefERKT_; Catch::XmlWriter::writeAttribute<uint,void>(Catch::StringRef,uint const&)
lea rcx, [rbx+28h]
lea rsi, aIterations+2; "iterations"
mov edx, 0Ah
mov rdi, rax
call _ZN5Catch9XmlWriter14writeAttributeIivEERS0_NS_9StringRefERKT_; Catch::XmlWriter::writeAttribute<int,void>(Catch::StringRef,int const&)
lea rcx, [rbx+38h]
lea rsi, aClockresolutio; "clockResolution"
mov edx, 0Fh
mov rdi, rax
call _ZN5Catch9XmlWriter14writeAttributeIdvEERS0_NS_9StringRefERKT_; Catch::XmlWriter::writeAttribute<double,void>(Catch::StringRef,double const&)
add rbx, 20h ; ' '
lea rsi, aEstimateddurat; "estimatedDuration"
mov edx, 11h
mov rdi, rax
mov rcx, rbx
call _ZN5Catch9XmlWriter14writeAttributeIdvEERS0_NS_9StringRefERKT_; Catch::XmlWriter::writeAttribute<double,void>(Catch::StringRef,double const&)
lea rsi, aAllValuesInNan; "All values in nano seconds"
mov edx, 1Ah
mov rdi, rax
mov ecx, 3
pop rbx
jmp _ZN5Catch9XmlWriter12writeCommentENS_9StringRefENS_13XmlFormattingE; Catch::XmlWriter::writeComment(Catch::StringRef,Catch::XmlFormatting)
|
benchmarkStarting:
PUSH RBX
MOV RBX,RSI
ADD RDI,0x98
LEA RCX,[RSI + 0x2c]
LEA RSI,[0x1dee0d]
MOV EDX,0x7
CALL 0x00179730
LEA RCX,[RBX + 0x30]
LEA RSI,[0x1dd8e3]
MOV EDX,0x9
MOV RDI,RAX
CALL 0x00179730
LEA RCX,[RBX + 0x28]
LEA RSI,[0x1dee17]
MOV EDX,0xa
MOV RDI,RAX
CALL 0x00179b44
LEA RCX,[RBX + 0x38]
LEA RSI,[0x1de8fc]
MOV EDX,0xf
MOV RDI,RAX
CALL 0x00179d92
ADD RBX,0x20
LEA RSI,[0x1de90c]
MOV EDX,0x11
MOV RDI,RAX
MOV RCX,RBX
CALL 0x00179d92
LEA RSI,[0x1de91e]
MOV EDX,0x1a
MOV RDI,RAX
MOV ECX,0x3
POP RBX
JMP 0x00164824
|
/* Catch::XmlReporter::benchmarkStarting(Catch::BenchmarkInfo const&) */
void __thiscall Catch::XmlReporter::benchmarkStarting(XmlReporter *this,BenchmarkInfo *param_1)
{
XmlWriter *pXVar1;
pXVar1 = XmlWriter::writeAttribute<unsigned_int,void>
((XmlWriter *)(this + 0x98),"samples",7,param_1 + 0x2c);
pXVar1 = XmlWriter::writeAttribute<unsigned_int,void>(pXVar1,"resamples",9,param_1 + 0x30);
pXVar1 = XmlWriter::writeAttribute<int,void>(pXVar1,"iterations",10,param_1 + 0x28);
pXVar1 = XmlWriter::writeAttribute<double,void>(pXVar1,"clockResolution",0xf,param_1 + 0x38);
pXVar1 = XmlWriter::writeAttribute<double,void>(pXVar1,"estimatedDuration",0x11,param_1 + 0x20);
XmlWriter::writeComment(pXVar1,"All values in nano seconds",0x1a,3);
return;
}
|
||
61,079
|
LefDefParser::lefiNonDefault::viaRule(int) const
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiNonDefault.cpp
|
lefiVia *
lefiNonDefault::viaRule(int index) const
{
char msg[160];
if (index < 0 || index >= numVias_) {
sprintf(msg, "ERROR (LEFPARS-1403): The index number %d given for the NONDEFAULT VIA is invalid.\nValid index is from 0 to %d", index, numVias_);
lefiError(0, 1403, msg);
return 0;
}
return viaRules_[index];
}
|
O3
|
cpp
|
LefDefParser::lefiNonDefault::viaRule(int) const:
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movl %esi, %edx
testl %esi, %esi
setns %al
movl 0x90(%rdi), %ecx
cmpl %esi, %ecx
setg %sil
testb %sil, %al
je 0x202ed
movq 0x98(%rdi), %rax
movl %edx, %ecx
movq (%rax,%rcx,8), %rbx
jmp 0x20312
leaq 0x2f67c(%rip), %rsi # 0x4f970
xorl %ebx, %ebx
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2050
xorl %edi, %edi
movl $0x57b, %esi # imm = 0x57B
movq %r14, %rdx
callq 0x27ae8
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r14
retq
|
_ZNK12LefDefParser14lefiNonDefault7viaRuleEi:
push r14
push rbx
sub rsp, 0A8h
mov edx, esi
test esi, esi
setns al
mov ecx, [rdi+90h]
cmp ecx, esi
setnle sil
test al, sil
jz short loc_202ED
mov rax, [rdi+98h]
mov ecx, edx
mov rbx, [rax+rcx*8]
jmp short loc_20312
loc_202ED:
lea rsi, aErrorLefpars14_4; "ERROR (LEFPARS-1403): The index number "...
xor ebx, ebx
mov r14, rsp
mov rdi, r14
xor eax, eax
call _sprintf
xor edi, edi; this
mov esi, 57Bh; int
mov rdx, r14; int
call _ZN12LefDefParser9lefiErrorEiiPKc; LefDefParser::lefiError(int,int,char const*)
loc_20312:
mov rax, rbx
add rsp, 0A8h
pop rbx
pop r14
retn
|
long long LefDefParser::lefiNonDefault::viaRule(LefDefParser::lefiNonDefault *this, signed int a2)
{
int v2; // ecx
long long v3; // rbx
const char *v4; // rcx
_BYTE v6[184]; // [rsp+0h] [rbp-B8h] BYREF
v2 = *((_DWORD *)this + 36);
if ( v2 > a2 && a2 >= 0 )
return *(_QWORD *)(*((_QWORD *)this + 19) + 8LL * (unsigned int)a2);
v3 = 0LL;
sprintf(
v6,
"ERROR (LEFPARS-1403): The index number %d given for the NONDEFAULT VIA is invalid.\nValid index is from 0 to %d",
a2,
v2);
LefDefParser::lefiError(0LL, 1403, (int)v6, v4);
return v3;
}
|
viaRule:
PUSH R14
PUSH RBX
SUB RSP,0xa8
MOV EDX,ESI
TEST ESI,ESI
SETNS AL
MOV ECX,dword ptr [RDI + 0x90]
CMP ECX,ESI
SETG SIL
TEST AL,SIL
JZ 0x001202ed
MOV RAX,qword ptr [RDI + 0x98]
MOV ECX,EDX
MOV RBX,qword ptr [RAX + RCX*0x8]
JMP 0x00120312
LAB_001202ed:
LEA RSI,[0x14f970]
XOR EBX,EBX
MOV R14,RSP
MOV RDI,R14
XOR EAX,EAX
CALL 0x00102050
XOR EDI,EDI
MOV ESI,0x57b
MOV RDX,R14
CALL 0x00127ae8
LAB_00120312:
MOV RAX,RBX
ADD RSP,0xa8
POP RBX
POP R14
RET
|
/* LefDefParser::lefiNonDefault::viaRule(int) const */
int8 __thiscall LefDefParser::lefiNonDefault::viaRule(lefiNonDefault *this,int param_1)
{
int8 uVar1;
char acStack_b8 [168];
if (param_1 < 0 || *(int *)(this + 0x90) <= param_1) {
uVar1 = 0;
sprintf(acStack_b8,
"ERROR (LEFPARS-1403): The index number %d given for the NONDEFAULT VIA is invalid.\nValid index is from 0 to %d"
);
lefiError(0,0x57b,acStack_b8);
}
else {
uVar1 = *(int8 *)(*(long *)(this + 0x98) + (ulong)(uint)param_1 * 8);
}
return uVar1;
}
|
|
61,080
|
my_numcells_eucjp
|
eloqsql/strings/ctype-ujis.c
|
static
size_t my_numcells_eucjp(CHARSET_INFO *cs __attribute__((unused)),
const char *str, const char *str_end)
{
size_t clen;
const uchar *b= (const uchar *) str;
const uchar *e= (const uchar *) str_end;
for (clen= 0; b < e; )
{
if (*b == 0x8E)
{
clen++;
b+= 2;
}
else if (*b == 0x8F)
{
clen+= 2;
b+= 3;
}
else if (*b & 0x80)
{
clen+= 2;
b+= 2;
}
else
{
clen++;
b++;
}
}
return clen;
}
|
O3
|
c
|
my_numcells_eucjp:
cmpq %rdx, %rsi
jae 0x84c6e
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movzbl (%rsi), %edi
cmpl $0x8e, %edi
je 0x84c47
cmpl $0x8f, %edi
jne 0x84c53
movl $0x3, %edi
movl $0x2, %ecx
jmp 0x84c61
movl $0x2, %edi
movl $0x1, %ecx
jmp 0x84c61
xorl %ecx, %ecx
testb %dil, %dil
sets %cl
incq %rcx
movq %rcx, %rdi
addq %rcx, %rax
addq %rdi, %rsi
cmpq %rdx, %rsi
jb 0x84c28
popq %rbp
retq
xorl %eax, %eax
retq
|
my_numcells_eucjp:
cmp rsi, rdx
jnb short loc_84C6E
push rbp
mov rbp, rsp
xor eax, eax
loc_84C28:
movzx edi, byte ptr [rsi]
cmp edi, 8Eh
jz short loc_84C47
cmp edi, 8Fh
jnz short loc_84C53
mov edi, 3
mov ecx, 2
jmp short loc_84C61
loc_84C47:
mov edi, 2
mov ecx, 1
jmp short loc_84C61
loc_84C53:
xor ecx, ecx
test dil, dil
sets cl
inc rcx
mov rdi, rcx
loc_84C61:
add rax, rcx
add rsi, rdi
cmp rsi, rdx
jb short loc_84C28
pop rbp
retn
loc_84C6E:
xor eax, eax
retn
|
long long my_numcells_eucjp(long long a1, unsigned __int8 *a2, unsigned long long a3)
{
long long result; // rax
int v4; // edi
long long v5; // rdi
long long v6; // rcx
if ( (unsigned long long)a2 >= a3 )
return 0LL;
result = 0LL;
do
{
v4 = *a2;
if ( v4 == 142 )
{
v5 = 2LL;
v6 = 1LL;
}
else if ( v4 == 143 )
{
v5 = 3LL;
v6 = 2LL;
}
else
{
v6 = ((v4 & 0x80u) != 0) + 1LL;
v5 = v6;
}
result += v6;
a2 += v5;
}
while ( (unsigned long long)a2 < a3 );
return result;
}
|
my_numcells_eucjp:
CMP RSI,RDX
JNC 0x00184c6e
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
LAB_00184c28:
MOVZX EDI,byte ptr [RSI]
CMP EDI,0x8e
JZ 0x00184c47
CMP EDI,0x8f
JNZ 0x00184c53
MOV EDI,0x3
MOV ECX,0x2
JMP 0x00184c61
LAB_00184c47:
MOV EDI,0x2
MOV ECX,0x1
JMP 0x00184c61
LAB_00184c53:
XOR ECX,ECX
TEST DIL,DIL
SETS CL
INC RCX
MOV RDI,RCX
LAB_00184c61:
ADD RAX,RCX
ADD RSI,RDI
CMP RSI,RDX
JC 0x00184c28
POP RBP
RET
LAB_00184c6e:
XOR EAX,EAX
RET
|
long my_numcells_eucjp(int8 param_1,char *param_2,char *param_3)
{
char cVar1;
long lVar2;
long lVar3;
long lVar4;
if (param_2 < param_3) {
lVar2 = 0;
do {
cVar1 = *param_2;
if (cVar1 == -0x72) {
lVar4 = 2;
lVar3 = 1;
}
else if (cVar1 == -0x71) {
lVar3 = 2;
lVar4 = 3;
}
else {
lVar3 = (ulong)(cVar1 < '\0') + 1;
lVar4 = lVar3;
}
lVar2 = lVar2 + lVar3;
param_2 = param_2 + lVar4;
} while (param_2 < param_3);
return lVar2;
}
return 0;
}
|
|
61,081
|
PFS_table_share::sum_lock(PFS_single_stat*)
|
eloqsql/storage/perfschema/pfs_instr_class.cc
|
PFS_table_share_lock*
PFS_table_share::find_lock_stat() const
{
PFS_table_share *that= const_cast<PFS_table_share*>(this);
void *addr= & that->m_race_lock_stat;
void * volatile * typed_addr= static_cast<void * volatile *>(addr);
void *ptr;
/* Atomic Load */
ptr= my_atomic_loadptr(typed_addr);
PFS_table_share_lock *pfs;
pfs= static_cast<PFS_table_share_lock *>(ptr);
return pfs;
}
|
O3
|
cpp
|
PFS_table_share::sum_lock(PFS_single_stat*):
movq 0x1c0(%rdi), %rax
testq %rax, %rax
je 0x31eb3
pushq %rbp
movq %rsp, %rbp
movq $-0x20, %rcx
movq 0x28(%rax,%rcx), %rdx
testq %rdx, %rdx
je 0x31e97
addq %rdx, (%rsi)
movq 0x30(%rax,%rcx), %rdx
addq %rdx, 0x8(%rsi)
movq 0x38(%rax,%rcx), %rdx
cmpq %rdx, 0x10(%rsi)
ja 0x31ea6
movq 0x40(%rax,%rcx), %rdx
cmpq %rdx, 0x18(%rsi)
jb 0x31eac
addq $0x20, %rcx
cmpq $0x140, %rcx # imm = 0x140
jb 0x31e6b
jmp 0x31eb2
movq %rdx, 0x10(%rsi)
jmp 0x31e8c
movq %rdx, 0x18(%rsi)
jmp 0x31e97
popq %rbp
retq
|
_ZN15PFS_table_share8sum_lockEP15PFS_single_stat:
mov rax, [rdi+1C0h]
test rax, rax
jz short locret_31EB3
push rbp
mov rbp, rsp
mov rcx, 0FFFFFFFFFFFFFFE0h
loc_31E6B:
mov rdx, [rax+rcx+28h]
test rdx, rdx
jz short loc_31E97
add [rsi], rdx
mov rdx, [rax+rcx+30h]
add [rsi+8], rdx
mov rdx, [rax+rcx+38h]
cmp [rsi+10h], rdx
ja short loc_31EA6
loc_31E8C:
mov rdx, [rax+rcx+40h]
cmp [rsi+18h], rdx
jb short loc_31EAC
loc_31E97:
add rcx, 20h ; ' '
cmp rcx, 140h
jb short loc_31E6B
jmp short loc_31EB2
loc_31EA6:
mov [rsi+10h], rdx
jmp short loc_31E8C
loc_31EAC:
mov [rsi+18h], rdx
jmp short loc_31E97
loc_31EB2:
pop rbp
locret_31EB3:
retn
|
long long PFS_table_share::sum_lock(long long a1, _QWORD *a2)
{
long long result; // rax
unsigned long long v3; // rcx
long long v4; // rdx
unsigned long long v5; // rdx
unsigned long long v6; // rdx
result = *(_QWORD *)(a1 + 448);
if ( result )
{
v3 = -32LL;
do
{
v4 = *(_QWORD *)(result + v3 + 40);
if ( v4 )
{
*a2 += v4;
a2[1] += *(_QWORD *)(result + v3 + 48);
v5 = *(_QWORD *)(result + v3 + 56);
if ( a2[2] > v5 )
a2[2] = v5;
v6 = *(_QWORD *)(result + v3 + 64);
if ( a2[3] < v6 )
a2[3] = v6;
}
v3 += 32LL;
}
while ( v3 < 0x140 );
}
return result;
}
|
sum_lock:
MOV RAX,qword ptr [RDI + 0x1c0]
TEST RAX,RAX
JZ 0x00131eb3
PUSH RBP
MOV RBP,RSP
MOV RCX,-0x20
LAB_00131e6b:
MOV RDX,qword ptr [RAX + RCX*0x1 + 0x28]
TEST RDX,RDX
JZ 0x00131e97
ADD qword ptr [RSI],RDX
MOV RDX,qword ptr [RAX + RCX*0x1 + 0x30]
ADD qword ptr [RSI + 0x8],RDX
MOV RDX,qword ptr [RAX + RCX*0x1 + 0x38]
CMP qword ptr [RSI + 0x10],RDX
JA 0x00131ea6
LAB_00131e8c:
MOV RDX,qword ptr [RAX + RCX*0x1 + 0x40]
CMP qword ptr [RSI + 0x18],RDX
JC 0x00131eac
LAB_00131e97:
ADD RCX,0x20
CMP RCX,0x140
JC 0x00131e6b
JMP 0x00131eb2
LAB_00131ea6:
MOV qword ptr [RSI + 0x10],RDX
JMP 0x00131e8c
LAB_00131eac:
MOV qword ptr [RSI + 0x18],RDX
JMP 0x00131e97
LAB_00131eb2:
POP RBP
LAB_00131eb3:
RET
|
/* PFS_table_share::sum_lock(PFS_single_stat*) */
void __thiscall PFS_table_share::sum_lock(PFS_table_share *this,PFS_single_stat *param_1)
{
long lVar1;
long lVar2;
ulong uVar3;
ulong uVar4;
lVar1 = *(long *)(this + 0x1c0);
if (lVar1 != 0) {
uVar4 = 0xffffffffffffffe0;
do {
lVar2 = *(long *)(lVar1 + 0x28 + uVar4);
if (lVar2 != 0) {
*(long *)param_1 = *(long *)param_1 + lVar2;
*(long *)(param_1 + 8) = *(long *)(param_1 + 8) + *(long *)(lVar1 + 0x30 + uVar4);
uVar3 = *(ulong *)(lVar1 + 0x38 + uVar4);
if (uVar3 < *(ulong *)(param_1 + 0x10)) {
*(ulong *)(param_1 + 0x10) = uVar3;
}
uVar3 = *(ulong *)(lVar1 + 0x40 + uVar4);
if (*(ulong *)(param_1 + 0x18) < uVar3) {
*(ulong *)(param_1 + 0x18) = uVar3;
}
}
uVar4 = uVar4 + 0x20;
} while (uVar4 < 0x140);
}
return;
}
|
|
61,082
|
Apc_target::disable()
|
eloqsql/include/../sql/my_apc.h
|
void disable()
{
DBUG_ASSERT(enabled);
mysql_mutex_lock(LOCK_thd_kill_ptr);
bool process= !--enabled && have_apc_requests();
mysql_mutex_unlock(LOCK_thd_kill_ptr);
if (unlikely(process))
process_apc_requests();
}
|
O0
|
c
|
Apc_target::disable():
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x25416
movq -0x18(%rbp), %rax
movq (%rax), %rdi
leaq 0x53ee0(%rip), %rsi # 0x79304
movl $0x45, %edx
callq 0x24cf0
movq -0x18(%rbp), %rax
movl 0x8(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x8(%rax)
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x19(%rbp)
jne 0x25451
movq -0x18(%rbp), %rdi
callq 0x25580
movb %al, -0x19(%rbp)
movq -0x18(%rbp), %rax
movb -0x19(%rbp), %cl
andb $0x1, %cl
movb %cl, -0x9(%rbp)
movq (%rax), %rdi
callq 0x24be0
movb -0x9(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x2547c
movq -0x18(%rbp), %rdi
callq 0x24c40
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
|
_ZN10Apc_target7disableEv:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
jmp short $+2
loc_25416:
mov rax, [rbp+var_18]
mov rdi, [rax]
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 45h ; 'E'
call _ZL23inline_mysql_mutex_lockP14st_mysql_mutexPKcj; inline_mysql_mutex_lock(st_mysql_mutex *,char const*,uint)
mov rax, [rbp+var_18]
mov ecx, [rax+8]
add ecx, 0FFFFFFFFh
mov [rax+8], ecx
xor eax, eax
cmp ecx, 0
mov [rbp+var_19], al
jnz short loc_25451
mov rdi, [rbp+var_18]; this
call _ZN10Apc_target17have_apc_requestsEv; Apc_target::have_apc_requests(void)
mov [rbp+var_19], al
loc_25451:
mov rax, [rbp+var_18]
mov cl, [rbp+var_19]
and cl, 1
mov [rbp+var_9], cl
mov rdi, [rax]
call _ZL25inline_mysql_mutex_unlockP14st_mysql_mutex; inline_mysql_mutex_unlock(st_mysql_mutex *)
mov al, [rbp+var_9]
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_2547C
mov rdi, [rbp+var_18]; this
call _ZN10Apc_target20process_apc_requestsEv; Apc_target::process_apc_requests(void)
loc_2547C:
add rsp, 20h
pop rbp
retn
|
long long Apc_target::disable(Apc_target *this)
{
int v1; // ecx
long long result; // rax
char have_apc_requests; // [rsp+7h] [rbp-19h]
inline_mysql_mutex_lock(
*(_QWORD *)this,
(long long)"/workspace/llm4binary/github2025/eloqsql/include/../sql/my_apc.h",
0x45u);
v1 = *((_DWORD *)this + 2) - 1;
*((_DWORD *)this + 2) = v1;
have_apc_requests = 0;
if ( !v1 )
have_apc_requests = Apc_target::have_apc_requests(this);
inline_mysql_mutex_unlock(*(_QWORD *)this);
result = have_apc_requests & 1;
if ( (have_apc_requests & 1) != 0 )
return Apc_target::process_apc_requests(this);
return result;
}
|
disable:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00125416
LAB_00125416:
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x179304]
MOV EDX,0x45
CALL 0x00124cf0
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RAX + 0x8]
ADD ECX,-0x1
MOV dword ptr [RAX + 0x8],ECX
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x19],AL
JNZ 0x00125451
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00125580
MOV byte ptr [RBP + -0x19],AL
LAB_00125451:
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,byte ptr [RBP + -0x19]
AND CL,0x1
MOV byte ptr [RBP + -0x9],CL
MOV RDI,qword ptr [RAX]
CALL 0x00124be0
MOV AL,byte ptr [RBP + -0x9]
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x0012547c
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00124c40
LAB_0012547c:
ADD RSP,0x20
POP RBP
RET
|
/* Apc_target::disable() */
void __thiscall Apc_target::disable(Apc_target *this)
{
int iVar1;
byte local_21;
inline_mysql_mutex_lock
(*(st_mysql_mutex **)this,
"/workspace/llm4binary/github2025/eloqsql/include/../sql/my_apc.h",0x45);
iVar1 = *(int *)(this + 8);
*(int *)(this + 8) = iVar1 + -1;
local_21 = 0;
if (iVar1 + -1 == 0) {
local_21 = have_apc_requests(this);
}
inline_mysql_mutex_unlock(*(st_mysql_mutex **)this);
if ((local_21 & 1) != 0) {
process_apc_requests(this);
}
return;
}
|
|
61,083
|
Apc_target::disable()
|
eloqsql/include/../sql/my_apc.h
|
void disable()
{
DBUG_ASSERT(enabled);
mysql_mutex_lock(LOCK_thd_kill_ptr);
bool process= !--enabled && have_apc_requests();
mysql_mutex_unlock(LOCK_thd_kill_ptr);
if (unlikely(process))
process_apc_requests();
}
|
O3
|
c
|
Apc_target::disable():
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
cmpq $0x0, 0x40(%rdi)
jne 0x255ef
callq 0x24480
decl 0x8(%rbx)
je 0x255c7
movq (%rbx), %rbx
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
jne 0x25602
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x24210
movq (%rbx), %r14
movq 0x10(%rbx), %r15
movq 0x40(%r14), %rdi
testq %rdi, %rdi
jne 0x25614
movq %r14, %rdi
callq 0x24210
testq %r15, %r15
jne 0x25626
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x36d3e(%rip), %rsi # 0x5c334
movl $0x45, %edx
callq 0x246a3
jmp 0x255a4
leaq 0x2c9e5f(%rip), %rax # 0x2ef468
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x255b5
leaq 0x2c9e4d(%rip), %rax # 0x2ef468
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x255d7
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x24f88
|
_ZN10Apc_target7disableEv:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov rdi, [rdi]
cmp qword ptr [rdi+40h], 0
jnz short loc_255EF
call _pthread_mutex_lock
loc_255A4:
dec dword ptr [rbx+8]
jz short loc_255C7
mov rbx, [rbx]
mov rdi, [rbx+40h]
test rdi, rdi
jnz short loc_25602
loc_255B5:
mov rdi, rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp _pthread_mutex_unlock
loc_255C7:
mov r14, [rbx]
mov r15, [rbx+10h]
mov rdi, [r14+40h]
test rdi, rdi
jnz short loc_25614
loc_255D7:
mov rdi, r14
call _pthread_mutex_unlock
test r15, r15
jnz short loc_25626
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_255EF:
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 45h ; 'E'
call psi_mutex_lock
jmp short loc_255A4
loc_25602:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_255B5
loc_25614:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_255D7
loc_25626:
mov rdi, rbx; this
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp _ZN10Apc_target20process_apc_requestsEv; Apc_target::process_apc_requests(void)
|
long long Apc_target::disable(Apc_target *this)
{
long long v2; // rdi
long long v4; // rbx
long long v5; // rdi
long long result; // rax
long long v7; // r14
long long v8; // r15
long long v9; // rdi
v2 = *(_QWORD *)this;
if ( *(_QWORD *)(v2 + 64) )
psi_mutex_lock(v2, (long long)"/workspace/llm4binary/github2025/eloqsql/include/../sql/my_apc.h", 0x45u);
else
pthread_mutex_lock(v2);
if ( (*((_DWORD *)this + 2))-- == 1 )
{
v7 = *(_QWORD *)this;
v8 = *((_QWORD *)this + 2);
v9 = *(_QWORD *)(*(_QWORD *)this + 64LL);
if ( v9 )
((void ( *)(long long))PSI_server[44])(v9);
result = pthread_mutex_unlock(v7);
if ( v8 )
return Apc_target::process_apc_requests(this);
}
else
{
v4 = *(_QWORD *)this;
v5 = *(_QWORD *)(v4 + 64);
if ( v5 )
((void ( *)(long long))PSI_server[44])(v5);
return pthread_mutex_unlock(v4);
}
return result;
}
|
disable:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RDI,qword ptr [RDI]
CMP qword ptr [RDI + 0x40],0x0
JNZ 0x001255ef
CALL 0x00124480
LAB_001255a4:
DEC dword ptr [RBX + 0x8]
JZ 0x001255c7
MOV RBX,qword ptr [RBX]
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JNZ 0x00125602
LAB_001255b5:
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00124210
LAB_001255c7:
MOV R14,qword ptr [RBX]
MOV R15,qword ptr [RBX + 0x10]
MOV RDI,qword ptr [R14 + 0x40]
TEST RDI,RDI
JNZ 0x00125614
LAB_001255d7:
MOV RDI,R14
CALL 0x00124210
TEST R15,R15
JNZ 0x00125626
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001255ef:
LEA RSI,[0x15c334]
MOV EDX,0x45
CALL 0x001246a3
JMP 0x001255a4
LAB_00125602:
LEA RAX,[0x3ef468]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001255b5
LAB_00125614:
LEA RAX,[0x3ef468]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001255d7
LAB_00125626:
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00124f88
|
/* Apc_target::disable() */
void __thiscall Apc_target::disable(Apc_target *this)
{
Apc_target *pAVar1;
pthread_mutex_t *ppVar2;
long lVar3;
ppVar2 = *(pthread_mutex_t **)this;
if (*(long *)((long)ppVar2 + 0x40) == 0) {
pthread_mutex_lock(ppVar2);
}
else {
psi_mutex_lock(ppVar2,"/workspace/llm4binary/github2025/eloqsql/include/../sql/my_apc.h",0x45);
}
pAVar1 = this + 8;
*(int *)pAVar1 = *(int *)pAVar1 + -1;
if (*(int *)pAVar1 != 0) {
ppVar2 = *(pthread_mutex_t **)this;
if (*(long *)((long)ppVar2 + 0x40) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(ppVar2);
return;
}
ppVar2 = *(pthread_mutex_t **)this;
lVar3 = *(long *)(this + 0x10);
if (*(long *)((long)ppVar2 + 0x40) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(ppVar2);
if (lVar3 == 0) {
return;
}
process_apc_requests(this);
return;
}
|
|
61,084
|
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
|
monkey531[P]llama/common/minja.hpp
|
Value do_evaluate(const std::shared_ptr<Context> & context) const override {
if (!left) throw std::runtime_error("BinaryOpExpr.left is null");
if (!right) throw std::runtime_error("BinaryOpExpr.right is null");
auto l = left->evaluate(context);
auto do_eval = [&](const Value & l) -> Value {
if (op == Op::Is || op == Op::IsNot) {
auto t = dynamic_cast<VariableExpr*>(right.get());
if (!t) throw std::runtime_error("Right side of 'is' operator must be a variable");
auto eval = [&]() {
const auto & name = t->get_name();
if (name == "none") return l.is_null();
if (name == "boolean") return l.is_boolean();
if (name == "integer") return l.is_number_integer();
if (name == "float") return l.is_number_float();
if (name == "number") return l.is_number();
if (name == "string") return l.is_string();
if (name == "mapping") return l.is_object();
if (name == "iterable") return l.is_iterable();
if (name == "sequence") return l.is_array();
if (name == "defined") return !l.is_null();
throw std::runtime_error("Unknown type for 'is' operator: " + name);
};
auto value = eval();
return Value(op == Op::Is ? value : !value);
}
if (op == Op::And) {
if (!l.to_bool()) return Value(false);
return right->evaluate(context).to_bool();
} else if (op == Op::Or) {
if (l.to_bool()) return l;
return right->evaluate(context);
}
auto r = right->evaluate(context);
switch (op) {
case Op::StrConcat: return l.to_str() + r.to_str();
case Op::Add: return l + r;
case Op::Sub: return l - r;
case Op::Mul: return l * r;
case Op::Div: return l / r;
case Op::MulMul: return std::pow(l.get<double>(), r.get<double>());
case Op::DivDiv: return l.get<int64_t>() / r.get<int64_t>();
case Op::Mod: return l.get<int64_t>() % r.get<int64_t>();
case Op::Eq: return l == r;
case Op::Ne: return l != r;
case Op::Lt: return l < r;
case Op::Gt: return l > r;
case Op::Le: return l <= r;
case Op::Ge: return l >= r;
case Op::In: return (r.is_array() || r.is_object()) && r.contains(l);
case Op::NotIn: return !(r.is_array() && r.contains(l));
default: break;
}
throw std::runtime_error("Unknown binary operator");
};
if (l.is_callable()) {
return Value::callable([l, do_eval](const std::shared_ptr<Context> & context, ArgumentsValue & args) {
auto ll = l.call(context, args);
return do_eval(ll); //args[0].second);
});
} else {
return do_eval(l);
}
}
|
O0
|
cpp
|
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
subq $0x138, %rsp # imm = 0x138
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x130(%rsp)
movq %rsi, 0x128(%rsp)
movq %rdx, 0x120(%rsp)
movq 0x128(%rsp), %rdi
movq %rdi, 0x20(%rsp)
addq $0x20, %rdi
callq 0x109d40
testb $0x1, %al
jne 0x138564
movl $0x10, %edi
callq 0x59660
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x8(%rsp)
leaq 0xd6b05(%rip), %rsi # 0x20f027
callq 0x59450
jmp 0x138529
movq 0x8(%rsp), %rdi
movq 0x167a7b(%rip), %rsi # 0x29ffb0
movq 0x167a3c(%rip), %rdx # 0x29ff78
callq 0x59ac0
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
callq 0x59f20
jmp 0x138741
movq 0x20(%rsp), %rdi
addq $0x30, %rdi
callq 0x109d40
testb $0x1, %al
jne 0x1385d1
movl $0x10, %edi
callq 0x59660
movq %rax, %rdi
movq %rdi, %rax
movq %rax, (%rsp)
leaq 0xd6ab0(%rip), %rsi # 0x20f041
callq 0x59450
jmp 0x138598
movq (%rsp), %rdi
movq 0x167a0d(%rip), %rsi # 0x29ffb0
movq 0x1679ce(%rip), %rdx # 0x29ff78
callq 0x59ac0
movq (%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
callq 0x59f20
jmp 0x138741
movq 0x20(%rsp), %rdi
addq $0x20, %rdi
callq 0x10fe70
movq %rax, %rsi
movq 0x120(%rsp), %rdx
leaq 0xc0(%rsp), %rdi
callq 0x10fe80
movq 0x20(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0x120(%rsp), %rax
movq %rax, 0xb8(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x12fac0
testb $0x1, %al
jne 0x13862a
jmp 0x1386f6
leaq 0x30(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x11fbf0
jmp 0x13863e
movups 0xb0(%rsp), %xmm0
movups %xmm0, 0x80(%rsp)
leaq 0x90(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x138850
jmp 0x138662
movq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x1387d0
jmp 0x138676
leaq 0x90(%rsp), %rdi
callq 0x138900
leaq 0x30(%rsp), %rdi
callq 0x138910
movl $0x1, 0x2c(%rsp)
jmp 0x13871a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
jmp 0x138734
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
jmp 0x1386ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x138900
leaq 0x30(%rsp), %rdi
callq 0x138910
jmp 0x138734
movq 0x10(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
leaq 0xc0(%rsp), %rdx
callq 0x138920
jmp 0x138712
movl $0x1, 0x2c(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x110320
movq 0x18(%rsp), %rax
addq $0x138, %rsp # imm = 0x138
retq
leaq 0xc0(%rsp), %rdi
callq 0x110320
movq 0x118(%rsp), %rdi
callq 0x59b80
nop
|
_ZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
sub rsp, 138h
mov [rsp+138h+var_128], rdi
mov rax, rdi
mov [rsp+138h+var_120], rax
mov [rsp+138h+var_8], rdi
mov [rsp+138h+var_10], rsi
mov [rsp+138h+var_18], rdx
mov rdi, [rsp+138h+var_10]
mov [rsp+138h+var_118], rdi
add rdi, 20h ; ' '
call _ZNKSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(void)
test al, 1
jnz short loc_138564
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+138h+var_130], rax
lea rsi, aBinaryopexprLe; "BinaryOpExpr.left is null"
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_138529:
mov rdi, [rsp+138h+var_130]; void *
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
mov rdi, [rsp+138h+var_130]; void *
mov rcx, rax
mov eax, edx
mov [rsp+138h+var_20], rcx
mov [rsp+138h+var_24], eax
call ___cxa_free_exception
jmp loc_138741
loc_138564:
mov rdi, [rsp+138h+var_118]
add rdi, 30h ; '0'
call _ZNKSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(void)
test al, 1
jnz short loc_1385D1
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+138h+var_138], rax
lea rsi, aBinaryopexprRi; "BinaryOpExpr.right is null"
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_138598:
mov rdi, [rsp+138h+var_138]; void *
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
mov rdi, [rsp+138h+var_138]; void *
mov rcx, rax
mov eax, edx
mov [rsp+138h+var_20], rcx
mov [rsp+138h+var_24], eax
call ___cxa_free_exception
jmp loc_138741
loc_1385D1:
mov rdi, [rsp+138h+var_118]
add rdi, 20h ; ' '
call _ZNKSt19__shared_ptr_accessIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rsi, rax
mov rdx, [rsp+138h+var_18]
lea rdi, [rsp+138h+var_78]
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov rax, [rsp+138h+var_118]
mov qword ptr [rsp+138h+var_88], rax
mov rax, [rsp+138h+var_18]
mov qword ptr [rsp+138h+var_88+8], rax
lea rdi, [rsp+138h+var_78]; this
call _ZNK5minja5Value11is_callableEv; minja::Value::is_callable(void)
test al, 1
jnz short loc_13862A
jmp loc_1386F6
loc_13862A:
lea rdi, [rsp+138h+var_108]; this
lea rsi, [rsp+138h+var_78]; minja::Value *
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
jmp short $+2
loc_13863E:
movups xmm0, [rsp+138h+var_88]
movups [rsp+138h+var_B8], xmm0
lea rdi, [rsp+138h+var_A8]
lea rsi, [rsp+138h+var_108]
call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEC2IZNKS0_12BinaryOpExpr11do_evaluateES6_EUlS6_S8_E_vEEOT_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1},void>(minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1} &&)
jmp short $+2
loc_138662:
mov rdi, [rsp+138h+var_128]
lea rsi, [rsp+138h+var_A8]
call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&)
jmp short $+2
loc_138676:
lea rdi, [rsp+138h+var_A8]
call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEED2Ev; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::~function()
lea rdi, [rsp+138h+var_108]
call _ZZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEEENUlS5_RNS_14ArgumentsValueEE_D2Ev; minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1}::~ArgumentsValue()
mov [rsp+138h+var_10C], 1
jmp loc_13871A
mov rcx, rax
mov eax, edx
mov [rsp+138h+var_20], rcx
mov [rsp+138h+var_24], eax
jmp loc_138734
mov rcx, rax
mov eax, edx
mov [rsp+138h+var_20], rcx
mov [rsp+138h+var_24], eax
jmp short loc_1386EA
mov rcx, rax
mov eax, edx
mov [rsp+138h+var_20], rcx
mov [rsp+138h+var_24], eax
lea rdi, [rsp+138h+var_A8]
call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEED2Ev; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::~function()
loc_1386EA:
lea rdi, [rsp+138h+var_108]
call _ZZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEEENUlS5_RNS_14ArgumentsValueEE_D2Ev; minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1}::~ArgumentsValue()
jmp short loc_138734
loc_1386F6:
mov rdi, [rsp+138h+var_128]
lea rsi, [rsp+138h+var_88]
lea rdx, [rsp+138h+var_78]
call _ZZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEEENKUlRKNS_5ValueEE_clES8_; minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1}::operator()(minja::Value const&)
jmp short $+2
loc_138712:
mov [rsp+138h+var_10C], 1
loc_13871A:
lea rdi, [rsp+138h+var_78]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rax, [rsp+138h+var_120]
add rsp, 138h
retn
loc_138734:
lea rdi, [rsp+138h+var_78]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_138741:
mov rdi, [rsp+138h+var_20]
call __Unwind_Resume
|
long long minja::BinaryOpExpr::do_evaluate(long long a1, long long a2, long long a3)
{
void (***v3)(void); // rax
int v4; // edx
int v5; // ecx
int v6; // r8d
int v7; // r9d
int v8; // edx
int v9; // ecx
int v10; // r8d
int v11; // r9d
std::runtime_error *v13; // [rsp+0h] [rbp-138h]
std::runtime_error *exception; // [rsp+8h] [rbp-130h]
_BYTE v15[80]; // [rsp+30h] [rbp-108h] BYREF
__int128 v16; // [rsp+80h] [rbp-B8h]
_BYTE v17[32]; // [rsp+90h] [rbp-A8h] BYREF
__int128 v18; // [rsp+B0h] [rbp-88h]
_BYTE v19[84]; // [rsp+C0h] [rbp-78h] BYREF
long long v20; // [rsp+120h] [rbp-18h]
long long v21; // [rsp+128h] [rbp-10h]
long long v22; // [rsp+130h] [rbp-8h]
v22 = a1;
v21 = a2;
v20 = a3;
if ( !std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool((_QWORD *)(a2 + 32)) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "BinaryOpExpr.left is null");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( !std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool((_QWORD *)(a2 + 48)) )
{
v13 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v13, "BinaryOpExpr.right is null");
__cxa_throw(
v13,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v3 = (void (***)(void))std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a2 + 32);
minja::Expression::evaluate((long long)v19, v3);
*(_QWORD *)&v18 = a2;
*((_QWORD *)&v18 + 1) = v20;
if ( minja::Value::is_callable((minja::Value *)v19) )
{
minja::Value::Value((minja::Value *)v15, (const minja::Value *)v19);
v16 = v18;
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1},void>(
(unsigned int)v17,
(unsigned int)v15,
v4,
v5,
v6,
v7);
minja::Value::callable(a1, (unsigned int)v17, v8, v9, v10, v11);
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::~function(v17);
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)const::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1}::~ArgumentsValue(v15);
}
else
{
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)const::{lambda(minja::Value const&)#1}::operator()(a1);
}
minja::Value::~Value((minja::Value *)v19);
return a1;
}
| |||
61,085
|
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
|
monkey531[P]llama/common/minja.hpp
|
Value do_evaluate(const std::shared_ptr<Context> & context) const override {
if (!left) throw std::runtime_error("BinaryOpExpr.left is null");
if (!right) throw std::runtime_error("BinaryOpExpr.right is null");
auto l = left->evaluate(context);
auto do_eval = [&](const Value & l) -> Value {
if (op == Op::Is || op == Op::IsNot) {
auto t = dynamic_cast<VariableExpr*>(right.get());
if (!t) throw std::runtime_error("Right side of 'is' operator must be a variable");
auto eval = [&]() {
const auto & name = t->get_name();
if (name == "none") return l.is_null();
if (name == "boolean") return l.is_boolean();
if (name == "integer") return l.is_number_integer();
if (name == "float") return l.is_number_float();
if (name == "number") return l.is_number();
if (name == "string") return l.is_string();
if (name == "mapping") return l.is_object();
if (name == "iterable") return l.is_iterable();
if (name == "sequence") return l.is_array();
if (name == "defined") return !l.is_null();
throw std::runtime_error("Unknown type for 'is' operator: " + name);
};
auto value = eval();
return Value(op == Op::Is ? value : !value);
}
if (op == Op::And) {
if (!l.to_bool()) return Value(false);
return right->evaluate(context).to_bool();
} else if (op == Op::Or) {
if (l.to_bool()) return l;
return right->evaluate(context);
}
auto r = right->evaluate(context);
switch (op) {
case Op::StrConcat: return l.to_str() + r.to_str();
case Op::Add: return l + r;
case Op::Sub: return l - r;
case Op::Mul: return l * r;
case Op::Div: return l / r;
case Op::MulMul: return std::pow(l.get<double>(), r.get<double>());
case Op::DivDiv: return l.get<int64_t>() / r.get<int64_t>();
case Op::Mod: return l.get<int64_t>() % r.get<int64_t>();
case Op::Eq: return l == r;
case Op::Ne: return l != r;
case Op::Lt: return l < r;
case Op::Gt: return l > r;
case Op::Le: return l <= r;
case Op::Ge: return l >= r;
case Op::In: return (r.is_array() || r.is_object()) && r.contains(l);
case Op::NotIn: return !(r.is_array() && r.contains(l));
default: break;
}
throw std::runtime_error("Unknown binary operator");
};
if (l.is_callable()) {
return Value::callable([l, do_eval](const std::shared_ptr<Context> & context, ArgumentsValue & args) {
auto ll = l.call(context, args);
return do_eval(ll); //args[0].second);
});
} else {
return do_eval(l);
}
}
|
O1
|
cpp
|
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rsi, %r15
movq 0x20(%rsi), %rsi
testq %rsi, %rsi
je 0x95445
cmpq $0x0, 0x30(%r15)
je 0x95463
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x38(%rsp), %r12
movq %r12, %rdi
callq 0x855be
movq %r15, 0x8(%rsp)
movq %r14, 0x10(%rsp)
cmpq $0x0, 0x30(%r12)
je 0x95391
leaq 0x88(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x8d0cc
movups 0x8(%rsp), %xmm0
leaq 0x88(%rsp), %rsi
movups %xmm0, 0x50(%rsi)
leaq 0x18(%rsp), %rdi
callq 0x95608
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x9559c
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x95321
leaq 0x18(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0xc8(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x56f38
movq %r14, %rdi
callq 0x5c724
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x95349
callq 0x6c090
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x9535b
callq 0x6c090
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0x9536d
callq 0x6c090
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x953ba
movq 0x96bff(%rip), %rax # 0x12bf80
cmpb $0x0, (%rax)
je 0x953a5
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x953af
leaq 0x8(%rsp), %rsi
leaq 0x38(%rsp), %rdx
movq %rbx, %rdi
callq 0x956f2
jmp 0x953ba
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x953ba
movq (%rdi), %rax
callq *0x18(%rax)
leaq 0x78(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x56f38
movq %r14, %rdi
callq 0x5c724
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x953df
callq 0x6c090
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x953ee
callq 0x6c090
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x953fd
callq 0x6c090
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x95433
movq 0x96b72(%rip), %rax # 0x12bf80
cmpb $0x0, (%rax)
je 0x9541e
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x95428
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x95433
movq (%rdi), %rax
callq *0x18(%rax)
movq %rbx, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x1a430
movq %rax, %r14
leaq 0x5c207(%rip), %rsi # 0xf1660
movq %rax, %rdi
callq 0x1a310
jmp 0x9547f
movl $0x10, %edi
callq 0x1a430
movq %rax, %r14
leaq 0x5c203(%rip), %rsi # 0xf167a
movq %rax, %rdi
callq 0x1a310
movq 0x96b62(%rip), %rsi # 0x12bfe8
movq 0x96acb(%rip), %rdx # 0x12bf58
movq %r14, %rdi
callq 0x1aea0
jmp 0x954e0
jmp 0x954c6
jmp 0x9549b
movq %rax, %rbx
movq %r14, %rdi
callq 0x1a640
jmp 0x954ed
movq %rax, %rbx
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x954d1
leaq 0x18(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x954d1
movq %rax, %rdi
callq 0x20749
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x95666
jmp 0x954e3
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x858b4
movq %rbx, %rdi
callq 0x1af20
nop
|
_ZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
push r15
push r14
push r12
push rbx
sub rsp, 0E8h
mov r15, rsi
mov rsi, [rsi+20h]
test rsi, rsi
jz loc_95445
cmp qword ptr [r15+30h], 0
jz loc_95463
mov r14, rdx
mov rbx, rdi
lea r12, [rsp+108h+var_D0]
mov rdi, r12
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov qword ptr [rsp+108h+var_100], r15
mov qword ptr [rsp+108h+var_100+8], r14
cmp qword ptr [r12+30h], 0
jz loc_95391
lea rdi, [rsp+108h+var_80]; this
lea rsi, [rsp+108h+var_D0]; minja::Value *
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
movups xmm0, [rsp+108h+var_100]
lea rsi, [rsp+108h+var_80]
movups xmmword ptr [rsi+50h], xmm0
lea rdi, [rsp+108h+var_F0]
call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEC2IZNKS0_12BinaryOpExpr11do_evaluateES6_EUlS6_S8_E_vEEOT_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1},void>(minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1} &&)
lea rsi, [rsp+108h+var_F0]
mov rdi, rbx
call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&)
mov rax, [rsp+108h+var_E0]
test rax, rax
jz short loc_95321
lea rdi, [rsp+108h+var_F0]
mov rsi, rdi
mov edx, 3
call rax
loc_95321:
lea r14, [rsp+108h+var_40]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [r14-8]
test rdi, rdi
jz short loc_95349
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_95349:
mov rdi, [rsp+108h+var_58]
test rdi, rdi
jz short loc_9535B
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9535B:
mov rdi, [rsp+108h+var_68]
test rdi, rdi
jz short loc_9536D
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9536D:
mov rdi, [rsp+108h+var_78]
test rdi, rdi
jz short loc_953BA
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_953A5
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_953AF
loc_95391:
lea rsi, [rsp+108h+var_100]
lea rdx, [rsp+108h+var_D0]
mov rdi, rbx; this
call _ZZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEEENKUlRKNS_5ValueEE_clES8_; minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1}::operator()(minja::Value const&)
jmp short loc_953BA
loc_953A5:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_953AF:
cmp eax, 1
jnz short loc_953BA
mov rax, [rdi]
call qword ptr [rax+18h]
loc_953BA:
lea r14, [rsp+108h+var_90]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [r14-8]
test rdi, rdi
jz short loc_953DF
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_953DF:
mov rdi, [rsp+108h+var_A8]
test rdi, rdi
jz short loc_953EE
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_953EE:
mov rdi, [rsp+108h+var_B8]
test rdi, rdi
jz short loc_953FD
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_953FD:
mov rdi, [rsp+108h+var_C8]
test rdi, rdi
jz short loc_95433
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_9541E
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_95428
loc_9541E:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_95428:
cmp eax, 1
jnz short loc_95433
mov rax, [rdi]
call qword ptr [rax+18h]
loc_95433:
mov rax, rbx
add rsp, 0E8h
pop rbx
pop r12
pop r14
pop r15
retn
loc_95445:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aBinaryopexprLe; "BinaryOpExpr.left is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_9547F
loc_95463:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aBinaryopexprRi; "BinaryOpExpr.right is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_9547F:
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_954E0
jmp short loc_954C6
jmp short $+2
loc_9549B:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_954ED
mov rbx, rax
mov rax, [rsp+108h+var_E0]
test rax, rax
jz short loc_954D1
lea rdi, [rsp+108h+var_F0]
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_954D1
loc_954C6:
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
loc_954D1:
lea rdi, [rsp+108h+var_80]
call _ZZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEEENUlS5_RNS_14ArgumentsValueEE_D2Ev; minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1}::~ArgumentsValue()
jmp short loc_954E3
loc_954E0:
mov rbx, rax
loc_954E3:
lea rdi, [rsp+108h+var_D0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_954ED:
mov rdi, rbx
call __Unwind_Resume
|
minja::Value * minja::BinaryOpExpr::do_evaluate(minja::Value *this, long long a2, long long a3)
{
void (***v4)(void); // rsi
int v7; // edx
int v8; // ecx
int v9; // r8d
int v10; // r9d
long long v11; // rdi
signed __int32 v12; // eax
long long v13; // rdi
signed __int32 v14; // eax
std::runtime_error *exception; // r14
__int128 v17; // [rsp+8h] [rbp-100h]
_BYTE v18[16]; // [rsp+18h] [rbp-F0h] BYREF
void ( *v19)(_BYTE *, _BYTE *, long long); // [rsp+28h] [rbp-E0h]
_BYTE v20[8]; // [rsp+38h] [rbp-D0h] BYREF
long long v21; // [rsp+40h] [rbp-C8h]
volatile signed __int32 *v22; // [rsp+50h] [rbp-B8h]
volatile signed __int32 *v23; // [rsp+60h] [rbp-A8h]
long long v24; // [rsp+68h] [rbp-A0h]
volatile signed __int32 *v25; // [rsp+70h] [rbp-98h]
char v26[16]; // [rsp+78h] [rbp-90h] BYREF
_BYTE v27[8]; // [rsp+88h] [rbp-80h] BYREF
long long v28; // [rsp+90h] [rbp-78h]
volatile signed __int32 *v29; // [rsp+A0h] [rbp-68h]
volatile signed __int32 *v30; // [rsp+B0h] [rbp-58h]
volatile signed __int32 *v31; // [rsp+C0h] [rbp-48h]
char v32[16]; // [rsp+C8h] [rbp-40h] BYREF
__int128 v33; // [rsp+D8h] [rbp-30h]
v4 = *(void (****)(void))(a2 + 32);
if ( !v4 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "BinaryOpExpr.left is null");
goto LABEL_34;
}
if ( !*(_QWORD *)(a2 + 48) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "BinaryOpExpr.right is null");
LABEL_34:
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)v20, v4);
*(_QWORD *)&v17 = a2;
*((_QWORD *)&v17 + 1) = a3;
if ( v24 )
{
minja::Value::Value((minja::Value *)v27, (const minja::Value *)v20);
v33 = v17;
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1},void>(v18);
minja::Value::callable((_DWORD)this, (unsigned int)v18, v7, v8, v9, v10);
if ( v19 )
v19(v18, v18, 3LL);
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(v32);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v32);
if ( v31 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v31);
if ( v30 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v30);
if ( v29 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v29);
v11 = v28;
if ( v28 )
{
if ( _libc_single_threaded )
{
v12 = *(_DWORD *)(v28 + 12);
*(_DWORD *)(v28 + 12) = v12 - 1;
}
else
{
v12 = _InterlockedExchangeAdd((volatile signed __int32 *)(v28 + 12), 0xFFFFFFFF);
}
if ( v12 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v11 + 24LL))(v11, 0LL);
}
}
else
{
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)const::{lambda(minja::Value const&)#1}::operator()(this);
}
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(v26);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v26);
if ( v25 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v25);
if ( v23 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v23);
if ( v22 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v22);
v13 = v21;
if ( v21 )
{
if ( _libc_single_threaded )
{
v14 = *(_DWORD *)(v21 + 12);
*(_DWORD *)(v21 + 12) = v14 - 1;
}
else
{
v14 = _InterlockedExchangeAdd((volatile signed __int32 *)(v21 + 12), 0xFFFFFFFF);
}
if ( v14 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v13 + 24LL))(v13, 0LL);
}
return this;
}
|
do_evaluate:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV R15,RSI
MOV RSI,qword ptr [RSI + 0x20]
TEST RSI,RSI
JZ 0x00195445
CMP qword ptr [R15 + 0x30],0x0
JZ 0x00195463
MOV R14,RDX
MOV RBX,RDI
LEA R12,[RSP + 0x38]
MOV RDI,R12
CALL 0x001855be
MOV qword ptr [RSP + 0x8],R15
MOV qword ptr [RSP + 0x10],R14
CMP qword ptr [R12 + 0x30],0x0
JZ 0x00195391
LAB_001952ce:
LEA RDI,[RSP + 0x88]
LEA RSI,[RSP + 0x38]
CALL 0x0018d0cc
MOVUPS XMM0,xmmword ptr [RSP + 0x8]
LEA RSI,[RSP + 0x88]
MOVUPS xmmword ptr [RSI + 0x50],XMM0
LAB_001952f1:
LEA RDI,[RSP + 0x18]
CALL 0x00195608
LAB_001952fb:
LEA RSI,[RSP + 0x18]
MOV RDI,RBX
CALL 0x0019559c
MOV RAX,qword ptr [RSP + 0x28]
TEST RAX,RAX
JZ 0x00195321
LAB_00195312:
LEA RDI,[RSP + 0x18]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_00195321:
LEA R14,[RSP + 0xc8]
MOV RDI,R14
XOR ESI,ESI
CALL 0x00156f38
MOV RDI,R14
CALL 0x0015c724
MOV RDI,qword ptr [R14 + -0x8]
TEST RDI,RDI
JZ 0x00195349
CALL 0x0016c090
LAB_00195349:
MOV RDI,qword ptr [RSP + 0xb0]
TEST RDI,RDI
JZ 0x0019535b
CALL 0x0016c090
LAB_0019535b:
MOV RDI,qword ptr [RSP + 0xa0]
TEST RDI,RDI
JZ 0x0019536d
CALL 0x0016c090
LAB_0019536d:
MOV RDI,qword ptr [RSP + 0x90]
TEST RDI,RDI
JZ 0x001953ba
MOV RAX,qword ptr [0x0022bf80]
CMP byte ptr [RAX],0x0
JZ 0x001953a5
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001953af
LAB_00195391:
LEA RSI,[RSP + 0x8]
LEA RDX,[RSP + 0x38]
MOV RDI,RBX
CALL 0x001956f2
LAB_001953a3:
JMP 0x001953ba
LAB_001953a5:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001953af:
CMP EAX,0x1
JNZ 0x001953ba
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001953ba:
LEA R14,[RSP + 0x78]
MOV RDI,R14
XOR ESI,ESI
CALL 0x00156f38
MOV RDI,R14
CALL 0x0015c724
MOV RDI,qword ptr [R14 + -0x8]
TEST RDI,RDI
JZ 0x001953df
CALL 0x0016c090
LAB_001953df:
MOV RDI,qword ptr [RSP + 0x60]
TEST RDI,RDI
JZ 0x001953ee
CALL 0x0016c090
LAB_001953ee:
MOV RDI,qword ptr [RSP + 0x50]
TEST RDI,RDI
JZ 0x001953fd
CALL 0x0016c090
LAB_001953fd:
MOV RDI,qword ptr [RSP + 0x40]
TEST RDI,RDI
JZ 0x00195433
MOV RAX,qword ptr [0x0022bf80]
CMP byte ptr [RAX],0x0
JZ 0x0019541e
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x00195428
LAB_0019541e:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_00195428:
CMP EAX,0x1
JNZ 0x00195433
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_00195433:
MOV RAX,RBX
ADD RSP,0xe8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_00195445:
MOV EDI,0x10
CALL 0x0011a430
MOV R14,RAX
LAB_00195452:
LEA RSI,[0x1f1660]
MOV RDI,RAX
CALL 0x0011a310
LAB_00195461:
JMP 0x0019547f
LAB_00195463:
MOV EDI,0x10
CALL 0x0011a430
MOV R14,RAX
LAB_00195470:
LEA RSI,[0x1f167a]
MOV RDI,RAX
CALL 0x0011a310
LAB_0019547f:
MOV RSI,qword ptr [0x0022bfe8]
MOV RDX,qword ptr [0x0022bf58]
MOV RDI,R14
CALL 0x0011aea0
|
/* minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */
shared_ptr * minja::BinaryOpExpr::do_evaluate(shared_ptr *param_1)
{
int *piVar1;
int iVar2;
runtime_error *this;
int8 in_RDX;
long in_RSI;
long local_100;
int8 uStack_f8;
_lambda_std__shared_ptr<minja::Context>_const__minja__ArgumentsValue___1_ local_f0 [16];
code *local_e0;
Expression local_d0 [8];
long *local_c8;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_b8;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_a8;
long local_a0;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_98;
data local_90 [16];
Value local_80 [8];
long *local_78;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48;
data local_40 [16];
long local_30;
int8 uStack_28;
if (*(shared_ptr **)(in_RSI + 0x20) == (shared_ptr *)0x0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00195452 to 00195460 has its CatchHandler @ 0019549b */
std::runtime_error::runtime_error(this,"BinaryOpExpr.left is null");
}
else {
if (*(long *)(in_RSI + 0x30) != 0) {
Expression::evaluate(local_d0,*(shared_ptr **)(in_RSI + 0x20));
if (local_a0 == 0) {
/* try { // try from 00195391 to 001953a2 has its CatchHandler @ 00195495 */
const::{lambda(minja::Value_const&)#1}::operator()
((_lambda_minja__Value_const___1_ *)param_1,(Value *)&local_100);
}
else {
/* try { // try from 001952ce to 001952df has its CatchHandler @ 001954e0 */
local_100 = in_RSI;
uStack_f8 = in_RDX;
Value::Value(local_80,(Value *)local_d0);
local_30 = local_100;
uStack_28 = uStack_f8;
/* try { // try from 001952f1 to 001952fa has its CatchHandler @ 001954ce */
std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>::
function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context>const&)const::_lambda(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)_1_,void>
(local_f0);
/* try { // try from 001952fb to 00195307 has its CatchHandler @ 001954a8 */
Value::callable((Value *)param_1,local_f0);
if (local_e0 != (code *)0x0) {
/* try { // try from 00195312 to 00195320 has its CatchHandler @ 00195497 */
(*local_e0)(local_f0,local_f0,3);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_40,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_40);
if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48);
}
if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58);
}
if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68);
}
if (local_78 != (long *)0x0) {
if (*PTR___libc_single_threaded_0022bf80 == '\0') {
LOCK();
piVar1 = (int *)((long)local_78 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)local_78 + 0xc);
*(int *)((long)local_78 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*local_78 + 0x18))();
}
}
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_90,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_90);
if (local_98 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_98);
}
if (local_a8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_a8);
}
if (local_b8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_b8);
}
if (local_c8 != (long *)0x0) {
if (*PTR___libc_single_threaded_0022bf80 == '\0') {
LOCK();
piVar1 = (int *)((long)local_c8 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)local_c8 + 0xc);
*(int *)((long)local_c8 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*local_c8 + 0x18))();
}
}
return param_1;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00195470 to 0019547e has its CatchHandler @ 00195499 */
std::runtime_error::runtime_error(this,"BinaryOpExpr.right is null");
}
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_0022bfe8,PTR__runtime_error_0022bf58);
}
|
|
61,086
|
lre_case_conv
|
bluesky950520[P]quickjs/libunicode.c
|
int lre_case_conv(uint32_t *res, uint32_t c, int conv_type)
{
if (c < 128) {
if (conv_type) {
if (c >= 'A' && c <= 'Z') {
c = c - 'A' + 'a';
}
} else {
if (c >= 'a' && c <= 'z') {
c = c - 'a' + 'A';
}
}
} else {
uint32_t v, code, len;
int idx, idx_min, idx_max;
idx_min = 0;
idx_max = countof(case_conv_table1) - 1;
while (idx_min <= idx_max) {
idx = (unsigned)(idx_max + idx_min) / 2;
v = case_conv_table1[idx];
code = v >> (32 - 17);
len = (v >> (32 - 17 - 7)) & 0x7f;
if (c < code) {
idx_max = idx - 1;
} else if (c >= code + len) {
idx_min = idx + 1;
} else {
return lre_case_conv_entry(res, c, conv_type, idx, v);
}
}
}
res[0] = c;
return 1;
}
|
O1
|
c
|
lre_case_conv:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
cmpl $0x80, %esi
jae 0x980b6
testl %edx, %edx
je 0x98105
leal -0x41(%r14), %eax
movl %r14d, %ecx
orl $0x20, %ecx
jmp 0x9810d
xorl %ebp, %ebp
movl $0x179, %edi # imm = 0x179
leaq 0xb77c(%rip), %rsi # 0xa3840
xorl %r9d, %r9d
leal (%rdi,%r9), %ecx
shrl %ecx
movl (%rsi,%rcx,4), %r8d
movl %r8d, %eax
shrl $0xf, %eax
cmpl %r14d, %eax
jbe 0x980e2
decl %ecx
movl %ecx, %edi
jmp 0x980fa
movl %r8d, %r9d
shrl $0x8, %r9d
andl $0x7f, %r9d
addl %eax, %r9d
cmpl %r14d, %r9d
ja 0x98119
incl %ecx
movl %ecx, %r9d
cmpl %edi, %r9d
setg %bpl
jle 0x980c7
jmp 0x98124
leal -0x61(%r14), %eax
leal -0x20(%r14), %ecx
cmpl $0x1a, %eax
cmovael %r14d, %ecx
movl %ecx, %r14d
jmp 0x9812a
movq %rbx, %rdi
movl %r14d, %esi
callq 0x98137
testb $0x1, %bpl
je 0x98132
movl %r14d, (%rbx)
movl $0x1, %eax
popq %rbx
popq %r14
popq %rbp
retq
|
lre_case_conv:
push rbp
push r14
push rbx
mov r14d, esi
mov rbx, rdi
cmp esi, 80h
jnb short loc_980B6
test edx, edx
jz short loc_98105
lea eax, [r14-41h]
mov ecx, r14d
or ecx, 20h
jmp short loc_9810D
loc_980B6:
xor ebp, ebp
mov edi, 179h
lea rsi, case_conv_table1
xor r9d, r9d
loc_980C7:
lea ecx, [rdi+r9]
shr ecx, 1
mov r8d, [rsi+rcx*4]
mov eax, r8d
shr eax, 0Fh
cmp eax, r14d
jbe short loc_980E2
dec ecx
mov edi, ecx
jmp short loc_980FA
loc_980E2:
mov r9d, r8d
shr r9d, 8
and r9d, 7Fh
add r9d, eax
cmp r9d, r14d
ja short loc_98119
inc ecx
mov r9d, ecx
loc_980FA:
cmp r9d, edi
setnle bpl
jle short loc_980C7
jmp short loc_98124
loc_98105:
lea eax, [r14-61h]
lea ecx, [r14-20h]
loc_9810D:
cmp eax, 1Ah
cmovnb ecx, r14d
mov r14d, ecx
jmp short loc_9812A
loc_98119:
mov rdi, rbx
mov esi, r14d
call lre_case_conv_entry
loc_98124:
test bpl, 1
jz short loc_98132
loc_9812A:
mov [rbx], r14d
mov eax, 1
loc_98132:
pop rbx
pop r14
pop rbp
retn
|
long long lre_case_conv(unsigned int *a1, unsigned int a2, int a3)
{
unsigned int v3; // r14d
unsigned int v5; // eax
int v6; // ecx
bool v7; // bp
int v8; // edi
int v9; // r9d
long long v10; // rcx
long long result; // rax
v3 = a2;
if ( a2 < 0x80 )
{
if ( a3 )
{
v5 = a2 - 65;
v6 = a2 | 0x20;
}
else
{
v5 = a2 - 97;
v6 = a2 - 32;
}
if ( v5 >= 0x1A )
v6 = a2;
v3 = v6;
goto LABEL_17;
}
v7 = 0;
v8 = 377;
v9 = 0;
while ( 1 )
{
v10 = (unsigned int)(v8 + v9) >> 1;
result = case_conv_table1[v10] >> 15;
if ( (unsigned int)result <= a2 )
break;
v8 = v10 - 1;
LABEL_9:
v7 = v9 > v8;
if ( v9 > v8 )
goto LABEL_16;
}
if ( (unsigned int)result + ((case_conv_table1[v10] >> 8) & 0x7F) <= a2 )
{
v9 = v10 + 1;
goto LABEL_9;
}
result = lre_case_conv_entry(a1, a2);
LABEL_16:
if ( v7 )
{
LABEL_17:
*a1 = v3;
return 1LL;
}
return result;
}
|
lre_case_conv:
PUSH RBP
PUSH R14
PUSH RBX
MOV R14D,ESI
MOV RBX,RDI
CMP ESI,0x80
JNC 0x001980b6
TEST EDX,EDX
JZ 0x00198105
LEA EAX,[R14 + -0x41]
MOV ECX,R14D
OR ECX,0x20
JMP 0x0019810d
LAB_001980b6:
XOR EBP,EBP
MOV EDI,0x179
LEA RSI,[0x1a3840]
XOR R9D,R9D
LAB_001980c7:
LEA ECX,[RDI + R9*0x1]
SHR ECX,0x1
MOV R8D,dword ptr [RSI + RCX*0x4]
MOV EAX,R8D
SHR EAX,0xf
CMP EAX,R14D
JBE 0x001980e2
DEC ECX
MOV EDI,ECX
JMP 0x001980fa
LAB_001980e2:
MOV R9D,R8D
SHR R9D,0x8
AND R9D,0x7f
ADD R9D,EAX
CMP R9D,R14D
JA 0x00198119
INC ECX
MOV R9D,ECX
LAB_001980fa:
CMP R9D,EDI
SETG BPL
JLE 0x001980c7
JMP 0x00198124
LAB_00198105:
LEA EAX,[R14 + -0x61]
LEA ECX,[R14 + -0x20]
LAB_0019810d:
CMP EAX,0x1a
CMOVNC ECX,R14D
MOV R14D,ECX
JMP 0x0019812a
LAB_00198119:
MOV RDI,RBX
MOV ESI,R14D
CALL 0x00198137
LAB_00198124:
TEST BPL,0x1
JZ 0x00198132
LAB_0019812a:
MOV dword ptr [RBX],R14D
MOV EAX,0x1
LAB_00198132:
POP RBX
POP R14
POP RBP
RET
|
ulong lre_case_conv(uint *param_1,uint param_2,int param_3)
{
uint uVar1;
ulong uVar2;
uint uVar3;
int iVar4;
int iVar5;
bool bVar6;
if (param_2 < 0x80) {
if (param_3 == 0) {
uVar1 = param_2 - 0x61;
uVar3 = param_2 - 0x20;
}
else {
uVar1 = param_2 - 0x41;
uVar3 = param_2 | 0x20;
}
if (0x19 < uVar1) {
uVar3 = param_2;
}
}
else {
bVar6 = false;
iVar4 = 0x179;
iVar5 = 0;
do {
uVar1 = (uint)(iVar4 + iVar5) >> 1;
uVar3 = (uint)(&case_conv_table1)[uVar1] >> 0xf;
uVar2 = (ulong)uVar3;
if (param_2 < uVar3) {
iVar4 = uVar1 - 1;
}
else {
if (param_2 < ((uint)(&case_conv_table1)[uVar1] >> 8 & 0x7f) + uVar3) {
uVar2 = lre_case_conv_entry(param_1,param_2);
break;
}
iVar5 = uVar1 + 1;
}
bVar6 = iVar4 < iVar5;
} while (iVar5 <= iVar4);
uVar3 = param_2;
if (!bVar6) {
return uVar2;
}
}
*param_1 = uVar3;
return 1;
}
|
|
61,087
|
lre_case_conv
|
bluesky950520[P]quickjs/libunicode.c
|
int lre_case_conv(uint32_t *res, uint32_t c, int conv_type)
{
if (c < 128) {
if (conv_type) {
if (c >= 'A' && c <= 'Z') {
c = c - 'A' + 'a';
}
} else {
if (c >= 'a' && c <= 'z') {
c = c - 'a' + 'A';
}
}
} else {
uint32_t v, code, len;
int idx, idx_min, idx_max;
idx_min = 0;
idx_max = countof(case_conv_table1) - 1;
while (idx_min <= idx_max) {
idx = (unsigned)(idx_max + idx_min) / 2;
v = case_conv_table1[idx];
code = v >> (32 - 17);
len = (v >> (32 - 17 - 7)) & 0x7f;
if (c < code) {
idx_max = idx - 1;
} else if (c >= code + len) {
idx_min = idx + 1;
} else {
return lre_case_conv_entry(res, c, conv_type, idx, v);
}
}
}
res[0] = c;
return 1;
}
|
O2
|
c
|
lre_case_conv:
cmpl $0x80, %esi
jae 0x7eefe
testl %edx, %edx
je 0x7ef4a
leal -0x41(%rsi), %eax
movl %esi, %ecx
orl $0x20, %ecx
jmp 0x7ef50
movl $0x179, %r9d # imm = 0x179
xorl %r10d, %r10d
leaq 0xb842(%rip), %rax # 0x8a750
cmpl %r9d, %r10d
jg 0x7ef58
leal (%r9,%r10), %ecx
shrl %ecx
movl (%rax,%rcx,4), %r8d
movl %r8d, %r11d
shrl $0xf, %r11d
cmpl %esi, %r11d
jbe 0x7ef30
decl %ecx
movl %ecx, %r9d
jmp 0x7ef0e
movl %r8d, %r10d
shrl $0x8, %r10d
andl $0x7f, %r10d
addl %r11d, %r10d
cmpl %esi, %r10d
ja 0x7ef5e
incl %ecx
movl %ecx, %r10d
jmp 0x7ef0e
leal -0x61(%rsi), %eax
leal -0x20(%rsi), %ecx
cmpl $0x1a, %eax
cmovael %esi, %ecx
movl %ecx, %esi
movl %esi, (%rdi)
pushq $0x1
popq %rax
retq
jmp 0x7ef60
|
lre_case_conv:
cmp esi, 80h
jnb short loc_7EEFE
test edx, edx
jz short loc_7EF4A
lea eax, [rsi-41h]
mov ecx, esi
or ecx, 20h
jmp short loc_7EF50
loc_7EEFE:
mov r9d, 179h
xor r10d, r10d
lea rax, case_conv_table1
loc_7EF0E:
cmp r10d, r9d
jg short loc_7EF58
lea ecx, [r9+r10]
shr ecx, 1
mov r8d, [rax+rcx*4]
mov r11d, r8d
shr r11d, 0Fh
cmp r11d, esi
jbe short loc_7EF30
dec ecx
mov r9d, ecx
jmp short loc_7EF0E
loc_7EF30:
mov r10d, r8d
shr r10d, 8
and r10d, 7Fh
add r10d, r11d
cmp r10d, esi
ja short loc_7EF5E
inc ecx
mov r10d, ecx
jmp short loc_7EF0E
loc_7EF4A:
lea eax, [rsi-61h]
lea ecx, [rsi-20h]
loc_7EF50:
cmp eax, 1Ah
cmovnb ecx, esi
mov esi, ecx
loc_7EF58:
mov [rdi], esi
push 1
pop rax
retn
loc_7EF5E:
jmp short $+2
|
long long lre_case_conv(unsigned int *a1, unsigned int a2, int a3)
{
unsigned int v3; // eax
int v4; // ecx
int v5; // r9d
int v6; // r10d
long long v7; // rcx
unsigned int v8; // r11d
if ( a2 >= 0x80 )
{
v5 = 377;
v6 = 0;
while ( v6 <= v5 )
{
v7 = (unsigned int)(v5 + v6) >> 1;
v8 = case_conv_table1[v7] >> 15;
if ( v8 <= a2 )
{
if ( v8 + ((case_conv_table1[v7] >> 8) & 0x7F) > a2 )
return lre_case_conv_entry();
v6 = v7 + 1;
}
else
{
v5 = v7 - 1;
}
}
}
else
{
if ( a3 )
{
v3 = a2 - 65;
v4 = a2 | 0x20;
}
else
{
v3 = a2 - 97;
v4 = a2 - 32;
}
if ( v3 >= 0x1A )
v4 = a2;
a2 = v4;
}
*a1 = a2;
return 1LL;
}
|
lre_case_conv:
CMP ESI,0x80
JNC 0x0017eefe
TEST EDX,EDX
JZ 0x0017ef4a
LEA EAX,[RSI + -0x41]
MOV ECX,ESI
OR ECX,0x20
JMP 0x0017ef50
LAB_0017eefe:
MOV R9D,0x179
XOR R10D,R10D
LEA RAX,[0x18a750]
LAB_0017ef0e:
CMP R10D,R9D
JG 0x0017ef58
LEA ECX,[R9 + R10*0x1]
SHR ECX,0x1
MOV R8D,dword ptr [RAX + RCX*0x4]
MOV R11D,R8D
SHR R11D,0xf
CMP R11D,ESI
JBE 0x0017ef30
DEC ECX
MOV R9D,ECX
JMP 0x0017ef0e
LAB_0017ef30:
MOV R10D,R8D
SHR R10D,0x8
AND R10D,0x7f
ADD R10D,R11D
CMP R10D,ESI
JA 0x0017ef5e
INC ECX
MOV R10D,ECX
JMP 0x0017ef0e
LAB_0017ef4a:
LEA EAX,[RSI + -0x61]
LEA ECX,[RSI + -0x20]
LAB_0017ef50:
CMP EAX,0x1a
CMOVNC ECX,ESI
MOV ESI,ECX
LAB_0017ef58:
MOV dword ptr [RDI],ESI
PUSH 0x1
POP RAX
RET
LAB_0017ef5e:
JMP 0x0017ef60
|
int8 lre_case_conv(uint *param_1,uint param_2,int param_3)
{
uint uVar1;
int8 uVar2;
uint uVar3;
int iVar4;
int iVar5;
if (param_2 < 0x80) {
if (param_3 == 0) {
uVar1 = param_2 - 0x61;
uVar3 = param_2 - 0x20;
}
else {
uVar1 = param_2 - 0x41;
uVar3 = param_2 | 0x20;
}
if (0x19 < uVar1) {
uVar3 = param_2;
}
}
else {
iVar4 = 0x179;
iVar5 = 0;
while (uVar3 = param_2, iVar5 <= iVar4) {
uVar3 = (uint)(iVar4 + iVar5) >> 1;
uVar1 = (uint)(&case_conv_table1)[uVar3] >> 0xf;
if (param_2 < uVar1) {
iVar4 = uVar3 - 1;
}
else {
if (param_2 < ((uint)(&case_conv_table1)[uVar3] >> 8 & 0x7f) + uVar1) {
uVar2 = lre_case_conv_entry();
return uVar2;
}
iVar5 = uVar3 + 1;
}
}
}
*param_1 = uVar3;
return 1;
}
|
|
61,088
|
lre_case_conv
|
bluesky950520[P]quickjs/libunicode.c
|
int lre_case_conv(uint32_t *res, uint32_t c, int conv_type)
{
if (c < 128) {
if (conv_type) {
if (c >= 'A' && c <= 'Z') {
c = c - 'A' + 'a';
}
} else {
if (c >= 'a' && c <= 'z') {
c = c - 'a' + 'A';
}
}
} else {
uint32_t v, code, len;
int idx, idx_min, idx_max;
idx_min = 0;
idx_max = countof(case_conv_table1) - 1;
while (idx_min <= idx_max) {
idx = (unsigned)(idx_max + idx_min) / 2;
v = case_conv_table1[idx];
code = v >> (32 - 17);
len = (v >> (32 - 17 - 7)) & 0x7f;
if (c < code) {
idx_max = idx - 1;
} else if (c >= code + len) {
idx_min = idx + 1;
} else {
return lre_case_conv_entry(res, c, conv_type, idx, v);
}
}
}
res[0] = c;
return 1;
}
|
O3
|
c
|
lre_case_conv:
cmpl $0x80, %esi
jae 0x9a9d6
testl %edx, %edx
je 0x9aa22
leal -0x41(%rsi), %eax
movl %esi, %ecx
orl $0x20, %ecx
jmp 0x9aa28
xorl %r10d, %r10d
movl $0x179, %r9d # imm = 0x179
leaq 0xbe0a(%rip), %rax # 0xa67f0
leal (%r9,%r10), %ecx
shrl %ecx
movl (%rax,%rcx,4), %r8d
movl %r8d, %r11d
shrl $0xf, %r11d
cmpl %esi, %r11d
jbe 0x9aa03
decl %ecx
movl %ecx, %r9d
jmp 0x9aa1b
movl %r8d, %r10d
shrl $0x8, %r10d
andl $0x7f, %r10d
addl %r11d, %r10d
cmpl %esi, %r10d
ja 0x9aa38
incl %ecx
movl %ecx, %r10d
cmpl %r9d, %r10d
jle 0x9a9e6
jmp 0x9aa30
leal -0x61(%rsi), %eax
leal -0x20(%rsi), %ecx
cmpl $0x1a, %eax
cmovael %esi, %ecx
movl %ecx, %esi
movl %esi, (%rdi)
movl $0x1, %eax
retq
jmp 0x9aa3a
|
lre_case_conv:
cmp esi, 80h
jnb short loc_9A9D6
test edx, edx
jz short loc_9AA22
lea eax, [rsi-41h]
mov ecx, esi
or ecx, 20h
jmp short loc_9AA28
loc_9A9D6:
xor r10d, r10d
mov r9d, 179h
lea rax, case_conv_table1
loc_9A9E6:
lea ecx, [r9+r10]
shr ecx, 1
mov r8d, [rax+rcx*4]
mov r11d, r8d
shr r11d, 0Fh
cmp r11d, esi
jbe short loc_9AA03
dec ecx
mov r9d, ecx
jmp short loc_9AA1B
loc_9AA03:
mov r10d, r8d
shr r10d, 8
and r10d, 7Fh
add r10d, r11d
cmp r10d, esi
ja short loc_9AA38
inc ecx
mov r10d, ecx
loc_9AA1B:
cmp r10d, r9d
jle short loc_9A9E6
jmp short loc_9AA30
loc_9AA22:
lea eax, [rsi-61h]
lea ecx, [rsi-20h]
loc_9AA28:
cmp eax, 1Ah
cmovnb ecx, esi
mov esi, ecx
loc_9AA30:
mov [rdi], esi
mov eax, 1
retn
loc_9AA38:
jmp short $+2
|
long long lre_case_conv(unsigned int *a1, unsigned int a2, int a3)
{
unsigned int v3; // eax
int v4; // ecx
int v5; // r10d
int v6; // r9d
long long v7; // rcx
unsigned int v8; // r11d
if ( a2 >= 0x80 )
{
v5 = 0;
v6 = 377;
while ( 1 )
{
v7 = (unsigned int)(v6 + v5) >> 1;
v8 = case_conv_table1[v7] >> 15;
if ( v8 <= a2 )
{
if ( v8 + ((case_conv_table1[v7] >> 8) & 0x7F) > a2 )
return lre_case_conv_entry();
v5 = v7 + 1;
}
else
{
v6 = v7 - 1;
}
if ( v5 > v6 )
goto LABEL_15;
}
}
if ( a3 )
{
v3 = a2 - 65;
v4 = a2 | 0x20;
}
else
{
v3 = a2 - 97;
v4 = a2 - 32;
}
if ( v3 >= 0x1A )
v4 = a2;
a2 = v4;
LABEL_15:
*a1 = a2;
return 1LL;
}
|
lre_case_conv:
CMP ESI,0x80
JNC 0x0019a9d6
TEST EDX,EDX
JZ 0x0019aa22
LEA EAX,[RSI + -0x41]
MOV ECX,ESI
OR ECX,0x20
JMP 0x0019aa28
LAB_0019a9d6:
XOR R10D,R10D
MOV R9D,0x179
LEA RAX,[0x1a67f0]
LAB_0019a9e6:
LEA ECX,[R9 + R10*0x1]
SHR ECX,0x1
MOV R8D,dword ptr [RAX + RCX*0x4]
MOV R11D,R8D
SHR R11D,0xf
CMP R11D,ESI
JBE 0x0019aa03
DEC ECX
MOV R9D,ECX
JMP 0x0019aa1b
LAB_0019aa03:
MOV R10D,R8D
SHR R10D,0x8
AND R10D,0x7f
ADD R10D,R11D
CMP R10D,ESI
JA 0x0019aa38
INC ECX
MOV R10D,ECX
LAB_0019aa1b:
CMP R10D,R9D
JLE 0x0019a9e6
JMP 0x0019aa30
LAB_0019aa22:
LEA EAX,[RSI + -0x61]
LEA ECX,[RSI + -0x20]
LAB_0019aa28:
CMP EAX,0x1a
CMOVNC ECX,ESI
MOV ESI,ECX
LAB_0019aa30:
MOV dword ptr [RDI],ESI
MOV EAX,0x1
RET
LAB_0019aa38:
JMP 0x0019aa3a
|
int8 lre_case_conv(uint *param_1,uint param_2,int param_3)
{
uint uVar1;
int8 uVar2;
uint uVar3;
int iVar4;
int iVar5;
if (param_2 < 0x80) {
if (param_3 == 0) {
uVar1 = param_2 - 0x61;
uVar3 = param_2 - 0x20;
}
else {
uVar1 = param_2 - 0x41;
uVar3 = param_2 | 0x20;
}
if (0x19 < uVar1) {
uVar3 = param_2;
}
}
else {
iVar5 = 0;
iVar4 = 0x179;
do {
uVar3 = (uint)(iVar4 + iVar5) >> 1;
uVar1 = (uint)(&case_conv_table1)[uVar3] >> 0xf;
if (param_2 < uVar1) {
iVar4 = uVar3 - 1;
}
else {
if (param_2 < ((uint)(&case_conv_table1)[uVar3] >> 8 & 0x7f) + uVar1) {
uVar2 = lre_case_conv_entry();
return uVar2;
}
iVar5 = uVar3 + 1;
}
uVar3 = param_2;
} while (iVar5 <= iVar4);
}
*param_1 = uVar3;
return 1;
}
|
|
61,089
|
end_scope
|
fabiosvm[P]rak/src/compiler.c
|
static inline void end_scope(RakCompiler *comp, RakError *err)
{
int len = comp->symbols.len;
int n = 0;
for (int i = len - 1; i >= 0; --i)
{
RakSymbol sym = rak_slice_get(&comp->symbols, i);
if (sym.depth != comp->scopeDepth) break;
emit_instr(comp, rak_pop_instr(), err);
if (!rak_is_ok(err)) return;
++n;
}
comp->symbols.len -= n;
--comp->scopeDepth;
}
|
O3
|
c
|
end_scope:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movslq 0x100c(%rdi), %r15
testq %r15, %r15
jle 0x4b5f
movq %rsi, %r14
leaq (%r15,%r15,2), %rax
leaq (%rbx,%rax,8), %r12
addq $0x100c, %r12 # imm = 0x100C
xorl %ebp, %ebp
movl (%r12), %eax
cmpl 0x2828(%rbx), %eax
jne 0x4b56
movq %rbx, %rdi
movl $0xc, %esi
movq %r14, %rdx
callq 0x392d
cmpb $0x1, (%r14)
jne 0x4b71
incl %ebp
addq $-0x18, %r12
cmpl %ebp, %r15d
jne 0x4b26
movl %r15d, %ebp
movl 0x100c(%rbx), %r15d
jmp 0x4b61
xorl %ebp, %ebp
subl %ebp, %r15d
movl %r15d, 0x100c(%rbx)
decl 0x2828(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
end_scope:
push rbp
push r15
push r14
push r12
push rbx
mov rbx, rdi
movsxd r15, dword ptr [rdi+100Ch]
test r15, r15
jle short loc_4B5F
mov r14, rsi
lea rax, [r15+r15*2]
lea r12, [rbx+rax*8]
add r12, 100Ch
xor ebp, ebp
loc_4B26:
mov eax, [r12]
cmp eax, [rbx+2828h]
jnz short loc_4B56
mov rdi, rbx
mov esi, 0Ch
mov rdx, r14
call rak_chunk_append_instr
cmp byte ptr [r14], 1
jnz short loc_4B71
inc ebp
add r12, 0FFFFFFFFFFFFFFE8h
cmp r15d, ebp
jnz short loc_4B26
mov ebp, r15d
loc_4B56:
mov r15d, [rbx+100Ch]
jmp short loc_4B61
loc_4B5F:
xor ebp, ebp
loc_4B61:
sub r15d, ebp
mov [rbx+100Ch], r15d
dec dword ptr [rbx+2828h]
loc_4B71:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long end_scope(long long a1, char *a2, long long a3, int a4, int a5, int a6)
{
long long v6; // r15
unsigned int *v7; // r12
int v8; // ebp
long long result; // rax
v6 = *(int *)(a1 + 4108);
if ( v6 <= 0 )
{
v8 = 0;
}
else
{
v7 = (unsigned int *)(a1 + 24 * v6 + 4108);
v8 = 0;
while ( 1 )
{
result = *v7;
if ( (_DWORD)result != *(_DWORD *)(a1 + 10280) )
break;
result = rak_chunk_append_instr(a1, 12, a2, a4, a5, a6);
if ( *a2 != 1 )
return result;
++v8;
v7 -= 6;
if ( (_DWORD)v6 == v8 )
{
v8 = v6;
break;
}
}
LODWORD(v6) = *(_DWORD *)(a1 + 4108);
}
*(_DWORD *)(a1 + 4108) = v6 - v8;
--*(_DWORD *)(a1 + 10280);
return result;
}
|
end_scope:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDI
MOVSXD R15,dword ptr [RDI + 0x100c]
TEST R15,R15
JLE 0x00104b5f
MOV R14,RSI
LEA RAX,[R15 + R15*0x2]
LEA R12,[RBX + RAX*0x8]
ADD R12,0x100c
XOR EBP,EBP
LAB_00104b26:
MOV EAX,dword ptr [R12]
CMP EAX,dword ptr [RBX + 0x2828]
JNZ 0x00104b56
MOV RDI,RBX
MOV ESI,0xc
MOV RDX,R14
CALL 0x0010392d
CMP byte ptr [R14],0x1
JNZ 0x00104b71
INC EBP
ADD R12,-0x18
CMP R15D,EBP
JNZ 0x00104b26
MOV EBP,R15D
LAB_00104b56:
MOV R15D,dword ptr [RBX + 0x100c]
JMP 0x00104b61
LAB_00104b5f:
XOR EBP,EBP
LAB_00104b61:
SUB R15D,EBP
MOV dword ptr [RBX + 0x100c],R15D
DEC dword ptr [RBX + 0x2828]
LAB_00104b71:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
void end_scope(long param_1,char *param_2)
{
int iVar1;
int iVar2;
int *piVar3;
int iVar4;
iVar4 = *(int *)(param_1 + 0x100c);
if ((long)iVar4 < 1) {
iVar2 = 0;
}
else {
piVar3 = (int *)(param_1 + (long)iVar4 * 0x18 + 0x100c);
iVar1 = 0;
do {
iVar2 = iVar1;
if (*piVar3 != *(int *)(param_1 + 0x2828)) break;
rak_chunk_append_instr(param_1,0xc,param_2);
if (*param_2 != '\x01') {
return;
}
iVar1 = iVar1 + 1;
piVar3 = piVar3 + -6;
iVar2 = iVar4;
} while (iVar4 != iVar1);
iVar4 = *(int *)(param_1 + 0x100c);
}
*(int *)(param_1 + 0x100c) = iVar4 - iVar2;
*(int *)(param_1 + 0x2828) = *(int *)(param_1 + 0x2828) + -1;
return;
}
|
|
61,090
|
trnman_can_read_from
|
eloqsql/storage/maria/trnman.c
|
int trnman_can_read_from(TRN *trn, TrID trid)
{
TRN **found;
my_bool can;
if (trid < trn->min_read_from)
return 1; /* Row is visible by all transactions in the system */
if (trid >= trn->trid)
{
/*
We have now two cases
trid > trn->trid, in which case the row is from a new transaction
and not visible, in which case we should return 0.
trid == trn->trid in which case the row is from the current transaction
and we should return 1
*/
return trid == trn->trid;
}
found= lf_hash_search(&trid_to_trn, trn->pins, &trid, sizeof(trid));
if (found == NULL)
return 0; /* not in the hash of transactions = cannot read */
if (found == MY_ERRPTR)
return -1;
can= (*found)->commit_trid < trn->trid;
lf_hash_search_unpin(trn->pins);
return can;
}
|
O0
|
c
|
trnman_can_read_from:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x80(%rcx), %rax
jae 0x7961d
movl $0x1, -0x4(%rbp)
jmp 0x796ce
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x78(%rcx), %rax
jb 0x79647
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x78(%rcx), %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x796ce
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq 0xc00dd3(%rip), %rdi # 0xc7a428
leaq -0x18(%rbp), %rdx
movl $0x8, %ecx
callq 0xfe710
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x79677
movl $0x0, -0x4(%rbp)
jmp 0x796ce
movl $0x1, %eax
cmpq %rax, -0x20(%rbp)
jne 0x7968b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x796ce
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x88(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x78(%rcx), %rax
setb %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x21(%rbp)
jmp 0x796ae
jmp 0x796b0
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
xchgq %rax, 0x10(%rcx)
movsbl -0x21(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
trnman_can_read_from:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
cmp rax, [rcx+80h]
jnb short loc_7961D
mov [rbp+var_4], 1
jmp loc_796CE
loc_7961D:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
cmp rax, [rcx+78h]
jb short loc_79647
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
cmp rax, [rcx+78h]
setz al
and al, 1
movzx eax, al
mov [rbp+var_4], eax
jmp loc_796CE
loc_79647:
mov rax, [rbp+var_10]
mov rsi, [rax]
lea rdi, trid_to_trn
lea rdx, [rbp+var_18]
mov ecx, 8
call lf_hash_search
mov [rbp+var_20], rax
cmp [rbp+var_20], 0
jnz short loc_79677
mov [rbp+var_4], 0
jmp short loc_796CE
loc_79677:
mov eax, 1
cmp [rbp+var_20], rax
jnz short loc_7968B
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_796CE
loc_7968B:
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+88h]
mov rcx, [rbp+var_10]
cmp rax, [rcx+78h]
setb al
and al, 1
movzx eax, al
mov [rbp+var_21], al
jmp short $+2
loc_796AE:
jmp short $+2
loc_796B0:
mov rax, [rbp+var_10]
mov rcx, [rax]
mov [rbp+var_30], 0
mov rax, [rbp+var_30]
xchg rax, [rcx+10h]
movsx eax, [rbp+var_21]
mov [rbp+var_4], eax
loc_796CE:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long trnman_can_read_from(_QWORD *a1, unsigned long long a2)
{
bool v3; // [rsp+Fh] [rbp-21h]
long long v4; // [rsp+10h] [rbp-20h]
unsigned long long v5; // [rsp+18h] [rbp-18h] BYREF
_QWORD *v6; // [rsp+20h] [rbp-10h]
v6 = a1;
v5 = a2;
if ( a2 >= a1[16] )
{
if ( v5 < v6[15] )
{
v4 = lf_hash_search(&trid_to_trn, *v6, &v5, 8LL);
if ( v4 )
{
if ( v4 == 1 )
{
return (unsigned int)-1;
}
else
{
v3 = *(_QWORD *)(*(_QWORD *)v4 + 136LL) < v6[15];
_InterlockedExchange64((volatile long long *)(*v6 + 16LL), 0LL);
return v3;
}
}
else
{
return 0;
}
}
else
{
return v5 == v6[15];
}
}
else
{
return 1;
}
}
|
trnman_can_read_from:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x80]
JNC 0x0017961d
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001796ce
LAB_0017961d:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x78]
JC 0x00179647
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x78]
SETZ AL
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001796ce
LAB_00179647:
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX]
LEA RDI,[0xd7a428]
LEA RDX,[RBP + -0x18]
MOV ECX,0x8
CALL 0x001fe710
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x00179677
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001796ce
LAB_00179677:
MOV EAX,0x1
CMP qword ptr [RBP + -0x20],RAX
JNZ 0x0017968b
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001796ce
LAB_0017968b:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x88]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x78]
SETC AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x21],AL
JMP 0x001796ae
LAB_001796ae:
JMP 0x001796b0
LAB_001796b0:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],0x0
MOV RAX,qword ptr [RBP + -0x30]
XCHG qword ptr [RCX + 0x10],RAX
MOVSX EAX,byte ptr [RBP + -0x21]
MOV dword ptr [RBP + -0x4],EAX
LAB_001796ce:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
uint trnman_can_read_from(long *param_1,ulong param_2)
{
ulong uVar1;
ulong uVar2;
long *plVar3;
ulong local_20;
long *local_18;
uint local_c;
if (param_2 < (ulong)param_1[0x10]) {
local_c = 1;
}
else if (param_2 < (ulong)param_1[0xf]) {
local_20 = param_2;
local_18 = param_1;
plVar3 = (long *)lf_hash_search(trid_to_trn,*param_1,&local_20,8);
if (plVar3 == (long *)0x0) {
local_c = 0;
}
else if (plVar3 == (long *)0x1) {
local_c = 0xffffffff;
}
else {
uVar1 = *(ulong *)(*plVar3 + 0x88);
uVar2 = local_18[0xf];
LOCK();
*(int8 *)(*local_18 + 0x10) = 0;
UNLOCK();
local_c = (uint)(uVar1 < uVar2);
}
}
else {
local_c = (uint)(param_2 == param_1[0xf]);
}
return local_c;
}
|
|
61,091
|
glfwGetVulkanResultString
|
untodesu[P]riteg/build_O1/_deps/glfw-src/src/vulkan.c
|
const char* _glfwGetVulkanResultString(VkResult result)
{
switch (result)
{
case VK_SUCCESS:
return "Success";
case VK_NOT_READY:
return "A fence or query has not yet completed";
case VK_TIMEOUT:
return "A wait operation has not completed in the specified time";
case VK_EVENT_SET:
return "An event is signaled";
case VK_EVENT_RESET:
return "An event is unsignaled";
case VK_INCOMPLETE:
return "A return array was too small for the result";
case VK_ERROR_OUT_OF_HOST_MEMORY:
return "A host memory allocation has failed";
case VK_ERROR_OUT_OF_DEVICE_MEMORY:
return "A device memory allocation has failed";
case VK_ERROR_INITIALIZATION_FAILED:
return "Initialization of an object could not be completed for implementation-specific reasons";
case VK_ERROR_DEVICE_LOST:
return "The logical or physical device has been lost";
case VK_ERROR_MEMORY_MAP_FAILED:
return "Mapping of a memory object has failed";
case VK_ERROR_LAYER_NOT_PRESENT:
return "A requested layer is not present or could not be loaded";
case VK_ERROR_EXTENSION_NOT_PRESENT:
return "A requested extension is not supported";
case VK_ERROR_FEATURE_NOT_PRESENT:
return "A requested feature is not supported";
case VK_ERROR_INCOMPATIBLE_DRIVER:
return "The requested version of Vulkan is not supported by the driver or is otherwise incompatible";
case VK_ERROR_TOO_MANY_OBJECTS:
return "Too many objects of the type have already been created";
case VK_ERROR_FORMAT_NOT_SUPPORTED:
return "A requested format is not supported on this device";
case VK_ERROR_SURFACE_LOST_KHR:
return "A surface is no longer available";
case VK_SUBOPTIMAL_KHR:
return "A swapchain no longer matches the surface properties exactly, but can still be used";
case VK_ERROR_OUT_OF_DATE_KHR:
return "A surface has changed in such a way that it is no longer compatible with the swapchain";
case VK_ERROR_INCOMPATIBLE_DISPLAY_KHR:
return "The display used by a swapchain does not use the same presentable image layout";
case VK_ERROR_NATIVE_WINDOW_IN_USE_KHR:
return "The requested window is already connected to a VkSurfaceKHR, or to some other non-Vulkan API";
case VK_ERROR_VALIDATION_FAILED_EXT:
return "A validation layer found an error";
default:
return "ERROR: UNKNOWN VULKAN ERROR";
}
}
|
O1
|
c
|
glfwGetVulkanResultString:
cmpl $0xc46535ff, %edi # imm = 0xC46535FF
jle 0x1c7b0
leal 0xb(%rdi), %eax
cmpl $0x10, %eax
ja 0x1c7e8
leaq 0x63099(%rip), %rcx # 0x7f838
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x634d2(%rip), %rax # 0x7fc81
retq
cmpl $0xc4653213, %edi # imm = 0xC4653213
jg 0x1c7d0
cmpl $0xc4650b07, %edi # imm = 0xC4650B07
je 0x1c800
cmpl $0xc4652a47, %edi # imm = 0xC4652A47
jne 0x1c810
leaq 0x635b1(%rip), %rax # 0x7fd80
retq
cmpl $0xc4653214, %edi # imm = 0xC4653214
je 0x1c808
cmpl $0xc46535ff, %edi # imm = 0xC46535FF
jne 0x1c810
leaq 0x635e8(%rip), %rax # 0x7fdcf
retq
cmpl $0xc4653600, %edi # imm = 0xC4653600
je 0x1c840
cmpl $0x3b9acdeb, %edi # imm = 0x3B9ACDEB
jne 0x1c810
leaq 0x634d6(%rip), %rax # 0x7fcd5
retq
leaq 0x63625(%rip), %rax # 0x7fe2c
retq
leaq 0x6351a(%rip), %rax # 0x7fd29
retq
leaq 0x63637(%rip), %rax # 0x7fe4e
retq
leaq 0x6322b(%rip), %rax # 0x7fa4a
retq
leaq 0x631f7(%rip), %rax # 0x7fa1e
retq
leaq 0x63187(%rip), %rax # 0x7f9b6
retq
leaq 0x6336b(%rip), %rax # 0x7fba2
retq
leaq 0x6317f(%rip), %rax # 0x7f9be
retq
leaq 0x6346d(%rip), %rax # 0x7fcb4
retq
leaq 0x6324b(%rip), %rax # 0x7fa9a
retq
leaq 0x63397(%rip), %rax # 0x7fbee
retq
leaq 0x631d4(%rip), %rax # 0x7fa33
retq
leaq 0x63362(%rip), %rax # 0x7fbc9
retq
leaq 0x632a8(%rip), %rax # 0x7fb17
retq
leaq 0x633d3(%rip), %rax # 0x7fc4a
retq
leaq 0x632eb(%rip), %rax # 0x7fb6a
retq
leaq 0x6315e(%rip), %rax # 0x7f9e5
retq
leaq 0x632b5(%rip), %rax # 0x7fb44
retq
leaq 0x631df(%rip), %rax # 0x7fa76
retq
leaq 0x63221(%rip), %rax # 0x7fac0
retq
|
_glfwGetVulkanResultString:
cmp edi, 0C46535FFh
jle short loc_1C7B0
lea eax, [rdi+0Bh]; switch 17 cases
cmp eax, 10h
ja short def_1C7A6; jumptable 000000000001C7A6 default case
lea rcx, jpt_1C7A6
movsxd rax, ds:(jpt_1C7A6 - 7F838h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_1C7A8:
lea rax, aARequestedForm; jumptable 000000000001C7A6 case -11
retn
loc_1C7B0:
cmp edi, 0C4653213h
jg short loc_1C7D0
cmp edi, 0C4650B07h
jz short loc_1C800
cmp edi, 0C4652A47h
jnz short loc_1C810
lea rax, aTheDisplayUsed; "The display used by a swapchain does no"...
retn
loc_1C7D0:
cmp edi, 0C4653214h
jz short loc_1C808
cmp edi, 0C46535FFh
jnz short loc_1C810
lea rax, aTheRequestedWi; "The requested window is already connect"...
retn
def_1C7A6:
cmp edi, 0C4653600h; jumptable 000000000001C7A6 default case
jz short loc_1C840
cmp edi, 3B9ACDEBh
jnz short loc_1C810
lea rax, aASwapchainNoLo; "A swapchain no longer matches the surfa"...
retn
loc_1C800:
lea rax, aAValidationLay; "A validation layer found an error"
retn
loc_1C808:
lea rax, aASurfaceHasCha; "A surface has changed in such a way tha"...
retn
loc_1C810:
lea rax, aErrorUnknownVu; "ERROR: UNKNOWN VULKAN ERROR"
retn
loc_1C818:
lea rax, aAReturnArrayWa; jumptable 000000000001C7A6 case 5
retn
loc_1C820:
lea rax, aAnEventIsSigna; jumptable 000000000001C7A6 case 3
retn
loc_1C828:
lea rax, aSuccess; jumptable 000000000001C7A6 case 0
retn
loc_1C830:
lea rax, aARequestedExte; jumptable 000000000001C7A6 case -7
retn
loc_1C838:
lea rax, aAFenceOrQueryH; jumptable 000000000001C7A6 case 1
retn
loc_1C840:
lea rax, aASurfaceIsNoLo; "A surface is no longer available"
retn
loc_1C848:
lea rax, aADeviceMemoryA; jumptable 000000000001C7A6 case -2
retn
loc_1C850:
lea rax, aTheRequestedVe; jumptable 000000000001C7A6 case -9
retn
loc_1C858:
lea rax, aAnEventIsUnsig; jumptable 000000000001C7A6 case 4
retn
loc_1C860:
lea rax, aARequestedFeat; jumptable 000000000001C7A6 case -8
retn
loc_1C868:
lea rax, aTheLogicalOrPh; jumptable 000000000001C7A6 case -4
retn
loc_1C870:
lea rax, aTooManyObjects; jumptable 000000000001C7A6 case -10
retn
loc_1C878:
lea rax, aARequestedLaye; jumptable 000000000001C7A6 case -6
retn
loc_1C880:
lea rax, aAWaitOperation; jumptable 000000000001C7A6 case 2
retn
loc_1C888:
lea rax, aMappingOfAMemo; jumptable 000000000001C7A6 case -5
retn
loc_1C890:
lea rax, aAHostMemoryAll; jumptable 000000000001C7A6 case -1
retn
loc_1C898:
lea rax, aInitialization; jumptable 000000000001C7A6 case -3
retn
|
const char * glfwGetVulkanResultString(int a1)
{
const char *result; // rax
if ( a1 <= -1000000001 )
{
if ( a1 > -1000001005 )
{
if ( a1 == -1000001004 )
return "A surface has changed in such a way that it is no longer compatible with the swapchain";
if ( a1 == -1000000001 )
return "The requested window is already connected to a VkSurfaceKHR, or to some other non-Vulkan API";
}
else
{
if ( a1 == -1000011001 )
return "A validation layer found an error";
if ( a1 == -1000003001 )
return "The display used by a swapchain does not use the same presentable image layout";
}
return "ERROR: UNKNOWN VULKAN ERROR";
}
else
{
switch ( a1 )
{
case -11:
result = "A requested format is not supported on this device";
break;
case -10:
result = "Too many objects of the type have already been created";
break;
case -9:
result = "The requested version of Vulkan is not supported by the driver or is otherwise incompatible";
break;
case -8:
result = "A requested feature is not supported";
break;
case -7:
result = "A requested extension is not supported";
break;
case -6:
result = "A requested layer is not present or could not be loaded";
break;
case -5:
result = "Mapping of a memory object has failed";
break;
case -4:
result = "The logical or physical device has been lost";
break;
case -3:
result = "Initialization of an object could not be completed for implementation-specific reasons";
break;
case -2:
result = "A device memory allocation has failed";
break;
case -1:
result = "A host memory allocation has failed";
break;
case 0:
result = "Success";
break;
case 1:
result = "A fence or query has not yet completed";
break;
case 2:
result = "A wait operation has not completed in the specified time";
break;
case 3:
result = "An event is signaled";
break;
case 4:
result = "An event is unsignaled";
break;
case 5:
result = "A return array was too small for the result";
break;
default:
if ( a1 == -1000000000 )
{
result = "A surface is no longer available";
}
else
{
if ( a1 != 1000001003 )
return "ERROR: UNKNOWN VULKAN ERROR";
result = "A swapchain no longer matches the surface properties exactly, but can still be used";
}
break;
}
}
return result;
}
|
_glfwGetVulkanResultString:
CMP EDI,0xc46535ff
JLE 0x0011c7b0
LEA EAX,[RDI + 0xb]
CMP EAX,0x10
JA 0x0011c7e8
LEA RCX,[0x17f838]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_fffffff5:
LEA RAX,[0x17fc81]
RET
LAB_0011c7b0:
CMP EDI,0xc4653213
JG 0x0011c7d0
CMP EDI,0xc4650b07
JZ 0x0011c800
CMP EDI,0xc4652a47
JNZ 0x0011c810
LEA RAX,[0x17fd80]
RET
LAB_0011c7d0:
CMP EDI,0xc4653214
JZ 0x0011c808
CMP EDI,0xc46535ff
JNZ 0x0011c810
LEA RAX,[0x17fdcf]
RET
default:
CMP EDI,0xc4653600
JZ 0x0011c840
CMP EDI,0x3b9acdeb
JNZ 0x0011c810
LEA RAX,[0x17fcd5]
RET
LAB_0011c800:
LEA RAX,[0x17fe2c]
RET
LAB_0011c808:
LEA RAX,[0x17fd29]
RET
LAB_0011c810:
LEA RAX,[0x17fe4e]
RET
caseD_5:
LEA RAX,[0x17fa4a]
RET
caseD_3:
LEA RAX,[0x17fa1e]
RET
caseD_0:
LEA RAX,[0x17f9b6]
RET
caseD_fffffff9:
LEA RAX,[0x17fba2]
RET
caseD_1:
LEA RAX,[0x17f9be]
RET
LAB_0011c840:
LEA RAX,[0x17fcb4]
RET
caseD_fffffffe:
LEA RAX,[0x17fa9a]
RET
caseD_fffffff7:
LEA RAX,[0x17fbee]
RET
caseD_4:
LEA RAX,[0x17fa33]
RET
caseD_fffffff8:
LEA RAX,[0x17fbc9]
RET
caseD_fffffffc:
LEA RAX,[0x17fb17]
RET
caseD_fffffff6:
LEA RAX,[0x17fc4a]
RET
caseD_fffffffa:
LEA RAX,[0x17fb6a]
RET
caseD_2:
LEA RAX,[0x17f9e5]
RET
caseD_fffffffb:
LEA RAX,[0x17fb44]
RET
caseD_ffffffff:
LEA RAX,[0x17fa76]
RET
caseD_fffffffd:
LEA RAX,[0x17fac0]
RET
|
char * _glfwGetVulkanResultString(int param_1)
{
if (param_1 < -1000000000) {
if (param_1 < -0x3b9acdec) {
if (param_1 == -0x3b9af4f9) {
return "A validation layer found an error";
}
if (param_1 == -0x3b9ad5b9) {
return "The display used by a swapchain does not use the same presentable image layout";
}
}
else {
if (param_1 == -0x3b9acdec) {
return
"A surface has changed in such a way that it is no longer compatible with the swapchain";
}
if (param_1 == -0x3b9aca01) {
return
"The requested window is already connected to a VkSurfaceKHR, or to some other non-Vulkan API"
;
}
}
}
else {
switch(param_1) {
case 0:
return "Success";
case 1:
return "A fence or query has not yet completed";
case 2:
return "A wait operation has not completed in the specified time";
case 3:
return "An event is signaled";
case 4:
return "An event is unsignaled";
case 5:
return "A return array was too small for the result";
case -0xb:
return "A requested format is not supported on this device";
case -10:
return "Too many objects of the type have already been created";
case -9:
return
"The requested version of Vulkan is not supported by the driver or is otherwise incompatible";
case -8:
return "A requested feature is not supported";
case -7:
return "A requested extension is not supported";
case -6:
return "A requested layer is not present or could not be loaded";
case -5:
return "Mapping of a memory object has failed";
case -4:
return "The logical or physical device has been lost";
case -3:
return
"Initialization of an object could not be completed for implementation-specific reasons";
case -2:
return "A device memory allocation has failed";
case -1:
return "A host memory allocation has failed";
}
if (param_1 == -1000000000) {
return "A surface is no longer available";
}
if (param_1 == 0x3b9acdeb) {
return "A swapchain no longer matches the surface properties exactly, but can still be used";
}
}
return "ERROR: UNKNOWN VULKAN ERROR";
}
|
|
61,092
|
my_rw_rdlock
|
eloqsql/mysys/thr_rwlock.c
|
int my_rw_rdlock(my_rw_lock_t *rwp)
{
pthread_mutex_lock(&rwp->lock);
/* active or queued writers */
while (( rwp->state < 0 ) || rwp->waiters)
pthread_cond_wait( &rwp->readers, &rwp->lock);
rwp->state++;
pthread_mutex_unlock(&rwp->lock);
return(0);
}
|
O0
|
c
|
my_rw_rdlock:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x295a0
movq -0x8(%rbp), %rcx
movb $0x1, %al
cmpl $0x0, 0x88(%rcx)
movb %al, -0x9(%rbp)
jl 0x91518
movq -0x8(%rbp), %rax
cmpl $0x0, 0x8c(%rax)
setne %al
movb %al, -0x9(%rbp)
movb -0x9(%rbp), %al
testb $0x1, %al
jne 0x91521
jmp 0x91534
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
movq -0x8(%rbp), %rsi
callq 0x29640
jmp 0x914f5
movq -0x8(%rbp), %rax
movl 0x88(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x88(%rax)
movq -0x8(%rbp), %rdi
callq 0x292a0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
my_rw_rdlock:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
call _pthread_mutex_lock
loc_914F5:
mov rcx, [rbp+var_8]
mov al, 1
cmp dword ptr [rcx+88h], 0
mov [rbp+var_9], al
jl short loc_91518
mov rax, [rbp+var_8]
cmp dword ptr [rax+8Ch], 0
setnz al
mov [rbp+var_9], al
loc_91518:
mov al, [rbp+var_9]
test al, 1
jnz short loc_91521
jmp short loc_91534
loc_91521:
mov rdi, [rbp+var_8]
add rdi, 28h ; '('
mov rsi, [rbp+var_8]
call _pthread_cond_wait
jmp short loc_914F5
loc_91534:
mov rax, [rbp+var_8]
mov ecx, [rax+88h]
add ecx, 1
mov [rax+88h], ecx
mov rdi, [rbp+var_8]
call _pthread_mutex_unlock
xor eax, eax
add rsp, 10h
pop rbp
retn
|
long long my_rw_rdlock(long long a1)
{
bool v2; // [rsp+7h] [rbp-9h]
pthread_mutex_lock(a1);
while ( 1 )
{
v2 = 1;
if ( *(int *)(a1 + 136) >= 0 )
v2 = *(_DWORD *)(a1 + 140) != 0;
if ( !v2 )
break;
pthread_cond_wait(a1 + 40, a1);
}
++*(_DWORD *)(a1 + 136);
pthread_mutex_unlock(a1);
return 0LL;
}
|
my_rw_rdlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001295a0
LAB_001914f5:
MOV RCX,qword ptr [RBP + -0x8]
MOV AL,0x1
CMP dword ptr [RCX + 0x88],0x0
MOV byte ptr [RBP + -0x9],AL
JL 0x00191518
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x8c],0x0
SETNZ AL
MOV byte ptr [RBP + -0x9],AL
LAB_00191518:
MOV AL,byte ptr [RBP + -0x9]
TEST AL,0x1
JNZ 0x00191521
JMP 0x00191534
LAB_00191521:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x28
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x00129640
JMP 0x001914f5
LAB_00191534:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x88]
ADD ECX,0x1
MOV dword ptr [RAX + 0x88],ECX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001292a0
XOR EAX,EAX
ADD RSP,0x10
POP RBP
RET
|
int8 my_rw_rdlock(pthread_mutex_t *param_1)
{
bool bVar1;
pthread_mutex_lock(param_1);
while( true ) {
bVar1 = true;
if (-1 < *(int *)((long)param_1 + 0x88)) {
bVar1 = *(int *)((long)param_1 + 0x8c) != 0;
}
if (!bVar1) break;
pthread_cond_wait((pthread_cond_t *)(param_1 + 1),param_1);
}
*(int *)((long)param_1 + 0x88) = *(int *)((long)param_1 + 0x88) + 1;
pthread_mutex_unlock(param_1);
return 0;
}
|
|
61,093
|
my_rw_rdlock
|
eloqsql/mysys/thr_rwlock.c
|
int my_rw_rdlock(my_rw_lock_t *rwp)
{
pthread_mutex_lock(&rwp->lock);
/* active or queued writers */
while (( rwp->state < 0 ) || rwp->waiters)
pthread_cond_wait( &rwp->readers, &rwp->lock);
rwp->state++;
pthread_mutex_unlock(&rwp->lock);
return(0);
}
|
O3
|
c
|
my_rw_rdlock:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x285e0
leaq 0x28(%rbx), %r14
movl 0x88(%rbx), %eax
testl %eax, %eax
js 0x64d5e
cmpl $0x0, 0x8c(%rbx)
je 0x64d6b
movq %r14, %rdi
movq %rbx, %rsi
callq 0x28680
jmp 0x64d4b
incl %eax
movl %eax, 0x88(%rbx)
movq %rbx, %rdi
callq 0x282b0
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
|
my_rw_rdlock:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
call _pthread_mutex_lock
lea r14, [rbx+28h]
loc_64D4B:
mov eax, [rbx+88h]
test eax, eax
js short loc_64D5E
cmp dword ptr [rbx+8Ch], 0
jz short loc_64D6B
loc_64D5E:
mov rdi, r14
mov rsi, rbx
call _pthread_cond_wait
jmp short loc_64D4B
loc_64D6B:
inc eax
mov [rbx+88h], eax
mov rdi, rbx
call _pthread_mutex_unlock
xor eax, eax
pop rbx
pop r14
pop rbp
retn
|
long long my_rw_rdlock(long long a1)
{
int v1; // eax
pthread_mutex_lock(a1);
while ( 1 )
{
v1 = *(_DWORD *)(a1 + 136);
if ( v1 >= 0 && !*(_DWORD *)(a1 + 140) )
break;
pthread_cond_wait(a1 + 40, a1);
}
*(_DWORD *)(a1 + 136) = v1 + 1;
pthread_mutex_unlock(a1);
return 0LL;
}
|
my_rw_rdlock:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
CALL 0x001285e0
LEA R14,[RBX + 0x28]
LAB_00164d4b:
MOV EAX,dword ptr [RBX + 0x88]
TEST EAX,EAX
JS 0x00164d5e
CMP dword ptr [RBX + 0x8c],0x0
JZ 0x00164d6b
LAB_00164d5e:
MOV RDI,R14
MOV RSI,RBX
CALL 0x00128680
JMP 0x00164d4b
LAB_00164d6b:
INC EAX
MOV dword ptr [RBX + 0x88],EAX
MOV RDI,RBX
CALL 0x001282b0
XOR EAX,EAX
POP RBX
POP R14
POP RBP
RET
|
int8 my_rw_rdlock(pthread_mutex_t *param_1)
{
pthread_mutex_lock(param_1);
while ((*(int *)((long)param_1 + 0x88) < 0 || (*(int *)((long)param_1 + 0x8c) != 0))) {
pthread_cond_wait((pthread_cond_t *)(param_1 + 1),param_1);
}
*(int *)((long)param_1 + 0x88) = *(int *)((long)param_1 + 0x88) + 1;
pthread_mutex_unlock(param_1);
return 0;
}
|
|
61,094
|
mysql_set_local_infile_handler
|
eloqsql/libmariadb/libmariadb/ma_loaddata.c
|
void STDCALL mysql_set_local_infile_handler(MYSQL *conn,
int (*local_infile_init)(void **, const char *, void *),
int (*local_infile_read)(void *, char *, uint),
void (*local_infile_end)(void *),
int (*local_infile_error)(void *, char *, uint),
void *userdata)
{
conn->options.local_infile_init= local_infile_init;
conn->options.local_infile_read= local_infile_read;
conn->options.local_infile_end= local_infile_end;
conn->options.local_infile_error= local_infile_error;
conn->options.local_infile_userdata = userdata;
return;
}
|
O0
|
c
|
mysql_set_local_infile_handler:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x458(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x460(%rax)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x468(%rax)
movq -0x28(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x470(%rax)
movq -0x30(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x478(%rax)
popq %rbp
retq
nopl (%rax)
|
mysql_set_local_infile_handler:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rcx, [rbp+var_10]
mov rax, [rbp+var_8]
mov [rax+458h], rcx
mov rcx, [rbp+var_18]
mov rax, [rbp+var_8]
mov [rax+460h], rcx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_8]
mov [rax+468h], rcx
mov rcx, [rbp+var_28]
mov rax, [rbp+var_8]
mov [rax+470h], rcx
mov rcx, [rbp+var_30]
mov rax, [rbp+var_8]
mov [rax+478h], rcx
pop rbp
retn
|
_QWORD * mysql_set_local_infile_handler(
_QWORD *a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6)
{
_QWORD *result; // rax
a1[139] = a2;
a1[140] = a3;
a1[141] = a4;
a1[142] = a5;
result = a1;
a1[143] = a6;
return result;
}
|
mysql_set_local_infile_handler:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x458],RCX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x460],RCX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x468],RCX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x470],RCX
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x478],RCX
POP RBP
RET
|
void mysql_set_local_infile_handler
(long param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6)
{
*(int8 *)(param_1 + 0x458) = param_2;
*(int8 *)(param_1 + 0x460) = param_3;
*(int8 *)(param_1 + 0x468) = param_4;
*(int8 *)(param_1 + 0x470) = param_5;
*(int8 *)(param_1 + 0x478) = param_6;
return;
}
|
|
61,095
|
init_myisam_psi_keys
|
eloqsql/storage/myisam/mi_static.c
|
void init_myisam_psi_keys()
{
const char* category= "myisam";
int count;
count= array_elements(all_myisam_mutexes);
mysql_mutex_register(category, all_myisam_mutexes, count);
count= array_elements(all_myisam_rwlocks);
mysql_rwlock_register(category, all_myisam_rwlocks, count);
count= array_elements(all_myisam_conds);
mysql_cond_register(category, all_myisam_conds, count);
count= array_elements(all_myisam_files);
mysql_file_register(category, all_myisam_files, count);
count= array_elements(all_myisam_threads);
mysql_thread_register(category, all_myisam_threads, count);
count= array_elements(all_myisam_memory);
mysql_memory_register(category, all_myisam_memory, count);
}
|
O0
|
c
|
init_myisam_psi_keys:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0xb6324(%rip), %rax # 0x155793
movq %rax, -0x8(%rbp)
movl $0x3, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x220e68(%rip), %rsi # 0x2c02f0
callq 0x9f520
movl $0x2, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x220e9e(%rip), %rsi # 0x2c0340
callq 0x9f560
movl $0x1, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x220eb4(%rip), %rsi # 0x2c0370
callq 0x9f5a0
movl $0x4, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x220eba(%rip), %rsi # 0x2c0390
callq 0x9f5e0
movl $0x1, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x220f00(%rip), %rsi # 0x2c03f0
callq 0x9f620
movl $0x15, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x220f06(%rip), %rsi # 0x2c0410
callq 0x9f660
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
init_myisam_psi_keys:
push rbp
mov rbp, rsp
sub rsp, 10h
lea rax, aThrLockMyisam+9; "myisam"
mov [rbp+var_8], rax
mov [rbp+var_C], 3
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_myisam_mutexes
call inline_mysql_mutex_register
mov [rbp+var_C], 2
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_myisam_rwlocks
call inline_mysql_rwlock_register
mov [rbp+var_C], 1
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_myisam_conds
call inline_mysql_cond_register
mov [rbp+var_C], 4
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_myisam_files
call inline_mysql_file_register
mov [rbp+var_C], 1
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_myisam_threads
call inline_mysql_thread_register
mov [rbp+var_C], 15h
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_myisam_memory
call inline_mysql_memory_register
add rsp, 10h
pop rbp
retn
|
long long init_myisam_psi_keys()
{
inline_mysql_mutex_register("myisam", &all_myisam_mutexes, 3LL);
inline_mysql_rwlock_register("myisam", &all_myisam_rwlocks, 2LL);
inline_mysql_cond_register("myisam", &all_myisam_conds, 1LL);
inline_mysql_file_register("myisam", &all_myisam_files, 4LL);
inline_mysql_thread_register("myisam", &all_myisam_threads, 1LL);
return inline_mysql_memory_register("myisam", &all_myisam_memory, 21LL);
}
|
init_myisam_psi_keys:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
LEA RAX,[0x255793]
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0xc],0x3
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x3c02f0]
CALL 0x0019f520
MOV dword ptr [RBP + -0xc],0x2
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x3c0340]
CALL 0x0019f560
MOV dword ptr [RBP + -0xc],0x1
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x3c0370]
CALL 0x0019f5a0
MOV dword ptr [RBP + -0xc],0x4
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x3c0390]
CALL 0x0019f5e0
MOV dword ptr [RBP + -0xc],0x1
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x3c03f0]
CALL 0x0019f620
MOV dword ptr [RBP + -0xc],0x15
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x3c0410]
CALL 0x0019f660
ADD RSP,0x10
POP RBP
RET
|
void init_myisam_psi_keys(void)
{
inline_mysql_mutex_register("myisam",all_myisam_mutexes,3);
inline_mysql_rwlock_register("myisam",all_myisam_rwlocks,2);
inline_mysql_cond_register("myisam",all_myisam_conds,1);
inline_mysql_file_register("myisam",all_myisam_files,4);
inline_mysql_thread_register("myisam",all_myisam_threads,1);
inline_mysql_memory_register("myisam",all_myisam_memory,0x15);
return;
}
|
|
61,096
|
LefDefParser::lefwEndSpacing()
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
|
int
lefwEndSpacing()
{
if (!lefwFile)
return LEFW_UNINITIALIZED;
if (lefwState != LEFW_SPACING_START &&
lefwState != LEFW_SPACING)
return LEFW_BAD_ORDER;
if (lefwWriteEncrypt)
encPrint(lefwFile, (char*) "END SPACING\n\n");
else
fprintf(lefwFile, "END SPACING\n\n");
lefwLines++;
lefwState = LEFW_SPACING_END;
return LEFW_OK;
}
|
O3
|
cpp
|
LefDefParser::lefwEndSpacing():
pushq %rbx
leaq 0x14876(%rip), %rax # 0x24e00
movq (%rax), %rcx
testq %rcx, %rcx
je 0x105c6
leaq 0x14ab7(%rip), %rbx # 0x25050
movl (%rbx), %edx
cmpl $0x43, %edx
je 0x105aa
movl $0x2, %eax
cmpl $0xd, %edx
jne 0x105f4
cmpb $0x1, 0x14b3b(%rip) # 0x250ec
jne 0x105cd
leaq 0xaf31(%rip), %rsi # 0x1b4eb
movq %rcx, %rdi
xorl %eax, %eax
callq 0x18c35
jmp 0x105e3
movl $0x1, %eax
jmp 0x105f4
leaq 0xaf17(%rip), %rdi # 0x1b4eb
movl $0xd, %esi
movl $0x1, %edx
callq 0x1110
leaq 0x14a62(%rip), %rax # 0x2504c
incl (%rax)
movl $0x5c, (%rbx)
xorl %eax, %eax
popq %rbx
retq
|
_ZN12LefDefParser14lefwEndSpacingEv:
push rbx
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rcx, [rax]
test rcx, rcx
jz short loc_105C6
lea rbx, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
mov edx, [rbx]
cmp edx, 43h ; 'C'
jz short loc_105AA
mov eax, 2
cmp edx, 0Dh
jnz short loc_105F4
loc_105AA:
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt
jnz short loc_105CD
lea rsi, aEndSpacing; "END SPACING\n\n"
mov rdi, rcx
xor eax, eax
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
jmp short loc_105E3
loc_105C6:
mov eax, 1
jmp short loc_105F4
loc_105CD:
lea rdi, aEndSpacing; "END SPACING\n\n"
mov esi, 0Dh
mov edx, 1
call _fwrite
loc_105E3:
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
inc dword ptr [rax]
mov dword ptr [rbx], 5Ch ; '\'
xor eax, eax
loc_105F4:
pop rbx
retn
|
long long LefDefParser::lefwEndSpacing(LefDefParser *this, long long a2, long long a3, long long a4, int a5, int a6)
{
long long result; // rax
if ( !*(_QWORD *)&LefDefParser::lefwFile )
return 1LL;
if ( LefDefParser::lefwState == 67 || (result = 2LL, LefDefParser::lefwState == 13) )
{
if ( LefDefParser::lefwWriteEncrypt == 1 )
LefDefParser::encPrint(
LefDefParser::lefwFile,
(unsigned int)"END SPACING\n\n",
LefDefParser::lefwState,
LefDefParser::lefwFile,
a5,
a6);
else
fwrite("END SPACING\n\n", 13LL, 1LL, *(_QWORD *)&LefDefParser::lefwFile);
++LefDefParser::lefwLines;
LefDefParser::lefwState = 92;
return 0LL;
}
return result;
}
|
lefwEndSpacing:
PUSH RBX
LEA RAX,[0x124e00]
MOV RCX,qword ptr [RAX]
TEST RCX,RCX
JZ 0x001105c6
LEA RBX,[0x125050]
MOV EDX,dword ptr [RBX]
CMP EDX,0x43
JZ 0x001105aa
MOV EAX,0x2
CMP EDX,0xd
JNZ 0x001105f4
LAB_001105aa:
CMP byte ptr [0x001250ec],0x1
JNZ 0x001105cd
LEA RSI,[0x11b4eb]
MOV RDI,RCX
XOR EAX,EAX
CALL 0x00118c35
JMP 0x001105e3
LAB_001105c6:
MOV EAX,0x1
JMP 0x001105f4
LAB_001105cd:
LEA RDI,[0x11b4eb]
MOV ESI,0xd
MOV EDX,0x1
CALL 0x00101110
LAB_001105e3:
LEA RAX,[0x12504c]
INC dword ptr [RAX]
MOV dword ptr [RBX],0x5c
XOR EAX,EAX
LAB_001105f4:
POP RBX
RET
|
/* LefDefParser::lefwEndSpacing() */
int8 LefDefParser::lefwEndSpacing(void)
{
int8 uVar1;
if (lefwFile == (_IO_FILE *)0x0) {
uVar1 = 1;
}
else if ((lefwState == 0x43) || (uVar1 = 2, lefwState == 0xd)) {
if (lefwWriteEncrypt == '\x01') {
encPrint(lefwFile,"END SPACING\n\n");
}
else {
fwrite("END SPACING\n\n",0xd,1,lefwFile);
}
lefwLines = lefwLines + 1;
lefwState = 0x5c;
uVar1 = 0;
}
return uVar1;
}
|
|
61,097
|
my_numcells_eucjp
|
eloqsql/strings/ctype-ujis.c
|
static
size_t my_numcells_eucjp(CHARSET_INFO *cs __attribute__((unused)),
const char *str, const char *str_end)
{
size_t clen;
const uchar *b= (const uchar *) str;
const uchar *e= (const uchar *) str_end;
for (clen= 0; b < e; )
{
if (*b == 0x8E)
{
clen++;
b+= 2;
}
else if (*b == 0x8F)
{
clen+= 2;
b+= 3;
}
else if (*b & 0x80)
{
clen+= 2;
b+= 2;
}
else
{
clen++;
b++;
}
}
return clen;
}
|
O3
|
c
|
my_numcells_eucjp:
cmpq %rdx, %rsi
jae 0x559fe
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movzbl (%rsi), %edi
cmpl $0x8e, %edi
je 0x559d7
cmpl $0x8f, %edi
jne 0x559e3
movl $0x3, %edi
movl $0x2, %ecx
jmp 0x559f1
movl $0x2, %edi
movl $0x1, %ecx
jmp 0x559f1
xorl %ecx, %ecx
testb %dil, %dil
sets %cl
incq %rcx
movq %rcx, %rdi
addq %rcx, %rax
addq %rdi, %rsi
cmpq %rdx, %rsi
jb 0x559b8
popq %rbp
retq
xorl %eax, %eax
retq
|
my_numcells_eucjp:
cmp rsi, rdx
jnb short loc_559FE
push rbp
mov rbp, rsp
xor eax, eax
loc_559B8:
movzx edi, byte ptr [rsi]
cmp edi, 8Eh
jz short loc_559D7
cmp edi, 8Fh
jnz short loc_559E3
mov edi, 3
mov ecx, 2
jmp short loc_559F1
loc_559D7:
mov edi, 2
mov ecx, 1
jmp short loc_559F1
loc_559E3:
xor ecx, ecx
test dil, dil
sets cl
inc rcx
mov rdi, rcx
loc_559F1:
add rax, rcx
add rsi, rdi
cmp rsi, rdx
jb short loc_559B8
pop rbp
retn
loc_559FE:
xor eax, eax
retn
|
long long my_numcells_eucjp(long long a1, unsigned __int8 *a2, unsigned long long a3)
{
long long result; // rax
int v4; // edi
long long v5; // rdi
long long v6; // rcx
if ( (unsigned long long)a2 >= a3 )
return 0LL;
result = 0LL;
do
{
v4 = *a2;
if ( v4 == 142 )
{
v5 = 2LL;
v6 = 1LL;
}
else if ( v4 == 143 )
{
v5 = 3LL;
v6 = 2LL;
}
else
{
v6 = ((v4 & 0x80u) != 0) + 1LL;
v5 = v6;
}
result += v6;
a2 += v5;
}
while ( (unsigned long long)a2 < a3 );
return result;
}
|
my_numcells_eucjp:
CMP RSI,RDX
JNC 0x001559fe
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
LAB_001559b8:
MOVZX EDI,byte ptr [RSI]
CMP EDI,0x8e
JZ 0x001559d7
CMP EDI,0x8f
JNZ 0x001559e3
MOV EDI,0x3
MOV ECX,0x2
JMP 0x001559f1
LAB_001559d7:
MOV EDI,0x2
MOV ECX,0x1
JMP 0x001559f1
LAB_001559e3:
XOR ECX,ECX
TEST DIL,DIL
SETS CL
INC RCX
MOV RDI,RCX
LAB_001559f1:
ADD RAX,RCX
ADD RSI,RDI
CMP RSI,RDX
JC 0x001559b8
POP RBP
RET
LAB_001559fe:
XOR EAX,EAX
RET
|
long my_numcells_eucjp(int8 param_1,char *param_2,char *param_3)
{
char cVar1;
long lVar2;
long lVar3;
long lVar4;
if (param_2 < param_3) {
lVar2 = 0;
do {
cVar1 = *param_2;
if (cVar1 == -0x72) {
lVar4 = 2;
lVar3 = 1;
}
else if (cVar1 == -0x71) {
lVar3 = 2;
lVar4 = 3;
}
else {
lVar3 = (ulong)(cVar1 < '\0') + 1;
lVar4 = lVar3;
}
lVar2 = lVar2 + lVar3;
param_2 = param_2 + lVar4;
} while (param_2 < param_3);
return lVar2;
}
return 0;
}
|
|
61,098
|
cmp
|
eloqsql/strings/dtoa.c
|
static int cmp(Bigint *a, Bigint *b)
{
ULong *xa, *xa0, *xb, *xb0;
int i, j;
i= a->wds;
j= b->wds;
if (i-= j)
return i;
xa0= a->p.x;
xa= xa0 + j;
xb0= b->p.x;
xb= xb0 + j;
for (;;)
{
if (*--xa != *--xb)
return *xa < *xb ? -1 : 1;
if (xa <= xa0)
break;
}
return 0;
}
|
O0
|
c
|
cmp:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x18(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %ecx
movl -0x3c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x3c(%rbp)
cmpl $0x0, %eax
je 0xa89cb
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xa8a62
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movslq -0x40(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movslq -0x40(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $-0x4, %rcx
movq %rcx, -0x20(%rbp)
movl -0x4(%rax), %eax
movq -0x30(%rbp), %rcx
movq %rcx, %rdx
addq $-0x4, %rdx
movq %rdx, -0x30(%rbp)
cmpl -0x4(%rcx), %eax
je 0xa8a4d
movq -0x20(%rbp), %rax
movl (%rax), %edx
movq -0x30(%rbp), %rax
movl (%rax), %esi
movl $0x1, %eax
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
cmpl %esi, %edx
cmovbl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0xa8a62
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
ja 0xa8a59
jmp 0xa8a5b
jmp 0xa8a07
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
|
cmp:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov eax, [rax+14h]
mov [rbp+var_3C], eax
mov rax, [rbp+var_18]
mov eax, [rax+14h]
mov [rbp+var_40], eax
mov ecx, [rbp+var_40]
mov eax, [rbp+var_3C]
sub eax, ecx
mov [rbp+var_3C], eax
cmp eax, 0
jz short loc_A89CB
mov eax, [rbp+var_3C]
mov [rbp+var_4], eax
jmp loc_A8A62
loc_A89CB:
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
movsxd rcx, [rbp+var_40]
shl rcx, 2
add rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
movsxd rcx, [rbp+var_40]
shl rcx, 2
add rax, rcx
mov [rbp+var_30], rax
loc_A8A07:
mov rax, [rbp+var_20]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_20], rcx
mov eax, [rax-4]
mov rcx, [rbp+var_30]
mov rdx, rcx
add rdx, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_30], rdx
cmp eax, [rcx-4]
jz short loc_A8A4D
mov rax, [rbp+var_20]
mov edx, [rax]
mov rax, [rbp+var_30]
mov esi, [rax]
mov eax, 1
mov ecx, 0FFFFFFFFh
cmp edx, esi
cmovb eax, ecx
mov [rbp+var_4], eax
jmp short loc_A8A62
loc_A8A4D:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
ja short loc_A8A59
jmp short loc_A8A5B
loc_A8A59:
jmp short loc_A8A07
loc_A8A5B:
mov [rbp+var_4], 0
loc_A8A62:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long cmp(long long a1, long long a2)
{
_DWORD *v2; // rax
_DWORD *v3; // rcx
unsigned int v4; // eax
int v6; // [rsp+0h] [rbp-40h]
_DWORD *v7; // [rsp+10h] [rbp-30h]
_DWORD *v8; // [rsp+20h] [rbp-20h]
v6 = *(_DWORD *)(a2 + 20);
if ( *(_DWORD *)(a1 + 20) == v6 )
{
v8 = (_DWORD *)(4LL * v6 + *(_QWORD *)a1);
v7 = (_DWORD *)(4LL * v6 + *(_QWORD *)a2);
while ( 1 )
{
v2 = v8--;
v3 = v7--;
if ( *(v2 - 1) != *(v3 - 1) )
break;
if ( (unsigned long long)v8 <= *(_QWORD *)a1 )
return 0;
}
v4 = 1;
if ( *v8 < *v7 )
return (unsigned int)-1;
return v4;
}
else
{
return (unsigned int)(*(_DWORD *)(a1 + 20) - v6);
}
}
|
cmp:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x3c],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x40],EAX
MOV ECX,dword ptr [RBP + -0x40]
MOV EAX,dword ptr [RBP + -0x3c]
SUB EAX,ECX
MOV dword ptr [RBP + -0x3c],EAX
CMP EAX,0x0
JZ 0x001a89cb
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001a8a62
LAB_001a89cb:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,dword ptr [RBP + -0x40]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOVSXD RCX,dword ptr [RBP + -0x40]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
LAB_001a8a07:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,RAX
ADD RCX,-0x4
MOV qword ptr [RBP + -0x20],RCX
MOV EAX,dword ptr [RAX + -0x4]
MOV RCX,qword ptr [RBP + -0x30]
MOV RDX,RCX
ADD RDX,-0x4
MOV qword ptr [RBP + -0x30],RDX
CMP EAX,dword ptr [RCX + -0x4]
JZ 0x001a8a4d
MOV RAX,qword ptr [RBP + -0x20]
MOV EDX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x30]
MOV ESI,dword ptr [RAX]
MOV EAX,0x1
MOV ECX,0xffffffff
CMP EDX,ESI
CMOVC EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001a8a62
LAB_001a8a4d:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JA 0x001a8a59
JMP 0x001a8a5b
LAB_001a8a59:
JMP 0x001a8a07
LAB_001a8a5b:
MOV dword ptr [RBP + -0x4],0x0
LAB_001a8a62:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int cmp(void *param_1,void *param_2)
{
int iVar1;
uint *puVar2;
uint *local_38;
uint *local_28;
int local_c;
iVar1 = *(int *)((long)param_2 + 0x14);
local_c = *(int *)((long)param_1 + 0x14) - iVar1;
if (local_c == 0) {
/* WARNING: Load size is inaccurate */
/* WARNING: Load size is inaccurate */
local_38 = (uint *)(*param_2 + (long)iVar1 * 4);
local_28 = *param_1 + iVar1;
do {
puVar2 = local_28 + -1;
if (local_28[-1] != local_38[-1]) {
if (local_38[-1] <= *puVar2) {
return 1;
}
return -1;
}
local_38 = local_38 + -1;
local_28 = puVar2;
} while (*param_1 < puVar2);
local_c = 0;
}
return local_c;
}
|
|
61,099
|
JS_EvalObject
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue JS_EvalObject(JSContext *ctx, JSValue this_obj,
JSValue val, int flags, int scope_idx)
{
JSValue ret;
const char *str;
size_t len;
if (!JS_IsString(val))
return js_dup(val);
str = JS_ToCStringLen(ctx, &len, val);
if (!str)
return JS_EXCEPTION;
ret = JS_EvalInternal(ctx, this_obj, str, len, "<input>", flags, scope_idx);
JS_FreeCString(ctx, str);
return ret;
}
|
O1
|
c
|
JS_EvalObject:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movq %rcx, %r14
cmpl $-0x7, %ebx
jne 0x3f4ff
movq %rsi, %r13
movq %rdi, %r15
movq %rdx, 0x8(%rsp)
movq %r9, 0x10(%rsp)
movq %rsp, %rsi
xorl %ebp, %ebp
movq %r14, %rdx
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0x20bf7
testq %rax, %rax
je 0x3f533
movq %rax, %r12
movq 0x1f8(%r15), %rax
testq %rax, %rax
je 0x3f53d
movl 0x50(%rsp), %r10d
movq (%rsp), %r8
leaq 0x5ff67(%rip), %r9 # 0x9f41b
movq %r15, %rdi
movq %r13, %rsi
movq 0x8(%rsp), %rdx
movq %r12, %rcx
pushq %r10
pushq 0x18(%rsp)
callq *%rax
addq $0x10, %rsp
movq %rax, %r14
movq %rdx, %rbx
movq 0x18(%r15), %rdi
movl -0x18(%r12), %eax
leal -0x1(%rax), %ecx
movl %ecx, -0x18(%r12)
cmpl $0x1, %eax
jg 0x3f50e
addq $-0x18, %r12
movq %r12, %rsi
movq $-0x7, %rdx
callq 0x21266
jmp 0x3f50e
movq %r14, (%rsp)
cmpl $-0x9, %ebx
jb 0x3f50e
movq (%rsp), %rax
incl (%rax)
movabsq $-0x100000000, %rbp # imm = 0xFFFFFFFF00000000
andq %r14, %rbp
movl %r14d, %eax
orq %rbp, %rax
movq %rbx, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x6, %ebx
xorl %r14d, %r14d
jmp 0x3f51b
leaq 0x602e7(%rip), %rsi # 0x9f82b
xorl %r14d, %r14d
movq %r15, %rdi
xorl %eax, %eax
callq 0x22567
movl $0x6, %ebx
jmp 0x3f4d4
|
JS_EvalObject:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, r8
mov r14, rcx
cmp ebx, 0FFFFFFF9h
jnz loc_3F4FF
mov r13, rsi
mov r15, rdi
mov [rsp+48h+var_40], rdx
mov [rsp+48h+var_38], r9
mov rsi, rsp
xor ebp, ebp
mov rdx, r14
mov rcx, rbx
xor r8d, r8d
call JS_ToCStringLen2
test rax, rax
jz loc_3F533
mov r12, rax
mov rax, [r15+1F8h]
test rax, rax
jz loc_3F53D
mov r10d, [rsp+48h+arg_0]
mov r8, [rsp+48h+var_48]
lea r9, aInput; "<input>"
mov rdi, r15
mov rsi, r13
mov rdx, [rsp+48h+var_40]
mov rcx, r12
push r10
push [rsp+50h+var_38]
call rax
add rsp, 10h
mov r14, rax
mov rbx, rdx
loc_3F4D4:
mov rdi, [r15+18h]
mov eax, [r12-18h]
lea ecx, [rax-1]
mov [r12-18h], ecx
cmp eax, 1
jg short loc_3F50E
add r12, 0FFFFFFFFFFFFFFE8h
mov rsi, r12
mov rdx, 0FFFFFFFFFFFFFFF9h
call js_free_value_rt
jmp short loc_3F50E
loc_3F4FF:
mov [rsp+48h+var_48], r14
cmp ebx, 0FFFFFFF7h
jb short loc_3F50E
mov rax, [rsp+48h+var_48]
inc dword ptr [rax]
loc_3F50E:
mov rbp, 0FFFFFFFF00000000h
and rbp, r14
loc_3F51B:
mov eax, r14d
or rax, rbp
mov rdx, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3F533:
mov ebx, 6
xor r14d, r14d
jmp short loc_3F51B
loc_3F53D:
lea rsi, aEvalIsNotSuppo; "eval is not supported"
xor r14d, r14d
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
mov ebx, 6
jmp loc_3F4D4
|
unsigned long long JS_EvalObject(
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,
double a11,
double a12,
__m128 a13,
__m128 a14,
unsigned int a15)
{
long long v15; // r14
unsigned long long v16; // rbp
long long v17; // rax
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; // r12
long long ( *v25)(long long, long long, long long, long long, _DWORD *, const char *, long long, _QWORD); // rax
long long v26; // rdi
int v27; // eax
_DWORD *v29; // [rsp+0h] [rbp-48h] BYREF
long long v30; // [rsp+8h] [rbp-40h]
long long v31; // [rsp+10h] [rbp-38h]
v15 = a4;
if ( (_DWORD)a5 == -7 )
{
v30 = a3;
v31 = a6;
v16 = 0LL;
v17 = JS_ToCStringLen2(a1, (long long *)&v29, a4, a5, 0);
if ( !v17 )
{
LODWORD(v15) = 0;
return v16 | (unsigned int)v15;
}
v24 = v17;
v25 = *(long long ( **)(long long, long long, long long, long long, _DWORD *, const char *, long long, _QWORD))(a1 + 504);
if ( v25 )
{
v15 = v25(a1, a2, v30, v24, v29, "<input>", v31, a15);
}
else
{
v15 = 0LL;
JS_ThrowTypeError(
a1,
(long long)"eval is not supported",
v18,
v19,
v20,
v21,
a7,
a8,
a9,
a10,
v22,
v23,
a13,
a14,
(char)v29);
}
v26 = *(_QWORD *)(a1 + 24);
v27 = *(_DWORD *)(v24 - 24);
*(_DWORD *)(v24 - 24) = v27 - 1;
if ( v27 <= 1 )
js_free_value_rt(v26, (_QWORD *)(v24 - 24), -7);
}
else
{
v29 = (_DWORD *)a4;
if ( (unsigned int)a5 >= 0xFFFFFFF7 )
++*v29;
}
v16 = v15 & 0xFFFFFFFF00000000LL;
return v16 | (unsigned int)v15;
}
|
Subsets and Splits
C++ Functions Using STL
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ STL Function Queries
Filters C++ code examples that use standard library containers and algorithms, helping identify common programming patterns and library usage in code generation tasks.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.