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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
21,200 | ma_write_undo_key_insert | eloqsql/storage/maria/ma_write.c | int _ma_write_undo_key_insert(MARIA_HA *info, const MARIA_KEY *key,
my_off_t *root, my_off_t new_root, LSN *res_lsn)
{
MARIA_SHARE *share= info->s;
MARIA_KEYDEF *keyinfo= key->keyinfo;
uchar log_data[LSN_STORE_SIZE + FILEID_STORE_SIZE +
KEY_NR_STORE_SIZE];
const uchar *key_value;
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 2];
struct st_msg_to_write_hook_for_undo_key msg;
uint key_length;
/* Save if we need to write a clr record */
lsn_store(log_data, info->trn->undo_lsn);
key_nr_store(log_data + LSN_STORE_SIZE + FILEID_STORE_SIZE,
keyinfo->key_nr);
key_length= key->data_length + key->ref_length;
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= sizeof(log_data);
log_array[TRANSLOG_INTERNAL_PARTS + 1].str= key->data;
log_array[TRANSLOG_INTERNAL_PARTS + 1].length= key_length;
msg.root= root;
msg.value= new_root;
msg.auto_increment= 0;
key_value= key->data;
if (share->base.auto_key == ((uint) keyinfo->key_nr + 1))
{
const HA_KEYSEG *keyseg= keyinfo->seg;
uchar reversed[MARIA_MAX_KEY_BUFF];
if (keyseg->flag & HA_SWAP_KEY)
{
/* We put key from log record to "data record" packing format... */
const uchar *key_ptr= key->data, *key_end= key->data + keyseg->length;
uchar *to= reversed + keyseg->length;
do
{
*--to= *key_ptr++;
} while (key_ptr != key_end);
key_value= to;
}
/* ... so that we can read it with: */
msg.auto_increment=
ma_retrieve_auto_increment(key_value, keyseg->type);
/* and write_hook_for_undo_key_insert() will pick this. */
}
return translog_write_record(res_lsn, LOGREC_UNDO_KEY_INSERT,
info->trn, info,
(translog_size_t)
log_array[TRANSLOG_INTERNAL_PARTS + 0].length +
key_length,
TRANSLOG_INTERNAL_PARTS + 2, log_array,
log_data + LSN_STORE_SIZE, &msg) ? -1 : 0;
} | O0 | c | ma_write_undo_key_insert:
pushq %rbp
movq %rsp, %rbp
subq $0xae0, %rsp # imm = 0xAE0
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x9f8(%rbp)
movq %rsi, -0xa00(%rbp)
movq %rdx, -0xa08(%rbp)
movq %rcx, -0xa10(%rbp)
movq %r8, -0xa18(%rbp)
movq -0x9f8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xa20(%rbp)
movq -0xa00(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xa28(%rbp)
jmp 0x8c210
movq -0x9f8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x98(%rax), %rax
sarq $0x20, %rax
movb %al, -0x12(%rbp)
movq -0x9f8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x98(%rax), %rax
sarq $0x20, %rax
shrl $0x8, %eax
movb %al, -0x11(%rbp)
movq -0x9f8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x98(%rax), %rax
sarq $0x20, %rax
shrl $0x10, %eax
movb %al, -0x10(%rbp)
jmp 0x8c263
leaq -0x12(%rbp), %rax
addq $0x3, %rax
movq %rax, -0xaa0(%rbp)
movq -0x9f8(%rbp), %rax
movq 0x8(%rax), %rcx
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq 0x98(%rcx), %rax
movl %eax, %ecx
movq -0xaa0(%rbp), %rax
movl %ecx, (%rax)
jmp 0x8c29b
movq -0xa28(%rbp), %rax
movb 0xa5(%rax), %al
movb %al, -0x9(%rbp)
movq -0xa00(%rbp), %rax
movl 0x10(%rax), %eax
movq -0xa00(%rbp), %rcx
addl 0x14(%rcx), %eax
movl %eax, -0xa94(%rbp)
leaq -0x12(%rbp), %rax
movq %rax, -0xa50(%rbp)
movq $0xa, -0xa48(%rbp)
movq -0xa00(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xa40(%rbp)
movl -0xa94(%rbp), %eax
movq %rax, -0xa38(%rbp)
movq -0xa08(%rbp), %rax
movq %rax, -0xa90(%rbp)
movq -0xa10(%rbp), %rax
movq %rax, -0xa88(%rbp)
movq $0x0, -0xa78(%rbp)
movq -0xa00(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xa30(%rbp)
movq -0xa20(%rbp), %rax
movl 0x3ec(%rax), %eax
movq -0xa28(%rbp), %rcx
movzbl 0xa5(%rcx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jne 0x8c440
movq -0xa28(%rbp), %rax
movq 0xc0(%rax), %rax
movq %rax, -0xaa8(%rbp)
movq -0xaa8(%rbp), %rax
movzwl 0x12(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x8c422
movq -0xa00(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xab0(%rbp)
movq -0xa00(%rbp), %rax
movq (%rax), %rax
movq -0xaa8(%rbp), %rcx
movzwl 0x14(%rcx), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0xab8(%rbp)
leaq -0x9f0(%rbp), %rax
movq -0xaa8(%rbp), %rcx
movzwl 0x14(%rcx), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0xac0(%rbp)
movq -0xab0(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xab0(%rbp)
movb (%rax), %cl
movq -0xac0(%rbp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0xac0(%rbp)
movb %cl, -0x1(%rax)
movq -0xab0(%rbp), %rax
cmpq -0xab8(%rbp), %rax
jne 0x8c3d5
movq -0xac0(%rbp), %rax
movq %rax, -0xa30(%rbp)
movq -0xa30(%rbp), %rdi
movq -0xaa8(%rbp), %rax
movzbl 0x18(%rax), %esi
callq 0x7b660
movq %rax, -0xa78(%rbp)
movq -0xa18(%rbp), %rdi
movq -0x9f8(%rbp), %rcx
movq 0x8(%rcx), %rdx
movl -0xa48(%rbp), %r8d
movl -0xa94(%rbp), %eax
addl %eax, %r8d
leaq -0xb(%rbp), %rsi
movq %rsp, %rax
leaq -0xa90(%rbp), %r9
movq %r9, 0x10(%rax)
movq %rsi, 0x8(%rax)
leaq -0xa70(%rbp), %rsi
movq %rsi, (%rax)
movl $0x15, %esi
movl $0x4, %r9d
callq 0x49b40
movb %al, %cl
xorl %eax, %eax
negb %cl
sbbl %eax, %eax
movl %eax, -0xac4(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x8c4c1
movl -0xac4(%rbp), %eax
addq $0xae0, %rsp # imm = 0xAE0
popq %rbp
retq
callq 0x2a290
nopw %cs:(%rax,%rax)
| _ma_write_undo_key_insert:
push rbp
mov rbp, rsp
sub rsp, 0AE0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_9F8], rdi
mov [rbp+var_A00], rsi
mov [rbp+var_A08], rdx
mov [rbp+var_A10], rcx
mov [rbp+var_A18], r8
mov rax, [rbp+var_9F8]
mov rax, [rax]
mov [rbp+var_A20], rax
mov rax, [rbp+var_A00]
mov rax, [rax+8]
mov [rbp+var_A28], rax
jmp short $+2
loc_8C210:
mov rax, [rbp+var_9F8]
mov rax, [rax+8]
mov rax, [rax+98h]
sar rax, 20h
mov [rbp+var_12], al
mov rax, [rbp+var_9F8]
mov rax, [rax+8]
mov rax, [rax+98h]
sar rax, 20h
shr eax, 8
mov [rbp+var_11], al
mov rax, [rbp+var_9F8]
mov rax, [rax+8]
mov rax, [rax+98h]
sar rax, 20h
shr eax, 10h
mov [rbp+var_10], al
jmp short $+2
loc_8C263:
lea rax, [rbp+var_12]
add rax, 3
mov [rbp+var_AA0], rax
mov rax, [rbp+var_9F8]
mov rcx, [rax+8]
mov rax, 0FFFFFFFFh
and rax, [rcx+98h]
mov ecx, eax
mov rax, [rbp+var_AA0]
mov [rax], ecx
jmp short $+2
loc_8C29B:
mov rax, [rbp+var_A28]
mov al, [rax+0A5h]
mov [rbp+var_9], al
mov rax, [rbp+var_A00]
mov eax, [rax+10h]
mov rcx, [rbp+var_A00]
add eax, [rcx+14h]
mov [rbp+var_A94], eax
lea rax, [rbp+var_12]
mov [rbp+var_A50], rax
mov [rbp+var_A48], 0Ah
mov rax, [rbp+var_A00]
mov rax, [rax]
mov [rbp+var_A40], rax
mov eax, [rbp+var_A94]
mov [rbp+var_A38], rax
mov rax, [rbp+var_A08]
mov [rbp+var_A90], rax
mov rax, [rbp+var_A10]
mov [rbp+var_A88], rax
mov [rbp+var_A78], 0
mov rax, [rbp+var_A00]
mov rax, [rax]
mov [rbp+var_A30], rax
mov rax, [rbp+var_A20]
mov eax, [rax+3ECh]
mov rcx, [rbp+var_A28]
movzx ecx, byte ptr [rcx+0A5h]
add ecx, 1
cmp eax, ecx
jnz loc_8C440
mov rax, [rbp+var_A28]
mov rax, [rax+0C0h]
mov [rbp+var_AA8], rax
mov rax, [rbp+var_AA8]
movzx eax, word ptr [rax+12h]
and eax, 40h
cmp eax, 0
jz loc_8C422
mov rax, [rbp+var_A00]
mov rax, [rax]
mov [rbp+var_AB0], rax
mov rax, [rbp+var_A00]
mov rax, [rax]
mov rcx, [rbp+var_AA8]
movzx ecx, word ptr [rcx+14h]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_AB8], rax
lea rax, [rbp+var_9F0]
mov rcx, [rbp+var_AA8]
movzx ecx, word ptr [rcx+14h]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_AC0], rax
loc_8C3D5:
mov rax, [rbp+var_AB0]
mov rcx, rax
add rcx, 1
mov [rbp+var_AB0], rcx
mov cl, [rax]
mov rax, [rbp+var_AC0]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_AC0], rdx
mov [rax-1], cl
mov rax, [rbp+var_AB0]
cmp rax, [rbp+var_AB8]
jnz short loc_8C3D5
mov rax, [rbp+var_AC0]
mov [rbp+var_A30], rax
loc_8C422:
mov rdi, [rbp+var_A30]
mov rax, [rbp+var_AA8]
movzx esi, byte ptr [rax+18h]
call ma_retrieve_auto_increment
mov [rbp+var_A78], rax
loc_8C440:
mov rdi, [rbp+var_A18]
mov rcx, [rbp+var_9F8]
mov rdx, [rcx+8]
mov r8d, dword ptr [rbp+var_A48]
mov eax, [rbp+var_A94]
add r8d, eax
lea rsi, [rbp+var_B]
mov rax, rsp
lea r9, [rbp+var_A90]
mov [rax+10h], r9
mov [rax+8], rsi
lea rsi, [rbp+var_A70]
mov [rax], rsi
mov esi, 15h
mov r9d, 4
call translog_write_record
mov cl, al
xor eax, eax
neg cl
sbb eax, eax
mov [rbp+var_AC4], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_8C4C1
mov eax, [rbp+var_AC4]
add rsp, 0AE0h
pop rbp
retn
loc_8C4C1:
call ___stack_chk_fail
| long long ma_write_undo_key_insert(long long *a1, float **a2, long long a3, long long a4, long long a5)
{
float *v5; // rax
char v6; // cl
float *v7; // rax
float *v9; // [rsp+20h] [rbp-AC0h]
float *v10; // [rsp+28h] [rbp-AB8h]
float *v11; // [rsp+30h] [rbp-AB0h]
long long v12; // [rsp+38h] [rbp-AA8h]
unsigned int v13; // [rsp+4Ch] [rbp-A94h]
_QWORD v14[3]; // [rsp+50h] [rbp-A90h] BYREF
long long auto_increment; // [rsp+68h] [rbp-A78h]
_QWORD v16[5]; // [rsp+70h] [rbp-A70h] BYREF
long long v17; // [rsp+98h] [rbp-A48h]
float *v18; // [rsp+A0h] [rbp-A40h]
long long v19; // [rsp+A8h] [rbp-A38h]
float *v20; // [rsp+B0h] [rbp-A30h]
float *v21; // [rsp+B8h] [rbp-A28h]
long long v22; // [rsp+C0h] [rbp-A20h]
long long v23; // [rsp+C8h] [rbp-A18h]
long long v24; // [rsp+D0h] [rbp-A10h]
long long v25; // [rsp+D8h] [rbp-A08h]
float **v26; // [rsp+E0h] [rbp-A00h]
long long *v27; // [rsp+E8h] [rbp-9F8h]
_BYTE v28[2526]; // [rsp+F0h] [rbp-9F0h] BYREF
_BYTE v29[3]; // [rsp+ACEh] [rbp-12h] BYREF
int v30; // [rsp+AD1h] [rbp-Fh]
__int16 v31; // [rsp+AD5h] [rbp-Bh] BYREF
char v32; // [rsp+AD7h] [rbp-9h]
unsigned long long v33; // [rsp+AD8h] [rbp-8h]
v33 = __readfsqword(0x28u);
v27 = a1;
v26 = a2;
v25 = a3;
v24 = a4;
v23 = a5;
v22 = *a1;
v21 = a2[1];
v29[0] = BYTE4(*(_QWORD *)(a1[1] + 152));
v29[1] = (unsigned __int16)WORD2(*(_QWORD *)(a1[1] + 152)) >> 8;
v29[2] = BYTE6(*(_QWORD *)(a1[1] + 152));
v30 = *(_QWORD *)(a1[1] + 152);
v32 = *((_BYTE *)v21 + 165);
v13 = *((_DWORD *)v26 + 5) + *((_DWORD *)v26 + 4);
v16[4] = v29;
v17 = 10LL;
v18 = *a2;
v19 = v13;
v14[0] = a3;
v14[1] = a4;
auto_increment = 0LL;
v20 = *a2;
if ( *(_DWORD *)(v22 + 1004) == *((unsigned __int8 *)v21 + 165) + 1 )
{
v12 = *((_QWORD *)v21 + 24);
if ( (*(_WORD *)(v12 + 18) & 0x40) != 0 )
{
v11 = *v26;
v10 = (float *)((char *)*v26 + *(unsigned __int16 *)(v12 + 20));
v9 = (float *)&v28[*(unsigned __int16 *)(v12 + 20)];
do
{
v5 = v11;
v11 = (float *)((char *)v11 + 1);
v6 = *(_BYTE *)v5;
v7 = v9;
v9 = (float *)((char *)v9 - 1);
*((_BYTE *)v7 - 1) = v6;
}
while ( v11 != v10 );
v20 = v9;
}
auto_increment = ma_retrieve_auto_increment(v20, *(_BYTE *)(v12 + 24));
}
return (unsigned int)-(translog_write_record(v23, 0x15u, v27[1], v27, v13 + v17, 4u, v16, &v31, (long long)v14) != 0);
}
| _ma_write_undo_key_insert:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xae0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x9f8],RDI
MOV qword ptr [RBP + -0xa00],RSI
MOV qword ptr [RBP + -0xa08],RDX
MOV qword ptr [RBP + -0xa10],RCX
MOV qword ptr [RBP + -0xa18],R8
MOV RAX,qword ptr [RBP + -0x9f8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0xa20],RAX
MOV RAX,qword ptr [RBP + -0xa00]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0xa28],RAX
JMP 0x0018c210
LAB_0018c210:
MOV RAX,qword ptr [RBP + -0x9f8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x98]
SAR RAX,0x20
MOV byte ptr [RBP + -0x12],AL
MOV RAX,qword ptr [RBP + -0x9f8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x98]
SAR RAX,0x20
SHR EAX,0x8
MOV byte ptr [RBP + -0x11],AL
MOV RAX,qword ptr [RBP + -0x9f8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x98]
SAR RAX,0x20
SHR EAX,0x10
MOV byte ptr [RBP + -0x10],AL
JMP 0x0018c263
LAB_0018c263:
LEA RAX,[RBP + -0x12]
ADD RAX,0x3
MOV qword ptr [RBP + -0xaa0],RAX
MOV RAX,qword ptr [RBP + -0x9f8]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,0xffffffff
AND RAX,qword ptr [RCX + 0x98]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0xaa0]
MOV dword ptr [RAX],ECX
JMP 0x0018c29b
LAB_0018c29b:
MOV RAX,qword ptr [RBP + -0xa28]
MOV AL,byte ptr [RAX + 0xa5]
MOV byte ptr [RBP + -0x9],AL
MOV RAX,qword ptr [RBP + -0xa00]
MOV EAX,dword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0xa00]
ADD EAX,dword ptr [RCX + 0x14]
MOV dword ptr [RBP + -0xa94],EAX
LEA RAX,[RBP + -0x12]
MOV qword ptr [RBP + -0xa50],RAX
MOV qword ptr [RBP + -0xa48],0xa
MOV RAX,qword ptr [RBP + -0xa00]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0xa40],RAX
MOV EAX,dword ptr [RBP + -0xa94]
MOV qword ptr [RBP + -0xa38],RAX
MOV RAX,qword ptr [RBP + -0xa08]
MOV qword ptr [RBP + -0xa90],RAX
MOV RAX,qword ptr [RBP + -0xa10]
MOV qword ptr [RBP + -0xa88],RAX
MOV qword ptr [RBP + -0xa78],0x0
MOV RAX,qword ptr [RBP + -0xa00]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0xa30],RAX
MOV RAX,qword ptr [RBP + -0xa20]
MOV EAX,dword ptr [RAX + 0x3ec]
MOV RCX,qword ptr [RBP + -0xa28]
MOVZX ECX,byte ptr [RCX + 0xa5]
ADD ECX,0x1
CMP EAX,ECX
JNZ 0x0018c440
MOV RAX,qword ptr [RBP + -0xa28]
MOV RAX,qword ptr [RAX + 0xc0]
MOV qword ptr [RBP + -0xaa8],RAX
MOV RAX,qword ptr [RBP + -0xaa8]
MOVZX EAX,word ptr [RAX + 0x12]
AND EAX,0x40
CMP EAX,0x0
JZ 0x0018c422
MOV RAX,qword ptr [RBP + -0xa00]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0xab0],RAX
MOV RAX,qword ptr [RBP + -0xa00]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0xaa8]
MOVZX ECX,word ptr [RCX + 0x14]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0xab8],RAX
LEA RAX,[RBP + -0x9f0]
MOV RCX,qword ptr [RBP + -0xaa8]
MOVZX ECX,word ptr [RCX + 0x14]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0xac0],RAX
LAB_0018c3d5:
MOV RAX,qword ptr [RBP + -0xab0]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0xab0],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0xac0]
MOV RDX,RAX
ADD RDX,-0x1
MOV qword ptr [RBP + -0xac0],RDX
MOV byte ptr [RAX + -0x1],CL
MOV RAX,qword ptr [RBP + -0xab0]
CMP RAX,qword ptr [RBP + -0xab8]
JNZ 0x0018c3d5
MOV RAX,qword ptr [RBP + -0xac0]
MOV qword ptr [RBP + -0xa30],RAX
LAB_0018c422:
MOV RDI,qword ptr [RBP + -0xa30]
MOV RAX,qword ptr [RBP + -0xaa8]
MOVZX ESI,byte ptr [RAX + 0x18]
CALL 0x0017b660
MOV qword ptr [RBP + -0xa78],RAX
LAB_0018c440:
MOV RDI,qword ptr [RBP + -0xa18]
MOV RCX,qword ptr [RBP + -0x9f8]
MOV RDX,qword ptr [RCX + 0x8]
MOV R8D,dword ptr [RBP + -0xa48]
MOV EAX,dword ptr [RBP + -0xa94]
ADD R8D,EAX
LEA RSI,[RBP + -0xb]
MOV RAX,RSP
LEA R9,[RBP + -0xa90]
MOV qword ptr [RAX + 0x10],R9
MOV qword ptr [RAX + 0x8],RSI
LEA RSI,[RBP + -0xa70]
MOV qword ptr [RAX],RSI
MOV ESI,0x15
MOV R9D,0x4
CALL 0x00149b40
MOV CL,AL
XOR EAX,EAX
NEG CL
SBB EAX,EAX
MOV dword ptr [RBP + -0xac4],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0018c4c1
MOV EAX,dword ptr [RBP + -0xac4]
ADD RSP,0xae0
POP RBP
RET
LAB_0018c4c1:
CALL 0x0012a290
|
int _ma_write_undo_key_insert
(long *param_1,long *param_2,int8 param_3,int8 param_4,int8 param_5)
{
ushort uVar1;
long lVar2;
long lVar3;
char cVar4;
uint uVar5;
int1 *puVar6;
long in_FS_OFFSET;
int1 *local_ac8;
int1 *local_ab8;
int8 local_a98;
int8 local_a90;
int8 local_a80;
int1 local_a78 [32];
int1 *local_a58;
int8 local_a50;
long local_a48;
ulong local_a40;
int1 *local_a38;
long local_a30;
long local_a28;
int8 local_a20;
int8 local_a18;
int8 local_a10;
long *local_a08;
long *local_a00;
int1 local_9f8 [2526];
int1 local_1a;
int1 local_19;
int1 local_18;
int4 local_17;
int1 local_13 [2];
int1 local_11;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_a28 = *param_1;
local_a30 = param_2[1];
local_1a = (int1)((ulong)*(int8 *)(param_1[1] + 0x98) >> 0x20);
local_19 = (int1)((ulong)*(int8 *)(param_1[1] + 0x98) >> 0x28);
local_18 = (int1)((ulong)*(int8 *)(param_1[1] + 0x98) >> 0x30);
local_17 = (int4)*(int8 *)(param_1[1] + 0x98);
local_11 = *(int1 *)(local_a30 + 0xa5);
uVar5 = (int)param_2[2] + *(int *)((long)param_2 + 0x14);
local_a58 = &local_1a;
local_a50 = 10;
local_a48 = *param_2;
local_a40 = (ulong)uVar5;
local_a80 = 0;
local_a38 = (int1 *)*param_2;
local_a98 = param_3;
local_a90 = param_4;
local_a20 = param_5;
local_a18 = param_4;
local_a10 = param_3;
local_a08 = param_2;
local_a00 = param_1;
if (*(int *)(local_a28 + 0x3ec) == *(byte *)(local_a30 + 0xa5) + 1) {
lVar2 = *(long *)(local_a30 + 0xc0);
if ((*(ushort *)(lVar2 + 0x12) & 0x40) != 0) {
lVar3 = *param_2;
uVar1 = *(ushort *)(lVar2 + 0x14);
local_ac8 = local_9f8 + (int)(uint)*(ushort *)(lVar2 + 0x14);
local_ab8 = (int1 *)*param_2;
do {
puVar6 = local_ab8 + 1;
local_a38 = local_ac8 + -1;
local_ac8[-1] = *local_ab8;
local_ac8 = local_a38;
local_ab8 = puVar6;
} while (puVar6 != (int1 *)(lVar3 + (int)(uint)uVar1));
}
local_a80 = ma_retrieve_auto_increment(local_a38,*(int1 *)(lVar2 + 0x18));
}
cVar4 = translog_write_record
(local_a20,0x15,local_a00[1],local_a00,(int)local_a50 + uVar5,4,local_a78,
local_13,&local_a98);
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return -(uint)(cVar4 != '\0');
}
| |
21,201 | ma_test_if_reopen | eloqsql/storage/maria/ma_open.c | MARIA_HA *_ma_test_if_reopen(const char *filename)
{
LIST *pos;
for (pos=maria_open_list ; pos ; pos=pos->next)
{
MARIA_HA *info=(MARIA_HA*) pos->data;
MARIA_SHARE *share= info->s;
if (!strcmp(share->unique_file_name.str,filename) && share->last_version)
return info;
}
return 0;
} | O3 | c | ma_test_if_reopen:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x3d35a2(%rip), %rax # 0x40a130
movq (%rax), %r15
testq %r15, %r15
je 0x36bc8
movq %rdi, %rbx
movq 0x10(%r15), %r14
movq (%r14), %r12
movq 0x5b0(%r12), %rdi
movq %rbx, %rsi
callq 0x2a6d0
testl %eax, %eax
jne 0x36bbf
cmpq $0x0, 0x718(%r12)
jne 0x36bcb
movq 0x8(%r15), %r15
testq %r15, %r15
jne 0x36b99
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _ma_test_if_reopen:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
lea rax, maria_open_list
mov r15, [rax]
test r15, r15
jz short loc_36BC8
mov rbx, rdi
loc_36B99:
mov r14, [r15+10h]
mov r12, [r14]
mov rdi, [r12+5B0h]
mov rsi, rbx
call _strcmp
test eax, eax
jnz short loc_36BBF
cmp qword ptr [r12+718h], 0
jnz short loc_36BCB
loc_36BBF:
mov r15, [r15+8]
test r15, r15
jnz short loc_36B99
loc_36BC8:
xor r14d, r14d
loc_36BCB:
mov rax, r14
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long * ma_test_if_reopen(long long a1)
{
long long v1; // r15
long long *v2; // r14
long long v3; // r12
v1 = maria_open_list;
if ( !maria_open_list )
return 0LL;
while ( 1 )
{
v2 = *(long long **)(v1 + 16);
v3 = *v2;
if ( !(unsigned int)strcmp(*(_QWORD *)(*v2 + 1456), a1) )
{
if ( *(_QWORD *)(v3 + 1816) )
break;
}
v1 = *(_QWORD *)(v1 + 8);
if ( !v1 )
return 0LL;
}
return v2;
}
| _ma_test_if_reopen:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
LEA RAX,[0x50a130]
MOV R15,qword ptr [RAX]
TEST R15,R15
JZ 0x00136bc8
MOV RBX,RDI
LAB_00136b99:
MOV R14,qword ptr [R15 + 0x10]
MOV R12,qword ptr [R14]
MOV RDI,qword ptr [R12 + 0x5b0]
MOV RSI,RBX
CALL 0x0012a6d0
TEST EAX,EAX
JNZ 0x00136bbf
CMP qword ptr [R12 + 0x718],0x0
JNZ 0x00136bcb
LAB_00136bbf:
MOV R15,qword ptr [R15 + 0x8]
TEST R15,R15
JNZ 0x00136b99
LAB_00136bc8:
XOR R14D,R14D
LAB_00136bcb:
MOV RAX,R14
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
long * _ma_test_if_reopen(char *param_1)
{
long *plVar1;
long lVar2;
int iVar3;
long lVar4;
lVar4 = maria_open_list;
if (maria_open_list != 0) {
do {
plVar1 = *(long **)(lVar4 + 0x10);
lVar2 = *plVar1;
iVar3 = strcmp(*(char **)(lVar2 + 0x5b0),param_1);
if ((iVar3 == 0) && (*(long *)(lVar2 + 0x718) != 0)) {
return plVar1;
}
plVar1 = (long *)(lVar4 + 8);
lVar4 = *plVar1;
} while (*plVar1 != 0);
}
return (long *)0x0;
}
| |
21,202 | do_not | fabiosvm[P]rak/src/vm.c | static void do_not(RakVM *vm, RakChunk *chunk, uint32_t *ip, RakValue *slots, RakError *err)
{
rak_vm_not(vm);
dispatch(vm, chunk, ip + 1, slots, err);
} | O2 | c | do_not:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq 0x8(%rdi), %rax
movabsq $0x100000000, %rdx # imm = 0x100000000
movq (%rax), %rcx
andq %rdx, %rcx
incq %rdx
xorq %rcx, %rdx
shrq $0x20, %rcx
xorl %esi, %esi
callq 0x8075
movzbl 0x4(%r15), %eax
addq $0x4, %r15
leaq 0x6ee2(%rip), %r9 # 0xecf0
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmpq *(%r9,%rax,8)
| do_not:
push r15
push r14
push r13
push r12
push rbx
mov rbx, r8
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov r13, rdi
mov rax, [rdi+8]
mov rdx, 100000000h
mov rcx, [rax]
and rcx, rdx
inc rdx
xor rdx, rcx
shr rcx, 20h
xor esi, esi
call rak_vm_set
movzx eax, byte ptr [r15+4]
add r15, 4
lea r9, dispatchTable
mov rdi, r13
mov rsi, r12
mov rdx, r15
mov rcx, r14
mov r8, rbx
pop rbx
pop r12
pop r13
pop r14
pop r15
jmp ds:(dispatchTable - 0ECF0h)[r9+rax*8]
| void __noreturn do_not(long long a1, long long a2, long long a3)
{
rak_vm_set(
a1,
0LL,
**(_QWORD **)(a1 + 8) & 0x100000000LL ^ 0x100000001LL,
(**(_QWORD **)(a1 + 8) & 0x100000000uLL) >> 32);
((void ( __noreturn *)(long long, long long, long long))*(&dispatchTable + *(unsigned __int8 *)(a3 + 4)))(
a1,
a2,
a3 + 4);
}
| do_not:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,R8
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV R13,RDI
MOV RAX,qword ptr [RDI + 0x8]
MOV RDX,0x100000000
MOV RCX,qword ptr [RAX]
AND RCX,RDX
INC RDX
XOR RDX,RCX
SHR RCX,0x20
XOR ESI,ESI
CALL 0x00108075
MOVZX EAX,byte ptr [R15 + 0x4]
ADD R15,0x4
LEA R9,[0x10ecf0]
MOV RDI,R13
MOV RSI,R12
MOV RDX,R15
MOV RCX,R14
MOV R8,RBX
POP RBX
POP R12
POP R13
POP R14
POP R15
JMP qword ptr [R9 + RAX*0x8]
|
void do_not(long param_1,int8 param_2,long param_3,int8 param_4,int8 param_5)
{
ulong uVar1;
uVar1 = **(ulong **)(param_1 + 8) & 0x100000000;
rak_vm_set(param_1,0,uVar1 ^ 0x100000001,uVar1 >> 0x20);
/* WARNING: Could not recover jumptable at 0x00107e26. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(dispatchTable + (ulong)*(byte *)(param_3 + 4) * 8))
(param_1,param_2,param_3 + 4,param_4,param_5);
return;
}
| |
21,203 | sp_add_point_to_mbr | eloqsql/storage/maria/ma_sp_key.c | static int sp_add_point_to_mbr(uchar *(*wkb), uchar *end, uint n_dims,
uchar byte_order __attribute__((unused)),
double *mbr)
{
double ord;
double *mbr_end= mbr + n_dims * 2;
while (mbr < mbr_end)
{
if ((*wkb) > end - 8)
return -1;
float8get(ord, (const uchar*) *wkb);
(*wkb)+= 8;
if (ord < *mbr)
*mbr= ord;
mbr++;
if (ord > *mbr)
*mbr= ord;
mbr++;
}
return 0;
} | O0 | c | sp_add_point_to_mbr:
pushq %rbp
movq %rsp, %rbp
movb %cl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movb %al, -0x1d(%rbp)
movq %r8, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
shll %ecx
movl %ecx, %ecx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x9e69e
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
jbe 0x9e629
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9e6a5
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x8, %rcx
movq %rcx, (%rax)
movsd -0x30(%rbp), %xmm1
movq -0x28(%rbp), %rax
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x9e665
movsd -0x30(%rbp), %xmm0
movq -0x28(%rbp), %rax
movsd %xmm0, (%rax)
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
movsd -0x30(%rbp), %xmm0
movq -0x28(%rbp), %rax
ucomisd (%rax), %xmm0
jbe 0x9e68d
movsd -0x30(%rbp), %xmm0
movq -0x28(%rbp), %rax
movsd %xmm0, (%rax)
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
jmp 0x9e5fe
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
| sp_add_point_to_mbr:
push rbp
mov rbp, rsp
mov al, cl
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_1D], al
mov [rbp+var_28], r8
mov rax, [rbp+var_28]
mov ecx, [rbp+var_1C]
shl ecx, 1
mov ecx, ecx
shl rcx, 3
add rax, rcx
mov [rbp+var_38], rax
loc_9E5FE:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_38]
jnb loc_9E69E
mov rax, [rbp+var_10]
mov rax, [rax]
mov rcx, [rbp+var_18]
add rcx, 0FFFFFFFFFFFFFFF8h
cmp rax, rcx
jbe short loc_9E629
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_9E6A5
loc_9E629:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 8
mov [rax], rcx
movsd xmm1, [rbp+var_30]
mov rax, [rbp+var_28]
movsd xmm0, qword ptr [rax]
ucomisd xmm0, xmm1
jbe short loc_9E665
movsd xmm0, [rbp+var_30]
mov rax, [rbp+var_28]
movsd qword ptr [rax], xmm0
loc_9E665:
mov rax, [rbp+var_28]
add rax, 8
mov [rbp+var_28], rax
movsd xmm0, [rbp+var_30]
mov rax, [rbp+var_28]
ucomisd xmm0, qword ptr [rax]
jbe short loc_9E68D
movsd xmm0, [rbp+var_30]
mov rax, [rbp+var_28]
movsd qword ptr [rax], xmm0
loc_9E68D:
mov rax, [rbp+var_28]
add rax, 8
mov [rbp+var_28], rax
jmp loc_9E5FE
loc_9E69E:
mov [rbp+var_4], 0
loc_9E6A5:
mov eax, [rbp+var_4]
pop rbp
retn
| long long sp_add_point_to_mbr(unsigned long long *a1, long long a2, int a3, long long a4, double *a5)
{
double v6; // [rsp+8h] [rbp-30h]
double *i; // [rsp+10h] [rbp-28h]
double *v8; // [rsp+10h] [rbp-28h]
for ( i = a5; i < &a5[2 * a3]; i = v8 + 1 )
{
if ( *a1 > a2 - 8 )
return (unsigned int)-1;
v6 = *(double *)*a1;
*a1 += 8LL;
if ( *i > v6 )
*i = v6;
v8 = i + 1;
if ( v6 > *v8 )
*v8 = v6;
}
return 0;
}
| sp_add_point_to_mbr:
PUSH RBP
MOV RBP,RSP
MOV AL,CL
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV byte ptr [RBP + -0x1d],AL
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RBP + -0x1c]
SHL ECX,0x1
MOV ECX,ECX
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
LAB_0019e5fe:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x0019e69e
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x18]
ADD RCX,-0x8
CMP RAX,RCX
JBE 0x0019e629
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0019e6a5
LAB_0019e629:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x8
MOV qword ptr [RAX],RCX
MOVSD XMM1,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOVSD XMM0,qword ptr [RAX]
UCOMISD XMM0,XMM1
JBE 0x0019e665
MOVSD XMM0,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOVSD qword ptr [RAX],XMM0
LAB_0019e665:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x8
MOV qword ptr [RBP + -0x28],RAX
MOVSD XMM0,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
UCOMISD XMM0,qword ptr [RAX]
JBE 0x0019e68d
MOVSD XMM0,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOVSD qword ptr [RAX],XMM0
LAB_0019e68d:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x8
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0019e5fe
LAB_0019e69e:
MOV dword ptr [RBP + -0x4],0x0
LAB_0019e6a5:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4
sp_add_point_to_mbr(ulong *param_1,long param_2,int param_3,int8 param_4,double *param_5)
{
double dVar1;
double *pdVar2;
double *local_30;
local_30 = param_5;
while( true ) {
if (param_5 + (uint)(param_3 << 1) <= local_30) {
return 0;
}
if (param_2 - 8U < *param_1) break;
dVar1 = *(double *)*param_1;
*param_1 = *param_1 + 8;
if (dVar1 < *local_30) {
*local_30 = dVar1;
}
pdVar2 = local_30 + 1;
if (*pdVar2 <= dVar1 && dVar1 != *pdVar2) {
*pdVar2 = dVar1;
}
local_30 = local_30 + 2;
}
return 0xffffffff;
}
| |
21,204 | change_simple_key_cache_param | eloqsql/mysys/mf_keycache.c | static
void change_simple_key_cache_param(SIMPLE_KEY_CACHE_CB *keycache, uint division_limit,
uint age_threshold)
{
DBUG_ENTER("change_simple_key_cache_param");
keycache_pthread_mutex_lock(&keycache->cache_lock);
if (division_limit)
keycache->min_warm_blocks= (keycache->disk_blocks *
division_limit / 100 + 1);
if (age_threshold)
keycache->age_threshold= (keycache->disk_blocks *
age_threshold / 100);
keycache_pthread_mutex_unlock(&keycache->cache_lock);
DBUG_VOID_RETURN;
} | O0 | c | change_simple_key_cache_param:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
leaq 0x6e14d(%rip), %rsi # 0x1541e1
movl $0x399, %edx # imm = 0x399
callq 0xe35f0
cmpl $0x0, -0xc(%rbp)
je 0xe60c7
movq -0x8(%rbp), %rax
movl 0x48(%rax), %eax
imull -0xc(%rbp), %eax
movl $0x64, %ecx
xorl %edx, %edx
divl %ecx
addl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
cmpl $0x0, -0x10(%rbp)
je 0xe60ed
movq -0x8(%rbp), %rax
movl 0x48(%rax), %eax
imull -0x10(%rbp), %eax
movl $0x64, %ecx
xorl %edx, %edx
divl %ecx
movl %eax, %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
callq 0xe4010
jmp 0xe60ff
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| change_simple_key_cache_param:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
mov rdi, [rbp+var_8]
add rdi, 0C0h
lea rsi, aWorkspaceLlm4b_36; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 399h
call inline_mysql_mutex_lock_24
cmp [rbp+var_C], 0
jz short loc_E60C7
mov rax, [rbp+var_8]
mov eax, [rax+48h]
imul eax, [rbp+var_C]
mov ecx, 64h ; 'd'
xor edx, edx
div ecx
add eax, 1
mov eax, eax
mov ecx, eax
mov rax, [rbp+var_8]
mov [rax+20h], rcx
loc_E60C7:
cmp [rbp+var_10], 0
jz short loc_E60ED
mov rax, [rbp+var_8]
mov eax, [rax+48h]
imul eax, [rbp+var_10]
mov ecx, 64h ; 'd'
xor edx, edx
div ecx
mov eax, eax
mov ecx, eax
mov rax, [rbp+var_8]
mov [rax+28h], rcx
loc_E60ED:
mov rdi, [rbp+var_8]
add rdi, 0C0h
call inline_mysql_mutex_unlock_25
jmp short $+2
loc_E60FF:
add rsp, 10h
pop rbp
retn
| long long change_simple_key_cache_param(long long a1, int a2, int a3)
{
inline_mysql_mutex_lock_24(a1 + 192, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0x399u);
if ( a2 )
*(_QWORD *)(a1 + 32) = a2 * *(_DWORD *)(a1 + 72) / 0x64u + 1;
if ( a3 )
*(_QWORD *)(a1 + 40) = a3 * *(_DWORD *)(a1 + 72) / 0x64u;
return inline_mysql_mutex_unlock_25(a1 + 192);
}
| change_simple_key_cache_param:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
LEA RSI,[0x2541e1]
MOV EDX,0x399
CALL 0x001e35f0
CMP dword ptr [RBP + -0xc],0x0
JZ 0x001e60c7
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x48]
IMUL EAX,dword ptr [RBP + -0xc]
MOV ECX,0x64
XOR EDX,EDX
DIV ECX
ADD EAX,0x1
MOV EAX,EAX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x20],RCX
LAB_001e60c7:
CMP dword ptr [RBP + -0x10],0x0
JZ 0x001e60ed
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x48]
IMUL EAX,dword ptr [RBP + -0x10]
MOV ECX,0x64
XOR EDX,EDX
DIV ECX
MOV EAX,EAX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x28],RCX
LAB_001e60ed:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
CALL 0x001e4010
JMP 0x001e60ff
LAB_001e60ff:
ADD RSP,0x10
POP RBP
RET
|
void change_simple_key_cache_param(long param_1,int param_2,int param_3)
{
inline_mysql_mutex_lock
(param_1 + 0xc0,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0x399);
if (param_2 != 0) {
*(ulong *)(param_1 + 0x20) = (ulong)((uint)(*(int *)(param_1 + 0x48) * param_2) / 100 + 1);
}
if (param_3 != 0) {
*(ulong *)(param_1 + 0x28) = (ulong)(uint)(*(int *)(param_1 + 0x48) * param_3) / 100;
}
inline_mysql_mutex_unlock(param_1 + 0xc0);
return;
}
| |
21,205 | main | davidesantangelo[P]vsort/examples/struct_sorting_example.c | int main()
{
// Create an array of Person structures
Person people[] = {
{"John", 25, 1.75},
{"Alice", 22, 1.65},
{"Bob", 30, 1.80},
{"Eve", 20, 1.70},
{"Charlie", 35, 1.85}};
int n = sizeof(people) / sizeof(people[0]);
// Print unsorted array of people
printf("Unsorted people:\n");
for (int i = 0; i < n; i++)
{
printf("%s, age %d, height %.2f\n", people[i].name, people[i].age, people[i].height);
}
printf("\n");
// Sort by age
vsort_with_comparator(people, n, sizeof(Person), compare_by_age);
printf("People sorted by age:\n");
for (int i = 0; i < n; i++)
{
printf("%s, age %d, height %.2f\n", people[i].name, people[i].age, people[i].height);
}
printf("\n");
// Sort by name
vsort_with_comparator(people, n, sizeof(Person), compare_by_name);
printf("People sorted by name:\n");
for (int i = 0; i < n; i++)
{
printf("%s, age %d, height %.2f\n", people[i].name, people[i].age, people[i].height);
}
printf("\n");
return 0;
} | O3 | c | main:
pushq %r14
pushq %rbx
subq $0x138, %rsp # imm = 0x138
leaq 0x1ba7(%rip), %rsi # 0x3010
movq %rsp, %rdi
movl $0x12c, %edx # imm = 0x12C
callq 0x1120
leaq 0x1cd8(%rip), %rdi # 0x3155
callq 0x1080
xorl %r14d, %r14d
leaq 0x1cb0(%rip), %rbx # 0x313c
leaq (%rsp,%r14), %rsi
movl 0x34(%rsi), %edx
xorps %xmm0, %xmm0
cvtss2sd 0x38(%rsi), %xmm0
movq %rbx, %rdi
movb $0x1, %al
callq 0x10c0
addq $0x3c, %r14
cmpq $0x12c, %r14 # imm = 0x12C
jne 0x148c
movl $0xa, %edi
callq 0x1040
leaq -0x77(%rip), %rcx # 0x144c
movq %rsp, %rdi
movl $0x3c, %edx
movl $0x5, %esi
callq 0x12dd
leaq 0x1c8a(%rip), %rdi # 0x3166
callq 0x1080
xorl %r14d, %r14d
leaq 0x1c51(%rip), %rbx # 0x313c
leaq (%rsp,%r14), %rsi
movl 0x34(%rsi), %edx
xorps %xmm0, %xmm0
cvtss2sd 0x38(%rsi), %xmm0
movq %rbx, %rdi
movb $0x1, %al
callq 0x10c0
addq $0x3c, %r14
cmpq $0x12c, %r14 # imm = 0x12C
jne 0x14eb
movl $0xa, %edi
callq 0x1040
leaq -0xcf(%rip), %rcx # 0x1453
movq %rsp, %rdi
movl $0x3c, %edx
movl $0x5, %esi
callq 0x12dd
leaq 0x1c41(%rip), %rdi # 0x317c
callq 0x1080
xorl %r14d, %r14d
leaq 0x1bf2(%rip), %rbx # 0x313c
leaq (%rsp,%r14), %rsi
movl 0x34(%rsi), %edx
xorps %xmm0, %xmm0
cvtss2sd 0x38(%rsi), %xmm0
movq %rbx, %rdi
movb $0x1, %al
callq 0x10c0
addq $0x3c, %r14
cmpq $0x12c, %r14 # imm = 0x12C
jne 0x154a
movl $0xa, %edi
callq 0x1040
xorl %eax, %eax
addq $0x138, %rsp # imm = 0x138
popq %rbx
popq %r14
retq
nop
| main:
push r14
push rbx
sub rsp, 138h
lea rsi, aJohn; "John"
mov rdi, rsp
mov edx, 12Ch
call _memcpy
lea rdi, aUnsortedPeople; "Unsorted people:"
call _puts
xor r14d, r14d
lea rbx, aSAgeDHeight2f; "%s, age %d, height %.2f\n"
loc_148C:
lea rsi, [rsp+r14+148h+var_148]
mov edx, [rsi+34h]
xorps xmm0, xmm0
cvtss2sd xmm0, dword ptr [rsi+38h]
mov rdi, rbx
mov al, 1
call _printf
add r14, 3Ch ; '<'
cmp r14, 12Ch
jnz short loc_148C
mov edi, 0Ah
call _putchar
lea rcx, compare_by_age
mov rdi, rsp
mov edx, 3Ch ; '<'
mov esi, 5
call vsort_with_comparator
lea rdi, aPeopleSortedBy; "People sorted by age:"
call _puts
xor r14d, r14d
lea rbx, aSAgeDHeight2f; "%s, age %d, height %.2f\n"
loc_14EB:
lea rsi, [rsp+r14+148h+var_148]
mov edx, [rsi+34h]
xorps xmm0, xmm0
cvtss2sd xmm0, dword ptr [rsi+38h]
mov rdi, rbx
mov al, 1
call _printf
add r14, 3Ch ; '<'
cmp r14, 12Ch
jnz short loc_14EB
mov edi, 0Ah
call _putchar
lea rcx, compare_by_name
mov rdi, rsp
mov edx, 3Ch ; '<'
mov esi, 5
call vsort_with_comparator
lea rdi, aPeopleSortedBy_0; "People sorted by name:"
call _puts
xor r14d, r14d
lea rbx, aSAgeDHeight2f; "%s, age %d, height %.2f\n"
loc_154A:
lea rsi, [rsp+r14+148h+var_148]
mov edx, [rsi+34h]
xorps xmm0, xmm0
cvtss2sd xmm0, dword ptr [rsi+38h]
mov rdi, rbx
mov al, 1
call _printf
add r14, 3Ch ; '<'
cmp r14, 12Ch
jnz short loc_154A
mov edi, 0Ah
call _putchar
xor eax, eax
add rsp, 138h
pop rbx
pop r14
retn
| int main(int argc, const char **argv, const char **envp)
{
long long i; // r14
long long v4; // r8
long long v5; // r9
long long j; // r14
long long v7; // r8
long long v8; // r9
long long k; // r14
char v11[328]; // [rsp+0h] [rbp-148h] BYREF
memcpy(v11, "John", 300LL);
puts("Unsorted people:");
for ( i = 0LL; i != 300; i += 60LL )
printf("%s, age %d, height %.2f\n", &v11[i], *(_DWORD *)&v11[i + 52], *(float *)&v11[i + 56]);
putchar(10LL);
vsort_with_comparator((long long)v11, 5, 60LL, (long long)compare_by_age, v4, v5, v11[0]);
puts("People sorted by age:");
for ( j = 0LL; j != 300; j += 60LL )
printf("%s, age %d, height %.2f\n", &v11[j], *(_DWORD *)&v11[j + 52], *(float *)&v11[j + 56]);
putchar(10LL);
vsort_with_comparator((long long)v11, 5, 60LL, (long long)compare_by_name, v7, v8, v11[0]);
puts("People sorted by name:");
for ( k = 0LL; k != 300; k += 60LL )
printf("%s, age %d, height %.2f\n", &v11[k], *(_DWORD *)&v11[k + 52], *(float *)&v11[k + 56]);
putchar(10LL);
return 0;
}
| main:
PUSH R14
PUSH RBX
SUB RSP,0x138
LEA RSI,[0x103010]
MOV RDI,RSP
MOV EDX,0x12c
CALL 0x00101120
LEA RDI,[0x103155]
CALL 0x00101080
XOR R14D,R14D
LEA RBX,[0x10313c]
LAB_0010148c:
LEA RSI,[RSP + R14*0x1]
MOV EDX,dword ptr [RSI + 0x34]
XORPS XMM0,XMM0
CVTSS2SD XMM0,dword ptr [RSI + 0x38]
MOV RDI,RBX
MOV AL,0x1
CALL 0x001010c0
ADD R14,0x3c
CMP R14,0x12c
JNZ 0x0010148c
MOV EDI,0xa
CALL 0x00101040
LEA RCX,[0x10144c]
MOV RDI,RSP
MOV EDX,0x3c
MOV ESI,0x5
CALL 0x001012dd
LEA RDI,[0x103166]
CALL 0x00101080
XOR R14D,R14D
LEA RBX,[0x10313c]
LAB_001014eb:
LEA RSI,[RSP + R14*0x1]
MOV EDX,dword ptr [RSI + 0x34]
XORPS XMM0,XMM0
CVTSS2SD XMM0,dword ptr [RSI + 0x38]
MOV RDI,RBX
MOV AL,0x1
CALL 0x001010c0
ADD R14,0x3c
CMP R14,0x12c
JNZ 0x001014eb
MOV EDI,0xa
CALL 0x00101040
LEA RCX,[0x101453]
MOV RDI,RSP
MOV EDX,0x3c
MOV ESI,0x5
CALL 0x001012dd
LEA RDI,[0x10317c]
CALL 0x00101080
XOR R14D,R14D
LEA RBX,[0x10313c]
LAB_0010154a:
LEA RSI,[RSP + R14*0x1]
MOV EDX,dword ptr [RSI + 0x34]
XORPS XMM0,XMM0
CVTSS2SD XMM0,dword ptr [RSI + 0x38]
MOV RDI,RBX
MOV AL,0x1
CALL 0x001010c0
ADD R14,0x3c
CMP R14,0x12c
JNZ 0x0010154a
MOV EDI,0xa
CALL 0x00101040
XOR EAX,EAX
ADD RSP,0x138
POP RBX
POP R14
RET
|
int8 main(void)
{
long lVar1;
int1 local_148 [52];
uint local_114;
float local_110 [64];
memcpy(local_148,&DAT_00103010,300);
puts("Unsorted people:");
lVar1 = 0;
do {
printf("%s, age %d, height %.2f\n",(double)*(float *)((long)local_110 + lVar1),local_148 + lVar1
,(ulong)*(uint *)((long)&local_114 + lVar1));
lVar1 = lVar1 + 0x3c;
} while (lVar1 != 300);
putchar(10);
vsort_with_comparator(local_148,5,0x3c,compare_by_age);
puts("People sorted by age:");
lVar1 = 0;
do {
printf("%s, age %d, height %.2f\n",(double)*(float *)((long)local_110 + lVar1),local_148 + lVar1
,(ulong)*(uint *)((long)&local_114 + lVar1));
lVar1 = lVar1 + 0x3c;
} while (lVar1 != 300);
putchar(10);
vsort_with_comparator(local_148,5,0x3c,compare_by_name);
puts("People sorted by name:");
lVar1 = 0;
do {
printf("%s, age %d, height %.2f\n",(double)*(float *)((long)local_110 + lVar1),local_148 + lVar1
,(ulong)*(uint *)((long)&local_114 + lVar1));
lVar1 = lVar1 + 0x3c;
} while (lVar1 != 300);
putchar(10);
return 0;
}
| |
21,206 | LefDefParser::lefiLayer::addMinstep(double) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiLayer.cpp | void
lefiLayer::addMinstep(double distance)
{
double *ms;
char **mt;
double *ml;
int *me;
double *ma;
double *mb;
int *mx;
int i;
if (numMinstep_ == numMinstepAlloc_) {
int len;
if (numMinstepAlloc_ == 0) {
len = numMinstepAlloc_ = 2;
ms = (double*) lefMalloc(sizeof(double) * len);
mt = (char**) lefMalloc(sizeof(char*) * len);
ml = (double*) lefMalloc(sizeof(double) * len);
me = (int*) lefMalloc(sizeof(int) * len);
ma = (double*) lefMalloc(sizeof(double) * len);
mb = (double*) lefMalloc(sizeof(double) * len);
mx = (int*) lefMalloc(sizeof(int) * len);
} else {
len = numMinstepAlloc_ *= 2;
ms = (double*) lefMalloc(sizeof(double) * len);
mt = (char**) lefMalloc(sizeof(char*) * len);
ml = (double*) lefMalloc(sizeof(double) * len);
me = (int*) lefMalloc(sizeof(int) * len);
ma = (double*) lefMalloc(sizeof(double) * len);
mb = (double*) lefMalloc(sizeof(double) * len);
mx = (int*) lefMalloc(sizeof(int) * len);
for (i = 0; i < numMinstep_; i++) {
ms[i] = minstep_[i];
mt[i] = minstepType_[i];
ml[i] = minstepLengthsum_[i];
me[i] = minstepMaxEdges_[i];
ma[i] = minstepMinAdjLength_[i];
mb[i] = minstepMinBetLength_[i];
mx[i] = minstepXSameCorners_[i];
}
lefFree((char*) (minstep_));
lefFree((char*) (minstepType_));
lefFree((char*) (minstepLengthsum_));
lefFree((char*) (minstepMaxEdges_));
lefFree((char*) (minstepMinAdjLength_));
lefFree((char*) (minstepMinBetLength_));
lefFree((char*) (minstepXSameCorners_));
}
minstep_ = ms;
minstepType_ = mt;
minstepLengthsum_ = ml;
minstepMaxEdges_ = me;
minstepMinAdjLength_ = ma;
minstepMinBetLength_ = mb;
minstepXSameCorners_ = mx;
}
minstep_[numMinstep_] = distance;
minstepType_[numMinstep_] = 0;
minstepLengthsum_[numMinstep_] = -1;
minstepMaxEdges_[numMinstep_] = -1;
minstepMinAdjLength_[numMinstep_] = -1;
minstepMinBetLength_[numMinstep_] = -1;
minstepXSameCorners_[numMinstep_] = -1;
numMinstep_ += 1;
} | O3 | cpp | LefDefParser::lefiLayer::addMinstep(double):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl 0x278(%rdi), %eax
cmpl 0x27c(%rdi), %eax
jne 0x18b70
movsd %xmm0, 0x10(%rsp)
testl %eax, %eax
je 0x18b83
movslq %eax, %r12
addl %eax, %eax
movl %eax, 0x27c(%rbx)
movq %r12, %r14
shlq $0x4, %r14
movq %r14, %rdi
callq 0x24985
movq %rax, 0x8(%rsp)
movq %r14, %rdi
callq 0x24985
movq %rax, %r15
movq %r14, %rdi
callq 0x24985
movq %rax, (%rsp)
shlq $0x3, %r12
movq %r12, %rdi
callq 0x24985
movq %rax, %r13
movq %r14, %rdi
callq 0x24985
movq %rax, %rbp
movq %r14, %rdi
callq 0x24985
movq %rax, %r14
movq %r12, %rdi
callq 0x24985
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rax, %r12
cmpl $0x0, 0x278(%rbx)
jle 0x18b1a
xorl %eax, %eax
movq 0x280(%rbx), %rcx
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, (%rdx,%rax,8)
movq 0x288(%rbx), %rcx
movq (%rcx,%rax,8), %rcx
movq %rcx, (%r15,%rax,8)
movq 0x290(%rbx), %rcx
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, (%rsi,%rax,8)
movq 0x298(%rbx), %rcx
movl (%rcx,%rax,4), %ecx
movl %ecx, (%r13,%rax,4)
movq 0x2a0(%rbx), %rcx
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, (%rbp,%rax,8)
movq 0x2a8(%rbx), %rcx
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, (%r14,%rax,8)
movq 0x2b0(%rbx), %rcx
movl (%rcx,%rax,4), %ecx
movl %ecx, (%r12,%rax,4)
incq %rax
movslq 0x278(%rbx), %rcx
cmpq %rcx, %rax
jl 0x18a95
movq 0x280(%rbx), %rdi
callq 0x26040
movq 0x288(%rbx), %rdi
callq 0x26040
movq 0x290(%rbx), %rdi
callq 0x26040
movq 0x298(%rbx), %rdi
callq 0x26040
movq 0x2a0(%rbx), %rdi
callq 0x26040
movq 0x2a8(%rbx), %rdi
callq 0x26040
movq 0x2b0(%rbx), %rdi
callq 0x26040
jmp 0x18beb
movq 0x280(%rbx), %rcx
movq 0x288(%rbx), %r15
jmp 0x18c31
movl $0x2, 0x27c(%rbx)
movl $0x10, %edi
callq 0x24985
movq %rax, 0x8(%rsp)
movl $0x10, %edi
callq 0x24985
movq %rax, %r15
movl $0x10, %edi
callq 0x24985
movq %rax, (%rsp)
movl $0x8, %edi
callq 0x24985
movq %rax, %r13
movl $0x10, %edi
callq 0x24985
movq %rax, %rbp
movl $0x10, %edi
callq 0x24985
movq %rax, %r14
movl $0x8, %edi
callq 0x24985
movq %rax, %r12
movq 0x8(%rsp), %rcx
movq %rcx, 0x280(%rbx)
movq %r15, 0x288(%rbx)
movq (%rsp), %rax
movq %rax, 0x290(%rbx)
movq %r13, 0x298(%rbx)
movq %rbp, 0x2a0(%rbx)
movq %r14, 0x2a8(%rbx)
movq %r12, 0x2b0(%rbx)
movl 0x278(%rbx), %eax
movsd 0x10(%rsp), %xmm0
cltq
movsd %xmm0, (%rcx,%rax,8)
movq $0x0, (%r15,%rax,8)
movq 0x290(%rbx), %rcx
movabsq $-0x4010000000000000, %rdx # imm = 0xBFF0000000000000
movq %rdx, (%rcx,%rax,8)
movq 0x298(%rbx), %rcx
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
movl %esi, (%rcx,%rax,4)
movq 0x2a0(%rbx), %rax
movslq 0x278(%rbx), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x2a8(%rbx), %rax
movq %rdx, (%rax,%rcx,8)
movq 0x2b0(%rbx), %rax
movl %esi, (%rax,%rcx,4)
incl 0x278(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN12LefDefParser9lefiLayer10addMinstepEd:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
mov eax, [rdi+278h]
cmp eax, [rdi+27Ch]
jnz loc_18B70
movsd [rsp+48h+var_38], xmm0
test eax, eax
jz loc_18B83
movsxd r12, eax
add eax, eax
mov [rbx+27Ch], eax
mov r14, r12
shl r14, 4
mov rdi, r14; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rsp+48h+var_40], rax
mov rdi, r14; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov r15, rax
mov rdi, r14; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rsp+48h+var_48], rax
shl r12, 3
mov rdi, r12; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov r13, rax
mov rdi, r14; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov rbp, rax
mov rdi, r14; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov r14, rax
mov rdi, r12; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov rsi, [rsp+48h+var_48]; unsigned __int64
mov rdx, [rsp+48h+var_40]
mov r12, rax
cmp dword ptr [rbx+278h], 0
jle loc_18B1A
xor eax, eax
loc_18A95:
mov rcx, [rbx+280h]
movsd xmm0, qword ptr [rcx+rax*8]
movsd qword ptr [rdx+rax*8], xmm0
mov rcx, [rbx+288h]
mov rcx, [rcx+rax*8]
mov [r15+rax*8], rcx
mov rcx, [rbx+290h]
movsd xmm0, qword ptr [rcx+rax*8]
movsd qword ptr [rsi+rax*8], xmm0
mov rcx, [rbx+298h]
mov ecx, [rcx+rax*4]
mov [r13+rax*4+0], ecx
mov rcx, [rbx+2A0h]
movsd xmm0, qword ptr [rcx+rax*8]
movsd qword ptr [rbp+rax*8+0], xmm0
mov rcx, [rbx+2A8h]
movsd xmm0, qword ptr [rcx+rax*8]
movsd qword ptr [r14+rax*8], xmm0
mov rcx, [rbx+2B0h]
mov ecx, [rcx+rax*4]
mov [r12+rax*4], ecx
inc rax
movsxd rcx, dword ptr [rbx+278h]
cmp rax, rcx
jl loc_18A95
loc_18B1A:
mov rdi, [rbx+280h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rdi, [rbx+288h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rdi, [rbx+290h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rdi, [rbx+298h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rdi, [rbx+2A0h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rdi, [rbx+2A8h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rdi, [rbx+2B0h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
jmp short loc_18BEB
loc_18B70:
mov rcx, [rbx+280h]
mov r15, [rbx+288h]
jmp loc_18C31
loc_18B83:
mov dword ptr [rbx+27Ch], 2
mov edi, offset word_10; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rsp+48h+var_40], rax
mov edi, offset word_10; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov r15, rax
mov edi, offset word_10; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rsp+48h+var_48], rax
mov edi, offset byte_8; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov r13, rax
mov edi, offset word_10; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov rbp, rax
mov edi, offset word_10; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov r14, rax
mov edi, offset byte_8; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov r12, rax
loc_18BEB:
mov rcx, [rsp+48h+var_40]
mov [rbx+280h], rcx
mov [rbx+288h], r15
mov rax, [rsp+48h+var_48]
mov [rbx+290h], rax
mov [rbx+298h], r13
mov [rbx+2A0h], rbp
mov [rbx+2A8h], r14
mov [rbx+2B0h], r12
mov eax, [rbx+278h]
movsd xmm0, [rsp+48h+var_38]
loc_18C31:
cdqe
movsd qword ptr [rcx+rax*8], xmm0
mov qword ptr [r15+rax*8], 0
mov rcx, [rbx+290h]
mov rdx, 0BFF0000000000000h
mov [rcx+rax*8], rdx
mov rcx, [rbx+298h]
mov esi, 0FFFFFFFFh
mov [rcx+rax*4], esi
mov rax, [rbx+2A0h]
movsxd rcx, dword ptr [rbx+278h]
mov [rax+rcx*8], rdx
mov rax, [rbx+2A8h]
mov [rax+rcx*8], rdx
mov rax, [rbx+2B0h]
mov [rax+rcx*4], esi
inc dword ptr [rbx+278h]
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long LefDefParser::lefiLayer::addMinstep(LefDefParser::lefiLayer *this, double a2, unsigned long long a3)
{
int v3; // eax
LefDefParser *v4; // r12
LefDefParser *v5; // r14
long long v6; // r15
long long v7; // r13
long long v8; // rbp
long long v9; // r14
long long v10; // r12
long long v11; // rax
long long v12; // rcx
long long v13; // rcx
long long result; // rax
_QWORD *v15; // [rsp+0h] [rbp-48h]
long long v16; // [rsp+8h] [rbp-40h]
v3 = *((_DWORD *)this + 158);
if ( v3 == *((_DWORD *)this + 159) )
{
if ( v3 )
{
v4 = (LefDefParser *)v3;
*((_DWORD *)this + 159) = 2 * v3;
v5 = (LefDefParser *)(16LL * v3);
v16 = LefDefParser::lefMalloc(v5, a3);
v6 = LefDefParser::lefMalloc((LefDefParser *)(16LL * (_QWORD)v4), a3);
v15 = (_QWORD *)LefDefParser::lefMalloc((LefDefParser *)(16LL * (_QWORD)v4), a3);
v4 = (LefDefParser *)(8LL * (_QWORD)v4);
v7 = LefDefParser::lefMalloc(v4, a3);
v8 = LefDefParser::lefMalloc(v5, a3);
v9 = LefDefParser::lefMalloc(v5, a3);
v10 = LefDefParser::lefMalloc(v4, a3);
if ( *((int *)this + 158) > 0 )
{
v11 = 0LL;
do
{
*(_QWORD *)(v16 + 8 * v11) = *(_QWORD *)(*((_QWORD *)this + 80) + 8 * v11);
*(_QWORD *)(v6 + 8 * v11) = *(_QWORD *)(*((_QWORD *)this + 81) + 8 * v11);
v15[v11] = *(_QWORD *)(*((_QWORD *)this + 82) + 8 * v11);
*(_DWORD *)(v7 + 4 * v11) = *(_DWORD *)(*((_QWORD *)this + 83) + 4 * v11);
*(_QWORD *)(v8 + 8 * v11) = *(_QWORD *)(*((_QWORD *)this + 84) + 8 * v11);
*(_QWORD *)(v9 + 8 * v11) = *(_QWORD *)(*((_QWORD *)this + 85) + 8 * v11);
*(_DWORD *)(v10 + 4 * v11) = *(_DWORD *)(*((_QWORD *)this + 86) + 4 * v11);
++v11;
}
while ( v11 < *((int *)this + 158) );
}
LefDefParser::lefFree(*((LefDefParser **)this + 80), v15);
LefDefParser::lefFree(*((LefDefParser **)this + 81), v15);
LefDefParser::lefFree(*((LefDefParser **)this + 82), v15);
LefDefParser::lefFree(*((LefDefParser **)this + 83), v15);
LefDefParser::lefFree(*((LefDefParser **)this + 84), v15);
LefDefParser::lefFree(*((LefDefParser **)this + 85), v15);
LefDefParser::lefFree(*((LefDefParser **)this + 86), v15);
}
else
{
*((_DWORD *)this + 159) = 2;
v16 = LefDefParser::lefMalloc((LefDefParser *)&word_10, a3);
v6 = LefDefParser::lefMalloc((LefDefParser *)&word_10, a3);
v15 = (_QWORD *)LefDefParser::lefMalloc((LefDefParser *)&word_10, a3);
v7 = LefDefParser::lefMalloc((LefDefParser *)&byte_8, a3);
v8 = LefDefParser::lefMalloc((LefDefParser *)&word_10, a3);
v9 = LefDefParser::lefMalloc((LefDefParser *)&word_10, a3);
v10 = LefDefParser::lefMalloc((LefDefParser *)&byte_8, a3);
}
v12 = v16;
*((_QWORD *)this + 80) = v16;
*((_QWORD *)this + 81) = v6;
*((_QWORD *)this + 82) = v15;
*((_QWORD *)this + 83) = v7;
*((_QWORD *)this + 84) = v8;
*((_QWORD *)this + 85) = v9;
*((_QWORD *)this + 86) = v10;
v3 = *((_DWORD *)this + 158);
}
else
{
v12 = *((_QWORD *)this + 80);
v6 = *((_QWORD *)this + 81);
}
*(double *)(v12 + 8LL * v3) = a2;
*(_QWORD *)(v6 + 8LL * v3) = 0LL;
*(_QWORD *)(*((_QWORD *)this + 82) + 8LL * v3) = 0xBFF0000000000000LL;
*(_DWORD *)(*((_QWORD *)this + 83) + 4LL * v3) = -1;
v13 = *((int *)this + 158);
*(_QWORD *)(*((_QWORD *)this + 84) + 8 * v13) = 0xBFF0000000000000LL;
*(_QWORD *)(*((_QWORD *)this + 85) + 8 * v13) = 0xBFF0000000000000LL;
result = *((_QWORD *)this + 86);
*(_DWORD *)(result + 4 * v13) = -1;
++*((_DWORD *)this + 158);
return result;
}
| addMinstep:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV EAX,dword ptr [RDI + 0x278]
CMP EAX,dword ptr [RDI + 0x27c]
JNZ 0x00118b70
MOVSD qword ptr [RSP + 0x10],XMM0
TEST EAX,EAX
JZ 0x00118b83
MOVSXD R12,EAX
ADD EAX,EAX
MOV dword ptr [RBX + 0x27c],EAX
MOV R14,R12
SHL R14,0x4
MOV RDI,R14
CALL 0x00124985
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,R14
CALL 0x00124985
MOV R15,RAX
MOV RDI,R14
CALL 0x00124985
MOV qword ptr [RSP],RAX
SHL R12,0x3
MOV RDI,R12
CALL 0x00124985
MOV R13,RAX
MOV RDI,R14
CALL 0x00124985
MOV RBP,RAX
MOV RDI,R14
CALL 0x00124985
MOV R14,RAX
MOV RDI,R12
CALL 0x00124985
MOV RSI,qword ptr [RSP]
MOV RDX,qword ptr [RSP + 0x8]
MOV R12,RAX
CMP dword ptr [RBX + 0x278],0x0
JLE 0x00118b1a
XOR EAX,EAX
LAB_00118a95:
MOV RCX,qword ptr [RBX + 0x280]
MOVSD XMM0,qword ptr [RCX + RAX*0x8]
MOVSD qword ptr [RDX + RAX*0x8],XMM0
MOV RCX,qword ptr [RBX + 0x288]
MOV RCX,qword ptr [RCX + RAX*0x8]
MOV qword ptr [R15 + RAX*0x8],RCX
MOV RCX,qword ptr [RBX + 0x290]
MOVSD XMM0,qword ptr [RCX + RAX*0x8]
MOVSD qword ptr [RSI + RAX*0x8],XMM0
MOV RCX,qword ptr [RBX + 0x298]
MOV ECX,dword ptr [RCX + RAX*0x4]
MOV dword ptr [R13 + RAX*0x4],ECX
MOV RCX,qword ptr [RBX + 0x2a0]
MOVSD XMM0,qword ptr [RCX + RAX*0x8]
MOVSD qword ptr [RBP + RAX*0x8],XMM0
MOV RCX,qword ptr [RBX + 0x2a8]
MOVSD XMM0,qword ptr [RCX + RAX*0x8]
MOVSD qword ptr [R14 + RAX*0x8],XMM0
MOV RCX,qword ptr [RBX + 0x2b0]
MOV ECX,dword ptr [RCX + RAX*0x4]
MOV dword ptr [R12 + RAX*0x4],ECX
INC RAX
MOVSXD RCX,dword ptr [RBX + 0x278]
CMP RAX,RCX
JL 0x00118a95
LAB_00118b1a:
MOV RDI,qword ptr [RBX + 0x280]
CALL 0x00126040
MOV RDI,qword ptr [RBX + 0x288]
CALL 0x00126040
MOV RDI,qword ptr [RBX + 0x290]
CALL 0x00126040
MOV RDI,qword ptr [RBX + 0x298]
CALL 0x00126040
MOV RDI,qword ptr [RBX + 0x2a0]
CALL 0x00126040
MOV RDI,qword ptr [RBX + 0x2a8]
CALL 0x00126040
MOV RDI,qword ptr [RBX + 0x2b0]
CALL 0x00126040
JMP 0x00118beb
LAB_00118b70:
MOV RCX,qword ptr [RBX + 0x280]
MOV R15,qword ptr [RBX + 0x288]
JMP 0x00118c31
LAB_00118b83:
MOV dword ptr [RBX + 0x27c],0x2
MOV EDI,0x10
CALL 0x00124985
MOV qword ptr [RSP + 0x8],RAX
MOV EDI,0x10
CALL 0x00124985
MOV R15,RAX
MOV EDI,0x10
CALL 0x00124985
MOV qword ptr [RSP],RAX
MOV EDI,0x8
CALL 0x00124985
MOV R13,RAX
MOV EDI,0x10
CALL 0x00124985
MOV RBP,RAX
MOV EDI,0x10
CALL 0x00124985
MOV R14,RAX
MOV EDI,0x8
CALL 0x00124985
MOV R12,RAX
LAB_00118beb:
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RBX + 0x280],RCX
MOV qword ptr [RBX + 0x288],R15
MOV RAX,qword ptr [RSP]
MOV qword ptr [RBX + 0x290],RAX
MOV qword ptr [RBX + 0x298],R13
MOV qword ptr [RBX + 0x2a0],RBP
MOV qword ptr [RBX + 0x2a8],R14
MOV qword ptr [RBX + 0x2b0],R12
MOV EAX,dword ptr [RBX + 0x278]
MOVSD XMM0,qword ptr [RSP + 0x10]
LAB_00118c31:
CDQE
MOVSD qword ptr [RCX + RAX*0x8],XMM0
MOV qword ptr [R15 + RAX*0x8],0x0
MOV RCX,qword ptr [RBX + 0x290]
MOV RDX,-0x4010000000000000
MOV qword ptr [RCX + RAX*0x8],RDX
MOV RCX,qword ptr [RBX + 0x298]
MOV ESI,0xffffffff
MOV dword ptr [RCX + RAX*0x4],ESI
MOV RAX,qword ptr [RBX + 0x2a0]
MOVSXD RCX,dword ptr [RBX + 0x278]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV RAX,qword ptr [RBX + 0x2a8]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV RAX,qword ptr [RBX + 0x2b0]
MOV dword ptr [RAX + RCX*0x4],ESI
INC dword ptr [RBX + 0x278]
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* LefDefParser::lefiLayer::addMinstep(double) */
void LefDefParser::lefiLayer::addMinstep(double param_1)
{
int iVar1;
long lVar2;
long lVar3;
long lVar4;
long lVar5;
long lVar6;
long lVar7;
ulong in_RSI;
long in_RDI;
LefDefParser *this;
LefDefParser *this_00;
int8 local_48;
int8 local_40;
iVar1 = *(int *)(in_RDI + 0x278);
if (iVar1 == *(int *)(in_RDI + 0x27c)) {
if (iVar1 == 0) {
*(int4 *)(in_RDI + 0x27c) = 2;
local_40 = lefMalloc((LefDefParser *)0x10,in_RSI);
lVar2 = lefMalloc((LefDefParser *)0x10,in_RSI);
local_48 = lefMalloc((LefDefParser *)0x10,in_RSI);
lVar3 = lefMalloc((LefDefParser *)0x8,in_RSI);
lVar4 = lefMalloc((LefDefParser *)0x10,in_RSI);
lVar5 = lefMalloc((LefDefParser *)0x10,in_RSI);
lVar6 = lefMalloc((LefDefParser *)0x8,in_RSI);
}
else {
*(int *)(in_RDI + 0x27c) = iVar1 * 2;
this_00 = (LefDefParser *)((long)iVar1 << 4);
local_40 = lefMalloc(this_00,in_RSI);
lVar2 = lefMalloc(this_00,in_RSI);
local_48 = lefMalloc(this_00,in_RSI);
this = (LefDefParser *)((long)iVar1 << 3);
lVar3 = lefMalloc(this,in_RSI);
lVar4 = lefMalloc(this_00,in_RSI);
lVar5 = lefMalloc(this_00,in_RSI);
lVar6 = lefMalloc(this,in_RSI);
if (0 < *(int *)(in_RDI + 0x278)) {
lVar7 = 0;
do {
*(int8 *)(local_40 + lVar7 * 8) =
*(int8 *)(*(long *)(in_RDI + 0x280) + lVar7 * 8);
*(int8 *)(lVar2 + lVar7 * 8) =
*(int8 *)(*(long *)(in_RDI + 0x288) + lVar7 * 8);
*(int8 *)(local_48 + lVar7 * 8) =
*(int8 *)(*(long *)(in_RDI + 0x290) + lVar7 * 8);
*(int4 *)(lVar3 + lVar7 * 4) =
*(int4 *)(*(long *)(in_RDI + 0x298) + lVar7 * 4);
*(int8 *)(lVar4 + lVar7 * 8) =
*(int8 *)(*(long *)(in_RDI + 0x2a0) + lVar7 * 8);
*(int8 *)(lVar5 + lVar7 * 8) =
*(int8 *)(*(long *)(in_RDI + 0x2a8) + lVar7 * 8);
*(int4 *)(lVar6 + lVar7 * 4) =
*(int4 *)(*(long *)(in_RDI + 0x2b0) + lVar7 * 4);
lVar7 = lVar7 + 1;
} while (lVar7 < *(int *)(in_RDI + 0x278));
}
lefFree(*(void **)(in_RDI + 0x280));
lefFree(*(void **)(in_RDI + 0x288));
lefFree(*(void **)(in_RDI + 0x290));
lefFree(*(void **)(in_RDI + 0x298));
lefFree(*(void **)(in_RDI + 0x2a0));
lefFree(*(void **)(in_RDI + 0x2a8));
lefFree(*(void **)(in_RDI + 0x2b0));
}
*(long *)(in_RDI + 0x280) = local_40;
*(long *)(in_RDI + 0x288) = lVar2;
*(long *)(in_RDI + 0x290) = local_48;
*(long *)(in_RDI + 0x298) = lVar3;
*(long *)(in_RDI + 0x2a0) = lVar4;
*(long *)(in_RDI + 0x2a8) = lVar5;
*(long *)(in_RDI + 0x2b0) = lVar6;
iVar1 = *(int *)(in_RDI + 0x278);
}
else {
local_40 = *(long *)(in_RDI + 0x280);
lVar2 = *(long *)(in_RDI + 0x288);
}
lVar3 = (long)iVar1;
*(double *)(local_40 + lVar3 * 8) = param_1;
*(int8 *)(lVar2 + lVar3 * 8) = 0;
*(int8 *)(*(long *)(in_RDI + 0x290) + lVar3 * 8) = 0xbff0000000000000;
*(int4 *)(*(long *)(in_RDI + 0x298) + lVar3 * 4) = 0xffffffff;
lVar2 = (long)*(int *)(in_RDI + 0x278);
*(int8 *)(*(long *)(in_RDI + 0x2a0) + lVar2 * 8) = 0xbff0000000000000;
*(int8 *)(*(long *)(in_RDI + 0x2a8) + lVar2 * 8) = 0xbff0000000000000;
*(int4 *)(*(long *)(in_RDI + 0x2b0) + lVar2 * 4) = 0xffffffff;
*(int *)(in_RDI + 0x278) = *(int *)(in_RDI + 0x278) + 1;
return;
}
| |
21,207 | my_strnncollsp_tis620 | eloqsql/strings/ctype-tis620.c | static
int my_strnncollsp_tis620(CHARSET_INFO * cs __attribute__((unused)),
const uchar *a0, size_t a_length,
const uchar *b0, size_t b_length)
{
uchar buf[80], *end, *a, *b, *alloced= NULL;
size_t length;
int res= 0;
a= buf;
if ((a_length + b_length +2) > (int) sizeof(buf))
alloced= a= (uchar*) my_malloc(PSI_INSTRUMENT_ME, a_length+b_length+2, MYF(MY_FAE));
b= a + a_length+1;
if (a_length)
memcpy((char*) a, (char*) a0, a_length);
a[a_length]= 0; /* if length(a0)> len1, need to put 'end of string' */
if (b_length)
memcpy((char *)b, (char *)b0, b_length);
b[b_length]= 0; /* put end of string */
a_length= thai2sortable(a, a_length);
b_length= thai2sortable(b, b_length);
end= a + (length= MY_MIN(a_length, b_length));
while (a < end)
{
if (*a++ != *b++)
{
res= ((int) a[-1] - (int) b[-1]);
goto ret;
}
}
res= a_length == b_length ? 0 :
a_length < b_length ?
-my_strnncollsp_padspace_bin(b, b_length - length) :
my_strnncollsp_padspace_bin(a, a_length - length);
ret:
if (alloced)
my_free(alloced);
return res;
} | O3 | c | my_strnncollsp_tis620:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r8, %r14
movq %rcx, -0x90(%rbp)
movq %rdx, %r15
movq %rsi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
leaq (%rdx,%r8), %rsi
addq $0x2, %rsi
cmpq $0x51, %rsi
jb 0xb7d40
movl $0x8, %edx
xorl %edi, %edi
callq 0x9fd89
movq %rax, %r12
movq %rax, -0x88(%rbp)
jmp 0xb7d4f
movq $0x0, -0x88(%rbp)
leaq -0x80(%rbp), %r12
leaq (%r12,%r15), %r13
testq %r15, %r15
je 0xb7d66
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x29080
leaq (%r12,%r15), %rbx
incq %rbx
movb $0x0, (%r13)
testq %r14, %r14
je 0xb7d89
movq %rbx, %rdi
movq -0x90(%rbp), %rsi
movq %r14, %rdx
callq 0x29080
movb $0x0, (%rbx,%r14)
movq %r12, %rdi
movq %r15, %rsi
callq 0xb7ee7
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb7ee7
cmpq %r14, %r15
movq %r14, %rax
cmovbq %r15, %rax
leaq (%r12,%rax), %rcx
cmpq %rcx, %r12
jae 0xb7dcf
movzbl (%r12), %r13d
movzbl 0x1(%r12,%r15), %edx
incq %r12
cmpb %dl, %r13b
je 0xb7db2
subl %edx, %r13d
jmp 0xb7e04
xorl %r13d, %r13d
cmpq %r14, %r15
je 0xb7e04
jae 0xb7df3
leaq (%r15,%r12), %rdi
incq %rdi
subq %rax, %r14
movq %r14, %rsi
callq 0xac3fd
movl %eax, %r13d
negl %r13d
jmp 0xb7e04
subq %rax, %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0xac3fd
movl %eax, %r13d
movq -0x88(%rbp), %rdi
testq %rdi, %rdi
je 0xb7e15
callq 0x9ffb6
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0xb7e36
movl %r13d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
| my_strnncollsp_tis620:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r14, r8
mov [rbp+var_90], rcx
mov r15, rdx
mov rbx, rsi
mov rax, fs:28h
mov [rbp+var_30], rax
lea rsi, [rdx+r8]
add rsi, 2
cmp rsi, 51h ; 'Q'
jb short loc_B7D40
mov edx, 8
xor edi, edi
call my_malloc
mov r12, rax
mov [rbp+var_88], rax
jmp short loc_B7D4F
loc_B7D40:
mov [rbp+var_88], 0
lea r12, [rbp+var_80]
loc_B7D4F:
lea r13, [r12+r15]
test r15, r15
jz short loc_B7D66
mov rdi, r12
mov rsi, rbx
mov rdx, r15
call _memcpy
loc_B7D66:
lea rbx, [r12+r15]
inc rbx
mov byte ptr [r13+0], 0
test r14, r14
jz short loc_B7D89
mov rdi, rbx
mov rsi, [rbp+var_90]
mov rdx, r14
call _memcpy
loc_B7D89:
mov byte ptr [rbx+r14], 0
mov rdi, r12
mov rsi, r15
call thai2sortable
mov rdi, rbx
mov rsi, r14
call thai2sortable
cmp r15, r14
mov rax, r14
cmovb rax, r15
lea rcx, [r12+rax]
loc_B7DB2:
cmp r12, rcx
jnb short loc_B7DCF
movzx r13d, byte ptr [r12]
movzx edx, byte ptr [r12+r15+1]
inc r12
cmp r13b, dl
jz short loc_B7DB2
sub r13d, edx
jmp short loc_B7E04
loc_B7DCF:
xor r13d, r13d
cmp r15, r14
jz short loc_B7E04
jnb short loc_B7DF3
lea rdi, [r15+r12]
inc rdi
sub r14, rax
mov rsi, r14
call my_strnncollsp_padspace_bin
mov r13d, eax
neg r13d
jmp short loc_B7E04
loc_B7DF3:
sub r15, rax
mov rdi, r12
mov rsi, r15
call my_strnncollsp_padspace_bin
mov r13d, eax
loc_B7E04:
mov rdi, [rbp+var_88]
test rdi, rdi
jz short loc_B7E15
call my_free
loc_B7E15:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_B7E36
mov eax, r13d
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_B7E36:
call ___stack_chk_fail
| long long my_strnncollsp_tis620(long long a1, long long a2, unsigned long long a3, long long a4, unsigned long long a5)
{
const char *v8; // rsi
unsigned __int8 *v9; // r12
unsigned long long v10; // rax
unsigned __int8 *v11; // rcx
int v12; // r13d
int v13; // edx
unsigned int v14; // r13d
long long v17; // [rsp+8h] [rbp-88h]
char v18; // [rsp+10h] [rbp-80h] BYREF
unsigned long long v19; // [rsp+60h] [rbp-30h]
v19 = __readfsqword(0x28u);
v8 = (const char *)(a3 + a5 + 2);
if ( (unsigned long long)v8 < 0x51 )
{
v17 = 0LL;
v9 = (unsigned __int8 *)&v18;
}
else
{
v9 = (unsigned __int8 *)my_malloc(0, v8, 8);
v17 = (long long)v9;
}
if ( a3 )
memcpy(v9, a2, a3);
v9[a3] = 0;
if ( a5 )
memcpy(&v9[a3 + 1], a4, a5);
v9[a3 + 1 + a5] = 0;
thai2sortable(v9, a3);
thai2sortable(&v9[a3 + 1], a5);
v10 = a5;
if ( a3 < a5 )
v10 = a3;
v11 = &v9[v10];
while ( v9 < v11 )
{
v12 = *v9;
v13 = v9[a3 + 1];
++v9;
if ( (_BYTE)v12 != (_BYTE)v13 )
{
v14 = v12 - v13;
goto LABEL_18;
}
}
v14 = 0;
if ( a3 != a5 )
{
if ( a3 >= a5 )
v14 = my_strnncollsp_padspace_bin((long long)v9, a3 - v10);
else
v14 = -(int)my_strnncollsp_padspace_bin((long long)&v9[a3 + 1], a5 - v10);
}
LABEL_18:
if ( v17 )
my_free(v17);
return v14;
}
| my_strnncollsp_tis620:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R14,R8
MOV qword ptr [RBP + -0x90],RCX
MOV R15,RDX
MOV RBX,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
LEA RSI,[RDX + R8*0x1]
ADD RSI,0x2
CMP RSI,0x51
JC 0x001b7d40
MOV EDX,0x8
XOR EDI,EDI
CALL 0x0019fd89
MOV R12,RAX
MOV qword ptr [RBP + -0x88],RAX
JMP 0x001b7d4f
LAB_001b7d40:
MOV qword ptr [RBP + -0x88],0x0
LEA R12,[RBP + -0x80]
LAB_001b7d4f:
LEA R13,[R12 + R15*0x1]
TEST R15,R15
JZ 0x001b7d66
MOV RDI,R12
MOV RSI,RBX
MOV RDX,R15
CALL 0x00129080
LAB_001b7d66:
LEA RBX,[R12 + R15*0x1]
INC RBX
MOV byte ptr [R13],0x0
TEST R14,R14
JZ 0x001b7d89
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0x90]
MOV RDX,R14
CALL 0x00129080
LAB_001b7d89:
MOV byte ptr [RBX + R14*0x1],0x0
MOV RDI,R12
MOV RSI,R15
CALL 0x001b7ee7
MOV RDI,RBX
MOV RSI,R14
CALL 0x001b7ee7
CMP R15,R14
MOV RAX,R14
CMOVC RAX,R15
LEA RCX,[R12 + RAX*0x1]
LAB_001b7db2:
CMP R12,RCX
JNC 0x001b7dcf
MOVZX R13D,byte ptr [R12]
MOVZX EDX,byte ptr [R12 + R15*0x1 + 0x1]
INC R12
CMP R13B,DL
JZ 0x001b7db2
SUB R13D,EDX
JMP 0x001b7e04
LAB_001b7dcf:
XOR R13D,R13D
CMP R15,R14
JZ 0x001b7e04
JNC 0x001b7df3
LEA RDI,[R15 + R12*0x1]
INC RDI
SUB R14,RAX
MOV RSI,R14
CALL 0x001ac3fd
MOV R13D,EAX
NEG R13D
JMP 0x001b7e04
LAB_001b7df3:
SUB R15,RAX
MOV RDI,R12
MOV RSI,R15
CALL 0x001ac3fd
MOV R13D,EAX
LAB_001b7e04:
MOV RDI,qword ptr [RBP + -0x88]
TEST RDI,RDI
JZ 0x001b7e15
CALL 0x0019ffb6
LAB_001b7e15:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001b7e36
MOV EAX,R13D
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001b7e36:
CALL 0x00129270
|
int my_strnncollsp_tis620
(int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5)
{
byte *pbVar1;
byte bVar2;
byte *__dest;
byte *pbVar3;
ulong uVar4;
int iVar5;
long in_FS_OFFSET;
byte *local_90;
byte local_88 [80];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar4 = param_3 + param_5 + 2;
if (uVar4 < 0x51) {
local_90 = (byte *)0x0;
__dest = local_88;
}
else {
__dest = (byte *)my_malloc(0,uVar4,8);
local_90 = __dest;
}
if (param_3 != 0) {
memcpy(__dest,param_2,param_3);
}
pbVar3 = __dest + param_3 + 1;
__dest[param_3] = 0;
if (param_5 != 0) {
memcpy(pbVar3,param_4,param_5);
}
pbVar3[param_5] = 0;
thai2sortable(__dest,param_3);
thai2sortable(pbVar3,param_5);
uVar4 = param_5;
if (param_3 < param_5) {
uVar4 = param_3;
}
pbVar3 = __dest + uVar4;
do {
if (pbVar3 <= __dest) {
iVar5 = 0;
if (param_3 != param_5) {
if (param_3 < param_5) {
iVar5 = my_strnncollsp_padspace_bin(__dest + param_3 + 1,param_5 - uVar4);
iVar5 = -iVar5;
}
else {
iVar5 = my_strnncollsp_padspace_bin(__dest,param_3 - uVar4);
}
}
goto LAB_001b7e04;
}
bVar2 = *__dest;
pbVar1 = __dest + param_3 + 1;
__dest = __dest + 1;
} while (bVar2 == *pbVar1);
iVar5 = (uint)bVar2 - (uint)*pbVar1;
LAB_001b7e04:
if (local_90 != (byte *)0x0) {
my_free();
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return iVar5;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
21,208 | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) | monkey531[P]llama/common/./json.hpp | static diyfp mul(const diyfp& x, const diyfp& y) noexcept
{
static_assert(kPrecision == 64, "internal error");
// Computes:
// f = round((x.f * y.f) / 2^q)
// e = x.e + y.e + q
// Emulate the 64-bit * 64-bit multiplication:
//
// p = u * v
// = (u_lo + 2^32 u_hi) (v_lo + 2^32 v_hi)
// = (u_lo v_lo ) + 2^32 ((u_lo v_hi ) + (u_hi v_lo )) + 2^64 (u_hi v_hi )
// = (p0 ) + 2^32 ((p1 ) + (p2 )) + 2^64 (p3 )
// = (p0_lo + 2^32 p0_hi) + 2^32 ((p1_lo + 2^32 p1_hi) + (p2_lo + 2^32 p2_hi)) + 2^64 (p3 )
// = (p0_lo ) + 2^32 (p0_hi + p1_lo + p2_lo ) + 2^64 (p1_hi + p2_hi + p3)
// = (p0_lo ) + 2^32 (Q ) + 2^64 (H )
// = (p0_lo ) + 2^32 (Q_lo + 2^32 Q_hi ) + 2^64 (H )
//
// (Since Q might be larger than 2^32 - 1)
//
// = (p0_lo + 2^32 Q_lo) + 2^64 (Q_hi + H)
//
// (Q_hi + H does not overflow a 64-bit int)
//
// = p_lo + 2^64 p_hi
const std::uint64_t u_lo = x.f & 0xFFFFFFFFu;
const std::uint64_t u_hi = x.f >> 32u;
const std::uint64_t v_lo = y.f & 0xFFFFFFFFu;
const std::uint64_t v_hi = y.f >> 32u;
const std::uint64_t p0 = u_lo * v_lo;
const std::uint64_t p1 = u_lo * v_hi;
const std::uint64_t p2 = u_hi * v_lo;
const std::uint64_t p3 = u_hi * v_hi;
const std::uint64_t p0_hi = p0 >> 32u;
const std::uint64_t p1_lo = p1 & 0xFFFFFFFFu;
const std::uint64_t p1_hi = p1 >> 32u;
const std::uint64_t p2_lo = p2 & 0xFFFFFFFFu;
const std::uint64_t p2_hi = p2 >> 32u;
std::uint64_t Q = p0_hi + p1_lo + p2_lo;
// The full product might now be computed as
//
// p_hi = p3 + p2_hi + p1_hi + (Q >> 32)
// p_lo = p0_lo + (Q << 32)
//
// But in this particular case here, the full p_lo is not required.
// Effectively we only need to add the highest bit in p_lo to p_hi (and
// Q_hi + 1 does not overflow).
Q += std::uint64_t{1} << (64u - 32u - 1u); // round, ties up
const std::uint64_t h = p3 + p2_hi + p1_hi + (Q >> 32u);
return {h, x.e + y.e + 64};
} | O1 | cpp | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&):
movq (%rdi), %rax
movl %eax, %ecx
shrq $0x20, %rax
movq (%rsi), %r8
movl %r8d, %edx
shrq $0x20, %r8
movq %rdx, %r9
imulq %rcx, %r9
imulq %r8, %rcx
imulq %rax, %rdx
imulq %rax, %r8
shrq $0x20, %r9
movl %ecx, %r10d
addq %r9, %r10
shrq $0x20, %rcx
movl %edx, %eax
addq %r10, %rax
shrq $0x20, %rdx
addq %r8, %rdx
addq %rcx, %rdx
subq $-0x80000000, %rax # imm = 0x80000000
shrq $0x20, %rax
addq %rdx, %rax
movl 0x8(%rdi), %ecx
movl 0x8(%rsi), %edx
addl %ecx, %edx
addl $0x40, %edx
retq
| _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3mulERKS3_S5_:
mov rax, [rdi]
mov ecx, eax
shr rax, 20h
mov r8, [rsi]
mov edx, r8d
shr r8, 20h
mov r9, rdx
imul r9, rcx
imul rcx, r8
imul rdx, rax
imul r8, rax
shr r9, 20h
mov r10d, ecx
add r10, r9
shr rcx, 20h
mov eax, edx
add rax, r10
shr rdx, 20h
add rdx, r8
add rdx, rcx
sub rax, 0FFFFFFFF80000000h
shr rax, 20h
add rax, rdx
mov ecx, [rdi+8]
mov edx, [rsi+8]
add edx, ecx
add edx, 40h ; '@'
retn
| unsigned long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(_QWORD *a1, _QWORD *a2)
{
long long v2; // rcx
v2 = (unsigned int)*a1;
return ((unsigned long long)(HIDWORD(*a2) * v2) >> 32)
+ HIDWORD(*a1) * HIDWORD(*a2)
+ ((HIDWORD(*a1) * (unsigned long long)(unsigned int)*a2) >> 32)
+ ((((v2 * (unsigned long long)(unsigned int)*a2) >> 32)
+ (unsigned int)(HIDWORD(*a2) * v2)
+ (unsigned int)(HIDWORD(*a1) * *a2)
+ 0x80000000) >> 32);
}
| mul:
MOV RAX,qword ptr [RDI]
MOV ECX,EAX
SHR RAX,0x20
MOV R8,qword ptr [RSI]
MOV EDX,R8D
SHR R8,0x20
MOV R9,RDX
IMUL R9,RCX
IMUL RCX,R8
IMUL RDX,RAX
IMUL R8,RAX
SHR R9,0x20
MOV R10D,ECX
ADD R10,R9
SHR RCX,0x20
MOV EAX,EDX
ADD RAX,R10
SHR RDX,0x20
ADD RDX,R8
ADD RDX,RCX
SUB RAX,-0x80000000
SHR RAX,0x20
ADD RAX,RDX
MOV ECX,dword ptr [RDI + 0x8]
MOV EDX,dword ptr [RSI + 0x8]
ADD EDX,ECX
ADD EDX,0x40
RET
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp
const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) */
int1 [16]
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(diyfp *param_1,diyfp *param_2)
{
ulong uVar1;
ulong uVar2;
ulong uVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
int1 auVar7 [16];
uVar2 = *(ulong *)param_1 & 0xffffffff;
uVar1 = *(ulong *)param_1 >> 0x20;
uVar4 = *(ulong *)param_2 & 0xffffffff;
uVar6 = *(ulong *)param_2 >> 0x20;
uVar3 = uVar2 * uVar6;
uVar5 = uVar4 * uVar1;
auVar7._0_8_ = ((uVar5 & 0xffffffff) + (uVar3 & 0xffffffff) + (uVar4 * uVar2 >> 0x20) + 0x80000000
>> 0x20) + (uVar5 >> 0x20) + uVar6 * uVar1 + (uVar3 >> 0x20);
auVar7._8_4_ = *(int *)(param_2 + 8) + *(int *)(param_1 + 8) + 0x40;
auVar7._12_4_ = 0;
return auVar7;
}
| |
21,209 | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) | monkey531[P]llama/common/./json.hpp | static diyfp mul(const diyfp& x, const diyfp& y) noexcept
{
static_assert(kPrecision == 64, "internal error");
// Computes:
// f = round((x.f * y.f) / 2^q)
// e = x.e + y.e + q
// Emulate the 64-bit * 64-bit multiplication:
//
// p = u * v
// = (u_lo + 2^32 u_hi) (v_lo + 2^32 v_hi)
// = (u_lo v_lo ) + 2^32 ((u_lo v_hi ) + (u_hi v_lo )) + 2^64 (u_hi v_hi )
// = (p0 ) + 2^32 ((p1 ) + (p2 )) + 2^64 (p3 )
// = (p0_lo + 2^32 p0_hi) + 2^32 ((p1_lo + 2^32 p1_hi) + (p2_lo + 2^32 p2_hi)) + 2^64 (p3 )
// = (p0_lo ) + 2^32 (p0_hi + p1_lo + p2_lo ) + 2^64 (p1_hi + p2_hi + p3)
// = (p0_lo ) + 2^32 (Q ) + 2^64 (H )
// = (p0_lo ) + 2^32 (Q_lo + 2^32 Q_hi ) + 2^64 (H )
//
// (Since Q might be larger than 2^32 - 1)
//
// = (p0_lo + 2^32 Q_lo) + 2^64 (Q_hi + H)
//
// (Q_hi + H does not overflow a 64-bit int)
//
// = p_lo + 2^64 p_hi
const std::uint64_t u_lo = x.f & 0xFFFFFFFFu;
const std::uint64_t u_hi = x.f >> 32u;
const std::uint64_t v_lo = y.f & 0xFFFFFFFFu;
const std::uint64_t v_hi = y.f >> 32u;
const std::uint64_t p0 = u_lo * v_lo;
const std::uint64_t p1 = u_lo * v_hi;
const std::uint64_t p2 = u_hi * v_lo;
const std::uint64_t p3 = u_hi * v_hi;
const std::uint64_t p0_hi = p0 >> 32u;
const std::uint64_t p1_lo = p1 & 0xFFFFFFFFu;
const std::uint64_t p1_hi = p1 >> 32u;
const std::uint64_t p2_lo = p2 & 0xFFFFFFFFu;
const std::uint64_t p2_hi = p2 >> 32u;
std::uint64_t Q = p0_hi + p1_lo + p2_lo;
// The full product might now be computed as
//
// p_hi = p3 + p2_hi + p1_hi + (Q >> 32)
// p_lo = p0_lo + (Q << 32)
//
// But in this particular case here, the full p_lo is not required.
// Effectively we only need to add the highest bit in p_lo to p_hi (and
// Q_hi + 1 does not overflow).
Q += std::uint64_t{1} << (64u - 32u - 1u); // round, ties up
const std::uint64_t h = p3 + p2_hi + p1_hi + (Q >> 32u);
return {h, x.e + y.e + 64};
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&):
movq (%rdi), %rax
movl %eax, %ecx
shrq $0x20, %rax
movq (%rsi), %r8
movl %r8d, %edx
shrq $0x20, %r8
movq %rdx, %r9
imulq %rcx, %r9
imulq %r8, %rcx
imulq %rax, %rdx
imulq %rax, %r8
shrq $0x20, %r9
movl %ecx, %r10d
addq %r9, %r10
shrq $0x20, %rcx
movl %edx, %eax
addq %r10, %rax
shrq $0x20, %rdx
addq %r8, %rdx
addq %rcx, %rdx
subq $-0x80000000, %rax # imm = 0x80000000
shrq $0x20, %rax
addq %rdx, %rax
movl 0x8(%rdi), %ecx
movl 0x8(%rsi), %edx
addl %ecx, %edx
addl $0x40, %edx
retq
| _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3mulERKS3_S5_:
mov rax, [rdi]
mov ecx, eax
shr rax, 20h
mov r8, [rsi]
mov edx, r8d
shr r8, 20h
mov r9, rdx
imul r9, rcx
imul rcx, r8
imul rdx, rax
imul r8, rax
shr r9, 20h
mov r10d, ecx
add r10, r9
shr rcx, 20h
mov eax, edx
add rax, r10
shr rdx, 20h
add rdx, r8
add rdx, rcx
sub rax, 0FFFFFFFF80000000h
shr rax, 20h
add rax, rdx
mov ecx, [rdi+8]
mov edx, [rsi+8]
add edx, ecx
add edx, 40h ; '@'
retn
| unsigned long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(_QWORD *a1, _QWORD *a2)
{
long long v2; // rcx
v2 = (unsigned int)*a1;
return ((unsigned long long)(HIDWORD(*a2) * v2) >> 32)
+ HIDWORD(*a1) * HIDWORD(*a2)
+ ((HIDWORD(*a1) * (unsigned long long)(unsigned int)*a2) >> 32)
+ ((((v2 * (unsigned long long)(unsigned int)*a2) >> 32)
+ (unsigned int)(HIDWORD(*a2) * v2)
+ (unsigned int)(HIDWORD(*a1) * *a2)
+ 0x80000000) >> 32);
}
| mul:
MOV RAX,qword ptr [RDI]
MOV ECX,EAX
SHR RAX,0x20
MOV R8,qword ptr [RSI]
MOV EDX,R8D
SHR R8,0x20
MOV R9,RDX
IMUL R9,RCX
IMUL RCX,R8
IMUL RDX,RAX
IMUL R8,RAX
SHR R9,0x20
MOV R10D,ECX
ADD R10,R9
SHR RCX,0x20
MOV EAX,EDX
ADD RAX,R10
SHR RDX,0x20
ADD RDX,R8
ADD RDX,RCX
SUB RAX,-0x80000000
SHR RAX,0x20
ADD RAX,RDX
MOV ECX,dword ptr [RDI + 0x8]
MOV EDX,dword ptr [RSI + 0x8]
ADD EDX,ECX
ADD EDX,0x40
RET
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp
const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) */
int1 [16]
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(diyfp *param_1,diyfp *param_2)
{
ulong uVar1;
ulong uVar2;
ulong uVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
int1 auVar7 [16];
uVar2 = *(ulong *)param_1 & 0xffffffff;
uVar1 = *(ulong *)param_1 >> 0x20;
uVar4 = *(ulong *)param_2 & 0xffffffff;
uVar6 = *(ulong *)param_2 >> 0x20;
uVar3 = uVar2 * uVar6;
uVar5 = uVar4 * uVar1;
auVar7._0_8_ = ((uVar5 & 0xffffffff) + (uVar3 & 0xffffffff) + (uVar4 * uVar2 >> 0x20) + 0x80000000
>> 0x20) + (uVar5 >> 0x20) + uVar6 * uVar1 + (uVar3 >> 0x20);
auVar7._8_4_ = *(int *)(param_2 + 8) + *(int *)(param_1 + 8) + 0x40;
auVar7._12_4_ = 0;
return auVar7;
}
| |
21,210 | glfwDefaultWindowHints | untodesu[P]riteg/build_O1/_deps/glfw-src/src/window.c | void glfwDefaultWindowHints(void)
{
_GLFW_REQUIRE_INIT();
// The default is OpenGL with minimum version 1.0
memset(&_glfw.hints.context, 0, sizeof(_glfw.hints.context));
_glfw.hints.context.client = GLFW_OPENGL_API;
_glfw.hints.context.source = GLFW_NATIVE_CONTEXT_API;
_glfw.hints.context.major = 1;
_glfw.hints.context.minor = 0;
// The default is a focused, visible, resizable window with decorations
memset(&_glfw.hints.window, 0, sizeof(_glfw.hints.window));
_glfw.hints.window.resizable = GLFW_TRUE;
_glfw.hints.window.visible = GLFW_TRUE;
_glfw.hints.window.decorated = GLFW_TRUE;
_glfw.hints.window.focused = GLFW_TRUE;
_glfw.hints.window.autoIconify = GLFW_TRUE;
_glfw.hints.window.centerCursor = GLFW_TRUE;
_glfw.hints.window.focusOnShow = GLFW_TRUE;
// The default is 24 bits of color, 24 bits of depth and 8 bits of stencil,
// double buffered
memset(&_glfw.hints.framebuffer, 0, sizeof(_glfw.hints.framebuffer));
_glfw.hints.framebuffer.redBits = 8;
_glfw.hints.framebuffer.greenBits = 8;
_glfw.hints.framebuffer.blueBits = 8;
_glfw.hints.framebuffer.alphaBits = 8;
_glfw.hints.framebuffer.depthBits = 24;
_glfw.hints.framebuffer.stencilBits = 8;
_glfw.hints.framebuffer.doublebuffer = GLFW_TRUE;
// The default is to select the highest available refresh rate
_glfw.hints.refreshRate = GLFW_DONT_CARE;
// The default is to use full Retina resolution framebuffers
_glfw.hints.window.ns.retina = GLFW_TRUE;
} | O1 | c | glfwDefaultWindowHints:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x8764a(%rip), %rbx # 0xa4638
cmpl $0x0, (%rbx)
je 0x1d09e
xorps %xmm0, %xmm0
movups %xmm0, 0x3c0(%rbx)
movups %xmm0, 0x3b0(%rbx)
xorl %r14d, %r14d
movq %r14, 0x3d0(%rbx)
movaps 0x630c7(%rip), %xmm0 # 0x800e0
movups %xmm0, 0x3a0(%rbx)
leaq 0x60(%rbx), %rdi
movl $0x340, %edx # imm = 0x340
xorl %esi, %esi
callq 0xc470
movaps 0x630b9(%rip), %xmm0 # 0x800f0
movups %xmm0, 0x70(%rbx)
movl $0x1, %eax
movl %eax, 0x80(%rbx)
movabsq $0x100000001, %rcx # imm = 0x100000001
movq %rcx, 0x8c(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rbx)
movups %xmm0, 0x48(%rbx)
movups %xmm0, 0x38(%rbx)
movq %r14, 0x58(%rbx)
movaps 0x6308f(%rip), %xmm0 # 0x80100
movups %xmm0, 0x18(%rbx)
movabsq $0x800000018, %rcx # imm = 0x800000018
movq %rcx, 0x28(%rbx)
movl %eax, 0x50(%rbx)
movl $0xffffffff, 0x3d8(%rbx) # imm = 0xFFFFFFFF
movl %eax, 0x98(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10001, %edi # imm = 0x10001
xorl %esi, %esi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x19081
| glfwDefaultWindowHints:
push r14
push rbx
push rax
lea rbx, _glfw
cmp dword ptr [rbx], 0
jz loc_1D09E
xorps xmm0, xmm0
movups xmmword ptr [rbx+3C0h], xmm0
movups xmmword ptr [rbx+3B0h], xmm0
xor r14d, r14d
mov [rbx+3D0h], r14
movaps xmm0, cs:xmmword_800E0
movups xmmword ptr [rbx+3A0h], xmm0
lea rdi, [rbx+60h]
mov edx, 340h
xor esi, esi
call _memset
movaps xmm0, cs:xmmword_800F0
movups xmmword ptr [rbx+70h], xmm0
mov eax, 1
mov [rbx+80h], eax
mov rcx, 100000001h
mov [rbx+8Ch], rcx
xorps xmm0, xmm0
movups xmmword ptr [rbx+28h], xmm0
movups xmmword ptr [rbx+48h], xmm0
movups xmmword ptr [rbx+38h], xmm0
mov [rbx+58h], r14
movaps xmm0, cs:xmmword_80100
movups xmmword ptr [rbx+18h], xmm0
mov rcx, 800000018h
mov [rbx+28h], rcx
mov [rbx+50h], eax
mov dword ptr [rbx+3D8h], 0FFFFFFFFh
mov [rbx+98h], eax
add rsp, 8
pop rbx
pop r14
retn
loc_1D09E:
mov edi, 10001h
xor esi, esi
xor eax, eax
add rsp, 8
pop rbx
pop r14
jmp _glfwInputError
| long long ( *glfwDefaultWindowHints())(_QWORD, _QWORD)
{
long long ( *result)(_QWORD, _QWORD); // rax
if ( !glfw[0] )
return glfwInputError(0x10001u, 0LL);
*(_OWORD *)&glfw[240] = 0LL;
*(_OWORD *)&glfw[236] = 0LL;
*(_QWORD *)&glfw[244] = 0LL;
*(_OWORD *)&glfw[232] = xmmword_800E0;
memset(&glfw[24], 0LL, 832LL);
*(_OWORD *)&glfw[28] = xmmword_800F0;
result = (long long ( *)(_QWORD, _QWORD))(&dword_0 + 1);
glfw[32] = 1;
*(_QWORD *)&glfw[35] = 0x100000001LL;
*(_OWORD *)&glfw[10] = 0LL;
*(_OWORD *)&glfw[18] = 0LL;
*(_OWORD *)&glfw[14] = 0LL;
*(_QWORD *)&glfw[22] = 0LL;
*(_OWORD *)&glfw[6] = xmmword_80100;
*(_QWORD *)&glfw[10] = 0x800000018LL;
glfw[20] = 1;
glfw[246] = -1;
glfw[38] = 1;
return result;
}
| glfwDefaultWindowHints:
PUSH R14
PUSH RBX
PUSH RAX
LEA RBX,[0x1a4638]
CMP dword ptr [RBX],0x0
JZ 0x0011d09e
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x3c0],XMM0
MOVUPS xmmword ptr [RBX + 0x3b0],XMM0
XOR R14D,R14D
MOV qword ptr [RBX + 0x3d0],R14
MOVAPS XMM0,xmmword ptr [0x001800e0]
MOVUPS xmmword ptr [RBX + 0x3a0],XMM0
LEA RDI,[RBX + 0x60]
MOV EDX,0x340
XOR ESI,ESI
CALL 0x0010c470
MOVAPS XMM0,xmmword ptr [0x001800f0]
MOVUPS xmmword ptr [RBX + 0x70],XMM0
MOV EAX,0x1
MOV dword ptr [RBX + 0x80],EAX
MOV RCX,0x100000001
MOV qword ptr [RBX + 0x8c],RCX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x28],XMM0
MOVUPS xmmword ptr [RBX + 0x48],XMM0
MOVUPS xmmword ptr [RBX + 0x38],XMM0
MOV qword ptr [RBX + 0x58],R14
MOVAPS XMM0,xmmword ptr [0x00180100]
MOVUPS xmmword ptr [RBX + 0x18],XMM0
MOV RCX,0x800000018
MOV qword ptr [RBX + 0x28],RCX
MOV dword ptr [RBX + 0x50],EAX
MOV dword ptr [RBX + 0x3d8],0xffffffff
MOV dword ptr [RBX + 0x98],EAX
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_0011d09e:
MOV EDI,0x10001
XOR ESI,ESI
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x00119081
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void glfwDefaultWindowHints(void)
{
if (_glfw != 0) {
_DAT_001a49f8 = 0;
uRam00000000001a4a00 = 0;
_DAT_001a49e8 = 0;
_DAT_001a49f0 = 0;
_DAT_001a4a08 = 0;
_DAT_001a49d8 = _DAT_001800e0;
_DAT_001a49e0 = _UNK_001800e8;
memset(&DAT_001a4698,0,0x340);
_DAT_001a46a8 = _DAT_001800f0;
_DAT_001a46b0 = _UNK_001800f8;
DAT_001a46b8 = 1;
_DAT_001a46c4 = 0x100000001;
_DAT_001a4668 = 0;
_DAT_001a4680 = 0;
_DAT_001a4670 = 0;
_DAT_001a4678 = 0;
DAT_001a4690 = 0;
_DAT_001a4650 = _DAT_00180100;
_DAT_001a4658 = _UNK_00180108;
_DAT_001a4660 = 0x800000018;
_DAT_001a4688 = 1;
DAT_001a4a10 = 0xffffffff;
DAT_001a46d0 = 1;
return;
}
_glfwInputError(0x10001,0);
return;
}
| |
21,211 | get_internal_charset | eloqsql/mysys/charset.c | static CHARSET_INFO *
get_internal_charset(MY_CHARSET_LOADER *loader, uint cs_number, myf flags)
{
char buf[FN_REFLEN];
struct charset_info_st *cs;
DBUG_ASSERT(cs_number < array_elements(all_charsets));
if ((cs= (struct charset_info_st*) all_charsets[cs_number]))
{
if (cs->state & MY_CS_READY) /* if CS is already initialized */
{
my_collation_statistics_inc_use_count(cs_number);
return cs;
}
/*
To make things thread safe we are not allowing other threads to interfere
while we may changing the cs_info_table
*/
mysql_mutex_lock(&THR_LOCK_charset);
if (!(cs->state & (MY_CS_COMPILED|MY_CS_LOADED))) /* if CS is not in memory */
{
MY_CHARSET_LOADER loader;
strxmov(get_charsets_dir(buf), cs->cs_name.str, ".xml", NullS);
my_charset_loader_init_mysys(&loader);
my_read_charset_file(&loader, buf, flags);
}
if (cs->state & MY_CS_AVAILABLE)
{
if (!(cs->state & MY_CS_READY))
{
if (!simple_8bit_charset_data_is_full(cs))
{
CHARSET_INFO *refcs= find_charset_data_inheritance_source(cs);
if (refcs)
inherit_charset_data(cs, refcs);
}
if (!simple_8bit_collation_data_is_full(cs))
{
CHARSET_INFO *refcl= find_collation_data_inheritance_source(cs, flags);
if (refcl)
inherit_collation_data(cs, refcl);
}
if (my_ci_init_charset(cs, loader) ||
my_ci_init_collation(cs, loader))
{
cs= NULL;
}
else
cs->state|= MY_CS_READY;
}
my_collation_statistics_inc_use_count(cs_number);
}
else
cs= NULL;
mysql_mutex_unlock(&THR_LOCK_charset);
}
return cs;
} | O3 | c | get_internal_charset:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2c8, %rsp # imm = 0x2C8
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movl %esi, %r13d
leaq 0x35d1db(%rip), %r12 # 0x3adbc0
movq (%r12,%r13,8), %rbx
testq %rbx, %rbx
je 0x50ace
testb $0x1, 0xd(%rbx)
jne 0x50ad5
movq %rdx, %r15
movq %rdi, %r14
leaq 0x365fd7(%rip), %rax # 0x3b69e0
cmpq $0x0, 0x40(%rax)
jne 0x50cb7
leaq 0x365fc5(%rip), %rdi # 0x3b69e0
callq 0x28570
movl 0xc(%rbx), %eax
testb $0x9, %al
jne 0x50ac1
leaq -0x230(%rbp), %rdi
callq 0x502eb
movq 0x10(%rbx), %rsi
leaq 0x459ee(%rip), %rdx # 0x96430
movq %rax, %rdi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x92444
leaq -0x2e0(%rbp), %rdi
movb $0x0, (%rdi)
leaq -0xd01(%rip), %rax # 0x4fd5e
movq %rax, 0x80(%rdi)
leaq -0xd00(%rip), %rax # 0x4fd6d
movq %rax, 0x88(%rdi)
leaq -0xcf3(%rip), %rax # 0x4fd88
movq %rax, 0x90(%rdi)
leaq 0xc7e1(%rip), %rax # 0x5d26a
movq %rax, 0x98(%rdi)
leaq 0x2e2aa9(%rip), %rax # 0x333540
movq (%rax), %rax
movq %rax, 0xa0(%rdi)
leaq -0xd02(%rip), %rax # 0x4fda6
movq %rax, 0xa8(%rdi)
leaq -0x230(%rbp), %rsi
movq %r15, %rdx
callq 0x51694
movl 0xc(%rbx), %eax
btl $0x9, %eax
jb 0x50ae5
xorl %ebx, %ebx
jmp 0x50c77
xorl %ebx, %ebx
jmp 0x50c93
leaq 0x361154(%rip), %rax # 0x3b1c30
incq (%rax,%r13,8)
jmp 0x50c93
btl $0x8, %eax
jb 0x50c6c
cmpq $0x0, 0x40(%rbx)
je 0x50b0b
cmpq $0x0, 0x50(%rbx)
je 0x50b0b
cmpq $0x0, 0x48(%rbx)
je 0x50b0b
cmpq $0x0, 0x68(%rbx)
jne 0x50b3a
movq 0x10(%rbx), %rdi
movl $0x20, %esi
callq 0x5079c
testl %eax, %eax
je 0x50b3a
cmpl %eax, (%rbx)
je 0x50b3a
movl %eax, %eax
movq (%r12,%rax,8), %rsi
testq %rsi, %rsi
je 0x50b3a
testb $0x2, 0xd(%rsi)
je 0x50b3a
movq %rbx, %rdi
callq 0x518dd
cmpq $0x0, 0x58(%rbx)
jne 0x50c2e
testb $0x10, 0xc(%rbx)
jne 0x50c2e
movq 0x38(%rbx), %rax
testq %rax, %rax
je 0x50c2e
leaq 0x45953(%rip), %rsi # 0x964b6
movl $0x8, %edx
movq %rax, -0x2e8(%rbp)
movq -0x2e8(%rbp), %rdi
callq 0x28180
movq -0x2e8(%rbp), %rcx
testl %eax, %eax
jne 0x50c2e
leaq 0x8(%rcx), %rdi
movq %rdi, -0x2f0(%rbp)
movl $0x5d, %esi
callq 0x28110
testq %rax, %rax
setne %dl
movq -0x2e8(%rbp), %rcx
addq $0x28, %rcx
cmpq %rax, %rcx
seta %cl
andb %dl, %cl
cmpb $0x1, %cl
jne 0x50c2e
movq -0x2f0(%rbp), %rsi
subq %rsi, %rax
leaq -0x2e0(%rbp), %rdi
movl $0x21, %ecx
movq %rax, %rdx
movq %rax, -0x2e8(%rbp)
callq 0x286b0
movq -0x2e8(%rbp), %rax
movb $0x0, -0x2e0(%rbp,%rax)
leaq -0x2e0(%rbp), %rdi
movq %r15, %rsi
callq 0x5047f
testl %eax, %eax
je 0x50c2e
cmpl %eax, (%rbx)
je 0x50c2e
movl %eax, %eax
movq (%r12,%rax,8), %rax
testq %rax, %rax
je 0x50c2e
testb $0x2, 0xd(%rax)
je 0x50c2e
cmpq $0x0, 0x58(%rbx)
jne 0x50c2e
testb $0x10, 0xc(%rbx)
jne 0x50c2e
movq 0x58(%rax), %rax
movq %rax, 0x58(%rbx)
movq 0xb8(%rbx), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x50c49
movq %rbx, %rdi
movq %r14, %rsi
callq *%rax
testb %al, %al
jne 0x50c64
movq 0xc0(%rbx), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x50c68
movq %rbx, %rdi
movq %r14, %rsi
callq *%rax
testb %al, %al
je 0x50c68
xorl %ebx, %ebx
jmp 0x50c6c
orb $0x1, 0xd(%rbx)
leaq 0x360fbd(%rip), %rax # 0x3b1c30
incq (%rax,%r13,8)
leaq 0x365d62(%rip), %rax # 0x3b69e0
movq 0x40(%rax), %rdi
testq %rdi, %rdi
jne 0x50cc1
leaq 0x365d52(%rip), %rdi # 0x3b69e0
callq 0x28280
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x50cd3
movq %rbx, %rax
addq $0x2c8, %rsp # imm = 0x2C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29c3e
jmp 0x50a20
leaq 0x2e3198(%rip), %rax # 0x333e60
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x50c87
callq 0x28400
| get_internal_charset:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 2C8h
mov rax, fs:28h
mov [rbp+var_30], rax
mov r13d, esi
lea r12, all_charsets
mov rbx, [r12+r13*8]
test rbx, rbx
jz loc_50ACE
test byte ptr [rbx+0Dh], 1
jnz loc_50AD5
mov r15, rdx
mov r14, rdi
lea rax, THR_LOCK_charset
cmp qword ptr [rax+40h], 0
jnz loc_50CB7
lea rdi, THR_LOCK_charset
call _pthread_mutex_lock
loc_50A20:
mov eax, [rbx+0Ch]
test al, 9
jnz loc_50AC1
lea rdi, [rbp+var_230]
call get_charsets_dir
mov rsi, [rbx+10h]
lea rdx, aIndexXml+5; ".xml"
mov rdi, rax
xor ecx, ecx
xor eax, eax
call strxmov
lea rdi, [rbp+var_2E0]
mov byte ptr [rdi], 0
lea rax, my_once_alloc_c
mov [rdi+80h], rax
lea rax, my_malloc_c
mov [rdi+88h], rax
lea rax, my_realloc_c
mov [rdi+90h], rax
lea rax, my_free
mov [rdi+98h], rax
lea rax, my_charset_error_reporter
mov rax, [rax]
mov [rdi+0A0h], rax
lea rax, add_collation
mov [rdi+0A8h], rax
lea rsi, [rbp+var_230]
mov rdx, r15
call my_read_charset_file
mov eax, [rbx+0Ch]
loc_50AC1:
bt eax, 9
jb short loc_50AE5
xor ebx, ebx
jmp loc_50C77
loc_50ACE:
xor ebx, ebx
jmp loc_50C93
loc_50AD5:
lea rax, my_collation_statistics
inc qword ptr [rax+r13*8]
jmp loc_50C93
loc_50AE5:
bt eax, 8
jb loc_50C6C
cmp qword ptr [rbx+40h], 0
jz short loc_50B0B
cmp qword ptr [rbx+50h], 0
jz short loc_50B0B
cmp qword ptr [rbx+48h], 0
jz short loc_50B0B
cmp qword ptr [rbx+68h], 0
jnz short loc_50B3A
loc_50B0B:
mov rdi, [rbx+10h]
mov esi, 20h ; ' '
call get_charset_number_internal
test eax, eax
jz short loc_50B3A
cmp [rbx], eax
jz short loc_50B3A
mov eax, eax
mov rsi, [r12+rax*8]
test rsi, rsi
jz short loc_50B3A
test byte ptr [rsi+0Dh], 2
jz short loc_50B3A
mov rdi, rbx
call inherit_charset_data
loc_50B3A:
cmp qword ptr [rbx+58h], 0
jnz loc_50C2E
test byte ptr [rbx+0Ch], 10h
jnz loc_50C2E
mov rax, [rbx+38h]
test rax, rax
jz loc_50C2E
lea rsi, aImport; "[import "
mov edx, 8
mov [rbp+var_2E8], rax
mov rdi, [rbp+var_2E8]
call _strncmp
mov rcx, [rbp+var_2E8]
test eax, eax
jnz loc_50C2E
lea rdi, [rcx+8]
mov [rbp+var_2F0], rdi
mov esi, 5Dh ; ']'
call _strchr
test rax, rax
setnz dl
mov rcx, [rbp+var_2E8]
add rcx, 28h ; '('
cmp rcx, rax
setnbe cl
and cl, dl
cmp cl, 1
jnz short loc_50C2E
mov rsi, [rbp+var_2F0]
sub rax, rsi
lea rdi, [rbp+var_2E0]
mov ecx, 21h ; '!'
mov rdx, rax
mov [rbp+var_2E8], rax
call ___memcpy_chk
mov rax, [rbp+var_2E8]
mov [rbp+rax+var_2E0], 0
lea rdi, [rbp+var_2E0]
mov rsi, r15
call get_collation_number
test eax, eax
jz short loc_50C2E
cmp [rbx], eax
jz short loc_50C2E
mov eax, eax
mov rax, [r12+rax*8]
test rax, rax
jz short loc_50C2E
test byte ptr [rax+0Dh], 2
jz short loc_50C2E
cmp qword ptr [rbx+58h], 0
jnz short loc_50C2E
test byte ptr [rbx+0Ch], 10h
jnz short loc_50C2E
mov rax, [rax+58h]
mov [rbx+58h], rax
loc_50C2E:
mov rax, [rbx+0B8h]
mov rax, [rax]
test rax, rax
jz short loc_50C49
mov rdi, rbx
mov rsi, r14
call rax
test al, al
jnz short loc_50C64
loc_50C49:
mov rax, [rbx+0C0h]
mov rax, [rax]
test rax, rax
jz short loc_50C68
mov rdi, rbx
mov rsi, r14
call rax
test al, al
jz short loc_50C68
loc_50C64:
xor ebx, ebx
jmp short loc_50C6C
loc_50C68:
or byte ptr [rbx+0Dh], 1
loc_50C6C:
lea rax, my_collation_statistics
inc qword ptr [rax+r13*8]
loc_50C77:
lea rax, THR_LOCK_charset
mov rdi, [rax+40h]
test rdi, rdi
jnz short loc_50CC1
loc_50C87:
lea rdi, THR_LOCK_charset
call _pthread_mutex_unlock
loc_50C93:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_50CD3
mov rax, rbx
add rsp, 2C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_50CB7:
call get_internal_charset_cold_1
jmp loc_50A20
loc_50CC1:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_50C87
loc_50CD3:
call ___stack_chk_fail
| long long get_internal_charset(long long a1, unsigned int a2, long long a3)
{
long long v3; // r13
long long v4; // rbx
long long v6; // rdx
long long v7; // rcx
int v8; // eax
int charsets_dir; // eax
int v10; // r8d
int v11; // r9d
int charset_number_internal; // eax
long long v13; // rsi
long long v14; // rax
int v15; // eax
unsigned long long v16; // rax
int collation_number; // eax
long long v18; // rax
unsigned __int8 ( *v19)(long long, long long, long long, long long); // rax
unsigned __int8 ( *v20)(long long, long long, long long, long long); // rax
long long v22; // [rsp+0h] [rbp-2F0h]
long long v23; // [rsp+8h] [rbp-2E8h]
_BYTE v24[128]; // [rsp+10h] [rbp-2E0h] BYREF
long long ( *v25)(long long); // [rsp+90h] [rbp-260h]
long long ( *v26)(long long); // [rsp+98h] [rbp-258h]
long long ( *v27)(long long, long long); // [rsp+A0h] [rbp-250h]
long long ( *v28)(_QWORD); // [rsp+A8h] [rbp-248h]
long long ( *v29)(); // [rsp+B0h] [rbp-240h]
long long ( *v30)(unsigned int *); // [rsp+B8h] [rbp-238h]
_BYTE v31[512]; // [rsp+C0h] [rbp-230h] BYREF
unsigned long long v32; // [rsp+2C0h] [rbp-30h]
v32 = __readfsqword(0x28u);
v3 = a2;
v4 = all_charsets[a2];
if ( !v4 )
return 0LL;
if ( (*(_BYTE *)(v4 + 13) & 1) != 0 )
{
++my_collation_statistics[a2];
}
else
{
if ( THR_LOCK_charset[8] )
get_internal_charset_cold_1();
else
pthread_mutex_lock(THR_LOCK_charset);
v8 = *(_DWORD *)(v4 + 12);
if ( (v8 & 9) == 0 )
{
charsets_dir = get_charsets_dir((long long)v31);
strxmov(charsets_dir, *(_QWORD *)(v4 + 16), (unsigned int)".xml", 0, v10, v11);
v24[0] = 0;
v25 = my_once_alloc_c;
v26 = my_malloc_c;
v27 = my_realloc_c;
v28 = my_free;
v29 = my_charset_error_reporter;
v30 = add_collation;
my_read_charset_file(v24, v31, a3);
v8 = *(_DWORD *)(v4 + 12);
}
if ( (v8 & 0x200) != 0 )
{
if ( (v8 & 0x100) == 0 )
{
if ( !*(_QWORD *)(v4 + 64) || !*(_QWORD *)(v4 + 80) || !*(_QWORD *)(v4 + 72) || !*(_QWORD *)(v4 + 104) )
{
charset_number_internal = get_charset_number_internal(*(_QWORD *)(v4 + 16), 32);
if ( charset_number_internal )
{
if ( *(_DWORD *)v4 != charset_number_internal )
{
v13 = all_charsets[charset_number_internal];
if ( v13 )
{
if ( (*(_BYTE *)(v13 + 13) & 2) != 0 )
inherit_charset_data(v4);
}
}
}
}
if ( !*(_QWORD *)(v4 + 88) && (*(_BYTE *)(v4 + 12) & 0x10) == 0 )
{
v14 = *(_QWORD *)(v4 + 56);
if ( v14 )
{
v23 = *(_QWORD *)(v4 + 56);
v15 = strncmp(v14, "[import ", 8LL);
v7 = v23;
if ( !v15 )
{
v22 = v23 + 8;
v16 = strchr(v23 + 8, 93LL);
LOBYTE(v6) = v16 != 0;
v7 = v23 + 40;
LOBYTE(v7) = v16 != 0 && v23 + 40 > v16;
if ( (_BYTE)v7 == 1 )
{
v23 = v16 - v22;
__memcpy_chk(v24, v22, v16 - v22, 33LL);
v24[v23] = 0;
collation_number = get_collation_number((long long)v24, a3);
if ( collation_number )
{
if ( *(_DWORD *)v4 != collation_number )
{
v18 = all_charsets[collation_number];
if ( v18 )
{
if ( (*(_BYTE *)(v18 + 13) & 2) != 0 && !*(_QWORD *)(v4 + 88) && (*(_BYTE *)(v4 + 12) & 0x10) == 0 )
*(_QWORD *)(v4 + 88) = *(_QWORD *)(v18 + 88);
}
}
}
}
}
}
}
v19 = **(unsigned __int8 ( ***)(long long, long long, long long, long long))(v4 + 184);
if ( v19 && v19(v4, a1, v6, v7)
|| (v20 = **(unsigned __int8 ( ***)(long long, long long, long long, long long))(v4 + 192)) != 0LL
&& v20(v4, a1, v6, v7) )
{
v4 = 0LL;
}
else
{
*(_BYTE *)(v4 + 13) |= 1u;
}
}
++my_collation_statistics[v3];
}
else
{
v4 = 0LL;
}
if ( THR_LOCK_charset[8] )
PSI_server[44]();
pthread_mutex_unlock(THR_LOCK_charset);
}
return v4;
}
| get_internal_charset:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x2c8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV R13D,ESI
LEA R12,[0x4adbc0]
MOV RBX,qword ptr [R12 + R13*0x8]
TEST RBX,RBX
JZ 0x00150ace
TEST byte ptr [RBX + 0xd],0x1
JNZ 0x00150ad5
MOV R15,RDX
MOV R14,RDI
LEA RAX,[0x4b69e0]
CMP qword ptr [RAX + 0x40],0x0
JNZ 0x00150cb7
LEA RDI,[0x4b69e0]
CALL 0x00128570
LAB_00150a20:
MOV EAX,dword ptr [RBX + 0xc]
TEST AL,0x9
JNZ 0x00150ac1
LEA RDI,[RBP + -0x230]
CALL 0x001502eb
MOV RSI,qword ptr [RBX + 0x10]
LEA RDX,[0x196430]
MOV RDI,RAX
XOR ECX,ECX
XOR EAX,EAX
CALL 0x00192444
LEA RDI,[RBP + -0x2e0]
MOV byte ptr [RDI],0x0
LEA RAX,[0x14fd5e]
MOV qword ptr [RDI + 0x80],RAX
LEA RAX,[0x14fd6d]
MOV qword ptr [RDI + 0x88],RAX
LEA RAX,[0x14fd88]
MOV qword ptr [RDI + 0x90],RAX
LEA RAX,[0x15d26a]
MOV qword ptr [RDI + 0x98],RAX
LEA RAX,[0x433540]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RDI + 0xa0],RAX
LEA RAX,[0x14fda6]
MOV qword ptr [RDI + 0xa8],RAX
LEA RSI,[RBP + -0x230]
MOV RDX,R15
CALL 0x00151694
MOV EAX,dword ptr [RBX + 0xc]
LAB_00150ac1:
BT EAX,0x9
JC 0x00150ae5
XOR EBX,EBX
JMP 0x00150c77
LAB_00150ace:
XOR EBX,EBX
JMP 0x00150c93
LAB_00150ad5:
LEA RAX,[0x4b1c30]
INC qword ptr [RAX + R13*0x8]
JMP 0x00150c93
LAB_00150ae5:
BT EAX,0x8
JC 0x00150c6c
CMP qword ptr [RBX + 0x40],0x0
JZ 0x00150b0b
CMP qword ptr [RBX + 0x50],0x0
JZ 0x00150b0b
CMP qword ptr [RBX + 0x48],0x0
JZ 0x00150b0b
CMP qword ptr [RBX + 0x68],0x0
JNZ 0x00150b3a
LAB_00150b0b:
MOV RDI,qword ptr [RBX + 0x10]
MOV ESI,0x20
CALL 0x0015079c
TEST EAX,EAX
JZ 0x00150b3a
CMP dword ptr [RBX],EAX
JZ 0x00150b3a
MOV EAX,EAX
MOV RSI,qword ptr [R12 + RAX*0x8]
TEST RSI,RSI
JZ 0x00150b3a
TEST byte ptr [RSI + 0xd],0x2
JZ 0x00150b3a
MOV RDI,RBX
CALL 0x001518dd
LAB_00150b3a:
CMP qword ptr [RBX + 0x58],0x0
JNZ 0x00150c2e
TEST byte ptr [RBX + 0xc],0x10
JNZ 0x00150c2e
MOV RAX,qword ptr [RBX + 0x38]
TEST RAX,RAX
JZ 0x00150c2e
LEA RSI,[0x1964b6]
MOV EDX,0x8
MOV qword ptr [RBP + -0x2e8],RAX
MOV RDI,qword ptr [RBP + -0x2e8]
CALL 0x00128180
MOV RCX,qword ptr [RBP + -0x2e8]
TEST EAX,EAX
JNZ 0x00150c2e
LEA RDI,[RCX + 0x8]
MOV qword ptr [RBP + -0x2f0],RDI
MOV ESI,0x5d
CALL 0x00128110
TEST RAX,RAX
SETNZ DL
MOV RCX,qword ptr [RBP + -0x2e8]
ADD RCX,0x28
CMP RCX,RAX
SETA CL
AND CL,DL
CMP CL,0x1
JNZ 0x00150c2e
MOV RSI,qword ptr [RBP + -0x2f0]
SUB RAX,RSI
LEA RDI,[RBP + -0x2e0]
MOV ECX,0x21
MOV RDX,RAX
MOV qword ptr [RBP + -0x2e8],RAX
CALL 0x001286b0
MOV RAX,qword ptr [RBP + -0x2e8]
MOV byte ptr [RBP + RAX*0x1 + -0x2e0],0x0
LEA RDI,[RBP + -0x2e0]
MOV RSI,R15
CALL 0x0015047f
TEST EAX,EAX
JZ 0x00150c2e
CMP dword ptr [RBX],EAX
JZ 0x00150c2e
MOV EAX,EAX
MOV RAX,qword ptr [R12 + RAX*0x8]
TEST RAX,RAX
JZ 0x00150c2e
TEST byte ptr [RAX + 0xd],0x2
JZ 0x00150c2e
CMP qword ptr [RBX + 0x58],0x0
JNZ 0x00150c2e
TEST byte ptr [RBX + 0xc],0x10
JNZ 0x00150c2e
MOV RAX,qword ptr [RAX + 0x58]
MOV qword ptr [RBX + 0x58],RAX
LAB_00150c2e:
MOV RAX,qword ptr [RBX + 0xb8]
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x00150c49
MOV RDI,RBX
MOV RSI,R14
CALL RAX
TEST AL,AL
JNZ 0x00150c64
LAB_00150c49:
MOV RAX,qword ptr [RBX + 0xc0]
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x00150c68
MOV RDI,RBX
MOV RSI,R14
CALL RAX
TEST AL,AL
JZ 0x00150c68
LAB_00150c64:
XOR EBX,EBX
JMP 0x00150c6c
LAB_00150c68:
OR byte ptr [RBX + 0xd],0x1
LAB_00150c6c:
LEA RAX,[0x4b1c30]
INC qword ptr [RAX + R13*0x8]
LAB_00150c77:
LEA RAX,[0x4b69e0]
MOV RDI,qword ptr [RAX + 0x40]
TEST RDI,RDI
JNZ 0x00150cc1
LAB_00150c87:
LEA RDI,[0x4b69e0]
CALL 0x00128280
LAB_00150c93:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00150cd3
MOV RAX,RBX
ADD RSP,0x2c8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00150cb7:
CALL 0x00129c3e
JMP 0x00150a20
LAB_00150cc1:
LEA RAX,[0x433e60]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00150c87
LAB_00150cd3:
CALL 0x00128400
|
uint * get_internal_charset(int8 param_1,ulong param_2,int8 param_3)
{
char *__s;
char *__s1;
long lVar1;
char cVar2;
uint uVar3;
int iVar4;
int8 uVar5;
char *pcVar6;
uint *puVar7;
long in_FS_OFFSET;
int1 local_2e8 [128];
code *local_268;
code *local_260;
code *local_258;
code *local_250;
int *local_248;
code *local_240;
int1 local_238 [512];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
param_2 = param_2 & 0xffffffff;
puVar7 = (uint *)(&all_charsets)[param_2];
if (puVar7 == (uint *)0x0) {
puVar7 = (uint *)0x0;
goto LAB_00150c93;
}
if ((*(byte *)((long)puVar7 + 0xd) & 1) != 0) {
*(long *)(my_collation_statistics + param_2 * 8) =
*(long *)(my_collation_statistics + param_2 * 8) + 1;
goto LAB_00150c93;
}
if (THR_LOCK_charset._64_8_ == 0) {
pthread_mutex_lock((pthread_mutex_t *)THR_LOCK_charset);
}
else {
get_internal_charset_cold_1();
}
uVar3 = puVar7[3];
if ((uVar3 & 9) == 0) {
uVar5 = get_charsets_dir(local_238);
strxmov(uVar5,*(int8 *)(puVar7 + 4),".xml",0);
local_2e8[0] = 0;
local_268 = my_once_alloc_c;
local_260 = my_malloc_c;
local_258 = my_realloc_c;
local_250 = my_free;
local_248 = my_charset_error_reporter;
local_240 = add_collation;
my_read_charset_file(local_2e8,local_238,param_3);
uVar3 = puVar7[3];
}
if ((uVar3 >> 9 & 1) == 0) {
puVar7 = (uint *)0x0;
}
else {
if ((uVar3 >> 8 & 1) == 0) {
if ((((*(long *)(puVar7 + 0x10) == 0) || (*(long *)(puVar7 + 0x14) == 0)) ||
(*(long *)(puVar7 + 0x12) == 0)) || (*(long *)(puVar7 + 0x1a) == 0)) {
uVar3 = get_charset_number_internal(*(int8 *)(puVar7 + 4),0x20);
if (((uVar3 != 0) && (*puVar7 != uVar3)) &&
(((&all_charsets)[uVar3] != 0 && ((*(byte *)((&all_charsets)[uVar3] + 0xd) & 2) != 0))))
{
inherit_charset_data(puVar7);
}
}
if (((*(long *)(puVar7 + 0x16) == 0) && ((puVar7[3] & 0x10) == 0)) &&
(__s1 = *(char **)(puVar7 + 0xe), __s1 != (char *)0x0)) {
iVar4 = strncmp(__s1,"[import ",8);
if (iVar4 == 0) {
__s = __s1 + 8;
pcVar6 = strchr(__s,0x5d);
if (pcVar6 < __s1 + 0x28 && pcVar6 != (char *)0x0) {
__memcpy_chk(local_2e8,__s,(long)pcVar6 - (long)__s,0x21);
local_2e8[(long)pcVar6 - (long)__s] = 0;
uVar3 = get_collation_number(local_2e8,param_3);
if (((((uVar3 != 0) && (*puVar7 != uVar3)) &&
(lVar1 = (&all_charsets)[uVar3], lVar1 != 0)) &&
(((*(byte *)(lVar1 + 0xd) & 2) != 0 && (*(long *)(puVar7 + 0x16) == 0)))) &&
((puVar7[3] & 0x10) == 0)) {
*(int8 *)(puVar7 + 0x16) = *(int8 *)(lVar1 + 0x58);
}
}
}
}
if ((code *)**(int8 **)(puVar7 + 0x2e) == (code *)0x0) {
LAB_00150c49:
if ((code *)**(int8 **)(puVar7 + 0x30) != (code *)0x0) {
cVar2 = (*(code *)**(int8 **)(puVar7 + 0x30))(puVar7,param_1);
if (cVar2 != '\0') goto LAB_00150c64;
}
*(byte *)((long)puVar7 + 0xd) = *(byte *)((long)puVar7 + 0xd) | 1;
}
else {
cVar2 = (*(code *)**(int8 **)(puVar7 + 0x2e))(puVar7,param_1);
if (cVar2 == '\0') goto LAB_00150c49;
LAB_00150c64:
puVar7 = (uint *)0x0;
}
}
*(long *)(my_collation_statistics + param_2 * 8) =
*(long *)(my_collation_statistics + param_2 * 8) + 1;
}
if (THR_LOCK_charset._64_8_ != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)THR_LOCK_charset);
LAB_00150c93:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return puVar7;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
21,212 | safe_lexcstrdup_root | eloqsql/mysys/my_alloc.c | LEX_CSTRING safe_lexcstrdup_root(MEM_ROOT *root, const LEX_CSTRING str)
{
LEX_CSTRING res;
if (str.length)
res.str= strmake_root(root, str.str, str.length);
else
res.str= (const char *)"";
res.length= str.length;
return res;
} | O3 | c | safe_lexcstrdup_root:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
testq %rdx, %rdx
je 0x2dfb0
movq %rbx, %rdx
callq 0x2df15
jmp 0x2dfb7
leaq 0x31cc6(%rip), %rax # 0x5fc7d
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax)
| safe_lexcstrdup_root:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdx
test rdx, rdx
jz short loc_2DFB0
mov rdx, rbx
call strmake_root
jmp short loc_2DFB7
loc_2DFB0:
lea rax, asc_5FC79+4; ""
loc_2DFB7:
mov rdx, rbx
add rsp, 8
pop rbx
pop rbp
retn
| char * safe_lexcstrdup_root(long long a1, long long a2, long long a3)
{
if ( a3 )
return strmake_root(a1, a2, a3);
else
return "";
}
| safe_lexcstrdup_root:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDX
TEST RDX,RDX
JZ 0x0012dfb0
MOV RDX,RBX
CALL 0x0012df15
JMP 0x0012dfb7
LAB_0012dfb0:
LEA RAX,[0x15fc7d]
LAB_0012dfb7:
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int1 [16] safe_lexcstrdup_root(int8 param_1,int8 param_2,long param_3)
{
int *puVar1;
int1 auVar2 [16];
if (param_3 == 0) {
puVar1 = &DAT_0015fc7d;
}
else {
puVar1 = (int *)strmake_root(param_1,param_2,param_3);
}
auVar2._8_8_ = param_3;
auVar2._0_8_ = puVar1;
return auVar2;
}
| |
21,213 | fs_create_directory_with_parents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/common.cpp | bool fs_create_directory_with_parents(const std::string & path) {
#ifdef _WIN32
std::wstring_convert<std::codecvt_utf8<wchar_t>> converter;
std::wstring wpath = converter.from_bytes(path);
// if the path already exists, check whether it's a directory
const DWORD attributes = GetFileAttributesW(wpath.c_str());
if ((attributes != INVALID_FILE_ATTRIBUTES) && (attributes & FILE_ATTRIBUTE_DIRECTORY)) {
return true;
}
size_t pos_slash = 0;
// process path from front to back, procedurally creating directories
while ((pos_slash = path.find('\\', pos_slash)) != std::string::npos) {
const std::wstring subpath = wpath.substr(0, pos_slash);
const wchar_t * test = subpath.c_str();
const bool success = CreateDirectoryW(test, NULL);
if (!success) {
const DWORD error = GetLastError();
// if the path already exists, ensure that it's a directory
if (error == ERROR_ALREADY_EXISTS) {
const DWORD attributes = GetFileAttributesW(subpath.c_str());
if (attributes == INVALID_FILE_ATTRIBUTES || !(attributes & FILE_ATTRIBUTE_DIRECTORY)) {
return false;
}
} else {
return false;
}
}
pos_slash += 1;
}
return true;
#else
// if the path already exists, check whether it's a directory
struct stat info;
if (stat(path.c_str(), &info) == 0) {
return S_ISDIR(info.st_mode);
}
size_t pos_slash = 1; // skip leading slashes for directory creation
// process path from front to back, procedurally creating directories
while ((pos_slash = path.find('/', pos_slash)) != std::string::npos) {
const std::string subpath = path.substr(0, pos_slash);
struct stat info;
// if the path already exists, ensure that it's a directory
if (stat(subpath.c_str(), &info) == 0) {
if (!S_ISDIR(info.st_mode)) {
return false;
}
} else {
// create parent directories
const int ret = mkdir(subpath.c_str(), 0755);
if (ret != 0) {
return false;
}
}
pos_slash += 1;
}
return true;
#endif // _WIN32
} | O2 | cpp | fs_create_directory_with_parents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp # imm = 0x148
movq %rdi, %rbx
movq (%rdi), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x23840
testl %eax, %eax
je 0x54e61
pushq $0x1
popq %r14
leaq 0x8(%rsp), %r15
leaq 0x28(%rsp), %r12
movq %rbx, %rdi
pushq $0x2f
popq %rsi
movq %r14, %rdx
callq 0x23ba0
cmpq $-0x1, %rax
sete %r13b
je 0x54e76
movq %rax, %r14
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x23970
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x23840
testl %eax, %eax
je 0x54e3a
movq 0x8(%rsp), %rdi
movl $0x1ed, %esi # imm = 0x1ED
callq 0x23440
testl %eax, %eax
je 0x54e4c
xorl %ebp, %ebp
jmp 0x54e52
movl 0x40(%rsp), %eax
movl $0xf000, %ecx # imm = 0xF000
andl %ecx, %eax
cmpl $0x4000, %eax # imm = 0x4000
jne 0x54e36
incq %r14
movb $0x1, %bpl
movq %r15, %rdi
callq 0x24218
testb %bpl, %bpl
jne 0x54de7
jmp 0x54e76
movl $0xf000, %eax # imm = 0xF000
andl 0xd0(%rsp), %eax
cmpl $0x4000, %eax # imm = 0x4000
sete %r13b
movl %r13d, %eax
addq $0x148, %rsp # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _Z32fs_create_directory_with_parentsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 148h
mov rbx, rdi
mov rdi, [rdi]
lea rsi, [rsp+178h+var_C0]
call _stat
test eax, eax
jz loc_54E61
push 1
pop r14
lea r15, [rsp+178h+var_170]
lea r12, [rsp+178h+var_150]
loc_54DE7:
mov rdi, rbx
push 2Fh ; '/'
pop rsi
mov rdx, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
setz r13b
jz short loc_54E76
mov r14, rax
mov rdi, r15
mov rsi, rbx
xor edx, edx
mov rcx, rax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rdi, [rsp+178h+var_170]
mov rsi, r12
call _stat
test eax, eax
jz short loc_54E3A
mov rdi, [rsp+178h+var_170]
mov esi, 1EDh
call _mkdir
test eax, eax
jz short loc_54E4C
loc_54E36:
xor ebp, ebp
jmp short loc_54E52
loc_54E3A:
mov eax, [rsp+178h+var_138]
mov ecx, 0F000h
and eax, ecx
cmp eax, 4000h
jnz short loc_54E36
loc_54E4C:
inc r14
mov bpl, 1
loc_54E52:
mov rdi, r15; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_54DE7
jmp short loc_54E76
loc_54E61:
mov eax, 0F000h
and eax, [rsp+178h+var_A8]
cmp eax, 4000h
setz r13b
loc_54E76:
mov eax, r13d
add rsp, 148h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long fs_create_directory_with_parents(_QWORD *a1)
{
unsigned int v1; // r13d
long long v2; // r14
long long v3; // rax
char v4; // bp
_QWORD v6[4]; // [rsp+8h] [rbp-170h] BYREF
_BYTE v7[24]; // [rsp+28h] [rbp-150h] BYREF
int v8; // [rsp+40h] [rbp-138h]
_BYTE v9[24]; // [rsp+B8h] [rbp-C0h] BYREF
int v10; // [rsp+D0h] [rbp-A8h]
if ( (unsigned int)stat(*a1, v9) )
{
v2 = 1LL;
while ( 1 )
{
v3 = std::string::find(a1, 47LL, v2);
LOBYTE(v1) = v3 == -1;
if ( v3 == -1 )
return v1;
v2 = v3;
std::string::substr(v6, a1, 0LL, v3);
if ( (unsigned int)stat(v6[0], v7) )
{
if ( !(unsigned int)mkdir(v6[0], 493LL) )
goto LABEL_8;
}
else if ( (v8 & 0xF000) == 0x4000 )
{
LABEL_8:
++v2;
v4 = 1;
goto LABEL_9;
}
v4 = 0;
LABEL_9:
std::string::~string(v6);
if ( !v4 )
return v1;
}
}
LOBYTE(v1) = (v10 & 0xF000) == 0x4000;
return v1;
}
| fs_create_directory_with_parents:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x148
MOV RBX,RDI
MOV RDI,qword ptr [RDI]
LEA RSI,[RSP + 0xb8]
CALL 0x00123840
TEST EAX,EAX
JZ 0x00154e61
PUSH 0x1
POP R14
LEA R15,[RSP + 0x8]
LEA R12,[RSP + 0x28]
LAB_00154de7:
MOV RDI,RBX
PUSH 0x2f
POP RSI
MOV RDX,R14
CALL 0x00123ba0
CMP RAX,-0x1
SETZ R13B
JZ 0x00154e76
MOV R14,RAX
MOV RDI,R15
MOV RSI,RBX
XOR EDX,EDX
MOV RCX,RAX
CALL 0x00123970
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,R12
CALL 0x00123840
TEST EAX,EAX
JZ 0x00154e3a
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,0x1ed
CALL 0x00123440
TEST EAX,EAX
JZ 0x00154e4c
LAB_00154e36:
XOR EBP,EBP
JMP 0x00154e52
LAB_00154e3a:
MOV EAX,dword ptr [RSP + 0x40]
MOV ECX,0xf000
AND EAX,ECX
CMP EAX,0x4000
JNZ 0x00154e36
LAB_00154e4c:
INC R14
MOV BPL,0x1
LAB_00154e52:
MOV RDI,R15
CALL 0x00124218
TEST BPL,BPL
JNZ 0x00154de7
JMP 0x00154e76
LAB_00154e61:
MOV EAX,0xf000
AND EAX,dword ptr [RSP + 0xd0]
CMP EAX,0x4000
SETZ R13B
LAB_00154e76:
MOV EAX,R13D
ADD RSP,0x148
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* fs_create_directory_with_parents(std::__cxx11::string const&) */
ulong fs_create_directory_with_parents(string *param_1)
{
bool bVar1;
int iVar2;
long lVar3;
ulong unaff_R13;
char *local_170 [4];
stat local_150;
stat local_c0;
iVar2 = stat(*(char **)param_1,&local_c0);
if (iVar2 == 0) {
unaff_R13 = CONCAT71((int7)(unaff_R13 >> 8),(local_c0.st_mode & 0xf000) == 0x4000);
}
else {
do {
lVar3 = std::__cxx11::string::find((char)param_1,0x2f);
unaff_R13 = CONCAT71((int7)(unaff_R13 >> 8),lVar3 == -1);
if (lVar3 == -1) break;
std::__cxx11::string::substr((ulong)local_170,(ulong)param_1);
iVar2 = stat(local_170[0],&local_150);
if (iVar2 == 0) {
if ((local_150.st_mode & 0xf000) != 0x4000) goto LAB_00154e36;
LAB_00154e4c:
bVar1 = true;
}
else {
iVar2 = mkdir(local_170[0],0x1ed);
if (iVar2 == 0) goto LAB_00154e4c;
LAB_00154e36:
bVar1 = false;
}
std::__cxx11::string::~string((string *)local_170);
} while (bVar1);
}
return unaff_R13 & 0xffffffff;
}
| |
21,214 | stmt_unbuffered_fetch | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | static int stmt_unbuffered_fetch(MYSQL_STMT *stmt, uchar **row)
{
ulong pkt_len;
pkt_len= ma_net_safe_read(stmt->mysql);
if (pkt_len == packet_error)
{
stmt->fetch_row_func= stmt_unbuffered_eof;
return(1);
}
if (stmt->mysql->net.read_pos[0] == 254)
{
*row = NULL;
stmt->fetch_row_func= stmt_unbuffered_eof;
return(MYSQL_NO_DATA);
}
else
*row = stmt->mysql->net.read_pos;
stmt->result.rows++;
return(0);
} | O0 | c | stmt_unbuffered_fetch:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x15e40
movq %rax, -0x20(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq %rax, -0x20(%rbp)
jne 0x264d7
movq -0x10(%rbp), %rax
leaq 0x7069(%rip), %rcx # 0x2d530
movq %rcx, 0x348(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x26543
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x20(%rax), %rax
movzbl (%rax), %eax
cmpl $0xfe, %eax
jne 0x26513
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
leaq 0x702d(%rip), %rcx # 0x2d530
movq %rcx, 0x348(%rax)
movl $0x64, -0x4(%rbp)
jmp 0x26543
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x20(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0xc8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0xc8(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| stmt_unbuffered_fetch:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov rdi, [rax+38h]
call ma_net_safe_read
mov [rbp+var_20], rax
mov eax, 0FFFFFFFFh
cmp [rbp+var_20], rax
jnz short loc_264D7
mov rax, [rbp+var_10]
lea rcx, stmt_unbuffered_eof
mov [rax+348h], rcx
mov [rbp+var_4], 1
jmp short loc_26543
loc_264D7:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov rax, [rax+20h]
movzx eax, byte ptr [rax]
cmp eax, 0FEh
jnz short loc_26513
mov rax, [rbp+var_18]
mov qword ptr [rax], 0
mov rax, [rbp+var_10]
lea rcx, stmt_unbuffered_eof
mov [rax+348h], rcx
mov [rbp+var_4], 64h ; 'd'
jmp short loc_26543
loc_26513:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov rcx, [rax+20h]
mov rax, [rbp+var_18]
mov [rax], rcx
mov rax, [rbp+var_10]
mov rcx, [rax+0C8h]
add rcx, 1
mov [rax+0C8h], rcx
mov [rbp+var_4], 0
loc_26543:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long stmt_unbuffered_fetch(long long *a1, _QWORD *a2, long long a3, long long a4, int a5, int a6)
{
if ( ma_net_safe_read(a1[7], (long long)a2, a3, a4, a5, a6) == 0xFFFFFFFFLL )
{
a1[105] = (long long)stmt_unbuffered_eof;
return 1;
}
else if ( **(unsigned __int8 **)(a1[7] + 32) == 254 )
{
*a2 = 0LL;
a1[105] = (long long)stmt_unbuffered_eof;
return 100;
}
else
{
*a2 = *(_QWORD *)(a1[7] + 32);
++a1[25];
return 0;
}
}
| stmt_unbuffered_fetch:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x38]
CALL 0x00115e40
MOV qword ptr [RBP + -0x20],RAX
MOV EAX,0xffffffff
CMP qword ptr [RBP + -0x20],RAX
JNZ 0x001264d7
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x12d530]
MOV qword ptr [RAX + 0x348],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00126543
LAB_001264d7:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xfe
JNZ 0x00126513
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x12d530]
MOV qword ptr [RAX + 0x348],RCX
MOV dword ptr [RBP + -0x4],0x64
JMP 0x00126543
LAB_00126513:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV RCX,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0xc8]
ADD RCX,0x1
MOV qword ptr [RAX + 0xc8],RCX
MOV dword ptr [RBP + -0x4],0x0
LAB_00126543:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 stmt_unbuffered_fetch(long param_1,int8 *param_2)
{
long lVar1;
int4 local_c;
lVar1 = ma_net_safe_read(*(int8 *)(param_1 + 0x38));
if (lVar1 == 0xffffffff) {
*(code **)(param_1 + 0x348) = stmt_unbuffered_eof;
local_c = 1;
}
else if (**(char **)(*(long *)(param_1 + 0x38) + 0x20) == -2) {
*param_2 = 0;
*(code **)(param_1 + 0x348) = stmt_unbuffered_eof;
local_c = 100;
}
else {
*param_2 = *(int8 *)(*(long *)(param_1 + 0x38) + 0x20);
*(long *)(param_1 + 200) = *(long *)(param_1 + 200) + 1;
local_c = 0;
}
return local_c;
}
| |
21,215 | stmt_unbuffered_fetch | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | static int stmt_unbuffered_fetch(MYSQL_STMT *stmt, uchar **row)
{
ulong pkt_len;
pkt_len= ma_net_safe_read(stmt->mysql);
if (pkt_len == packet_error)
{
stmt->fetch_row_func= stmt_unbuffered_eof;
return(1);
}
if (stmt->mysql->net.read_pos[0] == 254)
{
*row = NULL;
stmt->fetch_row_func= stmt_unbuffered_eof;
return(MYSQL_NO_DATA);
}
else
*row = stmt->mysql->net.read_pos;
stmt->result.rows++;
return(0);
} | O3 | c | stmt_unbuffered_fetch:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
callq 0x154e3
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
cmpq %rcx, %rax
jne 0x1eaec
leaq 0x3e0d(%rip), %rax # 0x228eb
movq %rax, 0x348(%rbx)
movl $0x1, %eax
jmp 0x1eb21
movq 0x38(%rbx), %rax
movq 0x20(%rax), %rax
cmpb $-0x2, (%rax)
jne 0x1eb15
movq $0x0, (%r14)
leaq 0x3de4(%rip), %rax # 0x228eb
movq %rax, 0x348(%rbx)
movl $0x64, %eax
jmp 0x1eb21
movq %rax, (%r14)
incq 0xc8(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
| stmt_unbuffered_fetch:
push rbp
mov rbp, rsp
push r14
push rbx
mov r14, rsi
mov rbx, rdi
mov rdi, [rdi+38h]
call ma_net_safe_read
mov ecx, 0FFFFFFFFh
cmp rax, rcx
jnz short loc_1EAEC
lea rax, stmt_unbuffered_eof
mov [rbx+348h], rax
mov eax, 1
jmp short loc_1EB21
loc_1EAEC:
mov rax, [rbx+38h]
mov rax, [rax+20h]
cmp byte ptr [rax], 0FEh
jnz short loc_1EB15
mov qword ptr [r14], 0
lea rax, stmt_unbuffered_eof
mov [rbx+348h], rax
mov eax, 64h ; 'd'
jmp short loc_1EB21
loc_1EB15:
mov [r14], rax
inc qword ptr [rbx+0C8h]
xor eax, eax
loc_1EB21:
pop rbx
pop r14
pop rbp
retn
| long long stmt_unbuffered_fetch(long long *a1, _QWORD *a2, long long a3, long long a4, unsigned long long a5, int a6)
{
_BYTE *v7; // rax
if ( ma_net_safe_read(a1[7], (long long)a2, a3, a4, a5, a6) == 0xFFFFFFFF )
{
a1[105] = (long long)stmt_unbuffered_eof;
return 1LL;
}
else
{
v7 = *(_BYTE **)(a1[7] + 32);
if ( *v7 == 0xFE )
{
*a2 = 0LL;
a1[105] = (long long)stmt_unbuffered_eof;
return 100LL;
}
else
{
*a2 = v7;
++a1[25];
return 0LL;
}
}
}
| stmt_unbuffered_fetch:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R14,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x38]
CALL 0x001154e3
MOV ECX,0xffffffff
CMP RAX,RCX
JNZ 0x0011eaec
LEA RAX,[0x1228eb]
MOV qword ptr [RBX + 0x348],RAX
MOV EAX,0x1
JMP 0x0011eb21
LAB_0011eaec:
MOV RAX,qword ptr [RBX + 0x38]
MOV RAX,qword ptr [RAX + 0x20]
CMP byte ptr [RAX],0xfe
JNZ 0x0011eb15
MOV qword ptr [R14],0x0
LEA RAX,[0x1228eb]
MOV qword ptr [RBX + 0x348],RAX
MOV EAX,0x64
JMP 0x0011eb21
LAB_0011eb15:
MOV qword ptr [R14],RAX
INC qword ptr [RBX + 0xc8]
XOR EAX,EAX
LAB_0011eb21:
POP RBX
POP R14
POP RBP
RET
|
int8 stmt_unbuffered_fetch(long param_1,int8 *param_2)
{
char *pcVar1;
long lVar2;
int8 uVar3;
lVar2 = ma_net_safe_read(*(int8 *)(param_1 + 0x38));
if (lVar2 == 0xffffffff) {
*(code **)(param_1 + 0x348) = stmt_unbuffered_eof;
uVar3 = 1;
}
else {
pcVar1 = *(char **)(*(long *)(param_1 + 0x38) + 0x20);
if (*pcVar1 == -2) {
*param_2 = 0;
*(code **)(param_1 + 0x348) = stmt_unbuffered_eof;
uVar3 = 100;
}
else {
*param_2 = pcVar1;
*(long *)(param_1 + 200) = *(long *)(param_1 + 200) + 1;
uVar3 = 0;
}
}
return uVar3;
}
| |
21,216 | list_free | eloqsql/mysys/list.c | void list_free(LIST *root, uint free_data)
{
LIST *next;
while (root)
{
next=root->next;
if (free_data)
my_free(root->data);
my_free(root);
root=next;
}
} | O0 | c | list_free:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xdf378
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0xdf365
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xf3d30
movq -0x8(%rbp), %rdi
callq 0xf3d30
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xdf33f
addq $0x20, %rsp
popq %rbp
retq
nop
| list_free:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
loc_DF33F:
cmp [rbp+var_8], 0
jz short loc_DF378
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_18], rax
cmp [rbp+var_C], 0
jz short loc_DF365
mov rax, [rbp+var_8]
mov rdi, [rax+10h]
call my_free
loc_DF365:
mov rdi, [rbp+var_8]
call my_free
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
jmp short loc_DF33F
loc_DF378:
add rsp, 20h
pop rbp
retn
| long long list_free(long long a1, int a2)
{
long long result; // rax
long long v3; // [rsp+8h] [rbp-18h]
while ( a1 )
{
v3 = *(_QWORD *)(a1 + 8);
if ( a2 )
my_free(*(_QWORD *)(a1 + 16));
my_free(a1);
result = v3;
a1 = v3;
}
return result;
}
| list_free:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
LAB_001df33f:
CMP qword ptr [RBP + -0x8],0x0
JZ 0x001df378
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x18],RAX
CMP dword ptr [RBP + -0xc],0x0
JZ 0x001df365
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x001f3d30
LAB_001df365:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001f3d30
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001df33f
LAB_001df378:
ADD RSP,0x20
POP RBP
RET
|
void list_free(long param_1,int param_2)
{
long lVar1;
int8 local_10;
local_10 = param_1;
while (local_10 != 0) {
lVar1 = *(long *)(local_10 + 8);
if (param_2 != 0) {
my_free(*(int8 *)(local_10 + 0x10));
}
my_free(local_10);
local_10 = lVar1;
}
return;
}
| |
21,217 | mi_new | eloqsql/storage/myisam/mi_page.c | my_off_t _mi_new(register MI_INFO *info, MI_KEYDEF *keyinfo, int level)
{
my_off_t pos;
uchar buff[8];
DBUG_ENTER("_mi_new");
if ((pos= info->s->state.key_del[keyinfo->block_size_index]) ==
HA_OFFSET_ERROR)
{
if (info->state->key_file_length >=
info->s->base.max_key_file_length - keyinfo->block_length)
{
my_errno=HA_ERR_INDEX_FILE_FULL;
DBUG_RETURN(HA_OFFSET_ERROR);
}
pos=info->state->key_file_length;
info->state->key_file_length+= keyinfo->block_length;
}
else
{
if (!key_cache_read(info->s->key_cache,
info->s->kfile, pos, level,
buff,
(uint) sizeof(buff),
(uint) keyinfo->block_length,0))
pos= HA_OFFSET_ERROR;
else
info->s->state.key_del[keyinfo->block_size_index]= mi_sizekorr(buff);
}
info->s->state.changed|= STATE_NOT_SORTED_PAGES;
DBUG_PRINT("exit",("Pos: %ld",(long) pos));
DBUG_RETURN(pos);
} | O3 | c | mi_new:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edx, %ecx
movq %rsi, %r15
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
movq (%rdi), %rax
movq 0xa0(%rax), %rdx
movzwl 0x18(%rsi), %esi
movq (%rdx,%rsi,8), %rbx
cmpq $-0x1, %rbx
je 0x84708
movq 0x278(%rax), %rdi
movl 0x350(%rax), %esi
movzwl 0xe(%r15), %eax
leaq -0x28(%rbp), %r8
movq %rbx, %rdx
movl $0x8, %r9d
pushq $0x0
pushq %rax
callq 0x98da0
addq $0x10, %rsp
testq %rax, %rax
je 0x8472d
movq -0x28(%rbp), %rax
bswapq %rax
movq (%r14), %rcx
movq 0xa0(%rcx), %rcx
movzwl 0x18(%r15), %edx
movq %rax, (%rcx,%rdx,8)
jmp 0x84734
movq 0x8(%r14), %rcx
movq 0x20(%rcx), %rbx
movq 0x118(%rax), %rdx
movzwl 0xe(%r15), %eax
subq %rax, %rdx
cmpq %rdx, %rbx
jae 0x8475b
addq %rbx, %rax
movq %rax, 0x20(%rcx)
jmp 0x84734
movq $-0x1, %rbx
movq (%r14), %rax
orb $0x20, 0xf0(%rax)
movq %fs:0x28, %rax
cmpq -0x20(%rbp), %rax
jne 0x8476f
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0xa2412
movl $0x88, (%rax)
movq $-0x1, %rbx
jmp 0x8473e
callq 0x29260
| _mi_new:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 18h
mov ecx, edx
mov r15, rsi
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_20], rax
mov rax, [rdi]
mov rdx, [rax+0A0h]
movzx esi, word ptr [rsi+18h]
mov rbx, [rdx+rsi*8]
cmp rbx, 0FFFFFFFFFFFFFFFFh
jz short loc_84708
mov rdi, [rax+278h]
mov esi, [rax+350h]
movzx eax, word ptr [r15+0Eh]
lea r8, [rbp+var_28]
mov rdx, rbx
mov r9d, 8
push 0
push rax
call key_cache_read
add rsp, 10h
test rax, rax
jz short loc_8472D
mov rax, [rbp+var_28]
bswap rax
mov rcx, [r14]
mov rcx, [rcx+0A0h]
movzx edx, word ptr [r15+18h]
mov [rcx+rdx*8], rax
jmp short loc_84734
loc_84708:
mov rcx, [r14+8]
mov rbx, [rcx+20h]
mov rdx, [rax+118h]
movzx eax, word ptr [r15+0Eh]
sub rdx, rax
cmp rbx, rdx
jnb short loc_8475B
add rax, rbx
mov [rcx+20h], rax
jmp short loc_84734
loc_8472D:
mov rbx, 0FFFFFFFFFFFFFFFFh
loc_84734:
mov rax, [r14]
or byte ptr [rax+0F0h], 20h
loc_8473E:
mov rax, fs:28h
cmp rax, [rbp+var_20]
jnz short loc_8476F
mov rax, rbx
add rsp, 18h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_8475B:
call _my_thread_var
mov dword ptr [rax], 88h
mov rbx, 0FFFFFFFFFFFFFFFFh
jmp short loc_8473E
loc_8476F:
call ___stack_chk_fail
| long long mi_new(_QWORD *a1, long long a2)
{
long long v2; // rax
unsigned long long v3; // rbx
long long v4; // rcx
long long v5; // rdx
long long v6; // rax
unsigned long long v8; // [rsp+8h] [rbp-28h]
v2 = *a1;
v3 = *(_QWORD *)(*(_QWORD *)(*a1 + 160LL) + 8LL * *(unsigned __int16 *)(a2 + 24));
if ( v3 == -1LL )
{
v4 = a1[1];
v3 = *(_QWORD *)(v4 + 32);
v5 = *(_QWORD *)(v2 + 280);
v6 = *(unsigned __int16 *)(a2 + 14);
if ( v3 >= v5 - v6 )
{
*(_DWORD *)my_thread_var(a1) = 136;
return -1LL;
}
*(_QWORD *)(v4 + 32) = v3 + v6;
}
else if ( key_cache_read(*(_QWORD *)(v2 + 632), *(unsigned int *)(v2 + 848), v3) )
{
*(_QWORD *)(*(_QWORD *)(*a1 + 160LL) + 8LL * *(unsigned __int16 *)(a2 + 24)) = _byteswap_uint64(v8);
}
else
{
v3 = -1LL;
}
*(_BYTE *)(*a1 + 240LL) |= 0x20u;
return v3;
}
| _mi_new:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV ECX,EDX
MOV R15,RSI
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RDI]
MOV RDX,qword ptr [RAX + 0xa0]
MOVZX ESI,word ptr [RSI + 0x18]
MOV RBX,qword ptr [RDX + RSI*0x8]
CMP RBX,-0x1
JZ 0x00184708
MOV RDI,qword ptr [RAX + 0x278]
MOV ESI,dword ptr [RAX + 0x350]
MOVZX EAX,word ptr [R15 + 0xe]
LEA R8,[RBP + -0x28]
MOV RDX,RBX
MOV R9D,0x8
PUSH 0x0
PUSH RAX
CALL 0x00198da0
ADD RSP,0x10
TEST RAX,RAX
JZ 0x0018472d
MOV RAX,qword ptr [RBP + -0x28]
BSWAP RAX
MOV RCX,qword ptr [R14]
MOV RCX,qword ptr [RCX + 0xa0]
MOVZX EDX,word ptr [R15 + 0x18]
MOV qword ptr [RCX + RDX*0x8],RAX
JMP 0x00184734
LAB_00184708:
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x20]
MOV RDX,qword ptr [RAX + 0x118]
MOVZX EAX,word ptr [R15 + 0xe]
SUB RDX,RAX
CMP RBX,RDX
JNC 0x0018475b
ADD RAX,RBX
MOV qword ptr [RCX + 0x20],RAX
JMP 0x00184734
LAB_0018472d:
MOV RBX,-0x1
LAB_00184734:
MOV RAX,qword ptr [R14]
OR byte ptr [RAX + 0xf0],0x20
LAB_0018473e:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x0018476f
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0018475b:
CALL 0x001a2412
MOV dword ptr [RAX],0x88
MOV RBX,-0x1
JMP 0x0018473e
LAB_0018476f:
CALL 0x00129260
|
ulong _mi_new(long *param_1,long param_2,int4 param_3)
{
long lVar1;
int4 *puVar2;
ulong uVar3;
long in_FS_OFFSET;
ulong local_30;
long local_28;
local_28 = *(long *)(in_FS_OFFSET + 0x28);
lVar1 = *param_1;
uVar3 = *(ulong *)(*(long *)(lVar1 + 0xa0) + (ulong)*(ushort *)(param_2 + 0x18) * 8);
if (uVar3 == 0xffffffffffffffff) {
uVar3 = *(ulong *)(param_1[1] + 0x20);
if (*(long *)(lVar1 + 0x118) - (ulong)*(ushort *)(param_2 + 0xe) <= uVar3) {
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x88;
uVar3 = 0xffffffffffffffff;
goto LAB_0018473e;
}
*(ulong *)(param_1[1] + 0x20) = *(ushort *)(param_2 + 0xe) + uVar3;
}
else {
lVar1 = key_cache_read(*(int8 *)(lVar1 + 0x278),*(int4 *)(lVar1 + 0x350),uVar3,
param_3,&local_30,8,*(int2 *)(param_2 + 0xe),0);
if (lVar1 == 0) {
uVar3 = 0xffffffffffffffff;
}
else {
*(ulong *)(*(long *)(*param_1 + 0xa0) + (ulong)*(ushort *)(param_2 + 0x18) * 8) =
local_30 >> 0x38 | (local_30 & 0xff000000000000) >> 0x28 |
(local_30 & 0xff0000000000) >> 0x18 | (local_30 & 0xff00000000) >> 8 |
(local_30 & 0xff000000) << 8 | (local_30 & 0xff0000) << 0x18 |
(local_30 & 0xff00) << 0x28 | local_30 << 0x38;
}
}
*(byte *)(*param_1 + 0xf0) = *(byte *)(*param_1 + 0xf0) | 0x20;
LAB_0018473e:
if (*(long *)(in_FS_OFFSET + 0x28) == local_28) {
return uVar3;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
21,218 | wait_on_queue | eloqsql/mysys/mf_keycache.c | static void wait_on_queue(KEYCACHE_WQUEUE *wqueue,
mysql_mutex_t *mutex)
{
struct st_my_thread_var *last;
struct st_my_thread_var *thread= my_thread_var;
DBUG_ASSERT(!thread->next);
DBUG_ASSERT(!thread->prev); /* Not required, but must be true anyway. */
mysql_mutex_assert_owner(mutex);
/* Add to queue. */
if (! (last= wqueue->last_thread))
thread->next= thread;
else
{
thread->next= last->next;
last->next= thread;
}
wqueue->last_thread= thread;
/*
Wait until thread is removed from queue by the signaling thread.
The loop protects against stray signals.
*/
do
{
KEYCACHE_DBUG_PRINT("wait", ("suspend thread %ld", (ulong) thread->id));
keycache_pthread_cond_wait(&thread->suspend, mutex);
}
while (thread->next);
} | O0 | c | wait_on_queue:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
callq 0x8d620
movq %rax, -0x20(%rbp)
jmp 0x7784b
jmp 0x7784d
jmp 0x7784f
jmp 0x77851
jmp 0x77853
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x77875
movq -0x20(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x88(%rax)
jmp 0x7789a
movq -0x18(%rbp), %rax
movq 0x88(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
jmp 0x778a7
jmp 0x778a9
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rsi
leaq 0x6e0e5(%rip), %rdx # 0xe59a1
movl $0x477, %ecx # imm = 0x477
callq 0x79000
movq -0x20(%rbp), %rax
cmpq $0x0, 0x88(%rax)
jne 0x778a5
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| wait_on_queue:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
call _my_thread_var
mov [rbp+var_20], rax
jmp short $+2
loc_7784B:
jmp short $+2
loc_7784D:
jmp short $+2
loc_7784F:
jmp short $+2
loc_77851:
jmp short $+2
loc_77853:
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_77875
mov rcx, [rbp+var_20]
mov rax, [rbp+var_20]
mov [rax+88h], rcx
jmp short loc_7789A
loc_77875:
mov rax, [rbp+var_18]
mov rcx, [rax+88h]
mov rax, [rbp+var_20]
mov [rax+88h], rcx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_18]
mov [rax+88h], rcx
loc_7789A:
mov rcx, [rbp+var_20]
mov rax, [rbp+var_8]
mov [rax], rcx
loc_778A5:
jmp short $+2
loc_778A7:
jmp short $+2
loc_778A9:
mov rdi, [rbp+var_20]
add rdi, 8
mov rsi, [rbp+var_10]
lea rdx, aWorkspaceLlm4b_16; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 477h
call inline_mysql_cond_wait_0
mov rax, [rbp+var_20]
cmp qword ptr [rax+88h], 0
jnz short loc_778A5
add rsp, 20h
pop rbp
retn
| long long wait_on_queue(long long *a1, const char *a2)
{
long long result; // rax
long long v3; // [rsp+0h] [rbp-20h]
long long v4; // [rsp+8h] [rbp-18h]
v3 = my_thread_var(a1, a2);
v4 = *a1;
if ( *a1 )
{
*(_QWORD *)(v3 + 136) = *(_QWORD *)(v4 + 136);
*(_QWORD *)(v4 + 136) = v3;
}
else
{
*(_QWORD *)(v3 + 136) = v3;
}
*a1 = v3;
do
{
inline_mysql_cond_wait_0(v3 + 8, a2, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 1143LL);
result = v3;
}
while ( *(_QWORD *)(v3 + 136) );
return result;
}
| wait_on_queue:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
CALL 0x0018d620
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0017784b
LAB_0017784b:
JMP 0x0017784d
LAB_0017784d:
JMP 0x0017784f
LAB_0017784f:
JMP 0x00177851
LAB_00177851:
JMP 0x00177853
LAB_00177853:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x00177875
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x88],RCX
JMP 0x0017789a
LAB_00177875:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x88]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x88],RCX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x88],RCX
LAB_0017789a:
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],RCX
LAB_001778a5:
JMP 0x001778a7
LAB_001778a7:
JMP 0x001778a9
LAB_001778a9:
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x8
MOV RSI,qword ptr [RBP + -0x10]
LEA RDX,[0x1e59a1]
MOV ECX,0x477
CALL 0x00179000
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0x88],0x0
JNZ 0x001778a5
ADD RSP,0x20
POP RBP
RET
|
void wait_on_queue(long *param_1,int8 param_2)
{
long lVar1;
long lVar2;
lVar2 = _my_thread_var();
lVar1 = *param_1;
if (lVar1 == 0) {
*(long *)(lVar2 + 0x88) = lVar2;
}
else {
*(int8 *)(lVar2 + 0x88) = *(int8 *)(lVar1 + 0x88);
*(long *)(lVar1 + 0x88) = lVar2;
}
*param_1 = lVar2;
do {
inline_mysql_cond_wait
(lVar2 + 8,param_2,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",
0x477);
} while (*(long *)(lVar2 + 0x88) != 0);
return;
}
| |
21,219 | wait_on_queue | eloqsql/mysys/mf_keycache.c | static void wait_on_queue(KEYCACHE_WQUEUE *wqueue,
mysql_mutex_t *mutex)
{
struct st_my_thread_var *last;
struct st_my_thread_var *thread= my_thread_var;
DBUG_ASSERT(!thread->next);
DBUG_ASSERT(!thread->prev); /* Not required, but must be true anyway. */
mysql_mutex_assert_owner(mutex);
/* Add to queue. */
if (! (last= wqueue->last_thread))
thread->next= thread;
else
{
thread->next= last->next;
last->next= thread;
}
wqueue->last_thread= thread;
/*
Wait until thread is removed from queue by the signaling thread.
The loop protects against stray signals.
*/
do
{
KEYCACHE_DBUG_PRINT("wait", ("suspend thread %ld", (ulong) thread->id));
keycache_pthread_cond_wait(&thread->suspend, mutex);
}
while (thread->next);
} | O3 | c | wait_on_queue:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
callq 0x624a2
movq %rax, %r14
movq %rax, %r12
movq (%r15), %rax
testq %rax, %rax
je 0x55ddb
movq 0x88(%rax), %rcx
addq $0x88, %rax
movq %rcx, 0x88(%r12)
jmp 0x55de2
leaq 0x88(%r14), %rax
movq %r12, (%rax)
movq %r12, (%r15)
addq $0x8, %r14
leaq 0x44c5a(%rip), %r15 # 0x9aa4d
cmpq $0x0, 0x38(%r12)
jne 0x55e13
movq %r14, %rdi
movq %rbx, %rsi
callq 0x28680
cmpq $0x0, 0x88(%r12)
jne 0x55df3
jmp 0x55e28
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl $0x477, %ecx # imm = 0x477
callq 0x2ac81
jmp 0x55e06
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| wait_on_queue:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rsi
mov r15, rdi
call _my_thread_var
mov r14, rax
mov r12, rax
mov rax, [r15]
test rax, rax
jz short loc_55DDB
mov rcx, [rax+88h]
add rax, 88h
mov [r12+88h], rcx
jmp short loc_55DE2
loc_55DDB:
lea rax, [r14+88h]
loc_55DE2:
mov [rax], r12
mov [r15], r12
add r14, 8
lea r15, aWorkspaceLlm4b_18; "/workspace/llm4binary/github2025/eloqsq"...
loc_55DF3:
cmp qword ptr [r12+38h], 0
jnz short loc_55E13
mov rdi, r14
mov rsi, rbx
call _pthread_cond_wait
loc_55E06:
cmp qword ptr [r12+88h], 0
jnz short loc_55DF3
jmp short loc_55E28
loc_55E13:
mov rdi, r14
mov rsi, rbx
mov rdx, r15
mov ecx, 477h
call psi_cond_wait
jmp short loc_55E06
loc_55E28:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long wait_on_queue(long long *a1, long long a2, long long a3)
{
long long v3; // r14
long long v4; // r12
long long v5; // rax
long long v6; // rcx
long long *v7; // rax
long long v8; // r14
long long result; // rax
v3 = my_thread_var(a1, a2, a3);
v4 = v3;
v5 = *a1;
if ( *a1 )
{
v6 = *(_QWORD *)(v5 + 136);
v7 = (long long *)(v5 + 136);
*(_QWORD *)(v3 + 136) = v6;
}
else
{
v7 = (long long *)(v3 + 136);
}
*v7 = v3;
*a1 = v3;
v8 = v3 + 8;
do
{
if ( *(_QWORD *)(v4 + 56) )
result = psi_cond_wait(v8, a2, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0x477u);
else
result = pthread_cond_wait(v8, a2);
}
while ( *(_QWORD *)(v4 + 136) );
return result;
}
| wait_on_queue:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RSI
MOV R15,RDI
CALL 0x001624a2
MOV R14,RAX
MOV R12,RAX
MOV RAX,qword ptr [R15]
TEST RAX,RAX
JZ 0x00155ddb
MOV RCX,qword ptr [RAX + 0x88]
ADD RAX,0x88
MOV qword ptr [R12 + 0x88],RCX
JMP 0x00155de2
LAB_00155ddb:
LEA RAX,[R14 + 0x88]
LAB_00155de2:
MOV qword ptr [RAX],R12
MOV qword ptr [R15],R12
ADD R14,0x8
LEA R15,[0x19aa4d]
LAB_00155df3:
CMP qword ptr [R12 + 0x38],0x0
JNZ 0x00155e13
MOV RDI,R14
MOV RSI,RBX
CALL 0x00128680
LAB_00155e06:
CMP qword ptr [R12 + 0x88],0x0
JNZ 0x00155df3
JMP 0x00155e28
LAB_00155e13:
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R15
MOV ECX,0x477
CALL 0x0012ac81
JMP 0x00155e06
LAB_00155e28:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
void wait_on_queue(long *param_1,pthread_mutex_t *param_2)
{
long lVar1;
long lVar2;
long lVar3;
lVar3 = _my_thread_var();
lVar1 = *param_1;
lVar2 = lVar3;
if (lVar1 != 0) {
*(int8 *)(lVar3 + 0x88) = *(int8 *)(lVar1 + 0x88);
lVar2 = lVar1;
}
*(long *)(lVar2 + 0x88) = lVar3;
*param_1 = lVar3;
do {
if (*(long *)(lVar3 + 0x38) == 0) {
pthread_cond_wait((pthread_cond_t *)(lVar3 + 8),param_2);
}
else {
psi_cond_wait((pthread_cond_t *)(lVar3 + 8),param_2,
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0x477);
}
} while (*(long *)(lVar3 + 0x88) != 0);
return;
}
| |
21,220 | bf_sqrtrem | bluesky950520[P]quickjs/libbf.c | int bf_sqrtrem(bf_t *r, bf_t *rem1, const bf_t *a)
{
int ret;
if (a->len == 0) {
if (a->expn == BF_EXP_NAN) {
bf_set_nan(r);
} else if (a->expn == BF_EXP_INF && a->sign) {
goto invalid_op;
} else {
bf_set(r, a);
}
if (rem1)
bf_set_ui(rem1, 0);
ret = 0;
} else if (a->sign) {
invalid_op:
bf_set_nan(r);
if (rem1)
bf_set_ui(rem1, 0);
ret = BF_ST_INVALID_OP;
} else {
bf_t rem_s, *rem;
bf_sqrt(r, a, (a->expn + 1) / 2, BF_RNDZ);
bf_rint(r, BF_RNDZ);
/* see if the result is exact by computing the remainder */
if (rem1) {
rem = rem1;
} else {
rem = &rem_s;
bf_init(r->ctx, rem);
}
/* XXX: could avoid recomputing the remainder */
bf_mul(rem, r, r, BF_PREC_INF, BF_RNDZ);
bf_neg(rem);
bf_add(rem, rem, a, BF_PREC_INF, BF_RNDZ);
if (bf_is_nan(rem)) {
ret = BF_ST_MEM_ERROR;
goto done;
}
if (rem->len != 0) {
ret = BF_ST_INEXACT;
} else {
ret = 0;
}
done:
if (!rem1)
bf_delete(rem);
}
return ret;
} | O2 | c | bf_sqrtrem:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
cmpq $0x0, 0x18(%rdx)
je 0x718f3
cmpl $0x0, 0x8(%r14)
je 0x7192a
movq %r15, %rdi
callq 0x6f5cd
pushq $0x1
popq %r14
jmp 0x719f4
movq 0x10(%r14), %rax
movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE
cmpq %rcx, %rax
je 0x719db
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rcx, %rax
jne 0x719e6
movq %r15, %rdi
callq 0x6f5cd
jmp 0x719f1
movabsq $0x7fffffffffffffff, %r13 # imm = 0x7FFFFFFFFFFFFFFF
movq 0x10(%r14), %rax
incq %rax
pushq $0x2
popq %rcx
cqto
idivq %rcx
pushq $0x1
popq %rbp
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
movl %ebp, %ecx
callq 0x71a35
movq %r15, %rdi
movl %ebp, %esi
callq 0x71c3d
movq %rbx, %r12
testq %rbx, %rbx
jne 0x71989
leaq 0x18(%rsp), %rax
movq (%r15), %rcx
movq %rcx, -0x18(%rax)
andl $0x0, -0x10(%rax)
leaq 0x1(%r13), %rcx
movq %rcx, -0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq %rsp, %r12
movabsq $0x3fffffffffffffff, %r13 # imm = 0x3FFFFFFFFFFFFFFF
pushq $0x1
popq %rbp
movq %r12, %rdi
movq %r15, %rsi
movq %r15, %rdx
movq %r13, %rcx
movl %ebp, %r8d
callq 0x70da9
xorb $0x1, 0x8(%r12)
movq %r12, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %r13, %rcx
movl %ebp, %r8d
callq 0x71c49
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rax, 0x10(%r12)
jne 0x71a05
pushq $0x20
popq %r14
jmp 0x71a16
cmpl $0x0, 0x8(%r14)
jne 0x718e2
movq %r15, %rdi
movq %r14, %rsi
callq 0x6f666
xorl %r14d, %r14d
testq %rbx, %rbx
je 0x71a23
movq %rbx, %rdi
xorl %esi, %esi
callq 0x6f556
jmp 0x71a23
xorl %r14d, %r14d
cmpq $0x0, 0x18(%r12)
setne %r14b
shll $0x4, %r14d
testq %rbx, %rbx
jne 0x71a23
movq %r12, %rdi
callq 0x7145e
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| bf_sqrtrem:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, rdx
mov rbx, rsi
mov r15, rdi
cmp qword ptr [rdx+18h], 0
jz short loc_718F3
cmp dword ptr [r14+8], 0
jz short loc_7192A
loc_718E2:
mov rdi, r15
call bf_set_nan
push 1
pop r14
jmp loc_719F4
loc_718F3:
mov rax, [r14+10h]
mov rcx, 7FFFFFFFFFFFFFFEh
cmp rax, rcx
jz loc_719DB
mov rcx, 7FFFFFFFFFFFFFFFh
cmp rax, rcx
jnz loc_719E6
mov rdi, r15
call bf_set_nan
jmp loc_719F1
loc_7192A:
mov r13, 7FFFFFFFFFFFFFFFh
mov rax, [r14+10h]
inc rax
push 2
pop rcx
cqo
idiv rcx
push 1
pop rbp
mov rdi, r15
mov rsi, r14
mov rdx, rax
mov ecx, ebp
call bf_sqrt
mov rdi, r15
mov esi, ebp
call bf_rint
mov r12, rbx
test rbx, rbx
jnz short loc_71989
lea rax, [rsp+58h+var_40]
mov rcx, [r15]
mov [rax-18h], rcx
and dword ptr [rax-10h], 0
lea rcx, [r13+1]
mov [rax-8], rcx
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
mov r12, rsp
loc_71989:
mov r13, 3FFFFFFFFFFFFFFFh
push 1
pop rbp
mov rdi, r12
mov rsi, r15
mov rdx, r15
mov rcx, r13
mov r8d, ebp
call bf_mul
xor byte ptr [r12+8], 1
mov rdi, r12
mov rsi, r12
mov rdx, r14
mov rcx, r13
mov r8d, ebp
call bf_add
mov rax, 7FFFFFFFFFFFFFFFh
cmp [r12+10h], rax
jnz short loc_71A05
push 20h ; ' '
pop r14
jmp short loc_71A16
loc_719DB:
cmp dword ptr [r14+8], 0
jnz loc_718E2
loc_719E6:
mov rdi, r15
mov rsi, r14
call bf_set
loc_719F1:
xor r14d, r14d
loc_719F4:
test rbx, rbx
jz short loc_71A23
mov rdi, rbx
xor esi, esi
call bf_set_ui
jmp short loc_71A23
loc_71A05:
xor r14d, r14d
cmp qword ptr [r12+18h], 0
setnz r14b
shl r14d, 4
loc_71A16:
test rbx, rbx
jnz short loc_71A23
mov rdi, r12
call bf_delete_0
loc_71A23:
mov eax, r14d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long bf_sqrtrem(long long *a1, long long a2, long long a3)
{
unsigned int v4; // r14d
long long v5; // rax
long long *v6; // r12
long long v8; // [rsp+0h] [rbp-58h] BYREF
int v9; // [rsp+8h] [rbp-50h]
unsigned long long v10; // [rsp+10h] [rbp-48h]
__int128 v11; // [rsp+18h] [rbp-40h]
if ( !*(_QWORD *)(a3 + 24) )
{
v5 = *(_QWORD *)(a3 + 16);
if ( v5 == 0x7FFFFFFFFFFFFFFELL )
{
if ( *(_DWORD *)(a3 + 8) )
goto LABEL_3;
}
else if ( v5 == 0x7FFFFFFFFFFFFFFFLL )
{
bf_set_nan((long long)a1);
LABEL_13:
v4 = 0;
LABEL_14:
if ( a2 )
bf_set_ui(a2, 0LL);
return v4;
}
bf_set((long long)a1, a3);
goto LABEL_13;
}
if ( *(_DWORD *)(a3 + 8) )
{
LABEL_3:
bf_set_nan((long long)a1);
v4 = 1;
goto LABEL_14;
}
bf_sqrt(a1, a3, (*(_QWORD *)(a3 + 16) + 1LL) / 2, 1LL);
bf_rint(a1, 1LL);
v6 = (long long *)a2;
if ( !a2 )
{
v8 = *a1;
v9 = 0;
v10 = 0x8000000000000000LL;
v11 = 0LL;
v6 = &v8;
}
bf_mul(v6, a1, a1, 0x3FFFFFFFFFFFFFFFLL, 1u);
*((_BYTE *)v6 + 8) ^= 1u;
bf_add(v6, v6, a3, 0x3FFFFFFFFFFFFFFFLL, 1LL);
if ( v6[2] == 0x7FFFFFFFFFFFFFFFLL )
v4 = 32;
else
v4 = 16 * (v6[3] != 0);
if ( !a2 )
bf_delete_0(v6);
return v4;
}
| bf_sqrtrem:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RDX
MOV RBX,RSI
MOV R15,RDI
CMP qword ptr [RDX + 0x18],0x0
JZ 0x001718f3
CMP dword ptr [R14 + 0x8],0x0
JZ 0x0017192a
LAB_001718e2:
MOV RDI,R15
CALL 0x0016f5cd
PUSH 0x1
POP R14
JMP 0x001719f4
LAB_001718f3:
MOV RAX,qword ptr [R14 + 0x10]
MOV RCX,0x7ffffffffffffffe
CMP RAX,RCX
JZ 0x001719db
MOV RCX,0x7fffffffffffffff
CMP RAX,RCX
JNZ 0x001719e6
MOV RDI,R15
CALL 0x0016f5cd
JMP 0x001719f1
LAB_0017192a:
MOV R13,0x7fffffffffffffff
MOV RAX,qword ptr [R14 + 0x10]
INC RAX
PUSH 0x2
POP RCX
CQO
IDIV RCX
PUSH 0x1
POP RBP
MOV RDI,R15
MOV RSI,R14
MOV RDX,RAX
MOV ECX,EBP
CALL 0x00171a35
MOV RDI,R15
MOV ESI,EBP
CALL 0x00171c3d
MOV R12,RBX
TEST RBX,RBX
JNZ 0x00171989
LEA RAX,[RSP + 0x18]
MOV RCX,qword ptr [R15]
MOV qword ptr [RAX + -0x18],RCX
AND dword ptr [RAX + -0x10],0x0
LEA RCX,[R13 + 0x1]
MOV qword ptr [RAX + -0x8],RCX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV R12,RSP
LAB_00171989:
MOV R13,0x3fffffffffffffff
PUSH 0x1
POP RBP
MOV RDI,R12
MOV RSI,R15
MOV RDX,R15
MOV RCX,R13
MOV R8D,EBP
CALL 0x00170da9
XOR byte ptr [R12 + 0x8],0x1
MOV RDI,R12
MOV RSI,R12
MOV RDX,R14
MOV RCX,R13
MOV R8D,EBP
CALL 0x00171c49
MOV RAX,0x7fffffffffffffff
CMP qword ptr [R12 + 0x10],RAX
JNZ 0x00171a05
PUSH 0x20
POP R14
JMP 0x00171a16
LAB_001719db:
CMP dword ptr [R14 + 0x8],0x0
JNZ 0x001718e2
LAB_001719e6:
MOV RDI,R15
MOV RSI,R14
CALL 0x0016f666
LAB_001719f1:
XOR R14D,R14D
LAB_001719f4:
TEST RBX,RBX
JZ 0x00171a23
MOV RDI,RBX
XOR ESI,ESI
CALL 0x0016f556
JMP 0x00171a23
LAB_00171a05:
XOR R14D,R14D
CMP qword ptr [R12 + 0x18],0x0
SETNZ R14B
SHL R14D,0x4
LAB_00171a16:
TEST RBX,RBX
JNZ 0x00171a23
MOV RDI,R12
CALL 0x0017145e
LAB_00171a23:
MOV EAX,R14D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long bf_sqrtrem(int8 *param_1,int1 *param_2,long param_3)
{
int8 *puVar1;
long lVar2;
int8 local_58;
int4 local_50;
int8 local_48;
int8 local_40;
int8 uStack_38;
if (*(long *)(param_3 + 0x18) == 0) {
if (*(long *)(param_3 + 0x10) != 0x7ffffffffffffffe) {
if (*(long *)(param_3 + 0x10) == 0x7fffffffffffffff) {
bf_set_nan(param_1);
}
else {
LAB_001719e6:
bf_set(param_1,param_3);
}
lVar2 = 0;
goto LAB_001719f4;
}
if (*(int *)(param_3 + 8) == 0) goto LAB_001719e6;
}
else if (*(int *)(param_3 + 8) == 0) {
bf_sqrt(param_1,param_3,(*(long *)(param_3 + 0x10) + 1) / 2,1);
bf_rint(param_1,1);
puVar1 = (int8 *)param_2;
if (param_2 == (int1 *)0x0) {
local_58 = *param_1;
local_50 = 0;
local_48 = 0x8000000000000000;
local_40 = 0;
uStack_38 = 0;
puVar1 = &local_58;
}
bf_mul(puVar1,param_1,param_1,0x3fffffffffffffff,1);
*(byte *)((long)puVar1 + 8) = *(byte *)((long)puVar1 + 8) ^ 1;
bf_add(puVar1,puVar1,param_3,0x3fffffffffffffff,1);
if (*(long *)((long)puVar1 + 0x10) == 0x7fffffffffffffff) {
lVar2 = 0x20;
}
else {
lVar2 = (ulong)(*(long *)((long)puVar1 + 0x18) != 0) << 4;
}
if (param_2 != (int1 *)0x0) {
return lVar2;
}
bf_delete(puVar1);
return lVar2;
}
bf_set_nan(param_1);
lVar2 = 1;
LAB_001719f4:
if (param_2 != (int1 *)0x0) {
bf_set_ui(param_2,0);
}
return lVar2;
}
| |
21,221 | js_object_create | bluesky950520[P]quickjs/quickjs.c | static JSValue js_object_create(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue proto, props;
JSValue obj;
proto = argv[0];
if (!JS_IsObject(proto) && !JS_IsNull(proto))
return JS_ThrowTypeError(ctx, "object prototype may only be an Object or null");
obj = JS_NewObjectProto(ctx, proto);
if (JS_IsException(obj))
return JS_EXCEPTION;
props = argv[1];
if (!JS_IsUndefined(props)) {
if (JS_ObjectDefineProperties(ctx, obj, props)) {
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
}
}
return obj;
} | O1 | c | js_object_create:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movq %rdi, %r14
movq 0x8(%r8), %rdx
cmpl $-0x1, %edx
je 0x6fe4a
cmpl $0x2, %edx
jne 0x6fea3
movq (%r12), %rsi
movq %r14, %rdi
movl $0x1, %ecx
callq 0x20f05
movq %rdx, %rbx
cmpl $0x6, %ebx
je 0x6fe97
movq %rax, %r15
movq 0x18(%r12), %r8
cmpl $0x3, %r8d
je 0x6fec0
movq 0x10(%r12), %rcx
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x710f1
testl %eax, %eax
je 0x6fec0
movq 0x18(%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1d8c6
xorl %r15d, %r15d
xorl %eax, %eax
movl $0x6, %ebx
jmp 0x6fed3
leaq 0x31b16(%rip), %rsi # 0xa19c0
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0x22567
movl $0x6, %ebx
xorl %eax, %eax
jmp 0x6fed3
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
movq %r15, %rax
andq %rcx, %rax
movl %r15d, %r15d
orq %rax, %r15
movq %r15, %rax
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| js_object_create:
push r15
push r14
push r12
push rbx
push rax
mov r12, r8
mov r14, rdi
mov rdx, [r8+8]
cmp edx, 0FFFFFFFFh
jz short loc_6FE4A
cmp edx, 2
jnz short loc_6FEA3
loc_6FE4A:
mov rsi, [r12]
mov rdi, r14
mov ecx, 1
call JS_NewObjectProtoClass
mov rbx, rdx
cmp ebx, 6
jz short loc_6FE97
mov r15, rax
mov r8, [r12+18h]
cmp r8d, 3
jz short loc_6FEC0
mov rcx, [r12+10h]
mov rdi, r14
mov rsi, r15
mov rdx, rbx
call JS_ObjectDefineProperties
test eax, eax
jz short loc_6FEC0
mov rdi, [r14+18h]
mov rsi, r15
mov rdx, rbx
call JS_FreeValueRT
loc_6FE97:
xor r15d, r15d
xor eax, eax
mov ebx, 6
jmp short loc_6FED3
loc_6FEA3:
lea rsi, aObjectPrototyp; "object prototype may only be an Object "...
xor r15d, r15d
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
mov ebx, 6
xor eax, eax
jmp short loc_6FED3
loc_6FEC0:
mov rcx, 0FFFFFFFF00000000h
mov rax, r15
and rax, rcx
mov r15d, r15d
loc_6FED3:
or r15, rax
mov rax, r15
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| unsigned long long js_object_create(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
long long *a13,
long long a14)
{
char v14; // al
long long v16; // rdx
long long v17; // rax
long long v18; // rdx
long long v19; // rbx
long long v20; // r15
unsigned long long v21; // rax
v16 = a13[1];
if ( (_DWORD)v16 == -1 || (_DWORD)v16 == 2 )
{
v17 = JS_NewObjectProtoClass(a1, *a13, v16, 1u);
v19 = v18;
if ( (_DWORD)v18 != 6 )
{
v20 = v17;
if ( (unsigned int)a13[3] == 3 || !(unsigned int)JS_ObjectDefineProperties(a1, v17, v18, a13[2]) )
{
v21 = v20 & 0xFFFFFFFF00000000LL;
v20 = (unsigned int)v20;
return v21 | v20;
}
JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v20, v19);
}
v20 = 0LL;
v21 = 0LL;
}
else
{
v20 = 0LL;
JS_ThrowTypeError(
a1,
(long long)"object prototype may only be an Object or null",
v16,
a12,
(long long)a13,
a14,
a2,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
v14);
v21 = 0LL;
}
return v21 | v20;
}
| js_object_create:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,R8
MOV R14,RDI
MOV RDX,qword ptr [R8 + 0x8]
CMP EDX,-0x1
JZ 0x0016fe4a
CMP EDX,0x2
JNZ 0x0016fea3
LAB_0016fe4a:
MOV RSI,qword ptr [R12]
MOV RDI,R14
MOV ECX,0x1
CALL 0x00120f05
MOV RBX,RDX
CMP EBX,0x6
JZ 0x0016fe97
MOV R15,RAX
MOV R8,qword ptr [R12 + 0x18]
CMP R8D,0x3
JZ 0x0016fec0
MOV RCX,qword ptr [R12 + 0x10]
MOV RDI,R14
MOV RSI,R15
MOV RDX,RBX
CALL 0x001710f1
TEST EAX,EAX
JZ 0x0016fec0
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,R15
MOV RDX,RBX
CALL 0x0011d8c6
LAB_0016fe97:
XOR R15D,R15D
XOR EAX,EAX
MOV EBX,0x6
JMP 0x0016fed3
LAB_0016fea3:
LEA RSI,[0x1a19c0]
XOR R15D,R15D
MOV RDI,R14
XOR EAX,EAX
CALL 0x00122567
MOV EBX,0x6
XOR EAX,EAX
JMP 0x0016fed3
LAB_0016fec0:
MOV RCX,-0x100000000
MOV RAX,R15
AND RAX,RCX
MOV R15D,R15D
LAB_0016fed3:
OR R15,RAX
MOV RAX,R15
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
int1 [16] js_object_create(long param_1)
{
int iVar1;
ulong uVar2;
int8 uVar3;
int8 *in_R8;
ulong uVar4;
int1 auVar5 [16];
iVar1 = (int)in_R8[1];
if ((iVar1 != -1) && (iVar1 != 2)) {
uVar4 = 0;
JS_ThrowTypeError(param_1,"object prototype may only be an Object or null");
uVar3 = 6;
uVar2 = 0;
goto LAB_0016fed3;
}
auVar5 = JS_NewObjectProtoClass(param_1,*in_R8,in_R8[1],1);
uVar3 = auVar5._8_8_;
uVar4 = auVar5._0_8_;
if (auVar5._8_4_ == 6) {
LAB_0016fe97:
uVar4 = 0;
uVar2 = 0;
uVar3 = 6;
}
else {
if ((int)in_R8[3] != 3) {
iVar1 = JS_ObjectDefineProperties(param_1,uVar4,uVar3,in_R8[2]);
if (iVar1 != 0) {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar4,uVar3);
goto LAB_0016fe97;
}
}
uVar2 = uVar4 & 0xffffffff00000000;
uVar4 = uVar4 & 0xffffffff;
}
LAB_0016fed3:
auVar5._8_8_ = uVar3;
auVar5._0_8_ = uVar4 | uVar2;
return auVar5;
}
| |
21,222 | js_object_create | bluesky950520[P]quickjs/quickjs.c | static JSValue js_object_create(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue proto, props;
JSValue obj;
proto = argv[0];
if (!JS_IsObject(proto) && !JS_IsNull(proto))
return JS_ThrowTypeError(ctx, "object prototype may only be an Object or null");
obj = JS_NewObjectProto(ctx, proto);
if (JS_IsException(obj))
return JS_EXCEPTION;
props = argv[1];
if (!JS_IsUndefined(props)) {
if (JS_ObjectDefineProperties(ctx, obj, props)) {
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
}
}
return obj;
} | O2 | c | js_object_create:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %r12
movq %rdi, %r14
movq 0x8(%r8), %rdx
cmpl $-0x1, %edx
je 0x5e139
cmpl $0x2, %edx
jne 0x5e18e
movq (%r12), %rsi
movq %r14, %rdi
callq 0x1b2b3
movq %rdx, %rbx
pushq $0x6
popq %r13
cmpl $0x6, %ebx
je 0x5e184
movq %rax, %r15
movq 0x18(%r12), %r8
cmpl $0x3, %r8d
je 0x5e1a9
movq 0x10(%r12), %rcx
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x5f226
testl %eax, %eax
je 0x5e1a9
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1801e
xorl %r15d, %r15d
xorl %eax, %eax
movq %r13, %rbx
jmp 0x5e1bc
leaq 0x2a765(%rip), %rsi # 0x888fa
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0x1c64d
pushq $0x6
popq %rbx
xorl %eax, %eax
jmp 0x5e1bc
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
movq %r15, %rax
andq %rcx, %rax
movl %r15d, %r15d
orq %rax, %r15
movq %r15, %rax
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| js_object_create:
push r15
push r14
push r13
push r12
push rbx
mov r12, r8
mov r14, rdi
mov rdx, [r8+8]
cmp edx, 0FFFFFFFFh
jz short loc_5E139
cmp edx, 2
jnz short loc_5E18E
loc_5E139:
mov rsi, [r12]
mov rdi, r14
call JS_NewObjectProto
mov rbx, rdx
push 6
pop r13
cmp ebx, 6
jz short loc_5E184
mov r15, rax
mov r8, [r12+18h]
cmp r8d, 3
jz short loc_5E1A9
mov rcx, [r12+10h]
mov rdi, r14
mov rsi, r15
mov rdx, rbx
call JS_ObjectDefineProperties
test eax, eax
jz short loc_5E1A9
mov rdi, r14
mov rsi, r15
mov rdx, rbx
call JS_FreeValue
loc_5E184:
xor r15d, r15d
xor eax, eax
mov rbx, r13
jmp short loc_5E1BC
loc_5E18E:
lea rsi, aObjectPrototyp; "object prototype may only be an Object "...
xor r15d, r15d
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
push 6
pop rbx
xor eax, eax
jmp short loc_5E1BC
loc_5E1A9:
mov rcx, 0FFFFFFFF00000000h
mov rax, r15
and rax, rcx
mov r15d, r15d
loc_5E1BC:
or r15, rax
mov rax, r15
mov rdx, rbx
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| unsigned long long js_object_create(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
long long *a13,
long long a14)
{
long long v15; // rdx
long long v16; // rax
long long v17; // rdx
long long v18; // rbx
long long v19; // r15
unsigned long long v20; // rax
char v22; // [rsp+0h] [rbp-28h]
v15 = a13[1];
if ( (_DWORD)v15 == -1 || (_DWORD)v15 == 2 )
{
v16 = JS_NewObjectProto(a1, *a13, v15);
v18 = v17;
if ( (_DWORD)v17 != 6 )
{
v19 = v16;
if ( (unsigned int)a13[3] == 3 || !(unsigned int)JS_ObjectDefineProperties(a1, v16, v17, a13[2]) )
{
v20 = v19 & 0xFFFFFFFF00000000LL;
v19 = (unsigned int)v19;
return v20 | v19;
}
JS_FreeValue(a1, v19, v18);
}
v19 = 0LL;
v20 = 0LL;
}
else
{
v19 = 0LL;
JS_ThrowTypeError(
a1,
(long long)"object prototype may only be an Object or null",
v15,
a12,
(long long)a13,
a14,
a2,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
v22);
v20 = 0LL;
}
return v20 | v19;
}
| js_object_create:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R12,R8
MOV R14,RDI
MOV RDX,qword ptr [R8 + 0x8]
CMP EDX,-0x1
JZ 0x0015e139
CMP EDX,0x2
JNZ 0x0015e18e
LAB_0015e139:
MOV RSI,qword ptr [R12]
MOV RDI,R14
CALL 0x0011b2b3
MOV RBX,RDX
PUSH 0x6
POP R13
CMP EBX,0x6
JZ 0x0015e184
MOV R15,RAX
MOV R8,qword ptr [R12 + 0x18]
CMP R8D,0x3
JZ 0x0015e1a9
MOV RCX,qword ptr [R12 + 0x10]
MOV RDI,R14
MOV RSI,R15
MOV RDX,RBX
CALL 0x0015f226
TEST EAX,EAX
JZ 0x0015e1a9
MOV RDI,R14
MOV RSI,R15
MOV RDX,RBX
CALL 0x0011801e
LAB_0015e184:
XOR R15D,R15D
XOR EAX,EAX
MOV RBX,R13
JMP 0x0015e1bc
LAB_0015e18e:
LEA RSI,[0x1888fa]
XOR R15D,R15D
MOV RDI,R14
XOR EAX,EAX
CALL 0x0011c64d
PUSH 0x6
POP RBX
XOR EAX,EAX
JMP 0x0015e1bc
LAB_0015e1a9:
MOV RCX,-0x100000000
MOV RAX,R15
AND RAX,RCX
MOV R15D,R15D
LAB_0015e1bc:
OR R15,RAX
MOV RAX,R15
MOV RDX,RBX
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
int1 [16] js_object_create(int8 param_1)
{
int iVar1;
ulong uVar2;
int8 uVar3;
int8 *in_R8;
ulong uVar4;
int1 auVar5 [16];
if (((int)in_R8[1] != -1) && ((int)in_R8[1] != 2)) {
uVar4 = 0;
JS_ThrowTypeError(param_1,"object prototype may only be an Object or null");
uVar3 = 6;
uVar2 = 0;
goto LAB_0015e1bc;
}
auVar5 = JS_NewObjectProto(param_1,*in_R8);
uVar3 = auVar5._8_8_;
uVar4 = auVar5._0_8_;
if (auVar5._8_4_ == 6) {
LAB_0015e184:
uVar4 = 0;
uVar2 = 0;
uVar3 = 6;
}
else {
if ((int)in_R8[3] != 3) {
iVar1 = JS_ObjectDefineProperties(param_1,uVar4,uVar3,in_R8[2]);
if (iVar1 != 0) {
JS_FreeValue(param_1,uVar4,uVar3);
goto LAB_0015e184;
}
}
uVar2 = uVar4 & 0xffffffff00000000;
uVar4 = uVar4 & 0xffffffff;
}
LAB_0015e1bc:
auVar5._8_8_ = uVar3;
auVar5._0_8_ = uVar4 | uVar2;
return auVar5;
}
| |
21,223 | CLI::App::set_help_all_flag(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | MikePodsytnik[P]TCRtrie/build_O2/_deps/cli11-src/include/CLI/impl/App_inl.hpp | CLI11_INLINE Option *App::set_help_all_flag(std::string help_name, const std::string &help_description) {
// take flag_description by const reference otherwise add_flag tries to assign to flag_description
if(help_all_ptr_ != nullptr) {
remove_option(help_all_ptr_);
help_all_ptr_ = nullptr;
}
// Empty name will simply remove the help all flag
if(!help_name.empty()) {
help_all_ptr_ = add_flag(help_name, help_description);
help_all_ptr_->configurable(false);
}
return help_all_ptr_;
} | O2 | cpp | CLI::App::set_help_all_flag(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x138(%rdi), %rsi
testq %rsi, %rsi
je 0x127a6
movq %rbx, %rdi
callq 0x12b88
andq $0x0, 0x138(%rbx)
cmpq $0x0, 0x8(%r15)
je 0x127e9
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x75e0
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x12c32
movq %rax, 0x138(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x7860
movq 0x138(%rbx), %rax
movb $0x0, 0x23(%rax)
jmp 0x127eb
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x7860
movq %rbx, %rdi
callq 0x7770
| _ZN3CLI3App17set_help_all_flagENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS6_:
push r15; char
push r14; int
push r12; int
push rbx; int
sub rsp, 28h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov rsi, [rdi+138h]; CLI::Option *
test rsi, rsi
jz short loc_127A6
mov rdi, rbx; this
call _ZN3CLI3App13remove_optionEPNS_6OptionE; CLI::App::remove_option(CLI::Option *)
and qword ptr [rbx+138h], 0
loc_127A6:
cmp qword ptr [r15+8], 0
jz short loc_127E9
lea r12, [rsp+48h+var_40]
mov rdi, r12
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
mov rdi, rbx; this
mov rsi, r12
mov rdx, r14
call _ZN3CLI3App8add_flagIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEETnNSt9enable_ifIXaasr3std8is_constIT_EE5valuesr3std16is_constructibleIS7_SA_EE5valueENS_6detail7enablerEE4typeELSC_0EEEPNS_6OptionES7_RSA_
mov [rbx+138h], rax
lea rdi, [rsp+48h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, [rbx+138h]
mov byte ptr [rax+23h], 0
jmp short loc_127EB
loc_127E9:
xor eax, eax
loc_127EB:
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| long long CLI::App::set_help_all_flag(CLI::App *this, long long a2)
{
CLI::Option *v3; // rsi
long long result; // rax
int v5; // [rsp+0h] [rbp-48h]
int v6[6]; // [rsp+8h] [rbp-40h] BYREF
char v7; // [rsp+20h] [rbp-28h]
int v8; // [rsp+28h] [rbp-20h]
int v9; // [rsp+30h] [rbp-18h]
int v10; // [rsp+38h] [rbp-10h]
char v11; // [rsp+40h] [rbp-8h]
v3 = (CLI::Option *)*((_QWORD *)this + 39);
if ( v3 )
{
CLI::App::remove_option(this, v3);
*((_QWORD *)this + 39) = 0LL;
}
if ( !*(_QWORD *)(a2 + 8) )
return 0LL;
std::string::basic_string(v6);
*((_QWORD *)this + 39) = ZN3CLI3App8add_flagIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEETnNSt9enable_ifIXaasr3std8is_constIT_EE5valuesr3std16is_constructibleIS7_SA_EE5valueENS_6detail7enablerEE4typeELSC_0EEEPNS_6OptionES7_RSA_(
this,
v5,
v6[0],
v6[2],
v6[4],
v7,
v8,
v9,
v10,
v11);
std::string::~string(v6);
result = *((_QWORD *)this + 39);
*(_BYTE *)(result + 35) = 0;
return result;
}
| set_help_all_flag:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV RSI,qword ptr [RDI + 0x138]
TEST RSI,RSI
JZ 0x001127a6
MOV RDI,RBX
CALL 0x00112b88
AND qword ptr [RBX + 0x138],0x0
LAB_001127a6:
CMP qword ptr [R15 + 0x8],0x0
JZ 0x001127e9
LEA R12,[RSP + 0x8]
MOV RDI,R12
MOV RSI,R15
CALL 0x001075e0
LAB_001127bd:
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R14
CALL 0x00112c32
LAB_001127cb:
MOV qword ptr [RBX + 0x138],RAX
LEA RDI,[RSP + 0x8]
CALL 0x00107860
MOV RAX,qword ptr [RBX + 0x138]
MOV byte ptr [RAX + 0x23],0x0
JMP 0x001127eb
LAB_001127e9:
XOR EAX,EAX
LAB_001127eb:
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
RET
|
/* CLI::App::set_help_all_flag(std::__cxx11::string, std::__cxx11::string const&) */
long __thiscall CLI::App::set_help_all_flag(App *this,string *param_2,int8 param_3)
{
int8 uVar1;
long lVar2;
string local_40 [32];
if (*(Option **)(this + 0x138) != (Option *)0x0) {
remove_option(this,*(Option **)(this + 0x138));
*(int8 *)(this + 0x138) = 0;
}
if (*(long *)(param_2 + 8) == 0) {
lVar2 = 0;
}
else {
std::__cxx11::string::string(local_40,param_2);
/* try { // try from 001127bd to 001127ca has its CatchHandler @ 001127f7 */
uVar1 = _ZN3CLI3App8add_flagIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEETnNSt9enable_ifIXaasr3std8is_constIT_EE5valuesr3std16is_constructibleIS7_SA_EE5valueENS_6detail7enablerEE4typeELSC_0EEEPNS_6OptionES7_RSA_
(this,local_40,param_3);
*(int8 *)(this + 0x138) = uVar1;
std::__cxx11::string::~string(local_40);
lVar2 = *(long *)(this + 0x138);
*(int1 *)(lVar2 + 0x23) = 0;
}
return lVar2;
}
| |
21,224 | google::protobuf::compiler::php::(anonymous namespace)::GenerateHead(google::protobuf::FileDescriptor const*, google::protobuf::io::Printer*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/php/php_generator.cc | void GenerateHead(const FileDescriptor* file, io::Printer* printer) {
printer->Print(
"<?php\n"
"# Generated by the protocol buffer compiler. DO NOT EDIT!\n"
"# source: ^filename^\n"
"\n",
"filename", file->name());
} | O0 | cpp | google::protobuf::compiler::php::(anonymous namespace)::GenerateHead(google::protobuf::FileDescriptor const*, google::protobuf::io::Printer*):
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
callq 0x28990
movq (%rsp), %rdi
movq %rax, %rcx
leaq 0x31e9fb(%rip), %rsi # 0x3b29aa
leaq 0x31b86d(%rip), %rdx # 0x3af823
callq 0x72500
addq $0x18, %rsp
retq
| _ZN6google8protobuf8compiler3php12_GLOBAL__N_112GenerateHeadEPKNS0_14FileDescriptorEPNS0_2io7PrinterE:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_10], rsi
mov rax, [rsp+18h+var_10]
mov [rsp+18h+var_18], rax
mov rdi, [rsp+18h+var_8]
call _ZNK6google8protobuf14FileDescriptor4nameB5cxx11Ev; google::protobuf::FileDescriptor::name(void)
mov rdi, [rsp+18h+var_18]
mov rcx, rax
lea rsi, aPhpGeneratedBy; "<?php\n# Generated by the protocol buff"...
lea rdx, aFilename_0; "filename"
call _ZN6google8protobuf2io7Printer5PrintIJA9_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvPKcDpRKT_; google::protobuf::io::Printer::Print<char [9],std::string>(char const*,char [9],std::string const&)
add rsp, 18h
retn
| long long google::protobuf::compiler::php::`anonymous namespace'::GenerateHead(
google::protobuf::compiler::php::_anonymous_namespace_ *this,
const google::protobuf::FileDescriptor *a2,
google::protobuf::io::Printer *a3)
{
long long v3; // rax
v3 = google::protobuf::FileDescriptor::name[abi:cxx11]((long long)this);
return google::protobuf::io::Printer::Print<char [9],std::string>(
(long long)a2,
(long long)"<?php\n# Generated by the protocol buffer compiler. DO NOT EDIT!\n# source: ^filename^\n\n",
"filename",
v3);
}
| GenerateHead:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP],RAX
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x00128990
MOV RDI,qword ptr [RSP]
MOV RCX,RAX
LEA RSI,[0x4b29aa]
LEA RDX,[0x4af823]
CALL 0x00172500
ADD RSP,0x18
RET
|
/* google::protobuf::compiler::php::(anonymous
namespace)::GenerateHead(google::protobuf::FileDescriptor const*, google::protobuf::io::Printer*)
*/
void google::protobuf::compiler::php::(anonymous_namespace)::GenerateHead
(FileDescriptor *param_1,Printer *param_2)
{
string *psVar1;
psVar1 = (string *)FileDescriptor::name_abi_cxx11_(param_1);
io::Printer::Print<char[9],std::__cxx11::string>
(param_2,
"<?php\n# Generated by the protocol buffer compiler. DO NOT EDIT!\n# source: ^filename^\n\n"
,"filename",psVar1);
return;
}
| |
21,225 | common_log::set_file(char const*) | llama.cpp/common/log.cpp | void set_file(const char * path) {
pause();
if (file) {
fclose(file);
}
if (path) {
file = fopen(path, "w");
} else {
file = nullptr;
}
resume();
} | O3 | cpp | common_log::set_file(char const*):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x3d1c8
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
je 0x3d5d9
callq 0x164b0
testq %r14, %r14
je 0x3d5ef
leaq 0x1c12(%rip), %rsi # 0x3f1f7
movq %r14, %rdi
callq 0x16dc0
jmp 0x3d5f1
xorl %eax, %eax
movq %rax, 0x60(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3d250
| _ZN10common_log8set_fileEPKc:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
call _ZN10common_log5pauseEv; common_log::pause(void)
mov rdi, [rbx+60h]
test rdi, rdi
jz short loc_3D5D9
call _fclose
loc_3D5D9:
test r14, r14
jz short loc_3D5EF
lea rsi, aGgmlThreadpool_1+12h; "w"
mov rdi, r14
call _fopen
jmp short loc_3D5F1
loc_3D5EF:
xor eax, eax
loc_3D5F1:
mov [rbx+60h], rax
mov rdi, rbx; this
add rsp, 8
pop rbx
pop r14
jmp _ZN10common_log6resumeEv; common_log::resume(void)
| long long common_log::set_file(common_log *this, const char *a2)
{
long long v3; // rdi
long long v4; // rax
common_log::pause(this);
v3 = *((_QWORD *)this + 12);
if ( v3 )
fclose(v3);
if ( a2 )
v4 = fopen(a2, "w");
else
v4 = 0LL;
*((_QWORD *)this + 12) = v4;
return common_log::resume(this);
}
| set_file:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
CALL 0x0013d1c8
MOV RDI,qword ptr [RBX + 0x60]
TEST RDI,RDI
JZ 0x0013d5d9
CALL 0x001164b0
LAB_0013d5d9:
TEST R14,R14
JZ 0x0013d5ef
LEA RSI,[0x13f1f7]
MOV RDI,R14
CALL 0x00116dc0
JMP 0x0013d5f1
LAB_0013d5ef:
XOR EAX,EAX
LAB_0013d5f1:
MOV qword ptr [RBX + 0x60],RAX
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0013d250
|
/* common_log::set_file(char const*) */
void __thiscall common_log::set_file(common_log *this,char *param_1)
{
FILE *pFVar1;
pause(this);
if (*(FILE **)(this + 0x60) != (FILE *)0x0) {
fclose(*(FILE **)(this + 0x60));
}
if (param_1 == (char *)0x0) {
pFVar1 = (FILE *)0x0;
}
else {
pFVar1 = fopen(param_1,"w");
}
*(FILE **)(this + 0x60) = pFVar1;
resume(this);
return;
}
| |
21,226 | thr_multi_lock | eloqsql/mysys/thr_lock.c | enum enum_thr_lock_result
thr_multi_lock(THR_LOCK_DATA **data, uint count, THR_LOCK_INFO *owner,
ulong lock_wait_timeout)
{
THR_LOCK_DATA **pos, **end, **first_lock;
DBUG_ENTER("thr_multi_lock");
DBUG_PRINT("lock",("data: %p count: %d", data, count));
if (count > 1)
sort_locks(data,count);
else if (count == 0)
DBUG_RETURN(THR_LOCK_SUCCESS);
/* lock everything */
DEBUG_SYNC_C("thr_multi_lock_before_thr_lock");
for (pos=data,end=data+count; pos < end ; pos++)
{
enum enum_thr_lock_result result= thr_lock(*pos, owner, lock_wait_timeout);
if (result != THR_LOCK_SUCCESS)
{ /* Aborted */
thr_multi_unlock(data,(uint) (pos-data), 0);
/* Mark all requested locks as TL_UNLOCK (to simplify lock checking) */
for ( ; pos < end ; pos++)
(*pos)->type= TL_UNLOCK;
DBUG_RETURN(result);
}
#ifdef MAIN
printf("Thread: %s Got lock:%p type: %d\n",my_thread_name(),
pos[0]->lock, pos[0]->type); fflush(stdout);
#endif
}
DEBUG_SYNC_C("thr_multi_lock_after_thr_lock");
/*
Call start_trans for all locks.
If we lock the same table multiple times, we must use the same
status_param; We ensure this by calling copy_status() for all
copies of the same tables.
*/
if ((*data)->lock->start_trans)
((*data)->lock->start_trans)((*data)->status_param);
for (first_lock=data, pos= data+1 ; pos < end ; pos++)
{
/* Get the current status (row count, checksum, trid etc) */
if ((*pos)->lock->start_trans)
(*(*pos)->lock->start_trans)((*pos)->status_param);
/*
If same table as previous table use pointer to previous status
information to ensure that all read/write tables shares same
state.
*/
if (pos[0]->lock == pos[-1]->lock && pos[0]->lock->copy_status)
(pos[0]->lock->copy_status)((*pos)->status_param,
(*first_lock)->status_param);
else
{
/* Different lock, use this as base for next lock */
first_lock= pos;
}
}
DBUG_RETURN(THR_LOCK_SUCCESS);
} | O0 | c | thr_multi_lock:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
jmp 0xffd79
cmpl $0x1, -0x14(%rbp)
jbe 0xffd8d
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0xfff60
jmp 0xffda3
cmpl $0x0, -0x14(%rbp)
jne 0xffda1
jmp 0xffd95
movl $0x0, -0x4(%rbp)
jmp 0xfff56
jmp 0xffda3
jmp 0xffda5
jmp 0xffda7
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0xffe4a
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x100030
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
je 0xffe37
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
sarq $0x3, %rax
movl %eax, %esi
xorl %edx, %edx
callq 0x1006f0
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0xffe2a
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl $0x0, 0x40(%rax)
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
jmp 0xffe04
jmp 0xffe2c
movl -0x44(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xfff56
jmp 0xffe39
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
jmp 0xffdc1
jmp 0xffe4c
jmp 0xffe4e
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
cmpq $0x0, 0xd0(%rax)
je 0xffe82
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq 0xd0(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq 0x28(%rcx), %rdi
callq *%rax
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0xfff4d
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
cmpq $0x0, 0xd0(%rax)
je 0xffed8
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq 0xd0(%rax), %rax
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
movq 0x28(%rcx), %rdi
callq *%rax
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq -0x30(%rbp), %rcx
movq -0x8(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jne 0xfff32
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
cmpq $0x0, 0xb8(%rax)
je 0xfff32
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq 0xb8(%rax), %rax
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
movq 0x28(%rcx), %rdi
movq -0x40(%rbp), %rcx
movq (%rcx), %rcx
movq 0x28(%rcx), %rsi
callq *%rax
jmp 0xfff3a
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0xfff3c
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
jmp 0xffe96
jmp 0xfff4f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nop
| thr_multi_lock:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
jmp short $+2
loc_FFD79:
cmp [rbp+var_14], 1
jbe short loc_FFD8D
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
call sort_locks
jmp short loc_FFDA3
loc_FFD8D:
cmp [rbp+var_14], 0
jnz short loc_FFDA1
jmp short $+2
loc_FFD95:
mov [rbp+var_4], 0
jmp loc_FFF56
loc_FFDA1:
jmp short $+2
loc_FFDA3:
jmp short $+2
loc_FFDA5:
jmp short $+2
loc_FFDA7:
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov ecx, [rbp+var_14]
shl rcx, 3
add rax, rcx
mov [rbp+var_38], rax
loc_FFDC1:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jnb short loc_FFE4A
mov rax, [rbp+var_30]
mov rdi, [rax]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
call thr_lock
mov [rbp+var_44], eax
cmp [rbp+var_44], 0
jz short loc_FFE37
mov rdi, [rbp+var_10]
mov rax, [rbp+var_30]
mov rcx, [rbp+var_10]
sub rax, rcx
sar rax, 3
mov esi, eax
xor edx, edx
call thr_multi_unlock
loc_FFE04:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jnb short loc_FFE2A
mov rax, [rbp+var_30]
mov rax, [rax]
mov dword ptr [rax+40h], 0
mov rax, [rbp+var_30]
add rax, 8
mov [rbp+var_30], rax
jmp short loc_FFE04
loc_FFE2A:
jmp short $+2
loc_FFE2C:
mov eax, [rbp+var_44]
mov [rbp+var_4], eax
jmp loc_FFF56
loc_FFE37:
jmp short $+2
loc_FFE39:
mov rax, [rbp+var_30]
add rax, 8
mov [rbp+var_30], rax
jmp loc_FFDC1
loc_FFE4A:
jmp short $+2
loc_FFE4C:
jmp short $+2
loc_FFE4E:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+18h]
cmp qword ptr [rax+0D0h], 0
jz short loc_FFE82
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+18h]
mov rax, [rax+0D0h]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
mov rdi, [rcx+28h]
call rax
loc_FFE82:
mov rax, [rbp+var_10]
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
add rax, 8
mov [rbp+var_30], rax
loc_FFE96:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jnb loc_FFF4D
mov rax, [rbp+var_30]
mov rax, [rax]
mov rax, [rax+18h]
cmp qword ptr [rax+0D0h], 0
jz short loc_FFED8
mov rax, [rbp+var_30]
mov rax, [rax]
mov rax, [rax+18h]
mov rax, [rax+0D0h]
mov rcx, [rbp+var_30]
mov rcx, [rcx]
mov rdi, [rcx+28h]
call rax
loc_FFED8:
mov rax, [rbp+var_30]
mov rax, [rax]
mov rax, [rax+18h]
mov rcx, [rbp+var_30]
mov rcx, [rcx-8]
cmp rax, [rcx+18h]
jnz short loc_FFF32
mov rax, [rbp+var_30]
mov rax, [rax]
mov rax, [rax+18h]
cmp qword ptr [rax+0B8h], 0
jz short loc_FFF32
mov rax, [rbp+var_30]
mov rax, [rax]
mov rax, [rax+18h]
mov rax, [rax+0B8h]
mov rcx, [rbp+var_30]
mov rcx, [rcx]
mov rdi, [rcx+28h]
mov rcx, [rbp+var_40]
mov rcx, [rcx]
mov rsi, [rcx+28h]
call rax
jmp short loc_FFF3A
loc_FFF32:
mov rax, [rbp+var_30]
mov [rbp+var_40], rax
loc_FFF3A:
jmp short $+2
loc_FFF3C:
mov rax, [rbp+var_30]
add rax, 8
mov [rbp+var_30], rax
jmp loc_FFE96
loc_FFF4D:
jmp short $+2
loc_FFF4F:
mov [rbp+var_4], 0
loc_FFF56:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
| long long thr_multi_lock(_QWORD *a1, unsigned int a2, long long a3, long long a4)
{
unsigned int v5; // [rsp+Ch] [rbp-44h]
_QWORD *v6; // [rsp+10h] [rbp-40h]
unsigned long long v7; // [rsp+18h] [rbp-38h]
_QWORD *v8; // [rsp+20h] [rbp-30h]
_QWORD *i; // [rsp+20h] [rbp-30h]
if ( a2 <= 1 )
{
if ( !a2 )
return 0;
}
else
{
sort_locks(a1, a2);
}
v8 = a1;
v7 = (unsigned long long)&a1[a2];
while ( (unsigned long long)v8 < v7 )
{
v5 = thr_lock(*v8, a3, a4);
if ( v5 )
{
thr_multi_unlock(a1, (unsigned int)(v8 - a1), 0LL);
while ( (unsigned long long)v8 < v7 )
*(_DWORD *)(*v8++ + 64LL) = 0;
return v5;
}
++v8;
}
if ( *(_QWORD *)(*(_QWORD *)(*a1 + 24LL) + 208LL) )
(*(void ( **)(_QWORD))(*(_QWORD *)(*a1 + 24LL) + 208LL))(*(_QWORD *)(*a1 + 40LL));
v6 = a1;
for ( i = a1 + 1; (unsigned long long)i < v7; ++i )
{
if ( *(_QWORD *)(*(_QWORD *)(*i + 24LL) + 208LL) )
(*(void ( **)(_QWORD))(*(_QWORD *)(*i + 24LL) + 208LL))(*(_QWORD *)(*i + 40LL));
if ( *(_QWORD *)(*i + 24LL) == *(_QWORD *)(*(i - 1) + 24LL) && *(_QWORD *)(*(_QWORD *)(*i + 24LL) + 184LL) )
(*(void ( **)(_QWORD, _QWORD))(*(_QWORD *)(*i + 24LL) + 184LL))(
*(_QWORD *)(*i + 40LL),
*(_QWORD *)(*v6 + 40LL));
else
v6 = i;
}
return 0;
}
| thr_multi_lock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
JMP 0x001ffd79
LAB_001ffd79:
CMP dword ptr [RBP + -0x14],0x1
JBE 0x001ffd8d
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
CALL 0x001fff60
JMP 0x001ffda3
LAB_001ffd8d:
CMP dword ptr [RBP + -0x14],0x0
JNZ 0x001ffda1
JMP 0x001ffd95
LAB_001ffd95:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001fff56
LAB_001ffda1:
JMP 0x001ffda3
LAB_001ffda3:
JMP 0x001ffda5
LAB_001ffda5:
JMP 0x001ffda7
LAB_001ffda7:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x14]
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
LAB_001ffdc1:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x001ffe4a
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x00200030
MOV dword ptr [RBP + -0x44],EAX
CMP dword ptr [RBP + -0x44],0x0
JZ 0x001ffe37
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,RCX
SAR RAX,0x3
MOV ESI,EAX
XOR EDX,EDX
CALL 0x002006f0
LAB_001ffe04:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x001ffe2a
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV dword ptr [RAX + 0x40],0x0
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x8
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001ffe04
LAB_001ffe2a:
JMP 0x001ffe2c
LAB_001ffe2c:
MOV EAX,dword ptr [RBP + -0x44]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001fff56
LAB_001ffe37:
JMP 0x001ffe39
LAB_001ffe39:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x8
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001ffdc1
LAB_001ffe4a:
JMP 0x001ffe4c
LAB_001ffe4c:
JMP 0x001ffe4e
LAB_001ffe4e:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x18]
CMP qword ptr [RAX + 0xd0],0x0
JZ 0x001ffe82
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0xd0]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
MOV RDI,qword ptr [RCX + 0x28]
CALL RAX
LAB_001ffe82:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x8
MOV qword ptr [RBP + -0x30],RAX
LAB_001ffe96:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x001fff4d
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x18]
CMP qword ptr [RAX + 0xd0],0x0
JZ 0x001ffed8
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0xd0]
MOV RCX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RCX]
MOV RDI,qword ptr [RCX + 0x28]
CALL RAX
LAB_001ffed8:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RCX + -0x8]
CMP RAX,qword ptr [RCX + 0x18]
JNZ 0x001fff32
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x18]
CMP qword ptr [RAX + 0xb8],0x0
JZ 0x001fff32
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RCX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RCX]
MOV RDI,qword ptr [RCX + 0x28]
MOV RCX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RCX]
MOV RSI,qword ptr [RCX + 0x28]
CALL RAX
JMP 0x001fff3a
LAB_001fff32:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x40],RAX
LAB_001fff3a:
JMP 0x001fff3c
LAB_001fff3c:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x8
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001ffe96
LAB_001fff4d:
JMP 0x001fff4f
LAB_001fff4f:
MOV dword ptr [RBP + -0x4],0x0
LAB_001fff56:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x50
POP RBP
RET
|
int thr_multi_lock(long *param_1,uint param_2,int8 param_3,int8 param_4)
{
int iVar1;
long *plVar2;
long *local_48;
long *local_38;
if (param_2 < 2) {
if (param_2 == 0) {
return 0;
}
}
else {
sort_locks(param_1,param_2);
}
plVar2 = param_1 + param_2;
local_38 = param_1;
while( true ) {
if (plVar2 <= local_38) {
if (*(long *)(*(long *)(*param_1 + 0x18) + 0xd0) != 0) {
(**(code **)(*(long *)(*param_1 + 0x18) + 0xd0))(*(int8 *)(*param_1 + 0x28));
}
local_48 = param_1;
for (local_38 = param_1 + 1; local_38 < plVar2; local_38 = local_38 + 1) {
if (*(long *)(*(long *)(*local_38 + 0x18) + 0xd0) != 0) {
(**(code **)(*(long *)(*local_38 + 0x18) + 0xd0))(*(int8 *)(*local_38 + 0x28));
}
if ((*(long *)(*local_38 + 0x18) == *(long *)(local_38[-1] + 0x18)) &&
(*(long *)(*(long *)(*local_38 + 0x18) + 0xb8) != 0)) {
(**(code **)(*(long *)(*local_38 + 0x18) + 0xb8))
(*(int8 *)(*local_38 + 0x28),*(int8 *)(*local_48 + 0x28));
}
else {
local_48 = local_38;
}
}
return 0;
}
iVar1 = thr_lock(*local_38,param_3,param_4);
if (iVar1 != 0) break;
local_38 = local_38 + 1;
}
thr_multi_unlock(param_1,(long)local_38 - (long)param_1 >> 3 & 0xffffffff,0);
for (; local_38 < plVar2; local_38 = local_38 + 1) {
*(int4 *)(*local_38 + 0x40) = 0;
}
return iVar1;
}
| |
21,227 | ma_bitmap_create_missing_into_pagecache | eloqsql/storage/maria/ma_bitmap.c | static my_bool
_ma_bitmap_create_missing_into_pagecache(MARIA_SHARE *share,
MARIA_FILE_BITMAP *bitmap,
pgcache_page_no_t from,
pgcache_page_no_t to,
uchar *zeroes)
{
pgcache_page_no_t i;
/*
We do not use my_chsize() because there can be a race between when it
reads the physical size and when it writes (assume data_file_length is 10,
physical length is 8 and two data pages are in cache, and here we do a
my_chsize: my_chsize sees physical length is 8, then the two data pages go
to disk then my_chsize writes from page 8 and so overwrites the two data
pages, wrongly).
We instead rely on the filesystem filling gaps with zeroes.
*/
for (i= from; i <= to; i+= bitmap->pages_covered)
{
/**
No need to keep them pinned, they are new so flushable.
@todo but we may want to keep them pinned, as an optimization: if they
are not pinned they may go to disk before the data pages go (so, the
physical pages would be in non-ascending "sparse" order on disk), or the
filesystem may fill gaps with zeroes physically which is a waste of
time.
*/
if (pagecache_write(share->pagecache,
&bitmap->file, i, 0,
zeroes, PAGECACHE_PLAIN_PAGE,
PAGECACHE_LOCK_LEFT_UNLOCKED,
PAGECACHE_PIN_LEFT_UNPINNED,
PAGECACHE_WRITE_DELAY, 0, LSN_IMPOSSIBLE))
goto err;
}
/*
Data pages after data_file_length are full of zeroes but that is allowed
as they are marked empty in the bitmap.
*/
return FALSE;
err:
_ma_set_fatal_error_with_share(share, my_errno);
return TRUE;
} | O3 | c | ma_bitmap_create_missing_into_pagecache:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, -0x38(%rbp)
movq %rdi, -0x30(%rbp)
xorl %r14d, %r14d
cmpq %rcx, %rdx
ja 0x41ca6
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbx
leaq 0x40(%rsi), %r15
movq -0x30(%rbp), %rax
movq 0x600(%rax), %rdi
movl 0x80(%rdi), %eax
movl %eax, 0x30(%rsp)
movl %r14d, 0x28(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movl %r14d, 0x10(%rsp)
movl %r14d, (%rsp)
movl $0x1, 0x8(%rsp)
movq %r15, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
movq -0x38(%rbp), %r8
movl $0x1, %r9d
callq 0x3366a
testb %al, %al
jne 0x41c93
addq 0x138(%rbx), %r13
cmpq %r12, %r13
jbe 0x41c34
xorl %r14d, %r14d
jmp 0x41ca6
callq 0xa16ee
movl (%rax), %esi
movq -0x30(%rbp), %rdi
callq 0x3664e
movb $0x1, %r14b
movl %r14d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ma_bitmap_create_missing_into_pagecache:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_38], r8
mov [rbp+var_30], rdi
xor r14d, r14d
cmp rdx, rcx
ja short loc_41CA6
mov r12, rcx
mov r13, rdx
mov rbx, rsi
lea r15, [rsi+40h]
loc_41C34:
mov rax, [rbp+var_30]
mov rdi, [rax+600h]
mov eax, [rdi+80h]
mov [rsp+70h+var_40], eax
mov [rsp+70h+var_48], r14d
xorps xmm0, xmm0
movups [rsp+70h+var_58], xmm0
mov [rsp+70h+var_60], r14d
mov [rsp+70h+var_70], r14d
mov [rsp+70h+var_68], 1
mov rsi, r15
mov rdx, r13
xor ecx, ecx
mov r8, [rbp+var_38]
mov r9d, 1
call pagecache_write_part
test al, al
jnz short loc_41C93
add r13, [rbx+138h]
cmp r13, r12
jbe short loc_41C34
xor r14d, r14d
jmp short loc_41CA6
loc_41C93:
call _my_thread_var
mov esi, [rax]
mov rdi, [rbp+var_30]
call _ma_set_fatal_error_with_share
mov r14b, 1
loc_41CA6:
mov eax, r14d
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ma_bitmap_create_missing_into_pagecache(
long long a1,
long long a2,
unsigned long long a3,
unsigned long long a4,
char *a5)
{
unsigned int v5; // r14d
unsigned long long v7; // r13
char *v8; // r15
__m128i *v9; // rdi
long long v10; // rdx
long long v11; // rcx
long long v12; // r8
int *v13; // rax
long long v14; // rdx
long long v15; // rcx
long long v16; // r8
int v17; // r9d
v5 = 0;
if ( a3 <= a4 )
{
v7 = a3;
v8 = (char *)(a2 + 64);
while ( 1 )
{
v9 = *(__m128i **)(a1 + 1536);
if ( (unsigned __int8)pagecache_write_part(v9, v8, v7, 0, a5, 1, 0, 1u, 0, 0LL, 0LL, 0, v9[8].m128i_u32[0]) )
break;
v7 += *(_QWORD *)(a2 + 312);
if ( v7 > a4 )
return 0;
}
v13 = (int *)my_thread_var(v9, v8, v10, v11, v12);
ma_set_fatal_error_with_share(a1, *v13, v14, v15, v16, v17);
LOBYTE(v5) = 1;
}
return v5;
}
| _ma_bitmap_create_missing_into_pagecache:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x38],R8
MOV qword ptr [RBP + -0x30],RDI
XOR R14D,R14D
CMP RDX,RCX
JA 0x00141ca6
MOV R12,RCX
MOV R13,RDX
MOV RBX,RSI
LEA R15,[RSI + 0x40]
LAB_00141c34:
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,qword ptr [RAX + 0x600]
MOV EAX,dword ptr [RDI + 0x80]
MOV dword ptr [RSP + 0x30],EAX
MOV dword ptr [RSP + 0x28],R14D
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x18],XMM0
MOV dword ptr [RSP + 0x10],R14D
MOV dword ptr [RSP],R14D
MOV dword ptr [RSP + 0x8],0x1
MOV RSI,R15
MOV RDX,R13
XOR ECX,ECX
MOV R8,qword ptr [RBP + -0x38]
MOV R9D,0x1
CALL 0x0013366a
TEST AL,AL
JNZ 0x00141c93
ADD R13,qword ptr [RBX + 0x138]
CMP R13,R12
JBE 0x00141c34
XOR R14D,R14D
JMP 0x00141ca6
LAB_00141c93:
CALL 0x001a16ee
MOV ESI,dword ptr [RAX]
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x0013664e
MOV R14B,0x1
LAB_00141ca6:
MOV EAX,R14D
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
_ma_bitmap_create_missing_into_pagecache
(long param_1,long param_2,ulong param_3,ulong param_4,int8 param_5)
{
char cVar1;
int4 *puVar2;
if (param_3 <= param_4) {
do {
cVar1 = pagecache_write_part
(*(long *)(param_1 + 0x600),param_2 + 0x40,param_3,0,param_5,1,0,1,0,0,0,0,
*(int4 *)(*(long *)(param_1 + 0x600) + 0x80));
if (cVar1 != '\0') {
puVar2 = (int4 *)_my_thread_var();
_ma_set_fatal_error_with_share(param_1,*puVar2);
return 1;
}
param_3 = param_3 + *(long *)(param_2 + 0x138);
} while (param_3 <= param_4);
}
return 0;
}
| |
21,228 | google::protobuf::internal::UnknownFieldSerializerLite(unsigned char const*, unsigned int, unsigned int, unsigned int, google::protobuf::io::CodedOutputStream*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/generated_message_util.cc | void UnknownFieldSerializerLite(const uint8_t* ptr, uint32_t offset,
uint32_t /*tag*/, uint32_t /*has_offset*/,
io::CodedOutputStream* output) {
output->WriteString(
reinterpret_cast<const InternalMetadata*>(ptr + offset)
->unknown_fields<std::string>(&internal::GetEmptyString));
} | O3 | cpp | google::protobuf::internal::UnknownFieldSerializerLite(unsigned char const*, unsigned int, unsigned int, unsigned int, google::protobuf::io::CodedOutputStream*):
pushq %r15
pushq %r14
pushq %rbx
movq %r8, %rbx
movl %esi, %eax
movq (%rdi,%rax), %r14
testb $0x1, %r14b
jne 0xfa140
movb 0x186494(%rip), %al # 0x280598
leaq 0x18646d(%rip), %r14 # 0x280578
testb $0x1, %al
je 0xfa15a
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq (%rbx), %rax
movq 0x40(%rbx), %r14
subq %r14, %rax
movslq %edx, %r15
cmpq %r15, %rax
jl 0xfa14a
movq %r14, %rdi
movq %r15, %rdx
callq 0x1f400
addq %r15, %r14
movq %r14, 0x40(%rbx)
popq %rbx
popq %r14
popq %r15
retq
andq $-0x4, %r14
addq $0x8, %r14
jmp 0xfa10f
movq %rbx, %rdi
movq %r14, %rcx
callq 0xfb3bc
movq %rax, %r14
jmp 0xfa136
callq 0xf9e35
jmp 0xfa10f
| _ZN6google8protobuf8internal26UnknownFieldSerializerLiteEPKhjjjPNS0_2io17CodedOutputStreamE:
push r15
push r14
push rbx
mov rbx, r8
mov eax, esi
mov r14, [rdi+rax]
test r14b, 1
jnz short loc_FA140
mov al, cs:_ZN6google8protobuf8internal28init_protobuf_defaults_stateE; google::protobuf::internal::init_protobuf_defaults_state
lea r14, _ZN6google8protobuf8internal26fixed_address_empty_stringB5cxx11E; google::protobuf::internal::fixed_address_empty_string
test al, 1
jz short loc_FA15A
loc_FA10F:
mov rsi, [r14]; void *
mov rdx, [r14+8]; int
mov rax, [rbx]
mov r14, [rbx+40h]
sub rax, r14
movsxd r15, edx
cmp rax, r15
jl short loc_FA14A
mov rdi, r14
mov rdx, r15
call _memcpy
add r14, r15
loc_FA136:
mov [rbx+40h], r14
pop rbx
pop r14
pop r15
retn
loc_FA140:
and r14, 0FFFFFFFFFFFFFFFCh
add r14, 8
jmp short loc_FA10F
loc_FA14A:
mov rdi, rbx; this
mov rcx, r14; unsigned __int8 *
call _ZN6google8protobuf2io19EpsCopyOutputStream16WriteRawFallbackEPKviPh; google::protobuf::io::EpsCopyOutputStream::WriteRawFallback(void const*,int,uchar *)
mov r14, rax
jmp short loc_FA136
loc_FA15A:
call _ZN6google8protobuf8internal24InitProtobufDefaultsSlowEv; google::protobuf::internal::InitProtobufDefaultsSlow(void)
jmp short loc_FA10F
| long long google::protobuf::internal::UnknownFieldSerializerLite(
google::protobuf::internal *this,
const unsigned __int8 *a2,
unsigned int a3,
unsigned int a4,
unsigned __int8 **a5,
google::protobuf::io::CodedOutputStream *a6)
{
long long v7; // r14
void (*v8)(const void *); // r14
const void *v9; // rsi
long long v10; // rdx
unsigned __int8 *v11; // r14
long long v12; // r15
long long result; // rax
unsigned __int8 *v14; // r14
v7 = *(_QWORD *)((char *)this + (unsigned int)a2);
if ( (v7 & 1) != 0 )
{
v8 = (void (*)(const void *))((v7 & 0xFFFFFFFFFFFFFFFCLL) + 8);
}
else
{
v8 = google::protobuf::internal::fixed_address_empty_string[abi:cxx11];
if ( (google::protobuf::internal::init_protobuf_defaults_state & 1) == 0 )
google::protobuf::internal::InitProtobufDefaultsSlow(this);
}
v9 = *(const void **)v8;
v10 = *((_QWORD *)v8 + 1);
v11 = a5[8];
v12 = (int)v10;
if ( *a5 - v11 < (int)v10 )
{
result = google::protobuf::io::EpsCopyOutputStream::WriteRawFallback(
(google::protobuf::io::EpsCopyOutputStream *)a5,
v9,
v10,
a5[8]);
v14 = (unsigned __int8 *)result;
}
else
{
result = memcpy(a5[8], v9, (int)v10);
v14 = &v11[v12];
}
a5[8] = v14;
return result;
}
| UnknownFieldSerializerLite:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,R8
MOV EAX,ESI
MOV R14,qword ptr [RDI + RAX*0x1]
TEST R14B,0x1
JNZ 0x001fa140
MOV AL,byte ptr [0x00380598]
LEA R14,[0x380578]
TEST AL,0x1
JZ 0x001fa15a
LAB_001fa10f:
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [RBX]
MOV R14,qword ptr [RBX + 0x40]
SUB RAX,R14
MOVSXD R15,EDX
CMP RAX,R15
JL 0x001fa14a
MOV RDI,R14
MOV RDX,R15
CALL 0x0011f400
ADD R14,R15
LAB_001fa136:
MOV qword ptr [RBX + 0x40],R14
POP RBX
POP R14
POP R15
RET
LAB_001fa140:
AND R14,-0x4
ADD R14,0x8
JMP 0x001fa10f
LAB_001fa14a:
MOV RDI,RBX
MOV RCX,R14
CALL 0x001fb3bc
MOV R14,RAX
JMP 0x001fa136
LAB_001fa15a:
CALL 0x001f9e35
JMP 0x001fa10f
|
/* google::protobuf::internal::UnknownFieldSerializerLite(unsigned char const*, unsigned int,
unsigned int, unsigned int, google::protobuf::io::CodedOutputStream*) */
void google::protobuf::internal::UnknownFieldSerializerLite
(uchar *param_1,uint param_2,uint param_3,uint param_4,CodedOutputStream *param_5)
{
int8 *puVar1;
uchar *puVar2;
size_t __n;
if ((*(ulong *)(param_1 + param_2) & 1) == 0) {
puVar1 = &fixed_address_empty_string_abi_cxx11_;
if ((init_protobuf_defaults_state & 1) == 0) {
InitProtobufDefaultsSlow();
}
}
else {
puVar1 = (int8 *)((*(ulong *)(param_1 + param_2) & 0xfffffffffffffffc) + 8);
}
puVar2 = *(uchar **)(param_5 + 0x40);
__n = (size_t)(int)puVar1[1];
if (*(long *)param_5 - (long)puVar2 < (long)__n) {
puVar2 = (uchar *)io::EpsCopyOutputStream::WriteRawFallback
((EpsCopyOutputStream *)param_5,(void *)*puVar1,(int)puVar1[1],
puVar2);
}
else {
memcpy(puVar2,(void *)*puVar1,__n);
puVar2 = puVar2 + __n;
}
*(uchar **)(param_5 + 0x40) = puVar2;
return;
}
| |
21,229 | get_dynamic | eloqsql/mysys/array.c | void get_dynamic(DYNAMIC_ARRAY *array, void *element, uint idx)
{
if (idx >= array->elements)
{
DBUG_PRINT("warning",("To big array idx: %d, array size is %d",
idx,array->elements));
bzero(element,array->size_of_element);
return;
}
memcpy(element,array->buffer+idx*array->size_of_element,
(size_t) array->size_of_element);
} | O0 | c | get_dynamic:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jb 0x81289
jmp 0x81271
jmp 0x81273
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x362e0
jmp 0x812b2
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
imull 0x14(%rcx), %eax
movl %eax, %eax
addq %rax, %rsi
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, %edx
callq 0x360b0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| get_dynamic:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov eax, [rbp+var_14]
mov rcx, [rbp+var_8]
cmp eax, [rcx+8]
jb short loc_81289
jmp short $+2
loc_81271:
jmp short $+2
loc_81273:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov eax, [rax+14h]
mov edx, eax
xor esi, esi
call _memset
jmp short loc_812B2
loc_81289:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov rsi, [rax]
mov eax, [rbp+var_14]
mov rcx, [rbp+var_8]
imul eax, [rcx+14h]
mov eax, eax
add rsi, rax
mov rax, [rbp+var_8]
mov eax, [rax+14h]
mov edx, eax
call _memcpy
loc_812B2:
add rsp, 20h
pop rbp
retn
| long long get_dynamic(long long a1, long long a2, unsigned int a3)
{
if ( a3 < *(_DWORD *)(a1 + 8) )
return memcpy(a2, *(_DWORD *)(a1 + 20) * a3 + *(_QWORD *)a1, *(unsigned int *)(a1 + 20));
else
return memset(a2, 0LL, *(unsigned int *)(a1 + 20));
}
| get_dynamic:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0x8]
JC 0x00181289
JMP 0x00181271
LAB_00181271:
JMP 0x00181273
LAB_00181273:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x14]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x001362e0
JMP 0x001812b2
LAB_00181289:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RAX]
MOV EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x8]
IMUL EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
ADD RSI,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x14]
MOV EDX,EAX
CALL 0x001360b0
LAB_001812b2:
ADD RSP,0x20
POP RBP
RET
|
void get_dynamic(long *param_1,void *param_2,uint param_3)
{
if (param_3 < *(uint *)(param_1 + 1)) {
memcpy(param_2,(void *)(*param_1 + (ulong)(param_3 * *(int *)((long)param_1 + 0x14))),
(ulong)*(uint *)((long)param_1 + 0x14));
}
else {
memset(param_2,0,(ulong)*(uint *)((long)param_1 + 0x14));
}
return;
}
| |
21,230 | spdlog::details::a_formatter<spdlog::details::scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&) | AlayaLite/build_O3/_deps/spdlog-src/include/spdlog/pattern_formatter-inl.h | void format(const details::log_msg &, const std::tm &tm_time, memory_buf_t &dest) override {
string_view_t field_value{days[static_cast<size_t>(tm_time.tm_wday)]};
ScopedPadder p(field_value.size(), padinfo_, dest);
fmt_helper::append_string_view(field_value, dest);
} | O3 | c | spdlog::details::a_formatter<spdlog::details::scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rbx
movq %rdi, %r14
movslq 0x18(%rdx), %rax
leaq 0x7b7a4(%rip), %rcx # 0xb0e58
movq (%rcx,%rax,8), %r15
movq %r15, %rdi
callq 0x114d0
movq %rax, %r12
addq $0x8, %r14
movq %rsp, %rdi
movq %rax, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x3535e
addq %r15, %r12
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2fac6
movq %rsp, %rdi
callq 0x353d2
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x353d2
movq %rbx, %rdi
callq 0x11760
| _ZN6spdlog7details11a_formatterINS0_13scoped_padderEE6formatERKNS0_7log_msgERK2tmRN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE:
push r15
push r14
push r12
push rbx
sub rsp, 28h
mov rbx, rcx
mov r14, rdi
movsxd rax, dword ptr [rdx+18h]
lea rcx, _ZN6spdlog7detailsL4daysE; spdlog::details::days
mov r15, [rcx+rax*8]
mov rdi, r15
call _strlen
mov r12, rax
add r14, 8
mov rdi, rsp
mov rsi, rax
mov rdx, r14
mov rcx, rbx
call _ZN6spdlog7details13scoped_padderC2EmRKNS0_12padding_infoERN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::scoped_padder::scoped_padder(ulong,spdlog::details::padding_info const&,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &)
add r12, r15
mov rdi, rbx
mov rsi, r15
mov rdx, r12
call _ZN3fmt3v106detail6bufferIcE6appendIcEEvPKT_S7_; fmt::v10::detail::buffer<char>::append<char>(char const*,char const*)
mov rdi, rsp; this
call _ZN6spdlog7details13scoped_padderD2Ev; spdlog::details::scoped_padder::~scoped_padder()
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
mov rdi, rsp; this
call _ZN6spdlog7details13scoped_padderD2Ev; spdlog::details::scoped_padder::~scoped_padder()
mov rdi, rbx
call __Unwind_Resume
| void spdlog::details::a_formatter<spdlog::details::scoped_padder>::format(
long long a1,
long long a2,
long long a3,
long long a4)
{
char *v5; // r15
long long v6; // r12
_QWORD v7[9]; // [rsp+0h] [rbp-48h] BYREF
v5 = spdlog::details::days[*(int *)(a3 + 24)];
v6 = strlen(v5);
spdlog::details::scoped_padder::scoped_padder(v7, v6, a1 + 8, a4);
fmt::v10::detail::buffer<char>::append<char>(a4, (long long)v5, (long long)&v5[v6]);
spdlog::details::scoped_padder::~scoped_padder((spdlog::details::scoped_padder *)v7);
}
| format:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RCX
MOV R14,RDI
MOVSXD RAX,dword ptr [RDX + 0x18]
LEA RCX,[0x1b0e58]
MOV R15,qword ptr [RCX + RAX*0x8]
MOV RDI,R15
CALL 0x001114d0
MOV R12,RAX
ADD R14,0x8
MOV RDI,RSP
MOV RSI,RAX
MOV RDX,R14
MOV RCX,RBX
CALL 0x0013535e
ADD R12,R15
LAB_001356db:
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
CALL 0x0012fac6
LAB_001356e9:
MOV RDI,RSP
CALL 0x001353d2
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
RET
|
/* spdlog::details::a_formatter<spdlog::details::scoped_padder>::format(spdlog::details::log_msg
const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char> >&) */
void __thiscall
spdlog::details::a_formatter<spdlog::details::scoped_padder>::format
(a_formatter<spdlog::details::scoped_padder> *this,log_msg *param_1,tm *param_2,
basic_memory_buffer *param_3)
{
char *__s;
size_t sVar1;
scoped_padder asStack_48 [40];
__s = *(char **)(days + (long)param_2->tm_wday * 8);
sVar1 = strlen(__s);
scoped_padder::scoped_padder(asStack_48,sVar1,this + 8,param_3);
/* try { // try from 001356db to 001356e8 has its CatchHandler @ 001356fd */
fmt::v10::detail::buffer<char>::append<char>((buffer<char> *)param_3,__s,__s + sVar1);
scoped_padder::~scoped_padder(asStack_48);
return;
}
| |
21,231 | fmt::v10::detail::float_specs fmt::v10::detail::parse_float_type_spec<char>(fmt::v10::format_specs<char> const&) | AlayaLite/build_O3/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h | FMT_CONSTEXPR auto parse_float_type_spec(const format_specs<Char>& specs)
-> float_specs {
auto result = float_specs();
result.showpoint = specs.alt;
result.locale = specs.localized;
switch (specs.type) {
case presentation_type::none:
result.format = float_format::general;
break;
case presentation_type::general_upper:
result.upper = true;
FMT_FALLTHROUGH;
case presentation_type::general_lower:
result.format = float_format::general;
break;
case presentation_type::exp_upper:
result.upper = true;
FMT_FALLTHROUGH;
case presentation_type::exp_lower:
result.format = float_format::exp;
result.showpoint |= specs.precision != 0;
break;
case presentation_type::fixed_upper:
result.upper = true;
FMT_FALLTHROUGH;
case presentation_type::fixed_lower:
result.format = float_format::fixed;
result.showpoint |= specs.precision != 0;
break;
case presentation_type::hexfloat_upper:
result.upper = true;
FMT_FALLTHROUGH;
case presentation_type::hexfloat_lower:
result.format = float_format::hex;
break;
default:
throw_format_error("invalid format specifier");
break;
}
return result;
} | O3 | c | fmt::v10::detail::float_specs fmt::v10::detail::parse_float_type_spec<char>(fmt::v10::format_specs<char> const&):
movzbl 0x8(%rdi), %edx
cmpq $0xe, %rdx
ja 0x46a4d
movzwl 0x9(%rdi), %eax
movl %eax, %ecx
shrl $0x7, %ecx
andl $0x1, %ecx
movl %ecx, %esi
shll $0x13, %esi
shll $0x9, %eax
andl $0x20000, %eax # imm = 0x20000
orl %esi, %eax
leaq 0x3d353(%rip), %rsi # 0x83d40
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
orl $0x10000, %eax # imm = 0x10000
orl $0x3, %eax
jmp 0x46a48
orl $0x10000, %eax # imm = 0x10000
jmp 0x46a48
orl $0x10000, %eax # imm = 0x10000
xorl %edx, %edx
cmpl $0x0, 0x4(%rdi)
setne %dl
movzwl %cx, %ecx
orl %edx, %ecx
shll $0x13, %ecx
andl $0x7fffd, %eax # imm = 0x7FFFD
addl %ecx, %eax
addl $0x2, %eax
jmp 0x46a48
orl $0x10000, %eax # imm = 0x10000
xorl %edx, %edx
cmpl $0x0, 0x4(%rdi)
setne %dl
movzwl %cx, %ecx
orl %edx, %ecx
shll $0x13, %ecx
andl $0x7fffe, %eax # imm = 0x7FFFE
addl %ecx, %eax
incl %eax
shlq $0x20, %rax
retq
pushq %rax
leaq 0x3d753(%rip), %rdi # 0x841a8
callq 0x40276
| _ZN3fmt3v106detail21parse_float_type_specIcEENS1_11float_specsERKNS0_12format_specsIT_EE:
movzx edx, byte ptr [rdi+8]
cmp rdx, 0Eh; switch 15 cases
ja def_469F4; jumptable 00000000000469F4 default case, cases 1-6
movzx eax, word ptr [rdi+9]
mov ecx, eax
shr ecx, 7
and ecx, 1
mov esi, ecx
shl esi, 13h
shl eax, 9
and eax, 20000h
or eax, esi
lea rsi, jpt_469F4; char *
movsxd rdx, ds:(jpt_469F4 - 83D40h)[rsi+rdx*4]
add rdx, rsi
jmp rdx; switch jump
loc_469F6:
or eax, 10000h; jumptable 00000000000469F4 case 8
loc_469FB:
or eax, 3; jumptable 00000000000469F4 case 7
jmp short loc_46A48; jumptable 00000000000469F4 cases 0,13
loc_46A00:
or eax, 10000h; jumptable 00000000000469F4 case 14
jmp short loc_46A48; jumptable 00000000000469F4 cases 0,13
loc_46A07:
or eax, 10000h; jumptable 00000000000469F4 case 12
loc_46A0C:
xor edx, edx; jumptable 00000000000469F4 case 11
cmp dword ptr [rdi+4], 0
setnz dl
movzx ecx, cx
or ecx, edx
shl ecx, 13h
and eax, 7FFFDh
add eax, ecx
add eax, 2
jmp short loc_46A48; jumptable 00000000000469F4 cases 0,13
loc_46A29:
or eax, 10000h; jumptable 00000000000469F4 case 10
loc_46A2E:
xor edx, edx; jumptable 00000000000469F4 case 9
cmp dword ptr [rdi+4], 0
setnz dl
movzx ecx, cx
or ecx, edx
shl ecx, 13h
and eax, 7FFFEh
add eax, ecx
inc eax
loc_46A48:
shl rax, 20h; jumptable 00000000000469F4 cases 0,13
retn
def_469F4:
push rax; jumptable 00000000000469F4 default case, cases 1-6
lea rdi, aInvalidFormatS; "invalid format specifier"
call _ZN3fmt3v106detail18throw_format_errorEPKc; fmt::v10::detail::throw_format_error(char const*)
| long long fmt::v10::detail::parse_float_type_spec<char>(long long a1)
{
int v1; // ecx
const char *v2; // rsi
long long v3; // rax
v1 = (*(unsigned __int16 *)(a1 + 9) >> 7) & 1;
v2 = (const char *)(unsigned int)(v1 << 19);
v3 = (unsigned int)v2 | (*(unsigned __int16 *)(a1 + 9) << 9) & 0x20000;
switch ( *(_BYTE *)(a1 + 8) )
{
case 0:
case 0xD:
return v3 << 32;
case 7:
goto LABEL_3;
case 8:
LODWORD(v3) = v3 | 0x10000;
LABEL_3:
v3 = (unsigned int)v3 | 3;
return v3 << 32;
case 9:
goto LABEL_8;
case 0xA:
LODWORD(v3) = v3 | 0x10000;
LABEL_8:
v3 = (((*(_DWORD *)(a1 + 4) != 0) | (unsigned __int16)v1) << 19) + ((unsigned int)v3 & 0x7FFFE) + 1;
return v3 << 32;
case 0xB:
goto LABEL_6;
case 0xC:
LODWORD(v3) = v3 | 0x10000;
LABEL_6:
v3 = (((*(_DWORD *)(a1 + 4) != 0) | (unsigned __int16)v1) << 19) + ((unsigned int)v3 & 0x7FFFD) + 2;
break;
case 0xE:
v3 = (unsigned int)v3 | 0x10000;
break;
default:
fmt::v10::detail::throw_format_error((fmt::v10::detail *)"invalid format specifier", v2);
}
return v3 << 32;
}
| parse_float_type_spec<char>:
MOVZX EDX,byte ptr [RDI + 0x8]
CMP RDX,0xe
JA 0x00146a4d
MOVZX EAX,word ptr [RDI + 0x9]
MOV ECX,EAX
SHR ECX,0x7
AND ECX,0x1
MOV ESI,ECX
SHL ESI,0x13
SHL EAX,0x9
AND EAX,0x20000
OR EAX,ESI
LEA RSI,[0x183d40]
MOVSXD RDX,dword ptr [RSI + RDX*0x4]
ADD RDX,RSI
switchD:
JMP RDX
caseD_8:
OR EAX,0x10000
caseD_7:
OR EAX,0x3
JMP 0x00146a48
caseD_e:
OR EAX,0x10000
JMP 0x00146a48
caseD_c:
OR EAX,0x10000
caseD_b:
XOR EDX,EDX
CMP dword ptr [RDI + 0x4],0x0
SETNZ DL
MOVZX ECX,CX
OR ECX,EDX
SHL ECX,0x13
AND EAX,0x7fffd
ADD EAX,ECX
ADD EAX,0x2
JMP 0x00146a48
caseD_a:
OR EAX,0x10000
caseD_9:
XOR EDX,EDX
CMP dword ptr [RDI + 0x4],0x0
SETNZ DL
MOVZX ECX,CX
OR ECX,EDX
SHL ECX,0x13
AND EAX,0x7fffe
ADD EAX,ECX
INC EAX
caseD_0:
SHL RAX,0x20
RET
caseD_1:
PUSH RAX
LEA RDI,[0x1841a8]
CALL 0x00140276
|
/* fmt::v10::detail::float_specs
fmt::v10::detail::parse_float_type_spec<char>(fmt::v10::format_specs<char> const&) */
long fmt::v10::detail::parse_float_type_spec<char>(format_specs *param_1)
{
uint uVar1;
uint uVar3;
ulong uVar2;
if ((byte)param_1[8] < 0xf) {
uVar3 = *(ushort *)(param_1 + 9) >> 7 & 1;
uVar1 = (*(ushort *)(param_1 + 9) & 0x100) << 9 | uVar3 << 0x13;
uVar2 = (ulong)uVar1;
switch(param_1[8]) {
case (format_specs)0x0:
case (format_specs)0xd:
break;
default:
goto switchD_001469f4_caseD_1;
case (format_specs)0x8:
uVar1 = uVar1 | 0x10000;
case (format_specs)0x7:
uVar2 = (ulong)(uVar1 | 3);
break;
case (format_specs)0xa:
uVar1 = uVar1 | 0x10000;
case (format_specs)0x9:
uVar2 = (ulong)((uVar1 & 0x7fffe) + (uVar3 | *(int *)(param_1 + 4) != 0) * 0x80000 + 1);
break;
case (format_specs)0xc:
uVar1 = uVar1 | 0x10000;
case (format_specs)0xb:
uVar2 = (ulong)((uVar1 & 0x7fffd) + (uVar3 | *(int *)(param_1 + 4) != 0) * 0x80000 + 2);
break;
case (format_specs)0xe:
uVar2 = (ulong)(uVar1 | 0x10000);
}
return uVar2 << 0x20;
}
switchD_001469f4_caseD_1:
/* WARNING: Subroutine does not return */
throw_format_error("invalid format specifier");
}
| |
21,232 | google::protobuf::io::CopyingInputStream::Skip(int) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc | int CopyingInputStream::Skip(int count) {
char junk[4096];
int skipped = 0;
while (skipped < count) {
int bytes = Read(junk, std::min(count - skipped,
implicit_cast<int>(sizeof(junk))));
if (bytes <= 0) {
// EOF or read error.
return skipped;
}
skipped += bytes;
}
return skipped;
} | O3 | cpp | google::protobuf::io::CopyingInputStream::Skip(int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1000, %rsp # imm = 0x1000
movl %esi, %ebx
movq %rdi, %r14
xorl %ecx, %ecx
movl $0x1000, %ebp # imm = 0x1000
movq %rsp, %r15
movl %ecx, %r12d
movl %ebx, %edx
subl %ecx, %edx
jle 0xfc85a
cmpl %ebp, %edx
cmovgel %ebp, %edx
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0x10(%rax)
leal (%rax,%r12), %ecx
testl %eax, %eax
jg 0xfc838
movl %r12d, %eax
addq $0x1000, %rsp # imm = 0x1000
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN6google8protobuf2io18CopyingInputStream4SkipEi:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 1000h
mov ebx, esi
mov r14, rdi
xor ecx, ecx
mov ebp, 1000h
mov r15, rsp
loc_FC838:
mov r12d, ecx
mov edx, ebx
sub edx, ecx
jle short loc_FC85A
cmp edx, ebp
cmovge edx, ebp
mov rax, [r14]
mov rdi, r14
mov rsi, r15
call qword ptr [rax+10h]
lea ecx, [rax+r12]
test eax, eax
jg short loc_FC838
loc_FC85A:
mov eax, r12d
add rsp, 1000h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long google::protobuf::io::CopyingInputStream::Skip(
google::protobuf::io::CopyingInputStream *this,
int a2)
{
int v2; // ecx
unsigned int v3; // r12d
long long v4; // rdx
int v5; // eax
long long v7; // [rsp+0h] [rbp-1028h] BYREF
v2 = 0;
do
{
v3 = v2;
v4 = (unsigned int)(a2 - v2);
if ( a2 <= v2 )
break;
if ( (int)v4 >= 4096 )
v4 = 4096LL;
v5 = (*(long long ( **)(google::protobuf::io::CopyingInputStream *, long long *, long long))(*(_QWORD *)this + 16LL))(
this,
&v7,
v4);
v2 = v5 + v3;
}
while ( v5 > 0 );
return v3;
}
| Skip:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x1000
MOV EBX,ESI
MOV R14,RDI
XOR ECX,ECX
MOV EBP,0x1000
MOV R15,RSP
LAB_001fc838:
MOV R12D,ECX
MOV EDX,EBX
SUB EDX,ECX
JLE 0x001fc85a
CMP EDX,EBP
CMOVGE EDX,EBP
MOV RAX,qword ptr [R14]
MOV RDI,R14
MOV RSI,R15
CALL qword ptr [RAX + 0x10]
LEA ECX,[RAX + R12*0x1]
TEST EAX,EAX
JG 0x001fc838
LAB_001fc85a:
MOV EAX,R12D
ADD RSP,0x1000
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* google::protobuf::io::CopyingInputStream::Skip(int) */
int __thiscall google::protobuf::io::CopyingInputStream::Skip(CopyingInputStream *this,int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int1 auStack_1028 [4096];
iVar3 = 0;
do {
iVar2 = iVar3;
iVar3 = param_1 - iVar2;
if (iVar3 == 0 || param_1 < iVar2) {
return iVar2;
}
if (0xfff < iVar3) {
iVar3 = 0x1000;
}
iVar1 = (**(code **)(*(long *)this + 0x10))(this,auStack_1028,iVar3);
iVar3 = iVar1 + iVar2;
} while (0 < iVar1);
return iVar2;
}
| |
21,233 | read_to_buffer_varlen | eloqsql/storage/maria/ma_sort.c | static my_off_t read_to_buffer_varlen(IO_CACHE *fromfile, BUFFPEK *buffpek,
uint sort_length)
{
register ha_keys count;
uint idx;
uchar *buffp;
if ((count= (ha_keys) MY_MIN((ha_rows) buffpek->max_keys,buffpek->count)))
{
buffp= buffpek->base;
for (idx=1;idx<=count;idx++)
{
uint16 length_of_key;
if (my_b_pread(fromfile, (uchar*)&length_of_key,
sizeof(length_of_key), buffpek->file_pos))
return(HA_OFFSET_ERROR);
buffpek->file_pos+=sizeof(length_of_key);
if (my_b_pread(fromfile, (uchar*) buffp,
length_of_key, buffpek->file_pos))
return((uint) -1);
buffpek->file_pos+=length_of_key;
buffp = buffp + sort_length;
}
buffpek->key=buffpek->base;
buffpek->count-= count;
buffpek->mem_count= count;
}
return (((my_off_t) count) * sort_length);
} | O3 | c | read_to_buffer_varlen:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x18(%rsi), %rax
movq 0x28(%rsi), %rcx
cmpq %rax, %rcx
cmovbq %rcx, %rax
testq %rax, %rax
je 0x845f5
movq %rsi, %r15
movq %rdi, %r14
movq (%rsi), %rcx
movq 0x8(%rsi), %r12
movl %edx, %ebx
movl $0x2, %r13d
movq %rax, -0x40(%rbp)
movq %rdi, -0x38(%rbp)
movl $0x2, %edx
movq %r14, %rdi
leaq -0x2a(%rbp), %rsi
callq 0xb2ddf
testl %eax, %eax
jne 0x845fd
movq (%r15), %rcx
addq $0x2, %rcx
movq %rcx, (%r15)
movzwl -0x2a(%rbp), %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0xb2ddf
testl %eax, %eax
jne 0x84606
movzwl -0x2a(%rbp), %ecx
addq (%r15), %rcx
movq %rcx, (%r15)
addq %rbx, %r12
movl %r13d, %edx
incl %r13d
movq -0x40(%rbp), %rax
cmpq %rdx, %rax
movq -0x38(%rbp), %r14
jae 0x84591
movq 0x8(%r15), %rcx
movq %rcx, 0x10(%r15)
subq %rax, 0x18(%r15)
movq %rax, 0x20(%r15)
jmp 0x845f7
movl %edx, %ebx
imulq %rbx, %rax
jmp 0x8460b
movq $-0x1, %rax
jmp 0x8460b
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| read_to_buffer_varlen:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rax, [rsi+18h]
mov rcx, [rsi+28h]
cmp rcx, rax
cmovb rax, rcx
test rax, rax
jz loc_845F5
mov r15, rsi
mov r14, rdi
mov rcx, [rsi]
mov r12, [rsi+8]
mov ebx, edx
mov r13d, 2
mov [rbp+var_40], rax
mov [rbp+var_38], rdi
loc_84591:
mov edx, 2
mov rdi, r14
lea rsi, [rbp+var_2A]
call my_b_pread
test eax, eax
jnz short loc_845FD
mov rcx, [r15]
add rcx, 2
mov [r15], rcx
movzx edx, [rbp+var_2A]
mov rdi, r14
mov rsi, r12
call my_b_pread
test eax, eax
jnz short loc_84606
movzx ecx, [rbp+var_2A]
add rcx, [r15]
mov [r15], rcx
add r12, rbx
mov edx, r13d
inc r13d
mov rax, [rbp+var_40]
cmp rax, rdx
mov r14, [rbp+var_38]
jnb short loc_84591
mov rcx, [r15+8]
mov [r15+10h], rcx
sub [r15+18h], rax
mov [r15+20h], rax
jmp short loc_845F7
loc_845F5:
mov ebx, edx
loc_845F7:
imul rax, rbx
jmp short loc_8460B
loc_845FD:
mov rax, 0FFFFFFFFFFFFFFFFh
jmp short loc_8460B
loc_84606:
mov eax, 0FFFFFFFFh
loc_8460B:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long read_to_buffer_varlen(long long a1, long long *a2, unsigned int a3)
{
unsigned long long v3; // rax
long long v4; // r14
long long v5; // rcx
long long v6; // r12
long long v7; // rbx
unsigned int v8; // r13d
long long v9; // rcx
unsigned long long v10; // rdx
unsigned long long v12; // [rsp+0h] [rbp-40h]
unsigned __int16 v13[21]; // [rsp+16h] [rbp-2Ah] BYREF
v3 = a2[3];
if ( a2[5] < v3 )
v3 = a2[5];
if ( v3 )
{
v4 = a1;
v5 = *a2;
v6 = a2[1];
v7 = a3;
v8 = 2;
v12 = v3;
while ( 1 )
{
if ( (unsigned int)my_b_pread(v4, v13, 2LL, v5) )
return -1LL;
v9 = *a2 + 2;
*a2 = v9;
if ( (unsigned int)my_b_pread(v4, v6, v13[0], v9) )
break;
v5 = *a2 + v13[0];
*a2 = v5;
v6 += v7;
v10 = v8++;
v3 = v12;
v4 = a1;
if ( v12 < v10 )
{
a2[2] = a2[1];
a2[3] -= v12;
a2[4] = v12;
return v7 * v3;
}
}
return 0xFFFFFFFFLL;
}
else
{
v7 = a3;
return v7 * v3;
}
}
| read_to_buffer_varlen:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RAX,qword ptr [RSI + 0x18]
MOV RCX,qword ptr [RSI + 0x28]
CMP RCX,RAX
CMOVC RAX,RCX
TEST RAX,RAX
JZ 0x001845f5
MOV R15,RSI
MOV R14,RDI
MOV RCX,qword ptr [RSI]
MOV R12,qword ptr [RSI + 0x8]
MOV EBX,EDX
MOV R13D,0x2
MOV qword ptr [RBP + -0x40],RAX
MOV qword ptr [RBP + -0x38],RDI
LAB_00184591:
MOV EDX,0x2
MOV RDI,R14
LEA RSI,[RBP + -0x2a]
CALL 0x001b2ddf
TEST EAX,EAX
JNZ 0x001845fd
MOV RCX,qword ptr [R15]
ADD RCX,0x2
MOV qword ptr [R15],RCX
MOVZX EDX,word ptr [RBP + -0x2a]
MOV RDI,R14
MOV RSI,R12
CALL 0x001b2ddf
TEST EAX,EAX
JNZ 0x00184606
MOVZX ECX,word ptr [RBP + -0x2a]
ADD RCX,qword ptr [R15]
MOV qword ptr [R15],RCX
ADD R12,RBX
MOV EDX,R13D
INC R13D
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,RDX
MOV R14,qword ptr [RBP + -0x38]
JNC 0x00184591
MOV RCX,qword ptr [R15 + 0x8]
MOV qword ptr [R15 + 0x10],RCX
SUB qword ptr [R15 + 0x18],RAX
MOV qword ptr [R15 + 0x20],RAX
JMP 0x001845f7
LAB_001845f5:
MOV EBX,EDX
LAB_001845f7:
IMUL RAX,RBX
JMP 0x0018460b
LAB_001845fd:
MOV RAX,-0x1
JMP 0x0018460b
LAB_00184606:
MOV EAX,0xffffffff
LAB_0018460b:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long read_to_buffer_varlen(int8 param_1,long *param_2,ulong param_3)
{
int iVar1;
ulong uVar2;
long lVar3;
long lVar4;
ulong uVar5;
bool bVar6;
ushort local_32;
uVar2 = param_2[3];
if ((ulong)param_2[5] < (ulong)param_2[3]) {
uVar2 = param_2[5];
}
if (uVar2 != 0) {
lVar3 = *param_2;
lVar4 = param_2[1];
uVar5 = 2;
do {
iVar1 = my_b_pread(param_1,&local_32,2,lVar3);
if (iVar1 != 0) {
return -1;
}
*param_2 = *param_2 + 2;
iVar1 = my_b_pread(param_1,lVar4,local_32);
if (iVar1 != 0) {
return 0xffffffff;
}
lVar3 = (ulong)local_32 + *param_2;
*param_2 = lVar3;
lVar4 = lVar4 + (param_3 & 0xffffffff);
bVar6 = uVar5 <= uVar2;
uVar5 = (ulong)((int)uVar5 + 1);
} while (bVar6);
param_2[2] = param_2[1];
param_2[3] = param_2[3] - uVar2;
param_2[4] = uVar2;
}
return uVar2 * (param_3 & 0xffffffff);
}
| |
21,234 | ggml_get_i32_1d | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | int32_t ggml_get_i32_1d(const struct ggml_tensor * tensor, int i) {
if (!ggml_is_contiguous(tensor)) {
int64_t id[4] = { 0, 0, 0, 0 };
ggml_unravel_index(tensor, i, &id[0], &id[1], &id[2], &id[3]);
return ggml_get_i32_nd(tensor, id[0], id[1], id[2], id[3]);
}
switch (tensor->type) {
case GGML_TYPE_I8:
{
GGML_ASSERT(tensor->nb[0] == sizeof(int8_t));
return ((int8_t *)(tensor->data))[i];
}
case GGML_TYPE_I16:
{
GGML_ASSERT(tensor->nb[0] == sizeof(int16_t));
return ((int16_t *)(tensor->data))[i];
}
case GGML_TYPE_I32:
{
GGML_ASSERT(tensor->nb[0] == sizeof(int32_t));
return ((int32_t *)(tensor->data))[i];
}
case GGML_TYPE_F16:
{
GGML_ASSERT(tensor->nb[0] == sizeof(ggml_fp16_t));
return GGML_FP16_TO_FP32(((ggml_fp16_t *)(tensor->data))[i]);
}
case GGML_TYPE_F32:
{
GGML_ASSERT(tensor->nb[0] == sizeof(float));
return ((float *)(tensor->data))[i];
}
default:
{
GGML_ASSERT(false);
}
}
return 0.0f;
} | O0 | c | ggml_get_i32_1d:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movl %esi, 0x34(%rsp)
movq 0x38(%rsp), %rdi
callq 0x11b4b0
testb $0x1, %al
jne 0x11d3bb
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0xb390
movq 0x38(%rsp), %rdi
movslq 0x34(%rsp), %rsi
leaq 0x10(%rsp), %rdx
leaq 0x10(%rsp), %rcx
addq $0x8, %rcx
leaq 0x10(%rsp), %r8
addq $0x10, %r8
leaq 0x10(%rsp), %r9
addq $0x18, %r9
callq 0x11d1b0
movq 0x38(%rsp), %rdi
movq 0x10(%rsp), %rax
movl %eax, %esi
movq 0x18(%rsp), %rax
movl %eax, %edx
movq 0x20(%rsp), %rax
movl %eax, %ecx
movq 0x28(%rsp), %rax
movl %eax, %r8d
callq 0x11d680
movl %eax, 0x44(%rsp)
jmp 0x11d66c
movq 0x38(%rsp), %rax
movl (%rax), %eax
movq %rax, 0x8(%rsp)
subq $0x12, %rax
ja 0x11d626
movq 0x8(%rsp), %rax
leaq 0x69f6b(%rip), %rcx # 0x187348
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x11d3e8
movq 0x38(%rsp), %rax
cmpq $0x1, 0x30(%rax)
je 0x11d438
movq 0xbab2d(%rip), %rax # 0x1d7f28
movq (%rax), %rdi
callq 0xb8e0
movq 0xbab9e(%rip), %rax # 0x1d7fa8
movq (%rax), %rdi
leaq 0x62806(%rip), %rsi # 0x17fc1a
leaq 0x6c253(%rip), %rdx # 0x18966e
movl $0xae2, %ecx # imm = 0xAE2
leaq 0x6c4d0(%rip), %r8 # 0x1898f7
movb $0x0, %al
callq 0xbae0
callq 0x11a4f0
callq 0xb3a0
jmp 0x11d43a
movq 0x38(%rsp), %rax
movq 0x118(%rax), %rax
movslq 0x34(%rsp), %rcx
movsbl (%rax,%rcx), %eax
movl %eax, 0x44(%rsp)
jmp 0x11d66c
jmp 0x11d45a
movq 0x38(%rsp), %rax
cmpq $0x2, 0x30(%rax)
je 0x11d4aa
movq 0xbaabb(%rip), %rax # 0x1d7f28
movq (%rax), %rdi
callq 0xb8e0
movq 0xbab2c(%rip), %rax # 0x1d7fa8
movq (%rax), %rdi
leaq 0x62794(%rip), %rsi # 0x17fc1a
leaq 0x6c1e1(%rip), %rdx # 0x18966e
movl $0xae7, %ecx # imm = 0xAE7
leaq 0x6c47e(%rip), %r8 # 0x189917
movb $0x0, %al
callq 0xbae0
callq 0x11a4f0
callq 0xb3a0
jmp 0x11d4ac
movq 0x38(%rsp), %rax
movq 0x118(%rax), %rax
movslq 0x34(%rsp), %rcx
movswl (%rax,%rcx,2), %eax
movl %eax, 0x44(%rsp)
jmp 0x11d66c
jmp 0x11d4cc
movq 0x38(%rsp), %rax
cmpq $0x4, 0x30(%rax)
je 0x11d51c
movq 0xbaa49(%rip), %rax # 0x1d7f28
movq (%rax), %rdi
callq 0xb8e0
movq 0xbaaba(%rip), %rax # 0x1d7fa8
movq (%rax), %rdi
leaq 0x62722(%rip), %rsi # 0x17fc1a
leaq 0x6c16f(%rip), %rdx # 0x18966e
movl $0xaec, %ecx # imm = 0xAEC
leaq 0x6c42d(%rip), %r8 # 0x189938
movb $0x0, %al
callq 0xbae0
callq 0x11a4f0
callq 0xb3a0
jmp 0x11d51e
movq 0x38(%rsp), %rax
movq 0x118(%rax), %rax
movslq 0x34(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x44(%rsp)
jmp 0x11d66c
jmp 0x11d53d
movq 0x38(%rsp), %rax
cmpq $0x2, 0x30(%rax)
je 0x11d58d
movq 0xba9d8(%rip), %rax # 0x1d7f28
movq (%rax), %rdi
callq 0xb8e0
movq 0xbaa49(%rip), %rax # 0x1d7fa8
movq (%rax), %rdi
leaq 0x626b1(%rip), %rsi # 0x17fc1a
leaq 0x6c0fe(%rip), %rdx # 0x18966e
movl $0xaf1, %ecx # imm = 0xAF1
leaq 0x6c3dd(%rip), %r8 # 0x189959
movb $0x0, %al
callq 0xbae0
callq 0x11a4f0
callq 0xb3a0
jmp 0x11d58f
movq 0x38(%rsp), %rax
movq 0x118(%rax), %rax
movslq 0x34(%rsp), %rcx
movzwl (%rax,%rcx,2), %edi
callq 0x11a5e0
vcvttss2si %xmm0, %eax
movl %eax, 0x44(%rsp)
jmp 0x11d66c
jmp 0x11d5b8
movq 0x38(%rsp), %rax
cmpq $0x4, 0x30(%rax)
je 0x11d608
movq 0xba95d(%rip), %rax # 0x1d7f28
movq (%rax), %rdi
callq 0xb8e0
movq 0xba9ce(%rip), %rax # 0x1d7fa8
movq (%rax), %rdi
leaq 0x62636(%rip), %rsi # 0x17fc1a
leaq 0x6c083(%rip), %rdx # 0x18966e
movl $0xaf6, %ecx # imm = 0xAF6
leaq 0x62e31(%rip), %r8 # 0x180428
movb $0x0, %al
callq 0xbae0
callq 0x11a4f0
callq 0xb3a0
jmp 0x11d60a
movq 0x38(%rsp), %rax
movq 0x118(%rax), %rax
movslq 0x34(%rsp), %rcx
vcvttss2si (%rax,%rcx,4), %eax
movl %eax, 0x44(%rsp)
jmp 0x11d66c
jmp 0x11d628
movq 0xba8f9(%rip), %rax # 0x1d7f28
movq (%rax), %rdi
callq 0xb8e0
movq 0xba96a(%rip), %rax # 0x1d7fa8
movq (%rax), %rdi
leaq 0x625d2(%rip), %rsi # 0x17fc1a
leaq 0x6c01f(%rip), %rdx # 0x18966e
movl $0xafb, %ecx # imm = 0xAFB
leaq 0x6038a(%rip), %r8 # 0x17d9e5
movb $0x0, %al
callq 0xbae0
callq 0x11a4f0
callq 0xb3a0
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
| ggml_get_i32_1d:
sub rsp, 48h
mov [rsp+48h+var_10], rdi
mov [rsp+48h+var_14], esi
mov rdi, [rsp+48h+var_10]
call ggml_is_contiguous
test al, 1
jnz short loc_11D3BB
lea rdi, [rsp+48h+var_38]
xor esi, esi
mov edx, 20h ; ' '
call _memset
mov rdi, [rsp+48h+var_10]
movsxd rsi, [rsp+48h+var_14]
lea rdx, [rsp+48h+var_38]
lea rcx, [rsp+48h+var_38]
add rcx, 8
lea r8, [rsp+48h+var_38]
add r8, 10h
lea r9, [rsp+48h+var_38]
add r9, 18h
call ggml_unravel_index
mov rdi, [rsp+48h+var_10]
mov rax, [rsp+48h+var_38]
mov esi, eax
mov rax, [rsp+48h+var_30]
mov edx, eax
mov rax, [rsp+48h+var_28]
mov ecx, eax
mov rax, [rsp+48h+var_20]
mov r8d, eax
call ggml_get_i32_nd
mov [rsp+48h+var_4], eax
jmp loc_11D66C
loc_11D3BB:
mov rax, [rsp+48h+var_10]
mov eax, [rax]
mov [rsp+48h+var_40], rax
sub rax, 12h; switch 19 cases
ja def_11D3E4; jumptable 000000000011D3E4 default case, cases 2-15
mov rax, [rsp+48h+var_40]
lea rcx, jpt_11D3E4
movsxd rax, ds:(jpt_11D3E4 - 187348h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_11D3E6:
jmp short $+2; jumptable 000000000011D3E4 case 16
loc_11D3E8:
mov rax, [rsp+48h+var_10]
cmp qword ptr [rax+30h], 1
jz short loc_11D438
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
mov ecx, 0AE2h
lea r8, aTensorNb0Sizeo_0; "tensor->nb[0] == sizeof(int8_t)"
mov al, 0
call _fprintf
call ggml_print_backtrace
call _abort
loc_11D438:
jmp short $+2
loc_11D43A:
mov rax, [rsp+48h+var_10]
mov rax, [rax+118h]
movsxd rcx, [rsp+48h+var_14]
movsx eax, byte ptr [rax+rcx]
mov [rsp+48h+var_4], eax
jmp loc_11D66C
loc_11D458:
jmp short $+2; jumptable 000000000011D3E4 case 17
loc_11D45A:
mov rax, [rsp+48h+var_10]
cmp qword ptr [rax+30h], 2
jz short loc_11D4AA
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
mov ecx, 0AE7h
lea r8, aTensorNb0Sizeo_1; "tensor->nb[0] == sizeof(int16_t)"
mov al, 0
call _fprintf
call ggml_print_backtrace
call _abort
loc_11D4AA:
jmp short $+2
loc_11D4AC:
mov rax, [rsp+48h+var_10]
mov rax, [rax+118h]
movsxd rcx, [rsp+48h+var_14]
movsx eax, word ptr [rax+rcx*2]
mov [rsp+48h+var_4], eax
jmp loc_11D66C
loc_11D4CA:
jmp short $+2; jumptable 000000000011D3E4 case 18
loc_11D4CC:
mov rax, [rsp+48h+var_10]
cmp qword ptr [rax+30h], 4
jz short loc_11D51C
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
mov ecx, 0AECh
lea r8, aTensorNb0Sizeo_2; "tensor->nb[0] == sizeof(int32_t)"
mov al, 0
call _fprintf
call ggml_print_backtrace
call _abort
loc_11D51C:
jmp short $+2
loc_11D51E:
mov rax, [rsp+48h+var_10]
mov rax, [rax+118h]
movsxd rcx, [rsp+48h+var_14]
mov eax, [rax+rcx*4]
mov [rsp+48h+var_4], eax
jmp loc_11D66C
loc_11D53B:
jmp short $+2; jumptable 000000000011D3E4 case 1
loc_11D53D:
mov rax, [rsp+48h+var_10]
cmp qword ptr [rax+30h], 2
jz short loc_11D58D
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
mov ecx, 0AF1h
lea r8, aTensorNb0Sizeo_3; "tensor->nb[0] == sizeof(ggml_fp16_t)"
mov al, 0
call _fprintf
call ggml_print_backtrace
call _abort
loc_11D58D:
jmp short $+2
loc_11D58F:
mov rax, [rsp+48h+var_10]
mov rax, [rax+118h]
movsxd rcx, [rsp+48h+var_14]
movzx edi, word ptr [rax+rcx*2]
call ggml_lookup_fp16_to_fp32
vcvttss2si eax, xmm0
mov [rsp+48h+var_4], eax
jmp loc_11D66C
loc_11D5B6:
jmp short $+2; jumptable 000000000011D3E4 case 0
loc_11D5B8:
mov rax, [rsp+48h+var_10]
cmp qword ptr [rax+30h], 4
jz short loc_11D608
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
mov ecx, 0AF6h
lea r8, aTensorNb0Sizeo; "tensor->nb[0] == sizeof(float)"
mov al, 0
call _fprintf
call ggml_print_backtrace
call _abort
loc_11D608:
jmp short $+2
loc_11D60A:
mov rax, [rsp+48h+var_10]
mov rax, [rax+118h]
movsxd rcx, [rsp+48h+var_14]
vcvttss2si eax, dword ptr [rax+rcx*4]
mov [rsp+48h+var_4], eax
jmp short loc_11D66C
def_11D3E4:
jmp short $+2; jumptable 000000000011D3E4 default case, cases 2-15
loc_11D628:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
mov ecx, 0AFBh
lea r8, aFalse; "false"
mov al, 0
call _fprintf
call ggml_print_backtrace
call _abort
loc_11D66C:
mov eax, [rsp+48h+var_4]
add rsp, 48h
retn
| long long ggml_get_i32_1d(_QWORD *a1, int a2)
{
long long v2; // rdi
long long v3; // rdi
long long v4; // rdi
long long v5; // rdi
long long v8; // rdi
long long v11; // rdi
long long v13; // [rsp+10h] [rbp-38h] BYREF
long long v14; // [rsp+18h] [rbp-30h] BYREF
long long v15; // [rsp+20h] [rbp-28h] BYREF
long long v16; // [rsp+28h] [rbp-20h] BYREF
int v17; // [rsp+34h] [rbp-14h]
_QWORD *v18; // [rsp+38h] [rbp-10h]
unsigned int v19; // [rsp+44h] [rbp-4h]
v18 = a1;
v17 = a2;
if ( ggml_is_contiguous((long long)a1) )
{
switch ( *(_DWORD *)v18 )
{
case 0:
if ( v18[6] != 4LL )
{
fflush(stdout);
v8 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
2806,
"tensor->nb[0] == sizeof(float)");
ggml_print_backtrace();
abort(v8);
}
_RAX = v18[35];
_RCX = v17;
__asm { vcvttss2si eax, dword ptr [rax+rcx*4] }
v19 = _RAX;
break;
case 1:
if ( v18[6] != 2LL )
{
fflush(stdout);
v5 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
2801,
"tensor->nb[0] == sizeof(ggml_fp16_t)");
ggml_print_backtrace();
abort(v5);
}
_XMM0 = ggml_lookup_fp16_to_fp32(*(_WORD *)(v18[35] + 2LL * v17));
__asm { vcvttss2si eax, xmm0 }
v19 = _EAX;
break;
case 0x10:
if ( v18[6] != 1LL )
{
fflush(stdout);
v2 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
2786,
"tensor->nb[0] == sizeof(int8_t)");
ggml_print_backtrace();
abort(v2);
}
v19 = *(char *)(v18[35] + v17);
break;
case 0x11:
if ( v18[6] != 2LL )
{
fflush(stdout);
v3 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
2791,
"tensor->nb[0] == sizeof(int16_t)");
ggml_print_backtrace();
abort(v3);
}
v19 = *(__int16 *)(v18[35] + 2LL * v17);
break;
case 0x12:
if ( v18[6] != 4LL )
{
fflush(stdout);
v4 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
2796,
"tensor->nb[0] == sizeof(int32_t)");
ggml_print_backtrace();
abort(v4);
}
v19 = *(_DWORD *)(v18[35] + 4LL * v17);
break;
default:
fflush(stdout);
v11 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
2811,
"false");
ggml_print_backtrace();
abort(v11);
}
}
else
{
memset(&v13, 0LL, 32LL);
ggml_unravel_index(v18, v17, &v13, &v14, &v15, &v16);
return (unsigned int)ggml_get_i32_nd(
v18,
(unsigned int)v13,
(unsigned int)v14,
(unsigned int)v15,
(unsigned int)v16);
}
return v19;
}
| |||
21,235 | ggml_get_i32_1d | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | int32_t ggml_get_i32_1d(const struct ggml_tensor * tensor, int i) {
if (!ggml_is_contiguous(tensor)) {
int64_t id[4] = { 0, 0, 0, 0 };
ggml_unravel_index(tensor, i, &id[0], &id[1], &id[2], &id[3]);
return ggml_get_i32_nd(tensor, id[0], id[1], id[2], id[3]);
}
switch (tensor->type) {
case GGML_TYPE_I8:
{
GGML_ASSERT(tensor->nb[0] == sizeof(int8_t));
return ((int8_t *)(tensor->data))[i];
}
case GGML_TYPE_I16:
{
GGML_ASSERT(tensor->nb[0] == sizeof(int16_t));
return ((int16_t *)(tensor->data))[i];
}
case GGML_TYPE_I32:
{
GGML_ASSERT(tensor->nb[0] == sizeof(int32_t));
return ((int32_t *)(tensor->data))[i];
}
case GGML_TYPE_F16:
{
GGML_ASSERT(tensor->nb[0] == sizeof(ggml_fp16_t));
return GGML_FP16_TO_FP32(((ggml_fp16_t *)(tensor->data))[i]);
}
case GGML_TYPE_F32:
{
GGML_ASSERT(tensor->nb[0] == sizeof(float));
return ((float *)(tensor->data))[i];
}
default:
{
GGML_ASSERT(false);
}
}
return 0.0f;
} | O2 | c | ggml_get_i32_1d:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %esi, %ebp
movq %rdi, %rbx
callq 0x67db9
testb %al, %al
je 0x68bc4
movl (%rbx), %eax
testl %eax, %eax
je 0x68c33
cmpl $0x1, %eax
je 0x68c10
cmpl $0x12, %eax
je 0x68c4b
cmpl $0x11, %eax
je 0x68c65
cmpl $0x10, %eax
jne 0x68d92
cmpq $0x1, 0x30(%rbx)
jne 0x68cf0
movq 0x118(%rbx), %rax
movslq %ebp, %rcx
movsbl (%rax,%rcx), %eax
jmp 0x68c07
vxorps %xmm0, %xmm0, %xmm0
leaq 0x8(%rsp), %rcx
vmovups %ymm0, -0x8(%rcx)
movslq %ebp, %rsi
leaq 0x10(%rsp), %r8
leaq 0x18(%rsp), %r9
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rdx
vzeroupper
callq 0x68b0d
movl (%r14), %esi
movl 0x8(%r14), %edx
movl 0x10(%r14), %ecx
movl 0x18(%r14), %r8d
movq %rbx, %rdi
callq 0x68dd6
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
cmpq $0x2, 0x30(%rbx)
jne 0x68c80
movq 0x118(%rbx), %rax
movslq %ebp, %rcx
movzwl (%rax,%rcx,2), %eax
leaq 0xf4664(%rip), %rcx # 0x15d290
vcvttss2si (%rcx,%rax,4), %eax
jmp 0x68c07
cmpq $0x4, 0x30(%rbx)
jne 0x68cb8
movq 0x118(%rbx), %rax
movslq %ebp, %rcx
vcvttss2si (%rax,%rcx,4), %eax
jmp 0x68c07
cmpq $0x4, 0x30(%rbx)
jne 0x68d28
movq 0x118(%rbx), %rax
movslq %ebp, %rcx
movl (%rax,%rcx,4), %eax
jmp 0x68c07
cmpq $0x2, 0x30(%rbx)
jne 0x68d5d
movq 0x118(%rbx), %rax
movslq %ebp, %rcx
movswl (%rax,%rcx,2), %eax
jmp 0x68c07
movq 0x6d2c1(%rip), %rax # 0xd5f48
movq (%rax), %rdi
callq 0xa6f0
movq 0x6d312(%rip), %rax # 0xd5fa8
movq (%rax), %rdi
leaq 0x3157e(%rip), %rsi # 0x9a21e
leaq 0x38bd7(%rip), %rdx # 0xa187e
leaq 0x38e58(%rip), %r8 # 0xa1b06
movl $0xaf1, %ecx # imm = 0xAF1
jmp 0x68dc5
movq 0x6d289(%rip), %rax # 0xd5f48
movq (%rax), %rdi
callq 0xa6f0
movq 0x6d2da(%rip), %rax # 0xd5fa8
movq (%rax), %rdi
leaq 0x31546(%rip), %rsi # 0x9a21e
leaq 0x38b9f(%rip), %rdx # 0xa187e
leaq 0x31d46(%rip), %r8 # 0x9aa2c
movl $0xaf6, %ecx # imm = 0xAF6
jmp 0x68dc5
movq 0x6d251(%rip), %rax # 0xd5f48
movq (%rax), %rdi
callq 0xa6f0
movq 0x6d2a2(%rip), %rax # 0xd5fa8
movq (%rax), %rdi
leaq 0x3150e(%rip), %rsi # 0x9a21e
leaq 0x38b67(%rip), %rdx # 0xa187e
leaq 0x38d86(%rip), %r8 # 0xa1aa4
movl $0xae2, %ecx # imm = 0xAE2
jmp 0x68dc5
movq 0x6d219(%rip), %rax # 0xd5f48
movq (%rax), %rdi
callq 0xa6f0
movq 0x6d26a(%rip), %rax # 0xd5fa8
movq (%rax), %rdi
leaq 0x314d6(%rip), %rsi # 0x9a21e
leaq 0x38b2f(%rip), %rdx # 0xa187e
leaq 0x38d8f(%rip), %r8 # 0xa1ae5
movl $0xaec, %ecx # imm = 0xAEC
jmp 0x68dc5
movq 0x6d1e4(%rip), %rax # 0xd5f48
movq (%rax), %rdi
callq 0xa6f0
movq 0x6d235(%rip), %rax # 0xd5fa8
movq (%rax), %rdi
leaq 0x314a1(%rip), %rsi # 0x9a21e
leaq 0x38afa(%rip), %rdx # 0xa187e
leaq 0x38d39(%rip), %r8 # 0xa1ac4
movl $0xae7, %ecx # imm = 0xAE7
jmp 0x68dc5
movq 0x6d1af(%rip), %rax # 0xd5f48
movq (%rax), %rdi
callq 0xa6f0
movq 0x6d200(%rip), %rax # 0xd5fa8
movq (%rax), %rdi
leaq 0x3146c(%rip), %rsi # 0x9a21e
leaq 0x38ac5(%rip), %rdx # 0xa187e
leaq 0x2f27f(%rip), %r8 # 0x9803f
movl $0xafb, %ecx # imm = 0xAFB
xorl %eax, %eax
callq 0xa8b0
callq 0x67550
callq 0xa300
| ggml_get_i32_1d:
push rbp
push r14
push rbx
sub rsp, 20h
mov ebp, esi
mov rbx, rdi
call ggml_is_contiguous
test al, al
jz short loc_68BC4
mov eax, [rbx]
test eax, eax
jz loc_68C33
cmp eax, 1
jz loc_68C10
cmp eax, 12h
jz loc_68C4B
cmp eax, 11h
jz loc_68C65
cmp eax, 10h
jnz loc_68D92
cmp qword ptr [rbx+30h], 1
jnz loc_68CF0
mov rax, [rbx+118h]
movsxd rcx, ebp
movsx eax, byte ptr [rax+rcx]
jmp short loc_68C07
loc_68BC4:
vxorps xmm0, xmm0, xmm0
lea rcx, [rsp+38h+var_30]
vmovups ymmword ptr [rcx-8], ymm0
movsxd rsi, ebp
lea r8, [rsp+38h+var_28]
lea r9, [rsp+38h+var_20]
mov r14, rsp
mov rdi, rbx
mov rdx, r14
vzeroupper
call ggml_unravel_index
mov esi, [r14]
mov edx, [r14+8]
mov ecx, [r14+10h]
mov r8d, [r14+18h]
mov rdi, rbx
call ggml_get_i32_nd
loc_68C07:
add rsp, 20h
pop rbx
pop r14
pop rbp
retn
loc_68C10:
cmp qword ptr [rbx+30h], 2
jnz short loc_68C80
mov rax, [rbx+118h]
movsxd rcx, ebp
movzx eax, word ptr [rax+rcx*2]
lea rcx, ggml_table_f32_f16
vcvttss2si eax, dword ptr [rcx+rax*4]
jmp short loc_68C07
loc_68C33:
cmp qword ptr [rbx+30h], 4
jnz short loc_68CB8
mov rax, [rbx+118h]
movsxd rcx, ebp
vcvttss2si eax, dword ptr [rax+rcx*4]
jmp short loc_68C07
loc_68C4B:
cmp qword ptr [rbx+30h], 4
jnz loc_68D28
mov rax, [rbx+118h]
movsxd rcx, ebp
mov eax, [rax+rcx*4]
jmp short loc_68C07
loc_68C65:
cmp qword ptr [rbx+30h], 2
jnz loc_68D5D
mov rax, [rbx+118h]
movsxd rcx, ebp
movsx eax, word ptr [rax+rcx*2]
jmp short loc_68C07
loc_68C80:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
lea r8, aTensorNb0Sizeo_0; "tensor->nb[0] == sizeof(ggml_fp16_t)"
mov ecx, 0AF1h
jmp loc_68DC5
loc_68CB8:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
lea r8, aTensorNb0Sizeo; "tensor->nb[0] == sizeof(float)"
mov ecx, 0AF6h
jmp loc_68DC5
loc_68CF0:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
lea r8, aTensorNb0Sizeo_1; "tensor->nb[0] == sizeof(int8_t)"
mov ecx, 0AE2h
jmp loc_68DC5
loc_68D28:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
lea r8, aTensorNb0Sizeo_2; "tensor->nb[0] == sizeof(int32_t)"
mov ecx, 0AECh
jmp short loc_68DC5
loc_68D5D:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
lea r8, aTensorNb0Sizeo_3; "tensor->nb[0] == sizeof(int16_t)"
mov ecx, 0AE7h
jmp short loc_68DC5
loc_68D92:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
lea r8, aFalse; "false"
mov ecx, 0AFBh
loc_68DC5:
xor eax, eax
call _fprintf
call ggml_print_backtrace
call _abort
| int ggml_get_i32_1d(_QWORD *a1, int a2, __m128 _XMM0)
{
int v4; // eax
int result; // eax
long long v12; // rdi
long long v13; // [rsp+0h] [rbp-38h] BYREF
long long v14; // [rsp+8h] [rbp-30h] BYREF
long long v15; // [rsp+10h] [rbp-28h] BYREF
long long v16[4]; // [rsp+18h] [rbp-20h] BYREF
if ( (unsigned __int8)ggml_is_contiguous(a1) )
{
v4 = *(_DWORD *)a1;
if ( *(_DWORD *)a1 )
{
if ( v4 == 1 )
{
if ( a1[6] != 2LL )
{
fflush(stdout);
v12 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
2801LL,
"tensor->nb[0] == sizeof(ggml_fp16_t)");
goto LABEL_24;
}
_RAX = *(unsigned __int16 *)(a1[35] + 2LL * a2);
_RCX = &ggml_table_f32_f16;
__asm { vcvttss2si eax, dword ptr [rcx+rax*4] }
}
else if ( v4 == 18 )
{
if ( a1[6] != 4LL )
{
fflush(stdout);
v12 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
2796LL,
"tensor->nb[0] == sizeof(int32_t)");
goto LABEL_24;
}
return *(_DWORD *)(a1[35] + 4LL * a2);
}
else
{
if ( v4 != 17 )
{
if ( v4 == 16 )
{
if ( a1[6] == 1LL )
return *(char *)(a1[35] + a2);
fflush(stdout);
v12 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
2786LL,
"tensor->nb[0] == sizeof(int8_t)");
}
else
{
fflush(stdout);
v12 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
2811LL,
"false");
}
LABEL_24:
ggml_print_backtrace();
abort(v12);
}
if ( a1[6] != 2LL )
{
fflush(stdout);
v12 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
2791LL,
"tensor->nb[0] == sizeof(int16_t)");
goto LABEL_24;
}
return *(__int16 *)(a1[35] + 2LL * a2);
}
}
else
{
if ( a1[6] != 4LL )
{
fflush(stdout);
v12 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
2806LL,
"tensor->nb[0] == sizeof(float)");
goto LABEL_24;
}
_RAX = a1[35];
_RCX = a2;
__asm { vcvttss2si eax, dword ptr [rax+rcx*4] }
}
}
else
{
__asm { vxorps xmm0, xmm0, xmm0 }
_RCX = &v14;
__asm
{
vmovups ymmword ptr [rcx-8], ymm0
vzeroupper
}
ggml_unravel_index(a1, a2, &v13, &v14, &v15, v16);
return ggml_get_i32_nd(
a1,
(unsigned int)v13,
(unsigned int)v14,
(unsigned int)v15,
LODWORD(v16[0]),
*(double *)&_XMM0);
}
return result;
}
| ggml_get_i32_1d:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x20
MOV EBP,ESI
MOV RBX,RDI
CALL 0x00167db9
TEST AL,AL
JZ 0x00168bc4
MOV EAX,dword ptr [RBX]
TEST EAX,EAX
JZ 0x00168c33
CMP EAX,0x1
JZ 0x00168c10
CMP EAX,0x12
JZ 0x00168c4b
CMP EAX,0x11
JZ 0x00168c65
CMP EAX,0x10
JNZ 0x00168d92
CMP qword ptr [RBX + 0x30],0x1
JNZ 0x00168cf0
MOV RAX,qword ptr [RBX + 0x118]
MOVSXD RCX,EBP
MOVSX EAX,byte ptr [RAX + RCX*0x1]
JMP 0x00168c07
LAB_00168bc4:
VXORPS XMM0,XMM0,XMM0
LEA RCX,[RSP + 0x8]
VMOVUPS ymmword ptr [RCX + -0x8],YMM0
MOVSXD RSI,EBP
LEA R8,[RSP + 0x10]
LEA R9,[RSP + 0x18]
MOV R14,RSP
MOV RDI,RBX
MOV RDX,R14
VZEROUPPER
CALL 0x00168b0d
MOV ESI,dword ptr [R14]
MOV EDX,dword ptr [R14 + 0x8]
MOV ECX,dword ptr [R14 + 0x10]
MOV R8D,dword ptr [R14 + 0x18]
MOV RDI,RBX
CALL 0x00168dd6
LAB_00168c07:
ADD RSP,0x20
POP RBX
POP R14
POP RBP
RET
LAB_00168c10:
CMP qword ptr [RBX + 0x30],0x2
JNZ 0x00168c80
MOV RAX,qword ptr [RBX + 0x118]
MOVSXD RCX,EBP
MOVZX EAX,word ptr [RAX + RCX*0x2]
LEA RCX,[0x25d290]
VCVTTSS2SI EAX,dword ptr [RCX + RAX*0x4]
JMP 0x00168c07
LAB_00168c33:
CMP qword ptr [RBX + 0x30],0x4
JNZ 0x00168cb8
MOV RAX,qword ptr [RBX + 0x118]
MOVSXD RCX,EBP
VCVTTSS2SI EAX,dword ptr [RAX + RCX*0x4]
JMP 0x00168c07
LAB_00168c4b:
CMP qword ptr [RBX + 0x30],0x4
JNZ 0x00168d28
MOV RAX,qword ptr [RBX + 0x118]
MOVSXD RCX,EBP
MOV EAX,dword ptr [RAX + RCX*0x4]
JMP 0x00168c07
LAB_00168c65:
CMP qword ptr [RBX + 0x30],0x2
JNZ 0x00168d5d
MOV RAX,qword ptr [RBX + 0x118]
MOVSXD RCX,EBP
MOVSX EAX,word ptr [RAX + RCX*0x2]
JMP 0x00168c07
LAB_00168c80:
MOV RAX,qword ptr [0x001d5f48]
MOV RDI,qword ptr [RAX]
CALL 0x0010a6f0
MOV RAX,qword ptr [0x001d5fa8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x19a21e]
LEA RDX,[0x1a187e]
LEA R8,[0x1a1b06]
MOV ECX,0xaf1
JMP 0x00168dc5
LAB_00168cb8:
MOV RAX,qword ptr [0x001d5f48]
MOV RDI,qword ptr [RAX]
CALL 0x0010a6f0
MOV RAX,qword ptr [0x001d5fa8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x19a21e]
LEA RDX,[0x1a187e]
LEA R8,[0x19aa2c]
MOV ECX,0xaf6
JMP 0x00168dc5
LAB_00168cf0:
MOV RAX,qword ptr [0x001d5f48]
MOV RDI,qword ptr [RAX]
CALL 0x0010a6f0
MOV RAX,qword ptr [0x001d5fa8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x19a21e]
LEA RDX,[0x1a187e]
LEA R8,[0x1a1aa4]
MOV ECX,0xae2
JMP 0x00168dc5
LAB_00168d28:
MOV RAX,qword ptr [0x001d5f48]
MOV RDI,qword ptr [RAX]
CALL 0x0010a6f0
MOV RAX,qword ptr [0x001d5fa8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x19a21e]
LEA RDX,[0x1a187e]
LEA R8,[0x1a1ae5]
MOV ECX,0xaec
JMP 0x00168dc5
LAB_00168d5d:
MOV RAX,qword ptr [0x001d5f48]
MOV RDI,qword ptr [RAX]
CALL 0x0010a6f0
MOV RAX,qword ptr [0x001d5fa8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x19a21e]
LEA RDX,[0x1a187e]
LEA R8,[0x1a1ac4]
MOV ECX,0xae7
JMP 0x00168dc5
LAB_00168d92:
MOV RAX,qword ptr [0x001d5f48]
MOV RDI,qword ptr [RAX]
CALL 0x0010a6f0
MOV RAX,qword ptr [0x001d5fa8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x19a21e]
LEA RDX,[0x1a187e]
LEA R8,[0x19803f]
MOV ECX,0xafb
LAB_00168dc5:
XOR EAX,EAX
CALL 0x0010a8b0
CALL 0x00167550
CALL 0x0010a300
|
ulong ggml_get_i32_1d(int *param_1,int param_2)
{
int iVar1;
char cVar2;
ulong uVar3;
int8 uVar4;
FILE *__stream;
char *pcVar5;
ulong local_38;
ulong uStack_30;
ulong uStack_28;
ulong uStack_20;
cVar2 = ggml_is_contiguous();
if (cVar2 == '\0') {
local_38 = 0;
uStack_30 = 0;
uStack_28 = 0;
uStack_20 = 0;
ggml_unravel_index(param_1,(long)param_2,&local_38,&uStack_30,&uStack_28,&uStack_20);
uVar3 = ggml_get_i32_nd(param_1,local_38 & 0xffffffff,uStack_30 & 0xffffffff,
uStack_28 & 0xffffffff,uStack_20 & 0xffffffff);
return uVar3;
}
iVar1 = *param_1;
if (iVar1 == 0) {
if (*(long *)(param_1 + 0xc) == 4) {
return CONCAT44((int)((ulong)*(long *)(param_1 + 0x46) >> 0x20),
(int)*(float *)(*(long *)(param_1 + 0x46) + (long)param_2 * 4));
}
fflush(*(FILE **)PTR_stdout_001d5f48);
__stream = *(FILE **)PTR_stderr_001d5fa8;
pcVar5 = "tensor->nb[0] == sizeof(float)";
uVar4 = 0xaf6;
}
else if (iVar1 == 1) {
if (*(long *)(param_1 + 0xc) == 2) {
return (ulong)(uint)(int)(float)(&ggml_table_f32_f16)
[*(ushort *)(*(long *)(param_1 + 0x46) + (long)param_2 * 2)];
}
fflush(*(FILE **)PTR_stdout_001d5f48);
__stream = *(FILE **)PTR_stderr_001d5fa8;
pcVar5 = "tensor->nb[0] == sizeof(ggml_fp16_t)";
uVar4 = 0xaf1;
}
else if (iVar1 == 0x12) {
if (*(long *)(param_1 + 0xc) == 4) {
return (ulong)*(uint *)(*(long *)(param_1 + 0x46) + (long)param_2 * 4);
}
fflush(*(FILE **)PTR_stdout_001d5f48);
__stream = *(FILE **)PTR_stderr_001d5fa8;
pcVar5 = "tensor->nb[0] == sizeof(int32_t)";
uVar4 = 0xaec;
}
else if (iVar1 == 0x11) {
if (*(long *)(param_1 + 0xc) == 2) {
return (ulong)(uint)(int)*(short *)(*(long *)(param_1 + 0x46) + (long)param_2 * 2);
}
fflush(*(FILE **)PTR_stdout_001d5f48);
__stream = *(FILE **)PTR_stderr_001d5fa8;
pcVar5 = "tensor->nb[0] == sizeof(int16_t)";
uVar4 = 0xae7;
}
else if (iVar1 == 0x10) {
if (*(long *)(param_1 + 0xc) == 1) {
return (ulong)(uint)(int)*(char *)(*(long *)(param_1 + 0x46) + (long)param_2);
}
fflush(*(FILE **)PTR_stdout_001d5f48);
__stream = *(FILE **)PTR_stderr_001d5fa8;
pcVar5 = "tensor->nb[0] == sizeof(int8_t)";
uVar4 = 0xae2;
}
else {
fflush(*(FILE **)PTR_stdout_001d5f48);
__stream = *(FILE **)PTR_stderr_001d5fa8;
pcVar5 = "false";
uVar4 = 0xafb;
}
fprintf(__stream,"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
uVar4,pcVar5);
ggml_print_backtrace();
/* WARNING: Subroutine does not return */
abort();
}
| |
21,236 | ggml_get_i32_1d | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | int32_t ggml_get_i32_1d(const struct ggml_tensor * tensor, int i) {
if (!ggml_is_contiguous(tensor)) {
int64_t id[4] = { 0, 0, 0, 0 };
ggml_unravel_index(tensor, i, &id[0], &id[1], &id[2], &id[3]);
return ggml_get_i32_nd(tensor, id[0], id[1], id[2], id[3]);
}
switch (tensor->type) {
case GGML_TYPE_I8:
{
GGML_ASSERT(tensor->nb[0] == sizeof(int8_t));
return ((int8_t *)(tensor->data))[i];
}
case GGML_TYPE_I16:
{
GGML_ASSERT(tensor->nb[0] == sizeof(int16_t));
return ((int16_t *)(tensor->data))[i];
}
case GGML_TYPE_I32:
{
GGML_ASSERT(tensor->nb[0] == sizeof(int32_t));
return ((int32_t *)(tensor->data))[i];
}
case GGML_TYPE_F16:
{
GGML_ASSERT(tensor->nb[0] == sizeof(ggml_fp16_t));
return GGML_FP16_TO_FP32(((ggml_fp16_t *)(tensor->data))[i]);
}
case GGML_TYPE_F32:
{
GGML_ASSERT(tensor->nb[0] == sizeof(float));
return ((float *)(tensor->data))[i];
}
default:
{
GGML_ASSERT(false);
}
}
return 0.0f;
} | O3 | c | ggml_get_i32_1d:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0x8d0a3
testb %al, %al
je 0x8f123
movl (%rbx), %eax
cmpl $0xf, %eax
jle 0x8f167
cmpl $0x12, %eax
je 0x8f193
cmpl $0x11, %eax
je 0x8f1a9
cmpl $0x10, %eax
jne 0x8f1dd
cmpq $0x1, 0x30(%rbx)
jne 0x8f1e7
movq 0x118(%rbx), %rax
movslq %ebp, %rcx
movsbl (%rax,%rcx), %eax
jmp 0x8f1d6
movslq %ebp, %rax
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rcx
imulq %rsi, %rcx
movq 0x20(%rbx), %rdi
imulq %rcx, %rdi
cqto
idivq %rdi
movq %rax, %r8
movq %rdx, %rax
cqto
idivq %rcx
movq %rax, %rcx
movq %rdx, %rax
cqto
idivq %rsi
movq %rbx, %rdi
movl %edx, %esi
movl %eax, %edx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x8f1fb
testl %eax, %eax
je 0x8f1c0
cmpl $0x1, %eax
jne 0x8f1dd
cmpq $0x2, 0x30(%rbx)
jne 0x8f1f6
movq 0x118(%rbx), %rax
movslq %ebp, %rcx
movzwl (%rax,%rcx,2), %eax
leaq 0xed0f4(%rip), %rcx # 0x17c280
vcvttss2si (%rcx,%rax,4), %eax
jmp 0x8f1d6
cmpq $0x4, 0x30(%rbx)
jne 0x8f1e2
movq 0x118(%rbx), %rax
movslq %ebp, %rcx
movl (%rax,%rcx,4), %eax
jmp 0x8f1d6
cmpq $0x2, 0x30(%rbx)
jne 0x8f1ec
movq 0x118(%rbx), %rax
movslq %ebp, %rcx
movswl (%rax,%rcx,2), %eax
jmp 0x8f1d6
cmpq $0x4, 0x30(%rbx)
jne 0x8f1f1
movq 0x118(%rbx), %rax
movslq %ebp, %rcx
vcvttss2si (%rax,%rcx,4), %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0xc481
callq 0xc3b2
callq 0xc43c
callq 0xc3f7
callq 0xc328
callq 0xc36d
| ggml_get_i32_1d:
push rbp
push rbx
push rax
mov ebp, esi
mov rbx, rdi
call ggml_is_contiguous
test al, al
jz short loc_8F123
mov eax, [rbx]
cmp eax, 0Fh
jle short loc_8F167
cmp eax, 12h
jz loc_8F193
cmp eax, 11h
jz loc_8F1A9
cmp eax, 10h
jnz loc_8F1DD
cmp qword ptr [rbx+30h], 1
jnz loc_8F1E7
mov rax, [rbx+118h]
movsxd rcx, ebp
movsx eax, byte ptr [rax+rcx]
jmp loc_8F1D6
loc_8F123:
movsxd rax, ebp
mov rsi, [rbx+10h]
mov rcx, [rbx+18h]
imul rcx, rsi
mov rdi, [rbx+20h]
imul rdi, rcx
cqo
idiv rdi
mov r8, rax
mov rax, rdx
cqo
idiv rcx
mov rcx, rax
mov rax, rdx
cqo
idiv rsi
mov rdi, rbx
mov esi, edx
mov edx, eax
add rsp, 8
pop rbx
pop rbp
jmp ggml_get_i32_nd
loc_8F167:
test eax, eax
jz short loc_8F1C0
cmp eax, 1
jnz short loc_8F1DD
cmp qword ptr [rbx+30h], 2
jnz short loc_8F1F6
mov rax, [rbx+118h]
movsxd rcx, ebp
movzx eax, word ptr [rax+rcx*2]
lea rcx, ggml_table_f32_f16
vcvttss2si eax, dword ptr [rcx+rax*4]
jmp short loc_8F1D6
loc_8F193:
cmp qword ptr [rbx+30h], 4
jnz short loc_8F1E2
mov rax, [rbx+118h]
movsxd rcx, ebp
mov eax, [rax+rcx*4]
jmp short loc_8F1D6
loc_8F1A9:
cmp qword ptr [rbx+30h], 2
jnz short loc_8F1EC
mov rax, [rbx+118h]
movsxd rcx, ebp
movsx eax, word ptr [rax+rcx*2]
jmp short loc_8F1D6
loc_8F1C0:
cmp qword ptr [rbx+30h], 4
jnz short loc_8F1F1
mov rax, [rbx+118h]
movsxd rcx, ebp
vcvttss2si eax, dword ptr [rax+rcx*4]
loc_8F1D6:
add rsp, 8
pop rbx
pop rbp
retn
loc_8F1DD:
call ggml_get_i32_1d_cold_6
loc_8F1E2:
call ggml_get_i32_1d_cold_3
loc_8F1E7:
call ggml_get_i32_1d_cold_5
loc_8F1EC:
call ggml_get_i32_1d_cold_4
loc_8F1F1:
call ggml_get_i32_1d_cold_1
loc_8F1F6:
call ggml_get_i32_1d_cold_2
| int ggml_get_i32_1d(_QWORD *a1, int a2)
{
int v3; // eax
int result; // eax
long long v5; // rsi
long long v6; // rcx
if ( !(unsigned __int8)ggml_is_contiguous(a1) )
{
v5 = a1[2];
v6 = v5 * a1[3];
return ggml_get_i32_nd(
a1,
(unsigned int)(a2 % (v6 * a1[4]) % v6 % v5),
(unsigned int)(a2 % (v6 * a1[4]) % v6 / v5),
a2 % (v6 * a1[4]) / v6,
a2 / (v6 * a1[4]));
}
v3 = *(_DWORD *)a1;
if ( *(int *)a1 <= 15 )
{
if ( v3 )
{
if ( v3 != 1 )
goto LABEL_20;
if ( a1[6] != 2LL )
ggml_get_i32_1d_cold_2(a1);
_RAX = *(unsigned __int16 *)(a1[35] + 2LL * a2);
_RCX = &ggml_table_f32_f16;
__asm { vcvttss2si eax, dword ptr [rcx+rax*4] }
}
else
{
if ( a1[6] != 4LL )
ggml_get_i32_1d_cold_1(a1);
_RAX = a1[35];
_RCX = a2;
__asm { vcvttss2si eax, dword ptr [rax+rcx*4] }
}
}
else
{
switch ( v3 )
{
case 18:
if ( a1[6] != 4LL )
ggml_get_i32_1d_cold_3(a1);
return *(_DWORD *)(a1[35] + 4LL * a2);
case 17:
if ( a1[6] != 2LL )
ggml_get_i32_1d_cold_4(a1);
return *(__int16 *)(a1[35] + 2LL * a2);
case 16:
if ( a1[6] != 1LL )
ggml_get_i32_1d_cold_5(a1);
return *(char *)(a1[35] + a2);
default:
LABEL_20:
ggml_get_i32_1d_cold_6(a1);
}
}
return result;
}
| |||
21,237 | ma_copy_key | eloqsql/storage/maria/ma_key.c | void _ma_copy_key(MARIA_KEY *to, const MARIA_KEY *from)
{
memcpy(to->data, from->data, from->data_length + from->ref_length);
to->keyinfo= from->keyinfo;
to->data_length= from->data_length;
to->ref_length= from->ref_length;
to->flag= from->flag;
} | O3 | c | ma_copy_key:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rdi
movq (%rsi), %rsi
movl 0x14(%rbx), %edx
addl 0x10(%rbx), %edx
callq 0x29080
movq 0x8(%rbx), %rax
movq %rax, 0x8(%r14)
movl 0x10(%rbx), %eax
movl %eax, 0x10(%r14)
movl 0x14(%rbx), %eax
movl %eax, 0x14(%r14)
movl 0x18(%rbx), %eax
movl %eax, 0x18(%r14)
popq %rbx
popq %r14
popq %rbp
retq
| _ma_copy_key:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rsi
mov r14, rdi
mov rdi, [rdi]
mov rsi, [rsi]
mov edx, [rbx+14h]
add edx, [rbx+10h]
call _memcpy
mov rax, [rbx+8]
mov [r14+8], rax
mov eax, [rbx+10h]
mov [r14+10h], eax
mov eax, [rbx+14h]
mov [r14+14h], eax
mov eax, [rbx+18h]
mov [r14+18h], eax
pop rbx
pop r14
pop rbp
retn
| long long ma_copy_key(long long a1, long long a2)
{
long long result; // rax
memcpy(*(_QWORD *)a1, *(_QWORD *)a2, (unsigned int)(*(_DWORD *)(a2 + 16) + *(_DWORD *)(a2 + 20)));
*(_QWORD *)(a1 + 8) = *(_QWORD *)(a2 + 8);
*(_DWORD *)(a1 + 16) = *(_DWORD *)(a2 + 16);
*(_DWORD *)(a1 + 20) = *(_DWORD *)(a2 + 20);
result = *(unsigned int *)(a2 + 24);
*(_DWORD *)(a1 + 24) = result;
return result;
}
| _ma_copy_key:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
MOV RDI,qword ptr [RDI]
MOV RSI,qword ptr [RSI]
MOV EDX,dword ptr [RBX + 0x14]
ADD EDX,dword ptr [RBX + 0x10]
CALL 0x00129080
MOV RAX,qword ptr [RBX + 0x8]
MOV qword ptr [R14 + 0x8],RAX
MOV EAX,dword ptr [RBX + 0x10]
MOV dword ptr [R14 + 0x10],EAX
MOV EAX,dword ptr [RBX + 0x14]
MOV dword ptr [R14 + 0x14],EAX
MOV EAX,dword ptr [RBX + 0x18]
MOV dword ptr [R14 + 0x18],EAX
POP RBX
POP R14
POP RBP
RET
|
void _ma_copy_key(int8 *param_1,int8 *param_2)
{
memcpy((void *)*param_1,(void *)*param_2,
(ulong)(uint)(*(int *)((long)param_2 + 0x14) + *(int *)(param_2 + 2)));
param_1[1] = param_2[1];
*(int4 *)(param_1 + 2) = *(int4 *)(param_2 + 2);
*(int4 *)((long)param_1 + 0x14) = *(int4 *)((long)param_2 + 0x14);
*(int4 *)(param_1 + 3) = *(int4 *)(param_2 + 3);
return;
}
| |
21,238 | mi_ft_cmp | eloqsql/storage/myisam/ft_update.c | int _mi_ft_cmp(MI_INFO *info, uint keynr, const uchar *rec1, const uchar *rec2)
{
FT_SEG_ITERATOR ftsi1, ftsi2;
CHARSET_INFO *cs=info->s->keyinfo[keynr].seg->charset;
DBUG_ENTER("_mi_ft_cmp");
_mi_ft_segiterator_init(info, keynr, rec1, &ftsi1);
_mi_ft_segiterator_init(info, keynr, rec2, &ftsi2);
while (_mi_ft_segiterator(&ftsi1) && _mi_ft_segiterator(&ftsi2))
{
if ((ftsi1.pos != ftsi2.pos) &&
(!ftsi1.pos || !ftsi2.pos ||
ha_compare_text(cs, (uchar*) ftsi1.pos,ftsi1.len,
(uchar*) ftsi2.pos,ftsi2.len,0)))
DBUG_RETURN(THOSE_TWO_DAMN_KEYS_ARE_REALLY_DIFFERENT);
}
DBUG_RETURN(GEE_THEY_ARE_ABSOLUTELY_IDENTICAL);
} | O3 | c | mi_ft_cmp:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq (%rdi), %rax
movq 0x218(%rax), %rax
movl %esi, %esi
imulq $0x70, %rsi, %rsi
movq 0x28(%rax,%rsi), %r8
movq (%r8), %rbx
movzwl 0x8(%rax,%rsi), %eax
leaq -0x60(%rbp), %rdi
movl %eax, (%rdi)
movq %r8, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
xorl %r14d, %r14d
movq %r14, 0x18(%rdi)
movl %r14d, 0x4(%rdi)
movl %eax, -0x40(%rbp)
movq %r8, -0x38(%rbp)
movq %rcx, -0x30(%rbp)
movq %r14, -0x28(%rbp)
movl %r14d, -0x3c(%rbp)
callq 0x768a6
testl %eax, %eax
je 0x76b7c
leaq -0x40(%rbp), %r15
leaq -0x60(%rbp), %r12
movq %r15, %rdi
callq 0x768a6
testl %eax, %eax
je 0x76b79
movq -0x48(%rbp), %rsi
movq -0x28(%rbp), %rcx
cmpq %rcx, %rsi
je 0x76b6d
movl $0x1, %r14d
testq %rsi, %rsi
je 0x76b7c
testq %rcx, %rcx
je 0x76b7c
movl -0x5c(%rbp), %edx
movl -0x3c(%rbp), %r8d
movq %rbx, %rdi
xorl %r9d, %r9d
callq 0xa33b8
testl %eax, %eax
jne 0x76b7c
movq %r12, %rdi
callq 0x768a6
testl %eax, %eax
jne 0x76b2e
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _mi_ft_cmp:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 40h
mov rax, [rdi]
mov rax, [rax+218h]
mov esi, esi
imul rsi, 70h ; 'p'
mov r8, [rax+rsi+28h]
mov rbx, [r8]
movzx eax, word ptr [rax+rsi+8]
lea rdi, [rbp+var_60]
mov [rdi], eax
mov [rdi+8], r8
mov [rdi+10h], rdx
xor r14d, r14d
mov [rdi+18h], r14
mov [rdi+4], r14d
mov [rbp+var_40], eax
mov [rbp+var_38], r8
mov [rbp+var_30], rcx
mov [rbp+var_28], r14
mov [rbp+var_3C], r14d
call _mi_ft_segiterator
test eax, eax
jz short loc_76B7C
lea r15, [rbp+var_40]
lea r12, [rbp+var_60]
loc_76B2E:
mov rdi, r15
call _mi_ft_segiterator
test eax, eax
jz short loc_76B79
mov rsi, [rbp+var_48]
mov rcx, [rbp+var_28]
cmp rsi, rcx
jz short loc_76B6D
mov r14d, 1
test rsi, rsi
jz short loc_76B7C
test rcx, rcx
jz short loc_76B7C
mov edx, [rbp+var_5C]
mov r8d, [rbp+var_3C]
mov rdi, rbx
xor r9d, r9d
call ha_compare_text
test eax, eax
jnz short loc_76B7C
loc_76B6D:
mov rdi, r12
call _mi_ft_segiterator
test eax, eax
jnz short loc_76B2E
loc_76B79:
xor r14d, r14d
loc_76B7C:
mov eax, r14d
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long mi_ft_cmp(long long a1, unsigned int a2, long long a3, long long a4)
{
long long v4; // rax
long long v5; // rsi
_QWORD *v6; // r8
long long v7; // rbx
unsigned int v8; // r14d
int v10; // [rsp+0h] [rbp-60h] BYREF
unsigned int v11; // [rsp+4h] [rbp-5Ch]
_QWORD *v12; // [rsp+8h] [rbp-58h]
long long v13; // [rsp+10h] [rbp-50h]
long long v14; // [rsp+18h] [rbp-48h]
int v15; // [rsp+20h] [rbp-40h] BYREF
unsigned int v16; // [rsp+24h] [rbp-3Ch]
_QWORD *v17; // [rsp+28h] [rbp-38h]
long long v18; // [rsp+30h] [rbp-30h]
long long v19; // [rsp+38h] [rbp-28h]
v4 = *(_QWORD *)(*(_QWORD *)a1 + 536LL);
v5 = 112LL * a2;
v6 = *(_QWORD **)(v4 + v5 + 40);
v7 = *v6;
v10 = *(unsigned __int16 *)(v4 + v5 + 8);
v12 = v6;
v13 = a3;
v8 = 0;
v14 = 0LL;
v11 = 0;
v15 = v10;
v17 = v6;
v18 = a4;
v19 = 0LL;
v16 = 0;
if ( (unsigned int)mi_ft_segiterator((long long)&v10) )
{
do
{
if ( !(unsigned int)mi_ft_segiterator((long long)&v15) )
break;
if ( v14 != v19 )
{
v8 = 1;
if ( !v14 || !v19 || (unsigned int)ha_compare_text(v7, v14, v11, v19, v16, 0LL) )
return v8;
}
}
while ( (unsigned int)mi_ft_segiterator((long long)&v10) );
return 0;
}
return v8;
}
| _mi_ft_cmp:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x218]
MOV ESI,ESI
IMUL RSI,RSI,0x70
MOV R8,qword ptr [RAX + RSI*0x1 + 0x28]
MOV RBX,qword ptr [R8]
MOVZX EAX,word ptr [RAX + RSI*0x1 + 0x8]
LEA RDI,[RBP + -0x60]
MOV dword ptr [RDI],EAX
MOV qword ptr [RDI + 0x8],R8
MOV qword ptr [RDI + 0x10],RDX
XOR R14D,R14D
MOV qword ptr [RDI + 0x18],R14
MOV dword ptr [RDI + 0x4],R14D
MOV dword ptr [RBP + -0x40],EAX
MOV qword ptr [RBP + -0x38],R8
MOV qword ptr [RBP + -0x30],RCX
MOV qword ptr [RBP + -0x28],R14
MOV dword ptr [RBP + -0x3c],R14D
CALL 0x001768a6
TEST EAX,EAX
JZ 0x00176b7c
LEA R15,[RBP + -0x40]
LEA R12,[RBP + -0x60]
LAB_00176b2e:
MOV RDI,R15
CALL 0x001768a6
TEST EAX,EAX
JZ 0x00176b79
MOV RSI,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x28]
CMP RSI,RCX
JZ 0x00176b6d
MOV R14D,0x1
TEST RSI,RSI
JZ 0x00176b7c
TEST RCX,RCX
JZ 0x00176b7c
MOV EDX,dword ptr [RBP + -0x5c]
MOV R8D,dword ptr [RBP + -0x3c]
MOV RDI,RBX
XOR R9D,R9D
CALL 0x001a33b8
TEST EAX,EAX
JNZ 0x00176b7c
LAB_00176b6d:
MOV RDI,R12
CALL 0x001768a6
TEST EAX,EAX
JNZ 0x00176b2e
LAB_00176b79:
XOR R14D,R14D
LAB_00176b7c:
MOV EAX,R14D
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 _mi_ft_cmp(long *param_1,uint param_2,int8 param_3,int8 param_4)
{
int8 uVar1;
int iVar2;
uint local_68;
int4 local_64;
int8 *local_60;
int8 local_58;
long local_50;
uint local_48;
int4 local_44;
int8 *local_40;
int8 local_38;
long local_30;
local_60 = *(int8 **)(*(long *)(*param_1 + 0x218) + 0x28 + (ulong)param_2 * 0x70);
uVar1 = *local_60;
local_68 = (uint)*(ushort *)(*(long *)(*param_1 + 0x218) + 8 + (ulong)param_2 * 0x70);
local_50 = 0;
local_64 = 0;
local_30 = 0;
local_44 = 0;
local_58 = param_3;
local_48 = local_68;
local_40 = local_60;
local_38 = param_4;
iVar2 = _mi_ft_segiterator();
if (iVar2 != 0) {
do {
iVar2 = _mi_ft_segiterator(&local_48);
if (iVar2 == 0) {
return 0;
}
if (local_50 != local_30) {
if (local_50 == 0) {
return 1;
}
if (local_30 == 0) {
return 1;
}
iVar2 = ha_compare_text(uVar1,local_50,local_64,local_30,local_44,0);
if (iVar2 != 0) {
return 1;
}
}
iVar2 = _mi_ft_segiterator(&local_68);
} while (iVar2 != 0);
}
return 0;
}
| |
21,239 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [11], 0>(char const (&) [11]) const | monkey531[P]llama/common/./json.hpp | const_reference at(KeyType && key) const
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return it->second;
} | O2 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [11], 0>(char const (&) [11]) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0xab04b
movq %rsi, %r15
movq 0x8(%r14), %rdi
callq 0x7ed48
movq 0x8(%r14), %rcx
cmpq 0x8(%rcx), %rax
je 0xab0a9
addq $0x20, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x24460
movq %rax, %rbx
movq %r14, %rdi
callq 0x43ea6
leaq 0x28(%rsp), %rdx
movq %rax, (%rdx)
leaq 0xbd25(%rip), %rsi # 0xb6d92
leaq 0x8(%rsp), %rdi
callq 0x7e64d
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x63cea
xorl %ebp, %ebp
leaq 0x53ea0(%rip), %rsi # 0xfef38
leaq -0x6a669(%rip), %rdx # 0x40a36
movq %rbx, %rdi
callq 0x24ef0
jmp 0xab113
pushq $0x20
popq %rdi
callq 0x24460
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r15, %rsi
callq 0x27fde
leaq 0xbcf5(%rip), %rsi # 0xb6dc2
leaq 0xbcf4(%rip), %rcx # 0xb6dc8
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x7ec57
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x7f0c2
xorl %ebp, %ebp
leaq 0x53db4(%rip), %rsi # 0xfeeb8
leaq -0x6a6d5(%rip), %rdx # 0x40a36
movq %rbx, %rdi
callq 0x24ef0
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x251d8
jmp 0xab128
movq %rax, %r14
movb $0x1, %bpl
leaq 0x28(%rsp), %rdi
jmp 0xab139
jmp 0xab145
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x251d8
testb %bpl, %bpl
jne 0xab148
jmp 0xab150
movq %rax, %r14
movq %rbx, %rdi
callq 0x24680
movq %r14, %rdi
callq 0x24f80
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push rbx; int
sub rsp, 48h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_AB04B
mov r15, rsi
mov rdi, [r14+8]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA11_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
mov rcx, [r14+8]
cmp rax, [rcx+8]
jz short loc_AB0A9
add rax, 20h ; ' '
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_AB04B:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+68h+var_40]
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_60]
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_60]
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_AB113
loc_AB0A9:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_61]
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_60]
lea rdx, [rsp+68h+var_40]
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_60]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_AB113:
mov r14, rax
lea rdi, [rsp+68h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_AB128
mov r14, rax
mov bpl, 1
loc_AB128:
lea rdi, [rsp+68h+var_40]
jmp short loc_AB139
jmp short loc_AB145
mov r14, rax
lea rdi, [rsp+68h+var_60]; void *
loc_AB139:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_AB148
jmp short loc_AB150
loc_AB145:
mov r14, rax
loc_AB148:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_AB150:
mov rdi, r14
call __Unwind_Resume
| long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_(
long long a1,
long long a2)
{
long long v2; // rax
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::out_of_range *v5; // rbx
_BYTE v6[32]; // [rsp+8h] [rbp-60h] BYREF
_QWORD v7[8]; // [rsp+28h] [rbp-40h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v7[0] = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(
(long long)v6,
(long long)"cannot use at() with ",
v7);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
304,
(long long)v6);
__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 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA11_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(*(long long **)(a1 + 8));
if ( v2 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) )
{
v5 = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL);
std::string::basic_string<std::allocator<char>>(v7, a2);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
(long long)v6,
(long long)"key '",
(long long)v7,
(long long)"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
v5,
403,
(long long)v6);
__cxa_throw(
v5,
(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 v2 + 32;
}
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x001ab04b
MOV R15,RSI
MOV RDI,qword ptr [R14 + 0x8]
CALL 0x0017ed48
MOV RCX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x001ab0a9
ADD RAX,0x20
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001ab04b:
PUSH 0x20
POP RDI
CALL 0x00124460
MOV RBX,RAX
MOV RDI,R14
CALL 0x00143ea6
LEA RDX,[RSP + 0x28]
MOV qword ptr [RDX],RAX
LAB_001ab066:
LEA RSI,[0x1b6d92]
LEA RDI,[RSP + 0x8]
CALL 0x0017e64d
MOV BPL,0x1
LAB_001ab07a:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x00163cea
XOR EBP,EBP
LEA RSI,[0x1fef38]
LEA RDX,[0x140a36]
MOV RDI,RBX
CALL 0x00124ef0
LAB_001ab0a9:
PUSH 0x20
POP RDI
CALL 0x00124460
MOV RBX,RAX
LAB_001ab0b4:
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x7]
MOV RSI,R15
CALL 0x00127fde
LAB_001ab0c6:
LEA RSI,[0x1b6dc2]
LEA RCX,[0x1b6dc8]
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x28]
CALL 0x0017ec57
MOV BPL,0x1
LAB_001ab0e6:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x0017f0c2
XOR EBP,EBP
LEA RSI,[0x1feeb8]
LEA RDX,[0x140a36]
MOV RDI,RBX
CALL 0x00124ef0
|
long _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
long lVar1;
int8 uVar2;
allocator local_61;
detail local_60 [32];
char *local_40 [4];
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) {
uVar2 = __cxa_allocate_exception(0x20);
local_40[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 001ab066 to 001ab076 has its CatchHandler @ 001ab145 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_60,"cannot use at() with ",local_40);
/* try { // try from 001ab07a to 001ab0a6 has its CatchHandler @ 001ab131 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x130,local_60,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
lVar1 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA11_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
(*(int8 *)(param_1 + 8));
if (lVar1 != *(long *)(*(long *)(param_1 + 8) + 8)) {
return lVar1 + 0x20;
}
uVar2 = __cxa_allocate_exception(0x20);
/* try { // try from 001ab0b4 to 001ab0c5 has its CatchHandler @ 001ab12f */
std::__cxx11::string::string<std::allocator<char>>((string *)local_40,param_2,&local_61);
/* try { // try from 001ab0c6 to 001ab0e2 has its CatchHandler @ 001ab122 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_60,"key \'",(string *)local_40,"\' not found");
/* try { // try from 001ab0e6 to 001ab112 has its CatchHandler @ 001ab113 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x193,local_60,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
| |
21,240 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [11], 0>(char const (&) [11]) const | monkey531[P]llama/common/./json.hpp | const_reference at(KeyType && key) const
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return it->second;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [11], 0>(char const (&) [11]) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0xe6ee7
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0xe6ed1
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1b220
testl %eax, %eax
je 0xe6ec6
addq $0x30, %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
jne 0xe6ea7
jmp 0xe6ec9
movq %rbx, %rax
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rbx
cmpq %rbx, %rax
je 0xe6f45
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x1b440
movq %rax, %rbx
movq %r14, %rdi
callq 0x5f5fc
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0xbe99(%rip), %rsi # 0xf2da2
leaq 0x20(%rsp), %rdi
callq 0xab485
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x86dea
xorl %ebp, %ebp
leaq 0x45004(%rip), %rsi # 0x12bf38
leaq -0x8b709(%rip), %rdx # 0x5b832
movq %rbx, %rdi
callq 0x1bf00
jmp 0xe6fbe
movl $0x20, %edi
callq 0x1b440
movq %rax, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x1b3e0
leaq (%rax,%r15), %rdx
movq %rsp, %rdi
movq %r15, %rsi
callq 0x225b4
leaq 0xbe58(%rip), %rsi # 0xf2dd2
leaq 0xbe57(%rip), %rcx # 0xf2dd8
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xaba62
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0xabdda
xorl %ebp, %ebp
leaq 0x44f09(%rip), %rsi # 0x12beb8
leaq -0x8b784(%rip), %rdx # 0x5b832
movq %rbx, %rdi
callq 0x1bf00
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe6fdc
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1b8c0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xe7027
movq 0x10(%rsp), %rsi
jmp 0xe701f
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xe7031
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b8c0
jmp 0xe7031
jmp 0xe702e
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe7027
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1b8c0
testb %bpl, %bpl
jne 0xe7031
jmp 0xe7039
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b660
movq %r14, %rdi
callq 0x1bf90
nop
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push r12; int
push rbx; char
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_E6EE7
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
mov rax, [r12+8]
cmp rbx, rax
jz short loc_E6ED1
loc_E6EA7:
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_E6EC6
add rbx, 30h ; '0'
mov rax, [r12+8]
cmp rbx, rax
jnz short loc_E6EA7
jmp short loc_E6EC9
loc_E6EC6:
mov rax, rbx
loc_E6EC9:
mov rcx, [r14+8]
mov rbx, [rcx+8]
loc_E6ED1:
cmp rax, rbx
jz short loc_E6F45
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_E6EE7:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
mov rdx, rsp
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_E6FBE
loc_E6F45:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r12, [rsp+68h+var_58]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
mov rdi, rsp
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_E6FBE:
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_E6FDC
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E6FDC:
mov rdi, [rsp+68h+var_68]
cmp rdi, r12
jz short loc_E7027
mov rsi, [rsp+68h+var_58]
jmp short loc_E701F
mov r14, rax
mov rdi, [rsp+68h+var_68]; void *
cmp rdi, r12
jz short loc_E7031
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_E7031
jmp short loc_E702E
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_E7027
mov rsi, [rsp+68h+var_38]
loc_E701F:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E7027:
test bpl, bpl
jnz short loc_E7031
jmp short loc_E7039
loc_E702E:
mov r14, rax
loc_E7031:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_E7039:
mov rdi, r14
call __Unwind_Resume
| long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_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,
(long long)"cannot use at() with ",
v9);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
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,
(long long)"key '",
v9,
(long long)"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
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;
}
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x001e6ee7
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x001e6ed1
LAB_001e6ea7:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011b220
TEST EAX,EAX
JZ 0x001e6ec6
ADD RBX,0x30
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JNZ 0x001e6ea7
JMP 0x001e6ec9
LAB_001e6ec6:
MOV RAX,RBX
LAB_001e6ec9:
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x8]
LAB_001e6ed1:
CMP RAX,RBX
JZ 0x001e6f45
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001e6ee7:
MOV EDI,0x20
CALL 0x0011b440
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015f5fc
MOV RDX,RSP
MOV qword ptr [RDX],RAX
LAB_001e6f02:
LEA RSI,[0x1f2da2]
LEA RDI,[RSP + 0x20]
CALL 0x001ab485
MOV BPL,0x1
LAB_001e6f16:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x00186dea
XOR EBP,EBP
LEA RSI,[0x22bf38]
LEA RDX,[0x15b832]
MOV RDI,RBX
CALL 0x0011bf00
LAB_001e6f45:
MOV EDI,0x20
CALL 0x0011b440
MOV RBX,RAX
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x0011b3e0
LEA RDX,[RAX + R15*0x1]
LAB_001e6f68:
MOV RDI,RSP
MOV RSI,R15
CALL 0x001225b4
LAB_001e6f73:
LEA RSI,[0x1f2dd2]
LEA RCX,[0x1f2dd8]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001aba62
MOV BPL,0x1
LAB_001e6f91:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x001abdda
XOR EBP,EBP
LEA RSI,[0x22beb8]
LEA RDX,[0x15b832]
MOV RDI,RBX
CALL 0x0011bf00
|
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
long *plVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
size_t sVar5;
char *pcVar6;
char *local_68 [2];
char local_58 [16];
detail local_48 [32];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 001e6f02 to 001e6f12 has its CatchHandler @ 001e702e */
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 001e6f16 to 001e6f42 has its CatchHandler @ 001e7009 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x130,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
plVar1 = *(long **)(param_1 + 8);
pcVar6 = (char *)*plVar1;
pcVar3 = (char *)plVar1[1];
if (pcVar6 != pcVar3) {
do {
pcVar3 = pcVar6;
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) break;
pcVar6 = pcVar3 + 0x30;
pcVar3 = (char *)plVar1[1];
} while (pcVar6 != pcVar3);
pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8);
}
if (pcVar3 == pcVar6) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = local_58;
sVar5 = strlen(param_2);
/* try { // try from 001e6f68 to 001e6f72 has its CatchHandler @ 001e7007 */
std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5);
/* try { // try from 001e6f73 to 001e6f8d has its CatchHandler @ 001e6fec */
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 001e6f91 to 001e6fbd has its CatchHandler @ 001e6fbe */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x193,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return pcVar3 + 0x20;
}
| |
21,241 | js__malloc_usable_size | bluesky950520[P]quickjs/cutils.h | static inline size_t js__malloc_usable_size(const void *ptr)
{
#if defined(__APPLE__)
return malloc_size(ptr);
#elif defined(_WIN32)
return _msize((void *)ptr);
#elif defined(__linux__) || defined(__ANDROID__) || defined(__CYGWIN__) || defined(__FreeBSD__)
return malloc_usable_size((void *)ptr);
#else
return 0;
#endif
} | O3 | c | js__malloc_usable_size:
jmp 0xe420
| js__malloc_usable_size:
jmp _malloc_usable_size
| // attributes: thunk
long long js__malloc_usable_size()
{
return malloc_usable_size();
}
| js__malloc_usable_size:
JMP 0x0010e420
|
void js__malloc_usable_size(void)
{
(*(code *)PTR_malloc_usable_size_001ce210)();
return;
}
| |
21,242 | nglog::ShutdownLogging() | ng-log[P]ng-log/src/logging.cc | void ShutdownLogging() {
ShutdownLoggingUtilities();
LogDestination::DeleteLogDestinations();
logging_directories_list = nullptr;
g_prefix_formatter = nullptr;
} | O1 | cpp | nglog::ShutdownLogging():
pushq %rax
callq 0x2244b
callq 0xaa8a
leaq 0x318ee(%rip), %rdi # 0x40cf0
xorl %esi, %esi
callq 0x1ff32
movq 0x227d0(%rip), %rdi # 0x31be0
movq $0x0, 0x227c5(%rip) # 0x31be0
testq %rdi, %rdi
je 0xf42b
movl $0x18, %esi
popq %rax
jmp 0x906c
popq %rax
retq
| _ZN5nglog15ShutdownLoggingEv:
push rax
call _ZN5nglog5tools24ShutdownLoggingUtilitiesEv; nglog::tools::ShutdownLoggingUtilities(void)
call _ZN5nglog14LogDestination21DeleteLogDestinationsEv; nglog::LogDestination::DeleteLogDestinations(void)
lea rdi, _ZN5nglogL24logging_directories_listB5cxx11E; nglog::logging_directories_list
xor esi, esi
call _ZNSt15__uniq_ptr_implISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EESt14default_deleteIS8_EE5resetEPS8_; std::__uniq_ptr_impl<std::vector<std::string>,std::default_delete<std::vector<std::string>>>::reset(std::vector<std::string>*)
mov rdi, cs:_ZN5nglog12_GLOBAL__N_118g_prefix_formatterE; void *
mov cs:_ZN5nglog12_GLOBAL__N_118g_prefix_formatterE, 0; nglog::`anonymous namespace'::g_prefix_formatter
test rdi, rdi
jz short loc_F42B
mov esi, 18h; unsigned __int64
pop rax
jmp _ZdlPvm; operator delete(void *,ulong)
loc_F42B:
pop rax
retn
| void nglog::ShutdownLogging(nglog *this)
{
void *v1; // rdi
nglog::tools::ShutdownLoggingUtilities(this);
nglog::LogDestination::DeleteLogDestinations(this);
std::__uniq_ptr_impl<std::vector<std::string>,std::default_delete<std::vector<std::string>>>::reset(
&nglog::logging_directories_list[abi:cxx11],
0LL);
v1 = nglog::`anonymous namespace'::g_prefix_formatter;
nglog::`anonymous namespace'::g_prefix_formatter = 0LL;
if ( v1 )
operator delete(v1);
}
| ShutdownLogging:
PUSH RAX
CALL 0x0012244b
CALL 0x0010aa8a
LEA RDI,[0x140cf0]
XOR ESI,ESI
CALL 0x0011ff32
MOV RDI,qword ptr [0x00131be0]
MOV qword ptr [0x00131be0],0x0
TEST RDI,RDI
JZ 0x0010f42b
MOV ESI,0x18
POP RAX
JMP 0x0010906c
LAB_0010f42b:
POP RAX
RET
|
/* nglog::ShutdownLogging() */
int8 nglog::ShutdownLogging(void)
{
void *pvVar1;
int8 in_RAX;
int8 extraout_RAX;
tools::ShutdownLoggingUtilities();
LogDestination::DeleteLogDestinations();
std::
__uniq_ptr_impl<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>,std::default_delete<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>
::reset((__uniq_ptr_impl<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>,std::default_delete<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>
*)&logging_directories_list_abi_cxx11_,(vector *)0x0);
pvVar1 = (anonymous_namespace)::g_prefix_formatter;
(anonymous_namespace)::g_prefix_formatter = (void *)0x0;
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,0x18);
return extraout_RAX;
}
return in_RAX;
}
| |
21,243 | ps_fetch_int32 | eloqsql/libmariadb/libmariadb/ma_stmt_codec.c | static
void ps_fetch_int32(MYSQL_BIND *r_param, const MYSQL_FIELD * const field,
unsigned char **row)
{
switch (r_param->buffer_type) {
/* case MYSQL_TYPE_TINY:
ps_fetch_from_1_to_8_bytes(r_param, field, row, 1);
break;
case MYSQL_TYPE_YEAR:
case MYSQL_TYPE_SHORT:
ps_fetch_from_1_to_8_bytes(r_param, field, row, 2);
break; */
case MYSQL_TYPE_INT24:
case MYSQL_TYPE_LONG:
ps_fetch_from_1_to_8_bytes(r_param, field, row, 4);
break;
default:
{
int32 sval= sint4korr(*row);
longlong lval= field->flags & UNSIGNED_FLAG ? (longlong)(uint32) sval : (longlong)sval;
convert_from_long(r_param, field, lval, field->flags & UNSIGNED_FLAG);
(*row) += 4;
}
break;
}
} | O0 | c | ps_fetch_int32:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x60(%rax), %eax
movl %eax, -0x2c(%rbp)
subl $0x3, %eax
je 0x52d4f
jmp 0x52d45
movl -0x2c(%rbp), %eax
subl $0x9, %eax
jne 0x52d6a
jmp 0x52d4f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl $0x4, %ecx
callq 0x519e0
jmp 0x52dfe
movq -0x18(%rbp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x10, %ecx
addl %ecx, %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movzbl 0x3(%rcx), %ecx
movswl %cx, %ecx
shll $0x18, %ecx
addl %ecx, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl 0x64(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x52dc2
movl -0x1c(%rbp), %eax
movq %rax, -0x38(%rbp)
jmp 0x52dca
movslq -0x1c(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x10(%rbp), %rax
movl 0x64(%rax), %eax
andl $0x20, %eax
movsbl %al, %ecx
callq 0x536f0
movq -0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x4, %rcx
movq %rcx, (%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ps_fetch_int32:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov eax, [rax+60h]
mov [rbp+var_2C], eax
sub eax, 3
jz short loc_52D4F
jmp short $+2
loc_52D45:
mov eax, [rbp+var_2C]
sub eax, 9
jnz short loc_52D6A
jmp short $+2
loc_52D4F:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov ecx, 4
call ps_fetch_from_1_to_8_bytes
jmp loc_52DFE
loc_52D6A:
mov rax, [rbp+var_18]
mov rax, [rax]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_18]
mov rcx, [rcx]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
add eax, ecx
mov rcx, [rbp+var_18]
mov rcx, [rcx]
movzx ecx, byte ptr [rcx+2]
shl ecx, 10h
add eax, ecx
mov rcx, [rbp+var_18]
mov rcx, [rcx]
movzx ecx, byte ptr [rcx+3]
movsx ecx, cx
shl ecx, 18h
add eax, ecx
mov [rbp+var_1C], eax
mov rax, [rbp+var_10]
mov eax, [rax+64h]
and eax, 20h
cmp eax, 0
jz short loc_52DC2
mov eax, [rbp+var_1C]
mov [rbp+var_38], rax
jmp short loc_52DCA
loc_52DC2:
movsxd rax, [rbp+var_1C]
mov [rbp+var_38], rax
loc_52DCA:
mov rax, [rbp+var_38]
mov [rbp+var_28], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_28]
mov rax, [rbp+var_10]
mov eax, [rax+64h]
and eax, 20h
movsx ecx, al
call convert_from_long
mov rax, [rbp+var_18]
mov rcx, [rax]
add rcx, 4
mov [rax], rcx
loc_52DFE:
add rsp, 40h
pop rbp
retn
| _BYTE ** ps_fetch_int32(long long a1, long long a2, _BYTE **a3)
{
_BYTE **result; // rax
long long v4; // [rsp+8h] [rbp-38h]
int v5; // [rsp+14h] [rbp-2Ch]
int v6; // [rsp+24h] [rbp-1Ch]
v5 = *(_DWORD *)(a1 + 96);
if ( v5 == 3 || v5 == 9 )
return ps_fetch_from_1_to_8_bytes(a1, a2, a3, 4u);
v6 = ((unsigned __int8)(*a3)[3] << 24)
+ ((unsigned __int8)(*a3)[2] << 16)
+ ((unsigned __int8)(*a3)[1] << 8)
+ (unsigned __int8)**a3;
if ( (*(_DWORD *)(a2 + 100) & 0x20) != 0 )
v4 = (unsigned int)v6;
else
v4 = v6;
convert_from_long(a1, a2, v4, *(_BYTE *)(a2 + 100) & 0x20);
result = a3;
*a3 += 4;
return result;
}
| ps_fetch_int32:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x60]
MOV dword ptr [RBP + -0x2c],EAX
SUB EAX,0x3
JZ 0x00152d4f
JMP 0x00152d45
LAB_00152d45:
MOV EAX,dword ptr [RBP + -0x2c]
SUB EAX,0x9
JNZ 0x00152d6a
JMP 0x00152d4f
LAB_00152d4f:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV ECX,0x4
CALL 0x001519e0
JMP 0x00152dfe
LAB_00152d6a:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x10
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
MOVZX ECX,byte ptr [RCX + 0x3]
MOVSX ECX,CX
SHL ECX,0x18
ADD EAX,ECX
MOV dword ptr [RBP + -0x1c],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x64]
AND EAX,0x20
CMP EAX,0x0
JZ 0x00152dc2
MOV EAX,dword ptr [RBP + -0x1c]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00152dca
LAB_00152dc2:
MOVSXD RAX,dword ptr [RBP + -0x1c]
MOV qword ptr [RBP + -0x38],RAX
LAB_00152dca:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x64]
AND EAX,0x20
MOVSX ECX,AL
CALL 0x001536f0
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX]
ADD RCX,0x4
MOV qword ptr [RAX],RCX
LAB_00152dfe:
ADD RSP,0x40
POP RBP
RET
|
void ps_fetch_int32(long param_1,long param_2,long *param_3)
{
uint uVar1;
ulong local_40;
if ((*(int *)(param_1 + 0x60) == 3) || (*(int *)(param_1 + 0x60) == 9)) {
ps_fetch_from_1_to_8_bytes(param_1,param_2,param_3,4);
}
else {
uVar1 = (uint)*(byte *)*param_3 + (uint)*(byte *)(*param_3 + 1) * 0x100 +
(uint)*(byte *)(*param_3 + 2) * 0x10000 +
(short)(ushort)*(byte *)(*param_3 + 3) * 0x1000000;
if ((*(uint *)(param_2 + 100) & 0x20) == 0) {
local_40 = (ulong)(int)uVar1;
}
else {
local_40 = (ulong)uVar1;
}
convert_from_long(param_1,param_2,local_40,(byte)*(int4 *)(param_2 + 100) & 0x20);
*param_3 = *param_3 + 4;
}
return;
}
| |
21,244 | js__strstart | bluesky950520[P]quickjs/cutils.c | int js__strstart(const char *str, const char *val, const char **ptr)
{
const char *p, *q;
p = str;
q = val;
while (*q != '\0') {
if (*p != *q)
return 0;
p++;
q++;
}
if (ptr)
*ptr = p;
return 1;
} | O2 | c | js__strstart:
movb (%rsi), %al
testb %al, %al
je 0x15b44
cmpb %al, (%rdi)
jne 0x15b50
incq %rdi
incq %rsi
jmp 0x15b32
pushq $0x1
popq %rax
testq %rdx, %rdx
je 0x15b4f
movq %rdi, (%rdx)
retq
xorl %eax, %eax
retq
| js__strstart:
mov al, [rsi]
test al, al
jz short loc_15B44
cmp [rdi], al
jnz short loc_15B50
inc rdi
inc rsi
jmp short js__strstart
loc_15B44:
push 1
pop rax
test rdx, rdx
jz short locret_15B4F
mov [rdx], rdi
locret_15B4F:
retn
loc_15B50:
xor eax, eax
retn
| long long js__strstart(_BYTE *a1, _BYTE *a2, _QWORD *a3)
{
long long result; // rax
while ( *a2 )
{
if ( *a1 != *a2 )
return 0LL;
++a1;
++a2;
}
result = 1LL;
if ( a3 )
*a3 = a1;
return result;
}
| js__strstart:
MOV AL,byte ptr [RSI]
TEST AL,AL
JZ 0x00115b44
CMP byte ptr [RDI],AL
JNZ 0x00115b50
INC RDI
INC RSI
JMP 0x00115b32
LAB_00115b44:
PUSH 0x1
POP RAX
TEST RDX,RDX
JZ 0x00115b4f
MOV qword ptr [RDX],RDI
LAB_00115b4f:
RET
LAB_00115b50:
XOR EAX,EAX
RET
|
int8 js__strstart(char *param_1,char *param_2,int8 *param_3)
{
while( true ) {
if (*param_2 == '\0') {
if (param_3 != (int8 *)0x0) {
*param_3 = param_1;
}
return 1;
}
if (*param_1 != *param_2) break;
param_1 = param_1 + 1;
param_2 = param_2 + 1;
}
return 0;
}
| |
21,245 | flux::parser::Parser::functionType() | kvthweatt[P]FluxLang/src/parser/parser.cpp | std::unique_ptr<TypeExpr> Parser::functionType() {
// Parse parameter types
consume(lexer::TokenType::LEFT_PAREN, "Expected '(' after 'def'");
std::vector<std::unique_ptr<TypeExpr>> parameterTypes;
if (!check(lexer::TokenType::RIGHT_PAREN)) {
do {
parameterTypes.push_back(type());
} while (match(lexer::TokenType::COMMA));
}
consume(lexer::TokenType::RIGHT_PAREN, "Expected ')' after parameter types");
// Parse return type
consume(lexer::TokenType::ARROW, "Expected '->' after parameter types");
auto returnType = type();
return std::make_unique<FunctionTypeExpr>(
std::move(parameterTypes),
std::move(returnType),
makeRange(previous_)
);
} | O0 | cpp | flux::parser::Parser::functionType():
pushq %rbp
movq %rsp, %rbp
subq $0x1f0, %rsp # imm = 0x1F0
movq %rdi, -0x1e8(%rbp)
movq %rdi, %rax
movq %rax, -0x1e0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x1d0(%rbp)
leaq 0xcc25(%rip), %rsi # 0x6528b
leaq -0x80(%rbp), %rdi
callq 0xd130
movq -0x1d0(%rbp), %rsi
movq -0x80(%rbp), %rcx
movq -0x78(%rbp), %r8
leaq -0x70(%rbp), %rdi
movq %rdi, -0x1d8(%rbp)
movl $0x5d, %edx
callq 0x43180
movq -0x1d8(%rbp), %rdi
callq 0xa300
leaq -0x98(%rbp), %rdi
callq 0x22d70
movq -0x1d0(%rbp), %rdi
movl $0x5e, %esi
callq 0x417c0
movb %al, -0x1c1(%rbp)
jmp 0x586c4
movb -0x1c1(%rbp), %al
testb $0x1, %al
jne 0x5876d
jmp 0x586d4
jmp 0x586d6
movq -0x1d0(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
callq 0x4c500
jmp 0x586eb
leaq -0x98(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x22e50
jmp 0x58700
leaq -0xb0(%rbp), %rdi
callq 0x1ea30
movq -0x1d0(%rbp), %rdi
movl $0x59, %esi
callq 0x43060
movb %al, -0x1e9(%rbp)
jmp 0x58725
movb -0x1e9(%rbp), %al
testb $0x1, %al
jne 0x586d6
jmp 0x58731
jmp 0x5876d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
jmp 0x588b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x1ea30
jmp 0x588b4
leaq 0xcb30(%rip), %rsi # 0x652a4
leaq -0x120(%rbp), %rdi
callq 0xd130
movq -0x1d0(%rbp), %rsi
movq -0x120(%rbp), %rcx
movq -0x118(%rbp), %r8
leaq -0x110(%rbp), %rdi
movl $0x5e, %edx
callq 0x43180
jmp 0x587a8
leaq -0x110(%rbp), %rdi
callq 0xa300
leaq 0xcb0c(%rip), %rsi # 0x652c7
leaq -0x190(%rbp), %rdi
callq 0xd130
movq -0x1d0(%rbp), %rsi
movq -0x190(%rbp), %rcx
movq -0x188(%rbp), %r8
leaq -0x180(%rbp), %rdi
movl $0x5a, %edx
callq 0x43180
jmp 0x587ef
leaq -0x180(%rbp), %rdi
callq 0xa300
movq -0x1d0(%rbp), %rsi
leaq -0x198(%rbp), %rdi
callq 0x4c500
jmp 0x58810
movq -0x1d0(%rbp), %rsi
movq %rsi, %rdx
addq $0x68, %rdx
leaq -0x1c0(%rbp), %rdi
callq 0x435d0
jmp 0x5882c
leaq -0x1a0(%rbp), %rdi
leaq -0x98(%rbp), %rsi
leaq -0x198(%rbp), %rdx
leaq -0x1c0(%rbp), %rcx
callq 0x5d7d0
jmp 0x5884f
movq -0x1e8(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0x22f90
leaq -0x1a0(%rbp), %rdi
callq 0x22fe0
leaq -0x198(%rbp), %rdi
callq 0x1ea30
leaq -0x98(%rbp), %rdi
callq 0x23040
movq -0x1e0(%rbp), %rax
addq $0x1f0, %rsp # imm = 0x1F0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x1ea30
leaq -0x98(%rbp), %rdi
callq 0x23040
movq -0xa0(%rbp), %rdi
callq 0x75a0
nopl (%rax)
| _ZN4flux6parser6Parser12functionTypeEv:
push rbp
mov rbp, rsp
sub rsp, 1F0h
mov [rbp+var_1E8], rdi
mov rax, rdi
mov [rbp+var_1E0], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov [rbp+var_1D0], rax
lea rsi, aExpectedAfterD_4; "Expected '(' after 'def'"
lea rdi, [rbp+var_80]
call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*)
mov rsi, [rbp+var_1D0]
mov rcx, [rbp+var_80]
mov r8, [rbp+var_78]
lea rdi, [rbp+var_70]
mov [rbp+var_1D8], rdi
mov edx, 5Dh ; ']'
call _ZN4flux6parser6Parser7consumeENS_5lexer9TokenTypeESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::consume(flux::lexer::TokenType,std::string_view)
mov rdi, [rbp+var_1D8]; this
call _ZN4flux5lexer5TokenD2Ev; flux::lexer::Token::~Token()
lea rdi, [rbp+var_98]
call _ZNSt6vectorISt10unique_ptrIN4flux6parser8TypeExprESt14default_deleteIS3_EESaIS6_EEC2Ev; std::vector<std::unique_ptr<flux::parser::TypeExpr>>::vector(void)
mov rdi, [rbp+var_1D0]
mov esi, 5Eh ; '^'
call _ZNK4flux6parser6Parser5checkENS_5lexer9TokenTypeE; flux::parser::Parser::check(flux::lexer::TokenType)
mov [rbp+var_1C1], al
jmp short $+2
loc_586C4:
mov al, [rbp+var_1C1]
test al, 1
jnz loc_5876D
jmp short $+2
loc_586D4:
jmp short $+2
loc_586D6:
mov rsi, [rbp+var_1D0]
lea rdi, [rbp+var_B0]; this
call _ZN4flux6parser6Parser4typeEv; flux::parser::Parser::type(void)
jmp short $+2
loc_586EB:
lea rdi, [rbp+var_98]
lea rsi, [rbp+var_B0]
call _ZNSt6vectorISt10unique_ptrIN4flux6parser8TypeExprESt14default_deleteIS3_EESaIS6_EE9push_backEOS6_; std::vector<std::unique_ptr<flux::parser::TypeExpr>>::push_back(std::unique_ptr<flux::parser::TypeExpr>&&)
jmp short $+2
loc_58700:
lea rdi, [rbp+var_B0]
call _ZNSt10unique_ptrIN4flux6parser8TypeExprESt14default_deleteIS2_EED2Ev; std::unique_ptr<flux::parser::TypeExpr>::~unique_ptr()
mov rdi, [rbp+var_1D0]
mov esi, 59h ; 'Y'
call _ZN4flux6parser6Parser5matchENS_5lexer9TokenTypeE; flux::parser::Parser::match(flux::lexer::TokenType)
mov [rbp+var_1E9], al
jmp short $+2
loc_58725:
mov al, [rbp+var_1E9]
test al, 1
jnz short loc_586D6
jmp short $+2
loc_58731:
jmp short loc_5876D
mov rcx, rax
mov eax, edx
mov [rbp+var_A0], rcx
mov [rbp+var_A4], eax
jmp loc_588B4
mov rcx, rax
mov eax, edx
mov [rbp+var_A0], rcx
mov [rbp+var_A4], eax
lea rdi, [rbp+var_B0]
call _ZNSt10unique_ptrIN4flux6parser8TypeExprESt14default_deleteIS2_EED2Ev; std::unique_ptr<flux::parser::TypeExpr>::~unique_ptr()
jmp loc_588B4
loc_5876D:
lea rsi, aExpectedAfterP_2; "Expected ')' after parameter types"
lea rdi, [rbp+var_120]
call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*)
mov rsi, [rbp+var_1D0]
mov rcx, [rbp+var_120]
mov r8, [rbp+var_118]
lea rdi, [rbp+var_110]
mov edx, 5Eh ; '^'
call _ZN4flux6parser6Parser7consumeENS_5lexer9TokenTypeESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::consume(flux::lexer::TokenType,std::string_view)
jmp short $+2
loc_587A8:
lea rdi, [rbp+var_110]; this
call _ZN4flux5lexer5TokenD2Ev; flux::lexer::Token::~Token()
lea rsi, aExpectedAfterP_3; "Expected '->' after parameter types"
lea rdi, [rbp+var_190]
call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*)
mov rsi, [rbp+var_1D0]
mov rcx, [rbp+var_190]
mov r8, [rbp+var_188]
lea rdi, [rbp+var_180]
mov edx, 5Ah ; 'Z'
call _ZN4flux6parser6Parser7consumeENS_5lexer9TokenTypeESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::consume(flux::lexer::TokenType,std::string_view)
jmp short $+2
loc_587EF:
lea rdi, [rbp+var_180]; this
call _ZN4flux5lexer5TokenD2Ev; flux::lexer::Token::~Token()
mov rsi, [rbp+var_1D0]
lea rdi, [rbp+var_198]; this
call _ZN4flux6parser6Parser4typeEv; flux::parser::Parser::type(void)
jmp short $+2
loc_58810:
mov rsi, [rbp+var_1D0]; flux::lexer::Token *
mov rdx, rsi
add rdx, 68h ; 'h'
lea rdi, [rbp+var_1C0]; this
call _ZNK4flux6parser6Parser9makeRangeERKNS_5lexer5TokenE; flux::parser::Parser::makeRange(flux::lexer::Token const&)
jmp short $+2
loc_5882C:
lea rdi, [rbp+var_1A0]
lea rsi, [rbp+var_98]
lea rdx, [rbp+var_198]
lea rcx, [rbp+var_1C0]
call _ZSt11make_uniqueIN4flux6parser16FunctionTypeExprEJSt6vectorISt10unique_ptrINS1_8TypeExprESt14default_deleteIS5_EESaIS8_EES8_NS0_6common11SourceRangeEEENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<flux::parser::FunctionTypeExpr,std::vector<std::unique_ptr<flux::parser::TypeExpr>>,std::unique_ptr<flux::parser::TypeExpr>,flux::common::SourceRange>(std::vector<std::unique_ptr<flux::parser::TypeExpr>>,std::unique_ptr<flux::parser::TypeExpr>,flux::common::SourceRange &&)
jmp short $+2
loc_5884F:
mov rdi, [rbp+var_1E8]
lea rsi, [rbp+var_1A0]
call _ZNSt10unique_ptrIN4flux6parser8TypeExprESt14default_deleteIS2_EEC2INS1_16FunctionTypeExprES3_IS7_EvEEOS_IT_T0_E; std::unique_ptr<flux::parser::TypeExpr>::unique_ptr<flux::parser::FunctionTypeExpr,std::default_delete<flux::parser::FunctionTypeExpr>,void>(std::unique_ptr&&<flux::parser::FunctionTypeExpr,std::default_delete<flux::parser::FunctionTypeExpr>>)
lea rdi, [rbp+var_1A0]
call _ZNSt10unique_ptrIN4flux6parser16FunctionTypeExprESt14default_deleteIS2_EED2Ev; std::unique_ptr<flux::parser::FunctionTypeExpr>::~unique_ptr()
lea rdi, [rbp+var_198]
call _ZNSt10unique_ptrIN4flux6parser8TypeExprESt14default_deleteIS2_EED2Ev; std::unique_ptr<flux::parser::TypeExpr>::~unique_ptr()
lea rdi, [rbp+var_98]
call _ZNSt6vectorISt10unique_ptrIN4flux6parser8TypeExprESt14default_deleteIS3_EESaIS6_EED2Ev; std::vector<std::unique_ptr<flux::parser::TypeExpr>>::~vector()
mov rax, [rbp+var_1E0]
add rsp, 1F0h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_A0], rcx
mov [rbp+var_A4], eax
lea rdi, [rbp+var_198]
call _ZNSt10unique_ptrIN4flux6parser8TypeExprESt14default_deleteIS2_EED2Ev; std::unique_ptr<flux::parser::TypeExpr>::~unique_ptr()
loc_588B4:
lea rdi, [rbp+var_98]
call _ZNSt6vectorISt10unique_ptrIN4flux6parser8TypeExprESt14default_deleteIS3_EESaIS6_EED2Ev; std::vector<std::unique_ptr<flux::parser::TypeExpr>>::~vector()
mov rdi, [rbp+var_A0]
call __Unwind_Resume
| flux::parser::Parser * flux::parser::Parser::functionType(flux::parser::Parser *this, _BYTE *a2)
{
_BYTE v3[32]; // [rsp+30h] [rbp-1C0h] BYREF
_BYTE v4[8]; // [rsp+50h] [rbp-1A0h] BYREF
_BYTE v5[8]; // [rsp+58h] [rbp-198h] BYREF
long long v6[2]; // [rsp+60h] [rbp-190h] BYREF
_BYTE v7[96]; // [rsp+70h] [rbp-180h] BYREF
long long v8[2]; // [rsp+D0h] [rbp-120h] BYREF
_BYTE v9[96]; // [rsp+E0h] [rbp-110h] BYREF
_BYTE v10[12]; // [rsp+140h] [rbp-B0h] BYREF
long long v11[3]; // [rsp+158h] [rbp-98h] BYREF
long long v12[2]; // [rsp+170h] [rbp-80h] BYREF
_BYTE v13[96]; // [rsp+180h] [rbp-70h] BYREF
_BYTE *v14; // [rsp+1E0h] [rbp-10h]
flux::parser::Parser *v15; // [rsp+1E8h] [rbp-8h]
v15 = this;
v14 = a2;
std::string_view::basic_string_view(v12, (long long)"Expected '(' after 'def'");
flux::parser::Parser::consume((flux::parser::Parser *)v13, a2, 93, v12[0], v12[1]);
flux::lexer::Token::~Token((flux::lexer::Token *)v13);
std::vector<std::unique_ptr<flux::parser::TypeExpr>>::vector((long long)v11);
if ( !flux::parser::Parser::check((long long)a2, 94) )
{
do
{
flux::parser::Parser::type((flux::parser::Parser *)v10, (long long)a2);
std::vector<std::unique_ptr<flux::parser::TypeExpr>>::push_back((long long)v11, (long long)v10);
std::unique_ptr<flux::parser::TypeExpr>::~unique_ptr((long long)v10);
}
while ( (flux::parser::Parser::match((long long)a2, 89) & 1) != 0 );
}
std::string_view::basic_string_view(v8, (long long)"Expected ')' after parameter types");
flux::parser::Parser::consume((flux::parser::Parser *)v9, a2, 94, v8[0], v8[1]);
flux::lexer::Token::~Token((flux::lexer::Token *)v9);
std::string_view::basic_string_view(v6, (long long)"Expected '->' after parameter types");
flux::parser::Parser::consume((flux::parser::Parser *)v7, a2, 90, v6[0], v6[1]);
flux::lexer::Token::~Token((flux::lexer::Token *)v7);
flux::parser::Parser::type((flux::parser::Parser *)v5, (long long)a2);
flux::parser::Parser::makeRange(
(flux::parser::Parser *)v3,
(const flux::lexer::Token *)a2,
(flux::lexer::Token *)(a2 + 104));
std::make_unique<flux::parser::FunctionTypeExpr,std::vector<std::unique_ptr<flux::parser::TypeExpr>>,std::unique_ptr<flux::parser::TypeExpr>,flux::common::SourceRange>(
v4,
v11,
v5,
v3);
std::unique_ptr<flux::parser::TypeExpr>::unique_ptr<flux::parser::FunctionTypeExpr,std::default_delete<flux::parser::FunctionTypeExpr>,void>(
(long long)this,
(long long)v4);
std::unique_ptr<flux::parser::FunctionTypeExpr>::~unique_ptr((long long)v4);
std::unique_ptr<flux::parser::TypeExpr>::~unique_ptr((long long)v5);
std::vector<std::unique_ptr<flux::parser::TypeExpr>>::~vector(v11);
return this;
}
| functionType:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x1f0
MOV qword ptr [RBP + -0x1e8],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x1e0],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x1d0],RAX
LEA RSI,[0x16528b]
LEA RDI,[RBP + -0x80]
CALL 0x0010d130
MOV RSI,qword ptr [RBP + -0x1d0]
MOV RCX,qword ptr [RBP + -0x80]
MOV R8,qword ptr [RBP + -0x78]
LEA RDI,[RBP + -0x70]
MOV qword ptr [RBP + -0x1d8],RDI
MOV EDX,0x5d
CALL 0x00143180
MOV RDI,qword ptr [RBP + -0x1d8]
CALL 0x0010a300
LEA RDI,[RBP + -0x98]
CALL 0x00122d70
MOV RDI,qword ptr [RBP + -0x1d0]
LAB_001586b2:
MOV ESI,0x5e
CALL 0x001417c0
MOV byte ptr [RBP + -0x1c1],AL
JMP 0x001586c4
LAB_001586c4:
MOV AL,byte ptr [RBP + -0x1c1]
TEST AL,0x1
JNZ 0x0015876d
JMP 0x001586d4
LAB_001586d4:
JMP 0x001586d6
LAB_001586d6:
MOV RSI,qword ptr [RBP + -0x1d0]
LEA RDI,[RBP + -0xb0]
CALL 0x0014c500
JMP 0x001586eb
LAB_001586eb:
LEA RDI,[RBP + -0x98]
LEA RSI,[RBP + -0xb0]
CALL 0x00122e50
JMP 0x00158700
LAB_00158700:
LEA RDI,[RBP + -0xb0]
CALL 0x0011ea30
LAB_0015870c:
MOV RDI,qword ptr [RBP + -0x1d0]
MOV ESI,0x59
CALL 0x00143060
MOV byte ptr [RBP + -0x1e9],AL
JMP 0x00158725
LAB_00158725:
MOV AL,byte ptr [RBP + -0x1e9]
TEST AL,0x1
JNZ 0x001586d6
JMP 0x00158731
LAB_00158731:
JMP 0x0015876d
LAB_0015876d:
LEA RSI,[0x1652a4]
LEA RDI,[RBP + -0x120]
CALL 0x0010d130
MOV RSI,qword ptr [RBP + -0x1d0]
MOV RCX,qword ptr [RBP + -0x120]
MOV R8,qword ptr [RBP + -0x118]
LEA RDI,[RBP + -0x110]
MOV EDX,0x5e
CALL 0x00143180
JMP 0x001587a8
LAB_001587a8:
LEA RDI,[RBP + -0x110]
CALL 0x0010a300
LEA RSI,[0x1652c7]
LEA RDI,[RBP + -0x190]
CALL 0x0010d130
MOV RSI,qword ptr [RBP + -0x1d0]
MOV RCX,qword ptr [RBP + -0x190]
MOV R8,qword ptr [RBP + -0x188]
LEA RDI,[RBP + -0x180]
MOV EDX,0x5a
CALL 0x00143180
JMP 0x001587ef
LAB_001587ef:
LEA RDI,[RBP + -0x180]
CALL 0x0010a300
MOV RSI,qword ptr [RBP + -0x1d0]
LEA RDI,[RBP + -0x198]
CALL 0x0014c500
JMP 0x00158810
LAB_00158810:
MOV RSI,qword ptr [RBP + -0x1d0]
MOV RDX,RSI
ADD RDX,0x68
LAB_0015881e:
LEA RDI,[RBP + -0x1c0]
CALL 0x001435d0
JMP 0x0015882c
LAB_0015882c:
LEA RDI,[RBP + -0x1a0]
LEA RSI,[RBP + -0x98]
LEA RDX,[RBP + -0x198]
LEA RCX,[RBP + -0x1c0]
CALL 0x0015d7d0
LAB_0015884d:
JMP 0x0015884f
LAB_0015884f:
MOV RDI,qword ptr [RBP + -0x1e8]
LEA RSI,[RBP + -0x1a0]
CALL 0x00122f90
LEA RDI,[RBP + -0x1a0]
CALL 0x00122fe0
LEA RDI,[RBP + -0x198]
CALL 0x0011ea30
LEA RDI,[RBP + -0x98]
CALL 0x00123040
MOV RAX,qword ptr [RBP + -0x1e0]
ADD RSP,0x1f0
POP RBP
RET
|
/* flux::parser::Parser::functionType() */
unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>> *
flux::parser::Parser::functionType(void)
{
byte bVar1;
Parser *in_RSI;
unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>> *in_RDI;
Token local_1c8 [32];
vector local_1a8 [8];
SourceRange local_1a0 [8];
int8 local_198;
int8 local_190;
Token local_188 [96];
int8 local_128;
int8 local_120;
Token local_118 [96];
unique_ptr local_b8 [24];
vector<std::unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>>,std::allocator<std::unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>>>>
local_a0 [24];
int8 local_88;
int8 local_80;
Token local_78 [112];
std::basic_string_view<char,std::char_traits<char>>::basic_string_view
((basic_string_view<char,std::char_traits<char>> *)&local_88,
"Expected \'(\' after \'def\'");
consume(local_78,in_RSI,0x5d,local_88,local_80);
lexer::Token::~Token(local_78);
std::
vector<std::unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>>,std::allocator<std::unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>>>>
::vector(local_a0);
/* try { // try from 001586b2 to 001586e8 has its CatchHandler @ 00158733 */
bVar1 = check(in_RSI,0x5e);
if ((bVar1 & 1) == 0) {
do {
type();
/* try { // try from 001586eb to 001586fd has its CatchHandler @ 0015874a */
std::
vector<std::unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>>,std::allocator<std::unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>>>>
::push_back(local_a0,local_b8);
std::unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>>::
~unique_ptr((unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>> *)
local_b8);
/* try { // try from 0015870c to 0015880d has its CatchHandler @ 00158733 */
bVar1 = match(in_RSI,0x59);
} while ((bVar1 & 1) != 0);
}
std::basic_string_view<char,std::char_traits<char>>::basic_string_view
((basic_string_view<char,std::char_traits<char>> *)&local_128,
"Expected \')\' after parameter types");
consume(local_118,in_RSI,0x5e,local_128,local_120);
lexer::Token::~Token(local_118);
std::basic_string_view<char,std::char_traits<char>>::basic_string_view
((basic_string_view<char,std::char_traits<char>> *)&local_198,
"Expected \'->\' after parameter types");
consume(local_188,in_RSI,0x5a,local_198,local_190);
lexer::Token::~Token(local_188);
type();
/* try { // try from 0015881e to 0015884c has its CatchHandler @ 00158896 */
makeRange(local_1c8);
std::
make_unique<flux::parser::FunctionTypeExpr,std::vector<std::unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>>,std::allocator<std::unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>>>>,std::unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>>,flux::common::SourceRange>
(local_1a8,(unique_ptr *)local_a0,local_1a0);
std::unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>>::
unique_ptr<flux::parser::FunctionTypeExpr,std::default_delete<flux::parser::FunctionTypeExpr>,void>
(in_RDI,(unique_ptr *)local_1a8);
std::
unique_ptr<flux::parser::FunctionTypeExpr,std::default_delete<flux::parser::FunctionTypeExpr>>::
~unique_ptr((unique_ptr<flux::parser::FunctionTypeExpr,std::default_delete<flux::parser::FunctionTypeExpr>>
*)local_1a8);
std::unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>>::~unique_ptr
((unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>> *)
local_1a0);
std::
vector<std::unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>>,std::allocator<std::unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>>>>
::~vector(local_a0);
return in_RDI;
}
| |
21,246 | fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender>(fmt::v10::appender, fmt::v10::basic_string_view<char>, fmt::v10::format_specs<char> const&) | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h | FMT_CONSTEXPR auto write(OutputIt out, basic_string_view<Char> s,
const format_specs<Char>& specs) -> OutputIt {
auto data = s.data();
auto size = s.size();
if (specs.precision >= 0 && to_unsigned(specs.precision) < size)
size = code_point_index(s, to_unsigned(specs.precision));
bool is_debug = specs.type == presentation_type::debug;
size_t width = 0;
if (specs.width != 0) {
if (is_debug)
width = write_escaped_string(counting_iterator{}, s).count();
else
width = compute_width(basic_string_view<Char>(data, size));
}
return write_padded(out, specs, size, width,
[=](reserve_iterator<OutputIt> it) {
if (is_debug) return write_escaped_string(it, s);
return copy_str<Char>(data, data + size, it);
});
} | O0 | c | fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender>(fmt::v10::appender, fmt::v10::basic_string_view<char>, fmt::v10::format_specs<char> const&):
subq $0xb8, %rsp
movq %rdi, 0xa8(%rsp)
movq %rsi, 0x98(%rsp)
movq %rdx, 0xa0(%rsp)
movq %rcx, 0x90(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x24d70
movq %rax, 0x88(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x24d80
movq %rax, 0x80(%rsp)
movq 0x90(%rsp), %rax
cmpl $0x0, 0x4(%rax)
jl 0xebf60
movq 0x90(%rsp), %rax
movl 0x4(%rax), %edi
callq 0xc7930
movl %eax, %eax
cmpq 0x80(%rsp), %rax
jae 0xebf60
movq 0x98(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x90(%rsp), %rax
movl 0x4(%rax), %edi
callq 0xc7930
movl %eax, %eax
movl %eax, %edx
movq 0x70(%rsp), %rdi
movq 0x78(%rsp), %rsi
callq 0xec0a0
movq %rax, 0x80(%rsp)
movq 0x90(%rsp), %rax
cmpb $0x12, 0x8(%rax)
sete %al
andb $0x1, %al
movb %al, 0x6f(%rsp)
movq $0x0, 0x60(%rsp)
movq 0x90(%rsp), %rax
cmpl $0x0, (%rax)
je 0xec014
testb $0x1, 0x6f(%rsp)
je 0xebfe4
leaq 0x50(%rsp), %rdi
callq 0xec2a0
movq 0x98(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
callq 0xec140
movq %rax, 0x58(%rsp)
leaq 0x58(%rsp), %rdi
callq 0xec2c0
movq %rax, 0x60(%rsp)
jmp 0xec012
movq 0x88(%rsp), %rsi
movq 0x80(%rsp), %rdx
leaq 0x30(%rsp), %rdi
callq 0x243f0
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0xec2d0
movq %rax, 0x60(%rsp)
jmp 0xec014
movq 0xa8(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x90(%rsp), %rsi
movq 0x80(%rsp), %rdx
movq 0x60(%rsp), %rcx
movb 0x6f(%rsp), %al
andb $0x1, %al
movb %al, (%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rdi
movq %rsp, %r8
callq 0xec330
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
addq $0xb8, %rsp
retq
nopl (%rax,%rax)
| _ZN3fmt3v106detail5writeIcNS0_8appenderEEET0_S4_NS0_17basic_string_viewIT_EERKNS0_12format_specsIS6_EE:
sub rsp, 0B8h
mov [rsp+0B8h+var_10], rdi
mov [rsp+0B8h+var_20], rsi
mov [rsp+0B8h+var_18], rdx
mov [rsp+0B8h+var_28], rcx
lea rdi, [rsp+0B8h+var_20]
call _ZNK3fmt3v1017basic_string_viewIcE4dataEv; fmt::v10::basic_string_view<char>::data(void)
mov [rsp+0B8h+var_30], rax
lea rdi, [rsp+0B8h+var_20]
call _ZNK3fmt3v1017basic_string_viewIcE4sizeEv; fmt::v10::basic_string_view<char>::size(void)
mov [rsp+0B8h+var_38], rax
mov rax, [rsp+0B8h+var_28]
cmp dword ptr [rax+4], 0
jl short loc_EBF60
mov rax, [rsp+0B8h+var_28]
mov edi, [rax+4]
call _ZN3fmt3v106detail11to_unsignedIiEENSt13make_unsignedIT_E4typeES4_; fmt::v10::detail::to_unsigned<int>(int)
mov eax, eax
cmp rax, [rsp+0B8h+var_38]
jnb short loc_EBF60
mov rax, [rsp+0B8h+var_20]
mov [rsp+0B8h+var_48], rax
mov rax, [rsp+0B8h+var_18]
mov [rsp+0B8h+var_40], rax
mov rax, [rsp+0B8h+var_28]
mov edi, [rax+4]
call _ZN3fmt3v106detail11to_unsignedIiEENSt13make_unsignedIT_E4typeES4_; fmt::v10::detail::to_unsigned<int>(int)
mov eax, eax
mov edx, eax
mov rdi, [rsp+0B8h+var_48]
mov rsi, [rsp+0B8h+var_40]
call _ZN3fmt3v106detail16code_point_indexENS0_17basic_string_viewIcEEm; fmt::v10::detail::code_point_index(fmt::v10::basic_string_view<char>,ulong)
mov [rsp+0B8h+var_38], rax
loc_EBF60:
mov rax, [rsp+0B8h+var_28]
cmp byte ptr [rax+8], 12h
setz al
and al, 1
mov [rsp+0B8h+var_49], al
mov [rsp+0B8h+var_58], 0
mov rax, [rsp+0B8h+var_28]
cmp dword ptr [rax], 0
jz loc_EC014
test [rsp+0B8h+var_49], 1
jz short loc_EBFE4
lea rdi, [rsp+0B8h+var_68]; this
call _ZN3fmt3v106detail17counting_iteratorC2Ev; fmt::v10::detail::counting_iterator::counting_iterator(void)
mov rax, [rsp+0B8h+var_20]
mov [rsp+0B8h+var_78], rax
mov rax, [rsp+0B8h+var_18]
mov [rsp+0B8h+var_70], rax
mov rdi, [rsp+0B8h+var_68]
mov rsi, [rsp+0B8h+var_78]
mov rdx, [rsp+0B8h+var_70]
call _ZN3fmt3v106detail20write_escaped_stringIcNS1_17counting_iteratorEEET0_S4_NS0_17basic_string_viewIT_EE; fmt::v10::detail::write_escaped_string<char,fmt::v10::detail::counting_iterator>(fmt::v10::detail::counting_iterator,fmt::v10::basic_string_view<char>)
mov [rsp+0B8h+var_60], rax
lea rdi, [rsp+0B8h+var_60]; this
call _ZNK3fmt3v106detail17counting_iterator5countEv; fmt::v10::detail::counting_iterator::count(void)
mov [rsp+0B8h+var_58], rax
jmp short loc_EC012
loc_EBFE4:
mov rsi, [rsp+0B8h+var_30]
mov rdx, [rsp+0B8h+var_38]
lea rdi, [rsp+0B8h+var_88]
call _ZN3fmt3v1017basic_string_viewIcEC2EPKcm; fmt::v10::basic_string_view<char>::basic_string_view(char const*,ulong)
mov rdi, [rsp+0B8h+var_88]
mov rsi, [rsp+0B8h+var_80]
call _ZN3fmt3v106detail13compute_widthENS0_17basic_string_viewIcEE; fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)
mov [rsp+0B8h+var_58], rax
loc_EC012:
jmp short $+2
loc_EC014:
mov rax, [rsp+0B8h+var_10]
mov [rsp+0B8h+var_90], rax
mov rsi, [rsp+0B8h+var_28]
mov rdx, [rsp+0B8h+var_38]
mov rcx, [rsp+0B8h+var_58]
mov al, [rsp+0B8h+var_49]
and al, 1
mov [rsp+0B8h+var_B8], al
mov rax, [rsp+0B8h+var_20]
mov [rsp+0B8h+var_B0], rax
mov rax, [rsp+0B8h+var_18]
mov [rsp+0B8h+var_A8], rax
mov rax, [rsp+0B8h+var_30]
mov [rsp+0B8h+var_A0], rax
mov rax, [rsp+0B8h+var_38]
mov [rsp+0B8h+var_98], rax
mov rdi, [rsp+0B8h+var_90]
mov r8, rsp
call _ZN3fmt3v106detail12write_paddedILNS0_5align4typeE1ENS0_8appenderEcZNS1_5writeIcS5_EET0_S7_NS0_17basic_string_viewIT_EERKNS0_12format_specsIS9_EEEUlS5_E_EES7_S7_RKNSB_IT1_EEmmOT2_; fmt::v10::detail::write_padded<(fmt::v10::align::type)1,fmt::v10::appender,char,fmt::v10::detail::write<char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char> const&)::{lambda(fmt::v10::appender)#1}>(fmt::v10::appender,fmt::v10::format_specs<char> const&,ulong,ulong,fmt::v10::detail::write<char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char> const&)::{lambda(fmt::v10::appender)#1} &&)
mov [rsp+0B8h+var_8], rax
mov rax, [rsp+0B8h+var_8]
add rsp, 0B8h
retn
| long long fmt::v10::detail::write<char,fmt::v10::appender>(long long a1, long long a2, long long a3, long long a4)
{
unsigned int v4; // eax
bool v6[8]; // [rsp+0h] [rbp-B8h] BYREF
long long v7; // [rsp+8h] [rbp-B0h]
long long v8; // [rsp+10h] [rbp-A8h]
long long v9; // [rsp+18h] [rbp-A0h]
unsigned long long v10; // [rsp+20h] [rbp-98h]
long long v11; // [rsp+28h] [rbp-90h]
_QWORD v12[4]; // [rsp+30h] [rbp-88h] BYREF
long long v13; // [rsp+50h] [rbp-68h] BYREF
long long v14; // [rsp+58h] [rbp-60h] BYREF
long long v15; // [rsp+60h] [rbp-58h]
bool v16; // [rsp+6Fh] [rbp-49h]
long long v17; // [rsp+70h] [rbp-48h]
long long v18; // [rsp+78h] [rbp-40h]
unsigned long long v19; // [rsp+80h] [rbp-38h]
long long v20; // [rsp+88h] [rbp-30h]
long long v21; // [rsp+90h] [rbp-28h]
long long v22; // [rsp+98h] [rbp-20h] BYREF
long long v23; // [rsp+A0h] [rbp-18h]
long long v24; // [rsp+A8h] [rbp-10h]
v24 = a1;
v22 = a2;
v23 = a3;
v21 = a4;
v20 = fmt::v10::basic_string_view<char>::data((long long)&v22);
v19 = fmt::v10::basic_string_view<char>::size((long long)&v22);
if ( *(int *)(v21 + 4) >= 0 && (unsigned int)fmt::v10::detail::to_unsigned<int>(*(_DWORD *)(v21 + 4)) < v19 )
{
v17 = v22;
v18 = v23;
v4 = fmt::v10::detail::to_unsigned<int>(*(_DWORD *)(v21 + 4));
v19 = fmt::v10::detail::code_point_index(v17, v18, v4);
}
v16 = *(_BYTE *)(v21 + 8) == 18;
v15 = 0LL;
if ( *(_DWORD *)v21 )
{
if ( v16 )
{
fmt::v10::detail::counting_iterator::counting_iterator((fmt::v10::detail::counting_iterator *)&v13);
v12[2] = v22;
v12[3] = v23;
v14 = fmt::v10::detail::write_escaped_string<char,fmt::v10::detail::counting_iterator>(v13, v22, v23);
v15 = fmt::v10::detail::counting_iterator::count((fmt::v10::detail::counting_iterator *)&v14);
}
else
{
fmt::v10::basic_string_view<char>::basic_string_view(v12, v20, v19);
v15 = fmt::v10::detail::compute_width(v12[0], v12[1]);
}
}
v11 = v24;
v6[0] = v16;
v7 = v22;
v8 = v23;
v9 = v20;
v10 = v19;
return ((long long ( *)(long long, long long, unsigned long long, long long, bool *))fmt::v10::detail::write_padded<(fmt::v10::align::type)1,fmt::v10::appender,char,fmt::v10::appender fmt::v10::detail::write<char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char> const&)::{lambda(fmt::v10::appender)#1}>)(
v24,
v21,
v19,
v15,
v6);
}
| write<char,fmt::v10::appender>:
SUB RSP,0xb8
MOV qword ptr [RSP + 0xa8],RDI
MOV qword ptr [RSP + 0x98],RSI
MOV qword ptr [RSP + 0xa0],RDX
MOV qword ptr [RSP + 0x90],RCX
LEA RDI,[RSP + 0x98]
CALL 0x00124d70
MOV qword ptr [RSP + 0x88],RAX
LEA RDI,[RSP + 0x98]
CALL 0x00124d80
MOV qword ptr [RSP + 0x80],RAX
MOV RAX,qword ptr [RSP + 0x90]
CMP dword ptr [RAX + 0x4],0x0
JL 0x001ebf60
MOV RAX,qword ptr [RSP + 0x90]
MOV EDI,dword ptr [RAX + 0x4]
CALL 0x001c7930
MOV EAX,EAX
CMP RAX,qword ptr [RSP + 0x80]
JNC 0x001ebf60
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x78],RAX
MOV RAX,qword ptr [RSP + 0x90]
MOV EDI,dword ptr [RAX + 0x4]
CALL 0x001c7930
MOV EAX,EAX
MOV EDX,EAX
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x78]
CALL 0x001ec0a0
MOV qword ptr [RSP + 0x80],RAX
LAB_001ebf60:
MOV RAX,qword ptr [RSP + 0x90]
CMP byte ptr [RAX + 0x8],0x12
SETZ AL
AND AL,0x1
MOV byte ptr [RSP + 0x6f],AL
MOV qword ptr [RSP + 0x60],0x0
MOV RAX,qword ptr [RSP + 0x90]
CMP dword ptr [RAX],0x0
JZ 0x001ec014
TEST byte ptr [RSP + 0x6f],0x1
JZ 0x001ebfe4
LEA RDI,[RSP + 0x50]
CALL 0x001ec2a0
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x48],RAX
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x48]
CALL 0x001ec140
MOV qword ptr [RSP + 0x58],RAX
LEA RDI,[RSP + 0x58]
CALL 0x001ec2c0
MOV qword ptr [RSP + 0x60],RAX
JMP 0x001ec012
LAB_001ebfe4:
MOV RSI,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x80]
LEA RDI,[RSP + 0x30]
CALL 0x001243f0
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x001ec2d0
MOV qword ptr [RSP + 0x60],RAX
LAB_001ec012:
JMP 0x001ec014
LAB_001ec014:
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0x28],RAX
MOV RSI,qword ptr [RSP + 0x90]
MOV RDX,qword ptr [RSP + 0x80]
MOV RCX,qword ptr [RSP + 0x60]
MOV AL,byte ptr [RSP + 0x6f]
AND AL,0x1
MOV byte ptr [RSP],AL
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x28]
MOV R8,RSP
CALL 0x001ec330
MOV qword ptr [RSP + 0xb0],RAX
MOV RAX,qword ptr [RSP + 0xb0]
ADD RSP,0xb8
RET
|
/* fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender>(fmt::v10::appender,
fmt::v10::basic_string_view<char>, fmt::v10::format_specs<char> const&) */
int8 __thiscall
fmt::v10::detail::write<char,fmt::v10::appender>
(detail *this,int8 param_2,int8 param_3,int *param_4)
{
uint uVar1;
int4 uVar2;
int8 uVar3;
byte local_b8 [8];
int8 local_b0;
int8 local_a8;
char *local_a0;
ulong local_98;
detail *local_90;
detail *local_88;
int8 local_80;
int8 local_78;
int8 local_70;
detail *local_68;
int8 local_60;
int8 local_58;
byte local_49;
int8 local_48;
int8 local_40;
ulong local_38;
char *local_30;
int *local_28;
int8 local_20;
int8 local_18;
detail *local_10;
local_28 = param_4;
local_20 = param_2;
local_18 = param_3;
local_10 = this;
local_30 = (char *)basic_string_view<char>::data((basic_string_view<char> *)&local_20);
local_38 = basic_string_view<char>::size((basic_string_view<char> *)&local_20);
if ((-1 < local_28[1]) && (uVar1 = to_unsigned<int>(local_28[1]), uVar1 < local_38)) {
local_48 = local_20;
local_40 = local_18;
uVar2 = to_unsigned<int>(local_28[1]);
local_38 = code_point_index(local_48,local_40,uVar2);
}
local_49 = (char)local_28[2] == '\x12';
local_58 = 0;
if (*local_28 != 0) {
if ((bool)local_49) {
counting_iterator::counting_iterator((counting_iterator *)&local_68);
local_78 = local_20;
local_70 = local_18;
local_60 = write_escaped_string<char,fmt::v10::detail::counting_iterator>
(local_68,local_20,local_18);
local_58 = counting_iterator::count((counting_iterator *)&local_60);
}
else {
basic_string_view<char>::basic_string_view
((basic_string_view<char> *)&local_88,local_30,local_38);
local_58 = compute_width(local_88,local_80);
}
}
local_90 = local_10;
local_b8[0] = local_49 & 1;
local_b0 = local_20;
local_a8 = local_18;
local_a0 = local_30;
local_98 = local_38;
uVar3 = write_padded<(fmt::v10::align::type)1,fmt::v10::appender,char,fmt::v10::detail::write<char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char>const&)::_lambda(fmt::v10::appender)_1_>
(local_10,local_28,local_38,local_58,local_b8);
return uVar3;
}
| |
21,247 | parser_parse_and_or | tsotchke[P]eshkol/src/frontend/parser/parser_conditionals.c | AstNode* parser_parse_and_or(Parser* parser, AstNodeType type, size_t line, size_t column) {
// Parse the expressions
size_t expr_count = 0;
AstNode** exprs = arena_alloc(parser->arena, sizeof(AstNode*) * 16); // Arbitrary initial capacity
if (!exprs) {
parser_error(parser, "Failed to allocate memory for expressions");
return NULL;
}
while (!parser_check(parser, TOKEN_RPAREN) && !parser_is_at_end(parser)) {
if (expr_count >= 16) {
parser_error(parser, "Too many expressions in and/or");
return NULL;
}
AstNode* expr = parser_parse_expression(parser);
if (!expr) {
parser_error(parser, "Expected expression");
return NULL;
}
exprs[expr_count++] = expr;
}
// Consume the closing parenthesis
parser_consume(parser, TOKEN_RPAREN, "Expected ')' after and/or");
// Create an and or or node
if (type == AST_AND) {
return ast_create_and(parser->arena, exprs, expr_count, line, column);
} else {
return ast_create_or(parser->arena, exprs, expr_count, line, column);
}
} | O2 | c | parser_parse_and_or:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
movq (%rdi), %rdi
movl $0x80, %esi
callq 0x2fb9
testq %rax, %rax
je 0x65e4
movq %rax, %r12
movq %rbx, (%rsp)
xorl %r13d, %r13d
pushq $0x2
popq %rbx
movq %r15, %rdi
movl %ebx, %esi
callq 0x56a1
testb %al, %al
jne 0x65ed
movq %r15, %rdi
callq 0x56b1
testb %al, %al
jne 0x65ed
cmpq $0x10, %r13
je 0x663e
movq %r15, %rdi
callq 0x5908
testq %rax, %rax
je 0x6647
movq %rax, (%r12,%r13,8)
incq %r13
jmp 0x65ae
leaq 0x12882(%rip), %rsi # 0x18e6d
jmp 0x664e
leaq 0x128c2(%rip), %rdx # 0x18eb6
pushq $0x2
popq %rsi
movq %r15, %rdi
callq 0x56d7
movq (%r15), %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
cmpl $0x10, %ebp
jne 0x6627
movq (%rsp), %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9cc8
movq (%rsp), %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9cf5
leaq 0x12852(%rip), %rsi # 0x18e97
jmp 0x664e
leaq 0x124a8(%rip), %rsi # 0x18af6
movq %r15, %rdi
callq 0x58b0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| parser_parse_and_or:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rcx
mov r14, rdx
mov ebp, esi
mov r15, rdi
mov rdi, [rdi]
mov esi, 80h
call arena_alloc
test rax, rax
jz short loc_65E4
mov r12, rax
mov [rsp+38h+var_38], rbx
xor r13d, r13d
push 2
pop rbx
loc_65AE:
mov rdi, r15
mov esi, ebx
call parser_check
test al, al
jnz short loc_65ED
mov rdi, r15
call parser_is_at_end
test al, al
jnz short loc_65ED
cmp r13, 10h
jz short loc_663E
mov rdi, r15
call parser_parse_expression
test rax, rax
jz short loc_6647
mov [r12+r13*8], rax
inc r13
jmp short loc_65AE
loc_65E4:
lea rsi, aFailedToAlloca_3; "Failed to allocate memory for expressio"...
jmp short loc_664E
loc_65ED:
lea rdx, aExpectedAfterA_0; "Expected ')' after and/or"
push 2
pop rsi
mov rdi, r15
call parser_consume
mov rdi, [r15]
mov rsi, r12
mov rdx, r13
mov rcx, r14
cmp ebp, 10h
jnz short loc_6627
mov r8, [rsp+38h+var_38]
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp ast_create_and
loc_6627:
mov r8, [rsp+38h+var_38]
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp ast_create_or
loc_663E:
lea rsi, aTooManyExpress_0; "Too many expressions in and/or"
jmp short loc_664E
loc_6647:
lea rsi, aExpectedExpres; "Expected expression"
loc_664E:
mov rdi, r15
call parser_error
xor eax, eax
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long parser_parse_and_or(long long *a1, int a2, long long a3, long long a4)
{
long long v6; // rax
long long v7; // rdx
long long v8; // rcx
long long v9; // r8
long long v10; // r9
long long v11; // r12
long long v12; // r13
long long v13; // rax
const char *v14; // rsi
long long v15; // rdi
v6 = arena_alloc(*a1, 128LL);
if ( v6 )
{
v11 = v6;
v12 = 0LL;
while ( !parser_check((long long)a1, 2) && !parser_is_at_end((long long)a1) )
{
if ( v12 == 16 )
{
v14 = "Too many expressions in and/or";
goto LABEL_14;
}
v13 = parser_parse_expression((long long)a1);
if ( !v13 )
{
v14 = "Expected expression";
goto LABEL_14;
}
*(_QWORD *)(v11 + 8 * v12++) = v13;
}
parser_consume((long long)a1, 2, (long long)"Expected ')' after and/or");
v15 = *a1;
if ( a2 == 16 )
return ast_create_and(v15, v11, v12, a3, a4);
else
return ast_create_or(v15, v11, v12, a3, a4);
}
else
{
v14 = "Failed to allocate memory for expressions";
LABEL_14:
parser_error((long long)a1, (long long)v14, v7, v8, v9, v10);
return 0LL;
}
}
| parser_parse_and_or:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RCX
MOV R14,RDX
MOV EBP,ESI
MOV R15,RDI
MOV RDI,qword ptr [RDI]
MOV ESI,0x80
CALL 0x00102fb9
TEST RAX,RAX
JZ 0x001065e4
MOV R12,RAX
MOV qword ptr [RSP],RBX
XOR R13D,R13D
PUSH 0x2
POP RBX
LAB_001065ae:
MOV RDI,R15
MOV ESI,EBX
CALL 0x001056a1
TEST AL,AL
JNZ 0x001065ed
MOV RDI,R15
CALL 0x001056b1
TEST AL,AL
JNZ 0x001065ed
CMP R13,0x10
JZ 0x0010663e
MOV RDI,R15
CALL 0x00105908
TEST RAX,RAX
JZ 0x00106647
MOV qword ptr [R12 + R13*0x8],RAX
INC R13
JMP 0x001065ae
LAB_001065e4:
LEA RSI,[0x118e6d]
JMP 0x0010664e
LAB_001065ed:
LEA RDX,[0x118eb6]
PUSH 0x2
POP RSI
MOV RDI,R15
CALL 0x001056d7
MOV RDI,qword ptr [R15]
MOV RSI,R12
MOV RDX,R13
MOV RCX,R14
CMP EBP,0x10
JNZ 0x00106627
MOV R8,qword ptr [RSP]
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00109cc8
LAB_00106627:
MOV R8,qword ptr [RSP]
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00109cf5
LAB_0010663e:
LEA RSI,[0x118e97]
JMP 0x0010664e
LAB_00106647:
LEA RSI,[0x118af6]
LAB_0010664e:
MOV RDI,R15
CALL 0x001058b0
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
parser_parse_and_or(int8 *param_1,int param_2,int8 param_3,int8 param_4)
{
char cVar1;
long lVar2;
long lVar3;
int8 uVar4;
char *pcVar5;
long lVar6;
lVar2 = arena_alloc(*param_1,0x80);
if (lVar2 == 0) {
pcVar5 = "Failed to allocate memory for expressions";
LAB_0010664e:
parser_error(param_1,pcVar5);
return 0;
}
lVar6 = 0;
while( true ) {
cVar1 = parser_check(param_1,2);
if (cVar1 != '\0') break;
cVar1 = parser_is_at_end(param_1);
if (cVar1 != '\0') break;
if (lVar6 == 0x10) {
pcVar5 = "Too many expressions in and/or";
goto LAB_0010664e;
}
lVar3 = parser_parse_expression(param_1);
if (lVar3 == 0) {
pcVar5 = "Expected expression";
goto LAB_0010664e;
}
*(long *)(lVar2 + lVar6 * 8) = lVar3;
lVar6 = lVar6 + 1;
}
parser_consume(param_1,2,"Expected \')\' after and/or");
if (param_2 == 0x10) {
uVar4 = ast_create_and();
return uVar4;
}
uVar4 = ast_create_or(*param_1,lVar2,lVar6,param_3,param_4);
return uVar4;
}
| |
21,248 | ma_apply_undo_key_insert | eloqsql/storage/maria/ma_key_recover.c | my_bool _ma_apply_undo_key_insert(MARIA_HA *info, LSN undo_lsn,
const uchar *header, uint length)
{
LSN lsn;
my_bool res;
uint keynr;
uchar key_buff[MARIA_MAX_KEY_BUFF];
MARIA_SHARE *share= info->s;
MARIA_KEY key;
my_off_t new_root;
struct st_msg_to_write_hook_for_undo_key msg;
DBUG_ENTER("_ma_apply_undo_key_insert");
share->state.changed|= (STATE_CHANGED | STATE_NOT_OPTIMIZED_KEYS |
STATE_NOT_SORTED_PAGES | STATE_NOT_ZEROFILLED |
STATE_NOT_MOVABLE);
keynr= key_nr_korr(header);
length-= KEY_NR_STORE_SIZE;
/* We have to copy key as _ma_ck_real_delete() may change it */
memcpy(key_buff, header + KEY_NR_STORE_SIZE, length);
DBUG_DUMP("key_buff", key_buff, length);
new_root= share->state.key_root[keynr];
/*
Change the key to an internal structure.
It's safe to have SEARCH_USER_KEY_HAS_TRANSID even if there isn't
a transaction id, as ha_key_cmp() will stop comparison when key length
is reached.
For index with transid flag, the ref_length of the key is not correct.
This should however be safe as long as this key is only used for
comparsion against other keys (not for packing or for read-next etc as
in this case we use data_length + ref_length, which is correct.
*/
key.keyinfo= share->keyinfo + keynr;
key.data= key_buff;
key.data_length= length - share->rec_reflength;
key.ref_length= share->rec_reflength;
key.flag= SEARCH_USER_KEY_HAS_TRANSID;
res= ((share->keyinfo[keynr].key_alg == HA_KEY_ALG_RTREE) ?
maria_rtree_real_delete(info, &key, &new_root) :
_ma_ck_real_delete(info, &key, &new_root));
if (res)
_ma_mark_file_crashed(share);
msg.root= &share->state.key_root[keynr];
msg.value= new_root;
msg.keynr= keynr;
if (_ma_write_clr(info, undo_lsn, *msg.root == msg.value ?
LOGREC_UNDO_KEY_INSERT : LOGREC_UNDO_KEY_INSERT_WITH_ROOT,
0, 0, &lsn, (void*) &msg))
res= 1;
_ma_fast_unlock_key_del(info);
_ma_unpin_all_pages_and_finalize_row(info, lsn);
DBUG_RETURN(res);
} | O0 | c | ma_apply_undo_key_insert:
pushq %rbp
movq %rsp, %rbp
subq $0xa70, %rsp # imm = 0xA70
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x9e8(%rbp)
movq %rsi, -0x9f0(%rbp)
movq %rdx, -0x9f8(%rbp)
movl %ecx, -0x9fc(%rbp)
movq -0x9e8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xa18(%rbp)
movq -0xa18(%rbp), %rax
movl 0x170(%rax), %ecx
orl $0x1b1, %ecx # imm = 0x1B1
movl %ecx, 0x170(%rax)
movq -0x9f8(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0xa10(%rbp)
movl -0x9fc(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x9fc(%rbp)
leaq -0x9e0(%rbp), %rdi
movq -0x9f8(%rbp), %rsi
addq $0x1, %rsi
movl -0x9fc(%rbp), %eax
movl %eax, %edx
callq 0x2a0b0
jmp 0x42cad
movq -0xa18(%rbp), %rax
movq 0x118(%rax), %rax
movl -0xa10(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0xa40(%rbp)
movq -0xa18(%rbp), %rax
movq 0x570(%rax), %rax
movl -0xa10(%rbp), %ecx
imulq $0x118, %rcx, %rcx # imm = 0x118
addq %rcx, %rax
movq %rax, -0xa30(%rbp)
leaq -0x9e0(%rbp), %rax
movq %rax, -0xa38(%rbp)
movl -0x9fc(%rbp), %eax
movq -0xa18(%rbp), %rcx
subl 0x740(%rcx), %eax
movl %eax, -0xa28(%rbp)
movq -0xa18(%rbp), %rax
movl 0x740(%rax), %eax
movl %eax, -0xa24(%rbp)
movl $0x80000, -0xa20(%rbp) # imm = 0x80000
movq -0xa18(%rbp), %rax
movq 0x570(%rax), %rax
movl -0xa10(%rbp), %ecx
imulq $0x118, %rcx, %rcx # imm = 0x118
addq %rcx, %rax
movzbl 0xa4(%rax), %eax
cmpl $0x2, %eax
jne 0x42d84
movq -0x9e8(%rbp), %rdi
leaq -0xa38(%rbp), %rsi
leaq -0xa40(%rbp), %rdx
callq 0x7a680
movsbl %al, %eax
movl %eax, -0xa64(%rbp)
jmp 0x42da7
movq -0x9e8(%rbp), %rdi
leaq -0xa38(%rbp), %rsi
leaq -0xa40(%rbp), %rdx
callq 0x6b5e0
movsbl %al, %eax
movl %eax, -0xa64(%rbp)
movl -0xa64(%rbp), %eax
movb %al, -0xa09(%rbp)
cmpb $0x0, -0xa09(%rbp)
je 0x42dc8
movq -0xa18(%rbp), %rdi
callq 0x45d10
movq -0xa18(%rbp), %rax
movq 0x118(%rax), %rax
movl -0xa10(%rbp), %ecx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0xa60(%rbp)
movq -0xa40(%rbp), %rax
movq %rax, -0xa58(%rbp)
movl -0xa10(%rbp), %eax
movl %eax, -0xa50(%rbp)
movq -0x9e8(%rbp), %rdi
movq -0x9f0(%rbp), %rsi
movq -0xa60(%rbp), %rax
movq (%rax), %rcx
movq -0xa58(%rbp), %r8
movl $0x16, %edx
movl $0x15, %eax
cmpq %r8, %rcx
cmovel %eax, %edx
xorl %r8d, %r8d
leaq -0xa08(%rbp), %r9
leaq -0xa60(%rbp), %rax
movl %r8d, %ecx
movq %rax, (%rsp)
callq 0x40a20
cmpb $0x0, %al
je 0x42e5b
movb $0x1, -0xa09(%rbp)
movq -0x9e8(%rbp), %rdi
callq 0x40f80
movq -0x9e8(%rbp), %rdi
movq -0xa08(%rbp), %rsi
callq 0x42eb0
movb -0xa09(%rbp), %al
movb %al, -0xa65(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x42ea7
movb -0xa65(%rbp), %al
addq $0xa70, %rsp # imm = 0xA70
popq %rbp
retq
callq 0x2a250
nopl (%rax)
| _ma_apply_undo_key_insert:
push rbp
mov rbp, rsp
sub rsp, 0A70h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_9E8], rdi
mov [rbp+var_9F0], rsi
mov [rbp+var_9F8], rdx
mov [rbp+var_9FC], ecx
mov rax, [rbp+var_9E8]
mov rax, [rax]
mov [rbp+var_A18], rax
mov rax, [rbp+var_A18]
mov ecx, [rax+170h]
or ecx, 1B1h
mov [rax+170h], ecx
mov rax, [rbp+var_9F8]
movzx eax, byte ptr [rax]
mov [rbp+var_A10], eax
mov eax, [rbp+var_9FC]
sub eax, 1
mov [rbp+var_9FC], eax
lea rdi, [rbp+var_9E0]
mov rsi, [rbp+var_9F8]
add rsi, 1
mov eax, [rbp+var_9FC]
mov edx, eax
call _memcpy
jmp short $+2
loc_42CAD:
mov rax, [rbp+var_A18]
mov rax, [rax+118h]
mov ecx, [rbp+var_A10]
mov rax, [rax+rcx*8]
mov [rbp+var_A40], rax
mov rax, [rbp+var_A18]
mov rax, [rax+570h]
mov ecx, [rbp+var_A10]
imul rcx, 118h
add rax, rcx
mov [rbp+var_A30], rax
lea rax, [rbp+var_9E0]
mov [rbp+var_A38], rax
mov eax, [rbp+var_9FC]
mov rcx, [rbp+var_A18]
sub eax, [rcx+740h]
mov [rbp+var_A28], eax
mov rax, [rbp+var_A18]
mov eax, [rax+740h]
mov [rbp+var_A24], eax
mov [rbp+var_A20], 80000h
mov rax, [rbp+var_A18]
mov rax, [rax+570h]
mov ecx, [rbp+var_A10]
imul rcx, 118h
add rax, rcx
movzx eax, byte ptr [rax+0A4h]
cmp eax, 2
jnz short loc_42D84
mov rdi, [rbp+var_9E8]
lea rsi, [rbp+var_A38]
lea rdx, [rbp+var_A40]
call maria_rtree_real_delete
movsx eax, al
mov [rbp+var_A64], eax
jmp short loc_42DA7
loc_42D84:
mov rdi, [rbp+var_9E8]
lea rsi, [rbp+var_A38]
lea rdx, [rbp+var_A40]
call _ma_ck_real_delete
movsx eax, al
mov [rbp+var_A64], eax
loc_42DA7:
mov eax, [rbp+var_A64]
mov [rbp+var_A09], al
cmp [rbp+var_A09], 0
jz short loc_42DC8
mov rdi, [rbp+var_A18]
call _ma_mark_file_crashed
loc_42DC8:
mov rax, [rbp+var_A18]
mov rax, [rax+118h]
mov ecx, [rbp+var_A10]
shl rcx, 3
add rax, rcx
mov [rbp+var_A60], rax
mov rax, [rbp+var_A40]
mov [rbp+var_A58], rax
mov eax, [rbp+var_A10]
mov [rbp+var_A50], eax
mov rdi, [rbp+var_9E8]
mov rsi, [rbp+var_9F0]
mov rax, [rbp+var_A60]
mov rcx, [rax]
mov r8, [rbp+var_A58]
mov edx, 16h
mov eax, 15h
cmp rcx, r8
cmovz edx, eax
xor r8d, r8d
lea r9, [rbp+var_A08]
lea rax, [rbp+var_A60]
mov ecx, r8d
mov [rsp+0A70h+var_A70], rax
call _ma_write_clr
cmp al, 0
jz short loc_42E5B
mov [rbp+var_A09], 1
loc_42E5B:
mov rdi, [rbp+var_9E8]
call _ma_fast_unlock_key_del
mov rdi, [rbp+var_9E8]
mov rsi, [rbp+var_A08]
call _ma_unpin_all_pages_and_finalize_row
mov al, [rbp+var_A09]
mov [rbp+var_A65], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_42EA7
mov al, [rbp+var_A65]
add rsp, 0A70h
pop rbp
retn
loc_42EA7:
call ___stack_chk_fail
| char ma_apply_undo_key_insert(_QWORD *a1, long long a2, unsigned __int8 *a3, int a4)
{
int v4; // edx
char v6; // [rsp+Ch] [rbp-A64h]
_QWORD v7[2]; // [rsp+10h] [rbp-A60h] BYREF
unsigned int v8; // [rsp+20h] [rbp-A50h]
long long v9; // [rsp+30h] [rbp-A40h] BYREF
_QWORD v10[2]; // [rsp+38h] [rbp-A38h] BYREF
int v11; // [rsp+48h] [rbp-A28h]
int v12; // [rsp+4Ch] [rbp-A24h]
int v13; // [rsp+50h] [rbp-A20h]
long long v14; // [rsp+58h] [rbp-A18h]
unsigned int v15; // [rsp+60h] [rbp-A10h]
char v16; // [rsp+67h] [rbp-A09h]
long long v17; // [rsp+68h] [rbp-A08h] BYREF
int v18; // [rsp+74h] [rbp-9FCh]
unsigned __int8 *v19; // [rsp+78h] [rbp-9F8h]
long long v20; // [rsp+80h] [rbp-9F0h]
_QWORD *v21; // [rsp+88h] [rbp-9E8h]
_BYTE v22[2520]; // [rsp+90h] [rbp-9E0h] BYREF
unsigned long long v23; // [rsp+A68h] [rbp-8h]
v23 = __readfsqword(0x28u);
v21 = a1;
v20 = a2;
v19 = a3;
v18 = a4;
v14 = *a1;
*(_DWORD *)(v14 + 368) |= 0x1B1u;
v15 = *v19;
memcpy(v22, v19 + 1, (unsigned int)--v18);
v9 = *(_QWORD *)(*(_QWORD *)(v14 + 280) + 8LL * v15);
v10[1] = 280LL * v15 + *(_QWORD *)(v14 + 1392);
v10[0] = v22;
v11 = v18 - *(_DWORD *)(v14 + 1856);
v12 = *(_DWORD *)(v14 + 1856);
v13 = 0x80000;
if ( *(_BYTE *)(280LL * v15 + *(_QWORD *)(v14 + 1392) + 164) == 2 )
v6 = maria_rtree_real_delete(v21, v10, &v9);
else
v6 = ma_ck_real_delete(v21, v10, &v9);
v16 = v6;
if ( v6 )
ma_mark_file_crashed(v14);
v7[0] = 8LL * v15 + *(_QWORD *)(v14 + 280);
v7[1] = v9;
v8 = v15;
v4 = 22;
if ( *(_QWORD *)v7[0] == v9 )
v4 = 21;
if ( ma_write_clr(v21, v20, v4, 0, 0, (long long)&v17, (long long)v7) )
v16 = 1;
ma_fast_unlock_key_del((long long)v21);
ma_unpin_all_pages_and_finalize_row(v21, v17);
return v16;
}
| _ma_apply_undo_key_insert:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa70
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x9e8],RDI
MOV qword ptr [RBP + -0x9f0],RSI
MOV qword ptr [RBP + -0x9f8],RDX
MOV dword ptr [RBP + -0x9fc],ECX
MOV RAX,qword ptr [RBP + -0x9e8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0xa18],RAX
MOV RAX,qword ptr [RBP + -0xa18]
MOV ECX,dword ptr [RAX + 0x170]
OR ECX,0x1b1
MOV dword ptr [RAX + 0x170],ECX
MOV RAX,qword ptr [RBP + -0x9f8]
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0xa10],EAX
MOV EAX,dword ptr [RBP + -0x9fc]
SUB EAX,0x1
MOV dword ptr [RBP + -0x9fc],EAX
LEA RDI,[RBP + -0x9e0]
MOV RSI,qword ptr [RBP + -0x9f8]
ADD RSI,0x1
MOV EAX,dword ptr [RBP + -0x9fc]
MOV EDX,EAX
CALL 0x0012a0b0
JMP 0x00142cad
LAB_00142cad:
MOV RAX,qword ptr [RBP + -0xa18]
MOV RAX,qword ptr [RAX + 0x118]
MOV ECX,dword ptr [RBP + -0xa10]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0xa40],RAX
MOV RAX,qword ptr [RBP + -0xa18]
MOV RAX,qword ptr [RAX + 0x570]
MOV ECX,dword ptr [RBP + -0xa10]
IMUL RCX,RCX,0x118
ADD RAX,RCX
MOV qword ptr [RBP + -0xa30],RAX
LEA RAX,[RBP + -0x9e0]
MOV qword ptr [RBP + -0xa38],RAX
MOV EAX,dword ptr [RBP + -0x9fc]
MOV RCX,qword ptr [RBP + -0xa18]
SUB EAX,dword ptr [RCX + 0x740]
MOV dword ptr [RBP + -0xa28],EAX
MOV RAX,qword ptr [RBP + -0xa18]
MOV EAX,dword ptr [RAX + 0x740]
MOV dword ptr [RBP + -0xa24],EAX
MOV dword ptr [RBP + -0xa20],0x80000
MOV RAX,qword ptr [RBP + -0xa18]
MOV RAX,qword ptr [RAX + 0x570]
MOV ECX,dword ptr [RBP + -0xa10]
IMUL RCX,RCX,0x118
ADD RAX,RCX
MOVZX EAX,byte ptr [RAX + 0xa4]
CMP EAX,0x2
JNZ 0x00142d84
MOV RDI,qword ptr [RBP + -0x9e8]
LEA RSI,[RBP + -0xa38]
LEA RDX,[RBP + -0xa40]
CALL 0x0017a680
MOVSX EAX,AL
MOV dword ptr [RBP + -0xa64],EAX
JMP 0x00142da7
LAB_00142d84:
MOV RDI,qword ptr [RBP + -0x9e8]
LEA RSI,[RBP + -0xa38]
LEA RDX,[RBP + -0xa40]
CALL 0x0016b5e0
MOVSX EAX,AL
MOV dword ptr [RBP + -0xa64],EAX
LAB_00142da7:
MOV EAX,dword ptr [RBP + -0xa64]
MOV byte ptr [RBP + -0xa09],AL
CMP byte ptr [RBP + -0xa09],0x0
JZ 0x00142dc8
MOV RDI,qword ptr [RBP + -0xa18]
CALL 0x00145d10
LAB_00142dc8:
MOV RAX,qword ptr [RBP + -0xa18]
MOV RAX,qword ptr [RAX + 0x118]
MOV ECX,dword ptr [RBP + -0xa10]
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0xa60],RAX
MOV RAX,qword ptr [RBP + -0xa40]
MOV qword ptr [RBP + -0xa58],RAX
MOV EAX,dword ptr [RBP + -0xa10]
MOV dword ptr [RBP + -0xa50],EAX
MOV RDI,qword ptr [RBP + -0x9e8]
MOV RSI,qword ptr [RBP + -0x9f0]
MOV RAX,qword ptr [RBP + -0xa60]
MOV RCX,qword ptr [RAX]
MOV R8,qword ptr [RBP + -0xa58]
MOV EDX,0x16
MOV EAX,0x15
CMP RCX,R8
CMOVZ EDX,EAX
XOR R8D,R8D
LEA R9,[RBP + -0xa08]
LEA RAX,[RBP + -0xa60]
MOV ECX,R8D
MOV qword ptr [RSP],RAX
CALL 0x00140a20
CMP AL,0x0
JZ 0x00142e5b
MOV byte ptr [RBP + -0xa09],0x1
LAB_00142e5b:
MOV RDI,qword ptr [RBP + -0x9e8]
CALL 0x00140f80
MOV RDI,qword ptr [RBP + -0x9e8]
MOV RSI,qword ptr [RBP + -0xa08]
CALL 0x00142eb0
MOV AL,byte ptr [RBP + -0xa09]
MOV byte ptr [RBP + -0xa65],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00142ea7
MOV AL,byte ptr [RBP + -0xa65]
ADD RSP,0xa70
POP RBP
RET
LAB_00142ea7:
CALL 0x0012a250
|
int8 _ma_apply_undo_key_insert(long *param_1,int8 param_2,byte *param_3,int param_4)
{
char cVar1;
int8 uVar2;
long in_FS_OFFSET;
long *local_a68;
long local_a60;
uint local_a58;
long local_a48;
int1 *local_a40;
long local_a38;
int local_a30;
int4 local_a2c;
int4 local_a28;
long local_a20;
uint local_a18;
char local_a11;
int8 local_a10;
uint local_a04;
byte *local_a00;
int8 local_9f8;
long *local_9f0;
int1 local_9e8 [2520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_a20 = *param_1;
*(uint *)(local_a20 + 0x170) = *(uint *)(local_a20 + 0x170) | 0x1b1;
local_a18 = (uint)*param_3;
local_a04 = param_4 - 1;
local_a00 = param_3;
local_9f8 = param_2;
local_9f0 = param_1;
memcpy(local_9e8,param_3 + 1,(ulong)local_a04);
local_a48 = *(long *)(*(long *)(local_a20 + 0x118) + (ulong)local_a18 * 8);
local_a38 = *(long *)(local_a20 + 0x570) + (ulong)local_a18 * 0x118;
local_a40 = local_9e8;
local_a30 = local_a04 - *(int *)(local_a20 + 0x740);
local_a2c = *(int4 *)(local_a20 + 0x740);
local_a28 = 0x80000;
if (*(char *)(*(long *)(local_a20 + 0x570) + (ulong)local_a18 * 0x118 + 0xa4) == '\x02') {
local_a11 = maria_rtree_real_delete(local_9f0,&local_a40,&local_a48);
}
else {
local_a11 = _ma_ck_real_delete(local_9f0,&local_a40,&local_a48);
}
if (local_a11 != '\0') {
_ma_mark_file_crashed(local_a20);
}
local_a68 = (long *)(*(long *)(local_a20 + 0x118) + (ulong)local_a18 * 8);
local_a60 = local_a48;
local_a58 = local_a18;
uVar2 = 0x16;
if (*local_a68 == local_a48) {
uVar2 = 0x15;
}
cVar1 = _ma_write_clr(local_9f0,local_9f8,uVar2,0,0,&local_a10,&local_a68);
if (cVar1 != '\0') {
local_a11 = '\x01';
}
_ma_fast_unlock_key_del(local_9f0);
_ma_unpin_all_pages_and_finalize_row(local_9f0,local_a10);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_a11);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
21,249 | json_schema_to_grammar(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&, bool) | monkey531[P]llama/common/json-schema-to-grammar.cpp | std::string json_schema_to_grammar(const json & schema, bool force_gbnf) {
#ifdef LLAMA_USE_LLGUIDANCE
if (!force_gbnf) {
return "%llguidance {}\nstart: %json " + schema.dump();
}
#else
(void)force_gbnf;
#endif // LLAMA_USE_LLGUIDANCE
return build_grammar([&](const common_grammar_builder & callbacks) {
auto copy = schema;
callbacks.resolve_refs(copy);
callbacks.add_schema("", copy);
});
} | O3 | cpp | json_schema_to_grammar(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&, bool):
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %rax
movq $0x0, 0x8(%rax)
movq %rsi, (%rax)
leaq 0x267(%rip), %rcx # 0xbbb06
movq %rcx, 0x18(%rax)
leaq 0x356(%rip), %rcx # 0xbbc00
movq %rcx, 0x10(%rax)
leaq 0xe(%rsp), %rdx
movw $0x0, (%rdx)
movq %rax, %rsi
callq 0xbb910
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0xbb8d9
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
retq
jmp 0xbb908
movq %rax, %rbx
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0xbb900
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x1afb0
movq %rax, %rdi
callq 0x222a5
| _Z22json_schema_to_grammarRKN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEb:
push rbx
sub rsp, 30h
mov rbx, rdi
lea rax, [rsp+38h+var_28]
mov qword ptr [rax+8], 0
mov [rax], rsi
lea rcx, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZ22json_schema_to_grammarRKN8nlohmann16json_abi_v3_11_310basic_jsonINS5_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS5_14adl_serializerES8_IhSaIhEEvEEbE3$_0E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(common_grammar_builder const&),json_schema_to_grammar(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)::$_0>::_M_invoke(std::_Any_data const&,common_grammar_builder const&)
mov [rax+18h], rcx
lea rcx, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZ22json_schema_to_grammarRKN8nlohmann16json_abi_v3_11_310basic_jsonINS5_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS5_14adl_serializerES8_IhSaIhEEvEEbE3$_0E10_M_managerERSt9_Any_dataRKSN_St18_Manager_operation; std::_Function_handler<void ()(common_grammar_builder const&),json_schema_to_grammar(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)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rax+10h], rcx
lea rdx, [rsp+38h+var_2A]
mov word ptr [rdx], 0
mov rsi, rax
call _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options; build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)
mov rax, [rsp+38h+var_18]
test rax, rax
jz short loc_BB8D9
lea rdi, [rsp+38h+var_28]
mov rsi, rdi
mov edx, 3
call rax
loc_BB8D9:
mov rax, rbx
add rsp, 30h
pop rbx
retn
jmp short loc_BB908
mov rbx, rax
mov rax, [rsp+38h+var_18]
test rax, rax
jz short loc_BB900
lea rdi, [rsp+38h+var_28]
mov rsi, rdi
mov edx, 3
call rax
loc_BB900:
mov rdi, rbx
call __Unwind_Resume
loc_BB908:
mov rdi, rax
call __clang_call_terminate
| long long json_schema_to_grammar(long long a1, long long a2)
{
__int16 v3; // [rsp+Eh] [rbp-2Ah] BYREF
_QWORD v4[2]; // [rsp+10h] [rbp-28h] BYREF
long long ( *v5)(); // [rsp+20h] [rbp-18h]
long long ( *v6)(); // [rsp+28h] [rbp-10h]
v4[1] = 0LL;
v4[0] = a2;
v6 = std::_Function_handler<void ()(common_grammar_builder const&),json_schema_to_grammar(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&,bool)::$_0>::_M_invoke;
v5 = std::_Function_handler<void ()(common_grammar_builder const&),json_schema_to_grammar(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&,bool)::$_0>::_M_manager;
v3 = 0;
build_grammar[abi:cxx11](a1, v4, &v3);
if ( v5 )
((void ( *)(_QWORD *, _QWORD *, long long))v5)(v4, v4, 3LL);
return a1;
}
| json_schema_to_grammar:
PUSH RBX
SUB RSP,0x30
MOV RBX,RDI
LEA RAX,[RSP + 0x10]
MOV qword ptr [RAX + 0x8],0x0
MOV qword ptr [RAX],RSI
LEA RCX,[0x1bbb06]
MOV qword ptr [RAX + 0x18],RCX
LEA RCX,[0x1bbc00]
MOV qword ptr [RAX + 0x10],RCX
LEA RDX,[RSP + 0xe]
MOV word ptr [RDX],0x0
LAB_001bb8b8:
MOV RSI,RAX
CALL 0x001bb910
MOV RAX,qword ptr [RSP + 0x20]
TEST RAX,RAX
JZ 0x001bb8d9
LAB_001bb8ca:
LEA RDI,[RSP + 0x10]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001bb8d9:
MOV RAX,RBX
ADD RSP,0x30
POP RBX
RET
|
/* json_schema_to_grammar(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&, bool) */
basic_json * json_schema_to_grammar(basic_json *param_1,bool param_2)
{
int7 in_register_00000031;
int8 local_28;
int8 local_20;
code *local_18;
code *local_10;
local_28 = CONCAT71(in_register_00000031,param_2);
local_20 = 0;
local_10 = std::
_Function_handler<void(common_grammar_builder_const&),json_schema_to_grammar(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&,bool)::$_0>
::_M_invoke;
local_18 = std::
_Function_handler<void(common_grammar_builder_const&),json_schema_to_grammar(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&,bool)::$_0>
::_M_manager;
/* try { // try from 001bb8b8 to 001bb8bf has its CatchHandler @ 001bb8e4 */
build_grammar_abi_cxx11_(param_1,(common_grammar_options *)&local_28);
if (local_18 != (code *)0x0) {
/* try { // try from 001bb8ca to 001bb8d8 has its CatchHandler @ 001bb8e2 */
(*local_18)(&local_28,&local_28,3);
}
return param_1;
}
| |
21,250 | SchemaConverter::_not_strings(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&) | monkey531[P]llama/common/json-schema-to-grammar.cpp | std::string _not_strings(const std::vector<std::string> & strings) {
struct TrieNode {
std::map<char, TrieNode> children;
bool is_end_of_string;
TrieNode() : is_end_of_string(false) {}
void insert(const std::string & string) {
auto node = this;
for (char c : string) {
node = &node->children[c];
}
node->is_end_of_string = true;
}
};
TrieNode trie;
for (const auto & s : strings) {
trie.insert(s);
}
std::string char_rule = _add_primitive("char", PRIMITIVE_RULES.at("char"));
std::ostringstream out;
out << "[\"] ( ";
std::function<void(const TrieNode &)> visit = [&](const TrieNode & node) {
std::ostringstream rejects;
auto first = true;
for (const auto & kv : node.children) {
rejects << kv.first;
if (first) {
first = false;
} else {
out << " | ";
}
out << "[" << kv.first << "]";
if (!kv.second.children.empty()) {
out << " (";
visit(kv.second);
out << ")";
} else if (kv.second.is_end_of_string) {
out << " " << char_rule << "+";
}
}
if (!node.children.empty()) {
if (!first) {
out << " | ";
}
out << "[^\"" << rejects.str() << "] " << char_rule << "*";
}
};
visit(trie);
out << " )";
if (!trie.is_end_of_string) {
out << "?";
}
out << " [\"] space";
return out.str();
} | O0 | cpp | SchemaConverter::_not_strings(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&):
subq $0x2d8, %rsp # imm = 0x2D8
movq %rdi, 0x20(%rsp)
movq %rdi, %rax
movq %rax, 0x28(%rsp)
movq %rdi, 0x2d0(%rsp)
movq %rsi, 0x2c8(%rsp)
movq %rdx, 0x2c0(%rsp)
movq 0x2c8(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0x288(%rsp), %rdi
callq 0x1b3d90
movq 0x2c0(%rsp), %rax
movq %rax, 0x280(%rsp)
movq 0x280(%rsp), %rdi
callq 0x897a0
movq %rax, 0x278(%rsp)
movq 0x280(%rsp), %rdi
callq 0x897d0
movq %rax, 0x270(%rsp)
leaq 0x278(%rsp), %rdi
leaq 0x270(%rsp), %rsi
callq 0x89800
testb $0x1, %al
jne 0x1b25db
jmp 0x1b2631
leaq 0x278(%rsp), %rdi
callq 0x89840
movq %rax, 0x268(%rsp)
movq 0x268(%rsp), %rsi
leaq 0x288(%rsp), %rdi
callq 0x1b3dc0
jmp 0x1b2607
jmp 0x1b2609
leaq 0x278(%rsp), %rdi
callq 0x89880
jmp 0x1b25c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x260(%rsp)
movl %eax, 0x25c(%rsp)
jmp 0x1b28d2
leaq 0x217(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x5b0d0
movq 0x18(%rsp), %rdx
leaq 0x6291d(%rip), %rsi # 0x214f6c
leaq 0x218(%rsp), %rdi
callq 0x61fc0
jmp 0x1b265e
leaq 0x1ef(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x5b0d0
movq 0x10(%rsp), %rdx
leaq 0x628f0(%rip), %rsi # 0x214f6c
leaq 0x1f0(%rsp), %rdi
callq 0x61fc0
jmp 0x1b268b
leaq 0xf0dae(%rip), %rdi # 0x2a3440
leaq 0x1f0(%rsp), %rsi
callq 0x1aec70
movq %rax, 0x8(%rsp)
jmp 0x1b26a6
movq 0x8(%rsp), %rcx
movq 0x30(%rsp), %rsi
leaq 0x238(%rsp), %rdi
leaq 0x218(%rsp), %rdx
callq 0x1ae8d0
jmp 0x1b26c7
leaq 0x1f0(%rsp), %rdi
callq 0x5b558
leaq 0x1ef(%rsp), %rdi
callq 0x5b530
leaq 0x218(%rsp), %rdi
callq 0x5b558
leaq 0x217(%rsp), %rdi
callq 0x5b530
leaq 0x70(%rsp), %rdi
callq 0x5b0a0
jmp 0x1b2707
leaq 0x62c05(%rip), %rsi # 0x215313
leaq 0x70(%rsp), %rdi
callq 0x5aa30
jmp 0x1b271a
leaq 0x70(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq 0x50(%rsp), %rdi
movq %rdi, 0x40(%rsp)
leaq 0x238(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0x38(%rsp), %rsi
callq 0x1b3e60
jmp 0x1b2747
leaq 0x50(%rsp), %rdi
leaq 0x288(%rsp), %rsi
callq 0x1b3f10
jmp 0x1b275b
leaq 0x628c4(%rip), %rsi # 0x215026
leaq 0x70(%rsp), %rdi
callq 0x5aa30
jmp 0x1b276e
testb $0x1, 0x2b8(%rsp)
jne 0x1b285c
leaq 0x629d4(%rip), %rsi # 0x215157
leaq 0x70(%rsp), %rdi
callq 0x5aa30
jmp 0x1b278f
jmp 0x1b285c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x260(%rsp)
movl %eax, 0x25c(%rsp)
jmp 0x1b27fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x260(%rsp)
movl %eax, 0x25c(%rsp)
jmp 0x1b27e1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x260(%rsp)
movl %eax, 0x25c(%rsp)
leaq 0x1f0(%rsp), %rdi
callq 0x5b558
leaq 0x1ef(%rsp), %rdi
callq 0x5b530
leaq 0x218(%rsp), %rdi
callq 0x5b558
leaq 0x217(%rsp), %rdi
callq 0x5b530
jmp 0x1b28d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x260(%rsp)
movl %eax, 0x25c(%rsp)
jmp 0x1b28c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x260(%rsp)
movl %eax, 0x25c(%rsp)
jmp 0x1b28bb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x260(%rsp)
movl %eax, 0x25c(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x1b3f50
jmp 0x1b28bb
leaq 0x62ab7(%rip), %rsi # 0x21531a
leaq 0x70(%rsp), %rdi
callq 0x5aa30
jmp 0x1b286f
movq 0x20(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x5b430
jmp 0x1b2880
leaq 0x50(%rsp), %rdi
callq 0x1b3f50
leaq 0x70(%rsp), %rdi
callq 0x5afc0
leaq 0x238(%rsp), %rdi
callq 0x5b558
leaq 0x288(%rsp), %rdi
callq 0x1b3f60
movq 0x28(%rsp), %rax
addq $0x2d8, %rsp # imm = 0x2D8
retq
leaq 0x70(%rsp), %rdi
callq 0x5afc0
leaq 0x238(%rsp), %rdi
callq 0x5b558
leaq 0x288(%rsp), %rdi
callq 0x1b3f60
movq 0x260(%rsp), %rdi
callq 0x5abc0
nopl (%rax)
| _ZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EE:
sub rsp, 2D8h
mov [rsp+2D8h+var_2B8], rdi; void *
mov rax, rdi
mov qword ptr [rsp+2D8h+var_2B0], rax; int
mov [rsp+2D8h+var_8], rdi
mov qword ptr [rsp+2D8h+var_10], rsi
mov [rsp+2D8h+var_18], rdx
mov rax, qword ptr [rsp+2D8h+var_10]
mov qword ptr [rsp+2D8h+var_2A8], rax; int
lea rdi, [rsp+2D8h+var_50]
call _ZZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EEEN8TrieNodeC2Ev; SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode::TrieNode(void)
mov rax, [rsp+2D8h+var_18]
mov [rsp+2D8h+var_58], rax
mov rdi, [rsp+2D8h+var_58]
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void)
mov [rsp+2D8h+var_60], rax
mov rdi, [rsp+2D8h+var_58]
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void)
mov [rsp+2D8h+var_68], rax
loc_1B25C0:
lea rdi, [rsp+2D8h+var_60]
lea rsi, [rsp+2D8h+var_68]
call _ZN9__gnu_cxxneIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_; __gnu_cxx::operator!=<std::string const*,std::vector<std::string>>(__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>> const&,__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>> const&)
test al, 1
jnz short loc_1B25DB
jmp short loc_1B2631
loc_1B25DB:
lea rdi, [rsp+2D8h+var_60]
call _ZNK9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEdeEv; __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator*(void)
mov [rsp+2D8h+var_70], rax
mov rsi, [rsp+2D8h+var_70]
lea rdi, [rsp+2D8h+var_50]
call _ZZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EEEN8TrieNode6insertERKS6_; SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode::insert(std::string const&)
jmp short $+2
loc_1B2607:
jmp short $+2
loc_1B2609:
lea rdi, [rsp+2D8h+var_60]
call _ZN9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEppEv; __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator++(void)
jmp short loc_1B25C0
mov rcx, rax
mov eax, edx
mov [rsp+arg_258], rcx
mov [rsp+arg_254], eax
jmp loc_1B28D2
loc_1B2631:
lea rdi, [rsp+2D8h+var_C1]
mov qword ptr [rsp+2D8h+var_2C0], rdi; int
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, qword ptr [rsp+2D8h+var_2C0]
lea rsi, aChar; "char"
lea rdi, [rsp+2D8h+var_C1+1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_1B265E:
lea rdi, [rsp+2D8h+var_E9]
mov qword ptr [rsp+2D8h+var_2C8], rdi; int
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, qword ptr [rsp+2D8h+var_2C8]
lea rsi, aChar; "char"
lea rdi, [rsp+2D8h+var_E9+1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_1B268B:
lea rdi, _Z15PRIMITIVE_RULESB5cxx11; PRIMITIVE_RULES
lea rsi, [rsp+2D8h+var_E9+1]
call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE11BuiltinRuleSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S6_EEE2atERSC_; std::unordered_map<std::string,BuiltinRule>::at(std::string const&)
mov qword ptr [rsp+2D8h+var_2D0], rax; int
jmp short $+2
loc_1B26A6:
mov rcx, qword ptr [rsp+2D8h+var_2D0]; int
mov rsi, qword ptr [rsp+2D8h+var_2A8]; int
lea rdi, [rsp+2D8h+var_A0]; int
lea rdx, [rsp+2D8h+var_C1+1]; int
call _ZN15SchemaConverter14_add_primitiveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK11BuiltinRule; SchemaConverter::_add_primitive(std::string const&,BuiltinRule const&)
jmp short $+2
loc_1B26C7:
lea rdi, [rsp+2D8h+var_E9+1]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+2D8h+var_E9]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rsp+2D8h+var_C1+1]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+2D8h+var_C1]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rsp+2D8h+var_268]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
jmp short $+2
loc_1B2707:
lea rsi, asc_215313; "[\"] ( "
lea rdi, [rsp+2D8h+var_268]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_1B271A:
lea rax, [rsp+2D8h+var_268]
mov [rsp+2D8h+var_2A0], rax
lea rdi, [rsp+2D8h+var_288]
mov [rsp+2D8h+var_298], rdi
lea rax, [rsp+2D8h+var_A0]
mov [rsp+2D8h+var_290], rax
lea rsi, [rsp+2D8h+var_2A0]
call _ZNSt8functionIFvRKZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EEE8TrieNodeEEC2IZNS0_12_not_stringsESB_EUlSE_E_vEEOT_; std::function<void ()(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)>::function<SchemaConverter::_not_strings(std::vector<std::string> const&)::{lambda(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)#1},void>(SchemaConverter::_not_strings(std::vector<std::string> const&)::{lambda(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)#1} &&)
jmp short $+2
loc_1B2747:
lea rdi, [rsp+2D8h+var_288]
lea rsi, [rsp+2D8h+var_50]
call _ZNKSt8functionIFvRKZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EEE8TrieNodeEEclESE_; std::function<void ()(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)>::operator()(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)
jmp short $+2
loc_1B275B:
lea rsi, a09401910201912+50h; " )"
lea rdi, [rsp+2D8h+var_268]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_1B276E:
test [rsp+2D8h+var_20], 1
jnz loc_1B285C
lea rsi, asc_215154+3; "?"
lea rdi, [rsp+2D8h+var_268]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_1B278F:
jmp loc_1B285C
mov rcx, rax
mov eax, edx
mov [rsp+arg_258], rcx
mov [rsp+arg_254], eax
jmp short loc_1B27FB
mov rcx, rax
mov eax, edx
mov [rsp+arg_258], rcx
mov [rsp+arg_254], eax
jmp short loc_1B27E1
mov rcx, rax
mov eax, edx
mov [rsp+arg_258], rcx
mov [rsp+arg_254], eax
lea rdi, [rsp+arg_1E8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_1B27E1:
lea rdi, [rsp+arg_1E7]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rsp+arg_210]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_1B27FB:
lea rdi, [rsp+arg_20F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_1B28D2
mov rcx, rax
mov eax, edx
mov [rsp+arg_258], rcx
mov [rsp+arg_254], eax
jmp loc_1B28C5
mov rcx, rax
mov eax, edx
mov [rsp+arg_258], rcx
mov [rsp+arg_254], eax
jmp short loc_1B28BB
mov rcx, rax
mov eax, edx
mov [rsp+arg_258], rcx
mov [rsp+arg_254], eax
lea rdi, [rsp+arg_48]
call _ZNSt8functionIFvRKZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EEE8TrieNodeEED2Ev; std::function<void ()(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)>::~function()
jmp short loc_1B28BB
loc_1B285C:
lea rsi, aSpace_5; " [\"] space"
lea rdi, [rsp+2D8h+var_268]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_1B286F:
mov rdi, [rsp+2D8h+var_2B8]
lea rsi, [rsp+2D8h+var_268]
call __ZNKSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv; std::ostringstream::str(void)
jmp short $+2
loc_1B2880:
lea rdi, [rsp+2D8h+var_288]
call _ZNSt8functionIFvRKZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EEE8TrieNodeEED2Ev; std::function<void ()(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)>::~function()
lea rdi, [rsp+2D8h+var_268]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+2D8h+var_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+2D8h+var_50]
call _ZZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EEEN8TrieNodeD2Ev; SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode::~TrieNode()
mov rax, qword ptr [rsp+2D8h+var_2B0]
add rsp, 2D8h
retn
loc_1B28BB:
lea rdi, [rsp+arg_68]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
loc_1B28C5:
lea rdi, [rsp+arg_230]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_1B28D2:
lea rdi, [rsp+arg_280]
call _ZZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EEEN8TrieNodeD2Ev; SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode::~TrieNode()
mov rdi, [rsp+arg_258]
call __Unwind_Resume
| long long SchemaConverter::_not_strings(long long a1, long long a2, long long a3)
{
int v3; // edx
int v4; // ecx
int v5; // r8d
int v6; // r9d
long long v8; // [rsp+8h] [rbp-2D0h]
_QWORD v9[3]; // [rsp+38h] [rbp-2A0h] BYREF
_BYTE v10[32]; // [rsp+50h] [rbp-288h] BYREF
_BYTE v11[383]; // [rsp+70h] [rbp-268h] BYREF
int v12[10]; // [rsp+1EFh] [rbp-E9h] BYREF
int v13[8]; // [rsp+217h] [rbp-C1h] BYREF
int v14[12]; // [rsp+238h] [rbp-A0h] BYREF
long long v15; // [rsp+268h] [rbp-70h]
long long v16; // [rsp+270h] [rbp-68h] BYREF
long long v17; // [rsp+278h] [rbp-60h] BYREF
long long v18; // [rsp+280h] [rbp-58h]
_BYTE v19[56]; // [rsp+288h] [rbp-50h] BYREF
long long v20; // [rsp+2C0h] [rbp-18h]
int v21[2]; // [rsp+2C8h] [rbp-10h]
long long v22; // [rsp+2D0h] [rbp-8h]
v22 = a1;
*(_QWORD *)v21 = a2;
v20 = a3;
SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode::TrieNode(v19);
v18 = v20;
v17 = std::vector<std::string>::begin(v20);
v16 = std::vector<std::string>::end(v18);
while ( __gnu_cxx::operator!=<std::string const*,std::vector<std::string>>((long long)&v17, (long long)&v16) )
{
v15 = __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator*((long long)&v17);
SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode::insert(v19, v15);
__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator++(&v17);
}
std::allocator<char>::allocator(v13, &v16);
std::string::basic_string<std::allocator<char>>((long long)v13 + 1, (long long)"char", (long long)v13);
std::allocator<char>::allocator(v12, "char");
std::string::basic_string<std::allocator<char>>((long long)v12 + 1, (long long)"char", (long long)v12);
v8 = std::unordered_map<std::string,BuiltinRule>::at((long long)&PRIMITIVE_RULES[abi:cxx11], (long long)v12 + 1);
SchemaConverter::_add_primitive((long long)v14, a2, (long long)v13 + 1, v8);
std::string::~string((char *)v12 + 1);
std::allocator<char>::~allocator(v12);
std::string::~string((char *)v13 + 1);
std::allocator<char>::~allocator(v13);
std::ostringstream::basic_ostringstream(v11);
std::operator<<<std::char_traits<char>>(v11, "[\"] ( ");
v9[0] = v11;
v9[1] = v10;
v9[2] = v14;
std::function<void ()(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)>::function<SchemaConverter::_not_strings(std::vector<std::string> const&)::{lambda(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)#1},void>(
(unsigned int)v10,
(unsigned int)v9,
v3,
v4,
v5,
v6);
std::function<void ()(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)>::operator()(
v10,
v19);
std::operator<<<std::char_traits<char>>(v11, " )");
if ( (v19[48] & 1) == 0 )
std::operator<<<std::char_traits<char>>(v11, "?");
std::operator<<<std::char_traits<char>>(v11, " [\"] space");
std::ostringstream::str(a1, v11);
std::function<void ()(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)>::~function(v10);
std::ostringstream::~ostringstream(v11);
std::string::~string(v14);
SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode::~TrieNode(v19);
return a1;
}
| _Tuple_impl<std::__cxx11::string*&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>::create<std::__cxx11::string,std::__cxx11::string_const&>(std::__cxx11::string_const&)::{lambda(std::__cxx11::string*)#1}const&,void>:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x10],RDX
MOV RDI,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x8],RDI
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x001b2580
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x8
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x001a1610
ADD RSP,0x28
RET
|
/* std::_Tuple_impl<0ul, std::__cxx11::string*,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::create<std::__cxx11::string, std::__cxx11::string const&>(std::__cxx11::string
const&)::{lambda(std::__cxx11::string*)#1}>::_Tuple_impl<std::__cxx11::string*&,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::create<std::__cxx11::string, std::__cxx11::string const&>(std::__cxx11::string
const&)::{lambda(std::__cxx11::string*)#1} const&, void>(std::__cxx11::string*&,
std::__cxx11::string const&) */
void __thiscall
std::
_Tuple_impl<0ul,std::__cxx11::string*,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>::create<std::__cxx11::string,std::__cxx11::string_const&>(std::__cxx11::string_const&)::{lambda(std::__cxx11::string*)#1}>
::
_Tuple_impl<std::__cxx11::string*&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>::create<std::__cxx11::string,std::__cxx11::string_const&>(std::__cxx11::string_const&)::_lambda(std::__cxx11::string*)_1_const&,void>
(_Tuple_impl<0ul,std::__cxx11::string*,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>::create<std::__cxx11::string,std::__cxx11::string_const&>(std::__cxx11::string_const&)::_lambda(std::__cxx11::string*)_1_>
*this,string **param_1,string *param_2)
{
_Tuple_impl<1ul,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>::create<std::__cxx11::string,std::__cxx11::string_const&>(std::__cxx11::string_const&)::{lambda(std::__cxx11::string*)#1}>
::_Tuple_impl((_Tuple_impl<1ul,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>::create<std::__cxx11::string,std::__cxx11::string_const&>(std::__cxx11::string_const&)::_lambda(std::__cxx11::string*)_1_>
*)this,(_lambda_std____cxx11__string___1_ *)param_2);
_Head_base<0ul,std::__cxx11::string*,false>::_Head_base<std::__cxx11::string*&>
((_Head_base<0ul,std::__cxx11::string*,false> *)(this + 8),param_1);
return;
}
| |
21,251 | CLI::App::_get_fallthrough_parent() | MikePodsytnik[P]TCRtrie/build_O0/_deps/cli11-src/include/CLI/impl/App_inl.hpp | CLI11_INLINE App *App::_get_fallthrough_parent() {
if(parent_ == nullptr) {
throw(HorribleError("No Valid parent"));
}
auto *fallthrough_parent = parent_;
while((fallthrough_parent->parent_ != nullptr) && (fallthrough_parent->get_name().empty())) {
fallthrough_parent = fallthrough_parent->parent_;
}
return fallthrough_parent;
} | O0 | cpp | CLI::App::_get_fallthrough_parent():
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, 0x2c8(%rax)
jne 0x41895
movb $0x1, -0x3d(%rbp)
movl $0x38, %edi
callq 0x92d0
movq %rax, -0x60(%rbp)
leaq -0x29(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x9a80
movq -0x58(%rbp), %rdx
leaq 0x2e637(%rip), %rsi # 0x6fe53
leaq -0x28(%rbp), %rdi
callq 0xbb20
jmp 0x41827
movq -0x60(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x37b10
jmp 0x41836
movq -0x60(%rbp), %rdi
movb $0x0, -0x3d(%rbp)
leaq 0x5fd4b(%rip), %rsi # 0xa1590
leaq -0x9c5c(%rip), %rdx # 0x37bf0
callq 0x9a30
jmp 0x418f8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x41879
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x9b90
leaq -0x29(%rbp), %rdi
callq 0x9690
testb $0x1, -0x3d(%rbp)
jne 0x4188a
jmp 0x41893
movq -0x60(%rbp), %rdi
callq 0x9470
jmp 0x418ef
movq -0x50(%rbp), %rax
movq 0x2c8(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rcx
xorl %eax, %eax
cmpq $0x0, 0x2c8(%rcx)
movb %al, -0x61(%rbp)
je 0x418cb
movq -0x48(%rbp), %rdi
callq 0xd650
movq %rax, %rdi
callq 0x99c0
movb %al, -0x61(%rbp)
movb -0x61(%rbp), %al
testb $0x1, %al
jne 0x418d4
jmp 0x418e5
movq -0x48(%rbp), %rax
movq 0x2c8(%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0x418a4
movq -0x48(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x9a70
nopl (%rax,%rax)
| _ZN3CLI3App23_get_fallthrough_parentEv:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_50], rax
cmp qword ptr [rax+2C8h], 0
jnz loc_41895
mov [rbp+var_3D], 1
mov edi, 38h ; '8'; thrown_size
call ___cxa_allocate_exception
mov [rbp+var_60], rax
lea rdi, [rbp+var_29]
mov [rbp+var_58], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rbp+var_58]
lea rsi, aNoValidParent; "No Valid parent"
lea rdi, [rbp+var_28]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_41827:
mov rdi, [rbp+var_60]
lea rsi, [rbp+var_28]
call _ZN3CLI13HorribleErrorC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::HorribleError::HorribleError(std::string)
jmp short $+2
loc_41836:
mov rdi, [rbp+var_60]; void *
mov [rbp+var_3D], 0
lea rsi, _ZTIN3CLI13HorribleErrorE; lptinfo
lea rdx, _ZN3CLI13HorribleErrorD2Ev; void (*)(void *)
call ___cxa_throw
jmp loc_418F8
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
jmp short loc_41879
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
lea rdi, [rbp+var_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_41879:
lea rdi, [rbp+var_29]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
test [rbp+var_3D], 1
jnz short loc_4188A
jmp short loc_41893
loc_4188A:
mov rdi, [rbp+var_60]; void *
call ___cxa_free_exception
loc_41893:
jmp short loc_418EF
loc_41895:
mov rax, [rbp+var_50]
mov rax, [rax+2C8h]
mov [rbp+var_48], rax
loc_418A4:
mov rcx, [rbp+var_48]
xor eax, eax
cmp qword ptr [rcx+2C8h], 0
mov [rbp+var_61], al
jz short loc_418CB
mov rdi, [rbp+var_48]
call _ZNK3CLI3App8get_nameB5cxx11Ev; CLI::App::get_name(void)
mov rdi, rax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
mov [rbp+var_61], al
loc_418CB:
mov al, [rbp+var_61]
test al, 1
jnz short loc_418D4
jmp short loc_418E5
loc_418D4:
mov rax, [rbp+var_48]
mov rax, [rax+2C8h]
mov [rbp+var_48], rax
jmp short loc_418A4
loc_418E5:
mov rax, [rbp+var_48]
add rsp, 70h
pop rbp
retn
loc_418EF:
mov rdi, [rbp+var_38]
call __Unwind_Resume
loc_418F8:
nop dword ptr [rax+rax+00000000h]
| long long CLI::App::_get_fallthrough_parent(CLI::App *this, long long a2)
{
long long v2; // rdx
long long v3; // rdx
long long v4; // rax
char v6; // [rsp+Fh] [rbp-61h]
void *exception; // [rsp+10h] [rbp-60h]
long long i; // [rsp+28h] [rbp-48h]
char v9; // [rsp+47h] [rbp-29h] BYREF
_BYTE v10[32]; // [rsp+48h] [rbp-28h] BYREF
CLI::App *v11; // [rsp+68h] [rbp-8h]
v11 = this;
if ( !*((_QWORD *)this + 89) )
{
exception = __cxa_allocate_exception(0x38uLL);
std::allocator<char>::allocator(&v9, a2, v2);
std::string::basic_string<std::allocator<char>>((long long)v10, (long long)"No Valid parent", (long long)&v9);
CLI::HorribleError::HorribleError((long long)exception, (long long)v10, v3);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'CLI::HorribleError,
(void (*)(void *))CLI::HorribleError::~HorribleError);
}
for ( i = *((_QWORD *)this + 89); ; i = *(_QWORD *)(i + 712) )
{
v6 = 0;
if ( *(_QWORD *)(i + 712) )
{
v4 = CLI::App::get_name[abi:cxx11](i);
v6 = std::string::empty(v4);
}
if ( (v6 & 1) == 0 )
break;
}
return i;
}
| _get_fallthrough_parent:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x50],RAX
CMP qword ptr [RAX + 0x2c8],0x0
JNZ 0x00141895
MOV byte ptr [RBP + -0x3d],0x1
MOV EDI,0x38
CALL 0x001092d0
MOV qword ptr [RBP + -0x60],RAX
LEA RDI,[RBP + -0x29]
MOV qword ptr [RBP + -0x58],RDI
CALL 0x00109a80
MOV RDX,qword ptr [RBP + -0x58]
LAB_00141815:
LEA RSI,[0x16fe53]
LEA RDI,[RBP + -0x28]
CALL 0x0010bb20
JMP 0x00141827
LAB_00141827:
MOV RDI,qword ptr [RBP + -0x60]
LEA RSI,[RBP + -0x28]
CALL 0x00137b10
JMP 0x00141836
LAB_00141836:
MOV RDI,qword ptr [RBP + -0x60]
MOV byte ptr [RBP + -0x3d],0x0
LEA RSI,[0x1a1590]
LEA RDX,[0x137bf0]
CALL 0x00109a30
LAB_00141895:
MOV RAX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RAX + 0x2c8]
MOV qword ptr [RBP + -0x48],RAX
LAB_001418a4:
MOV RCX,qword ptr [RBP + -0x48]
XOR EAX,EAX
CMP qword ptr [RCX + 0x2c8],0x0
MOV byte ptr [RBP + -0x61],AL
JZ 0x001418cb
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x0010d650
MOV RDI,RAX
CALL 0x001099c0
MOV byte ptr [RBP + -0x61],AL
LAB_001418cb:
MOV AL,byte ptr [RBP + -0x61]
TEST AL,0x1
JNZ 0x001418d4
JMP 0x001418e5
LAB_001418d4:
MOV RAX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RAX + 0x2c8]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x001418a4
LAB_001418e5:
MOV RAX,qword ptr [RBP + -0x48]
ADD RSP,0x70
POP RBP
RET
|
/* CLI::App::_get_fallthrough_parent() */
App * __thiscall CLI::App::_get_fallthrough_parent(App *this)
{
HorribleError *pHVar1;
byte local_69;
App *local_50;
allocator local_31;
string local_30 [32];
App *local_10;
local_10 = this;
if (*(long *)(this + 0x2c8) == 0) {
pHVar1 = (HorribleError *)__cxa_allocate_exception(0x38);
std::allocator<char>::allocator();
/* try { // try from 00141815 to 00141824 has its CatchHandler @ 00141856 */
std::__cxx11::string::string<std::allocator<char>>(local_30,"No Valid parent",&local_31);
/* try { // try from 00141827 to 00141850 has its CatchHandler @ 00141864 */
HorribleError::HorribleError(pHVar1,local_30);
/* WARNING: Subroutine does not return */
__cxa_throw(pHVar1,&HorribleError::typeinfo,HorribleError::~HorribleError);
}
local_50 = *(App **)(this + 0x2c8);
while( true ) {
local_69 = 0;
if (*(long *)(local_50 + 0x2c8) != 0) {
get_name_abi_cxx11_(local_50);
local_69 = std::__cxx11::string::empty();
}
if ((local_69 & 1) == 0) break;
local_50 = *(App **)(local_50 + 0x2c8);
}
return local_50;
}
| |
21,252 | my_test_connect | eloqsql/libmariadb/unittest/libmariadb/my_test.h | MYSQL *my_test_connect(MYSQL *mysql,
const char *host,
const char *user,
const char *passwd,
const char *db,
unsigned int port,
const char *unix_socket,
unsigned long clientflag)
{
if (force_tls)
mysql_options(mysql, MYSQL_OPT_SSL_ENFORCE, &force_tls);
if (!mysql_real_connect(mysql, host, user, passwd, db, port, unix_socket, clientflag))
{
diag("error: %s", mysql_error(mysql));
return NULL;
}
if (mysql && force_tls && !mysql_get_ssl_cipher(mysql))
{
diag("Error: TLS connection not established");
return NULL;
}
if (!this_host)
get_this_host(mysql);
return mysql;
} | O3 | c | my_test_connect:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rbp), %r10
movq 0x10(%rbp), %rax
cmpl $0x0, 0x37d20(%rip) # 0x4bf20
je 0x14238
movq %rdx, -0x30(%rbp)
leaq 0x37d13(%rip), %rdx # 0x4bf20
movq %rbx, %rdi
movl $0x26, %esi
movl %r9d, %r15d
movq %r8, %r12
movq %rcx, %r13
callq 0x1cddd
movq -0x30(%rbp), %rdx
movq 0x18(%rbp), %r10
movq 0x10(%rbp), %rax
movq %r13, %rcx
movq %r12, %r8
movl %r15d, %r9d
movq %rbx, %rdi
movq %r14, %rsi
pushq %r10
pushq %rax
callq 0x18eaa
addq $0x10, %rsp
testq %rax, %rax
je 0x1427e
testq %rbx, %rbx
je 0x1426a
cmpl $0x0, 0x37cc5(%rip) # 0x4bf20
je 0x1426a
movq %rbx, %rdi
callq 0x18d9c
testq %rax, %rax
je 0x1429b
cmpq $0x0, 0x37b46(%rip) # 0x4bdb8
jne 0x142ab
movq %rbx, %rdi
callq 0x13ada
jmp 0x142ab
movq %rbx, %rdi
callq 0x1cece
leaq 0x221b9(%rip), %rdi # 0x36446
xorl %ebx, %ebx
movq %rax, %rsi
xorl %eax, %eax
callq 0x1574b
jmp 0x142ab
leaq 0x221ae(%rip), %rdi # 0x36450
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1574b
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_test_connect:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov r10, [rbp+arg_8]
mov rax, [rbp+arg_0]
cmp cs:force_tls, 0
jz short loc_14238
mov [rbp+var_30], rdx
lea rdx, force_tls
mov rdi, rbx
mov esi, 26h ; '&'
mov r15d, r9d
mov r12, r8
mov r13, rcx
call mysql_options
mov rdx, [rbp+var_30]
mov r10, [rbp+arg_8]
mov rax, [rbp+arg_0]
mov rcx, r13
mov r8, r12
mov r9d, r15d
loc_14238:
mov rdi, rbx
mov rsi, r14
push r10
push rax
call mysql_real_connect
add rsp, 10h
test rax, rax
jz short loc_1427E
test rbx, rbx
jz short loc_1426A
cmp cs:force_tls, 0
jz short loc_1426A
mov rdi, rbx
call mysql_get_ssl_cipher
test rax, rax
jz short loc_1429B
loc_1426A:
cmp cs:this_host, 0
jnz short loc_142AB
mov rdi, rbx
call get_this_host
jmp short loc_142AB
loc_1427E:
mov rdi, rbx
call mysql_error
lea rdi, aErrorS; "error: %s"
xor ebx, ebx
mov rsi, rax
xor eax, eax
call diag
jmp short loc_142AB
loc_1429B:
lea rdi, aErrorTlsConnec; "Error: TLS connection not established"
xor ebx, ebx
xor eax, eax
call diag
loc_142AB:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_test_connect(long long a1, int a2, int a3, int a4, int a5, int a6, long long a7, long long a8)
{
long long v8; // rbx
long long v9; // r10
long long v10; // rax
int v11; // r15d
int v12; // r12d
int v13; // r13d
int v14; // edx
int v15; // ecx
int v16; // r8d
int v17; // r9d
int v18; // eax
int v19; // edx
int v20; // ecx
int v21; // r8d
int v22; // r9d
int v24; // [rsp+0h] [rbp-30h]
v8 = a1;
v9 = a8;
v10 = a7;
if ( force_tls )
{
v24 = a3;
v11 = a6;
v12 = a5;
v13 = a4;
mysql_options(a1, 38LL, &force_tls);
a3 = v24;
v9 = a8;
v10 = a7;
a4 = v13;
a5 = v12;
a6 = v11;
}
if ( mysql_real_connect(a1, a2, a3, a4, a5, a6, v10, v9) )
{
if ( a1 && force_tls && !mysql_get_ssl_cipher(a1) )
{
v8 = 0LL;
diag((unsigned int)"Error: TLS connection not established", a2, v14, v15, v16, v17);
}
else if ( !this_host )
{
get_this_host(a1);
}
}
else
{
v18 = mysql_error(a1);
v8 = 0LL;
diag((unsigned int)"error: %s", v18, v19, v20, v21, v22);
}
return v8;
}
| my_test_connect:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV R10,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + 0x10]
CMP dword ptr [0x0014bf20],0x0
JZ 0x00114238
MOV qword ptr [RBP + -0x30],RDX
LEA RDX,[0x14bf20]
MOV RDI,RBX
MOV ESI,0x26
MOV R15D,R9D
MOV R12,R8
MOV R13,RCX
CALL 0x0011cddd
MOV RDX,qword ptr [RBP + -0x30]
MOV R10,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + 0x10]
MOV RCX,R13
MOV R8,R12
MOV R9D,R15D
LAB_00114238:
MOV RDI,RBX
MOV RSI,R14
PUSH R10
PUSH RAX
CALL 0x00118eaa
ADD RSP,0x10
TEST RAX,RAX
JZ 0x0011427e
TEST RBX,RBX
JZ 0x0011426a
CMP dword ptr [0x0014bf20],0x0
JZ 0x0011426a
MOV RDI,RBX
CALL 0x00118d9c
TEST RAX,RAX
JZ 0x0011429b
LAB_0011426a:
CMP qword ptr [0x0014bdb8],0x0
JNZ 0x001142ab
MOV RDI,RBX
CALL 0x00113ada
JMP 0x001142ab
LAB_0011427e:
MOV RDI,RBX
CALL 0x0011cece
LEA RDI,[0x136446]
XOR EBX,EBX
MOV RSI,RAX
XOR EAX,EAX
CALL 0x0011574b
JMP 0x001142ab
LAB_0011429b:
LEA RDI,[0x136450]
XOR EBX,EBX
XOR EAX,EAX
CALL 0x0011574b
LAB_001142ab:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_test_connect(long param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,ulong param_6,int8 param_7,int8 param_8)
{
long lVar1;
int8 uVar2;
if (force_tls != 0) {
param_6 = param_6 & 0xffffffff;
mysql_options(param_1,0x26,&force_tls);
}
lVar1 = mysql_real_connect(param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8);
if (lVar1 == 0) {
uVar2 = mysql_error(param_1);
param_1 = 0;
diag("error: %s",uVar2);
}
else {
if (((param_1 != 0) && (force_tls != 0)) && (lVar1 = mysql_get_ssl_cipher(param_1), lVar1 == 0))
{
diag("Error: TLS connection not established");
return 0;
}
if (this_host == 0) {
get_this_host(param_1);
}
}
return param_1;
}
| |
21,253 | my_strnncollsp_simple | eloqsql/strings/ctype-simple.c | int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *a, size_t a_length,
const uchar *b, size_t b_length)
{
const uchar *map= cs->sort_order, *end;
size_t length;
int res;
end= a + (length= MY_MIN(a_length, b_length));
while (a < end)
{
if (map[*a++] != map[*b++])
return ((int) map[a[-1]] - (int) map[b[-1]]);
}
res= 0;
if (a_length != b_length)
{
int swap= 1;
/*
Check the next not space character of the longer key. If it's < ' ',
then it's smaller than the other key.
*/
if (a_length < b_length)
{
/* put shorter key in s */
a_length= b_length;
a= b;
swap= -1; /* swap sign of result */
res= -res;
}
for (end= a + a_length-length; a < end ; a++)
{
if (map[*a] != map[' '])
return (map[*a] < map[' ']) ? -swap : swap;
}
}
return res;
} | O3 | c | my_strnncollsp_simple:
pushq %rbp
movq %rsp, %rbp
movq 0x58(%rdi), %rdi
cmpq %r8, %rdx
movq %r8, %r9
cmovbq %rdx, %r9
leaq (%rsi,%r9), %r10
cmpq %r10, %rsi
jae 0x3bc55
movzbl (%rsi), %eax
incq %rsi
movzbl (%rdi,%rax), %eax
movzbl (%rcx), %r11d
incq %rcx
movzbl (%rdi,%r11), %r11d
cmpb %r11b, %al
je 0x3bc30
subl %r11d, %eax
jmp 0x3bcab
cmpq %r8, %rdx
jne 0x3bc5e
xorl %eax, %eax
jmp 0x3bcab
xorl %eax, %eax
cmpq %r8, %rdx
cmovaq %rdx, %r8
cmovbq %rcx, %rsi
movl $0x0, %ecx
sbbl %ecx, %ecx
leaq (%rsi,%r8), %rdx
subq %r9, %rdx
cmpq %rdx, %rsi
jae 0x3bcab
orl $0x1, %ecx
movb 0x20(%rdi), %dl
subq %r9, %r8
xorl %eax, %eax
movzbl (%rsi,%rax), %r9d
movb (%rdi,%r9), %r9b
cmpb %dl, %r9b
jne 0x3bca1
incq %rax
cmpq %rax, %r8
jne 0x3bc89
jmp 0x3bc5a
movl %ecx, %eax
negl %eax
cmpb %dl, %r9b
cmovael %ecx, %eax
popq %rbp
retq
| my_strnncollsp_simple:
push rbp
mov rbp, rsp
mov rdi, [rdi+58h]
cmp rdx, r8
mov r9, r8
cmovb r9, rdx
lea r10, [rsi+r9]
loc_3BC30:
cmp rsi, r10
jnb short loc_3BC55
movzx eax, byte ptr [rsi]
inc rsi
movzx eax, byte ptr [rdi+rax]
movzx r11d, byte ptr [rcx]
inc rcx
movzx r11d, byte ptr [rdi+r11]
cmp al, r11b
jz short loc_3BC30
sub eax, r11d
jmp short loc_3BCAB
loc_3BC55:
cmp rdx, r8
jnz short loc_3BC5E
loc_3BC5A:
xor eax, eax
jmp short loc_3BCAB
loc_3BC5E:
xor eax, eax
cmp rdx, r8
cmova r8, rdx
cmovb rsi, rcx
mov ecx, 0
sbb ecx, ecx
lea rdx, [rsi+r8]
sub rdx, r9
cmp rsi, rdx
jnb short loc_3BCAB
or ecx, 1
mov dl, [rdi+20h]
sub r8, r9
xor eax, eax
loc_3BC89:
movzx r9d, byte ptr [rsi+rax]
mov r9b, [rdi+r9]
cmp r9b, dl
jnz short loc_3BCA1
inc rax
cmp r8, rax
jnz short loc_3BC89
jmp short loc_3BC5A
loc_3BCA1:
mov eax, ecx
neg eax
cmp r9b, dl
cmovnb eax, ecx
loc_3BCAB:
pop rbp
retn
| long long my_strnncollsp_simple(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
unsigned __int8 *a4,
unsigned long long a5)
{
long long v5; // rdi
unsigned long long v6; // r9
unsigned __int8 *v7; // r10
long long v8; // rax
int v9; // eax
long long v10; // r11
int v11; // r11d
long long result; // rax
bool v13; // cf
unsigned int v14; // ecx
unsigned __int8 v15; // dl
unsigned long long v16; // r8
long long v17; // rax
unsigned __int8 v18; // r9
v5 = *(_QWORD *)(a1 + 88);
v6 = a5;
if ( a3 < a5 )
v6 = a3;
v7 = &a2[v6];
while ( a2 < v7 )
{
v8 = *a2++;
v9 = *(unsigned __int8 *)(v5 + v8);
v10 = *a4++;
v11 = *(unsigned __int8 *)(v5 + v10);
if ( (_BYTE)v9 != (_BYTE)v11 )
return (unsigned int)(v9 - v11);
}
if ( a3 == a5 )
return 0LL;
result = 0LL;
v13 = a3 < a5;
if ( a3 > a5 )
a5 = a3;
if ( v13 )
a2 = a4;
if ( a2 < &a2[a5 - v6] )
{
v14 = v13 ? -1 : 1;
v15 = *(_BYTE *)(v5 + 32);
v16 = a5 - v6;
v17 = 0LL;
while ( 1 )
{
v18 = *(_BYTE *)(v5 + a2[v17]);
if ( v18 != v15 )
break;
if ( v16 == ++v17 )
return 0LL;
}
result = -v14;
if ( v18 >= v15 )
return v14;
}
return result;
}
| my_strnncollsp_simple:
PUSH RBP
MOV RBP,RSP
MOV RDI,qword ptr [RDI + 0x58]
CMP RDX,R8
MOV R9,R8
CMOVC R9,RDX
LEA R10,[RSI + R9*0x1]
LAB_0013bc30:
CMP RSI,R10
JNC 0x0013bc55
MOVZX EAX,byte ptr [RSI]
INC RSI
MOVZX EAX,byte ptr [RDI + RAX*0x1]
MOVZX R11D,byte ptr [RCX]
INC RCX
MOVZX R11D,byte ptr [RDI + R11*0x1]
CMP AL,R11B
JZ 0x0013bc30
SUB EAX,R11D
JMP 0x0013bcab
LAB_0013bc55:
CMP RDX,R8
JNZ 0x0013bc5e
LAB_0013bc5a:
XOR EAX,EAX
JMP 0x0013bcab
LAB_0013bc5e:
XOR EAX,EAX
CMP RDX,R8
CMOVA R8,RDX
CMOVC RSI,RCX
MOV ECX,0x0
SBB ECX,ECX
LEA RDX,[RSI + R8*0x1]
SUB RDX,R9
CMP RSI,RDX
JNC 0x0013bcab
OR ECX,0x1
MOV DL,byte ptr [RDI + 0x20]
SUB R8,R9
XOR EAX,EAX
LAB_0013bc89:
MOVZX R9D,byte ptr [RSI + RAX*0x1]
MOV R9B,byte ptr [RDI + R9*0x1]
CMP R9B,DL
JNZ 0x0013bca1
INC RAX
CMP R8,RAX
JNZ 0x0013bc89
JMP 0x0013bc5a
LAB_0013bca1:
MOV EAX,ECX
NEG EAX
CMP R9B,DL
CMOVNC EAX,ECX
LAB_0013bcab:
POP RBP
RET
|
uint my_strnncollsp_simple(long param_1,byte *param_2,ulong param_3,byte *param_4,ulong param_5)
{
byte *pbVar1;
byte bVar2;
byte bVar3;
long lVar4;
long lVar5;
uint uVar6;
ulong uVar7;
ulong uVar8;
lVar4 = *(long *)(param_1 + 0x58);
uVar8 = param_5;
if (param_3 < param_5) {
uVar8 = param_3;
}
pbVar1 = param_2 + uVar8;
while (param_2 < pbVar1) {
bVar2 = *param_2;
param_2 = param_2 + 1;
bVar3 = *param_4;
param_4 = param_4 + 1;
if (*(byte *)(lVar4 + (ulong)bVar2) != *(byte *)(lVar4 + (ulong)bVar3)) {
return (uint)*(byte *)(lVar4 + (ulong)bVar2) - (uint)*(byte *)(lVar4 + (ulong)bVar3);
}
}
if (param_3 != param_5) {
uVar7 = param_5;
if (param_5 < param_3) {
uVar7 = param_3;
}
if (param_3 < param_5) {
param_2 = param_4;
}
if (param_2 + (uVar7 - uVar8) <= param_2) {
return 0;
}
uVar6 = -(uint)(param_3 < param_5) | 1;
lVar5 = 0;
do {
if (*(byte *)(lVar4 + (ulong)param_2[lVar5]) != *(byte *)(lVar4 + 0x20)) {
if (*(byte *)(lVar4 + (ulong)param_2[lVar5]) < *(byte *)(lVar4 + 0x20)) {
return -uVar6;
}
return uVar6;
}
lVar5 = lVar5 + 1;
} while (uVar7 - uVar8 != lVar5);
}
return 0;
}
| |
21,254 | nglog::RemoveLogSink(nglog::LogSink*) | ng-log[P]ng-log/src/logging.cc | void RemoveLogSink(LogSink* destination) {
LogDestination::RemoveLogSink(destination);
} | O1 | cpp | nglog::RemoveLogSink(nglog::LogSink*):
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, 0x8(%rsp)
leaq 0x25500(%rip), %rdi # 0x32c18
callq 0x77f0
cmpl $0x23, %eax
je 0xd792
movq 0x254e7(%rip), %r15 # 0x32c10
testq %r15, %r15
je 0xd77c
movq (%r15), %rdi
movq 0x8(%r15), %rsi
leaq 0x8(%rsp), %rdx
callq 0x13c59
movq %rax, %rbx
movq 0x254c7(%rip), %rax # 0x32c10
movq 0x8(%rax), %r14
cmpq %r14, %rbx
je 0xd77c
movq 0x8(%r15), %rdx
subq %r14, %rdx
je 0xd766
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7880
movq 0x8(%r15), %rax
movq %rax, %rcx
subq %r14, %rcx
addq %rcx, %rbx
cmpq %rbx, %rax
je 0xd77c
movq %rbx, 0x8(%r15)
leaq 0x25495(%rip), %rdi # 0x32c18
callq 0x76d0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl $0x23, %edi
callq 0x7330
movq %rax, %rbx
leaq 0x25472(%rip), %rdi # 0x32c18
callq 0x76d0
movq %rbx, %rdi
callq 0x7930
| _ZN5nglog13RemoveLogSinkEPNS_7LogSinkE:
push r15
push r14
push rbx
sub rsp, 10h
mov [rsp+28h+var_20], rdi
lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_
call _pthread_rwlock_wrlock
cmp eax, 23h ; '#'
jz short loc_D792
mov r15, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_
test r15, r15
jz short loc_D77C
mov rdi, [r15]
mov rsi, [r15+8]
lea rdx, [rsp+28h+var_20]
call _ZSt11__remove_ifIN9__gnu_cxx17__normal_iteratorIPPN5nglog7LogSinkESt6vectorIS4_SaIS4_EEEENS0_5__ops16_Iter_equals_valIKS4_EEET_SE_SE_T0_; std::__remove_if<__gnu_cxx::__normal_iterator<nglog::LogSink **,std::vector<nglog::LogSink *>>,__gnu_cxx::__ops::_Iter_equals_val<nglog::LogSink * const>>(__gnu_cxx::__normal_iterator<nglog::LogSink **,std::vector<nglog::LogSink *>>,__gnu_cxx::__normal_iterator<nglog::LogSink **,std::vector<nglog::LogSink *>>,__gnu_cxx::__ops::_Iter_equals_val<nglog::LogSink * const>)
mov rbx, rax
mov rax, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_
mov r14, [rax+8]
cmp rbx, r14
jz short loc_D77C
mov rdx, [r15+8]
sub rdx, r14
jz short loc_D766
mov rdi, rbx
mov rsi, r14
call _memmove
loc_D766:
mov rax, [r15+8]
mov rcx, rax
sub rcx, r14
add rbx, rcx
cmp rax, rbx
jz short loc_D77C
mov [r15+8], rbx
loc_D77C:
lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_
call _pthread_rwlock_unlock
add rsp, 10h
pop rbx
pop r14
pop r15
retn
loc_D792:
mov edi, 23h ; '#'; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
mov rbx, rax
lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_
call _pthread_rwlock_unlock
mov rdi, rbx
call __Unwind_Resume
| long long nglog::RemoveLogSink(nglog *this, nglog::LogSink *a2)
{
long long v2; // r15
long long v3; // rbx
long long v4; // r14
long long v5; // rdx
long long v6; // rbx
nglog *v8; // [rsp+8h] [rbp-20h] BYREF
v8 = this;
if ( (unsigned int)pthread_rwlock_wrlock(&nglog::LogDestination::sink_mutex_) == 35 )
std::__throw_system_error(35);
v2 = nglog::LogDestination::sinks_;
if ( nglog::LogDestination::sinks_ )
{
v3 = std::__remove_if<__gnu_cxx::__normal_iterator<nglog::LogSink **,std::vector<nglog::LogSink *>>,__gnu_cxx::__ops::_Iter_equals_val<nglog::LogSink * const>>(
*(_QWORD *)nglog::LogDestination::sinks_,
*(_QWORD *)(nglog::LogDestination::sinks_ + 8),
&v8);
v4 = *(_QWORD *)(nglog::LogDestination::sinks_ + 8);
if ( v3 != v4 )
{
v5 = *(_QWORD *)(v2 + 8) - v4;
if ( v5 )
memmove(v3, *(_QWORD *)(nglog::LogDestination::sinks_ + 8), v5);
v6 = *(_QWORD *)(v2 + 8) - v4 + v3;
if ( *(_QWORD *)(v2 + 8) != v6 )
*(_QWORD *)(v2 + 8) = v6;
}
}
return pthread_rwlock_unlock(&nglog::LogDestination::sink_mutex_);
}
| RemoveLogSink:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV qword ptr [RSP + 0x8],RDI
LEA RDI,[0x132c18]
CALL 0x001077f0
CMP EAX,0x23
JZ 0x0010d792
MOV R15,qword ptr [0x00132c10]
TEST R15,R15
JZ 0x0010d77c
MOV RDI,qword ptr [R15]
MOV RSI,qword ptr [R15 + 0x8]
LAB_0010d735:
LEA RDX,[RSP + 0x8]
CALL 0x00113c59
LAB_0010d73f:
MOV RBX,RAX
MOV RAX,qword ptr [0x00132c10]
MOV R14,qword ptr [RAX + 0x8]
CMP RBX,R14
JZ 0x0010d77c
MOV RDX,qword ptr [R15 + 0x8]
SUB RDX,R14
JZ 0x0010d766
MOV RDI,RBX
MOV RSI,R14
CALL 0x00107880
LAB_0010d766:
MOV RAX,qword ptr [R15 + 0x8]
MOV RCX,RAX
SUB RCX,R14
ADD RBX,RCX
CMP RAX,RBX
JZ 0x0010d77c
MOV qword ptr [R15 + 0x8],RBX
LAB_0010d77c:
LEA RDI,[0x132c18]
CALL 0x001076d0
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
LAB_0010d792:
MOV EDI,0x23
CALL 0x00107330
|
/* nglog::RemoveLogSink(nglog::LogSink*) */
void nglog::RemoveLogSink(LogSink *param_1)
{
void *__src;
int8 *puVar1;
int iVar2;
void *__dest;
long lVar3;
LogSink *local_20;
local_20 = param_1;
iVar2 = pthread_rwlock_wrlock((pthread_rwlock_t *)LogDestination::sink_mutex_);
puVar1 = LogDestination::sinks_;
if (iVar2 != 0x23) {
if (LogDestination::sinks_ != (int8 *)0x0) {
/* try { // try from 0010d735 to 0010d73e has its CatchHandler @ 0010d79c */
__dest = (void *)std::
__remove_if<__gnu_cxx::__normal_iterator<nglog::LogSink**,std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>,__gnu_cxx::__ops::_Iter_equals_val<nglog::LogSink*const>>
(*LogDestination::sinks_,LogDestination::sinks_[1],&local_20);
__src = (void *)LogDestination::sinks_[1];
if (__dest != __src) {
if (puVar1[1] - (long)__src != 0) {
memmove(__dest,__src,puVar1[1] - (long)__src);
}
lVar3 = (long)__dest + (puVar1[1] - (long)__src);
if (puVar1[1] != lVar3) {
puVar1[1] = lVar3;
}
}
}
pthread_rwlock_unlock((pthread_rwlock_t *)LogDestination::sink_mutex_);
return;
}
/* WARNING: Subroutine does not return */
std::__throw_system_error(0x23);
}
| |
21,255 | translog_write_data_on_page | eloqsql/storage/maria/ma_loghandler.c | static my_bool translog_write_data_on_page(TRANSLOG_ADDRESS *horizon,
struct st_buffer_cursor *cursor,
translog_size_t length,
uchar *buffer)
{
DBUG_ENTER("translog_write_data_on_page");
DBUG_PRINT("enter", ("Chunk length: %lu Page size %u",
(ulong) length, (uint) cursor->current_page_fill));
DBUG_ASSERT(length > 0);
DBUG_ASSERT(length + cursor->current_page_fill <= TRANSLOG_PAGE_SIZE);
DBUG_ASSERT(length + cursor->ptr <= cursor->buffer->buffer +
TRANSLOG_WRITE_BUFFER);
memcpy(cursor->ptr, buffer, length);
cursor->ptr+= length;
(*horizon)+= length; /* adds offset */
cursor->current_page_fill+= length;
if (!cursor->chaser)
cursor->buffer->size+= length;
DBUG_PRINT("info", ("Write data buffer #%u: %p "
"chaser: %d Size: %lu (%lu)",
(uint) cursor->buffer->buffer_no, cursor->buffer,
cursor->chaser, (ulong) cursor->buffer->size,
(ulong) (cursor->ptr - cursor->buffer->buffer)));
translog_check_cursor(cursor);
DBUG_RETURN(0);
} | O0 | c | translog_write_data_on_page:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
jmp 0x93ce9
jmp 0x93ceb
jmp 0x93ced
jmp 0x93cef
jmp 0x93cf1
jmp 0x93cf3
jmp 0x93cf5
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
movl %eax, %edx
callq 0x2a0c0
movl -0x14(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
movl %edx, %edx
addq %rdx, %rcx
movq %rcx, 0x20(%rax)
movl -0x14(%rbp), %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movl -0x14(%rbp), %edx
movq -0x10(%rbp), %rax
movzwl 0x30(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x30(%rax)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x37(%rax)
jne 0x93d60
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
addl 0x100030(%rax), %ecx
movl %ecx, 0x100030(%rax)
jmp 0x93d62
jmp 0x93d64
movq -0x10(%rbp), %rdi
callq 0x8a630
jmp 0x93d6f
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| translog_write_data_on_page:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_20], rcx
jmp short $+2
loc_93CE9:
jmp short $+2
loc_93CEB:
jmp short $+2
loc_93CED:
jmp short $+2
loc_93CEF:
jmp short $+2
loc_93CF1:
jmp short $+2
loc_93CF3:
jmp short $+2
loc_93CF5:
mov rax, [rbp+var_10]
mov rdi, [rax+20h]
mov rsi, [rbp+var_20]
mov eax, [rbp+var_14]
mov edx, eax
call _memcpy
mov edx, [rbp+var_14]
mov rax, [rbp+var_10]
mov rcx, [rax+20h]
mov edx, edx
add rcx, rdx
mov [rax+20h], rcx
mov eax, [rbp+var_14]
mov ecx, eax
mov rax, [rbp+var_8]
add rcx, [rax]
mov [rax], rcx
mov edx, [rbp+var_14]
mov rax, [rbp+var_10]
movzx ecx, word ptr [rax+30h]
add ecx, edx
mov [rax+30h], cx
mov rax, [rbp+var_10]
cmp byte ptr [rax+37h], 0
jnz short loc_93D60
mov ecx, [rbp+var_14]
mov rax, [rbp+var_10]
mov rax, [rax+28h]
add ecx, [rax+100030h]
mov [rax+100030h], ecx
loc_93D60:
jmp short $+2
loc_93D62:
jmp short $+2
loc_93D64:
mov rdi, [rbp+var_10]
call translog_check_cursor
jmp short $+2
loc_93D6F:
xor eax, eax
add rsp, 20h
pop rbp
retn
| long long translog_write_data_on_page(_QWORD *a1, long long a2, unsigned int a3, long long a4)
{
memcpy(*(_QWORD *)(a2 + 32), a4, a3);
*(_QWORD *)(a2 + 32) += a3;
*a1 += a3;
*(_WORD *)(a2 + 48) += a3;
if ( !*(_BYTE *)(a2 + 55) )
*(_DWORD *)(*(_QWORD *)(a2 + 40) + 1048624LL) += a3;
translog_check_cursor();
return 0LL;
}
| translog_write_data_on_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV qword ptr [RBP + -0x20],RCX
JMP 0x00193ce9
LAB_00193ce9:
JMP 0x00193ceb
LAB_00193ceb:
JMP 0x00193ced
LAB_00193ced:
JMP 0x00193cef
LAB_00193cef:
JMP 0x00193cf1
LAB_00193cf1:
JMP 0x00193cf3
LAB_00193cf3:
JMP 0x00193cf5
LAB_00193cf5:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x20]
MOV RSI,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RBP + -0x14]
MOV EDX,EAX
CALL 0x0012a0c0
MOV EDX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x20]
MOV EDX,EDX
ADD RCX,RDX
MOV qword ptr [RAX + 0x20],RCX
MOV EAX,dword ptr [RBP + -0x14]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
ADD RCX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
MOV EDX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,word ptr [RAX + 0x30]
ADD ECX,EDX
MOV word ptr [RAX + 0x30],CX
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX + 0x37],0x0
JNZ 0x00193d60
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x28]
ADD ECX,dword ptr [RAX + 0x100030]
MOV dword ptr [RAX + 0x100030],ECX
LAB_00193d60:
JMP 0x00193d62
LAB_00193d62:
JMP 0x00193d64
LAB_00193d64:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0018a630
JMP 0x00193d6f
LAB_00193d6f:
XOR EAX,EAX
ADD RSP,0x20
POP RBP
RET
|
int8 translog_write_data_on_page(long *param_1,long param_2,uint param_3,void *param_4)
{
memcpy(*(void **)(param_2 + 0x20),param_4,(ulong)param_3);
*(ulong *)(param_2 + 0x20) = *(long *)(param_2 + 0x20) + (ulong)param_3;
*param_1 = (ulong)param_3 + *param_1;
*(short *)(param_2 + 0x30) = *(short *)(param_2 + 0x30) + (short)param_3;
if (*(char *)(param_2 + 0x37) == '\0') {
*(uint *)(Elf64_Ehdr_00100000.e_ident_pad + *(long *)(param_2 + 0x28) + 0x27) =
param_3 + *(int *)(Elf64_Ehdr_00100000.e_ident_pad + *(long *)(param_2 + 0x28) + 0x27);
}
translog_check_cursor(param_2);
return 0;
}
| |
21,256 | getopt_ull_limit_value | eloqsql/mysys/my_getopt.c | ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp,
my_bool *fix)
{
my_bool adjusted= FALSE;
ulonglong old= num;
char buf1[255], buf2[255];
DBUG_ENTER("getopt_ull_limit_value");
if ((ulonglong) num > (ulonglong) optp->max_value &&
optp->max_value) /* if max value is not set -> no upper limit */
{
num= (ulonglong) optp->max_value;
adjusted= TRUE;
}
switch ((optp->var_type & GET_TYPE_MASK)) {
case GET_UINT:
if (num > (ulonglong) UINT_MAX)
{
num= ((ulonglong) UINT_MAX);
adjusted= TRUE;
}
break;
case GET_ULONG:
#if SIZEOF_LONG < SIZEOF_LONG_LONG
if (num > (ulonglong) ULONG_MAX)
{
num= ((ulonglong) ULONG_MAX);
adjusted= TRUE;
}
#endif
break;
default:
DBUG_ASSERT((optp->var_type & GET_TYPE_MASK) == GET_ULL);
break;
}
if (optp->block_size > 1)
{
num/= (ulonglong) optp->block_size;
num*= (ulonglong) optp->block_size;
}
if (num < (ulonglong) optp->min_value)
{
num= (ulonglong) optp->min_value;
if (old < (ulonglong) optp->min_value)
adjusted= TRUE;
}
if (fix)
*fix= old != num;
else if (adjusted)
my_getopt_error_reporter(WARNING_LEVEL,
"option '%s': unsigned value %s adjusted to %s",
optp->name, ullstr(old, buf1), ullstr(num, buf2));
DBUG_RETURN(num);
} | O0 | c | getopt_ull_limit_value:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp # imm = 0x260
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x218(%rbp)
movq %rsi, -0x220(%rbp)
movq %rdx, -0x228(%rbp)
movb $0x0, -0x229(%rbp)
movq -0x218(%rbp), %rax
movq %rax, -0x238(%rbp)
movq -0x218(%rbp), %rax
movq -0x220(%rbp), %rcx
cmpq 0x50(%rcx), %rax
jbe 0x7912d
movq -0x220(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x7912d
movq -0x220(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x218(%rbp)
movb $0x1, -0x229(%rbp)
movq -0x220(%rbp), %rax
movq 0x30(%rax), %rax
andl $0x3f, %eax
movq %rax, -0x240(%rbp)
subq $0x4, %rax
je 0x79159
jmp 0x7914a
movq -0x240(%rbp), %rax
subq $0x6, %rax
je 0x7917c
jmp 0x7917e
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq %rax, -0x218(%rbp)
jbe 0x7917a
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movq %rax, -0x218(%rbp)
movb $0x1, -0x229(%rbp)
jmp 0x79184
jmp 0x79184
jmp 0x79180
jmp 0x79182
jmp 0x79184
movq -0x220(%rbp), %rax
cmpq $0x1, 0x60(%rax)
jle 0x791ca
movq -0x220(%rbp), %rax
movq 0x60(%rax), %rcx
movq -0x218(%rbp), %rax
xorl %edx, %edx
divq %rcx
movq %rax, -0x218(%rbp)
movq -0x220(%rbp), %rax
movq 0x60(%rax), %rax
imulq -0x218(%rbp), %rax
movq %rax, -0x218(%rbp)
movq -0x218(%rbp), %rax
movq -0x220(%rbp), %rcx
cmpq 0x48(%rcx), %rax
jae 0x7920d
movq -0x220(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x218(%rbp)
movq -0x238(%rbp), %rax
movq -0x220(%rbp), %rcx
cmpq 0x48(%rcx), %rax
jae 0x7920b
movb $0x1, -0x229(%rbp)
jmp 0x7920d
cmpq $0x0, -0x228(%rbp)
je 0x7923d
movq -0x238(%rbp), %rax
cmpq -0x218(%rbp), %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
movb %al, %cl
movq -0x228(%rbp), %rax
movb %cl, (%rax)
jmp 0x792c0
cmpb $0x0, -0x229(%rbp)
je 0x792be
leaq 0x1b82d3(%rip), %rax # 0x231520
movq (%rax), %rax
movq %rax, -0x248(%rbp)
movq -0x220(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x258(%rbp)
movq -0x238(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0xc2b50
movq %rax, -0x250(%rbp)
movq -0x218(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0xc2b50
movq -0x258(%rbp), %rdx
movq -0x250(%rbp), %rcx
movq -0x248(%rbp), %r9
movq %rax, %r8
movl $0x1, %edi
leaq 0x53a96(%rip), %rsi # 0xccd4f
movb $0x0, %al
callq *%r9
jmp 0x792c0
jmp 0x792c2
movq -0x218(%rbp), %rax
movq %rax, -0x260(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x792f2
movq -0x260(%rbp), %rax
addq $0x260, %rsp # imm = 0x260
popq %rbp
retq
callq 0x362b0
nopw (%rax,%rax)
| getopt_ull_limit_value:
push rbp
mov rbp, rsp
sub rsp, 260h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_218], rdi
mov [rbp+var_220], rsi
mov [rbp+var_228], rdx
mov [rbp+var_229], 0
mov rax, [rbp+var_218]
mov [rbp+var_238], rax
mov rax, [rbp+var_218]
mov rcx, [rbp+var_220]
cmp rax, [rcx+50h]
jbe short loc_7912D
mov rax, [rbp+var_220]
cmp qword ptr [rax+50h], 0
jz short loc_7912D
mov rax, [rbp+var_220]
mov rax, [rax+50h]
mov [rbp+var_218], rax
mov [rbp+var_229], 1
loc_7912D:
mov rax, [rbp+var_220]
mov rax, [rax+30h]
and eax, 3Fh
mov [rbp+var_240], rax
sub rax, 4
jz short loc_79159
jmp short $+2
loc_7914A:
mov rax, [rbp+var_240]
sub rax, 6
jz short loc_7917C
jmp short loc_7917E
loc_79159:
mov eax, 0FFFFFFFFh
cmp [rbp+var_218], rax
jbe short loc_7917A
mov eax, 0FFFFFFFFh
mov [rbp+var_218], rax
mov [rbp+var_229], 1
loc_7917A:
jmp short loc_79184
loc_7917C:
jmp short loc_79184
loc_7917E:
jmp short $+2
loc_79180:
jmp short $+2
loc_79182:
jmp short $+2
loc_79184:
mov rax, [rbp+var_220]
cmp qword ptr [rax+60h], 1
jle short loc_791CA
mov rax, [rbp+var_220]
mov rcx, [rax+60h]
mov rax, [rbp+var_218]
xor edx, edx
div rcx
mov [rbp+var_218], rax
mov rax, [rbp+var_220]
mov rax, [rax+60h]
imul rax, [rbp+var_218]
mov [rbp+var_218], rax
loc_791CA:
mov rax, [rbp+var_218]
mov rcx, [rbp+var_220]
cmp rax, [rcx+48h]
jnb short loc_7920D
mov rax, [rbp+var_220]
mov rax, [rax+48h]
mov [rbp+var_218], rax
mov rax, [rbp+var_238]
mov rcx, [rbp+var_220]
cmp rax, [rcx+48h]
jnb short loc_7920B
mov [rbp+var_229], 1
loc_7920B:
jmp short $+2
loc_7920D:
cmp [rbp+var_228], 0
jz short loc_7923D
mov rax, [rbp+var_238]
cmp rax, [rbp+var_218]
setnz al
and al, 1
movzx eax, al
mov cl, al
mov rax, [rbp+var_228]
mov [rax], cl
jmp loc_792C0
loc_7923D:
cmp [rbp+var_229], 0
jz short loc_792BE
lea rax, my_getopt_error_reporter
mov rax, [rax]
mov [rbp+var_248], rax
mov rax, [rbp+var_220]
mov rax, [rax]
mov [rbp+var_258], rax
mov rdi, [rbp+var_238]
lea rsi, [rbp+var_110]
call ullstr
mov [rbp+var_250], rax
mov rdi, [rbp+var_218]
lea rsi, [rbp+var_210]
call ullstr
mov rdx, [rbp+var_258]
mov rcx, [rbp+var_250]
mov r9, [rbp+var_248]
mov r8, rax
mov edi, 1
lea rsi, aOptionSUnsigne; "option '%s': unsigned value %s adjusted"...
mov al, 0
call r9
loc_792BE:
jmp short $+2
loc_792C0:
jmp short $+2
loc_792C2:
mov rax, [rbp+var_218]
mov [rbp+var_260], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_792F2
mov rax, [rbp+var_260]
add rsp, 260h
pop rbp
retn
loc_792F2:
call ___stack_chk_fail
| unsigned long long getopt_ull_limit_value(unsigned long long a1, long long a2, bool *a3)
{
const char *v3; // rax
const char *v5; // [rsp+8h] [rbp-258h]
const char *v6; // [rsp+10h] [rbp-250h]
long long (*v7)(int, long long, ...); // [rsp+18h] [rbp-248h]
char v8; // [rsp+37h] [rbp-229h]
unsigned long long v9; // [rsp+48h] [rbp-218h]
_BYTE v10[256]; // [rsp+50h] [rbp-210h] BYREF
_BYTE v11[264]; // [rsp+150h] [rbp-110h] BYREF
unsigned long long v12; // [rsp+258h] [rbp-8h]
v12 = __readfsqword(0x28u);
v9 = a1;
v8 = 0;
if ( a1 > *(_QWORD *)(a2 + 80) && *(_QWORD *)(a2 + 80) )
{
v9 = *(_QWORD *)(a2 + 80);
v8 = 1;
}
if ( (*(_QWORD *)(a2 + 48) & 0x3FLL) == 4 && v9 > 0xFFFFFFFF )
{
v9 = 0xFFFFFFFFLL;
v8 = 1;
}
if ( *(long long *)(a2 + 96) > 1 )
v9 = v9 / *(_QWORD *)(a2 + 96) * *(_QWORD *)(a2 + 96);
if ( v9 < *(_QWORD *)(a2 + 72) )
{
v9 = *(_QWORD *)(a2 + 72);
if ( a1 < v9 )
v8 = 1;
}
if ( a3 )
{
*a3 = a1 != v9;
}
else if ( v8 )
{
v7 = my_getopt_error_reporter;
v5 = *(const char **)a2;
v6 = (const char *)ullstr(a1, v11);
v3 = (const char *)ullstr(v9, v10);
v7(1, (long long)"option '%s': unsigned value %s adjusted to %s", v5, v6, v3);
}
return v9;
}
| getopt_ull_limit_value:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x260
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x218],RDI
MOV qword ptr [RBP + -0x220],RSI
MOV qword ptr [RBP + -0x228],RDX
MOV byte ptr [RBP + -0x229],0x0
MOV RAX,qword ptr [RBP + -0x218]
MOV qword ptr [RBP + -0x238],RAX
MOV RAX,qword ptr [RBP + -0x218]
MOV RCX,qword ptr [RBP + -0x220]
CMP RAX,qword ptr [RCX + 0x50]
JBE 0x0017912d
MOV RAX,qword ptr [RBP + -0x220]
CMP qword ptr [RAX + 0x50],0x0
JZ 0x0017912d
MOV RAX,qword ptr [RBP + -0x220]
MOV RAX,qword ptr [RAX + 0x50]
MOV qword ptr [RBP + -0x218],RAX
MOV byte ptr [RBP + -0x229],0x1
LAB_0017912d:
MOV RAX,qword ptr [RBP + -0x220]
MOV RAX,qword ptr [RAX + 0x30]
AND EAX,0x3f
MOV qword ptr [RBP + -0x240],RAX
SUB RAX,0x4
JZ 0x00179159
JMP 0x0017914a
LAB_0017914a:
MOV RAX,qword ptr [RBP + -0x240]
SUB RAX,0x6
JZ 0x0017917c
JMP 0x0017917e
LAB_00179159:
MOV EAX,0xffffffff
CMP qword ptr [RBP + -0x218],RAX
JBE 0x0017917a
MOV EAX,0xffffffff
MOV qword ptr [RBP + -0x218],RAX
MOV byte ptr [RBP + -0x229],0x1
LAB_0017917a:
JMP 0x00179184
LAB_0017917c:
JMP 0x00179184
LAB_0017917e:
JMP 0x00179180
LAB_00179180:
JMP 0x00179182
LAB_00179182:
JMP 0x00179184
LAB_00179184:
MOV RAX,qword ptr [RBP + -0x220]
CMP qword ptr [RAX + 0x60],0x1
JLE 0x001791ca
MOV RAX,qword ptr [RBP + -0x220]
MOV RCX,qword ptr [RAX + 0x60]
MOV RAX,qword ptr [RBP + -0x218]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x218],RAX
MOV RAX,qword ptr [RBP + -0x220]
MOV RAX,qword ptr [RAX + 0x60]
IMUL RAX,qword ptr [RBP + -0x218]
MOV qword ptr [RBP + -0x218],RAX
LAB_001791ca:
MOV RAX,qword ptr [RBP + -0x218]
MOV RCX,qword ptr [RBP + -0x220]
CMP RAX,qword ptr [RCX + 0x48]
JNC 0x0017920d
MOV RAX,qword ptr [RBP + -0x220]
MOV RAX,qword ptr [RAX + 0x48]
MOV qword ptr [RBP + -0x218],RAX
MOV RAX,qword ptr [RBP + -0x238]
MOV RCX,qword ptr [RBP + -0x220]
CMP RAX,qword ptr [RCX + 0x48]
JNC 0x0017920b
MOV byte ptr [RBP + -0x229],0x1
LAB_0017920b:
JMP 0x0017920d
LAB_0017920d:
CMP qword ptr [RBP + -0x228],0x0
JZ 0x0017923d
MOV RAX,qword ptr [RBP + -0x238]
CMP RAX,qword ptr [RBP + -0x218]
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x228]
MOV byte ptr [RAX],CL
JMP 0x001792c0
LAB_0017923d:
CMP byte ptr [RBP + -0x229],0x0
JZ 0x001792be
LEA RAX,[0x331520]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x248],RAX
MOV RAX,qword ptr [RBP + -0x220]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x258],RAX
MOV RDI,qword ptr [RBP + -0x238]
LEA RSI,[RBP + -0x110]
CALL 0x001c2b50
MOV qword ptr [RBP + -0x250],RAX
MOV RDI,qword ptr [RBP + -0x218]
LEA RSI,[RBP + -0x210]
CALL 0x001c2b50
MOV RDX,qword ptr [RBP + -0x258]
MOV RCX,qword ptr [RBP + -0x250]
MOV R9,qword ptr [RBP + -0x248]
MOV R8,RAX
MOV EDI,0x1
LEA RSI,[0x1ccd4f]
MOV AL,0x0
CALL R9
LAB_001792be:
JMP 0x001792c0
LAB_001792c0:
JMP 0x001792c2
LAB_001792c2:
MOV RAX,qword ptr [RBP + -0x218]
MOV qword ptr [RBP + -0x260],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001792f2
MOV RAX,qword ptr [RBP + -0x260]
ADD RSP,0x260
POP RBP
RET
LAB_001792f2:
CALL 0x001362b0
|
ulong getopt_ull_limit_value(ulong param_1,int8 *param_2,ulong param_3)
{
int8 uVar1;
bool bVar2;
int *puVar3;
int8 uVar4;
int8 uVar5;
ulong uVar6;
long in_FS_OFFSET;
ulong local_220;
int1 local_218 [256];
int1 local_118 [264];
long local_10;
puVar3 = my_getopt_error_reporter;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
bVar2 = false;
local_220 = param_1;
if (((ulong)param_2[10] < param_1) && (param_2[10] != 0)) {
local_220 = param_2[10];
bVar2 = true;
}
if ((((uint)param_2[6] & 0x3f) == 4) && (0xffffffff < local_220)) {
local_220 = 0xffffffff;
bVar2 = true;
}
uVar6 = param_3;
if (1 < (long)param_2[0xc]) {
uVar6 = local_220 % (ulong)param_2[0xc];
local_220 = param_2[0xc] * (local_220 / (ulong)param_2[0xc]);
}
if ((local_220 < (ulong)param_2[9]) && (local_220 = param_2[9], param_1 < (ulong)param_2[9])) {
bVar2 = true;
}
if (param_3 == 0) {
if (bVar2) {
uVar1 = *param_2;
uVar4 = ullstr(param_1,local_118,uVar6);
uVar5 = ullstr(local_220,local_218);
(*(code *)puVar3)(1,"option \'%s\': unsigned value %s adjusted to %s",uVar1,uVar4,uVar5);
}
}
else {
*(bool *)param_3 = param_1 != local_220;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_220;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
21,257 | long minja::Value::get<long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, long) const | llama.cpp/common/minja/minja.hpp | T get(const std::string & key, T default_value) const {
if (!contains(key)) return default_value;
return at(key).get<T>();
} | O3 | cpp | long minja::Value::get<long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, long) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
callq 0xc55cc
testb %al, %al
je 0xc55ac
movq %rsp, %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0xbf7de
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc3c26
movq %rax, %rdi
callq 0xc5716
movq %rax, %rbx
leaq 0x40(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x88a76
movq %r14, %rdi
callq 0x8d190
leaq 0x38(%rsp), %rdi
callq 0x7416e
leaq 0x28(%rsp), %rdi
callq 0x7416e
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x7416e
movq -0x10(%r14), %rdi
testq %rdi, %rdi
je 0xc55ac
movq 0xa0a11(%rip), %rax # 0x165f98
cmpb $0x0, (%rax)
je 0xc5597
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xc55a1
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xc55ac
movq (%rdi), %rax
callq *0x18(%rax)
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0xb9a74
movq %rbx, %rdi
callq 0x20b50
| _ZNK5minja5Value3getIlEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES2_:
push r15
push r14
push rbx
sub rsp, 50h
mov rbx, rdx
mov r15, rsi
mov r14, rdi
call _ZNK5minja5Value8containsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::contains(std::string const&)
test al, al
jz loc_C55AC
mov rbx, rsp
mov rdi, rbx
mov rsi, r15
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rdi, r14; this
mov rsi, rbx; minja::Value *
call _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&)
mov rdi, rax
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
mov rbx, rax
lea r14, [rsp+68h+var_28]
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()
lea rdi, [rsp+68h+var_30]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+68h+var_40]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea r14, [rsp+68h+var_50]
mov rdi, r14
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, [r14-10h]
test rdi, rdi
jz short loc_C55AC
mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rax], 0
jz short loc_C5597
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_C55A1
loc_C5597:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_C55A1:
cmp eax, 1
jnz short loc_C55AC
mov rax, [rdi]
call qword ptr [rax+18h]
loc_C55AC:
mov rax, rbx
add rsp, 50h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
mov rdi, rsp; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, rbx
call __Unwind_Resume
| long long minja::Value::get<long>(minja::Value *this, long long a2, long long a3)
{
unsigned long long v4; // rax
long long v5; // rdi
signed __int32 v6; // eax
long long v8; // [rsp+0h] [rbp-68h] BYREF
long long v9; // [rsp+8h] [rbp-60h]
volatile signed __int32 *v10; // [rsp+18h] [rbp-50h] BYREF
volatile signed __int32 *v11; // [rsp+28h] [rbp-40h] BYREF
volatile signed __int32 *v12; // [rsp+38h] [rbp-30h] BYREF
char v13[40]; // [rsp+40h] [rbp-28h] BYREF
if ( (unsigned __int8)minja::Value::contains() )
{
minja::Value::Value((long long)&v8, a2);
v4 = minja::Value::at(this, (const minja::Value *)&v8);
a3 = minja::Value::get<long>(v4);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v13);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v13);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v12);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v11);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v10);
v5 = v9;
if ( v9 )
{
if ( _libc_single_threaded )
{
v6 = *(_DWORD *)(v9 + 12);
*(_DWORD *)(v9 + 12) = v6 - 1;
}
else
{
v6 = _InterlockedExchangeAdd((volatile signed __int32 *)(v9 + 12), 0xFFFFFFFF);
}
if ( v6 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v5 + 24LL))(v5, 0LL);
}
}
return a3;
}
| get<long>:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV RBX,RDX
MOV R15,RSI
MOV R14,RDI
CALL 0x001c55cc
TEST AL,AL
JZ 0x001c55ac
MOV RBX,RSP
MOV RDI,RBX
MOV RSI,R15
CALL 0x001bf7de
LAB_001c5529:
MOV RDI,R14
MOV RSI,RBX
CALL 0x001c3c26
MOV RDI,RAX
CALL 0x001c5716
LAB_001c553c:
MOV RBX,RAX
LEA R14,[RSP + 0x40]
MOV RDI,R14
XOR ESI,ESI
CALL 0x00188a76
MOV RDI,R14
CALL 0x0018d190
LEA RDI,[RSP + 0x38]
CALL 0x0017416e
LEA RDI,[RSP + 0x28]
CALL 0x0017416e
LEA R14,[RSP + 0x18]
MOV RDI,R14
CALL 0x0017416e
MOV RDI,qword ptr [R14 + -0x10]
TEST RDI,RDI
JZ 0x001c55ac
MOV RAX,qword ptr [0x00265f98]
CMP byte ptr [RAX],0x0
JZ 0x001c5597
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001c55a1
LAB_001c5597:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001c55a1:
CMP EAX,0x1
JNZ 0x001c55ac
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001c55ac:
MOV RAX,RBX
ADD RSP,0x50
POP RBX
POP R14
POP R15
RET
|
/* long minja::Value::get<long>(std::__cxx11::string const&, long) const */
long __thiscall minja::Value::get<long>(Value *this,string *param_1,long param_2)
{
int *piVar1;
char cVar2;
int iVar3;
Value *this_00;
Value aVStack_68 [8];
long *local_60;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_50 [16];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_40 [16];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_30 [8];
data local_28 [16];
cVar2 = contains(this,param_1);
if (cVar2 != '\0') {
Value(aVStack_68,param_1);
/* try { // try from 001c5529 to 001c553b has its CatchHandler @ 001c55b9 */
this_00 = (Value *)at(this,aVStack_68);
param_2 = get<long>(this_00);
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_28,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_28);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_30);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_40);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_50);
if (local_60 != (long *)0x0) {
if (*PTR___libc_single_threaded_00265f98 == '\0') {
LOCK();
piVar1 = (int *)((long)local_60 + 0xc);
iVar3 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar3 = *(int *)((long)local_60 + 0xc);
*(int *)((long)local_60 + 0xc) = iVar3 + -1;
}
if (iVar3 == 1) {
(**(code **)(*local_60 + 0x18))();
}
}
}
return param_2;
}
| |
21,258 | minja::Parser::unterminated(minja::TemplateToken const&) const | monkey531[P]llama/common/minja.hpp | std::runtime_error unterminated(const TemplateToken & token) const {
return std::runtime_error("Unterminated " + TemplateToken::typeToString(token.type)
+ error_location_suffix(*template_str, token.location.pos));
} | O2 | cpp | minja::Parser::unterminated(minja::TemplateToken const&) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl 0x8(%rdx), %esi
leaq 0x68(%rsp), %r12
movq %r12, %rdi
callq 0x72bca
leaq 0x4288a(%rip), %rsi # 0xb4ac6
leaq 0x28(%rsp), %rdi
movq %r12, %rdx
callq 0x58886
movq (%r15), %rsi
movq 0x20(%r14), %rdx
leaq 0x8(%rsp), %rdi
callq 0x57dba
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x3956b
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x23e70
leaq 0x48(%rsp), %rdi
callq 0x241f8
leaq 0x8(%rsp), %rdi
callq 0x241f8
leaq 0x28(%rsp), %rdi
callq 0x241f8
leaq 0x68(%rsp), %rdi
callq 0x241f8
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x241f8
jmp 0x722c7
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x241f8
jmp 0x722d6
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x241f8
jmp 0x722e5
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x241f8
movq %rbx, %rdi
callq 0x23fc0
nop
| _ZNK5minja6Parser12unterminatedERKNS_13TemplateTokenE:
push r15
push r14
push r12
push rbx
sub rsp, 88h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov esi, [rdx+8]
lea r12, [rsp+0A8h+var_40]
mov rdi, r12
call _ZN5minja13TemplateToken12typeToStringB5cxx11ENS0_4TypeE; minja::TemplateToken::typeToString(minja::TemplateToken::Type)
lea rsi, aUnterminated; "Unterminated "
lea rdi, [rsp+0A8h+var_80]
mov rdx, r12
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov rsi, [r15]
mov rdx, [r14+20h]
lea rdi, [rsp+0A8h+var_A0]
call _ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; minja::error_location_suffix(std::string const&,ulong)
lea rdi, [rsp+0A8h+var_60]
lea rsi, [rsp+0A8h+var_80]
lea rdx, [rsp+0A8h+var_A0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
lea rsi, [rsp+0A8h+var_60]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
lea rdi, [rsp+0A8h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0A8h+var_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0A8h+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0A8h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 88h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_722C7
mov rbx, rax
loc_722C7:
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_722D6
mov rbx, rax
loc_722D6:
lea rdi, [rsp+arg_20]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_722E5
mov rbx, rax
loc_722E5:
lea rdi, [rsp+arg_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::unterminated(minja::Parser *this, const minja::TemplateToken *a2, long long a3)
{
_QWORD v5[4]; // [rsp+8h] [rbp-A0h] BYREF
_QWORD v6[4]; // [rsp+28h] [rbp-80h] BYREF
_BYTE v7[32]; // [rsp+48h] [rbp-60h] BYREF
_BYTE v8[64]; // [rsp+68h] [rbp-40h] BYREF
minja::TemplateToken::typeToString[abi:cxx11](v8, *(unsigned int *)(a3 + 8));
std::operator+<char>((long long)v6, (long long)"Unterminated ", (long long)v8);
minja::error_location_suffix((long long)v5, *(_QWORD *)a2, *(_QWORD *)(a3 + 32));
std::operator+<char>((long long)v7, v6, v5);
std::runtime_error::runtime_error(this, v7);
std::string::~string(v7);
std::string::~string(v5);
std::string::~string(v6);
std::string::~string(v8);
return this;
}
| unterminated:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV ESI,dword ptr [RDX + 0x8]
LEA R12,[RSP + 0x68]
MOV RDI,R12
CALL 0x00172bca
LAB_00172235:
LEA RSI,[0x1b4ac6]
LEA RDI,[RSP + 0x28]
MOV RDX,R12
CALL 0x00158886
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R14 + 0x20]
LAB_00172250:
LEA RDI,[RSP + 0x8]
CALL 0x00157dba
LAB_0017225a:
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x0013956b
LAB_0017226e:
LEA RSI,[RSP + 0x48]
MOV RDI,RBX
CALL 0x00123e70
LAB_0017227b:
LEA RDI,[RSP + 0x48]
CALL 0x001241f8
LEA RDI,[RSP + 0x8]
CALL 0x001241f8
LEA RDI,[RSP + 0x28]
CALL 0x001241f8
LEA RDI,[RSP + 0x68]
CALL 0x001241f8
MOV RAX,RBX
ADD RSP,0x88
POP RBX
POP R12
POP R14
POP R15
RET
|
/* minja::Parser::unterminated(minja::TemplateToken const&) const */
TemplateToken * minja::Parser::unterminated(TemplateToken *param_1)
{
long in_RDX;
int8 *in_RSI;
minja local_a0 [32];
string local_80 [32];
string local_60 [32];
TemplateToken local_40 [32];
TemplateToken::typeToString_abi_cxx11_(local_40,*(int4 *)(in_RDX + 8));
/* try { // try from 00172235 to 00172248 has its CatchHandler @ 001722e2 */
std::operator+((char *)local_80,(string *)"Unterminated ");
/* try { // try from 00172250 to 00172259 has its CatchHandler @ 001722d3 */
error_location_suffix(local_a0,(string *)*in_RSI,*(ulong *)(in_RDX + 0x20));
/* try { // try from 0017225a to 0017226d has its CatchHandler @ 001722c4 */
std::operator+(local_60,local_80);
/* try { // try from 0017226e to 0017227a has its CatchHandler @ 001722b5 */
std::runtime_error::runtime_error((runtime_error *)param_1,local_60);
std::__cxx11::string::~string(local_60);
std::__cxx11::string::~string((string *)local_a0);
std::__cxx11::string::~string(local_80);
std::__cxx11::string::~string((string *)local_40);
return param_1;
}
| |
21,259 | minja::Parser::unterminated(minja::TemplateToken const&) const | monkey531[P]llama/common/minja.hpp | std::runtime_error unterminated(const TemplateToken & token) const {
return std::runtime_error("Unterminated " + TemplateToken::typeToString(token.type)
+ error_location_suffix(*template_str, token.location.pos));
} | O3 | cpp | minja::Parser::unterminated(minja::TemplateToken const&) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl 0x8(%rdx), %esi
leaq 0x68(%rsp), %r12
movq %r12, %rdi
callq 0x998d2
leaq 0x57d06(%rip), %rcx # 0xf0ad6
movl $0xd, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1a9e0
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x98e0a
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x98e12
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%r15), %rsi
movq 0x20(%r14), %rdx
leaq 0x48(%rsp), %rdi
callq 0x778f4
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %r8
movq 0x50(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r12, %rcx
je 0x98e5d
movq 0x38(%rsp), %rdi
movq 0x48(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x98e80
leaq 0x58(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x98e7b
movq 0x58(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x98e8c
leaq 0x28(%rsp), %rdi
callq 0x1a270
jmp 0x98e9a
leaq 0x48(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1a9e0
leaq 0x18(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x98ebe
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x98ec4
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1ae50
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x98f09
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8d0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x98f24
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x1a8d0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x98f3b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1a8d0
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x98f56
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x1a8d0
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x98f8b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8d0
jmp 0x98f8b
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x98fab
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x1a8d0
jmp 0x98fab
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x98fc7
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1a8d0
jmp 0x98fc7
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x98fe2
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x1a8d0
movq %rbx, %rdi
callq 0x1afc0
| _ZNK5minja6Parser12unterminatedERKNS_13TemplateTokenE:
push r15; int
push r14; int
push r12; int
push rbx; int
sub rsp, 88h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov esi, [rdx+8]
lea r12, [rsp+0A8h+var_40]
mov rdi, r12
call _ZN5minja13TemplateToken12typeToStringB5cxx11ENS0_4TypeE; minja::TemplateToken::typeToString(minja::TemplateToken::Type)
lea rcx, aUnterminated; "Unterminated "
mov r8d, 0Dh
mov rdi, r12
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
lea r12, [rsp+0A8h+var_70]
mov [r12-10h], r12
mov rdx, [rax]
mov rcx, rax
add rcx, 10h; int
cmp rdx, rcx
jz short loc_98E0A
mov [rsp+0A8h+var_80], rdx
mov rdx, [rcx]
mov [rsp+0A8h+var_70], rdx
jmp short loc_98E12
loc_98E0A:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r12], xmm0
loc_98E12:
mov rdx, [rax+8]
mov qword ptr [rsp+0A8h+var_78], rdx; int
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rsi, [r15]; int
mov rdx, [r14+20h]; int
lea rdi, [rsp+0A8h+var_60]; int
call _ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; minja::error_location_suffix(std::string const&,ulong)
mov rcx, [rsp+0A8h+var_80]
mov r8, qword ptr [rsp+0A8h+var_78]
mov rdx, [rsp+0A8h+var_58]
lea rax, [rdx+r8]
mov edi, 0Fh
cmp rcx, r12
jz short loc_98E5D
mov rdi, [rsp+0A8h+var_70]
loc_98E5D:
mov rsi, qword ptr [rsp+0A8h+var_60]
cmp rax, rdi
jbe short loc_98E80
lea r9, [rsp+0A8h+var_50]
mov edi, 0Fh
cmp rsi, r9
jz short loc_98E7B
mov rdi, [rsp+0A8h+var_50]
loc_98E7B:
cmp rax, rdi
jbe short loc_98E8C
loc_98E80:
lea rdi, [rsp+0A8h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
jmp short loc_98E9A
loc_98E8C:
lea rdi, [rsp+0A8h+var_60]
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
loc_98E9A:
lea rdx, [rsp+0A8h+var_90]
mov [rdx-10h], rdx
mov rsi, [rax]
lea rcx, [rax+10h]
cmp rsi, rcx
jz short loc_98EBE
mov [rsp+0A8h+var_A0], rsi
mov rdx, [rcx]
mov [rsp+0A8h+var_90], rdx
jmp short loc_98EC4
loc_98EBE:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rdx], xmm0
loc_98EC4:
mov rdx, rax
add rdx, 8
mov rsi, [rax+8]
mov [rsp+0A8h+var_98], rsi
mov [rax], rcx
mov qword ptr [rdx], 0
mov byte ptr [rcx], 0
lea rsi, [rsp+0A8h+var_A0]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
lea rax, [rsp+0A8h+var_90]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_98F09
mov rsi, [rsp+0A8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_98F09:
lea rax, [rsp+0A8h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_98F24
mov rsi, [rsp+0A8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_98F24:
mov rdi, [rsp+0A8h+var_80]; void *
cmp rdi, r12
jz short loc_98F3B
mov rsi, [rsp+0A8h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_98F3B:
lea rax, [rsp+0A8h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_98F56
mov rsi, [rsp+0A8h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_98F56:
mov rax, rbx
add rsp, 88h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_98F8B
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_98F8B
mov rbx, rax
loc_98F8B:
lea rax, [rsp+arg_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_98FAB
mov rsi, [rsp+arg_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_98FAB
mov rbx, rax
loc_98FAB:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r12
jz short loc_98FC7
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_98FC7
mov rbx, rax
loc_98FC7:
lea rax, [rsp+arg_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_98FE2
mov rsi, [rsp+arg_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_98FE2:
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::unterminated(minja::Parser *this, const minja::TemplateToken *a2, long long a3)
{
long long v5; // rax
__int128 *v6; // rcx
unsigned long long v7; // rax
unsigned long long v8; // rdi
unsigned long long v9; // rdi
void **v10; // rax
__int128 *v11; // rcx
void *v13[2]; // [rsp+8h] [rbp-A0h] BYREF
__int128 v14; // [rsp+18h] [rbp-90h] BYREF
void *v15; // [rsp+28h] [rbp-80h] BYREF
int v16[2]; // [rsp+30h] [rbp-78h]
__int128 v17; // [rsp+38h] [rbp-70h] BYREF
int v18[2]; // [rsp+48h] [rbp-60h] BYREF
long long v19; // [rsp+50h] [rbp-58h]
_QWORD v20[2]; // [rsp+58h] [rbp-50h] BYREF
void *v21[2]; // [rsp+68h] [rbp-40h] BYREF
long long v22; // [rsp+78h] [rbp-30h] BYREF
minja::TemplateToken::typeToString[abi:cxx11](v21, *(unsigned int *)(a3 + 8));
v5 = std::string::replace(v21, 0LL, 0LL, "Unterminated ", 13LL);
v15 = &v17;
v6 = (__int128 *)(v5 + 16);
if ( *(_QWORD *)v5 == v5 + 16 )
{
v17 = *v6;
}
else
{
v15 = *(void **)v5;
*(_QWORD *)&v17 = *(_QWORD *)v6;
}
*(_QWORD *)v16 = *(_QWORD *)(v5 + 8);
*(_QWORD *)v5 = v6;
*(_QWORD *)(v5 + 8) = 0LL;
*(_BYTE *)(v5 + 16) = 0;
minja::error_location_suffix((long long)v18, *(_QWORD *)a2, *(_QWORD *)(a3 + 32));
v7 = v19 + *(_QWORD *)v16;
v8 = 15LL;
if ( v15 != &v17 )
v8 = v17;
if ( v7 <= v8 )
goto LABEL_10;
v9 = 15LL;
if ( *(_QWORD **)v18 != v20 )
v9 = v20[0];
if ( v7 <= v9 )
v10 = (void **)std::string::replace(v18, 0LL, 0LL, v15, *(_QWORD *)v16);
else
LABEL_10:
v10 = (void **)std::string::_M_append(&v15, *(_QWORD *)v18, v19);
v13[0] = &v14;
v11 = (__int128 *)(v10 + 2);
if ( *v10 == v10 + 2 )
{
v14 = *v11;
}
else
{
v13[0] = *v10;
*(_QWORD *)&v14 = *(_QWORD *)v11;
}
v13[1] = v10[1];
*v10 = v11;
v10[1] = 0LL;
*(_BYTE *)v11 = 0;
std::runtime_error::runtime_error(this, v13);
if ( v13[0] != &v14 )
operator delete(v13[0], v14 + 1);
if ( *(_QWORD **)v18 != v20 )
operator delete(*(void **)v18, v20[0] + 1LL);
if ( v15 != &v17 )
operator delete(v15, v17 + 1);
if ( v21[0] != &v22 )
operator delete(v21[0], v22 + 1);
return this;
}
| unterminated:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV ESI,dword ptr [RDX + 0x8]
LEA R12,[RSP + 0x68]
MOV RDI,R12
CALL 0x001998d2
LAB_00198dc9:
LEA RCX,[0x1f0ad6]
MOV R8D,0xd
MOV RDI,R12
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0011a9e0
LEA R12,[RSP + 0x38]
MOV qword ptr [R12 + -0x10],R12
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x00198e0a
MOV qword ptr [RSP + 0x28],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x38],RDX
JMP 0x00198e12
LAB_00198e0a:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R12],XMM0
LAB_00198e12:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R14 + 0x20]
LAB_00198e31:
LEA RDI,[RSP + 0x48]
CALL 0x001778f4
MOV RCX,qword ptr [RSP + 0x28]
MOV R8,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x50]
LEA RAX,[RDX + R8*0x1]
MOV EDI,0xf
CMP RCX,R12
JZ 0x00198e5d
MOV RDI,qword ptr [RSP + 0x38]
LAB_00198e5d:
MOV RSI,qword ptr [RSP + 0x48]
CMP RAX,RDI
JBE 0x00198e80
LEA R9,[RSP + 0x58]
MOV EDI,0xf
CMP RSI,R9
JZ 0x00198e7b
MOV RDI,qword ptr [RSP + 0x58]
LAB_00198e7b:
CMP RAX,RDI
JBE 0x00198e8c
LAB_00198e80:
LEA RDI,[RSP + 0x28]
CALL 0x0011a270
JMP 0x00198e9a
LAB_00198e8c:
LEA RDI,[RSP + 0x48]
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0011a9e0
LAB_00198e9a:
LEA RDX,[RSP + 0x18]
MOV qword ptr [RDX + -0x10],RDX
MOV RSI,qword ptr [RAX]
LEA RCX,[RAX + 0x10]
CMP RSI,RCX
JZ 0x00198ebe
MOV qword ptr [RSP + 0x8],RSI
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x18],RDX
JMP 0x00198ec4
LAB_00198ebe:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RDX],XMM0
LAB_00198ec4:
MOV RDX,RAX
ADD RDX,0x8
MOV RSI,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x10],RSI
MOV qword ptr [RAX],RCX
MOV qword ptr [RDX],0x0
MOV byte ptr [RCX],0x0
LAB_00198ee1:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0011ae50
LAB_00198eee:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00198f09
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011a8d0
LAB_00198f09:
LEA RAX,[RSP + 0x58]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00198f24
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x0011a8d0
LAB_00198f24:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R12
JZ 0x00198f3b
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011a8d0
LAB_00198f3b:
LEA RAX,[RSP + 0x78]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00198f56
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x0011a8d0
LAB_00198f56:
MOV RAX,RBX
ADD RSP,0x88
POP RBX
POP R12
POP R14
POP R15
RET
|
/* minja::Parser::unterminated(minja::TemplateToken const&) const */
TemplateToken * minja::Parser::unterminated(TemplateToken *param_1)
{
long *plVar1;
int8 *puVar2;
ulong *puVar3;
long in_RDX;
int8 *in_RSI;
ulong uVar4;
long *local_a0;
int8 local_98;
long local_90;
int8 uStack_88;
ulong *local_80;
long local_78;
ulong local_70;
long lStack_68;
ulong *local_60;
long local_58;
ulong local_50 [2];
long *local_40 [2];
long local_30 [2];
TemplateToken::typeToString_abi_cxx11_((TemplateToken *)local_40);
/* try { // try from 00198dc9 to 00198de1 has its CatchHandler @ 00198fc4 */
plVar1 = (long *)std::__cxx11::string::replace((ulong)local_40,0,(char *)0x0,0x1f0ad6);
puVar3 = (ulong *)(plVar1 + 2);
if ((ulong *)*plVar1 == puVar3) {
local_70 = *puVar3;
lStack_68 = plVar1[3];
local_80 = &local_70;
}
else {
local_70 = *puVar3;
local_80 = (ulong *)*plVar1;
}
local_78 = plVar1[1];
*plVar1 = (long)puVar3;
plVar1[1] = 0;
*(int1 *)(plVar1 + 2) = 0;
/* try { // try from 00198e31 to 00198e3a has its CatchHandler @ 00198fa8 */
error_location_suffix((minja *)&local_60,(string *)*in_RSI,*(ulong *)(in_RDX + 0x20));
uVar4 = 0xf;
if (local_80 != &local_70) {
uVar4 = local_70;
}
if (uVar4 < (ulong)(local_58 + local_78)) {
uVar4 = 0xf;
if (local_60 != local_50) {
uVar4 = local_50[0];
}
if ((ulong)(local_58 + local_78) <= uVar4) {
puVar2 = (int8 *)
std::__cxx11::string::replace((ulong)&local_60,0,(char *)0x0,(ulong)local_80);
goto LAB_00198e9a;
}
}
/* try { // try from 00198e80 to 00198e99 has its CatchHandler @ 00198f88 */
puVar2 = (int8 *)std::__cxx11::string::_M_append((char *)&local_80,(ulong)local_60);
LAB_00198e9a:
local_a0 = &local_90;
plVar1 = puVar2 + 2;
if ((long *)*puVar2 == plVar1) {
local_90 = *plVar1;
uStack_88 = puVar2[3];
}
else {
local_90 = *plVar1;
local_a0 = (long *)*puVar2;
}
local_98 = puVar2[1];
*puVar2 = plVar1;
puVar2[1] = 0;
*(int1 *)plVar1 = 0;
/* try { // try from 00198ee1 to 00198eed has its CatchHandler @ 00198f68 */
std::runtime_error::runtime_error((runtime_error *)param_1,(string *)&local_a0);
if (local_a0 != &local_90) {
operator_delete(local_a0,local_90 + 1);
}
if (local_60 != local_50) {
operator_delete(local_60,local_50[0] + 1);
}
if (local_80 != &local_70) {
operator_delete(local_80,local_70 + 1);
}
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
return param_1;
}
| |
21,260 | google::protobuf::compiler::java::MessageBuilderGenerator::GenerateBuilderFieldParsingCase(google::protobuf::io::Printer*, google::protobuf::FieldDescriptor const*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/message_builder.cc | void MessageBuilderGenerator::GenerateBuilderFieldParsingCase(
io::Printer* printer, const FieldDescriptor* field) {
uint32_t tag = WireFormatLite::MakeTag(
field->number(), WireFormat::WireTypeForFieldType(field->type()));
std::string tagString = StrCat(static_cast<int32_t>(tag));
printer->Print("case $tag$: {\n", "tag", tagString);
printer->Indent();
field_generators_.get(field).GenerateBuilderParsingCode(printer);
printer->Outdent();
printer->Print(
" break;\n"
"} // case $tag$\n",
"tag", tagString);
} | O3 | cpp | google::protobuf::compiler::java::MessageBuilderGenerator::GenerateBuilderFieldParsingCase(google::protobuf::io::Printer*, google::protobuf::FieldDescriptor const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movl 0x4(%rdx), %ebp
movq 0x18(%rdx), %rdi
testq %rdi, %rdi
je 0xb2eef
leaq 0x86d5a(%rip), %rax # 0x139c34
leaq 0x30(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x10(%rsp), %rdx
movq %r14, (%rdx)
callq 0x2f19d
movzbl 0x2(%r14), %eax
leaq 0x13b9e5(%rip), %rcx # 0x1ee8e0
shll $0x3, %ebp
orl (%rcx,%rax,4), %ebp
leaq 0x40(%rsp), %r12
movq %r12, -0x10(%r12)
movl %ebp, %edi
movq %r12, %rsi
callq 0x10a7e0
subq %r12, %rax
movq %rax, -0x8(%r12)
movq -0x10(%r12), %rsi
leaq 0x20(%rsp), %r13
movq %r13, -0x10(%r13)
leaq (%rax,%rsi), %rdx
leaq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0x250b2
leaq 0x106ef3(%rip), %rsi # 0x1b9e36
leaq 0x106ee8(%rip), %rdx # 0x1b9e32
movq %rbx, %rdi
movq %r12, %rcx
callq 0x61184
movq %rbx, %rdi
callq 0x16d126
movq 0x20(%r14), %rax
cmpq 0x20(%r15), %rax
je 0xb2faa
leaq 0x10cdbb(%rip), %rdx # 0x1bfd29
leaq 0x30(%rsp), %rdi
movl $0x3, %esi
movl $0x8b, %ecx
callq 0x1072ba
leaq 0x10ce0f(%rip), %rsi # 0x1bfd98
leaq 0x30(%rsp), %rdi
callq 0x106db8
leaq 0xf(%rsp), %rdi
movq %rax, %rsi
callq 0x106e92
leaq 0x30(%rsp), %rdi
callq 0x1072d8
testb $0x8, 0x1(%r14)
jne 0xb2fbb
movq 0x20(%r14), %rax
addq $0x28, %rax
jmp 0xb2fd2
movq 0x28(%r14), %rax
testq %rax, %rax
je 0xb2fca
addq $0x50, %rax
jmp 0xb2fd2
movq 0x10(%r14), %rax
addq $0x70, %rax
subq (%rax), %r14
shrq $0x3, %r14
imull $0x38e38e39, %r14d, %eax # imm = 0x38E38E39
movq 0x28(%r15), %rcx
cltq
movq (%rcx,%rax,8), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x68(%rax)
movq %rbx, %rdi
callq 0x16d136
leaq 0x10e72e(%rip), %rsi # 0x1c1730
leaq 0x106e29(%rip), %rdx # 0x1b9e32
leaq 0x10(%rsp), %rcx
movq %rbx, %rdi
callq 0x61184
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0xb3025
callq 0x1f4a0
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb3036
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x1072d8
jmp 0xb3048
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0xb3057
callq 0x1f4a0
movq %rbx, %rdi
callq 0x1f860
nop
| _ZN6google8protobuf8compiler4java23MessageBuilderGenerator31GenerateBuilderFieldParsingCaseEPNS0_2io7PrinterEPKNS0_15FieldDescriptorE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r14, rdx
mov rbx, rsi
mov r15, rdi
mov ebp, [rdx+4]
mov rdi, [rdx+18h]
test rdi, rdi
jz short loc_B2EEF
lea rax, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*)
lea rsi, [rsp+98h+var_68]
mov [rsi], rax
lea rdx, [rsp+98h+var_88]
mov [rdx], r14
call _ZSt9call_onceIPFvPKN6google8protobuf15FieldDescriptorEEJS4_EEvRSt9once_flagOT_DpOT0_; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(std::once_flag &,void (*)(google::protobuf::FieldDescriptor const*) &&,google::protobuf::FieldDescriptor const* &&)
loc_B2EEF:
movzx eax, byte ptr [r14+2]
lea rcx, _ZN6google8protobuf8internal14WireFormatLite21kWireTypeForFieldTypeE; google::protobuf::internal::WireFormatLite::kWireTypeForFieldType
shl ebp, 3
or ebp, [rcx+rax*4]
lea r12, [rsp+98h+var_58]
mov [r12-10h], r12
mov edi, ebp; this
mov rsi, r12; int
call _ZN6google8protobuf21FastInt32ToBufferLeftEiPc; google::protobuf::FastInt32ToBufferLeft(int,char *)
sub rax, r12
mov [r12-8], rax
mov rsi, [r12-10h]
lea r13, [rsp+98h+var_78]
mov [r13-10h], r13
lea rdx, [rax+rsi]
lea r12, [rsp+98h+var_88]
mov rdi, r12
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, aCaseTag; "case $tag$: {\n"
lea rdx, aPackedTag+7; "tag"
mov rdi, rbx
mov rcx, r12
call _ZN6google8protobuf2io7Printer5PrintIJA4_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvPKcDpRKT_; google::protobuf::io::Printer::Print<char [4],std::string>(char const*,char [4],std::string const&)
mov rdi, rbx; this
call _ZN6google8protobuf2io7Printer6IndentEv; google::protobuf::io::Printer::Indent(void)
mov rax, [r14+20h]
cmp rax, [r15+20h]
jz short loc_B2FAA
lea rdx, aWorkspaceLlm4b_25; "/workspace/llm4binary/github2025/aimrt_"...
lea rdi, [rsp+98h+var_68]
mov esi, 3
mov ecx, 8Bh
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
lea rsi, aCheckFailedFie_4; "CHECK failed: (field->containing_type()"...
lea rdi, [rsp+98h+var_68]
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
lea rdi, [rsp+98h+var_89]
mov rsi, rax
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
lea rdi, [rsp+98h+var_68]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_B2FAA:
test byte ptr [r14+1], 8
jnz short loc_B2FBB
mov rax, [r14+20h]
add rax, 28h ; '('
jmp short loc_B2FD2
loc_B2FBB:
mov rax, [r14+28h]
test rax, rax
jz short loc_B2FCA
add rax, 50h ; 'P'
jmp short loc_B2FD2
loc_B2FCA:
mov rax, [r14+10h]
add rax, 70h ; 'p'
loc_B2FD2:
sub r14, [rax]
shr r14, 3
imul eax, r14d, 38E38E39h
mov rcx, [r15+28h]
cdqe
mov rdi, [rcx+rax*8]
mov rax, [rdi]
mov rsi, rbx
call qword ptr [rax+68h]
mov rdi, rbx; this
call _ZN6google8protobuf2io7Printer7OutdentEv; google::protobuf::io::Printer::Outdent(void)
lea rsi, aBreakCaseTag; " break;\n} // case $tag$\n"
lea rdx, aPackedTag+7; "tag"
lea rcx, [rsp+98h+var_88]
mov rdi, rbx
call _ZN6google8protobuf2io7Printer5PrintIJA4_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvPKcDpRKT_; google::protobuf::io::Printer::Print<char [4],std::string>(char const*,char [4],std::string const&)
mov rdi, [rsp+98h+var_88]; void *
cmp rdi, r13
jz short loc_B3025
call __ZdlPv; operator delete(void *)
loc_B3025:
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_B3036:
mov rbx, rax
lea rdi, [rsp+arg_28]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
jmp short loc_B3048
mov rbx, rax
loc_B3048:
mov rdi, [rsp+arg_8]; void *
cmp rdi, r13
jz short loc_B3057
call __ZdlPv; operator delete(void *)
loc_B3057:
mov rdi, rbx
call __Unwind_Resume
| void google::protobuf::compiler::java::MessageBuilderGenerator::GenerateBuilderFieldParsingCase(
google::protobuf::compiler::java::MessageBuilderGenerator *this,
google::protobuf::io::Printer *a2,
const google::protobuf::FieldDescriptor *a3)
{
int v5; // ebp
long long v6; // rdi
unsigned int v7; // ebp
long long v8; // rax
_QWORD *v9; // rax
long long v10; // rax
long long v11; // rdi
char v12; // [rsp+Fh] [rbp-89h] BYREF
void *v13[2]; // [rsp+10h] [rbp-88h] BYREF
_BYTE v14[16]; // [rsp+20h] [rbp-78h] BYREF
int *v15; // [rsp+30h] [rbp-68h] BYREF
long long v16; // [rsp+38h] [rbp-60h]
int v17[22]; // [rsp+40h] [rbp-58h] BYREF
v5 = *((_DWORD *)a3 + 1);
v6 = *((_QWORD *)a3 + 3);
if ( v6 )
{
v15 = (int *)google::protobuf::FieldDescriptor::TypeOnceInit;
v13[0] = a3;
std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(
v6,
(long long)&v15,
(long long)v13);
}
v7 = google::protobuf::internal::WireFormatLite::kWireTypeForFieldType[*((unsigned __int8 *)a3 + 2)] | (8 * v5);
v15 = v17;
v16 = google::protobuf::FastInt32ToBufferLeft((google::protobuf *)v7, (int)v17, (char *)a3) - (_QWORD)v17;
v13[0] = v14;
std::string::_M_construct<char const*>((long long)v13, v15, (long long)v15 + v16);
google::protobuf::io::Printer::Print<char [4],std::string>(a2);
google::protobuf::io::Printer::Indent(a2);
if ( *((_QWORD *)a3 + 4) != *((_QWORD *)this + 4) )
{
google::protobuf::internal::LogMessage::LogMessage(
&v15,
3LL,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/field.h",
139LL);
v8 = google::protobuf::internal::LogMessage::operator<<(
&v15,
"CHECK failed: (field->containing_type()) == (descriptor_): ");
google::protobuf::internal::LogFinisher::operator=(&v12, v8);
google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)&v15);
}
if ( (*((_BYTE *)a3 + 1) & 8) != 0 )
{
v10 = *((_QWORD *)a3 + 5);
if ( v10 )
v9 = (_QWORD *)(v10 + 80);
else
v9 = (_QWORD *)(*((_QWORD *)a3 + 2) + 112LL);
}
else
{
v9 = (_QWORD *)(*((_QWORD *)a3 + 4) + 40LL);
}
v11 = *(_QWORD *)(*((_QWORD *)this + 5) + 8LL * (int)(954437177 * (((unsigned long long)a3 - *v9) >> 3)));
(*(void ( **)(long long, google::protobuf::io::Printer *))(*(_QWORD *)v11 + 104LL))(v11, a2);
google::protobuf::io::Printer::Outdent(a2);
google::protobuf::io::Printer::Print<char [4],std::string>(a2);
if ( v13[0] != v14 )
operator delete(v13[0]);
}
| GenerateBuilderFieldParsingCase:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R14,RDX
MOV RBX,RSI
MOV R15,RDI
MOV EBP,dword ptr [RDX + 0x4]
MOV RDI,qword ptr [RDX + 0x18]
TEST RDI,RDI
JZ 0x001b2eef
LEA RAX,[0x239c34]
LEA RSI,[RSP + 0x30]
MOV qword ptr [RSI],RAX
LEA RDX,[RSP + 0x10]
MOV qword ptr [RDX],R14
CALL 0x0012f19d
LAB_001b2eef:
MOVZX EAX,byte ptr [R14 + 0x2]
LEA RCX,[0x2ee8e0]
SHL EBP,0x3
OR EBP,dword ptr [RCX + RAX*0x4]
LEA R12,[RSP + 0x40]
MOV qword ptr [R12 + -0x10],R12
MOV EDI,EBP
MOV RSI,R12
CALL 0x0020a7e0
SUB RAX,R12
MOV qword ptr [R12 + -0x8],RAX
MOV RSI,qword ptr [R12 + -0x10]
LEA R13,[RSP + 0x20]
MOV qword ptr [R13 + -0x10],R13
LEA RDX,[RAX + RSI*0x1]
LEA R12,[RSP + 0x10]
MOV RDI,R12
CALL 0x001250b2
LAB_001b2f3c:
LEA RSI,[0x2b9e36]
LEA RDX,[0x2b9e32]
MOV RDI,RBX
MOV RCX,R12
CALL 0x00161184
MOV RDI,RBX
CALL 0x0026d126
MOV RAX,qword ptr [R14 + 0x20]
CMP RAX,qword ptr [R15 + 0x20]
JZ 0x001b2faa
LEA RDX,[0x2bfd29]
LEA RDI,[RSP + 0x30]
MOV ESI,0x3
MOV ECX,0x8b
CALL 0x002072ba
LAB_001b2f82:
LEA RSI,[0x2bfd98]
LEA RDI,[RSP + 0x30]
CALL 0x00206db8
LAB_001b2f93:
LEA RDI,[RSP + 0xf]
MOV RSI,RAX
CALL 0x00206e92
LEA RDI,[RSP + 0x30]
CALL 0x002072d8
LAB_001b2faa:
TEST byte ptr [R14 + 0x1],0x8
JNZ 0x001b2fbb
MOV RAX,qword ptr [R14 + 0x20]
ADD RAX,0x28
JMP 0x001b2fd2
LAB_001b2fbb:
MOV RAX,qword ptr [R14 + 0x28]
TEST RAX,RAX
JZ 0x001b2fca
ADD RAX,0x50
JMP 0x001b2fd2
LAB_001b2fca:
MOV RAX,qword ptr [R14 + 0x10]
ADD RAX,0x70
LAB_001b2fd2:
SUB R14,qword ptr [RAX]
SHR R14,0x3
IMUL EAX,R14D,0x38e38e39
MOV RCX,qword ptr [R15 + 0x28]
CDQE
MOV RDI,qword ptr [RCX + RAX*0x8]
MOV RAX,qword ptr [RDI]
LAB_001b2fed:
MOV RSI,RBX
CALL qword ptr [RAX + 0x68]
MOV RDI,RBX
CALL 0x0026d136
LEA RSI,[0x2c1730]
LEA RDX,[0x2b9e32]
LEA RCX,[RSP + 0x10]
MOV RDI,RBX
CALL 0x00161184
LAB_001b3016:
MOV RDI,qword ptr [RSP + 0x10]
CMP RDI,R13
JZ 0x001b3025
CALL 0x0011f4a0
LAB_001b3025:
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* google::protobuf::compiler::java::MessageBuilderGenerator::GenerateBuilderFieldParsingCase(google::protobuf::io::Printer*,
google::protobuf::FieldDescriptor const*) */
void __thiscall
google::protobuf::compiler::java::MessageBuilderGenerator::GenerateBuilderFieldParsingCase
(MessageBuilderGenerator *this,Printer *param_1,FieldDescriptor *param_2)
{
int iVar1;
LogMessage *pLVar2;
long *plVar3;
LogFinisher local_89;
FieldDescriptor *local_88 [2];
FieldDescriptor local_78 [16];
code *local_68;
long local_60;
int1 local_58 [40];
iVar1 = *(int *)(param_2 + 4);
if (*(once_flag **)(param_2 + 0x18) != (once_flag *)0x0) {
local_68 = FieldDescriptor::TypeOnceInit;
local_88[0] = param_2;
std::
call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*>
(*(once_flag **)(param_2 + 0x18),(_func_void_FieldDescriptor_ptr *)&local_68,local_88)
;
}
local_68 = (code *)local_58;
local_60 = FastInt32ToBufferLeft
(iVar1 << 3 |
*(uint *)(internal::WireFormatLite::kWireTypeForFieldType +
(ulong)(byte)param_2[2] * 4),local_58);
local_60 = local_60 - (long)local_58;
local_88[0] = local_78;
std::__cxx11::string::_M_construct<char_const*>(local_88,local_68,local_68 + local_60);
/* try { // try from 001b2f3c to 001b2f81 has its CatchHandler @ 001b3045 */
io::Printer::Print<char[4],std::__cxx11::string>
((char *)param_1,"case $tag$: {\n",(string *)0x2b9e32);
io::Printer::Indent(param_1);
if (*(long *)(param_2 + 0x20) != *(long *)(this + 0x20)) {
internal::LogMessage::LogMessage
((LogMessage *)&local_68,3,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/field.h"
,0x8b);
/* try { // try from 001b2f82 to 001b2f92 has its CatchHandler @ 001b3036 */
pLVar2 = (LogMessage *)
internal::LogMessage::operator<<
((LogMessage *)&local_68,
"CHECK failed: (field->containing_type()) == (descriptor_): ");
/* try { // try from 001b2f93 to 001b2f9f has its CatchHandler @ 001b3034 */
internal::LogFinisher::operator=(&local_89,pLVar2);
internal::LogMessage::~LogMessage((LogMessage *)&local_68);
}
if (((byte)param_2[1] & 8) == 0) {
plVar3 = (long *)(*(long *)(param_2 + 0x20) + 0x28);
}
else if (*(long *)(param_2 + 0x28) == 0) {
plVar3 = (long *)(*(long *)(param_2 + 0x10) + 0x70);
}
else {
plVar3 = (long *)(*(long *)(param_2 + 0x28) + 0x50);
}
plVar3 = *(long **)(*(long *)(this + 0x28) +
(long)((int)((ulong)((long)param_2 - *plVar3) >> 3) * 0x38e38e39) * 8);
/* try { // try from 001b2fed to 001b3015 has its CatchHandler @ 001b3045 */
(**(code **)(*plVar3 + 0x68))(plVar3,param_1);
io::Printer::Outdent(param_1);
io::Printer::Print<char[4],std::__cxx11::string>
((char *)param_1," break;\n} // case $tag$\n",(string *)0x2b9e32);
if (local_88[0] != local_78) {
operator_delete(local_88[0]);
}
return;
}
| |
21,261 | LefDefParser::defwSpecialNetOptions() | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp | int
defwSpecialNetOptions()
{
defwFunc = DEFW_SNET; // Current function of writer
if (defwState == DEFW_SNET) {
defwState = DEFW_SNET_OPTIONS;
return 1;
}
if (defwState == DEFW_SNET_OPTIONS)
return 1;
return 0;
} | O0 | cpp | LefDefParser::defwSpecialNetOptions():
leaq 0x13c81(%rip), %rax # 0x2b168
movl $0x32, (%rax)
leaq 0x13c70(%rip), %rax # 0x2b164
cmpl $0x32, (%rax)
jne 0x17510
leaq 0x13c64(%rip), %rax # 0x2b164
movl $0x33, (%rax)
movl $0x1, -0x4(%rsp)
jmp 0x1752e
leaq 0x13c4d(%rip), %rax # 0x2b164
cmpl $0x33, (%rax)
jne 0x17526
movl $0x1, -0x4(%rsp)
jmp 0x1752e
movl $0x0, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopw %cs:(%rax,%rax)
| _ZN12LefDefParser21defwSpecialNetOptionsEv:
lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc
mov dword ptr [rax], 32h ; '2'
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
cmp dword ptr [rax], 32h ; '2'
jnz short loc_17510
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
mov dword ptr [rax], 33h ; '3'
mov [rsp+var_4], 1
jmp short loc_1752E
loc_17510:
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
cmp dword ptr [rax], 33h ; '3'
jnz short loc_17526
mov [rsp+var_4], 1
jmp short loc_1752E
loc_17526:
mov [rsp+var_4], 0
loc_1752E:
mov eax, [rsp+var_4]
retn
| _BOOL8 LefDefParser::defwSpecialNetOptions(LefDefParser *this)
{
LefDefParser::defwFunc = 50;
if ( LefDefParser::defwState == 50 )
{
LefDefParser::defwState = 51;
return 1;
}
else
{
return LefDefParser::defwState == 51;
}
}
| defwSpecialNetOptions:
LEA RAX,[0x12b168]
MOV dword ptr [RAX],0x32
LEA RAX,[0x12b164]
CMP dword ptr [RAX],0x32
JNZ 0x00117510
LEA RAX,[0x12b164]
MOV dword ptr [RAX],0x33
MOV dword ptr [RSP + -0x4],0x1
JMP 0x0011752e
LAB_00117510:
LEA RAX,[0x12b164]
CMP dword ptr [RAX],0x33
JNZ 0x00117526
MOV dword ptr [RSP + -0x4],0x1
JMP 0x0011752e
LAB_00117526:
MOV dword ptr [RSP + -0x4],0x0
LAB_0011752e:
MOV EAX,dword ptr [RSP + -0x4]
RET
|
/* LefDefParser::defwSpecialNetOptions() */
int4 LefDefParser::defwSpecialNetOptions(void)
{
int4 local_4;
defwFunc = 0x32;
if (defwState == 0x32) {
defwState = 0x33;
local_4 = 1;
}
else if (defwState == 0x33) {
local_4 = 1;
}
else {
local_4 = 0;
}
return local_4;
}
| |
21,262 | apply_one_rule | eloqsql/strings/ctype-uca.c | static my_bool
apply_one_rule(MY_CHARSET_LOADER *loader,
MY_COLL_RULES *rules, MY_COLL_RULE *r,
MY_UCA_WEIGHT_LEVEL *dst)
{
size_t nweights;
size_t nreset= my_coll_rule_reset_length(r); /* Length of reset sequence */
size_t nshift= my_coll_rule_shift_length(r); /* Length of shift sequence */
uint16 *to;
my_bool rc;
if ((rules->shift_after_method == my_shift_method_expand && r->diff[0]) ||
r->before_level == 1)
{
/*
Suppose we have this rule: &B[before primary] < C
i.e. we need to put C before B, but after A, so
the result order is: A < C < B.
Let primary weight of B be [BBBB].
We cannot just use [BBBB-1] as weight for C:
DUCET does not have enough unused weights between any two characters,
so using [BBBB-1] will likely make C equal to the previous character,
which is A, so we'll get this order instead of the desired: A = C < B.
To guarantee that that C is sorted after A, we'll use expansion
with a kind of "biggest possible character".
As "biggest possible character" we'll use "last_non_ignorable":
We'll compose weight for C as: [BBBB-1][MMMM+1]
where [MMMM] is weight for "last_non_ignorable".
We also do the same trick for "reset after" if the collation
option says so. E.g. for the rules "&B < C", weight for
C will be calculated as: [BBBB][MMMM+1]
At this point we only need to store codepoints
'B' and 'last_non_ignorable'. Actual weights for 'C'
will be calculated according to the above formula later,
in create_tailoring().
*/
if (!my_coll_rule_expand(r->base, MY_UCA_MAX_EXPANSION,
rules->uca->last_non_ignorable))
{
my_charset_loader_error_for_rule(loader, r, "Expansion", r->base, nreset);
return TRUE;
}
nreset= my_coll_rule_reset_length(r);
}
if (nshift >= 2) /* Contraction */
{
MY_CONTRACTIONS *contractions= &dst->contractions;
to= my_uca_init_one_contraction(contractions,
r->curr, (uint)nshift, r->with_context);
/* Store weights of the "reset to" character */
dst->contractions.nitems--; /* Temporarily hide - it's incomplete */
rc= my_char_weight_put(dst,
to, MY_UCA_CONTRACTION_MAX_WEIGHT_SIZE, &nweights,
r->base, nreset);
dst->contractions.nitems++; /* Activate, now it's complete */
}
else
{
my_wc_t pagec= (r->curr[0] >> 8);
DBUG_ASSERT(dst->weights[pagec]);
to= my_char_weight_addr(dst, r->curr[0]);
/* Store weights of the "reset to" character */
rc= my_char_weight_put(dst, to, dst->lengths[pagec], &nweights, r->base, nreset);
}
if (rc)
{
my_charset_loader_error_for_rule(loader, r, "Expansion", r->base, nreset);
return rc;
}
/* Apply level difference. */
return apply_shift(loader, rules, r, dst->levelno, to, nweights);
} | O0 | c | apply_one_rule:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x569c0
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rdi
callq 0x569e0
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x1, 0x30(%rax)
jne 0x56399
movq -0x20(%rbp), %rax
cmpl $0x0, 0x80(%rax)
jne 0x563a7
movq -0x20(%rbp), %rax
cmpq $0x1, 0x90(%rax)
jne 0x563f8
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x78(%rax), %rdx
movl $0xa, %esi
callq 0x55da0
cmpl $0x0, %eax
jne 0x563eb
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %r8
leaq 0x2c59e(%rip), %rdx # 0x8297b
callq 0x56a10
movb $0x1, -0x1(%rbp)
jmp 0x56518
movq -0x20(%rbp), %rdi
callq 0x569c0
movq %rax, -0x38(%rbp)
cmpq $0x2, -0x40(%rbp)
jb 0x56474
movq -0x28(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x50, %rsi
movq -0x40(%rbp), %rax
movl %eax, %edx
movq -0x20(%rbp), %rax
movsbl 0x98(%rax), %ecx
callq 0x56530
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x20(%rbp), %r8
movq -0x38(%rbp), %r9
movl $0x11, %edx
leaq -0x30(%rbp), %rcx
callq 0x56ad0
movb %al, -0x49(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rax)
jmp 0x564cb
movq -0x20(%rbp), %rax
movq 0x50(%rax), %rax
shrq $0x8, %rax
movq %rax, -0x60(%rbp)
jmp 0x56486
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x50(%rax), %rax
movl %eax, %esi
callq 0x54290
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x60(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %edx
movq -0x20(%rbp), %r8
movq -0x38(%rbp), %r9
leaq -0x30(%rbp), %rcx
callq 0x56ad0
movb %al, -0x49(%rbp)
cmpb $0x0, -0x49(%rbp)
je 0x564f5
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %r8
leaq 0x2c493(%rip), %rdx # 0x8297b
callq 0x56a10
movb -0x49(%rbp), %al
movb %al, -0x1(%rbp)
jmp 0x56518
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rax
movl 0x30(%rax), %ecx
movq -0x48(%rbp), %r8
movq -0x30(%rbp), %r9
callq 0x56cd0
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| apply_one_rule:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rdi, [rbp+var_20]
call my_coll_rule_reset_length
mov [rbp+var_38], rax
mov rdi, [rbp+var_20]
call my_coll_rule_shift_length
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
cmp dword ptr [rax+30h], 1
jnz short loc_56399
mov rax, [rbp+var_20]
cmp dword ptr [rax+80h], 0
jnz short loc_563A7
loc_56399:
mov rax, [rbp+var_20]
cmp qword ptr [rax+90h], 1
jnz short loc_563F8
loc_563A7:
mov rdi, [rbp+var_20]
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov rdx, [rax+78h]
mov esi, 0Ah
call my_coll_rule_expand
cmp eax, 0
jnz short loc_563EB
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
mov rcx, [rbp+var_20]
mov r8, [rbp+var_38]
lea rdx, aExpansion; "Expansion"
call my_charset_loader_error_for_rule
mov [rbp+var_1], 1
jmp loc_56518
loc_563EB:
mov rdi, [rbp+var_20]
call my_coll_rule_reset_length
mov [rbp+var_38], rax
loc_563F8:
cmp [rbp+var_40], 2
jb short loc_56474
mov rax, [rbp+var_28]
add rax, 18h
mov [rbp+var_58], rax
mov rdi, [rbp+var_58]
mov rsi, [rbp+var_20]
add rsi, 50h ; 'P'
mov rax, [rbp+var_40]
mov edx, eax
mov rax, [rbp+var_20]
movsx ecx, byte ptr [rax+98h]
call my_uca_init_one_contraction
mov [rbp+var_48], rax
mov rax, [rbp+var_28]
mov rcx, [rax+18h]
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rax+18h], rcx
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_48]
mov r8, [rbp+var_20]
mov r9, [rbp+var_38]
mov edx, 11h
lea rcx, [rbp+var_30]
call my_char_weight_put
mov [rbp+var_49], al
mov rax, [rbp+var_28]
mov rcx, [rax+18h]
add rcx, 1
mov [rax+18h], rcx
jmp short loc_564CB
loc_56474:
mov rax, [rbp+var_20]
mov rax, [rax+50h]
shr rax, 8
mov [rbp+var_60], rax
jmp short $+2
loc_56486:
mov rdi, [rbp+var_28]
mov rax, [rbp+var_20]
mov rax, [rax+50h]
mov esi, eax
call my_char_weight_addr
mov [rbp+var_48], rax
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_48]
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov rcx, [rbp+var_60]
movzx eax, byte ptr [rax+rcx]
mov edx, eax
mov r8, [rbp+var_20]
mov r9, [rbp+var_38]
lea rcx, [rbp+var_30]
call my_char_weight_put
mov [rbp+var_49], al
loc_564CB:
cmp [rbp+var_49], 0
jz short loc_564F5
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
mov rcx, [rbp+var_20]
mov r8, [rbp+var_38]
lea rdx, aExpansion; "Expansion"
call my_charset_loader_error_for_rule
mov al, [rbp+var_49]
mov [rbp+var_1], al
jmp short loc_56518
loc_564F5:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rax, [rbp+var_28]
mov ecx, [rax+30h]
mov r8, [rbp+var_48]
mov r9, [rbp+var_30]
call apply_shift
mov [rbp+var_1], al
loc_56518:
mov al, [rbp+var_1]
add rsp, 60h
pop rbp
retn
| char apply_one_rule(long long a1, long long a2, long long a3, _QWORD *a4)
{
long long v5; // [rsp+0h] [rbp-60h]
char v6; // [rsp+17h] [rbp-49h]
long long inited; // [rsp+18h] [rbp-48h]
unsigned long long v8; // [rsp+20h] [rbp-40h]
long long v9; // [rsp+28h] [rbp-38h]
long long v10; // [rsp+30h] [rbp-30h] BYREF
_QWORD *v11; // [rsp+38h] [rbp-28h]
long long v12; // [rsp+40h] [rbp-20h]
long long v13; // [rsp+48h] [rbp-18h]
long long v14; // [rsp+50h] [rbp-10h]
v14 = a1;
v13 = a2;
v12 = a3;
v11 = a4;
v9 = my_coll_rule_reset_length(a3);
v8 = my_coll_rule_shift_length(v12);
if ( *(_DWORD *)(a2 + 48) == 1 && *(_DWORD *)(v12 + 128) || *(_QWORD *)(v12 + 144) == 1LL )
{
if ( !(unsigned int)my_coll_rule_expand(v12, 0xAuLL, *(_QWORD *)(*(_QWORD *)(v13 + 8) + 120LL)) )
{
my_charset_loader_error_for_rule(v14, v12, "Expansion", v12, v9);
return 1;
}
v9 = my_coll_rule_reset_length(v12);
}
if ( v8 < 2 )
{
v5 = *(_QWORD *)(v12 + 80) >> 8;
inited = my_char_weight_addr(v11, *(_QWORD *)(v12 + 80));
v6 = my_char_weight_put(v11, inited, *(unsigned __int8 *)(v11[1] + v5), &v10, v12, v9);
}
else
{
inited = my_uca_init_one_contraction(v11 + 3, v12 + 80, (unsigned int)v8, (unsigned int)*(char *)(v12 + 152));
--v11[3];
v6 = my_char_weight_put(v11, inited, 17LL, &v10, v12, v9);
++v11[3];
}
if ( !v6 )
return apply_shift(v14, v13, v12, *((unsigned int *)v11 + 12), inited, v10);
my_charset_loader_error_for_rule(v14, v12, "Expansion", v12, v9);
return v6;
}
| apply_one_rule:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001569c0
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001569e0
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x30],0x1
JNZ 0x00156399
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX + 0x80],0x0
JNZ 0x001563a7
LAB_00156399:
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0x90],0x1
JNZ 0x001563f8
LAB_001563a7:
MOV RDI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RAX + 0x78]
MOV ESI,0xa
CALL 0x00155da0
CMP EAX,0x0
JNZ 0x001563eb
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x20]
MOV R8,qword ptr [RBP + -0x38]
LEA RDX,[0x18297b]
CALL 0x00156a10
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00156518
LAB_001563eb:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001569c0
MOV qword ptr [RBP + -0x38],RAX
LAB_001563f8:
CMP qword ptr [RBP + -0x40],0x2
JC 0x00156474
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x18
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x58]
MOV RSI,qword ptr [RBP + -0x20]
ADD RSI,0x50
MOV RAX,qword ptr [RBP + -0x40]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x20]
MOVSX ECX,byte ptr [RAX + 0x98]
CALL 0x00156530
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX + 0x18]
ADD RCX,-0x1
MOV qword ptr [RAX + 0x18],RCX
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x48]
MOV R8,qword ptr [RBP + -0x20]
MOV R9,qword ptr [RBP + -0x38]
MOV EDX,0x11
LEA RCX,[RBP + -0x30]
CALL 0x00156ad0
MOV byte ptr [RBP + -0x49],AL
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX + 0x18]
ADD RCX,0x1
MOV qword ptr [RAX + 0x18],RCX
JMP 0x001564cb
LAB_00156474:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x50]
SHR RAX,0x8
MOV qword ptr [RBP + -0x60],RAX
JMP 0x00156486
LAB_00156486:
MOV RDI,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x50]
MOV ESI,EAX
CALL 0x00154290
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x60]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV EDX,EAX
MOV R8,qword ptr [RBP + -0x20]
MOV R9,qword ptr [RBP + -0x38]
LEA RCX,[RBP + -0x30]
CALL 0x00156ad0
MOV byte ptr [RBP + -0x49],AL
LAB_001564cb:
CMP byte ptr [RBP + -0x49],0x0
JZ 0x001564f5
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x20]
MOV R8,qword ptr [RBP + -0x38]
LEA RDX,[0x18297b]
CALL 0x00156a10
MOV AL,byte ptr [RBP + -0x49]
MOV byte ptr [RBP + -0x1],AL
JMP 0x00156518
LAB_001564f5:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RAX + 0x30]
MOV R8,qword ptr [RBP + -0x48]
MOV R9,qword ptr [RBP + -0x30]
CALL 0x00156cd0
MOV byte ptr [RBP + -0x1],AL
LAB_00156518:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x60
POP RBP
RET
|
int8 apply_one_rule(int8 param_1,long param_2,long param_3,long param_4)
{
char extraout_AL;
int iVar1;
ulong uVar2;
int7 extraout_var;
int8 uVar3;
int7 uVar4;
int7 extraout_var_00;
char local_51;
int8 local_50;
int8 local_40;
int8 local_38;
long local_30;
long local_28;
long local_20;
int8 local_18;
char local_9;
local_30 = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
local_40 = my_coll_rule_reset_length(param_3);
uVar2 = my_coll_rule_shift_length(local_28);
if (((*(int *)(local_20 + 0x30) == 1) && (*(int *)(local_28 + 0x80) != 0)) ||
(*(long *)(local_28 + 0x90) == 1)) {
iVar1 = my_coll_rule_expand(local_28,10,*(int8 *)(*(long *)(local_20 + 8) + 0x78));
if (iVar1 == 0) {
my_charset_loader_error_for_rule(local_18,local_28,"Expansion",local_28,local_40);
local_9 = '\x01';
uVar4 = extraout_var;
goto LAB_00156518;
}
local_40 = my_coll_rule_reset_length(local_28);
}
if (uVar2 < 2) {
uVar2 = *(ulong *)(local_28 + 0x50);
local_50 = my_char_weight_addr(local_30,*(ulong *)(local_28 + 0x50) & 0xffffffff);
local_51 = my_char_weight_put(local_30,local_50,
*(int1 *)(*(long *)(local_30 + 8) + (uVar2 >> 8)),&local_38,
local_28,local_40);
}
else {
local_50 = my_uca_init_one_contraction
(local_30 + 0x18,local_28 + 0x50,uVar2 & 0xffffffff,
(int)*(char *)(local_28 + 0x98));
*(long *)(local_30 + 0x18) = *(long *)(local_30 + 0x18) + -1;
local_51 = my_char_weight_put(local_30,local_50,0x11,&local_38,local_28,local_40);
*(long *)(local_30 + 0x18) = *(long *)(local_30 + 0x18) + 1;
}
if (local_51 == '\0') {
apply_shift(local_18,local_20,local_28,*(int4 *)(local_30 + 0x30),local_50,local_38);
uVar4 = extraout_var_00;
local_9 = extraout_AL;
}
else {
uVar3 = my_charset_loader_error_for_rule(local_18,local_28,"Expansion",local_28,local_40);
uVar4 = (int7)((ulong)uVar3 >> 8);
local_9 = local_51;
}
LAB_00156518:
return CONCAT71(uVar4,local_9);
}
| |
21,263 | findPeaks::_peak_prominences(std::vector<double, std::allocator<double>> const&, std::vector<unsigned long, std::allocator<unsigned long>> const&, unsigned long) | giladroyz[P]FindPeaks/src/cpp/find_peaks.cpp | std::vector<lpr_peak_prominence_t> _peak_prominences(const std::vector<double> &x,
const std::vector<size_t> &peaks,
size_t wlen) {
std::vector<lpr_peak_prominence_t> prominences;
size_t i;
double left_min, right_min;
size_t peak, i_min, i_max;
size_t half_wlen = wlen / 2;
for (size_t peak_nr = 0; peak_nr < peaks.size(); peak_nr++) {
lpr_peak_prominence_t prominence;
peak = peaks[peak_nr];
i_min = 0;
i_max = x.size() - 1;
if (wlen >= 2) {
//Adjust window around the evaluated peak (within bounds);
//if wlen is even the resulting window length is is implicitly
//rounded to next odd integer
i_min = max_int(peak - half_wlen, i_min);
i_max = min_int(peak + half_wlen, i_max);
}
//Find the left base in interval [i_min, peak]
i = peak;
prominence.left_base = peak;
left_min = x[peak];
while (i_min <= i && x[i] <= x[peak]) {
if (x[i] < left_min) {
left_min = x[i];
prominence.left_base = i;
}
if (i == 0 && i_min == 0)
break;
i--;
}
//Find the right base in interval [peak, i_max]
i = peak;
prominence.right_base = peak;
right_min = x[peak];
while (i <= i_max && x[i] <= x[peak]) {
if (x[i] < right_min) {
right_min = x[i];
prominence.right_base = i;
}
i++;
}
prominence.prominence = x[peak] - max_double(left_min, right_min);
prominences.push_back(prominence);
}
return prominences;
} | O2 | cpp | findPeaks::_peak_prominences(std::vector<double, std::allocator<double>> const&, std::vector<unsigned long, std::allocator<unsigned long>> const&, unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
xorpd %xmm0, %xmm0
movupd %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq %rcx, %rbp
shrq %rbp
xorl %r13d, %r13d
movq (%r15), %rdx
movq 0x8(%r15), %rax
subq %rdx, %rax
sarq $0x3, %rax
cmpq %rax, %r13
jae 0x2e2e7
movq (%r12), %rax
movq 0x8(%r12), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
decq %rcx
movq (%rdx,%r13,8), %rdx
cmpq $0x2, %r14
jb 0x2e24c
movq %rdx, %rsi
subq %rbp, %rsi
leaq (%rdx,%rbp), %rdi
cmpq %rcx, %rdi
cmovbq %rdi, %rcx
jmp 0x2e24e
xorl %esi, %esi
movq %rdx, (%rsp)
movsd (%rax,%rdx,8), %xmm0
movapd %xmm0, %xmm1
movq %rdx, %rdi
cmpq %rdi, %rsi
ja 0x2e288
movsd (%rax,%rdi,8), %xmm2
ucomisd %xmm2, %xmm0
jb 0x2e288
ucomisd %xmm2, %xmm1
jbe 0x2e27c
movq %rdi, (%rsp)
movapd %xmm2, %xmm1
leaq -0x1(%rdi), %r8
orq %rsi, %rdi
movq %r8, %rdi
jne 0x2e25e
movq %rdx, 0x10(%rsp)
movapd %xmm0, %xmm2
cmpq %rcx, %rdx
ja 0x2e2b5
movsd (%rax,%rdx,8), %xmm3
ucomisd %xmm3, %xmm0
jb 0x2e2b5
ucomisd %xmm3, %xmm2
jbe 0x2e2b0
movq %rdx, 0x10(%rsp)
movapd %xmm3, %xmm2
incq %rdx
jmp 0x2e291
movapd %xmm2, %xmm3
cmplesd %xmm1, %xmm3
andpd %xmm3, %xmm1
andnpd %xmm2, %xmm3
orpd %xmm1, %xmm3
subsd %xmm3, %xmm0
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
movq %rsp, %rsi
callq 0x2f648
incq %r13
jmp 0x2e205
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2ff56
movq %r14, %rdi
callq 0x89a0
| _ZN9findPeaks17_peak_prominencesERKSt6vectorIdSaIdEERKS0_ImSaImEEm:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov rbx, rdi
xorpd xmm0, xmm0
movupd xmmword ptr [rdi], xmm0
and qword ptr [rdi+10h], 0
mov rbp, rcx
shr rbp, 1
xor r13d, r13d
loc_2E205:
mov rdx, [r15]
mov rax, [r15+8]
sub rax, rdx
sar rax, 3
cmp r13, rax
jnb loc_2E2E7
mov rax, [r12]
mov rcx, [r12+8]
sub rcx, rax
sar rcx, 3
dec rcx
mov rdx, [rdx+r13*8]
cmp r14, 2
jb short loc_2E24C
mov rsi, rdx
sub rsi, rbp
lea rdi, [rdx+rbp]
cmp rdi, rcx
cmovb rcx, rdi
jmp short loc_2E24E
loc_2E24C:
xor esi, esi
loc_2E24E:
mov [rsp+48h+var_48], rdx
movsd xmm0, qword ptr [rax+rdx*8]
movapd xmm1, xmm0
mov rdi, rdx
loc_2E25E:
cmp rsi, rdi
ja short loc_2E288
movsd xmm2, qword ptr [rax+rdi*8]
ucomisd xmm0, xmm2
jb short loc_2E288
ucomisd xmm1, xmm2
jbe short loc_2E27C
mov [rsp+48h+var_48], rdi
movapd xmm1, xmm2
loc_2E27C:
lea r8, [rdi-1]
or rdi, rsi
mov rdi, r8
jnz short loc_2E25E
loc_2E288:
mov [rsp+48h+var_38], rdx
movapd xmm2, xmm0
loc_2E291:
cmp rdx, rcx
ja short loc_2E2B5
movsd xmm3, qword ptr [rax+rdx*8]
ucomisd xmm0, xmm3
jb short loc_2E2B5
ucomisd xmm2, xmm3
jbe short loc_2E2B0
mov [rsp+48h+var_38], rdx
movapd xmm2, xmm3
loc_2E2B0:
inc rdx
jmp short loc_2E291
loc_2E2B5:
movapd xmm3, xmm2
cmplesd xmm3, xmm1
andpd xmm1, xmm3
andnpd xmm3, xmm2
orpd xmm3, xmm1
subsd xmm0, xmm3
movsd [rsp+48h+var_40], xmm0
mov rdi, rbx
mov rsi, rsp
call _ZNSt6vectorIN9findPeaks21lpr_peak_prominence_tESaIS1_EE9push_backERKS1_; std::vector<findPeaks::lpr_peak_prominence_t>::push_back(findPeaks::lpr_peak_prominence_t const&)
inc r13
jmp loc_2E205
loc_2E2E7:
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, rbx
call _ZNSt12_Vector_baseIN9findPeaks21lpr_peak_prominence_tESaIS1_EED2Ev; std::_Vector_base<findPeaks::lpr_peak_prominence_t>::~_Vector_base()
mov rdi, r14
call __Unwind_Resume
| long long findPeaks::_peak_prominences(long long a1, long long *a2, _QWORD *a3, unsigned long long a4)
{
unsigned long long v8; // rbp
unsigned long long i; // r13
long long v10; // rax
unsigned long long v11; // rcx
unsigned long long v12; // rdx
__int128 v13; // rdi
__m128d v14; // xmm0
__m128d v15; // xmm1
double v16; // xmm2_8
bool v17; // zf
__m128d v18; // xmm2
__m128d v19; // xmm3
double v20; // xmm3_8
_QWORD v22[2]; // [rsp+0h] [rbp-48h] BYREF
unsigned long long v23; // [rsp+10h] [rbp-38h]
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
v8 = a4 >> 1;
for ( i = 0LL; i < (long long)(a3[1] - *a3) >> 3; ++i )
{
v10 = *a2;
v11 = ((a2[1] - *a2) >> 3) - 1;
v12 = *(_QWORD *)(*a3 + 8 * i);
if ( a4 < 2 )
{
*((_QWORD *)&v13 + 1) = 0LL;
}
else
{
*((_QWORD *)&v13 + 1) = v12 - v8;
if ( v12 + v8 < v11 )
v11 = v12 + v8;
}
v22[0] = *(_QWORD *)(*a3 + 8 * i);
v14 = (__m128d)*(unsigned long long *)(v10 + 8 * v12);
v15.m128d_f64[0] = *(double *)(v10 + 8 * v12);
*(_QWORD *)&v13 = v12;
do
{
if ( *((_QWORD *)&v13 + 1) > (unsigned long long)v13 )
break;
v16 = *(double *)(v10 + 8 * v13);
if ( v14.m128d_f64[0] < v16 )
break;
if ( v15.m128d_f64[0] > v16 )
{
v22[0] = v13;
v15.m128d_f64[0] = v16;
}
v17 = v13 == 0;
*(_QWORD *)&v13 = v13 - 1;
}
while ( !v17 );
v23 = v12;
v18 = v14;
while ( v12 <= v11 )
{
v19 = (__m128d)*(unsigned long long *)(v10 + 8 * v12);
if ( v14.m128d_f64[0] < v19.m128d_f64[0] )
break;
if ( v18.m128d_f64[0] > v19.m128d_f64[0] )
{
v23 = v12;
v18 = v19;
}
++v12;
}
v20 = _mm_cmple_sd(v18, v15).m128d_f64[0];
*(double *)&v22[1] = v14.m128d_f64[0]
- COERCE_DOUBLE(~*(_QWORD *)&v20 & *(_QWORD *)&v18.m128d_f64[0] | *(_QWORD *)&v15.m128d_f64[0] & *(_QWORD *)&v20);
((void ( *)(long long, _QWORD *))std::vector<findPeaks::lpr_peak_prominence_t>::push_back)(a1, v22);
}
return a1;
}
| _peak_prominences:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
XORPD XMM0,XMM0
MOVUPD xmmword ptr [RDI],XMM0
AND qword ptr [RDI + 0x10],0x0
MOV RBP,RCX
SHR RBP,0x1
XOR R13D,R13D
LAB_0012e205:
MOV RDX,qword ptr [R15]
MOV RAX,qword ptr [R15 + 0x8]
SUB RAX,RDX
SAR RAX,0x3
CMP R13,RAX
JNC 0x0012e2e7
MOV RAX,qword ptr [R12]
MOV RCX,qword ptr [R12 + 0x8]
SUB RCX,RAX
SAR RCX,0x3
DEC RCX
MOV RDX,qword ptr [RDX + R13*0x8]
CMP R14,0x2
JC 0x0012e24c
MOV RSI,RDX
SUB RSI,RBP
LEA RDI,[RDX + RBP*0x1]
CMP RDI,RCX
CMOVC RCX,RDI
JMP 0x0012e24e
LAB_0012e24c:
XOR ESI,ESI
LAB_0012e24e:
MOV qword ptr [RSP],RDX
MOVSD XMM0,qword ptr [RAX + RDX*0x8]
MOVAPD XMM1,XMM0
MOV RDI,RDX
LAB_0012e25e:
CMP RSI,RDI
JA 0x0012e288
MOVSD XMM2,qword ptr [RAX + RDI*0x8]
UCOMISD XMM0,XMM2
JC 0x0012e288
UCOMISD XMM1,XMM2
JBE 0x0012e27c
MOV qword ptr [RSP],RDI
MOVAPD XMM1,XMM2
LAB_0012e27c:
LEA R8,[RDI + -0x1]
OR RDI,RSI
MOV RDI,R8
JNZ 0x0012e25e
LAB_0012e288:
MOV qword ptr [RSP + 0x10],RDX
MOVAPD XMM2,XMM0
LAB_0012e291:
CMP RDX,RCX
JA 0x0012e2b5
MOVSD XMM3,qword ptr [RAX + RDX*0x8]
UCOMISD XMM0,XMM3
JC 0x0012e2b5
UCOMISD XMM2,XMM3
JBE 0x0012e2b0
MOV qword ptr [RSP + 0x10],RDX
MOVAPD XMM2,XMM3
LAB_0012e2b0:
INC RDX
JMP 0x0012e291
LAB_0012e2b5:
MOVAPD XMM3,XMM2
CMPLESD XMM3,XMM1
ANDPD XMM1,XMM3
ANDNPD XMM3,XMM2
ORPD XMM3,XMM1
SUBSD XMM0,XMM3
MOVSD qword ptr [RSP + 0x8],XMM0
LAB_0012e2d4:
MOV RDI,RBX
MOV RSI,RSP
CALL 0x0012f648
LAB_0012e2df:
INC R13
JMP 0x0012e205
LAB_0012e2e7:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* findPeaks::_peak_prominences(std::vector<double, std::allocator<double> > const&,
std::vector<unsigned long, std::allocator<unsigned long> > const&, unsigned long) */
findPeaks * __thiscall
findPeaks::_peak_prominences(findPeaks *this,vector *param_1,vector *param_2,ulong param_3)
{
double dVar1;
long lVar2;
bool bVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
ulong uVar7;
ulong uVar8;
double dVar9;
double dVar10;
ulong local_48;
double local_40;
ulong local_38;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
uVar8 = 0;
do {
if ((ulong)(*(long *)(param_2 + 8) - *(long *)param_2 >> 3) <= uVar8) {
return this;
}
lVar2 = *(long *)param_1;
uVar4 = (*(long *)(param_1 + 8) - lVar2 >> 3) - 1;
uVar5 = *(ulong *)(*(long *)param_2 + uVar8 * 8);
if (param_3 < 2) {
uVar6 = 0;
}
else {
uVar6 = uVar5 - (param_3 >> 1);
uVar7 = uVar5 + (param_3 >> 1);
if (uVar7 < uVar4) {
uVar4 = uVar7;
}
}
local_40 = *(double *)(lVar2 + uVar5 * 8);
uVar7 = uVar5;
dVar9 = local_40;
local_48 = uVar5;
do {
dVar10 = local_40;
local_38 = uVar5;
if ((uVar7 < uVar6) || (dVar1 = *(double *)(lVar2 + uVar7 * 8), local_40 < dVar1)) break;
if (dVar1 < dVar9) {
dVar9 = dVar1;
local_48 = uVar7;
}
bVar3 = uVar7 != 0;
uVar7 = uVar7 - 1;
} while (bVar3 || uVar6 != 0);
for (; (uVar5 <= uVar4 && (dVar1 = *(double *)(lVar2 + uVar5 * 8), dVar1 <= local_40));
uVar5 = uVar5 + 1) {
if (dVar1 < dVar10) {
dVar10 = dVar1;
local_38 = uVar5;
}
}
local_40 = local_40 -
(double)(~-(ulong)(dVar10 <= dVar9) & (ulong)dVar10 |
(ulong)dVar9 & -(ulong)(dVar10 <= dVar9));
/* try { // try from 0012e2d4 to 0012e2de has its CatchHandler @ 0012e2f9 */
std::vector<findPeaks::lpr_peak_prominence_t,std::allocator<findPeaks::lpr_peak_prominence_t>>::
push_back((vector<findPeaks::lpr_peak_prominence_t,std::allocator<findPeaks::lpr_peak_prominence_t>>
*)this,(lpr_peak_prominence_t *)&local_48);
uVar8 = uVar8 + 1;
} while( true );
}
| |
21,264 | pfs_get_thread_file_stream_locker_v1 | eloqsql/storage/perfschema/pfs.cc | PSI_file_locker*
pfs_get_thread_file_stream_locker_v1(PSI_file_locker_state *state,
PSI_file *file, PSI_file_operation op)
{
PFS_file *pfs_file= reinterpret_cast<PFS_file*> (file);
assert(static_cast<int> (op) >= 0);
assert(static_cast<uint> (op) < array_elements(file_operation_map));
assert(state != NULL);
if (unlikely(pfs_file == NULL))
return NULL;
assert(pfs_file->m_class != NULL);
PFS_file_class *klass= pfs_file->m_class;
if (! pfs_file->m_enabled)
return NULL;
/* Needed for the LF_HASH */
PFS_thread *pfs_thread= my_thread_get_THR_PFS();
if (unlikely(pfs_thread == NULL))
return NULL;
uint flags;
/* Always populated */
state->m_thread= reinterpret_cast<PSI_thread *> (pfs_thread);
if (flag_thread_instrumentation)
{
if (! pfs_thread->m_enabled)
return NULL;
flags= STATE_FLAG_THREAD;
if (pfs_file->m_timed)
flags|= STATE_FLAG_TIMED;
if (flag_events_waits_current)
{
if (unlikely(pfs_thread->m_events_waits_current >=
& pfs_thread->m_events_waits_stack[WAIT_STACK_SIZE]))
{
locker_lost++;
return NULL;
}
PFS_events_waits *wait= pfs_thread->m_events_waits_current;
state->m_wait= wait;
flags|= STATE_FLAG_EVENT;
PFS_events_waits *parent_event= wait - 1;
wait->m_event_type= EVENT_TYPE_WAIT;
wait->m_nesting_event_id= parent_event->m_event_id;
wait->m_nesting_event_type= parent_event->m_event_type;
wait->m_thread_internal_id= pfs_thread->m_thread_internal_id;
wait->m_class= klass;
wait->m_timer_start= 0;
wait->m_timer_end= 0;
wait->m_object_instance_addr= pfs_file;
wait->m_weak_file= pfs_file;
wait->m_weak_version= pfs_file->get_version();
wait->m_event_id= pfs_thread->m_event_id++;
wait->m_end_event_id= 0;
wait->m_operation= file_operation_map[static_cast<int> (op)];
wait->m_wait_class= WAIT_CLASS_FILE;
pfs_thread->m_events_waits_current++;
}
}
else
{
if (pfs_file->m_timed)
{
flags= STATE_FLAG_TIMED;
}
else
{
/* TODO: consider a shortcut. */
flags= 0;
}
}
state->m_flags= flags;
state->m_file= reinterpret_cast<PSI_file*> (pfs_file);
state->m_operation= op;
state->m_name= NULL;
state->m_class= klass;
return reinterpret_cast<PSI_file_locker*> (state);
} | O0 | cpp | pfs_get_thread_file_stream_locker_v1:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x4fd3a
movq $0x0, -0x8(%rbp)
jmp 0x4ffc1
movq -0x28(%rbp), %rax
movq 0x220(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
testb $0x1, 0x4(%rax)
jne 0x4fd60
movq $0x0, -0x8(%rbp)
jmp 0x4ffc1
callq 0x4d760
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x4fd88
movq $0x0, -0x8(%rbp)
jmp 0x4ffc1
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
leaq 0x3bc2a5(%rip), %rax # 0x40c040
testb $0x1, (%rax)
je 0x4ff66
movq -0x38(%rbp), %rax
testb $0x1, 0x7e0(%rax)
jne 0x4fdbe
movq $0x0, -0x8(%rbp)
jmp 0x4ffc1
movl $0x2, -0x3c(%rbp)
movq -0x28(%rbp), %rax
testb $0x1, 0x5(%rax)
je 0x4fdd8
movl -0x3c(%rbp), %eax
orl $0x1, %eax
movl %eax, -0x3c(%rbp)
leaq 0x3bc161(%rip), %rax # 0x40bf40
testb $0x1, (%rax)
je 0x4ff64
movq -0x38(%rbp), %rax
movq 0x7f0(%rax), %rax
movq -0x38(%rbp), %rcx
addq $0x878, %rcx # imm = 0x878
addq $0x420, %rcx # imm = 0x420
cmpq %rcx, %rax
setae %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x4fe3a
leaq 0x3bc56c(%rip), %rax # 0x40c388
movq (%rax), %rcx
addq $0x1, %rcx
leaq 0x3bc55e(%rip), %rax # 0x40c388
movq %rcx, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x4ffc1
movq -0x38(%rbp), %rax
movq 0x7f0(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movl -0x3c(%rbp), %eax
orl $0x4, %eax
movl %eax, -0x3c(%rbp)
movq -0x48(%rbp), %rax
addq $-0xb0, %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movl $0x4, 0x18(%rax)
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x50(%rbp), %rax
movl 0x18(%rax), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x28(%rax)
movq -0x38(%rbp), %rax
movq 0x850(%rax), %rcx
movq -0x48(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x48(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x48(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x28(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x28(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x28(%rbp), %rdi
callq 0x56480
movl %eax, %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x80(%rax)
movq -0x38(%rbp), %rax
movq 0x7f8(%rax), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, 0x7f8(%rax)
movq -0x48(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x48(%rbp), %rax
movq $0x0, 0x10(%rax)
movslq -0x1c(%rbp), %rcx
leaq 0x1c351d(%rip), %rax # 0x213450
movl (%rax,%rcx,4), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x90(%rax)
movq -0x48(%rbp), %rax
movl $0x5, 0x58(%rax)
movq -0x38(%rbp), %rax
movq 0x7f0(%rax), %rcx
addq $0xb0, %rcx
movq %rcx, 0x7f0(%rax)
jmp 0x4ff82
movq -0x28(%rbp), %rax
testb $0x1, 0x5(%rax)
je 0x4ff79
movl $0x1, -0x3c(%rbp)
jmp 0x4ff80
movl $0x0, -0x3c(%rbp)
jmp 0x4ff82
movl -0x3c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| pfs_get_thread_file_stream_locker_v1:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov rax, [rbp+var_18]
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_4FD3A
mov [rbp+var_8], 0
jmp loc_4FFC1
loc_4FD3A:
mov rax, [rbp+var_28]
mov rax, [rax+220h]
mov [rbp+var_30], rax
mov rax, [rbp+var_28]
test byte ptr [rax+4], 1
jnz short loc_4FD60
mov [rbp+var_8], 0
jmp loc_4FFC1
loc_4FD60:
call _ZL21my_thread_get_THR_PFSv; my_thread_get_THR_PFS(void)
mov [rbp+var_38], rax
cmp [rbp+var_38], 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_4FD88
mov [rbp+var_8], 0
jmp loc_4FFC1
loc_4FD88:
mov rcx, [rbp+var_38]
mov rax, [rbp+var_10]
mov [rax+20h], rcx
lea rax, flag_thread_instrumentation
test byte ptr [rax], 1
jz loc_4FF66
mov rax, [rbp+var_38]
test byte ptr [rax+7E0h], 1
jnz short loc_4FDBE
mov [rbp+var_8], 0
jmp loc_4FFC1
loc_4FDBE:
mov [rbp+var_3C], 2
mov rax, [rbp+var_28]
test byte ptr [rax+5], 1
jz short loc_4FDD8
mov eax, [rbp+var_3C]
or eax, 1
mov [rbp+var_3C], eax
loc_4FDD8:
lea rax, flag_events_waits_current
test byte ptr [rax], 1
jz loc_4FF64
mov rax, [rbp+var_38]
mov rax, [rax+7F0h]
mov rcx, [rbp+var_38]
add rcx, 878h
add rcx, 420h
cmp rax, rcx
setnb al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_4FE3A
lea rax, locker_lost
mov rcx, [rax]
add rcx, 1
lea rax, locker_lost
mov [rax], rcx
mov [rbp+var_8], 0
jmp loc_4FFC1
loc_4FE3A:
mov rax, [rbp+var_38]
mov rax, [rax+7F0h]
mov [rbp+var_48], rax
mov rcx, [rbp+var_48]
mov rax, [rbp+var_10]
mov [rax+40h], rcx
mov eax, [rbp+var_3C]
or eax, 4
mov [rbp+var_3C], eax
mov rax, [rbp+var_48]
add rax, 0FFFFFFFFFFFFFF50h
mov [rbp+var_50], rax
mov rax, [rbp+var_48]
mov dword ptr [rax+18h], 4
mov rax, [rbp+var_50]
mov rcx, [rax+8]
mov rax, [rbp+var_48]
mov [rax+20h], rcx
mov rax, [rbp+var_50]
mov ecx, [rax+18h]
mov rax, [rbp+var_48]
mov [rax+28h], ecx
mov rax, [rbp+var_38]
mov rcx, [rax+850h]
mov rax, [rbp+var_48]
mov [rax], rcx
mov rcx, [rbp+var_30]
mov rax, [rbp+var_48]
mov [rax+30h], rcx
mov rax, [rbp+var_48]
mov qword ptr [rax+38h], 0
mov rax, [rbp+var_48]
mov qword ptr [rax+40h], 0
mov rcx, [rbp+var_28]
mov rax, [rbp+var_48]
mov [rax+88h], rcx
mov rcx, [rbp+var_28]
mov rax, [rbp+var_48]
mov [rax+68h], rcx
mov rdi, [rbp+var_28]; this
call _ZN8PFS_file11get_versionEv; PFS_file::get_version(void)
mov ecx, eax
mov rax, [rbp+var_48]
mov [rax+80h], ecx
mov rax, [rbp+var_38]
mov rcx, [rax+7F8h]
mov rdx, rcx
add rdx, 1
mov [rax+7F8h], rdx
mov rax, [rbp+var_48]
mov [rax+8], rcx
mov rax, [rbp+var_48]
mov qword ptr [rax+10h], 0
movsxd rcx, [rbp+var_1C]
lea rax, _ZL18file_operation_map; file_operation_map
mov ecx, [rax+rcx*4]
mov rax, [rbp+var_48]
mov [rax+90h], ecx
mov rax, [rbp+var_48]
mov dword ptr [rax+58h], 5
mov rax, [rbp+var_38]
mov rcx, [rax+7F0h]
add rcx, 0B0h
mov [rax+7F0h], rcx
loc_4FF64:
jmp short loc_4FF82
loc_4FF66:
mov rax, [rbp+var_28]
test byte ptr [rax+5], 1
jz short loc_4FF79
mov [rbp+var_3C], 1
jmp short loc_4FF80
loc_4FF79:
mov [rbp+var_3C], 0
loc_4FF80:
jmp short $+2
loc_4FF82:
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_10]
mov [rax], ecx
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov ecx, [rbp+var_1C]
mov rax, [rbp+var_10]
mov [rax+4], ecx
mov rax, [rbp+var_10]
mov qword ptr [rax+10h], 0
mov rcx, [rbp+var_30]
mov rax, [rbp+var_10]
mov [rax+18h], rcx
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
loc_4FFC1:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
| long long pfs_get_thread_file_stream_locker_v1(long long a1, long long a2, int a3)
{
long long v3; // rcx
long long v5; // [rsp+8h] [rbp-48h]
int v6; // [rsp+14h] [rbp-3Ch]
long long THR_PFS; // [rsp+18h] [rbp-38h]
long long v8; // [rsp+20h] [rbp-30h]
if ( !a2 )
return 0LL;
v8 = *(_QWORD *)(a2 + 544);
if ( (*(_BYTE *)(a2 + 4) & 1) == 0 )
return 0LL;
THR_PFS = my_thread_get_THR_PFS();
if ( THR_PFS )
{
*(_QWORD *)(a1 + 32) = THR_PFS;
if ( (flag_thread_instrumentation & 1) != 0 )
{
if ( (*(_BYTE *)(THR_PFS + 2016) & 1) == 0 )
return 0LL;
v6 = 2;
if ( (*(_BYTE *)(a2 + 5) & 1) != 0 )
v6 = 3;
if ( (flag_events_waits_current & 1) != 0 )
{
if ( *(_QWORD *)(THR_PFS + 2032) >= (unsigned long long)(THR_PFS + 3224) )
{
++locker_lost;
return 0LL;
}
v5 = *(_QWORD *)(THR_PFS + 2032);
*(_QWORD *)(a1 + 64) = v5;
v6 |= 4u;
*(_DWORD *)(v5 + 24) = 4;
*(_QWORD *)(v5 + 32) = *(_QWORD *)(v5 - 176 + 8);
*(_DWORD *)(v5 + 40) = *(_DWORD *)(v5 - 176 + 24);
*(_QWORD *)v5 = *(_QWORD *)(THR_PFS + 2128);
*(_QWORD *)(v5 + 48) = v8;
*(_QWORD *)(v5 + 56) = 0LL;
*(_QWORD *)(v5 + 64) = 0LL;
*(_QWORD *)(v5 + 136) = a2;
*(_QWORD *)(v5 + 104) = a2;
*(_DWORD *)(v5 + 128) = PFS_file::get_version((PFS_file *)a2);
v3 = *(_QWORD *)(THR_PFS + 2040);
*(_QWORD *)(THR_PFS + 2040) = v3 + 1;
*(_QWORD *)(v5 + 8) = v3;
*(_QWORD *)(v5 + 16) = 0LL;
*(_DWORD *)(v5 + 144) = file_operation_map[a3];
*(_DWORD *)(v5 + 88) = 5;
*(_QWORD *)(THR_PFS + 2032) += 176LL;
}
}
else
{
v6 = (*(_BYTE *)(a2 + 5) & 1) != 0;
}
*(_DWORD *)a1 = v6;
*(_QWORD *)(a1 + 8) = a2;
*(_DWORD *)(a1 + 4) = a3;
*(_QWORD *)(a1 + 16) = 0LL;
*(_QWORD *)(a1 + 24) = v8;
return a1;
}
return 0LL;
}
| pfs_get_thread_file_stream_locker_v1:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x0014fd3a
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0014ffc1
LAB_0014fd3a:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x220]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x28]
TEST byte ptr [RAX + 0x4],0x1
JNZ 0x0014fd60
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0014ffc1
LAB_0014fd60:
CALL 0x0014d760
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x0014fd88
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0014ffc1
LAB_0014fd88:
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x20],RCX
LEA RAX,[0x50c040]
TEST byte ptr [RAX],0x1
JZ 0x0014ff66
MOV RAX,qword ptr [RBP + -0x38]
TEST byte ptr [RAX + 0x7e0],0x1
JNZ 0x0014fdbe
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0014ffc1
LAB_0014fdbe:
MOV dword ptr [RBP + -0x3c],0x2
MOV RAX,qword ptr [RBP + -0x28]
TEST byte ptr [RAX + 0x5],0x1
JZ 0x0014fdd8
MOV EAX,dword ptr [RBP + -0x3c]
OR EAX,0x1
MOV dword ptr [RBP + -0x3c],EAX
LAB_0014fdd8:
LEA RAX,[0x50bf40]
TEST byte ptr [RAX],0x1
JZ 0x0014ff64
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x7f0]
MOV RCX,qword ptr [RBP + -0x38]
ADD RCX,0x878
ADD RCX,0x420
CMP RAX,RCX
SETNC AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x0014fe3a
LEA RAX,[0x50c388]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
LEA RAX,[0x50c388]
MOV qword ptr [RAX],RCX
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0014ffc1
LAB_0014fe3a:
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x7f0]
MOV qword ptr [RBP + -0x48],RAX
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x40],RCX
MOV EAX,dword ptr [RBP + -0x3c]
OR EAX,0x4
MOV dword ptr [RBP + -0x3c],EAX
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,-0xb0
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV dword ptr [RAX + 0x18],0x4
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX + 0x20],RCX
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x48]
MOV dword ptr [RAX + 0x28],ECX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RAX + 0x850]
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX + 0x30],RCX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX + 0x38],0x0
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX + 0x40],0x0
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX + 0x88],RCX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX + 0x68],RCX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00156480
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x48]
MOV dword ptr [RAX + 0x80],ECX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RAX + 0x7f8]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RAX + 0x7f8],RDX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX + 0x10],0x0
MOVSXD RCX,dword ptr [RBP + -0x1c]
LEA RAX,[0x313450]
MOV ECX,dword ptr [RAX + RCX*0x4]
MOV RAX,qword ptr [RBP + -0x48]
MOV dword ptr [RAX + 0x90],ECX
MOV RAX,qword ptr [RBP + -0x48]
MOV dword ptr [RAX + 0x58],0x5
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RAX + 0x7f0]
ADD RCX,0xb0
MOV qword ptr [RAX + 0x7f0],RCX
LAB_0014ff64:
JMP 0x0014ff82
LAB_0014ff66:
MOV RAX,qword ptr [RBP + -0x28]
TEST byte ptr [RAX + 0x5],0x1
JZ 0x0014ff79
MOV dword ptr [RBP + -0x3c],0x1
JMP 0x0014ff80
LAB_0014ff79:
MOV dword ptr [RBP + -0x3c],0x0
LAB_0014ff80:
JMP 0x0014ff82
LAB_0014ff82:
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV ECX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x4],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],0x0
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
LAB_0014ffc1:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x50
POP RBP
RET
|
uint * pfs_get_thread_file_stream_locker_v1(uint *param_1,PFS_file *param_2,uint param_3)
{
int8 uVar1;
int8 *puVar2;
long lVar3;
int4 uVar4;
long lVar5;
uint local_44;
uint *local_10;
if (param_2 == (PFS_file *)0x0) {
local_10 = (uint *)0x0;
}
else {
uVar1 = *(int8 *)(param_2 + 0x220);
if (((byte)param_2[4] & 1) == 0) {
local_10 = (uint *)0x0;
}
else {
lVar5 = my_thread_get_THR_PFS();
if (lVar5 == 0) {
local_10 = (uint *)0x0;
}
else {
*(long *)(param_1 + 8) = lVar5;
if ((flag_thread_instrumentation & 1) == 0) {
local_44 = (uint)(((byte)param_2[5] & 1) != 0);
}
else {
if ((*(byte *)(lVar5 + 0x7e0) & 1) == 0) {
return (uint *)0x0;
}
local_44 = 2;
if (((byte)param_2[5] & 1) != 0) {
local_44 = 3;
}
if ((flag_events_waits_current & 1) != 0) {
if (lVar5 + 0xc98U <= *(ulong *)(lVar5 + 0x7f0)) {
locker_lost = locker_lost + 1;
return (uint *)0x0;
}
puVar2 = *(int8 **)(lVar5 + 0x7f0);
*(int8 **)(param_1 + 0x10) = puVar2;
local_44 = local_44 | 4;
*(int4 *)(puVar2 + 3) = 4;
puVar2[4] = puVar2[-0x15];
*(int4 *)(puVar2 + 5) = *(int4 *)(puVar2 + -0x13);
*puVar2 = *(int8 *)(lVar5 + 0x850);
puVar2[6] = uVar1;
puVar2[7] = 0;
puVar2[8] = 0;
puVar2[0x11] = param_2;
puVar2[0xd] = param_2;
uVar4 = PFS_file::get_version(param_2);
*(int4 *)(puVar2 + 0x10) = uVar4;
lVar3 = *(long *)(lVar5 + 0x7f8);
*(long *)(lVar5 + 0x7f8) = lVar3 + 1;
puVar2[1] = lVar3;
puVar2[2] = 0;
*(int4 *)(puVar2 + 0x12) =
*(int4 *)(file_operation_map + (long)(int)param_3 * 4);
*(int4 *)(puVar2 + 0xb) = 5;
*(long *)(lVar5 + 0x7f0) = *(long *)(lVar5 + 0x7f0) + 0xb0;
}
}
*param_1 = local_44;
*(PFS_file **)(param_1 + 2) = param_2;
param_1[1] = param_3;
param_1[4] = 0;
param_1[5] = 0;
*(int8 *)(param_1 + 6) = uVar1;
local_10 = param_1;
}
}
}
return local_10;
}
| |
21,265 | ftxui::Utf8ToGlyphs(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/screen/string.cpp | std::vector<std::string> Utf8ToGlyphs(const std::string& input) {
std::vector<std::string> out;
const std::string current;
out.reserve(input.size());
size_t start = 0;
size_t end = 0;
while (start < input.size()) {
uint32_t codepoint = 0;
if (!EatCodePoint(input, start, &end, &codepoint)) {
start = end;
continue;
}
const std::string append = input.substr(start, end - start);
start = end;
// Ignore control characters.
if (IsControl(codepoint)) {
continue;
}
// Combining characters are put with the previous glyph they are modifying.
if (IsCombining(codepoint)) {
if (!out.empty()) {
out.back() += append;
}
continue;
}
// Fullwidth characters take two cells. The second is made of the empty
// string to reserve the space the first is taking.
if (IsFullWidth(codepoint)) {
out.push_back(append);
out.emplace_back("");
continue;
}
// Normal characters:
out.push_back(append);
}
return out;
} | O3 | cpp | ftxui::Utf8ToGlyphs(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
xorl %eax, %eax
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
leaq 0x48(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb $0x0, (%rcx)
movq 0x8(%rsi), %rsi
movq %rdi, (%rsp)
callq 0x3b1e2
movq $0x0, 0x10(%rsp)
movq 0x8(%r14), %rbx
testq %rbx, %rbx
je 0x3aaac
xorl %ebp, %ebp
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %r12
movl $0x0, 0xc(%rsp)
movq %r14, %rdi
movq %rbp, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x3a5b4
testb %al, %al
je 0x3aa08
movq 0x10(%rsp), %r13
movq %r13, %rcx
subq %rbp, %rcx
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0xb420
movl 0xc(%rsp), %ebp
testl %ebp, %ebp
je 0x3aa80
cmpl $0x1f, %ebp
ja 0x3aa12
cmpl $0xa, %ebp
je 0x3aa1a
jmp 0x3aa80
movq 0x10(%rsp), %r13
jmp 0x3aaa0
leal -0x7f(%rbp), %eax
cmpl $0x21, %eax
jb 0x3aa80
movl %ebp, %edi
callq 0x3a6d0
testb %al, %al
je 0x3aa47
movq (%rsp), %rax
movq 0x8(%rax), %rdi
cmpq %rdi, (%rax)
je 0x3aa80
addq $-0x20, %rdi
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0xb110
jmp 0x3aa80
movl %ebp, %edi
callq 0x3a728
testb %al, %al
je 0x3aa72
movq (%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x2c19e
movq (%rsp), %rdi
leaq 0x21a6(%rip), %rsi # 0x3cc11
callq 0x2c1dc
jmp 0x3aa80
movq (%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x2c19e
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x3aa9c
movq 0x28(%rsp), %rsi
incq %rsi
callq 0xb400
movq 0x8(%r14), %rbx
movq %r13, %rbp
cmpq %rbx, %r13
jb 0x3a9b8
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x3aac8
movq 0x48(%rsp), %rsi
incq %rsi
callq 0xb400
movq (%rsp), %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3aafe
movq %rax, %r14
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x3ab01
movq 0x28(%rsp), %rsi
incq %rsi
callq 0xb400
jmp 0x3ab01
movq %rax, %r14
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x3ab1d
movq 0x48(%rsp), %rsi
incq %rsi
callq 0xb400
movq (%rsp), %rdi
callq 0x1043c
movq %r14, %rdi
callq 0xb780
| _ZN5ftxui12Utf8ToGlyphsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r14, rsi
xor eax, eax
mov [rdi+10h], rax
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
lea rcx, [rsp+88h+var_40]
mov [rcx-10h], rcx
mov [rcx-8], rax
mov byte ptr [rcx], 0
mov rsi, [rsi+8]
mov [rsp+88h+var_88], rdi
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE7reserveEm; std::vector<std::string>::reserve(ulong)
mov [rsp+88h+var_7C+4], 0
mov rbx, [r14+8]
test rbx, rbx
jz loc_3AAAC
xor ebp, ebp
lea r15, [rsp+88h+var_7C+4]
lea r12, [rsp+88h+var_7C]
loc_3A9B8:
mov dword ptr [rsp+88h+var_7C], 0
mov rdi, r14
mov rsi, rbp
mov rdx, r15
mov rcx, r12
call _ZN5ftxui12EatCodePointERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmPmPj; ftxui::EatCodePoint(std::string const&,ulong,ulong *,uint *)
test al, al
jz short loc_3AA08
mov r13, [rsp+88h+var_7C+4]
mov rcx, r13
sub rcx, rbp
lea rdi, [rsp+88h+var_70]
mov rsi, r14; unsigned int
mov rdx, rbp
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov ebp, dword ptr [rsp+88h+var_7C]
test ebp, ebp
jz loc_3AA80
cmp ebp, 1Fh
ja short loc_3AA12
cmp ebp, 0Ah
jz short loc_3AA1A
jmp short loc_3AA80
loc_3AA08:
mov r13, [rsp+88h+var_7C+4]
jmp loc_3AAA0
loc_3AA12:
lea eax, [rbp-7Fh]
cmp eax, 21h ; '!'
jb short loc_3AA80
loc_3AA1A:
mov edi, ebp; this
call _ZN5ftxui11IsCombiningEj; ftxui::IsCombining(uint)
test al, al
jz short loc_3AA47
mov rax, [rsp+88h+var_88]
mov rdi, [rax+8]
cmp [rax], rdi
jz short loc_3AA80
add rdi, 0FFFFFFFFFFFFFFE0h
mov rsi, [rsp+88h+var_70]
mov rdx, [rsp+88h+var_68]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
jmp short loc_3AA80
loc_3AA47:
mov edi, ebp; this
call _ZN5ftxui11IsFullWidthEj; ftxui::IsFullWidth(uint)
test al, al
jz short loc_3AA72
mov rdi, [rsp+88h+var_88]
lea rsi, [rsp+88h+var_70]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_; std::vector<std::string>::push_back(std::string const&)
mov rdi, [rsp+88h+var_88]
lea rsi, asc_3CC0F+2; ""
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJRA1_KcEEERS5_DpOT_; std::vector<std::string>::emplace_back<char const(&)[1]>(char const(&)[1] &&)
jmp short loc_3AA80
loc_3AA72:
mov rdi, [rsp+88h+var_88]
lea rsi, [rsp+88h+var_70]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_; std::vector<std::string>::push_back(std::string const&)
loc_3AA80:
mov rdi, [rsp+88h+var_70]; void *
lea rax, [rsp+88h+var_60]
cmp rdi, rax
jz short loc_3AA9C
mov rsi, [rsp+88h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3AA9C:
mov rbx, [r14+8]
loc_3AAA0:
mov rbp, r13
cmp r13, rbx
jb loc_3A9B8
loc_3AAAC:
mov rdi, [rsp+88h+var_50]; void *
lea rax, [rsp+88h+var_40]
cmp rdi, rax
jz short loc_3AAC8
mov rsi, [rsp+88h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3AAC8:
mov rax, [rsp+88h+var_88]
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_3AAFE
mov r14, rax
mov rdi, [rsp+arg_10]; void *
lea rax, [rsp+arg_20]
cmp rdi, rax
jz short loc_3AB01
mov rsi, [rsp+arg_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_3AB01
loc_3AAFE:
mov r14, rax
loc_3AB01:
mov rdi, [rsp+arg_30]; void *
lea rax, [rsp+arg_40]
cmp rdi, rax
jz short loc_3AB1D
mov rsi, [rsp+arg_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3AB1D:
mov rdi, [rsp+0]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, r14
call __Unwind_Resume
| long long ftxui::Utf8ToGlyphs(long long a1, long long *a2, long long a3)
{
unsigned long long v3; // rbx
unsigned long long v4; // rbp
unsigned long long v5; // r13
unsigned int v6; // ebp
long long v7; // rdi
int v10[3]; // [rsp+Ch] [rbp-7Ch] BYREF
void *v11[2]; // [rsp+18h] [rbp-70h] BYREF
long long v12; // [rsp+28h] [rbp-60h] BYREF
void *v13; // [rsp+38h] [rbp-50h]
long long v14; // [rsp+40h] [rbp-48h]
_QWORD v15[8]; // [rsp+48h] [rbp-40h] BYREF
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
v13 = v15;
v14 = 0LL;
LOBYTE(v15[0]) = 0;
std::vector<std::string>::reserve(a1, a2[1], a3, v15);
*(_QWORD *)&v10[1] = 0LL;
v3 = a2[1];
if ( v3 )
{
v4 = 0LL;
while ( 1 )
{
v10[0] = 0;
if ( ftxui::EatCodePoint(a2, v4, &v10[1], v10) )
break;
v5 = *(_QWORD *)&v10[1];
LABEL_19:
v4 = v5;
if ( v5 >= v3 )
goto LABEL_20;
}
v5 = *(_QWORD *)&v10[1];
std::string::substr(v11, a2, v4, *(_QWORD *)&v10[1] - v4);
v6 = v10[0];
if ( v10[0] )
{
if ( v10[0] <= 0x1Fu )
{
if ( v10[0] != 10 )
goto LABEL_16;
LABEL_10:
if ( ftxui::IsCombining((ftxui *)(unsigned int)v10[0]) )
{
v7 = *(_QWORD *)(a1 + 8);
if ( *(_QWORD *)a1 != v7 )
std::string::_M_append(v7 - 32, v11[0], v11[1]);
}
else if ( ftxui::IsFullWidth((ftxui *)v6) )
{
std::vector<std::string>::push_back(a1, (long long)v11);
std::vector<std::string>::emplace_back<char const(&)[1]>(a1, "");
}
else
{
std::vector<std::string>::push_back(a1, (long long)v11);
}
goto LABEL_16;
}
if ( (unsigned int)(v10[0] - 127) >= 0x21 )
goto LABEL_10;
}
LABEL_16:
if ( v11[0] != &v12 )
operator delete(v11[0], v12 + 1);
v3 = a2[1];
goto LABEL_19;
}
LABEL_20:
if ( v13 != v15 )
operator delete(v13, v15[0] + 1LL);
return a1;
}
| Utf8ToGlyphs:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R14,RSI
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
LEA RCX,[RSP + 0x48]
MOV qword ptr [RCX + -0x10],RCX
MOV qword ptr [RCX + -0x8],RAX
MOV byte ptr [RCX],0x0
MOV RSI,qword ptr [RSI + 0x8]
LAB_0013a98d:
MOV qword ptr [RSP],RDI
CALL 0x0013b1e2
MOV qword ptr [RSP + 0x10],0x0
MOV RBX,qword ptr [R14 + 0x8]
TEST RBX,RBX
JZ 0x0013aaac
XOR EBP,EBP
LEA R15,[RSP + 0x10]
LEA R12,[RSP + 0xc]
LAB_0013a9b8:
MOV dword ptr [RSP + 0xc],0x0
MOV RDI,R14
MOV RSI,RBP
MOV RDX,R15
MOV RCX,R12
CALL 0x0013a5b4
TEST AL,AL
JZ 0x0013aa08
MOV R13,qword ptr [RSP + 0x10]
MOV RCX,R13
SUB RCX,RBP
LAB_0013a9e0:
LEA RDI,[RSP + 0x18]
MOV RSI,R14
MOV RDX,RBP
CALL 0x0010b420
MOV EBP,dword ptr [RSP + 0xc]
TEST EBP,EBP
JZ 0x0013aa80
CMP EBP,0x1f
JA 0x0013aa12
CMP EBP,0xa
JZ 0x0013aa1a
JMP 0x0013aa80
LAB_0013aa08:
MOV R13,qword ptr [RSP + 0x10]
JMP 0x0013aaa0
LAB_0013aa12:
LEA EAX,[RBP + -0x7f]
CMP EAX,0x21
JC 0x0013aa80
LAB_0013aa1a:
MOV EDI,EBP
CALL 0x0013a6d0
TEST AL,AL
JZ 0x0013aa47
MOV RAX,qword ptr [RSP]
MOV RDI,qword ptr [RAX + 0x8]
CMP qword ptr [RAX],RDI
JZ 0x0013aa80
ADD RDI,-0x20
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
LAB_0013aa40:
CALL 0x0010b110
JMP 0x0013aa80
LAB_0013aa47:
MOV EDI,EBP
CALL 0x0013a728
TEST AL,AL
JZ 0x0013aa72
MOV RDI,qword ptr [RSP]
LEA RSI,[RSP + 0x18]
CALL 0x0012c19e
MOV RDI,qword ptr [RSP]
LEA RSI,[0x13cc11]
CALL 0x0012c1dc
JMP 0x0013aa80
LAB_0013aa72:
MOV RDI,qword ptr [RSP]
LEA RSI,[RSP + 0x18]
CALL 0x0012c19e
LAB_0013aa80:
MOV RDI,qword ptr [RSP + 0x18]
LEA RAX,[RSP + 0x28]
CMP RDI,RAX
JZ 0x0013aa9c
MOV RSI,qword ptr [RSP + 0x28]
INC RSI
CALL 0x0010b400
LAB_0013aa9c:
MOV RBX,qword ptr [R14 + 0x8]
LAB_0013aaa0:
MOV RBP,R13
CMP R13,RBX
JC 0x0013a9b8
LAB_0013aaac:
MOV RDI,qword ptr [RSP + 0x38]
LEA RAX,[RSP + 0x48]
CMP RDI,RAX
JZ 0x0013aac8
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x0010b400
LAB_0013aac8:
MOV RAX,qword ptr [RSP]
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* ftxui::Utf8ToGlyphs(std::__cxx11::string const&) */
ftxui * __thiscall ftxui::Utf8ToGlyphs(ftxui *this,string *param_1)
{
uint uVar1;
char cVar2;
ulong uVar3;
ulong uVar4;
uint local_7c;
ulong local_78;
long *local_70 [2];
long local_60 [2];
int1 *local_50;
int8 local_48;
int1 local_40;
int7 uStack_3f;
*(int8 *)(this + 0x10) = 0;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
local_50 = &local_40;
local_48 = 0;
local_40 = 0;
/* try { // try from 0013a98d to 0013a995 has its CatchHandler @ 0013aadb */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::reserve
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)this,
*(ulong *)(param_1 + 8));
local_78 = 0;
uVar3 = *(ulong *)(param_1 + 8);
if (uVar3 != 0) {
uVar4 = 0;
do {
local_7c = 0;
cVar2 = EatCodePoint(param_1,uVar4,&local_78,&local_7c);
uVar4 = local_78;
if (cVar2 != '\0') {
/* try { // try from 0013a9e0 to 0013a9ef has its CatchHandler @ 0013aafe */
std::__cxx11::string::substr((ulong)local_70,(ulong)param_1);
uVar1 = local_7c;
if (local_7c != 0) {
if (local_7c < 0x20) {
if (local_7c == 10) {
LAB_0013aa1a:
cVar2 = IsCombining(local_7c);
if (cVar2 == '\0') {
cVar2 = IsFullWidth(uVar1);
if (cVar2 == '\0') {
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)
this,(string *)local_70);
}
else {
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)
this,(string *)local_70);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<char_const(&)[1]>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)
this,"");
}
}
else if (*(long *)this != *(long *)(this + 8)) {
/* try { // try from 0013aa40 to 0013aa7f has its CatchHandler @ 0013aadd */
std::__cxx11::string::_M_append
((char *)(*(long *)(this + 8) + -0x20),(ulong)local_70[0]);
}
}
}
else if (0x20 < local_7c - 0x7f) goto LAB_0013aa1a;
}
if (local_70[0] != local_60) {
operator_delete(local_70[0],local_60[0] + 1);
}
uVar3 = *(ulong *)(param_1 + 8);
}
} while (uVar4 < uVar3);
}
if (local_50 != &local_40) {
operator_delete(local_50,CONCAT71(uStack_3f,local_40) + 1);
}
return this;
}
| |
21,266 | init_one_value | eloqsql/mysys/my_getopt.c | static void init_one_value(const struct my_option *option, void *variable,
longlong value)
{
DBUG_ENTER("init_one_value");
switch ((option->var_type & GET_TYPE_MASK)) {
case GET_BOOL:
*((my_bool*) variable)= (my_bool) value;
break;
case GET_INT:
*((int*) variable)= (int) getopt_ll_limit_value((int) value, option, NULL);
break;
case GET_ENUM:
*((ulong*) variable)= (ulong) value;
break;
case GET_UINT:
*((uint*) variable)= (uint) getopt_ull_limit_value((uint) value, option, NULL);
break;
case GET_LONG:
*((long*) variable)= (long) getopt_ll_limit_value((long) value, option, NULL);
break;
case GET_ULONG:
*((ulong*) variable)= (ulong) getopt_ull_limit_value((ulong) value, option, NULL);
break;
case GET_LL:
*((longlong*) variable)= (longlong) getopt_ll_limit_value((longlong) value, option, NULL);
break;
case GET_ULL:
*((ulonglong*) variable)= (ulonglong) getopt_ull_limit_value((ulonglong) value, option, NULL);
break;
case GET_SET:
case GET_FLAGSET:
*((ulonglong*) variable)= (ulonglong) value;
break;
case GET_BIT:
{
ulonglong bit= (option->block_size >= 0 ?
option->block_size :
-option->block_size);
if (option->block_size < 0)
value= !value;
if (value)
(*(ulonglong*)variable)|= bit;
else
(*(ulonglong*)variable)&= ~bit;
break;
}
case GET_DOUBLE:
*((double*) variable)= getopt_ulonglong2double(value);
break;
case GET_STR:
/*
Do not clear variable value if it has no default value.
The default value may already be set.
NOTE: To avoid compiler warnings, we first cast longlong to intptr,
so that the value has the same size as a pointer.
*/
if ((char*) (intptr) value)
*((char**) variable)= (char*) (intptr) value;
break;
case GET_STR_ALLOC:
/*
Do not clear variable value if it has no default value.
The default value may already be set.
NOTE: To avoid compiler warnings, we first cast longlong to intptr,
so that the value has the same size as a pointer.
*/
if ((char*) (intptr) value)
{
char **pstr= (char **) variable;
my_free(*pstr);
*pstr= my_strdup(key_memory_defaults, (char*) (intptr) value, MYF(MY_WME));
}
break;
default: /* dummy default to avoid compiler warnings */
break;
}
DBUG_VOID_RETURN;
} | O3 | c | init_one_value:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x30(%rdi), %rax
andl $0x3f, %eax
addq $-0x2, %rax
cmpq $0xe, %rax
ja 0xa373b
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %rsi
leaq 0x46a0c(%rip), %rcx # 0xea09c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r14, (%rbx)
jmp 0xa373b
movq %r14, %rdi
xorl %edx, %edx
callq 0xa3c27
jmp 0xa3738
movq %r14, %rdi
xorl %edx, %edx
callq 0xa3d48
jmp 0xa3738
movq 0x60(%rsi), %rcx
movq %rcx, %rax
negq %rax
cmovsq %rcx, %rax
xorl %edx, %edx
testq %r14, %r14
sete %dl
testq %rcx, %rcx
cmovnsq %r14, %rdx
testq %rdx, %rdx
je 0xa3732
orq (%rbx), %rax
jmp 0xa3738
movb %r14b, (%rbx)
jmp 0xa373b
movl %r14d, %edi
xorl %edx, %edx
callq 0xa3d48
jmp 0xa3723
testq %r14, %r14
je 0xa373b
movq (%rbx), %rdi
callq 0xa65fa
leaq 0xb6e1f0(%rip), %rax # 0xc118f8
movl (%rax), %edi
movl $0x10, %edx
movq %r14, %rsi
callq 0xa6690
jmp 0xa3738
movslq %r14d, %rdi
xorl %edx, %edx
callq 0xa3c27
movl %eax, (%rbx)
jmp 0xa373b
testq %r14, %r14
jne 0xa3699
jmp 0xa373b
notq %rax
andq (%rbx), %rax
movq %rax, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
| init_one_value:
push rbp
mov rbp, rsp
push r14
push rbx
mov rax, [rdi+30h]
and eax, 3Fh
add rax, 0FFFFFFFFFFFFFFFEh; switch 15 cases
cmp rax, 0Eh
ja def_A3697; jumptable 00000000000A3697 default case, case 11
mov r14, rdx
mov rbx, rsi
mov rsi, rdi
lea rcx, jpt_A3697
movsxd rax, ds:(jpt_A3697 - 0EA09Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_A3699:
mov [rbx], r14; jumptable 00000000000A3697 cases 12-15
jmp def_A3697; jumptable 00000000000A3697 default case, case 11
loc_A36A1:
mov rdi, r14; jumptable 00000000000A3697 cases 5,7
xor edx, edx
call getopt_ll_limit_value
jmp loc_A3738
loc_A36B0:
mov rdi, r14; jumptable 00000000000A3697 cases 6,8
xor edx, edx
call getopt_ull_limit_value
jmp short loc_A3738
loc_A36BC:
mov rcx, [rsi+60h]; jumptable 00000000000A3697 case 16
mov rax, rcx
neg rax
cmovs rax, rcx
xor edx, edx
test r14, r14
setz dl
test rcx, rcx
cmovns rdx, r14
test rdx, rdx
jz short loc_A3732
or rax, [rbx]
jmp short loc_A3738
loc_A36E3:
mov [rbx], r14b; jumptable 00000000000A3697 case 2
jmp short def_A3697; jumptable 00000000000A3697 default case, case 11
loc_A36E8:
mov edi, r14d; jumptable 00000000000A3697 case 4
xor edx, edx
call getopt_ull_limit_value
jmp short loc_A3723
loc_A36F4:
test r14, r14; jumptable 00000000000A3697 case 10
jz short def_A3697; jumptable 00000000000A3697 default case, case 11
mov rdi, [rbx]
call my_free
lea rax, key_memory_defaults
mov edi, [rax]
mov edx, 10h
mov rsi, r14
call my_strdup
jmp short loc_A3738
loc_A3719:
movsxd rdi, r14d; jumptable 00000000000A3697 case 3
xor edx, edx
call getopt_ll_limit_value
loc_A3723:
mov [rbx], eax
jmp short def_A3697; jumptable 00000000000A3697 default case, case 11
loc_A3727:
test r14, r14; jumptable 00000000000A3697 case 9
jnz loc_A3699; jumptable 00000000000A3697 cases 12-15
jmp short def_A3697; jumptable 00000000000A3697 default case, case 11
loc_A3732:
not rax
and rax, [rbx]
loc_A3738:
mov [rbx], rax
def_A3697:
pop rbx; jumptable 00000000000A3697 default case, case 11
pop r14
pop rbp
retn
| long long init_one_value(long long a1, long long *a2, _BOOL8 a3)
{
long long result; // rax
long long v5; // rax
_BOOL8 v6; // rdx
result = (*(_QWORD *)(a1 + 48) & 0x3FLL) - 2;
switch ( *(_QWORD *)(a1 + 48) & 0x3FLL )
{
case 2LL:
*(_BYTE *)a2 = a3;
return result;
case 3LL:
result = getopt_ll_limit_value(a3, a1, 0LL);
goto LABEL_16;
case 4LL:
result = getopt_ull_limit_value(a3, a1, 0LL);
LABEL_16:
*(_DWORD *)a2 = result;
return result;
case 5LL:
case 7LL:
result = getopt_ll_limit_value(a3, a1, 0LL);
goto LABEL_20;
case 6LL:
case 8LL:
result = getopt_ull_limit_value(a3, a1, 0LL);
goto LABEL_20;
case 9LL:
if ( !a3 )
return result;
goto LABEL_2;
case 0xALL:
if ( !a3 )
return result;
my_free(*a2);
result = my_strdup(key_memory_defaults, a3, 16LL);
goto LABEL_20;
case 0xCLL:
case 0xDLL:
case 0xELL:
case 0xFLL:
LABEL_2:
*a2 = a3;
return result;
case 0x10LL:
v5 = -*(_QWORD *)(a1 + 96);
if ( *(long long *)(a1 + 96) > 0 )
v5 = *(_QWORD *)(a1 + 96);
v6 = !a3;
if ( *(long long *)(a1 + 96) >= 0 )
v6 = a3;
if ( v6 )
result = *a2 | v5;
else
result = *a2 & ~v5;
LABEL_20:
*a2 = result;
break;
default:
return result;
}
return result;
}
| init_one_value:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RAX,qword ptr [RDI + 0x30]
AND EAX,0x3f
ADD RAX,-0x2
CMP RAX,0xe
JA 0x001a373b
MOV R14,RDX
MOV RBX,RSI
MOV RSI,RDI
LEA RCX,[0x1ea09c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_c:
MOV qword ptr [RBX],R14
JMP 0x001a373b
caseD_5:
MOV RDI,R14
XOR EDX,EDX
CALL 0x001a3c27
JMP 0x001a3738
caseD_6:
MOV RDI,R14
XOR EDX,EDX
CALL 0x001a3d48
JMP 0x001a3738
caseD_10:
MOV RCX,qword ptr [RSI + 0x60]
MOV RAX,RCX
NEG RAX
CMOVS RAX,RCX
XOR EDX,EDX
TEST R14,R14
SETZ DL
TEST RCX,RCX
CMOVNS RDX,R14
TEST RDX,RDX
JZ 0x001a3732
OR RAX,qword ptr [RBX]
JMP 0x001a3738
caseD_2:
MOV byte ptr [RBX],R14B
JMP 0x001a373b
caseD_4:
MOV EDI,R14D
XOR EDX,EDX
CALL 0x001a3d48
JMP 0x001a3723
caseD_a:
TEST R14,R14
JZ 0x001a373b
MOV RDI,qword ptr [RBX]
CALL 0x001a65fa
LEA RAX,[0xd118f8]
MOV EDI,dword ptr [RAX]
MOV EDX,0x10
MOV RSI,R14
CALL 0x001a6690
JMP 0x001a3738
caseD_3:
MOVSXD RDI,R14D
XOR EDX,EDX
CALL 0x001a3c27
LAB_001a3723:
MOV dword ptr [RBX],EAX
JMP 0x001a373b
caseD_9:
TEST R14,R14
JNZ 0x001a3699
JMP 0x001a373b
LAB_001a3732:
NOT RAX
AND RAX,qword ptr [RBX]
LAB_001a3738:
MOV qword ptr [RBX],RAX
caseD_b:
POP RBX
POP R14
POP RBP
RET
|
void init_one_value(long param_1,ulong *param_2,ulong param_3)
{
ulong uVar1;
int4 uVar2;
ulong uVar3;
ulong uVar4;
switch((uint)*(int8 *)(param_1 + 0x30) & 0x3f) {
case 2:
*(char *)param_2 = (char)param_3;
return;
case 3:
uVar2 = getopt_ll_limit_value((long)(int)param_3,param_1,0);
goto LAB_001a3723;
case 4:
uVar2 = getopt_ull_limit_value(param_3 & 0xffffffff,param_1,0);
LAB_001a3723:
*(int4 *)param_2 = uVar2;
return;
case 5:
case 7:
uVar3 = getopt_ll_limit_value(param_3,param_1,0);
break;
case 6:
case 8:
uVar3 = getopt_ull_limit_value(param_3,param_1,0);
break;
case 9:
if (param_3 == 0) {
return;
}
case 0xc:
case 0xd:
case 0xe:
case 0xf:
*param_2 = param_3;
return;
case 10:
if (param_3 == 0) {
return;
}
my_free(*param_2);
uVar3 = my_strdup(key_memory_defaults,param_3,0x10);
break;
default:
goto switchD_001a3697_caseD_b;
case 0x10:
uVar1 = *(ulong *)(param_1 + 0x60);
uVar3 = -uVar1;
if (0 < (long)uVar1) {
uVar3 = uVar1;
}
uVar4 = (ulong)(param_3 == 0);
if (-1 < (long)uVar1) {
uVar4 = param_3;
}
if (uVar4 == 0) {
uVar3 = ~uVar3 & *param_2;
}
else {
uVar3 = uVar3 | *param_2;
}
}
*param_2 = uVar3;
switchD_001a3697_caseD_b:
return;
}
| |
21,267 | JS_SetModuleExportList | bluesky950520[P]quickjs/quickjs.c | int JS_SetModuleExportList(JSContext *ctx, JSModuleDef *m,
const JSCFunctionListEntry *tab, int len)
{
int i;
JSValue val;
for(i = 0; i < len; i++) {
const JSCFunctionListEntry *e = &tab[i];
switch(e->def_type) {
case JS_DEF_CFUNC:
val = JS_NewCFunction2(ctx, e->u.func.cfunc.generic,
e->name, e->u.func.length, e->u.func.cproto, e->magic);
break;
case JS_DEF_PROP_STRING:
/* `e->u.str` may be pure ASCII or UTF-8 encoded */
val = JS_NewString(ctx, e->u.str);
break;
case JS_DEF_PROP_INT32:
val = js_int32(e->u.i32);
break;
case JS_DEF_PROP_INT64:
val = js_int64(e->u.i64);
break;
case JS_DEF_PROP_DOUBLE:
val = js_float64(e->u.f64);
break;
case JS_DEF_OBJECT:
val = JS_NewObject(ctx);
JS_SetPropertyFunctionList(ctx, val, e->u.prop_list.tab, e->u.prop_list.len);
break;
default:
abort();
}
if (JS_SetModuleExport(ctx, m, e->name, val))
return -1;
}
return 0;
} | O0 | c | JS_SetModuleExportList:
subq $0xa8, %rsp
movq %rdi, 0x98(%rsp)
movq %rsi, 0x90(%rsp)
movq %rdx, 0x88(%rsp)
movl %ecx, 0x84(%rsp)
movl $0x0, 0x80(%rsp)
movl 0x80(%rsp), %eax
cmpl 0x84(%rsp), %eax
jge 0x538cf
movq 0x88(%rsp), %rax
movslq 0x80(%rsp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rax
movzbl 0x9(%rax), %eax
movq %rax, (%rsp)
subq $0x8, %rax
ja 0x53879
movq (%rsp), %rax
leaq 0xbd535(%rip), %rcx # 0x110c28
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x98(%rsp), %rdi
movq 0x68(%rsp), %rax
movq 0x18(%rax), %rsi
movq 0x68(%rsp), %rax
movq (%rax), %rdx
movq 0x68(%rsp), %rax
movzbl 0x10(%rax), %ecx
movq 0x68(%rsp), %rax
movzbl 0x11(%rax), %r8d
movq 0x68(%rsp), %rax
movswl 0xa(%rax), %r9d
callq 0x308a0
movq %rax, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x78(%rsp)
jmp 0x5387e
movq 0x98(%rsp), %rdi
movq 0x68(%rsp), %rax
movq 0x10(%rax), %rsi
callq 0x538f0
movq %rax, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x78(%rsp)
jmp 0x5387e
movq 0x68(%rsp), %rax
movl 0x10(%rax), %edi
callq 0x39fb0
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x78(%rsp)
jmp 0x5387e
movq 0x68(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x3d770
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x78(%rsp)
jmp 0x5387e
movq 0x68(%rsp), %rax
movsd 0x10(%rax), %xmm0
callq 0x53950
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x78(%rsp)
jmp 0x5387e
movq 0x98(%rsp), %rdi
callq 0x30860
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x98(%rsp), %rdi
movq 0x68(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x68(%rsp), %rax
movl 0x18(%rax), %r8d
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
callq 0x52df0
jmp 0x5387e
callq 0xe090
movq 0x98(%rsp), %rdi
movq 0x90(%rsp), %rsi
movq 0x68(%rsp), %rax
movq (%rax), %rdx
movq 0x70(%rsp), %rcx
movq 0x78(%rsp), %r8
callq 0x4fcb0
cmpl $0x0, %eax
je 0x538b7
movl $0xffffffff, 0xa4(%rsp) # imm = 0xFFFFFFFF
jmp 0x538da
jmp 0x538b9
movl 0x80(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x80(%rsp)
jmp 0x536a1
movl $0x0, 0xa4(%rsp)
movl 0xa4(%rsp), %eax
addq $0xa8, %rsp
retq
nopl (%rax)
| JS_SetModuleExportList:
sub rsp, 0A8h
mov [rsp+0A8h+var_10], rdi
mov [rsp+0A8h+var_18], rsi
mov [rsp+0A8h+var_20], rdx
mov [rsp+0A8h+var_24], ecx
mov [rsp+0A8h+var_28], 0
loc_536A1:
mov eax, [rsp+0A8h+var_28]
cmp eax, [rsp+0A8h+var_24]
jge loc_538CF
mov rax, [rsp+0A8h+var_20]
movsxd rcx, [rsp+0A8h+var_28]
shl rcx, 5
add rax, rcx
mov [rsp+0A8h+var_40], rax
mov rax, [rsp+0A8h+var_40]
movzx eax, byte ptr [rax+9]
mov [rsp+0A8h+var_A8], rax
sub rax, 8; switch 9 cases
ja def_536FA; jumptable 00000000000536FA default case, cases 1,2,7
mov rax, [rsp+0A8h+var_A8]
lea rcx, jpt_536FA
movsxd rax, ds:(jpt_536FA - 110C28h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_536FC:
mov rdi, [rsp+0A8h+var_10]; jumptable 00000000000536FA case 0
mov rax, [rsp+0A8h+var_40]
mov rsi, [rax+18h]
mov rax, [rsp+0A8h+var_40]
mov rdx, [rax]
mov rax, [rsp+0A8h+var_40]
movzx ecx, byte ptr [rax+10h]
mov rax, [rsp+0A8h+var_40]
movzx r8d, byte ptr [rax+11h]
mov rax, [rsp+0A8h+var_40]
movsx r9d, word ptr [rax+0Ah]
call JS_NewCFunction2
mov [rsp+0A8h+var_50], rax
mov [rsp+0A8h+var_48], rdx
mov rax, [rsp+0A8h+var_50]
mov [rsp+0A8h+var_38], rax
mov rax, [rsp+0A8h+var_48]
mov [rsp+0A8h+var_30], rax
jmp loc_5387E
loc_5375A:
mov rdi, [rsp+0A8h+var_10]; jumptable 00000000000536FA case 3
mov rax, [rsp+0A8h+var_40]
mov rsi, [rax+10h]
call JS_NewString_1
mov [rsp+0A8h+var_60], rax
mov [rsp+0A8h+var_58], rdx
mov rax, [rsp+0A8h+var_60]
mov [rsp+0A8h+var_38], rax
mov rax, [rsp+0A8h+var_58]
mov [rsp+0A8h+var_30], rax
jmp loc_5387E
loc_53793:
mov rax, [rsp+0A8h+var_40]; jumptable 00000000000536FA case 4
mov edi, [rax+10h]
call js_int32
mov [rsp+0A8h+var_70], rax
mov [rsp+0A8h+var_68], rdx
mov rax, [rsp+0A8h+var_70]
mov [rsp+0A8h+var_38], rax
mov rax, [rsp+0A8h+var_68]
mov [rsp+0A8h+var_30], rax
jmp loc_5387E
loc_537C3:
mov rax, [rsp+0A8h+var_40]; jumptable 00000000000536FA case 5
mov rdi, [rax+10h]
call js_int64
mov [rsp+0A8h+var_80], rax
mov [rsp+0A8h+var_78], rdx
mov rax, [rsp+0A8h+var_80]
mov [rsp+0A8h+var_38], rax
mov rax, [rsp+0A8h+var_78]
mov [rsp+0A8h+var_30], rax
jmp loc_5387E
loc_537F4:
mov rax, [rsp+0A8h+var_40]; jumptable 00000000000536FA case 6
movsd xmm0, qword ptr [rax+10h]
call js_float64
mov [rsp+0A8h+var_90], rax
mov [rsp+0A8h+var_88], rdx
mov rax, [rsp+0A8h+var_90]
mov [rsp+0A8h+var_38], rax
mov rax, [rsp+0A8h+var_88]
mov [rsp+0A8h+var_30], rax
jmp short loc_5387E
loc_53823:
mov rdi, [rsp+0A8h+var_10]; jumptable 00000000000536FA case 8
call JS_NewObject
mov [rsp+0A8h+var_A0], rax
mov [rsp+0A8h+var_98], rdx
mov rax, [rsp+0A8h+var_A0]
mov [rsp+0A8h+var_38], rax
mov rax, [rsp+0A8h+var_98]
mov [rsp+0A8h+var_30], rax
mov rdi, [rsp+0A8h+var_10]
mov rax, [rsp+0A8h+var_40]
mov rcx, [rax+10h]
mov rax, [rsp+0A8h+var_40]
mov r8d, [rax+18h]
mov rsi, [rsp+0A8h+var_38]
mov rdx, [rsp+0A8h+var_30]
call JS_SetPropertyFunctionList
jmp short loc_5387E
def_536FA:
call _abort; jumptable 00000000000536FA default case, cases 1,2,7
loc_5387E:
mov rdi, [rsp+0A8h+var_10]
mov rsi, [rsp+0A8h+var_18]
mov rax, [rsp+0A8h+var_40]
mov rdx, [rax]
mov rcx, [rsp+0A8h+var_38]
mov r8, [rsp+0A8h+var_30]
call JS_SetModuleExport
cmp eax, 0
jz short loc_538B7
mov [rsp+0A8h+var_4], 0FFFFFFFFh
jmp short loc_538DA
loc_538B7:
jmp short $+2
loc_538B9:
mov eax, [rsp+0A8h+var_28]
add eax, 1
mov [rsp+0A8h+var_28], eax
jmp loc_536A1
loc_538CF:
mov [rsp+0A8h+var_4], 0
loc_538DA:
mov eax, [rsp+0A8h+var_4]
add rsp, 0A8h
retn
| long long JS_SetModuleExportList(const char *a1, long long a2, long long a3, int a4, long long a5, long long a6)
{
long long v6; // rcx
long long v7; // rdx
long long v8; // rdx
long long v9; // rdx
long long v10; // rdx
long long v11; // rdx
long long v12; // rdx
long long v14; // [rsp+8h] [rbp-A0h]
long long v15; // [rsp+10h] [rbp-98h]
long long v16; // [rsp+18h] [rbp-90h]
long long v17; // [rsp+20h] [rbp-88h]
long long v18; // [rsp+28h] [rbp-80h]
long long v19; // [rsp+30h] [rbp-78h]
long long v20; // [rsp+38h] [rbp-70h]
long long v21; // [rsp+40h] [rbp-68h]
long long v22; // [rsp+48h] [rbp-60h]
long long v23; // [rsp+50h] [rbp-58h]
long long v24; // [rsp+58h] [rbp-50h]
long long v25; // [rsp+60h] [rbp-48h]
long long v26; // [rsp+68h] [rbp-40h]
long long v27; // [rsp+70h] [rbp-38h]
long long v28; // [rsp+78h] [rbp-30h]
int i; // [rsp+80h] [rbp-28h]
long long v32; // [rsp+98h] [rbp-10h]
v32 = (long long)a1;
for ( i = 0; i < a4; ++i )
{
v6 = 32LL * i;
v26 = v6 + a3;
switch ( *(_BYTE *)(v6 + a3 + 9) )
{
case 0:
v24 = JS_NewCFunction2(
v32,
*(_QWORD *)(v26 + 24),
*(_QWORD *)v26,
*(unsigned __int8 *)(v26 + 16),
*(unsigned __int8 *)(v26 + 17),
*(__int16 *)(v26 + 10));
v25 = v7;
v27 = v24;
v28 = v7;
break;
case 3:
v22 = JS_NewString_1(
v32,
*(_QWORD *)(v26 + 16),
a3,
v6,
a5,
a6,
*(unsigned __int8 *)(v6 + a3 + 9),
v14,
v15,
v16,
v17,
v18,
v19,
v20,
v21,
v22,
v23,
v24,
v25);
v23 = v8;
v27 = v22;
v28 = v8;
break;
case 4:
v20 = js_int32(*(_DWORD *)(v26 + 16));
v21 = v9;
v27 = v20;
v28 = v9;
break;
case 5:
v18 = js_int64(*(_QWORD *)(v26 + 16));
v19 = v10;
v27 = v18;
v28 = v10;
break;
case 6:
v16 = js_float64(*(double *)(v26 + 16));
v17 = v11;
v27 = v16;
v28 = v11;
break;
case 8:
v14 = JS_NewObject(v32);
v15 = v12;
v27 = v14;
v28 = v12;
JS_SetPropertyFunctionList(v32, v14, v12, *(_QWORD *)(v26 + 16), *(_DWORD *)(v26 + 24));
break;
default:
abort(a1);
}
a1 = (const char *)v32;
if ( (unsigned int)JS_SetModuleExport(v32, a2, *(unsigned __int8 **)v26, v27, v28) )
return (unsigned int)-1;
}
return 0;
}
| JS_SetModuleExportList:
SUB RSP,0xa8
MOV qword ptr [RSP + 0x98],RDI
MOV qword ptr [RSP + 0x90],RSI
MOV qword ptr [RSP + 0x88],RDX
MOV dword ptr [RSP + 0x84],ECX
MOV dword ptr [RSP + 0x80],0x0
LAB_001536a1:
MOV EAX,dword ptr [RSP + 0x80]
CMP EAX,dword ptr [RSP + 0x84]
JGE 0x001538cf
MOV RAX,qword ptr [RSP + 0x88]
MOVSXD RCX,dword ptr [RSP + 0x80]
SHL RCX,0x5
ADD RAX,RCX
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0x68]
MOVZX EAX,byte ptr [RAX + 0x9]
MOV qword ptr [RSP],RAX
SUB RAX,0x8
JA 0x00153879
MOV RAX,qword ptr [RSP]
LEA RCX,[0x210c28]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
MOV RDI,qword ptr [RSP + 0x98]
MOV RAX,qword ptr [RSP + 0x68]
MOV RSI,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x68]
MOVZX ECX,byte ptr [RAX + 0x10]
MOV RAX,qword ptr [RSP + 0x68]
MOVZX R8D,byte ptr [RAX + 0x11]
MOV RAX,qword ptr [RSP + 0x68]
MOVSX R9D,word ptr [RAX + 0xa]
CALL 0x001308a0
MOV qword ptr [RSP + 0x58],RAX
MOV qword ptr [RSP + 0x60],RDX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x78],RAX
JMP 0x0015387e
caseD_3:
MOV RDI,qword ptr [RSP + 0x98]
MOV RAX,qword ptr [RSP + 0x68]
MOV RSI,qword ptr [RAX + 0x10]
CALL 0x001538f0
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x50],RDX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x78],RAX
JMP 0x0015387e
caseD_4:
MOV RAX,qword ptr [RSP + 0x68]
MOV EDI,dword ptr [RAX + 0x10]
CALL 0x00139fb0
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x78],RAX
JMP 0x0015387e
caseD_5:
MOV RAX,qword ptr [RSP + 0x68]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x0013d770
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],RDX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x78],RAX
JMP 0x0015387e
caseD_6:
MOV RAX,qword ptr [RSP + 0x68]
MOVSD XMM0,qword ptr [RAX + 0x10]
CALL 0x00153950
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],RDX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x78],RAX
JMP 0x0015387e
caseD_8:
MOV RDI,qword ptr [RSP + 0x98]
CALL 0x00130860
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x78],RAX
MOV RDI,qword ptr [RSP + 0x98]
MOV RAX,qword ptr [RSP + 0x68]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RSP + 0x68]
MOV R8D,dword ptr [RAX + 0x18]
MOV RSI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x78]
CALL 0x00152df0
JMP 0x0015387e
caseD_1:
CALL 0x0010e090
LAB_0015387e:
MOV RDI,qword ptr [RSP + 0x98]
MOV RSI,qword ptr [RSP + 0x90]
MOV RAX,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RAX]
MOV RCX,qword ptr [RSP + 0x70]
MOV R8,qword ptr [RSP + 0x78]
CALL 0x0014fcb0
CMP EAX,0x0
JZ 0x001538b7
MOV dword ptr [RSP + 0xa4],0xffffffff
JMP 0x001538da
LAB_001538b7:
JMP 0x001538b9
LAB_001538b9:
MOV EAX,dword ptr [RSP + 0x80]
ADD EAX,0x1
MOV dword ptr [RSP + 0x80],EAX
JMP 0x001536a1
LAB_001538cf:
MOV dword ptr [RSP + 0xa4],0x0
LAB_001538da:
MOV EAX,dword ptr [RSP + 0xa4]
ADD RSP,0xa8
RET
|
int4 JS_SetModuleExportList(int8 param_1,int8 param_2,long param_3,int param_4)
{
int iVar1;
int8 *puVar2;
int1 auVar3 [16];
int8 local_38;
int8 local_30;
int local_28;
local_28 = 0;
while( true ) {
if (param_4 <= local_28) {
return 0;
}
puVar2 = (int8 *)(param_3 + (long)local_28 * 0x20);
switch(*(int1 *)((long)puVar2 + 9)) {
case 0:
auVar3 = JS_NewCFunction2(param_1,puVar2[3],*puVar2,*(int1 *)(puVar2 + 2),
*(int1 *)((long)puVar2 + 0x11),
(int)*(short *)((long)puVar2 + 10));
break;
default:
/* WARNING: Subroutine does not return */
abort();
case 3:
auVar3 = JS_NewString(param_1,puVar2[2]);
break;
case 4:
auVar3 = js_int32(*(int4 *)(puVar2 + 2));
break;
case 5:
auVar3 = js_int64(puVar2[2]);
break;
case 6:
auVar3 = js_float64(puVar2[2]);
break;
case 8:
auVar3 = JS_NewObject(param_1);
JS_SetPropertyFunctionList
(param_1,auVar3._0_8_,auVar3._8_8_,puVar2[2],*(int4 *)(puVar2 + 3));
}
local_30 = auVar3._8_8_;
local_38 = auVar3._0_8_;
iVar1 = JS_SetModuleExport(param_1,param_2,*puVar2,local_38,local_30);
if (iVar1 != 0) break;
local_28 = local_28 + 1;
}
return 0xffffffff;
}
| |
21,268 | JS_SetModuleExportList | bluesky950520[P]quickjs/quickjs.c | int JS_SetModuleExportList(JSContext *ctx, JSModuleDef *m,
const JSCFunctionListEntry *tab, int len)
{
int i;
JSValue val;
for(i = 0; i < len; i++) {
const JSCFunctionListEntry *e = &tab[i];
switch(e->def_type) {
case JS_DEF_CFUNC:
val = JS_NewCFunction2(ctx, e->u.func.cfunc.generic,
e->name, e->u.func.length, e->u.func.cproto, e->magic);
break;
case JS_DEF_PROP_STRING:
/* `e->u.str` may be pure ASCII or UTF-8 encoded */
val = JS_NewString(ctx, e->u.str);
break;
case JS_DEF_PROP_INT32:
val = js_int32(e->u.i32);
break;
case JS_DEF_PROP_INT64:
val = js_int64(e->u.i64);
break;
case JS_DEF_PROP_DOUBLE:
val = js_float64(e->u.f64);
break;
case JS_DEF_OBJECT:
val = JS_NewObject(ctx);
JS_SetPropertyFunctionList(ctx, val, e->u.prop_list.tab, e->u.prop_list.len);
break;
default:
abort();
}
if (JS_SetModuleExport(ctx, m, e->name, val))
return -1;
}
return 0;
} | O2 | c | JS_SetModuleExportList:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, 0x8(%rsp)
movq %rdi, %r13
xorl %eax, %eax
testl %ecx, %ecx
cmovlel %eax, %ecx
shlq $0x5, %rcx
addq $0x20, %rcx
movq %rcx, 0x10(%rsp)
xorl %r14d, %r14d
movq %r14, %r12
addq $0x20, %r14
cmpq %r14, 0x10(%rsp)
je 0x3045a
movzbl 0x9(%r15,%r12), %eax
cmpq $0x8, %rax
ja 0x3046b
leaq 0x566f3(%rip), %rcx # 0x86aa4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%r15,%r12), %rdx
movq 0x18(%r15,%r12), %rsi
movzbl 0x10(%r15,%r12), %ecx
movzbl 0x11(%r15,%r12), %r8d
movswl 0xa(%r15,%r12), %r9d
movq %r13, %rdi
callq 0x1ee8d
jmp 0x30430
movq 0x10(%r15,%r12), %rbp
pushq $0x7
popq %rbx
jmp 0x30436
movq 0x10(%r15,%r12), %rsi
movq %r13, %rdi
callq 0x30470
jmp 0x30430
movq %r13, %rdi
callq 0x1ee79
movq %rax, %rbp
movq %rdx, %rbx
movq 0x10(%r15,%r12), %rcx
movl 0x18(%r15,%r12), %r8d
movq %r13, %rdi
movq %rax, %rsi
callq 0x2ffaf
jmp 0x30436
movl 0x10(%r15,%r12), %ebp
xorl %ebx, %ebx
jmp 0x30436
movq 0x10(%r15,%r12), %rdi
callq 0x245bb
movq %rax, %rbp
movq %rdx, %rbx
movq (%r15,%r12), %rdx
movq %r13, %rdi
movq 0x8(%rsp), %rsi
movq %rbp, %rcx
movq %rbx, %r8
callq 0x2cc4b
testl %eax, %eax
je 0x30388
pushq $-0x1
popq %rax
jmp 0x3045c
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xe090
| JS_SetModuleExportList:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15, rdx
mov [rsp+48h+var_40], rsi
mov r13, rdi
xor eax, eax
test ecx, ecx
cmovle ecx, eax
shl rcx, 5
add rcx, 20h ; ' '
mov [rsp+48h+var_38], rcx
xor r14d, r14d
loc_30388:
mov r12, r14
add r14, 20h ; ' '
cmp [rsp+48h+var_38], r14
jz loc_3045A
movzx eax, byte ptr [r15+r12+9]
cmp rax, 8; switch 9 cases
ja def_303B8; jumptable 00000000000303B8 default case, cases 1,2,7
lea rcx, jpt_303B8
movsxd rax, ds:(jpt_303B8 - 86AA4h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_303BA:
mov rdx, [r15+r12]; jumptable 00000000000303B8 case 0
mov rsi, [r15+r12+18h]
movzx ecx, byte ptr [r15+r12+10h]
movzx r8d, byte ptr [r15+r12+11h]
movsx r9d, word ptr [r15+r12+0Ah]
mov rdi, r13
call JS_NewCFunction2
jmp short loc_30430
loc_303DF:
mov rbp, [r15+r12+10h]; jumptable 00000000000303B8 case 6
push 7
pop rbx
jmp short loc_30436
loc_303E9:
mov rsi, [r15+r12+10h]; jumptable 00000000000303B8 case 3
mov rdi, r13
call JS_NewString_0
jmp short loc_30430
loc_303F8:
mov rdi, r13; jumptable 00000000000303B8 case 8
call JS_NewObject
mov rbp, rax
mov rbx, rdx
mov rcx, [r15+r12+10h]
mov r8d, [r15+r12+18h]
mov rdi, r13
mov rsi, rax
call JS_SetPropertyFunctionList
jmp short loc_30436
loc_3041D:
mov ebp, [r15+r12+10h]; jumptable 00000000000303B8 case 4
xor ebx, ebx
jmp short loc_30436
loc_30426:
mov rdi, [r15+r12+10h]; jumptable 00000000000303B8 case 5
call js_int64
loc_30430:
mov rbp, rax
mov rbx, rdx
loc_30436:
mov rdx, [r15+r12]
mov rdi, r13
mov rsi, [rsp+48h+var_40]
mov rcx, rbp
mov r8, rbx
call JS_SetModuleExport
test eax, eax
jz loc_30388
push 0FFFFFFFFFFFFFFFFh
pop rax
jmp short loc_3045C
loc_3045A:
xor eax, eax
loc_3045C:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
def_303B8:
call _abort; jumptable 00000000000303B8 default case, cases 1,2,7
| long long JS_SetModuleExportList(
const char *a1,
long long a2,
long long a3,
long long a4,
double a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
const char *v13; // r13
long long v14; // r14
long long v15; // r12
long long v16; // rax
long long v17; // rdx
long long v18; // rbp
long long v19; // rbx
long long v20; // rdx
double v21; // xmm4_8
double v22; // xmm5_8
long long v24; // [rsp+10h] [rbp-38h]
v13 = a1;
if ( (int)a4 <= 0 )
a4 = 0LL;
v24 = 32 * a4 + 32;
v14 = 0LL;
while ( 1 )
{
v15 = v14;
v14 += 32LL;
if ( v24 == v14 )
return 0LL;
switch ( *(_BYTE *)(a3 + v15 + 9) )
{
case 0:
v16 = JS_NewCFunction2(
(long long)v13,
*(_QWORD *)(a3 + v15 + 24),
*(_QWORD *)(a3 + v15),
*(unsigned __int8 *)(a3 + v15 + 16),
*(unsigned __int8 *)(a3 + v15 + 17),
*(__int16 *)(a3 + v15 + 10));
goto LABEL_12;
case 3:
v16 = JS_NewString_0(v13, *(_QWORD *)(a3 + v15 + 16));
goto LABEL_12;
case 4:
v18 = *(unsigned int *)(a3 + v15 + 16);
v19 = 0LL;
break;
case 5:
v16 = js_int64(*(_QWORD *)(a3 + v15 + 16));
LABEL_12:
v18 = v16;
v19 = v17;
break;
case 6:
v18 = *(_QWORD *)(a3 + v15 + 16);
v19 = 7LL;
break;
case 8:
v18 = JS_NewObject((long long)v13);
v19 = v20;
JS_SetPropertyFunctionList(
v13,
v18,
v20,
*(const char ***)(a3 + v15 + 16),
*(_DWORD *)(a3 + v15 + 24),
a5,
a6,
a7,
a8,
v21,
v22,
a11,
a12);
break;
default:
abort(a1);
}
a1 = v13;
if ( (unsigned int)JS_SetModuleExport((long long)v13, a2, *(unsigned __int8 **)(a3 + v15), v18, v19) )
return -1LL;
}
}
| JS_SetModuleExportList:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15,RDX
MOV qword ptr [RSP + 0x8],RSI
MOV R13,RDI
XOR EAX,EAX
TEST ECX,ECX
CMOVLE ECX,EAX
SHL RCX,0x5
ADD RCX,0x20
MOV qword ptr [RSP + 0x10],RCX
XOR R14D,R14D
LAB_00130388:
MOV R12,R14
ADD R14,0x20
CMP qword ptr [RSP + 0x10],R14
JZ 0x0013045a
MOVZX EAX,byte ptr [R15 + R12*0x1 + 0x9]
CMP RAX,0x8
JA 0x0013046b
LEA RCX,[0x186aa4]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
MOV RDX,qword ptr [R15 + R12*0x1]
MOV RSI,qword ptr [R15 + R12*0x1 + 0x18]
MOVZX ECX,byte ptr [R15 + R12*0x1 + 0x10]
MOVZX R8D,byte ptr [R15 + R12*0x1 + 0x11]
MOVSX R9D,word ptr [R15 + R12*0x1 + 0xa]
MOV RDI,R13
CALL 0x0011ee8d
JMP 0x00130430
caseD_6:
MOV RBP,qword ptr [R15 + R12*0x1 + 0x10]
PUSH 0x7
POP RBX
JMP 0x00130436
caseD_3:
MOV RSI,qword ptr [R15 + R12*0x1 + 0x10]
MOV RDI,R13
CALL 0x00130470
JMP 0x00130430
caseD_8:
MOV RDI,R13
CALL 0x0011ee79
MOV RBP,RAX
MOV RBX,RDX
MOV RCX,qword ptr [R15 + R12*0x1 + 0x10]
MOV R8D,dword ptr [R15 + R12*0x1 + 0x18]
MOV RDI,R13
MOV RSI,RAX
CALL 0x0012ffaf
JMP 0x00130436
caseD_4:
MOV EBP,dword ptr [R15 + R12*0x1 + 0x10]
XOR EBX,EBX
JMP 0x00130436
caseD_5:
MOV RDI,qword ptr [R15 + R12*0x1 + 0x10]
CALL 0x001245bb
LAB_00130430:
MOV RBP,RAX
MOV RBX,RDX
LAB_00130436:
MOV RDX,qword ptr [R15 + R12*0x1]
MOV RDI,R13
MOV RSI,qword ptr [RSP + 0x8]
MOV RCX,RBP
MOV R8,RBX
CALL 0x0012cc4b
TEST EAX,EAX
JZ 0x00130388
PUSH -0x1
POP RAX
JMP 0x0013045c
LAB_0013045a:
XOR EAX,EAX
LAB_0013045c:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
caseD_1:
CALL 0x0010e090
|
int8 JS_SetModuleExportList(int8 param_1,int8 param_2,long param_3,uint param_4)
{
int iVar1;
ulong uVar2;
long lVar3;
int1 auVar4 [16];
uVar2 = (ulong)param_4;
if ((int)param_4 < 1) {
uVar2 = 0;
}
lVar3 = 0;
do {
if (uVar2 * 0x20 + 0x20 == lVar3 + 0x20) {
return 0;
}
switch(*(int1 *)(param_3 + 9 + lVar3)) {
case 0:
auVar4 = JS_NewCFunction2(param_1,*(int8 *)(param_3 + 0x18 + lVar3),
*(int8 *)(param_3 + lVar3),
*(int1 *)(param_3 + 0x10 + lVar3),
*(int1 *)(param_3 + 0x11 + lVar3),
(int)*(short *)(param_3 + 10 + lVar3));
break;
default:
/* WARNING: Subroutine does not return */
abort();
case 3:
auVar4 = JS_NewString(param_1,*(int8 *)(param_3 + 0x10 + lVar3));
break;
case 4:
auVar4 = ZEXT416(*(uint *)(param_3 + 0x10 + lVar3));
break;
case 5:
auVar4 = js_int64(*(int8 *)(param_3 + 0x10 + lVar3));
break;
case 6:
auVar4._8_8_ = 7;
auVar4._0_8_ = *(int8 *)(param_3 + 0x10 + lVar3);
break;
case 8:
auVar4 = JS_NewObject(param_1);
JS_SetPropertyFunctionList
(param_1,auVar4._0_8_,auVar4._8_8_,*(int8 *)(param_3 + 0x10 + lVar3),
*(int4 *)(param_3 + 0x18 + lVar3));
}
iVar1 = JS_SetModuleExport(param_1,param_2,*(int8 *)(param_3 + lVar3),auVar4._0_8_,
auVar4._8_8_);
lVar3 = lVar3 + 0x20;
} while (iVar1 == 0);
return 0xffffffffffffffff;
}
| |
21,269 | common_token_to_piece[abi:cxx11](llama_vocab const*, int, bool) | monkey531[P]llama/common/common.cpp | std::string common_token_to_piece(const struct llama_vocab * vocab, llama_token token, bool special) {
std::string piece;
piece.resize(piece.capacity()); // using string internal cache, 15 bytes + '\n'
const int n_chars = llama_token_to_piece(vocab, token, &piece[0], piece.size(), 0, special);
if (n_chars < 0) {
piece.resize(-n_chars);
int check = llama_token_to_piece(vocab, token, &piece[0], piece.size(), 0, special);
GGML_ASSERT(check == -n_chars);
}
else {
piece.resize(n_chars);
}
return piece;
} | O3 | cpp | common_token_to_piece[abi:cxx11](llama_vocab const*, int, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r15d
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r13
movq %r13, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movl $0xf, %esi
xorl %edx, %edx
callq 0x1a260
movq (%rbx), %rdx
movl 0x8(%rbx), %ecx
movzbl %r15b, %r15d
movq %r14, %rdi
movl %ebp, %esi
xorl %r8d, %r8d
movl %r15d, %r9d
callq 0x1a7f0
movl %eax, %r12d
testl %eax, %eax
js 0x75572
movl %r12d, %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x1a260
jmp 0x7559d
negl %r12d
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x1a260
movq (%rbx), %rdx
movl 0x8(%rbx), %ecx
movq %r14, %rdi
movl %ebp, %esi
xorl %r8d, %r8d
movl %r15d, %r9d
callq 0x1a7f0
cmpl %r12d, %eax
jne 0x755af
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7965b(%rip), %rdi # 0xeec11
leaq 0x70c4d(%rip), %rdx # 0xe620a
leaq 0x79ce0(%rip), %rcx # 0xef2a4
movl $0x6cc, %esi # imm = 0x6CC
xorl %eax, %eax
callq 0x1aec0
jmp 0x755d4
jmp 0x755d4
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0x755eb
movq (%r13), %rsi
incq %rsi
callq 0x1a8f0
movq %r14, %rdi
callq 0x1afd0
| _Z21common_token_to_pieceB5cxx11PK11llama_vocabib:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15d, ecx
mov ebp, edx
mov r14, rsi
mov rbx, rdi
lea r13, [rdi+10h]
mov [rdi], r13
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov esi, 0Fh
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
mov rdx, [rbx]
mov ecx, [rbx+8]
movzx r15d, r15b
mov rdi, r14
mov esi, ebp
xor r8d, r8d
mov r9d, r15d
call _llama_token_to_piece
mov r12d, eax
test eax, eax
js short loc_75572
mov esi, r12d
mov rdi, rbx
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
jmp short loc_7559D
loc_75572:
neg r12d
mov rdi, rbx
mov rsi, r12
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
mov rdx, [rbx]
mov ecx, [rbx+8]
mov rdi, r14
mov esi, ebp
xor r8d, r8d
mov r9d, r15d
call _llama_token_to_piece
cmp eax, r12d
jnz short loc_755AF
loc_7559D:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_755AF:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCheckNChars; "check == -n_chars"
mov esi, 6CCh
xor eax, eax
call _ggml_abort
jmp short loc_755D4
jmp short $+2
loc_755D4:
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r13
jz short loc_755EB
mov rsi, [r13+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_755EB:
mov rdi, r14
call __Unwind_Resume
| _QWORD * common_token_to_piece[abi:cxx11](_QWORD *a1, long long a2, unsigned int a3, long long a4)
{
long long v4; // rax
unsigned __int8 v5; // r15
_QWORD *v7; // r13
int v8; // eax
long long v9; // rcx
long long v10; // r12
long long v12; // r14
long long v13; // [rsp-8h] [rbp-38h]
long long v14; // [rsp-8h] [rbp-38h]
v13 = v4;
v5 = a4;
v7 = a1 + 2;
*a1 = a1 + 2;
a1[1] = 0LL;
*((_BYTE *)a1 + 16) = 0;
std::string::resize(a1, 15LL, 0LL, a4);
v8 = llama_token_to_piece(a2, a3, *a1, *((unsigned int *)a1 + 2), 0LL, v5, v13);
if ( v8 < 0 )
{
v10 = (unsigned int)-v8;
std::string::resize(a1, v10, 0LL, v9);
if ( (unsigned int)llama_token_to_piece(a2, a3, *a1, *((unsigned int *)a1 + 2), 0LL, v5, v14) != (_DWORD)v10 )
{
v12 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",
1740LL,
"GGML_ASSERT(%s) failed",
"check == -n_chars");
if ( (_QWORD *)*a1 != v7 )
operator delete((void *)*a1, *v7 + 1LL);
_Unwind_Resume(v12);
}
}
else
{
std::string::resize(a1, (unsigned int)v8, 0LL, v9);
}
return a1;
}
| common_token_to_piece[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15D,ECX
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
LEA R13,[RDI + 0x10]
MOV qword ptr [RDI],R13
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
LAB_00175536:
MOV ESI,0xf
XOR EDX,EDX
CALL 0x0011a260
MOV RDX,qword ptr [RBX]
MOV ECX,dword ptr [RBX + 0x8]
LAB_00175548:
MOVZX R15D,R15B
MOV RDI,R14
MOV ESI,EBP
XOR R8D,R8D
MOV R9D,R15D
CALL 0x0011a7f0
MOV R12D,EAX
TEST EAX,EAX
JS 0x00175572
MOV ESI,R12D
MOV RDI,RBX
XOR EDX,EDX
CALL 0x0011a260
JMP 0x0017559d
LAB_00175572:
NEG R12D
MOV RDI,RBX
MOV RSI,R12
XOR EDX,EDX
CALL 0x0011a260
MOV RDX,qword ptr [RBX]
MOV ECX,dword ptr [RBX + 0x8]
LAB_00175588:
MOV RDI,R14
MOV ESI,EBP
XOR R8D,R8D
MOV R9D,R15D
CALL 0x0011a7f0
CMP EAX,R12D
JNZ 0x001755af
LAB_0017559d:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001755af:
LEA RDI,[0x1eec11]
LEA RDX,[0x1e620a]
LEA RCX,[0x1ef2a4]
MOV ESI,0x6cc
XOR EAX,EAX
CALL 0x0011aec0
|
/* common_token_to_piece[abi:cxx11](llama_vocab const*, int, bool) */
llama_vocab * common_token_to_piece_abi_cxx11_(llama_vocab *param_1,int param_2,bool param_3)
{
int iVar1;
int iVar2;
int1 in_CL;
int7 in_register_00000011;
int4 in_register_00000034;
*(llama_vocab **)param_1 = param_1 + 0x10;
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (llama_vocab)0x0;
/* try { // try from 00175536 to 00175541 has its CatchHandler @ 001755d2 */
std::__cxx11::string::resize((ulong)param_1,'\x0f');
/* try { // try from 00175548 to 00175581 has its CatchHandler @ 001755d4 */
iVar1 = llama_token_to_piece
(CONCAT44(in_register_00000034,param_2),
CONCAT71(in_register_00000011,param_3) & 0xffffffff,*(int8 *)param_1,
*(int4 *)(param_1 + 8),0,in_CL);
if (iVar1 < 0) {
std::__cxx11::string::resize((ulong)param_1,(char)-iVar1);
/* try { // try from 00175588 to 001755cf has its CatchHandler @ 001755d0 */
iVar2 = llama_token_to_piece
(CONCAT44(in_register_00000034,param_2),
CONCAT71(in_register_00000011,param_3) & 0xffffffff,*(int8 *)param_1,
*(int4 *)(param_1 + 8),0,in_CL);
if (iVar2 != -iVar1) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x6cc
,"GGML_ASSERT(%s) failed","check == -n_chars");
}
}
else {
std::__cxx11::string::resize((ulong)param_1,(char)iVar1);
}
return param_1;
}
| |
21,270 | POINTonE1_Deserialize_Z | corpus-core[P]colibri-stateless/build_O1/_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;
} | O1 | 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 0x5e34b
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 0x5e1f8
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 0x5e229
leaq -0x88(%rbp), %r15
andb $0x1f, 0x2f(%r15)
leaq 0x32a4d(%rip), %rdx # 0x90ca8
leaq 0x329de(%rip), %rcx # 0x90c40
leaq -0xc0(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x73a40
movl $0x30, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x74d80
movl $0x1, %r15d
testq %rax, %rax
je 0x5e3bc
leaq 0x32a0e(%rip), %rdx # 0x90ca8
leaq 0x3299f(%rip), %rcx # 0x90c40
movq %r12, %rdi
movq %r14, %rsi
callq 0x73a40
movl $0x30, %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0x74d80
testq %rax, %rax
je 0x5e3bc
leaq 0x32bf4(%rip), %rdx # 0x90ec0
leaq 0x3296d(%rip), %r12 # 0x90c40
leaq -0x88(%rbp), %r13
movabsq $-0x760c000300030003, %r15 # imm = 0x89F3FFFCFFFCFFFD
movq %r13, %rdi
movq %r13, %rsi
movq %r12, %rcx
movq %r15, %r8
callq 0x792a0
movq %r14, %rdi
movq %r14, %rsi
leaq 0x32bbe(%rip), %rdx # 0x90ec0
movq %r12, %rcx
movq %r15, %r8
callq 0x792a0
movq %r13, %rdi
callq 0x5db41
testq %rax, %rax
je 0x5e3b6
leaq -0x88(%rbp), %rsi
movl $0xc, %ecx
movq %rbx, %rdi
rep movsq (%rsi), %es:(%rdi)
movl $0x30, %esi
movq %rbx, %rdi
callq 0x74d40
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
leal (%rcx,%rcx,2), %r15d
jmp 0x5e3bc
testb %al, %al
js 0x5e39d
movl $0x1, %r15d
cmpb $0x40, %al
jb 0x5e3bc
andl $0x3f, %eax
decq %rax
shrq $0x3f, %rax
movl $0x1, %edx
xorl %ecx, %ecx
orb (%rsi,%rdx), %cl
incq %rdx
cmpq $0x60, %rdx
jne 0x5e36a
movzbl %cl, %ecx
decq %rcx
shrq $0x3f, %rcx
testq %rax, %rcx
je 0x5e3bc
xorl %eax, %eax
movq $0x0, (%rbx,%rax,8)
incq %rax
cmpq $0xc, %rax
jne 0x5e387
xorl %r15d, %r15d
jmp 0x5e3bc
movq %rbx, %rdi
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5dfb5
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_5E34B
mov eax, 2Fh ; '/'
xor ecx, ecx
mov rdx, rsi
loc_5E1F8:
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_5E1F8
lea r14, [rbp+var_58]
add rsi, 30h ; '0'
mov eax, 2Fh ; '/'
xor ecx, ecx
loc_5E229:
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_5E229
lea r15, [rbp+var_88]
and byte ptr [r15+2Fh], 1Fh
lea rdx, unk_90CA8
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_5E3BC
lea rdx, unk_90CA8
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_5E3BC
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_5E3B6
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_5E3BC
loc_5E34B:
test al, al
js short loc_5E39D
mov r15d, 1
cmp al, 40h ; '@'
jb short loc_5E3BC
and eax, 3Fh
dec rax
shr rax, 3Fh
mov edx, 1
xor ecx, ecx
loc_5E36A:
or cl, [rsi+rdx]
inc rdx
cmp rdx, 60h ; '`'
jnz short loc_5E36A
movzx ecx, cl
dec rcx
shr rcx, 3Fh
test rcx, rax
jz short loc_5E3BC
xor eax, eax
loc_5E387:
mov qword ptr [rbx+rax*8], 0
inc rax
cmp rax, 0Ch
jnz short loc_5E387
xor r15d, r15d
jmp short loc_5E3BC
loc_5E39D:
mov rdi, rbx
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp POINTonE1_Uncompress_Z
loc_5E3B6:
mov r15d, 2
loc_5E3BC:
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_90CA8, &BLS12_381_P);
v13 = 1;
if ( vec_is_equal_16x(v19, v20, 48LL) )
{
add_mod_384(v19, &v20[6], &unk_90CA8, &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 0x0015e34b
MOV EAX,0x2f
XOR ECX,ECX
MOV RDX,RSI
LAB_0015e1f8:
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 0x0015e1f8
LEA R14,[RBP + -0x58]
ADD RSI,0x30
MOV EAX,0x2f
XOR ECX,ECX
LAB_0015e229:
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 0x0015e229
LEA R15,[RBP + -0x88]
AND byte ptr [R15 + 0x2f],0x1f
LEA RDX,[0x190ca8]
LEA RCX,[0x190c40]
LEA R12,[RBP + -0xc0]
MOV RDI,R12
MOV RSI,R15
CALL 0x00173a40
MOV EDX,0x30
MOV RDI,R12
MOV RSI,R15
CALL 0x00174d80
MOV R15D,0x1
TEST RAX,RAX
JZ 0x0015e3bc
LEA RDX,[0x190ca8]
LEA RCX,[0x190c40]
MOV RDI,R12
MOV RSI,R14
CALL 0x00173a40
MOV EDX,0x30
MOV RDI,R12
MOV RSI,R14
CALL 0x00174d80
TEST RAX,RAX
JZ 0x0015e3bc
LEA RDX,[0x190ec0]
LEA R12,[0x190c40]
LEA R13,[RBP + -0x88]
MOV R15,-0x760c000300030003
MOV RDI,R13
MOV RSI,R13
MOV RCX,R12
MOV R8,R15
CALL 0x001792a0
MOV RDI,R14
MOV RSI,R14
LEA RDX,[0x190ec0]
MOV RCX,R12
MOV R8,R15
CALL 0x001792a0
MOV RDI,R13
CALL 0x0015db41
TEST RAX,RAX
JZ 0x0015e3b6
LEA RSI,[RBP + -0x88]
MOV ECX,0xc
MOV RDI,RBX
MOVSQ.REP RDI,RSI
MOV ESI,0x30
MOV RDI,RBX
CALL 0x00174d40
XOR ECX,ECX
TEST RAX,RAX
SETNZ CL
LEA R15D,[RCX + RCX*0x2]
JMP 0x0015e3bc
LAB_0015e34b:
TEST AL,AL
JS 0x0015e39d
MOV R15D,0x1
CMP AL,0x40
JC 0x0015e3bc
AND EAX,0x3f
DEC RAX
SHR RAX,0x3f
MOV EDX,0x1
XOR ECX,ECX
LAB_0015e36a:
OR CL,byte ptr [RSI + RDX*0x1]
INC RDX
CMP RDX,0x60
JNZ 0x0015e36a
MOVZX ECX,CL
DEC RCX
SHR RCX,0x3f
TEST RCX,RAX
JZ 0x0015e3bc
XOR EAX,EAX
LAB_0015e387:
MOV qword ptr [RBX + RAX*0x8],0x0
INC RAX
CMP RAX,0xc
JNZ 0x0015e387
XOR R15D,R15D
JMP 0x0015e3bc
LAB_0015e39d:
MOV RDI,RBX
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0015dfb5
LAB_0015e3b6:
MOV R15D,0x2
LAB_0015e3bc:
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_00190ca8,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_00190ca8,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;
}
| |
21,271 | my_casedn_utf8mb3 | eloqsql/strings/ctype-utf8.c | static size_t my_casedn_utf8mb3(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->casedn_multiply == 1);
while ((src < srcend) &&
(srcres= my_utf8mb3_uni(cs, &wc, (uchar*) src, (uchar*)srcend)) > 0)
{
my_tolower_utf8mb3(uni_plane, &wc);
if ((dstres= my_uni_utf8mb3(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0)
break;
src+= srcres;
dst+= dstres;
}
return (size_t) (dst - dst0);
} | O3 | c | my_casedn_utf8mb3:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r13
movq %rcx, -0x30(%rbp)
testq %rdx, %rdx
jle 0x71f06
movq %r8, %r14
movq %rdx, %r15
movq %rsi, %r12
addq %rsi, %r15
movq -0x30(%rbp), %r13
addq %r13, %r14
movq 0x78(%rdi), %rax
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rsi
movq %r12, %rdx
movq %r15, %rcx
callq 0x71a9b
testl %eax, %eax
jle 0x71f06
movl %eax, %ebx
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x38(%rbp), %rax
movzbl %ah, %edx
movq (%rcx,%rdx,8), %rcx
testq %rcx, %rcx
je 0x71ee5
movzbl %al, %eax
leaq (%rax,%rax,2), %rax
movl 0x4(%rcx,%rax,4), %eax
movq %rax, -0x38(%rbp)
movq %rax, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x71b60
testl %eax, %eax
jle 0x71f06
movl %ebx, %ecx
addq %rcx, %r12
movl %eax, %eax
addq %rax, %r13
cmpq %r15, %r12
jb 0x71ea9
subq -0x30(%rbp), %r13
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_casedn_utf8mb3:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r13, rcx
mov [rbp+var_30], rcx
test rdx, rdx
jle short loc_71F06
mov r14, r8
mov r15, rdx
mov r12, rsi
add r15, rsi
mov r13, [rbp+var_30]
add r14, r13
mov rax, [rdi+78h]
mov [rbp+var_40], rax
loc_71EA9:
lea rsi, [rbp+var_38]
mov rdx, r12
mov rcx, r15
call my_utf8mb3_uni
test eax, eax
jle short loc_71F06
mov ebx, eax
mov rax, [rbp+var_40]
mov rcx, [rax+8]
mov rax, [rbp+var_38]
movzx edx, ah
mov rcx, [rcx+rdx*8]
test rcx, rcx
jz short loc_71EE5
movzx eax, al
lea rax, [rax+rax*2]
mov eax, [rcx+rax*4+4]
mov [rbp+var_38], rax
loc_71EE5:
mov rsi, rax
mov rdx, r13
mov rcx, r14
call my_uni_utf8mb3
test eax, eax
jle short loc_71F06
mov ecx, ebx
add r12, rcx
mov eax, eax
add r13, rax
cmp r12, r15
jb short loc_71EA9
loc_71F06:
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_casedn_utf8mb3(long long a1, unsigned __int8 *a2, long long a3, _BYTE *a4, long long a5)
{
_BYTE *v5; // r13
unsigned __int8 *v6; // r12
unsigned long long v7; // r15
unsigned long long v8; // r14
int v9; // eax
unsigned int v10; // ebx
unsigned long long v11; // rax
long long v12; // rcx
int v13; // eax
long long v15; // [rsp+0h] [rbp-40h]
unsigned long long v16; // [rsp+8h] [rbp-38h] BYREF
_BYTE *v17; // [rsp+10h] [rbp-30h]
v5 = a4;
v17 = a4;
if ( a3 > 0 )
{
v6 = a2;
v7 = (unsigned long long)&a2[a3];
v5 = v17;
v8 = (unsigned long long)&v17[a5];
v15 = *(_QWORD *)(a1 + 120);
do
{
v9 = my_utf8mb3_uni(a1, &v16, v6, v7);
if ( v9 <= 0 )
break;
v10 = v9;
v11 = v16;
v12 = *(_QWORD *)(*(_QWORD *)(v15 + 8) + 8LL * BYTE1(v16));
if ( v12 )
{
v11 = *(unsigned int *)(v12 + 12LL * (unsigned __int8)v16 + 4);
v16 = v11;
}
v13 = my_uni_utf8mb3(a1, v11, v5, v8);
if ( v13 <= 0 )
break;
v6 += v10;
v5 += (unsigned int)v13;
}
while ( (unsigned long long)v6 < v7 );
}
return (_BYTE *)(v5 - v17);
}
| my_casedn_utf8mb3:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R13,RCX
MOV qword ptr [RBP + -0x30],RCX
TEST RDX,RDX
JLE 0x00171f06
MOV R14,R8
MOV R15,RDX
MOV R12,RSI
ADD R15,RSI
MOV R13,qword ptr [RBP + -0x30]
ADD R14,R13
MOV RAX,qword ptr [RDI + 0x78]
MOV qword ptr [RBP + -0x40],RAX
LAB_00171ea9:
LEA RSI,[RBP + -0x38]
MOV RDX,R12
MOV RCX,R15
CALL 0x00171a9b
TEST EAX,EAX
JLE 0x00171f06
MOV EBX,EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EDX,AH
MOV RCX,qword ptr [RCX + RDX*0x8]
TEST RCX,RCX
JZ 0x00171ee5
MOVZX EAX,AL
LEA RAX,[RAX + RAX*0x2]
MOV EAX,dword ptr [RCX + RAX*0x4 + 0x4]
MOV qword ptr [RBP + -0x38],RAX
LAB_00171ee5:
MOV RSI,RAX
MOV RDX,R13
MOV RCX,R14
CALL 0x00171b60
TEST EAX,EAX
JLE 0x00171f06
MOV ECX,EBX
ADD R12,RCX
MOV EAX,EAX
ADD R13,RAX
CMP R12,R15
JC 0x00171ea9
LAB_00171f06:
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_casedn_utf8mb3(long param_1,ulong param_2,long param_3,long param_4)
{
long lVar1;
long lVar2;
uint uVar3;
uint uVar4;
long lVar5;
ulong uVar6;
int8 local_40;
lVar5 = param_4;
if (0 < param_3) {
uVar6 = param_3 + param_2;
lVar1 = *(long *)(param_1 + 0x78);
do {
uVar3 = my_utf8mb3_uni();
if ((int)uVar3 < 1) break;
lVar2 = *(long *)(*(long *)(lVar1 + 8) + (local_40 >> 8 & 0xff) * 8);
if (lVar2 != 0) {
local_40 = (ulong)*(uint *)(lVar2 + 4 + (local_40 & 0xff) * 0xc);
}
uVar4 = my_uni_utf8mb3();
if ((int)uVar4 < 1) break;
param_2 = param_2 + uVar3;
lVar5 = lVar5 + (ulong)uVar4;
} while (param_2 < uVar6);
}
return lVar5 - param_4;
}
| |
21,272 | (anonymous namespace)::msgpack23_time_point_int8Test_Test::TestBody() | msgpack23/tests/chrono_tests.cpp | TEST_P(msgpack23_time_point, int8Test) {
msgpack23::Packer packer{};
auto const expected = GetParam();
auto const data = packer(expected);
msgpack23::Unpacker unpacker{data};
std::chrono::system_clock::time_point actual{};
unpacker(actual);
EXPECT_EQ(expected, actual);
} | O0 | cpp | (anonymous namespace)::msgpack23_time_point_int8Test_Test::TestBody():
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
ud2
nopw (%rax,%rax)
| _ZN12_GLOBAL__N_120msgpack23_time_pointD0Ev:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
ud2
| void __noreturn `anonymous namespace'::msgpack23_time_point::~msgpack23_time_point(
_anonymous_namespace_::msgpack23_time_point *this)
{
BUG();
}
| ~msgpack23_time_point:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
UD2
|
/* (anonymous namespace)::msgpack23_time_point::~msgpack23_time_point() */
void __thiscall
(anonymous_namespace)::msgpack23_time_point::~msgpack23_time_point(msgpack23_time_point *this)
{
code *pcVar1;
/* WARNING: Does not return */
pcVar1 = (code *)invalidInstructionException();
(*pcVar1)();
}
| |
21,273 | my_wc_mb_gb2312 | eloqsql/strings/ctype-gb2312.c | static int
my_wc_mb_gb2312(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
if (s >= e)
return MY_CS_TOOSMALL;
if ((uint) wc < 0x80)
{
s[0]= (uchar) wc;
return 1;
}
if (!(code=func_uni_gb2312_onechar(wc)))
return MY_CS_ILUNI;
if (s+2>e)
return MY_CS_TOOSMALL2;
code|=0x8080;
s[0]=code>>8;
s[1]=code&0xFF;
return 2;
} | O0 | c | my_wc_mb_gb2312:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x4598e
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x45a12
movq -0x18(%rbp), %rax
cmpl $0x80, %eax
jae 0x459ae
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x45a12
movq -0x18(%rbp), %rax
movl %eax, %edi
callq 0x45d00
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0x459ca
movl $0x0, -0x4(%rbp)
jmp 0x45a12
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x459e1
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x45a12
movl -0x2c(%rbp), %eax
orl $0x8080, %eax # imm = 0x8080
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl -0x2c(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| my_wc_mb_gb2312:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_4598E
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_45A12
loc_4598E:
mov rax, [rbp+var_18]
cmp eax, 80h
jnb short loc_459AE
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp short loc_45A12
loc_459AE:
mov rax, [rbp+var_18]
mov edi, eax
call func_uni_gb2312_onechar
mov [rbp+var_2C], eax
cmp eax, 0
jnz short loc_459CA
mov [rbp+var_4], 0
jmp short loc_45A12
loc_459CA:
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_459E1
mov [rbp+var_4], 0FFFFFF9Ah
jmp short loc_45A12
loc_459E1:
mov eax, [rbp+var_2C]
or eax, 8080h
mov [rbp+var_2C], eax
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_45A12:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long my_wc_mb_gb2312(long long a1, unsigned int a2, _BYTE *a3, unsigned long long a4)
{
int v5; // [rsp+4h] [rbp-2Ch]
__int16 v6; // [rsp+4h] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
if ( a2 >= 0x80 )
{
v5 = func_uni_gb2312_onechar(a2);
if ( v5 )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
v6 = v5 | 0x8080;
*a3 = HIBYTE(v6);
a3[1] = v6;
return 2;
}
else
{
return (unsigned int)-102;
}
}
else
{
return 0;
}
}
else
{
*a3 = a2;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
| my_wc_mb_gb2312:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x0014598e
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x00145a12
LAB_0014598e:
MOV RAX,qword ptr [RBP + -0x18]
CMP EAX,0x80
JNC 0x001459ae
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 0x00145a12
LAB_001459ae:
MOV RAX,qword ptr [RBP + -0x18]
MOV EDI,EAX
CALL 0x00145d00
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x001459ca
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00145a12
LAB_001459ca:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x001459e1
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x00145a12
LAB_001459e1:
MOV EAX,dword ptr [RBP + -0x2c]
OR EAX,0x8080
MOV dword ptr [RBP + -0x2c],EAX
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_00145a12:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 my_wc_mb_gb2312(int8 param_1,uint param_2,int1 *param_3,int1 *param_4)
{
uint uVar1;
int4 local_c;
if (param_3 < param_4) {
if (param_2 < 0x80) {
*param_3 = (char)param_2;
local_c = 1;
}
else {
uVar1 = func_uni_gb2312_onechar(param_2);
if (uVar1 == 0) {
local_c = 0;
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
*param_3 = (char)((uVar1 | 0x8080) >> 8);
param_3[1] = (char)(uVar1 | 0x8080);
local_c = 2;
}
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
| |
21,274 | rw_pr_wrlock | eloqsql/mysys/thr_rwlock.c | int rw_pr_wrlock(rw_pr_lock_t *rwlock)
{
pthread_mutex_lock(&rwlock->lock);
if (rwlock->active_readers != 0)
{
/* There are active readers. We have to wait until they are gone. */
rwlock->writers_waiting_readers++;
while (rwlock->active_readers != 0)
pthread_cond_wait(&rwlock->no_active_readers, &rwlock->lock);
rwlock->writers_waiting_readers--;
}
/*
We own 'lock' mutex so there is no active writers.
Also there are no active readers.
This means that we can grant wr-lock.
Not releasing 'lock' mutex until unlock will block
both requests for rd and wr-locks.
Set 'active_writer' flag to simplify unlock.
Thanks to the fact wr-lock/unlock in the absence of
contention from readers is essentially mutex lock/unlock
with a few simple checks make this rwlock implementation
wr-lock optimized.
*/
rwlock->active_writer= TRUE;
#ifdef SAFE_MUTEX
rwlock->writer_thread= pthread_self();
#endif
return 0;
} | O0 | c | rw_pr_wrlock:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2a200
movq -0x8(%rbp), %rax
cmpl $0x0, 0x58(%rax)
je 0xfa2d6
movq -0x8(%rbp), %rax
movl 0x5c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x5c(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x58(%rax)
je 0xfa2c9
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
movq -0x8(%rbp), %rsi
callq 0x2a3f0
jmp 0xfa2ac
movq -0x8(%rbp), %rax
movl 0x5c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x5c(%rax)
movq -0x8(%rbp), %rax
movb $0x1, 0x60(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| rw_pr_wrlock:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
call _pthread_mutex_lock
mov rax, [rbp+var_8]
cmp dword ptr [rax+58h], 0
jz short loc_FA2D6
mov rax, [rbp+var_8]
mov ecx, [rax+5Ch]
add ecx, 1
mov [rax+5Ch], ecx
loc_FA2AC:
mov rax, [rbp+var_8]
cmp dword ptr [rax+58h], 0
jz short loc_FA2C9
mov rdi, [rbp+var_8]
add rdi, 28h ; '('
mov rsi, [rbp+var_8]
call _pthread_cond_wait
jmp short loc_FA2AC
loc_FA2C9:
mov rax, [rbp+var_8]
mov ecx, [rax+5Ch]
add ecx, 0FFFFFFFFh
mov [rax+5Ch], ecx
loc_FA2D6:
mov rax, [rbp+var_8]
mov byte ptr [rax+60h], 1
xor eax, eax
add rsp, 10h
pop rbp
retn
| long long rw_pr_wrlock(long long a1)
{
pthread_mutex_lock(a1);
if ( *(_DWORD *)(a1 + 88) )
{
++*(_DWORD *)(a1 + 92);
while ( *(_DWORD *)(a1 + 88) )
pthread_cond_wait(a1 + 40, a1);
--*(_DWORD *)(a1 + 92);
}
*(_BYTE *)(a1 + 96) = 1;
return 0LL;
}
| rw_pr_wrlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012a200
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x58],0x0
JZ 0x001fa2d6
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x5c]
ADD ECX,0x1
MOV dword ptr [RAX + 0x5c],ECX
LAB_001fa2ac:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x58],0x0
JZ 0x001fa2c9
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x28
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x0012a3f0
JMP 0x001fa2ac
LAB_001fa2c9:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x5c]
ADD ECX,-0x1
MOV dword ptr [RAX + 0x5c],ECX
LAB_001fa2d6:
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x60],0x1
XOR EAX,EAX
ADD RSP,0x10
POP RBP
RET
|
int8 rw_pr_wrlock(pthread_mutex_t *param_1)
{
pthread_mutex_lock(param_1);
if (*(int *)((long)param_1 + 0x58) != 0) {
*(int *)((long)param_1 + 0x5c) = *(int *)((long)param_1 + 0x5c) + 1;
while (*(int *)((long)param_1 + 0x58) != 0) {
pthread_cond_wait((pthread_cond_t *)(param_1 + 1),param_1);
}
*(int *)((long)param_1 + 0x5c) = *(int *)((long)param_1 + 0x5c) + -1;
}
*(int1 *)((long)param_1 + 0x60) = 1;
return 0;
}
| |
21,275 | ma_check_if_right_bitmap_type | eloqsql/storage/maria/ma_bitmap.c | my_bool _ma_check_if_right_bitmap_type(MARIA_HA *info,
enum en_page_type page_type,
pgcache_page_no_t page,
uint *bitmap_pattern)
{
if ((*bitmap_pattern= _ma_bitmap_get_page_bits(info, &info->s->bitmap,
page)) > 7)
return 1; /* Couldn't read page */
switch (page_type) {
case HEAD_PAGE:
return *bitmap_pattern < 1 || *bitmap_pattern > 4;
case TAIL_PAGE:
return *bitmap_pattern < 5;
case BLOB_PAGE:
return *bitmap_pattern != 7;
default:
break;
}
DBUG_ASSERT(0);
return 1;
} | O3 | c | ma_check_if_right_bitmap_type:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rcx, %r14
movl %esi, %ebx
movl $0xa10, %esi # imm = 0xA10
addq (%rdi), %rsi
callq 0x56de1
movl %eax, %ecx
movl %eax, (%r14)
movb $0x1, %al
cmpl $0x7, %ecx
ja 0x57884
cmpl $0x3, %ebx
je 0x5787e
cmpl $0x2, %ebx
je 0x57876
cmpl $0x1, %ebx
jne 0x57884
addl $-0x5, %ecx
cmpl $-0x4, %ecx
jmp 0x57879
cmpl $0x5, %ecx
setb %al
jmp 0x57884
cmpl $0x7, %ecx
setne %al
popq %rbx
popq %r14
popq %rbp
retq
| _ma_check_if_right_bitmap_type:
push rbp
mov rbp, rsp
push r14
push rbx
mov r14, rcx
mov ebx, esi
mov esi, 0A10h
add rsi, [rdi]
call _ma_bitmap_get_page_bits
mov ecx, eax
mov [r14], eax
mov al, 1
cmp ecx, 7
ja short loc_57884
cmp ebx, 3
jz short loc_5787E
cmp ebx, 2
jz short loc_57876
cmp ebx, 1
jnz short loc_57884
add ecx, 0FFFFFFFBh
cmp ecx, 0FFFFFFFCh
jmp short loc_57879
loc_57876:
cmp ecx, 5
loc_57879:
setb al
jmp short loc_57884
loc_5787E:
cmp ecx, 7
setnz al
loc_57884:
pop rbx
pop r14
pop rbp
retn
| char ma_check_if_right_bitmap_type(long long *a1, int a2, unsigned long long a3, unsigned int *a4)
{
unsigned int page_bits; // ecx
char result; // al
page_bits = ma_bitmap_get_page_bits(a1, (_QWORD *)(*a1 + 2576), a3);
*a4 = page_bits;
result = 1;
if ( page_bits <= 7 )
{
switch ( a2 )
{
case 3:
return page_bits != 7;
case 2:
return page_bits < 5;
case 1:
return page_bits - 5 < 0xFFFFFFFC;
default:
return result;
}
}
return result;
}
| _ma_check_if_right_bitmap_type:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R14,RCX
MOV EBX,ESI
MOV ESI,0xa10
ADD RSI,qword ptr [RDI]
CALL 0x00156de1
MOV ECX,EAX
MOV dword ptr [R14],EAX
MOV AL,0x1
CMP ECX,0x7
JA 0x00157884
CMP EBX,0x3
JZ 0x0015787e
CMP EBX,0x2
JZ 0x00157876
CMP EBX,0x1
JNZ 0x00157884
ADD ECX,-0x5
CMP ECX,-0x4
JMP 0x00157879
LAB_00157876:
CMP ECX,0x5
LAB_00157879:
SETC AL
JMP 0x00157884
LAB_0015787e:
CMP ECX,0x7
SETNZ AL
LAB_00157884:
POP RBX
POP R14
POP RBP
RET
|
bool _ma_check_if_right_bitmap_type(long *param_1,int param_2,int8 param_3,uint *param_4)
{
uint uVar1;
bool bVar2;
uVar1 = _ma_bitmap_get_page_bits(param_1,*param_1 + 0xa10);
*param_4 = uVar1;
bVar2 = true;
if (uVar1 < 8) {
if (param_2 == 3) {
bVar2 = uVar1 != 7;
}
else if (param_2 == 2) {
bVar2 = uVar1 < 5;
}
else {
if (param_2 != 1) {
return true;
}
bVar2 = uVar1 - 5 < 0xfffffffc;
}
}
return bVar2;
}
| |
21,276 | mysql_net_store_length | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | unsigned char *mysql_net_store_length(unsigned char *packet, size_t length)
{
if (length < (unsigned long long) L64(251)) {
*packet = (unsigned char) length;
return packet + 1;
}
if (length < (unsigned long long) L64(65536)) {
*packet++ = 252;
int2store(packet,(uint) length);
return packet + 2;
}
if (length < (unsigned long long) L64(16777216)) {
*packet++ = 253;
int3store(packet,(ulong) length);
return packet + 3;
}
*packet++ = 254;
int8store(packet, length);
return packet + 8;
} | O0 | c | mysql_net_store_length:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0xfb, -0x18(%rbp)
jae 0x275d3
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x27721
cmpq $0x10000, -0x18(%rbp) # imm = 0x10000
jae 0x27621
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $-0x4, (%rax)
movq -0x18(%rbp), %rax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movl -0x1c(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x10(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
jmp 0x27721
cmpq $0x1000000, -0x18(%rbp) # imm = 0x1000000
jae 0x2767c
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $-0x3, (%rax)
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x18(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x18(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x10(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x8(%rbp)
jmp 0x27721
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $-0x2, (%rax)
movq -0x18(%rbp), %rax
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rax
shrq $0x20, %rax
movl %eax, -0x24(%rbp)
movl -0x20(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movl -0x20(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x20(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x20(%rbp), %eax
shrl $0x18, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
jmp 0x276da
movl -0x24(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x4(%rax)
movl -0x24(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x5(%rax)
movl -0x24(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x6(%rax)
movl -0x24(%rbp), %eax
shrl $0x18, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x7(%rax)
jmp 0x27715
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
| mysql_net_store_length:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
cmp [rbp+var_18], 0FBh
jnb short loc_275D3
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_8], rax
jmp loc_27721
loc_275D3:
cmp [rbp+var_18], offset stru_10000
jnb short loc_27621
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov byte ptr [rax], 0FCh
mov rax, [rbp+var_18]
mov [rbp+var_1C], eax
mov eax, [rbp+var_1C]
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
mov eax, [rbp+var_1C]
shr eax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_10]
add rax, 2
mov [rbp+var_8], rax
jmp loc_27721
loc_27621:
cmp [rbp+var_18], 1000000h
jnb short loc_2767C
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov byte ptr [rax], 0FDh
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
mov rax, [rbp+var_18]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_18]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_10]
add rax, 3
mov [rbp+var_8], rax
jmp loc_27721
loc_2767C:
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov byte ptr [rax], 0FEh
mov rax, [rbp+var_18]
mov [rbp+var_20], eax
mov rax, [rbp+var_18]
shr rax, 20h
mov [rbp+var_24], eax
mov eax, [rbp+var_20]
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
mov eax, [rbp+var_20]
shr eax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov eax, [rbp+var_20]
shr eax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov eax, [rbp+var_20]
shr eax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+3], cl
jmp short $+2
loc_276DA:
mov eax, [rbp+var_24]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+4], cl
mov eax, [rbp+var_24]
shr eax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+5], cl
mov eax, [rbp+var_24]
shr eax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+6], cl
mov eax, [rbp+var_24]
shr eax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+7], cl
jmp short $+2
loc_27715:
mov rax, [rbp+var_10]
add rax, 8
mov [rbp+var_8], rax
loc_27721:
mov rax, [rbp+var_8]
pop rbp
retn
| long long mysql_net_store_length(long long a1, unsigned long long a2)
{
_BYTE *v3; // [rsp+14h] [rbp-10h]
if ( a2 >= 0xFB )
{
if ( a2 >= (unsigned long long)&stru_10000 )
{
v3 = (_BYTE *)(a1 + 1);
if ( a2 >= 0x1000000 )
{
*(_BYTE *)a1 = -2;
*v3 = a2;
*(_WORD *)(a1 + 2) = (unsigned int)a2 >> 8;
*(_BYTE *)(a1 + 4) = BYTE3(a2);
*(_WORD *)(a1 + 5) = WORD2(a2);
*(_BYTE *)(a1 + 7) = BYTE6(a2);
*(_BYTE *)(a1 + 8) = HIBYTE(a2);
return a1 + 9;
}
else
{
*(_BYTE *)a1 = -3;
*(_WORD *)v3 = a2;
*(_BYTE *)(a1 + 3) = BYTE2(a2);
return a1 + 4;
}
}
else
{
*(_BYTE *)a1 = -4;
*(_WORD *)(a1 + 1) = a2;
return a1 + 3;
}
}
else
{
*(_BYTE *)a1 = a2;
return a1 + 1;
}
}
| mysql_net_store_length:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
CMP qword ptr [RBP + -0x18],0xfb
JNC 0x001275d3
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00127721
LAB_001275d3:
CMP qword ptr [RBP + -0x18],0x10000
JNC 0x00127621
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV byte ptr [RAX],0xfc
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x1c],EAX
MOV EAX,dword ptr [RBP + -0x1c]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x1c]
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00127721
LAB_00127621:
CMP qword ptr [RBP + -0x18],0x1000000
JNC 0x0012767c
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV byte ptr [RAX],0xfd
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x3
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00127721
LAB_0012767c:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV byte ptr [RAX],0xfe
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x20],EAX
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x20
MOV dword ptr [RBP + -0x24],EAX
MOV EAX,dword ptr [RBP + -0x20]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x20]
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV EAX,dword ptr [RBP + -0x20]
SHR EAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV EAX,dword ptr [RBP + -0x20]
SHR EAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x3],CL
JMP 0x001276da
LAB_001276da:
MOV EAX,dword ptr [RBP + -0x24]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x4],CL
MOV EAX,dword ptr [RBP + -0x24]
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x5],CL
MOV EAX,dword ptr [RBP + -0x24]
SHR EAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x6],CL
MOV EAX,dword ptr [RBP + -0x24]
SHR EAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x7],CL
JMP 0x00127715
LAB_00127715:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x8
MOV qword ptr [RBP + -0x8],RAX
LAB_00127721:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
int1 * mysql_net_store_length(int1 *param_1,ulong param_2)
{
int1 uVar1;
int1 uVar2;
int1 uVar3;
int1 *local_10;
uVar1 = (int1)param_2;
if (param_2 < 0xfb) {
*param_1 = uVar1;
local_10 = param_1 + 1;
}
else {
uVar3 = (int1)(param_2 >> 8);
if (param_2 < 0x10000) {
*param_1 = 0xfc;
param_1[1] = uVar1;
param_1[2] = uVar3;
local_10 = param_1 + 3;
}
else {
uVar2 = (int1)(param_2 >> 0x10);
if (param_2 < 0x1000000) {
*param_1 = 0xfd;
param_1[1] = uVar1;
param_1[2] = uVar3;
param_1[3] = uVar2;
local_10 = param_1 + 4;
}
else {
*param_1 = 0xfe;
param_1[1] = uVar1;
param_1[2] = uVar3;
param_1[3] = uVar2;
param_1[4] = (char)(param_2 >> 0x18);
param_1[5] = (char)(param_2 >> 0x20);
param_1[6] = (char)(param_2 >> 0x28);
param_1[7] = (char)(param_2 >> 0x30);
param_1[8] = (char)(param_2 >> 0x38);
local_10 = param_1 + 9;
}
}
}
return local_10;
}
| |
21,277 | mysql_net_store_length | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | unsigned char *mysql_net_store_length(unsigned char *packet, size_t length)
{
if (length < (unsigned long long) L64(251)) {
*packet = (unsigned char) length;
return packet + 1;
}
if (length < (unsigned long long) L64(65536)) {
*packet++ = 252;
int2store(packet,(uint) length);
return packet + 2;
}
if (length < (unsigned long long) L64(16777216)) {
*packet++ = 253;
int3store(packet,(ulong) length);
return packet + 3;
}
*packet++ = 254;
int8store(packet, length);
return packet + 8;
} | O3 | c | mysql_net_store_length:
pushq %rbp
movq %rsp, %rbp
movq %rsi, %rcx
movq %rdi, %rax
cmpq $0xfa, %rsi
ja 0x1f727
movb %cl, (%rax)
movl $0x1, %ecx
jmp 0x1f7a4
cmpq $0xffff, %rcx # imm = 0xFFFF
ja 0x1f740
movb $-0x4, (%rax)
movb %cl, 0x1(%rax)
movb %ch, 0x2(%rax)
movl $0x3, %ecx
jmp 0x1f7a4
cmpq $0xffffff, %rcx # imm = 0xFFFFFF
ja 0x1f75f
movb $-0x3, (%rax)
movb %cl, 0x1(%rax)
movb %ch, 0x2(%rax)
shrl $0x10, %ecx
movb %cl, 0x3(%rax)
movl $0x4, %ecx
jmp 0x1f7a4
movb $-0x2, (%rax)
movq %rcx, %rdx
shrq $0x20, %rdx
movb %cl, 0x1(%rax)
movb %ch, 0x2(%rax)
movl %ecx, %esi
shrl $0x10, %esi
movb %sil, 0x3(%rax)
movl %ecx, %esi
shrl $0x18, %esi
movb %sil, 0x4(%rax)
movb %dl, 0x5(%rax)
movq %rcx, %rdx
shrq $0x28, %rdx
movb %dl, 0x6(%rax)
movq %rcx, %rdx
shrq $0x30, %rdx
movb %dl, 0x7(%rax)
shrq $0x38, %rcx
movb %cl, 0x8(%rax)
movl $0x9, %ecx
addq %rcx, %rax
popq %rbp
retq
| mysql_net_store_length:
push rbp
mov rbp, rsp
mov rcx, rsi
mov rax, rdi
cmp rsi, 0FAh
ja short loc_1F727
mov [rax], cl
mov ecx, 1
jmp short loc_1F7A4
loc_1F727:
cmp rcx, 0FFFFh
ja short loc_1F740
mov byte ptr [rax], 0FCh
mov [rax+1], cl
mov [rax+2], ch
mov ecx, 3
jmp short loc_1F7A4
loc_1F740:
cmp rcx, 0FFFFFFh
ja short loc_1F75F
mov byte ptr [rax], 0FDh
mov [rax+1], cl
mov [rax+2], ch
shr ecx, 10h
mov [rax+3], cl
mov ecx, 4
jmp short loc_1F7A4
loc_1F75F:
mov byte ptr [rax], 0FEh
mov rdx, rcx
shr rdx, 20h
mov [rax+1], cl
mov [rax+2], ch
mov esi, ecx
shr esi, 10h
mov [rax+3], sil
mov esi, ecx
shr esi, 18h
mov [rax+4], sil
mov [rax+5], dl
mov rdx, rcx
shr rdx, 28h
mov [rax+6], dl
mov rdx, rcx
shr rdx, 30h
mov [rax+7], dl
shr rcx, 38h
mov [rax+8], cl
mov ecx, 9
loc_1F7A4:
add rax, rcx
pop rbp
retn
| long long mysql_net_store_length(long long a1, unsigned long long a2)
{
long long v2; // rcx
if ( a2 > 0xFA )
{
if ( a2 > 0xFFFF )
{
if ( a2 > 0xFFFFFF )
{
*(_BYTE *)a1 = -2;
*(_QWORD *)(a1 + 1) = a2;
v2 = 9LL;
}
else
{
*(_BYTE *)a1 = -3;
*(_WORD *)(a1 + 1) = a2;
*(_BYTE *)(a1 + 3) = BYTE2(a2);
v2 = 4LL;
}
}
else
{
*(_BYTE *)a1 = -4;
*(_WORD *)(a1 + 1) = a2;
v2 = 3LL;
}
}
else
{
*(_BYTE *)a1 = a2;
v2 = 1LL;
}
return v2 + a1;
}
| mysql_net_store_length:
PUSH RBP
MOV RBP,RSP
MOV RCX,RSI
MOV RAX,RDI
CMP RSI,0xfa
JA 0x0011f727
MOV byte ptr [RAX],CL
MOV ECX,0x1
JMP 0x0011f7a4
LAB_0011f727:
CMP RCX,0xffff
JA 0x0011f740
MOV byte ptr [RAX],0xfc
MOV byte ptr [RAX + 0x1],CL
MOV byte ptr [RAX + 0x2],CH
MOV ECX,0x3
JMP 0x0011f7a4
LAB_0011f740:
CMP RCX,0xffffff
JA 0x0011f75f
MOV byte ptr [RAX],0xfd
MOV byte ptr [RAX + 0x1],CL
MOV byte ptr [RAX + 0x2],CH
SHR ECX,0x10
MOV byte ptr [RAX + 0x3],CL
MOV ECX,0x4
JMP 0x0011f7a4
LAB_0011f75f:
MOV byte ptr [RAX],0xfe
MOV RDX,RCX
SHR RDX,0x20
MOV byte ptr [RAX + 0x1],CL
MOV byte ptr [RAX + 0x2],CH
MOV ESI,ECX
SHR ESI,0x10
MOV byte ptr [RAX + 0x3],SIL
MOV ESI,ECX
SHR ESI,0x18
MOV byte ptr [RAX + 0x4],SIL
MOV byte ptr [RAX + 0x5],DL
MOV RDX,RCX
SHR RDX,0x28
MOV byte ptr [RAX + 0x6],DL
MOV RDX,RCX
SHR RDX,0x30
MOV byte ptr [RAX + 0x7],DL
SHR RCX,0x38
MOV byte ptr [RAX + 0x8],CL
MOV ECX,0x9
LAB_0011f7a4:
ADD RAX,RCX
POP RBP
RET
|
int1 * mysql_net_store_length(int1 *param_1,ulong param_2)
{
int1 uVar1;
int1 uVar2;
int1 uVar4;
long lVar3;
uVar1 = (int1)param_2;
if (param_2 < 0xfb) {
*param_1 = uVar1;
lVar3 = 1;
}
else {
uVar4 = (int1)(param_2 >> 8);
if (param_2 < 0x10000) {
*param_1 = 0xfc;
param_1[1] = uVar1;
param_1[2] = uVar4;
lVar3 = 3;
}
else {
uVar2 = (int1)(param_2 >> 0x10);
if (param_2 < 0x1000000) {
*param_1 = 0xfd;
param_1[1] = uVar1;
param_1[2] = uVar4;
param_1[3] = uVar2;
lVar3 = 4;
}
else {
*param_1 = 0xfe;
param_1[1] = uVar1;
param_1[2] = uVar4;
param_1[3] = uVar2;
param_1[4] = (char)(param_2 >> 0x18);
param_1[5] = (char)(param_2 >> 0x20);
param_1[6] = (char)(param_2 >> 0x28);
param_1[7] = (char)(param_2 >> 0x30);
param_1[8] = (char)(param_2 >> 0x38);
lVar3 = 9;
}
}
}
return param_1 + lVar3;
}
| |
21,278 | ggml_map_custom2_impl_f32 | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | static struct ggml_tensor * ggml_map_custom2_impl_f32(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b,
const ggml_custom2_op_f32_t fun,
bool inplace) {
bool is_node = false;
if (!inplace && (a->grad || b->grad)) {
is_node = true;
}
struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
ggml_set_op_params(result, (const void *) &fun, sizeof(fun));
result->op = GGML_OP_MAP_CUSTOM2_F32;
result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL;
result->src[0] = a;
result->src[1] = b;
return result;
} | O0 | c | ggml_map_custom2_impl_f32:
subq $0x48, %rsp
movb %r8b, %al
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
andb $0x1, %al
movb %al, 0x27(%rsp)
movb $0x0, 0x26(%rsp)
testb $0x1, 0x27(%rsp)
jne 0x128340
movq 0x38(%rsp), %rax
cmpq $0x0, 0x98(%rax)
jne 0x12833b
movq 0x30(%rsp), %rax
cmpq $0x0, 0x98(%rax)
je 0x128340
movb $0x1, 0x26(%rsp)
testb $0x1, 0x27(%rsp)
je 0x12835d
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x11e7e0
movq %rax, 0x10(%rsp)
jmp 0x128371
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x11cfc0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl $0x8, %edx
callq 0x120a30
movq 0x18(%rsp), %rax
movl $0x41, 0x50(%rax)
testb $0x1, 0x26(%rsp)
je 0x1283b8
movq 0x40(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x11cfc0
movq %rax, 0x8(%rsp)
jmp 0x1283c1
xorl %eax, %eax
movq %rax, 0x8(%rsp)
jmp 0x1283c1
movq 0x8(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x98(%rax)
movq 0x38(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0xa0(%rax)
movq 0x30(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0xa8(%rax)
movq 0x18(%rsp), %rax
addq $0x48, %rsp
retq
nop
| ggml_map_custom2_impl_f32:
sub rsp, 48h
mov al, r8b
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
mov [rsp+48h+var_18], rdx
mov [rsp+48h+var_20], rcx
and al, 1
mov [rsp+48h+var_21], al
mov [rsp+48h+var_22], 0
test [rsp+48h+var_21], 1
jnz short loc_128340
mov rax, [rsp+48h+var_10]
cmp qword ptr [rax+98h], 0
jnz short loc_12833B
mov rax, [rsp+48h+var_18]
cmp qword ptr [rax+98h], 0
jz short loc_128340
loc_12833B:
mov [rsp+48h+var_22], 1
loc_128340:
test [rsp+48h+var_21], 1
jz short loc_12835D
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_10]
call ggml_view_tensor
mov [rsp+48h+var_38], rax
jmp short loc_128371
loc_12835D:
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_10]
call ggml_dup_tensor
mov [rsp+48h+var_38], rax
loc_128371:
mov rax, [rsp+48h+var_38]
mov [rsp+48h+var_30], rax
mov rdi, [rsp+48h+var_30]
lea rsi, [rsp+48h+var_20]
mov edx, 8
call ggml_set_op_params
mov rax, [rsp+48h+var_30]
mov dword ptr [rax+50h], 41h ; 'A'
test [rsp+48h+var_22], 1
jz short loc_1283B8
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_30]
call ggml_dup_tensor
mov [rsp+48h+var_40], rax
jmp short loc_1283C1
loc_1283B8:
xor eax, eax
mov [rsp+48h+var_40], rax
jmp short $+2
loc_1283C1:
mov rcx, [rsp+48h+var_40]
mov rax, [rsp+48h+var_30]
mov [rax+98h], rcx
mov rcx, [rsp+48h+var_10]
mov rax, [rsp+48h+var_30]
mov [rax+0A0h], rcx
mov rcx, [rsp+48h+var_18]
mov rax, [rsp+48h+var_30]
mov [rax+0A8h], rcx
mov rax, [rsp+48h+var_30]
add rsp, 48h
retn
| long long ggml_map_custom2_impl_f32(
long long a1,
unsigned int *a2,
long long a3,
long long a4,
char a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
long long v14; // [rsp+8h] [rbp-40h]
long long v15; // [rsp+10h] [rbp-38h]
char v16; // [rsp+26h] [rbp-22h]
long long v17; // [rsp+28h] [rbp-20h] BYREF
long long v18; // [rsp+30h] [rbp-18h]
unsigned int *v19; // [rsp+38h] [rbp-10h]
long long v20; // [rsp+40h] [rbp-8h]
v20 = a1;
v19 = a2;
v18 = a3;
v17 = a4;
v16 = 0;
if ( (a5 & 1) == 0 && (*((_QWORD *)v19 + 19) || *(_QWORD *)(v18 + 152)) )
v16 = 1;
if ( (a5 & 1) != 0 )
v15 = (long long)ggml_view_tensor(v20, (long long)v19, a6, a7, a8, a9, a10, a11, a12, a13);
else
v15 = ggml_dup_tensor(v20, v19);
ggml_set_op_params(v15, (long long)&v17, 8LL);
*(_DWORD *)(v15 + 80) = 65;
if ( (v16 & 1) != 0 )
v14 = ggml_dup_tensor(v20, (unsigned int *)v15);
else
v14 = 0LL;
*(_QWORD *)(v15 + 152) = v14;
*(_QWORD *)(v15 + 160) = v19;
*(_QWORD *)(v15 + 168) = v18;
return v15;
}
| |||
21,279 | ggml_map_custom2_impl_f32 | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | static struct ggml_tensor * ggml_map_custom2_impl_f32(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b,
const ggml_custom2_op_f32_t fun,
bool inplace) {
bool is_node = false;
if (!inplace && (a->grad || b->grad)) {
is_node = true;
}
struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
ggml_set_op_params(result, (const void *) &fun, sizeof(fun));
result->op = GGML_OP_MAP_CUSTOM2_F32;
result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL;
result->src[0] = a;
result->src[1] = b;
return result;
} | O1 | c | ggml_map_custom2_impl_f32:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rcx, 0x8(%rsp)
testl %r8d, %r8d
je 0x95699
xorl %ebp, %ebp
jmp 0x956b0
cmpq $0x0, 0x98(%r14)
jne 0x956ad
cmpq $0x0, 0x98(%rbx)
je 0x95695
movb $0x1, %bpl
testb %r8b, %r8b
je 0x956c2
movq %r15, %rdi
movq %r14, %rsi
callq 0x90b1a
jmp 0x956dc
movl (%r14), %esi
leaq 0x10(%r14), %rcx
movq %r15, %rdi
movl $0x4, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x8e8b7
movq %rax, %r12
leaq 0x8(%rsp), %rsi
movl $0x8, %edx
movq %rax, %rdi
callq 0x91e91
movl $0x41, 0x50(%r12)
testb %bpl, %bpl
je 0x9571d
movl (%r12), %esi
leaq 0x10(%r12), %rcx
movq %r15, %rdi
movl $0x4, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x8e8b7
jmp 0x9571f
xorl %eax, %eax
movq %rax, 0x98(%r12)
movq %r14, 0xa0(%r12)
movq %rbx, 0xa8(%r12)
movq %r12, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| ggml_map_custom2_impl_f32:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov [rsp+38h+var_30], rcx
test r8d, r8d
jz short loc_95699
loc_95695:
xor ebp, ebp
jmp short loc_956B0
loc_95699:
cmp qword ptr [r14+98h], 0
jnz short loc_956AD
cmp qword ptr [rbx+98h], 0
jz short loc_95695
loc_956AD:
mov bpl, 1
loc_956B0:
test r8b, r8b
jz short loc_956C2
mov rdi, r15
mov rsi, r14
call ggml_view_tensor
jmp short loc_956DC
loc_956C2:
mov esi, [r14]
lea rcx, [r14+10h]
mov rdi, r15
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
loc_956DC:
mov r12, rax
lea rsi, [rsp+38h+var_30]
mov edx, 8
mov rdi, rax
call ggml_set_op_params
mov dword ptr [r12+50h], 41h ; 'A'
test bpl, bpl
jz short loc_9571D
mov esi, [r12]
lea rcx, [r12+10h]
mov rdi, r15
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
jmp short loc_9571F
loc_9571D:
xor eax, eax
loc_9571F:
mov [r12+98h], rax
mov [r12+0A0h], r14
mov [r12+0A8h], rbx
mov rax, r12
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long ggml_map_custom2_impl_f32(
long long a1,
long long a2,
long long a3,
long long a4,
int a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
bool v14; // bp
long long v15; // rax
long long v16; // r12
long long v17; // rax
long long v19[6]; // [rsp+8h] [rbp-30h] BYREF
v19[0] = a4;
v14 = !a5 && (*(_QWORD *)(a2 + 152) || *(_QWORD *)(a3 + 152));
if ( (_BYTE)a5 )
v15 = ggml_view_tensor(a1, a2, a6, a7, a8, a9, a10, a11, a12, a13);
else
v15 = ggml_new_tensor_impl(a1, *(_DWORD *)a2, 4, (_QWORD *)(a2 + 16), 0LL, 0LL, a6, a7);
v16 = v15;
ggml_set_op_params(v15, (long long)v19, 8LL);
*(_DWORD *)(v16 + 80) = 65;
if ( v14 )
v17 = ggml_new_tensor_impl(a1, *(_DWORD *)v16, 4, (_QWORD *)(v16 + 16), 0LL, 0LL, a6, a7);
else
v17 = 0LL;
*(_QWORD *)(v16 + 152) = v17;
*(_QWORD *)(v16 + 160) = a2;
*(_QWORD *)(v16 + 168) = a3;
return v16;
}
| |||
21,280 | ggml_map_custom2_impl_f32 | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | static struct ggml_tensor * ggml_map_custom2_impl_f32(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b,
const ggml_custom2_op_f32_t fun,
bool inplace) {
bool is_node = false;
if (!inplace && (a->grad || b->grad)) {
is_node = true;
}
struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
ggml_set_op_params(result, (const void *) &fun, sizeof(fun));
result->op = GGML_OP_MAP_CUSTOM2_F32;
result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL;
result->src[0] = a;
result->src[1] = b;
return result;
} | O2 | c | ggml_map_custom2_impl_f32:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rcx, 0x8(%rsp)
testl %r8d, %r8d
je 0x6f11a
movq %r15, %rdi
movq %r14, %rsi
callq 0x69922
movq %rax, %r12
xorl %ebp, %ebp
jmp 0x6f13f
cmpq $0x0, 0x98(%r14)
jne 0x6f12e
cmpq $0x0, 0x98(%rbx)
je 0x6f194
movb $0x1, %bpl
movq %r15, %rdi
movq %r14, %rsi
callq 0x68a65
movq %rax, %r12
leaq 0x8(%rsp), %rsi
pushq $0x8
popq %rdx
movq %r12, %rdi
callq 0x6ab3d
movl $0x41, 0x50(%r12)
testb %bpl, %bpl
je 0x6f16a
movq %r15, %rdi
movq %r12, %rsi
callq 0x68a65
jmp 0x6f16c
xorl %eax, %eax
movq %rax, 0x98(%r12)
movq %r14, 0xa0(%r12)
movq %rbx, 0xa8(%r12)
movq %r12, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
jmp 0x6f131
| ggml_map_custom2_impl_f32:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov [rsp+38h+var_30], rcx
test r8d, r8d
jz short loc_6F11A
mov rdi, r15
mov rsi, r14
call ggml_view_tensor
mov r12, rax
xor ebp, ebp
jmp short loc_6F13F
loc_6F11A:
cmp qword ptr [r14+98h], 0
jnz short loc_6F12E
cmp qword ptr [rbx+98h], 0
jz short loc_6F194
loc_6F12E:
mov bpl, 1
loc_6F131:
mov rdi, r15
mov rsi, r14
call ggml_dup_tensor
mov r12, rax
loc_6F13F:
lea rsi, [rsp+38h+var_30]
push 8
pop rdx
mov rdi, r12
call ggml_set_op_params
mov dword ptr [r12+50h], 41h ; 'A'
test bpl, bpl
jz short loc_6F16A
mov rdi, r15
mov rsi, r12
call ggml_dup_tensor
jmp short loc_6F16C
loc_6F16A:
xor eax, eax
loc_6F16C:
mov [r12+98h], rax
mov [r12+0A0h], r14
mov [r12+0A8h], rbx
mov rax, r12
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_6F194:
xor ebp, ebp
jmp short loc_6F131
| long long ggml_map_custom2_impl_f32(
long long a1,
long long a2,
long long a3,
long long a4,
int a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
long long v14; // r12
bool v15; // bp
long long v16; // rax
_QWORD v18[6]; // [rsp+8h] [rbp-30h] BYREF
v18[0] = a4;
if ( a5 )
{
v14 = ggml_view_tensor(a1, a2, a6, a7, a8, a9, a10, a11, a12, a13);
v15 = 0;
}
else
{
v15 = *(_QWORD *)(a2 + 152) || *(_QWORD *)(a3 + 152);
v14 = ggml_dup_tensor(a1, (unsigned int *)a2);
}
ggml_set_op_params(v14, (long long)v18, 8LL);
*(_DWORD *)(v14 + 80) = 65;
if ( v15 )
v16 = ggml_dup_tensor(a1, (unsigned int *)v14);
else
v16 = 0LL;
*(_QWORD *)(v14 + 152) = v16;
*(_QWORD *)(v14 + 160) = a2;
*(_QWORD *)(v14 + 168) = a3;
return v14;
}
| ggml_map_custom2_impl_f32:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
MOV qword ptr [RSP + 0x8],RCX
TEST R8D,R8D
JZ 0x0016f11a
MOV RDI,R15
MOV RSI,R14
CALL 0x00169922
MOV R12,RAX
XOR EBP,EBP
JMP 0x0016f13f
LAB_0016f11a:
CMP qword ptr [R14 + 0x98],0x0
JNZ 0x0016f12e
CMP qword ptr [RBX + 0x98],0x0
JZ 0x0016f194
LAB_0016f12e:
MOV BPL,0x1
LAB_0016f131:
MOV RDI,R15
MOV RSI,R14
CALL 0x00168a65
MOV R12,RAX
LAB_0016f13f:
LEA RSI,[RSP + 0x8]
PUSH 0x8
POP RDX
MOV RDI,R12
CALL 0x0016ab3d
MOV dword ptr [R12 + 0x50],0x41
TEST BPL,BPL
JZ 0x0016f16a
MOV RDI,R15
MOV RSI,R12
CALL 0x00168a65
JMP 0x0016f16c
LAB_0016f16a:
XOR EAX,EAX
LAB_0016f16c:
MOV qword ptr [R12 + 0x98],RAX
MOV qword ptr [R12 + 0xa0],R14
MOV qword ptr [R12 + 0xa8],RBX
MOV RAX,R12
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0016f194:
XOR EBP,EBP
JMP 0x0016f131
|
long ggml_map_custom2_impl_f32
(int8 param_1,long param_2,long param_3,int8 param_4,int param_5)
{
bool bVar1;
long lVar2;
int8 uVar3;
int8 local_30;
local_30 = param_4;
if (param_5 == 0) {
if ((*(long *)(param_2 + 0x98) == 0) && (*(long *)(param_3 + 0x98) == 0)) {
bVar1 = false;
}
else {
bVar1 = true;
}
lVar2 = ggml_dup_tensor(param_1,param_2);
}
else {
lVar2 = ggml_view_tensor(param_1,param_2);
bVar1 = false;
}
ggml_set_op_params(lVar2,&local_30,8);
*(int4 *)(lVar2 + 0x50) = 0x41;
if (bVar1) {
uVar3 = ggml_dup_tensor(param_1,lVar2);
}
else {
uVar3 = 0;
}
*(int8 *)(lVar2 + 0x98) = uVar3;
*(long *)(lVar2 + 0xa0) = param_2;
*(long *)(lVar2 + 0xa8) = param_3;
return lVar2;
}
| |
21,281 | ggml_map_custom2_impl_f32 | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | static struct ggml_tensor * ggml_map_custom2_impl_f32(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b,
const ggml_custom2_op_f32_t fun,
bool inplace) {
bool is_node = false;
if (!inplace && (a->grad || b->grad)) {
is_node = true;
}
struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
ggml_set_op_params(result, (const void *) &fun, sizeof(fun));
result->op = GGML_OP_MAP_CUSTOM2_F32;
result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL;
result->src[0] = a;
result->src[1] = b;
return result;
} | O3 | c | ggml_map_custom2_impl_f32:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
movq %rcx, (%rsp)
testl %r8d, %r8d
je 0x94538
movq %r12, %rdi
movq %r14, %rsi
callq 0x8f880
movq %rax, %r15
movq %rsp, %rsi
movl $0x8, %edx
movq %rax, %rdi
callq 0x90cc8
movl $0x41, 0x50(%r15)
xorl %r13d, %r13d
jmp 0x945b0
cmpq $0x0, 0x98(%r14)
jne 0x94550
cmpq $0x0, 0x98(%rbx)
je 0x945d7
movb $0x1, %bpl
movl (%r14), %esi
leaq 0x10(%r14), %rcx
xorl %r13d, %r13d
movq %r12, %rdi
movl $0x4, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x8d64f
movq %rax, %r15
movq %rsp, %rsi
movl $0x8, %edx
movq %rax, %rdi
callq 0x90cc8
movl $0x41, 0x50(%r15)
testb %bpl, %bpl
je 0x945b0
movl (%r15), %esi
movq %r15, %rcx
addq $0x10, %rcx
movq %r12, %rdi
movl $0x4, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x8d64f
movq %rax, %r13
movq %r13, 0x98(%r15)
movq %r14, 0xa0(%r15)
movq %rbx, 0xa8(%r15)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
jmp 0x94553
| ggml_map_custom2_impl_f32:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdx
mov r14, rsi
mov r12, rdi
mov [rsp+38h+var_38], rcx
test r8d, r8d
jz short loc_94538
mov rdi, r12
mov rsi, r14
call ggml_view_tensor
mov r15, rax
mov rsi, rsp
mov edx, 8
mov rdi, rax
call ggml_set_op_params
mov dword ptr [r15+50h], 41h ; 'A'
xor r13d, r13d
jmp short loc_945B0
loc_94538:
cmp qword ptr [r14+98h], 0
jnz short loc_94550
cmp qword ptr [rbx+98h], 0
jz loc_945D7
loc_94550:
mov bpl, 1
loc_94553:
mov esi, [r14]
lea rcx, [r14+10h]
xor r13d, r13d
mov rdi, r12
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
mov r15, rax
mov rsi, rsp
mov edx, 8
mov rdi, rax
call ggml_set_op_params
mov dword ptr [r15+50h], 41h ; 'A'
test bpl, bpl
jz short loc_945B0
mov esi, [r15]
mov rcx, r15
add rcx, 10h
mov rdi, r12
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
mov r13, rax
loc_945B0:
mov [r15+98h], r13
mov [r15+0A0h], r14
mov [r15+0A8h], rbx
mov rax, r15
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_945D7:
xor ebp, ebp
jmp loc_94553
| long long ggml_map_custom2_impl_f32(
long long a1,
long long a2,
long long a3,
long long a4,
int a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
long long v14; // r15
long long v15; // r13
bool v16; // bp
_QWORD v18[7]; // [rsp+0h] [rbp-38h] BYREF
v18[0] = a4;
if ( a5 )
{
v14 = ggml_view_tensor(a1, a2, a6, a7, a8, a9, a10, a11, a12, a13);
ggml_set_op_params(v14, (long long)v18, 8LL);
*(_DWORD *)(v14 + 80) = 65;
v15 = 0LL;
}
else
{
v16 = *(_QWORD *)(a2 + 152) || *(_QWORD *)(a3 + 152);
v15 = 0LL;
v14 = ggml_new_tensor_impl(a1, *(_DWORD *)a2, 4, (_QWORD *)(a2 + 16), 0LL, 0LL, a6, a7);
ggml_set_op_params(v14, (long long)v18, 8LL);
*(_DWORD *)(v14 + 80) = 65;
if ( v16 )
v15 = ggml_new_tensor_impl(a1, *(_DWORD *)v14, 4, (_QWORD *)(v14 + 16), 0LL, 0LL, a6, a7);
}
*(_QWORD *)(v14 + 152) = v15;
*(_QWORD *)(v14 + 160) = a2;
*(_QWORD *)(v14 + 168) = a3;
return v14;
}
| |||
21,282 | minja::VariableExpr::VariableExpr(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/./minja.hpp | VariableExpr(const Location & location, const std::string& n)
: Expression(location), name(n) {} | O3 | cpp | minja::VariableExpr::VariableExpr(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbx
movq %rdi, %rbx
leaq 0x94ecb(%rip), %rax # 0xeedd0
movq %rax, (%rdi)
movq 0x20(%rdi), %rdi
leaq 0x30(%rbx), %rax
cmpq %rax, %rdi
je 0x59f20
movq (%rax), %rsi
incq %rsi
callq 0x186a0
leaq 0x94361(%rip), %rax # 0xee288
movq %rax, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x59f38
callq 0x2f80e
movl $0x40, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x186a0
| _ZN5minja12VariableExprD0Ev:
push rbx
mov rbx, rdi
lea rax, off_EEDD0
mov [rdi], rax
mov rdi, [rdi+20h]; void *
lea rax, [rbx+30h]
cmp rdi, rax
jz short loc_59F20
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_59F20:
lea rax, off_EE288
mov [rbx], rax
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_59F38
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_59F38:
mov esi, 40h ; '@'; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
| void minja::VariableExpr::~VariableExpr(minja::VariableExpr *this)
{
char *v2; // rdi
volatile signed __int32 *v3; // rdi
*(_QWORD *)this = &off_EEDD0;
v2 = (char *)*((_QWORD *)this + 4);
if ( v2 != (char *)this + 48 )
operator delete(v2, *((_QWORD *)this + 6) + 1LL);
*(_QWORD *)this = &off_EE288;
v3 = (volatile signed __int32 *)*((_QWORD *)this + 2);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
operator delete(this, 0x40uLL);
}
| ~VariableExpr:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x1eedd0]
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x20]
LEA RAX,[RBX + 0x30]
CMP RDI,RAX
JZ 0x00159f20
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x001186a0
LAB_00159f20:
LEA RAX,[0x1ee288]
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x10]
TEST RDI,RDI
JZ 0x00159f38
CALL 0x0012f80e
LAB_00159f38:
MOV ESI,0x40
MOV RDI,RBX
POP RBX
JMP 0x001186a0
|
/* minja::VariableExpr::~VariableExpr() */
void __thiscall minja::VariableExpr::~VariableExpr(VariableExpr *this)
{
*(int ***)this = &PTR_do_evaluate_001eedd0;
if (*(VariableExpr **)(this + 0x20) != this + 0x30) {
operator_delete(*(VariableExpr **)(this + 0x20),*(long *)(this + 0x30) + 1);
}
*(int ***)this = &PTR___cxa_pure_virtual_001ee288;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10));
}
operator_delete(this,0x40);
return;
}
| |
21,283 | std::enable_if<has_member_tm_gmtoff<tm>::value, std::tuple<tm, long, std::chrono::duration<long, std::ratio<3600l, 1l>>>>::type nglog::(anonymous namespace)::Breakdown<tm>(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> const&) | ng-log[P]ng-log/src/logging.cc | auto Breakdown(const std::chrono::system_clock::time_point& now)
-> std::enable_if_t<has_member_tm_gmtoff<T>::value,
std::tuple<std::tm, std::time_t, std::chrono::hours>> {
std::time_t timestamp = std::chrono::system_clock::to_time_t(now);
T tm;
if (FLAGS_log_utc_time) {
gmtime_r(×tamp, &tm);
} else {
localtime_r(×tamp, &tm);
}
const auto gmtoffset = std::chrono::duration_cast<std::chrono::hours>(
std::chrono::seconds{tm.tm_gmtoff});
return std::make_tuple(tm, timestamp, gmtoffset);
} | O0 | cpp | std::enable_if<has_member_tm_gmtoff<tm>::value, std::tuple<tm, long, std::chrono::duration<long, std::ratio<3600l, 1l>>>>::type nglog::(anonymous namespace)::Breakdown<tm>(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> const&):
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x70(%rbp)
movq %rdi, %rax
movq %rax, -0x68(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1f080
movq %rax, -0x18(%rbp)
leaq 0x5e822(%rip), %rax # 0x77da1
testb $0x1, (%rax)
je 0x19593
leaq -0x18(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x9e70
jmp 0x195a0
leaq -0x18(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x9370
leaq -0x50(%rbp), %rsi
addq $0x28, %rsi
leaq -0x60(%rbp), %rdi
callq 0x1f430
leaq -0x60(%rbp), %rdi
callq 0x4bb00
movq -0x70(%rbp), %rdi
movq %rax, -0x58(%rbp)
leaq -0x50(%rbp), %rsi
leaq -0x18(%rbp), %rdx
leaq -0x58(%rbp), %rcx
callq 0x4bb30
movq -0x68(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN5nglog12_GLOBAL__N_19BreakdownI2tmEENSt9enable_ifIXsr20has_member_tm_gmtoffIT_EE5valueESt5tupleIJS2_lNSt6chrono8durationIlSt5ratioILl3600ELl1EEEEEEE4typeERKNS6_10time_pointINS6_3_V212system_clockENS7_IlS8_ILl1ELl1000000000EEEEEE:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_70], rdi
mov rax, rdi
mov [rbp+var_68], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_10]
call _ZNSt6chrono3_V212system_clock9to_time_tERKNS_10time_pointIS1_NS_8durationIlSt5ratioILl1ELl1000000000EEEEEE; std::chrono::_V2::system_clock::to_time_t(std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const&)
mov [rbp+var_18], rax
lea rax, _ZN3fLB18FLAGS_log_utc_timeE; fLB::FLAGS_log_utc_time
test byte ptr [rax], 1
jz short loc_19593
lea rdi, [rbp+var_18]
lea rsi, [rbp+var_50]
call _gmtime_r
jmp short loc_195A0
loc_19593:
lea rdi, [rbp+var_18]
lea rsi, [rbp+var_50]
call _localtime_r
loc_195A0:
lea rsi, [rbp+var_50]
add rsi, 28h ; '('
lea rdi, [rbp+var_60]
call _ZNSt6chrono8durationIlSt5ratioILl1ELl1EEEC2IlvEERKT_; std::chrono::duration<long,std::ratio<1l,1l>>::duration<long,void>(long const&)
lea rdi, [rbp+var_60]
call _ZNSt6chrono13duration_castINS_8durationIlSt5ratioILl3600ELl1EEEElS2_ILl1ELl1EEEENSt9enable_ifIXsr13__is_durationIT_EE5valueES7_E4typeERKNS1_IT0_T1_EE
mov rdi, [rbp+var_70]
mov [rbp+var_58], rax
lea rsi, [rbp+var_50]
lea rdx, [rbp+var_18]
lea rcx, [rbp+var_58]
call _ZSt10make_tupleIJR2tmRlRKNSt6chrono8durationIlSt5ratioILl3600ELl1EEEEEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOSD_; std::make_tuple<tm &,long &,std::chrono::duration<long,std::ratio<3600l,1l>> const&>(tm &,long &,std::chrono::duration<long,std::ratio<3600l,1l>> const&&&)
mov rax, [rbp+var_68]
add rsp, 70h
pop rbp
retn
| long long nglog::`anonymous namespace'::Breakdown<tm>(long long a1, long long a2)
{
_BYTE v3[8]; // [rsp+10h] [rbp-60h] BYREF
long long v4; // [rsp+18h] [rbp-58h] BYREF
_BYTE v5[40]; // [rsp+20h] [rbp-50h] BYREF
long long v6; // [rsp+48h] [rbp-28h] BYREF
_QWORD v7[3]; // [rsp+58h] [rbp-18h] BYREF
v7[2] = a1;
v7[1] = a2;
v7[0] = std::chrono::_V2::system_clock::to_time_t(a2);
if ( (fLB::FLAGS_log_utc_time & 1) != 0 )
gmtime_r(v7, v5);
else
localtime_r(v7, v5);
std::chrono::duration<long,std::ratio<1l,1l>>::duration<long,void>(v3, &v6);
v4 = std::chrono::duration_cast<std::chrono::duration<long,std::ratio<3600l,1l>>,long,std::ratio<1l,1l>>(v3);
std::make_tuple<tm &,long &,std::chrono::duration<long,std::ratio<3600l,1l>> const&>(a1, v5, v7, &v4);
return a1;
}
| Breakdown<tm>:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x70],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x68],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0011f080
MOV qword ptr [RBP + -0x18],RAX
LEA RAX,[0x177da1]
TEST byte ptr [RAX],0x1
JZ 0x00119593
LEA RDI,[RBP + -0x18]
LEA RSI,[RBP + -0x50]
CALL 0x00109e70
JMP 0x001195a0
LAB_00119593:
LEA RDI,[RBP + -0x18]
LEA RSI,[RBP + -0x50]
CALL 0x00109370
LAB_001195a0:
LEA RSI,[RBP + -0x50]
ADD RSI,0x28
LEA RDI,[RBP + -0x60]
CALL 0x0011f430
LEA RDI,[RBP + -0x60]
CALL 0x0014bb00
MOV RDI,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x58],RAX
LEA RSI,[RBP + -0x50]
LEA RDX,[RBP + -0x18]
LEA RCX,[RBP + -0x58]
CALL 0x0014bb30
MOV RAX,qword ptr [RBP + -0x68]
ADD RSP,0x70
POP RBP
RET
|
/* std::enable_if<has_member_tm_gmtoff<tm>::value, std::tuple<tm, long, std::chrono::duration<long,
std::ratio<3600l, 1l> > > >::type nglog::(anonymous
namespace)::Breakdown<tm>(std::chrono::time_point<std::chrono::_V2::system_clock,
std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&) */
_anonymous_namespace_ * __thiscall
nglog::(anonymous_namespace)::Breakdown<tm>(_anonymous_namespace_ *this,time_point *param_1)
{
duration<long,std::ratio<1l,1l>> local_68 [8];
int8 local_60;
tm local_58;
time_t local_20;
time_point *local_18;
_anonymous_namespace_ *local_10;
local_18 = param_1;
local_10 = this;
local_20 = std::chrono::_V2::system_clock::to_time_t(param_1);
if ((fLB::FLAGS_log_utc_time & 1) == 0) {
localtime_r(&local_20,&local_58);
}
else {
gmtime_r(&local_20,&local_58);
}
std::chrono::duration<long,std::ratio<1l,1l>>::duration<long,void>(local_68,&local_58.tm_gmtoff);
local_60 = std::chrono::
duration_cast<std::chrono::duration<long,std::ratio<3600l,1l>>,long,std::ratio<1l,1l>>
((duration *)local_68);
std::make_tuple<tm&,long&,std::chrono::duration<long,std::ratio<3600l,1l>>const&>
((tm *)this,(long *)&local_58,(duration *)&local_20);
return this;
}
| |
21,284 | common_params_sampling::print[abi:cxx11]() const | monkey531[P]llama/common/sampling.cpp | std::string common_params_sampling::print() const {
char result[1024];
snprintf(result, sizeof(result),
"\trepeat_last_n = %d, repeat_penalty = %.3f, frequency_penalty = %.3f, presence_penalty = %.3f\n"
"\tdry_multiplier = %.3f, dry_base = %.3f, dry_allowed_length = %d, dry_penalty_last_n = %d\n"
"\ttop_k = %d, top_p = %.3f, min_p = %.3f, xtc_probability = %.3f, xtc_threshold = %.3f, typical_p = %.3f, temp = %.3f\n"
"\tmirostat = %d, mirostat_lr = %.3f, mirostat_ent = %.3f",
penalty_last_n, penalty_repeat, penalty_freq, penalty_present,
dry_multiplier, dry_base, dry_allowed_length, dry_penalty_last_n,
top_k, top_p, min_p, xtc_probability, xtc_threshold, typ_p, temp,
mirostat, mirostat_eta, mirostat_tau);
return std::string(result);
} | O1 | cpp | common_params_sampling::print[abi:cxx11]() const:
pushq %r14
pushq %rbx
subq $0x448, %rsp # imm = 0x448
movq %rdi, %rbx
movl 0x10(%rsi), %eax
cvtss2sd 0x38(%rsi), %xmm0
cvtss2sd 0x3c(%rsi), %xmm1
cvtss2sd 0x40(%rsi), %xmm2
cvtss2sd 0x44(%rsi), %xmm3
cvtss2sd 0x48(%rsi), %xmm4
movl 0x34(%rsi), %ecx
movl 0x4c(%rsi), %r8d
cvtss2sd 0x14(%rsi), %xmm5
cvtss2sd 0x18(%rsi), %xmm6
cvtss2sd 0x1c(%rsi), %xmm7
cvtss2sd 0x20(%rsi), %xmm8
cvtss2sd 0x24(%rsi), %xmm9
movl 0x50(%rsi), %r9d
cvtss2sd 0x28(%rsi), %xmm10
movl 0x54(%rsi), %edx
cvtss2sd 0x5c(%rsi), %xmm11
cvtss2sd 0x58(%rsi), %xmm12
movsd %xmm12, 0x30(%rsp)
movsd %xmm11, 0x28(%rsp)
movl %edx, 0x20(%rsp)
movsd %xmm10, 0x18(%rsp)
movsd %xmm9, 0x10(%rsp)
movsd %xmm8, 0x8(%rsp)
movl %eax, (%rsp)
leaq 0x2bc0f(%rip), %rdx # 0x11d6c8
leaq 0x40(%rsp), %r14
movl $0x400, %esi # imm = 0x400
movq %r14, %rdi
movb $0x8, %al
callq 0x1e3e0
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %r14, %rdi
callq 0x1d4f0
leaq (%rsp,%rax), %rdx
addq $0x40, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2630c
movq %rbx, %rax
addq $0x448, %rsp # imm = 0x448
popq %rbx
popq %r14
retq
| _ZNK22common_params_sampling5printB5cxx11Ev:
push r14
push rbx
sub rsp, 448h
mov rbx, rdi
mov eax, [rsi+10h]
cvtss2sd xmm0, dword ptr [rsi+38h]
cvtss2sd xmm1, dword ptr [rsi+3Ch]
cvtss2sd xmm2, dword ptr [rsi+40h]
cvtss2sd xmm3, dword ptr [rsi+44h]
cvtss2sd xmm4, dword ptr [rsi+48h]
mov ecx, [rsi+34h]
mov r8d, [rsi+4Ch]
cvtss2sd xmm5, dword ptr [rsi+14h]
cvtss2sd xmm6, dword ptr [rsi+18h]
cvtss2sd xmm7, dword ptr [rsi+1Ch]
cvtss2sd xmm8, dword ptr [rsi+20h]
cvtss2sd xmm9, dword ptr [rsi+24h]
mov r9d, [rsi+50h]
cvtss2sd xmm10, dword ptr [rsi+28h]
mov edx, [rsi+54h]
cvtss2sd xmm11, dword ptr [rsi+5Ch]
cvtss2sd xmm12, dword ptr [rsi+58h]
movsd [rsp+458h+var_428], xmm12
movsd [rsp+458h+var_430], xmm11
mov [rsp+458h+var_438], edx
movsd [rsp+458h+var_440], xmm10
movsd [rsp+458h+var_448], xmm9
movsd [rsp+458h+var_450], xmm8
mov [rsp+458h+var_458], eax
lea rdx, aRepeatLastNDRe; "\trepeat_last_n = %d, repeat_penalty = "...
lea r14, [rsp+458h+var_418]
mov esi, 400h
mov rdi, r14
mov al, 8
call _snprintf
lea rax, [rbx+10h]
mov [rbx], rax
mov rdi, r14
call _strlen
lea rdx, [rsp+rax+458h+var_458]
add rdx, 40h ; '@'
mov rdi, rbx
mov rsi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rax, rbx
add rsp, 448h
pop rbx
pop r14
retn
| _QWORD * common_params_sampling::print[abi:cxx11](_QWORD *a1, long long a2)
{
long long v2; // rax
_BYTE v4[1048]; // [rsp+40h] [rbp-418h] BYREF
snprintf(
v4,
1024LL,
"\trepeat_last_n = %d, repeat_penalty = %.3f, frequency_penalty = %.3f, presence_penalty = %.3f\n"
"\tdry_multiplier = %.3f, dry_base = %.3f, dry_allowed_length = %d, dry_penalty_last_n = %d\n"
"\ttop_k = %d, top_p = %.3f, min_p = %.3f, xtc_probability = %.3f, xtc_threshold = %.3f, typical_p = %.3f, temp = %.3"
"f\n"
"\tmirostat = %d, mirostat_lr = %.3f, mirostat_ent = %.3f",
*(_DWORD *)(a2 + 52),
*(float *)(a2 + 56),
*(float *)(a2 + 60),
*(float *)(a2 + 64),
*(float *)(a2 + 68),
*(float *)(a2 + 72),
*(_DWORD *)(a2 + 76),
*(_DWORD *)(a2 + 80),
*(_DWORD *)(a2 + 16),
*(float *)(a2 + 20),
*(float *)(a2 + 24),
*(float *)(a2 + 28),
*(float *)(a2 + 32),
*(float *)(a2 + 36),
*(float *)(a2 + 40),
*(_DWORD *)(a2 + 84),
*(float *)(a2 + 92),
*(float *)(a2 + 88));
*a1 = a1 + 2;
v2 = strlen(v4);
std::string::_M_construct<char const*>(a1, v4, (long long)&v4[v2]);
return a1;
}
| print[abi:cxx11]:
PUSH R14
PUSH RBX
SUB RSP,0x448
MOV RBX,RDI
MOV EAX,dword ptr [RSI + 0x10]
CVTSS2SD XMM0,dword ptr [RSI + 0x38]
CVTSS2SD XMM1,dword ptr [RSI + 0x3c]
CVTSS2SD XMM2,dword ptr [RSI + 0x40]
CVTSS2SD XMM3,dword ptr [RSI + 0x44]
CVTSS2SD XMM4,dword ptr [RSI + 0x48]
MOV ECX,dword ptr [RSI + 0x34]
MOV R8D,dword ptr [RSI + 0x4c]
CVTSS2SD XMM5,dword ptr [RSI + 0x14]
CVTSS2SD XMM6,dword ptr [RSI + 0x18]
CVTSS2SD XMM7,dword ptr [RSI + 0x1c]
CVTSS2SD XMM8,dword ptr [RSI + 0x20]
CVTSS2SD XMM9,dword ptr [RSI + 0x24]
MOV R9D,dword ptr [RSI + 0x50]
CVTSS2SD XMM10,dword ptr [RSI + 0x28]
MOV EDX,dword ptr [RSI + 0x54]
CVTSS2SD XMM11,dword ptr [RSI + 0x5c]
CVTSS2SD XMM12,dword ptr [RSI + 0x58]
MOVSD qword ptr [RSP + 0x30],XMM12
MOVSD qword ptr [RSP + 0x28],XMM11
MOV dword ptr [RSP + 0x20],EDX
MOVSD qword ptr [RSP + 0x18],XMM10
MOVSD qword ptr [RSP + 0x10],XMM9
MOVSD qword ptr [RSP + 0x8],XMM8
MOV dword ptr [RSP],EAX
LEA RDX,[0x21d6c8]
LEA R14,[RSP + 0x40]
MOV ESI,0x400
MOV RDI,R14
MOV AL,0x8
CALL 0x0011e3e0
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
MOV RDI,R14
CALL 0x0011d4f0
LEA RDX,[RSP + RAX*0x1]
ADD RDX,0x40
MOV RDI,RBX
MOV RSI,R14
CALL 0x0012630c
MOV RAX,RBX
ADD RSP,0x448
POP RBX
POP R14
RET
|
/* common_params_sampling::print[abi:cxx11]() const */
void common_params_sampling::print_abi_cxx11_(void)
{
long in_RSI;
long *in_RDI;
char local_418 [1032];
snprintf(local_418,0x400,
"\trepeat_last_n = %d, repeat_penalty = %.3f, frequency_penalty = %.3f, presence_penalty = %.3f\n\tdry_multiplier = %.3f, dry_base = %.3f, dry_allowed_length = %d, dry_penalty_last_n = %d\n\ttop_k = %d, top_p = %.3f, min_p = %.3f, xtc_probability = %.3f, xtc_threshold = %.3f, typical_p = %.3f, temp = %.3f\n\tmirostat = %d, mirostat_lr = %.3f, mirostat_ent = %.3f"
,(double)*(float *)(in_RSI + 0x38),(double)*(float *)(in_RSI + 0x3c),
(double)*(float *)(in_RSI + 0x40),(double)*(float *)(in_RSI + 0x44),
(double)*(float *)(in_RSI + 0x48),(double)*(float *)(in_RSI + 0x14),
(double)*(float *)(in_RSI + 0x18),(double)*(float *)(in_RSI + 0x1c),
(ulong)*(uint *)(in_RSI + 0x34),(ulong)*(uint *)(in_RSI + 0x4c),
(ulong)*(uint *)(in_RSI + 0x50),*(int4 *)(in_RSI + 0x10),
(double)*(float *)(in_RSI + 0x20),(double)*(float *)(in_RSI + 0x24),
(double)*(float *)(in_RSI + 0x28),*(int4 *)(in_RSI + 0x54),
(double)*(float *)(in_RSI + 0x5c),(double)*(float *)(in_RSI + 0x58));
*in_RDI = (long)(in_RDI + 2);
strlen(local_418);
std::__cxx11::string::_M_construct<char_const*>();
return;
}
| |
21,285 | nlohmann::json_abi_v3_11_3::detail::type_error nlohmann::json_abi_v3_11_3::detail::type_error::create<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*) | monkey531[P]llama/common/./json.hpp | static type_error create(int id_, const std::string& what_arg, BasicJsonContext context)
{
const std::string w = concat(exception::name("type_error", id_), exception::diagnostics(context), what_arg);
return {id_, w.c_str()};
} | O1 | cpp | nlohmann::json_abi_v3_11_3::detail::type_error nlohmann::json_abi_v3_11_3::detail::type_error::create<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x8a4a4(%rip), %rsi # 0xb3dcf
leaq 0x8a4a7(%rip), %rdx # 0xb3dd9
leaq 0x28(%rsp), %rdi
callq 0x20c8e
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl %ebp, %edx
callq 0x2396c
leaq 0x78(%rsp), %r14
movq %r14, -0x10(%r14)
xorl %eax, %eax
movq %rax, -0x8(%r14)
movb %al, (%r14)
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
movq 0x8(%r15), %rsi
addq 0x50(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x19c60
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0x19210
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0x19210
movq (%r15), %rsi
movq 0x8(%r15), %rdx
leaq 0x8(%rsp), %rdi
callq 0x19210
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x299d5
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x197a0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x299f0
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x197a0
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x29a07
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x197a0
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x23bd4
leaq 0xbf4ab(%rip), %rax # 0xe8ec8
movq %rax, (%rbx)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x29a37
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x197a0
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x29ac5
movq 0x18(%rsp), %rsi
jmp 0x29abd
movq %rax, %rbx
jmp 0x29aae
movq %rax, %rbx
jmp 0x29ac5
movq %rdx, %rbx
movq %rax, %r15
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x29a87
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x197a0
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rdx
leaq 0x88(%rsp), %r12
movq %r14, %rsi
movq %r15, %rcx
movl %ebx, %r8d
movq %r12, %r9
callq 0x1a43b
movq (%r12), %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x29ac5
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x197a0
movq %rbx, %rdi
callq 0x19e00
| _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov r15, rdx
mov ebp, esi
mov rbx, rdi
lea r13, [rsp+0C8h+var_90]
mov [r13-10h], r13
lea rsi, aTypeError; "type_error"
lea rdx, aTypeError+0Ah; ""
lea rdi, [rsp+0C8h+var_A0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rsp+0C8h+var_80]; int
lea rsi, [rsp+0C8h+var_A0]; int
mov edx, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int)
lea r14, [rsp+0C8h+var_50]
mov [r14-10h], r14
xor eax, eax
mov [r14-8], rax
mov [r14], al
lea r12, [rsp+0C8h+var_B0]
mov [r12-10h], r12
mov [r12-8], rax
mov [r12], al
mov rsi, [r15+8]
add rsi, [rsp+0C8h+var_78]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rsi, qword ptr [rsp+0C8h+var_80]
mov rdx, [rsp+0C8h+var_78]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rsi, [rsp+0C8h+var_60]
mov rdx, [rsp+0C8h+var_58]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rsi, [r15]
mov rdx, [r15+8]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+0C8h+var_60]; void *
cmp rdi, r14
jz short loc_299D5
mov rsi, [rsp+0C8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_299D5:
lea rax, [rsp+0C8h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_299F0
mov rsi, [rsp+0C8h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_299F0:
mov rdi, [rsp+0C8h+var_A0]; void *
cmp rdi, r13
jz short loc_29A07
mov rsi, [rsp+0C8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_29A07:
mov rdx, [rsp+0C8h+var_C0]; char *
mov rdi, rbx; this
mov esi, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail9exceptionC2EiPKc; nlohmann::json_abi_v3_11_3::detail::exception::exception(int,char const*)
lea rax, off_E8EC8
mov [rbx], rax
mov rdi, [rsp+0C8h+var_C0]; void *
cmp rdi, r12
jz short loc_29A37
mov rsi, [rsp+0C8h+var_B0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_29A37:
mov rax, rbx
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_0]
cmp rdi, r12
jz short loc_29AC5
mov rsi, [rsp+arg_10]
jmp short loc_29ABD
mov rbx, rax
jmp short loc_29AAE
mov rbx, rax
jmp short loc_29AC5
mov rbx, rdx
mov r15, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_29A87
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_29A87:
lea rdi, [rsp+arg_60]
lea rdx, [rsp+arg_40]
lea r12, [rsp+arg_80]
mov rsi, r14
mov rcx, r15
mov r8d, ebx
mov r9, r12
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK__cold_1
mov rbx, [r12]
loc_29AAE:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r13
jz short loc_29AC5
mov rsi, [rsp+arg_30]
loc_29ABD:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_29AC5:
mov rdi, rbx
call __Unwind_Resume
| nlohmann::json_abi_v3_11_3::detail::exception * ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
nlohmann::json_abi_v3_11_3::detail::exception *this,
int a2,
_QWORD *a3)
{
char *v5[2]; // [rsp+8h] [rbp-C0h] BYREF
_QWORD v6[2]; // [rsp+18h] [rbp-B0h] BYREF
void *v7[2]; // [rsp+28h] [rbp-A0h] BYREF
_QWORD v8[2]; // [rsp+38h] [rbp-90h] BYREF
int v9[2]; // [rsp+48h] [rbp-80h] BYREF
long long v10; // [rsp+50h] [rbp-78h]
long long v11; // [rsp+58h] [rbp-70h] BYREF
void *v12; // [rsp+68h] [rbp-60h]
long long v13; // [rsp+70h] [rbp-58h]
_QWORD v14[10]; // [rsp+78h] [rbp-50h] BYREF
v7[0] = v8;
std::string::_M_construct<char const*>(v7, "type_error", (long long)"");
nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v9, (long long)v7, a2);
v12 = v14;
v13 = 0LL;
LOBYTE(v14[0]) = 0;
v5[0] = (char *)v6;
v5[1] = 0LL;
LOBYTE(v6[0]) = 0;
std::string::reserve(v5, v10 + a3[1]);
std::string::_M_append(v5, *(_QWORD *)v9, v10);
std::string::_M_append(v5, v12, v13);
std::string::_M_append(v5, *a3, a3[1]);
if ( v12 != v14 )
operator delete(v12, v14[0] + 1LL);
if ( *(long long **)v9 != &v11 )
operator delete(*(void **)v9, v11 + 1);
if ( v7[0] != v8 )
operator delete(v7[0], v8[0] + 1LL);
nlohmann::json_abi_v3_11_3::detail::exception::exception(this, a2, v5[0]);
*(_QWORD *)this = off_E8EC8;
if ( (_QWORD *)v5[0] != v6 )
operator delete(v5[0], v6[0] + 1LL);
return this;
}
| _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV R15,RDX
MOV EBP,ESI
MOV RBX,RDI
LEA R13,[RSP + 0x38]
MOV qword ptr [R13 + -0x10],R13
LAB_00129924:
LEA RSI,[0x1b3dcf]
LEA RDX,[0x1b3dd9]
LEA RDI,[RSP + 0x28]
CALL 0x00120c8e
LAB_0012993c:
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x28]
MOV EDX,EBP
CALL 0x0012396c
LEA R14,[RSP + 0x78]
MOV qword ptr [R14 + -0x10],R14
XOR EAX,EAX
MOV qword ptr [R14 + -0x8],RAX
MOV byte ptr [R14],AL
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
MOV qword ptr [R12 + -0x8],RAX
MOV byte ptr [R12],AL
MOV RSI,qword ptr [R15 + 0x8]
ADD RSI,qword ptr [RSP + 0x50]
LAB_0012997b:
LEA RDI,[RSP + 0x8]
CALL 0x00119c60
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
LEA RDI,[RSP + 0x8]
CALL 0x00119210
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
LEA RDI,[RSP + 0x8]
CALL 0x00119210
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
LEA RDI,[RSP + 0x8]
CALL 0x00119210
MOV RDI,qword ptr [RSP + 0x68]
CMP RDI,R14
JZ 0x001299d5
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x001197a0
LAB_001299d5:
LEA RAX,[RSP + 0x58]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001299f0
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x001197a0
LAB_001299f0:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R13
JZ 0x00129a07
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x001197a0
LAB_00129a07:
MOV RDX,qword ptr [RSP + 0x8]
LAB_00129a0c:
MOV RDI,RBX
MOV ESI,EBP
CALL 0x00123bd4
LAB_00129a16:
LEA RAX,[0x1e8ec8]
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x00129a37
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001197a0
LAB_00129a37:
MOV RAX,RBX
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
exception *
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(exception *param_1,int param_2,ulong *param_3)
{
char *local_c0;
int8 local_b8;
char local_b0;
int7 uStack_af;
long *local_a0 [2];
long local_90 [2];
long *local_80 [2];
long local_70 [2];
int1 *local_60;
int8 local_58;
int1 local_50;
int7 uStack_4f;
/* try { // try from 00129924 to 0012993b has its CatchHandler @ 00129a65 */
local_a0[0] = local_90;
std::__cxx11::string::_M_construct<char_const*>(local_a0,"type_error","");
/* try { // try from 0012993c to 0012994c has its CatchHandler @ 00129a60 */
nlohmann::json_abi_v3_11_3::detail::exception::name
((exception *)local_80,(string *)local_a0,param_2);
local_58 = 0;
local_50 = 0;
local_b8 = 0;
local_b0 = '\0';
/* try { // try from 0012997b to 001299bd has its CatchHandler @ 00129a6a */
local_c0 = &local_b0;
local_60 = &local_50;
std::__cxx11::string::reserve((ulong)&local_c0);
std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_80[0]);
std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_60);
std::__cxx11::string::_M_append((char *)&local_c0,*param_3);
if (local_60 != &local_50) {
operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1);
}
if (local_80[0] != local_70) {
operator_delete(local_80[0],local_70[0] + 1);
}
if (local_a0[0] != local_90) {
operator_delete(local_a0[0],local_90[0] + 1);
}
/* try { // try from 00129a0c to 00129a15 has its CatchHandler @ 00129a4c */
nlohmann::json_abi_v3_11_3::detail::exception::exception(param_1,param_2,local_c0);
*(int ***)param_1 = &PTR__exception_001e8ec8;
if (local_c0 != &local_b0) {
operator_delete(local_c0,CONCAT71(uStack_af,local_b0) + 1);
}
return param_1;
}
| |
21,286 | nlohmann::json_abi_v3_11_3::detail::type_error nlohmann::json_abi_v3_11_3::detail::type_error::create<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*) | monkey531[P]llama/common/./json.hpp | static type_error create(int id_, const std::string& what_arg, BasicJsonContext context)
{
const std::string w = concat(exception::name("type_error", id_), exception::diagnostics(context), what_arg);
return {id_, w.c_str()};
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::type_error nlohmann::json_abi_v3_11_3::detail::type_error::create<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x875f9(%rip), %rsi # 0xb0c76
leaq 0x875fc(%rip), %rdx # 0xb0c80
leaq 0x28(%rsp), %rdi
callq 0x20bbe
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl %ebp, %edx
callq 0x237a8
leaq 0x78(%rsp), %r14
movq %r14, -0x10(%r14)
xorl %eax, %eax
movq %rax, -0x8(%r14)
movb %al, (%r14)
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
movq 0x8(%r15), %rsi
addq 0x50(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x19c70
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0x19210
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0x19210
movq (%r15), %rsi
movq 0x8(%r15), %rdx
leaq 0x8(%rsp), %rdi
callq 0x19210
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x29727
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x197b0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x29742
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x197b0
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x29759
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x197b0
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x23a10
leaq 0xbc799(%rip), %rax # 0xe5f08
movq %rax, (%rbx)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x29789
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x197b0
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x29817
movq 0x18(%rsp), %rsi
jmp 0x2980f
movq %rax, %rbx
jmp 0x29800
movq %rax, %rbx
jmp 0x29817
movq %rdx, %rbx
movq %rax, %r15
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x297d9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x197b0
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rdx
leaq 0x88(%rsp), %r12
movq %r14, %rsi
movq %r15, %rcx
movl %ebx, %r8d
movq %r12, %r9
callq 0x1a44b
movq (%r12), %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x29817
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x197b0
movq %rbx, %rdi
callq 0x19e10
| _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov r15, rdx
mov ebp, esi
mov rbx, rdi
lea r13, [rsp+0C8h+var_90]
mov [r13-10h], r13
lea rsi, aTypeError; "type_error"
lea rdx, aTypeError+0Ah; ""
lea rdi, [rsp+0C8h+var_A0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rsp+0C8h+var_80]; int
lea rsi, [rsp+0C8h+var_A0]; int
mov edx, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int)
lea r14, [rsp+0C8h+var_50]
mov [r14-10h], r14
xor eax, eax
mov [r14-8], rax
mov [r14], al
lea r12, [rsp+0C8h+var_B0]
mov [r12-10h], r12
mov [r12-8], rax
mov [r12], al
mov rsi, [r15+8]
add rsi, [rsp+0C8h+var_78]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rsi, qword ptr [rsp+0C8h+var_80]
mov rdx, [rsp+0C8h+var_78]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rsi, [rsp+0C8h+var_60]
mov rdx, [rsp+0C8h+var_58]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rsi, [r15]
mov rdx, [r15+8]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+0C8h+var_60]; void *
cmp rdi, r14
jz short loc_29727
mov rsi, [rsp+0C8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_29727:
lea rax, [rsp+0C8h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_29742
mov rsi, [rsp+0C8h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_29742:
mov rdi, [rsp+0C8h+var_A0]; void *
cmp rdi, r13
jz short loc_29759
mov rsi, [rsp+0C8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_29759:
mov rdx, [rsp+0C8h+var_C0]; char *
mov rdi, rbx; this
mov esi, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail9exceptionC2EiPKc; nlohmann::json_abi_v3_11_3::detail::exception::exception(int,char const*)
lea rax, off_E5F08
mov [rbx], rax
mov rdi, [rsp+0C8h+var_C0]; void *
cmp rdi, r12
jz short loc_29789
mov rsi, [rsp+0C8h+var_B0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_29789:
mov rax, rbx
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_0]
cmp rdi, r12
jz short loc_29817
mov rsi, [rsp+arg_10]
jmp short loc_2980F
mov rbx, rax
jmp short loc_29800
mov rbx, rax
jmp short loc_29817
mov rbx, rdx
mov r15, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_297D9
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_297D9:
lea rdi, [rsp+arg_60]
lea rdx, [rsp+arg_40]
lea r12, [rsp+arg_80]
mov rsi, r14
mov rcx, r15
mov r8d, ebx
mov r9, r12
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK__cold_1
mov rbx, [r12]
loc_29800:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r13
jz short loc_29817
mov rsi, [rsp+arg_30]
loc_2980F:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_29817:
mov rdi, rbx
call __Unwind_Resume
| nlohmann::json_abi_v3_11_3::detail::exception * ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
nlohmann::json_abi_v3_11_3::detail::exception *this,
int a2,
_QWORD *a3)
{
char *v5[2]; // [rsp+8h] [rbp-C0h] BYREF
_QWORD v6[2]; // [rsp+18h] [rbp-B0h] BYREF
void *v7[2]; // [rsp+28h] [rbp-A0h] BYREF
_QWORD v8[2]; // [rsp+38h] [rbp-90h] BYREF
int v9[2]; // [rsp+48h] [rbp-80h] BYREF
long long v10; // [rsp+50h] [rbp-78h]
long long v11; // [rsp+58h] [rbp-70h] BYREF
void *v12; // [rsp+68h] [rbp-60h]
long long v13; // [rsp+70h] [rbp-58h]
_QWORD v14[10]; // [rsp+78h] [rbp-50h] BYREF
v7[0] = v8;
std::string::_M_construct<char const*>((long long)v7, "type_error", (long long)"");
nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v9, (long long)v7, a2);
v12 = v14;
v13 = 0LL;
LOBYTE(v14[0]) = 0;
v5[0] = (char *)v6;
v5[1] = 0LL;
LOBYTE(v6[0]) = 0;
std::string::reserve(v5, v10 + a3[1]);
std::string::_M_append(v5, *(_QWORD *)v9, v10);
std::string::_M_append(v5, v12, v13);
std::string::_M_append(v5, *a3, a3[1]);
if ( v12 != v14 )
operator delete(v12, v14[0] + 1LL);
if ( *(long long **)v9 != &v11 )
operator delete(*(void **)v9, v11 + 1);
if ( v7[0] != v8 )
operator delete(v7[0], v8[0] + 1LL);
nlohmann::json_abi_v3_11_3::detail::exception::exception(this, a2, v5[0]);
*(_QWORD *)this = off_E5F08;
if ( (_QWORD *)v5[0] != v6 )
operator delete(v5[0], v6[0] + 1LL);
return this;
}
| _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV R15,RDX
MOV EBP,ESI
MOV RBX,RDI
LEA R13,[RSP + 0x38]
MOV qword ptr [R13 + -0x10],R13
LAB_00129676:
LEA RSI,[0x1b0c76]
LEA RDX,[0x1b0c80]
LEA RDI,[RSP + 0x28]
CALL 0x00120bbe
LAB_0012968e:
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x28]
MOV EDX,EBP
CALL 0x001237a8
LEA R14,[RSP + 0x78]
MOV qword ptr [R14 + -0x10],R14
XOR EAX,EAX
MOV qword ptr [R14 + -0x8],RAX
MOV byte ptr [R14],AL
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
MOV qword ptr [R12 + -0x8],RAX
MOV byte ptr [R12],AL
MOV RSI,qword ptr [R15 + 0x8]
ADD RSI,qword ptr [RSP + 0x50]
LAB_001296cd:
LEA RDI,[RSP + 0x8]
CALL 0x00119c70
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
LEA RDI,[RSP + 0x8]
CALL 0x00119210
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
LEA RDI,[RSP + 0x8]
CALL 0x00119210
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
LEA RDI,[RSP + 0x8]
CALL 0x00119210
MOV RDI,qword ptr [RSP + 0x68]
CMP RDI,R14
JZ 0x00129727
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x001197b0
LAB_00129727:
LEA RAX,[RSP + 0x58]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00129742
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x001197b0
LAB_00129742:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R13
JZ 0x00129759
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x001197b0
LAB_00129759:
MOV RDX,qword ptr [RSP + 0x8]
LAB_0012975e:
MOV RDI,RBX
MOV ESI,EBP
CALL 0x00123a10
LAB_00129768:
LEA RAX,[0x1e5f08]
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x00129789
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001197b0
LAB_00129789:
MOV RAX,RBX
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
exception *
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(exception *param_1,int param_2,ulong *param_3)
{
char *local_c0;
int8 local_b8;
char local_b0;
int7 uStack_af;
long *local_a0 [2];
long local_90 [2];
long *local_80 [2];
long local_70 [2];
int1 *local_60;
int8 local_58;
int1 local_50;
int7 uStack_4f;
/* try { // try from 00129676 to 0012968d has its CatchHandler @ 001297b7 */
local_a0[0] = local_90;
std::__cxx11::string::_M_construct<char_const*>(local_a0,"type_error","");
/* try { // try from 0012968e to 0012969e has its CatchHandler @ 001297b2 */
nlohmann::json_abi_v3_11_3::detail::exception::name
((exception *)local_80,(string *)local_a0,param_2);
local_58 = 0;
local_50 = 0;
local_b8 = 0;
local_b0 = '\0';
/* try { // try from 001296cd to 0012970f has its CatchHandler @ 001297bc */
local_c0 = &local_b0;
local_60 = &local_50;
std::__cxx11::string::reserve((ulong)&local_c0);
std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_80[0]);
std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_60);
std::__cxx11::string::_M_append((char *)&local_c0,*param_3);
if (local_60 != &local_50) {
operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1);
}
if (local_80[0] != local_70) {
operator_delete(local_80[0],local_70[0] + 1);
}
if (local_a0[0] != local_90) {
operator_delete(local_a0[0],local_90[0] + 1);
}
/* try { // try from 0012975e to 00129767 has its CatchHandler @ 0012979e */
nlohmann::json_abi_v3_11_3::detail::exception::exception(param_1,param_2,local_c0);
*(int ***)param_1 = &PTR__exception_001e5f08;
if (local_c0 != &local_b0) {
operator_delete(local_c0,CONCAT71(uStack_af,local_b0) + 1);
}
return param_1;
}
| |
21,287 | my_coll_parser_scan_shift_sequence | eloqsql/strings/ctype-uca.c | static int
my_coll_parser_scan_shift_sequence(MY_COLL_RULE_PARSER *p)
{
MY_COLL_RULE before_extend;
memset(&p->rule.curr, 0, sizeof(p->rule.curr));
/* Scan single shift character or contraction */
if (!my_coll_parser_scan_character_list(p, p->rule.curr,
MY_UCA_MAX_CONTRACTION,
"Contraction"))
return 0;
before_extend= p->rule; /* Remember the part before "/" */
/* Append the part after "/" as expansion */
if (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_EXTEND)
{
my_coll_parser_scan(p);
if (!my_coll_parser_scan_character_list(p, p->rule.base,
MY_UCA_MAX_EXPANSION,
"Expansion"))
return 0;
}
else if (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_CONTEXT)
{
/*
We support 2-character long context sequences only:
one character is the previous context, plus the current character.
It's OK as Unicode's CLDR does not have longer examples.
*/
my_coll_parser_scan(p);
p->rule.with_context= TRUE;
if (!my_coll_parser_scan_character_list(p, p->rule.curr + 1, 1, "context"))
return 0;
}
/* Add rule to the rule list */
if (my_coll_rules_add(p->rules, &p->rule))
return 0;
p->rule= before_extend; /* Restore to the state before "/" */
return 1;
} | O0 | c | my_coll_parser_scan_shift_sequence:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
addq $0x50, %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x25180
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x50, %rsi
addq $0x50, %rsi
movl $0x6, %edx
leaq 0x3c850(%rip), %rcx # 0x7ef13
callq 0x42cb0
cmpl $0x0, %eax
jne 0x426d9
movl $0x0, -0x4(%rbp)
jmp 0x427d8
movq -0x10(%rbp), %rsi
addq $0x50, %rsi
leaq -0xb0(%rbp), %rdi
movl $0xa0, %edx
callq 0x25220
movq -0x10(%rbp), %rdi
callq 0x41cf0
cmpl $0x8, (%rax)
jne 0x42739
movq -0x10(%rbp), %rdi
callq 0x424d0
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x50, %rsi
movl $0xa, %edx
leaq 0x3c71b(%rip), %rcx # 0x7ee3c
callq 0x42cb0
cmpl $0x0, %eax
jne 0x42737
movl $0x0, -0x4(%rbp)
jmp 0x427d8
jmp 0x42792
movq -0x10(%rbp), %rdi
callq 0x41cf0
cmpl $0x9, (%rax)
jne 0x42790
movq -0x10(%rbp), %rdi
callq 0x424d0
movq -0x10(%rbp), %rax
movb $0x1, 0xe8(%rax)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x50, %rsi
addq $0x50, %rsi
addq $0x8, %rsi
movl $0x1, %edx
leaq 0x3b397(%rip), %rcx # 0x7db12
callq 0x42cb0
cmpl $0x0, %eax
jne 0x4278e
movl $0x0, -0x4(%rbp)
jmp 0x427d8
jmp 0x42790
jmp 0x42792
movq -0x10(%rbp), %rax
movq 0xf0(%rax), %rdi
movq -0x10(%rbp), %rsi
addq $0x50, %rsi
callq 0x43000
cmpl $0x0, %eax
je 0x427b8
movl $0x0, -0x4(%rbp)
jmp 0x427d8
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
leaq -0xb0(%rbp), %rsi
movl $0xa0, %edx
callq 0x25220
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_coll_parser_scan_shift_sequence:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov [rbp+var_10], rdi
mov rdi, [rbp+var_10]
add rdi, 50h ; 'P'
add rdi, 50h ; 'P'
xor esi, esi
mov edx, 30h ; '0'
call _memset
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_10]
add rsi, 50h ; 'P'
add rsi, 50h ; 'P'
mov edx, 6
lea rcx, aContraction; "Contraction"
call my_coll_parser_scan_character_list
cmp eax, 0
jnz short loc_426D9
mov [rbp+var_4], 0
jmp loc_427D8
loc_426D9:
mov rsi, [rbp+var_10]
add rsi, 50h ; 'P'
lea rdi, [rbp+var_B0]
mov edx, 0A0h
call _memcpy
mov rdi, [rbp+var_10]
call my_coll_parser_curr
cmp dword ptr [rax], 8
jnz short loc_42739
mov rdi, [rbp+var_10]
call my_coll_parser_scan
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_10]
add rsi, 50h ; 'P'
mov edx, 0Ah
lea rcx, aExpansion; "Expansion"
call my_coll_parser_scan_character_list
cmp eax, 0
jnz short loc_42737
mov [rbp+var_4], 0
jmp loc_427D8
loc_42737:
jmp short loc_42792
loc_42739:
mov rdi, [rbp+var_10]
call my_coll_parser_curr
cmp dword ptr [rax], 9
jnz short loc_42790
mov rdi, [rbp+var_10]
call my_coll_parser_scan
mov rax, [rbp+var_10]
mov byte ptr [rax+0E8h], 1
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_10]
add rsi, 50h ; 'P'
add rsi, 50h ; 'P'
add rsi, 8
mov edx, 1
lea rcx, aCharsetsCharse_52+23h; "context"
call my_coll_parser_scan_character_list
cmp eax, 0
jnz short loc_4278E
mov [rbp+var_4], 0
jmp short loc_427D8
loc_4278E:
jmp short $+2
loc_42790:
jmp short $+2
loc_42792:
mov rax, [rbp+var_10]
mov rdi, [rax+0F0h]
mov rsi, [rbp+var_10]
add rsi, 50h ; 'P'
call my_coll_rules_add
cmp eax, 0
jz short loc_427B8
mov [rbp+var_4], 0
jmp short loc_427D8
loc_427B8:
mov rdi, [rbp+var_10]
add rdi, 50h ; 'P'
lea rsi, [rbp+var_B0]
mov edx, 0A0h
call _memcpy
mov [rbp+var_4], 1
loc_427D8:
mov eax, [rbp+var_4]
add rsp, 0B0h
pop rbp
retn
| long long my_coll_parser_scan_shift_sequence(long long a1)
{
_BYTE v2[160]; // [rsp+0h] [rbp-B0h] BYREF
long long v3; // [rsp+A0h] [rbp-10h]
v3 = a1;
memset(a1 + 160, 0LL, 48LL);
if ( (unsigned int)my_coll_parser_scan_character_list(v3, v3 + 160, 6LL, "Contraction") )
{
memcpy(v2, v3 + 80, sizeof(v2));
if ( *(_DWORD *)my_coll_parser_curr(v3) == 8 )
{
my_coll_parser_scan(v3);
if ( !(unsigned int)my_coll_parser_scan_character_list(v3, v3 + 80, 10LL, "Expansion") )
return 0;
}
else if ( *(_DWORD *)my_coll_parser_curr(v3) == 9 )
{
my_coll_parser_scan(v3);
*(_BYTE *)(v3 + 232) = 1;
if ( !(unsigned int)my_coll_parser_scan_character_list(v3, v3 + 168, 1LL, "context") )
return 0;
}
if ( (unsigned int)my_coll_rules_add(*(_QWORD *)(v3 + 240), v3 + 80) )
{
return 0;
}
else
{
memcpy(v3 + 80, v2, 160LL);
return 1;
}
}
else
{
return 0;
}
}
| my_coll_parser_scan_shift_sequence:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV qword ptr [RBP + -0x10],RDI
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x50
ADD RDI,0x50
XOR ESI,ESI
MOV EDX,0x30
CALL 0x00125180
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x50
ADD RSI,0x50
MOV EDX,0x6
LEA RCX,[0x17ef13]
CALL 0x00142cb0
CMP EAX,0x0
JNZ 0x001426d9
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001427d8
LAB_001426d9:
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x50
LEA RDI,[RBP + -0xb0]
MOV EDX,0xa0
CALL 0x00125220
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00141cf0
CMP dword ptr [RAX],0x8
JNZ 0x00142739
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001424d0
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x50
MOV EDX,0xa
LEA RCX,[0x17ee3c]
CALL 0x00142cb0
CMP EAX,0x0
JNZ 0x00142737
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001427d8
LAB_00142737:
JMP 0x00142792
LAB_00142739:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00141cf0
CMP dword ptr [RAX],0x9
JNZ 0x00142790
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001424d0
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0xe8],0x1
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x50
ADD RSI,0x50
ADD RSI,0x8
MOV EDX,0x1
LEA RCX,[0x17db12]
CALL 0x00142cb0
CMP EAX,0x0
JNZ 0x0014278e
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001427d8
LAB_0014278e:
JMP 0x00142790
LAB_00142790:
JMP 0x00142792
LAB_00142792:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0xf0]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x50
CALL 0x00143000
CMP EAX,0x0
JZ 0x001427b8
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001427d8
LAB_001427b8:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x50
LEA RSI,[RBP + -0xb0]
MOV EDX,0xa0
CALL 0x00125220
MOV dword ptr [RBP + -0x4],0x1
LAB_001427d8:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0xb0
POP RBP
RET
|
int4 my_coll_parser_scan_shift_sequence(long param_1)
{
int iVar1;
int *piVar2;
int1 local_b8 [160];
long local_18;
int4 local_c;
local_18 = param_1;
memset((void *)(param_1 + 0xa0),0,0x30);
iVar1 = my_coll_parser_scan_character_list(local_18,local_18 + 0xa0,6,"Contraction");
if (iVar1 == 0) {
local_c = 0;
}
else {
memcpy(local_b8,(void *)(local_18 + 0x50),0xa0);
piVar2 = (int *)my_coll_parser_curr(local_18);
if (*piVar2 == 8) {
my_coll_parser_scan(local_18);
iVar1 = my_coll_parser_scan_character_list(local_18,local_18 + 0x50,10,"Expansion");
if (iVar1 == 0) {
return 0;
}
}
else {
piVar2 = (int *)my_coll_parser_curr(local_18);
if (*piVar2 == 9) {
my_coll_parser_scan(local_18);
*(int1 *)(local_18 + 0xe8) = 1;
iVar1 = my_coll_parser_scan_character_list(local_18,local_18 + 0xa8,1,"context");
if (iVar1 == 0) {
return 0;
}
}
}
iVar1 = my_coll_rules_add(*(int8 *)(local_18 + 0xf0),local_18 + 0x50);
if (iVar1 == 0) {
memcpy((void *)(local_18 + 0x50),local_b8,0xa0);
local_c = 1;
}
else {
local_c = 0;
}
}
return local_c;
}
| |
21,288 | ftxui::string_width(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/screen/string.cpp | int string_width(const std::string& input) {
int width = 0;
size_t start = 0;
while (start < input.size()) {
uint32_t codepoint = 0;
if (!EatCodePoint(input, start, &start, &codepoint)) {
continue;
}
if (IsControl(codepoint)) {
continue;
}
if (IsCombining(codepoint)) {
continue;
}
if (IsFullWidth(codepoint)) {
width += 2;
continue;
}
width += 1;
}
return width;
} | O0 | cpp | ftxui::string_width(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0xd3c0
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
jae 0x8d841
movl $0x0, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x18(%rbp), %rdx
leaq -0x1c(%rbp), %rcx
callq 0x8cf10
testb $0x1, %al
jne 0x8d7fa
jmp 0x8d7bb
movl -0x1c(%rbp), %edi
callq 0x8d4d0
testb $0x1, %al
jne 0x8d808
jmp 0x8d80a
jmp 0x8d7bb
movl -0x1c(%rbp), %edi
callq 0x8d2a0
testb $0x1, %al
jne 0x8d818
jmp 0x8d81a
jmp 0x8d7bb
movl -0x1c(%rbp), %edi
callq 0x8d3b0
testb $0x1, %al
jne 0x8d828
jmp 0x8d833
movl -0xc(%rbp), %eax
addl $0x2, %eax
movl %eax, -0xc(%rbp)
jmp 0x8d7bb
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x8d7bb
movl -0xc(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _ZN5ftxui12string_widthERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_C], 0
mov [rbp+var_1C+4], 0
loc_8D7BB:
mov rax, [rbp+var_1C+4]
mov [rbp+var_28], rax
mov rdi, [rbp+var_8]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rcx, rax
mov rax, [rbp+var_28]
cmp rax, rcx
jnb short loc_8D841
mov dword ptr [rbp+var_1C], 0
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_1C+4]; unsigned int
lea rdx, [rbp+var_1C+4]
lea rcx, [rbp+var_1C]
call _ZN5ftxui12EatCodePointERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmPmPj; ftxui::EatCodePoint(std::string const&,ulong,ulong *,uint *)
test al, 1
jnz short loc_8D7FA
jmp short loc_8D7BB
loc_8D7FA:
mov edi, dword ptr [rbp+var_1C]; this
call _ZN5ftxui9IsControlEj; ftxui::IsControl(uint)
test al, 1
jnz short loc_8D808
jmp short loc_8D80A
loc_8D808:
jmp short loc_8D7BB
loc_8D80A:
mov edi, dword ptr [rbp+var_1C]; this
call _ZN5ftxui11IsCombiningEj; ftxui::IsCombining(uint)
test al, 1
jnz short loc_8D818
jmp short loc_8D81A
loc_8D818:
jmp short loc_8D7BB
loc_8D81A:
mov edi, dword ptr [rbp+var_1C]; this
call _ZN5ftxui11IsFullWidthEj; ftxui::IsFullWidth(uint)
test al, 1
jnz short loc_8D828
jmp short loc_8D833
loc_8D828:
mov eax, [rbp+var_C]
add eax, 2
mov [rbp+var_C], eax
jmp short loc_8D7BB
loc_8D833:
mov eax, [rbp+var_C]
add eax, 1
mov [rbp+var_C], eax
jmp loc_8D7BB
loc_8D841:
mov eax, [rbp+var_C]
add rsp, 30h
pop rbp
retn
| long long ftxui::string_width(long long a1)
{
unsigned long long v2; // [rsp+8h] [rbp-28h]
unsigned int v3[4]; // [rsp+14h] [rbp-1Ch] BYREF
unsigned int v4; // [rsp+24h] [rbp-Ch]
long long v5; // [rsp+28h] [rbp-8h]
v5 = a1;
v4 = 0;
*(_QWORD *)&v3[1] = 0LL;
while ( 1 )
{
v2 = *(_QWORD *)&v3[1];
if ( v2 >= std::string::size(v5) )
break;
v3[0] = 0;
if ( (ftxui::EatCodePoint(v5, *(unsigned long long *)&v3[1], &v3[1], (int *)v3) & 1) != 0
&& (ftxui::IsControl((ftxui *)v3[0]) & 1) == 0
&& (ftxui::IsCombining((ftxui *)v3[0]) & 1) == 0 )
{
if ( (ftxui::IsFullWidth((ftxui *)v3[0]) & 1) != 0 )
v4 += 2;
else
++v4;
}
}
return v4;
}
| string_width:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],0x0
MOV qword ptr [RBP + -0x18],0x0
LAB_0018d7bb:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0010d3c0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,RCX
JNC 0x0018d841
MOV dword ptr [RBP + -0x1c],0x0
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
LEA RDX,[RBP + -0x18]
LEA RCX,[RBP + -0x1c]
CALL 0x0018cf10
TEST AL,0x1
JNZ 0x0018d7fa
JMP 0x0018d7bb
LAB_0018d7fa:
MOV EDI,dword ptr [RBP + -0x1c]
CALL 0x0018d4d0
TEST AL,0x1
JNZ 0x0018d808
JMP 0x0018d80a
LAB_0018d808:
JMP 0x0018d7bb
LAB_0018d80a:
MOV EDI,dword ptr [RBP + -0x1c]
CALL 0x0018d2a0
TEST AL,0x1
JNZ 0x0018d818
JMP 0x0018d81a
LAB_0018d818:
JMP 0x0018d7bb
LAB_0018d81a:
MOV EDI,dword ptr [RBP + -0x1c]
CALL 0x0018d3b0
TEST AL,0x1
JNZ 0x0018d828
JMP 0x0018d833
LAB_0018d828:
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x2
MOV dword ptr [RBP + -0xc],EAX
JMP 0x0018d7bb
LAB_0018d833:
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
JMP 0x0018d7bb
LAB_0018d841:
MOV EAX,dword ptr [RBP + -0xc]
ADD RSP,0x30
POP RBP
RET
|
/* ftxui::string_width(std::__cxx11::string const&) */
int ftxui::string_width(string *param_1)
{
ulong uVar1;
ulong uVar2;
uint local_24;
ulong local_20;
int local_14;
string *local_10;
local_14 = 0;
local_20 = 0;
local_10 = param_1;
while (uVar2 = local_20, uVar1 = std::__cxx11::string::size(), uVar2 < uVar1) {
local_24 = 0;
uVar2 = EatCodePoint(local_10,local_20,&local_20,&local_24);
if ((((uVar2 & 1) != 0) && (uVar2 = IsControl(local_24), (uVar2 & 1) == 0)) &&
(uVar2 = IsCombining(local_24), (uVar2 & 1) == 0)) {
uVar2 = IsFullWidth(local_24);
if ((uVar2 & 1) == 0) {
local_14 = local_14 + 1;
}
else {
local_14 = local_14 + 2;
}
}
}
return local_14;
}
| |
21,289 | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::key(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) | llama.cpp/common/json.hpp | bool key(string_t& val)
{
BasicJsonType k = BasicJsonType(val);
// check callback for key
const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::key, k);
key_keep_stack.push_back(keep);
// add discarded value at given key and store the reference for later
if (keep && ref_stack.back())
{
object_element = &(ref_stack.back()->m_data.m_value.object->operator[](val) = discarded);
}
return true;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::key(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %rdi
callq 0x8a382
movq 0x10(%rbx), %rax
subq 0x8(%rbx), %rax
shrq $0x3, %rax
movl %eax, 0xc(%rsp)
movb $0x4, 0xb(%rsp)
cmpq $0x0, 0x90(%rbx)
je 0x87cc2
leaq 0x80(%rbx), %rdi
leaq 0xc(%rsp), %rsi
leaq 0xb(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq *0x98(%rbx)
movl %eax, %ebp
leaq 0x48(%rbx), %rdi
movzbl %al, %esi
callq 0x76c06
testb %bpl, %bpl
je 0x87ca0
movq 0x10(%rbx), %rax
cmpq $0x0, -0x8(%rax)
je 0x87ca0
leaq 0xa8(%rbx), %rsi
leaq 0x20(%rsp), %rdi
callq 0x889c4
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rax
movq 0x8(%rax), %rdi
movq %r14, %rsi
callq 0x8a3bc
leaq 0x20(%rsp), %r14
movq %rax, %rdi
movq %r14, %rsi
callq 0x868e2
movq %rax, 0x70(%rbx)
movq %r14, %rdi
xorl %esi, %esi
callq 0x84776
movq %r14, %rdi
callq 0x88e90
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x84776
movq %rbx, %rdi
callq 0x88e90
movb $0x1, %al
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x22280
movq %rax, %rbx
leaq 0x20(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x84776
movq %r14, %rdi
callq 0x88e90
jmp 0x87ce6
movq %rax, %rbx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x84776
movq %r14, %rdi
callq 0x88e90
movq %rbx, %rdi
callq 0x21af0
nop
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyERSB_:
push rbp
push r14
push rbx
sub rsp, 30h
mov r14, rsi
mov rbx, rdi
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_
mov rax, [rbx+10h]
sub rax, [rbx+8]
shr rax, 3
mov [rsp+48h+var_3C], eax
mov [rsp+48h+var_3D], 4
cmp qword ptr [rbx+90h], 0
jz loc_87CC2
lea rdi, [rbx+80h]
lea rsi, [rsp+48h+var_3C]
lea rdx, [rsp+48h+var_3D]
lea rcx, [rsp+48h+var_38]
call qword ptr [rbx+98h]
mov ebp, eax
lea rdi, [rbx+48h]
movzx esi, al
call _ZNSt6vectorIbSaIbEE9push_backEb; std::vector<bool>::push_back(bool)
test bpl, bpl
jz short loc_87CA0
mov rax, [rbx+10h]
cmp qword ptr [rax-8], 0
jz short loc_87CA0
lea rsi, [rbx+0A8h]
lea rdi, [rsp+48h+var_28]
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&)
mov rax, [rbx+10h]
mov rax, [rax-8]
mov rdi, [rax+8]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEEixERSH_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator[](std::string const&)
lea r14, [rsp+48h+var_28]
mov rdi, rax
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; 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=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov [rbx+70h], rax
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()
loc_87CA0:
lea rbx, [rsp+48h+var_38]
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov al, 1
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_87CC2:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
mov rbx, rax
lea r14, [rsp+48h+var_28]
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()
jmp short loc_87CE6
mov rbx, rax
loc_87CE6:
lea r14, [rsp+48h+var_38]
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, rbx
call __Unwind_Resume
| char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::key(
long long a1,
long long a2)
{
unsigned __int8 v2; // bp
long long v3; // rax
char v5; // [rsp+Bh] [rbp-3Dh] BYREF
int v6; // [rsp+Ch] [rbp-3Ch] BYREF
char v7[16]; // [rsp+10h] [rbp-38h] BYREF
char v8[40]; // [rsp+20h] [rbp-28h] BYREF
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_(v7);
v6 = (*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 3;
v5 = 4;
if ( !*(_QWORD *)(a1 + 144) )
std::__throw_bad_function_call();
v2 = (*(long long ( **)(long long, int *, char *, char *))(a1 + 152))(a1 + 128, &v6, &v5, v7);
std::vector<bool>::push_back(a1 + 72, v2);
if ( v2 && *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL) )
{
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(
v8,
a1 + 168);
v3 = nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator[](
*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL) + 8LL),
a2);
*(_QWORD *)(a1 + 112) = 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=(
v3,
(long long)v8);
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(v8);
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(v8);
}
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(v7);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v7);
return 1;
}
| key:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RSI
MOV RBX,RDI
LEA RDI,[RSP + 0x10]
CALL 0x0018a382
MOV RAX,qword ptr [RBX + 0x10]
SUB RAX,qword ptr [RBX + 0x8]
SHR RAX,0x3
MOV dword ptr [RSP + 0xc],EAX
MOV byte ptr [RSP + 0xb],0x4
CMP qword ptr [RBX + 0x90],0x0
JZ 0x00187cc2
LEA RDI,[RBX + 0x80]
LAB_00187c22:
LEA RSI,[RSP + 0xc]
LEA RDX,[RSP + 0xb]
LEA RCX,[RSP + 0x10]
CALL qword ptr [RBX + 0x98]
MOV EBP,EAX
LEA RDI,[RBX + 0x48]
MOVZX ESI,AL
CALL 0x00176c06
TEST BPL,BPL
JZ 0x00187ca0
MOV RAX,qword ptr [RBX + 0x10]
CMP qword ptr [RAX + -0x8],0x0
JZ 0x00187ca0
LEA RSI,[RBX + 0xa8]
LEA RDI,[RSP + 0x20]
CALL 0x001889c4
MOV RAX,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RAX + -0x8]
MOV RDI,qword ptr [RAX + 0x8]
LAB_00187c72:
MOV RSI,R14
CALL 0x0018a3bc
LEA R14,[RSP + 0x20]
MOV RDI,RAX
MOV RSI,R14
CALL 0x001868e2
MOV qword ptr [RBX + 0x70],RAX
MOV RDI,R14
XOR ESI,ESI
CALL 0x00184776
MOV RDI,R14
CALL 0x00188e90
LAB_00187ca0:
LEA RBX,[RSP + 0x10]
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00184776
MOV RDI,RBX
CALL 0x00188e90
MOV AL,0x1
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_00187cc2:
CALL 0x00122280
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::key(std::__cxx11::string&) */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::key(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,string *param_1)
{
bool bVar1;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*pbVar2;
int8 uVar3;
int1 local_3d;
int4 local_3c;
data local_38 [16];
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_28 [16];
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_
(local_38);
local_3c = (int4)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3);
local_3d = 4;
if (*(long *)(this + 0x90) != 0) {
/* try { // try from 00187c22 to 00187c65 has its CatchHandler @ 00187ce3 */
bVar1 = (bool)(**(code **)(this + 0x98))(this + 0x80,&local_3c,&local_3d,local_38);
std::vector<bool,std::allocator<bool>>::push_back
((vector<bool,std::allocator<bool>> *)(this + 0x48),bVar1);
if ((bVar1 != false) && (*(long *)(*(long *)(this + 0x10) + -8) != 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>
::basic_json(local_28,(basic_json *)(this + 0xa8));
/* try { // try from 00187c72 to 00187c79 has its CatchHandler @ 00187cc7 */
pbVar2 = (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>
*)ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::operator[](*(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
**)(*(long *)(*(long *)(this + 0x10) + -8) + 8),param_1);
uVar3 = 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=(pbVar2,(data *)local_28);
*(int8 *)(this + 0x70) = uVar3;
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((data *)local_28,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>
::data::~data((data *)local_28);
}
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_38,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>
::data::~data(local_38);
return 1;
}
/* WARNING: Subroutine does not return */
/* try { // try from 00187cc2 to 00187cc6 has its CatchHandler @ 00187ce3 */
std::__throw_bad_function_call();
}
| |
21,290 | mysys_namespace::crc32c::cpuid_ecx() | eloqsql/mysys/crc32/crc32c.cc | static uint32_t cpuid_ecx()
{
#ifdef __GNUC__
uint32_t reax= 0, rebx= 0, recx= 0, redx= 0;
__cpuid(1, reax, rebx, recx, redx);
return recx;
#elif defined _MSC_VER
int regs[4];
__cpuid(regs, 1);
return regs[2];
#else
# error "unknown compiler"
#endif
} | O0 | cpp | mysys_namespace::crc32c::cpuid_ecx():
pushq %rbp
movq %rsp, %rbp
movl $0x0, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl $0x1, %eax
xchgq %rbx, %rsi
cpuid
xchgq %rbx, %rsi
movl %esi, -0x14(%rbp)
movl %eax, %esi
movl -0x14(%rbp), %eax
movl %esi, -0x4(%rbp)
movl %eax, -0x8(%rbp)
movl %ecx, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0xc(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZN15mysys_namespace6crc32cL9cpuid_ecxEv:
push rbp
mov rbp, rsp
mov [rbp+var_4], 0
mov [rbp+var_8], 0
mov [rbp+var_C], 0
mov [rbp+var_10], 0
mov eax, 1
xchg rsi, rbx
cpuid
xchg rsi, rbx
mov [rbp+var_14], esi
mov esi, eax
mov eax, [rbp+var_14]
mov [rbp+var_4], esi
mov [rbp+var_8], eax
mov [rbp+var_C], ecx
mov [rbp+var_10], edx
mov eax, [rbp+var_C]
pop rbp
retn
| long long mysys_namespace::crc32c::cpuid_ecx(mysys_namespace::crc32c *this)
{
_RAX = 1LL;
__asm { cpuid }
return (unsigned int)_RCX;
}
| |||
21,291 | mysys_namespace::crc32c::cpuid_ecx() | eloqsql/mysys/crc32/crc32c.cc | static uint32_t cpuid_ecx()
{
#ifdef __GNUC__
uint32_t reax= 0, rebx= 0, recx= 0, redx= 0;
__cpuid(1, reax, rebx, recx, redx);
return recx;
#elif defined _MSC_VER
int regs[4];
__cpuid(regs, 1);
return regs[2];
#else
# error "unknown compiler"
#endif
} | O3 | cpp | mysys_namespace::crc32c::cpuid_ecx():
movl $0x1, %eax
xchgq %rbx, %rsi
cpuid
xchgq %rbx, %rsi
movl $0x100002, %edx # imm = 0x100002
andl %edx, %ecx
cmpl $0x100000, %ecx # imm = 0x100000
leaq 0x80287(%rip), %rsi # 0xb1ee3
leaq 0x80361(%rip), %rax # 0xb1fc4
cmoveq %rsi, %rax
cmpl %edx, %ecx
jne 0x31c77
pushq %rbp
movq %rsp, %rbp
leaq 0x80596(%rip), %rax # 0xb220c
popq %rbp
movq %rax, 0xbe3712(%rip) # 0xc15390
retq
nop
| _GLOBAL__sub_I_crc32c_cc:
mov eax, 1
xchg rsi, rbx
cpuid
xchg rsi, rbx
mov edx, 100002h
and ecx, edx
cmp ecx, offset xmmword_100000
lea rsi, _ZN15mysys_namespace6crc32cL12crc32c_sse42EjPKcm; mysys_namespace::crc32c::crc32c_sse42(uint,char const*,ulong)
lea rax, _ZN15mysys_namespace6crc32cL11crc32c_slowEjPKcm; mysys_namespace::crc32c::crc32c_slow(uint,char const*,ulong)
cmovz rax, rsi
cmp ecx, edx
jnz short loc_31C77
push rbp
mov rbp, rsp
lea rax, crc32c_3way
pop rbp
loc_31C77:
mov cs:_ZN15mysys_namespace6crc32cL12ChosenExtendE, rax; mysys_namespace::crc32c::ChosenExtend
retn
| long long ( *GLOBAL__sub_I_crc32c_cc())()
{
int v5; // ecx
long long ( *result)(); // rax
_RAX = 1LL;
__asm { cpuid }
v5 = _RCX & 0x100002;
result = (long long ( *)())mysys_namespace::crc32c::crc32c_slow;
if ( v5 == (_DWORD)&xmmword_100000 )
result = (long long ( *)())mysys_namespace::crc32c::crc32c_sse42;
if ( v5 == 1048578 )
result = crc32c_3way;
mysys_namespace::crc32c::ChosenExtend = (long long)result;
return result;
}
| _GLOBAL__sub_I_crc32c.cc:
MOV EAX,0x1
XCHG RBX,RSI
CPUID
XCHG RBX,RSI
MOV EDX,0x100002
AND ECX,EDX
CMP ECX,0x100000
LEA RSI,[0x1b1ee3]
LEA RAX,[0x1b1fc4]
CMOVZ RAX,RSI
CMP ECX,EDX
JNZ 0x00131c77
PUSH RBP
MOV RBP,RSP
LEA RAX,[0x1b220c]
POP RBP
LAB_00131c77:
MOV qword ptr [0x00d15390],RAX
RET
|
/* WARNING: Removing unreachable block (ram,0x00131c43) */
void _GLOBAL__sub_I_crc32c_cc(void)
{
long lVar1;
uint uVar2;
lVar1 = cpuid_Version_info(1);
uVar2 = *(uint *)(lVar1 + 0xc) & 0x100002;
mysys_namespace::crc32c::ChosenExtend = mysys_namespace::crc32c::crc32c_slow;
if (uVar2 == 0x100000) {
mysys_namespace::crc32c::ChosenExtend = mysys_namespace::crc32c::crc32c_sse42;
}
if (uVar2 == 0x100002) {
mysys_namespace::crc32c::ChosenExtend = crc32c_3way;
}
return;
}
| |
21,292 | js_generator_next | bluesky950520[P]quickjs/quickjs.c | static JSValue js_generator_next(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv,
BOOL *pdone, int magic)
{
JSGeneratorData *s = JS_GetOpaque(this_val, JS_CLASS_GENERATOR);
JSStackFrame *sf;
JSValue ret, func_ret;
*pdone = TRUE;
if (!s)
return JS_ThrowTypeError(ctx, "not a generator");
sf = &s->func_state.frame;
switch(s->state) {
default:
case JS_GENERATOR_STATE_SUSPENDED_START:
if (magic == GEN_MAGIC_NEXT) {
goto exec_no_arg;
} else {
free_generator_stack(ctx, s);
goto done;
}
break;
case JS_GENERATOR_STATE_SUSPENDED_YIELD_STAR:
case JS_GENERATOR_STATE_SUSPENDED_YIELD:
/* cur_sp[-1] was set to JS_UNDEFINED in the previous call */
ret = js_dup(argv[0]);
if (magic == GEN_MAGIC_THROW &&
s->state == JS_GENERATOR_STATE_SUSPENDED_YIELD) {
JS_Throw(ctx, ret);
s->func_state.throw_flag = TRUE;
} else {
sf->cur_sp[-1] = ret;
sf->cur_sp[0] = js_int32(magic);
sf->cur_sp++;
exec_no_arg:
s->func_state.throw_flag = FALSE;
}
s->state = JS_GENERATOR_STATE_EXECUTING;
func_ret = async_func_resume(ctx, &s->func_state);
s->state = JS_GENERATOR_STATE_SUSPENDED_YIELD;
if (JS_IsException(func_ret)) {
/* finalize the execution in case of exception */
free_generator_stack(ctx, s);
return func_ret;
}
if (JS_VALUE_GET_TAG(func_ret) == JS_TAG_INT) {
/* get the returned yield value at the top of the stack */
ret = sf->cur_sp[-1];
sf->cur_sp[-1] = JS_UNDEFINED;
if (JS_VALUE_GET_INT(func_ret) == FUNC_RET_YIELD_STAR) {
s->state = JS_GENERATOR_STATE_SUSPENDED_YIELD_STAR;
/* return (value, done) object */
*pdone = 2;
} else {
*pdone = FALSE;
}
} else {
/* end of iterator */
ret = sf->cur_sp[-1];
sf->cur_sp[-1] = JS_UNDEFINED;
JS_FreeValue(ctx, func_ret);
free_generator_stack(ctx, s);
}
break;
case JS_GENERATOR_STATE_COMPLETED:
done:
/* execution is finished */
switch(magic) {
default:
case GEN_MAGIC_NEXT:
ret = JS_UNDEFINED;
break;
case GEN_MAGIC_RETURN:
ret = js_dup(argv[0]);
break;
case GEN_MAGIC_THROW:
ret = JS_Throw(ctx, js_dup(argv[0]));
break;
}
break;
case JS_GENERATOR_STATE_EXECUTING:
ret = JS_ThrowTypeError(ctx, "cannot invoke a running generator");
break;
}
return ret;
} | O1 | c | js_generator_next:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r14
movq %r8, %r12
movq %rdi, %rbx
movq %rsi, (%rsp)
cmpl $-0x1, %edx
jne 0x7dc8a
movq (%rsp), %rax
cmpw $0x2f, 0x6(%rax)
jne 0x7dc8a
movq 0x30(%rax), %rbp
jmp 0x7dc8c
xorl %ebp, %ebp
movl $0x1, (%r14)
testq %rbp, %rbp
je 0x7dd1d
movl 0x50(%rsp), %edx
leaq 0x8(%rbp), %r15
movl (%rbp), %eax
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0x7dd3c
cmpl $0x3, %eax
je 0x7dd97
cmpl $0x4, %eax
je 0x7dce7
testl %edx, %edx
je 0x7df3d
cmpl $0x4, %eax
je 0x7dce7
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movl %edx, %r14d
callq 0x3a8b6
movl %r14d, %edx
movl $0x4, (%rbp)
cmpl $0x2, %edx
je 0x7debf
cmpl $0x1, %edx
jne 0x7df07
movq (%r12), %r13
movq 0x8(%r12), %rcx
movq %r13, (%rsp)
cmpl $-0x9, %ecx
jb 0x7dd11
movq (%rsp), %rax
incl (%rax)
movq %r13, %r15
shrq $0x20, %r15
jmp 0x7df12
leaq 0x22f1b(%rip), %rsi # 0xa0c3f
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x21953
movl $0x6, %r13d
jmp 0x7df1f
movq %r15, 0x8(%rsp)
movq (%r12), %r15
movq 0x8(%r12), %r13
movq %r15, (%rsp)
cmpl $-0x9, %r13d
jb 0x7dd5a
movq (%rsp), %rcx
incl (%rcx)
cmpl $0x2, %edx
jne 0x7ddb5
cmpl $0x1, %eax
jne 0x7ddb5
movq 0x18(%rbx), %r12
movq 0xf0(%r12), %rsi
movq 0xf8(%r12), %rdx
movq %r12, %rdi
callq 0x1ccb2
movq %r15, 0xf0(%r12)
movq %r13, 0xf8(%r12)
movl $0x1, %eax
jmp 0x7ddd9
leaq 0x22eb1(%rip), %rsi # 0xa0c4f
xorl %r13d, %r13d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x21953
movl $0x6, %ecx
jmp 0x7df0f
movq 0x68(%rbp), %rax
movq %r15, -0x10(%rax)
movq %r13, -0x8(%rax)
movq 0x68(%rbp), %rax
movl %edx, %ecx
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
addq $0x10, 0x68(%rbp)
xorl %eax, %eax
movq 0x8(%rsp), %r15
movl %eax, 0x1c(%rbp)
movl $0x3, (%rbp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x42542
movq %rax, %r12
movq %rdx, %r13
movl $0x1, (%rbp)
testl %r13d, %r13d
je 0x7de23
cmpl $0x6, %r13d
jne 0x7de5f
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0x3a8b6
movl $0x4, (%rbp)
jmp 0x7df1f
movq 0x68(%rbp), %rax
movq -0x10(%rax), %r13
movq -0x8(%rax), %rcx
movq %r13, %r15
shrq $0x20, %r15
movl $0x0, -0x10(%rax)
movq $0x3, -0x8(%rax)
cmpl $0x2, %r12d
jne 0x7df34
movl $0x2, %eax
movl %eax, (%rbp)
movl %eax, (%r14)
jmp 0x7df12
movq %r15, 0x8(%rsp)
movq 0x68(%rbp), %rax
movq -0x10(%rax), %r15
movq -0x8(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq %r15, %r14
shrq $0x20, %r15
movl $0x0, -0x10(%rax)
movq $0x3, -0x8(%rax)
movq 0x18(%rbx), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x1ccb2
cmpl $0x4, (%rbp)
je 0x7deb5
movq 0x18(%rbx), %rdi
movq 0x8(%rsp), %rsi
callq 0x3a8b6
movl $0x4, (%rbp)
movq %r14, %r13
movq 0x10(%rsp), %rcx
jmp 0x7df12
movq (%r12), %r14
movq 0x8(%r12), %r15
movq %r14, (%rsp)
cmpl $-0x9, %r15d
jb 0x7ded8
movq (%rsp), %rax
incl (%rax)
movq 0x18(%rbx), %rbx
movq 0xf0(%rbx), %rsi
movq 0xf8(%rbx), %rdx
movq %rbx, %rdi
callq 0x1ccb2
movq %r14, 0xf0(%rbx)
movq %r15, 0xf8(%rbx)
movl $0x6, %ecx
jmp 0x7df0c
movl $0x3, %ecx
xorl %r13d, %r13d
xorl %r15d, %r15d
shlq $0x20, %r15
movl %r13d, %r12d
orq %r15, %r12
movq %rcx, %r13
movq %r12, %rax
movq %r13, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x0, (%r14)
jmp 0x7df12
xorl %eax, %eax
jmp 0x7ddde
| js_generator_next:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, r9
mov r12, r8
mov rbx, rdi
mov [rsp+48h+var_48], rsi
cmp edx, 0FFFFFFFFh
jnz short loc_7DC8A
mov rax, [rsp+48h+var_48]
cmp word ptr [rax+6], 2Fh ; '/'
jnz short loc_7DC8A
mov rbp, [rax+30h]
jmp short loc_7DC8C
loc_7DC8A:
xor ebp, ebp
loc_7DC8C:
mov dword ptr [r14], 1
test rbp, rbp
jz loc_7DD1D
mov edx, [rsp+48h+arg_0]
lea r15, [rbp+8]
mov eax, [rbp+0]
lea ecx, [rax-1]
cmp ecx, 2
jb loc_7DD3C
cmp eax, 3
jz loc_7DD97
cmp eax, 4
jz short loc_7DCE7
test edx, edx
jz loc_7DF3D
cmp eax, 4
jz short loc_7DCE7
mov rdi, [rbx+18h]
mov rsi, r15
mov r14d, edx
call async_func_free
mov edx, r14d
mov dword ptr [rbp+0], 4
loc_7DCE7:
cmp edx, 2
jz loc_7DEBF
cmp edx, 1
jnz loc_7DF07
mov r13, [r12]
mov rcx, [r12+8]
mov [rsp+48h+var_48], r13
cmp ecx, 0FFFFFFF7h
jb short loc_7DD11
mov rax, [rsp+48h+var_48]
inc dword ptr [rax]
loc_7DD11:
mov r15, r13
shr r15, 20h
jmp loc_7DF12
loc_7DD1D:
lea rsi, aNotAGenerator; "not a generator"
xor r12d, r12d
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
mov r13d, 6
jmp loc_7DF1F
loc_7DD3C:
mov [rsp+48h+var_40], r15
mov r15, [r12]
mov r13, [r12+8]
mov [rsp+48h+var_48], r15
cmp r13d, 0FFFFFFF7h
jb short loc_7DD5A
mov rcx, [rsp+48h+var_48]
inc dword ptr [rcx]
loc_7DD5A:
cmp edx, 2
jnz short loc_7DDB5
cmp eax, 1
jnz short loc_7DDB5
mov r12, [rbx+18h]
mov rsi, [r12+0F0h]
mov rdx, [r12+0F8h]
mov rdi, r12
call JS_FreeValueRT
mov [r12+0F0h], r15
mov [r12+0F8h], r13
mov eax, 1
jmp short loc_7DDD9
loc_7DD97:
lea rsi, aCannotInvokeAR_0; "cannot invoke a running generator"
xor r13d, r13d
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
mov ecx, 6
jmp loc_7DF0F
loc_7DDB5:
mov rax, [rbp+68h]
mov [rax-10h], r15
mov [rax-8], r13
mov rax, [rbp+68h]
mov ecx, edx
mov [rax], rcx
mov qword ptr [rax+8], 0
add qword ptr [rbp+68h], 10h
xor eax, eax
loc_7DDD9:
mov r15, [rsp+48h+var_40]
loc_7DDDE:
mov [rbp+1Ch], eax
mov dword ptr [rbp+0], 3
mov rdi, rbx
mov rsi, r15
call async_func_resume
mov r12, rax
mov r13, rdx
mov dword ptr [rbp+0], 1
test r13d, r13d
jz short loc_7DE23
cmp r13d, 6
jnz short loc_7DE5F
mov rdi, [rbx+18h]
mov rsi, r15
call async_func_free
mov dword ptr [rbp+0], 4
jmp loc_7DF1F
loc_7DE23:
mov rax, [rbp+68h]
mov r13, [rax-10h]
mov rcx, [rax-8]
mov r15, r13
shr r15, 20h
mov dword ptr [rax-10h], 0
mov qword ptr [rax-8], 3
cmp r12d, 2
jnz loc_7DF34
mov eax, 2
mov [rbp+0], eax
mov [r14], eax
jmp loc_7DF12
loc_7DE5F:
mov [rsp+48h+var_40], r15
mov rax, [rbp+68h]
mov r15, [rax-10h]
mov rcx, [rax-8]
mov [rsp+48h+var_38], rcx
mov r14, r15
shr r15, 20h
mov dword ptr [rax-10h], 0
mov qword ptr [rax-8], 3
mov rdi, [rbx+18h]
mov rsi, r12
mov rdx, r13
call JS_FreeValueRT
cmp dword ptr [rbp+0], 4
jz short loc_7DEB5
mov rdi, [rbx+18h]
mov rsi, [rsp+48h+var_40]
call async_func_free
mov dword ptr [rbp+0], 4
loc_7DEB5:
mov r13, r14
mov rcx, [rsp+48h+var_38]
jmp short loc_7DF12
loc_7DEBF:
mov r14, [r12]
mov r15, [r12+8]
mov [rsp+48h+var_48], r14
cmp r15d, 0FFFFFFF7h
jb short loc_7DED8
mov rax, [rsp+48h+var_48]
inc dword ptr [rax]
loc_7DED8:
mov rbx, [rbx+18h]
mov rsi, [rbx+0F0h]
mov rdx, [rbx+0F8h]
mov rdi, rbx
call JS_FreeValueRT
mov [rbx+0F0h], r14
mov [rbx+0F8h], r15
mov ecx, 6
jmp short loc_7DF0C
loc_7DF07:
mov ecx, 3
loc_7DF0C:
xor r13d, r13d
loc_7DF0F:
xor r15d, r15d
loc_7DF12:
shl r15, 20h
mov r12d, r13d
or r12, r15
mov r13, rcx
loc_7DF1F:
mov rax, r12
mov rdx, r13
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7DF34:
mov dword ptr [r14], 0
jmp short loc_7DF12
loc_7DF3D:
xor eax, eax
jmp loc_7DDDE
| _DWORD * js_generator_next(
long long a1,
long long a2,
long long a3,
long long a4,
unsigned long long *a5,
_DWORD *a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
unsigned int a15)
{
int *v17; // rbp
long long v18; // rdx
long long v19; // r15
int v20; // eax
long long v21; // rcx
unsigned long long v22; // r13
unsigned long long v23; // r15
_DWORD *v24; // r12
_DWORD *v25; // r15
unsigned long long v26; // r13
long long v27; // r12
int v28; // eax
long long v29; // rax
_QWORD *v30; // rax
long long v31; // rdx
long long v32; // rax
long long v33; // rax
unsigned long long v34; // r14
_DWORD *v35; // r14
unsigned long long v36; // r15
long long v37; // rbx
long long v39; // [rsp+8h] [rbp-40h]
if ( (_DWORD)a3 == -1 && *(_WORD *)(a2 + 6) == 47 )
v17 = *(int **)(a2 + 48);
else
v17 = 0LL;
*a6 = 1;
if ( v17 )
{
v18 = a15;
v19 = (long long)(v17 + 2);
v20 = *v17;
v21 = (unsigned int)(*v17 - 1);
if ( (unsigned int)v21 < 2 )
{
v25 = (_DWORD *)*a5;
v26 = a5[1];
if ( (unsigned int)v26 >= 0xFFFFFFF7 )
++*(_DWORD *)*a5;
if ( a15 == 2 && v20 == 1 )
{
v27 = *(_QWORD *)(a1 + 24);
JS_FreeValueRT(v27, *(_DWORD **)(v27 + 240), *(_QWORD *)(v27 + 248));
*(_QWORD *)(v27 + 240) = v25;
*(_QWORD *)(v27 + 248) = v26;
v28 = 1;
}
else
{
v29 = *((_QWORD *)v17 + 13);
*(_QWORD *)(v29 - 16) = v25;
*(_QWORD *)(v29 - 8) = v26;
v30 = (_QWORD *)*((_QWORD *)v17 + 13);
v21 = a15;
*v30 = a15;
v30[1] = 0LL;
*((_QWORD *)v17 + 13) += 16LL;
v28 = 0;
}
v19 = (long long)(v17 + 2);
}
else
{
if ( v20 == 3 )
{
LODWORD(v22) = 0;
JS_ThrowTypeError(
a1,
(long long)"cannot invoke a running generator",
a15,
v21,
(long long)a5,
(long long)a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
a2);
LABEL_37:
v23 = 0LL;
return (_DWORD *)((v23 << 32) | (unsigned int)v22);
}
if ( v20 == 4 )
{
LABEL_11:
if ( (_DWORD)v18 == 2 )
{
v35 = (_DWORD *)*a5;
v36 = a5[1];
if ( (unsigned int)v36 >= 0xFFFFFFF7 )
++*(_DWORD *)*a5;
v37 = *(_QWORD *)(a1 + 24);
JS_FreeValueRT(v37, *(_DWORD **)(v37 + 240), *(_QWORD *)(v37 + 248));
*(_QWORD *)(v37 + 240) = v35;
*(_QWORD *)(v37 + 248) = v36;
}
else if ( (_DWORD)v18 == 1 )
{
v22 = *a5;
if ( (unsigned int)a5[1] >= 0xFFFFFFF7 )
++*(_DWORD *)*a5;
v23 = HIDWORD(v22);
return (_DWORD *)((v23 << 32) | (unsigned int)v22);
}
LODWORD(v22) = 0;
goto LABEL_37;
}
if ( a15 )
{
async_func_free(*(_QWORD *)(a1 + 24), (long long)(v17 + 2));
LODWORD(v18) = a15;
*v17 = 4;
goto LABEL_11;
}
v28 = 0;
}
v17[7] = v28;
*v17 = 3;
v24 = (_DWORD *)async_func_resume(a1, v19, v18, v21, (long long)a5, (long long)a6, a7, a8, a9, a10, a11, a12, a13, a14);
*v17 = 1;
if ( !(_DWORD)v31 )
{
v32 = *((_QWORD *)v17 + 13);
v22 = *(_QWORD *)(v32 - 16);
v23 = HIDWORD(v22);
*(_DWORD *)(v32 - 16) = 0;
*(_QWORD *)(v32 - 8) = 3LL;
if ( (_DWORD)v24 == 2 )
{
*v17 = 2;
*a6 = 2;
}
else
{
*a6 = 0;
}
return (_DWORD *)((v23 << 32) | (unsigned int)v22);
}
if ( (_DWORD)v31 != 6 )
{
v39 = v19;
v33 = *((_QWORD *)v17 + 13);
v34 = *(_QWORD *)(v33 - 16);
v23 = HIDWORD(v34);
*(_DWORD *)(v33 - 16) = 0;
*(_QWORD *)(v33 - 8) = 3LL;
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v24, v31);
if ( *v17 != 4 )
{
async_func_free(*(_QWORD *)(a1 + 24), v39);
*v17 = 4;
}
LODWORD(v22) = v34;
return (_DWORD *)((v23 << 32) | (unsigned int)v22);
}
async_func_free(*(_QWORD *)(a1 + 24), v19);
*v17 = 4;
}
else
{
v24 = 0LL;
JS_ThrowTypeError(
a1,
(long long)"not a generator",
a3,
a4,
(long long)a5,
(long long)a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
a2);
}
return v24;
}
| js_generator_next:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,R9
MOV R12,R8
MOV RBX,RDI
MOV qword ptr [RSP],RSI
CMP EDX,-0x1
JNZ 0x0017dc8a
MOV RAX,qword ptr [RSP]
CMP word ptr [RAX + 0x6],0x2f
JNZ 0x0017dc8a
MOV RBP,qword ptr [RAX + 0x30]
JMP 0x0017dc8c
LAB_0017dc8a:
XOR EBP,EBP
LAB_0017dc8c:
MOV dword ptr [R14],0x1
TEST RBP,RBP
JZ 0x0017dd1d
MOV EDX,dword ptr [RSP + 0x50]
LEA R15,[RBP + 0x8]
MOV EAX,dword ptr [RBP]
LEA ECX,[RAX + -0x1]
CMP ECX,0x2
JC 0x0017dd3c
CMP EAX,0x3
JZ 0x0017dd97
CMP EAX,0x4
JZ 0x0017dce7
TEST EDX,EDX
JZ 0x0017df3d
CMP EAX,0x4
JZ 0x0017dce7
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R15
MOV R14D,EDX
CALL 0x0013a8b6
MOV EDX,R14D
MOV dword ptr [RBP],0x4
LAB_0017dce7:
CMP EDX,0x2
JZ 0x0017debf
CMP EDX,0x1
JNZ 0x0017df07
MOV R13,qword ptr [R12]
MOV RCX,qword ptr [R12 + 0x8]
MOV qword ptr [RSP],R13
CMP ECX,-0x9
JC 0x0017dd11
MOV RAX,qword ptr [RSP]
INC dword ptr [RAX]
LAB_0017dd11:
MOV R15,R13
SHR R15,0x20
JMP 0x0017df12
LAB_0017dd1d:
LEA RSI,[0x1a0c3f]
XOR R12D,R12D
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00121953
MOV R13D,0x6
JMP 0x0017df1f
LAB_0017dd3c:
MOV qword ptr [RSP + 0x8],R15
MOV R15,qword ptr [R12]
MOV R13,qword ptr [R12 + 0x8]
MOV qword ptr [RSP],R15
CMP R13D,-0x9
JC 0x0017dd5a
MOV RCX,qword ptr [RSP]
INC dword ptr [RCX]
LAB_0017dd5a:
CMP EDX,0x2
JNZ 0x0017ddb5
CMP EAX,0x1
JNZ 0x0017ddb5
MOV R12,qword ptr [RBX + 0x18]
MOV RSI,qword ptr [R12 + 0xf0]
MOV RDX,qword ptr [R12 + 0xf8]
MOV RDI,R12
CALL 0x0011ccb2
MOV qword ptr [R12 + 0xf0],R15
MOV qword ptr [R12 + 0xf8],R13
MOV EAX,0x1
JMP 0x0017ddd9
LAB_0017dd97:
LEA RSI,[0x1a0c4f]
XOR R13D,R13D
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00121953
MOV ECX,0x6
JMP 0x0017df0f
LAB_0017ddb5:
MOV RAX,qword ptr [RBP + 0x68]
MOV qword ptr [RAX + -0x10],R15
MOV qword ptr [RAX + -0x8],R13
MOV RAX,qword ptr [RBP + 0x68]
MOV ECX,EDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
ADD qword ptr [RBP + 0x68],0x10
XOR EAX,EAX
LAB_0017ddd9:
MOV R15,qword ptr [RSP + 0x8]
LAB_0017ddde:
MOV dword ptr [RBP + 0x1c],EAX
MOV dword ptr [RBP],0x3
MOV RDI,RBX
MOV RSI,R15
CALL 0x00142542
MOV R12,RAX
MOV R13,RDX
MOV dword ptr [RBP],0x1
TEST R13D,R13D
JZ 0x0017de23
CMP R13D,0x6
JNZ 0x0017de5f
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R15
CALL 0x0013a8b6
MOV dword ptr [RBP],0x4
JMP 0x0017df1f
LAB_0017de23:
MOV RAX,qword ptr [RBP + 0x68]
MOV R13,qword ptr [RAX + -0x10]
MOV RCX,qword ptr [RAX + -0x8]
MOV R15,R13
SHR R15,0x20
MOV dword ptr [RAX + -0x10],0x0
MOV qword ptr [RAX + -0x8],0x3
CMP R12D,0x2
JNZ 0x0017df34
MOV EAX,0x2
MOV dword ptr [RBP],EAX
MOV dword ptr [R14],EAX
JMP 0x0017df12
LAB_0017de5f:
MOV qword ptr [RSP + 0x8],R15
MOV RAX,qword ptr [RBP + 0x68]
MOV R15,qword ptr [RAX + -0x10]
MOV RCX,qword ptr [RAX + -0x8]
MOV qword ptr [RSP + 0x10],RCX
MOV R14,R15
SHR R15,0x20
MOV dword ptr [RAX + -0x10],0x0
MOV qword ptr [RAX + -0x8],0x3
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R12
MOV RDX,R13
CALL 0x0011ccb2
CMP dword ptr [RBP],0x4
JZ 0x0017deb5
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x0013a8b6
MOV dword ptr [RBP],0x4
LAB_0017deb5:
MOV R13,R14
MOV RCX,qword ptr [RSP + 0x10]
JMP 0x0017df12
LAB_0017debf:
MOV R14,qword ptr [R12]
MOV R15,qword ptr [R12 + 0x8]
MOV qword ptr [RSP],R14
CMP R15D,-0x9
JC 0x0017ded8
MOV RAX,qword ptr [RSP]
INC dword ptr [RAX]
LAB_0017ded8:
MOV RBX,qword ptr [RBX + 0x18]
MOV RSI,qword ptr [RBX + 0xf0]
MOV RDX,qword ptr [RBX + 0xf8]
MOV RDI,RBX
CALL 0x0011ccb2
MOV qword ptr [RBX + 0xf0],R14
MOV qword ptr [RBX + 0xf8],R15
MOV ECX,0x6
JMP 0x0017df0c
LAB_0017df07:
MOV ECX,0x3
LAB_0017df0c:
XOR R13D,R13D
LAB_0017df0f:
XOR R15D,R15D
LAB_0017df12:
SHL R15,0x20
MOV R12D,R13D
OR R12,R15
MOV R13,RCX
LAB_0017df1f:
MOV RAX,R12
MOV RDX,R13
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017df34:
MOV dword ptr [R14],0x0
JMP 0x0017df12
LAB_0017df3d:
XOR EAX,EAX
JMP 0x0017ddde
|
int1 [16]
js_generator_next(long param_1,long param_2,int param_3,int8 param_4,int8 *param_5,
int4 *param_6,uint param_7)
{
int *piVar1;
ulong *puVar2;
long lVar3;
int iVar4;
int8 uVar5;
int *piVar6;
int *piVar7;
ulong uVar8;
int1 auVar9 [16];
if ((param_3 == -1) && (*(short *)(param_2 + 6) == 0x2f)) {
piVar6 = *(int **)(param_2 + 0x30);
}
else {
piVar6 = (int *)0x0;
}
*param_6 = 1;
if (piVar6 == (int *)0x0) {
JS_ThrowTypeError(param_1,"not a generator");
return ZEXT816(6) << 0x40;
}
piVar1 = piVar6 + 2;
iVar4 = *piVar6;
if (iVar4 - 1U < 2) {
piVar7 = (int *)*param_5;
uVar5 = param_5[1];
if (0xfffffff6 < (uint)uVar5) {
*piVar7 = *piVar7 + 1;
}
if ((param_7 == 2) && (iVar4 == 1)) {
lVar3 = *(long *)(param_1 + 0x18);
JS_FreeValueRT(lVar3,*(int8 *)(lVar3 + 0xf0),*(int8 *)(lVar3 + 0xf8));
*(int **)(lVar3 + 0xf0) = piVar7;
*(int8 *)(lVar3 + 0xf8) = uVar5;
iVar4 = 1;
}
else {
lVar3 = *(long *)(piVar6 + 0x1a);
*(int **)(lVar3 + -0x10) = piVar7;
*(int8 *)(lVar3 + -8) = uVar5;
puVar2 = *(ulong **)(piVar6 + 0x1a);
*puVar2 = (ulong)param_7;
puVar2[1] = 0;
*(long *)(piVar6 + 0x1a) = *(long *)(piVar6 + 0x1a) + 0x10;
iVar4 = 0;
}
LAB_0017ddde:
piVar6[7] = iVar4;
*piVar6 = 3;
auVar9 = async_func_resume(param_1,piVar1);
*piVar6 = 1;
if (auVar9._8_4_ == 0) {
lVar3 = *(long *)(piVar6 + 0x1a);
piVar7 = *(int **)(lVar3 + -0x10);
uVar5 = *(int8 *)(lVar3 + -8);
uVar8 = (ulong)piVar7 >> 0x20;
*(int4 *)(lVar3 + -0x10) = 0;
*(int8 *)(lVar3 + -8) = 3;
if (auVar9._0_4_ == 2) {
*piVar6 = 2;
*param_6 = 2;
}
else {
*param_6 = 0;
}
}
else {
if (auVar9._8_4_ == 6) {
async_func_free(*(int8 *)(param_1 + 0x18),piVar1);
*piVar6 = 4;
return auVar9;
}
lVar3 = *(long *)(piVar6 + 0x1a);
piVar7 = *(int **)(lVar3 + -0x10);
uVar5 = *(int8 *)(lVar3 + -8);
uVar8 = (ulong)piVar7 >> 0x20;
*(int4 *)(lVar3 + -0x10) = 0;
*(int8 *)(lVar3 + -8) = 3;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar9._0_8_,auVar9._8_8_);
if (*piVar6 != 4) {
async_func_free(*(int8 *)(param_1 + 0x18),piVar1);
*piVar6 = 4;
}
}
}
else {
if (iVar4 == 3) {
JS_ThrowTypeError(param_1,"cannot invoke a running generator");
uVar5 = 6;
}
else {
if (iVar4 != 4) {
if (param_7 == 0) {
iVar4 = 0;
goto LAB_0017ddde;
}
if (iVar4 != 4) {
async_func_free(*(int8 *)(param_1 + 0x18),piVar1);
*piVar6 = 4;
}
}
if (param_7 == 2) {
piVar6 = (int *)*param_5;
uVar5 = param_5[1];
if (0xfffffff6 < (uint)uVar5) {
*piVar6 = *piVar6 + 1;
}
lVar3 = *(long *)(param_1 + 0x18);
JS_FreeValueRT(lVar3,*(int8 *)(lVar3 + 0xf0),*(int8 *)(lVar3 + 0xf8));
*(int **)(lVar3 + 0xf0) = piVar6;
*(int8 *)(lVar3 + 0xf8) = uVar5;
uVar5 = 6;
}
else {
if (param_7 == 1) {
piVar7 = (int *)*param_5;
uVar5 = param_5[1];
if (0xfffffff6 < (uint)uVar5) {
*piVar7 = *piVar7 + 1;
}
uVar8 = (ulong)piVar7 >> 0x20;
goto LAB_0017df12;
}
uVar5 = 3;
}
}
piVar7 = (int *)0x0;
uVar8 = 0;
}
LAB_0017df12:
auVar9._8_8_ = uVar5;
auVar9._0_8_ = (ulong)piVar7 & 0xffffffff | uVar8 << 0x20;
return auVar9;
}
| |
21,293 | Opt::parse_options(char const**, int&, bool&) | llama.cpp/examples/run/run.cpp | int parse_options(const char ** argv, int & i, bool & options_parsing) {
if (options_parsing && (parse_flag(argv, i, "-v", "--verbose") || parse_flag(argv, i, "-v", "--log-verbose"))) {
verbose = true;
} else if (options_parsing && strcmp(argv[i], "--jinja") == 0) {
use_jinja = true;
} else if (options_parsing && parse_flag(argv, i, "-h", "--help")) {
help = true;
return 0;
} else if (options_parsing && strcmp(argv[i], "--") == 0) {
options_parsing = false;
} else {
return 2;
}
return 0;
} | O3 | cpp | Opt::parse_options(char const**, int&, bool&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
movb (%rcx), %cl
cmpb $0x1, %cl
jne 0x23d13
movl (%r15), %edx
leaq 0xa6127(%rip), %rcx # 0xc9df7
leaq 0xa6123(%rip), %r8 # 0xc9dfa
movq %r12, %rdi
movq %r14, %rsi
callq 0x23fac
testb %al, %al
jne 0x23d06
movl (%r15), %edx
leaq 0xa6107(%rip), %rcx # 0xc9df7
leaq 0xa610d(%rip), %r8 # 0xc9e04
movq %r12, %rdi
movq %r14, %rsi
callq 0x23fac
testb %al, %al
je 0x23d11
movb $0x1, 0x134(%r12)
jmp 0x23d63
movb (%rbx), %cl
testb $0x1, %cl
je 0x23d69
movslq (%r15), %r13
movq (%r14,%r13,8), %rdi
leaq 0xa60ec(%rip), %rsi # 0xc9e12
callq 0x1dbe0
testl %eax, %eax
je 0x23d5a
leaq 0xa60e4(%rip), %rcx # 0xc9e1a
leaq 0xa60e0(%rip), %r8 # 0xc9e1d
movq %r12, %rdi
movq %r14, %rsi
movl %r13d, %edx
callq 0x23fac
testb %al, %al
je 0x23d67
movb $0x1, 0x148(%r12)
jmp 0x23d63
movb $0x1, 0x120(%r12)
xorl %eax, %eax
jmp 0x23d8b
movb (%rbx), %cl
movl $0x2, %eax
testb $0x1, %cl
je 0x23d8b
movslq (%r15), %rcx
movq (%r14,%rcx,8), %rcx
cmpb $0x2d, (%rcx)
jne 0x23d8b
cmpb $0x2d, 0x1(%rcx)
jne 0x23d8b
cmpb $0x0, 0x2(%rcx)
je 0x23d95
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movb $0x0, (%rbx)
jmp 0x23d63
| _ZN3Opt13parse_optionsEPPKcRiRb:
push r15
push r14
push r13
push r12
push rbx
mov rbx, rcx
mov r15, rdx
mov r14, rsi
mov r12, rdi
mov cl, [rcx]
cmp cl, 1
jnz short loc_23D13
mov edx, [r15]; int
lea rcx, aV; "-v"
lea r8, aVerbose; "--verbose"
mov rdi, r12; this
mov rsi, r14; char **
call _ZN3Opt10parse_flagEPPKciS1_S1_; Opt::parse_flag(char const**,int,char const*,char const*)
test al, al
jnz short loc_23D06
mov edx, [r15]; int
lea rcx, aV; "-v"
lea r8, aLogVerbose; "--log-verbose"
mov rdi, r12; this
mov rsi, r14; char **
call _ZN3Opt10parse_flagEPPKciS1_S1_; Opt::parse_flag(char const**,int,char const*,char const*)
test al, al
jz short loc_23D11
loc_23D06:
mov byte ptr [r12+134h], 1
jmp short loc_23D63
loc_23D11:
mov cl, [rbx]
loc_23D13:
test cl, 1
jz short loc_23D69
movsxd r13, dword ptr [r15]
mov rdi, [r14+r13*8]
lea rsi, aJinja; "--jinja"
call _strcmp
test eax, eax
jz short loc_23D5A
lea rcx, asc_C9E1A; "-h"
lea r8, aHelp; "--help"
mov rdi, r12; this
mov rsi, r14; char **
mov edx, r13d; int
call _ZN3Opt10parse_flagEPPKciS1_S1_; Opt::parse_flag(char const**,int,char const*,char const*)
test al, al
jz short loc_23D67
mov byte ptr [r12+148h], 1
jmp short loc_23D63
loc_23D5A:
mov byte ptr [r12+120h], 1
loc_23D63:
xor eax, eax
jmp short loc_23D8B
loc_23D67:
mov cl, [rbx]
loc_23D69:
mov eax, 2
test cl, 1
jz short loc_23D8B
movsxd rcx, dword ptr [r15]
mov rcx, [r14+rcx*8]
cmp byte ptr [rcx], 2Dh ; '-'
jnz short loc_23D8B
cmp byte ptr [rcx+1], 2Dh ; '-'
jnz short loc_23D8B
cmp byte ptr [rcx+2], 0
jz short loc_23D95
loc_23D8B:
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_23D95:
mov byte ptr [rbx], 0
jmp short loc_23D63
| long long Opt::parse_options(Opt *this, const char **a2, int *a3, bool *a4)
{
char v6; // cl
long long v7; // r13
long long result; // rax
const char *v9; // rcx
v6 = *a4;
if ( v6 == 1 )
{
if ( (unsigned __int8)Opt::parse_flag(this, a2, *a3, "-v", "--verbose")
|| (unsigned __int8)Opt::parse_flag(this, a2, *a3, "-v", "--log-verbose") )
{
*((_BYTE *)this + 308) = 1;
return 0LL;
}
v6 = *a4;
}
if ( (v6 & 1) != 0 )
{
v7 = *a3;
if ( !(unsigned int)strcmp(a2[v7], "--jinja") )
{
*((_BYTE *)this + 288) = 1;
return 0LL;
}
if ( (unsigned __int8)Opt::parse_flag(this, a2, v7, "-h", "--help") )
{
*((_BYTE *)this + 328) = 1;
return 0LL;
}
v6 = *a4;
}
result = 2LL;
if ( (v6 & 1) != 0 )
{
v9 = a2[*a3];
if ( *(_WORD *)v9 == 11565 && !v9[2] )
{
*a4 = 0;
return 0LL;
}
}
return result;
}
| parse_options:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RCX
MOV R15,RDX
MOV R14,RSI
MOV R12,RDI
MOV CL,byte ptr [RCX]
CMP CL,0x1
JNZ 0x00123d13
MOV EDX,dword ptr [R15]
LEA RCX,[0x1c9df7]
LEA R8,[0x1c9dfa]
MOV RDI,R12
MOV RSI,R14
CALL 0x00123fac
TEST AL,AL
JNZ 0x00123d06
MOV EDX,dword ptr [R15]
LEA RCX,[0x1c9df7]
LEA R8,[0x1c9e04]
MOV RDI,R12
MOV RSI,R14
CALL 0x00123fac
TEST AL,AL
JZ 0x00123d11
LAB_00123d06:
MOV byte ptr [R12 + 0x134],0x1
JMP 0x00123d63
LAB_00123d11:
MOV CL,byte ptr [RBX]
LAB_00123d13:
TEST CL,0x1
JZ 0x00123d69
MOVSXD R13,dword ptr [R15]
MOV RDI,qword ptr [R14 + R13*0x8]
LEA RSI,[0x1c9e12]
CALL 0x0011dbe0
TEST EAX,EAX
JZ 0x00123d5a
LEA RCX,[0x1c9e1a]
LEA R8,[0x1c9e1d]
MOV RDI,R12
MOV RSI,R14
MOV EDX,R13D
CALL 0x00123fac
TEST AL,AL
JZ 0x00123d67
MOV byte ptr [R12 + 0x148],0x1
JMP 0x00123d63
LAB_00123d5a:
MOV byte ptr [R12 + 0x120],0x1
LAB_00123d63:
XOR EAX,EAX
JMP 0x00123d8b
LAB_00123d67:
MOV CL,byte ptr [RBX]
LAB_00123d69:
MOV EAX,0x2
TEST CL,0x1
JZ 0x00123d8b
MOVSXD RCX,dword ptr [R15]
MOV RCX,qword ptr [R14 + RCX*0x8]
CMP byte ptr [RCX],0x2d
JNZ 0x00123d8b
CMP byte ptr [RCX + 0x1],0x2d
JNZ 0x00123d8b
CMP byte ptr [RCX + 0x2],0x0
JZ 0x00123d95
LAB_00123d8b:
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_00123d95:
MOV byte ptr [RBX],0x0
JMP 0x00123d63
|
/* Opt::parse_options(char const**, int&, bool&) */
int8 __thiscall Opt::parse_options(Opt *this,char **param_1,int *param_2,bool *param_3)
{
int iVar1;
char *pcVar2;
char cVar3;
int iVar4;
byte bVar5;
bVar5 = *param_3;
if ((bool)bVar5 == true) {
cVar3 = parse_flag(this,param_1,*param_2,"-v","--verbose");
if ((cVar3 != '\0') ||
(cVar3 = parse_flag(this,param_1,*param_2,"-v","--log-verbose"), cVar3 != '\0')) {
this[0x134] = (Opt)0x1;
return 0;
}
bVar5 = *param_3;
}
if ((bVar5 & 1) != 0) {
iVar1 = *param_2;
iVar4 = strcmp(param_1[iVar1],"--jinja");
if (iVar4 == 0) {
this[0x120] = (Opt)0x1;
return 0;
}
cVar3 = parse_flag(this,param_1,iVar1,"-h","--help");
if (cVar3 != '\0') {
this[0x148] = (Opt)0x1;
return 0;
}
bVar5 = *param_3;
}
if ((bVar5 & 1) == 0) {
return 2;
}
pcVar2 = param_1[*param_2];
if (*pcVar2 == '-') {
if (pcVar2[1] != '-') {
return 2;
}
if (pcVar2[2] == '\0') {
*param_3 = false;
return 0;
}
return 2;
}
return 2;
}
| |
21,294 | ma_store_bin_pack_key | eloqsql/storage/maria/ma_search.c | void _ma_store_bin_pack_key(MARIA_KEYDEF *keyinfo __attribute__((unused)),
register uchar *key_pos,
register MARIA_KEY_PARAM *s_temp)
{
uchar *org_key_pos= key_pos;
size_t length= s_temp->totlength - s_temp->ref_length;
store_key_length_inc(key_pos,s_temp->ref_length);
memcpy(key_pos, s_temp->key+s_temp->ref_length, length);
key_pos+= length;
if (s_temp->next_key_pos)
{
store_key_length_inc(key_pos,s_temp->n_ref_length);
if (s_temp->prev_length) /* If we must extend key */
{
memcpy(key_pos,s_temp->prev_key,s_temp->prev_length);
key_pos+= s_temp->prev_length;
}
}
s_temp->changed_length= (uint) (key_pos - org_key_pos);
} | O0 | c | ma_store_bin_pack_key:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movl 0x30(%rax), %eax
movq -0x18(%rbp), %rcx
subl 0x20(%rcx), %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpl $0xff, 0x20(%rax)
jae 0x6fe29
movq -0x18(%rbp), %rax
movl 0x20(%rax), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0x6fe61
movq -0x10(%rbp), %rax
movb $-0x1, (%rax)
movq -0x18(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x2c(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x10(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rax
movl 0x20(%rax), %eax
addq %rax, %rsi
movq -0x28(%rbp), %rdx
callq 0x2a090
movq -0x28(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x6ff35
movq -0x18(%rbp), %rax
cmpl $0xff, 0x28(%rax)
jae 0x6fec3
movq -0x18(%rbp), %rax
movl 0x28(%rax), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0x6fefb
movq -0x10(%rbp), %rax
movb $-0x1, (%rax)
movq -0x18(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x30(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x10(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x38(%rax)
je 0x6ff33
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rax
movl 0x38(%rax), %eax
movl %eax, %edx
callq 0x2a090
movq -0x18(%rbp), %rax
movl 0x38(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x6ff35
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x40(%rax)
addq $0x30, %rsp
popq %rbp
retq
nop
| _ma_store_bin_pack_key:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
mov eax, [rax+30h]
mov rcx, [rbp+var_18]
sub eax, [rcx+20h]
mov eax, eax
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
cmp dword ptr [rax+20h], 0FFh
jnb short loc_6FE29
mov rax, [rbp+var_18]
mov eax, [rax+20h]
mov cl, al
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
jmp short loc_6FE61
loc_6FE29:
mov rax, [rbp+var_10]
mov byte ptr [rax], 0FFh
mov rax, [rbp+var_18]
mov eax, [rax+20h]
mov [rbp+var_2C], eax
mov eax, [rbp+var_2C]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov eax, [rbp+var_2C]
shr eax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_10]
add rax, 3
mov [rbp+var_10], rax
loc_6FE61:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_18]
mov rsi, [rax]
mov rax, [rbp+var_18]
mov eax, [rax+20h]
add rsi, rax
mov rdx, [rbp+var_28]
call _memcpy
mov rax, [rbp+var_28]
add rax, [rbp+var_10]
mov [rbp+var_10], rax
mov rax, [rbp+var_18]
cmp qword ptr [rax+10h], 0
jz loc_6FF35
mov rax, [rbp+var_18]
cmp dword ptr [rax+28h], 0FFh
jnb short loc_6FEC3
mov rax, [rbp+var_18]
mov eax, [rax+28h]
mov cl, al
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
jmp short loc_6FEFB
loc_6FEC3:
mov rax, [rbp+var_10]
mov byte ptr [rax], 0FFh
mov rax, [rbp+var_18]
mov eax, [rax+28h]
mov [rbp+var_30], eax
mov eax, [rbp+var_30]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov eax, [rbp+var_30]
shr eax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_10]
add rax, 3
mov [rbp+var_10], rax
loc_6FEFB:
mov rax, [rbp+var_18]
cmp dword ptr [rax+38h], 0
jz short loc_6FF33
mov rdi, [rbp+var_10]
mov rax, [rbp+var_18]
mov rsi, [rax+8]
mov rax, [rbp+var_18]
mov eax, [rax+38h]
mov edx, eax
call _memcpy
mov rax, [rbp+var_18]
mov ecx, [rax+38h]
mov rax, [rbp+var_10]
mov ecx, ecx
add rax, rcx
mov [rbp+var_10], rax
loc_6FF33:
jmp short $+2
loc_6FF35:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_20]
sub rax, rcx
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax+40h], ecx
add rsp, 30h
pop rbp
retn
| long long ma_store_bin_pack_key(long long a1, _BYTE *a2, long long a3)
{
_BYTE *v3; // rax
long long result; // rax
int v5; // [rsp+0h] [rbp-30h]
int v6; // [rsp+4h] [rbp-2Ch]
long long v7; // [rsp+8h] [rbp-28h]
_BYTE *v9; // [rsp+20h] [rbp-10h]
_BYTE *v10; // [rsp+20h] [rbp-10h]
v7 = (unsigned int)(*(_DWORD *)(a3 + 48) - *(_DWORD *)(a3 + 32));
if ( *(_DWORD *)(a3 + 32) >= 0xFFu )
{
*a2 = -1;
v6 = *(_DWORD *)(a3 + 32);
a2[2] = v6;
a2[1] = BYTE1(v6);
v9 = a2 + 3;
}
else
{
v9 = a2 + 1;
*a2 = *(_DWORD *)(a3 + 32);
}
memcpy(v9, *(unsigned int *)(a3 + 32) + *(_QWORD *)a3, v7);
v10 = &v9[v7];
if ( *(_QWORD *)(a3 + 16) )
{
if ( *(_DWORD *)(a3 + 40) >= 0xFFu )
{
*v10 = -1;
v5 = *(_DWORD *)(a3 + 40);
v10[2] = v5;
v10[1] = BYTE1(v5);
v10 += 3;
}
else
{
v3 = v10++;
*v3 = *(_DWORD *)(a3 + 40);
}
if ( *(_DWORD *)(a3 + 56) )
{
memcpy(v10, *(_QWORD *)(a3 + 8), *(unsigned int *)(a3 + 56));
LODWORD(v10) = *(_DWORD *)(a3 + 56) + (_DWORD)v10;
}
}
result = a3;
*(_DWORD *)(a3 + 64) = (_DWORD)v10 - (_DWORD)a2;
return result;
}
| _ma_store_bin_pack_key:
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 RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x30]
MOV RCX,qword ptr [RBP + -0x18]
SUB EAX,dword ptr [RCX + 0x20]
MOV EAX,EAX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x20],0xff
JNC 0x0016fe29
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x20]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
JMP 0x0016fe61
LAB_0016fe29:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],0xff
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x20]
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x2c]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV EAX,dword ptr [RBP + -0x2c]
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x3
MOV qword ptr [RBP + -0x10],RAX
LAB_0016fe61:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x20]
ADD RSI,RAX
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x0012a090
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x10],0x0
JZ 0x0016ff35
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x28],0xff
JNC 0x0016fec3
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x28]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
JMP 0x0016fefb
LAB_0016fec3:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],0xff
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x28]
MOV dword ptr [RBP + -0x30],EAX
MOV EAX,dword ptr [RBP + -0x30]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV EAX,dword ptr [RBP + -0x30]
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x3
MOV qword ptr [RBP + -0x10],RAX
LAB_0016fefb:
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x38],0x0
JZ 0x0016ff33
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x38]
MOV EDX,EAX
CALL 0x0012a090
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RAX + 0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
LAB_0016ff33:
JMP 0x0016ff35
LAB_0016ff35:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x40],ECX
ADD RSP,0x30
POP RBP
RET
|
void _ma_store_bin_pack_key(int8 param_1,int1 *param_2,long *param_3)
{
long lVar1;
ulong __n;
int1 *local_18;
__n = (ulong)(uint)((int)param_3[6] - (int)param_3[4]);
if (*(uint *)(param_3 + 4) < 0xff) {
local_18 = param_2 + 1;
*param_2 = (char)(int)param_3[4];
}
else {
*param_2 = 0xff;
lVar1 = param_3[4];
param_2[2] = (char)(int)lVar1;
param_2[1] = (char)((uint)(int)lVar1 >> 8);
local_18 = param_2 + 3;
}
memcpy(local_18,(void *)(*param_3 + (ulong)*(uint *)(param_3 + 4)),__n);
local_18 = local_18 + __n;
if (param_3[2] != 0) {
if (*(uint *)(param_3 + 5) < 0xff) {
*local_18 = (char)(int)param_3[5];
local_18 = local_18 + 1;
}
else {
*local_18 = 0xff;
lVar1 = param_3[5];
local_18[2] = (char)(int)lVar1;
local_18[1] = (char)((uint)(int)lVar1 >> 8);
local_18 = local_18 + 3;
}
if ((int)param_3[7] != 0) {
memcpy(local_18,(void *)param_3[1],(ulong)*(uint *)(param_3 + 7));
local_18 = local_18 + *(uint *)(param_3 + 7);
}
}
*(int *)(param_3 + 8) = (int)local_18 - (int)param_2;
return;
}
| |
21,295 | u8toa | bluesky950520[P]quickjs/tests/test_conv.c | static char *u8toa(char p[minimum_length(8)], uint32_t n)
{
if (n >= 10000) {
uint32_t n1 = n / 10000;
n -= n1 * 10000;
p = u4toa(p, n1);
return u04toa(p, n);
}
return u4toa(p, n);
} | O0 | c | u8toa:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movl %esi, 0x4(%rsp)
cmpl $0x2710, 0x4(%rsp) # imm = 0x2710
jb 0x2caf
movl 0x4(%rsp), %eax
movl $0x2710, %ecx # imm = 0x2710
xorl %edx, %edx
divl %ecx
movl %eax, (%rsp)
imull $0x2710, (%rsp), %ecx # imm = 0x2710
movl 0x4(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x4(%rsp)
movq 0x8(%rsp), %rdi
movl (%rsp), %esi
callq 0x2e40
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %esi
callq 0xa880
movq %rax, 0x10(%rsp)
jmp 0x2cc2
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %esi
callq 0x2e40
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nopl (%rax)
| u8toa:
sub rsp, 18h
mov [rsp+18h+var_10], rdi
mov [rsp+18h+var_14], esi
cmp [rsp+18h+var_14], 2710h
jb short loc_2CAF
mov eax, [rsp+18h+var_14]
mov ecx, 2710h
xor edx, edx
div ecx
mov [rsp+18h+var_18], eax
imul ecx, [rsp+18h+var_18], 2710h
mov eax, [rsp+18h+var_14]
sub eax, ecx
mov [rsp+18h+var_14], eax
mov rdi, [rsp+18h+var_10]
mov esi, [rsp+18h+var_18]
call u4toa
mov [rsp+18h+var_10], rax
mov rdi, [rsp+18h+var_10]
mov esi, [rsp+18h+var_14]
call u04toa
mov [rsp+18h+var_8], rax
jmp short loc_2CC2
loc_2CAF:
mov rdi, [rsp+18h+var_10]
mov esi, [rsp+18h+var_14]
call u4toa
mov [rsp+18h+var_8], rax
loc_2CC2:
mov rax, [rsp+18h+var_8]
add rsp, 18h
retn
| long long u8toa(long long a1, unsigned int a2)
{
long long v2; // rdx
long long v4; // [rsp+8h] [rbp-10h]
if ( a2 < 0x2710 )
return u4toa(a1, a2);
v4 = u4toa(a1, a2 / 0x2710);
return u04toa(v4, a2 % 0x2710, v2);
}
| u8toa:
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RDI
MOV dword ptr [RSP + 0x4],ESI
CMP dword ptr [RSP + 0x4],0x2710
JC 0x00102caf
MOV EAX,dword ptr [RSP + 0x4]
MOV ECX,0x2710
XOR EDX,EDX
DIV ECX
MOV dword ptr [RSP],EAX
IMUL ECX,dword ptr [RSP],0x2710
MOV EAX,dword ptr [RSP + 0x4]
SUB EAX,ECX
MOV dword ptr [RSP + 0x4],EAX
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,dword ptr [RSP]
CALL 0x00102e40
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,dword ptr [RSP + 0x4]
CALL 0x0010a880
MOV qword ptr [RSP + 0x10],RAX
JMP 0x00102cc2
LAB_00102caf:
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,dword ptr [RSP + 0x4]
CALL 0x00102e40
MOV qword ptr [RSP + 0x10],RAX
LAB_00102cc2:
MOV RAX,qword ptr [RSP + 0x10]
ADD RSP,0x18
RET
|
int8 u8toa(int8 param_1,uint param_2)
{
int8 uVar1;
int8 local_8;
if (param_2 < 10000) {
local_8 = u4toa(param_1,param_2);
}
else {
uVar1 = u4toa(param_1,param_2 / 10000,(ulong)param_2 % 10000);
local_8 = u04toa(uVar1,param_2 % 10000);
}
return local_8;
}
| |
21,296 | sp_get_geometry_mbr | eloqsql/storage/maria/ma_sp_key.c | static int sp_get_geometry_mbr(uchar *(*wkb), uchar *end, uint n_dims,
double *mbr, int top)
{
int res;
uchar byte_order;
uint wkb_type;
byte_order = *(*wkb);
++(*wkb);
wkb_type = uint4korr((*wkb));
(*wkb) += 4;
switch ((enum wkbType) wkb_type)
{
case wkbPoint:
res = sp_get_point_mbr(wkb, end, n_dims, byte_order, mbr);
break;
case wkbLineString:
res = sp_get_linestring_mbr(wkb, end, n_dims, byte_order, mbr);
break;
case wkbPolygon:
res = sp_get_polygon_mbr(wkb, end, n_dims, byte_order, mbr);
break;
case wkbMultiPoint:
{
uint n_items;
n_items = uint4korr((*wkb));
(*wkb) += 4;
for (; n_items > 0; --n_items)
{
byte_order = *(*wkb);
++(*wkb);
(*wkb) += 4;
if (sp_get_point_mbr(wkb, end, n_dims, byte_order, mbr))
return -1;
}
res = 0;
break;
}
case wkbMultiLineString:
{
uint n_items;
n_items = uint4korr((*wkb));
(*wkb) += 4;
for (; n_items > 0; --n_items)
{
byte_order = *(*wkb);
++(*wkb);
(*wkb) += 4;
if (sp_get_linestring_mbr(wkb, end, n_dims, byte_order, mbr))
return -1;
}
res = 0;
break;
}
case wkbMultiPolygon:
{
uint n_items;
n_items = uint4korr((*wkb));
(*wkb) += 4;
for (; n_items > 0; --n_items)
{
byte_order = *(*wkb);
++(*wkb);
(*wkb) += 4;
if (sp_get_polygon_mbr(wkb, end, n_dims, byte_order, mbr))
return -1;
}
res = 0;
break;
}
case wkbGeometryCollection:
{
uint n_items;
if (!top)
return -1;
n_items = uint4korr((*wkb));
(*wkb) += 4;
for (; n_items > 0; --n_items)
{
if (sp_get_geometry_mbr(wkb, end, n_dims, mbr, 0))
return -1;
}
res = 0;
break;
}
default:
res = -1;
}
return res;
} | O0 | c | sp_get_geometry_mbr:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movb (%rax), %al
movb %al, -0x31(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
incq %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x4, %rcx
movq %rcx, (%rax)
movl -0x38(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x50(%rbp)
subl $0x6, %eax
ja 0xa7017
movq -0x50(%rbp), %rax
leaq 0x7f5e3(%rip), %rcx # 0x126380
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movb -0x31(%rbp), %al
movq -0x28(%rbp), %r8
movzbl %al, %ecx
callq 0xa7030
movl %eax, -0x30(%rbp)
jmp 0xa701e
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movb -0x31(%rbp), %al
movq -0x28(%rbp), %r8
movzbl %al, %ecx
callq 0xa7070
movl %eax, -0x30(%rbp)
jmp 0xa701e
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movb -0x31(%rbp), %al
movq -0x28(%rbp), %r8
movzbl %al, %ecx
callq 0xa7100
movl %eax, -0x30(%rbp)
jmp 0xa701e
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x4, %rcx
movq %rcx, (%rax)
cmpl $0x0, -0x3c(%rbp)
jbe 0xa6e8c
movq -0x10(%rbp), %rax
movq (%rax), %rax
movb (%rax), %al
movb %al, -0x31(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x4, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movb -0x31(%rbp), %al
movq -0x28(%rbp), %r8
movzbl %al, %ecx
callq 0xa7030
cmpl $0x0, %eax
je 0xa6e7f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xa7024
jmp 0xa6e81
movl -0x3c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xa6e26
movl $0x0, -0x30(%rbp)
jmp 0xa701e
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x4, %rcx
movq %rcx, (%rax)
cmpl $0x0, -0x40(%rbp)
jbe 0xa6f18
movq -0x10(%rbp), %rax
movq (%rax), %rax
movb (%rax), %al
movb %al, -0x31(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x4, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movb -0x31(%rbp), %al
movq -0x28(%rbp), %r8
movzbl %al, %ecx
callq 0xa7070
cmpl $0x0, %eax
je 0xa6f0b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xa7024
jmp 0xa6f0d
movl -0x40(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0xa6eb2
movl $0x0, -0x30(%rbp)
jmp 0xa701e
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x4, %rcx
movq %rcx, (%rax)
cmpl $0x0, -0x44(%rbp)
jbe 0xa6fa4
movq -0x10(%rbp), %rax
movq (%rax), %rax
movb (%rax), %al
movb %al, -0x31(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x4, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movb -0x31(%rbp), %al
movq -0x28(%rbp), %r8
movzbl %al, %ecx
callq 0xa7100
cmpl $0x0, %eax
je 0xa6f97
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xa7024
jmp 0xa6f99
movl -0x44(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0xa6f3e
movl $0x0, -0x30(%rbp)
jmp 0xa701e
cmpl $0x0, -0x2c(%rbp)
jne 0xa6fbc
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xa7024
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x4, %rcx
movq %rcx, (%rax)
cmpl $0x0, -0x48(%rbp)
jbe 0xa700e
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movq -0x28(%rbp), %rcx
xorl %r8d, %r8d
callq 0xa6d30
cmpl $0x0, %eax
je 0xa7001
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xa7024
jmp 0xa7003
movl -0x48(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0xa6fd6
movl $0x0, -0x30(%rbp)
jmp 0xa701e
movl $0xffffffff, -0x30(%rbp) # imm = 0xFFFFFFFF
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
| sp_get_geometry_mbr:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov [rbp+var_2C], r8d
mov rax, [rbp+var_10]
mov rax, [rax]
mov al, [rax]
mov [rbp+var_31], al
mov rax, [rbp+var_10]
mov rcx, [rax]
inc rcx
mov [rax], rcx
mov rax, [rbp+var_10]
mov rax, [rax]
mov eax, [rax]
mov [rbp+var_38], eax
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 4
mov [rax], rcx
mov eax, [rbp+var_38]
dec eax; switch 7 cases
mov ecx, eax
mov [rbp+var_50], rcx
sub eax, 6
ja def_A6DA4; jumptable 00000000000A6DA4 default case
mov rax, [rbp+var_50]
lea rcx, jpt_A6DA4
movsxd rax, ds:(jpt_A6DA4 - 126380h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_A6DA6:
mov rdi, [rbp+var_10]; jumptable 00000000000A6DA4 case 1
mov rsi, [rbp+var_18]
mov edx, [rbp+var_1C]
mov al, [rbp+var_31]
mov r8, [rbp+var_28]
movzx ecx, al
call sp_get_point_mbr
mov [rbp+var_30], eax
jmp loc_A701E
loc_A6DC8:
mov rdi, [rbp+var_10]; jumptable 00000000000A6DA4 case 2
mov rsi, [rbp+var_18]
mov edx, [rbp+var_1C]
mov al, [rbp+var_31]
mov r8, [rbp+var_28]
movzx ecx, al
call sp_get_linestring_mbr
mov [rbp+var_30], eax
jmp loc_A701E
loc_A6DEA:
mov rdi, [rbp+var_10]; jumptable 00000000000A6DA4 case 3
mov rsi, [rbp+var_18]
mov edx, [rbp+var_1C]
mov al, [rbp+var_31]
mov r8, [rbp+var_28]
movzx ecx, al
call sp_get_polygon_mbr
mov [rbp+var_30], eax
jmp loc_A701E
loc_A6E0C:
mov rax, [rbp+var_10]; jumptable 00000000000A6DA4 case 4
mov rax, [rax]
mov eax, [rax]
mov [rbp+var_3C], eax
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 4
mov [rax], rcx
loc_A6E26:
cmp [rbp+var_3C], 0
jbe short loc_A6E8C
mov rax, [rbp+var_10]
mov rax, [rax]
mov al, [rax]
mov [rbp+var_31], al
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 1
mov [rax], rcx
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 4
mov [rax], rcx
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov edx, [rbp+var_1C]
mov al, [rbp+var_31]
mov r8, [rbp+var_28]
movzx ecx, al
call sp_get_point_mbr
cmp eax, 0
jz short loc_A6E7F
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_A7024
loc_A6E7F:
jmp short $+2
loc_A6E81:
mov eax, [rbp+var_3C]
add eax, 0FFFFFFFFh
mov [rbp+var_3C], eax
jmp short loc_A6E26
loc_A6E8C:
mov [rbp+var_30], 0
jmp loc_A701E
loc_A6E98:
mov rax, [rbp+var_10]; jumptable 00000000000A6DA4 case 5
mov rax, [rax]
mov eax, [rax]
mov [rbp+var_40], eax
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 4
mov [rax], rcx
loc_A6EB2:
cmp [rbp+var_40], 0
jbe short loc_A6F18
mov rax, [rbp+var_10]
mov rax, [rax]
mov al, [rax]
mov [rbp+var_31], al
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 1
mov [rax], rcx
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 4
mov [rax], rcx
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov edx, [rbp+var_1C]
mov al, [rbp+var_31]
mov r8, [rbp+var_28]
movzx ecx, al
call sp_get_linestring_mbr
cmp eax, 0
jz short loc_A6F0B
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_A7024
loc_A6F0B:
jmp short $+2
loc_A6F0D:
mov eax, [rbp+var_40]
add eax, 0FFFFFFFFh
mov [rbp+var_40], eax
jmp short loc_A6EB2
loc_A6F18:
mov [rbp+var_30], 0
jmp loc_A701E
loc_A6F24:
mov rax, [rbp+var_10]; jumptable 00000000000A6DA4 case 6
mov rax, [rax]
mov eax, [rax]
mov [rbp+var_44], eax
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 4
mov [rax], rcx
loc_A6F3E:
cmp [rbp+var_44], 0
jbe short loc_A6FA4
mov rax, [rbp+var_10]
mov rax, [rax]
mov al, [rax]
mov [rbp+var_31], al
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 1
mov [rax], rcx
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 4
mov [rax], rcx
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov edx, [rbp+var_1C]
mov al, [rbp+var_31]
mov r8, [rbp+var_28]
movzx ecx, al
call sp_get_polygon_mbr
cmp eax, 0
jz short loc_A6F97
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_A7024
loc_A6F97:
jmp short $+2
loc_A6F99:
mov eax, [rbp+var_44]
add eax, 0FFFFFFFFh
mov [rbp+var_44], eax
jmp short loc_A6F3E
loc_A6FA4:
mov [rbp+var_30], 0
jmp short loc_A701E
loc_A6FAD:
cmp [rbp+var_2C], 0; jumptable 00000000000A6DA4 case 7
jnz short loc_A6FBC
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_A7024
loc_A6FBC:
mov rax, [rbp+var_10]
mov rax, [rax]
mov eax, [rax]
mov [rbp+var_48], eax
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 4
mov [rax], rcx
loc_A6FD6:
cmp [rbp+var_48], 0
jbe short loc_A700E
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov edx, [rbp+var_1C]
mov rcx, [rbp+var_28]
xor r8d, r8d
call sp_get_geometry_mbr
cmp eax, 0
jz short loc_A7001
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_A7024
loc_A7001:
jmp short $+2
loc_A7003:
mov eax, [rbp+var_48]
add eax, 0FFFFFFFFh
mov [rbp+var_48], eax
jmp short loc_A6FD6
loc_A700E:
mov [rbp+var_30], 0
jmp short loc_A701E
def_A6DA4:
mov [rbp+var_30], 0FFFFFFFFh; jumptable 00000000000A6DA4 default case
loc_A701E:
mov eax, [rbp+var_30]
mov [rbp+var_4], eax
loc_A7024:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
| long long sp_get_geometry_mbr(unsigned __int8 **a1, long long a2, unsigned int a3, long long a4, int a5)
{
int v6; // [rsp+8h] [rbp-48h]
int v7; // [rsp+Ch] [rbp-44h]
int v8; // [rsp+10h] [rbp-40h]
int v9; // [rsp+14h] [rbp-3Ch]
int v10; // [rsp+18h] [rbp-38h]
unsigned __int8 v11; // [rsp+1Fh] [rbp-31h]
unsigned __int8 v12; // [rsp+1Fh] [rbp-31h]
unsigned __int8 v13; // [rsp+1Fh] [rbp-31h]
unsigned __int8 v14; // [rsp+1Fh] [rbp-31h]
v11 = *(*a1)++;
v10 = *(_DWORD *)*a1;
*a1 += 4;
switch ( v10 )
{
case 1:
return (unsigned int)sp_get_point_mbr(a1, a2, a3, v11, a4);
case 2:
return (unsigned int)sp_get_linestring_mbr(a1, a2, a3, v11, a4);
case 3:
return (unsigned int)sp_get_polygon_mbr(a1, a2, a3, v11, a4);
case 4:
v9 = *(_DWORD *)*a1;
*a1 += 4;
while ( 2 )
{
if ( !v9 )
return 0;
v12 = *(*a1)++;
*a1 += 4;
if ( !(unsigned int)sp_get_point_mbr(a1, a2, a3, v12, a4) )
{
--v9;
continue;
}
return (unsigned int)-1;
}
case 5:
v8 = *(_DWORD *)*a1;
*a1 += 4;
while ( 2 )
{
if ( !v8 )
return 0;
v13 = *(*a1)++;
*a1 += 4;
if ( !(unsigned int)sp_get_linestring_mbr(a1, a2, a3, v13, a4) )
{
--v8;
continue;
}
return (unsigned int)-1;
}
case 6:
v7 = *(_DWORD *)*a1;
*a1 += 4;
while ( 2 )
{
if ( !v7 )
return 0;
v14 = *(*a1)++;
*a1 += 4;
if ( !(unsigned int)sp_get_polygon_mbr(a1, a2, a3, v14, a4) )
{
--v7;
continue;
}
break;
}
return (unsigned int)-1;
case 7:
if ( !a5 )
return (unsigned int)-1;
v6 = *(_DWORD *)*a1;
*a1 += 4;
break;
default:
return (unsigned int)-1;
}
while ( v6 )
{
if ( (unsigned int)sp_get_geometry_mbr(a1, a2, a3, a4, 0LL) )
return (unsigned int)-1;
--v6;
}
return 0;
}
| sp_get_geometry_mbr:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV dword ptr [RBP + -0x2c],R8D
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x31],AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
INC RCX
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x38],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x4
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RBP + -0x38]
DEC EAX
MOV ECX,EAX
MOV qword ptr [RBP + -0x50],RCX
SUB EAX,0x6
JA 0x001a7017
MOV RAX,qword ptr [RBP + -0x50]
LEA RCX,[0x226380]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x1c]
MOV AL,byte ptr [RBP + -0x31]
MOV R8,qword ptr [RBP + -0x28]
MOVZX ECX,AL
CALL 0x001a7030
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001a701e
caseD_2:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x1c]
MOV AL,byte ptr [RBP + -0x31]
MOV R8,qword ptr [RBP + -0x28]
MOVZX ECX,AL
CALL 0x001a7070
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001a701e
caseD_3:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x1c]
MOV AL,byte ptr [RBP + -0x31]
MOV R8,qword ptr [RBP + -0x28]
MOVZX ECX,AL
CALL 0x001a7100
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001a701e
caseD_4:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x3c],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x4
MOV qword ptr [RAX],RCX
LAB_001a6e26:
CMP dword ptr [RBP + -0x3c],0x0
JBE 0x001a6e8c
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x31],AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x4
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x1c]
MOV AL,byte ptr [RBP + -0x31]
MOV R8,qword ptr [RBP + -0x28]
MOVZX ECX,AL
CALL 0x001a7030
CMP EAX,0x0
JZ 0x001a6e7f
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001a7024
LAB_001a6e7f:
JMP 0x001a6e81
LAB_001a6e81:
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x001a6e26
LAB_001a6e8c:
MOV dword ptr [RBP + -0x30],0x0
JMP 0x001a701e
caseD_5:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x40],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x4
MOV qword ptr [RAX],RCX
LAB_001a6eb2:
CMP dword ptr [RBP + -0x40],0x0
JBE 0x001a6f18
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x31],AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x4
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x1c]
MOV AL,byte ptr [RBP + -0x31]
MOV R8,qword ptr [RBP + -0x28]
MOVZX ECX,AL
CALL 0x001a7070
CMP EAX,0x0
JZ 0x001a6f0b
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001a7024
LAB_001a6f0b:
JMP 0x001a6f0d
LAB_001a6f0d:
MOV EAX,dword ptr [RBP + -0x40]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x40],EAX
JMP 0x001a6eb2
LAB_001a6f18:
MOV dword ptr [RBP + -0x30],0x0
JMP 0x001a701e
caseD_6:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x44],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x4
MOV qword ptr [RAX],RCX
LAB_001a6f3e:
CMP dword ptr [RBP + -0x44],0x0
JBE 0x001a6fa4
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x31],AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x4
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x1c]
MOV AL,byte ptr [RBP + -0x31]
MOV R8,qword ptr [RBP + -0x28]
MOVZX ECX,AL
CALL 0x001a7100
CMP EAX,0x0
JZ 0x001a6f97
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001a7024
LAB_001a6f97:
JMP 0x001a6f99
LAB_001a6f99:
MOV EAX,dword ptr [RBP + -0x44]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x44],EAX
JMP 0x001a6f3e
LAB_001a6fa4:
MOV dword ptr [RBP + -0x30],0x0
JMP 0x001a701e
caseD_7:
CMP dword ptr [RBP + -0x2c],0x0
JNZ 0x001a6fbc
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001a7024
LAB_001a6fbc:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x48],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x4
MOV qword ptr [RAX],RCX
LAB_001a6fd6:
CMP dword ptr [RBP + -0x48],0x0
JBE 0x001a700e
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RBP + -0x28]
XOR R8D,R8D
CALL 0x001a6d30
CMP EAX,0x0
JZ 0x001a7001
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001a7024
LAB_001a7001:
JMP 0x001a7003
LAB_001a7003:
MOV EAX,dword ptr [RBP + -0x48]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x48],EAX
JMP 0x001a6fd6
LAB_001a700e:
MOV dword ptr [RBP + -0x30],0x0
JMP 0x001a701e
default:
MOV dword ptr [RBP + -0x30],0xffffffff
LAB_001a701e:
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x4],EAX
LAB_001a7024:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x50
POP RBP
RET
|
int4
sp_get_geometry_mbr(long *param_1,int8 param_2,int4 param_3,int8 param_4,
int param_5)
{
int1 uVar1;
int4 uVar2;
int iVar3;
int local_50;
int local_4c;
int local_48;
int local_44;
int4 local_38;
uVar1 = *(int1 *)*param_1;
*param_1 = *param_1 + 1;
uVar2 = *(int4 *)*param_1;
*param_1 = *param_1 + 4;
switch(uVar2) {
case 1:
local_38 = sp_get_point_mbr(param_1,param_2,param_3,uVar1,param_4);
break;
case 2:
local_38 = sp_get_linestring_mbr(param_1,param_2,param_3,uVar1,param_4);
break;
case 3:
local_38 = sp_get_polygon_mbr(param_1,param_2,param_3,uVar1,param_4);
break;
case 4:
local_44 = *(int *)*param_1;
*param_1 = *param_1 + 4;
for (; local_44 != 0; local_44 = local_44 + -1) {
uVar1 = *(int1 *)*param_1;
*param_1 = *param_1 + 1;
*param_1 = *param_1 + 4;
iVar3 = sp_get_point_mbr(param_1,param_2,param_3,uVar1,param_4);
if (iVar3 != 0) {
return 0xffffffff;
}
}
local_38 = 0;
break;
case 5:
local_48 = *(int *)*param_1;
*param_1 = *param_1 + 4;
for (; local_48 != 0; local_48 = local_48 + -1) {
uVar1 = *(int1 *)*param_1;
*param_1 = *param_1 + 1;
*param_1 = *param_1 + 4;
iVar3 = sp_get_linestring_mbr(param_1,param_2,param_3,uVar1,param_4);
if (iVar3 != 0) {
return 0xffffffff;
}
}
local_38 = 0;
break;
case 6:
local_4c = *(int *)*param_1;
*param_1 = *param_1 + 4;
for (; local_4c != 0; local_4c = local_4c + -1) {
uVar1 = *(int1 *)*param_1;
*param_1 = *param_1 + 1;
*param_1 = *param_1 + 4;
iVar3 = sp_get_polygon_mbr(param_1,param_2,param_3,uVar1,param_4);
if (iVar3 != 0) {
return 0xffffffff;
}
}
local_38 = 0;
break;
case 7:
if (param_5 == 0) {
return 0xffffffff;
}
local_50 = *(int *)*param_1;
*param_1 = *param_1 + 4;
for (; local_50 != 0; local_50 = local_50 + -1) {
iVar3 = sp_get_geometry_mbr(param_1,param_2,param_3,param_4,0);
if (iVar3 != 0) {
return 0xffffffff;
}
}
local_38 = 0;
break;
default:
local_38 = 0xffffffff;
}
return local_38;
}
| |
21,297 | LefDefParser::lefwMacroSource(char const*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp | int
lefwMacroSource(const char *value1)
{
lefwObsoleteNum = LEFW_MACRO_SOURCE;
if (!lefwFile)
return LEFW_UNINITIALIZED;
if (!lefwDidInit)
return LEFW_BAD_ORDER;
if (lefwState != LEFW_MACRO_START &&
lefwState != LEFW_MACRO)
return LEFW_BAD_ORDER;
if (versionNum >= 5.6)
return LEFW_OBSOLETE;
if (!value1 || value1 == 0 || *value1 == 0)
return LEFW_BAD_DATA;
if (strcmp(value1, "USER") == 0 || strcmp(value1, "GENERATE") == 0 ||
strcmp(value1, "BLOCK") == 0)
if (lefwWriteEncrypt)
encPrint(lefwFile, (char*) " SOURCE %s ;\n", value1);
else
fprintf(lefwFile, " SOURCE %s ;\n", value1);
else
return LEFW_BAD_DATA;
lefwLines++;
lefwState = LEFW_MACRO;
return LEFW_OK;
} | O3 | cpp | LefDefParser::lefwMacroSource(char const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0x35, 0x70ec6(%rip) # 0x8ceb8
leaq 0x710f7(%rip), %rax # 0x8d0f0
movq (%rax), %r14
testq %r14, %r14
je 0x1c0b3
leaq 0x71338(%rip), %rax # 0x8d344
movl $0x2, %ebp
cmpl $0x0, (%rax)
je 0x1c0b8
movq %rdi, %rbx
leaq 0x7131c(%rip), %r15 # 0x8d340
movl (%r15), %eax
cmpl $0x21, %eax
je 0x1c035
cmpl $0x9, %eax
jne 0x1c0b8
movsd 0x70e73(%rip), %xmm0 # 0x8ceb0
movl $0x7, %ebp
ucomisd 0x4ea9e(%rip), %xmm0 # 0x6aae8
jae 0x1c0b8
movl $0x3, %ebp
testq %rbx, %rbx
je 0x1c0b8
cmpb $0x0, (%rbx)
je 0x1c0b8
leaq 0x3fe0f(%rip), %rsi # 0x5be71
movq %rbx, %rdi
callq 0x22d0
testl %eax, %eax
je 0x1c094
leaq 0x3f866(%rip), %rsi # 0x5b8db
movq %rbx, %rdi
callq 0x22d0
testl %eax, %eax
je 0x1c094
leaq 0x3fd30(%rip), %rsi # 0x5bdb8
movq %rbx, %rdi
callq 0x22d0
testl %eax, %eax
jne 0x1c0b8
cmpb $0x1, 0x71341(%rip) # 0x8d3dc
jne 0x1c0c5
leaq 0x3fdd2(%rip), %rsi # 0x5be76
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x55afd
jmp 0x1c0d9
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3fdaa(%rip), %rsi # 0x5be76
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x22e0
leaq 0x7125c(%rip), %rax # 0x8d33c
incl (%rax)
movl $0x21, (%r15)
xorl %ebp, %ebp
jmp 0x1c0b8
| _ZN12LefDefParser15lefwMacroSourceEPKc:
push rbp
push r15
push r14
push rbx
push rax
mov cs:_ZN12LefDefParserL15lefwObsoleteNumE, 35h ; '5'; LefDefParser::lefwObsoleteNum
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov r14, [rax]
test r14, r14
jz loc_1C0B3
lea rax, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit
mov ebp, 2
cmp dword ptr [rax], 0
jz loc_1C0B8
mov rbx, rdi
lea r15, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
mov eax, [r15]
cmp eax, 21h ; '!'
jz short loc_1C035
cmp eax, 9
jnz loc_1C0B8
loc_1C035:
movsd xmm0, cs:_ZN12LefDefParserL10versionNumE; LefDefParser::versionNum
mov ebp, 7
ucomisd xmm0, cs:qword_6AAE8
jnb short loc_1C0B8
mov ebp, 3
test rbx, rbx
jz short loc_1C0B8
cmp byte ptr [rbx], 0
jz short loc_1C0B8
lea rsi, aUser; "USER"
mov rdi, rbx
call _strcmp
test eax, eax
jz short loc_1C094
lea rsi, aViaruleSGenera+0Bh; "GENERATE"
mov rdi, rbx
call _strcmp
test eax, eax
jz short loc_1C094
lea rsi, aBlock; "BLOCK"
mov rdi, rbx
call _strcmp
test eax, eax
jnz short loc_1C0B8
loc_1C094:
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt
jnz short loc_1C0C5
lea rsi, aSourceS; " SOURCE %s ;\n"
mov rdi, r14
mov rdx, rbx
xor eax, eax
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
jmp short loc_1C0D9
loc_1C0B3:
mov ebp, 1
loc_1C0B8:
mov eax, ebp
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_1C0C5:
lea rsi, aSourceS; " SOURCE %s ;\n"
mov rdi, r14
mov rdx, rbx
xor eax, eax
call _fprintf
loc_1C0D9:
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
inc dword ptr [rax]
mov dword ptr [r15], 21h ; '!'
xor ebp, ebp
jmp short loc_1C0B8
| long long LefDefParser::lefwMacroSource(LefDefParser *this, const char *a2)
{
long long v2; // r14
unsigned int v3; // ebp
int v4; // ecx
int v5; // r8d
int v6; // r9d
LefDefParser::lefwObsoleteNum = 53;
v2 = *(_QWORD *)&LefDefParser::lefwFile;
if ( *(_QWORD *)&LefDefParser::lefwFile )
{
v3 = 2;
if ( LefDefParser::lefwDidInit && (LefDefParser::lefwState == 33 || LefDefParser::lefwState == 9) )
{
v3 = 7;
if ( *(double *)&LefDefParser::versionNum < 5.6 )
{
v3 = 3;
if ( this )
{
if ( *(_BYTE *)this
&& (!(unsigned int)strcmp(this, "USER")
|| !(unsigned int)strcmp(this, "GENERATE")
|| !(unsigned int)strcmp(this, "BLOCK")) )
{
if ( LefDefParser::lefwWriteEncrypt == 1 )
LefDefParser::encPrint(v2, (unsigned int)" SOURCE %s ;\n", (_DWORD)this, v4, v5, v6);
else
fprintf(v2, " SOURCE %s ;\n", (const char *)this);
++LefDefParser::lefwLines;
LefDefParser::lefwState = 33;
return 0;
}
}
}
}
}
else
{
return 1;
}
return v3;
}
| lefwMacroSource:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV dword ptr [0x0018ceb8],0x35
LEA RAX,[0x18d0f0]
MOV R14,qword ptr [RAX]
TEST R14,R14
JZ 0x0011c0b3
LEA RAX,[0x18d344]
MOV EBP,0x2
CMP dword ptr [RAX],0x0
JZ 0x0011c0b8
MOV RBX,RDI
LEA R15,[0x18d340]
MOV EAX,dword ptr [R15]
CMP EAX,0x21
JZ 0x0011c035
CMP EAX,0x9
JNZ 0x0011c0b8
LAB_0011c035:
MOVSD XMM0,qword ptr [0x0018ceb0]
MOV EBP,0x7
UCOMISD XMM0,qword ptr [0x0016aae8]
JNC 0x0011c0b8
MOV EBP,0x3
TEST RBX,RBX
JZ 0x0011c0b8
CMP byte ptr [RBX],0x0
JZ 0x0011c0b8
LEA RSI,[0x15be71]
MOV RDI,RBX
CALL 0x001022d0
TEST EAX,EAX
JZ 0x0011c094
LEA RSI,[0x15b8db]
MOV RDI,RBX
CALL 0x001022d0
TEST EAX,EAX
JZ 0x0011c094
LEA RSI,[0x15bdb8]
MOV RDI,RBX
CALL 0x001022d0
TEST EAX,EAX
JNZ 0x0011c0b8
LAB_0011c094:
CMP byte ptr [0x0018d3dc],0x1
JNZ 0x0011c0c5
LEA RSI,[0x15be76]
MOV RDI,R14
MOV RDX,RBX
XOR EAX,EAX
CALL 0x00155afd
JMP 0x0011c0d9
LAB_0011c0b3:
MOV EBP,0x1
LAB_0011c0b8:
MOV EAX,EBP
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0011c0c5:
LEA RSI,[0x15be76]
MOV RDI,R14
MOV RDX,RBX
XOR EAX,EAX
CALL 0x001022e0
LAB_0011c0d9:
LEA RAX,[0x18d33c]
INC dword ptr [RAX]
MOV dword ptr [R15],0x21
XOR EBP,EBP
JMP 0x0011c0b8
|
/* LefDefParser::lefwMacroSource(char const*) */
int8 LefDefParser::lefwMacroSource(char *param_1)
{
_IO_FILE *__stream;
int iVar1;
int8 uVar2;
__stream = lefwFile;
lefwObsoleteNum = 0x35;
if (lefwFile == (_IO_FILE *)0x0) {
uVar2 = 1;
}
else {
uVar2 = 2;
if ((lefwDidInit != 0) &&
((((lefwState == 0x21 || (lefwState == 9)) && (uVar2 = 7, versionNum < DAT_0016aae8)) &&
((uVar2 = 3, param_1 != (char *)0x0 && (*param_1 != '\0')))))) {
iVar1 = strcmp(param_1,"USER");
if ((iVar1 != 0) &&
((iVar1 = strcmp(param_1,"GENERATE"), iVar1 != 0 &&
(iVar1 = strcmp(param_1,"BLOCK"), iVar1 != 0)))) {
return 3;
}
if (lefwWriteEncrypt == '\x01') {
encPrint(__stream," SOURCE %s ;\n",param_1);
}
else {
fprintf(__stream," SOURCE %s ;\n",param_1);
}
lefwLines = lefwLines + 1;
lefwState = 0x21;
uVar2 = 0;
}
}
return uVar2;
}
| |
21,298 | flux::parser::TypeOfExpr::clone() const | kvthweatt[P]FluxLang/src/parser/ast.cpp | std::unique_ptr<Expr> TypeOfExpr::clone() const {
return std::make_unique<TypeOfExpr>(expression->clone(), range);
} | O1 | cpp | flux::parser::TypeOfExpr::clone() const:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x28(%rsi), %rsi
movq (%rsi), %rax
movq %rsp, %rdi
callq *0x18(%rax)
movl $0x30, %edi
callq 0x6270
movq (%rsp), %rcx
movq $0x0, (%rsp)
leaq 0x2a910(%rip), %rdx # 0x3ac60
movq %rdx, (%rax)
movups 0x8(%r14), %xmm0
movups 0x18(%r14), %xmm1
movups %xmm0, 0x8(%rax)
movups %xmm1, 0x18(%rax)
leaq 0x29b3c(%rip), %rdx # 0x39ea8
movq %rdx, (%rax)
movq %rcx, 0x28(%rax)
movq %rax, (%rbx)
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x10385
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x103a2
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rdi
callq 0x6440
| _ZNK4flux6parser10TypeOfExpr5cloneEv:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov rsi, [rsi+28h]
mov rax, [rsi]
mov rdi, rsp
call qword ptr [rax+18h]
mov edi, 30h ; '0'; unsigned __int64
call __Znwm; operator new(ulong)
mov rcx, [rsp+18h+var_18]
mov [rsp+18h+var_18], 0
lea rdx, off_3AC60
mov [rax], rdx
movups xmm0, xmmword ptr [r14+8]
movups xmm1, xmmword ptr [r14+18h]
movups xmmword ptr [rax+8], xmm0
movups xmmword ptr [rax+18h], xmm1
lea rdx, off_39EA8
mov [rax], rdx
mov [rax+28h], rcx
mov [rbx], rax
mov rdi, [rsp+18h+var_18]
test rdi, rdi
jz short loc_10385
mov rax, [rdi]
call qword ptr [rax+8]
loc_10385:
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
mov rbx, rax
mov rdi, [rsp+0]
test rdi, rdi
jz short loc_103A2
mov rax, [rdi]
call qword ptr [rax+8]
loc_103A2:
mov rdi, rbx
call __Unwind_Resume
| flux::parser::TypeOfExpr * flux::parser::TypeOfExpr::clone(flux::parser::TypeOfExpr *this, long long a2)
{
long long v2; // rax
long long v3; // rax
long long v4; // rcx
__int128 v5; // xmm1
_QWORD v7[3]; // [rsp+0h] [rbp-18h] BYREF
v7[0] = v2;
(*(void ( **)(_QWORD *))(**(_QWORD **)(a2 + 40) + 24LL))(v7);
v3 = operator new(0x30uLL);
v4 = v7[0];
v7[0] = 0LL;
*(_QWORD *)v3 = &off_3AC60;
v5 = *(_OWORD *)(a2 + 24);
*(_OWORD *)(v3 + 8) = *(_OWORD *)(a2 + 8);
*(_OWORD *)(v3 + 24) = v5;
*(_QWORD *)v3 = off_39EA8;
*(_QWORD *)(v3 + 40) = v4;
*(_QWORD *)this = v3;
if ( v7[0] )
(*(void ( **)(_QWORD))(*(_QWORD *)v7[0] + 8LL))(v7[0]);
return this;
}
| clone:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV RSI,qword ptr [RSI + 0x28]
MOV RAX,qword ptr [RSI]
MOV RDI,RSP
CALL qword ptr [RAX + 0x18]
LAB_00110333:
MOV EDI,0x30
CALL 0x00106270
LAB_0011033d:
MOV RCX,qword ptr [RSP]
MOV qword ptr [RSP],0x0
LEA RDX,[0x13ac60]
MOV qword ptr [RAX],RDX
MOVUPS XMM0,xmmword ptr [R14 + 0x8]
MOVUPS XMM1,xmmword ptr [R14 + 0x18]
MOVUPS xmmword ptr [RAX + 0x8],XMM0
MOVUPS xmmword ptr [RAX + 0x18],XMM1
LEA RDX,[0x139ea8]
MOV qword ptr [RAX],RDX
MOV qword ptr [RAX + 0x28],RCX
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RSP]
TEST RDI,RDI
JZ 0x00110385
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_00110385:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* WARNING: Removing unreachable block (ram,0x0011037f) */
/* flux::parser::TypeOfExpr::clone() const */
void flux::parser::TypeOfExpr::clone(void)
{
int4 uVar1;
int4 uVar2;
int4 uVar3;
int4 uVar4;
int4 uVar5;
int4 uVar6;
int4 uVar7;
int8 in_RAX;
int8 *puVar8;
long in_RSI;
int8 *in_RDI;
int8 local_18;
local_18 = in_RAX;
(**(code **)(**(long **)(in_RSI + 0x28) + 0x18))(&local_18);
/* try { // try from 00110333 to 0011033c has its CatchHandler @ 00110390 */
puVar8 = (int8 *)operator_new(0x30);
*puVar8 = &PTR__Expr_0013ac60;
uVar1 = *(int4 *)(in_RSI + 0xc);
uVar2 = *(int4 *)(in_RSI + 0x10);
uVar3 = *(int4 *)(in_RSI + 0x14);
uVar4 = *(int4 *)(in_RSI + 0x18);
uVar5 = *(int4 *)(in_RSI + 0x1c);
uVar6 = *(int4 *)(in_RSI + 0x20);
uVar7 = *(int4 *)(in_RSI + 0x24);
*(int4 *)(puVar8 + 1) = *(int4 *)(in_RSI + 8);
*(int4 *)((long)puVar8 + 0xc) = uVar1;
*(int4 *)(puVar8 + 2) = uVar2;
*(int4 *)((long)puVar8 + 0x14) = uVar3;
*(int4 *)(puVar8 + 3) = uVar4;
*(int4 *)((long)puVar8 + 0x1c) = uVar5;
*(int4 *)(puVar8 + 4) = uVar6;
*(int4 *)((long)puVar8 + 0x24) = uVar7;
*puVar8 = &PTR__TypeOfExpr_00139ea8;
puVar8[5] = local_18;
*in_RDI = puVar8;
return;
}
| |
21,299 | TextToCamel | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtext.c | const char *TextToCamel(const char *text)
{
static char buffer[MAX_TEXT_BUFFER_LENGTH] = {0};
memset(buffer, 0, MAX_TEXT_BUFFER_LENGTH);
if (text != NULL)
{
// Lower case first character
if ((text[0] >= 'A') && (text[0] <= 'Z')) buffer[0] = text[0] + 32;
else buffer[0] = text[0];
// Check for next separator to upper case another character
for (int i = 1, j = 1; (i < MAX_TEXT_BUFFER_LENGTH - 1) && (text[j] != '\0'); i++, j++)
{
if (text[j] != '_') buffer[i] = text[j];
else
{
j++;
if ((text[j] >= 'a') && (text[j] <= 'z')) buffer[i] = text[j] - 32;
}
}
}
return buffer;
} | O3 | c | TextToCamel:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xbea3b(%rip), %r14 # 0x144940
movl $0x400, %edx # imm = 0x400
movq %r14, %rdi
xorl %esi, %esi
callq 0xa2d0
testq %rbx, %rbx
je 0x85f73
movzbl (%rbx), %eax
leal -0x41(%rax), %ecx
leal 0x20(%rax), %edx
cmpb $0x1a, %cl
movzbl %dl, %ecx
cmovael %eax, %ecx
movb %cl, 0xbea0f(%rip) # 0x144940
movl $0x1, %ecx
movl $0x1, %eax
movslq %ecx, %rsi
movzbl (%rbx,%rsi), %edx
cmpl $0x5f, %edx
je 0x85f4d
testl %edx, %edx
jne 0x85f62
jmp 0x85f73
movb 0x1(%rbx,%rsi), %dl
incq %rsi
movl %esi, %ecx
leal -0x61(%rdx), %esi
cmpb $0x19, %sil
ja 0x85f66
addb $-0x20, %dl
movb %dl, (%rax,%r14)
incq %rax
incl %ecx
cmpq $0x3ff, %rax # imm = 0x3FF
jne 0x85f3b
leaq 0xbe9c6(%rip), %rax # 0x144940
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| TextToCamel:
push r14
push rbx
push rax
mov rbx, rdi
lea r14, TextToCamel_buffer
mov edx, 400h
mov rdi, r14
xor esi, esi
call _memset
test rbx, rbx
jz short loc_85F73
movzx eax, byte ptr [rbx]
lea ecx, [rax-41h]
lea edx, [rax+20h]
cmp cl, 1Ah
movzx ecx, dl
cmovnb ecx, eax
mov cs:TextToCamel_buffer, cl
mov ecx, 1
mov eax, 1
loc_85F3B:
movsxd rsi, ecx
movzx edx, byte ptr [rbx+rsi]
cmp edx, 5Fh ; '_'
jz short loc_85F4D
test edx, edx
jnz short loc_85F62
jmp short loc_85F73
loc_85F4D:
mov dl, [rbx+rsi+1]
inc rsi
mov ecx, esi
lea esi, [rdx-61h]
cmp sil, 19h
ja short loc_85F66
add dl, 0E0h
loc_85F62:
mov [rax+r14], dl
loc_85F66:
inc rax
inc ecx
cmp rax, 3FFh
jnz short loc_85F3B
loc_85F73:
lea rax, TextToCamel_buffer
add rsp, 8
pop rbx
pop r14
retn
| char * TextToCamel(char *a1)
{
char v1; // cl
int v2; // ecx
long long v3; // rax
int v4; // edx
char v5; // dl
memset(TextToCamel_buffer, 0LL, sizeof(TextToCamel_buffer));
if ( a1 )
{
v1 = *a1 + 32;
if ( (unsigned __int8)(*a1 - 65) >= 0x1Au )
v1 = *a1;
TextToCamel_buffer[0] = v1;
v2 = 1;
v3 = 1LL;
while ( 1 )
{
v4 = (unsigned __int8)a1[v2];
if ( v4 != 95 )
break;
v5 = a1[++v2];
if ( (unsigned __int8)(v5 - 97) <= 0x19u )
{
LOBYTE(v4) = v5 - 32;
LABEL_10:
TextToCamel_buffer[v3] = v4;
}
++v3;
++v2;
if ( v3 == 1023 )
return TextToCamel_buffer;
}
if ( !a1[v2] )
return TextToCamel_buffer;
goto LABEL_10;
}
return TextToCamel_buffer;
}
| TextToCamel:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA R14,[0x244940]
MOV EDX,0x400
MOV RDI,R14
XOR ESI,ESI
CALL 0x0010a2d0
TEST RBX,RBX
JZ 0x00185f73
MOVZX EAX,byte ptr [RBX]
LEA ECX,[RAX + -0x41]
LEA EDX,[RAX + 0x20]
CMP CL,0x1a
MOVZX ECX,DL
CMOVNC ECX,EAX
MOV byte ptr [0x00244940],CL
MOV ECX,0x1
MOV EAX,0x1
LAB_00185f3b:
MOVSXD RSI,ECX
MOVZX EDX,byte ptr [RBX + RSI*0x1]
CMP EDX,0x5f
JZ 0x00185f4d
TEST EDX,EDX
JNZ 0x00185f62
JMP 0x00185f73
LAB_00185f4d:
MOV DL,byte ptr [RBX + RSI*0x1 + 0x1]
INC RSI
MOV ECX,ESI
LEA ESI,[RDX + -0x61]
CMP SIL,0x19
JA 0x00185f66
ADD DL,0xe0
LAB_00185f62:
MOV byte ptr [RAX + R14*0x1],DL
LAB_00185f66:
INC RAX
INC ECX
CMP RAX,0x3ff
JNZ 0x00185f3b
LAB_00185f73:
LEA RAX,[0x244940]
ADD RSP,0x8
POP RBX
POP R14
RET
|
int1 * TextToCamel(char *param_1)
{
long lVar1;
int iVar2;
char cVar3;
long lVar4;
memset(TextToCamel_buffer,0,0x400);
if (param_1 != (char *)0x0) {
cVar3 = *param_1;
TextToCamel_buffer[0] = cVar3 + ' ';
if (0x19 < (byte)(cVar3 + 0xbfU)) {
TextToCamel_buffer[0] = cVar3;
}
iVar2 = 1;
lVar1 = 1;
do {
cVar3 = param_1[iVar2];
if (cVar3 == '_') {
lVar4 = (long)iVar2;
iVar2 = iVar2 + 1;
if ((byte)(param_1[lVar4 + 1] + 0x9fU) < 0x1a) {
cVar3 = param_1[lVar4 + 1] + -0x20;
goto LAB_00185f62;
}
}
else {
if (cVar3 == '\0') break;
LAB_00185f62:
TextToCamel_buffer[lVar1] = cVar3;
}
lVar1 = lVar1 + 1;
iVar2 = iVar2 + 1;
} while (lVar1 != 0x3ff);
}
return TextToCamel_buffer;
}
|
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.