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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
24,200 | my_like_range_simple | eloqsql/strings/ctype-simple.c | my_bool my_like_range_simple(CHARSET_INFO *cs,
const char *ptr, size_t ptr_length,
pbool escape, pbool w_one, pbool w_many,
size_t res_length,
char *min_str,char *max_str,
size_t *min_length, size_t *max_length)
{
const char *end= ptr + ptr_length;
char *min_org=min_str;
char *min_end=min_str+res_length;
size_t charlen= res_length / cs->mbmaxlen;
for (; ptr != end && min_str != min_end && charlen > 0 ; ptr++, charlen--)
{
if (*ptr == escape && ptr+1 != end)
{
ptr++; /* Skip escape */
*min_str++= *max_str++ = *ptr;
continue;
}
if (*ptr == w_one) /* '_' in SQL */
{
*min_str++='\0'; /* This should be min char */
*max_str++= (char) cs->max_sort_char;
continue;
}
if (*ptr == w_many) /* '%' in SQL */
{
/* Calculate length of keys */
*min_length= (cs->state & (MY_CS_BINSORT | MY_CS_NOPAD)) ?
(size_t) (min_str - min_org) :
res_length;
*max_length= res_length;
do
{
*min_str++= 0;
*max_str++= (char) cs->max_sort_char;
} while (min_str != min_end);
return 0;
}
*min_str++= *max_str++ = *ptr;
}
*min_length= *max_length = (size_t) (min_str - min_org);
while (min_str != min_end)
*min_str++= *max_str++ = ' '; /* Because if key compression */
return 0;
} | O0 | c | my_like_range_simple:
pushq %rbp
movq %rsp, %rbp
movl %r8d, -0x60(%rbp)
movl %ecx, %eax
movl -0x60(%rbp), %ecx
movl %eax, -0x5c(%rbp)
movq %rdx, %rax
movl -0x5c(%rbp), %edx
movq %rax, -0x58(%rbp)
movq %rsi, %rax
movq -0x58(%rbp), %rsi
movq %rax, -0x50(%rbp)
movq %rdi, %r8
movq -0x50(%rbp), %rdi
movb %r9b, %al
movq 0x30(%rbp), %r9
movq 0x28(%rbp), %r9
movq 0x20(%rbp), %r9
movq 0x18(%rbp), %r9
movq 0x10(%rbp), %r9
movq %r8, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movb %dl, -0x21(%rbp)
movb %cl, -0x22(%rbp)
movb %al, -0x23(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq 0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq 0x18(%rbp), %rax
addq 0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq 0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x9c(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq -0x30(%rbp), %rcx
movb %al, -0x61(%rbp)
je 0x56c08
movq 0x18(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x61(%rbp)
je 0x56c08
cmpq $0x0, -0x48(%rbp)
seta %al
movb %al, -0x61(%rbp)
movb -0x61(%rbp), %al
testb $0x1, %al
jne 0x56c14
jmp 0x56d89
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
movsbl -0x21(%rbp), %ecx
cmpl %ecx, %eax
jne 0x56c6a
movq -0x18(%rbp), %rax
addq $0x1, %rax
cmpq -0x30(%rbp), %rax
je 0x56c6a
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb (%rax), %cl
movq 0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x20(%rbp)
movb %cl, (%rax)
movq 0x18(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x18(%rbp)
movb %cl, (%rax)
jmp 0x56d6c
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
movsbl -0x22(%rbp), %ecx
cmpl %ecx, %eax
jne 0x56cae
movq 0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rbp)
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
movq 0xa8(%rax), %rax
movb %al, %cl
movq 0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x20(%rbp)
movb %cl, (%rax)
jmp 0x56d6c
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
movsbl -0x23(%rbp), %ecx
cmpl %ecx, %eax
jne 0x56d44
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x20010, %eax # imm = 0x20010
cmpl $0x0, %eax
je 0x56ce3
movq 0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x70(%rbp)
jmp 0x56ceb
movq 0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rcx
movq 0x28(%rbp), %rax
movq %rcx, (%rax)
movq 0x10(%rbp), %rcx
movq 0x30(%rbp), %rax
movq %rcx, (%rax)
movq 0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rbp)
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
movq 0xa8(%rax), %rax
movb %al, %cl
movq 0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x20(%rbp)
movb %cl, (%rax)
movq 0x18(%rbp), %rax
cmpq -0x40(%rbp), %rax
jne 0x56d01
movb $0x0, -0x1(%rbp)
jmp 0x56dd6
movq -0x18(%rbp), %rax
movb (%rax), %cl
movq 0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x20(%rbp)
movb %cl, (%rax)
movq 0x18(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x18(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x48(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x56bdf
movq 0x18(%rbp), %rcx
movq -0x38(%rbp), %rax
subq %rax, %rcx
movq 0x30(%rbp), %rax
movq %rcx, (%rax)
movq 0x28(%rbp), %rax
movq %rcx, (%rax)
movq 0x18(%rbp), %rax
cmpq -0x40(%rbp), %rax
je 0x56dd2
movq 0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x20(%rbp)
movb $0x20, (%rax)
movq 0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rbp)
movb $0x20, (%rax)
jmp 0x56da2
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopl (%rax,%rax)
| my_like_range_simple:
push rbp
mov rbp, rsp
mov [rbp+var_60], r8d
mov eax, ecx
mov ecx, [rbp+var_60]
mov [rbp+var_5C], eax
mov rax, rdx
mov edx, [rbp+var_5C]
mov [rbp+var_58], rax
mov rax, rsi
mov rsi, [rbp+var_58]
mov [rbp+var_50], rax
mov r8, rdi
mov rdi, [rbp+var_50]
mov al, r9b
mov r9, [rbp+arg_20]
mov r9, [rbp+arg_18]
mov r9, [rbp+arg_10]
mov r9, [rbp+arg_8]
mov r9, [rbp+arg_0]
mov [rbp+var_10], r8
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov [rbp+var_21], dl
mov [rbp+var_22], cl
mov [rbp+var_23], al
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_30], rax
mov rax, [rbp+arg_8]
mov [rbp+var_38], rax
mov rax, [rbp+arg_8]
add rax, [rbp+arg_0]
mov [rbp+var_40], rax
mov rax, [rbp+arg_0]
mov rcx, [rbp+var_10]
mov ecx, [rcx+9Ch]
xor edx, edx
div rcx
mov [rbp+var_48], rax
loc_56BDF:
mov rcx, [rbp+var_18]
xor eax, eax
cmp rcx, [rbp+var_30]
mov [rbp+var_61], al
jz short loc_56C08
mov rcx, [rbp+arg_8]
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_61], al
jz short loc_56C08
cmp [rbp+var_48], 0
setnbe al
mov [rbp+var_61], al
loc_56C08:
mov al, [rbp+var_61]
test al, 1
jnz short loc_56C14
jmp loc_56D89
loc_56C14:
mov rax, [rbp+var_18]
movsx eax, byte ptr [rax]
movsx ecx, [rbp+var_21]
cmp eax, ecx
jnz short loc_56C6A
mov rax, [rbp+var_18]
add rax, 1
cmp rax, [rbp+var_30]
jz short loc_56C6A
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov cl, [rax]
mov rax, [rbp+arg_10]
mov rdx, rax
add rdx, 1
mov [rbp+arg_10], rdx
mov [rax], cl
mov rax, [rbp+arg_8]
mov rdx, rax
add rdx, 1
mov [rbp+arg_8], rdx
mov [rax], cl
jmp loc_56D6C
loc_56C6A:
mov rax, [rbp+var_18]
movsx eax, byte ptr [rax]
movsx ecx, [rbp+var_22]
cmp eax, ecx
jnz short loc_56CAE
mov rax, [rbp+arg_8]
mov rcx, rax
add rcx, 1
mov [rbp+arg_8], rcx
mov byte ptr [rax], 0
mov rax, [rbp+var_10]
mov rax, [rax+0A8h]
mov cl, al
mov rax, [rbp+arg_10]
mov rdx, rax
add rdx, 1
mov [rbp+arg_10], rdx
mov [rax], cl
jmp loc_56D6C
loc_56CAE:
mov rax, [rbp+var_18]
movsx eax, byte ptr [rax]
movsx ecx, [rbp+var_23]
cmp eax, ecx
jnz loc_56D44
mov rax, [rbp+var_10]
mov eax, [rax+0Ch]
and eax, 20010h
cmp eax, 0
jz short loc_56CE3
mov rax, [rbp+arg_8]
mov rcx, [rbp+var_38]
sub rax, rcx
mov [rbp+var_70], rax
jmp short loc_56CEB
loc_56CE3:
mov rax, [rbp+arg_0]
mov [rbp+var_70], rax
loc_56CEB:
mov rcx, [rbp+var_70]
mov rax, [rbp+arg_18]
mov [rax], rcx
mov rcx, [rbp+arg_0]
mov rax, [rbp+arg_20]
mov [rax], rcx
loc_56D01:
mov rax, [rbp+arg_8]
mov rcx, rax
add rcx, 1
mov [rbp+arg_8], rcx
mov byte ptr [rax], 0
mov rax, [rbp+var_10]
mov rax, [rax+0A8h]
mov cl, al
mov rax, [rbp+arg_10]
mov rdx, rax
add rdx, 1
mov [rbp+arg_10], rdx
mov [rax], cl
mov rax, [rbp+arg_8]
cmp rax, [rbp+var_40]
jnz short loc_56D01
mov [rbp+var_1], 0
jmp loc_56DD6
loc_56D44:
mov rax, [rbp+var_18]
mov cl, [rax]
mov rax, [rbp+arg_10]
mov rdx, rax
add rdx, 1
mov [rbp+arg_10], rdx
mov [rax], cl
mov rax, [rbp+arg_8]
mov rdx, rax
add rdx, 1
mov [rbp+arg_8], rdx
mov [rax], cl
loc_56D6C:
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
mov rax, [rbp+var_48]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_48], rax
jmp loc_56BDF
loc_56D89:
mov rcx, [rbp+arg_8]
mov rax, [rbp+var_38]
sub rcx, rax
mov rax, [rbp+arg_20]
mov [rax], rcx
mov rax, [rbp+arg_18]
mov [rax], rcx
loc_56DA2:
mov rax, [rbp+arg_8]
cmp rax, [rbp+var_40]
jz short loc_56DD2
mov rax, [rbp+arg_10]
mov rcx, rax
add rcx, 1
mov [rbp+arg_10], rcx
mov byte ptr [rax], 20h ; ' '
mov rax, [rbp+arg_8]
mov rcx, rax
add rcx, 1
mov [rbp+arg_8], rcx
mov byte ptr [rax], 20h ; ' '
jmp short loc_56DA2
loc_56DD2:
mov [rbp+var_1], 0
loc_56DD6:
mov al, [rbp+var_1]
pop rbp
retn
| char my_like_range_simple(
long long a1,
_BYTE *a2,
long long a3,
char a4,
char a5,
char a6,
unsigned long long a7,
_BYTE *a8,
_BYTE *a9,
unsigned long long *a10,
_QWORD *a11)
{
char v11; // cl
_BYTE *v12; // rax
_BYTE *v13; // rax
_BYTE *v14; // rax
_BYTE *v15; // rax
_BYTE *v16; // rax
_BYTE *v17; // rax
char v18; // cl
_BYTE *v19; // rax
_BYTE *v20; // rax
_BYTE *v21; // rax
_BYTE *v22; // rax
unsigned long long v24; // [rsp+0h] [rbp-70h]
bool v25; // [rsp+Fh] [rbp-61h]
unsigned long long i; // [rsp+28h] [rbp-48h]
_BYTE *v27; // [rsp+30h] [rbp-40h]
long long v28; // [rsp+38h] [rbp-38h]
_BYTE *v29; // [rsp+40h] [rbp-30h]
_BYTE *v31; // [rsp+58h] [rbp-18h]
v31 = a2;
v29 = &a2[a3];
v28 = (long long)a8;
v27 = &a8[a7];
for ( i = a7 / *(unsigned int *)(a1 + 156); ; --i )
{
v25 = 0;
if ( v31 != v29 )
{
v25 = 0;
if ( a8 != v27 )
v25 = i != 0;
}
if ( !v25 )
{
*a11 = &a8[-v28];
*a10 = (unsigned long long)&a8[-v28];
while ( a8 != v27 )
{
v21 = a9++;
*v21 = 32;
v22 = a8++;
*v22 = 32;
}
return 0;
}
if ( (char)*v31 == a4 && v31 + 1 != v29 )
{
v11 = *++v31;
v12 = a9++;
*v12 = *v31;
v13 = a8++;
*v13 = v11;
goto LABEL_19;
}
if ( (char)*v31 == a5 )
{
v14 = a8++;
*v14 = 0;
v15 = a9++;
*v15 = *(_QWORD *)(a1 + 168);
goto LABEL_19;
}
if ( (char)*v31 == a6 )
break;
v18 = *v31;
v19 = a9++;
*v19 = *v31;
v20 = a8++;
*v20 = v18;
LABEL_19:
++v31;
}
if ( (*(_DWORD *)(a1 + 12) & 0x20010) != 0 )
v24 = (unsigned long long)&a8[-v28];
else
v24 = a7;
*a10 = v24;
*a11 = a7;
do
{
v16 = a8++;
*v16 = 0;
v17 = a9++;
*v17 = *(_QWORD *)(a1 + 168);
}
while ( a8 != v27 );
return 0;
}
| my_like_range_simple:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x60],R8D
MOV EAX,ECX
MOV ECX,dword ptr [RBP + -0x60]
MOV dword ptr [RBP + -0x5c],EAX
MOV RAX,RDX
MOV EDX,dword ptr [RBP + -0x5c]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,RSI
MOV RSI,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x50],RAX
MOV R8,RDI
MOV RDI,qword ptr [RBP + -0x50]
MOV AL,R9B
MOV R9,qword ptr [RBP + 0x30]
MOV R9,qword ptr [RBP + 0x28]
MOV R9,qword ptr [RBP + 0x20]
MOV R9,qword ptr [RBP + 0x18]
MOV R9,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x10],R8
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV byte ptr [RBP + -0x21],DL
MOV byte ptr [RBP + -0x22],CL
MOV byte ptr [RBP + -0x23],AL
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + 0x18]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + 0x18]
ADD RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + 0x10]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x9c]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x48],RAX
LAB_00156bdf:
MOV RCX,qword ptr [RBP + -0x18]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x30]
MOV byte ptr [RBP + -0x61],AL
JZ 0x00156c08
MOV RCX,qword ptr [RBP + 0x18]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x61],AL
JZ 0x00156c08
CMP qword ptr [RBP + -0x48],0x0
SETA AL
MOV byte ptr [RBP + -0x61],AL
LAB_00156c08:
MOV AL,byte ptr [RBP + -0x61]
TEST AL,0x1
JNZ 0x00156c14
JMP 0x00156d89
LAB_00156c14:
MOV RAX,qword ptr [RBP + -0x18]
MOVSX EAX,byte ptr [RAX]
MOVSX ECX,byte ptr [RBP + -0x21]
CMP EAX,ECX
JNZ 0x00156c6a
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
CMP RAX,qword ptr [RBP + -0x30]
JZ 0x00156c6a
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + 0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + 0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + 0x18]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + 0x18],RDX
MOV byte ptr [RAX],CL
JMP 0x00156d6c
LAB_00156c6a:
MOV RAX,qword ptr [RBP + -0x18]
MOVSX EAX,byte ptr [RAX]
MOVSX ECX,byte ptr [RBP + -0x22]
CMP EAX,ECX
JNZ 0x00156cae
MOV RAX,qword ptr [RBP + 0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + 0x18],RCX
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xa8]
MOV CL,AL
MOV RAX,qword ptr [RBP + 0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + 0x20],RDX
MOV byte ptr [RAX],CL
JMP 0x00156d6c
LAB_00156cae:
MOV RAX,qword ptr [RBP + -0x18]
MOVSX EAX,byte ptr [RAX]
MOVSX ECX,byte ptr [RBP + -0x23]
CMP EAX,ECX
JNZ 0x00156d44
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,0x20010
CMP EAX,0x0
JZ 0x00156ce3
MOV RAX,qword ptr [RBP + 0x18]
MOV RCX,qword ptr [RBP + -0x38]
SUB RAX,RCX
MOV qword ptr [RBP + -0x70],RAX
JMP 0x00156ceb
LAB_00156ce3:
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x70],RAX
LAB_00156ceb:
MOV RCX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + 0x28]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + 0x30]
MOV qword ptr [RAX],RCX
LAB_00156d01:
MOV RAX,qword ptr [RBP + 0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + 0x18],RCX
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xa8]
MOV CL,AL
MOV RAX,qword ptr [RBP + 0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + 0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + 0x18]
CMP RAX,qword ptr [RBP + -0x40]
JNZ 0x00156d01
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00156dd6
LAB_00156d44:
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + 0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + 0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + 0x18]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + 0x18],RDX
MOV byte ptr [RAX],CL
LAB_00156d6c:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x48],RAX
JMP 0x00156bdf
LAB_00156d89:
MOV RCX,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + -0x38]
SUB RCX,RAX
MOV RAX,qword ptr [RBP + 0x30]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + 0x28]
MOV qword ptr [RAX],RCX
LAB_00156da2:
MOV RAX,qword ptr [RBP + 0x18]
CMP RAX,qword ptr [RBP + -0x40]
JZ 0x00156dd2
MOV RAX,qword ptr [RBP + 0x20]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + 0x20],RCX
MOV byte ptr [RAX],0x20
MOV RAX,qword ptr [RBP + 0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + 0x18],RCX
MOV byte ptr [RAX],0x20
JMP 0x00156da2
LAB_00156dd2:
MOV byte ptr [RBP + -0x1],0x0
LAB_00156dd6:
MOV AL,byte ptr [RBP + -0x1]
POP RBP
RET
|
int8
my_like_range_simple
(long param_1,char *param_2,long param_3,char param_4,char param_5,char param_6,
ulong param_7,char *param_8,char *param_9,ulong *param_10,ulong *param_11)
{
char cVar1;
char *pcVar2;
char *pcVar3;
ulong uVar4;
bool bVar5;
ulong local_78;
ulong local_50;
char *local_20;
pcVar3 = param_8;
pcVar2 = param_8 + param_7;
local_50 = param_7 / *(uint *)(param_1 + 0x9c);
local_20 = param_2;
while( true ) {
bVar5 = false;
if ((local_20 != param_2 + param_3) && (bVar5 = false, param_8 != pcVar2)) {
bVar5 = local_50 != 0;
}
if (!bVar5) break;
if ((*local_20 == param_4) && (local_20 + 1 != param_2 + param_3)) {
local_20 = local_20 + 1;
cVar1 = *local_20;
*param_9 = cVar1;
*param_8 = cVar1;
}
else if (*local_20 == param_5) {
*param_8 = '\0';
*param_9 = (char)*(int8 *)(param_1 + 0xa8);
}
else {
if (*local_20 == param_6) {
if ((*(uint *)(param_1 + 0xc) & 0x20010) == 0) {
local_78 = param_7;
}
else {
local_78 = (long)param_8 - (long)pcVar3;
}
*param_10 = local_78;
*param_11 = param_7;
do {
pcVar3 = param_8 + 1;
*param_8 = '\0';
*param_9 = (char)*(int8 *)(param_1 + 0xa8);
param_8 = pcVar3;
param_9 = param_9 + 1;
} while (pcVar3 != pcVar2);
return 0;
}
cVar1 = *local_20;
*param_9 = cVar1;
*param_8 = cVar1;
}
param_9 = param_9 + 1;
param_8 = param_8 + 1;
local_20 = local_20 + 1;
local_50 = local_50 - 1;
}
uVar4 = (long)param_8 - (long)pcVar3;
*param_11 = uVar4;
*param_10 = uVar4;
while (param_8 != pcVar2) {
*param_9 = ' ';
*param_8 = ' ';
param_8 = param_8 + 1;
param_9 = param_9 + 1;
}
return 0;
}
| |
24,201 | google::protobuf::internal::DuplicateIfNonNullInternal(google::protobuf::MessageLite*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/generated_message_util.cc | MessageLite* DuplicateIfNonNullInternal(MessageLite* message) {
if (message) {
MessageLite* ret = message->New();
ret->CheckTypeAndMergeFrom(*message);
return ret;
} else {
return nullptr;
}
} | O0 | cpp | google::protobuf::internal::DuplicateIfNonNullInternal(google::protobuf::MessageLite*):
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x1ab159
movq 0x8(%rsp), %rdi
callq 0x104e90
movq %rax, (%rsp)
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
movq (%rdi), %rax
callq *0x38(%rax)
movq (%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x1ab162
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nopl (%rax)
| _ZN6google8protobuf8internal26DuplicateIfNonNullInternalEPNS0_11MessageLiteE:
sub rsp, 18h
mov [rsp+18h+var_10], rdi
cmp [rsp+18h+var_10], 0
jz short loc_1AB159
mov rdi, [rsp+18h+var_10]; this
call _ZNK6google8protobuf11MessageLite3NewEv; google::protobuf::MessageLite::New(void)
mov [rsp+18h+var_18], rax
mov rdi, [rsp+18h+var_18]
mov rsi, [rsp+18h+var_10]
mov rax, [rdi]
call qword ptr [rax+38h]
mov rax, [rsp+18h+var_18]
mov [rsp+18h+var_8], rax
jmp short loc_1AB162
loc_1AB159:
mov [rsp+18h+var_8], 0
loc_1AB162:
mov rax, [rsp+18h+var_8]
add rsp, 18h
retn
| long long google::protobuf::internal::DuplicateIfNonNullInternal(
google::protobuf::internal *this,
google::protobuf::MessageLite *a2)
{
long long v3; // [rsp+0h] [rbp-18h]
if ( !this )
return 0LL;
v3 = google::protobuf::MessageLite::New(this);
(*(void ( **)(long long, google::protobuf::internal *))(*(_QWORD *)v3 + 56LL))(v3, this);
return v3;
}
| |||
24,202 | google::protobuf::internal::DuplicateIfNonNullInternal(google::protobuf::MessageLite*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/generated_message_util.cc | MessageLite* DuplicateIfNonNullInternal(MessageLite* message) {
if (message) {
MessageLite* ret = message->New();
ret->CheckTypeAndMergeFrom(*message);
return ret;
} else {
return nullptr;
}
} | O3 | cpp | google::protobuf::internal::DuplicateIfNonNullInternal(google::protobuf::MessageLite*):
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x9cabe
movq %rdi, %rbx
movq (%rdi), %rax
xorl %esi, %esi
callq *0x18(%rax)
movq %rax, %r14
movq (%rax), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0x38(%rax)
jmp 0x9cac1
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| _ZN6google8protobuf8internal26DuplicateIfNonNullInternalEPNS0_11MessageLiteE:
push r14
push rbx
push rax
test rdi, rdi
jz short loc_9CABE
mov rbx, rdi
mov rax, [rdi]
xor esi, esi
call qword ptr [rax+18h]
mov r14, rax
mov rax, [rax]
mov rdi, r14
mov rsi, rbx
call qword ptr [rax+38h]
jmp short loc_9CAC1
loc_9CABE:
xor r14d, r14d
loc_9CAC1:
mov rax, r14
add rsp, 8
pop rbx
pop r14
retn
| long long google::protobuf::internal::DuplicateIfNonNullInternal(
google::protobuf::internal *this,
google::protobuf::MessageLite *a2)
{
long long v2; // r14
if ( !this )
return 0LL;
v2 = (*(long long ( **)(google::protobuf::internal *, _QWORD))(*(_QWORD *)this + 24LL))(this, 0LL);
(*(void ( **)(long long, google::protobuf::internal *))(*(_QWORD *)v2 + 56LL))(v2, this);
return v2;
}
| DuplicateIfNonNullInternal:
PUSH R14
PUSH RBX
PUSH RAX
TEST RDI,RDI
JZ 0x0019cabe
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
XOR ESI,ESI
CALL qword ptr [RAX + 0x18]
MOV R14,RAX
MOV RAX,qword ptr [RAX]
MOV RDI,R14
MOV RSI,RBX
CALL qword ptr [RAX + 0x38]
JMP 0x0019cac1
LAB_0019cabe:
XOR R14D,R14D
LAB_0019cac1:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* google::protobuf::internal::DuplicateIfNonNullInternal(google::protobuf::MessageLite*) */
long * google::protobuf::internal::DuplicateIfNonNullInternal(MessageLite *param_1)
{
long *plVar1;
if (param_1 == (MessageLite *)0x0) {
plVar1 = (long *)0x0;
}
else {
plVar1 = (long *)(**(code **)(*(long *)param_1 + 0x18))(param_1,0);
(**(code **)(*plVar1 + 0x38))(plVar1,param_1);
}
return plVar1;
}
| |
24,203 | spdlog::details::os::getenv[abi:cxx11](char const*) | AlayaLite/build_O3/_deps/spdlog-src/include/spdlog/details/os-inl.h | std::string SPDLOG_INLINE getenv(const char *field) {
#if defined(_MSC_VER)
#if defined(__cplusplus_winrt)
return std::string{}; // not supported under uwp
#else
size_t len = 0;
char buf[128];
bool ok = ::getenv_s(&len, buf, sizeof(buf), field) == 0;
return ok ? buf : std::string{};
#endif
#else // revert to getenv
char *buf = ::getenv(field);
return buf ? buf : std::string{};
#endif
} | O3 | c | spdlog::details::os::getenv[abi:cxx11](char const*):
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x118a0
movq %rax, %r14
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
testq %r14, %r14
je 0x2d0a3
movq %r14, %rdi
callq 0x114d0
movq %r14, %rdx
addq %rax, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x19014
jmp 0x2d0af
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| _ZN6spdlog7details2os6getenvB5cxx11EPKc:
push r14
push rbx
push rax
mov rbx, rdi
mov rdi, rsi
call _getenv
mov r14, rax
lea rax, [rbx+10h]
mov [rbx], rax
test r14, r14
jz short loc_2D0A3
mov rdi, r14
call _strlen
mov rdx, r14
add rdx, rax
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)
jmp short loc_2D0AF
loc_2D0A3:
mov qword ptr [rbx+8], 0
mov byte ptr [rbx+10h], 0
loc_2D0AF:
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
| long long spdlog::details::os::getenv[abi:cxx11](long long a1, long long a2)
{
_BYTE *v2; // r14
long long v3; // rax
v2 = (_BYTE *)getenv(a2);
*(_QWORD *)a1 = a1 + 16;
if ( v2 )
{
v3 = strlen(v2);
std::string::_M_construct<char const*>((_QWORD *)a1, v2, (long long)&v2[v3]);
}
else
{
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
}
return a1;
}
| getenv[abi:cxx11]:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RDI,RSI
CALL 0x001118a0
MOV R14,RAX
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
TEST R14,R14
JZ 0x0012d0a3
MOV RDI,R14
CALL 0x001114d0
MOV RDX,R14
ADD RDX,RAX
MOV RDI,RBX
MOV RSI,R14
CALL 0x00119014
JMP 0x0012d0af
LAB_0012d0a3:
MOV qword ptr [RBX + 0x8],0x0
MOV byte ptr [RBX + 0x10],0x0
LAB_0012d0af:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* spdlog::details::os::getenv[abi:cxx11](char const*) */
os * __thiscall spdlog::details::os::getenv_abi_cxx11_(os *this,char *param_1)
{
char *__s;
size_t sVar1;
__s = getenv(param_1);
*(os **)this = this + 0x10;
if (__s == (char *)0x0) {
*(int8 *)(this + 8) = 0;
this[0x10] = (os)0x0;
}
else {
sVar1 = strlen(__s);
std::__cxx11::string::_M_construct<char_const*>(this,__s,__s + sVar1);
}
return this;
}
| |
24,204 | nlohmann::json_abi_v3_11_3::detail::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>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> 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>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool, bool) | monkey531[P]llama/common/./json.hpp | static ::nlohmann::detail::parser<basic_json, InputAdapterType> parser(
InputAdapterType adapter,
detail::parser_callback_t<basic_json>cb = nullptr,
const bool allow_exceptions = true,
const bool ignore_comments = false
)
{
return ::nlohmann::detail::parser<basic_json, InputAdapterType>(std::move(adapter),
std::move(cb), allow_exceptions, ignore_comments);
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::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>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> 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>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool, bool):
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movq %rsi, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq 0x18(%rcx), %rax
movq %rax, 0x18(%rsp)
movq 0x10(%rcx), %rax
testq %rax, %rax
je 0x4463d
movups (%rcx), %xmm1
addq $0x10, %rcx
movaps %xmm1, (%rsp)
movq %rax, 0x10(%rsp)
movups %xmm0, (%rcx)
movzbl %r8b, %ecx
movzbl %r9b, %r8d
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x44cf0
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x4466c
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
retq
jmp 0x44699
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x44691
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x18b90
movq %rax, %rdi
callq 0x2ad73
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6parserINS0_6detail22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS9_EEEEEENSF_6parserISD_T_EESO_St8functionIFbiNSF_13parse_event_tERSD_EEbb:
push rbx
sub rsp, 30h
mov rbx, rdi
mov [rsp+38h+var_18], rsi
mov [rsp+38h+var_10], rdx
xorps xmm0, xmm0
movaps [rsp+38h+var_38], xmm0
mov [rsp+38h+var_28], 0
mov rax, [rcx+18h]
mov [rsp+38h+var_20], rax
mov rax, [rcx+10h]
test rax, rax
jz short loc_4463D
movups xmm1, xmmword ptr [rcx]
add rcx, 10h
movaps [rsp+38h+var_38], xmm1
mov [rsp+38h+var_28], rax
movups xmmword ptr [rcx], xmm0
loc_4463D:
movzx ecx, r8b
movzx r8d, r9b
lea rsi, [rsp+38h+var_18]
mov rdx, rsp
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEEC2EOSM_St8functionIFbiNS1_13parse_event_tERSF_EEbb; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parser(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>&&,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)>,bool,bool)
mov rax, [rsp+38h+var_28]
test rax, rax
jz short loc_4466C
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_4466C:
mov rax, rbx
add rsp, 30h
pop rbx
retn
jmp short loc_44699
mov rbx, rax
mov rax, [rsp+38h+var_28]
test rax, rax
jz short loc_44691
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_44691:
mov rdi, rbx
call __Unwind_Resume
loc_44699:
mov rdi, rax
call __clang_call_terminate
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>(
long long a1,
long long a2,
long long a3,
__int128 *a4,
unsigned __int8 a5,
unsigned __int8 a6)
{
void ( *v6)(__int128 *, __int128 *, long long); // rax
__int128 v8; // [rsp+0h] [rbp-38h] BYREF
void ( *v9)(__int128 *, __int128 *, long long); // [rsp+10h] [rbp-28h]
long long v10; // [rsp+18h] [rbp-20h]
_QWORD v11[3]; // [rsp+20h] [rbp-18h] BYREF
v11[0] = a2;
v11[1] = a3;
v8 = 0LL;
v9 = 0LL;
v10 = *((_QWORD *)a4 + 3);
v6 = (void ( *)(__int128 *, __int128 *, long long))*((_QWORD *)a4 + 2);
if ( v6 )
{
v8 = *a4;
v9 = v6;
a4[1] = 0LL;
}
((void ( *)(long long, _QWORD *, __int128 *, _QWORD, _QWORD))nlohmann::json_abi_v3_11_3::detail::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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parser)(
a1,
v11,
&v8,
a5,
a6);
if ( v9 )
v9(&v8, &v8, 3LL);
return a1;
}
| parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>:
PUSH RBX
SUB RSP,0x30
MOV RBX,RDI
MOV qword ptr [RSP + 0x20],RSI
MOV qword ptr [RSP + 0x28],RDX
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x10],0x0
MOV RAX,qword ptr [RCX + 0x18]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RCX + 0x10]
TEST RAX,RAX
JZ 0x0014463d
MOVUPS XMM1,xmmword ptr [RCX]
ADD RCX,0x10
MOVAPS xmmword ptr [RSP],XMM1
MOV qword ptr [RSP + 0x10],RAX
MOVUPS xmmword ptr [RCX],XMM0
LAB_0014463d:
MOVZX ECX,R8B
MOVZX R8D,R9B
LEA RSI,[RSP + 0x20]
MOV RDX,RSP
MOV RDI,RBX
CALL 0x00144cf0
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x0014466c
LAB_0014465f:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_0014466c:
MOV RAX,RBX
ADD RSP,0x30
POP RBX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::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>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, 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>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > >
>(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > >, std::function<bool (int,
nlohmann::json_abi_v3_11_3::detail::parse_event_t,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&)>, bool, bool) */
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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,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>
::
parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
(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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*param_1,int8 param_2,int8 param_3,int8 *param_4,int1 param_5,
int1 param_6)
{
code *pcVar1;
int8 local_38;
int8 uStack_30;
code *local_28;
int8 local_20;
int8 local_18;
int8 local_10;
local_38 = 0;
uStack_30 = 0;
local_28 = (code *)0x0;
local_20 = param_4[3];
pcVar1 = (code *)param_4[2];
if (pcVar1 != (code *)0x0) {
local_38 = *param_4;
uStack_30 = param_4[1];
param_4[2] = 0;
param_4[3] = 0;
local_28 = pcVar1;
}
/* try { // try from 0014463d to 00144654 has its CatchHandler @ 00144677 */
local_18 = param_2;
local_10 = param_3;
detail::
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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::parser(param_1,&local_18,&local_38,param_5,param_6);
if (local_28 != (code *)0x0) {
/* try { // try from 0014465f to 0014466b has its CatchHandler @ 00144675 */
(*local_28)(&local_38,&local_38,3);
}
return param_1;
}
| |
24,205 | ft_stroke_border_close | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-ft-stroker.c | static void ft_stroke_border_close(PVG_FT_StrokeBorder border,
PVG_FT_Bool reverse)
{
PVG_FT_UInt start = border->start;
PVG_FT_UInt count = border->num_points;
assert(border->start >= 0);
/* don't record empty paths! */
if (count <= start + 1U)
border->num_points = start;
else {
/* copy the last point to the start of this sub-path, since */
/* it contains the `adjusted' starting coordinates */
border->num_points = --count;
border->points[start] = border->points[count];
border->tags[start] = border->tags[count];
if (reverse) {
/* reverse the points */
{
PVG_FT_Vector* vec1 = border->points + start + 1;
PVG_FT_Vector* vec2 = border->points + count - 1;
for (; vec1 < vec2; vec1++, vec2--) {
PVG_FT_Vector tmp;
tmp = *vec1;
*vec1 = *vec2;
*vec2 = tmp;
}
}
/* then the tags */
{
PVG_FT_Byte* tag1 = border->tags + start + 1;
PVG_FT_Byte* tag2 = border->tags + count - 1;
for (; tag1 < tag2; tag1++, tag2--) {
PVG_FT_Byte tmp;
tmp = *tag1;
*tag1 = *tag2;
*tag2 = tmp;
}
}
}
border->tags[start] |= PVG_FT_STROKE_TAG_BEGIN;
border->tags[count - 1] |= PVG_FT_STROKE_TAG_END;
}
border->start = -1;
border->movable = FALSE;
} | O1 | c | ft_stroke_border_close:
subq $0x18, %rsp
movslq 0x1c(%rdi), %rax
testq %rax, %rax
js 0x3e53d
movl (%rdi), %ecx
leal 0x1(%rax), %edx
cmpl %edx, %ecx
jbe 0x3e52b
leal -0x1(%rcx), %edx
movl %edx, (%rdi)
movq 0x8(%rdi), %r10
movq %rax, %r9
shlq $0x4, %r9
movq %rdx, %r8
shlq $0x4, %r8
movups (%r10,%r8), %xmm0
movups %xmm0, (%r10,%r9)
movq 0x10(%rdi), %r10
movb (%r10,%rdx), %r11b
movb %r11b, (%r10,%rax)
testb %sil, %sil
je 0x3e516
movq 0x8(%rdi), %r10
leaq (%r10,%r8), %r11
addq $-0x10, %r11
leaq (%r10,%r9), %rsi
addq $0x10, %rsi
cmpq %r11, %rsi
jae 0x3e4db
addq %r10, %r8
addq $-0x20, %r8
movups (%rsi), %xmm0
movaps %xmm0, (%rsp)
movups 0x10(%r8), %xmm0
movups %xmm0, (%rsi)
movaps (%rsp), %xmm0
movups %xmm0, 0x10(%r8)
addq $0x10, %rsi
leaq -0x10(%r8), %r9
cmpq %r8, %rsi
movq %r9, %r8
jb 0x3e4b3
movq 0x10(%rdi), %r8
leaq (%r8,%rdx), %r9
decq %r9
leaq (%r8,%rax), %rsi
incq %rsi
cmpq %r9, %rsi
jae 0x3e516
addq %r8, %rdx
addq $-0x2, %rdx
movb (%rsi), %r8b
movb 0x1(%rdx), %r9b
movb %r9b, (%rsi)
movb %r8b, 0x1(%rdx)
incq %rsi
leaq -0x1(%rdx), %r8
cmpq %rdx, %rsi
movq %r8, %rdx
jb 0x3e4f9
movq 0x10(%rdi), %rdx
orb $0x4, (%rdx,%rax)
movq 0x10(%rdi), %rax
addl $-0x2, %ecx
orb $0x8, (%rax,%rcx)
jmp 0x3e52d
movl %eax, (%rdi)
movl $0xffffffff, 0x1c(%rdi) # imm = 0xFFFFFFFF
movb $0x0, 0x18(%rdi)
addq $0x18, %rsp
retq
leaq 0xa00c(%rip), %rdi # 0x48550
leaq 0xa018(%rip), %rsi # 0x48563
leaq 0xa1f5(%rip), %rcx # 0x48747
movl $0x111, %edx # imm = 0x111
callq 0xa200
| ft_stroke_border_close:
sub rsp, 18h
movsxd rax, dword ptr [rdi+1Ch]
test rax, rax
js loc_3E53D
mov ecx, [rdi]
lea edx, [rax+1]
cmp ecx, edx
jbe loc_3E52B
lea edx, [rcx-1]
mov [rdi], edx
mov r10, [rdi+8]
mov r9, rax
shl r9, 4
mov r8, rdx
shl r8, 4
movups xmm0, xmmword ptr [r10+r8]
movups xmmword ptr [r10+r9], xmm0
mov r10, [rdi+10h]
mov r11b, [r10+rdx]
mov [r10+rax], r11b
test sil, sil
jz loc_3E516
mov r10, [rdi+8]
lea r11, [r10+r8]
add r11, 0FFFFFFFFFFFFFFF0h
lea rsi, [r10+r9]
add rsi, 10h
cmp rsi, r11
jnb short loc_3E4DB
add r8, r10
add r8, 0FFFFFFFFFFFFFFE0h
loc_3E4B3:
movups xmm0, xmmword ptr [rsi]
movaps [rsp+18h+var_18], xmm0
movups xmm0, xmmword ptr [r8+10h]
movups xmmword ptr [rsi], xmm0
movaps xmm0, [rsp+18h+var_18]
movups xmmword ptr [r8+10h], xmm0
add rsi, 10h
lea r9, [r8-10h]
cmp rsi, r8
mov r8, r9
jb short loc_3E4B3
loc_3E4DB:
mov r8, [rdi+10h]
lea r9, [r8+rdx]
dec r9
lea rsi, [r8+rax]
inc rsi
cmp rsi, r9
jnb short loc_3E516
add rdx, r8
add rdx, 0FFFFFFFFFFFFFFFEh
loc_3E4F9:
mov r8b, [rsi]
mov r9b, [rdx+1]
mov [rsi], r9b
mov [rdx+1], r8b
inc rsi
lea r8, [rdx-1]
cmp rsi, rdx
mov rdx, r8
jb short loc_3E4F9
loc_3E516:
mov rdx, [rdi+10h]
or byte ptr [rdx+rax], 4
mov rax, [rdi+10h]
add ecx, 0FFFFFFFEh
or byte ptr [rax+rcx], 8
jmp short loc_3E52D
loc_3E52B:
mov [rdi], eax
loc_3E52D:
mov dword ptr [rdi+1Ch], 0FFFFFFFFh
mov byte ptr [rdi+18h], 0
add rsp, 18h
retn
loc_3E53D:
lea rdi, aBorderStart0; "border->start >= 0"
lea rsi, aWorkspaceLlm4b_8; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidFtStrokeBo; "void ft_stroke_border_close(PVG_FT_Stro"...
mov edx, 111h
call ___assert_fail
| long long ft_stroke_border_close(int *a1, char a2)
{
long long result; // rax
int v3; // ecx
long long v4; // rdx
long long v5; // r8
long long v6; // r10
__int128 *v7; // rsi
unsigned long long v8; // r8
bool v9; // cf
long long v10; // r8
char *v11; // rsi
unsigned long long v12; // rdx
char v13; // r8
__int128 v14; // [rsp+0h] [rbp-18h]
result = a1[7];
if ( result < 0 )
__assert_fail(
"border->start >= 0",
"/workspace/llm4binary/github/2025_star3/dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-ft-stroker.c",
273LL,
"void ft_stroke_border_close(PVG_FT_StrokeBorder, PVG_FT_Bool)");
v3 = *a1;
if ( *a1 <= (unsigned int)(result + 1) )
{
*a1 = result;
}
else
{
v4 = (unsigned int)(v3 - 1);
*a1 = v4;
v5 = 16 * v4;
*(_OWORD *)(*((_QWORD *)a1 + 1) + 16 * result) = *(_OWORD *)(*((_QWORD *)a1 + 1) + 16 * v4);
*(_BYTE *)(*((_QWORD *)a1 + 2) + result) = *(_BYTE *)(*((_QWORD *)a1 + 2) + v4);
if ( a2 )
{
v6 = *((_QWORD *)a1 + 1);
v7 = (__int128 *)(v6 + 16 * result + 16);
if ( (unsigned long long)v7 < v6 + v5 - 16 )
{
v8 = v6 + v5 - 32;
do
{
v14 = *v7;
*v7 = *(_OWORD *)(v8 + 16);
*(_OWORD *)(v8 + 16) = v14;
v9 = (unsigned long long)++v7 < v8;
v8 -= 16LL;
}
while ( v9 );
}
v10 = *((_QWORD *)a1 + 2);
v11 = (char *)(v10 + result + 1);
if ( (unsigned long long)v11 < v10 + v4 - 1 )
{
v12 = v10 + v4 - 2;
do
{
v13 = *v11;
*v11 = *(_BYTE *)(v12 + 1);
*(_BYTE *)(v12 + 1) = v13;
v9 = (unsigned long long)++v11 < v12--;
}
while ( v9 );
}
}
*(_BYTE *)(*((_QWORD *)a1 + 2) + result) |= 4u;
result = *((_QWORD *)a1 + 2);
*(_BYTE *)(result + (unsigned int)(v3 - 2)) |= 8u;
}
a1[7] = -1;
*((_BYTE *)a1 + 24) = 0;
return result;
}
| ft_stroke_border_close:
SUB RSP,0x18
MOVSXD RAX,dword ptr [RDI + 0x1c]
TEST RAX,RAX
JS 0x0013e53d
MOV ECX,dword ptr [RDI]
LEA EDX,[RAX + 0x1]
CMP ECX,EDX
JBE 0x0013e52b
LEA EDX,[RCX + -0x1]
MOV dword ptr [RDI],EDX
MOV R10,qword ptr [RDI + 0x8]
MOV R9,RAX
SHL R9,0x4
MOV R8,RDX
SHL R8,0x4
MOVUPS XMM0,xmmword ptr [R10 + R8*0x1]
MOVUPS xmmword ptr [R10 + R9*0x1],XMM0
MOV R10,qword ptr [RDI + 0x10]
MOV R11B,byte ptr [R10 + RDX*0x1]
MOV byte ptr [R10 + RAX*0x1],R11B
TEST SIL,SIL
JZ 0x0013e516
MOV R10,qword ptr [RDI + 0x8]
LEA R11,[R10 + R8*0x1]
ADD R11,-0x10
LEA RSI,[R10 + R9*0x1]
ADD RSI,0x10
CMP RSI,R11
JNC 0x0013e4db
ADD R8,R10
ADD R8,-0x20
LAB_0013e4b3:
MOVUPS XMM0,xmmword ptr [RSI]
MOVAPS xmmword ptr [RSP],XMM0
MOVUPS XMM0,xmmword ptr [R8 + 0x10]
MOVUPS xmmword ptr [RSI],XMM0
MOVAPS XMM0,xmmword ptr [RSP]
MOVUPS xmmword ptr [R8 + 0x10],XMM0
ADD RSI,0x10
LEA R9,[R8 + -0x10]
CMP RSI,R8
MOV R8,R9
JC 0x0013e4b3
LAB_0013e4db:
MOV R8,qword ptr [RDI + 0x10]
LEA R9,[R8 + RDX*0x1]
DEC R9
LEA RSI,[R8 + RAX*0x1]
INC RSI
CMP RSI,R9
JNC 0x0013e516
ADD RDX,R8
ADD RDX,-0x2
LAB_0013e4f9:
MOV R8B,byte ptr [RSI]
MOV R9B,byte ptr [RDX + 0x1]
MOV byte ptr [RSI],R9B
MOV byte ptr [RDX + 0x1],R8B
INC RSI
LEA R8,[RDX + -0x1]
CMP RSI,RDX
MOV RDX,R8
JC 0x0013e4f9
LAB_0013e516:
MOV RDX,qword ptr [RDI + 0x10]
OR byte ptr [RDX + RAX*0x1],0x4
MOV RAX,qword ptr [RDI + 0x10]
ADD ECX,-0x2
OR byte ptr [RAX + RCX*0x1],0x8
JMP 0x0013e52d
LAB_0013e52b:
MOV dword ptr [RDI],EAX
LAB_0013e52d:
MOV dword ptr [RDI + 0x1c],0xffffffff
MOV byte ptr [RDI + 0x18],0x0
ADD RSP,0x18
RET
LAB_0013e53d:
LEA RDI,[0x148550]
LEA RSI,[0x148563]
LEA RCX,[0x148747]
MOV EDX,0x111
CALL 0x0010a200
|
void ft_stroke_border_close(uint *param_1,char param_2)
{
byte *pbVar1;
int1 uVar2;
uint uVar3;
uint uVar4;
long lVar5;
int8 uVar6;
int8 uVar7;
int8 uVar8;
long lVar9;
ulong uVar10;
int1 *puVar11;
int8 *puVar12;
int1 *puVar13;
long lVar14;
int8 *puVar15;
bool bVar16;
uVar3 = param_1[7];
lVar9 = (long)(int)uVar3;
if (-1 < lVar9) {
uVar4 = *param_1;
if (uVar3 + 1 < uVar4) {
uVar10 = (ulong)(uVar4 - 1);
*param_1 = uVar4 - 1;
lVar14 = uVar10 * 0x10;
puVar12 = (int8 *)(*(long *)(param_1 + 2) + lVar14);
uVar6 = puVar12[1];
puVar15 = (int8 *)(*(long *)(param_1 + 2) + lVar9 * 0x10);
*puVar15 = *puVar12;
puVar15[1] = uVar6;
*(int1 *)(*(long *)(param_1 + 4) + lVar9) =
*(int1 *)(*(long *)(param_1 + 4) + uVar10);
if (param_2 != '\0') {
lVar5 = *(long *)(param_1 + 2);
puVar12 = (int8 *)(lVar5 + lVar9 * 0x10 + 0x10);
if (puVar12 < (int8 *)(lVar5 + lVar14 + -0x10)) {
puVar15 = (int8 *)(lVar14 + lVar5 + -0x20);
do {
uVar6 = *puVar12;
uVar7 = puVar12[1];
uVar8 = puVar15[3];
*puVar12 = puVar15[2];
puVar12[1] = uVar8;
puVar15[2] = uVar6;
puVar15[3] = uVar7;
puVar12 = puVar12 + 2;
bVar16 = puVar12 < puVar15;
puVar15 = puVar15 + -2;
} while (bVar16);
}
lVar14 = *(long *)(param_1 + 4);
puVar13 = (int1 *)(lVar14 + lVar9 + 1);
if (puVar13 < (int1 *)(lVar14 + uVar10 + -1)) {
puVar11 = (int1 *)(uVar10 + lVar14 + -2);
do {
uVar2 = *puVar13;
*puVar13 = puVar11[1];
puVar11[1] = uVar2;
puVar13 = puVar13 + 1;
bVar16 = puVar13 < puVar11;
puVar11 = puVar11 + -1;
} while (bVar16);
}
}
*(byte *)(*(long *)(param_1 + 4) + lVar9) = *(byte *)(*(long *)(param_1 + 4) + lVar9) | 4;
pbVar1 = (byte *)(*(long *)(param_1 + 4) + (ulong)(uVar4 - 2));
*pbVar1 = *pbVar1 | 8;
}
else {
*param_1 = uVar3;
}
param_1[7] = 0xffffffff;
*(int1 *)(param_1 + 6) = 0;
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("border->start >= 0",
"/workspace/llm4binary/github/2025_star3/dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-ft-stroker.c"
,0x111,"void ft_stroke_border_close(PVG_FT_StrokeBorder, PVG_FT_Bool)");
}
| |
24,206 | js_compare_bigint | bluesky950520[P]quickjs/quickjs.c | static int js_compare_bigint(JSContext *ctx, OPCodeEnum op,
JSValue op1, JSValue op2)
{
bf_t a_s, b_s, *a, *b;
int res;
a = JS_ToBigInt1(ctx, &a_s, op1);
if (!a) {
JS_FreeValue(ctx, op2);
return -1;
}
b = JS_ToBigInt1(ctx, &b_s, op2);
if (!b) {
if (a == &a_s)
bf_delete(a);
JS_FreeValue(ctx, op1);
return -1;
}
switch(op) {
case OP_lt:
res = bf_cmp_lt(a, b); /* if NaN return false */
break;
case OP_lte:
res = bf_cmp_le(a, b); /* if NaN return false */
break;
case OP_gt:
res = bf_cmp_lt(b, a); /* if NaN return false */
break;
case OP_gte:
res = bf_cmp_le(b, a); /* if NaN return false */
break;
case OP_eq:
res = bf_cmp_eq(a, b); /* if NaN return false */
break;
default:
abort();
}
if (a == &a_s)
bf_delete(a);
if (b == &b_s)
bf_delete(b);
JS_FreeValue(ctx, op1);
JS_FreeValue(ctx, op2);
return res;
} | O0 | c | js_compare_bigint:
subq $0xa8, %rsp
movq %rdx, 0x90(%rsp)
movq %rcx, 0x98(%rsp)
movq %r8, 0x80(%rsp)
movq %r9, 0x88(%rsp)
movq %rdi, 0x78(%rsp)
movl %esi, 0x74(%rsp)
movq 0x78(%rsp), %rdi
movq 0x90(%rsp), %rdx
movq 0x98(%rsp), %rcx
leaq 0x48(%rsp), %rsi
callq 0x71dd0
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x71c16
movq 0x78(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
callq 0x23c90
movl $0xffffffff, 0xa4(%rsp) # imm = 0xFFFFFFFF
jmp 0x71d83
movq 0x78(%rsp), %rdi
movq 0x80(%rsp), %rdx
movq 0x88(%rsp), %rcx
leaq 0x20(%rsp), %rsi
callq 0x71dd0
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x71c82
leaq 0x48(%rsp), %rax
cmpq %rax, 0x18(%rsp)
jne 0x71c58
movq 0x18(%rsp), %rdi
callq 0x5e920
movq 0x78(%rsp), %rdi
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
callq 0x23c90
movl $0xffffffff, 0xa4(%rsp) # imm = 0xFFFFFFFF
jmp 0x71d83
movl 0x74(%rsp), %eax
addl $0xffffff5a, %eax # imm = 0xFFFFFF5A
movl %eax, %ecx
movq %rcx, (%rsp)
subl $0x6, %eax
ja 0x71d13
movq (%rsp), %rax
leaq 0x99303(%rip), %rcx # 0x10afa4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x71f00
movl %eax, 0xc(%rsp)
jmp 0x71d18
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x71f30
movl %eax, 0xc(%rsp)
jmp 0x71d18
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x71f00
movl %eax, 0xc(%rsp)
jmp 0x71d18
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x71f30
movl %eax, 0xc(%rsp)
jmp 0x71d18
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x61db0
movl %eax, 0xc(%rsp)
jmp 0x71d18
callq 0xe090
leaq 0x48(%rsp), %rax
cmpq %rax, 0x18(%rsp)
jne 0x71d2e
movq 0x18(%rsp), %rdi
callq 0x5e920
leaq 0x20(%rsp), %rax
cmpq %rax, 0x10(%rsp)
jne 0x71d44
movq 0x10(%rsp), %rdi
callq 0x5e920
movq 0x78(%rsp), %rdi
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
callq 0x23c90
movq 0x78(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
callq 0x23c90
movl 0xc(%rsp), %eax
movl %eax, 0xa4(%rsp)
movl 0xa4(%rsp), %eax
addq $0xa8, %rsp
retq
nopw %cs:(%rax,%rax)
| js_compare_bigint:
sub rsp, 0A8h
mov [rsp+0A8h+var_18], rdx
mov [rsp+0A8h+var_10], rcx
mov [rsp+0A8h+var_28], r8
mov [rsp+0A8h+var_20], r9
mov [rsp+0A8h+var_30], rdi
mov [rsp+0A8h+var_34], esi
mov rdi, [rsp+0A8h+var_30]
mov rdx, [rsp+0A8h+var_18]
mov rcx, [rsp+0A8h+var_10]
lea rsi, [rsp+0A8h+var_60]
call JS_ToBigInt1
mov [rsp+0A8h+var_90], rax
cmp [rsp+0A8h+var_90], 0
jnz short loc_71C16
mov rdi, [rsp+0A8h+var_30]
mov rsi, [rsp+0A8h+var_28]
mov rdx, [rsp+0A8h+var_20]
call JS_FreeValue
mov [rsp+0A8h+var_4], 0FFFFFFFFh
jmp loc_71D83
loc_71C16:
mov rdi, [rsp+0A8h+var_30]
mov rdx, [rsp+0A8h+var_28]
mov rcx, [rsp+0A8h+var_20]
lea rsi, [rsp+0A8h+var_88]
call JS_ToBigInt1
mov [rsp+0A8h+var_98], rax
cmp [rsp+0A8h+var_98], 0
jnz short loc_71C82
lea rax, [rsp+0A8h+var_60]
cmp [rsp+0A8h+var_90], rax
jnz short loc_71C58
mov rdi, [rsp+0A8h+var_90]
call bf_delete
loc_71C58:
mov rdi, [rsp+0A8h+var_30]
mov rsi, [rsp+0A8h+var_18]
mov rdx, [rsp+0A8h+var_10]
call JS_FreeValue
mov [rsp+0A8h+var_4], 0FFFFFFFFh
jmp loc_71D83
loc_71C82:
mov eax, [rsp+0A8h+var_34]
add eax, 0FFFFFF5Ah; switch 7 cases
mov ecx, eax
mov [rsp+0A8h+var_A8], rcx
sub eax, 6
ja short def_71CA8; jumptable 0000000000071CA8 default case, cases 170,171
mov rax, [rsp+0A8h+var_A8]
lea rcx, jpt_71CA8
movsxd rax, ds:(jpt_71CA8 - 10AFA4h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_71CAA:
mov rdi, [rsp+0A8h+var_90]; jumptable 0000000000071CA8 case 166
mov rsi, [rsp+0A8h+var_98]
call bf_cmp_lt
mov [rsp+0A8h+var_9C], eax
jmp short loc_71D18
loc_71CBF:
mov rdi, [rsp+0A8h+var_90]; jumptable 0000000000071CA8 case 167
mov rsi, [rsp+0A8h+var_98]
call bf_cmp_le
mov [rsp+0A8h+var_9C], eax
jmp short loc_71D18
loc_71CD4:
mov rdi, [rsp+0A8h+var_98]; jumptable 0000000000071CA8 case 168
mov rsi, [rsp+0A8h+var_90]
call bf_cmp_lt
mov [rsp+0A8h+var_9C], eax
jmp short loc_71D18
loc_71CE9:
mov rdi, [rsp+0A8h+var_98]; jumptable 0000000000071CA8 case 169
mov rsi, [rsp+0A8h+var_90]
call bf_cmp_le
mov [rsp+0A8h+var_9C], eax
jmp short loc_71D18
loc_71CFE:
mov rdi, [rsp+0A8h+var_90]; jumptable 0000000000071CA8 case 172
mov rsi, [rsp+0A8h+var_98]
call bf_cmp_eq
mov [rsp+0A8h+var_9C], eax
jmp short loc_71D18
def_71CA8:
call _abort; jumptable 0000000000071CA8 default case, cases 170,171
loc_71D18:
lea rax, [rsp+0A8h+var_60]
cmp [rsp+0A8h+var_90], rax
jnz short loc_71D2E
mov rdi, [rsp+0A8h+var_90]
call bf_delete
loc_71D2E:
lea rax, [rsp+0A8h+var_88]
cmp [rsp+0A8h+var_98], rax
jnz short loc_71D44
mov rdi, [rsp+0A8h+var_98]
call bf_delete
loc_71D44:
mov rdi, [rsp+0A8h+var_30]
mov rsi, [rsp+0A8h+var_18]
mov rdx, [rsp+0A8h+var_10]
call JS_FreeValue
mov rdi, [rsp+0A8h+var_30]
mov rsi, [rsp+0A8h+var_28]
mov rdx, [rsp+0A8h+var_20]
call JS_FreeValue
mov eax, [rsp+0A8h+var_9C]
mov [rsp+0A8h+var_4], eax
loc_71D83:
mov eax, [rsp+0A8h+var_4]
add rsp, 0A8h
retn
| long long js_compare_bigint(long long a1, int a2, long long a3, long long a4, long long a5, long long a6)
{
const char *v6; // rdi
unsigned int v8; // [rsp+Ch] [rbp-9Ch]
long long *v9; // [rsp+10h] [rbp-98h]
long long *v10; // [rsp+18h] [rbp-90h]
_BYTE v11[40]; // [rsp+20h] [rbp-88h] BYREF
_BYTE v12[44]; // [rsp+48h] [rbp-60h] BYREF
int v13; // [rsp+74h] [rbp-34h]
const char *v14; // [rsp+78h] [rbp-30h]
long long v15; // [rsp+80h] [rbp-28h]
long long v16; // [rsp+88h] [rbp-20h]
long long v17; // [rsp+90h] [rbp-18h]
long long v18; // [rsp+98h] [rbp-10h]
v17 = a3;
v18 = a4;
v15 = a5;
v16 = a6;
v14 = (const char *)a1;
v13 = a2;
v10 = (long long *)JS_ToBigInt1(a1, v12, a3, a4);
if ( v10 )
{
v6 = v14;
v9 = (long long *)JS_ToBigInt1(v14, v11, v15, v16);
if ( v9 )
{
switch ( v13 )
{
case 166:
v8 = bf_cmp_lt(v10, v9);
break;
case 167:
v8 = bf_cmp_le(v10, v9);
break;
case 168:
v8 = bf_cmp_lt(v9, v10);
break;
case 169:
v8 = bf_cmp_le(v9, v10);
break;
case 172:
v8 = bf_cmp_eq((long long)v10, (long long)v9);
break;
default:
abort(v6);
}
if ( v10 == (long long *)v12 )
bf_delete(v10);
if ( v9 == (long long *)v11 )
bf_delete(v9);
JS_FreeValue((long long)v14, v17, v18);
JS_FreeValue((long long)v14, v15, v16);
return v8;
}
else
{
if ( v10 == (long long *)v12 )
bf_delete(v10);
JS_FreeValue((long long)v14, v17, v18);
return (unsigned int)-1;
}
}
else
{
JS_FreeValue((long long)v14, v15, v16);
return (unsigned int)-1;
}
}
| js_compare_bigint:
SUB RSP,0xa8
MOV qword ptr [RSP + 0x90],RDX
MOV qword ptr [RSP + 0x98],RCX
MOV qword ptr [RSP + 0x80],R8
MOV qword ptr [RSP + 0x88],R9
MOV qword ptr [RSP + 0x78],RDI
MOV dword ptr [RSP + 0x74],ESI
MOV RDI,qword ptr [RSP + 0x78]
MOV RDX,qword ptr [RSP + 0x90]
MOV RCX,qword ptr [RSP + 0x98]
LEA RSI,[RSP + 0x48]
CALL 0x00171dd0
MOV qword ptr [RSP + 0x18],RAX
CMP qword ptr [RSP + 0x18],0x0
JNZ 0x00171c16
MOV RDI,qword ptr [RSP + 0x78]
MOV RSI,qword ptr [RSP + 0x80]
MOV RDX,qword ptr [RSP + 0x88]
CALL 0x00123c90
MOV dword ptr [RSP + 0xa4],0xffffffff
JMP 0x00171d83
LAB_00171c16:
MOV RDI,qword ptr [RSP + 0x78]
MOV RDX,qword ptr [RSP + 0x80]
MOV RCX,qword ptr [RSP + 0x88]
LEA RSI,[RSP + 0x20]
CALL 0x00171dd0
MOV qword ptr [RSP + 0x10],RAX
CMP qword ptr [RSP + 0x10],0x0
JNZ 0x00171c82
LEA RAX,[RSP + 0x48]
CMP qword ptr [RSP + 0x18],RAX
JNZ 0x00171c58
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x0015e920
LAB_00171c58:
MOV RDI,qword ptr [RSP + 0x78]
MOV RSI,qword ptr [RSP + 0x90]
MOV RDX,qword ptr [RSP + 0x98]
CALL 0x00123c90
MOV dword ptr [RSP + 0xa4],0xffffffff
JMP 0x00171d83
LAB_00171c82:
MOV EAX,dword ptr [RSP + 0x74]
ADD EAX,0xffffff5a
MOV ECX,EAX
MOV qword ptr [RSP],RCX
SUB EAX,0x6
JA 0x00171d13
MOV RAX,qword ptr [RSP]
LEA RCX,[0x20afa4]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_a6:
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x00171f00
MOV dword ptr [RSP + 0xc],EAX
JMP 0x00171d18
caseD_a7:
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x00171f30
MOV dword ptr [RSP + 0xc],EAX
JMP 0x00171d18
caseD_a8:
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x00171f00
MOV dword ptr [RSP + 0xc],EAX
JMP 0x00171d18
caseD_a9:
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x00171f30
MOV dword ptr [RSP + 0xc],EAX
JMP 0x00171d18
caseD_ac:
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x00161db0
MOV dword ptr [RSP + 0xc],EAX
JMP 0x00171d18
caseD_aa:
CALL 0x0010e090
LAB_00171d18:
LEA RAX,[RSP + 0x48]
CMP qword ptr [RSP + 0x18],RAX
JNZ 0x00171d2e
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x0015e920
LAB_00171d2e:
LEA RAX,[RSP + 0x20]
CMP qword ptr [RSP + 0x10],RAX
JNZ 0x00171d44
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0015e920
LAB_00171d44:
MOV RDI,qword ptr [RSP + 0x78]
MOV RSI,qword ptr [RSP + 0x90]
MOV RDX,qword ptr [RSP + 0x98]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0x78]
MOV RSI,qword ptr [RSP + 0x80]
MOV RDX,qword ptr [RSP + 0x88]
CALL 0x00123c90
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSP + 0xa4],EAX
LAB_00171d83:
MOV EAX,dword ptr [RSP + 0xa4]
ADD RSP,0xa8
RET
|
int4
js_compare_bigint(int8 param_1,int4 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6)
{
int1 *puVar1;
int1 *puVar2;
int4 local_9c;
int1 local_88 [40];
int1 local_60 [44];
int4 local_34;
int8 local_30;
int8 local_28;
int8 local_20;
int8 local_18;
int8 local_10;
int4 local_4;
local_34 = param_2;
local_30 = param_1;
local_28 = param_5;
local_20 = param_6;
local_18 = param_3;
local_10 = param_4;
puVar1 = (int1 *)JS_ToBigInt1(param_1,local_60,param_3,param_4);
if (puVar1 == (int1 *)0x0) {
JS_FreeValue(local_30,local_28,local_20);
local_4 = 0xffffffff;
}
else {
puVar2 = (int1 *)JS_ToBigInt1(local_30,local_88,local_28,local_20);
if (puVar2 == (int1 *)0x0) {
if (puVar1 == local_60) {
bf_delete(puVar1);
}
JS_FreeValue(local_30,local_18,local_10);
local_4 = 0xffffffff;
}
else {
switch(local_34) {
case 0xa6:
local_9c = bf_cmp_lt(puVar1,puVar2);
break;
case 0xa7:
local_9c = bf_cmp_le(puVar1,puVar2);
break;
case 0xa8:
local_9c = bf_cmp_lt(puVar2,puVar1);
break;
case 0xa9:
local_9c = bf_cmp_le(puVar2,puVar1);
break;
default:
/* WARNING: Subroutine does not return */
abort();
case 0xac:
local_9c = bf_cmp_eq(puVar1,puVar2);
}
if (puVar1 == local_60) {
bf_delete(puVar1);
}
if (puVar2 == local_88) {
bf_delete(puVar2);
}
JS_FreeValue(local_30,local_18,local_10);
JS_FreeValue(local_30,local_28,local_20);
local_4 = local_9c;
}
}
return local_4;
}
| |
24,207 | js_compare_bigint | bluesky950520[P]quickjs/quickjs.c | static int js_compare_bigint(JSContext *ctx, OPCodeEnum op,
JSValue op1, JSValue op2)
{
bf_t a_s, b_s, *a, *b;
int res;
a = JS_ToBigInt1(ctx, &a_s, op1);
if (!a) {
JS_FreeValue(ctx, op2);
return -1;
}
b = JS_ToBigInt1(ctx, &b_s, op2);
if (!b) {
if (a == &a_s)
bf_delete(a);
JS_FreeValue(ctx, op1);
return -1;
}
switch(op) {
case OP_lt:
res = bf_cmp_lt(a, b); /* if NaN return false */
break;
case OP_lte:
res = bf_cmp_le(a, b); /* if NaN return false */
break;
case OP_gt:
res = bf_cmp_lt(b, a); /* if NaN return false */
break;
case OP_gte:
res = bf_cmp_le(b, a); /* if NaN return false */
break;
case OP_eq:
res = bf_cmp_eq(a, b); /* if NaN return false */
break;
default:
abort();
}
if (a == &a_s)
bf_delete(a);
if (b == &b_s)
bf_delete(b);
JS_FreeValue(ctx, op1);
JS_FreeValue(ctx, op2);
return res;
} | O1 | c | js_compare_bigint:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r9, %r12
movq %r8, %rbx
movq %rdx, %r15
movl %esi, %r13d
movq %rdi, %r14
leaq 0x40(%rsp), %rsi
movq %rcx, (%rsp)
callq 0x430ad
testq %rax, %rax
je 0x42f93
movq %rax, %rbp
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
movq %rbx, 0x8(%rsp)
movq %rbx, %rdx
movq %r12, 0x10(%rsp)
movq %r12, %rcx
callq 0x430ad
testq %rax, %rax
je 0x42f9f
addl $0xffffff5a, %r13d # imm = 0xFFFFFF5A
cmpl $0x6, %r13d
ja 0x430a8
movq %rax, %r12
leaq 0x59d3e(%rip), %rax # 0x9ccc0
movslq (%rax,%r13,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %rbp, %rdi
movq %r12, %rsi
jmp 0x42ffc
movq 0x18(%r14), %rdi
movq %rbx, %rsi
movq %r12, %rdx
jmp 0x42fb4
leaq 0x40(%rsp), %rax
cmpq %rax, %rbp
je 0x42fc4
movq 0x18(%r14), %rdi
movq %r15, %rsi
movq (%rsp), %rdx
callq 0x1d8c6
movl $0xffffffff, %r13d # imm = 0xFFFFFFFF
jmp 0x4305d
movq (%rbp), %rax
testq %rax, %rax
je 0x42fa9
movq 0x20(%rbp), %rsi
testq %rsi, %rsi
je 0x42fa9
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
jmp 0x42fa9
movq %rbp, %rdi
movq %r12, %rsi
callq 0x854f5
xorl %r13d, %r13d
testl %eax, %eax
sete %r13b
jmp 0x43026
movq %r12, %rdi
movq %rbp, %rsi
callq 0x854f5
movl %eax, %r13d
shrl $0x1f, %r13d
jmp 0x43026
movq %r12, %rdi
movq %rbp, %rsi
jmp 0x43018
movq %rbp, %rdi
movq %r12, %rsi
callq 0x854f5
xorl %r13d, %r13d
testl %eax, %eax
setle %r13b
leaq 0x18(%rsp), %rbx
leaq 0x40(%rsp), %rax
cmpq %rax, %rbp
je 0x4306f
cmpq %rbx, %r12
je 0x4308b
movq 0x18(%r14), %rdi
movq %r15, %rsi
movq (%rsp), %rdx
callq 0x1d8c6
movq 0x18(%r14), %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x1d8c6
movl %r13d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbp), %rax
testq %rax, %rax
je 0x43035
movq 0x20(%rbp), %rsi
testq %rsi, %rsi
je 0x43035
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
jmp 0x43035
movq (%r12), %rax
testq %rax, %rax
je 0x4303a
movq 0x20(%r12), %rsi
testq %rsi, %rsi
je 0x4303a
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
jmp 0x4303a
callq 0xe090
| js_compare_bigint:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r12, r9
mov rbx, r8
mov r15, rdx
mov r13d, esi
mov r14, rdi
lea rsi, [rsp+98h+var_58]
mov [rsp+98h+var_98], rcx
call JS_ToBigInt1
test rax, rax
jz short loc_42F93
mov rbp, rax
lea rsi, [rsp+98h+var_80]
mov rdi, r14
mov [rsp+98h+var_90], rbx
mov rdx, rbx
mov [rsp+98h+var_88], r12
mov rcx, r12
call JS_ToBigInt1
test rax, rax
jz short loc_42F9F
add r13d, 0FFFFFF5Ah; switch 7 cases
cmp r13d, 6
ja def_42F89; jumptable 0000000000042F89 default case, cases 170,171
mov r12, rax
lea rax, jpt_42F89
movsxd rcx, ds:(jpt_42F89 - 9CCC0h)[rax+r13*4]
add rcx, rax
jmp rcx; switch jump
loc_42F8B:
mov rdi, rbp; jumptable 0000000000042F89 case 166
mov rsi, r12
jmp short loc_42FFC
loc_42F93:
mov rdi, [r14+18h]
mov rsi, rbx
mov rdx, r12
jmp short loc_42FB4
loc_42F9F:
lea rax, [rsp+98h+var_58]
cmp rbp, rax
jz short loc_42FC4
loc_42FA9:
mov rdi, [r14+18h]
mov rsi, r15
mov rdx, [rsp+98h+var_98]
loc_42FB4:
call JS_FreeValueRT
mov r13d, 0FFFFFFFFh
jmp loc_4305D
loc_42FC4:
mov rax, [rbp+0]
test rax, rax
jz short loc_42FA9
mov rsi, [rbp+20h]
test rsi, rsi
jz short loc_42FA9
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
jmp short loc_42FA9
loc_42FE0:
mov rdi, rbp; jumptable 0000000000042F89 case 172
mov rsi, r12
call bf_cmp
xor r13d, r13d
test eax, eax
setz r13b
jmp short loc_43026
loc_42FF6:
mov rdi, r12; jumptable 0000000000042F89 case 168
mov rsi, rbp
loc_42FFC:
call bf_cmp
mov r13d, eax
shr r13d, 1Fh
jmp short loc_43026
loc_4300A:
mov rdi, r12; jumptable 0000000000042F89 case 169
mov rsi, rbp
jmp short loc_43018
loc_43012:
mov rdi, rbp; jumptable 0000000000042F89 case 167
mov rsi, r12
loc_43018:
call bf_cmp
xor r13d, r13d
test eax, eax
setle r13b
loc_43026:
lea rbx, [rsp+98h+var_80]
lea rax, [rsp+98h+var_58]
cmp rbp, rax
jz short loc_4306F
loc_43035:
cmp r12, rbx
jz short loc_4308B
loc_4303A:
mov rdi, [r14+18h]
mov rsi, r15
mov rdx, [rsp+98h+var_98]
call JS_FreeValueRT
mov rdi, [r14+18h]
mov rsi, [rsp+98h+var_90]
mov rdx, [rsp+98h+var_88]
call JS_FreeValueRT
loc_4305D:
mov eax, r13d
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4306F:
mov rax, [rbp+0]
test rax, rax
jz short loc_43035
mov rsi, [rbp+20h]
test rsi, rsi
jz short loc_43035
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
jmp short loc_43035
loc_4308B:
mov rax, [r12]
test rax, rax
jz short loc_4303A
mov rsi, [r12+20h]
test rsi, rsi
jz short loc_4303A
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
jmp short loc_4303A
def_42F89:
call _abort; jumptable 0000000000042F89 default case, cases 170,171
| long long js_compare_bigint(long long a1, int a2, _DWORD *a3, long long a4, _DWORD *a5, long long a6)
{
long long v10; // rax
_QWORD **v11; // rbp
long long v12; // rax
_QWORD **v13; // r12
_QWORD **v14; // rdi
_QWORD **v15; // rsi
long long v16; // rdi
_DWORD *v17; // rsi
long long v18; // rdx
unsigned int v19; // r13d
_QWORD *v20; // rsi
_QWORD **v21; // rdi
_QWORD **v22; // rsi
_QWORD *v24; // rsi
_QWORD *v25; // rsi
long long v27; // [rsp+10h] [rbp-88h]
_BYTE v28[40]; // [rsp+18h] [rbp-80h] BYREF
_BYTE v29[88]; // [rsp+40h] [rbp-58h] BYREF
v10 = JS_ToBigInt1(a1, v29, a3, a4);
if ( !v10 )
{
v16 = *(_QWORD *)(a1 + 24);
v17 = a5;
v18 = a6;
LABEL_8:
JS_FreeValueRT(v16, v17, v18);
return (unsigned int)-1;
}
v11 = (_QWORD **)v10;
v27 = a6;
v12 = JS_ToBigInt1(a1, v28, a5, a6);
if ( !v12 )
{
if ( v11 == (_QWORD **)v29 )
{
if ( *v11 )
{
v20 = v11[4];
if ( v20 )
((void ( *)(_QWORD, _QWORD *, _QWORD))(*v11)[1])(**v11, v20, 0LL);
}
}
v16 = *(_QWORD *)(a1 + 24);
v17 = a3;
v18 = a4;
goto LABEL_8;
}
v13 = (_QWORD **)v12;
switch ( a2 )
{
case 166:
v14 = v11;
v15 = (_QWORD **)v12;
goto LABEL_14;
case 167:
v21 = v11;
v22 = (_QWORD **)v12;
goto LABEL_17;
case 168:
v14 = (_QWORD **)v12;
v15 = v11;
LABEL_14:
v19 = (unsigned int)bf_cmp(v14, v15) >> 31;
break;
case 169:
v21 = (_QWORD **)v12;
v22 = v11;
LABEL_17:
v19 = (int)bf_cmp(v21, v22) <= 0;
break;
case 172:
v19 = bf_cmp(v11, v12) == 0;
break;
default:
abort((const char *)a1);
}
if ( v11 == (_QWORD **)v29 )
{
if ( *v11 )
{
v24 = v11[4];
if ( v24 )
((void ( *)(_QWORD, _QWORD *, _QWORD))(*v11)[1])(**v11, v24, 0LL);
}
}
if ( v13 == (_QWORD **)v28 )
{
if ( *v13 )
{
v25 = v13[4];
if ( v25 )
((void ( *)(_QWORD, _QWORD *, _QWORD))(*v13)[1])(**v13, v25, 0LL);
}
}
JS_FreeValueRT(*(_QWORD *)(a1 + 24), a3, a4);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), a5, v27);
return v19;
}
| |||
24,208 | js_compare_bigint | bluesky950520[P]quickjs/quickjs.c | static int js_compare_bigint(JSContext *ctx, OPCodeEnum op,
JSValue op1, JSValue op2)
{
bf_t a_s, b_s, *a, *b;
int res;
a = JS_ToBigInt1(ctx, &a_s, op1);
if (!a) {
JS_FreeValue(ctx, op2);
return -1;
}
b = JS_ToBigInt1(ctx, &b_s, op2);
if (!b) {
if (a == &a_s)
bf_delete(a);
JS_FreeValue(ctx, op1);
return -1;
}
switch(op) {
case OP_lt:
res = bf_cmp_lt(a, b); /* if NaN return false */
break;
case OP_lte:
res = bf_cmp_le(a, b); /* if NaN return false */
break;
case OP_gt:
res = bf_cmp_lt(b, a); /* if NaN return false */
break;
case OP_gte:
res = bf_cmp_le(b, a); /* if NaN return false */
break;
case OP_eq:
res = bf_cmp_eq(a, b); /* if NaN return false */
break;
default:
abort();
}
if (a == &a_s)
bf_delete(a);
if (b == &b_s)
bf_delete(b);
JS_FreeValue(ctx, op1);
JS_FreeValue(ctx, op2);
return res;
} | O2 | c | js_compare_bigint:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r9, %r15
movq %r8, %r14
movq %rdx, %r12
movl %esi, %r13d
movq %rdi, %rbx
leaq 0x40(%rsp), %rsi
movq %rcx, (%rsp)
callq 0x3abb3
testq %rax, %rax
je 0x3aaf5
movq %rax, %rbp
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
movq %r14, 0x8(%rsp)
movq %r14, %rdx
movq %r15, 0x10(%rsp)
movq %r15, %rcx
callq 0x3abb3
testq %rax, %rax
je 0x3ab00
addl $0xffffff5a, %r13d # imm = 0xFFFFFF5A
cmpl $0x6, %r13d
ja 0x3abae
movq %rax, %r15
leaq 0x49220(%rip), %rax # 0x83d04
movslq (%rax,%r13,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %rbp, %rdi
movq %r15, %rsi
jmp 0x3ab3a
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
jmp 0x3ab1c
leaq 0x40(%rsp), %rax
cmpq %rax, %rbp
jne 0x3ab12
movq %rbp, %rdi
callq 0x352f0
movq %rbx, %rdi
movq %r12, %rsi
movq (%rsp), %rdx
callq 0x1801e
pushq $-0x1
popq %r13
jmp 0x3ab9c
movq %rbp, %rdi
movq %r15, %rsi
callq 0x366dd
jmp 0x3ab54
movq %r15, %rdi
movq %rbp, %rsi
callq 0x3ac43
jmp 0x3ab54
movq %r15, %rdi
movq %rbp, %rsi
jmp 0x3ab4f
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3ac4e
movl %eax, %r13d
leaq 0x18(%rsp), %r14
leaq 0x40(%rsp), %rax
cmpq %rax, %rbp
jne 0x3ab6e
movq %rbp, %rdi
callq 0x352f0
cmpq %r14, %r15
jne 0x3ab7b
movq %r15, %rdi
callq 0x352f0
movq %rbx, %rdi
movq %r12, %rsi
movq (%rsp), %rdx
callq 0x1801e
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x1801e
movl %r13d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xe090
| js_compare_bigint:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r15, r9
mov r14, r8
mov r12, rdx
mov r13d, esi
mov rbx, rdi
lea rsi, [rsp+98h+var_58]
mov [rsp+98h+var_98], rcx
call JS_ToBigInt1
test rax, rax
jz short loc_3AAF5
mov rbp, rax
lea rsi, [rsp+98h+var_80]
mov rdi, rbx
mov [rsp+98h+var_90], r14
mov rdx, r14
mov [rsp+98h+var_88], r15
mov rcx, r15
call JS_ToBigInt1
test rax, rax
jz short loc_3AB00
add r13d, 0FFFFFF5Ah; switch 7 cases
cmp r13d, 6
ja def_3AAEB; jumptable 000000000003AAEB default case, cases 170,171
mov r15, rax
lea rax, jpt_3AAEB
movsxd rcx, ds:(jpt_3AAEB - 83D04h)[rax+r13*4]
add rcx, rax
jmp rcx; switch jump
loc_3AAED:
mov rdi, rbp; jumptable 000000000003AAEB case 166
mov rsi, r15
jmp short loc_3AB3A
loc_3AAF5:
mov rdi, rbx
mov rsi, r14
mov rdx, r15
jmp short loc_3AB1C
loc_3AB00:
lea rax, [rsp+98h+var_58]
cmp rbp, rax
jnz short loc_3AB12
mov rdi, rbp
call bf_delete
loc_3AB12:
mov rdi, rbx
mov rsi, r12
mov rdx, [rsp+98h+var_98]
loc_3AB1C:
call JS_FreeValue
push 0FFFFFFFFFFFFFFFFh
pop r13
jmp short loc_3AB9C
loc_3AB27:
mov rdi, rbp; jumptable 000000000003AAEB case 172
mov rsi, r15
call bf_cmp_eq
jmp short loc_3AB54
loc_3AB34:
mov rdi, r15; jumptable 000000000003AAEB case 168
mov rsi, rbp
loc_3AB3A:
call bf_cmp_lt
jmp short loc_3AB54
loc_3AB41:
mov rdi, r15; jumptable 000000000003AAEB case 169
mov rsi, rbp
jmp short loc_3AB4F
loc_3AB49:
mov rdi, rbp; jumptable 000000000003AAEB case 167
mov rsi, r15
loc_3AB4F:
call bf_cmp_le
loc_3AB54:
mov r13d, eax
lea r14, [rsp+98h+var_80]
lea rax, [rsp+98h+var_58]
cmp rbp, rax
jnz short loc_3AB6E
mov rdi, rbp
call bf_delete
loc_3AB6E:
cmp r15, r14
jnz short loc_3AB7B
mov rdi, r15
call bf_delete
loc_3AB7B:
mov rdi, rbx
mov rsi, r12
mov rdx, [rsp+98h+var_98]
call JS_FreeValue
mov rdi, rbx
mov rsi, [rsp+98h+var_90]
mov rdx, [rsp+98h+var_88]
call JS_FreeValue
loc_3AB9C:
mov eax, r13d
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
def_3AAEB:
call _abort; jumptable 000000000003AAEB default case, cases 170,171
| long long js_compare_bigint(const char *a1, int a2, long long a3, long long a4, long long a5, long long a6)
{
long long v10; // rax
long long *v11; // rbp
long long v12; // rax
long long *v13; // r15
long long v14; // rdi
long long v15; // rsi
long long v16; // rsi
long long v17; // rdx
unsigned int v18; // r13d
unsigned int v19; // eax
long long v20; // rdi
long long v21; // rsi
long long v24; // [rsp+10h] [rbp-88h]
_BYTE v25[40]; // [rsp+18h] [rbp-80h] BYREF
_BYTE v26[88]; // [rsp+40h] [rbp-58h] BYREF
v10 = JS_ToBigInt1(a1, v26, a3, a4);
if ( !v10 )
{
v16 = a5;
v17 = a6;
LABEL_9:
JS_FreeValue((long long)a1, v16, v17);
return (unsigned int)-1;
}
v11 = (long long *)v10;
v24 = a6;
v12 = JS_ToBigInt1(a1, v25, a5, a6);
if ( !v12 )
{
if ( v11 == (long long *)v26 )
bf_delete(v11);
v16 = a3;
v17 = a4;
goto LABEL_9;
}
v13 = (long long *)v12;
switch ( a2 )
{
case 166:
v14 = (long long)v11;
v15 = v12;
goto LABEL_12;
case 167:
v20 = (long long)v11;
v21 = v12;
goto LABEL_15;
case 168:
v14 = v12;
v15 = (long long)v11;
LABEL_12:
v19 = bf_cmp_lt(v14, v15);
break;
case 169:
v20 = v12;
v21 = (long long)v11;
LABEL_15:
v19 = bf_cmp_le(v20, v21);
break;
case 172:
v19 = bf_cmp_eq((long long)v11);
break;
default:
abort(a1);
}
v18 = v19;
if ( v11 == (long long *)v26 )
bf_delete(v11);
if ( v13 == (long long *)v25 )
bf_delete(v13);
JS_FreeValue((long long)a1, a3, a4);
JS_FreeValue((long long)a1, a5, v24);
return v18;
}
| js_compare_bigint:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R15,R9
MOV R14,R8
MOV R12,RDX
MOV R13D,ESI
MOV RBX,RDI
LEA RSI,[RSP + 0x40]
MOV qword ptr [RSP],RCX
CALL 0x0013abb3
TEST RAX,RAX
JZ 0x0013aaf5
MOV RBP,RAX
LEA RSI,[RSP + 0x18]
MOV RDI,RBX
MOV qword ptr [RSP + 0x8],R14
MOV RDX,R14
MOV qword ptr [RSP + 0x10],R15
MOV RCX,R15
CALL 0x0013abb3
TEST RAX,RAX
JZ 0x0013ab00
ADD R13D,0xffffff5a
CMP R13D,0x6
JA 0x0013abae
MOV R15,RAX
LEA RAX,[0x183d04]
MOVSXD RCX,dword ptr [RAX + R13*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_a6:
MOV RDI,RBP
MOV RSI,R15
JMP 0x0013ab3a
LAB_0013aaf5:
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
JMP 0x0013ab1c
LAB_0013ab00:
LEA RAX,[RSP + 0x40]
CMP RBP,RAX
JNZ 0x0013ab12
MOV RDI,RBP
CALL 0x001352f0
LAB_0013ab12:
MOV RDI,RBX
MOV RSI,R12
MOV RDX,qword ptr [RSP]
LAB_0013ab1c:
CALL 0x0011801e
PUSH -0x1
POP R13
JMP 0x0013ab9c
caseD_ac:
MOV RDI,RBP
MOV RSI,R15
CALL 0x001366dd
JMP 0x0013ab54
caseD_a8:
MOV RDI,R15
MOV RSI,RBP
LAB_0013ab3a:
CALL 0x0013ac43
JMP 0x0013ab54
caseD_a9:
MOV RDI,R15
MOV RSI,RBP
JMP 0x0013ab4f
caseD_a7:
MOV RDI,RBP
MOV RSI,R15
LAB_0013ab4f:
CALL 0x0013ac4e
LAB_0013ab54:
MOV R13D,EAX
LEA R14,[RSP + 0x18]
LEA RAX,[RSP + 0x40]
CMP RBP,RAX
JNZ 0x0013ab6e
MOV RDI,RBP
CALL 0x001352f0
LAB_0013ab6e:
CMP R15,R14
JNZ 0x0013ab7b
MOV RDI,R15
CALL 0x001352f0
LAB_0013ab7b:
MOV RDI,RBX
MOV RSI,R12
MOV RDX,qword ptr [RSP]
CALL 0x0011801e
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
CALL 0x0011801e
LAB_0013ab9c:
MOV EAX,R13D
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
caseD_aa:
CALL 0x0010e090
|
int4
js_compare_bigint(int8 param_1,int4 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6)
{
int4 uVar1;
int1 *puVar2;
int1 *puVar3;
int1 *puVar4;
int1 *puVar5;
int1 local_80 [40];
int1 local_58 [40];
puVar2 = (int1 *)JS_ToBigInt1(param_1,local_58);
if (puVar2 == (int1 *)0x0) {
LAB_0013ab1c:
JS_FreeValue(param_1,param_5,param_6);
return 0xffffffff;
}
puVar3 = (int1 *)JS_ToBigInt1(param_1,local_80,param_5,param_6);
if (puVar3 == (int1 *)0x0) {
param_6 = param_4;
param_5 = param_3;
if (puVar2 == local_58) {
bf_delete(puVar2);
}
goto LAB_0013ab1c;
}
switch(param_2) {
case 0xa6:
puVar4 = puVar3;
puVar5 = puVar2;
break;
case 0xa7:
puVar4 = puVar3;
puVar5 = puVar2;
goto LAB_0013ab4f;
case 0xa8:
puVar4 = puVar2;
puVar5 = puVar3;
break;
case 0xa9:
puVar4 = puVar2;
puVar5 = puVar3;
LAB_0013ab4f:
uVar1 = bf_cmp_le(puVar5,puVar4);
goto LAB_0013ab54;
default:
/* WARNING: Subroutine does not return */
abort();
case 0xac:
uVar1 = bf_cmp_eq(puVar2,puVar3);
goto LAB_0013ab54;
}
uVar1 = bf_cmp_lt(puVar5,puVar4);
LAB_0013ab54:
if (puVar2 == local_58) {
bf_delete(puVar2);
}
if (puVar3 == local_80) {
bf_delete(puVar3);
}
JS_FreeValue(param_1,param_3,param_4);
JS_FreeValue(param_1,param_5,param_6);
return uVar1;
}
| |
24,209 | OpenSubdiv::v3_6_0::Sdc::Crease::GetSharpEdgePairOfCrease(float const*, int, int*) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/../far/../far/../far/../vtr/../sdc/crease.h | inline void
Crease::GetSharpEdgePairOfCrease(float const * incidentEdgeSharpness, int incidentEdgeCount,
int sharpEdgePair[2]) const {
// Only to be called when a crease is present at a vertex -- exactly two sharp
// edges are expected here:
//
sharpEdgePair[0] = 0;
while (IsSmooth(incidentEdgeSharpness[sharpEdgePair[0]])) ++ sharpEdgePair[0];
sharpEdgePair[1] = incidentEdgeCount - 1;
while (IsSmooth(incidentEdgeSharpness[sharpEdgePair[1]])) -- sharpEdgePair[1];
} | O0 | c | OpenSubdiv::v3_6_0::Sdc::Crease::GetSharpEdgePairOfCrease(float const*, int, int*) const:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq (%rcx), %rcx
movss (%rax,%rcx,4), %xmm0
callq 0xcf1f0
testb $0x1, %al
jne 0x11f09c
jmp 0x11f0a9
movq -0x20(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x11f081
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq 0x4(%rcx), %rcx
movss (%rax,%rcx,4), %xmm0
callq 0xcf1f0
testb $0x1, %al
jne 0x11f0d2
jmp 0x11f0e1
movq -0x20(%rbp), %rax
movl 0x4(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rax)
jmp 0x11f0b6
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _ZNK10OpenSubdiv6v3_6_03Sdc6Crease24GetSharpEdgePairOfCreaseEPKfiPi:
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
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
loc_11F081:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_20]
movsxd rcx, dword ptr [rcx]
movss xmm0, dword ptr [rax+rcx*4]; float
call __ZN10OpenSubdiv6v3_6_03Sdc6Crease8IsSmoothEf; OpenSubdiv::v3_6_0::Sdc::Crease::IsSmooth(float)
test al, 1
jnz short loc_11F09C
jmp short loc_11F0A9
loc_11F09C:
mov rax, [rbp+var_20]
mov ecx, [rax]
add ecx, 1
mov [rax], ecx
jmp short loc_11F081
loc_11F0A9:
mov ecx, [rbp+var_14]
sub ecx, 1
mov rax, [rbp+var_20]
mov [rax+4], ecx
loc_11F0B6:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_20]
movsxd rcx, dword ptr [rcx+4]
movss xmm0, dword ptr [rax+rcx*4]; float
call __ZN10OpenSubdiv6v3_6_03Sdc6Crease8IsSmoothEf; OpenSubdiv::v3_6_0::Sdc::Crease::IsSmooth(float)
test al, 1
jnz short loc_11F0D2
jmp short loc_11F0E1
loc_11F0D2:
mov rax, [rbp+var_20]
mov ecx, [rax+4]
add ecx, 0FFFFFFFFh
mov [rax+4], ecx
jmp short loc_11F0B6
loc_11F0E1:
add rsp, 20h
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Sdc::Crease::GetSharpEdgePairOfCrease(
OpenSubdiv::v3_6_0::Sdc::Crease *this,
const float *a2,
int a3,
int *a4)
{
long long result; // rax
for ( *a4 = 0; (OpenSubdiv::v3_6_0::Sdc::Crease::IsSmooth(this, a2[*a4]) & 1) != 0; ++*a4 )
;
for ( a4[1] = a3 - 1; ; --a4[1] )
{
result = OpenSubdiv::v3_6_0::Sdc::Crease::IsSmooth(this, a2[a4[1]]);
if ( (result & 1) == 0 )
break;
}
return result;
}
| |||
24,210 | OpenSubdiv::v3_6_0::Sdc::Crease::GetSharpEdgePairOfCrease(float const*, int, int*) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/../far/../far/../far/../vtr/../sdc/crease.h | inline void
Crease::GetSharpEdgePairOfCrease(float const * incidentEdgeSharpness, int incidentEdgeCount,
int sharpEdgePair[2]) const {
// Only to be called when a crease is present at a vertex -- exactly two sharp
// edges are expected here:
//
sharpEdgePair[0] = 0;
while (IsSmooth(incidentEdgeSharpness[sharpEdgePair[0]])) ++ sharpEdgePair[0];
sharpEdgePair[1] = incidentEdgeCount - 1;
while (IsSmooth(incidentEdgeSharpness[sharpEdgePair[1]])) -- sharpEdgePair[1];
} | O2 | c | OpenSubdiv::v3_6_0::Sdc::Crease::GetSharpEdgePairOfCrease(float const*, int, int*) const:
pushq $-0x1
popq %rax
xorps %xmm0, %xmm0
movq %rsi, %rdi
incl %eax
ucomiss (%rdi), %xmm0
leaq 0x4(%rdi), %rdi
jae 0x6ca9f
movl %eax, (%rcx)
movslq %edx, %rax
leaq (%rsi,%rax,4), %rax
addq $-0x4, %rax
xorps %xmm0, %xmm0
decl %edx
ucomiss (%rax), %xmm0
leaq -0x4(%rax), %rax
jae 0x6caba
movl %edx, 0x4(%rcx)
retq
nop
| _ZNK10OpenSubdiv6v3_6_03Sdc6Crease24GetSharpEdgePairOfCreaseEPKfiPi:
push 0FFFFFFFFFFFFFFFFh
pop rax
xorps xmm0, xmm0
mov rdi, rsi
loc_6CA9F:
inc eax
ucomiss xmm0, dword ptr [rdi]
lea rdi, [rdi+4]
jnb short loc_6CA9F
mov [rcx], eax
movsxd rax, edx
lea rax, [rsi+rax*4]
add rax, 0FFFFFFFFFFFFFFFCh
xorps xmm0, xmm0
loc_6CABA:
dec edx
ucomiss xmm0, dword ptr [rax]
lea rax, [rax-4]
jnb short loc_6CABA
mov [rcx+4], edx
retn
| float * OpenSubdiv::v3_6_0::Sdc::Crease::GetSharpEdgePairOfCrease(
OpenSubdiv::v3_6_0::Sdc::Crease *this,
float *a2,
int a3,
int *a4)
{
int v4; // eax
float *v5; // rdi
bool v6; // cf
float *result; // rax
v4 = -1;
v5 = a2;
do
{
++v4;
v6 = *v5++ > 0.0;
}
while ( !v6 );
*a4 = v4;
result = &a2[a3 - 1];
do
{
--a3;
v6 = *result-- > 0.0;
}
while ( !v6 );
a4[1] = a3;
return result;
}
| GetSharpEdgePairOfCrease:
PUSH -0x1
POP RAX
XORPS XMM0,XMM0
MOV RDI,RSI
LAB_0016ca9f:
INC EAX
UCOMISS XMM0,dword ptr [RDI]
LEA RDI,[RDI + 0x4]
JNC 0x0016ca9f
MOV dword ptr [RCX],EAX
MOVSXD RAX,EDX
LEA RAX,[RSI + RAX*0x4]
ADD RAX,-0x4
XORPS XMM0,XMM0
LAB_0016caba:
DEC EDX
UCOMISS XMM0,dword ptr [RAX]
LEA RAX,[RAX + -0x4]
JNC 0x0016caba
MOV dword ptr [RCX + 0x4],EDX
RET
|
/* OpenSubdiv::v3_6_0::Sdc::Crease::GetSharpEdgePairOfCrease(float const*, int, int*) const */
void __thiscall
OpenSubdiv::v3_6_0::Sdc::Crease::GetSharpEdgePairOfCrease
(Crease *this,float *param_1,int param_2,int *param_3)
{
float fVar1;
int iVar2;
float *pfVar3;
iVar2 = -1;
pfVar3 = param_1;
do {
iVar2 = iVar2 + 1;
fVar1 = *pfVar3;
pfVar3 = pfVar3 + 1;
} while (fVar1 <= 0.0);
*param_3 = iVar2;
pfVar3 = param_1 + param_2;
do {
pfVar3 = pfVar3 + -1;
param_2 = param_2 + -1;
} while (*pfVar3 <= 0.0);
param_3[1] = param_2;
return;
}
| |
24,211 | ma_crypt_get_index_page_header_space | eloqsql/storage/maria/ma_crypt.c | uint
ma_crypt_get_index_page_header_space(MARIA_SHARE *share)
{
if (share->base.born_transactional)
{
return CRYPT_SCHEME_1_KEY_VERSION_SIZE;
}
else
{
/* if the index is not transactional, we add 7 bytes LSN anyway
to be used for counter block
*/
return LSN_STORE_SIZE + CRYPT_SCHEME_1_KEY_VERSION_SIZE;
}
} | O0 | c | ma_crypt_get_index_page_header_space:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x44c(%rax)
je 0x5d8be
movl $0x4, -0x4(%rbp)
jmp 0x5d8c5
movl $0xb, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
| ma_crypt_get_index_page_header_space:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
cmp byte ptr [rax+44Ch], 0
jz short loc_5D8BE
mov [rbp+var_4], 4
jmp short loc_5D8C5
loc_5D8BE:
mov [rbp+var_4], 0Bh
loc_5D8C5:
mov eax, [rbp+var_4]
pop rbp
retn
| long long ma_crypt_get_index_page_header_space(long long a1)
{
if ( *(_BYTE *)(a1 + 1100) )
return 4;
else
return 11;
}
| ma_crypt_get_index_page_header_space:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX + 0x44c],0x0
JZ 0x0015d8be
MOV dword ptr [RBP + -0x4],0x4
JMP 0x0015d8c5
LAB_0015d8be:
MOV dword ptr [RBP + -0x4],0xb
LAB_0015d8c5:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 ma_crypt_get_index_page_header_space(long param_1)
{
int4 local_c;
if (*(char *)(param_1 + 0x44c) == '\0') {
local_c = 0xb;
}
else {
local_c = 4;
}
return local_c;
}
| |
24,212 | nglog::NullStream::~NullStream() | ng-log[P]ng-log/src/ng-log/logging.h | class NGLOG_EXPORT NullStream : public LogMessage::LogStream {
public:
// Initialize the LogStream so the messages can be written somewhere
// (they'll never be actually displayed). This will be needed if a
// NullStream& is implicitly converted to LogStream&, in which case
// the overloaded NullStream::operator<< will not be invoked.
NullStream();
NullStream(const char* /*file*/, int /*line*/,
const internal::CheckOpString& /*result*/);
NullStream& stream();
private:
// A very short buffer for messages (which we discard anyway). This
// will be needed if NullStream& converted to LogStream& (e.g. as a
// result of a conditional expression).
char message_buffer_[3];
} | O1 | c | nglog::NullStream::~NullStream():
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %rax
movq -0x18(%rax), %rax
leaq (%rdi,%rax), %rbx
leaq 0x1e30e(%rip), %rcx # 0x30898
leaq 0x18(%rcx), %rdx
leaq (%rdi,%rax), %r14
addq $0x60, %r14
movq %rdx, -0x60(%r14)
addq $0x40, %rcx
movq %rcx, (%r14)
movq 0x1e990(%rip), %rcx # 0x30f38
addq $0x10, %rcx
movq %rcx, -0x58(%r14)
addq %rax, %rdi
addq $0x40, %rdi
callq 0x77b0
movq %r14, %rdi
callq 0x7170
movl $0x168, %esi # imm = 0x168
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x906c
| _ZTv0_n24_N5nglog10NullStreamD0Ev:
push r14
push rbx
push rax
mov rax, [rdi]
mov rax, [rax-18h]
lea rbx, [rdi+rax]
lea rcx, _ZTCN5nglog10NullStreamE0_NS_10LogMessage9LogStreamE; `construction vtable for'nglog::LogMessage::LogStream-in-nglog::NullStream
lea rdx, [rcx+18h]
lea r14, [rdi+rax]
add r14, 60h ; '`'
mov [r14-60h], rdx
add rcx, 40h ; '@'
mov [r14], rcx
mov rcx, cs:_ZTVSt15basic_streambufIcSt11char_traitsIcEE_ptr
add rcx, 10h
mov [r14-58h], rcx
add rdi, rax
add rdi, 40h ; '@'; this
call __ZNSt6localeD1Ev; std::locale::~locale()
mov rdi, r14; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov esi, 168h; unsigned __int64
mov rdi, rbx; void *
add rsp, 8
pop rbx
pop r14
jmp _ZdlPvm; operator delete(void *,ulong)
| void `virtual thunk to'nglog::NullStream::~NullStream(nglog::NullStream *this)
{
_QWORD *v1; // rbx
v1 = (_QWORD *)((char *)this + *(_QWORD *)(*(_QWORD *)this - 24LL));
*v1 = (char *)&`construction vtable for'nglog::LogMessage::LogStream-in-nglog::NullStream + 24;
v1[12] = (char *)&`construction vtable for'nglog::LogMessage::LogStream-in-nglog::NullStream + 64;
v1[1] = (char *)&`vtable for'std::streambuf + 16;
std::locale::~locale((std::locale *)(v1 + 8));
std::ios_base::~ios_base((std::ios_base *)(v1 + 12));
operator delete(v1);
}
| ~NullStream:
PUSH R14
PUSH RBX
PUSH RAX
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + -0x18]
LEA RBX,[RDI + RAX*0x1]
LEA RCX,[0x130898]
LEA RDX,[RCX + 0x18]
LEA R14,[RDI + RAX*0x1]
ADD R14,0x60
MOV qword ptr [R14 + -0x60],RDX
ADD RCX,0x40
MOV qword ptr [R14],RCX
MOV RCX,qword ptr [0x00130f38]
ADD RCX,0x10
MOV qword ptr [R14 + -0x58],RCX
ADD RDI,RAX
ADD RDI,0x40
CALL 0x001077b0
MOV RDI,R14
CALL 0x00107170
MOV ESI,0x168
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0010906c
|
/* virtual thunk to nglog::NullStream::~NullStream() */
void __thiscall nglog::NullStream::~NullStream(NullStream *this)
{
NullStream *pNVar1;
long lVar2;
lVar2 = *(long *)(*(long *)this + -0x18);
pNVar1 = this + lVar2;
*(int8 *)pNVar1 = 0x1308b0;
*(int8 *)(pNVar1 + 0x60) = 0x1308d8;
*(int **)(pNVar1 + 8) = PTR_vtable_00130f38 + 0x10;
std::locale::~locale((locale *)(this + lVar2 + 0x40));
std::ios_base::~ios_base((ios_base *)(pNVar1 + 0x60));
operator_delete(this + lVar2,0x168);
return;
}
| |
24,213 | nglog::NullStream::~NullStream() | ng-log[P]ng-log/src/ng-log/logging.h | class NGLOG_EXPORT NullStream : public LogMessage::LogStream {
public:
// Initialize the LogStream so the messages can be written somewhere
// (they'll never be actually displayed). This will be needed if a
// NullStream& is implicitly converted to LogStream&, in which case
// the overloaded NullStream::operator<< will not be invoked.
NullStream();
NullStream(const char* /*file*/, int /*line*/,
const internal::CheckOpString& /*result*/);
NullStream& stream();
private:
// A very short buffer for messages (which we discard anyway). This
// will be needed if NullStream& converted to LogStream& (e.g. as a
// result of a conditional expression).
char message_buffer_[3];
} | O2 | c | nglog::NullStream::~NullStream():
pushq %rbx
movq %rdi, %rbx
leaq 0x1fe19(%rip), %rsi # 0x308a0
addq $0x8, %rsi
callq 0xb208
addq $0x60, %rbx
movq %rbx, %rdi
popq %rbx
jmp 0x8190
nop
| _ZN5nglog10NullStreamD1Ev:
push rbx
mov rbx, rdi
lea rsi, _ZTTN5nglog10NullStreamE; `VTT for'nglog::NullStream
add rsi, 8
call _ZN5nglog10LogMessage9LogStreamD2Ev; nglog::LogMessage::LogStream::~LogStream()
add rbx, 60h ; '`'
mov rdi, rbx; this
pop rbx
jmp __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
| void nglog::NullStream::~NullStream(nglog::NullStream *this)
{
nglog::LogMessage::LogStream::~LogStream(this, (long long *)&`VTT for'nglog::NullStream[1]);
std::ios_base::~ios_base((nglog::NullStream *)((char *)this + 96));
}
| ~NullStream:
PUSH RBX
MOV RBX,RDI
LEA RSI,[0x1308a0]
ADD RSI,0x8
CALL 0x0010b208
ADD RBX,0x60
MOV RDI,RBX
POP RBX
JMP 0x00108190
|
/* nglog::NullStream::~NullStream() */
void __thiscall nglog::NullStream::~NullStream(NullStream *this)
{
LogMessage::LogStream::~LogStream((LogStream *)this);
std::ios_base::~ios_base((ios_base *)(this + 0x60));
return;
}
| |
24,214 | nglog::NullStream::~NullStream() | ng-log[P]ng-log/src/ng-log/logging.h | class NGLOG_EXPORT NullStream : public LogMessage::LogStream {
public:
// Initialize the LogStream so the messages can be written somewhere
// (they'll never be actually displayed). This will be needed if a
// NullStream& is implicitly converted to LogStream&, in which case
// the overloaded NullStream::operator<< will not be invoked.
NullStream();
NullStream(const char* /*file*/, int /*line*/,
const internal::CheckOpString& /*result*/);
NullStream& stream();
private:
// A very short buffer for messages (which we discard anyway). This
// will be needed if NullStream& converted to LogStream& (e.g. as a
// result of a conditional expression).
char message_buffer_[3];
} | O3 | c | nglog::NullStream::~NullStream():
pushq %rbx
movq (%rdi), %rax
movq -0x18(%rax), %rax
leaq 0x1e6b1(%rip), %rcx # 0x308d8
leaq 0x18(%rcx), %rdx
leaq (%rdi,%rax), %rbx
addq $0x60, %rbx
movq %rdx, -0x60(%rbx)
addq $0x40, %rcx
movq %rcx, (%rbx)
movq 0x1ecf3(%rip), %rcx # 0x30f38
addq $0x10, %rcx
movq %rcx, -0x58(%rbx)
addq %rax, %rdi
addq $0x40, %rdi
callq 0x77b0
movq %rbx, %rdi
popq %rbx
jmp 0x7170
| _ZTv0_n24_N5nglog10NullStreamD1Ev:
push rbx
mov rax, [rdi]
mov rax, [rax-18h]
lea rcx, _ZTCN5nglog10NullStreamE0_NS_10LogMessage9LogStreamE; `construction vtable for'nglog::LogMessage::LogStream-in-nglog::NullStream
lea rdx, [rcx+18h]
lea rbx, [rdi+rax]
add rbx, 60h ; '`'
mov [rbx-60h], rdx
add rcx, 40h ; '@'
mov [rbx], rcx
mov rcx, cs:_ZTVSt15basic_streambufIcSt11char_traitsIcEE_ptr
add rcx, 10h
mov [rbx-58h], rcx
add rdi, rax
add rdi, 40h ; '@'; this
call __ZNSt6localeD1Ev; std::locale::~locale()
mov rdi, rbx; this
pop rbx
jmp __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
| void `virtual thunk to'nglog::NullStream::~NullStream(nglog::NullStream *this)
{
long long v1; // rax
std::ios_base *v2; // rbx
v1 = *(_QWORD *)(*(_QWORD *)this - 24LL);
v2 = (nglog::NullStream *)((char *)this + v1 + 96);
*((_QWORD *)v2 - 12) = (char *)&`construction vtable for'nglog::LogMessage::LogStream-in-nglog::NullStream + 24;
*(_QWORD *)v2 = (char *)&`construction vtable for'nglog::LogMessage::LogStream-in-nglog::NullStream + 64;
*((_QWORD *)v2 - 11) = (char *)&`vtable for'std::streambuf + 16;
std::locale::~locale((nglog::NullStream *)((char *)this + v1 + 64));
std::ios_base::~ios_base(v2);
}
| ~NullStream:
PUSH RBX
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + -0x18]
LEA RCX,[0x1308d8]
LEA RDX,[RCX + 0x18]
LEA RBX,[RDI + RAX*0x1]
ADD RBX,0x60
MOV qword ptr [RBX + -0x60],RDX
ADD RCX,0x40
MOV qword ptr [RBX],RCX
MOV RCX,qword ptr [0x00130f38]
ADD RCX,0x10
MOV qword ptr [RBX + -0x58],RCX
ADD RDI,RAX
ADD RDI,0x40
CALL 0x001077b0
MOV RDI,RBX
POP RBX
JMP 0x00107170
|
/* virtual thunk to nglog::NullStream::~NullStream() */
void __thiscall nglog::NullStream::~NullStream(NullStream *this)
{
NullStream *pNVar1;
long lVar2;
lVar2 = *(long *)(*(long *)this + -0x18);
pNVar1 = this + lVar2;
*(int8 *)pNVar1 = 0x1308f0;
*(int8 *)(pNVar1 + 0x60) = 0x130918;
*(int **)(pNVar1 + 8) = PTR_vtable_00130f38 + 0x10;
std::locale::~locale((locale *)(this + lVar2 + 0x40));
std::ios_base::~ios_base((ios_base *)(pNVar1 + 0x60));
return;
}
| |
24,215 | maria_ft_parse_internal | eloqsql/storage/maria/ma_ft_parser.c | static int maria_ft_parse_internal(MYSQL_FTPARSER_PARAM *param,
const char *doc_arg,
int doc_len)
{
uchar *doc= (uchar*) doc_arg;
uchar *end= doc + doc_len;
MY_FT_PARSER_PARAM *ft_param=param->mysql_ftparam;
TREE *wtree= ft_param->wtree;
FT_WORD w;
DBUG_ENTER("maria_ft_parse_internal");
while (maria_ft_simple_get_word(wtree->custom_arg, &doc, end, &w, TRUE))
if (param->mysql_add_word(param, (char*)w.pos, w.len, 0))
DBUG_RETURN(1);
DBUG_RETURN(0);
} | O3 | c | maria_ft_parse_internal:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq -0x48(%rbp), %r14
movq %rsi, (%r14)
movslq %edx, %r15
addq %rsi, %r15
movq 0x18(%rdi), %rax
movq (%rax), %r12
leaq -0x40(%rbp), %r13
movq 0x230(%r12), %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r13, %rcx
movl $0x1, %r8d
callq 0x46453
testb %al, %al
je 0x4668f
movq -0x40(%rbp), %rsi
movl -0x38(%rbp), %edx
movq %rbx, %rdi
xorl %ecx, %ecx
callq *0x8(%rbx)
testl %eax, %eax
je 0x46655
movl $0x1, %eax
jmp 0x46691
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| maria_ft_parse_internal:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdi
lea r14, [rbp+var_48]
mov [r14], rsi
movsxd r15, edx
add r15, rsi
mov rax, [rdi+18h]
mov r12, [rax]
lea r13, [rbp+var_40]
loc_46655:
mov rdi, [r12+230h]
mov rsi, r14
mov rdx, r15
mov rcx, r13
mov r8d, 1
call maria_ft_simple_get_word
test al, al
jz short loc_4668F
mov rsi, [rbp+var_40]
mov edx, [rbp+var_38]
mov rdi, rbx
xor ecx, ecx
call qword ptr [rbx+8]
test eax, eax
jz short loc_46655
mov eax, 1
jmp short loc_46691
loc_4668F:
xor eax, eax
loc_46691:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long maria_ft_parse_internal(long long a1, _BYTE *a2, int a3)
{
unsigned long long v3; // r15
long long v4; // r12
_BYTE *v6; // [rsp+8h] [rbp-48h] BYREF
long long v7; // [rsp+10h] [rbp-40h] BYREF
unsigned int v8; // [rsp+18h] [rbp-38h]
v6 = a2;
v3 = (unsigned long long)&a2[a3];
v4 = **(_QWORD **)(a1 + 24);
while ( maria_ft_simple_get_word(*(_QWORD *)(v4 + 560), &v6, v3, &v7, 1) )
{
if ( (*(unsigned int ( **)(long long, long long, _QWORD, _QWORD))(a1 + 8))(a1, v7, v8, 0LL) )
return 1LL;
}
return 0LL;
}
| maria_ft_parse_internal:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
LEA R14,[RBP + -0x48]
MOV qword ptr [R14],RSI
MOVSXD R15,EDX
ADD R15,RSI
MOV RAX,qword ptr [RDI + 0x18]
MOV R12,qword ptr [RAX]
LEA R13,[RBP + -0x40]
LAB_00146655:
MOV RDI,qword ptr [R12 + 0x230]
MOV RSI,R14
MOV RDX,R15
MOV RCX,R13
MOV R8D,0x1
CALL 0x00146453
TEST AL,AL
JZ 0x0014668f
MOV RSI,qword ptr [RBP + -0x40]
MOV EDX,dword ptr [RBP + -0x38]
MOV RDI,RBX
XOR ECX,ECX
CALL qword ptr [RBX + 0x8]
TEST EAX,EAX
JZ 0x00146655
MOV EAX,0x1
JMP 0x00146691
LAB_0014668f:
XOR EAX,EAX
LAB_00146691:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 maria_ft_parse_internal(long param_1,long param_2,int param_3)
{
long lVar1;
char cVar2;
int iVar3;
long local_50;
int8 local_48;
int4 local_40;
lVar1 = **(long **)(param_1 + 0x18);
local_50 = param_2;
do {
cVar2 = maria_ft_simple_get_word
(*(int8 *)(lVar1 + 0x230),&local_50,param_3 + param_2,&local_48,1);
if (cVar2 == '\0') {
return 0;
}
iVar3 = (**(code **)(param_1 + 8))(param_1,local_48,local_40,0);
} while (iVar3 == 0);
return 1;
}
| |
24,216 | ggml_backend_cpu_aarch64_buffer_set_tensor(ggml_backend_buffer*, ggml_tensor*, void const*, unsigned long, unsigned long) | ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp | static void ggml_backend_cpu_aarch64_buffer_set_tensor(ggml_backend_buffer_t buffer, struct ggml_tensor * tensor,
const void * data, size_t offset, size_t size) {
GGML_ASSERT(offset == 0);
GGML_ASSERT(size == ggml_nbytes(tensor));
auto tensor_traits = (ggml::cpu::aarch64::tensor_traits_base *) tensor->extra;
auto OK = tensor_traits->repack(tensor, data, size);
GGML_ASSERT(OK == 0);
GGML_UNUSED(buffer);
} | O2 | cpp | ggml_backend_cpu_aarch64_buffer_set_tensor(ggml_backend_buffer*, ggml_tensor*, void const*, unsigned long, unsigned long):
pushq %r15
pushq %r14
pushq %rbx
testq %rcx, %rcx
jne 0x187e7
movq %r8, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rsi, %rdi
callq 0xb0e0
cmpq %rbx, %rax
jne 0x18803
movq 0x140(%r15), %rdi
movq (%rdi), %rax
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq *0x20(%rax)
testl %eax, %eax
jne 0x1881f
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2c94b(%rip), %rdi # 0x45139
leaq 0x2bcbd(%rip), %rdx # 0x444b2
leaq 0x2cac5(%rip), %rcx # 0x452c1
movl $0x15d8, %esi # imm = 0x15D8
jmp 0x18839
leaq 0x2c92f(%rip), %rdi # 0x45139
leaq 0x2bca1(%rip), %rdx # 0x444b2
leaq 0x2cab5(%rip), %rcx # 0x452cd
movl $0x15d9, %esi # imm = 0x15D9
jmp 0x18839
leaq 0x2c913(%rip), %rdi # 0x45139
leaq 0x2bc85(%rip), %rdx # 0x444b2
leaq 0x2cab5(%rip), %rcx # 0x452e9
movl $0x15de, %esi # imm = 0x15DE
xorl %eax, %eax
callq 0xc040
| _ZL42ggml_backend_cpu_aarch64_buffer_set_tensorP19ggml_backend_bufferP11ggml_tensorPKvmm:
push r15
push r14
push rbx
test rcx, rcx
jnz short loc_187E7
mov rbx, r8
mov r14, rdx
mov r15, rsi
mov rdi, rsi
call _ggml_nbytes
cmp rax, rbx
jnz short loc_18803
mov rdi, [r15+140h]
mov rax, [rdi]
mov rsi, r15
mov rdx, r14
mov rcx, rbx
call qword ptr [rax+20h]
test eax, eax
jnz short loc_1881F
pop rbx
pop r14
pop r15
retn
loc_187E7:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aOffset0; "offset == 0"
mov esi, 15D8h
jmp short loc_18839
loc_18803:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aSizeGgmlNbytes; "size == ggml_nbytes(tensor)"
mov esi, 15D9h
jmp short loc_18839
loc_1881F:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aOk0; "OK == 0"
mov esi, 15DEh
loc_18839:
xor eax, eax
call _ggml_abort
| long long ggml_backend_cpu_aarch64_buffer_set_tensor(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5)
{
long long result; // rax
if ( a4 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp",
5592LL,
"GGML_ASSERT(%s) failed",
"offset == 0");
return ggml_aarch64_get_optimal_repack_type("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp");
}
if ( ggml_nbytes(a2) != a5 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp",
5593LL,
"GGML_ASSERT(%s) failed",
"size == ggml_nbytes(tensor)");
return ggml_aarch64_get_optimal_repack_type("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp");
}
result = (*(long long ( **)(_QWORD, long long, long long, long long))(**(_QWORD **)(a2 + 320) + 32LL))(
*(_QWORD *)(a2 + 320),
a2,
a3,
a5);
if ( (_DWORD)result )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp",
5598LL,
"GGML_ASSERT(%s) failed",
"OK == 0");
return ggml_aarch64_get_optimal_repack_type("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp");
}
return result;
}
| ggml_backend_cpu_aarch64_buffer_set_tensor:
PUSH R15
PUSH R14
PUSH RBX
TEST RCX,RCX
JNZ 0x001187e7
MOV RBX,R8
MOV R14,RDX
MOV R15,RSI
MOV RDI,RSI
CALL 0x0010b0e0
CMP RAX,RBX
JNZ 0x00118803
MOV RDI,qword ptr [R15 + 0x140]
MOV RAX,qword ptr [RDI]
MOV RSI,R15
MOV RDX,R14
MOV RCX,RBX
CALL qword ptr [RAX + 0x20]
TEST EAX,EAX
JNZ 0x0011881f
POP RBX
POP R14
POP R15
RET
LAB_001187e7:
LEA RDI,[0x145139]
LEA RDX,[0x1444b2]
LEA RCX,[0x1452c1]
MOV ESI,0x15d8
JMP 0x00118839
LAB_00118803:
LEA RDI,[0x145139]
LEA RDX,[0x1444b2]
LEA RCX,[0x1452cd]
MOV ESI,0x15d9
JMP 0x00118839
LAB_0011881f:
LEA RDI,[0x145139]
LEA RDX,[0x1444b2]
LEA RCX,[0x1452e9]
MOV ESI,0x15de
LAB_00118839:
XOR EAX,EAX
CALL 0x0010c040
|
/* ggml_backend_cpu_aarch64_buffer_set_tensor(ggml_backend_buffer*, ggml_tensor*, void const*,
unsigned long, unsigned long) */
void ggml_backend_cpu_aarch64_buffer_set_tensor
(ggml_backend_buffer *param_1,ggml_tensor *param_2,void *param_3,ulong param_4,
ulong param_5)
{
int iVar1;
ulong uVar2;
char *pcVar3;
int8 uVar4;
if (param_4 == 0) {
uVar2 = ggml_nbytes(param_2);
if (uVar2 == param_5) {
iVar1 = (**(code **)(**(long **)(param_2 + 0x140) + 0x20))
(*(long **)(param_2 + 0x140),param_2,param_3,param_5);
if (iVar1 == 0) {
return;
}
pcVar3 = "OK == 0";
uVar4 = 0x15de;
}
else {
pcVar3 = "size == ggml_nbytes(tensor)";
uVar4 = 0x15d9;
}
}
else {
pcVar3 = "offset == 0";
uVar4 = 0x15d8;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp"
,uVar4,"GGML_ASSERT(%s) failed",pcVar3);
}
| |
24,217 | row_log_event_uncompress(Format_description_log_event const*, bool, unsigned char const*, unsigned long, unsigned char*, unsigned long, bool*, unsigned char**, unsigned long*) | eloqsql/sql/log_event.cc | int
row_log_event_uncompress(const Format_description_log_event *description_event,
bool contain_checksum, const uchar *src, ulong src_len,
uchar* buf, ulong buf_size, bool* is_malloc,
uchar **dst, ulong *newlen)
{
Log_event_type type= (Log_event_type)(uchar)src[EVENT_TYPE_OFFSET];
ulong len= uint4korr(src + EVENT_LEN_OFFSET);
const uchar *tmp= src;
uchar *new_dst= NULL;
const uchar *end= tmp + len;
if (src_len < len)
return 1; // bad event
DBUG_ASSERT(LOG_EVENT_IS_ROW_COMPRESSED(type));
uint8 common_header_len= description_event->common_header_len;
uint8 post_header_len= description_event->post_header_len[type-1];
tmp+= common_header_len + ROWS_HEADER_LEN_V1;
if (post_header_len == ROWS_HEADER_LEN_V2)
{
/*
Have variable length header, check length,
which includes length bytes
*/
if (end - tmp <= 2)
return 1; // bad event
uint16 var_header_len= uint2korr(tmp);
DBUG_ASSERT(var_header_len >= 2);
/* skip over var-len header, extracting 'chunks' */
tmp+= var_header_len;
/* get the uncompressed event type */
type=
(Log_event_type)(type - WRITE_ROWS_COMPRESSED_EVENT + WRITE_ROWS_EVENT);
}
else
{
/* get the uncompressed event type */
type= (Log_event_type)
(type - WRITE_ROWS_COMPRESSED_EVENT_V1 + WRITE_ROWS_EVENT_V1);
}
if (end <= tmp)
return 1; //bad event
ulong m_width= net_field_length((uchar **)&tmp);
tmp+= (m_width + 7) / 8;
if (type == UPDATE_ROWS_EVENT_V1 || type == UPDATE_ROWS_EVENT)
{
tmp+= (m_width + 7) / 8;
}
if (end <= tmp)
return 1; //bad event
uint32 un_len= binlog_get_uncompress_len(tmp);
if (un_len == 0)
return 1; //bad event
int32 comp_len= (int32)(len - (tmp - src) -
(contain_checksum ? BINLOG_CHECKSUM_LEN : 0));
if (comp_len <=0)
return 1; //bad event
*newlen= ulong(tmp - src) + un_len;
if (contain_checksum)
*newlen+= BINLOG_CHECKSUM_LEN;
size_t alloc_size= ALIGN_SIZE(*newlen);
*is_malloc= false;
if (alloc_size <= buf_size)
{
new_dst= buf;
}
else
{
new_dst= (uchar*) my_malloc(PSI_INSTRUMENT_ME, alloc_size, MYF(MY_WME));
if (!new_dst)
return 1;
*is_malloc= true;
}
/* Copy the head. */
memcpy(new_dst, src , tmp - src);
/* Uncompress the body. */
if (binlog_buf_uncompress(tmp, new_dst + (tmp - src),
comp_len, &un_len))
{
if (*is_malloc)
my_free(new_dst);
return 1;
}
new_dst[EVENT_TYPE_OFFSET]= type;
int4store(new_dst + EVENT_LEN_OFFSET, *newlen);
if (contain_checksum)
{
ulong clear_len= *newlen - BINLOG_CHECKSUM_LEN;
int4store(new_dst + clear_len,
my_checksum(0L, (uchar *)new_dst, clear_len));
}
*dst= new_dst;
return 0;
} | O0 | cpp | row_log_event_uncompress(Format_description_log_event const*, bool, unsigned char const*, unsigned long, unsigned char*, unsigned long, bool*, unsigned char**, unsigned long*):
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movb %sil, %al
movq 0x20(%rbp), %rsi
movq 0x18(%rbp), %rsi
movq 0x10(%rbp), %rsi
movq %rdi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x20(%rbp), %rax
movzbl 0x4(%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x20(%rbp), %rax
movl 0x9(%rax), %eax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x50(%rbp), %rax
addq -0x48(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x48(%rbp), %rax
jae 0xa0a4fb
movl $0x1, -0x4(%rbp)
jmp 0xa0a7d9
jmp 0xa0a4fd
jmp 0xa0a4ff
movq -0x10(%rbp), %rax
movb 0xad(%rax), %al
movb %al, -0x61(%rbp)
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rax
movl -0x3c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %al
movb %al, -0x62(%rbp)
movzbl -0x61(%rbp), %ecx
addl $0x8, %ecx
movq -0x50(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movzbl -0x62(%rbp), %eax
cmpl $0xa, %eax
jne 0xa0a590
movq -0x60(%rbp), %rax
movq -0x50(%rbp), %rcx
subq %rcx, %rax
cmpq $0x2, %rax
jg 0xa0a561
movl $0x1, -0x4(%rbp)
jmp 0xa0a7d9
movq -0x50(%rbp), %rax
movw (%rax), %ax
movw %ax, -0x64(%rbp)
jmp 0xa0a56e
movzwl -0x64(%rbp), %ecx
movq -0x50(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movl -0x3c(%rbp), %eax
subl $0xa9, %eax
addl $0x1e, %eax
movl %eax, -0x3c(%rbp)
jmp 0xa0a59e
movl -0x3c(%rbp), %eax
subl $0xa6, %eax
addl $0x17, %eax
movl %eax, -0x3c(%rbp)
movq -0x60(%rbp), %rax
cmpq -0x50(%rbp), %rax
ja 0xa0a5b4
movl $0x1, -0x4(%rbp)
jmp 0xa0a7d9
leaq -0x50(%rbp), %rdi
callq 0xa62860
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
addq $0x7, %rax
shrq $0x3, %rax
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpl $0x18, -0x3c(%rbp)
je 0xa0a5e1
cmpl $0x1f, -0x3c(%rbp)
jne 0xa0a5f5
movq -0x70(%rbp), %rax
addq $0x7, %rax
shrq $0x3, %rax
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x60(%rbp), %rax
cmpq -0x50(%rbp), %rax
ja 0xa0a60b
movl $0x1, -0x4(%rbp)
jmp 0xa0a7d9
movq -0x50(%rbp), %rdi
callq 0xa0a2a0
movl %eax, -0x74(%rbp)
cmpl $0x0, -0x74(%rbp)
jne 0xa0a629
movl $0x1, -0x4(%rbp)
jmp 0xa0a7d9
movq -0x48(%rbp), %rax
movq -0x50(%rbp), %rcx
movq -0x20(%rbp), %rdx
subq %rdx, %rcx
subq %rcx, %rax
movb -0x11(%rbp), %sil
xorl %ecx, %ecx
movl $0x4, %edx
testb $0x1, %sil
cmovnel %edx, %ecx
movslq %ecx, %rcx
subq %rcx, %rax
movl %eax, -0x78(%rbp)
cmpl $0x0, -0x78(%rbp)
jg 0xa0a668
movl $0x1, -0x4(%rbp)
jmp 0xa0a7d9
movq -0x50(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rax, %rcx
movl -0x74(%rbp), %eax
addq %rax, %rcx
movq 0x20(%rbp), %rax
movq %rcx, (%rax)
testb $0x1, -0x11(%rbp)
je 0xa0a694
movq 0x20(%rbp), %rax
movq (%rax), %rcx
addq $0x4, %rcx
movq %rcx, (%rax)
movq 0x20(%rbp), %rax
movq (%rax), %rax
addq $0x8, %rax
subq $0x1, %rax
andq $-0x8, %rax
movq %rax, -0x80(%rbp)
movq 0x10(%rbp), %rax
movb $0x0, (%rax)
movq -0x80(%rbp), %rax
cmpq -0x38(%rbp), %rax
ja 0xa0a6c6
movq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0xa0a6f4
movq -0x80(%rbp), %rsi
xorl %edi, %edi
movl $0x10, %edx
callq 0xc1ac20
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0xa0a6ed
movl $0x1, -0x4(%rbp)
jmp 0xa0a7d9
movq 0x10(%rbp), %rax
movb $0x1, (%rax)
movq -0x58(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq -0x20(%rbp), %rax
subq %rax, %rdx
callq 0x4331a0
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
addq %rax, %rsi
movl -0x78(%rbp), %edx
leaq -0x74(%rbp), %rcx
callq 0xa0a3b0
cmpl $0x0, %eax
je 0xa0a751
movq 0x10(%rbp), %rax
testb $0x1, (%rax)
je 0xa0a745
movq -0x58(%rbp), %rdi
callq 0xc1afa0
movl $0x1, -0x4(%rbp)
jmp 0xa0a7d9
movl -0x3c(%rbp), %eax
movb %al, %cl
movq -0x58(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x58(%rbp), %rax
addq $0x9, %rax
movq %rax, -0x88(%rbp)
movq 0x20(%rbp), %rax
movq (%rax), %rax
movl %eax, %ecx
movq -0x88(%rbp), %rax
movl %ecx, (%rax)
testb $0x1, -0x11(%rbp)
je 0xa0a7c7
movq 0x20(%rbp), %rax
movq (%rax), %rax
subq $0x4, %rax
movq %rax, -0x90(%rbp)
movq -0x58(%rbp), %rax
addq -0x90(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x58(%rbp), %rsi
movq -0x90(%rbp), %rdx
xorl %edi, %edi
callq 0xc40bb0
movl %eax, %ecx
movq -0x98(%rbp), %rax
movl %ecx, (%rax)
jmp 0xa0a7c7
movq -0x58(%rbp), %rcx
movq 0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _Z24row_log_event_uncompressPK28Format_description_log_eventbPKhmPhmPbPS4_Pm:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov al, sil
mov rsi, [rbp+arg_10]
mov rsi, [rbp+arg_8]
mov rsi, [rbp+arg_0]
mov [rbp+var_10], rdi
and al, 1
mov [rbp+var_11], al
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+4]
mov [rbp+var_3C], eax
mov rax, [rbp+var_20]
mov eax, [rax+9]
mov [rbp+var_48], rax
mov rax, [rbp+var_20]
mov [rbp+var_50], rax
mov [rbp+var_58], 0
mov rax, [rbp+var_50]
add rax, [rbp+var_48]
mov [rbp+var_60], rax
mov rax, [rbp+var_28]
cmp rax, [rbp+var_48]
jnb short loc_A0A4FB
mov [rbp+var_4], 1
jmp loc_A0A7D9
loc_A0A4FB:
jmp short $+2
loc_A0A4FD:
jmp short $+2
loc_A0A4FF:
mov rax, [rbp+var_10]
mov al, [rax+0ADh]
mov [rbp+var_61], al
mov rax, [rbp+var_10]
mov rax, [rax+0B0h]
mov ecx, [rbp+var_3C]
sub ecx, 1
movsxd rcx, ecx
mov al, [rax+rcx]
mov [rbp+var_62], al
movzx ecx, [rbp+var_61]
add ecx, 8
mov rax, [rbp+var_50]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_50], rax
movzx eax, [rbp+var_62]
cmp eax, 0Ah
jnz short loc_A0A590
mov rax, [rbp+var_60]
mov rcx, [rbp+var_50]
sub rax, rcx
cmp rax, 2
jg short loc_A0A561
mov [rbp+var_4], 1
jmp loc_A0A7D9
loc_A0A561:
mov rax, [rbp+var_50]
mov ax, [rax]
mov [rbp+var_64], ax
jmp short $+2
loc_A0A56E:
movzx ecx, [rbp+var_64]
mov rax, [rbp+var_50]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_50], rax
mov eax, [rbp+var_3C]
sub eax, 0A9h
add eax, 1Eh
mov [rbp+var_3C], eax
jmp short loc_A0A59E
loc_A0A590:
mov eax, [rbp+var_3C]
sub eax, 0A6h
add eax, 17h
mov [rbp+var_3C], eax
loc_A0A59E:
mov rax, [rbp+var_60]
cmp rax, [rbp+var_50]
ja short loc_A0A5B4
mov [rbp+var_4], 1
jmp loc_A0A7D9
loc_A0A5B4:
lea rdi, [rbp+var_50]
call net_field_length
mov [rbp+var_70], rax
mov rax, [rbp+var_70]
add rax, 7
shr rax, 3
add rax, [rbp+var_50]
mov [rbp+var_50], rax
cmp [rbp+var_3C], 18h
jz short loc_A0A5E1
cmp [rbp+var_3C], 1Fh
jnz short loc_A0A5F5
loc_A0A5E1:
mov rax, [rbp+var_70]
add rax, 7
shr rax, 3
add rax, [rbp+var_50]
mov [rbp+var_50], rax
loc_A0A5F5:
mov rax, [rbp+var_60]
cmp rax, [rbp+var_50]
ja short loc_A0A60B
mov [rbp+var_4], 1
jmp loc_A0A7D9
loc_A0A60B:
mov rdi, [rbp+var_50]; unsigned __int8 *
call _Z25binlog_get_uncompress_lenPKh; binlog_get_uncompress_len(uchar const*)
mov [rbp+var_74], eax
cmp [rbp+var_74], 0
jnz short loc_A0A629
mov [rbp+var_4], 1
jmp loc_A0A7D9
loc_A0A629:
mov rax, [rbp+var_48]
mov rcx, [rbp+var_50]
mov rdx, [rbp+var_20]
sub rcx, rdx
sub rax, rcx
mov sil, [rbp+var_11]
xor ecx, ecx
mov edx, 4
test sil, 1
cmovnz ecx, edx
movsxd rcx, ecx
sub rax, rcx
mov [rbp+var_78], eax
cmp [rbp+var_78], 0
jg short loc_A0A668
mov [rbp+var_4], 1
jmp loc_A0A7D9
loc_A0A668:
mov rcx, [rbp+var_50]
mov rax, [rbp+var_20]
sub rcx, rax
mov eax, [rbp+var_74]
add rcx, rax
mov rax, [rbp+arg_10]
mov [rax], rcx
test [rbp+var_11], 1
jz short loc_A0A694
mov rax, [rbp+arg_10]
mov rcx, [rax]
add rcx, 4
mov [rax], rcx
loc_A0A694:
mov rax, [rbp+arg_10]
mov rax, [rax]
add rax, 8
sub rax, 1
and rax, 0FFFFFFFFFFFFFFF8h
mov [rbp+var_80], rax
mov rax, [rbp+arg_0]
mov byte ptr [rax], 0
mov rax, [rbp+var_80]
cmp rax, [rbp+var_38]
ja short loc_A0A6C6
mov rax, [rbp+var_30]
mov [rbp+var_58], rax
jmp short loc_A0A6F4
loc_A0A6C6:
mov rsi, [rbp+var_80]
xor edi, edi
mov edx, 10h
call my_malloc
mov [rbp+var_58], rax
cmp [rbp+var_58], 0
jnz short loc_A0A6ED
mov [rbp+var_4], 1
jmp loc_A0A7D9
loc_A0A6ED:
mov rax, [rbp+arg_0]
mov byte ptr [rax], 1
loc_A0A6F4:
mov rdi, [rbp+var_58]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_50]
mov rax, [rbp+var_20]
sub rdx, rax
call _memcpy
mov rdi, [rbp+var_50]; unsigned __int8 *
mov rsi, [rbp+var_58]
mov rax, [rbp+var_50]
mov rcx, [rbp+var_20]
sub rax, rcx
add rsi, rax; unsigned __int8 *
mov edx, [rbp+var_78]; unsigned int
lea rcx, [rbp+var_74]; unsigned int *
call _Z21binlog_buf_uncompressPKhPhjPj; binlog_buf_uncompress(uchar const*,uchar *,uint,uint *)
cmp eax, 0
jz short loc_A0A751
mov rax, [rbp+arg_0]
test byte ptr [rax], 1
jz short loc_A0A745
mov rdi, [rbp+var_58]
call my_free
loc_A0A745:
mov [rbp+var_4], 1
jmp loc_A0A7D9
loc_A0A751:
mov eax, [rbp+var_3C]
mov cl, al
mov rax, [rbp+var_58]
mov [rax+4], cl
mov rax, [rbp+var_58]
add rax, 9
mov [rbp+var_88], rax
mov rax, [rbp+arg_10]
mov rax, [rax]
mov ecx, eax
mov rax, [rbp+var_88]
mov [rax], ecx
test [rbp+var_11], 1
jz short loc_A0A7C7
mov rax, [rbp+arg_10]
mov rax, [rax]
sub rax, 4
mov [rbp+var_90], rax
mov rax, [rbp+var_58]
add rax, [rbp+var_90]
mov [rbp+var_98], rax
mov rsi, [rbp+var_58]
mov rdx, [rbp+var_90]
xor edi, edi
call my_checksum
mov ecx, eax
mov rax, [rbp+var_98]
mov [rax], ecx
jmp short $+2
loc_A0A7C7:
mov rcx, [rbp+var_58]
mov rax, [rbp+arg_8]
mov [rax], rcx
mov [rbp+var_4], 0
loc_A0A7D9:
mov eax, [rbp+var_4]
add rsp, 0A0h
pop rbp
retn
| long long row_log_event_uncompress(
const Format_description_log_event *a1,
char a2,
unsigned __int8 *a3,
unsigned long long a4,
unsigned __int8 *a5,
unsigned long long a6,
bool *a7,
unsigned __int8 **a8,
unsigned long long *a9)
{
int v9; // ecx
_DWORD *v11; // [rsp+8h] [rbp-98h]
unsigned long long v12; // [rsp+20h] [rbp-80h]
signed int v13; // [rsp+28h] [rbp-78h]
unsigned int uncompress_len; // [rsp+2Ch] [rbp-74h] BYREF
long long v15; // [rsp+30h] [rbp-70h]
unsigned __int16 v16; // [rsp+3Ch] [rbp-64h]
char v17; // [rsp+3Eh] [rbp-62h]
unsigned __int8 v18; // [rsp+3Fh] [rbp-61h]
const unsigned __int8 *v19; // [rsp+40h] [rbp-60h]
long long v20; // [rsp+48h] [rbp-58h]
unsigned __int8 *v21; // [rsp+50h] [rbp-50h] BYREF
unsigned long long v22; // [rsp+58h] [rbp-48h]
int v23; // [rsp+64h] [rbp-3Ch]
unsigned long long v24; // [rsp+68h] [rbp-38h]
unsigned __int8 *v25; // [rsp+70h] [rbp-30h]
unsigned long long v26; // [rsp+78h] [rbp-28h]
unsigned __int8 *v27; // [rsp+80h] [rbp-20h]
char v28; // [rsp+8Fh] [rbp-11h]
const Format_description_log_event *v29; // [rsp+90h] [rbp-10h]
v29 = a1;
v28 = a2 & 1;
v27 = a3;
v26 = a4;
v25 = a5;
v24 = a6;
v23 = a3[4];
v22 = *(unsigned int *)(a3 + 9);
v21 = a3;
v20 = 0LL;
v19 = &a3[v22];
if ( a4 >= v22 )
{
v18 = *((_BYTE *)v29 + 173);
v17 = *(_BYTE *)(*((_QWORD *)v29 + 22) + v23 - 1);
v21 += v18 + 8;
if ( v17 == 10 )
{
if ( v19 - v21 <= 2 )
return 1;
v16 = *(_WORD *)v21;
v21 += v16;
v23 = v23 - 169 + 30;
}
else
{
v23 = v23 - 166 + 23;
}
if ( v19 > v21 )
{
v15 = net_field_length(&v21);
v21 += (unsigned long long)(v15 + 7) >> 3;
if ( v23 == 24 || v23 == 31 )
v21 += (unsigned long long)(v15 + 7) >> 3;
if ( v19 > v21 )
{
uncompress_len = binlog_get_uncompress_len(v21);
if ( uncompress_len )
{
v9 = 0;
if ( (v28 & 1) != 0 )
v9 = 4;
v13 = v22 - ((_DWORD)v21 - (_DWORD)v27) - v9;
if ( v13 > 0 )
{
*a9 = uncompress_len + v21 - v27;
if ( (v28 & 1) != 0 )
*a9 += 4LL;
v12 = (*a9 + 7) & 0xFFFFFFFFFFFFFFF8LL;
*a7 = 0;
if ( v12 > v24 )
{
v20 = my_malloc(0LL, v12, 16LL);
if ( !v20 )
return 1;
*a7 = 1;
}
else
{
v20 = (long long)v25;
}
memcpy(v20, v27, v21 - v27);
if ( (unsigned int)binlog_buf_uncompress(v21, (unsigned __int8 *)(v21 - v27 + v20), v13, &uncompress_len) )
{
if ( *a7 )
my_free(v20);
return 1;
}
else
{
*(_BYTE *)(v20 + 4) = v23;
*(_DWORD *)(v20 + 9) = *a9;
if ( (v28 & 1) != 0 )
{
v11 = (_DWORD *)(*a9 - 4 + v20);
*v11 = my_checksum(0LL, v20, *a9 - 4);
}
*a8 = (unsigned __int8 *)v20;
return 0;
}
}
else
{
return 1;
}
}
else
{
return 1;
}
}
else
{
return 1;
}
}
else
{
return 1;
}
}
else
{
return 1;
}
}
| fix_after_pullout:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV AL,CL
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
AND AL,0x1
MOV byte ptr [RBP + -0x19],AL
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RAX
MOV RCX,qword ptr [RAX + 0xf0]
MOV RDI,qword ptr [RCX]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0xf0]
MOV CL,byte ptr [RBP + -0x19]
MOV RAX,qword ptr [RDI]
AND CL,0x1
MOVZX ECX,CL
CALL qword ptr [RAX + 0x58]
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x009f4870
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x00a0a4e5
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0xe0],0x0
LAB_00a0a4e5:
ADD RSP,0x30
POP RBP
RET
|
/* Item_ref::fix_after_pullout(st_select_lex*, Item**, bool) */
void __thiscall
Item_ref::fix_after_pullout(Item_ref *this,st_select_lex *param_1,Item **param_2,bool param_3)
{
st_select_lex *psVar1;
(**(code **)(*(long *)**(int8 **)(this + 0xf0) + 0x58))
((long *)**(int8 **)(this + 0xf0),param_1,*(int8 *)(this + 0xf0),param_3);
psVar1 = (st_select_lex *)Item_ident::get_depended_from((Item_ident *)this);
if (psVar1 == param_1) {
*(int8 *)(this + 0xe0) = 0;
}
return;
}
| |
24,218 | my_thread_global_init | eloqsql/mysys/my_thr_init.c | my_bool my_thread_global_init(void)
{
int pth_ret;
/* Normally this should never be called twice */
DBUG_ASSERT(my_thread_global_init_done == 0);
if (my_thread_global_init_done)
return 0;
my_thread_global_init_done= 1;
/*
THR_KEY_mysys is deleted in my_end() as DBUG libraries are using it even
after my_thread_global_end() is called.
my_thr_key_mysys_exist is used to protect against application like QT
that calls my_thread_global_init() + my_thread_global_end() multiple times
without calling my_init() + my_end().
*/
if (!my_thr_key_mysys_exists &&
(pth_ret= pthread_key_create(&THR_KEY_mysys, NULL)) != 0)
{
fprintf(stderr, "Can't initialize threads: error %d\n", pth_ret);
return 1;
}
my_thr_key_mysys_exists= 1;
/* Mutex used by my_thread_init() and after my_thread_destroy_mutex() */
my_thread_init_internal_mutex();
if (my_thread_init())
return 1;
my_thread_init_common_mutex();
return 0;
} | O0 | c | my_thread_global_init:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
jmp 0x5a31a
cmpb $0x0, 0x3b4c1f(%rip) # 0x40ef40
je 0x5a329
movb $0x0, -0x1(%rbp)
jmp 0x5a39c
movb $0x1, 0x3b4c10(%rip) # 0x40ef40
leaq 0x3b4945(%rip), %rax # 0x40ec7c
cmpb $0x0, (%rax)
jne 0x5a375
leaq 0x3b4c01(%rip), %rdi # 0x40ef44
xorl %eax, %eax
movl %eax, %esi
callq 0x26550
movl %eax, -0x8(%rbp)
cmpl $0x0, %eax
je 0x5a375
movq 0x1b8c85(%rip), %rax # 0x212fe0
movq (%rax), %rdi
movl -0x8(%rbp), %edx
leaq 0x55367(%rip), %rsi # 0xaf6cf
movb $0x0, %al
callq 0x26480
movb $0x1, -0x1(%rbp)
jmp 0x5a39c
leaq 0x3b4900(%rip), %rax # 0x40ec7c
movb $0x1, (%rax)
callq 0x5a210
callq 0x5a3b0
cmpb $0x0, %al
je 0x5a393
movb $0x1, -0x1(%rbp)
jmp 0x5a39c
callq 0x5a140
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_thread_global_init:
push rbp
mov rbp, rsp
sub rsp, 10h
jmp short $+2
loc_5A31A:
cmp cs:my_thread_global_init_done, 0
jz short loc_5A329
mov [rbp+var_1], 0
jmp short loc_5A39C
loc_5A329:
mov cs:my_thread_global_init_done, 1
lea rax, my_thr_key_mysys_exists
cmp byte ptr [rax], 0
jnz short loc_5A375
lea rdi, THR_KEY_mysys
xor eax, eax
mov esi, eax
call _pthread_key_create
mov [rbp+var_8], eax
cmp eax, 0
jz short loc_5A375
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov edx, [rbp+var_8]
lea rsi, aCanTInitialize; "Can't initialize threads: error %d\n"
mov al, 0
call _fprintf
mov [rbp+var_1], 1
jmp short loc_5A39C
loc_5A375:
lea rax, my_thr_key_mysys_exists
mov byte ptr [rax], 1
call my_thread_init_internal_mutex
call my_thread_init
cmp al, 0
jz short loc_5A393
mov [rbp+var_1], 1
jmp short loc_5A39C
loc_5A393:
call my_thread_init_common_mutex
mov [rbp+var_1], 0
loc_5A39C:
mov al, [rbp+var_1]
add rsp, 10h
pop rbp
retn
| char my_thread_global_init()
{
int v1; // [rsp+8h] [rbp-8h]
if ( my_thread_global_init_done )
return 0;
my_thread_global_init_done = 1;
if ( my_thr_key_mysys_exists || (v1 = pthread_key_create(&THR_KEY_mysys, 0LL)) == 0 )
{
my_thr_key_mysys_exists = 1;
my_thread_init_internal_mutex();
if ( (unsigned __int8)my_thread_init() )
{
return 1;
}
else
{
my_thread_init_common_mutex();
return 0;
}
}
else
{
fprintf(stderr, "Can't initialize threads: error %d\n", v1);
return 1;
}
}
| my_thread_global_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
JMP 0x0015a31a
LAB_0015a31a:
CMP byte ptr [0x0050ef40],0x0
JZ 0x0015a329
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0015a39c
LAB_0015a329:
MOV byte ptr [0x0050ef40],0x1
LEA RAX,[0x50ec7c]
CMP byte ptr [RAX],0x0
JNZ 0x0015a375
LEA RDI,[0x50ef44]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00126550
MOV dword ptr [RBP + -0x8],EAX
CMP EAX,0x0
JZ 0x0015a375
MOV RAX,qword ptr [0x00312fe0]
MOV RDI,qword ptr [RAX]
MOV EDX,dword ptr [RBP + -0x8]
LEA RSI,[0x1af6cf]
MOV AL,0x0
CALL 0x00126480
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015a39c
LAB_0015a375:
LEA RAX,[0x50ec7c]
MOV byte ptr [RAX],0x1
CALL 0x0015a210
CALL 0x0015a3b0
CMP AL,0x0
JZ 0x0015a393
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015a39c
LAB_0015a393:
CALL 0x0015a140
MOV byte ptr [RBP + -0x1],0x0
LAB_0015a39c:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x10
POP RBP
RET
|
int1 my_thread_global_init(void)
{
char cVar1;
uint uVar2;
int1 local_9;
if (my_thread_global_init_done == '\0') {
my_thread_global_init_done = '\x01';
if ((my_thr_key_mysys_exists == '\0') &&
(uVar2 = pthread_key_create(&THR_KEY_mysys,(__destr_function *)0x0), uVar2 != 0)) {
fprintf(*(FILE **)PTR_stderr_00312fe0,"Can\'t initialize threads: error %d\n",(ulong)uVar2);
return 1;
}
my_thr_key_mysys_exists = '\x01';
my_thread_init_internal_mutex();
cVar1 = my_thread_init();
if (cVar1 == '\0') {
my_thread_init_common_mutex();
local_9 = 0;
}
else {
local_9 = 1;
}
}
else {
local_9 = 0;
}
return local_9;
}
| |
24,219 | my_thread_global_init | eloqsql/mysys/my_thr_init.c | my_bool my_thread_global_init(void)
{
int pth_ret;
/* Normally this should never be called twice */
DBUG_ASSERT(my_thread_global_init_done == 0);
if (my_thread_global_init_done)
return 0;
my_thread_global_init_done= 1;
/*
THR_KEY_mysys is deleted in my_end() as DBUG libraries are using it even
after my_thread_global_end() is called.
my_thr_key_mysys_exist is used to protect against application like QT
that calls my_thread_global_init() + my_thread_global_end() multiple times
without calling my_init() + my_end().
*/
if (!my_thr_key_mysys_exists &&
(pth_ret= pthread_key_create(&THR_KEY_mysys, NULL)) != 0)
{
fprintf(stderr, "Can't initialize threads: error %d\n", pth_ret);
return 1;
}
my_thr_key_mysys_exists= 1;
/* Mutex used by my_thread_init() and after my_thread_destroy_mutex() */
my_thread_init_internal_mutex();
if (my_thread_init())
return 1;
my_thread_init_common_mutex();
return 0;
} | O3 | c | my_thread_global_init:
cmpb $0x0, 0x38b6f9(%rip) # 0x3d1ae0
je 0x463ec
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movb $0x1, 0x38b6e7(%rip) # 0x3d1ae0
leaq 0x38b41c(%rip), %rbx # 0x3d181c
cmpb $0x0, (%rbx)
je 0x46423
movb $0x1, (%rbx)
callq 0x4623b
callq 0x4645d
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x46456
callq 0x460ae
xorl %eax, %eax
jmp 0x46456
leaq 0x38b6ba(%rip), %rdi # 0x3d1ae4
xorl %esi, %esi
callq 0x26570
testl %eax, %eax
je 0x46405
movq 0x2d0b94(%rip), %rcx # 0x316fd0
movq (%rcx), %rdi
leaq 0x36361(%rip), %rdx # 0x7c7a7
movl $0x1, %esi
movl %eax, %ecx
xorl %eax, %eax
callq 0x265e0
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| my_thread_global_init:
cmp cs:my_thread_global_init_done, 0
jz short loc_463EC
xor eax, eax
retn
loc_463EC:
push rbp
mov rbp, rsp
push rbx
push rax
mov cs:my_thread_global_init_done, 1
lea rbx, my_thr_key_mysys_exists
cmp byte ptr [rbx], 0
jz short loc_46423
loc_46405:
mov byte ptr [rbx], 1
call my_thread_init_internal_mutex
call my_thread_init
mov ecx, eax
mov al, 1
test cl, cl
jnz short loc_46456
call my_thread_init_common_mutex
xor eax, eax
jmp short loc_46456
loc_46423:
lea rdi, THR_KEY_mysys
xor esi, esi
call _pthread_key_create
test eax, eax
jz short loc_46405
mov rcx, cs:stderr_ptr
mov rdi, [rcx]
lea rdx, aCanTInitialize; "Can't initialize threads: error %d\n"
mov esi, 1
mov ecx, eax
xor eax, eax
call ___fprintf_chk
mov al, 1
loc_46456:
add rsp, 8
pop rbx
pop rbp
retn
| char my_thread_global_init(void *a1, long long a2, long long a3, long long a4)
{
char result; // al
char v5; // cl
int v6; // eax
if ( my_thread_global_init_done )
return 0;
my_thread_global_init_done = 1;
if ( my_thr_key_mysys_exists || (a1 = &THR_KEY_mysys, (v6 = pthread_key_create(&THR_KEY_mysys, 0LL, a3, a4)) == 0) )
{
my_thr_key_mysys_exists = 1;
my_thread_init_internal_mutex();
v5 = my_thread_init(a1);
result = 1;
if ( !v5 )
{
my_thread_init_common_mutex();
return 0;
}
}
else
{
__fprintf_chk(stderr, 1LL, "Can't initialize threads: error %d\n", v6);
return 1;
}
return result;
}
| my_thread_global_init:
CMP byte ptr [0x004d1ae0],0x0
JZ 0x001463ec
XOR EAX,EAX
RET
LAB_001463ec:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV byte ptr [0x004d1ae0],0x1
LEA RBX,[0x4d181c]
CMP byte ptr [RBX],0x0
JZ 0x00146423
LAB_00146405:
MOV byte ptr [RBX],0x1
CALL 0x0014623b
CALL 0x0014645d
MOV ECX,EAX
MOV AL,0x1
TEST CL,CL
JNZ 0x00146456
CALL 0x001460ae
XOR EAX,EAX
JMP 0x00146456
LAB_00146423:
LEA RDI,[0x4d1ae4]
XOR ESI,ESI
CALL 0x00126570
TEST EAX,EAX
JZ 0x00146405
MOV RCX,qword ptr [0x00416fd0]
MOV RDI,qword ptr [RCX]
LEA RDX,[0x17c7a7]
MOV ESI,0x1
MOV ECX,EAX
XOR EAX,EAX
CALL 0x001265e0
MOV AL,0x1
LAB_00146456:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
bool my_thread_global_init(void)
{
char cVar1;
int iVar2;
if (my_thread_global_init_done != '\0') {
return false;
}
my_thread_global_init_done = 1;
if ((my_thr_key_mysys_exists == '\0') &&
(iVar2 = pthread_key_create(&THR_KEY_mysys,(__destr_function *)0x0), iVar2 != 0)) {
__fprintf_chk(*(int8 *)PTR_stderr_00416fd0,1,"Can\'t initialize threads: error %d\n",iVar2
);
return true;
}
my_thr_key_mysys_exists = 1;
my_thread_init_internal_mutex();
cVar1 = my_thread_init();
if (cVar1 == '\0') {
my_thread_init_common_mutex();
}
return cVar1 != '\0';
}
| |
24,220 | MyCTX_nopad::finish(unsigned char*, unsigned int*) | eloqsql/mysys_ssl/my_crypt.cc | int finish(uchar *dst, uint *dlen)
{
if (source_tail_len)
{
/*
Not much we can do, block ciphers cannot encrypt data that aren't
a multiple of the block length. At least not without padding.
Let's do something CTR-like for the last partial block.
*/
uchar mask[MY_AES_BLOCK_SIZE];
uint mlen;
int rc= my_aes_crypt(MY_AES_ECB, ENCRYPTION_FLAG_ENCRYPT | ENCRYPTION_FLAG_NOPAD,
oiv, sizeof(mask), mask, &mlen, key, klen, 0, 0);
DBUG_ASSERT(rc == MY_AES_OK);
if (rc)
return rc;
DBUG_ASSERT(mlen == sizeof(mask));
for (uint i=0; i < source_tail_len; i++)
dst[i]= source_tail[i] ^ mask[i];
}
*dlen= source_tail_len;
return MY_AES_OK;
} | O3 | cpp | MyCTX_nopad::finish(unsigned char*, unsigned int*):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
xorl %ebx, %ebx
cmpl $0x0, 0xdc(%rdi)
movl $0x0, %r13d
je 0x2e94b
movq %rsi, %r15
movq %rdi, %r12
leaq 0xe0(%rdi), %rdx
movl 0xd8(%rdi), %eax
xorl %r13d, %r13d
leaq -0x40(%rbp), %r8
leaq -0x44(%rbp), %r9
xorl %edi, %edi
movl $0x3, %esi
movl $0x10, %ecx
pushq $0x0
pushq $0x0
pushq %rax
pushq 0xd0(%r12)
callq 0x2e4c7
addq $0x20, %rsp
testl %eax, %eax
je 0x2e91e
movl %eax, %ebx
jmp 0x2e94e
cmpl $0x0, 0xdc(%r12)
je 0x2e94b
xorl %eax, %eax
movb -0x40(%rbp,%rax), %cl
xorb 0xf0(%r12,%rax), %cl
movb %cl, (%r15,%rax)
incq %rax
movl 0xdc(%r12), %r13d
cmpq %r13, %rax
jb 0x2e92b
movl %r13d, (%r14)
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x2e96e
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x24420
nop
| _ZN11MyCTX_nopad6finishEPhPj:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, rdx
mov rax, fs:28h
mov [rbp+var_30], rax
xor ebx, ebx
cmp dword ptr [rdi+0DCh], 0
mov r13d, 0
jz short loc_2E94B
mov r15, rsi
mov r12, rdi
lea rdx, [rdi+0E0h]
mov eax, [rdi+0D8h]
xor r13d, r13d
lea r8, [rbp+var_40]
lea r9, [rbp+var_44]
xor edi, edi
mov esi, 3
mov ecx, 10h
push 0
push 0
push rax
push qword ptr [r12+0D0h]
call my_aes_crypt
add rsp, 20h
test eax, eax
jz short loc_2E91E
mov ebx, eax
jmp short loc_2E94E
loc_2E91E:
cmp dword ptr [r12+0DCh], 0
jz short loc_2E94B
xor eax, eax
loc_2E92B:
mov cl, [rbp+rax+var_40]
xor cl, [r12+rax+0F0h]
mov [r15+rax], cl
inc rax
mov r13d, [r12+0DCh]
cmp rax, r13
jb short loc_2E92B
loc_2E94B:
mov [r14], r13d
loc_2E94E:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_2E96E
mov eax, ebx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2E96E:
call ___stack_chk_fail
| long long MyCTX_nopad::finish(MyCTX_nopad *this, unsigned __int8 *a2, unsigned int *a3)
{
unsigned int v4; // ebx
unsigned long long v5; // r13
unsigned int v6; // eax
unsigned long long v7; // rax
int v9; // [rsp+Ch] [rbp-44h] BYREF
_BYTE v10[16]; // [rsp+10h] [rbp-40h] BYREF
unsigned long long v11; // [rsp+20h] [rbp-30h]
v11 = __readfsqword(0x28u);
v4 = 0;
LODWORD(v5) = 0;
if ( !*((_DWORD *)this + 55) )
{
LABEL_7:
*a3 = v5;
return v4;
}
LODWORD(v5) = 0;
v6 = my_aes_crypt(
0,
3,
(long long)this + 224,
0x10u,
(long long)v10,
&v9,
*((_QWORD *)this + 26),
*((_DWORD *)this + 54),
0LL);
if ( !v6 )
{
if ( *((_DWORD *)this + 55) )
{
v7 = 0LL;
do
{
a2[v7] = *((_BYTE *)this + v7 + 240) ^ v10[v7];
++v7;
v5 = *((unsigned int *)this + 55);
}
while ( v7 < v5 );
}
goto LABEL_7;
}
return v6;
}
| finish:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
XOR EBX,EBX
CMP dword ptr [RDI + 0xdc],0x0
MOV R13D,0x0
JZ 0x0012e94b
MOV R15,RSI
MOV R12,RDI
LEA RDX,[RDI + 0xe0]
MOV EAX,dword ptr [RDI + 0xd8]
XOR R13D,R13D
LEA R8,[RBP + -0x40]
LEA R9,[RBP + -0x44]
XOR EDI,EDI
MOV ESI,0x3
MOV ECX,0x10
PUSH 0x0
PUSH 0x0
PUSH RAX
PUSH qword ptr [R12 + 0xd0]
CALL 0x0012e4c7
ADD RSP,0x20
TEST EAX,EAX
JZ 0x0012e91e
MOV EBX,EAX
JMP 0x0012e94e
LAB_0012e91e:
CMP dword ptr [R12 + 0xdc],0x0
JZ 0x0012e94b
XOR EAX,EAX
LAB_0012e92b:
MOV CL,byte ptr [RBP + RAX*0x1 + -0x40]
XOR CL,byte ptr [R12 + RAX*0x1 + 0xf0]
MOV byte ptr [R15 + RAX*0x1],CL
INC RAX
MOV R13D,dword ptr [R12 + 0xdc]
CMP RAX,R13
JC 0x0012e92b
LAB_0012e94b:
MOV dword ptr [R14],R13D
LAB_0012e94e:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0012e96e
MOV EAX,EBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012e96e:
CALL 0x00124420
|
/* MyCTX_nopad::finish(unsigned char*, unsigned int*) */
int __thiscall MyCTX_nopad::finish(MyCTX_nopad *this,uchar *param_1,uint *param_2)
{
int iVar1;
ulong uVar2;
uint uVar3;
long in_FS_OFFSET;
int1 local_4c [4];
byte local_48 [16];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar3 = 0;
if (*(int *)(this + 0xdc) != 0) {
uVar3 = 0;
iVar1 = my_aes_crypt(0,3,this + 0xe0,0x10,local_48,local_4c,*(int8 *)(this + 0xd0),
*(int4 *)(this + 0xd8),0,0);
if (iVar1 != 0) goto LAB_0012e94e;
if (*(int *)(this + 0xdc) != 0) {
uVar2 = 0;
do {
param_1[uVar2] = local_48[uVar2] ^ (byte)this[uVar2 + 0xf0];
uVar2 = uVar2 + 1;
uVar3 = *(uint *)(this + 0xdc);
} while (uVar2 < uVar3);
}
}
*param_2 = uVar3;
iVar1 = 0;
LAB_0012e94e:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return iVar1;
}
| |
24,221 | ggml_compute_forward_silu_f32 | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c | static void ggml_compute_forward_silu_f32(
const struct ggml_compute_params * params,
struct ggml_tensor * dst) {
const struct ggml_tensor * src0 = dst->src[0];
assert(ggml_is_contiguous_1(src0));
assert(ggml_is_contiguous_1(dst));
assert(ggml_are_same_shape(src0, dst));
const int ith = params->ith;
const int nth = params->nth;
const int nc = src0->ne[0];
const int nr = ggml_nrows(src0);
// rows per thread
const int dr = (nr + nth - 1)/nth;
// row range for this thread
const int ir0 = dr*ith;
const int ir1 = MIN(ir0 + dr, nr);
for (int i1 = ir0; i1 < ir1; i1++) {
ggml_vec_silu_f32(nc,
(float *) ((char *) dst->data + i1*( dst->nb[1])),
(float *) ((char *) src0->data + i1*(src0->nb[1])));
#ifndef NDEBUG
for (int k = 0; k < nc; k++) {
const float x = ((float *) ((char *) dst->data + i1*(dst->nb[1])))[k];
UNUSED(x);
assert(!isnan(x));
assert(!isinf(x));
}
#endif
}
} | O0 | c | ggml_compute_forward_silu_f32:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0xd030
testb $0x1, %al
jne 0x3a57e
jmp 0x3a580
jmp 0x3a59f
leaq 0x3a6a2(%rip), %rdi # 0x74c29
leaq 0x395d4(%rip), %rsi # 0x73b62
movl $0x19bc, %edx # imm = 0x19BC
leaq 0x3ba04(%rip), %rcx # 0x75f9e
callq 0xd690
movq -0x10(%rbp), %rdi
callq 0xd030
testb $0x1, %al
jne 0x3a5ae
jmp 0x3a5b0
jmp 0x3a5cf
leaq 0x3a68d(%rip), %rdi # 0x74c44
leaq 0x395a4(%rip), %rsi # 0x73b62
movl $0x19bd, %edx # imm = 0x19BD
leaq 0x3b9d4(%rip), %rcx # 0x75f9e
callq 0xd690
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xe260
testb $0x1, %al
jne 0x3a5e2
jmp 0x3a5e4
jmp 0x3a603
leaq 0x39ccf(%rip), %rdi # 0x742ba
leaq 0x39570(%rip), %rsi # 0x73b62
movl $0x19be, %edx # imm = 0x19BE
leaq 0x3b9a0(%rip), %rcx # 0x75f9e
callq 0xd690
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rdi
callq 0xdc20
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
addl -0x20(%rbp), %eax
subl $0x1, %eax
cltd
idivl -0x20(%rbp)
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
imull -0x1c(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
addl -0x2c(%rbp), %eax
cmpl -0x28(%rbp), %eax
jge 0x3a65d
movl -0x30(%rbp), %eax
addl -0x2c(%rbp), %eax
movl %eax, -0x44(%rbp)
jmp 0x3a663
movl -0x28(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x34(%rbp), %eax
jge 0x3a7b1
movl -0x24(%rbp), %edi
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %rsi
movslq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
imulq 0x38(%rcx), %rax
addq %rax, %rsi
movq -0x18(%rbp), %rax
movq 0xf8(%rax), %rdx
movslq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
imulq 0x38(%rcx), %rax
addq %rax, %rdx
callq 0x3a7c0
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x3a7a1
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %rax
movslq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rdx
imulq 0x38(%rdx), %rcx
addq %rcx, %rax
movslq -0x3c(%rbp), %rcx
vmovss (%rax,%rcx,4), %xmm0
vmovss %xmm0, -0x40(%rbp)
vmovss -0x40(%rbp), %xmm0
vucomiss %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x3a707
jmp 0x3a726
leaq 0x3a570(%rip), %rdi # 0x74c7e
leaq 0x3944d(%rip), %rsi # 0x73b62
movl $0x19d6, %edx # imm = 0x19D6
leaq 0x3b87d(%rip), %rcx # 0x75f9e
callq 0xd690
vmovss -0x40(%rbp), %xmm1
vmovaps %xmm1, %xmm0
vpbroadcastd 0x393a8(%rip), %xmm2 # 0x73ae0
vpand %xmm2, %xmm0, %xmm0
vmovd %xmm1, %edx
movl $0x1, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpl $0x0, %edx
cmovll %eax, %ecx
vmovss 0x39384(%rip), %xmm1 # 0x73adc
xorl %eax, %eax
vucomiss %xmm1, %xmm0
setnp %sil
sete %dl
testb %sil, %dl
cmovnel %ecx, %eax
cmpl $0x0, %eax
jne 0x3a772
jmp 0x3a791
leaq 0x3a50f(%rip), %rdi # 0x74c88
leaq 0x393e2(%rip), %rsi # 0x73b62
movl $0x19d7, %edx # imm = 0x19D7
leaq 0x3b812(%rip), %rcx # 0x75f9e
callq 0xd690
jmp 0x3a793
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x3a6c0
jmp 0x3a7a3
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x3a66f
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| ggml_compute_forward_silu_f32:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov rax, [rax+98h]
mov [rbp+var_18], rax
mov rdi, [rbp+var_18]
call _ggml_is_contiguous_1
test al, 1
jnz short loc_3A57E
jmp short loc_3A580
loc_3A57E:
jmp short loc_3A59F
loc_3A580:
lea rdi, aGgmlIsContiguo_3; "ggml_is_contiguous_1(src0)"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov edx, 19BCh
lea rcx, aVoidGgmlComput_36; "void ggml_compute_forward_silu_f32(cons"...
call ___assert_fail
loc_3A59F:
mov rdi, [rbp+var_10]
call _ggml_is_contiguous_1
test al, 1
jnz short loc_3A5AE
jmp short loc_3A5B0
loc_3A5AE:
jmp short loc_3A5CF
loc_3A5B0:
lea rdi, aGgmlIsContiguo_4; "ggml_is_contiguous_1(dst)"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov edx, 19BDh
lea rcx, aVoidGgmlComput_36; "void ggml_compute_forward_silu_f32(cons"...
call ___assert_fail
loc_3A5CF:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_10]
call _ggml_are_same_shape
test al, 1
jnz short loc_3A5E2
jmp short loc_3A5E4
loc_3A5E2:
jmp short loc_3A603
loc_3A5E4:
lea rdi, aGgmlCanRepeatS+1Fh; "ggml_are_same_shape(src0, dst)"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov edx, 19BEh
lea rcx, aVoidGgmlComput_36; "void ggml_compute_forward_silu_f32(cons"...
call ___assert_fail
loc_3A603:
mov rax, [rbp+var_8]
mov eax, [rax]
mov [rbp+var_1C], eax
mov rax, [rbp+var_8]
mov eax, [rax+4]
mov [rbp+var_20], eax
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov [rbp+var_24], eax
mov rdi, [rbp+var_18]
call _ggml_nrows
mov [rbp+var_28], eax
mov eax, [rbp+var_28]
add eax, [rbp+var_20]
sub eax, 1
cdq
idiv [rbp+var_20]
mov [rbp+var_2C], eax
mov eax, [rbp+var_2C]
imul eax, [rbp+var_1C]
mov [rbp+var_30], eax
mov eax, [rbp+var_30]
add eax, [rbp+var_2C]
cmp eax, [rbp+var_28]
jge short loc_3A65D
mov eax, [rbp+var_30]
add eax, [rbp+var_2C]
mov [rbp+var_44], eax
jmp short loc_3A663
loc_3A65D:
mov eax, [rbp+var_28]
mov [rbp+var_44], eax
loc_3A663:
mov eax, [rbp+var_44]
mov [rbp+var_34], eax
mov eax, [rbp+var_30]
mov [rbp+var_38], eax
loc_3A66F:
mov eax, [rbp+var_38]
cmp eax, [rbp+var_34]
jge loc_3A7B1
mov edi, [rbp+var_24]
mov rax, [rbp+var_10]
mov rsi, [rax+0F8h]
movsxd rax, [rbp+var_38]
mov rcx, [rbp+var_10]
imul rax, [rcx+38h]
add rsi, rax
mov rax, [rbp+var_18]
mov rdx, [rax+0F8h]
movsxd rax, [rbp+var_38]
mov rcx, [rbp+var_18]
imul rax, [rcx+38h]
add rdx, rax
call ggml_vec_silu_f32
mov [rbp+var_3C], 0
loc_3A6C0:
mov eax, [rbp+var_3C]
cmp eax, [rbp+var_24]
jge loc_3A7A1
mov rax, [rbp+var_10]
mov rax, [rax+0F8h]
movsxd rcx, [rbp+var_38]
mov rdx, [rbp+var_10]
imul rcx, [rdx+38h]
add rax, rcx
movsxd rcx, [rbp+var_3C]
vmovss xmm0, dword ptr [rax+rcx*4]
vmovss [rbp+var_40], xmm0
vmovss xmm0, [rbp+var_40]
vucomiss xmm0, xmm0
setp al
test al, 1
jnz short loc_3A707
jmp short loc_3A726
loc_3A707:
lea rdi, aIsnanX; "!isnan(x)"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov edx, 19D6h
lea rcx, aVoidGgmlComput_36; "void ggml_compute_forward_silu_f32(cons"...
call ___assert_fail
loc_3A726:
vmovss xmm1, [rbp+var_40]
vmovaps xmm0, xmm1
vpbroadcastd xmm2, cs:dword_73AE0
vpand xmm0, xmm0, xmm2
vmovd edx, xmm1
mov ecx, 1
mov eax, 0FFFFFFFFh
cmp edx, 0
cmovl ecx, eax
vmovss xmm1, cs:dword_73ADC
xor eax, eax
vucomiss xmm0, xmm1
setnp sil
setz dl
test dl, sil
cmovnz eax, ecx
cmp eax, 0
jnz short loc_3A772
jmp short loc_3A791
loc_3A772:
lea rdi, aIsinfX; "!isinf(x)"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov edx, 19D7h
lea rcx, aVoidGgmlComput_36; "void ggml_compute_forward_silu_f32(cons"...
call ___assert_fail
loc_3A791:
jmp short $+2
loc_3A793:
mov eax, [rbp+var_3C]
add eax, 1
mov [rbp+var_3C], eax
jmp loc_3A6C0
loc_3A7A1:
jmp short $+2
loc_3A7A3:
mov eax, [rbp+var_38]
add eax, 1
mov [rbp+var_38], eax
jmp loc_3A66F
loc_3A7B1:
add rsp, 50h
pop rbp
retn
| long long ggml_compute_forward_silu_f32(int *a1, _QWORD *a2)
{
char is_contiguous_1; // al
char v3; // al
int v4; // eax
long long result; // rax
long long v6; // rax
long long v7; // rcx
bool v8; // pf
int v18; // ecx
int v20; // eax
int v21; // [rsp+Ch] [rbp-44h]
int j; // [rsp+14h] [rbp-3Ch]
int i; // [rsp+18h] [rbp-38h]
int v25; // [rsp+24h] [rbp-2Ch]
unsigned int v26; // [rsp+2Ch] [rbp-24h]
int v27; // [rsp+30h] [rbp-20h]
int v28; // [rsp+34h] [rbp-1Ch]
_QWORD *v29; // [rsp+38h] [rbp-18h]
v29 = (_QWORD *)a2[19];
if ( (ggml_is_contiguous_1(v29) & 1) == 0 )
__assert_fail(
"ggml_is_contiguous_1(src0)",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
6588LL,
"void ggml_compute_forward_silu_f32(const struct ggml_compute_params *, struct ggml_tensor *)");
is_contiguous_1 = ggml_is_contiguous_1(a2);
if ( (is_contiguous_1 & 1) == 0 )
__assert_fail(
"ggml_is_contiguous_1(dst)",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
6589LL,
"void ggml_compute_forward_silu_f32(const struct ggml_compute_params *, struct ggml_tensor *)");
v3 = ggml_are_same_shape(v29, a2);
if ( (v3 & 1) == 0 )
__assert_fail(
"ggml_are_same_shape(src0, dst)",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
6590LL,
"void ggml_compute_forward_silu_f32(const struct ggml_compute_params *, struct ggml_tensor *)");
v28 = *a1;
v27 = a1[1];
v26 = v29[2];
v4 = ggml_nrows(v29);
v25 = (v27 + v4 - 1) / v27;
if ( v25 + v28 * v25 >= v4 )
v21 = v4;
else
v21 = v25 + v28 * v25;
for ( i = v28 * v25; ; ++i )
{
result = (unsigned int)i;
if ( i >= v21 )
break;
ggml_vec_silu_f32(v26, a2[7] * i + a2[31], v29[7] * i + v29[31]);
for ( j = 0; j < (int)v26; ++j )
{
v6 = a2[31];
v7 = a2[7] * i;
v8 = __SETP__(v7 + v6, 0LL);
_RAX = v7 + v6;
_RCX = j;
__asm
{
vmovss xmm0, dword ptr [rax+rcx*4]
vmovss [rbp+var_40], xmm0
vmovss xmm0, [rbp+var_40]
vucomiss xmm0, xmm0
}
if ( v8 )
__assert_fail(
"!isnan(x)",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
6614LL,
"void ggml_compute_forward_silu_f32(const struct ggml_compute_params *, struct ggml_tensor *)");
__asm
{
vmovss xmm1, [rbp+var_40]
vmovaps xmm0, xmm1
vpbroadcastd xmm2, cs:dword_73AE0
vpand xmm0, xmm0, xmm2
vmovd edx, xmm1
}
v18 = 1;
if ( _EDX < 0 )
v18 = -1;
__asm { vmovss xmm1, cs:dword_73ADC }
v20 = 0;
__asm { vucomiss xmm0, xmm1 }
if ( !__SETP__(0, 0) )
v20 = v18;
if ( v20 )
__assert_fail(
"!isinf(x)",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
6615LL,
"void ggml_compute_forward_silu_f32(const struct ggml_compute_params *, struct ggml_tensor *)");
}
}
return result;
}
| ggml_compute_forward_silu_f32:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0010d030
TEST AL,0x1
JNZ 0x0013a57e
JMP 0x0013a580
LAB_0013a57e:
JMP 0x0013a59f
LAB_0013a580:
LEA RDI,[0x174c29]
LEA RSI,[0x173b62]
MOV EDX,0x19bc
LEA RCX,[0x175f9e]
CALL 0x0010d690
LAB_0013a59f:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0010d030
TEST AL,0x1
JNZ 0x0013a5ae
JMP 0x0013a5b0
LAB_0013a5ae:
JMP 0x0013a5cf
LAB_0013a5b0:
LEA RDI,[0x174c44]
LEA RSI,[0x173b62]
MOV EDX,0x19bd
LEA RCX,[0x175f9e]
CALL 0x0010d690
LAB_0013a5cf:
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x0010e260
TEST AL,0x1
JNZ 0x0013a5e2
JMP 0x0013a5e4
LAB_0013a5e2:
JMP 0x0013a603
LAB_0013a5e4:
LEA RDI,[0x1742ba]
LEA RSI,[0x173b62]
MOV EDX,0x19be
LEA RCX,[0x175f9e]
CALL 0x0010d690
LAB_0013a603:
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x1c],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RBP + -0x20],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV dword ptr [RBP + -0x24],EAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0010dc20
MOV dword ptr [RBP + -0x28],EAX
MOV EAX,dword ptr [RBP + -0x28]
ADD EAX,dword ptr [RBP + -0x20]
SUB EAX,0x1
CDQ
IDIV dword ptr [RBP + -0x20]
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x2c]
IMUL EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x30],EAX
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,dword ptr [RBP + -0x2c]
CMP EAX,dword ptr [RBP + -0x28]
JGE 0x0013a65d
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x44],EAX
JMP 0x0013a663
LAB_0013a65d:
MOV EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x44],EAX
LAB_0013a663:
MOV EAX,dword ptr [RBP + -0x44]
MOV dword ptr [RBP + -0x34],EAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x38],EAX
LAB_0013a66f:
MOV EAX,dword ptr [RBP + -0x38]
CMP EAX,dword ptr [RBP + -0x34]
JGE 0x0013a7b1
MOV EDI,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0xf8]
MOVSXD RAX,dword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
IMUL RAX,qword ptr [RCX + 0x38]
ADD RSI,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RAX + 0xf8]
MOVSXD RAX,dword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x18]
IMUL RAX,qword ptr [RCX + 0x38]
ADD RDX,RAX
CALL 0x0013a7c0
MOV dword ptr [RBP + -0x3c],0x0
LAB_0013a6c0:
MOV EAX,dword ptr [RBP + -0x3c]
CMP EAX,dword ptr [RBP + -0x24]
JGE 0x0013a7a1
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xf8]
MOVSXD RCX,dword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x10]
IMUL RCX,qword ptr [RDX + 0x38]
ADD RAX,RCX
MOVSXD RCX,dword ptr [RBP + -0x3c]
VMOVSS XMM0,dword ptr [RAX + RCX*0x4]
VMOVSS dword ptr [RBP + -0x40],XMM0
VMOVSS XMM0,dword ptr [RBP + -0x40]
VUCOMISS XMM0,XMM0
SETP AL
TEST AL,0x1
JNZ 0x0013a707
JMP 0x0013a726
LAB_0013a707:
LEA RDI,[0x174c7e]
LEA RSI,[0x173b62]
MOV EDX,0x19d6
LEA RCX,[0x175f9e]
CALL 0x0010d690
LAB_0013a726:
VMOVSS XMM1,dword ptr [RBP + -0x40]
VMOVAPS XMM0,XMM1
VPBROADCASTD XMM2,dword ptr [0x00173ae0]
VPAND XMM0,XMM0,XMM2
VMOVD EDX,XMM1
MOV ECX,0x1
MOV EAX,0xffffffff
CMP EDX,0x0
CMOVL ECX,EAX
VMOVSS XMM1,dword ptr [0x00173adc]
XOR EAX,EAX
VUCOMISS XMM0,XMM1
SETNP SIL
SETZ DL
TEST DL,SIL
CMOVNZ EAX,ECX
CMP EAX,0x0
JNZ 0x0013a772
JMP 0x0013a791
LAB_0013a772:
LEA RDI,[0x174c88]
LEA RSI,[0x173b62]
MOV EDX,0x19d7
LEA RCX,[0x175f9e]
CALL 0x0010d690
LAB_0013a791:
JMP 0x0013a793
LAB_0013a793:
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x0013a6c0
LAB_0013a7a1:
JMP 0x0013a7a3
LAB_0013a7a3:
MOV EAX,dword ptr [RBP + -0x38]
ADD EAX,0x1
MOV dword ptr [RBP + -0x38],EAX
JMP 0x0013a66f
LAB_0013a7b1:
ADD RSP,0x50
POP RBP
RET
|
void ggml_compute_forward_silu_f32(int *param_1,long param_2)
{
float fVar1;
long lVar2;
int iVar3;
int iVar4;
int iVar5;
ulong uVar6;
int1 auVar7 [16];
int local_4c;
int local_44;
int local_40;
lVar2 = *(long *)(param_2 + 0x98);
uVar6 = ggml_is_contiguous_1(lVar2);
if ((uVar6 & 1) == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("ggml_is_contiguous_1(src0)",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x19bc,
"void ggml_compute_forward_silu_f32(const struct ggml_compute_params *, struct ggml_tensor *)"
);
}
uVar6 = ggml_is_contiguous_1(param_2);
if ((uVar6 & 1) == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("ggml_is_contiguous_1(dst)",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x19bd,
"void ggml_compute_forward_silu_f32(const struct ggml_compute_params *, struct ggml_tensor *)"
);
}
uVar6 = ggml_are_same_shape(lVar2,param_2);
if ((uVar6 & 1) == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("ggml_are_same_shape(src0, dst)",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x19be,
"void ggml_compute_forward_silu_f32(const struct ggml_compute_params *, struct ggml_tensor *)"
);
}
local_40 = *param_1;
iVar4 = param_1[1];
iVar3 = (int)*(int8 *)(lVar2 + 0x10);
local_4c = ggml_nrows(lVar2);
iVar4 = (local_4c + iVar4 + -1) / iVar4;
local_40 = iVar4 * local_40;
if (local_40 + iVar4 < local_4c) {
local_4c = local_40 + iVar4;
}
do {
if (local_4c <= local_40) {
return;
}
ggml_vec_silu_f32(iVar3,*(long *)(param_2 + 0xf8) + (long)local_40 * *(long *)(param_2 + 0x38),
*(long *)(lVar2 + 0xf8) + (long)local_40 * *(long *)(lVar2 + 0x38));
for (local_44 = 0; local_44 < iVar3; local_44 = local_44 + 1) {
fVar1 = *(float *)(*(long *)(param_2 + 0xf8) + (long)local_40 * *(long *)(param_2 + 0x38) +
(long)local_44 * 4);
if (NAN(fVar1)) {
/* WARNING: Subroutine does not return */
__assert_fail("!isnan(x)",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x19d6,
"void ggml_compute_forward_silu_f32(const struct ggml_compute_params *, struct ggml_tensor *)"
);
}
auVar7._4_4_ = DAT_00173ae0;
auVar7._0_4_ = DAT_00173ae0;
auVar7._8_4_ = DAT_00173ae0;
auVar7._12_4_ = DAT_00173ae0;
auVar7 = vpand_avx(ZEXT416((uint)fVar1),auVar7);
iVar4 = 1;
if ((int)fVar1 < 0) {
iVar4 = -1;
}
iVar5 = 0;
if (auVar7._0_4_ == DAT_00173adc) {
iVar5 = iVar4;
}
if (iVar5 != 0) {
/* WARNING: Subroutine does not return */
__assert_fail("!isinf(x)",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x19d7,
"void ggml_compute_forward_silu_f32(const struct ggml_compute_params *, struct ggml_tensor *)"
);
}
}
local_40 = local_40 + 1;
} while( true );
}
| |
24,222 | OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTableFactory.cpp | void
PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(
int vMask) {
// This is only intended to support the case of a single boundary vertex
// with no boundary edges, which can only occur with an irregular vertex
static int const singleBitVertexMaskToCount[16] =
{ 0, 1, 1, -1, 1, -1 , -1, -1, 1, -1 , -1, -1, -1, -1 , -1, -1 };
static int const singleBitVertexMaskToIndex[16] =
{ 0, 0, 1, -1, 2, -1 , -1, -1, 3, -1 , -1, -1, -1, -1 , -1, -1 };
assert(_hasBoundaryEdge == false);
assert(singleBitVertexMaskToCount[vMask] != -1);
assert(singleBitVertexMaskToIndex[vMask] != -1);
_boundaryMask = vMask;
_boundaryCount = singleBitVertexMaskToCount[vMask];
_boundaryIndex = singleBitVertexMaskToIndex[vMask];
} | O1 | cpp | OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int):
pushq %rax
movl (%rdi), %eax
testl $0x38000, %eax # imm = 0x38000
jne 0x6e41b
movl $0xfee8, %ecx # imm = 0xFEE8
btq %rsi, %rcx
jb 0x6e43a
movslq %esi, %rcx
leaq 0x4abc9(%rip), %rdx # 0xb8fb0
leaq 0x4ab82(%rip), %r8 # 0xb8f70
shll $0x6, %esi
movzwl %si, %esi
andl $0xfffc003f, %eax # imm = 0xFFFC003F
orl %esi, %eax
movl (%r8,%rcx,4), %esi
andl $0x7, %esi
shll $0xc, %esi
andl $0xfffc03ff, %eax # imm = 0xFFFC03FF
orl %esi, %eax
movl (%rdx,%rcx,4), %ecx
andl $0x3, %ecx
shll $0xa, %ecx
orl %eax, %ecx
movl %ecx, (%rdi)
popq %rax
retq
leaq 0x4af85(%rip), %rdi # 0xb93a7
leaq 0x4ad5f(%rip), %rsi # 0xb9188
leaq 0x4af91(%rip), %rcx # 0xb93c1
movl $0x7f5, %edx # imm = 0x7F5
callq 0x39560
leaq 0x4afeb(%rip), %rdi # 0xb942c
leaq 0x4ad40(%rip), %rsi # 0xb9188
leaq 0x4af72(%rip), %rcx # 0xb93c1
movl $0x7f6, %edx # imm = 0x7F6
callq 0x39560
nop
| _ZN10OpenSubdiv6v3_6_03Far17PatchTableFactory12PatchFaceTag38assignBoundaryPropertiesFromVertexMaskEi:
push rax
mov eax, [rdi]
test eax, 38000h
jnz short loc_6E41B
mov ecx, 0FEE8h
bt rcx, rsi
jb short loc_6E43A
movsxd rcx, esi
lea rdx, _ZZN10OpenSubdiv6v3_6_03Far17PatchTableFactory12PatchFaceTag38assignBoundaryPropertiesFromVertexMaskEiE26singleBitVertexMaskToIndex; OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int)::singleBitVertexMaskToIndex
lea r8, _ZZN10OpenSubdiv6v3_6_03Far17PatchTableFactory12PatchFaceTag38assignBoundaryPropertiesFromVertexMaskEiE26singleBitVertexMaskToCount; OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int)::singleBitVertexMaskToCount
shl esi, 6
movzx esi, si
and eax, 0FFFC003Fh
or eax, esi
mov esi, [r8+rcx*4]
and esi, 7
shl esi, 0Ch
and eax, 0FFFC03FFh
or eax, esi
mov ecx, [rdx+rcx*4]
and ecx, 3
shl ecx, 0Ah
or ecx, eax
mov [rdi], ecx
pop rax
retn
loc_6E41B:
lea rdi, aHasboundaryedg; "_hasBoundaryEdge == false"
lea rsi, aWorkspaceLlm4b_17; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidOpensubdiv_67; "void OpenSubdiv::v3_6_0::Far::PatchTabl"...
mov edx, 7F5h
call ___assert_fail
loc_6E43A:
lea rdi, aSinglebitverte; "singleBitVertexMaskToCount[vMask] != -1"
lea rsi, aWorkspaceLlm4b_17; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidOpensubdiv_67; "void OpenSubdiv::v3_6_0::Far::PatchTabl"...
mov edx, 7F6h
call ___assert_fail
| void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(
OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag *this,
unsigned long long a2)
{
long long v2; // rcx
if ( (*(_DWORD *)this & 0x38000) != 0 )
__assert_fail(
"_hasBoundaryEdge == false",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTableFactory.cpp",
2037LL,
"void OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int)");
v2 = 65256LL;
if ( _bittest64(&v2, a2) )
__assert_fail(
"singleBitVertexMaskToCount[vMask] != -1",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTableFactory.cpp",
2038LL,
"void OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int)");
*(_DWORD *)this = ((OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int)::singleBitVertexMaskToCount[(int)a2] & 7) << 12) | ((_WORD)a2 << 6) & 0x3FF | *(_DWORD *)this & 0xFFFC003F | ((OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int)::singleBitVertexMaskToIndex[(int)a2] & 3) << 10);
}
| assignBoundaryPropertiesFromVertexMask:
PUSH RAX
MOV EAX,dword ptr [RDI]
TEST EAX,0x38000
JNZ 0x0016e41b
MOV ECX,0xfee8
BT RCX,RSI
JC 0x0016e43a
MOVSXD RCX,ESI
LEA RDX,[0x1b8fb0]
LEA R8,[0x1b8f70]
SHL ESI,0x6
MOVZX ESI,SI
AND EAX,0xfffc003f
OR EAX,ESI
MOV ESI,dword ptr [R8 + RCX*0x4]
AND ESI,0x7
SHL ESI,0xc
AND EAX,0xfffc03ff
OR EAX,ESI
MOV ECX,dword ptr [RDX + RCX*0x4]
AND ECX,0x3
SHL ECX,0xa
OR ECX,EAX
MOV dword ptr [RDI],ECX
POP RAX
RET
LAB_0016e41b:
LEA RDI,[0x1b93a7]
LEA RSI,[0x1b9188]
LEA RCX,[0x1b93c1]
MOV EDX,0x7f5
CALL 0x00139560
LAB_0016e43a:
LEA RDI,[0x1b942c]
LEA RSI,[0x1b9188]
LEA RCX,[0x1b93c1]
MOV EDX,0x7f6
CALL 0x00139560
|
/* OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int)
*/
int8 __thiscall
OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask
(PatchFaceTag *this,int param_1)
{
int8 in_RAX;
if ((*(uint *)this & 0x38000) != 0) {
/* WARNING: Subroutine does not return */
__assert_fail("_hasBoundaryEdge == false",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTableFactory.cpp"
,0x7f5,
"void OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int)"
);
}
if ((0xfee8UL >> ((ulong)(uint)param_1 & 0x3f) & 1) == 0) {
*(uint *)this =
(*(uint *)(assignBoundaryPropertiesFromVertexMask(int)::singleBitVertexMaskToIndex +
(long)param_1 * 4) & 3) << 10 |
*(uint *)this & 0xfffc003f | (param_1 & 0xfU) << 6 |
(*(uint *)(assignBoundaryPropertiesFromVertexMask(int)::singleBitVertexMaskToCount +
(long)param_1 * 4) & 7) << 0xc;
return in_RAX;
}
/* WARNING: Subroutine does not return */
__assert_fail("singleBitVertexMaskToCount[vMask] != -1",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTableFactory.cpp"
,0x7f6,
"void OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int)"
);
}
| |
24,223 | OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTableFactory.cpp | void
PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(
int vMask) {
// This is only intended to support the case of a single boundary vertex
// with no boundary edges, which can only occur with an irregular vertex
static int const singleBitVertexMaskToCount[16] =
{ 0, 1, 1, -1, 1, -1 , -1, -1, 1, -1 , -1, -1, -1, -1 , -1, -1 };
static int const singleBitVertexMaskToIndex[16] =
{ 0, 0, 1, -1, 2, -1 , -1, -1, 3, -1 , -1, -1, -1, -1 , -1, -1 };
assert(_hasBoundaryEdge == false);
assert(singleBitVertexMaskToCount[vMask] != -1);
assert(singleBitVertexMaskToIndex[vMask] != -1);
_boundaryMask = vMask;
_boundaryCount = singleBitVertexMaskToCount[vMask];
_boundaryIndex = singleBitVertexMaskToIndex[vMask];
} | O2 | cpp | OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int):
pushq %rax
movl (%rdi), %eax
testl $0x38000, %eax # imm = 0x38000
jne 0x7ffb6
movl $0xfee8, %ecx # imm = 0xFEE8
btq %rsi, %rcx
jb 0x7ffd5
movslq %esi, %rcx
leaq 0x435d9(%rip), %rdx # 0xc3560
leaq 0x43592(%rip), %r8 # 0xc3520
andl $0xf, %esi
shll $0x6, %esi
andl $0xfffc003f, %eax # imm = 0xFFFC003F
orl %esi, %eax
movl (%r8,%rcx,4), %esi
andl $0x7, %esi
shll $0xc, %esi
orl %eax, %esi
movl (%rdx,%rcx,4), %eax
andl $0x3, %eax
shll $0xa, %eax
orl %esi, %eax
movl %eax, (%rdi)
popq %rax
retq
leaq 0x43986(%rip), %rdi # 0xc3943
leaq 0x43760(%rip), %rsi # 0xc3724
leaq 0x43992(%rip), %rcx # 0xc395d
movl $0x7f5, %edx # imm = 0x7F5
callq 0x512a0
leaq 0x439ec(%rip), %rdi # 0xc39c8
leaq 0x43741(%rip), %rsi # 0xc3724
leaq 0x43973(%rip), %rcx # 0xc395d
movl $0x7f6, %edx # imm = 0x7F6
callq 0x512a0
| _ZN10OpenSubdiv6v3_6_03Far17PatchTableFactory12PatchFaceTag38assignBoundaryPropertiesFromVertexMaskEi:
push rax
mov eax, [rdi]
test eax, 38000h
jnz short loc_7FFB6
mov ecx, 0FEE8h
bt rcx, rsi
jb short loc_7FFD5
movsxd rcx, esi
lea rdx, _ZZN10OpenSubdiv6v3_6_03Far17PatchTableFactory12PatchFaceTag38assignBoundaryPropertiesFromVertexMaskEiE26singleBitVertexMaskToIndex; OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int)::singleBitVertexMaskToIndex
lea r8, _ZZN10OpenSubdiv6v3_6_03Far17PatchTableFactory12PatchFaceTag38assignBoundaryPropertiesFromVertexMaskEiE26singleBitVertexMaskToCount; OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int)::singleBitVertexMaskToCount
and esi, 0Fh
shl esi, 6
and eax, 0FFFC003Fh
or eax, esi
mov esi, [r8+rcx*4]
and esi, 7
shl esi, 0Ch
or esi, eax
mov eax, [rdx+rcx*4]
and eax, 3
shl eax, 0Ah
or eax, esi
mov [rdi], eax
pop rax
retn
loc_7FFB6:
lea rdi, aHasboundaryedg; "_hasBoundaryEdge == false"
lea rsi, aWorkspaceLlm4b_17; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidOpensubdiv_67; "void OpenSubdiv::v3_6_0::Far::PatchTabl"...
mov edx, 7F5h
call ___assert_fail
loc_7FFD5:
lea rdi, aSinglebitverte; "singleBitVertexMaskToCount[vMask] != -1"
lea rsi, aWorkspaceLlm4b_17; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidOpensubdiv_67; "void OpenSubdiv::v3_6_0::Far::PatchTabl"...
mov edx, 7F6h
call ___assert_fail
| void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(
OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag *this,
unsigned long long a2)
{
long long v2; // rcx
if ( (*(_DWORD *)this & 0x38000) != 0 )
__assert_fail(
"_hasBoundaryEdge == false",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTableFactory.cpp",
2037LL,
"void OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int)");
v2 = 65256LL;
if ( _bittest64(&v2, a2) )
__assert_fail(
"singleBitVertexMaskToCount[vMask] != -1",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTableFactory.cpp",
2038LL,
"void OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int)");
*(_DWORD *)this = ((a2 & 0xF) << 6) | *(_DWORD *)this & 0xFFFC003F | ((OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int)::singleBitVertexMaskToCount[(int)a2] & 7) << 12) | ((OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int)::singleBitVertexMaskToIndex[(int)a2] & 3) << 10);
}
| assignBoundaryPropertiesFromVertexMask:
PUSH RAX
MOV EAX,dword ptr [RDI]
TEST EAX,0x38000
JNZ 0x0017ffb6
MOV ECX,0xfee8
BT RCX,RSI
JC 0x0017ffd5
MOVSXD RCX,ESI
LEA RDX,[0x1c3560]
LEA R8,[0x1c3520]
AND ESI,0xf
SHL ESI,0x6
AND EAX,0xfffc003f
OR EAX,ESI
MOV ESI,dword ptr [R8 + RCX*0x4]
AND ESI,0x7
SHL ESI,0xc
OR ESI,EAX
MOV EAX,dword ptr [RDX + RCX*0x4]
AND EAX,0x3
SHL EAX,0xa
OR EAX,ESI
MOV dword ptr [RDI],EAX
POP RAX
RET
LAB_0017ffb6:
LEA RDI,[0x1c3943]
LEA RSI,[0x1c3724]
LEA RCX,[0x1c395d]
MOV EDX,0x7f5
CALL 0x001512a0
LAB_0017ffd5:
LEA RDI,[0x1c39c8]
LEA RSI,[0x1c3724]
LEA RCX,[0x1c395d]
MOV EDX,0x7f6
CALL 0x001512a0
|
/* OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int)
*/
int8 __thiscall
OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask
(PatchFaceTag *this,int param_1)
{
int8 in_RAX;
if ((*(uint *)this & 0x38000) != 0) {
/* WARNING: Subroutine does not return */
__assert_fail("_hasBoundaryEdge == false",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTableFactory.cpp"
,0x7f5,
"void OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int)"
);
}
if ((0xfee8UL >> ((ulong)(uint)param_1 & 0x3f) & 1) == 0) {
*(uint *)this =
(*(uint *)(assignBoundaryPropertiesFromVertexMask(int)::singleBitVertexMaskToIndex +
(long)param_1 * 4) & 3) << 10 |
(*(uint *)(assignBoundaryPropertiesFromVertexMask(int)::singleBitVertexMaskToCount +
(long)param_1 * 4) & 7) << 0xc |
*(uint *)this & 0xfffc003f | (param_1 & 0xfU) << 6;
return in_RAX;
}
/* WARNING: Subroutine does not return */
__assert_fail("singleBitVertexMaskToCount[vMask] != -1",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTableFactory.cpp"
,0x7f6,
"void OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int)"
);
}
| |
24,224 | OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTableFactory.cpp | void
PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(
int vMask) {
// This is only intended to support the case of a single boundary vertex
// with no boundary edges, which can only occur with an irregular vertex
static int const singleBitVertexMaskToCount[16] =
{ 0, 1, 1, -1, 1, -1 , -1, -1, 1, -1 , -1, -1, -1, -1 , -1, -1 };
static int const singleBitVertexMaskToIndex[16] =
{ 0, 0, 1, -1, 2, -1 , -1, -1, 3, -1 , -1, -1, -1, -1 , -1, -1 };
assert(_hasBoundaryEdge == false);
assert(singleBitVertexMaskToCount[vMask] != -1);
assert(singleBitVertexMaskToIndex[vMask] != -1);
_boundaryMask = vMask;
_boundaryCount = singleBitVertexMaskToCount[vMask];
_boundaryIndex = singleBitVertexMaskToIndex[vMask];
} | O3 | cpp | OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int):
pushq %rax
movl (%rdi), %eax
testl $0x38000, %eax # imm = 0x38000
jne 0x6fa46
movl $0xfee8, %ecx # imm = 0xFEE8
btq %rsi, %rcx
jb 0x6fa65
movslq %esi, %rcx
leaq 0x4ccd9(%rip), %rdx # 0xbc6f0
leaq 0x4cc92(%rip), %r8 # 0xbc6b0
andl $0xf, %esi
shll $0x6, %esi
andl $0xfffc003f, %eax # imm = 0xFFFC003F
orl %esi, %eax
movl (%r8,%rcx,4), %esi
andl $0x7, %esi
shll $0xc, %esi
orl %eax, %esi
movl (%rdx,%rcx,4), %eax
andl $0x3, %eax
shll $0xa, %eax
orl %esi, %eax
movl %eax, (%rdi)
popq %rax
retq
leaq 0x4d09a(%rip), %rdi # 0xbcae7
leaq 0x4ce74(%rip), %rsi # 0xbc8c8
leaq 0x4d0a6(%rip), %rcx # 0xbcb01
movl $0x7f5, %edx # imm = 0x7F5
callq 0x39540
leaq 0x4d100(%rip), %rdi # 0xbcb6c
leaq 0x4ce55(%rip), %rsi # 0xbc8c8
leaq 0x4d087(%rip), %rcx # 0xbcb01
movl $0x7f6, %edx # imm = 0x7F6
callq 0x39540
| _ZN10OpenSubdiv6v3_6_03Far17PatchTableFactory12PatchFaceTag38assignBoundaryPropertiesFromVertexMaskEi:
push rax
mov eax, [rdi]
test eax, 38000h
jnz short loc_6FA46
mov ecx, 0FEE8h
bt rcx, rsi
jb short loc_6FA65
movsxd rcx, esi
lea rdx, _ZZN10OpenSubdiv6v3_6_03Far17PatchTableFactory12PatchFaceTag38assignBoundaryPropertiesFromVertexMaskEiE26singleBitVertexMaskToIndex; OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int)::singleBitVertexMaskToIndex
lea r8, _ZZN10OpenSubdiv6v3_6_03Far17PatchTableFactory12PatchFaceTag38assignBoundaryPropertiesFromVertexMaskEiE26singleBitVertexMaskToCount; OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int)::singleBitVertexMaskToCount
and esi, 0Fh
shl esi, 6
and eax, 0FFFC003Fh
or eax, esi
mov esi, [r8+rcx*4]
and esi, 7
shl esi, 0Ch
or esi, eax
mov eax, [rdx+rcx*4]
and eax, 3
shl eax, 0Ah
or eax, esi
mov [rdi], eax
pop rax
retn
loc_6FA46:
lea rdi, aHasboundaryedg; "_hasBoundaryEdge == false"
lea rsi, aWorkspaceLlm4b_17; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidOpensubdiv_67; "void OpenSubdiv::v3_6_0::Far::PatchTabl"...
mov edx, 7F5h
call ___assert_fail
loc_6FA65:
lea rdi, aSinglebitverte; "singleBitVertexMaskToCount[vMask] != -1"
lea rsi, aWorkspaceLlm4b_17; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidOpensubdiv_67; "void OpenSubdiv::v3_6_0::Far::PatchTabl"...
mov edx, 7F6h
call ___assert_fail
| void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(
OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag *this,
unsigned long long a2)
{
long long v2; // rcx
if ( (*(_DWORD *)this & 0x38000) != 0 )
__assert_fail(
"_hasBoundaryEdge == false",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTableFactory.cpp",
2037LL,
"void OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int)");
v2 = 65256LL;
if ( _bittest64(&v2, a2) )
__assert_fail(
"singleBitVertexMaskToCount[vMask] != -1",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTableFactory.cpp",
2038LL,
"void OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int)");
*(_DWORD *)this = ((a2 & 0xF) << 6) | *(_DWORD *)this & 0xFFFC003F | ((OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int)::singleBitVertexMaskToCount[(int)a2] & 7) << 12) | ((OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int)::singleBitVertexMaskToIndex[(int)a2] & 3) << 10);
}
| assignBoundaryPropertiesFromVertexMask:
PUSH RAX
MOV EAX,dword ptr [RDI]
TEST EAX,0x38000
JNZ 0x0016fa46
MOV ECX,0xfee8
BT RCX,RSI
JC 0x0016fa65
MOVSXD RCX,ESI
LEA RDX,[0x1bc6f0]
LEA R8,[0x1bc6b0]
AND ESI,0xf
SHL ESI,0x6
AND EAX,0xfffc003f
OR EAX,ESI
MOV ESI,dword ptr [R8 + RCX*0x4]
AND ESI,0x7
SHL ESI,0xc
OR ESI,EAX
MOV EAX,dword ptr [RDX + RCX*0x4]
AND EAX,0x3
SHL EAX,0xa
OR EAX,ESI
MOV dword ptr [RDI],EAX
POP RAX
RET
LAB_0016fa46:
LEA RDI,[0x1bcae7]
LEA RSI,[0x1bc8c8]
LEA RCX,[0x1bcb01]
MOV EDX,0x7f5
CALL 0x00139540
LAB_0016fa65:
LEA RDI,[0x1bcb6c]
LEA RSI,[0x1bc8c8]
LEA RCX,[0x1bcb01]
MOV EDX,0x7f6
CALL 0x00139540
|
/* OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int)
*/
int8 __thiscall
OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask
(PatchFaceTag *this,int param_1)
{
int8 in_RAX;
if ((*(uint *)this & 0x38000) != 0) {
/* WARNING: Subroutine does not return */
__assert_fail("_hasBoundaryEdge == false",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTableFactory.cpp"
,0x7f5,
"void OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int)"
);
}
if ((0xfee8UL >> ((ulong)(uint)param_1 & 0x3f) & 1) == 0) {
*(uint *)this =
(*(uint *)(assignBoundaryPropertiesFromVertexMask(int)::singleBitVertexMaskToIndex +
(long)param_1 * 4) & 3) << 10 |
(*(uint *)(assignBoundaryPropertiesFromVertexMask(int)::singleBitVertexMaskToCount +
(long)param_1 * 4) & 7) << 0xc |
*(uint *)this & 0xfffc003f | (param_1 & 0xfU) << 6;
return in_RAX;
}
/* WARNING: Subroutine does not return */
__assert_fail("singleBitVertexMaskToCount[vMask] != -1",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTableFactory.cpp"
,0x7f6,
"void OpenSubdiv::v3_6_0::Far::PatchTableFactory::PatchFaceTag::assignBoundaryPropertiesFromVertexMask(int)"
);
}
| |
24,225 | vsort_with_comparator | davidesantangelo[P]vsort/vsort.c | VSORT_API void vsort_with_comparator(void *arr, int n, size_t size, int (*compare)(const void *, const void *))
{
vsort_init();
if (!arr || n <= 1 || size == 0 || !compare)
return;
vsort_log_debug("Starting vsort (generic) for %d elements, size %zu (using qsort fallback).", n, size);
qsort(arr, n, size, compare);
vsort_log_debug("vsort (generic) completed for %d elements.", n);
} | O0 | c | vsort_with_comparator:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq %rdx, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
callq 0x1750
cmpq $0x0, 0x20(%rsp)
je 0x1d7b
cmpl $0x1, 0x1c(%rsp)
jle 0x1d7b
cmpq $0x0, 0x10(%rsp)
je 0x1d7b
cmpq $0x0, 0x8(%rsp)
jne 0x1d7d
jmp 0x1dbf
movl 0x1c(%rsp), %esi
movq 0x10(%rsp), %rdx
leaq 0x354b(%rip), %rdi # 0x52d8
movb $0x0, %al
callq 0x4440
movq 0x20(%rsp), %rdi
movslq 0x1c(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rcx
callq 0x1080
movl 0x1c(%rsp), %esi
leaq 0x356b(%rip), %rdi # 0x5323
movb $0x0, %al
callq 0x4440
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
| vsort_with_comparator:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_C], esi
mov [rsp+28h+var_18], rdx
mov [rsp+28h+var_20], rcx
call vsort_init
cmp [rsp+28h+var_8], 0
jz short loc_1D7B
cmp [rsp+28h+var_C], 1
jle short loc_1D7B
cmp [rsp+28h+var_18], 0
jz short loc_1D7B
cmp [rsp+28h+var_20], 0
jnz short loc_1D7D
loc_1D7B:
jmp short loc_1DBF
loc_1D7D:
mov esi, [rsp+28h+var_C]
mov rdx, [rsp+28h+var_18]
lea rdi, aStartingVsortG; "Starting vsort (generic) for %d element"...
mov al, 0
call vsort_log_debug
mov rdi, [rsp+28h+var_8]
movsxd rsi, [rsp+28h+var_C]
mov rdx, [rsp+28h+var_18]
mov rcx, [rsp+28h+var_20]
call _qsort
mov esi, [rsp+28h+var_C]
lea rdi, aVsortGenericCo; "vsort (generic) completed for %d elemen"...
mov al, 0
call vsort_log_debug
loc_1DBF:
add rsp, 28h
retn
| long long vsort_with_comparator(long long a1, int a2, long long a3, long long a4)
{
int v4; // ecx
int v5; // r8d
int v6; // r9d
int v7; // edx
int v8; // ecx
int v9; // r8d
int v10; // r9d
long long result; // rax
vsort_init();
if ( a1 && a2 > 1 && a3 )
{
if ( a4 )
{
vsort_log_debug(
(unsigned int)"Starting vsort (generic) for %d elements, size %zu (using qsort fallback).",
a2,
a3,
v4,
v5,
v6);
qsort(a1, a2, a3, a4);
return vsort_log_debug((unsigned int)"vsort (generic) completed for %d elements.", a2, v7, v8, v9, v10);
}
}
return result;
}
| vsort_with_comparator:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV dword ptr [RSP + 0x1c],ESI
MOV qword ptr [RSP + 0x10],RDX
MOV qword ptr [RSP + 0x8],RCX
CALL 0x00101750
CMP qword ptr [RSP + 0x20],0x0
JZ 0x00101d7b
CMP dword ptr [RSP + 0x1c],0x1
JLE 0x00101d7b
CMP qword ptr [RSP + 0x10],0x0
JZ 0x00101d7b
CMP qword ptr [RSP + 0x8],0x0
JNZ 0x00101d7d
LAB_00101d7b:
JMP 0x00101dbf
LAB_00101d7d:
MOV ESI,dword ptr [RSP + 0x1c]
MOV RDX,qword ptr [RSP + 0x10]
LEA RDI,[0x1052d8]
MOV AL,0x0
CALL 0x00104440
MOV RDI,qword ptr [RSP + 0x20]
MOVSXD RSI,dword ptr [RSP + 0x1c]
MOV RDX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x8]
CALL 0x00101080
MOV ESI,dword ptr [RSP + 0x1c]
LEA RDI,[0x105323]
MOV AL,0x0
CALL 0x00104440
LAB_00101dbf:
ADD RSP,0x28
RET
|
void vsort_with_comparator(void *param_1,int param_2,size_t param_3,__compar_fn_t param_4)
{
vsort_init();
if ((((param_1 != (void *)0x0) && (1 < param_2)) && (param_3 != 0)) &&
(param_4 != (__compar_fn_t)0x0)) {
vsort_log_debug("Starting vsort (generic) for %d elements, size %zu (using qsort fallback).",
param_2,param_3);
qsort(param_1,(long)param_2,param_3,param_4);
vsort_log_debug("vsort (generic) completed for %d elements.",param_2);
}
return;
}
| |
24,226 | my_getcputime | eloqsql/mysys/my_getsystime.c | ulonglong my_getcputime()
{
#ifdef CLOCK_THREAD_CPUTIME_ID
struct timespec tp;
if (clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp))
return 0;
return (ulonglong)tp.tv_sec*10000000+(ulonglong)tp.tv_nsec/100;
#elif defined(__NR_clock_gettime)
struct timespec tp;
if (syscall(__NR_clock_gettime, CLOCK_THREAD_CPUTIME_ID, &tp))
return 0;
return (ulonglong)tp.tv_sec*10000000+(ulonglong)tp.tv_nsec/100;
#endif /* CLOCK_THREAD_CPUTIME_ID */
return 0;
} | O0 | c | my_getcputime:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x3, %edi
leaq -0x18(%rbp), %rsi
callq 0x24270
cmpl $0x0, %eax
je 0x2e645
movq $0x0, -0x8(%rbp)
jmp 0x2e66d
imulq $0x989680, -0x18(%rbp), %rax # imm = 0x989680
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl $0x64, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq -0x20(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| my_getcputime:
push rbp
mov rbp, rsp
sub rsp, 20h
mov edi, 3
lea rsi, [rbp+var_18]
call _clock_gettime
cmp eax, 0
jz short loc_2E645
mov [rbp+var_8], 0
jmp short loc_2E66D
loc_2E645:
imul rax, [rbp+var_18], 989680h
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov ecx, 64h ; 'd'
xor edx, edx
div rcx
mov rcx, rax
mov rax, [rbp+var_20]
add rax, rcx
mov [rbp+var_8], rax
loc_2E66D:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| unsigned long long my_getcputime()
{
long long v1; // [rsp+8h] [rbp-18h] BYREF
unsigned long long v2; // [rsp+10h] [rbp-10h]
if ( (unsigned int)clock_gettime(3LL, &v1) )
return 0LL;
else
return v2 / 0x64 + 10000000 * v1;
}
| my_getcputime:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV EDI,0x3
LEA RSI,[RBP + -0x18]
CALL 0x00124270
CMP EAX,0x0
JZ 0x0012e645
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0012e66d
LAB_0012e645:
IMUL RAX,qword ptr [RBP + -0x18],0x989680
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,0x64
XOR EDX,EDX
DIV RCX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
LAB_0012e66d:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
long my_getcputime(void)
{
int iVar1;
timespec local_20;
long local_10;
iVar1 = clock_gettime(3,&local_20);
if (iVar1 == 0) {
local_10 = local_20.tv_sec * 10000000 + (ulong)local_20.tv_nsec / 100;
}
else {
local_10 = 0;
}
return local_10;
}
| |
24,227 | minja::Parser::parseMathPow() | monkey531[P]llama/common/minja.hpp | std::shared_ptr<Expression> parseMathPow() {
auto left = parseMathPlusMinus();
if (!left) throw std::runtime_error("Expected left side of 'math pow' expression");
while (!consumeToken("**").empty()) {
auto right = parseMathPlusMinus();
if (!right) throw std::runtime_error("Expected right side of 'math pow' expression");
left = std::make_shared<BinaryOpExpr>(get_location(), std::move(left), std::move(right), BinaryOpExpr::Op::MulMul);
}
return left;
} | O3 | cpp | minja::Parser::parseMathPow():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x883d2
cmpq $0x0, (%rbx)
je 0x88324
leaq 0x30(%rsp), %rbp
leaq 0x20(%rsp), %r13
leaq 0xa47cc(%rip), %rax # 0x12c968
addq $0x10, %rax
movq %rax, 0x40(%rsp)
movq %rbp, 0x20(%rsp)
movq %r13, %rdi
leaq 0x69b61(%rip), %rsi # 0xf1d15
leaq 0x69b5c(%rip), %rdx # 0xf1d17
callq 0x225b4
movq %rsp, %rdi
movq %r14, %rsi
movq %r13, %rdx
movl $0x1, %ecx
callq 0x84604
movq (%rsp), %rdi
movq 0x8(%rsp), %r15
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x881f3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b8c0
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x8820a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1b8c0
testq %r15, %r15
je 0x882de
movq %r13, %rdi
movq %r14, %rsi
callq 0x883d2
cmpq $0x0, 0x20(%rsp)
je 0x882f0
movq (%r14), %rax
movq %rax, (%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x88254
movq 0xa5d3a(%rip), %rcx # 0x12df80
cmpb $0x0, (%rcx)
je 0x88250
incl 0x8(%rax)
jmp 0x88254
lock
incl 0x8(%rax)
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
movq %rax, 0x10(%rsp)
movl $0x58, %edi
callq 0x1b8a0
movq %rax, %r15
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%r15)
movq 0x40(%rsp), %rax
movq %rax, (%r15)
movq %r15, %r12
addq $0x10, %r12
movq %r12, %rdi
movq %rsp, %rsi
movq %rbx, %rdx
movq %r13, %rcx
movl $0x4, %r8d
callq 0x96060
movq %r12, (%rbx)
movq 0x8(%rbx), %rdi
movq %r15, 0x8(%rbx)
testq %rdi, %rdi
je 0x882b7
callq 0x6dfc6
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x882c6
callq 0x6dfc6
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x881a5
callq 0x6dfc6
jmp 0x881a5
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x1b440
movq %rax, %r15
leaq 0x69a14(%rip), %rsi # 0xf1d18
movq %rax, %rdi
callq 0x1b320
movq 0xa5cd5(%rip), %rsi # 0x12dfe8
movq 0xa5c36(%rip), %rdx # 0x12df50
movq %r15, %rdi
callq 0x1bf00
jmp 0x88356
movl $0x10, %edi
callq 0x1b440
movq %rax, %r15
leaq 0x699b1(%rip), %rsi # 0xf1ce9
movq %rax, %rdi
callq 0x1b320
movq 0xa5ca1(%rip), %rsi # 0x12dfe8
movq 0xa5c02(%rip), %rdx # 0x12df50
movq %r15, %rdi
callq 0x1bf00
jmp 0x8839c
movq %rax, %r14
movq %r15, %rdi
callq 0x1b660
jmp 0x883bb
movq %rax, %r14
jmp 0x8838b
movq %rax, %r14
movq %r15, %rdi
callq 0x1b660
jmp 0x8838b
jmp 0x8839c
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x8838b
callq 0x6dfc6
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x883bb
callq 0x6dfc6
jmp 0x883bb
movq %rax, %r14
jmp 0x883bb
movq %rax, %r14
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x883bb
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1b8c0
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x883c9
callq 0x6dfc6
movq %r14, %rdi
callq 0x1bf90
nop
| _ZN5minja6Parser12parseMathPowEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
call _ZN5minja6Parser18parseMathPlusMinusEv; minja::Parser::parseMathPlusMinus(void)
cmp qword ptr [rbx], 0
jz loc_88324
lea rbp, [rsp+78h+var_48]
lea r13, [rsp+78h+var_58]
lea rax, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja12BinaryOpExprESaIS1_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<minja::BinaryOpExpr>,(__gnu_cxx::_Lock_policy)2>
add rax, 10h
mov [rsp+78h+var_38], rax
loc_881A5:
mov [rsp+78h+var_58], rbp
mov rdi, r13
lea rsi, asc_F1D15; "**"
lea rdx, asc_F1D15+2; ""
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 rdi, rsp
mov rsi, r14
mov rdx, r13
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling)
mov rdi, [rsp+78h+var_78]; void *
mov r15, [rsp+78h+var_70]
lea rax, [rsp+78h+var_68]
cmp rdi, rax
jz short loc_881F3
mov rsi, [rsp+78h+var_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_881F3:
mov rdi, [rsp+78h+var_58]; void *
cmp rdi, rbp
jz short loc_8820A
mov rsi, [rsp+78h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8820A:
test r15, r15
jz loc_882DE
mov rdi, r13; this
mov rsi, r14
call _ZN5minja6Parser18parseMathPlusMinusEv; minja::Parser::parseMathPlusMinus(void)
cmp [rsp+78h+var_58], 0
jz loc_882F0
mov rax, [r14]
mov [rsp+78h+var_78], rax
mov rax, [r14+8]
mov [rsp+78h+var_70], rax
test rax, rax
jz short loc_88254
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_88250
inc dword ptr [rax+8]
jmp short loc_88254
loc_88250:
lock inc dword ptr [rax+8]
loc_88254:
mov rax, [r14+20h]
sub rax, [r14+10h]
mov [rsp+78h+var_68], rax
mov edi, 58h ; 'X'; unsigned __int64
call __Znwm; operator new(ulong)
mov r15, rax
mov rax, 100000001h
mov [r15+8], rax
mov rax, [rsp+78h+var_38]
mov [r15], rax
mov r12, r15
add r12, 10h
mov rdi, r12
mov rsi, rsp
mov rdx, rbx
mov rcx, r13
mov r8d, 4
call _ZN5minja12BinaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_NS0_2OpE; minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&,std::shared_ptr<minja::Expression> &&,std::shared_ptr<minja::Expression> &,minja::BinaryOpExpr::Op)
mov [rbx], r12
mov rdi, [rbx+8]
mov [rbx+8], r15
test rdi, rdi
jz short loc_882B7
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_882B7:
mov rdi, [rsp+78h+var_70]
test rdi, rdi
jz short loc_882C6
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_882C6:
mov rdi, [rsp+78h+var_50]
test rdi, rdi
jz loc_881A5
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp loc_881A5
loc_882DE:
mov rax, rbx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_882F0:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedRightS_3; "Expected right side of 'math pow' expre"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
jmp short loc_88356
loc_88324:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedLeftSi_3; "Expected left side of 'math pow' expres"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
loc_88356:
jmp short loc_8839C
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_883BB
mov r14, rax
jmp short loc_8838B
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_8838B
jmp short loc_8839C
mov r14, rax
mov rdi, [rsp+78h+var_70]
test rdi, rdi
jz short loc_8838B
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8838B:
mov rdi, [rsp+78h+var_50]
test rdi, rdi
jz short loc_883BB
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_883BB
loc_8839C:
mov r14, rax
jmp short loc_883BB
mov r14, rax
mov rdi, [rsp+78h+var_58]; void *
cmp rdi, rbp
jz short loc_883BB
mov rsi, [rsp+78h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_883BB:
mov rdi, [rbx+8]
test rdi, rdi
jz short loc_883C9
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_883C9:
mov rdi, r14
call __Unwind_Resume
| minja::Parser * minja::Parser::parseMathPow(volatile signed __int32 **this, long long a2)
{
volatile signed __int32 *v3; // r15
volatile signed __int32 *v4; // rax
long long **v5; // r15
volatile signed __int32 *v6; // rdi
std::runtime_error *v8; // r15
std::runtime_error *exception; // r15
void *v10; // [rsp+0h] [rbp-78h] BYREF
volatile signed __int32 *v11; // [rsp+8h] [rbp-70h]
long long v12; // [rsp+10h] [rbp-68h] BYREF
void *v13; // [rsp+20h] [rbp-58h] BYREF
volatile signed __int32 *v14; // [rsp+28h] [rbp-50h]
_QWORD v15[2]; // [rsp+30h] [rbp-48h] BYREF
long long *v16; // [rsp+40h] [rbp-38h]
minja::Parser::parseMathPlusMinus((minja::Parser *)this);
if ( !*this )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected left side of 'math pow' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v16 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<minja::BinaryOpExpr>,(__gnu_cxx::_Lock_policy)2>
+ 2;
while ( 1 )
{
v13 = v15;
std::string::_M_construct<char const*>((long long)&v13, "**", (long long)"");
minja::Parser::consumeToken(&v10, a2, (_BYTE **)&v13, 1u);
v3 = v11;
if ( v10 != &v12 )
operator delete(v10, v12 + 1);
if ( v13 != v15 )
operator delete(v13, v15[0] + 1LL);
if ( !v3 )
break;
minja::Parser::parseMathPlusMinus((minja::Parser *)&v13);
if ( !v13 )
{
v8 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v8, "Expected right side of 'math pow' expression");
__cxa_throw(
v8,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v10 = *(void **)a2;
v4 = *(volatile signed __int32 **)(a2 + 8);
v11 = v4;
if ( v4 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v4 + 2);
else
_InterlockedIncrement(v4 + 2);
}
v12 = *(_QWORD *)(a2 + 32) - *(_QWORD *)(a2 + 16);
v5 = (long long **)operator new(0x58uLL);
v5[1] = (long long *)0x100000001LL;
*v5 = v16;
minja::BinaryOpExpr::BinaryOpExpr(v5 + 2, &v10, this, &v13, 4LL);
*this = (volatile signed __int32 *)(v5 + 2);
v6 = this[1];
this[1] = (volatile signed __int32 *)v5;
if ( v6 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6);
if ( v11 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11);
if ( v14 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14);
}
return (minja::Parser *)this;
}
| parseMathPow:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
CALL 0x001883d2
CMP qword ptr [RBX],0x0
JZ 0x00188324
LEA RBP,[RSP + 0x30]
LEA R13,[RSP + 0x20]
LEA RAX,[0x22c968]
ADD RAX,0x10
MOV qword ptr [RSP + 0x40],RAX
LAB_001881a5:
MOV qword ptr [RSP + 0x20],RBP
LAB_001881aa:
MOV RDI,R13
LEA RSI,[0x1f1d15]
LEA RDX,[0x1f1d17]
CALL 0x001225b4
LAB_001881c0:
MOV RDI,RSP
MOV RSI,R14
MOV RDX,R13
MOV ECX,0x1
CALL 0x00184604
MOV RDI,qword ptr [RSP]
MOV R15,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x001881f3
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0011b8c0
LAB_001881f3:
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,RBP
JZ 0x0018820a
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x0011b8c0
LAB_0018820a:
TEST R15,R15
JZ 0x001882de
LAB_00188213:
MOV RDI,R13
MOV RSI,R14
CALL 0x001883d2
CMP qword ptr [RSP + 0x20],0x0
JZ 0x001882f0
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x8],RAX
TEST RAX,RAX
JZ 0x00188254
MOV RCX,qword ptr [0x0022df80]
CMP byte ptr [RCX],0x0
JZ 0x00188250
INC dword ptr [RAX + 0x8]
JMP 0x00188254
LAB_00188250:
INC.LOCK dword ptr [RAX + 0x8]
LAB_00188254:
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RSP + 0x10],RAX
LAB_00188261:
MOV EDI,0x58
CALL 0x0011b8a0
LAB_0018826b:
MOV R15,RAX
MOV RAX,0x100000001
MOV qword ptr [R15 + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [R15],RAX
MOV R12,R15
ADD R12,0x10
MOV RDI,R12
MOV RSI,RSP
MOV RDX,RBX
MOV RCX,R13
MOV R8D,0x4
CALL 0x00196060
MOV qword ptr [RBX],R12
MOV RDI,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x8],R15
TEST RDI,RDI
JZ 0x001882b7
CALL 0x0016dfc6
LAB_001882b7:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x001882c6
CALL 0x0016dfc6
LAB_001882c6:
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x001881a5
CALL 0x0016dfc6
JMP 0x001881a5
LAB_001882de:
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001882f0:
MOV EDI,0x10
CALL 0x0011b440
MOV R15,RAX
LAB_001882fd:
LEA RSI,[0x1f1d18]
MOV RDI,RAX
CALL 0x0011b320
LAB_0018830c:
MOV RSI,qword ptr [0x0022dfe8]
MOV RDX,qword ptr [0x0022df50]
MOV RDI,R15
CALL 0x0011bf00
LAB_00188324:
MOV EDI,0x10
CALL 0x0011b440
MOV R15,RAX
LAB_00188331:
LEA RSI,[0x1f1ce9]
MOV RDI,RAX
CALL 0x0011b320
LAB_00188340:
MOV RSI,qword ptr [0x0022dfe8]
MOV RDX,qword ptr [0x0022df50]
MOV RDI,R15
CALL 0x0011bf00
|
/* minja::Parser::parseMathPow() */
void minja::Parser::parseMathPow(void)
{
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1;
int8 *puVar2;
runtime_error *prVar3;
int8 *in_RSI;
long *in_RDI;
long *local_78;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_70;
long local_68 [2];
long *local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50;
long local_48 [2];
int **local_38;
parseMathPlusMinus();
if (*in_RDI == 0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00188331 to 0018833f has its CatchHandler @ 00188358 */
std::runtime_error::runtime_error(prVar3,"Expected left side of \'math pow\' expression");
/* try { // try from 00188340 to 00188355 has its CatchHandler @ 00188356 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_0022dfe8,PTR__runtime_error_0022df50);
}
local_38 = &PTR___Sp_counted_ptr_inplace_0022c978;
while( true ) {
local_58 = local_48;
/* try { // try from 001881aa to 001881bf has its CatchHandler @ 0018839c */
std::__cxx11::string::_M_construct<char_const*>(&local_58,&DAT_001f1d15,&DAT_001f1d17);
/* try { // try from 001881c0 to 001881d2 has its CatchHandler @ 001883a1 */
consumeToken(&local_78);
p_Var1 = local_70;
if (local_78 != local_68) {
operator_delete(local_78,local_68[0] + 1);
}
if (local_58 != local_48) {
operator_delete(local_58,local_48[0] + 1);
}
if (p_Var1 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) break;
/* try { // try from 00188213 to 0018821d has its CatchHandler @ 00188377 */
parseMathPlusMinus();
if (local_58 == (long *)0x0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001882fd to 0018830b has its CatchHandler @ 0018836a */
std::runtime_error::runtime_error(prVar3,"Expected right side of \'math pow\' expression");
/* try { // try from 0018830c to 00188321 has its CatchHandler @ 00188365 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_0022dfe8,PTR__runtime_error_0022df50);
}
local_78 = (long *)*in_RSI;
local_70 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1];
if (local_70 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_0022df80 == '\0') {
LOCK();
*(int *)(local_70 + 8) = *(int *)(local_70 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_70 + 8) = *(int *)(local_70 + 8) + 1;
}
}
local_68[0] = in_RSI[4] - in_RSI[2];
/* try { // try from 00188261 to 0018826a has its CatchHandler @ 00188379 */
puVar2 = (int8 *)operator_new(0x58);
puVar2[1] = 0x100000001;
*puVar2 = local_38;
BinaryOpExpr::BinaryOpExpr((BinaryOpExpr *)(puVar2 + 2),&local_78);
*in_RDI = (long)(puVar2 + 2);
p_Var1 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RDI[1];
in_RDI[1] = (long)puVar2;
if (p_Var1 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Var1);
}
if (local_70 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_70);
}
if (local_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_50);
}
}
return;
}
| |
24,228 | translog_recover_page_up_to_sector | eloqsql/storage/maria/ma_loghandler.c | static my_bool translog_recover_page_up_to_sector(uchar *page, uint16 offset)
{
uint16 chunk_offset= translog_get_first_chunk_offset(page), valid_chunk_end;
DBUG_ENTER("translog_recover_page_up_to_sector");
DBUG_PRINT("enter", ("offset: %u first chunk: %u",
(uint) offset, (uint) chunk_offset));
while (chunk_offset < offset && page[chunk_offset] != TRANSLOG_FILLER)
{
uint16 chunk_length;
if ((chunk_length=
translog_get_total_chunk_length(page, chunk_offset)) == 0)
{
DBUG_PRINT("error", ("cant get chunk length (offset %u)",
(uint) chunk_offset));
DBUG_RETURN(1);
}
DBUG_PRINT("info", ("chunk: offset: %u length %u",
(uint) chunk_offset, (uint) chunk_length));
if (((ulong) chunk_offset) + ((ulong) chunk_length) > TRANSLOG_PAGE_SIZE)
{
DBUG_PRINT("error", ("damaged chunk (offset %u) in trusted area",
(uint) chunk_offset));
DBUG_RETURN(1);
}
chunk_offset+= chunk_length;
}
valid_chunk_end= chunk_offset;
/* end of trusted area - sector parsing */
while (page[chunk_offset] != TRANSLOG_FILLER)
{
uint16 chunk_length;
if ((chunk_length=
translog_get_total_chunk_length(page, chunk_offset)) == 0)
break;
DBUG_PRINT("info", ("chunk: offset: %u length %u",
(uint) chunk_offset, (uint) chunk_length));
if (((ulong) chunk_offset) + ((ulong) chunk_length) >
(uint) (offset + DISK_DRIVE_SECTOR_SIZE))
break;
chunk_offset+= chunk_length;
valid_chunk_end= chunk_offset;
}
DBUG_PRINT("info", ("valid chunk end offset: %u", (uint) valid_chunk_end));
memset(page + valid_chunk_end, TRANSLOG_FILLER,
TRANSLOG_PAGE_SIZE - valid_chunk_end);
DBUG_RETURN(0);
} | O0 | c | translog_recover_page_up_to_sector:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movq -0x10(%rbp), %rdi
callq 0x52720
movsbl %al, %eax
movw %ax, -0x14(%rbp)
jmp 0x58dc5
jmp 0x58dc7
movzwl -0x14(%rbp), %ecx
movzwl -0x12(%rbp), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x1b(%rbp)
jge 0x58def
movq -0x10(%rbp), %rax
movzwl -0x14(%rbp), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0xff, %eax
setne %al
movb %al, -0x1b(%rbp)
movb -0x1b(%rbp), %al
testb $0x1, %al
jne 0x58df8
jmp 0x58e59
movq -0x10(%rbp), %rdi
movzwl -0x14(%rbp), %esi
callq 0x52750
movw %ax, -0x18(%rbp)
movzwl %ax, %eax
cmpl $0x0, %eax
jne 0x58e20
jmp 0x58e13
jmp 0x58e15
jmp 0x58e17
movb $0x1, -0x1(%rbp)
jmp 0x58ef7
jmp 0x58e22
jmp 0x58e24
movzwl -0x14(%rbp), %eax
movzwl -0x18(%rbp), %ecx
addq %rcx, %rax
cmpq $0x2000, %rax # imm = 0x2000
jbe 0x58e46
jmp 0x58e39
jmp 0x58e3b
jmp 0x58e3d
movb $0x1, -0x1(%rbp)
jmp 0x58ef7
movzwl -0x18(%rbp), %ecx
movzwl -0x14(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x14(%rbp)
jmp 0x58dc7
movw -0x14(%rbp), %ax
movw %ax, -0x16(%rbp)
movq -0x10(%rbp), %rax
movzwl -0x14(%rbp), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0xff, %eax
je 0x58ec9
movq -0x10(%rbp), %rdi
movzwl -0x14(%rbp), %esi
callq 0x52750
movw %ax, -0x1a(%rbp)
movzwl %ax, %eax
cmpl $0x0, %eax
jne 0x58e8f
jmp 0x58ec9
jmp 0x58e91
jmp 0x58e93
movzwl -0x14(%rbp), %eax
movzwl -0x1a(%rbp), %ecx
addq %rcx, %rax
movzwl -0x12(%rbp), %ecx
addl $0x200, %ecx # imm = 0x200
movl %ecx, %ecx
cmpq %rcx, %rax
jbe 0x58eb1
jmp 0x58ec9
movzwl -0x1a(%rbp), %ecx
movzwl -0x14(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x14(%rbp)
movw -0x14(%rbp), %ax
movw %ax, -0x16(%rbp)
jmp 0x58e61
jmp 0x58ecb
jmp 0x58ecd
movq -0x10(%rbp), %rdi
movzwl -0x16(%rbp), %eax
cltq
addq %rax, %rdi
movzwl -0x16(%rbp), %ecx
movl $0x2000, %eax # imm = 0x2000
subl %ecx, %eax
movl %eax, %eax
movl %eax, %edx
movl $0xff, %esi
callq 0x2a2c0
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
| translog_recover_page_up_to_sector:
push rbp
mov rbp, rsp
sub rsp, 20h
mov ax, si
mov [rbp+var_10], rdi
mov [rbp+var_12], ax
mov rdi, [rbp+var_10]
call translog_get_first_chunk_offset
movsx eax, al
mov [rbp+var_14], ax
jmp short $+2
loc_58DC5:
jmp short $+2
loc_58DC7:
movzx ecx, [rbp+var_14]
movzx edx, [rbp+var_12]
xor eax, eax
cmp ecx, edx
mov [rbp+var_1B], al
jge short loc_58DEF
mov rax, [rbp+var_10]
movzx ecx, [rbp+var_14]
movzx eax, byte ptr [rax+rcx]
cmp eax, 0FFh
setnz al
mov [rbp+var_1B], al
loc_58DEF:
mov al, [rbp+var_1B]
test al, 1
jnz short loc_58DF8
jmp short loc_58E59
loc_58DF8:
mov rdi, [rbp+var_10]
movzx esi, [rbp+var_14]
call translog_get_total_chunk_length
mov [rbp+var_18], ax
movzx eax, ax
cmp eax, 0
jnz short loc_58E20
jmp short $+2
loc_58E13:
jmp short $+2
loc_58E15:
jmp short $+2
loc_58E17:
mov [rbp+var_1], 1
jmp loc_58EF7
loc_58E20:
jmp short $+2
loc_58E22:
jmp short $+2
loc_58E24:
movzx eax, [rbp+var_14]
movzx ecx, [rbp+var_18]
add rax, rcx
cmp rax, 2000h
jbe short loc_58E46
jmp short $+2
loc_58E39:
jmp short $+2
loc_58E3B:
jmp short $+2
loc_58E3D:
mov [rbp+var_1], 1
jmp loc_58EF7
loc_58E46:
movzx ecx, [rbp+var_18]
movzx eax, [rbp+var_14]
add eax, ecx
mov [rbp+var_14], ax
jmp loc_58DC7
loc_58E59:
mov ax, [rbp+var_14]
mov [rbp+var_16], ax
loc_58E61:
mov rax, [rbp+var_10]
movzx ecx, [rbp+var_14]
movzx eax, byte ptr [rax+rcx]
cmp eax, 0FFh
jz short loc_58EC9
mov rdi, [rbp+var_10]
movzx esi, [rbp+var_14]
call translog_get_total_chunk_length
mov [rbp+var_1A], ax
movzx eax, ax
cmp eax, 0
jnz short loc_58E8F
jmp short loc_58EC9
loc_58E8F:
jmp short $+2
loc_58E91:
jmp short $+2
loc_58E93:
movzx eax, [rbp+var_14]
movzx ecx, [rbp+var_1A]
add rax, rcx
movzx ecx, [rbp+var_12]
add ecx, 200h
mov ecx, ecx
cmp rax, rcx
jbe short loc_58EB1
jmp short loc_58EC9
loc_58EB1:
movzx ecx, [rbp+var_1A]
movzx eax, [rbp+var_14]
add eax, ecx
mov [rbp+var_14], ax
mov ax, [rbp+var_14]
mov [rbp+var_16], ax
jmp short loc_58E61
loc_58EC9:
jmp short $+2
loc_58ECB:
jmp short $+2
loc_58ECD:
mov rdi, [rbp+var_10]
movzx eax, [rbp+var_16]
cdqe
add rdi, rax
movzx ecx, [rbp+var_16]
mov eax, 2000h
sub eax, ecx
mov eax, eax
mov edx, eax
mov esi, 0FFh
call _memset
mov [rbp+var_1], 0
loc_58EF7:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
| char translog_recover_page_up_to_sector(long long a1, unsigned __int16 a2)
{
bool v3; // [rsp+5h] [rbp-1Bh]
unsigned __int16 v4; // [rsp+6h] [rbp-1Ah]
unsigned __int16 total_chunk_length; // [rsp+8h] [rbp-18h]
unsigned __int16 j; // [rsp+Ah] [rbp-16h]
unsigned __int16 i; // [rsp+Ch] [rbp-14h]
for ( i = translog_get_first_chunk_offset(a1); ; i += total_chunk_length )
{
v3 = 0;
if ( i < (int)a2 )
v3 = *(unsigned __int8 *)(a1 + i) != 255;
if ( !v3 )
break;
total_chunk_length = translog_get_total_chunk_length(a1, i);
if ( !total_chunk_length )
return 1;
if ( total_chunk_length + (unsigned long long)i > 0x2000 )
return 1;
}
for ( j = i; *(unsigned __int8 *)(a1 + i) != 255; j = i )
{
v4 = translog_get_total_chunk_length(a1, i);
if ( !v4 || v4 + (unsigned long long)i > (unsigned int)a2 + 512 )
break;
i += v4;
}
memset(j + a1, 255LL, 0x2000 - (unsigned int)j);
return 0;
}
| translog_recover_page_up_to_sector:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV AX,SI
MOV qword ptr [RBP + -0x10],RDI
MOV word ptr [RBP + -0x12],AX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00152720
MOVSX EAX,AL
MOV word ptr [RBP + -0x14],AX
JMP 0x00158dc5
LAB_00158dc5:
JMP 0x00158dc7
LAB_00158dc7:
MOVZX ECX,word ptr [RBP + -0x14]
MOVZX EDX,word ptr [RBP + -0x12]
XOR EAX,EAX
CMP ECX,EDX
MOV byte ptr [RBP + -0x1b],AL
JGE 0x00158def
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,word ptr [RBP + -0x14]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0xff
SETNZ AL
MOV byte ptr [RBP + -0x1b],AL
LAB_00158def:
MOV AL,byte ptr [RBP + -0x1b]
TEST AL,0x1
JNZ 0x00158df8
JMP 0x00158e59
LAB_00158df8:
MOV RDI,qword ptr [RBP + -0x10]
MOVZX ESI,word ptr [RBP + -0x14]
CALL 0x00152750
MOV word ptr [RBP + -0x18],AX
MOVZX EAX,AX
CMP EAX,0x0
JNZ 0x00158e20
JMP 0x00158e13
LAB_00158e13:
JMP 0x00158e15
LAB_00158e15:
JMP 0x00158e17
LAB_00158e17:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00158ef7
LAB_00158e20:
JMP 0x00158e22
LAB_00158e22:
JMP 0x00158e24
LAB_00158e24:
MOVZX EAX,word ptr [RBP + -0x14]
MOVZX ECX,word ptr [RBP + -0x18]
ADD RAX,RCX
CMP RAX,0x2000
JBE 0x00158e46
JMP 0x00158e39
LAB_00158e39:
JMP 0x00158e3b
LAB_00158e3b:
JMP 0x00158e3d
LAB_00158e3d:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00158ef7
LAB_00158e46:
MOVZX ECX,word ptr [RBP + -0x18]
MOVZX EAX,word ptr [RBP + -0x14]
ADD EAX,ECX
MOV word ptr [RBP + -0x14],AX
JMP 0x00158dc7
LAB_00158e59:
MOV AX,word ptr [RBP + -0x14]
MOV word ptr [RBP + -0x16],AX
LAB_00158e61:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,word ptr [RBP + -0x14]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0xff
JZ 0x00158ec9
MOV RDI,qword ptr [RBP + -0x10]
MOVZX ESI,word ptr [RBP + -0x14]
CALL 0x00152750
MOV word ptr [RBP + -0x1a],AX
MOVZX EAX,AX
CMP EAX,0x0
JNZ 0x00158e8f
JMP 0x00158ec9
LAB_00158e8f:
JMP 0x00158e91
LAB_00158e91:
JMP 0x00158e93
LAB_00158e93:
MOVZX EAX,word ptr [RBP + -0x14]
MOVZX ECX,word ptr [RBP + -0x1a]
ADD RAX,RCX
MOVZX ECX,word ptr [RBP + -0x12]
ADD ECX,0x200
MOV ECX,ECX
CMP RAX,RCX
JBE 0x00158eb1
JMP 0x00158ec9
LAB_00158eb1:
MOVZX ECX,word ptr [RBP + -0x1a]
MOVZX EAX,word ptr [RBP + -0x14]
ADD EAX,ECX
MOV word ptr [RBP + -0x14],AX
MOV AX,word ptr [RBP + -0x14]
MOV word ptr [RBP + -0x16],AX
JMP 0x00158e61
LAB_00158ec9:
JMP 0x00158ecb
LAB_00158ecb:
JMP 0x00158ecd
LAB_00158ecd:
MOV RDI,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RBP + -0x16]
CDQE
ADD RDI,RAX
MOVZX ECX,word ptr [RBP + -0x16]
MOV EAX,0x2000
SUB EAX,ECX
MOV EAX,EAX
MOV EDX,EAX
MOV ESI,0xff
CALL 0x0012a2c0
MOV byte ptr [RBP + -0x1],0x0
LAB_00158ef7:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 translog_recover_page_up_to_sector(long param_1,ushort param_2)
{
char cVar1;
ushort uVar2;
bool bVar3;
ushort local_1c;
cVar1 = translog_get_first_chunk_offset(param_1);
local_1c = (ushort)cVar1;
while( true ) {
bVar3 = false;
if (local_1c < param_2) {
bVar3 = *(char *)(param_1 + (ulong)local_1c) != -1;
}
if (!bVar3) {
for (; ((*(char *)(param_1 + (ulong)local_1c) != -1 &&
(uVar2 = translog_get_total_chunk_length(param_1,local_1c), uVar2 != 0)) &&
((uint)local_1c + (uint)uVar2 <= param_2 + 0x200)); local_1c = local_1c + uVar2) {
}
memset((void *)(param_1 + (int)(uint)local_1c),0xff,(ulong)(0x2000 - local_1c));
return 0;
}
uVar2 = translog_get_total_chunk_length(param_1,local_1c);
if (uVar2 == 0) {
return 1;
}
if (0x2000 < (ulong)local_1c + (ulong)uVar2) break;
local_1c = local_1c + uVar2;
}
return 1;
}
| |
24,229 | stop_logging | eloqsql/plugin/server_audit/server_audit.c | static int stop_logging()
{
last_error_buf[0]= 0;
if (output_type == OUTPUT_FILE && logfile)
{
logger_close(logfile);
logfile= NULL;
}
else if (output_type == OUTPUT_SYSLOG)
{
closelog();
}
error_header();
fprintf(stderr, "logging was stopped.\n");
is_active= 0;
return 0;
} | O3 | c | stop_logging:
pushq %rbp
movq %rsp, %rbp
movb $0x0, 0x7b3f(%rip) # 0xefa0
movq 0x78a0(%rip), %rax # 0xed08
cmpq $0x1, %rax
sete %cl
movq 0x789a(%rip), %rdi # 0xed10
testq %rdi, %rdi
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x7495
callq 0x3080
movq $0x0, 0x787d(%rip) # 0xed10
jmp 0x749f
testq %rax, %rax
jne 0x749f
callq 0x3040
callq 0x6aaf
movq 0x4b4d(%rip), %rax # 0xbff8
movq (%rax), %rdi
leaq 0x21f9(%rip), %rdx # 0x96ae
movl $0x1, %esi
xorl %eax, %eax
callq 0x3300
movl $0x0, 0x784d(%rip) # 0xed18
popq %rbp
retq
| stop_logging:
push rbp
mov rbp, rsp
mov cs:last_error_buf, 0
mov rax, cs:output_type
cmp rax, 1
setz cl
mov rdi, cs:logfile
test rdi, rdi
setnz dl
and dl, cl
cmp dl, 1
jnz short loc_7495
call __loc_logger_close
mov cs:logfile, 0
jmp short loc_749F
loc_7495:
test rax, rax
jnz short loc_749F
call _closelog
loc_749F:
call error_header
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rdx, aLoggingWasStop; "logging was stopped.\n"
mov esi, 1
xor eax, eax
call ___fprintf_chk
mov cs:is_active, 0
pop rbp
retn
| long long stop_logging()
{
long long result; // rax
last_error_buf = 0;
if ( output_type == 1 && logfile != 0 )
{
_loc_logger_close((unsigned int *)logfile);
logfile = 0LL;
}
else if ( !output_type )
{
closelog();
}
error_header();
result = __fprintf_chk(stderr, 1LL, "logging was stopped.\n");
is_active = 0;
return result;
}
| stop_logging:
PUSH RBP
MOV RBP,RSP
MOV byte ptr [0x0010efa0],0x0
MOV RAX,qword ptr [0x0010ed08]
CMP RAX,0x1
SETZ CL
MOV RDI,qword ptr [0x0010ed10]
TEST RDI,RDI
SETNZ DL
AND DL,CL
CMP DL,0x1
JNZ 0x00107495
CALL 0x00103080
MOV qword ptr [0x0010ed10],0x0
JMP 0x0010749f
LAB_00107495:
TEST RAX,RAX
JNZ 0x0010749f
CALL 0x00103040
LAB_0010749f:
CALL 0x00106aaf
MOV RAX,qword ptr [0x0010bff8]
MOV RDI,qword ptr [RAX]
LEA RDX,[0x1096ae]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x00103300
MOV dword ptr [0x0010ed18],0x0
POP RBP
RET
|
void stop_logging(void)
{
last_error_buf[0] = 0;
if (logfile == 0 || output_type != 1) {
if (output_type == 0) {
closelog();
}
}
else {
loc_logger_close();
logfile = 0;
}
error_header();
__fprintf_chk(*(int8 *)PTR_stderr_0010bff8,1,"logging was stopped.\n");
is_active = 0;
return;
}
| |
24,230 | MyCTX_nopad::finish(unsigned char*, unsigned int*) | eloqsql/mysys_ssl/my_crypt.cc | int finish(uchar *dst, uint *dlen)
{
if (source_tail_len)
{
/*
Not much we can do, block ciphers cannot encrypt data that aren't
a multiple of the block length. At least not without padding.
Let's do something CTR-like for the last partial block.
*/
uchar mask[MY_AES_BLOCK_SIZE];
uint mlen;
int rc= my_aes_crypt(MY_AES_ECB, ENCRYPTION_FLAG_ENCRYPT | ENCRYPTION_FLAG_NOPAD,
oiv, sizeof(mask), mask, &mlen, key, klen, 0, 0);
DBUG_ASSERT(rc == MY_AES_OK);
if (rc)
return rc;
DBUG_ASSERT(mlen == sizeof(mask));
for (uint i=0; i < source_tail_len; i++)
dst[i]= source_tail[i] ^ mask[i];
}
*dlen= source_tail_len;
return MY_AES_OK;
} | O0 | cpp | MyCTX_nopad::finish(unsigned char*, unsigned int*):
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
movq %rdx, -0x40(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpl $0x0, 0xdc(%rax)
je 0xfdcf8
movq -0x58(%rbp), %rax
movq %rax, %rdx
addq $0xe0, %rdx
leaq -0x20(%rbp), %r8
movq 0xd0(%rax), %r10
movl 0xd8(%rax), %eax
xorl %edi, %edi
movl $0x3, %esi
movl $0x10, %ecx
leaq -0x44(%rbp), %r9
xorl %r11d, %r11d
movq %r10, (%rsp)
movl %eax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movl $0x0, 0x18(%rsp)
callq 0xfd320
movl %eax, -0x48(%rbp)
jmp 0xfdc9e
cmpl $0x0, -0x48(%rbp)
je 0xfdcac
movl -0x48(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0xfdd0f
jmp 0xfdcae
jmp 0xfdcb0
movl $0x0, -0x4c(%rbp)
movq -0x58(%rbp), %rcx
movl -0x4c(%rbp), %eax
cmpl 0xdc(%rcx), %eax
jae 0xfdcf6
movq -0x58(%rbp), %rax
movl -0x4c(%rbp), %ecx
movzbl 0xf0(%rax,%rcx), %eax
movl -0x4c(%rbp), %ecx
movzbl -0x20(%rbp,%rcx), %ecx
xorl %ecx, %eax
movb %al, %dl
movq -0x38(%rbp), %rax
movl -0x4c(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0xfdcb7
jmp 0xfdcf8
movq -0x58(%rbp), %rax
movl 0xdc(%rax), %ecx
movq -0x40(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x5c(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xfdd33
movl -0x5c(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
callq 0x2a290
nopl (%rax,%rax)
| _ZN11MyCTX_nopad6finishEPhPj:
push rbp
mov rbp, rsp
sub rsp, 80h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_30], rdi
mov [rbp+var_38], rsi
mov [rbp+var_40], rdx
mov rax, [rbp+var_30]
mov [rbp+var_58], rax
cmp dword ptr [rax+0DCh], 0
jz loc_FDCF8
mov rax, [rbp+var_58]
mov rdx, rax
add rdx, 0E0h
lea r8, [rbp+var_20]
mov r10, [rax+0D0h]
mov eax, [rax+0D8h]
xor edi, edi
mov esi, 3
mov ecx, 10h
lea r9, [rbp+var_44]
xor r11d, r11d
mov [rsp+80h+var_80], r10
mov [rsp+80h+var_78], eax
mov [rsp+80h+var_70], 0
mov [rsp+80h+var_68], 0
call my_aes_crypt
mov [rbp+var_48], eax
jmp short $+2
loc_FDC9E:
cmp [rbp+var_48], 0
jz short loc_FDCAC
mov eax, [rbp+var_48]
mov [rbp+var_24], eax
jmp short loc_FDD0F
loc_FDCAC:
jmp short $+2
loc_FDCAE:
jmp short $+2
loc_FDCB0:
mov [rbp+var_4C], 0
loc_FDCB7:
mov rcx, [rbp+var_58]
mov eax, [rbp+var_4C]
cmp eax, [rcx+0DCh]
jnb short loc_FDCF6
mov rax, [rbp+var_58]
mov ecx, [rbp+var_4C]
movzx eax, byte ptr [rax+rcx+0F0h]
mov ecx, [rbp+var_4C]
movzx ecx, [rbp+rcx+var_20]
xor eax, ecx
mov dl, al
mov rax, [rbp+var_38]
mov ecx, [rbp+var_4C]
mov [rax+rcx], dl
mov eax, [rbp+var_4C]
add eax, 1
mov [rbp+var_4C], eax
jmp short loc_FDCB7
loc_FDCF6:
jmp short $+2
loc_FDCF8:
mov rax, [rbp+var_58]
mov ecx, [rax+0DCh]
mov rax, [rbp+var_40]
mov [rax], ecx
mov [rbp+var_24], 0
loc_FDD0F:
mov eax, [rbp+var_24]
mov [rbp+var_5C], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_FDD33
mov eax, [rbp+var_5C]
add rsp, 80h
pop rbp
retn
loc_FDD33:
call ___stack_chk_fail
| long long MyCTX_nopad::finish(MyCTX_nopad *this, unsigned __int8 *a2, unsigned int *a3)
{
unsigned int i; // [rsp+34h] [rbp-4Ch]
unsigned int v5; // [rsp+38h] [rbp-48h]
int v6; // [rsp+3Ch] [rbp-44h] BYREF
unsigned int *v7; // [rsp+40h] [rbp-40h]
unsigned __int8 *v8; // [rsp+48h] [rbp-38h]
MyCTX_nopad *v9; // [rsp+50h] [rbp-30h]
_BYTE v11[24]; // [rsp+60h] [rbp-20h] BYREF
unsigned long long v12; // [rsp+78h] [rbp-8h]
v12 = __readfsqword(0x28u);
v9 = this;
v8 = a2;
v7 = a3;
if ( !*((_DWORD *)this + 55) )
goto LABEL_7;
v5 = my_aes_crypt(
0,
3,
(long long)this + 224,
0x10u,
(long long)v11,
&v6,
*((_QWORD *)this + 26),
*((_DWORD *)this + 54),
0LL,
0);
if ( !v5 )
{
for ( i = 0; i < *((_DWORD *)this + 55); ++i )
v8[i] = v11[i] ^ *((_BYTE *)this + i + 240);
LABEL_7:
*v7 = *((_DWORD *)this + 55);
return 0;
}
return v5;
}
| finish:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x30],RDI
MOV qword ptr [RBP + -0x38],RSI
MOV qword ptr [RBP + -0x40],RDX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x58],RAX
CMP dword ptr [RAX + 0xdc],0x0
JZ 0x001fdcf8
MOV RAX,qword ptr [RBP + -0x58]
MOV RDX,RAX
ADD RDX,0xe0
LEA R8,[RBP + -0x20]
MOV R10,qword ptr [RAX + 0xd0]
MOV EAX,dword ptr [RAX + 0xd8]
XOR EDI,EDI
MOV ESI,0x3
MOV ECX,0x10
LEA R9,[RBP + -0x44]
XOR R11D,R11D
MOV qword ptr [RSP],R10
MOV dword ptr [RSP + 0x8],EAX
MOV qword ptr [RSP + 0x10],0x0
MOV dword ptr [RSP + 0x18],0x0
CALL 0x001fd320
MOV dword ptr [RBP + -0x48],EAX
JMP 0x001fdc9e
LAB_001fdc9e:
CMP dword ptr [RBP + -0x48],0x0
JZ 0x001fdcac
MOV EAX,dword ptr [RBP + -0x48]
MOV dword ptr [RBP + -0x24],EAX
JMP 0x001fdd0f
LAB_001fdcac:
JMP 0x001fdcae
LAB_001fdcae:
JMP 0x001fdcb0
LAB_001fdcb0:
MOV dword ptr [RBP + -0x4c],0x0
LAB_001fdcb7:
MOV RCX,qword ptr [RBP + -0x58]
MOV EAX,dword ptr [RBP + -0x4c]
CMP EAX,dword ptr [RCX + 0xdc]
JNC 0x001fdcf6
MOV RAX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RBP + -0x4c]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0xf0]
MOV ECX,dword ptr [RBP + -0x4c]
MOVZX ECX,byte ptr [RBP + RCX*0x1 + -0x20]
XOR EAX,ECX
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RBP + -0x4c]
MOV byte ptr [RAX + RCX*0x1],DL
MOV EAX,dword ptr [RBP + -0x4c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x4c],EAX
JMP 0x001fdcb7
LAB_001fdcf6:
JMP 0x001fdcf8
LAB_001fdcf8:
MOV RAX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RAX + 0xdc]
MOV RAX,qword ptr [RBP + -0x40]
MOV dword ptr [RAX],ECX
MOV dword ptr [RBP + -0x24],0x0
LAB_001fdd0f:
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x5c],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001fdd33
MOV EAX,dword ptr [RBP + -0x5c]
ADD RSP,0x80
POP RBP
RET
LAB_001fdd33:
CALL 0x0012a290
|
/* MyCTX_nopad::finish(unsigned char*, unsigned int*) */
int __thiscall MyCTX_nopad::finish(MyCTX_nopad *this,uchar *param_1,uint *param_2)
{
long in_FS_OFFSET;
uint local_54;
int1 local_4c [4];
uint *local_48;
uchar *local_40;
MyCTX_nopad *local_38;
int local_2c;
byte local_28 [24];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_48 = param_2;
local_40 = param_1;
local_38 = this;
if (*(int *)(this + 0xdc) != 0) {
local_2c = my_aes_crypt(0,3,this + 0xe0,0x10,local_28,local_4c,*(int8 *)(this + 0xd0),
*(int4 *)(this + 0xd8),0,0);
if (local_2c != 0) goto LAB_001fdd0f;
for (local_54 = 0; local_54 < *(uint *)(this + 0xdc); local_54 = local_54 + 1) {
local_40[local_54] = (byte)this[(ulong)local_54 + 0xf0] ^ local_28[local_54];
}
}
*local_48 = *(uint *)(this + 0xdc);
local_2c = 0;
LAB_001fdd0f:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_2c;
}
| |
24,231 | add_compiled_collation | eloqsql/mysys/charset.c | void add_compiled_collation(struct charset_info_st *cs)
{
DBUG_ASSERT(cs->number < array_elements(all_charsets));
all_charsets[cs->number]= cs;
cs->state|= MY_CS_AVAILABLE;
if ((my_hash_insert(&charset_name_hash, (uchar*) cs)))
{
#ifndef DBUG_OFF
CHARSET_INFO *org= (CHARSET_INFO*) my_hash_search(&charset_name_hash,
(uchar*) cs->cs_name.str,
cs->cs_name.length);
DBUG_ASSERT(org);
DBUG_ASSERT(org->cs_name.str == cs->cs_name.str);
DBUG_ASSERT(org->cs_name.length == strlen(cs->cs_name.str));
#endif
}
} | O3 | c | add_compiled_collation:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rsi
movl (%rdi), %eax
leaq 0x38926f(%rip), %rcx # 0x3d1b20
movq %rdi, (%rcx,%rax,8)
orb $0x2, 0xd(%rdi)
leaq 0x38d260(%rip), %rdi # 0x3d5b20
popq %rbp
jmp 0x4a276
| add_compiled_collation:
push rbp
mov rbp, rsp
mov rsi, rdi
mov eax, [rdi]
lea rcx, all_charsets
mov [rcx+rax*8], rdi
or byte ptr [rdi+0Dh], 2
lea rdi, charset_name_hash
pop rbp
jmp my_hash_insert
| long long add_compiled_collation(unsigned int *a1)
{
all_charsets[*a1] = a1;
*((_BYTE *)a1 + 13) |= 2u;
return my_hash_insert(&charset_name_hash, a1);
}
| add_compiled_collation:
PUSH RBP
MOV RBP,RSP
MOV RSI,RDI
MOV EAX,dword ptr [RDI]
LEA RCX,[0x4d1b20]
MOV qword ptr [RCX + RAX*0x8],RDI
OR byte ptr [RDI + 0xd],0x2
LEA RDI,[0x4d5b20]
POP RBP
JMP 0x0014a276
|
void add_compiled_collation(uint *param_1)
{
(&all_charsets)[*param_1] = param_1;
*(byte *)((long)param_1 + 0xd) = *(byte *)((long)param_1 + 0xd) | 2;
my_hash_insert(charset_name_hash,param_1);
return;
}
| |
24,232 | minja::Value::pop(minja::Value const&) | monkey531[P]llama/common/minja.hpp | Value pop(const Value& index) {
if (is_array()) {
if (array_->empty())
throw std::runtime_error("pop from empty list");
if (index.is_null()) {
auto ret = array_->back();
array_->pop_back();
return ret;
} else if (!index.is_number_integer()) {
throw std::runtime_error("pop index must be an integer: " + index.dump());
} else {
auto i = index.get<int>();
if (i < 0 || i >= static_cast<int>(array_->size()))
throw std::runtime_error("pop index out of range: " + index.dump());
auto it = array_->begin() + (i < 0 ? array_->size() + i : i);
auto ret = *it;
array_->erase(it);
return ret;
}
} else if (is_object()) {
if (!index.is_hashable())
throw std::runtime_error("Unashable type: " + index.dump());
auto it = object_->find(index.primitive_);
if (it == object_->end())
throw std::runtime_error("Key not found: " + index.dump());
auto ret = it->second;
object_->erase(it);
return ret;
} else {
throw std::runtime_error("Value is not an array or object: " + dump());
}
} | O2 | cpp | minja::Value::pop(minja::Value const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x10(%rsi), %rax
testq %rax, %rax
je 0x6cbb5
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
je 0x6cc70
movq %rbx, %rdi
callq 0x634ea
testb %al, %al
je 0x6cc0b
movq 0x10(%r15), %rax
movq 0x8(%rax), %rsi
addq $-0x50, %rsi
movq %r14, %rdi
callq 0x686e8
movq 0x10(%r15), %rdi
callq 0x6dc0a
jmp 0x6cc60
cmpq $0x0, 0x20(%r15)
je 0x6ccfc
movq %rbx, %rdi
callq 0x62ef0
testb %al, %al
je 0x6cd58
movq 0x20(%r15), %rdi
leaq 0x40(%rbx), %rsi
callq 0x6b1b0
movq %rax, %r12
movq 0x20(%r15), %rax
cmpq 0x8(%rax), %r12
je 0x6cdb4
movq %r12, %rsi
addq $0x10, %rsi
movq %r14, %rdi
callq 0x686e8
movq 0x20(%r15), %rdi
movq %r12, %rsi
callq 0x6dc24
jmp 0x6cc60
movb 0x40(%rbx), %al
addb $-0x5, %al
cmpb $0x2, %al
jae 0x6ce0d
movq %rbx, %rdi
callq 0x6b0fa
testl %eax, %eax
js 0x6cca0
movl %eax, %ecx
movq 0x10(%r15), %rax
movq (%rax), %r12
movq 0x8(%rax), %rax
subq %r12, %rax
pushq $0x50
popq %rsi
cqto
idivq %rsi
cmpl %eax, %ecx
jge 0x6cca0
movl %ecx, %eax
imulq $0x50, %rax, %rax
addq %rax, %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x686e8
movq 0x10(%r15), %rdi
movq %r12, %rsi
callq 0x6dc1e
movq %r14, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x23480
movq %rax, %r14
leaq 0x47ab0(%rip), %rsi # 0xb4732
movq %rax, %rdi
callq 0x23340
movq 0x9135f(%rip), %rsi # 0xfdff0
movq 0x912c0(%rip), %rdx # 0xfdf58
movq %r14, %rdi
callq 0x23f30
pushq $0x10
popq %rdi
callq 0x23480
movq %rax, %r14
movq %rsp, %rdi
pushq $-0x1
popq %rdx
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x62f00
leaq 0x47aa3(%rip), %rsi # 0xb4765
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x58626
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x23e60
xorl %ebp, %ebp
movq 0x91308(%rip), %rsi # 0xfdff0
movq 0x91269(%rip), %rdx # 0xfdf58
movq %r14, %rdi
callq 0x23f30
jmp 0x6ce64
pushq $0x10
popq %rdi
callq 0x23480
movq %rax, %r14
movq %rsp, %rdi
pushq $-0x1
popq %rdx
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x62f00
leaq 0x4770c(%rip), %rsi # 0xb442a
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x58626
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x23e60
xorl %ebp, %ebp
movq 0x912ac(%rip), %rsi # 0xfdff0
movq 0x9120d(%rip), %rdx # 0xfdf58
movq %r14, %rdi
callq 0x23f30
jmp 0x6ce64
pushq $0x10
popq %rdi
callq 0x23480
movq %rax, %r14
movq %rsp, %rdi
pushq $-0x1
popq %rdx
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x62f00
leaq 0x47564(%rip), %rsi # 0xb42de
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x58626
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x23e60
xorl %ebp, %ebp
movq 0x91250(%rip), %rsi # 0xfdff0
movq 0x911b1(%rip), %rdx # 0xfdf58
movq %r14, %rdi
callq 0x23f30
jmp 0x6ce64
pushq $0x10
popq %rdi
callq 0x23480
movq %rax, %r14
movq %rsp, %rdi
pushq $-0x1
popq %rdx
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x62f00
leaq 0x479a8(%rip), %rsi # 0xb477e
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x58626
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x23e60
xorl %ebp, %ebp
movq 0x911f4(%rip), %rsi # 0xfdff0
movq 0x91155(%rip), %rdx # 0xfdf58
movq %r14, %rdi
callq 0x23f30
jmp 0x6ce64
pushq $0x10
popq %rdi
callq 0x23480
movq %rax, %r14
movq %rsp, %rdi
pushq $-0x1
popq %rdx
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x62f00
leaq 0x47917(%rip), %rsi # 0xb4746
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x58626
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x23e60
xorl %ebp, %ebp
movq 0x9119b(%rip), %rsi # 0xfdff0
movq 0x910fc(%rip), %rdx # 0xfdf58
movq %r14, %rdi
callq 0x23f30
jmp 0x6ce74
jmp 0x6ce83
jmp 0x6ce74
jmp 0x6ce83
jmp 0x6ce74
jmp 0x6ce83
jmp 0x6ce74
jmp 0x6ce83
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x24208
jmp 0x6ce89
movq %rax, %rbx
movb $0x1, %bpl
movq %rsp, %rdi
callq 0x24208
testb %bpl, %bpl
jne 0x6cea7
jmp 0x6cebc
jmp 0x6cea4
jmp 0x6cea4
jmp 0x6cea4
jmp 0x6cea4
jmp 0x6ceb1
jmp 0x6cea4
movq %rax, %rbx
movq %r14, %rdi
callq 0x236b0
jmp 0x6cebc
movq %rax, %rbx
movq %r14, %rdi
callq 0x62d12
movq %rbx, %rdi
callq 0x23fd0
| _ZN5minja5Value3popERKS0_:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 40h
mov rbx, rdx
mov r15, rsi
mov r14, rdi
mov rax, [rsi+10h]
test rax, rax
jz short loc_6CBB5
mov rcx, [rax]
cmp rcx, [rax+8]
jz loc_6CC70
mov rdi, rbx; this
call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void)
test al, al
jz short loc_6CC0B
mov rax, [r15+10h]
mov rsi, [rax+8]
add rsi, 0FFFFFFFFFFFFFFB0h; minja::Value *
mov rdi, r14; this
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
mov rdi, [r15+10h]
call _ZNSt6vectorIN5minja5ValueESaIS1_EE8pop_backEv; std::vector<minja::Value>::pop_back(void)
jmp loc_6CC60
loc_6CBB5:
cmp qword ptr [r15+20h], 0
jz loc_6CCFC
mov rdi, rbx; this
call _ZNK5minja5Value12is_primitiveEv; minja::Value::is_primitive(void)
test al, al
jz loc_6CD58
mov rdi, [r15+20h]
lea rsi, [rbx+40h]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE4findERSJ_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::find(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 r12, rax
mov rax, [r15+20h]
cmp r12, [rax+8]
jz loc_6CDB4
mov rsi, r12
add rsi, 10h; minja::Value *
mov rdi, r14; this
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
mov rdi, [r15+20h]
mov rsi, r12
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEE; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>)
jmp short loc_6CC60
loc_6CC0B:
mov al, [rbx+40h]
add al, 0FBh
cmp al, 2
jnb loc_6CE0D
mov rdi, rbx
call _ZNK5minja5Value3getIiEET_v; minja::Value::get<int>(void)
test eax, eax
js short loc_6CCA0
mov ecx, eax
mov rax, [r15+10h]
mov r12, [rax]
mov rax, [rax+8]
sub rax, r12
push 50h ; 'P'
pop rsi
cqo
idiv rsi
cmp ecx, eax
jge short loc_6CCA0
mov eax, ecx
imul rax, 50h ; 'P'
add r12, rax
mov rdi, r14; this
mov rsi, r12; minja::Value *
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
mov rdi, [r15+10h]
mov rsi, r12
call _ZNSt6vectorIN5minja5ValueESaIS1_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EE; std::vector<minja::Value>::erase(__gnu_cxx::__normal_iterator<minja::Value const*,std::vector<minja::Value>>)
loc_6CC60:
mov rax, r14
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_6CC70:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aPopFromEmptyLi; "pop from empty list"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_6CCA0:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, rbx
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aPopIndexOutOfR; "pop index out of range: "
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_48]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp loc_6CE64
loc_6CCFC:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, r15
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotAnAr_0; "Value is not an array or object: "
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_48]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp loc_6CE64
loc_6CD58:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, rbx
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUnashableType; "Unashable type: "
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_48]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp loc_6CE64
loc_6CDB4:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, rbx
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aKeyNotFound_0; "Key not found: "
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_48]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_6CE64
loc_6CE0D:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, rbx
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aPopIndexMustBe; "pop index must be an integer: "
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_48]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_6CE64:
jmp short loc_6CE74
jmp short loc_6CE83
jmp short loc_6CE74
jmp short loc_6CE83
jmp short loc_6CE74
jmp short loc_6CE83
jmp short loc_6CE74
jmp short loc_6CE83
loc_6CE74:
mov rbx, rax
lea rdi, [rsp+68h+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_6CE89
loc_6CE83:
mov rbx, rax
mov bpl, 1
loc_6CE89:
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_6CEA7
jmp short loc_6CEBC
jmp short loc_6CEA4
jmp short loc_6CEA4
jmp short loc_6CEA4
jmp short loc_6CEA4
jmp short loc_6CEB1
jmp short $+2
loc_6CEA4:
mov rbx, rax
loc_6CEA7:
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_6CEBC
loc_6CEB1:
mov rbx, rax
mov rdi, r14; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_6CEBC:
mov rdi, rbx
call __Unwind_Resume
| minja::Value * minja::Value::pop(minja::Value *this, const minja::Value *a2, unsigned __int8 *a3, __m128d a4)
{
_QWORD *v5; // rax
unsigned __int8 *v6; // r12
int v7; // eax
int v8; // ecx
_QWORD *v9; // rax
const minja::Value *v10; // r12
std::runtime_error *exception; // r14
void *v13; // r14
void *v14; // r14
void *v15; // r14
void *v16; // r14
void *v17; // r14
_BYTE v18[32]; // [rsp+0h] [rbp-68h] BYREF
_BYTE v19[72]; // [rsp+20h] [rbp-48h] BYREF
v5 = (_QWORD *)*((_QWORD *)a2 + 2);
if ( v5 )
{
if ( *v5 == v5[1] )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "pop from empty list");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( minja::Value::is_null((minja::Value *)a3) )
{
minja::Value::Value(this, (const minja::Value *)(*(_QWORD *)(*((_QWORD *)a2 + 2) + 8LL) - 80LL));
std::vector<minja::Value>::pop_back(*((_QWORD *)a2 + 2));
}
else
{
if ( (unsigned __int8)(a3[64] - 5) >= 2u )
{
v17 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v18, (long long)a3, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v19, (long long)"pop index must be an integer: ", (long long)v18);
std::runtime_error::runtime_error(v17, v19);
__cxa_throw(
v17,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v7 = minja::Value::get<int>((minja::Value *)a3);
if ( v7 < 0 || (v8 = v7, v9 = (_QWORD *)*((_QWORD *)a2 + 2), v8 >= (int)((v9[1] - *v9) / 80LL)) )
{
v13 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v18, (long long)a3, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v19, (long long)"pop index out of range: ", (long long)v18);
std::runtime_error::runtime_error(v13, v19);
__cxa_throw(
v13,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v10 = (const minja::Value *)(80LL * (unsigned int)v8 + *v9);
minja::Value::Value(this, v10);
std::vector<minja::Value>::erase(*((_QWORD *)a2 + 2), v10);
}
}
else
{
if ( !*((_QWORD *)a2 + 4) )
{
v14 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v18, (long long)a2, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v19, (long long)"Value is not an array or object: ", (long long)v18);
std::runtime_error::runtime_error(v14, v19);
__cxa_throw(
v14,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( !minja::Value::is_primitive((minja::Value *)a3) )
{
v15 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v18, (long long)a3, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v19, (long long)"Unashable type: ", (long long)v18);
std::runtime_error::runtime_error(v15, v19);
__cxa_throw(
v15,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v6 = nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::find(
*((unsigned __int8 ***)a2 + 4),
a3 + 64,
a4);
if ( v6 == *(unsigned __int8 **)(*((_QWORD *)a2 + 4) + 8LL) )
{
v16 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v18, (long long)a3, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v19, (long long)"Key not found: ", (long long)v18);
std::runtime_error::runtime_error(v16, v19);
__cxa_throw(
v16,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Value::Value(this, (const minja::Value *)(v6 + 16));
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::erase(
*((_QWORD *)a2 + 4),
v6);
}
return this;
}
| pop:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV RBX,RDX
MOV R15,RSI
MOV R14,RDI
MOV RAX,qword ptr [RSI + 0x10]
TEST RAX,RAX
JZ 0x0016cbb5
MOV RCX,qword ptr [RAX]
CMP RCX,qword ptr [RAX + 0x8]
JZ 0x0016cc70
MOV RDI,RBX
CALL 0x001634ea
TEST AL,AL
JZ 0x0016cc0b
MOV RAX,qword ptr [R15 + 0x10]
MOV RSI,qword ptr [RAX + 0x8]
ADD RSI,-0x50
MOV RDI,R14
CALL 0x001686e8
MOV RDI,qword ptr [R15 + 0x10]
CALL 0x0016dc0a
JMP 0x0016cc60
LAB_0016cbb5:
CMP qword ptr [R15 + 0x20],0x0
JZ 0x0016ccfc
MOV RDI,RBX
CALL 0x00162ef0
TEST AL,AL
JZ 0x0016cd58
MOV RDI,qword ptr [R15 + 0x20]
LEA RSI,[RBX + 0x40]
CALL 0x0016b1b0
MOV R12,RAX
MOV RAX,qword ptr [R15 + 0x20]
CMP R12,qword ptr [RAX + 0x8]
JZ 0x0016cdb4
MOV RSI,R12
ADD RSI,0x10
MOV RDI,R14
CALL 0x001686e8
MOV RDI,qword ptr [R15 + 0x20]
LAB_0016cc01:
MOV RSI,R12
CALL 0x0016dc24
LAB_0016cc09:
JMP 0x0016cc60
LAB_0016cc0b:
MOV AL,byte ptr [RBX + 0x40]
ADD AL,0xfb
CMP AL,0x2
JNC 0x0016ce0d
MOV RDI,RBX
CALL 0x0016b0fa
TEST EAX,EAX
JS 0x0016cca0
MOV ECX,EAX
MOV RAX,qword ptr [R15 + 0x10]
MOV R12,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x8]
SUB RAX,R12
PUSH 0x50
POP RSI
CQO
IDIV RSI
CMP ECX,EAX
JGE 0x0016cca0
MOV EAX,ECX
IMUL RAX,RAX,0x50
ADD R12,RAX
MOV RDI,R14
MOV RSI,R12
CALL 0x001686e8
MOV RDI,qword ptr [R15 + 0x10]
LAB_0016cc58:
MOV RSI,R12
CALL 0x0016dc1e
LAB_0016cc60:
MOV RAX,R14
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0016cc70:
PUSH 0x10
POP RDI
CALL 0x00123480
MOV R14,RAX
LAB_0016cc7b:
LEA RSI,[0x1b4732]
MOV RDI,RAX
CALL 0x00123340
LAB_0016cc8a:
MOV RSI,qword ptr [0x001fdff0]
MOV RDX,qword ptr [0x001fdf58]
MOV RDI,R14
CALL 0x00123f30
LAB_0016cca0:
PUSH 0x10
POP RDI
CALL 0x00123480
MOV R14,RAX
LAB_0016ccab:
MOV RDI,RSP
PUSH -0x1
POP RDX
MOV RSI,RBX
XOR ECX,ECX
CALL 0x00162f00
LAB_0016ccbb:
LEA RSI,[0x1b4765]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00158626
MOV BPL,0x1
LAB_0016ccd2:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x00123e60
XOR EBP,EBP
MOV RSI,qword ptr [0x001fdff0]
MOV RDX,qword ptr [0x001fdf58]
MOV RDI,R14
CALL 0x00123f30
LAB_0016ccfc:
PUSH 0x10
POP RDI
CALL 0x00123480
MOV R14,RAX
LAB_0016cd07:
MOV RDI,RSP
PUSH -0x1
POP RDX
MOV RSI,R15
XOR ECX,ECX
CALL 0x00162f00
LAB_0016cd17:
LEA RSI,[0x1b442a]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00158626
MOV BPL,0x1
LAB_0016cd2e:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x00123e60
XOR EBP,EBP
MOV RSI,qword ptr [0x001fdff0]
MOV RDX,qword ptr [0x001fdf58]
MOV RDI,R14
CALL 0x00123f30
LAB_0016cd58:
PUSH 0x10
POP RDI
CALL 0x00123480
MOV R14,RAX
LAB_0016cd63:
MOV RDI,RSP
PUSH -0x1
POP RDX
MOV RSI,RBX
XOR ECX,ECX
CALL 0x00162f00
LAB_0016cd73:
LEA RSI,[0x1b42de]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00158626
MOV BPL,0x1
LAB_0016cd8a:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x00123e60
XOR EBP,EBP
MOV RSI,qword ptr [0x001fdff0]
MOV RDX,qword ptr [0x001fdf58]
MOV RDI,R14
CALL 0x00123f30
LAB_0016cdb4:
PUSH 0x10
POP RDI
CALL 0x00123480
MOV R14,RAX
LAB_0016cdbf:
MOV RDI,RSP
PUSH -0x1
POP RDX
MOV RSI,RBX
XOR ECX,ECX
CALL 0x00162f00
LAB_0016cdcf:
LEA RSI,[0x1b477e]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00158626
MOV BPL,0x1
LAB_0016cde6:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x00123e60
XOR EBP,EBP
MOV RSI,qword ptr [0x001fdff0]
MOV RDX,qword ptr [0x001fdf58]
MOV RDI,R14
CALL 0x00123f30
LAB_0016ce0d:
PUSH 0x10
POP RDI
CALL 0x00123480
MOV R14,RAX
LAB_0016ce18:
MOV RDI,RSP
PUSH -0x1
POP RDX
MOV RSI,RBX
XOR ECX,ECX
CALL 0x00162f00
LAB_0016ce28:
LEA RSI,[0x1b4746]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00158626
MOV BPL,0x1
LAB_0016ce3f:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x00123e60
XOR EBP,EBP
MOV RSI,qword ptr [0x001fdff0]
MOV RDX,qword ptr [0x001fdf58]
MOV RDI,R14
CALL 0x00123f30
|
/* minja::Value::pop(minja::Value const&) */
Value * minja::Value::pop(Value *param_1)
{
long *plVar1;
char cVar2;
uint uVar3;
long lVar4;
runtime_error *prVar5;
Value *in_RDX;
bool bVar6;
long in_RSI;
int iVar7;
Value *pVVar8;
int1 auStack_68 [32];
string local_48 [32];
plVar1 = *(long **)(in_RSI + 0x10);
bVar6 = SUB81(in_RDX,0);
iVar7 = (int)auStack_68;
if (plVar1 == (long *)0x0) {
if (*(long *)(in_RSI + 0x20) == 0) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016cd07 to 0016cd16 has its CatchHandler @ 0016ce9e */
dump_abi_cxx11_(iVar7,SUB81(in_RSI,0));
/* try { // try from 0016cd17 to 0016cd2a has its CatchHandler @ 0016ce72 */
std::operator+((char *)local_48,(string *)"Value is not an array or object: ");
/* try { // try from 0016cd2e to 0016cd52 has its CatchHandler @ 0016ce70 */
std::runtime_error::runtime_error(prVar5,local_48);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58);
}
cVar2 = is_primitive(in_RDX);
if (cVar2 == '\0') {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016cd63 to 0016cd72 has its CatchHandler @ 0016ce9c */
dump_abi_cxx11_(iVar7,bVar6);
/* try { // try from 0016cd73 to 0016cd86 has its CatchHandler @ 0016ce6e */
std::operator+((char *)local_48,(string *)"Unashable type: ");
/* try { // try from 0016cd8a to 0016cdae has its CatchHandler @ 0016ce6c */
std::runtime_error::runtime_error(prVar5,local_48);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58);
}
lVar4 = nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::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>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::find(*(ordered_map<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>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
**)(in_RSI + 0x20),in_RDX + 0x40);
if (lVar4 == *(long *)(*(long *)(in_RSI + 0x20) + 8)) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016cdbf to 0016cdce has its CatchHandler @ 0016ce9a */
dump_abi_cxx11_(iVar7,bVar6);
/* try { // try from 0016cdcf to 0016cde2 has its CatchHandler @ 0016ce6a */
std::operator+((char *)local_48,(string *)"Key not found: ");
/* try { // try from 0016cde6 to 0016ce0a has its CatchHandler @ 0016ce68 */
std::runtime_error::runtime_error(prVar5,local_48);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58);
}
Value(param_1,(Value *)(lVar4 + 0x10));
/* try { // try from 0016cc01 to 0016cc08 has its CatchHandler @ 0016ceb1 */
nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::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>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::erase(*(ordered_map<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>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
**)(in_RSI + 0x20),lVar4);
}
else {
if (*plVar1 == plVar1[1]) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016cc7b to 0016cc89 has its CatchHandler @ 0016cea4 */
std::runtime_error::runtime_error(prVar5,"pop from empty list");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58);
}
cVar2 = is_null(in_RDX);
if (cVar2 == '\0') {
if (1 < (byte)((char)in_RDX[0x40] - 5U)) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016ce18 to 0016ce27 has its CatchHandler @ 0016ce98 */
dump_abi_cxx11_(iVar7,bVar6);
/* try { // try from 0016ce28 to 0016ce3b has its CatchHandler @ 0016ce66 */
std::operator+((char *)local_48,(string *)"pop index must be an integer: ");
/* try { // try from 0016ce3f to 0016ce63 has its CatchHandler @ 0016ce64 */
std::runtime_error::runtime_error(prVar5,local_48);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58);
}
uVar3 = get<int>(in_RDX);
if ((-1 < (int)uVar3) &&
(lVar4 = **(long **)(in_RSI + 0x10),
(int)uVar3 < (int)(((*(long **)(in_RSI + 0x10))[1] - lVar4) / 0x50))) {
pVVar8 = (Value *)(lVar4 + (ulong)uVar3 * 0x50);
Value(param_1,pVVar8);
/* try { // try from 0016cc58 to 0016cc5f has its CatchHandler @ 0016cea0 */
std::vector<minja::Value,std::allocator<minja::Value>>::erase
(*(vector<minja::Value,std::allocator<minja::Value>> **)(in_RSI + 0x10),pVVar8);
return param_1;
}
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016ccab to 0016ccba has its CatchHandler @ 0016cea2 */
dump_abi_cxx11_(iVar7,bVar6);
/* try { // try from 0016ccbb to 0016ccce has its CatchHandler @ 0016ce83 */
std::operator+((char *)local_48,(string *)"pop index out of range: ");
/* try { // try from 0016ccd2 to 0016ccf6 has its CatchHandler @ 0016ce74 */
std::runtime_error::runtime_error(prVar5,local_48);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58);
}
Value(param_1,(Value *)(*(long *)(*(long *)(in_RSI + 0x10) + 8) + -0x50));
std::vector<minja::Value,std::allocator<minja::Value>>::pop_back
(*(vector<minja::Value,std::allocator<minja::Value>> **)(in_RSI + 0x10));
}
return param_1;
}
| |
24,233 | add_module_variables | bluesky950520[P]quickjs/quickjs.c | static int add_module_variables(JSContext *ctx, JSFunctionDef *fd)
{
int i, idx;
JSModuleDef *m = fd->module;
JSExportEntry *me;
JSGlobalVar *hf;
/* The imported global variables were added as closure variables
in js_parse_import(). We add here the module global
variables. */
for(i = 0; i < fd->global_var_count; i++) {
hf = &fd->global_vars[i];
if (add_closure_var(ctx, fd, TRUE, FALSE, i, hf->var_name, hf->is_const,
hf->is_lexical, JS_VAR_NORMAL) < 0)
return -1;
}
/* resolve the variable names of the local exports */
for(i = 0; i < m->export_entries_count; i++) {
me = &m->export_entries[i];
if (me->export_type == JS_EXPORT_TYPE_LOCAL) {
idx = find_closure_var(ctx, fd, me->local_name);
if (idx < 0) {
// XXX: add_module_variables() should take JSParseState *s and use js_parse_error_atom
JS_ThrowSyntaxErrorAtom(ctx, "exported variable '%s' does not exist",
me->local_name);
return -1;
}
me->u.local.var_idx = idx;
}
}
return 0;
} | O0 | c | add_module_variables:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq 0x220(%rax), %rax
movq %rax, 0x40(%rsp)
movl $0x0, 0x4c(%rsp)
movl 0x4c(%rsp), %eax
movq 0x50(%rsp), %rcx
cmpl 0x124(%rcx), %eax
jge 0xb23e1
movq 0x50(%rsp), %rax
movq 0x130(%rax), %rax
movslq 0x4c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rsi
movl 0x4c(%rsp), %r8d
movq 0x30(%rsp), %rax
movl 0xc(%rax), %r9d
movq 0x30(%rsp), %rax
movb 0x4(%rax), %al
shrb $0x2, %al
andb $0x1, %al
movzbl %al, %r10d
movq 0x30(%rsp), %rax
movb 0x4(%rax), %al
shrb %al
andb $0x1, %al
movzbl %al, %eax
movl $0x1, %edx
xorl %ecx, %ecx
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
callq 0xb0900
cmpl $0x0, %eax
jge 0xb23cf
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0xb249d
jmp 0xb23d1
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0xb2337
movl $0x0, 0x4c(%rsp)
movl 0x4c(%rsp), %eax
movq 0x40(%rsp), %rcx
cmpl 0x30(%rcx), %eax
jge 0xb2495
movq 0x40(%rsp), %rax
movq 0x28(%rax), %rax
movslq 0x4c(%rsp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
cmpl $0x0, 0x10(%rax)
jne 0xb2483
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x38(%rsp), %rax
movl 0x14(%rax), %edx
callq 0xb7ac0
movl %eax, 0x48(%rsp)
cmpl $0x0, 0x48(%rsp)
jge 0xb2478
movq 0x58(%rsp), %rdi
movq 0x38(%rsp), %rax
movl 0x14(%rax), %esi
leaq 0x5cb6f(%rip), %rdx # 0x10efc5
leaq 0x59e64(%rip), %rcx # 0x10c2c1
movb $0x0, %al
callq 0x6c840
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0xb249d
movl 0x48(%rsp), %ecx
movq 0x38(%rsp), %rax
movl %ecx, (%rax)
jmp 0xb2485
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0xb23e9
movl $0x0, 0x64(%rsp)
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
| add_module_variables:
sub rsp, 68h
mov [rsp+68h+var_10], rdi
mov [rsp+68h+var_18], rsi
mov rax, [rsp+68h+var_18]
mov rax, [rax+220h]
mov [rsp+68h+var_28], rax
mov [rsp+68h+var_1C], 0
loc_B2337:
mov eax, [rsp+68h+var_1C]
mov rcx, [rsp+68h+var_18]
cmp eax, [rcx+124h]
jge loc_B23E1
mov rax, [rsp+68h+var_18]
mov rax, [rax+130h]
movsxd rcx, [rsp+68h+var_1C]
shl rcx, 4
add rax, rcx
mov [rsp+68h+var_38], rax
mov rdi, [rsp+68h+var_10]
mov rsi, [rsp+68h+var_18]
mov r8d, [rsp+68h+var_1C]
mov rax, [rsp+68h+var_38]
mov r9d, [rax+0Ch]
mov rax, [rsp+68h+var_38]
mov al, [rax+4]
shr al, 2
and al, 1
movzx r10d, al
mov rax, [rsp+68h+var_38]
mov al, [rax+4]
shr al, 1
and al, 1
movzx eax, al
mov edx, 1
xor ecx, ecx
mov [rsp+68h+var_68], r10d
mov [rsp+68h+var_60], eax
mov [rsp+68h+var_58], 0
call add_closure_var
cmp eax, 0
jge short loc_B23CF
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp loc_B249D
loc_B23CF:
jmp short $+2
loc_B23D1:
mov eax, [rsp+68h+var_1C]
add eax, 1
mov [rsp+68h+var_1C], eax
jmp loc_B2337
loc_B23E1:
mov [rsp+68h+var_1C], 0
loc_B23E9:
mov eax, [rsp+68h+var_1C]
mov rcx, [rsp+68h+var_28]
cmp eax, [rcx+30h]
jge loc_B2495
mov rax, [rsp+68h+var_28]
mov rax, [rax+28h]
movsxd rcx, [rsp+68h+var_1C]
shl rcx, 5
add rax, rcx
mov [rsp+68h+var_30], rax
mov rax, [rsp+68h+var_30]
cmp dword ptr [rax+10h], 0
jnz short loc_B2483
mov rdi, [rsp+68h+var_10]
mov rsi, [rsp+68h+var_18]
mov rax, [rsp+68h+var_30]
mov edx, [rax+14h]
call find_closure_var
mov [rsp+68h+var_20], eax
cmp [rsp+68h+var_20], 0
jge short loc_B2478
mov rdi, [rsp+68h+var_10]
mov rax, [rsp+68h+var_30]
mov esi, [rax+14h]
lea rdx, aExportedVariab; "exported variable '%s' does not exist"
lea rcx, aQuickjsNgMemor+4Dh; ""
mov al, 0
call __JS_ThrowSyntaxErrorAtom
mov [rsp+68h+var_48], rax
mov [rsp+68h+var_40], rdx
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp short loc_B249D
loc_B2478:
mov ecx, [rsp+68h+var_20]
mov rax, [rsp+68h+var_30]
mov [rax], ecx
loc_B2483:
jmp short $+2
loc_B2485:
mov eax, [rsp+68h+var_1C]
add eax, 1
mov [rsp+68h+var_1C], eax
jmp loc_B23E9
loc_B2495:
mov [rsp+68h+var_4], 0
loc_B249D:
mov eax, [rsp+68h+var_4]
add rsp, 68h
retn
| long long add_module_variables(
long long a1,
long long a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10)
{
double v10; // xmm4_8
double v11; // xmm5_8
long long v13; // [rsp+30h] [rbp-38h]
int *v14; // [rsp+38h] [rbp-30h]
long long v15; // [rsp+40h] [rbp-28h]
int closure_var; // [rsp+48h] [rbp-20h]
unsigned int i; // [rsp+4Ch] [rbp-1Ch]
int j; // [rsp+4Ch] [rbp-1Ch]
v15 = *(_QWORD *)(a2 + 544);
for ( i = 0; (signed int)i < *(_DWORD *)(a2 + 292); ++i )
{
v13 = 16LL * (int)i + *(_QWORD *)(a2 + 304);
if ( (int)add_closure_var(
a1,
a2,
1,
0LL,
i,
*(unsigned int *)(v13 + 12),
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
(*(_BYTE *)(v13 + 4) & 4) != 0,
(*(_BYTE *)(v13 + 4) & 2) != 0,
0) < 0 )
return (unsigned int)-1;
}
for ( j = 0; j < *(_DWORD *)(v15 + 48); ++j )
{
v14 = (int *)(32LL * j + *(_QWORD *)(v15 + 40));
if ( !v14[4] )
{
closure_var = find_closure_var(a1, a2, (unsigned int)v14[5]);
if ( closure_var < 0 )
{
_JS_ThrowSyntaxErrorAtom(a1, v14[5], "exported variable '%s' does not exist", a3, a4, a5, a6, v10, v11, a9, a10);
return (unsigned int)-1;
}
*v14 = closure_var;
}
}
return 0;
}
| add_module_variables:
SUB RSP,0x68
MOV qword ptr [RSP + 0x58],RDI
MOV qword ptr [RSP + 0x50],RSI
MOV RAX,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RAX + 0x220]
MOV qword ptr [RSP + 0x40],RAX
MOV dword ptr [RSP + 0x4c],0x0
LAB_001b2337:
MOV EAX,dword ptr [RSP + 0x4c]
MOV RCX,qword ptr [RSP + 0x50]
CMP EAX,dword ptr [RCX + 0x124]
JGE 0x001b23e1
MOV RAX,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RAX + 0x130]
MOVSXD RCX,dword ptr [RSP + 0x4c]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x50]
MOV R8D,dword ptr [RSP + 0x4c]
MOV RAX,qword ptr [RSP + 0x30]
MOV R9D,dword ptr [RAX + 0xc]
MOV RAX,qword ptr [RSP + 0x30]
MOV AL,byte ptr [RAX + 0x4]
SHR AL,0x2
AND AL,0x1
MOVZX R10D,AL
MOV RAX,qword ptr [RSP + 0x30]
MOV AL,byte ptr [RAX + 0x4]
SHR AL,0x1
AND AL,0x1
MOVZX EAX,AL
MOV EDX,0x1
XOR ECX,ECX
MOV dword ptr [RSP],R10D
MOV dword ptr [RSP + 0x8],EAX
MOV dword ptr [RSP + 0x10],0x0
CALL 0x001b0900
CMP EAX,0x0
JGE 0x001b23cf
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x001b249d
LAB_001b23cf:
JMP 0x001b23d1
LAB_001b23d1:
MOV EAX,dword ptr [RSP + 0x4c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x4c],EAX
JMP 0x001b2337
LAB_001b23e1:
MOV dword ptr [RSP + 0x4c],0x0
LAB_001b23e9:
MOV EAX,dword ptr [RSP + 0x4c]
MOV RCX,qword ptr [RSP + 0x40]
CMP EAX,dword ptr [RCX + 0x30]
JGE 0x001b2495
MOV RAX,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RAX + 0x28]
MOVSXD RCX,dword ptr [RSP + 0x4c]
SHL RCX,0x5
ADD RAX,RCX
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0x38]
CMP dword ptr [RAX + 0x10],0x0
JNZ 0x001b2483
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RSP + 0x38]
MOV EDX,dword ptr [RAX + 0x14]
CALL 0x001b7ac0
MOV dword ptr [RSP + 0x48],EAX
CMP dword ptr [RSP + 0x48],0x0
JGE 0x001b2478
MOV RDI,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x38]
MOV ESI,dword ptr [RAX + 0x14]
LEA RDX,[0x20efc5]
LEA RCX,[0x20c2c1]
MOV AL,0x0
CALL 0x0016c840
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RDX
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x001b249d
LAB_001b2478:
MOV ECX,dword ptr [RSP + 0x48]
MOV RAX,qword ptr [RSP + 0x38]
MOV dword ptr [RAX],ECX
LAB_001b2483:
JMP 0x001b2485
LAB_001b2485:
MOV EAX,dword ptr [RSP + 0x4c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x4c],EAX
JMP 0x001b23e9
LAB_001b2495:
MOV dword ptr [RSP + 0x64],0x0
LAB_001b249d:
MOV EAX,dword ptr [RSP + 0x64]
ADD RSP,0x68
RET
|
int4 add_module_variables(int8 param_1,long param_2)
{
long lVar1;
int iVar2;
long lVar3;
int *piVar4;
int local_1c;
lVar1 = *(long *)(param_2 + 0x220);
for (local_1c = 0; local_1c < *(int *)(param_2 + 0x124); local_1c = local_1c + 1) {
lVar3 = *(long *)(param_2 + 0x130) + (long)local_1c * 0x10;
iVar2 = add_closure_var(param_1,param_2,1,0,local_1c,*(int4 *)(lVar3 + 0xc),
*(byte *)(lVar3 + 4) >> 2 & 1,*(byte *)(lVar3 + 4) >> 1 & 1,0);
if (iVar2 < 0) {
return 0xffffffff;
}
}
local_1c = 0;
do {
if (*(int *)(lVar1 + 0x30) <= local_1c) {
return 0;
}
piVar4 = (int *)(*(long *)(lVar1 + 0x28) + (long)local_1c * 0x20);
if (piVar4[4] == 0) {
iVar2 = find_closure_var(param_1,param_2,piVar4[5]);
if (iVar2 < 0) {
__JS_ThrowSyntaxErrorAtom(param_1,piVar4[5],"exported variable \'%s\' does not exist","");
return 0xffffffff;
}
*piVar4 = iVar2;
}
local_1c = local_1c + 1;
} while( true );
}
| |
24,234 | std::unique_ptr<juce::Slider, std::default_delete<juce::Slider>> sapphire_plugins::shared::makeThreePositionSwitch<sapphire_plugins::gravy::GravyEditor>(sapphire_plugins::gravy::GravyEditor*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) | sapphire-plugins/src/shared/editor_interactions.h | std::unique_ptr<juce::Slider> makeThreePositionSwitch(Editor *editor, const std::string &prefix,
const std::string pos)
{
auto r = Sapphire::FindComponent(prefix, pos);
auto cx = r.cx;
auto cy = r.cy;
static constexpr float dx = 2;
static constexpr float dy = 1;
auto sl = std::make_unique<juce::Slider>();
sl->setSliderStyle(juce::Slider::LinearHorizontal);
sl->setTextBoxStyle(juce::Slider::NoTextBox, true, 0, 0);
sl->setSize(16, 5);
sl->setRange(0, 1);
sl->setValue(0.5);
sl->setDoubleClickReturnValue(true, 0.5);
sl->setSliderSnapsToMousePosition(true);
sl->setLookAndFeel(editor->lnf.get());
editor->background->addAndMakeVisible(*sl);
set_control_position(*sl, cx, cy, dx, dy);
return sl;
} | O3 | c | std::unique_ptr<juce::Slider, std::default_delete<juce::Slider>> sapphire_plugins::shared::makeThreePositionSwitch<sapphire_plugins::gravy::GravyEditor>(sapphire_plugins::gravy::GravyEditor*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq %rdx, %rdi
movq %rcx, %rsi
callq 0x373480
movaps %xmm0, 0x10(%rsp)
movl $0x1a8, %edi # imm = 0x1A8
callq 0x863c0
movq %rax, %r14
movq %rax, %rdi
callq 0x16ed2a
movq %r14, (%rbx)
movq %r14, %rdi
xorl %esi, %esi
callq 0x169566
movq %r14, %rdi
xorl %esi, %esi
movl $0x1, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x16f5a6
movq %r14, %rdi
movl $0x10, %esi
movl $0x5, %edx
callq 0x1189be
movsd 0x2a9102(%rip), %xmm1 # 0x3a33a8
xorps %xmm0, %xmm0
xorps %xmm2, %xmm2
movq %r14, %rdi
callq 0x169542
movsd 0x2a9114(%rip), %xmm0 # 0x3a33d0
movq %r14, %rdi
movl $0x3, %esi
callq 0x16977e
leaq 0x2c(%rsp), %r12
movq %r12, %rdi
movl $0x4, %esi
callq 0x1338be
movl (%r12), %edx
movsd 0x2a90e9(%rip), %xmm0 # 0x3a33d0
movq %r14, %rdi
movl $0x1, %esi
callq 0x16f808
movq %r14, %rdi
movl $0x1, %esi
callq 0x16f616
movq 0xb98(%r15), %rsi
movq %r14, %rdi
callq 0x120090
movq 0xb68(%r15), %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
callq 0x11eb20
movaps 0x10(%rsp), %xmm0
movshdup %xmm0, %xmm1 # xmm1 = xmm0[1,1,3,3]
movss 0x2a904f(%rip), %xmm2 # 0x3a3384
addss %xmm0, %xmm2
addss 0x2a8fdf(%rip), %xmm1 # 0x3a3320
movss %xmm2, 0xc(%rsp)
cvttss2si %xmm2, %r12d
movaps %xmm1, 0x10(%rsp)
cvttss2si %xmm1, %r15d
movq %r15, %rax
shlq $0x20, %rax
leaq (%r12,%rax), %rsi
movq %r14, %rdi
callq 0x11e148
xorps %xmm1, %xmm1
cvtsi2ss %r12d, %xmm1
movss 0xc(%rsp), %xmm0
subss %xmm1, %xmm0
xorps %xmm2, %xmm2
cvtsi2ss %r15d, %xmm2
movaps 0x10(%rsp), %xmm1
subss %xmm2, %xmm1
leaq 0x30(%rsp), %r15
movq %r15, %rdi
callq 0x208e78
movq %r14, %rdi
movq %r15, %rsi
callq 0x11e608
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r15
movl $0x1a8, %esi # imm = 0x1A8
movq %r14, %rdi
callq 0x86290
jmp 0xfa3d8
movq %rax, %r15
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
movq $0x0, (%rbx)
movq %r15, %rdi
callq 0x871f0
| _ZN16sapphire_plugins6shared23makeThreePositionSwitchINS_5gravy11GravyEditorEEESt10unique_ptrIN4juce6SliderESt14default_deleteIS6_EEPT_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESH_:
push r15
push r14
push r12
push rbx
sub rsp, 48h
mov r15, rsi
mov rbx, rdi
mov rdi, rdx
mov rsi, rcx
call _ZN8Sapphire13FindComponentERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_; Sapphire::FindComponent(std::string const&,std::string const&)
movaps [rsp+68h+var_58], xmm0
mov edi, 1A8h; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rdi, rax; this
call _ZN4juce6SliderC2Ev; juce::Slider::Slider(void)
mov [rbx], r14
mov rdi, r14
xor esi, esi
call _ZN4juce6Slider14setSliderStyleENS0_11SliderStyleE; juce::Slider::setSliderStyle(juce::Slider::SliderStyle)
mov rdi, r14
xor esi, esi
mov edx, 1
xor ecx, ecx
xor r8d, r8d
call _ZN4juce6Slider15setTextBoxStyleENS0_20TextEntryBoxPositionEbii; juce::Slider::setTextBoxStyle(juce::Slider::TextEntryBoxPosition,bool,int,int)
mov rdi, r14; this
mov esi, 10h; int
mov edx, 5; int
call _ZN4juce9Component7setSizeEii; juce::Component::setSize(int,int)
movsd xmm1, cs:dbl_3A33A8; double
xorps xmm0, xmm0; double
xorps xmm2, xmm2; double
mov rdi, r14; this
call _ZN4juce6Slider8setRangeEddd; juce::Slider::setRange(double,double,double)
movsd xmm0, cs:qword_3A33D0
mov rdi, r14
mov esi, 3
call _ZN4juce6Slider8setValueEdNS_16NotificationTypeE; juce::Slider::setValue(double,juce::NotificationType)
lea r12, [rsp+68h+var_3C]
mov rdi, r12; this
mov esi, 4; int
call _ZN4juce12ModifierKeysC2Ei; juce::ModifierKeys::ModifierKeys(int)
mov edx, [r12]
movsd xmm0, cs:qword_3A33D0
mov rdi, r14
mov esi, 1
call _ZN4juce6Slider25setDoubleClickReturnValueEbdNS_12ModifierKeysE; juce::Slider::setDoubleClickReturnValue(bool,double,juce::ModifierKeys)
mov rdi, r14; this
mov esi, 1; bool
call _ZN4juce6Slider29setSliderSnapsToMousePositionEb; juce::Slider::setSliderSnapsToMousePosition(bool)
mov rsi, [r15+0B98h]; juce::LookAndFeel *
mov rdi, r14; this
call _ZN4juce9Component14setLookAndFeelEPNS_11LookAndFeelE; juce::Component::setLookAndFeel(juce::LookAndFeel *)
mov rdi, [r15+0B68h]; this
mov rsi, r14; juce::Component *
mov edx, 0FFFFFFFFh; int
call _ZN4juce9Component17addAndMakeVisibleERS0_i; juce::Component::addAndMakeVisible(juce::Component&,int)
movaps xmm0, [rsp+68h+var_58]
movshdup xmm1, xmm0
movss xmm2, cs:flt_3A3384
addss xmm2, xmm0
addss xmm1, cs:flt_3A3320
movss [rsp+68h+var_5C], xmm2
cvttss2si r12d, xmm2
movaps [rsp+68h+var_58], xmm1
cvttss2si r15d, xmm1
mov rax, r15
shl rax, 20h
lea rsi, [r12+rax]
mov rdi, r14; this
call _ZN4juce9Component17setCentrePositionENS_5PointIiEE; juce::Component::setCentrePosition(juce::Point<int>)
xorps xmm1, xmm1
cvtsi2ss xmm1, r12d
movss xmm0, [rsp+68h+var_5C]
subss xmm0, xmm1; float
xorps xmm2, xmm2
cvtsi2ss xmm2, r15d
movaps xmm1, [rsp+68h+var_58]
subss xmm1, xmm2; float
lea r15, [rsp+68h+var_38]
mov rdi, r15; this
call _ZN4juce15AffineTransform11translationEff; juce::AffineTransform::translation(float,float)
mov rdi, r14; this
mov rsi, r15; juce::AffineTransform *
call _ZN4juce9Component12setTransformERKNS_15AffineTransformE; juce::Component::setTransform(juce::AffineTransform const&)
mov rax, rbx
add rsp, 48h
pop rbx
pop r12
pop r14
pop r15
retn
mov r15, rax
mov esi, 1A8h; unsigned __int64
mov rdi, r14; void *
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_FA3D8
mov r15, rax
mov rax, [r14]
mov rdi, r14
call qword ptr [rax+8]
mov qword ptr [rbx], 0
loc_FA3D8:
mov rdi, r15
call __Unwind_Resume
| juce::Slider ** sapphire_plugins::shared::makeThreePositionSwitch<sapphire_plugins::gravy::GravyEditor>(
juce::Slider **a1,
long long a2,
long long a3,
long long a4,
__m128 a5)
{
juce::Slider *v5; // r14
float v6; // xmm1_4
unsigned int v8; // [rsp+2Ch] [rbp-3Ch] BYREF
_BYTE v9[56]; // [rsp+30h] [rbp-38h] BYREF
*(double *)a5.m128_u64 = Sapphire::FindComponent(a3, a4);
v5 = (juce::Slider *)operator new(0x1A8uLL);
juce::Slider::Slider(v5);
*a1 = v5;
juce::Slider::setSliderStyle(v5, 0LL);
juce::Slider::setTextBoxStyle(v5, 0LL, 1LL, 0LL, 0LL);
juce::Component::setSize(v5, 16, 5);
juce::Slider::setRange(v5, 0.0, 1.0, 0.0);
juce::Slider::setValue(v5, 3LL, 0.5);
juce::ModifierKeys::ModifierKeys((juce::ModifierKeys *)&v8, 4);
juce::Slider::setDoubleClickReturnValue(v5, 1LL, v8, 0.5);
juce::Slider::setSliderSnapsToMousePosition(v5, 1);
juce::Component::setLookAndFeel(v5, *(juce::LookAndFeel **)(a2 + 2968));
juce::Component::addAndMakeVisible(*(juce::Component **)(a2 + 2920), v5, -1);
v6 = _mm_movehdup_ps(a5).m128_f32[0] + 1.0;
juce::Component::setCentrePosition(v5);
juce::AffineTransform::translation(
(juce::AffineTransform *)v9,
(float)(a5.m128_f32[0] + 2.0) - (float)(int)(float)(a5.m128_f32[0] + 2.0),
v6 - (float)(int)v6);
juce::Component::setTransform(v5, (const juce::AffineTransform *)v9);
return a1;
}
| makeThreePositionSwitch<sapphire_plugins::gravy::GravyEditor>:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R15,RSI
MOV RBX,RDI
MOV RDI,RDX
MOV RSI,RCX
CALL 0x00473480
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV EDI,0x1a8
CALL 0x001863c0
MOV R14,RAX
LAB_001fa263:
MOV RDI,RAX
CALL 0x0026ed2a
MOV qword ptr [RBX],R14
LAB_001fa26e:
MOV RDI,R14
XOR ESI,ESI
CALL 0x00269566
MOV RDI,R14
XOR ESI,ESI
MOV EDX,0x1
XOR ECX,ECX
XOR R8D,R8D
CALL 0x0026f5a6
MOV RDI,R14
MOV ESI,0x10
MOV EDX,0x5
CALL 0x002189be
MOVSD XMM1,qword ptr [0x004a33a8]
XORPS XMM0,XMM0
XORPS XMM2,XMM2
MOV RDI,R14
CALL 0x00269542
MOVSD XMM0,qword ptr [0x004a33d0]
MOV RDI,R14
MOV ESI,0x3
CALL 0x0026977e
LEA R12,[RSP + 0x2c]
MOV RDI,R12
MOV ESI,0x4
CALL 0x002338be
MOV EDX,dword ptr [R12]
MOVSD XMM0,qword ptr [0x004a33d0]
MOV RDI,R14
MOV ESI,0x1
CALL 0x0026f808
MOV RDI,R14
MOV ESI,0x1
CALL 0x0026f616
MOV RSI,qword ptr [R15 + 0xb98]
MOV RDI,R14
CALL 0x00220090
MOV RDI,qword ptr [R15 + 0xb68]
MOV RSI,R14
MOV EDX,0xffffffff
CALL 0x0021eb20
MOVAPS XMM0,xmmword ptr [RSP + 0x10]
MOVSHDUP XMM1,XMM0
MOVSS XMM2,dword ptr [0x004a3384]
ADDSS XMM2,XMM0
ADDSS XMM1,dword ptr [0x004a3320]
MOVSS dword ptr [RSP + 0xc],XMM2
CVTTSS2SI R12D,XMM2
MOVAPS xmmword ptr [RSP + 0x10],XMM1
CVTTSS2SI R15D,XMM1
MOV RAX,R15
SHL RAX,0x20
LEA RSI,[R12 + RAX*0x1]
MOV RDI,R14
CALL 0x0021e148
XORPS XMM1,XMM1
CVTSI2SS XMM1,R12D
MOVSS XMM0,dword ptr [RSP + 0xc]
SUBSS XMM0,XMM1
XORPS XMM2,XMM2
CVTSI2SS XMM2,R15D
MOVAPS XMM1,xmmword ptr [RSP + 0x10]
SUBSS XMM1,XMM2
LEA R15,[RSP + 0x30]
MOV RDI,R15
CALL 0x00308e78
MOV RDI,R14
MOV RSI,R15
CALL 0x0021e608
LAB_001fa3a4:
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R12
POP R14
POP R15
RET
|
/* std::unique_ptr<juce::Slider, std::default_delete<juce::Slider> >
sapphire_plugins::shared::makeThreePositionSwitch<sapphire_plugins::gravy::GravyEditor>(sapphire_plugins::gravy::GravyEditor*,
std::__cxx11::string const&, std::__cxx11::string) */
shared * __thiscall
sapphire_plugins::shared::makeThreePositionSwitch<sapphire_plugins::gravy::GravyEditor>
(shared *this,long param_1,string *param_2,string *param_4)
{
Slider *this_00;
int iVar1;
uint uVar2;
int8 uVar3;
float fVar4;
float fVar5;
int4 local_3c;
AffineTransform local_38 [24];
uVar3 = Sapphire::FindComponent(param_2,param_4);
this_00 = (Slider *)operator_new(0x1a8);
/* try { // try from 001fa263 to 001fa26a has its CatchHandler @ 001fa3b3 */
juce::Slider::Slider(this_00);
*(Slider **)this = this_00;
/* try { // try from 001fa26e to 001fa3a3 has its CatchHandler @ 001fa3c5 */
juce::Slider::setSliderStyle(this_00,0);
juce::Slider::setTextBoxStyle(this_00,0,1,0,0);
juce::Component::setSize((Component *)this_00,0x10,5);
juce::Slider::setRange(this_00,0.0,DAT_004a33a8,0.0);
juce::Slider::setValue((int)DAT_004a33d0,this_00,3);
juce::ModifierKeys::ModifierKeys((ModifierKeys *)&local_3c,4);
juce::Slider::setDoubleClickReturnValue((Slider *)DAT_004a33d0,this_00,1,local_3c);
juce::Slider::setSliderSnapsToMousePosition(this_00,true);
juce::Component::setLookAndFeel((Component *)this_00,*(LookAndFeel **)(param_1 + 0xb98));
juce::Component::addAndMakeVisible(*(Component **)(param_1 + 0xb68),(Component *)this_00,-1);
fVar5 = DAT_004a3384 + (float)uVar3;
fVar4 = (float)((ulong)uVar3 >> 0x20) + DAT_004a3320;
iVar1 = (int)fVar5;
uVar2 = (uint)fVar4;
juce::Component::setCentrePosition
((Component *)this_00,
CONCAT44((int)((ulong)&local_3c >> 0x20),iVar1) + ((ulong)uVar2 << 0x20));
juce::AffineTransform::translation(local_38,fVar5 - (float)iVar1,fVar4 - (float)(int)uVar2);
juce::Component::setTransform((Component *)this_00,local_38);
return this;
}
| |
24,235 | emittra::Emittra::remove_all_listeners(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | angrymouse[P]emittra/src/emittra.cpp | void Emittra::remove_all_listeners(const std::string& event_name) {
auto event_data = get_or_create_event_data(event_name);
std::unique_lock<std::shared_mutex> lock(event_data->mutex);
event_data->listeners.clear();
} | O1 | cpp | emittra::Emittra::remove_all_listeners(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rdx
movq %rdi, %rsi
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x4c50
movq (%rbx), %rbx
leaq 0x280(%rbx), %rax
leaq 0x18(%rsp), %rdi
movq %rax, (%rdi)
movb $0x0, 0x8(%rdi)
callq 0x78e6
leaq 0x18(%rsp), %r14
movb $0x1, 0x8(%r14)
movq (%rbx), %rsi
movq %rbx, %rdi
callq 0x935a
movq %r14, %rdi
callq 0x656c
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x56e1
callq 0x4352
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x56fb
callq 0x4352
movq %rbx, %rdi
callq 0x3450
nop
| _ZN7emittra7Emittra20remove_all_listenersERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r14
push rbx
sub rsp, 28h
mov rdx, rsi
mov rsi, rdi
lea rbx, [rsp+38h+var_30]
mov rdi, rbx
call _ZN7emittra7Emittra24get_or_create_event_dataERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; emittra::Emittra::get_or_create_event_data(std::string const&)
mov rbx, [rbx]
lea rax, [rbx+280h]
lea rdi, [rsp+38h+var_20]
mov [rdi], rax
mov byte ptr [rdi+8], 0
call _ZNSt11unique_lockISt12shared_mutexE4lockEv; std::unique_lock<std::shared_mutex>::lock(void)
lea r14, [rsp+38h+var_20]
mov byte ptr [r14+8], 1
mov rsi, [rbx]
mov rdi, rbx
call _ZNSt6vectorISt8functionIFvRKS0_IFvRKSt3anyEERKS_IS1_SaIS1_EEEESaISD_EE15_M_erase_at_endEPSD_; std::vector<std::function<void ()(std::function const&<void ()(std::any const&)>,std::vector const&<std::function const,std::allocator<std::function const>>)>>::_M_erase_at_end(std::function<void ()(std::function const&<void ()(std::any const&)>,std::vector const&<std::function const,std::allocator<std::function const>>)>*)
mov rdi, r14
call _ZNSt11unique_lockISt12shared_mutexED2Ev; std::unique_lock<std::shared_mutex>::~unique_lock()
mov rdi, [rsp+38h+var_28]
test rdi, rdi
jz short loc_56E1
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_56E1:
add rsp, 28h
pop rbx
pop r14
retn
mov rbx, rax
mov rdi, [rsp+arg_8]
test rdi, rdi
jz short loc_56FB
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_56FB:
mov rdi, rbx
call __Unwind_Resume
| long long emittra::Emittra::remove_all_listeners(std::__shared_mutex_pthread *a1, long long a2)
{
_QWORD *v2; // rbx
long long result; // rax
_QWORD *v4; // [rsp+8h] [rbp-30h] BYREF
volatile signed __int32 *v5; // [rsp+10h] [rbp-28h]
_QWORD *v6; // [rsp+18h] [rbp-20h] BYREF
char v7; // [rsp+20h] [rbp-18h]
emittra::Emittra::get_or_create_event_data(&v4, a1, a2);
v2 = v4;
v6 = v4 + 80;
v7 = 0;
std::unique_lock<std::shared_mutex>::lock(&v6);
v7 = 1;
std::vector<std::function<void ()(std::function const&<void ()(std::any const&)>,std::vector const&<std::function const,std::allocator<std::function const>>)>>::_M_erase_at_end(
v2,
*v2);
result = std::unique_lock<std::shared_mutex>::~unique_lock(&v6);
if ( v5 )
return std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v5);
return result;
}
| remove_all_listeners:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RDX,RSI
MOV RSI,RDI
LEA RBX,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00104c50
MOV RBX,qword ptr [RBX]
LEA RAX,[RBX + 0x280]
LEA RDI,[RSP + 0x18]
MOV qword ptr [RDI],RAX
MOV byte ptr [RDI + 0x8],0x0
LAB_001056b0:
CALL 0x001078e6
LAB_001056b5:
LEA R14,[RSP + 0x18]
MOV byte ptr [R14 + 0x8],0x1
MOV RSI,qword ptr [RBX]
MOV RDI,RBX
CALL 0x0010935a
MOV RDI,R14
CALL 0x0010656c
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x001056e1
CALL 0x00104352
LAB_001056e1:
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* emittra::Emittra::remove_all_listeners(std::__cxx11::string const&) */
void emittra::Emittra::remove_all_listeners(string *param_1)
{
vector<std::function<void(std::function<void(std::any_const&)>const&,std::vector<std::any,std::allocator<std::any>>const&)>,std::allocator<std::function<void(std::function<void(std::any_const&)>const&,std::vector<std::any,std::allocator<std::any>>const&)>>>
*local_30;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_28;
vector<std::function<void(std::function<void(std::any_const&)>const&,std::vector<std::any,std::allocator<std::any>>const&)>,std::allocator<std::function<void(std::function<void(std::any_const&)>const&,std::vector<std::any,std::allocator<std::any>>const&)>>>
*local_20;
int1 local_18;
get_or_create_event_data((string *)&local_30);
local_20 = local_30 + 0x280;
local_18 = 0;
/* try { // try from 001056b0 to 001056b4 has its CatchHandler @ 001056e9 */
std::unique_lock<std::shared_mutex>::lock((unique_lock<std::shared_mutex> *)&local_20);
local_18 = 1;
std::
vector<std::function<void(std::function<void(std::any_const&)>const&,std::vector<std::any,std::allocator<std::any>>const&)>,std::allocator<std::function<void(std::function<void(std::any_const&)>const&,std::vector<std::any,std::allocator<std::any>>const&)>>>
::_M_erase_at_end(local_30,*(function **)local_30);
std::unique_lock<std::shared_mutex>::~unique_lock((unique_lock<std::shared_mutex> *)&local_20);
if (local_28 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_28);
}
return;
}
| |
24,236 | emittra::Emittra::remove_all_listeners(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | angrymouse[P]emittra/src/emittra.cpp | void Emittra::remove_all_listeners(const std::string& event_name) {
auto event_data = get_or_create_event_data(event_name);
std::unique_lock<std::shared_mutex> lock(event_data->mutex);
event_data->listeners.clear();
} | O2 | cpp | emittra::Emittra::remove_all_listeners(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rdx
movq %rdi, %rsi
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x4932
movl $0x280, %esi # imm = 0x280
addq (%rbx), %rsi
leaq 0x10(%rsp), %rdi
callq 0x5d80
leaq 0x8(%rsp), %rbx
movq -0x8(%rbx), %rdi
callq 0x5ed4
leaq 0x10(%rsp), %rdi
callq 0x5d96
movq %rbx, %rdi
callq 0x3f84
addq $0x20, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3f84
movq %rbx, %rdi
callq 0x3440
nop
| _ZN7emittra7Emittra20remove_all_listenersERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbx
sub rsp, 20h
mov rdx, rsi
mov rsi, rdi
mov rbx, rsp
mov rdi, rbx
call _ZN7emittra7Emittra24get_or_create_event_dataERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; emittra::Emittra::get_or_create_event_data(std::string const&)
mov esi, 280h
add rsi, [rbx]
lea rdi, [rsp+28h+var_18]
call _ZNSt11unique_lockISt12shared_mutexEC2ERS0_; std::unique_lock<std::shared_mutex>::unique_lock(std::shared_mutex&)
lea rbx, [rsp+28h+var_20]
mov rdi, [rbx-8]
call _ZNSt6vectorISt8functionIFvRKS0_IFvRKSt3anyEERKS_IS1_SaIS1_EEEESaISD_EE5clearEv; std::vector<std::function<void ()(std::function const&<void ()(std::any const&)>,std::vector const&<std::function const,std::allocator<std::function const>>)>>::clear(void)
lea rdi, [rsp+28h+var_18]
call _ZNSt11unique_lockISt12shared_mutexED2Ev; std::unique_lock<std::shared_mutex>::~unique_lock()
mov rdi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
add rsp, 20h
pop rbx
retn
mov rbx, rax
lea rdi, [rsp+arg_0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, rbx
call __Unwind_Resume
| long long emittra::Emittra::remove_all_listeners(std::__shared_mutex_pthread *a1, long long a2)
{
long long v3; // [rsp+0h] [rbp-28h] BYREF
long long v4; // [rsp+8h] [rbp-20h] BYREF
_BYTE v5[24]; // [rsp+10h] [rbp-18h] BYREF
emittra::Emittra::get_or_create_event_data((long long)&v3, a1, a2);
std::unique_lock<std::shared_mutex>::unique_lock(v5, v3 + 640);
std::vector<std::function<void ()(std::function const&<void ()(std::any const&)>,std::vector const&<std::function const,std::allocator<std::function const>>)>>::clear(v3);
std::unique_lock<std::shared_mutex>::~unique_lock(v5);
return std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v4);
}
| remove_all_listeners:
PUSH RBX
SUB RSP,0x20
MOV RDX,RSI
MOV RSI,RDI
MOV RBX,RSP
MOV RDI,RBX
CALL 0x00104932
MOV ESI,0x280
ADD RSI,qword ptr [RBX]
LAB_00105224:
LEA RDI,[RSP + 0x10]
CALL 0x00105d80
LAB_0010522e:
LEA RBX,[RSP + 0x8]
MOV RDI,qword ptr [RBX + -0x8]
CALL 0x00105ed4
LEA RDI,[RSP + 0x10]
CALL 0x00105d96
MOV RDI,RBX
CALL 0x00103f84
ADD RSP,0x20
POP RBX
RET
|
/* emittra::Emittra::remove_all_listeners(std::__cxx11::string const&) */
void emittra::Emittra::remove_all_listeners(string *param_1)
{
vector<std::function<void(std::function<void(std::any_const&)>const&,std::vector<std::any,std::allocator<std::any>>const&)>,std::allocator<std::function<void(std::function<void(std::any_const&)>const&,std::vector<std::any,std::allocator<std::any>>const&)>>>
*local_28;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_20 [8];
unique_lock<std::shared_mutex> local_18 [16];
get_or_create_event_data((string *)&local_28);
/* try { // try from 00105224 to 0010522d has its CatchHandler @ 00105254 */
std::unique_lock<std::shared_mutex>::unique_lock(local_18,(shared_mutex *)(local_28 + 0x280));
std::
vector<std::function<void(std::function<void(std::any_const&)>const&,std::vector<std::any,std::allocator<std::any>>const&)>,std::allocator<std::function<void(std::function<void(std::any_const&)>const&,std::vector<std::any,std::allocator<std::any>>const&)>>>
::clear(local_28);
std::unique_lock<std::shared_mutex>::~unique_lock(local_18);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_20);
return;
}
| |
24,237 | getTimezoneOffset | bluesky950520[P]quickjs/quickjs.c | static int getTimezoneOffset(int64_t time) {
#if defined(_WIN32)
DWORD r;
TIME_ZONE_INFORMATION t;
r = GetTimeZoneInformation(&t);
if (r == TIME_ZONE_ID_INVALID)
return 0;
if (r == TIME_ZONE_ID_DAYLIGHT)
return (int)(t.Bias + t.DaylightBias);
return (int)t.Bias;
#else
time_t ti;
struct tm tm;
time /= 1000; /* convert to seconds */
if (sizeof(time_t) == 4) {
/* on 32-bit systems, we need to clamp the time value to the
range of `time_t`. This is better than truncating values to
32 bits and hopefully provides the same result as 64-bit
implementation of localtime_r.
*/
if ((time_t)-1 < 0) {
if (time < INT32_MIN) {
time = INT32_MIN;
} else if (time > INT32_MAX) {
time = INT32_MAX;
}
} else {
if (time < 0) {
time = 0;
} else if (time > UINT32_MAX) {
time = UINT32_MAX;
}
}
}
ti = time;
localtime_r(&ti, &tm);
#ifdef NO_TM_GMTOFF
struct tm gmt;
gmtime_r(&ti, &gmt);
/* disable DST adjustment on the local tm struct */
tm.tm_isdst = 0;
return (int)difftime(mktime(&gmt), mktime(&tm)) / 60;
#else
return -tm.tm_gmtoff / 60;
#endif /* NO_TM_GMTOFF */
#endif
} | O2 | c | getTimezoneOffset:
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rax
movl $0x3e8, %ecx # imm = 0x3E8
cqto
idivq %rcx
movq %rsp, %rdi
movq %rax, (%rdi)
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0xe0f0
movq 0x28(%rbx), %rax
pushq $-0x3c
popq %rcx
cqto
idivq %rcx
addq $0x40, %rsp
popq %rbx
retq
| getTimezoneOffset:
push rbx
sub rsp, 40h
mov rax, rdi
mov ecx, 3E8h
cqo
idiv rcx
mov rdi, rsp
mov [rdi], rax
lea rbx, [rsp+48h+var_40]
mov rsi, rbx
call _localtime_r
mov rax, [rbx+28h]
push 0FFFFFFFFFFFFFFC4h
pop rcx
cqo
idiv rcx
add rsp, 40h
pop rbx
retn
| long long getTimezoneOffset(long long a1)
{
long long v2; // [rsp+0h] [rbp-48h] BYREF
char v3; // [rsp+8h] [rbp-40h] BYREF
long long v4; // [rsp+30h] [rbp-18h]
v2 = a1 / 1000;
localtime_r(&v2, &v3, a1 % 1000);
return v4 / -60;
}
| getTimezoneOffset:
PUSH RBX
SUB RSP,0x40
MOV RAX,RDI
MOV ECX,0x3e8
CQO
IDIV RCX
MOV RDI,RSP
MOV qword ptr [RDI],RAX
LEA RBX,[RSP + 0x8]
MOV RSI,RBX
CALL 0x0010e0f0
MOV RAX,qword ptr [RBX + 0x28]
PUSH -0x3c
POP RCX
CQO
IDIV RCX
ADD RSP,0x40
POP RBX
RET
|
long getTimezoneOffset(long param_1)
{
long local_48;
tm local_40;
local_48 = param_1 / 1000;
localtime_r(&local_48,&local_40);
return local_40.tm_gmtoff / -0x3c;
}
| |
24,238 | count_square | eloqsql/storage/maria/ma_rt_split.c | static double count_square(const double *a, int n_dim)
{
const double *end= a + n_dim * 2;
double square= 1.0;
do
{
square *= a[1] - a[0];
a+= 2;
} while (a != end);
return square;
} | O0 | c | count_square:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movsd 0xd8ce6(%rip), %xmm0 # 0x15f860
movsd %xmm0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movsd 0x8(%rax), %xmm0
movq -0x8(%rbp), %rax
subsd (%rax), %xmm0
mulsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq -0x18(%rbp), %rax
jne 0x86b7f
movsd -0x20(%rbp), %xmm0
popq %rbp
retq
nopw (%rax,%rax)
| count_square:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov rax, [rbp+var_8]
mov ecx, [rbp+var_C]
shl ecx, 1
movsxd rcx, ecx
shl rcx, 3
add rax, rcx
mov [rbp+var_18], rax
movsd xmm0, cs:qword_15F860
movsd [rbp+var_20], xmm0
loc_86B7F:
mov rax, [rbp+var_8]
movsd xmm0, qword ptr [rax+8]
mov rax, [rbp+var_8]
subsd xmm0, qword ptr [rax]
mulsd xmm0, [rbp+var_20]
movsd [rbp+var_20], xmm0
mov rax, [rbp+var_8]
add rax, 10h
mov [rbp+var_8], rax
mov rax, [rbp+var_8]
cmp rax, [rbp+var_18]
jnz short loc_86B7F
movsd xmm0, [rbp+var_20]
pop rbp
retn
| double count_square(double *a1, int a2)
{
double v3; // [rsp+0h] [rbp-20h]
double *v4; // [rsp+18h] [rbp-8h]
v4 = a1;
v3 = 1.0;
do
{
v3 = (v4[1] - *v4) * v3;
v4 += 2;
}
while ( v4 != &a1[2 * a2] );
return v3;
}
| count_square:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0xc]
SHL ECX,0x1
MOVSXD RCX,ECX
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOVSD XMM0,qword ptr [0x0025f860]
MOVSD qword ptr [RBP + -0x20],XMM0
LAB_00186b7f:
MOV RAX,qword ptr [RBP + -0x8]
MOVSD XMM0,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x8]
SUBSD XMM0,qword ptr [RAX]
MULSD XMM0,qword ptr [RBP + -0x20]
MOVSD qword ptr [RBP + -0x20],XMM0
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x10
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RBP + -0x18]
JNZ 0x00186b7f
MOVSD XMM0,qword ptr [RBP + -0x20]
POP RBP
RET
|
double count_square(double *param_1,int param_2)
{
double local_28;
double *local_10;
local_28 = DAT_0025f860;
local_10 = param_1;
do {
local_28 = (local_10[1] - *local_10) * local_28;
local_10 = local_10 + 2;
} while (local_10 != param_1 + (param_2 << 1));
return local_28;
}
| |
24,239 | testing::internal::(anonymous namespace)::UnitTestFilter::MatchesName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const | AlayaLite/build_O3/_deps/googletest-src/googletest/src/gtest.cc | bool MatchesName(const std::string& name) const {
return exact_match_patterns_.find(name) != exact_match_patterns_.end() ||
std::any_of(glob_patterns_.begin(), glob_patterns_.end(),
[&name](const std::string& pattern) {
return PatternMatchesString(
name, pattern.c_str(),
pattern.c_str() + pattern.size());
});
} | O3 | cpp | testing::internal::(anonymous namespace)::UnitTestFilter::MatchesName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
addq $0x18, %rdi
callq 0x7886a
movq %rax, %rcx
movb $0x1, %al
testq %rcx, %rcx
jne 0x5d109
movq (%rbx), %r12
movq 0x8(%rbx), %rcx
movq (%r14), %rbx
movq 0x8(%r14), %r14
movq %rcx, %rax
subq %r12, %rax
movq %rax, %rbp
sarq $0x7, %rbp
testq %rbp, %rbp
jle 0x5d083
movq %rcx, (%rsp)
andq $-0x80, %rax
movq %rax, %r15
addq %r12, %r15
incq %rbp
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x71dfa
testb %al, %al
jne 0x5d0ba
leaq 0x20(%r12), %r13
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x71dfa
testb %al, %al
jne 0x5d0bd
leaq 0x40(%r12), %r13
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x71dfa
testb %al, %al
jne 0x5d0bd
leaq 0x60(%r12), %r13
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x71dfa
testb %al, %al
jne 0x5d0bd
subq $-0x80, %r12
decq %rbp
cmpq $0x1, %rbp
jg 0x5d00b
movq (%rsp), %rcx
movq %rcx, %rax
subq %r15, %rax
jmp 0x5d086
movq %r12, %r15
sarq $0x5, %rax
cmpq $0x1, %rax
je 0x5d0e0
cmpq $0x2, %rax
je 0x5d0c3
movq %rcx, %r13
cmpq $0x3, %rax
jne 0x5d103
movq %rcx, %r12
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x71dfa
testb %al, %al
jne 0x5d0d8
addq $0x20, %r15
jmp 0x5d0c6
movq %r12, %r13
movq (%rsp), %rcx
jmp 0x5d103
movq %rcx, %r12
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x71dfa
testb %al, %al
je 0x5d0e5
movq %r15, %r13
movq %r12, %rcx
jmp 0x5d103
movq %rcx, %r12
jmp 0x5d0e9
addq $0x20, %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x71dfa
testb %al, %al
movq %r12, %rcx
cmoveq %r12, %r15
movq %r15, %r13
cmpq %rcx, %r13
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZNK7testing8internal12_GLOBAL__N_114UnitTestFilter11MatchesNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
mov rbx, rdi
add rdi, 18h
call _ZNKSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE4findERKS5_; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::find(std::string const&)
mov rcx, rax
mov al, 1
test rcx, rcx
jnz loc_5D109
mov r12, [rbx]
mov rcx, [rbx+8]
mov rbx, [r14]
mov r14, [r14+8]
mov rax, rcx
sub rax, r12
mov rbp, rax
sar rbp, 7
test rbp, rbp
jle loc_5D083
mov [rsp+38h+var_38], rcx
and rax, 0FFFFFFFFFFFFFF80h
mov r15, rax
add r15, r12
inc rbp
loc_5D00B:
mov rdi, rbx
mov rsi, r14
mov rdx, r12
call _ZN9__gnu_cxx5__ops10_Iter_predIZNK7testing8internal12_GLOBAL__N_114UnitTestFilter11MatchesNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEUlSD_E_EclINS_17__normal_iteratorIPSC_St6vectorISB_SaISB_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<testing::internal::`anonymous namespace'::UnitTestFilter::MatchesName(std::string const&)::{lambda(std::string const&)#1}>::operator()<__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>>(__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>)
test al, al
jnz loc_5D0BA
lea r13, [r12+20h]
mov rdi, rbx
mov rsi, r14
mov rdx, r13
call _ZN9__gnu_cxx5__ops10_Iter_predIZNK7testing8internal12_GLOBAL__N_114UnitTestFilter11MatchesNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEUlSD_E_EclINS_17__normal_iteratorIPSC_St6vectorISB_SaISB_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<testing::internal::`anonymous namespace'::UnitTestFilter::MatchesName(std::string const&)::{lambda(std::string const&)#1}>::operator()<__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>>(__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>)
test al, al
jnz loc_5D0BD
lea r13, [r12+40h]
mov rdi, rbx
mov rsi, r14
mov rdx, r13
call _ZN9__gnu_cxx5__ops10_Iter_predIZNK7testing8internal12_GLOBAL__N_114UnitTestFilter11MatchesNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEUlSD_E_EclINS_17__normal_iteratorIPSC_St6vectorISB_SaISB_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<testing::internal::`anonymous namespace'::UnitTestFilter::MatchesName(std::string const&)::{lambda(std::string const&)#1}>::operator()<__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>>(__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>)
test al, al
jnz short loc_5D0BD
lea r13, [r12+60h]
mov rdi, rbx
mov rsi, r14
mov rdx, r13
call _ZN9__gnu_cxx5__ops10_Iter_predIZNK7testing8internal12_GLOBAL__N_114UnitTestFilter11MatchesNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEUlSD_E_EclINS_17__normal_iteratorIPSC_St6vectorISB_SaISB_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<testing::internal::`anonymous namespace'::UnitTestFilter::MatchesName(std::string const&)::{lambda(std::string const&)#1}>::operator()<__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>>(__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>)
test al, al
jnz short loc_5D0BD
sub r12, 0FFFFFFFFFFFFFF80h
dec rbp
cmp rbp, 1
jg short loc_5D00B
mov rcx, [rsp+38h+var_38]
mov rax, rcx
sub rax, r15
jmp short loc_5D086
loc_5D083:
mov r15, r12
loc_5D086:
sar rax, 5
cmp rax, 1
jz short loc_5D0E0
cmp rax, 2
jz short loc_5D0C3
mov r13, rcx
cmp rax, 3
jnz short loc_5D103
mov r12, rcx
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call _ZN9__gnu_cxx5__ops10_Iter_predIZNK7testing8internal12_GLOBAL__N_114UnitTestFilter11MatchesNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEUlSD_E_EclINS_17__normal_iteratorIPSC_St6vectorISB_SaISB_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<testing::internal::`anonymous namespace'::UnitTestFilter::MatchesName(std::string const&)::{lambda(std::string const&)#1}>::operator()<__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>>(__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>)
test al, al
jnz short loc_5D0D8
add r15, 20h ; ' '
jmp short loc_5D0C6
loc_5D0BA:
mov r13, r12
loc_5D0BD:
mov rcx, [rsp+38h+var_38]
jmp short loc_5D103
loc_5D0C3:
mov r12, rcx
loc_5D0C6:
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call _ZN9__gnu_cxx5__ops10_Iter_predIZNK7testing8internal12_GLOBAL__N_114UnitTestFilter11MatchesNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEUlSD_E_EclINS_17__normal_iteratorIPSC_St6vectorISB_SaISB_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<testing::internal::`anonymous namespace'::UnitTestFilter::MatchesName(std::string const&)::{lambda(std::string const&)#1}>::operator()<__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>>(__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>)
test al, al
jz short loc_5D0E5
loc_5D0D8:
mov r13, r15
mov rcx, r12
jmp short loc_5D103
loc_5D0E0:
mov r12, rcx
jmp short loc_5D0E9
loc_5D0E5:
add r15, 20h ; ' '
loc_5D0E9:
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call _ZN9__gnu_cxx5__ops10_Iter_predIZNK7testing8internal12_GLOBAL__N_114UnitTestFilter11MatchesNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEUlSD_E_EclINS_17__normal_iteratorIPSC_St6vectorISB_SaISB_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<testing::internal::`anonymous namespace'::UnitTestFilter::MatchesName(std::string const&)::{lambda(std::string const&)#1}>::operator()<__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>>(__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>)
test al, al
mov rcx, r12
cmovz r15, r12
mov r13, r15
loc_5D103:
cmp r13, rcx
setnz al
loc_5D109:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| char testing::internal::`anonymous namespace'::UnitTestFilter::MatchesName(long long *a1, long long *a2)
{
long long v2; // rcx
char result; // al
long long v4; // r12
long long v5; // rcx
long long v6; // rbx
long long v7; // r14
long long v8; // rax
long long v9; // r15
long long v10; // rbp
long long v11; // r13
long long v12; // rax
long long v13; // r12
char v14; // al
long long v15; // [rsp+0h] [rbp-38h]
v2 = std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::find(a1 + 3);
result = 1;
if ( !v2 )
{
v4 = *a1;
v5 = a1[1];
v6 = *a2;
v7 = a2[1];
v8 = v5 - *a1;
if ( v8 >> 7 > 0 )
{
v15 = a1[1];
v9 = v4 + (v8 & 0xFFFFFFFFFFFFFF80LL);
v10 = (v8 >> 7) + 1;
while ( !(unsigned __int8)__gnu_cxx::__ops::_Iter_pred<testing::internal::`anonymous namespace'::UnitTestFilter::MatchesName(std::string const&)::{lambda(std::string const&)#1}>::operator()<__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>>(
v6,
v7,
v4) )
{
v11 = v4 + 32;
if ( (unsigned __int8)__gnu_cxx::__ops::_Iter_pred<testing::internal::`anonymous namespace'::UnitTestFilter::MatchesName(std::string const&)::{lambda(std::string const&)#1}>::operator()<__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>>(
v6,
v7,
v4 + 32) )
goto LABEL_17;
v11 = v4 + 64;
if ( (unsigned __int8)__gnu_cxx::__ops::_Iter_pred<testing::internal::`anonymous namespace'::UnitTestFilter::MatchesName(std::string const&)::{lambda(std::string const&)#1}>::operator()<__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>>(
v6,
v7,
v4 + 64) )
goto LABEL_17;
v11 = v4 + 96;
if ( (unsigned __int8)__gnu_cxx::__ops::_Iter_pred<testing::internal::`anonymous namespace'::UnitTestFilter::MatchesName(std::string const&)::{lambda(std::string const&)#1}>::operator()<__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>>(
v6,
v7,
v4 + 96) )
goto LABEL_17;
v4 += 128LL;
if ( --v10 <= 1 )
{
v5 = v15;
v8 = v15 - v9;
goto LABEL_11;
}
}
v11 = v4;
LABEL_17:
v5 = v15;
return v11 != v5;
}
v9 = *a1;
LABEL_11:
v12 = v8 >> 5;
if ( v12 == 1 )
{
v13 = v5;
}
else
{
if ( v12 == 2 )
{
v13 = v5;
}
else
{
v11 = v5;
if ( v12 != 3 )
return v11 != v5;
v13 = v5;
if ( (unsigned __int8)__gnu_cxx::__ops::_Iter_pred<testing::internal::`anonymous namespace'::UnitTestFilter::MatchesName(std::string const&)::{lambda(std::string const&)#1}>::operator()<__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>>(
v6,
v7,
v9) )
{
LABEL_20:
v11 = v9;
v5 = v13;
return v11 != v5;
}
v9 += 32LL;
}
if ( (unsigned __int8)__gnu_cxx::__ops::_Iter_pred<testing::internal::`anonymous namespace'::UnitTestFilter::MatchesName(std::string const&)::{lambda(std::string const&)#1}>::operator()<__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>>(
v6,
v7,
v9) )
goto LABEL_20;
v9 += 32LL;
}
v14 = __gnu_cxx::__ops::_Iter_pred<testing::internal::`anonymous namespace'::UnitTestFilter::MatchesName(std::string const&)::{lambda(std::string const&)#1}>::operator()<__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>>(
v6,
v7,
v9);
v5 = v13;
if ( !v14 )
v9 = v13;
v11 = v9;
return v11 != v5;
}
return result;
}
| MatchesName:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
ADD RDI,0x18
CALL 0x0017886a
MOV RCX,RAX
MOV AL,0x1
TEST RCX,RCX
JNZ 0x0015d109
MOV R12,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x8]
MOV RBX,qword ptr [R14]
MOV R14,qword ptr [R14 + 0x8]
MOV RAX,RCX
SUB RAX,R12
MOV RBP,RAX
SAR RBP,0x7
TEST RBP,RBP
JLE 0x0015d083
MOV qword ptr [RSP],RCX
AND RAX,-0x80
MOV R15,RAX
ADD R15,R12
INC RBP
LAB_0015d00b:
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R12
CALL 0x00171dfa
TEST AL,AL
JNZ 0x0015d0ba
LEA R13,[R12 + 0x20]
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R13
CALL 0x00171dfa
TEST AL,AL
JNZ 0x0015d0bd
LEA R13,[R12 + 0x40]
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R13
CALL 0x00171dfa
TEST AL,AL
JNZ 0x0015d0bd
LEA R13,[R12 + 0x60]
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R13
CALL 0x00171dfa
TEST AL,AL
JNZ 0x0015d0bd
SUB R12,-0x80
DEC RBP
CMP RBP,0x1
JG 0x0015d00b
MOV RCX,qword ptr [RSP]
MOV RAX,RCX
SUB RAX,R15
JMP 0x0015d086
LAB_0015d083:
MOV R15,R12
LAB_0015d086:
SAR RAX,0x5
CMP RAX,0x1
JZ 0x0015d0e0
CMP RAX,0x2
JZ 0x0015d0c3
MOV R13,RCX
CMP RAX,0x3
JNZ 0x0015d103
MOV R12,RCX
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x00171dfa
TEST AL,AL
JNZ 0x0015d0d8
ADD R15,0x20
JMP 0x0015d0c6
LAB_0015d0ba:
MOV R13,R12
LAB_0015d0bd:
MOV RCX,qword ptr [RSP]
JMP 0x0015d103
LAB_0015d0c3:
MOV R12,RCX
LAB_0015d0c6:
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x00171dfa
TEST AL,AL
JZ 0x0015d0e5
LAB_0015d0d8:
MOV R13,R15
MOV RCX,R12
JMP 0x0015d103
LAB_0015d0e0:
MOV R12,RCX
JMP 0x0015d0e9
LAB_0015d0e5:
ADD R15,0x20
LAB_0015d0e9:
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x00171dfa
TEST AL,AL
MOV RCX,R12
CMOVZ R15,R12
MOV R13,R15
LAB_0015d103:
CMP R13,RCX
SETNZ AL
LAB_0015d109:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* testing::internal::(anonymous namespace)::UnitTestFilter::MatchesName(std::__cxx11::string
const&) const */
bool __thiscall
testing::internal::(anonymous_namespace)::UnitTestFilter::MatchesName
(UnitTestFilter *this,string *param_1)
{
long lVar1;
_Iter_pred<testing::internal::(anonymous_namespace)::UnitTestFilter::MatchesName(std::__cxx11::string_const&)const::_lambda(std::__cxx11::string_const&)_1_>
*p_Var2;
int8 uVar3;
bool bVar4;
long lVar5;
ulong uVar6;
long lVar7;
long lVar8;
long lVar9;
lVar5 = std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::find((_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
*)(this + 0x18),param_1);
if (lVar5 != 0) {
return true;
}
lVar5 = *(long *)this;
lVar1 = *(long *)(this + 8);
p_Var2 = *(_Iter_pred<testing::internal::(anonymous_namespace)::UnitTestFilter::MatchesName(std::__cxx11::string_const&)const::_lambda(std::__cxx11::string_const&)_1_>
**)param_1;
uVar3 = *(int8 *)(param_1 + 8);
uVar6 = lVar1 - lVar5;
if (0 < (long)uVar6 >> 7) {
lVar9 = (uVar6 & 0xffffffffffffff80) + lVar5;
lVar7 = ((long)uVar6 >> 7) + 1;
do {
bVar4 = __gnu_cxx::__ops::
_Iter_pred<testing::internal::(anonymous_namespace)::UnitTestFilter::MatchesName(std::__cxx11::string_const&)const::{lambda(std::__cxx11::string_const&)#1}>
::operator()(p_Var2,uVar3,lVar5);
lVar8 = lVar5;
if (bVar4) goto LAB_0015d103;
bVar4 = __gnu_cxx::__ops::
_Iter_pred<testing::internal::(anonymous_namespace)::UnitTestFilter::MatchesName(std::__cxx11::string_const&)const::{lambda(std::__cxx11::string_const&)#1}>
::operator()(p_Var2,uVar3,lVar5 + 0x20);
lVar8 = lVar5 + 0x20;
if (bVar4) goto LAB_0015d103;
bVar4 = __gnu_cxx::__ops::
_Iter_pred<testing::internal::(anonymous_namespace)::UnitTestFilter::MatchesName(std::__cxx11::string_const&)const::{lambda(std::__cxx11::string_const&)#1}>
::operator()(p_Var2,uVar3,lVar5 + 0x40);
lVar8 = lVar5 + 0x40;
if (bVar4) goto LAB_0015d103;
bVar4 = __gnu_cxx::__ops::
_Iter_pred<testing::internal::(anonymous_namespace)::UnitTestFilter::MatchesName(std::__cxx11::string_const&)const::{lambda(std::__cxx11::string_const&)#1}>
::operator()(p_Var2,uVar3,lVar5 + 0x60);
lVar8 = lVar5 + 0x60;
if (bVar4) goto LAB_0015d103;
lVar5 = lVar5 + 0x80;
lVar7 = lVar7 + -1;
} while (1 < lVar7);
uVar6 = lVar1 - lVar9;
lVar5 = lVar9;
}
lVar7 = (long)uVar6 >> 5;
if (lVar7 != 1) {
lVar8 = lVar5;
if (lVar7 != 2) {
lVar8 = lVar1;
if ((lVar7 != 3) ||
(bVar4 = __gnu_cxx::__ops::
_Iter_pred<testing::internal::(anonymous_namespace)::UnitTestFilter::MatchesName(std::__cxx11::string_const&)const::{lambda(std::__cxx11::string_const&)#1}>
::operator()(p_Var2,uVar3,lVar5), lVar8 = lVar5, bVar4)) goto LAB_0015d103;
lVar8 = lVar5 + 0x20;
}
bVar4 = __gnu_cxx::__ops::
_Iter_pred<testing::internal::(anonymous_namespace)::UnitTestFilter::MatchesName(std::__cxx11::string_const&)const::{lambda(std::__cxx11::string_const&)#1}>
::operator()(p_Var2,uVar3,lVar8);
if (bVar4) goto LAB_0015d103;
lVar5 = lVar8 + 0x20;
}
bVar4 = __gnu_cxx::__ops::
_Iter_pred<testing::internal::(anonymous_namespace)::UnitTestFilter::MatchesName(std::__cxx11::string_const&)const::{lambda(std::__cxx11::string_const&)#1}>
::operator()(p_Var2,uVar3,lVar5);
lVar8 = lVar5;
if (!bVar4) {
lVar8 = lVar1;
}
LAB_0015d103:
return lVar8 != lVar1;
}
| |
24,240 | nglog::tools::AlsoErrorWrite(nglog::LogSeverity, char const*, char const*) | ng-log[P]ng-log/src/utilities.cc | void AlsoErrorWrite(LogSeverity severity, const char* tag,
const char* message) noexcept {
#if defined(NGLOG_OS_WINDOWS)
(void)severity;
(void)tag;
// On Windows, also output to the debugger
::OutputDebugStringA(message);
#elif defined(NGLOG_OS_ANDROID)
constexpr int android_log_levels[] = {
ANDROID_LOG_INFO,
ANDROID_LOG_WARN,
ANDROID_LOG_ERROR,
ANDROID_LOG_FATAL,
};
__android_log_write(android_log_levels[severity], tag, message);
#else
(void)severity;
(void)tag;
(void)message;
#endif
} | O1 | cpp | nglog::tools::AlsoErrorWrite(nglog::LogSeverity, char const*, char const*):
retq
| _ZN5nglog5tools14AlsoErrorWriteENS_11LogSeverityEPKcS3_:
retn
| void nglog::tools::AlsoErrorWrite()
{
;
}
| AlsoErrorWrite:
RET
|
/* nglog::tools::AlsoErrorWrite(nglog::LogSeverity, char const*, char const*) */
void nglog::tools::AlsoErrorWrite(void)
{
return;
}
| |
24,241 | SchemaConverter::SchemaConverter(std::function<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)> const&, bool, bool) | monkey531[P]llama/common/json-schema-to-grammar.cpp | SchemaConverter(
const std::function<json(const std::string &)> & fetch_json,
bool dotall,
bool compact_spaces)
: _fetch_json(fetch_json), _dotall(dotall)
{
_rules["space"] = compact_spaces ? "\" \"?" : SPACE_RULE;
} | O2 | cpp | SchemaConverter::SchemaConverter(std::function<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)> const&, bool, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %ecx, %ebp
movl %edx, %r14d
movq %rdi, %rbx
callq 0x8d1c0
movb %r14b, 0x20(%rbx)
leaq 0x30(%rbx), %rax
andl $0x0, 0x30(%rbx)
andq $0x0, 0x38(%rbx)
movq %rax, 0x40(%rbx)
movq %rax, 0x48(%rbx)
andq $0x0, 0x50(%rbx)
leaq 0x28(%rbx), %r14
leaq 0x88(%rbx), %rax
movq %rax, 0x58(%rbx)
pushq $0x1
popq %rax
movq %rax, 0x60(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x68(%rbx)
movl $0x3f800000, %ecx # imm = 0x3F800000
movl %ecx, 0x78(%rbx)
movups %xmm0, 0x80(%rbx)
leaq 0xc0(%rbx), %rdx
movq %rdx, 0x90(%rbx)
movq %rax, 0x98(%rbx)
movups %xmm0, 0xa0(%rbx)
movl %ecx, 0xb0(%rbx)
movups %xmm0, 0xb8(%rbx)
movups %xmm0, 0xc8(%rbx)
movups %xmm0, 0xd8(%rbx)
movups %xmm0, 0xe8(%rbx)
testl %ebp, %ebp
je 0x8cbe9
leaq 0x2bc48(%rip), %rsi # 0xb8820
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x27686
jmp 0x8cbfa
leaq 0x72690(%rip), %rsi # 0xff280
leaq 0x8(%rsp), %rdi
callq 0x23c30
leaq 0x2be42(%rip), %rsi # 0xb8a43
leaq 0x28(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0x27686
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x8d206
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x234e0
leaq 0x28(%rsp), %rdi
callq 0x241f8
leaq 0x8(%rsp), %rdi
callq 0x241f8
testb %bpl, %bpl
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
jmp 0x8cc67
movq %rax, %r15
jmp 0x8cc71
movq %rax, %r15
leaq 0x28(%rsp), %rdi
callq 0x241f8
leaq 0x8(%rsp), %rdi
callq 0x241f8
leaq 0x58(%rbx), %r12
leaq 0x90(%rbx), %r13
testb %bpl, %bpl
leaq 0xe0(%rbx), %rdi
leaq 0xc8(%rbx), %rbp
callq 0x276c2
movq %rbp, %rdi
callq 0x276c2
movq %r13, %rdi
callq 0x5c76a
movq %r12, %rdi
callq 0x8d654
movq %r14, %rdi
callq 0x8d712
movq %rbx, %rdi
callq 0x47dd4
movq %r15, %rdi
callq 0x23fc0
| _ZN15SchemaConverterC2ERKSt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERKSB_EEbb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov ebp, ecx
mov r14d, edx
mov rbx, rdi
call _ZNSt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EEC2ERKSI_; std::function<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::string const&)>::function(std::function<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::string const&)> const&)
mov [rbx+20h], r14b
lea rax, [rbx+30h]
and dword ptr [rbx+30h], 0
and qword ptr [rbx+38h], 0
mov [rbx+40h], rax
mov [rbx+48h], rax
and qword ptr [rbx+50h], 0
lea r14, [rbx+28h]
lea rax, [rbx+88h]
mov [rbx+58h], rax
push 1
pop rax
mov [rbx+60h], rax
xorps xmm0, xmm0
movups xmmword ptr [rbx+68h], xmm0
mov ecx, 3F800000h
mov [rbx+78h], ecx
movups xmmword ptr [rbx+80h], xmm0
lea rdx, [rbx+0C0h]
mov [rbx+90h], rdx
mov [rbx+98h], rax
movups xmmword ptr [rbx+0A0h], xmm0
mov [rbx+0B0h], ecx
movups xmmword ptr [rbx+0B8h], xmm0
movups xmmword ptr [rbx+0C8h], xmm0
movups xmmword ptr [rbx+0D8h], xmm0
movups xmmword ptr [rbx+0E8h], xmm0
test ebp, ebp
jz short loc_8CBE9
lea rsi, asc_B8820; "\" \"?"
lea rdi, [rsp+78h+var_70]
lea rdx, [rsp+78h+var_71]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short loc_8CBFA
loc_8CBE9:
lea rsi, _ZL10SPACE_RULEB5cxx11; SPACE_RULE
lea rdi, [rsp+78h+var_70]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
loc_8CBFA:
lea rsi, aSpace+7; "space"
lea rdi, [rsp+78h+var_50]
lea rdx, [rsp+78h+var_72]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, [rsp+78h+var_50]
mov rdi, r14
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&)
lea rsi, [rsp+78h+var_70]
mov rdi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
lea rdi, [rsp+78h+var_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+78h+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r15, rax
jmp short loc_8CC67
mov r15, rax
jmp short loc_8CC71
mov r15, rax
lea rdi, [rsp+arg_20]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_8CC67:
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_8CC71:
lea r12, [rbx+58h]
lea r13, [rbx+90h]
test bpl, bpl
lea rdi, [rbx+0E0h]
lea rbp, [rbx+0C8h]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, rbp
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, r13
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable()
mov rdi, r12
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEESaISH_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSJ_18_Mod_range_hashingENSJ_20_Default_ranged_hashENSJ_20_Prime_rehash_policyENSJ_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::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>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
mov rdi, r14
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree()
mov rdi, rbx; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
mov rdi, r15
call __Unwind_Resume
| void SchemaConverter::SchemaConverter(long long a1, long long a2, char a3, int a4)
{
long long v6; // rax
_QWORD v7[4]; // [rsp+8h] [rbp-70h] BYREF
_QWORD v8[10]; // [rsp+28h] [rbp-50h] BYREF
std::function<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::string const&)>::function();
*(_BYTE *)(a1 + 32) = a3;
*(_DWORD *)(a1 + 48) = 0;
*(_QWORD *)(a1 + 56) = 0LL;
*(_QWORD *)(a1 + 64) = a1 + 48;
*(_QWORD *)(a1 + 72) = a1 + 48;
*(_QWORD *)(a1 + 80) = 0LL;
*(_QWORD *)(a1 + 88) = a1 + 136;
*(_QWORD *)(a1 + 96) = 1LL;
*(_OWORD *)(a1 + 104) = 0LL;
*(_DWORD *)(a1 + 120) = 1065353216;
*(_OWORD *)(a1 + 128) = 0LL;
*(_QWORD *)(a1 + 144) = a1 + 192;
*(_QWORD *)(a1 + 152) = 1LL;
*(_OWORD *)(a1 + 160) = 0LL;
*(_DWORD *)(a1 + 176) = 1065353216;
*(_OWORD *)(a1 + 184) = 0LL;
*(_OWORD *)(a1 + 200) = 0LL;
*(_OWORD *)(a1 + 216) = 0LL;
*(_OWORD *)(a1 + 232) = 0LL;
if ( a4 )
std::string::basic_string<std::allocator<char>>(v7, (long long)"\" \"?");
else
std::string::basic_string(v7, &SPACE_RULE[abi:cxx11]);
std::string::basic_string<std::allocator<char>>(v8, (long long)"space");
v6 = std::map<std::string,std::string>::operator[](a1 + 40, v8);
std::string::_M_assign(v6, v7);
std::string::~string(v8);
std::string::~string(v7);
}
| SchemaConverter:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV EBP,ECX
MOV R14D,EDX
MOV RBX,RDI
CALL 0x0018d1c0
MOV byte ptr [RBX + 0x20],R14B
LEA RAX,[RBX + 0x30]
AND dword ptr [RBX + 0x30],0x0
AND qword ptr [RBX + 0x38],0x0
MOV qword ptr [RBX + 0x40],RAX
MOV qword ptr [RBX + 0x48],RAX
AND qword ptr [RBX + 0x50],0x0
LEA R14,[RBX + 0x28]
LEA RAX,[RBX + 0x88]
MOV qword ptr [RBX + 0x58],RAX
PUSH 0x1
POP RAX
MOV qword ptr [RBX + 0x60],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x68],XMM0
MOV ECX,0x3f800000
MOV dword ptr [RBX + 0x78],ECX
MOVUPS xmmword ptr [RBX + 0x80],XMM0
LEA RDX,[RBX + 0xc0]
MOV qword ptr [RBX + 0x90],RDX
MOV qword ptr [RBX + 0x98],RAX
MOVUPS xmmword ptr [RBX + 0xa0],XMM0
MOV dword ptr [RBX + 0xb0],ECX
MOVUPS xmmword ptr [RBX + 0xb8],XMM0
MOVUPS xmmword ptr [RBX + 0xc8],XMM0
MOVUPS xmmword ptr [RBX + 0xd8],XMM0
MOVUPS xmmword ptr [RBX + 0xe8],XMM0
TEST EBP,EBP
JZ 0x0018cbe9
LAB_0018cbd1:
LEA RSI,[0x1b8820]
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
CALL 0x00127686
JMP 0x0018cbfa
LAB_0018cbe9:
LEA RSI,[0x1ff280]
LEA RDI,[RSP + 0x8]
CALL 0x00123c30
LAB_0018cbfa:
LEA RSI,[0x1b8a43]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x6]
CALL 0x00127686
LAB_0018cc10:
LEA RSI,[RSP + 0x28]
MOV RDI,R14
CALL 0x0018d206
LEA RSI,[RSP + 0x8]
MOV RDI,RAX
CALL 0x001234e0
LAB_0018cc2a:
LEA RDI,[RSP + 0x28]
CALL 0x001241f8
LEA RDI,[RSP + 0x8]
CALL 0x001241f8
TEST BPL,BPL
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* SchemaConverter::SchemaConverter(std::function<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::__cxx11::string const&)> const&, bool, bool) */
void __thiscall
SchemaConverter::SchemaConverter(SchemaConverter *this,function *param_1,bool param_2,bool param_3)
{
string *psVar1;
int7 in_register_00000009;
allocator local_72;
allocator local_71;
string local_70 [32];
string local_50 [32];
std::
function<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::__cxx11::string_const&)>
::function((function<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::__cxx11::string_const&)>
*)this,param_1);
this[0x20] = (SchemaConverter)param_2;
*(int4 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(SchemaConverter **)(this + 0x40) = this + 0x30;
*(SchemaConverter **)(this + 0x48) = this + 0x30;
*(int8 *)(this + 0x50) = 0;
*(SchemaConverter **)(this + 0x58) = this + 0x88;
*(int8 *)(this + 0x60) = 1;
*(int8 *)(this + 0x68) = 0;
*(int8 *)(this + 0x70) = 0;
*(int4 *)(this + 0x78) = 0x3f800000;
*(int8 *)(this + 0x80) = 0;
*(int8 *)(this + 0x88) = 0;
*(SchemaConverter **)(this + 0x90) = this + 0xc0;
*(int8 *)(this + 0x98) = 1;
*(int8 *)(this + 0xa0) = 0;
*(int8 *)(this + 0xa8) = 0;
*(int4 *)(this + 0xb0) = 0x3f800000;
*(int8 *)(this + 0xb8) = 0;
*(int8 *)(this + 0xc0) = 0;
*(int8 *)(this + 200) = 0;
*(int8 *)(this + 0xd0) = 0;
*(int8 *)(this + 0xd8) = 0;
*(int8 *)(this + 0xe0) = 0;
*(int8 *)(this + 0xe8) = 0;
*(int8 *)(this + 0xf0) = 0;
if ((int)CONCAT71(in_register_00000009,param_3) == 0) {
std::__cxx11::string::string(local_70,(string *)SPACE_RULE_abi_cxx11_);
}
else {
/* try { // try from 0018cbd1 to 0018cbf9 has its CatchHandler @ 0018cc55 */
std::__cxx11::string::string<std::allocator<char>>(local_70,"\" \"?",&local_71);
}
/* try { // try from 0018cbfa to 0018cc0f has its CatchHandler @ 0018cc50 */
std::__cxx11::string::string<std::allocator<char>>(local_50,"space",&local_72);
/* try { // try from 0018cc10 to 0018cc29 has its CatchHandler @ 0018cc5a */
psVar1 = (string *)
std::
map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::operator[]((map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
*)(this + 0x28),local_50);
std::__cxx11::string::_M_assign(psVar1);
std::__cxx11::string::~string(local_50);
std::__cxx11::string::~string(local_70);
return;
}
| |
24,242 | ma_delete_static_record | eloqsql/storage/maria/ma_statrec.c | my_bool _ma_delete_static_record(MARIA_HA *info,
const uchar *record __attribute__ ((unused)))
{
uchar temp[9]; /* 1+sizeof(uint32) */
info->state->del++;
info->state->empty+=info->s->base.pack_reclength;
temp[0]= '\0'; /* Mark that record is deleted */
_ma_dpointer(info->s, temp+1, info->s->state.dellink);
info->s->state.dellink= info->cur_row.lastpos;
info->rec_cache.seek_not_done=1;
return (info->s->file_write(info, temp, 1+info->s->rec_reflength,
info->cur_row.lastpos, MYF(MY_NABP)) != 0);
} | O3 | c | ma_delete_static_record:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x10(%rbp)
movq 0x20(%rdi), %rax
incq 0x8(%rax)
movq (%rdi), %rax
movq 0x20(%rdi), %rcx
movq 0x3a0(%rax), %rax
addq %rax, 0x10(%rcx)
leaq -0x18(%rbp), %rsi
movb $0x0, -0x1(%rsi)
movq (%rdi), %rdi
movq 0xc8(%rdi), %rdx
callq 0x58184
movq (%rbx), %rax
movq 0x98(%rbx), %rcx
movq %rcx, 0xc8(%rax)
movl $0x1, 0x598(%rbx)
movq (%rbx), %rax
movl 0x740(%rax), %edx
incl %edx
leaq -0x19(%rbp), %rsi
movl $0x4, %r8d
movq %rbx, %rdi
callq *0x6e8(%rax)
testq %rax, %rax
setne %al
movq %fs:0x28, %rcx
cmpq -0x10(%rbp), %rcx
jne 0x5c618
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
callq 0x29270
| _ma_delete_static_record:
push rbp
mov rbp, rsp
push rbx
sub rsp, 18h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_10], rax
mov rax, [rdi+20h]
inc qword ptr [rax+8]
mov rax, [rdi]
mov rcx, [rdi+20h]
mov rax, [rax+3A0h]
add [rcx+10h], rax
lea rsi, [rbp+var_18]
mov byte ptr [rsi-1], 0
mov rdi, [rdi]
mov rdx, [rdi+0C8h]
call _ma_dpointer
mov rax, [rbx]
mov rcx, [rbx+98h]
mov [rax+0C8h], rcx
mov dword ptr [rbx+598h], 1
mov rax, [rbx]
mov edx, [rax+740h]
inc edx
lea rsi, [rbp+var_19]
mov r8d, 4
mov rdi, rbx
call qword ptr [rax+6E8h]
test rax, rax
setnz al
mov rcx, fs:28h
cmp rcx, [rbp+var_10]
jnz short loc_5C618
add rsp, 18h
pop rbx
pop rbp
retn
loc_5C618:
call ___stack_chk_fail
| bool ma_delete_static_record(long long *a1)
{
long long v1; // rcx
char v3; // [rsp+7h] [rbp-19h] BYREF
char v4[8]; // [rsp+8h] [rbp-18h] BYREF
unsigned long long v5; // [rsp+10h] [rbp-10h]
v5 = __readfsqword(0x28u);
++*(_QWORD *)(a1[4] + 8);
*(_QWORD *)(a1[4] + 16) += *(_QWORD *)(*a1 + 928);
v3 = 0;
ma_dpointer(*a1, (long long)v4, *(_QWORD *)(*a1 + 200));
v1 = a1[19];
*(_QWORD *)(*a1 + 200) = v1;
*((_DWORD *)a1 + 358) = 1;
return (*(long long ( **)(long long *, char *, _QWORD, long long, long long))(*a1 + 1768))(
a1,
&v3,
(unsigned int)(*(_DWORD *)(*a1 + 1856) + 1),
v1,
4LL) != 0;
}
| _ma_delete_static_record:
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RDI + 0x20]
INC qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x20]
MOV RAX,qword ptr [RAX + 0x3a0]
ADD qword ptr [RCX + 0x10],RAX
LEA RSI,[RBP + -0x18]
MOV byte ptr [RSI + -0x1],0x0
MOV RDI,qword ptr [RDI]
MOV RDX,qword ptr [RDI + 0xc8]
CALL 0x00158184
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x98]
MOV qword ptr [RAX + 0xc8],RCX
MOV dword ptr [RBX + 0x598],0x1
MOV RAX,qword ptr [RBX]
MOV EDX,dword ptr [RAX + 0x740]
INC EDX
LEA RSI,[RBP + -0x19]
MOV R8D,0x4
MOV RDI,RBX
CALL qword ptr [RAX + 0x6e8]
TEST RAX,RAX
SETNZ AL
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x10]
JNZ 0x0015c618
ADD RSP,0x18
POP RBX
POP RBP
RET
LAB_0015c618:
CALL 0x00129270
|
bool _ma_delete_static_record(long *param_1)
{
long lVar1;
long in_FS_OFFSET;
int1 local_21;
int1 local_20 [8];
long local_18;
local_18 = *(long *)(in_FS_OFFSET + 0x28);
*(long *)(param_1[4] + 8) = *(long *)(param_1[4] + 8) + 1;
*(long *)(param_1[4] + 0x10) = *(long *)(param_1[4] + 0x10) + *(long *)(*param_1 + 0x3a0);
local_21 = 0;
_ma_dpointer(*param_1,local_20,*(int8 *)(*param_1 + 200));
lVar1 = param_1[0x13];
*(long *)(*param_1 + 200) = lVar1;
*(int4 *)(param_1 + 0xb3) = 1;
lVar1 = (**(code **)(*param_1 + 0x6e8))(param_1,&local_21,*(int *)(*param_1 + 0x740) + 1,lVar1,4);
if (*(long *)(in_FS_OFFSET + 0x28) == local_18) {
return lVar1 != 0;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
24,243 | fmt::v11::basic_appender<char> fmt::v11::detail::write_escaped_cp<fmt::v11::basic_appender<char>, char>(fmt::v11::basic_appender<char>, fmt::v11::detail::find_escape_result<char> const&) | zkingston[P]unknot/build_O0/_deps/fmt-src/include/fmt/format.h | auto write_escaped_cp(OutputIt out, const find_escape_result<Char>& escape)
-> OutputIt {
auto c = static_cast<Char>(escape.cp);
switch (escape.cp) {
case '\n':
*out++ = static_cast<Char>('\\');
c = static_cast<Char>('n');
break;
case '\r':
*out++ = static_cast<Char>('\\');
c = static_cast<Char>('r');
break;
case '\t':
*out++ = static_cast<Char>('\\');
c = static_cast<Char>('t');
break;
case '"': FMT_FALLTHROUGH;
case '\'': FMT_FALLTHROUGH;
case '\\': *out++ = static_cast<Char>('\\'); break;
default:
if (escape.cp < 0x100) return write_codepoint<2, Char>(out, 'x', escape.cp);
if (escape.cp < 0x10000)
return write_codepoint<4, Char>(out, 'u', escape.cp);
if (escape.cp < 0x110000)
return write_codepoint<8, Char>(out, 'U', escape.cp);
for (Char escape_char : basic_string_view<Char>(
escape.begin, to_unsigned(escape.end - escape.begin))) {
out = write_codepoint<2, Char>(out, 'x',
static_cast<uint32_t>(escape_char) & 0xFF);
}
return out;
}
*out++ = c;
return out;
} | O0 | c | fmt::v11::basic_appender<char> fmt::v11::detail::write_escaped_cp<fmt::v11::basic_appender<char>, char>(fmt::v11::basic_appender<char>, fmt::v11::detail::find_escape_result<char> const&):
subq $0xb8, %rsp
movq %rdi, 0xa8(%rsp)
movq %rsi, 0xa0(%rsp)
movq 0xa0(%rsp), %rax
movb 0x10(%rax), %al
movb %al, 0x9f(%rsp)
movq 0xa0(%rsp), %rax
movl 0x10(%rax), %eax
movl %eax, 0x14(%rsp)
subl $0x9, %eax
je 0xaf245
jmp 0xaf183
movl 0x14(%rsp), %eax
subl $0xa, %eax
je 0xaf1c9
jmp 0xaf18e
movl 0x14(%rsp), %eax
subl $0xd, %eax
je 0xaf207
jmp 0xaf199
movl 0x14(%rsp), %eax
subl $0x22, %eax
je 0xaf283
jmp 0xaf1a8
movl 0x14(%rsp), %eax
subl $0x27, %eax
je 0xaf285
jmp 0xaf1b7
movl 0x14(%rsp), %eax
subl $0x5c, %eax
je 0xaf287
jmp 0xaf2b7
leaq 0xa8(%rsp), %rdi
xorl %esi, %esi
callq 0xac9d0
movq %rax, 0x90(%rsp)
leaq 0x90(%rsp), %rdi
callq 0xac9f0
movq %rax, %rdi
movl $0x5c, %esi
callq 0xaca00
movb $0x6e, 0x9f(%rsp)
jmp 0xaf461
leaq 0xa8(%rsp), %rdi
xorl %esi, %esi
callq 0xac9d0
movq %rax, 0x88(%rsp)
leaq 0x88(%rsp), %rdi
callq 0xac9f0
movq %rax, %rdi
movl $0x5c, %esi
callq 0xaca00
movb $0x72, 0x9f(%rsp)
jmp 0xaf461
leaq 0xa8(%rsp), %rdi
xorl %esi, %esi
callq 0xac9d0
movq %rax, 0x80(%rsp)
leaq 0x80(%rsp), %rdi
callq 0xac9f0
movq %rax, %rdi
movl $0x5c, %esi
callq 0xaca00
movb $0x74, 0x9f(%rsp)
jmp 0xaf461
jmp 0xaf285
jmp 0xaf287
leaq 0xa8(%rsp), %rdi
xorl %esi, %esi
callq 0xac9d0
movq %rax, 0x78(%rsp)
leaq 0x78(%rsp), %rdi
callq 0xac9f0
movq %rax, %rdi
movl $0x5c, %esi
callq 0xaca00
jmp 0xaf461
movq 0xa0(%rsp), %rax
cmpl $0x100, 0x10(%rax) # imm = 0x100
jae 0xaf2fc
movq 0xa8(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0xa0(%rsp), %rax
movl 0x10(%rax), %edx
movq 0x70(%rsp), %rdi
movl $0x78, %esi
callq 0xaf4c0
movq %rax, 0xb0(%rsp)
jmp 0xaf4a9
movq 0xa0(%rsp), %rax
cmpl $0x10000, 0x10(%rax) # imm = 0x10000
jae 0xaf341
movq 0xa8(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0xa0(%rsp), %rax
movl 0x10(%rax), %edx
movq 0x68(%rsp), %rdi
movl $0x75, %esi
callq 0xaf590
movq %rax, 0xb0(%rsp)
jmp 0xaf4a9
movq 0xa0(%rsp), %rax
cmpl $0x110000, 0x10(%rax) # imm = 0x110000
jae 0xaf386
movq 0xa8(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0xa0(%rsp), %rax
movl 0x10(%rax), %edx
movq 0x60(%rsp), %rdi
movl $0x55, %esi
callq 0xaf660
movq %rax, 0xb0(%rsp)
jmp 0xaf4a9
movq 0xa0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0xa0(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0xa0(%rsp), %rax
movq (%rax), %rax
subq %rax, %rdi
callq 0xaae90
movq 0x8(%rsp), %rsi
movq %rax, %rdx
leaq 0x48(%rsp), %rdi
callq 0x753a0
leaq 0x48(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rdi
callq 0xaf730
movq %rax, 0x40(%rsp)
movq 0x58(%rsp), %rdi
callq 0xaf740
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rax
cmpq 0x38(%rsp), %rax
je 0xaf44f
movq 0x40(%rsp), %rax
movb (%rax), %al
movb %al, 0x37(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x20(%rsp)
movsbl 0x37(%rsp), %edx
andl $0xff, %edx
movq 0x20(%rsp), %rdi
movl $0x78, %esi
callq 0xaf4c0
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0xaf3ef
movq 0xa8(%rsp), %rax
movq %rax, 0xb0(%rsp)
jmp 0xaf4a9
movb 0x9f(%rsp), %al
movb %al, 0x7(%rsp)
leaq 0xa8(%rsp), %rdi
xorl %esi, %esi
callq 0xac9d0
movq %rax, 0x18(%rsp)
leaq 0x18(%rsp), %rdi
callq 0xac9f0
movq %rax, %rdi
movb 0x7(%rsp), %al
movsbl %al, %esi
callq 0xaca00
movq 0xa8(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
addq $0xb8, %rsp
retq
nopl (%rax)
| _ZN3fmt3v116detail16write_escaped_cpINS0_14basic_appenderIcEEcEET_S5_RKNS1_18find_escape_resultIT0_EE:
sub rsp, 0B8h
mov [rsp+0B8h+var_10], rdi
mov [rsp+0B8h+var_18], rsi
mov rax, [rsp+0B8h+var_18]
mov al, [rax+10h]
mov [rsp+0B8h+var_19], al
mov rax, [rsp+0B8h+var_18]
mov eax, [rax+10h]
mov [rsp+0B8h+var_A4], eax
sub eax, 9
jz loc_AF245
jmp short $+2
loc_AF183:
mov eax, [rsp+0B8h+var_A4]
sub eax, 0Ah
jz short loc_AF1C9
jmp short $+2
loc_AF18E:
mov eax, [rsp+0B8h+var_A4]
sub eax, 0Dh
jz short loc_AF207
jmp short $+2
loc_AF199:
mov eax, [rsp+0B8h+var_A4]
sub eax, 22h ; '"'
jz loc_AF283
jmp short $+2
loc_AF1A8:
mov eax, [rsp+0B8h+var_A4]
sub eax, 27h ; '''
jz loc_AF285
jmp short $+2
loc_AF1B7:
mov eax, [rsp+0B8h+var_A4]
sub eax, 5Ch ; '\'
jz loc_AF287
jmp loc_AF2B7
loc_AF1C9:
lea rdi, [rsp+0B8h+var_10]
xor esi, esi
call _ZN3fmt3v1114basic_appenderIcEppEi; fmt::v11::basic_appender<char>::operator++(int)
mov [rsp+0B8h+var_28], rax
lea rdi, [rsp+0B8h+var_28]
call _ZN3fmt3v1114basic_appenderIcEdeEv; fmt::v11::basic_appender<char>::operator*(void)
mov rdi, rax
mov esi, 5Ch ; '\'
call _ZN3fmt3v1114basic_appenderIcEaSEc; fmt::v11::basic_appender<char>::operator=(char)
mov [rsp+0B8h+var_19], 6Eh ; 'n'
jmp loc_AF461
loc_AF207:
lea rdi, [rsp+0B8h+var_10]
xor esi, esi
call _ZN3fmt3v1114basic_appenderIcEppEi; fmt::v11::basic_appender<char>::operator++(int)
mov [rsp+0B8h+var_30], rax
lea rdi, [rsp+0B8h+var_30]
call _ZN3fmt3v1114basic_appenderIcEdeEv; fmt::v11::basic_appender<char>::operator*(void)
mov rdi, rax
mov esi, 5Ch ; '\'
call _ZN3fmt3v1114basic_appenderIcEaSEc; fmt::v11::basic_appender<char>::operator=(char)
mov [rsp+0B8h+var_19], 72h ; 'r'
jmp loc_AF461
loc_AF245:
lea rdi, [rsp+0B8h+var_10]
xor esi, esi
call _ZN3fmt3v1114basic_appenderIcEppEi; fmt::v11::basic_appender<char>::operator++(int)
mov [rsp+0B8h+var_38], rax
lea rdi, [rsp+0B8h+var_38]
call _ZN3fmt3v1114basic_appenderIcEdeEv; fmt::v11::basic_appender<char>::operator*(void)
mov rdi, rax
mov esi, 5Ch ; '\'
call _ZN3fmt3v1114basic_appenderIcEaSEc; fmt::v11::basic_appender<char>::operator=(char)
mov [rsp+0B8h+var_19], 74h ; 't'
jmp loc_AF461
loc_AF283:
jmp short $+2
loc_AF285:
jmp short $+2
loc_AF287:
lea rdi, [rsp+0B8h+var_10]
xor esi, esi
call _ZN3fmt3v1114basic_appenderIcEppEi; fmt::v11::basic_appender<char>::operator++(int)
mov [rsp+0B8h+var_40], rax
lea rdi, [rsp+0B8h+var_40]
call _ZN3fmt3v1114basic_appenderIcEdeEv; fmt::v11::basic_appender<char>::operator*(void)
mov rdi, rax
mov esi, 5Ch ; '\'
call _ZN3fmt3v1114basic_appenderIcEaSEc; fmt::v11::basic_appender<char>::operator=(char)
jmp loc_AF461
loc_AF2B7:
mov rax, [rsp+0B8h+var_18]
cmp dword ptr [rax+10h], 100h
jnb short loc_AF2FC
mov rax, [rsp+0B8h+var_10]
mov [rsp+0B8h+var_48], rax
mov rax, [rsp+0B8h+var_18]
mov edx, [rax+10h]
mov rdi, [rsp+0B8h+var_48]
mov esi, 78h ; 'x'
call _ZN3fmt3v116detail15write_codepointILm2EcNS0_14basic_appenderIcEEEET1_S5_cj; fmt::v11::detail::write_codepoint<2ul,char,fmt::v11::basic_appender<char>>(fmt::v11::basic_appender<char>,char,uint)
mov [rsp+0B8h+var_8], rax
jmp loc_AF4A9
loc_AF2FC:
mov rax, [rsp+0B8h+var_18]
cmp dword ptr [rax+10h], 10000h
jnb short loc_AF341
mov rax, [rsp+0B8h+var_10]
mov [rsp+0B8h+var_50], rax
mov rax, [rsp+0B8h+var_18]
mov edx, [rax+10h]
mov rdi, [rsp+0B8h+var_50]
mov esi, 75h ; 'u'
call _ZN3fmt3v116detail15write_codepointILm4EcNS0_14basic_appenderIcEEEET1_S5_cj; fmt::v11::detail::write_codepoint<4ul,char,fmt::v11::basic_appender<char>>(fmt::v11::basic_appender<char>,char,uint)
mov [rsp+0B8h+var_8], rax
jmp loc_AF4A9
loc_AF341:
mov rax, [rsp+0B8h+var_18]
cmp dword ptr [rax+10h], 110000h
jnb short loc_AF386
mov rax, [rsp+0B8h+var_10]
mov [rsp+0B8h+var_58], rax
mov rax, [rsp+0B8h+var_18]
mov edx, [rax+10h]
mov rdi, [rsp+0B8h+var_58]
mov esi, 55h ; 'U'
call _ZN3fmt3v116detail15write_codepointILm8EcNS0_14basic_appenderIcEEEET1_S5_cj; fmt::v11::detail::write_codepoint<8ul,char,fmt::v11::basic_appender<char>>(fmt::v11::basic_appender<char>,char,uint)
mov [rsp+0B8h+var_8], rax
jmp loc_AF4A9
loc_AF386:
mov rax, [rsp+0B8h+var_18]
mov rax, [rax]
mov [rsp+0B8h+var_B0], rax
mov rax, [rsp+0B8h+var_18]
mov rdi, [rax+8]
mov rax, [rsp+0B8h+var_18]
mov rax, [rax]
sub rdi, rax
call _ZN3fmt3v116detail11to_unsignedIlEENSt13make_unsignedIT_E4typeES4_; fmt::v11::detail::to_unsigned<long>(long)
mov rsi, [rsp+0B8h+var_B0]
mov rdx, rax
lea rdi, [rsp+0B8h+var_70]
call _ZN3fmt3v1117basic_string_viewIcEC2EPKcm; fmt::v11::basic_string_view<char>::basic_string_view(char const*,ulong)
lea rax, [rsp+0B8h+var_70]
mov [rsp+0B8h+var_60], rax
mov rdi, [rsp+0B8h+var_60]
call _ZNK3fmt3v1117basic_string_viewIcE5beginEv; fmt::v11::basic_string_view<char>::begin(void)
mov [rsp+0B8h+var_78], rax
mov rdi, [rsp+0B8h+var_60]
call _ZNK3fmt3v1117basic_string_viewIcE3endEv; fmt::v11::basic_string_view<char>::end(void)
mov [rsp+0B8h+var_80], rax
loc_AF3EF:
mov rax, [rsp+0B8h+var_78]
cmp rax, [rsp+0B8h+var_80]
jz short loc_AF44F
mov rax, [rsp+0B8h+var_78]
mov al, [rax]
mov [rsp+0B8h+var_81], al
mov rax, [rsp+0B8h+var_10]
mov [rsp+0B8h+var_98], rax
movsx edx, [rsp+0B8h+var_81]
and edx, 0FFh
mov rdi, [rsp+0B8h+var_98]
mov esi, 78h ; 'x'
call _ZN3fmt3v116detail15write_codepointILm2EcNS0_14basic_appenderIcEEEET1_S5_cj; fmt::v11::detail::write_codepoint<2ul,char,fmt::v11::basic_appender<char>>(fmt::v11::basic_appender<char>,char,uint)
mov [rsp+0B8h+var_90], rax
mov rax, [rsp+0B8h+var_90]
mov [rsp+0B8h+var_10], rax
mov rax, [rsp+0B8h+var_78]
add rax, 1
mov [rsp+0B8h+var_78], rax
jmp short loc_AF3EF
loc_AF44F:
mov rax, [rsp+0B8h+var_10]
mov [rsp+0B8h+var_8], rax
jmp short loc_AF4A9
loc_AF461:
mov al, [rsp+0B8h+var_19]
mov [rsp+0B8h+var_B1], al
lea rdi, [rsp+0B8h+var_10]
xor esi, esi
call _ZN3fmt3v1114basic_appenderIcEppEi; fmt::v11::basic_appender<char>::operator++(int)
mov [rsp+0B8h+var_A0], rax
lea rdi, [rsp+0B8h+var_A0]
call _ZN3fmt3v1114basic_appenderIcEdeEv; fmt::v11::basic_appender<char>::operator*(void)
mov rdi, rax
mov al, [rsp+0B8h+var_B1]
movsx esi, al
call _ZN3fmt3v1114basic_appenderIcEaSEc; fmt::v11::basic_appender<char>::operator=(char)
mov rax, [rsp+0B8h+var_10]
mov [rsp+0B8h+var_8], rax
loc_AF4A9:
mov rax, [rsp+0B8h+var_8]
add rsp, 0B8h
retn
| long long fmt::v11::detail::write_escaped_cp<fmt::v11::basic_appender<char>,char>(long long a1, long long a2)
{
long long **v2; // rax
long long **v3; // rax
long long **v4; // rax
long long **v5; // rax
long long v6; // rax
long long **v7; // rax
char v9; // [rsp+7h] [rbp-B1h]
long long v10; // [rsp+8h] [rbp-B0h]
int v11; // [rsp+14h] [rbp-A4h]
_QWORD v12[2]; // [rsp+18h] [rbp-A0h] BYREF
long long v13; // [rsp+28h] [rbp-90h]
unsigned __int8 v14; // [rsp+37h] [rbp-81h]
long long v15; // [rsp+38h] [rbp-80h]
unsigned __int8 *v16; // [rsp+40h] [rbp-78h]
_QWORD v17[2]; // [rsp+48h] [rbp-70h] BYREF
_QWORD *v18; // [rsp+58h] [rbp-60h]
long long v19; // [rsp+60h] [rbp-58h]
long long v20; // [rsp+68h] [rbp-50h]
long long v21; // [rsp+70h] [rbp-48h]
long long v22; // [rsp+78h] [rbp-40h] BYREF
long long v23; // [rsp+80h] [rbp-38h] BYREF
long long v24; // [rsp+88h] [rbp-30h] BYREF
long long v25; // [rsp+90h] [rbp-28h] BYREF
char v26; // [rsp+9Fh] [rbp-19h]
long long v27; // [rsp+A0h] [rbp-18h]
long long v28; // [rsp+A8h] [rbp-10h] BYREF
v28 = a1;
v27 = a2;
v26 = *(_BYTE *)(a2 + 16);
v11 = *(_DWORD *)(a2 + 16);
switch ( v11 )
{
case 9:
v23 = fmt::v11::basic_appender<char>::operator++((long long)&v28);
v4 = (long long **)fmt::v11::basic_appender<char>::operator*((long long)&v23);
fmt::v11::basic_appender<char>::operator=(v4, 92);
v26 = 116;
goto LABEL_22;
case 10:
v25 = fmt::v11::basic_appender<char>::operator++((long long)&v28);
v2 = (long long **)fmt::v11::basic_appender<char>::operator*((long long)&v25);
fmt::v11::basic_appender<char>::operator=(v2, 92);
v26 = 110;
LABEL_22:
v9 = v26;
v12[0] = fmt::v11::basic_appender<char>::operator++((long long)&v28);
v7 = (long long **)fmt::v11::basic_appender<char>::operator*((long long)v12);
fmt::v11::basic_appender<char>::operator=(v7, v9);
return v28;
case 13:
v24 = fmt::v11::basic_appender<char>::operator++((long long)&v28);
v3 = (long long **)fmt::v11::basic_appender<char>::operator*((long long)&v24);
fmt::v11::basic_appender<char>::operator=(v3, 92);
v26 = 114;
goto LABEL_22;
case 34:
case 39:
case 92:
v22 = fmt::v11::basic_appender<char>::operator++((long long)&v28);
v5 = (long long **)fmt::v11::basic_appender<char>::operator*((long long)&v22);
fmt::v11::basic_appender<char>::operator=(v5, 92);
goto LABEL_22;
}
if ( *(_DWORD *)(v27 + 16) >= 0x100u )
{
if ( *(_DWORD *)(v27 + 16) >= 0x10000u )
{
if ( *(_DWORD *)(v27 + 16) >= 0x110000u )
{
v10 = *(_QWORD *)v27;
v6 = fmt::v11::detail::to_unsigned<long>(*(_QWORD *)(v27 + 8) - *(_QWORD *)v27);
fmt::v11::basic_string_view<char>::basic_string_view(v17, v10, v6);
v18 = v17;
v16 = (unsigned __int8 *)fmt::v11::basic_string_view<char>::begin(v17);
v15 = fmt::v11::basic_string_view<char>::end(v18);
while ( v16 != (unsigned __int8 *)v15 )
{
v14 = *v16;
v12[1] = v28;
v13 = fmt::v11::detail::write_codepoint<2ul,char,fmt::v11::basic_appender<char>>(v28, 120LL, v14);
v28 = v13;
++v16;
}
return v28;
}
else
{
v19 = v28;
return fmt::v11::detail::write_codepoint<8ul,char,fmt::v11::basic_appender<char>>(
v28,
85LL,
*(unsigned int *)(v27 + 16));
}
}
else
{
v20 = v28;
return fmt::v11::detail::write_codepoint<4ul,char,fmt::v11::basic_appender<char>>(
v28,
117LL,
*(unsigned int *)(v27 + 16));
}
}
else
{
v21 = v28;
return fmt::v11::detail::write_codepoint<2ul,char,fmt::v11::basic_appender<char>>(
v28,
120LL,
*(unsigned int *)(v27 + 16));
}
}
| write_escaped_cp<fmt::v11::basic_appender<char>,char>:
SUB RSP,0xb8
MOV qword ptr [RSP + 0xa8],RDI
MOV qword ptr [RSP + 0xa0],RSI
MOV RAX,qword ptr [RSP + 0xa0]
MOV AL,byte ptr [RAX + 0x10]
MOV byte ptr [RSP + 0x9f],AL
MOV RAX,qword ptr [RSP + 0xa0]
MOV EAX,dword ptr [RAX + 0x10]
MOV dword ptr [RSP + 0x14],EAX
SUB EAX,0x9
JZ 0x001af245
JMP 0x001af183
LAB_001af183:
MOV EAX,dword ptr [RSP + 0x14]
SUB EAX,0xa
JZ 0x001af1c9
JMP 0x001af18e
LAB_001af18e:
MOV EAX,dword ptr [RSP + 0x14]
SUB EAX,0xd
JZ 0x001af207
JMP 0x001af199
LAB_001af199:
MOV EAX,dword ptr [RSP + 0x14]
SUB EAX,0x22
JZ 0x001af283
JMP 0x001af1a8
LAB_001af1a8:
MOV EAX,dword ptr [RSP + 0x14]
SUB EAX,0x27
JZ 0x001af285
JMP 0x001af1b7
LAB_001af1b7:
MOV EAX,dword ptr [RSP + 0x14]
SUB EAX,0x5c
JZ 0x001af287
JMP 0x001af2b7
LAB_001af1c9:
LEA RDI,[RSP + 0xa8]
XOR ESI,ESI
CALL 0x001ac9d0
MOV qword ptr [RSP + 0x90],RAX
LEA RDI,[RSP + 0x90]
CALL 0x001ac9f0
MOV RDI,RAX
MOV ESI,0x5c
CALL 0x001aca00
MOV byte ptr [RSP + 0x9f],0x6e
JMP 0x001af461
LAB_001af207:
LEA RDI,[RSP + 0xa8]
XOR ESI,ESI
CALL 0x001ac9d0
MOV qword ptr [RSP + 0x88],RAX
LEA RDI,[RSP + 0x88]
CALL 0x001ac9f0
MOV RDI,RAX
MOV ESI,0x5c
CALL 0x001aca00
MOV byte ptr [RSP + 0x9f],0x72
JMP 0x001af461
LAB_001af245:
LEA RDI,[RSP + 0xa8]
XOR ESI,ESI
CALL 0x001ac9d0
MOV qword ptr [RSP + 0x80],RAX
LEA RDI,[RSP + 0x80]
CALL 0x001ac9f0
MOV RDI,RAX
MOV ESI,0x5c
CALL 0x001aca00
MOV byte ptr [RSP + 0x9f],0x74
JMP 0x001af461
LAB_001af283:
JMP 0x001af285
LAB_001af285:
JMP 0x001af287
LAB_001af287:
LEA RDI,[RSP + 0xa8]
XOR ESI,ESI
CALL 0x001ac9d0
MOV qword ptr [RSP + 0x78],RAX
LEA RDI,[RSP + 0x78]
CALL 0x001ac9f0
MOV RDI,RAX
MOV ESI,0x5c
CALL 0x001aca00
JMP 0x001af461
LAB_001af2b7:
MOV RAX,qword ptr [RSP + 0xa0]
CMP dword ptr [RAX + 0x10],0x100
JNC 0x001af2fc
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV EDX,dword ptr [RAX + 0x10]
MOV RDI,qword ptr [RSP + 0x70]
MOV ESI,0x78
CALL 0x001af4c0
MOV qword ptr [RSP + 0xb0],RAX
JMP 0x001af4a9
LAB_001af2fc:
MOV RAX,qword ptr [RSP + 0xa0]
CMP dword ptr [RAX + 0x10],0x10000
JNC 0x001af341
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV EDX,dword ptr [RAX + 0x10]
MOV RDI,qword ptr [RSP + 0x68]
MOV ESI,0x75
CALL 0x001af590
MOV qword ptr [RSP + 0xb0],RAX
JMP 0x001af4a9
LAB_001af341:
MOV RAX,qword ptr [RSP + 0xa0]
CMP dword ptr [RAX + 0x10],0x110000
JNC 0x001af386
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV EDX,dword ptr [RAX + 0x10]
MOV RDI,qword ptr [RSP + 0x60]
MOV ESI,0x55
CALL 0x001af660
MOV qword ptr [RSP + 0xb0],RAX
JMP 0x001af4a9
LAB_001af386:
MOV RAX,qword ptr [RSP + 0xa0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RSP + 0xa0]
MOV RAX,qword ptr [RAX]
SUB RDI,RAX
CALL 0x001aae90
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,RAX
LEA RDI,[RSP + 0x48]
CALL 0x001753a0
LEA RAX,[RSP + 0x48]
MOV qword ptr [RSP + 0x58],RAX
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x001af730
MOV qword ptr [RSP + 0x40],RAX
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x001af740
MOV qword ptr [RSP + 0x38],RAX
LAB_001af3ef:
MOV RAX,qword ptr [RSP + 0x40]
CMP RAX,qword ptr [RSP + 0x38]
JZ 0x001af44f
MOV RAX,qword ptr [RSP + 0x40]
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + 0x37],AL
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0x20],RAX
MOVSX EDX,byte ptr [RSP + 0x37]
AND EDX,0xff
MOV RDI,qword ptr [RSP + 0x20]
MOV ESI,0x78
CALL 0x001af4c0
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0xa8],RAX
MOV RAX,qword ptr [RSP + 0x40]
ADD RAX,0x1
MOV qword ptr [RSP + 0x40],RAX
JMP 0x001af3ef
LAB_001af44f:
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0xb0],RAX
JMP 0x001af4a9
LAB_001af461:
MOV AL,byte ptr [RSP + 0x9f]
MOV byte ptr [RSP + 0x7],AL
LEA RDI,[RSP + 0xa8]
XOR ESI,ESI
CALL 0x001ac9d0
MOV qword ptr [RSP + 0x18],RAX
LEA RDI,[RSP + 0x18]
CALL 0x001ac9f0
MOV RDI,RAX
MOV AL,byte ptr [RSP + 0x7]
MOVSX ESI,AL
CALL 0x001aca00
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0xb0],RAX
LAB_001af4a9:
MOV RAX,qword ptr [RSP + 0xb0]
ADD RSP,0xb8
RET
|
/* fmt::v11::basic_appender<char> fmt::v11::detail::write_escaped_cp<fmt::v11::basic_appender<char>,
char>(fmt::v11::basic_appender<char>, fmt::v11::detail::find_escape_result<char> const&) */
int8
fmt::v11::detail::write_escaped_cp<fmt::v11::basic_appender<char>,char>
(int8 param_1,long *param_2)
{
int iVar1;
char *pcVar2;
char cVar3;
basic_appender<char> *pbVar4;
int8 uVar5;
ulong uVar6;
int8 local_a0;
int8 local_98;
int8 local_90;
int1 local_81;
int1 *local_80;
int1 *local_78;
basic_string_view<char> local_70 [16];
basic_string_view<char> *local_60;
int8 local_58;
int8 local_50;
int8 local_48;
int8 local_40;
int8 local_38;
int8 local_30;
int8 local_28;
char local_19;
long *local_18;
int8 local_10 [2];
local_19 = (char)param_2[2];
iVar1 = (int)param_2[2];
local_18 = param_2;
local_10[0] = param_1;
if (iVar1 == 9) {
local_38 = basic_appender<char>::operator++((basic_appender<char> *)local_10,0);
pbVar4 = (basic_appender<char> *)
basic_appender<char>::operator*((basic_appender<char> *)&local_38);
basic_appender<char>::operator=(pbVar4,'\\');
local_19 = 't';
}
else if (iVar1 == 10) {
local_28 = basic_appender<char>::operator++((basic_appender<char> *)local_10,0);
pbVar4 = (basic_appender<char> *)
basic_appender<char>::operator*((basic_appender<char> *)&local_28);
basic_appender<char>::operator=(pbVar4,'\\');
local_19 = 'n';
}
else if (iVar1 == 0xd) {
local_30 = basic_appender<char>::operator++((basic_appender<char> *)local_10,0);
pbVar4 = (basic_appender<char> *)
basic_appender<char>::operator*((basic_appender<char> *)&local_30);
basic_appender<char>::operator=(pbVar4,'\\');
local_19 = 'r';
}
else {
if (((iVar1 != 0x22) && (iVar1 != 0x27)) && (iVar1 != 0x5c)) {
if (*(uint *)(param_2 + 2) < 0x100) {
local_48 = param_1;
uVar5 = write_codepoint<2ul,char,fmt::v11::basic_appender<char>>
(param_1,0x78,(int)param_2[2]);
return uVar5;
}
if (*(uint *)(param_2 + 2) < 0x10000) {
local_50 = param_1;
uVar5 = write_codepoint<4ul,char,fmt::v11::basic_appender<char>>
(param_1,0x75,(int)param_2[2]);
return uVar5;
}
if (*(uint *)(param_2 + 2) < 0x110000) {
local_58 = param_1;
uVar5 = write_codepoint<8ul,char,fmt::v11::basic_appender<char>>
(param_1,0x55,(int)param_2[2]);
return uVar5;
}
pcVar2 = (char *)*param_2;
uVar6 = to_unsigned<long>(param_2[1] - *param_2);
basic_string_view<char>::basic_string_view(local_70,pcVar2,uVar6);
local_60 = local_70;
local_78 = (int1 *)basic_string_view<char>::begin(local_60);
local_80 = (int1 *)basic_string_view<char>::end(local_60);
for (; local_78 != local_80; local_78 = local_78 + 1) {
local_81 = *local_78;
local_98 = local_10[0];
local_90 = write_codepoint<2ul,char,fmt::v11::basic_appender<char>>
(local_10[0],0x78,local_81);
local_10[0] = local_90;
}
return local_10[0];
}
local_40 = basic_appender<char>::operator++((basic_appender<char> *)local_10,0);
pbVar4 = (basic_appender<char> *)
basic_appender<char>::operator*((basic_appender<char> *)&local_40);
basic_appender<char>::operator=(pbVar4,'\\');
}
cVar3 = local_19;
local_a0 = basic_appender<char>::operator++((basic_appender<char> *)local_10,0);
pbVar4 = (basic_appender<char> *)
basic_appender<char>::operator*((basic_appender<char> *)&local_a0);
basic_appender<char>::operator=(pbVar4,cVar3);
return local_10[0];
}
| |
24,244 | translog_finish_page | eloqsql/storage/maria/ma_loghandler.c | static void translog_finish_page(TRANSLOG_ADDRESS *horizon,
struct st_buffer_cursor *cursor)
{
uint16 left= TRANSLOG_PAGE_SIZE - cursor->current_page_fill;
uchar *page= cursor->ptr - cursor->current_page_fill;
DBUG_ENTER("translog_finish_page");
DBUG_PRINT("enter", ("Buffer: #%u %p "
"Buffer addr: " LSN_FMT " "
"Page addr: " LSN_FMT " "
"size:%u (%u) Pg:%u left:%u",
(uint) cursor->buffer_no, cursor->buffer,
LSN_IN_PARTS(cursor->buffer->offset),
(uint)LSN_FILE_NO(*horizon),
(uint)(LSN_OFFSET(*horizon) -
cursor->current_page_fill),
(uint) cursor->buffer->size,
(uint) (cursor->ptr -cursor->buffer->buffer),
(uint) cursor->current_page_fill, (uint) left));
DBUG_ASSERT(LSN_FILE_NO(*horizon) == LSN_FILE_NO(cursor->buffer->offset)
|| translog_status == TRANSLOG_UNINITED);
if ((LSN_FILE_NO(*horizon) != LSN_FILE_NO(cursor->buffer->offset)))
DBUG_VOID_RETURN; // everything wrong do not write to awoid more problems
translog_check_cursor(cursor);
if (cursor->protected)
{
DBUG_PRINT("info", ("Already protected and finished"));
DBUG_VOID_RETURN;
}
cursor->protected= 1;
DBUG_ASSERT(left < TRANSLOG_PAGE_SIZE);
if (left != 0)
{
DBUG_PRINT("info", ("left: %u", (uint) left));
memset(cursor->ptr, TRANSLOG_FILLER, left);
cursor->ptr+= left;
(*horizon)+= left; /* offset increasing */
if (!cursor->chaser)
cursor->buffer->size+= left;
/* We are finishing the page so reset the counter */
cursor->current_page_fill= 0;
DBUG_PRINT("info", ("Finish Page 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);
}
/*
When we are finishing the page other thread might not finish the page
header yet (in case if we started from the middle of the page) so we
have to read log_descriptor.flags but not the flags from the page.
*/
if (log_descriptor.flags & TRANSLOG_SECTOR_PROTECTION)
{
translog_put_sector_protection(page, cursor);
DBUG_PRINT("info", ("drop write_counter"));
cursor->write_counter= 0;
cursor->previous_offset= 0;
}
if (log_descriptor.flags & TRANSLOG_PAGE_CRC)
{
uint32 crc= translog_crc(page + log_descriptor.page_overhead,
TRANSLOG_PAGE_SIZE -
log_descriptor.page_overhead);
DBUG_PRINT("info", ("CRC: %lx", (ulong) crc));
/* We have page number, file number and flag before crc */
int4store(page + 3 + 3 + 1, crc);
}
DBUG_VOID_RETURN;
} | O3 | c | translog_finish_page:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x28(%rsi), %rax
movq 0x100010(%rax), %rax
xorq (%rdi), %rax
shrq $0x20, %rax
jne 0x3811d
movq %rsi, %r14
cmpb $0x0, 0x38(%rsi)
jne 0x3811d
movzwl 0x30(%r14), %r13d
movq 0x20(%r14), %rbx
movb $0x1, 0x38(%r14)
movzwl %r13w, %eax
cmpl $0x2000, %eax # imm = 0x2000
je 0x380d1
movq %rdi, %r15
movl $0x2000, %eax # imm = 0x2000
subl %r13d, %eax
movzwl %ax, %r12d
movq %rbx, %rdi
movl $0xff, %esi
movq %r12, %rdx
callq 0x2a2c0
addq %r12, 0x20(%r14)
addq %r12, (%r15)
cmpb $0x0, 0x37(%r14)
jne 0x380ca
movq 0x28(%r14), %rax
addl %r12d, 0x100030(%rax)
movw $0x0, 0x30(%r14)
subq %r13, %rbx
movl 0x3cf0ae(%rip), %eax # 0x407188
testb $0x2, %al
je 0x380fd
movl 0x34(%r14), %edx
movzwl 0x32(%r14), %esi
movq %rbx, %rdi
callq 0x3b91d
movl $0x0, 0x32(%r14)
movl 0x3cf08b(%rip), %eax # 0x407188
testb $0x1, %al
je 0x3811d
movzwl 0x3cf09c(%rip), %eax # 0x4071a4
leaq (%rbx,%rax), %rsi
movl $0x2000, %edx # imm = 0x2000
subl %eax, %edx
xorl %edi, %edi
callq 0xaebe8
movl %eax, 0x7(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| translog_finish_page:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rax, [rsi+28h]
mov rax, ds:qword_100010[rax]
xor rax, [rdi]
shr rax, 20h
jnz loc_3811D
mov r14, rsi
cmp byte ptr [rsi+38h], 0
jnz loc_3811D
movzx r13d, word ptr [r14+30h]
mov rbx, [r14+20h]
mov byte ptr [r14+38h], 1
movzx eax, r13w
cmp eax, 2000h
jz short loc_380D1
mov r15, rdi
mov eax, 2000h
sub eax, r13d
movzx r12d, ax
mov rdi, rbx
mov esi, 0FFh
mov rdx, r12
call _memset
add [r14+20h], r12
add [r15], r12
cmp byte ptr [r14+37h], 0
jnz short loc_380CA
mov rax, [r14+28h]
add dword ptr ds:qword_100030[rax], r12d
loc_380CA:
mov word ptr [r14+30h], 0
loc_380D1:
sub rbx, r13
mov eax, cs:dword_407188
test al, 2
jz short loc_380FD
mov edx, [r14+34h]
movzx esi, word ptr [r14+32h]
mov rdi, rbx
call translog_put_sector_protection
mov dword ptr [r14+32h], 0
mov eax, cs:dword_407188
loc_380FD:
test al, 1
jz short loc_3811D
movzx eax, cs:word_4071A4
lea rsi, [rbx+rax]
mov edx, 2000h
sub edx, eax
xor edi, edi
call my_checksum
mov [rbx+7], eax
loc_3811D:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long translog_finish_page(_QWORD *a1, long long a2)
{
unsigned long long result; // rax
long long v3; // r13
long long v4; // rbx
long long v5; // r12
long long v6; // rbx
result = (*a1 ^ *(unsigned long long *)((char *)&qword_100010 + *(_QWORD *)(a2 + 40))) >> 32;
if ( !result && !*(_BYTE *)(a2 + 56) )
{
v3 = *(unsigned __int16 *)(a2 + 48);
v4 = *(_QWORD *)(a2 + 32);
*(_BYTE *)(a2 + 56) = 1;
if ( (unsigned __int16)v3 != 0x2000 )
{
v5 = (unsigned __int16)(0x2000 - v3);
memset(v4, 255LL, v5);
*(_QWORD *)(a2 + 32) += v5;
*a1 += v5;
if ( !*(_BYTE *)(a2 + 55) )
*(_DWORD *)((char *)&qword_100030 + *(_QWORD *)(a2 + 40)) += v5;
*(_WORD *)(a2 + 48) = 0;
}
v6 = v4 - v3;
result = (unsigned int)dword_407188;
if ( (dword_407188 & 2) != 0 )
{
translog_put_sector_protection(v6, *(unsigned __int16 *)(a2 + 50), *(unsigned int *)(a2 + 52));
*(_DWORD *)(a2 + 50) = 0;
result = (unsigned int)dword_407188;
}
if ( (result & 1) != 0 )
{
result = my_checksum(
0LL,
v6 + (unsigned __int16)word_4071A4,
0x2000 - (unsigned int)(unsigned __int16)word_4071A4);
*(_DWORD *)(v6 + 7) = result;
}
}
return result;
}
| translog_finish_page:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RAX,qword ptr [RSI + 0x28]
MOV RAX,qword ptr [RAX + 0x100010]
XOR RAX,qword ptr [RDI]
SHR RAX,0x20
JNZ 0x0013811d
MOV R14,RSI
CMP byte ptr [RSI + 0x38],0x0
JNZ 0x0013811d
MOVZX R13D,word ptr [R14 + 0x30]
MOV RBX,qword ptr [R14 + 0x20]
MOV byte ptr [R14 + 0x38],0x1
MOVZX EAX,R13W
CMP EAX,0x2000
JZ 0x001380d1
MOV R15,RDI
MOV EAX,0x2000
SUB EAX,R13D
MOVZX R12D,AX
MOV RDI,RBX
MOV ESI,0xff
MOV RDX,R12
CALL 0x0012a2c0
ADD qword ptr [R14 + 0x20],R12
ADD qword ptr [R15],R12
CMP byte ptr [R14 + 0x37],0x0
JNZ 0x001380ca
MOV RAX,qword ptr [R14 + 0x28]
ADD dword ptr [RAX + 0x100030],R12D
LAB_001380ca:
MOV word ptr [R14 + 0x30],0x0
LAB_001380d1:
SUB RBX,R13
MOV EAX,dword ptr [0x00507188]
TEST AL,0x2
JZ 0x001380fd
MOV EDX,dword ptr [R14 + 0x34]
MOVZX ESI,word ptr [R14 + 0x32]
MOV RDI,RBX
CALL 0x0013b91d
MOV dword ptr [R14 + 0x32],0x0
MOV EAX,dword ptr [0x00507188]
LAB_001380fd:
TEST AL,0x1
JZ 0x0013811d
MOVZX EAX,word ptr [0x005071a4]
LEA RSI,[RBX + RAX*0x1]
MOV EDX,0x2000
SUB EDX,EAX
XOR EDI,EDI
CALL 0x001aebe8
MOV dword ptr [RBX + 0x7],EAX
LAB_0013811d:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void translog_finish_page(ulong *param_1,long param_2)
{
ushort uVar1;
void *__s;
int4 uVar2;
long lVar3;
uint uVar4;
ulong __n;
if (((*(ulong *)(Elf64_Ehdr_00100000.e_ident_pad + *(long *)(param_2 + 0x28) + 7) ^ *param_1) >>
0x20 == 0) && (*(char *)(param_2 + 0x38) == '\0')) {
uVar1 = *(ushort *)(param_2 + 0x30);
__s = *(void **)(param_2 + 0x20);
*(int1 *)(param_2 + 0x38) = 1;
if (uVar1 != 0x2000) {
uVar4 = 0x2000 - uVar1 & 0xffff;
__n = (ulong)uVar4;
memset(__s,0xff,__n);
*(long *)(param_2 + 0x20) = *(long *)(param_2 + 0x20) + __n;
*param_1 = *param_1 + __n;
if (*(char *)(param_2 + 0x37) == '\0') {
*(uint *)(Elf64_Ehdr_00100000.e_ident_pad + *(long *)(param_2 + 0x28) + 0x27) =
*(int *)(Elf64_Ehdr_00100000.e_ident_pad + *(long *)(param_2 + 0x28) + 0x27) + uVar4;
}
*(int2 *)(param_2 + 0x30) = 0;
}
lVar3 = (long)__s - (ulong)uVar1;
if ((DAT_00507188 & 2) != 0) {
translog_put_sector_protection
(lVar3,*(int2 *)(param_2 + 0x32),*(int4 *)(param_2 + 0x34));
*(int4 *)(param_2 + 0x32) = 0;
}
if ((DAT_00507188 & 1) != 0) {
uVar2 = my_checksum(0,lVar3 + (ulong)(uint)DAT_005071a4,0x2000 - (uint)DAT_005071a4);
*(int4 *)(lVar3 + 7) = uVar2;
}
}
return;
}
| |
24,245 | tree_search | eloqsql/mysys/tree.c | void *tree_search(TREE *tree, void *key, void *custom_arg)
{
int cmp;
TREE_ELEMENT *element=tree->root;
for (;;)
{
if (element == &null_element)
return (void*) 0;
if ((cmp = (*tree->compare)(custom_arg, ELEMENT_KEY(tree,element),
key)) == 0)
return ELEMENT_KEY(tree,element);
if (cmp < 0)
element=element->right;
else
element=element->left;
}
} | O0 | c | tree_search:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
leaq 0x1c478a(%rip), %rax # 0x2bfc60
cmpq %rax, -0x30(%rbp)
jne 0xfb4e9
movq $0x0, -0x8(%rbp)
jmp 0xfb5a8
movq -0x10(%rbp), %rax
movq 0x228(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x208(%rax)
je 0xfb524
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x208(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
jmp 0xfb530
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq *%rax
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
jne 0xfb584
movq -0x10(%rbp), %rax
cmpl $0x0, 0x208(%rax)
je 0xfb56e
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x208(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
jmp 0xfb57a
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xfb5a8
cmpl $0x0, -0x24(%rbp)
jge 0xfb598
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0xfb5a3
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0xfb4cf
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| tree_search:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_30], rax
loc_FB4CF:
lea rax, null_element
cmp [rbp+var_30], rax
jnz short loc_FB4E9
mov [rbp+var_8], 0
jmp loc_FB5A8
loc_FB4E9:
mov rax, [rbp+var_10]
mov rax, [rax+228h]
mov [rbp+var_40], rax
mov rax, [rbp+var_20]
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
cmp dword ptr [rax+208h], 0
jz short loc_FB524
mov rax, [rbp+var_30]
mov rcx, [rbp+var_10]
mov ecx, [rcx+208h]
add rax, rcx
mov [rbp+var_48], rax
jmp short loc_FB530
loc_FB524:
mov rax, [rbp+var_30]
mov rax, [rax+18h]
mov [rbp+var_48], rax
loc_FB530:
mov rax, [rbp+var_40]
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_48]
mov rdx, [rbp+var_18]
call rax
mov [rbp+var_24], eax
cmp eax, 0
jnz short loc_FB584
mov rax, [rbp+var_10]
cmp dword ptr [rax+208h], 0
jz short loc_FB56E
mov rax, [rbp+var_30]
mov rcx, [rbp+var_10]
mov ecx, [rcx+208h]
add rax, rcx
mov [rbp+var_50], rax
jmp short loc_FB57A
loc_FB56E:
mov rax, [rbp+var_30]
mov rax, [rax+18h]
mov [rbp+var_50], rax
loc_FB57A:
mov rax, [rbp+var_50]
mov [rbp+var_8], rax
jmp short loc_FB5A8
loc_FB584:
cmp [rbp+var_24], 0
jge short loc_FB598
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov [rbp+var_30], rax
jmp short loc_FB5A3
loc_FB598:
mov rax, [rbp+var_30]
mov rax, [rax]
mov [rbp+var_30], rax
loc_FB5A3:
jmp loc_FB4CF
loc_FB5A8:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
| long long * tree_search(long long ***a1, long long a2, long long a3)
{
int v3; // eax
long long *v6; // [rsp+10h] [rbp-40h]
long long **v7; // [rsp+20h] [rbp-30h]
v7 = *a1;
while ( 1 )
{
if ( v7 == (long long **)&null_element )
return 0LL;
v6 = (long long *)a1[69];
v3 = *((_DWORD *)a1 + 130)
? ((long long ( *)(long long, char *, long long))v6)(a3, (char *)v7 + *((unsigned int *)a1 + 130), a2)
: ((long long ( *)(long long, long long *, long long))v6)(a3, v7[3], a2);
if ( !v3 )
break;
if ( v3 >= 0 )
v7 = (long long **)*v7;
else
v7 = (long long **)v7[1];
}
if ( *((_DWORD *)a1 + 130) )
return (long long *)((char *)v7 + *((unsigned int *)a1 + 130));
else
return v7[3];
}
| tree_search:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
LAB_001fb4cf:
LEA RAX,[0x3bfc60]
CMP qword ptr [RBP + -0x30],RAX
JNZ 0x001fb4e9
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001fb5a8
LAB_001fb4e9:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x228]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x208],0x0
JZ 0x001fb524
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x208]
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
JMP 0x001fb530
LAB_001fb524:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x48],RAX
LAB_001fb530:
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x18]
CALL RAX
MOV dword ptr [RBP + -0x24],EAX
CMP EAX,0x0
JNZ 0x001fb584
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x208],0x0
JZ 0x001fb56e
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x208]
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001fb57a
LAB_001fb56e:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x50],RAX
LAB_001fb57a:
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001fb5a8
LAB_001fb584:
CMP dword ptr [RBP + -0x24],0x0
JGE 0x001fb598
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001fb5a3
LAB_001fb598:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
LAB_001fb5a3:
JMP 0x001fb4cf
LAB_001fb5a8:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x50
POP RBP
RET
|
long tree_search(int8 *param_1,int8 param_2,int8 param_3)
{
int iVar1;
long local_58;
long local_50;
int8 *local_38;
local_38 = (int8 *)*param_1;
while( true ) {
if (local_38 == (int8 *)null_element) {
return 0;
}
if (*(int *)(param_1 + 0x41) == 0) {
local_50 = local_38[3];
}
else {
local_50 = (long)local_38 + (ulong)*(uint *)(param_1 + 0x41);
}
iVar1 = (*(code *)param_1[0x45])(param_3,local_50,param_2);
if (iVar1 == 0) break;
if (iVar1 < 0) {
local_38 = (int8 *)local_38[1];
}
else {
local_38 = (int8 *)*local_38;
}
}
if (*(int *)(param_1 + 0x41) == 0) {
local_58 = local_38[3];
}
else {
local_58 = (long)local_38 + (ulong)*(uint *)(param_1 + 0x41);
}
return local_58;
}
| |
24,246 | ma_checkpoint_init | eloqsql/storage/maria/ma_checkpoint.c | int ma_checkpoint_init(ulong interval)
{
int res= 0;
DBUG_ENTER("ma_checkpoint_init");
if (ma_service_thread_control_init(&checkpoint_control))
res= 1;
else if (interval > 0)
{
size_t intv= interval;
compile_time_assert(sizeof(void *) >= sizeof(ulong));
if ((res= mysql_thread_create(key_thread_checkpoint,
&checkpoint_control.thread, NULL,
ma_checkpoint_background,
(void*) intv)))
checkpoint_control.killed= TRUE;
}
else
checkpoint_control.killed= TRUE;
DBUG_RETURN(res);
} | O0 | c | ma_checkpoint_init:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
leaq 0x225966(%rip), %rdi # 0x2c6050
callq 0xa24c0
cmpl $0x0, %eax
je 0xa06fd
movl $0x1, -0xc(%rbp)
jmp 0xa074c
cmpq $0x0, -0x8(%rbp)
jbe 0xa0743
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0xa070e
leaq 0x3e2783(%rip), %rax # 0x482e98
movl (%rax), %edi
movq -0x18(%rbp), %r8
leaq 0x22592e(%rip), %rsi # 0x2c6050
xorl %eax, %eax
movl %eax, %edx
leaq 0x83(%rip), %rcx # 0xa07b0
callq 0xa0760
movl %eax, -0xc(%rbp)
cmpl $0x0, %eax
je 0xa0741
movb $0x1, 0x225917(%rip) # 0x2c6058
jmp 0xa074a
movb $0x1, 0x22590e(%rip) # 0x2c6058
jmp 0xa074c
jmp 0xa074e
movl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| ma_checkpoint_init:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], 0
lea rdi, checkpoint_control
call ma_service_thread_control_init
cmp eax, 0
jz short loc_A06FD
mov [rbp+var_C], 1
jmp short loc_A074C
loc_A06FD:
cmp [rbp+var_8], 0
jbe short loc_A0743
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
jmp short $+2
loc_A070E:
lea rax, key_thread_checkpoint
mov edi, [rax]
mov r8, [rbp+var_18]
lea rsi, checkpoint_control
xor eax, eax
mov edx, eax
lea rcx, ma_checkpoint_background
call inline_mysql_thread_create_0
mov [rbp+var_C], eax
cmp eax, 0
jz short loc_A0741
mov cs:byte_2C6058, 1
loc_A0741:
jmp short loc_A074A
loc_A0743:
mov cs:byte_2C6058, 1
loc_A074A:
jmp short $+2
loc_A074C:
jmp short $+2
loc_A074E:
mov eax, [rbp+var_C]
mov [rbp+var_1C], eax
mov eax, [rbp+var_1C]
add rsp, 20h
pop rbp
retn
| long long ma_checkpoint_init(long long a1)
{
unsigned int v2; // [rsp+14h] [rbp-Ch]
v2 = 0;
if ( (unsigned int)ma_service_thread_control_init(&checkpoint_control) )
{
return 1;
}
else if ( a1 )
{
v2 = inline_mysql_thread_create_0(key_thread_checkpoint, &checkpoint_control, 0LL, ma_checkpoint_background, a1);
if ( v2 )
byte_2C6058 = 1;
}
else
{
byte_2C6058 = 1;
}
return v2;
}
| ma_checkpoint_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],0x0
LEA RDI,[0x3c6050]
CALL 0x001a24c0
CMP EAX,0x0
JZ 0x001a06fd
MOV dword ptr [RBP + -0xc],0x1
JMP 0x001a074c
LAB_001a06fd:
CMP qword ptr [RBP + -0x8],0x0
JBE 0x001a0743
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001a070e
LAB_001a070e:
LEA RAX,[0x582e98]
MOV EDI,dword ptr [RAX]
MOV R8,qword ptr [RBP + -0x18]
LEA RSI,[0x3c6050]
XOR EAX,EAX
MOV EDX,EAX
LEA RCX,[0x1a07b0]
CALL 0x001a0760
MOV dword ptr [RBP + -0xc],EAX
CMP EAX,0x0
JZ 0x001a0741
MOV byte ptr [0x003c6058],0x1
LAB_001a0741:
JMP 0x001a074a
LAB_001a0743:
MOV byte ptr [0x003c6058],0x1
LAB_001a074a:
JMP 0x001a074c
LAB_001a074c:
JMP 0x001a074e
LAB_001a074e:
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x1c],EAX
MOV EAX,dword ptr [RBP + -0x1c]
ADD RSP,0x20
POP RBP
RET
|
int ma_checkpoint_init(long param_1)
{
int iVar1;
int local_14;
local_14 = 0;
iVar1 = ma_service_thread_control_init(checkpoint_control);
if (iVar1 == 0) {
if (param_1 == 0) {
checkpoint_control[8] = 1;
}
else {
local_14 = inline_mysql_thread_create
(key_thread_checkpoint,checkpoint_control,0,ma_checkpoint_background,
param_1);
if (local_14 != 0) {
checkpoint_control[8] = 1;
}
}
}
else {
local_14 = 1;
}
return local_14;
}
| |
24,247 | bf_set | bluesky950520[P]quickjs/libbf.c | int bf_set(bf_t *r, const bf_t *a)
{
if (r == a)
return 0;
if (bf_resize(r, a->len)) {
bf_set_nan(r);
return BF_ST_MEM_ERROR;
}
r->sign = a->sign;
r->expn = a->expn;
if (a->len > 0)
memcpy(r->tab, a->tab, a->len * sizeof(limb_t));
return 0;
} | O0 | c | bf_set:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq %rsi, (%rsp)
movq 0x8(%rsp), %rax
cmpq (%rsp), %rax
jne 0xec5d5
movl $0x0, 0x14(%rsp)
jmp 0xec655
movq 0x8(%rsp), %rdi
movq (%rsp), %rax
movq 0x18(%rax), %rsi
callq 0xec2c0
cmpl $0x0, %eax
je 0xec600
movq 0x8(%rsp), %rdi
callq 0xec490
movl $0x20, 0x14(%rsp)
jmp 0xec655
movq (%rsp), %rax
movl 0x8(%rax), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x8(%rax)
movq (%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rax)
movq (%rsp), %rax
cmpq $0x0, 0x18(%rax)
jbe 0xec64d
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rdi
movq (%rsp), %rax
movq 0x20(%rax), %rsi
movq (%rsp), %rax
movq 0x18(%rax), %rdx
shlq $0x3, %rdx
callq 0xe610
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nop
| bf_set:
sub rsp, 18h
mov [rsp+18h+var_10], rdi
mov [rsp+18h+var_18], rsi
mov rax, [rsp+18h+var_10]
cmp rax, [rsp+18h+var_18]
jnz short loc_EC5D5
mov [rsp+18h+var_4], 0
jmp loc_EC655
loc_EC5D5:
mov rdi, [rsp+18h+var_10]
mov rax, [rsp+18h+var_18]
mov rsi, [rax+18h]
call bf_resize
cmp eax, 0
jz short loc_EC600
mov rdi, [rsp+18h+var_10]
call bf_set_nan
mov [rsp+18h+var_4], 20h ; ' '
jmp short loc_EC655
loc_EC600:
mov rax, [rsp+18h+var_18]
mov ecx, [rax+8]
mov rax, [rsp+18h+var_10]
mov [rax+8], ecx
mov rax, [rsp+18h+var_18]
mov rcx, [rax+10h]
mov rax, [rsp+18h+var_10]
mov [rax+10h], rcx
mov rax, [rsp+18h+var_18]
cmp qword ptr [rax+18h], 0
jbe short loc_EC64D
mov rax, [rsp+18h+var_10]
mov rdi, [rax+20h]
mov rax, [rsp+18h+var_18]
mov rsi, [rax+20h]
mov rax, [rsp+18h+var_18]
mov rdx, [rax+18h]
shl rdx, 3
call _memcpy
loc_EC64D:
mov [rsp+18h+var_4], 0
loc_EC655:
mov eax, [rsp+18h+var_4]
add rsp, 18h
retn
| long long bf_set(long long a1, long long a2)
{
if ( a1 == a2 )
{
return 0;
}
else if ( (unsigned int)bf_resize((_QWORD *)a1, *(_QWORD *)(a2 + 24)) )
{
bf_set_nan(a1);
return 32;
}
else
{
*(_DWORD *)(a1 + 8) = *(_DWORD *)(a2 + 8);
*(_QWORD *)(a1 + 16) = *(_QWORD *)(a2 + 16);
if ( *(_QWORD *)(a2 + 24) )
memcpy(*(_QWORD *)(a1 + 32), *(_QWORD *)(a2 + 32), 8LL * *(_QWORD *)(a2 + 24));
return 0;
}
}
| bf_set:
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RDI
MOV qword ptr [RSP],RSI
MOV RAX,qword ptr [RSP + 0x8]
CMP RAX,qword ptr [RSP]
JNZ 0x001ec5d5
MOV dword ptr [RSP + 0x14],0x0
JMP 0x001ec655
LAB_001ec5d5:
MOV RDI,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP]
MOV RSI,qword ptr [RAX + 0x18]
CALL 0x001ec2c0
CMP EAX,0x0
JZ 0x001ec600
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001ec490
MOV dword ptr [RSP + 0x14],0x20
JMP 0x001ec655
LAB_001ec600:
MOV RAX,qword ptr [RSP]
MOV ECX,dword ptr [RAX + 0x8]
MOV RAX,qword ptr [RSP + 0x8]
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RSP]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RSP]
CMP qword ptr [RAX + 0x18],0x0
JBE 0x001ec64d
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RSP]
MOV RSI,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RSP]
MOV RDX,qword ptr [RAX + 0x18]
SHL RDX,0x3
CALL 0x0010e610
LAB_001ec64d:
MOV dword ptr [RSP + 0x14],0x0
LAB_001ec655:
MOV EAX,dword ptr [RSP + 0x14]
ADD RSP,0x18
RET
|
int4 bf_set(long param_1,long param_2)
{
int iVar1;
int4 local_4;
if (param_1 == param_2) {
local_4 = 0;
}
else {
iVar1 = bf_resize(param_1,*(int8 *)(param_2 + 0x18));
if (iVar1 == 0) {
*(int4 *)(param_1 + 8) = *(int4 *)(param_2 + 8);
*(int8 *)(param_1 + 0x10) = *(int8 *)(param_2 + 0x10);
if (*(long *)(param_2 + 0x18) != 0) {
memcpy(*(void **)(param_1 + 0x20),*(void **)(param_2 + 0x20),*(long *)(param_2 + 0x18) << 3)
;
}
local_4 = 0;
}
else {
bf_set_nan(param_1);
local_4 = 0x20;
}
}
return local_4;
}
| |
24,248 | bf_set | bluesky950520[P]quickjs/libbf.c | int bf_set(bf_t *r, const bf_t *a)
{
if (r == a)
return 0;
if (bf_resize(r, a->len)) {
bf_set_nan(r);
return BF_ST_MEM_ERROR;
}
r->sign = a->sign;
r->expn = a->expn;
if (a->len > 0)
memcpy(r->tab, a->tab, a->len * sizeof(limb_t));
return 0;
} | O2 | c | bf_set:
pushq %r15
pushq %r14
pushq %rbx
xorl %ebx, %ebx
cmpq %rsi, %rdi
je 0x7326c
movq %rsi, %r15
movq %rdi, %r14
movq 0x18(%rsi), %rsi
callq 0x730bf
testl %eax, %eax
je 0x73242
movq %r14, %rdi
callq 0x7317d
pushq $0x20
popq %rbx
jmp 0x7326c
movl 0x8(%r15), %eax
movl %eax, 0x8(%r14)
movq 0x10(%r15), %rax
movq %rax, 0x10(%r14)
movq 0x18(%r15), %rdx
testq %rdx, %rdx
je 0x7326c
movq 0x20(%r14), %rdi
movq 0x20(%r15), %rsi
shlq $0x3, %rdx
callq 0xe630
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
| bf_set:
push r15
push r14
push rbx
xor ebx, ebx
cmp rdi, rsi
jz short loc_7326C
mov r15, rsi
mov r14, rdi
mov rsi, [rsi+18h]
call bf_resize
test eax, eax
jz short loc_73242
mov rdi, r14
call bf_set_nan
push 20h ; ' '
pop rbx
jmp short loc_7326C
loc_73242:
mov eax, [r15+8]
mov [r14+8], eax
mov rax, [r15+10h]
mov [r14+10h], rax
mov rdx, [r15+18h]
test rdx, rdx
jz short loc_7326C
mov rdi, [r14+20h]
mov rsi, [r15+20h]
shl rdx, 3
call _memcpy
loc_7326C:
mov eax, ebx
pop rbx
pop r14
pop r15
retn
| long long bf_set(long long a1, long long a2)
{
unsigned int v2; // ebx
long long v3; // rdx
v2 = 0;
if ( a1 != a2 )
{
if ( (unsigned int)bf_resize(a1, *(_QWORD *)(a2 + 24)) )
{
bf_set_nan(a1);
return 32;
}
else
{
*(_DWORD *)(a1 + 8) = *(_DWORD *)(a2 + 8);
*(_QWORD *)(a1 + 16) = *(_QWORD *)(a2 + 16);
v3 = *(_QWORD *)(a2 + 24);
if ( v3 )
memcpy(*(_QWORD *)(a1 + 32), *(_QWORD *)(a2 + 32), 8 * v3);
}
}
return v2;
}
| bf_set:
PUSH R15
PUSH R14
PUSH RBX
XOR EBX,EBX
CMP RDI,RSI
JZ 0x0017326c
MOV R15,RSI
MOV R14,RDI
MOV RSI,qword ptr [RSI + 0x18]
CALL 0x001730bf
TEST EAX,EAX
JZ 0x00173242
MOV RDI,R14
CALL 0x0017317d
PUSH 0x20
POP RBX
JMP 0x0017326c
LAB_00173242:
MOV EAX,dword ptr [R15 + 0x8]
MOV dword ptr [R14 + 0x8],EAX
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [R14 + 0x10],RAX
MOV RDX,qword ptr [R15 + 0x18]
TEST RDX,RDX
JZ 0x0017326c
MOV RDI,qword ptr [R14 + 0x20]
MOV RSI,qword ptr [R15 + 0x20]
SHL RDX,0x3
CALL 0x0010e630
LAB_0017326c:
MOV EAX,EBX
POP RBX
POP R14
POP R15
RET
|
int8 bf_set(long param_1,long param_2)
{
int iVar1;
int8 uVar2;
uVar2 = 0;
if (param_1 != param_2) {
iVar1 = bf_resize(param_1,*(int8 *)(param_2 + 0x18));
if (iVar1 == 0) {
*(int4 *)(param_1 + 8) = *(int4 *)(param_2 + 8);
*(int8 *)(param_1 + 0x10) = *(int8 *)(param_2 + 0x10);
if (*(long *)(param_2 + 0x18) != 0) {
memcpy(*(void **)(param_1 + 0x20),*(void **)(param_2 + 0x20),*(long *)(param_2 + 0x18) << 3)
;
uVar2 = 0;
}
}
else {
bf_set_nan(param_1);
uVar2 = 0x20;
}
}
return uVar2;
}
| |
24,249 | translog_buffer_flush | eloqsql/storage/maria/ma_loghandler.c | static my_bool translog_buffer_flush(struct st_translog_buffer *buffer)
{
uint32 i, pg;
TRANSLOG_ADDRESS offset= buffer->offset;
TRANSLOG_FILE *file= buffer->file;
uint8 ver= buffer->ver;
uint skipped_data;
DBUG_ENTER("translog_buffer_flush");
DBUG_PRINT("enter",
("Buffer: #%u %p file: %d offset: " LSN_FMT " size: %lu",
(uint) buffer->buffer_no, buffer,
buffer->file->handler.file,
LSN_IN_PARTS(buffer->offset),
(ulong) buffer->size));
translog_buffer_lock_assert_owner(buffer);
if (buffer->file == NULL)
DBUG_RETURN(0);
translog_wait_for_writers(buffer);
if (buffer->file != file || buffer->offset != offset || buffer->ver != ver)
DBUG_RETURN(0); /* some the thread flushed the buffer already */
if (buffer->is_closing_buffer)
{
/* some other flush in progress */
translog_wait_for_closing(buffer);
if (buffer->file != file || buffer->offset != offset || buffer->ver != ver)
DBUG_RETURN(0); /* some the thread flushed the buffer already */
}
if (buffer->overlay && translog_prev_buffer_flush_wait(buffer))
DBUG_RETURN(0); /* some the thread flushed the buffer already */
/*
Send page by page in the pagecache what we are going to write on the
disk
*/
file= buffer->file;
skipped_data= buffer->skipped_data;
DBUG_ASSERT(skipped_data < TRANSLOG_PAGE_SIZE);
for (i= 0, pg= LSN_OFFSET(buffer->offset) / TRANSLOG_PAGE_SIZE;
i < buffer->size;
i+= TRANSLOG_PAGE_SIZE, pg++)
{
#ifndef DBUG_OFF
TRANSLOG_ADDRESS addr= (buffer->offset + i);
#endif
DBUG_PRINT("info", ("send log form %lu till %lu address: " LSN_FMT " "
"page #: %lu buffer size: %lu buffer: %p",
(ulong) i, (ulong) (i + TRANSLOG_PAGE_SIZE),
LSN_IN_PARTS(addr), (ulong) pg, (ulong) buffer->size,
buffer));
DBUG_ASSERT(log_descriptor.pagecache->block_size == TRANSLOG_PAGE_SIZE);
DBUG_ASSERT(i + TRANSLOG_PAGE_SIZE <= buffer->size);
if (translog_status != TRANSLOG_OK && translog_status != TRANSLOG_SHUTDOWN)
DBUG_RETURN(1);
if (pagecache_write_part(log_descriptor.pagecache,
&file->handler, pg, 3,
buffer->buffer + i,
PAGECACHE_PLAIN_PAGE,
PAGECACHE_LOCK_LEFT_UNLOCKED,
PAGECACHE_PIN_LEFT_UNPINNED,
PAGECACHE_WRITE_DONE, 0,
LSN_IMPOSSIBLE,
skipped_data,
TRANSLOG_PAGE_SIZE - skipped_data))
{
DBUG_PRINT("error",
("Can't write page " LSN_FMT " to pagecache, error: %d",
buffer->file->number,
(uint)(LSN_OFFSET(buffer->offset)+ i),
my_errno));
translog_stop_writing();
DBUG_RETURN(1);
}
skipped_data= 0;
}
file->is_sync= 0;
if (my_pwrite(file->handler.file, buffer->buffer + buffer->skipped_data,
buffer->size - buffer->skipped_data,
LSN_OFFSET(buffer->offset) + buffer->skipped_data,
log_write_flags))
{
DBUG_PRINT("error", ("Can't write buffer " LSN_FMT " size %lu "
"to the disk (%d)",
(uint) file->handler.file,
(uint) LSN_OFFSET(buffer->offset),
(ulong) buffer->size, errno));
translog_stop_writing();
DBUG_RETURN(1);
}
/*
Dropping the flag in such way can make false alarm: signalling than the
file in not sync when it is sync, but the situation is quite rare and
protections with mutexes give much more overhead to the whole engine
*/
file->is_sync= 0;
if (LSN_OFFSET(buffer->last_lsn) != 0) /* if buffer->last_lsn is set */
{
if (translog_prev_buffer_flush_wait(buffer))
DBUG_RETURN(0); /* some the thread flushed the buffer already */
translog_set_sent_to_disk(buffer);
}
else
translog_set_only_in_buffers(buffer->next_buffer_offset);
/* say to next buffer that we are finished */
{
struct st_translog_buffer *next_buffer=
log_descriptor.buffers + ((buffer->buffer_no + 1) % TRANSLOG_BUFFERS_NO);
if (likely(translog_status == TRANSLOG_OK)){
translog_buffer_lock(next_buffer);
next_buffer->prev_sent_to_disk= buffer->offset;
translog_buffer_unlock(next_buffer);
mysql_cond_broadcast(&next_buffer->prev_sent_to_disk_cond);
}
else
{
/*
It is shutdown =>
1) there is only one thread
2) mutexes of other buffers can be destroyed => we can't use them
*/
next_buffer->prev_sent_to_disk= buffer->offset;
}
}
/* Free buffer */
buffer->file= NULL;
buffer->overlay= 0;
buffer->ver++;
mysql_mutex_lock(&log_descriptor.dirty_buffer_mask_lock);
log_descriptor.dirty_buffer_mask&= ~(1 << buffer->buffer_no);
mysql_mutex_unlock(&log_descriptor.dirty_buffer_mask_lock);
mysql_cond_broadcast(&buffer->waiting_filling_buffer);
DBUG_RETURN(0);
} | O3 | c | translog_buffer_flush:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq 0x100038(%rdi), %r12
testq %r12, %r12
je 0x474eb
movq %rdi, %rbx
movq 0x100010(%rdi), %r13
movb 0x1000d9(%rdi), %r14b
callq 0x496a0
movq 0x100038(%rbx), %rax
cmpq %r12, %rax
jne 0x474eb
cmpq %r13, 0x100010(%rbx)
jne 0x474eb
cmpb %r14b, 0x1000d9(%rbx)
jne 0x474eb
cmpb $0x0, 0x1000d8(%rbx)
je 0x474d6
movb %r14b, -0x30(%rbp)
leaq 0x100040(%rbx), %r14
leaq 0x100090(%rbx), %r15
cmpq $0x0, 0x100070(%rbx)
jne 0x4749d
movq %r14, %rdi
movq %r15, %rsi
callq 0x2a480
cmpb $0x0, 0x1000d8(%rbx)
jne 0x4747d
jmp 0x474b6
movq %r14, %rdi
movq %r15, %rsi
leaq 0xb1e3e(%rip), %rdx # 0xf92e8
movl $0x7e6, %ecx # imm = 0x7E6
callq 0x315fb
jmp 0x47492
movq 0x100038(%rbx), %rax
cmpq %r12, %rax
movb -0x30(%rbp), %cl
jne 0x474eb
cmpq %r13, 0x100010(%rbx)
jne 0x474eb
cmpb %cl, 0x1000d9(%rbx)
jne 0x474eb
cmpb $0x0, 0x100088(%rbx)
je 0x47507
movq %rbx, %rdi
callq 0x435d6
testb %al, %al
je 0x47500
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x100038(%rbx), %rax
movq %rax, %r12
cmpl $0x0, 0x100030(%rbx)
je 0x475b1
movl 0x100010(%rbx), %r13d
movl 0x100034(%rbx), %eax
shrl $0xd, %r13d
leaq 0x8(%r12), %rcx
movq %rcx, -0x30(%rbp)
xorl %r15d, %r15d
movl 0x3de466(%rip), %ecx # 0x4259a0
andl $-0x3, %ecx
movb $0x1, %r14b
cmpl $0x1, %ecx
jne 0x474ee
movq 0x3df664(%rip), %rdi # 0x426bb0
movl %r13d, %edx
movl %r15d, %r8d
addq %rbx, %r8
movl $0x2000, %ecx # imm = 0x2000
subl %eax, %ecx
movl %ecx, 0x30(%rsp)
movl %eax, 0x28(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movl $0x1, %eax
movl %eax, 0x10(%rsp)
movl %eax, 0x8(%rsp)
movl $0x0, (%rsp)
movq -0x30(%rbp), %rsi
movl $0x3, %ecx
movl $0x1, %r9d
callq 0x4d6ba
testb %al, %al
jne 0x47648
addl $0x2000, %r15d # imm = 0x2000
incl %r13d
xorl %eax, %eax
cmpl 0x100030(%rbx), %r15d
jb 0x47534
movb $0x0, 0x51(%r12)
movl 0x18(%r12), %edi
movl 0x100034(%rbx), %eax
leaq (%rbx,%rax), %rsi
movl 0x100010(%rbx), %ecx
movl 0x100030(%rbx), %edx
subl %eax, %edx
addq %rax, %rcx
movl $0x34, %r8d
callq 0xbfd5e
testq %rax, %rax
je 0x47614
xorl %eax, %eax
cmpl $0x3, 0x3de3b0(%rip) # 0x4259a0
setne %al
addl %eax, %eax
movl %eax, 0x3de3a5(%rip) # 0x4259a0
movb $0x1, 0xbe047e(%rip) # 0xc27a80
movl $0x0, 0x3df5b0(%rip) # 0x426bbc
movb $0x1, %r14b
jmp 0x474ee
movb $0x0, 0x51(%r12)
cmpl $0x0, 0x100000(%rbx)
je 0x47672
movq %rbx, %rdi
callq 0x435d6
testb %al, %al
jne 0x474eb
movq 0x100000(%rbx), %rdi
movq 0x100018(%rbx), %rsi
callq 0x4a8e2
jmp 0x4767e
xorl %eax, %eax
cmpl $0x3, 0x3de34f(%rip) # 0x4259a0
setne %al
addl %eax, %eax
movl %eax, 0x3de344(%rip) # 0x4259a0
movb $0x1, 0xbe041d(%rip) # 0xc27a80
movl $0x0, 0x3df54f(%rip) # 0x426bbc
jmp 0x474ee
movq 0x100018(%rbx), %rdi
callq 0x4a951
movl 0x10008c(%rbx), %eax
incl %eax
andl $0x7, %eax
imulq $0x100120, %rax, %rax # imm = 0x100120
leaq 0x3df519(%rip), %rcx # 0x426bb0
leaq (%rax,%rcx), %r14
addq $0x2f8, %r14 # imm = 0x2F8
cmpl $0x1, 0x3de2f7(%rip) # 0x4259a0
jne 0x47776
movq %r14, %rdi
callq 0x43733
movq 0x100010(%rbx), %rax
movq %rax, 0x1000e0(%r14)
movq 0x1000d0(%r14), %rdi
testq %rdi, %rdi
jne 0x477ad
leaq 0x100090(%r14), %rdi
callq 0x2a1f0
movq 0x100118(%r14), %rdi
addq $0x1000e8, %r14 # imm = 0x1000E8
testq %rdi, %rdi
jne 0x477c2
movq %r14, %rdi
callq 0x2a7a0
movq $0x0, 0x100038(%rbx)
movb $0x0, 0x100088(%rbx)
incb 0x1000d9(%rbx)
leaq 0xbe0091(%rip), %rdi # 0xc277b0
movl $0xabf, %esi # imm = 0xABF
callq 0x43456
movb 0x10008c(%rbx), %cl
movl $0x1, %eax
shll %cl, %eax
notb %al
andb %al, 0xbe006a(%rip) # 0xc277a8
movq 0xbe00ab(%rip), %rdi # 0xc277f0
testq %rdi, %rdi
jne 0x47789
leaq 0xbe005f(%rip), %rdi # 0xc277b0
callq 0x2a1f0
movq 0x100070(%rbx), %rdi
addq $0x100040, %rbx # imm = 0x100040
testq %rdi, %rdi
jne 0x4779b
movq %rbx, %rdi
callq 0x2a7a0
jmp 0x474eb
movq 0x100010(%rbx), %rax
movq %rax, 0x1000e0(%r14)
jmp 0x47700
leaq 0x367288(%rip), %rax # 0x3aea18
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x4774a
leaq 0x367276(%rip), %rax # 0x3aea18
movq (%rax), %rax
callq *0x178(%rax)
jmp 0x47769
leaq 0x367264(%rip), %rax # 0x3aea18
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x476d5
leaq 0x36724f(%rip), %rax # 0x3aea18
movq (%rax), %rax
callq *0x178(%rax)
jmp 0x476f8
| translog_buffer_flush:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r12, [rdi+100038h]
test r12, r12
jz loc_474EB
mov rbx, rdi
mov r13, [rdi+100010h]
mov r14b, [rdi+1000D9h]
call translog_wait_for_writers
mov rax, [rbx+100038h]
cmp rax, r12
jnz loc_474EB
cmp [rbx+100010h], r13
jnz loc_474EB
cmp [rbx+1000D9h], r14b
jnz loc_474EB
cmp byte ptr [rbx+1000D8h], 0
jz short loc_474D6
mov byte ptr [rbp+var_30], r14b
lea r14, [rbx+100040h]
lea r15, [rbx+100090h]
loc_4747D:
cmp qword ptr [rbx+100070h], 0
jnz short loc_4749D
mov rdi, r14
mov rsi, r15
call _pthread_cond_wait
loc_47492:
cmp byte ptr [rbx+1000D8h], 0
jnz short loc_4747D
jmp short loc_474B6
loc_4749D:
mov rdi, r14
mov rsi, r15
lea rdx, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 7E6h
call psi_cond_wait
jmp short loc_47492
loc_474B6:
mov rax, [rbx+100038h]
cmp rax, r12
mov cl, byte ptr [rbp+var_30]
jnz short loc_474EB
cmp [rbx+100010h], r13
jnz short loc_474EB
cmp [rbx+1000D9h], cl
jnz short loc_474EB
loc_474D6:
cmp byte ptr [rbx+100088h], 0
jz short loc_47507
mov rdi, rbx
call translog_prev_buffer_flush_wait
test al, al
jz short loc_47500
loc_474EB:
xor r14d, r14d
loc_474EE:
mov eax, r14d
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_47500:
mov rax, [rbx+100038h]
loc_47507:
mov r12, rax
cmp dword ptr [rbx+100030h], 0
jz loc_475B1
mov r13d, [rbx+100010h]
mov eax, [rbx+100034h]
shr r13d, 0Dh
lea rcx, [r12+8]
mov [rbp+var_30], rcx
xor r15d, r15d
loc_47534:
mov ecx, cs:translog_status
and ecx, 0FFFFFFFDh
mov r14b, 1
cmp ecx, 1
jnz short loc_474EE
mov rdi, cs:log_descriptor
mov edx, r13d
mov r8d, r15d
add r8, rbx
mov ecx, 2000h
sub ecx, eax
mov [rsp+70h+var_40], ecx
mov [rsp+70h+var_48], eax
xorps xmm0, xmm0
movups [rsp+70h+var_58], xmm0
mov eax, 1
mov [rsp+70h+var_60], eax
mov [rsp+70h+var_68], eax
mov [rsp+70h+var_70], 0
mov rsi, [rbp+var_30]
mov ecx, 3
mov r9d, 1
call pagecache_write_part
test al, al
jnz loc_47648
add r15d, 2000h
inc r13d
xor eax, eax
cmp r15d, [rbx+100030h]
jb short loc_47534
loc_475B1:
mov byte ptr [r12+51h], 0
mov edi, [r12+18h]
mov eax, [rbx+100034h]
lea rsi, [rbx+rax]
mov ecx, [rbx+100010h]
mov edx, [rbx+100030h]
sub edx, eax
add rcx, rax
mov r8d, 34h ; '4'
call my_pwrite
test rax, rax
jz short loc_47614
xor eax, eax
cmp cs:translog_status, 3
setnz al
add eax, eax
mov cs:translog_status, eax
mov byte ptr cs:word_C27A80, 1
mov cs:dword_426BBC, 0
mov r14b, 1
jmp loc_474EE
loc_47614:
mov byte ptr [r12+51h], 0
cmp dword ptr [rbx+100000h], 0
jz short loc_47672
mov rdi, rbx
call translog_prev_buffer_flush_wait
test al, al
jnz loc_474EB
mov rdi, [rbx+100000h]
mov rsi, [rbx+100018h]
call translog_set_sent_to_disk
jmp short loc_4767E
loc_47648:
xor eax, eax
cmp cs:translog_status, 3
setnz al
add eax, eax
mov cs:translog_status, eax
mov byte ptr cs:word_C27A80, 1
mov cs:dword_426BBC, 0
jmp loc_474EE
loc_47672:
mov rdi, [rbx+100018h]
call translog_set_only_in_buffers
loc_4767E:
mov eax, [rbx+10008Ch]
inc eax
and eax, 7
imul rax, 100120h
lea rcx, log_descriptor
lea r14, [rax+rcx]
add r14, 2F8h
cmp cs:translog_status, 1
jnz loc_47776
mov rdi, r14
call translog_buffer_lock
mov rax, [rbx+100010h]
mov [r14+1000E0h], rax
mov rdi, [r14+1000D0h]
test rdi, rdi
jnz loc_477AD
loc_476D5:
lea rdi, [r14+100090h]
call _pthread_mutex_unlock
mov rdi, [r14+100118h]
add r14, 1000E8h
test rdi, rdi
jnz loc_477C2
loc_476F8:
mov rdi, r14
call _pthread_cond_broadcast
loc_47700:
mov qword ptr [rbx+100038h], 0
mov byte ptr [rbx+100088h], 0
inc byte ptr [rbx+1000D9h]
lea rdi, unk_C277B0
mov esi, 0ABFh
call inline_mysql_mutex_lock_0
mov cl, [rbx+10008Ch]
mov eax, 1
shl eax, cl
not al
and cs:byte_C277A8, al
mov rdi, cs:qword_C277F0
test rdi, rdi
jnz short loc_47789
loc_4774A:
lea rdi, unk_C277B0
call _pthread_mutex_unlock
mov rdi, [rbx+100070h]
add rbx, 100040h
test rdi, rdi
jnz short loc_4779B
loc_47769:
mov rdi, rbx
call _pthread_cond_broadcast
jmp loc_474EB
loc_47776:
mov rax, [rbx+100010h]
mov [r14+1000E0h], rax
jmp loc_47700
loc_47789:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_4774A
loc_4779B:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+178h]
jmp short loc_47769
loc_477AD:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_476D5
loc_477C2:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+178h]
jmp loc_476F8
| long long translog_buffer_flush(long long a1)
{
unsigned int v1; // r14d
long long v2; // r12
long long v4; // r13
char v5; // r14
long long v6; // rax
long long v8; // r12
int v9; // eax
int v10; // r13d
unsigned int v11; // r15d
long long v12; // rax
long long *v13; // r14
long long v14; // rdi
long long *v15; // r14
long long v16; // rdi
long long v17; // rbx
char v18; // [rsp+40h] [rbp-30h]
v2 = *(_QWORD *)(a1 + 1048632);
if ( !v2 )
return 0;
v4 = *(_QWORD *)(a1 + 1048592);
v5 = *(_BYTE *)(a1 + 1048793);
translog_wait_for_writers(a1);
v6 = *(_QWORD *)(a1 + 1048632);
if ( v6 != v2 || *(_QWORD *)(a1 + 1048592) != v4 || *(_BYTE *)(a1 + 1048793) != v5 )
return 0;
if ( *(_BYTE *)(a1 + 1048792) )
{
v18 = v5;
v1 = a1 + 1048640;
do
{
if ( *(_QWORD *)(a1 + 1048688) )
psi_cond_wait(
a1 + 1048640,
a1 + 1048720,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x7E6u);
else
pthread_cond_wait(a1 + 1048640, a1 + 1048720);
}
while ( *(_BYTE *)(a1 + 1048792) );
v6 = *(_QWORD *)(a1 + 1048632);
if ( v6 != v2 || *(_QWORD *)(a1 + 1048592) != v4 || *(_BYTE *)(a1 + 1048793) != v18 )
return 0;
}
if ( *(_BYTE *)(a1 + 1048712) )
{
if ( translog_prev_buffer_flush_wait(a1) )
return 0;
v6 = *(_QWORD *)(a1 + 1048632);
}
v8 = v6;
if ( !*(_DWORD *)(a1 + 1048624) )
{
LABEL_25:
*(_BYTE *)(v8 + 81) = 0;
if ( my_pwrite(
*(unsigned int *)(v8 + 24),
a1 + *(unsigned int *)(a1 + 1048628),
(unsigned int)(*(_DWORD *)(a1 + 1048624) - *(_DWORD *)(a1 + 1048628)),
*(unsigned int *)(a1 + 1048628) + (unsigned long long)*(unsigned int *)(a1 + 1048592),
52LL) )
{
translog_status = 2 * (translog_status != 3);
LOBYTE(word_C27A80) = 1;
dword_426BBC = 0;
LOBYTE(v1) = 1;
return v1;
}
*(_BYTE *)(v8 + 81) = 0;
if ( *(_DWORD *)(a1 + 0x100000) )
{
if ( translog_prev_buffer_flush_wait(a1) )
return 0;
translog_set_sent_to_disk(*(_QWORD *)(a1 + 0x100000), *(_QWORD *)(a1 + 1048600));
}
else
{
translog_set_only_in_buffers(*(_QWORD *)(a1 + 1048600));
}
v12 = 131108LL * (((unsigned __int8)*(_DWORD *)(a1 + 1048716) + 1) & 7);
v13 = &log_descriptor[v12 + 95];
if ( translog_status == 1 )
{
translog_buffer_lock((long long)&log_descriptor[v12 + 95]);
v13[131100] = *(_QWORD *)(a1 + 1048592);
if ( v13[131098] )
PSI_server[44]();
pthread_mutex_unlock(v13 + 131090);
v14 = v13[131107];
v15 = v13 + 131101;
if ( v14 )
PSI_server[47]();
pthread_cond_broadcast(v15);
}
else
{
log_descriptor[v12 + 131195] = *(_QWORD *)(a1 + 1048592);
}
*(_QWORD *)(a1 + 1048632) = 0LL;
*(_BYTE *)(a1 + 1048712) = 0;
++*(_BYTE *)(a1 + 1048793);
inline_mysql_mutex_lock_0((long long)&unk_C277B0, 0xABFu);
byte_C277A8 &= ~(unsigned __int8)(1 << *(_BYTE *)(a1 + 1048716));
if ( qword_C277F0 )
PSI_server[44]();
pthread_mutex_unlock(&unk_C277B0);
v16 = *(_QWORD *)(a1 + 1048688);
v17 = a1 + 1048640;
if ( v16 )
PSI_server[47]();
pthread_cond_broadcast(v17);
return 0;
}
v9 = *(_DWORD *)(a1 + 1048628);
v10 = *(_DWORD *)(a1 + 1048592) >> 13;
v11 = 0;
while ( 1 )
{
LOBYTE(v1) = 1;
if ( (translog_status & 0xFFFFFFFD) != 1 )
return v1;
if ( (unsigned __int8)pagecache_write_part(
log_descriptor[0],
(int)v8 + 8,
v10,
3,
(unsigned int)a1 + v11,
1,
0,
1,
1,
0LL,
0LL,
v9,
0x2000 - v9) )
{
translog_status = 2 * (translog_status != 3);
LOBYTE(word_C27A80) = 1;
dword_426BBC = 0;
return v1;
}
v11 += 0x2000;
++v10;
v9 = 0;
if ( v11 >= *(_DWORD *)(a1 + 1048624) )
goto LABEL_25;
}
}
| translog_buffer_flush:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R12,qword ptr [RDI + 0x100038]
TEST R12,R12
JZ 0x001474eb
MOV RBX,RDI
MOV R13,qword ptr [RDI + 0x100010]
MOV R14B,byte ptr [RDI + 0x1000d9]
CALL 0x001496a0
MOV RAX,qword ptr [RBX + 0x100038]
CMP RAX,R12
JNZ 0x001474eb
CMP qword ptr [RBX + 0x100010],R13
JNZ 0x001474eb
CMP byte ptr [RBX + 0x1000d9],R14B
JNZ 0x001474eb
CMP byte ptr [RBX + 0x1000d8],0x0
JZ 0x001474d6
MOV byte ptr [RBP + -0x30],R14B
LEA R14,[RBX + 0x100040]
LEA R15,[RBX + 0x100090]
LAB_0014747d:
CMP qword ptr [RBX + 0x100070],0x0
JNZ 0x0014749d
MOV RDI,R14
MOV RSI,R15
CALL 0x0012a480
LAB_00147492:
CMP byte ptr [RBX + 0x1000d8],0x0
JNZ 0x0014747d
JMP 0x001474b6
LAB_0014749d:
MOV RDI,R14
MOV RSI,R15
LEA RDX,[0x1f92e8]
MOV ECX,0x7e6
CALL 0x001315fb
JMP 0x00147492
LAB_001474b6:
MOV RAX,qword ptr [RBX + 0x100038]
CMP RAX,R12
MOV CL,byte ptr [RBP + -0x30]
JNZ 0x001474eb
CMP qword ptr [RBX + 0x100010],R13
JNZ 0x001474eb
CMP byte ptr [RBX + 0x1000d9],CL
JNZ 0x001474eb
LAB_001474d6:
CMP byte ptr [RBX + 0x100088],0x0
JZ 0x00147507
MOV RDI,RBX
CALL 0x001435d6
TEST AL,AL
JZ 0x00147500
LAB_001474eb:
XOR R14D,R14D
LAB_001474ee:
MOV EAX,R14D
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00147500:
MOV RAX,qword ptr [RBX + 0x100038]
LAB_00147507:
MOV R12,RAX
CMP dword ptr [RBX + 0x100030],0x0
JZ 0x001475b1
MOV R13D,dword ptr [RBX + 0x100010]
MOV EAX,dword ptr [RBX + 0x100034]
SHR R13D,0xd
LEA RCX,[R12 + 0x8]
MOV qword ptr [RBP + -0x30],RCX
XOR R15D,R15D
LAB_00147534:
MOV ECX,dword ptr [0x005259a0]
AND ECX,0xfffffffd
MOV R14B,0x1
CMP ECX,0x1
JNZ 0x001474ee
MOV RDI,qword ptr [0x00526bb0]
MOV EDX,R13D
MOV R8D,R15D
ADD R8,RBX
MOV ECX,0x2000
SUB ECX,EAX
MOV dword ptr [RSP + 0x30],ECX
MOV dword ptr [RSP + 0x28],EAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x18],XMM0
MOV EAX,0x1
MOV dword ptr [RSP + 0x10],EAX
MOV dword ptr [RSP + 0x8],EAX
MOV dword ptr [RSP],0x0
MOV RSI,qword ptr [RBP + -0x30]
MOV ECX,0x3
MOV R9D,0x1
CALL 0x0014d6ba
TEST AL,AL
JNZ 0x00147648
ADD R15D,0x2000
INC R13D
XOR EAX,EAX
CMP R15D,dword ptr [RBX + 0x100030]
JC 0x00147534
LAB_001475b1:
MOV byte ptr [R12 + 0x51],0x0
MOV EDI,dword ptr [R12 + 0x18]
MOV EAX,dword ptr [RBX + 0x100034]
LEA RSI,[RBX + RAX*0x1]
MOV ECX,dword ptr [RBX + 0x100010]
MOV EDX,dword ptr [RBX + 0x100030]
SUB EDX,EAX
ADD RCX,RAX
MOV R8D,0x34
CALL 0x001bfd5e
TEST RAX,RAX
JZ 0x00147614
XOR EAX,EAX
CMP dword ptr [0x005259a0],0x3
SETNZ AL
ADD EAX,EAX
MOV dword ptr [0x005259a0],EAX
MOV byte ptr [0x00d27a80],0x1
MOV dword ptr [0x00526bbc],0x0
MOV R14B,0x1
JMP 0x001474ee
LAB_00147614:
MOV byte ptr [R12 + 0x51],0x0
CMP dword ptr [RBX + 0x100000],0x0
JZ 0x00147672
MOV RDI,RBX
CALL 0x001435d6
TEST AL,AL
JNZ 0x001474eb
MOV RDI,qword ptr [RBX + 0x100000]
MOV RSI,qword ptr [RBX + 0x100018]
CALL 0x0014a8e2
JMP 0x0014767e
LAB_00147648:
XOR EAX,EAX
CMP dword ptr [0x005259a0],0x3
SETNZ AL
ADD EAX,EAX
MOV dword ptr [0x005259a0],EAX
MOV byte ptr [0x00d27a80],0x1
MOV dword ptr [0x00526bbc],0x0
JMP 0x001474ee
LAB_00147672:
MOV RDI,qword ptr [RBX + 0x100018]
CALL 0x0014a951
LAB_0014767e:
MOV EAX,dword ptr [RBX + 0x10008c]
INC EAX
AND EAX,0x7
IMUL RAX,RAX,0x100120
LEA RCX,[0x526bb0]
LEA R14,[RAX + RCX*0x1]
ADD R14,0x2f8
CMP dword ptr [0x005259a0],0x1
JNZ 0x00147776
MOV RDI,R14
CALL 0x00143733
MOV RAX,qword ptr [RBX + 0x100010]
MOV qword ptr [R14 + 0x1000e0],RAX
MOV RDI,qword ptr [R14 + 0x1000d0]
TEST RDI,RDI
JNZ 0x001477ad
LAB_001476d5:
LEA RDI,[R14 + 0x100090]
CALL 0x0012a1f0
MOV RDI,qword ptr [R14 + 0x100118]
ADD R14,0x1000e8
TEST RDI,RDI
JNZ 0x001477c2
LAB_001476f8:
MOV RDI,R14
CALL 0x0012a7a0
LAB_00147700:
MOV qword ptr [RBX + 0x100038],0x0
MOV byte ptr [RBX + 0x100088],0x0
INC byte ptr [RBX + 0x1000d9]
LEA RDI,[0xd277b0]
MOV ESI,0xabf
CALL 0x00143456
MOV CL,byte ptr [RBX + 0x10008c]
MOV EAX,0x1
SHL EAX,CL
NOT AL
AND byte ptr [0x00d277a8],AL
MOV RDI,qword ptr [0x00d277f0]
TEST RDI,RDI
JNZ 0x00147789
LAB_0014774a:
LEA RDI,[0xd277b0]
CALL 0x0012a1f0
MOV RDI,qword ptr [RBX + 0x100070]
ADD RBX,0x100040
TEST RDI,RDI
JNZ 0x0014779b
LAB_00147769:
MOV RDI,RBX
CALL 0x0012a7a0
JMP 0x001474eb
LAB_00147776:
MOV RAX,qword ptr [RBX + 0x100010]
MOV qword ptr [R14 + 0x1000e0],RAX
JMP 0x00147700
LAB_00147789:
LEA RAX,[0x4aea18]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0014774a
LAB_0014779b:
LEA RAX,[0x4aea18]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x178]
JMP 0x00147769
LAB_001477ad:
LEA RAX,[0x4aea18]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001476d5
LAB_001477c2:
LEA RAX,[0x4aea18]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x178]
JMP 0x001476f8
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
ulong translog_buffer_flush(long param_1)
{
pthread_mutex_t *__mutex;
char *pcVar1;
long lVar2;
char cVar3;
int iVar4;
long lVar5;
long lVar6;
uint uVar7;
int8 unaff_R14;
pthread_cond_t *__cond;
uint uVar8;
ulong uVar9;
lVar6 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f);
if (lVar6 != 0) {
lVar2 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7);
cVar3 = *(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1 + 1);
__cond = (pthread_cond_t *)CONCAT71((int7)((ulong)unaff_R14 >> 8),cVar3);
translog_wait_for_writers();
lVar5 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f);
if (((lVar5 == lVar6) && (*(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7) == lVar2)) &&
(*(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1 + 1) == cVar3)) {
if (*(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1) != '\0') {
__cond = (pthread_cond_t *)((long)&Elf64_Phdr_ARRAY_00100040[0].p_type + param_1);
__mutex = (pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + param_1);
do {
if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[0].p_align + param_1) == 0) {
pthread_cond_wait(__cond,__mutex);
}
else {
psi_cond_wait(__cond,__mutex,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x7e6);
}
} while (*(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1) != '\0');
lVar5 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f);
if (((lVar5 != lVar6) || (*(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7) != lVar2)
) || (*(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1 + 1) != cVar3))
goto LAB_001474eb;
}
if (*(char *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_vaddr + param_1) != '\0') {
cVar3 = translog_prev_buffer_flush_wait(param_1);
if (cVar3 != '\0') goto LAB_001474eb;
lVar5 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f);
}
if (*(int *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x27) != 0) {
iVar4 = *(int *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2b);
uVar7 = *(uint *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7) >> 0xd;
uVar9 = 0;
do {
__cond = (pthread_cond_t *)CONCAT71((int7)((ulong)__cond >> 8),1);
if ((translog_status & 0xfffffffd) != 1) goto LAB_001474ee;
cVar3 = pagecache_write_part
(log_descriptor,lVar5 + 8,uVar7,3,uVar9 + param_1,1,0,1,1,0,0,iVar4,
0x2000 - iVar4);
if (cVar3 != '\0') {
translog_status = (uint)(translog_status != 3) * 2;
DAT_00d27a80 = 1;
_DAT_00526bbc = 0;
goto LAB_001474ee;
}
uVar8 = (int)uVar9 + 0x2000;
uVar9 = (ulong)uVar8;
uVar7 = uVar7 + 1;
iVar4 = 0;
} while (uVar8 < *(uint *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x27));
}
*(int1 *)(lVar5 + 0x51) = 0;
uVar7 = *(uint *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2b);
lVar6 = my_pwrite(*(int4 *)(lVar5 + 0x18),param_1 + (ulong)uVar7,
*(int *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x27) - uVar7,
(ulong)*(uint *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7) +
(ulong)uVar7,0x34);
if (lVar6 != 0) {
translog_status = (uint)(translog_status != 3) * 2;
DAT_00d27a80 = 1;
_DAT_00526bbc = 0;
__cond = (pthread_cond_t *)CONCAT71((int7)((ulong)__cond >> 8),1);
goto LAB_001474ee;
}
*(int1 *)(lVar5 + 0x51) = 0;
if (*(int *)(param_1 + 0x100000) == 0) {
translog_set_only_in_buffers
(*(int8 *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0xf));
}
else {
cVar3 = translog_prev_buffer_flush_wait(param_1);
if (cVar3 != '\0') goto LAB_001474eb;
translog_set_sent_to_disk
(*(int8 *)(param_1 + 0x100000),
*(int8 *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0xf));
}
lVar6 = (ulong)(*(int *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_vaddr + param_1 + 4) + 1U & 7)
* 0x100120;
if (translog_status == 1) {
translog_buffer_lock(&DAT_00526ea8 + lVar6);
*(int8 *)(&DAT_00626f88 + lVar6) =
*(int8 *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7);
if (*(long *)(&DAT_00626f78 + lVar6) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)(lVar6 + 0x626f38));
if (*(long *)(&DAT_00626fc0 + lVar6) != 0) {
(**(code **)(PSI_server + 0x178))();
}
pthread_cond_broadcast((pthread_cond_t *)(lVar6 + 0x626f90));
}
else {
*(int8 *)(&DAT_00626f88 + lVar6) =
*(int8 *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7);
}
*(int8 *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f) = 0;
*(int1 *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_vaddr + param_1) = 0;
pcVar1 = (char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1 + 1);
*pcVar1 = *pcVar1 + '\x01';
inline_mysql_mutex_lock(&DAT_00d277b0,0xabf);
DAT_00d277a8 = DAT_00d277a8 &
~(byte)(1 << (*(byte *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_vaddr +
param_1 + 4) & 0x1f));
if (DAT_00d277f0 != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)&DAT_00d277b0);
if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[0].p_align + param_1) != 0) {
(**(code **)(PSI_server + 0x178))();
}
pthread_cond_broadcast
((pthread_cond_t *)((long)&Elf64_Phdr_ARRAY_00100040[0].p_type + param_1));
}
}
LAB_001474eb:
__cond = (pthread_cond_t *)0x0;
LAB_001474ee:
return (ulong)__cond & 0xffffffff;
}
| |
24,250 | sound::play_entity(entt::entity, char const*, bool, float) | untodesu[P]voxelius/game/client/sound.cc | void sound::play_entity(entt::entity entity, const char *sound, bool looping, float pitch)
{
if(sound)
sound::play_entity(entity, resource::load<SoundEffect>(sound), looping, pitch);
else sound::play_entity(entity, static_cast<const char *>(nullptr), looping, pitch);
} | O3 | cpp | sound::play_entity(entt::entity, char const*, bool, float):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movss %xmm0, 0xc(%rsp)
movl %edx, %ebx
movq %rsi, %rax
movl %edi, %ebp
movq %rax, %rsi
movl $0x0, %eax
testq %rsi, %rsi
je 0x6ea20
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %edx, %edx
callq 0x6cb84
movzbl %bl, %edx
movl %ebp, %edi
movq %r14, %rsi
movss 0xc(%rsp), %xmm0
callq 0x6ea81
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x6ea5e
callq 0x2f116
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x6ea79
callq 0x2f116
movq %rbx, %rdi
callq 0x26ff0
| _ZN5sound11play_entityEN4entt6entityEPKcbf:
push rbp
push r14
push rbx
sub rsp, 20h
movss [rsp+38h+var_2C], xmm0
mov ebx, edx
mov rax, rsi
mov ebp, edi
loc_6EA20:
mov rsi, rax
mov eax, 0
test rsi, rsi
jz short loc_6EA20
lea r14, [rsp+38h+var_28]
mov rdi, r14
xor edx, edx
call _ZN8resource4loadI11SoundEffectEESt10shared_ptrIKT_EPKcj; resource::load<SoundEffect>(char const*,uint)
movzx edx, bl
mov edi, ebp
mov rsi, r14
movss xmm0, [rsp+38h+var_2C]
call _ZN5sound11play_entityEN4entt6entityESt10shared_ptrIK11SoundEffectEbf; sound::play_entity(entt::entity,std::shared_ptr<SoundEffect const>,bool,float)
mov rdi, [rsp+38h+var_20]
test rdi, rdi
jz short loc_6EA5E
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_6EA5E:
add rsp, 20h
pop rbx
pop r14
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_10]
test rdi, rdi
jz short loc_6EA79
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_6EA79:
mov rdi, rbx
call __Unwind_Resume
| long long sound::play_entity(unsigned int a1, long long a2, unsigned __int8 a3, float a4)
{
long long v6; // rsi
long long result; // rax
long long v8; // [rsp+10h] [rbp-28h] BYREF
volatile signed __int32 *v9; // [rsp+18h] [rbp-20h]
do
{
v6 = a2;
a2 = 0LL;
}
while ( !v6 );
resource::load<SoundEffect>(&v8, v6);
result = sound::play_entity(a1, &v8, a3, a4);
if ( v9 )
return std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v9);
return result;
}
| play_entity:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x20
MOVSS dword ptr [RSP + 0xc],XMM0
MOV EBX,EDX
MOV RAX,RSI
MOV EBP,EDI
LAB_0016ea20:
MOV RSI,RAX
MOV EAX,0x0
TEST RSI,RSI
JZ 0x0016ea20
LEA R14,[RSP + 0x10]
MOV RDI,R14
XOR EDX,EDX
CALL 0x0016cb84
LAB_0016ea3c:
MOVZX EDX,BL
MOV EDI,EBP
MOV RSI,R14
MOVSS XMM0,dword ptr [RSP + 0xc]
CALL 0x0016ea81
LAB_0016ea4f:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x0016ea5e
CALL 0x0012f116
LAB_0016ea5e:
ADD RSP,0x20
POP RBX
POP R14
POP RBP
RET
|
/* sound::play_entity(entt::entity, char const*, bool, float) */
void sound::play_entity(int4 param_1,int4 param_2,long param_3,int1 param_4)
{
long lVar1;
char local_28 [8];
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_20;
do {
lVar1 = param_3;
param_3 = 0;
} while (lVar1 == 0);
resource::load<SoundEffect>(local_28,(uint)lVar1);
/* try { // try from 0016ea3c to 0016ea4e has its CatchHandler @ 0016ea67 */
play_entity(param_1,param_2,local_28,param_4);
if (local_20 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_20);
}
return;
}
| |
24,251 | minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/./minja.hpp | Value do_evaluate(const std::shared_ptr<Context> & context) const override {
auto result = Value::array();
for (const auto& e : elements) {
if (!e) throw std::runtime_error("Array element is null");
result.push_back(e->evaluate(context));
}
return result;
} | O0 | cpp | minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
subq $0xe8, %rsp
movq %rdi, 0x20(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0xe0(%rsp)
movq %rsi, 0xd8(%rsp)
movq %rdx, 0xd0(%rsp)
movq 0xd8(%rsp), %rax
movq %rax, 0x18(%rsp)
movb $0x0, 0xcf(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0xb0(%rsp)
movq $0x0, 0xc0(%rsp)
leaq 0xb0(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0xcb0f0
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xcd710
jmp 0xcd3ab
leaq 0xb0(%rsp), %rdi
callq 0xcb220
movq 0x18(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rdi
callq 0xcd800
movq %rax, 0x90(%rsp)
movq 0x98(%rsp), %rdi
callq 0xcd830
movq %rax, 0x88(%rsp)
leaq 0x90(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0xcd860
testb $0x1, %al
jne 0xcd411
jmp 0xcd54e
leaq 0x90(%rsp), %rdi
callq 0xcd8a0
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rdi
callq 0x77a80
testb $0x1, %al
jne 0xcd4dd
movl $0x10, %edi
callq 0x50540
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x8(%rsp)
leaq 0x1040bb(%rip), %rsi # 0x1d1512
callq 0x50340
jmp 0xcd45e
movq 0x8(%rsp), %rdi
movq 0x186b46(%rip), %rsi # 0x253fb0
movq 0x186b07(%rip), %rdx # 0x253f78
callq 0x508f0
jmp 0xcd58e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0xcb220
jmp 0xcd581
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
callq 0x50c40
jmp 0xcd577
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
jmp 0xcd577
movq 0x80(%rsp), %rdi
callq 0x9f2f0
movq %rax, %rsi
movq 0xd0(%rsp), %rdx
leaq 0x30(%rsp), %rdi
callq 0x9f300
jmp 0xcd501
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xcd8b0
jmp 0xcd512
leaq 0x30(%rsp), %rdi
callq 0x9f7a0
leaq 0x90(%rsp), %rdi
callq 0xcd9e0
jmp 0xcd3f3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x9f7a0
jmp 0xcd577
movb $0x1, 0xcf(%rsp)
testb $0x1, 0xcf(%rsp)
jne 0xcd56a
movq 0x20(%rsp), %rdi
callq 0x9f7a0
movq 0x10(%rsp), %rax
addq $0xe8, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x9f7a0
movq 0xa8(%rsp), %rdi
callq 0x50940
nop
| _ZNK5minja9ArrayExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
sub rsp, 0E8h
mov [rsp+0E8h+var_C8], rdi
mov rax, rdi
mov [rsp+0E8h+var_D8], rax
mov [rsp+0E8h+var_8], rdi
mov [rsp+0E8h+var_10], rsi
mov [rsp+0E8h+var_18], rdx
mov rax, [rsp+0E8h+var_10]
mov [rsp+0E8h+var_D0], rax
mov [rsp+0E8h+var_19], 0
xorps xmm0, xmm0
movaps [rsp+0E8h+var_38], xmm0
mov [rsp+0E8h+var_28], 0
lea rdi, [rsp+0E8h+var_38]
mov [rsp+0E8h+var_C0], rdi
call _ZNSt6vectorIN5minja5ValueESaIS1_EEC2Ev; std::vector<minja::Value>::vector(void)
mov rdi, [rsp+0E8h+var_C8]
mov rsi, [rsp+0E8h+var_C0]
call _ZN5minja5Value5arrayESt6vectorIS0_SaIS0_EE; minja::Value::array(std::vector<minja::Value>)
jmp short $+2
loc_CD3AB:
lea rdi, [rsp+0E8h+var_38]
call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector()
mov rax, [rsp+0E8h+var_D0]
add rax, 20h ; ' '
mov [rsp+0E8h+var_50], rax
mov rdi, [rsp+0E8h+var_50]
call _ZNKSt6vectorISt10shared_ptrIN5minja10ExpressionEESaIS3_EE5beginEv; std::vector<std::shared_ptr<minja::Expression>>::begin(void)
mov [rsp+0E8h+var_58], rax
mov rdi, [rsp+0E8h+var_50]
call _ZNKSt6vectorISt10shared_ptrIN5minja10ExpressionEESaIS3_EE3endEv; std::vector<std::shared_ptr<minja::Expression>>::end(void)
mov [rsp+0E8h+var_60], rax
loc_CD3F3:
lea rdi, [rsp+0E8h+var_58]
lea rsi, [rsp+0E8h+var_60]
call _ZN9__gnu_cxxneIPKSt10shared_ptrIN5minja10ExpressionEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_; __gnu_cxx::operator!=<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>>(__gnu_cxx::__normal_iterator<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>> const&,__gnu_cxx::__normal_iterator<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>> const&)
test al, 1
jnz short loc_CD411
jmp loc_CD54E
loc_CD411:
lea rdi, [rsp+0E8h+var_58]
call _ZNK9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN5minja10ExpressionEESt6vectorIS4_SaIS4_EEEdeEv; __gnu_cxx::__normal_iterator<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>>::operator*(void)
mov [rsp+0E8h+var_68], rax
mov rdi, [rsp+0E8h+var_68]
call _ZNKSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(void)
test al, 1
jnz loc_CD4DD
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+0E8h+var_E0], rax
lea rsi, aArrayElementIs; "Array element is null"
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_CD45E:
mov rdi, [rsp+0E8h+var_E0]; void *
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp loc_CD58E
mov rcx, rax
mov eax, edx
mov [rsp+arg_A0], rcx
mov [rsp+arg_9C], eax
lea rdi, [rsp+arg_A8]
call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector()
jmp loc_CD581
mov rdi, [rsp+arg_0]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_A0], rcx
mov [rsp+arg_9C], eax
call ___cxa_free_exception
jmp loc_CD577
mov rcx, rax
mov eax, edx
mov [rsp+arg_A0], rcx
mov [rsp+arg_9C], eax
jmp loc_CD577
loc_CD4DD:
mov rdi, [rsp+0E8h+var_68]
call _ZNKSt19__shared_ptr_accessIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rsi, rax
mov rdx, [rsp+0E8h+var_18]
lea rdi, [rsp+0E8h+var_B8]
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
jmp short $+2
loc_CD501:
mov rdi, [rsp+0E8h+var_C8]; this
lea rsi, [rsp+0E8h+var_B8]; minja::Value *
call _ZN5minja5Value9push_backERKS0_; minja::Value::push_back(minja::Value const&)
jmp short $+2
loc_CD512:
lea rdi, [rsp+0E8h+var_B8]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
lea rdi, [rsp+0E8h+var_58]
call _ZN9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN5minja10ExpressionEESt6vectorIS4_SaIS4_EEEppEv; __gnu_cxx::__normal_iterator<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>>::operator++(void)
jmp loc_CD3F3
mov rcx, rax
mov eax, edx
mov [rsp+arg_A0], rcx
mov [rsp+arg_9C], eax
lea rdi, [rsp+arg_28]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_CD577
loc_CD54E:
mov [rsp+0E8h+var_19], 1
test [rsp+0E8h+var_19], 1
jnz short loc_CD56A
mov rdi, [rsp+0E8h+var_C8]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_CD56A:
mov rax, [rsp+0E8h+var_D8]
add rsp, 0E8h
retn
loc_CD577:
mov rdi, [rsp+arg_18]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_CD581:
mov rdi, [rsp+arg_A0]
call __Unwind_Resume
loc_CD58E:
xchg ax, ax
| minja::Value * minja::ArrayExpr::do_evaluate(minja::Value *a1, long long a2, long long a3)
{
int v3; // edx
int v4; // ecx
int v5; // r8d
int v6; // r9d
void (***v7)(void); // rax
std::runtime_error *exception; // [rsp+8h] [rbp-E0h]
_BYTE v10[80]; // [rsp+30h] [rbp-B8h] BYREF
_QWORD *v11; // [rsp+80h] [rbp-68h]
long long v12; // [rsp+88h] [rbp-60h] BYREF
_QWORD v13[4]; // [rsp+90h] [rbp-58h] BYREF
__int128 v14; // [rsp+B0h] [rbp-38h] BYREF
long long v15; // [rsp+C0h] [rbp-28h]
char v16; // [rsp+CFh] [rbp-19h]
long long v17; // [rsp+D0h] [rbp-18h]
long long v18; // [rsp+D8h] [rbp-10h]
minja::Value *v19; // [rsp+E0h] [rbp-8h]
v19 = a1;
v18 = a2;
v17 = a3;
v16 = 0;
v14 = 0LL;
v15 = 0LL;
std::vector<minja::Value>::vector((long long)&v14);
minja::Value::array((_DWORD)a1, (unsigned int)&v14, v3, v4, v5, v6);
std::vector<minja::Value>::~vector((long long *)&v14);
v13[1] = a2 + 32;
v13[0] = std::vector<std::shared_ptr<minja::Expression>>::begin(a2 + 32);
v12 = std::vector<std::shared_ptr<minja::Expression>>::end(a2 + 32);
while ( (__gnu_cxx::operator!=<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>>(
v13,
&v12) & 1) != 0 )
{
v11 = (_QWORD *)__gnu_cxx::__normal_iterator<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>>::operator*(v13);
if ( !std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(v11) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Array element is null");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v7 = (void (***)(void))std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->((long long)v11);
minja::Expression::evaluate((long long)v10, v7);
minja::Value::push_back(a1, (const minja::Value *)v10);
minja::Value::~Value((minja::Value *)v10);
__gnu_cxx::__normal_iterator<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>>::operator++(v13);
}
return a1;
}
| __advance<__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>>,long>:
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RDI
MOV qword ptr [RSP],RSI
MOV RSI,qword ptr [RSP]
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001cd390
JMP 0x001cd34d
LAB_001cd34d:
ADD RSP,0x18
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* void
std::__advance<__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value>*,
std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value>,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> > > >,
long>(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value>*,
std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value>,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> > > >&, long, std::random_access_iterator_tag) */
void std::
__advance<__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>>,long>
(__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>>
*param_1,long param_2)
{
__gnu_cxx::
__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>>
::operator+=(param_1,param_2);
return;
}
| |
24,252 | minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/./minja.hpp | Value do_evaluate(const std::shared_ptr<Context> & context) const override {
auto result = Value::array();
for (const auto& e : elements) {
if (!e) throw std::runtime_error("Array element is null");
result.push_back(e->evaluate(context));
}
return result;
} | O2 | cpp | minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
callq 0x4a008
movq %rsp, %rdi
callq 0x4982a
movq 0x20(%r15), %r12
movq 0x28(%r15), %r13
leaq 0x20(%rsp), %r15
cmpq %r13, %r12
je 0x49f52
movq (%r12), %rsi
testq %rsi, %rsi
je 0x49f63
movq %r15, %rdi
movq %r14, %rdx
callq 0x3b08c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4a074
movq %r15, %rdi
callq 0x3b31c
addq $0x10, %r12
jmp 0x49f20
movq %rbx, %rax
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
pushq $0x10
popq %rdi
callq 0x20390
movq %rax, %r15
leaq 0x5415d(%rip), %rsi # 0x9e0d2
movq %rax, %rdi
callq 0x20280
movq 0x98064(%rip), %rsi # 0xe1fe8
movq 0x97fe5(%rip), %rdx # 0xe1f70
movq %r15, %rdi
callq 0x20b30
movq %rax, %r14
movq %rsp, %rdi
callq 0x4982a
jmp 0x49fc9
jmp 0x49faf
movq %rax, %r14
movq %r15, %rdi
callq 0x20520
jmp 0x49fc1
movq %rax, %r14
jmp 0x49fc1
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x3b31c
movq %rbx, %rdi
callq 0x3b31c
movq %r14, %rdi
callq 0x20b90
nop
| _ZNK5minja9ArrayExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 70h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
xorps xmm0, xmm0
mov rsi, rsp
movaps xmmword ptr [rsi], xmm0
and qword ptr [rsi+10h], 0
call _ZN5minja5Value5arrayESt6vectorIS0_SaIS0_EE; minja::Value::array(std::vector<minja::Value>)
mov rdi, rsp
call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector()
mov r12, [r15+20h]
mov r13, [r15+28h]
lea r15, [rsp+98h+var_78]
loc_49F20:
cmp r12, r13
jz short loc_49F52
mov rsi, [r12]
test rsi, rsi
jz short loc_49F63
mov rdi, r15
mov rdx, r14
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov rdi, rbx; this
mov rsi, r15; minja::Value *
call _ZN5minja5Value9push_backERKS0_; minja::Value::push_back(minja::Value const&)
mov rdi, r15; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
add r12, 10h
jmp short loc_49F20
loc_49F52:
mov rax, rbx
add rsp, 70h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_49F63:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aArrayElementIs; "Array element is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
mov r14, rax
mov rdi, rsp
call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector()
jmp short loc_49FC9
jmp short loc_49FAF
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_49FC1
loc_49FAF:
mov r14, rax
jmp short loc_49FC1
mov r14, rax
lea rdi, [rsp+98h+var_78]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_49FC1:
mov rdi, rbx; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_49FC9:
mov rdi, r14
call __Unwind_Resume
| minja::Value * minja::ArrayExpr::do_evaluate(minja::Value *this, long long a2, int a3, int a4, int a5, int a6)
{
void (****v6)(void); // r12
void (****v7)(void); // r13
std::runtime_error *exception; // r15
_BYTE v10[32]; // [rsp+0h] [rbp-98h] BYREF
_BYTE v11[120]; // [rsp+20h] [rbp-78h] BYREF
minja::Value::array((_DWORD)this, (unsigned int)v10, a3, a4, a5, a6, 0LL, 0LL, 0LL);
std::vector<minja::Value>::~vector((long long)v10);
v6 = *(void (*****)(void))(a2 + 32);
v7 = *(void (*****)(void))(a2 + 40);
while ( v6 != v7 )
{
if ( !*v6 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Array element is null");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)v11, *v6);
minja::Value::push_back(this, (const minja::Value *)v11);
minja::Value::~Value((minja::Value *)v11);
v6 += 2;
}
return this;
}
| |||
24,253 | ma_bitmap_unlock | eloqsql/storage/maria/ma_bitmap.c | void _ma_bitmap_unlock(MARIA_SHARE *share)
{
MARIA_FILE_BITMAP *bitmap= &share->bitmap;
uint send_signal;
DBUG_ENTER("_ma_bitmap_unlock");
if (!share->now_transactional)
DBUG_VOID_RETURN;
DBUG_ASSERT(bitmap->flush_all_requested > 0 && bitmap->non_flushable == 1);
mysql_mutex_lock(&bitmap->bitmap_lock);
bitmap->non_flushable= 0;
_ma_bitmap_unpin_all(share);
send_signal= bitmap->waiting_for_non_flushable;
if (!--bitmap->flush_all_requested)
send_signal|= bitmap->waiting_for_flush_all_requested;
mysql_mutex_unlock(&bitmap->bitmap_lock);
if (send_signal)
mysql_cond_broadcast(&bitmap->bitmap_cond);
DBUG_VOID_RETURN;
} | O0 | c | ma_bitmap_unlock:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xa10, %rax # imm = 0xA10
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpb $0x0, 0x7e7(%rax)
jne 0x4749e
jmp 0x47499
jmp 0x47525
jmp 0x474a0
jmp 0x474a2
movq -0x10(%rbp), %rdi
addq $0x88, %rdi
leaq 0xd773a(%rip), %rsi # 0x11ebee
movl $0x279, %edx # imm = 0x279
callq 0x46de0
movq -0x10(%rbp), %rax
movl $0x0, 0x38(%rax)
movq -0x8(%rbp), %rdi
callq 0x47530
movq -0x10(%rbp), %rax
movl 0x3c(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rcx
movl 0x30(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x30(%rcx)
cmpl $0x0, %eax
jne 0x474fb
movq -0x10(%rbp), %rax
movl 0x34(%rax), %eax
orl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
addq $0x88, %rdi
callq 0x47090
cmpl $0x0, -0x14(%rbp)
je 0x47521
movq -0x10(%rbp), %rdi
addq $0xd0, %rdi
callq 0x47340
jmp 0x47523
jmp 0x47525
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ma_bitmap_unlock:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
add rax, 0A10h
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
cmp byte ptr [rax+7E7h], 0
jnz short loc_4749E
jmp short $+2
loc_47499:
jmp loc_47525
loc_4749E:
jmp short $+2
loc_474A0:
jmp short $+2
loc_474A2:
mov rdi, [rbp+var_10]
add rdi, 88h
lea rsi, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 279h
call inline_mysql_mutex_lock_3
mov rax, [rbp+var_10]
mov dword ptr [rax+38h], 0
mov rdi, [rbp+var_8]
call _ma_bitmap_unpin_all
mov rax, [rbp+var_10]
mov eax, [rax+3Ch]
mov [rbp+var_14], eax
mov rcx, [rbp+var_10]
mov eax, [rcx+30h]
add eax, 0FFFFFFFFh
mov [rcx+30h], eax
cmp eax, 0
jnz short loc_474FB
mov rax, [rbp+var_10]
mov eax, [rax+34h]
or eax, [rbp+var_14]
mov [rbp+var_14], eax
loc_474FB:
mov rdi, [rbp+var_10]
add rdi, 88h
call inline_mysql_mutex_unlock_3
cmp [rbp+var_14], 0
jz short loc_47521
mov rdi, [rbp+var_10]
add rdi, 0D0h
call inline_mysql_cond_broadcast
loc_47521:
jmp short $+2
loc_47523:
jmp short $+2
loc_47525:
add rsp, 20h
pop rbp
retn
| long long ma_bitmap_unlock(long long a1)
{
long long result; // rax
int v2; // eax
int v3; // [rsp+Ch] [rbp-14h]
result = a1;
if ( *(_BYTE *)(a1 + 2023) )
{
inline_mysql_mutex_lock_3(
a1 + 2712,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c",
0x279u);
*(_DWORD *)(a1 + 2632) = 0;
ma_bitmap_unpin_all(a1);
v3 = *(_DWORD *)(a1 + 2636);
v2 = *(_DWORD *)(a1 + 2624) - 1;
*(_DWORD *)(a1 + 2624) = v2;
if ( !v2 )
v3 |= *(_DWORD *)(a1 + 2628);
result = inline_mysql_mutex_unlock_3(a1 + 2712);
if ( v3 )
return inline_mysql_cond_broadcast(a1 + 2784);
}
return result;
}
| _ma_bitmap_unlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0xa10
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX + 0x7e7],0x0
JNZ 0x0014749e
JMP 0x00147499
LAB_00147499:
JMP 0x00147525
LAB_0014749e:
JMP 0x001474a0
LAB_001474a0:
JMP 0x001474a2
LAB_001474a2:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x88
LEA RSI,[0x21ebee]
MOV EDX,0x279
CALL 0x00146de0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x38],0x0
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00147530
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x3c]
MOV dword ptr [RBP + -0x14],EAX
MOV RCX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RCX + 0x30]
ADD EAX,-0x1
MOV dword ptr [RCX + 0x30],EAX
CMP EAX,0x0
JNZ 0x001474fb
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x34]
OR EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x14],EAX
LAB_001474fb:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x88
CALL 0x00147090
CMP dword ptr [RBP + -0x14],0x0
JZ 0x00147521
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0xd0
CALL 0x00147340
LAB_00147521:
JMP 0x00147523
LAB_00147523:
JMP 0x00147525
LAB_00147525:
ADD RSP,0x20
POP RBP
RET
|
void _ma_bitmap_unlock(long param_1)
{
int iVar1;
uint local_1c;
if (*(char *)(param_1 + 0x7e7) != '\0') {
inline_mysql_mutex_lock
(param_1 + 0xa98,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c",
0x279);
*(int4 *)(param_1 + 0xa48) = 0;
_ma_bitmap_unpin_all(param_1);
local_1c = *(uint *)(param_1 + 0xa4c);
iVar1 = *(int *)(param_1 + 0xa40) + -1;
*(int *)(param_1 + 0xa40) = iVar1;
if (iVar1 == 0) {
local_1c = *(uint *)(param_1 + 0xa44) | local_1c;
}
inline_mysql_mutex_unlock(param_1 + 0xa98);
if (local_1c != 0) {
inline_mysql_cond_broadcast(param_1 + 0xae0);
}
}
return;
}
| |
24,254 | my_mb_wc_cp932 | eloqsql/strings/ctype-cp932.c | static int
my_mb_wc_cp932(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e){
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80) /* ASCII: [00-7F] -> [U+0000..U+007F] */
{
*pwc= hi;
return 1;
}
/* JIS-X-0201 Half width Katakana: [A1..DF] -> [U+FF61..U+FF9F] */
if (hi >= 0xA1 && hi <= 0xDF)
{
*pwc= cp932_to_unicode[hi];
return 1;
}
if (s + 2 > e)
return MY_CS_TOOSMALL2;
/* JIS-X-0208-MS [81..9F,E0..FC][40..7E,80..FC] */
if (!(pwc[0]= cp932_to_unicode[(hi << 8) + s[1]]))
return (iscp932head(hi) && iscp932tail(s[1])) ? -2 : MY_CS_ILSEQ;
return 2;
} | O0 | c | my_mb_wc_cp932:
pushq %rbp
movq %rsp, %rbp
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 0x42cda
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x42e38
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x80, %eax
jge 0x42d02
movslq -0x2c(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x42e38
cmpl $0xa1, -0x2c(%rbp)
jl 0x42d38
cmpl $0xdf, -0x2c(%rbp)
jg 0x42d38
movslq -0x2c(%rbp), %rcx
leaq 0x5dfe1(%rip), %rax # 0xa0d00
movzwl (%rax,%rcx,2), %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x42e38
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x42d52
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x42e38
movl -0x2c(%rbp), %eax
shll $0x8, %eax
movq -0x20(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
addl %ecx, %eax
movslq %eax, %rcx
leaq 0x5df94(%rip), %rax # 0xa0d00
movzwl (%rax,%rcx,2), %eax
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x42e31
movl -0x2c(%rbp), %eax
movzbl %al, %ecx
movl $0x81, %eax
cmpl %ecx, %eax
jg 0x42d9d
movl -0x2c(%rbp), %eax
movzbl %al, %eax
cmpl $0x9f, %eax
jle 0x42dc4
movl -0x2c(%rbp), %eax
movzbl %al, %edx
xorl %eax, %eax
movl $0xe0, %ecx
cmpl %edx, %ecx
movb %al, -0x2d(%rbp)
jg 0x42e1c
movl -0x2c(%rbp), %eax
movzbl %al, %ecx
xorl %eax, %eax
cmpl $0xfc, %ecx
movb %al, -0x2d(%rbp)
jg 0x42e1c
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movl $0x40, %eax
cmpl %ecx, %eax
jg 0x42de7
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movb $0x1, %al
cmpl $0x7e, %ecx
movb %al, -0x2e(%rbp)
jle 0x42e16
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %edx
xorl %eax, %eax
movl $0x80, %ecx
cmpl %edx, %ecx
movb %al, -0x2f(%rbp)
jg 0x42e10
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xfc, %eax
setle %al
movb %al, -0x2f(%rbp)
movb -0x2f(%rbp), %al
movb %al, -0x2e(%rbp)
movb -0x2e(%rbp), %al
movb %al, -0x2d(%rbp)
movb -0x2d(%rbp), %dl
xorl %eax, %eax
movl $0xfffffffe, %ecx # imm = 0xFFFFFFFE
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x42e38
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
| my_mb_wc_cp932:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_42CDA
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_42E38
loc_42CDA:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
mov [rbp+var_2C], eax
cmp eax, 80h
jge short loc_42D02
movsxd rcx, [rbp+var_2C]
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_42E38
loc_42D02:
cmp [rbp+var_2C], 0A1h
jl short loc_42D38
cmp [rbp+var_2C], 0DFh
jg short loc_42D38
movsxd rcx, [rbp+var_2C]
lea rax, cp932_to_unicode
movzx eax, word ptr [rax+rcx*2]
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_42E38
loc_42D38:
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_42D52
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_42E38
loc_42D52:
mov eax, [rbp+var_2C]
shl eax, 8
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+1]
add eax, ecx
movsxd rcx, eax
lea rax, cp932_to_unicode
movzx eax, word ptr [rax+rcx*2]
mov rcx, [rbp+var_18]
mov [rcx], rax
cmp rax, 0
jnz loc_42E31
mov eax, [rbp+var_2C]
movzx ecx, al
mov eax, 81h
cmp eax, ecx
jg short loc_42D9D
mov eax, [rbp+var_2C]
movzx eax, al
cmp eax, 9Fh
jle short loc_42DC4
loc_42D9D:
mov eax, [rbp+var_2C]
movzx edx, al
xor eax, eax
mov ecx, 0E0h
cmp ecx, edx
mov [rbp+var_2D], al
jg short loc_42E1C
mov eax, [rbp+var_2C]
movzx ecx, al
xor eax, eax
cmp ecx, 0FCh
mov [rbp+var_2D], al
jg short loc_42E1C
loc_42DC4:
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov eax, 40h ; '@'
cmp eax, ecx
jg short loc_42DE7
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov al, 1
cmp ecx, 7Eh ; '~'
mov [rbp+var_2E], al
jle short loc_42E16
loc_42DE7:
mov rax, [rbp+var_20]
movzx edx, byte ptr [rax+1]
xor eax, eax
mov ecx, 80h
cmp ecx, edx
mov [rbp+var_2F], al
jg short loc_42E10
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0FCh
setle al
mov [rbp+var_2F], al
loc_42E10:
mov al, [rbp+var_2F]
mov [rbp+var_2E], al
loc_42E16:
mov al, [rbp+var_2E]
mov [rbp+var_2D], al
loc_42E1C:
mov dl, [rbp+var_2D]
xor eax, eax
mov ecx, 0FFFFFFFEh
test dl, 1
cmovnz eax, ecx
mov [rbp+var_4], eax
jmp short loc_42E38
loc_42E31:
mov [rbp+var_4], 2
loc_42E38:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_mb_wc_cp932(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4)
{
long long v4; // rax
unsigned int v5; // eax
bool v7; // [rsp+1h] [rbp-2Fh]
char v8; // [rsp+2h] [rbp-2Eh]
char v9; // [rsp+3h] [rbp-2Dh]
unsigned int v10; // [rsp+4h] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
v10 = *a3;
if ( v10 >= 0x80 )
{
if ( *a3 < 0xA1u || *a3 > 0xDFu )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
v4 = cp932_to_unicode[a3[1] + (v10 << 8)];
*a2 = v4;
if ( v4 )
{
return 2;
}
else
{
if ( (unsigned __int8)v10 >= 0x81u && (unsigned __int8)v10 <= 0x9Fu
|| (v9 = 0, (unsigned __int8)v10 >= 0xE0u) && (v9 = 0, (unsigned __int8)v10 <= 0xFCu) )
{
if ( a3[1] < 0x40u || (v8 = 1, a3[1] > 0x7Eu) )
{
v7 = 0;
if ( a3[1] >= 0x80u )
v7 = a3[1] <= 0xFCu;
v8 = v7;
}
v9 = v8;
}
v5 = 0;
if ( (v9 & 1) != 0 )
return (unsigned int)-2;
return v5;
}
}
else
{
return (unsigned int)-102;
}
}
else
{
*a2 = cp932_to_unicode[*a3];
return 1;
}
}
else
{
*a2 = *a3;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
| my_mb_wc_cp932:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x00142cda
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x00142e38
LAB_00142cda:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x80
JGE 0x00142d02
MOVSXD RCX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00142e38
LAB_00142d02:
CMP dword ptr [RBP + -0x2c],0xa1
JL 0x00142d38
CMP dword ptr [RBP + -0x2c],0xdf
JG 0x00142d38
MOVSXD RCX,dword ptr [RBP + -0x2c]
LEA RAX,[0x1a0d00]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00142e38
LAB_00142d38:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x00142d52
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x00142e38
LAB_00142d52:
MOV EAX,dword ptr [RBP + -0x2c]
SHL EAX,0x8
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x1]
ADD EAX,ECX
MOVSXD RCX,EAX
LEA RAX,[0x1a0d00]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JNZ 0x00142e31
MOV EAX,dword ptr [RBP + -0x2c]
MOVZX ECX,AL
MOV EAX,0x81
CMP EAX,ECX
JG 0x00142d9d
MOV EAX,dword ptr [RBP + -0x2c]
MOVZX EAX,AL
CMP EAX,0x9f
JLE 0x00142dc4
LAB_00142d9d:
MOV EAX,dword ptr [RBP + -0x2c]
MOVZX EDX,AL
XOR EAX,EAX
MOV ECX,0xe0
CMP ECX,EDX
MOV byte ptr [RBP + -0x2d],AL
JG 0x00142e1c
MOV EAX,dword ptr [RBP + -0x2c]
MOVZX ECX,AL
XOR EAX,EAX
CMP ECX,0xfc
MOV byte ptr [RBP + -0x2d],AL
JG 0x00142e1c
LAB_00142dc4:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV EAX,0x40
CMP EAX,ECX
JG 0x00142de7
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV AL,0x1
CMP ECX,0x7e
MOV byte ptr [RBP + -0x2e],AL
JLE 0x00142e16
LAB_00142de7:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EDX,byte ptr [RAX + 0x1]
XOR EAX,EAX
MOV ECX,0x80
CMP ECX,EDX
MOV byte ptr [RBP + -0x2f],AL
JG 0x00142e10
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xfc
SETLE AL
MOV byte ptr [RBP + -0x2f],AL
LAB_00142e10:
MOV AL,byte ptr [RBP + -0x2f]
MOV byte ptr [RBP + -0x2e],AL
LAB_00142e16:
MOV AL,byte ptr [RBP + -0x2e]
MOV byte ptr [RBP + -0x2d],AL
LAB_00142e1c:
MOV DL,byte ptr [RBP + -0x2d]
XOR EAX,EAX
MOV ECX,0xfffffffe
TEST DL,0x1
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00142e38
LAB_00142e31:
MOV dword ptr [RBP + -0x4],0x2
LAB_00142e38:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_mb_wc_cp932(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
ushort uVar1;
bool bVar2;
uint uVar3;
int4 local_c;
if (param_3 < param_4) {
uVar3 = (uint)*param_3;
if (uVar3 < 0x80) {
*param_2 = (long)(int)uVar3;
local_c = 1;
}
else if ((uVar3 < 0xa1) || (0xdf < uVar3)) {
if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
uVar1 = *(ushort *)(cp932_to_unicode + (long)(int)(uVar3 * 0x100 + (uint)param_3[1]) * 2);
*param_2 = (ulong)uVar1;
if ((ulong)uVar1 == 0) {
if ((((0x80 < uVar3) && (uVar3 < 0xa0)) ||
((bVar2 = false, 0xdf < uVar3 && (bVar2 = false, uVar3 < 0xfd)))) &&
(((param_3[1] < 0x40 || (bVar2 = true, 0x7e < param_3[1])) &&
(bVar2 = false, 0x7f < param_3[1])))) {
bVar2 = param_3[1] < 0xfd;
}
local_c = 0;
if (bVar2) {
local_c = 0xfffffffe;
}
}
else {
local_c = 2;
}
}
}
else {
*param_2 = (ulong)*(ushort *)(cp932_to_unicode + (long)(int)uVar3 * 2);
local_c = 1;
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
| |
24,255 | my_multi_malloc_large | eloqsql/mysys/mulalloc.c | void *my_multi_malloc_large(PSI_memory_key key, myf myFlags, ...)
{
va_list args;
char **ptr,*start,*res;
ulonglong tot_length,length;
DBUG_ENTER("my_multi_malloc");
va_start(args,myFlags);
tot_length=0;
while ((ptr=va_arg(args, char **)))
{
length=va_arg(args,ulonglong);
tot_length+=ALIGN_SIZE(length);
}
va_end(args);
if (!(start=(char *) my_malloc(key, (size_t) tot_length, myFlags)))
DBUG_RETURN(0); /* purecov: inspected */
va_start(args,myFlags);
res=start;
while ((ptr=va_arg(args, char **)))
{
*ptr=res;
length=va_arg(args,ulonglong);
res+=ALIGN_SIZE(length);
}
va_end(args);
DBUG_RETURN((void*) start);
} | O0 | c | my_multi_malloc_large:
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp # imm = 0x170
testb %al, %al
je 0x7e6d1
movaps %xmm0, -0xe0(%rbp)
movaps %xmm1, -0xd0(%rbp)
movaps %xmm2, -0xc0(%rbp)
movaps %xmm3, -0xb0(%rbp)
movaps %xmm4, -0xa0(%rbp)
movaps %xmm5, -0x90(%rbp)
movaps %xmm6, -0x80(%rbp)
movaps %xmm7, -0x70(%rbp)
movq %r9, -0xe8(%rbp)
movq %r8, -0xf0(%rbp)
movq %rcx, -0xf8(%rbp)
movq %rdx, -0x100(%rbp)
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
leaq -0x30(%rbp), %rax
leaq -0x110(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
movq $0x0, -0x50(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0x120(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x114(%rbp)
cmpl $0x28, %eax
ja 0x7e75b
movq -0x120(%rbp), %rcx
movl -0x114(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x128(%rbp)
jmp 0x7e778
movq -0x120(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x7e813
leaq -0x30(%rbp), %rax
movq %rax, -0x138(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x12c(%rbp)
cmpl $0x28, %eax
ja 0x7e7cb
movq -0x138(%rbp), %rcx
movl -0x12c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x140(%rbp)
jmp 0x7e7e8
movq -0x138(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
addq $0x8, %rax
subq $0x1, %rax
andq $-0x8, %rax
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x7e720
leaq -0x30(%rbp), %rax
movl -0xc(%rbp), %edi
movq -0x50(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x839a0
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0x7e840
jmp 0x7e833
movq $0x0, -0x8(%rbp)
jmp 0x7e976
leaq -0x30(%rbp), %rax
leaq -0x110(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0x150(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x144(%rbp)
cmpl $0x28, %eax
ja 0x7e8a7
movq -0x150(%rbp), %rcx
movl -0x144(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x158(%rbp)
jmp 0x7e8c4
movq -0x150(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x7e96a
movq -0x48(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
leaq -0x30(%rbp), %rax
movq %rax, -0x168(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x15c(%rbp)
cmpl $0x28, %eax
ja 0x7e922
movq -0x168(%rbp), %rcx
movl -0x15c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x170(%rbp)
jmp 0x7e93f
movq -0x168(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x170(%rbp)
movq -0x170(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
addq $0x8, %rax
subq $0x1, %rax
andq $-0x8, %rax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x7e86c
leaq -0x30(%rbp), %rax
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x170, %rsp # imm = 0x170
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| my_multi_malloc_large:
push rbp
mov rbp, rsp
sub rsp, 170h
test al, al
jz short loc_7E6D1
movaps [rbp+var_E0], xmm0
movaps [rbp+var_D0], xmm1
movaps [rbp+var_C0], xmm2
movaps [rbp+var_B0], xmm3
movaps [rbp+var_A0], xmm4
movaps [rbp+var_90], xmm5
movaps [rbp+var_80], xmm6
movaps [rbp+var_70], xmm7
loc_7E6D1:
mov [rbp+var_E8], r9
mov [rbp+var_F0], r8
mov [rbp+var_F8], rcx
mov [rbp+var_100], rdx
mov [rbp+var_C], edi
mov [rbp+var_18], rsi
lea rax, [rbp+var_30]
lea rcx, [rbp+var_110]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 10h
mov [rbp+var_50], 0
loc_7E720:
lea rax, [rbp+var_30]
mov [rbp+var_120], rax
mov eax, [rbp+var_30]
mov [rbp+var_114], eax
cmp eax, 28h ; '('
ja short loc_7E75B
mov rcx, [rbp+var_120]
mov edx, [rbp+var_114]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_128], rax
jmp short loc_7E778
loc_7E75B:
mov rcx, [rbp+var_120]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_128], rax
loc_7E778:
mov rax, [rbp+var_128]
mov rax, [rax]
mov [rbp+var_38], rax
cmp rax, 0
jz loc_7E813
lea rax, [rbp+var_30]
mov [rbp+var_138], rax
mov eax, [rbp+var_30]
mov [rbp+var_12C], eax
cmp eax, 28h ; '('
ja short loc_7E7CB
mov rcx, [rbp+var_138]
mov edx, [rbp+var_12C]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_140], rax
jmp short loc_7E7E8
loc_7E7CB:
mov rcx, [rbp+var_138]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_140], rax
loc_7E7E8:
mov rax, [rbp+var_140]
mov rax, [rax]
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
add rax, 8
sub rax, 1
and rax, 0FFFFFFFFFFFFFFF8h
add rax, [rbp+var_50]
mov [rbp+var_50], rax
jmp loc_7E720
loc_7E813:
lea rax, [rbp+var_30]
mov edi, [rbp+var_C]
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_18]
call my_malloc
mov [rbp+var_40], rax
cmp rax, 0
jnz short loc_7E840
jmp short $+2
loc_7E833:
mov [rbp+var_8], 0
jmp loc_7E976
loc_7E840:
lea rax, [rbp+var_30]
lea rcx, [rbp+var_110]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 10h
mov rax, [rbp+var_40]
mov [rbp+var_48], rax
loc_7E86C:
lea rax, [rbp+var_30]
mov [rbp+var_150], rax
mov eax, [rbp+var_30]
mov [rbp+var_144], eax
cmp eax, 28h ; '('
ja short loc_7E8A7
mov rcx, [rbp+var_150]
mov edx, [rbp+var_144]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_158], rax
jmp short loc_7E8C4
loc_7E8A7:
mov rcx, [rbp+var_150]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_158], rax
loc_7E8C4:
mov rax, [rbp+var_158]
mov rax, [rax]
mov [rbp+var_38], rax
cmp rax, 0
jz loc_7E96A
mov rcx, [rbp+var_48]
mov rax, [rbp+var_38]
mov [rax], rcx
lea rax, [rbp+var_30]
mov [rbp+var_168], rax
mov eax, [rbp+var_30]
mov [rbp+var_15C], eax
cmp eax, 28h ; '('
ja short loc_7E922
mov rcx, [rbp+var_168]
mov edx, [rbp+var_15C]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_170], rax
jmp short loc_7E93F
loc_7E922:
mov rcx, [rbp+var_168]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_170], rax
loc_7E93F:
mov rax, [rbp+var_170]
mov rax, [rax]
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
add rax, 8
sub rax, 1
and rax, 0FFFFFFFFFFFFFFF8h
add rax, [rbp+var_48]
mov [rbp+var_48], rax
jmp loc_7E86C
loc_7E96A:
lea rax, [rbp+var_30]
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
loc_7E976:
mov rax, [rbp+var_8]
add rsp, 170h
pop rbp
retn
| long long my_multi_malloc_large(unsigned int a1, long long a2, ...)
{
_QWORD *overflow_arg_area; // rax
_QWORD *v3; // rax
_QWORD *v4; // rax
_QWORD *v5; // rax
long long i; // [rsp+120h] [rbp-50h]
long long j; // [rsp+128h] [rbp-48h]
long long v9; // [rsp+130h] [rbp-40h]
va_list va; // [rsp+140h] [rbp-30h] BYREF
long long v11; // [rsp+158h] [rbp-18h]
unsigned int v12; // [rsp+164h] [rbp-Ch]
va_start(va, a2);
v12 = a1;
v11 = a2;
for ( i = 0LL; ; i += (*v3 + 7LL) & 0xFFFFFFFFFFFFFFF8LL )
{
if ( va[0].gp_offset > 0x28 )
{
overflow_arg_area = va[0].overflow_arg_area;
va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8;
}
else
{
overflow_arg_area = (char *)va[0].reg_save_area + (int)va[0].gp_offset;
va[0].gp_offset += 8;
}
if ( !*overflow_arg_area )
break;
if ( va[0].gp_offset > 0x28 )
{
v3 = va[0].overflow_arg_area;
va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8;
}
else
{
v3 = (char *)va[0].reg_save_area + (int)va[0].gp_offset;
va[0].gp_offset += 8;
}
}
v9 = my_malloc(v12, i, v11);
if ( !v9 )
return 0LL;
va_end(va);
va_start(va, a2);
for ( j = v9; ; j += (*v5 + 7LL) & 0xFFFFFFFFFFFFFFF8LL )
{
if ( va[0].gp_offset > 0x28 )
{
v4 = va[0].overflow_arg_area;
va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8;
}
else
{
v4 = (char *)va[0].reg_save_area + (int)va[0].gp_offset;
va[0].gp_offset += 8;
}
if ( !*v4 )
break;
*(_QWORD *)*v4 = j;
if ( va[0].gp_offset > 0x28 )
{
v5 = va[0].overflow_arg_area;
va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8;
}
else
{
v5 = (char *)va[0].reg_save_area + (int)va[0].gp_offset;
va[0].gp_offset += 8;
}
}
return v9;
}
| my_multi_malloc_large:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x170
TEST AL,AL
JZ 0x0017e6d1
MOVAPS xmmword ptr [RBP + -0xe0],XMM0
MOVAPS xmmword ptr [RBP + -0xd0],XMM1
MOVAPS xmmword ptr [RBP + -0xc0],XMM2
MOVAPS xmmword ptr [RBP + -0xb0],XMM3
MOVAPS xmmword ptr [RBP + -0xa0],XMM4
MOVAPS xmmword ptr [RBP + -0x90],XMM5
MOVAPS xmmword ptr [RBP + -0x80],XMM6
MOVAPS xmmword ptr [RBP + -0x70],XMM7
LAB_0017e6d1:
MOV qword ptr [RBP + -0xe8],R9
MOV qword ptr [RBP + -0xf0],R8
MOV qword ptr [RBP + -0xf8],RCX
MOV qword ptr [RBP + -0x100],RDX
MOV dword ptr [RBP + -0xc],EDI
MOV qword ptr [RBP + -0x18],RSI
LEA RAX,[RBP + -0x30]
LEA RCX,[RBP + -0x110]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x10
MOV qword ptr [RBP + -0x50],0x0
LAB_0017e720:
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x120],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x114],EAX
CMP EAX,0x28
JA 0x0017e75b
MOV RCX,qword ptr [RBP + -0x120]
MOV EDX,dword ptr [RBP + -0x114]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x128],RAX
JMP 0x0017e778
LAB_0017e75b:
MOV RCX,qword ptr [RBP + -0x120]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x128],RAX
LAB_0017e778:
MOV RAX,qword ptr [RBP + -0x128]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,0x0
JZ 0x0017e813
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x138],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x12c],EAX
CMP EAX,0x28
JA 0x0017e7cb
MOV RCX,qword ptr [RBP + -0x138]
MOV EDX,dword ptr [RBP + -0x12c]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x140],RAX
JMP 0x0017e7e8
LAB_0017e7cb:
MOV RCX,qword ptr [RBP + -0x138]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x140],RAX
LAB_0017e7e8:
MOV RAX,qword ptr [RBP + -0x140]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x8
SUB RAX,0x1
AND RAX,-0x8
ADD RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0017e720
LAB_0017e813:
LEA RAX,[RBP + -0x30]
MOV EDI,dword ptr [RBP + -0xc]
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x001839a0
MOV qword ptr [RBP + -0x40],RAX
CMP RAX,0x0
JNZ 0x0017e840
JMP 0x0017e833
LAB_0017e833:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0017e976
LAB_0017e840:
LEA RAX,[RBP + -0x30]
LEA RCX,[RBP + -0x110]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x10
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x48],RAX
LAB_0017e86c:
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x150],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x144],EAX
CMP EAX,0x28
JA 0x0017e8a7
MOV RCX,qword ptr [RBP + -0x150]
MOV EDX,dword ptr [RBP + -0x144]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x158],RAX
JMP 0x0017e8c4
LAB_0017e8a7:
MOV RCX,qword ptr [RBP + -0x150]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x158],RAX
LAB_0017e8c4:
MOV RAX,qword ptr [RBP + -0x158]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,0x0
JZ 0x0017e96a
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RCX
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x168],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x15c],EAX
CMP EAX,0x28
JA 0x0017e922
MOV RCX,qword ptr [RBP + -0x168]
MOV EDX,dword ptr [RBP + -0x15c]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x170],RAX
JMP 0x0017e93f
LAB_0017e922:
MOV RCX,qword ptr [RBP + -0x168]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x170],RAX
LAB_0017e93f:
MOV RAX,qword ptr [RBP + -0x170]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x8
SUB RAX,0x1
AND RAX,-0x8
ADD RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0017e86c
LAB_0017e96a:
LEA RAX,[RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
LAB_0017e976:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x170
POP RBP
RET
|
/* WARNING: Restarted to delay deadcode elimination for space: stack */
long my_multi_malloc_large
(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int4 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
long *local_178;
long *local_160;
long *local_148;
long *local_130;
long local_118 [4];
int8 local_f8;
int8 local_f0;
int8 local_e8;
int8 local_d8;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
long local_60;
long local_58;
long local_50;
long local_40;
uint local_38;
int4 local_34;
long *local_30;
long *local_28;
int8 local_20;
int4 local_14;
long local_10;
if (in_AL != '\0') {
local_e8 = param_1;
local_d8 = param_2;
local_c8 = param_3;
local_b8 = param_4;
local_a8 = param_5;
local_98 = param_6;
local_88 = param_7;
local_78 = param_8;
}
local_28 = local_118;
local_30 = (long *)&stack0x00000008;
local_34 = 0x30;
local_38 = 0x10;
local_58 = 0;
while( true ) {
if (local_38 < 0x29) {
local_130 = (long *)((long)local_28 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_130 = local_30;
local_30 = local_30 + 1;
}
local_40 = *local_130;
if (local_40 == 0) break;
if (local_38 < 0x29) {
local_148 = (long *)((long)local_28 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_148 = local_30;
local_30 = local_30 + 1;
}
local_60 = *local_148;
local_58 = (local_60 + 7U & 0xfffffffffffffff8) + local_58;
}
local_118[2] = param_11;
local_118[3] = param_12;
local_f8 = param_13;
local_f0 = param_14;
local_20 = param_10;
local_14 = param_9;
local_10 = my_malloc(param_9,local_58,param_10);
if (local_10 == 0) {
local_10 = 0;
}
else {
local_30 = (long *)&stack0x00000008;
local_38 = 0x10;
local_50 = local_10;
while( true ) {
if (local_38 < 0x29) {
local_160 = (long *)((long)local_118 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_160 = local_30;
local_30 = local_30 + 1;
}
if ((long *)*local_160 == (long *)0x0) break;
*(long *)*local_160 = local_50;
if (local_38 < 0x29) {
local_178 = (long *)((long)local_118 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_178 = local_30;
local_30 = local_30 + 1;
}
local_50 = (*local_178 + 7U & 0xfffffffffffffff8) + local_50;
}
}
return local_10;
}
| |
24,256 | common_sampler_sample(common_sampler*, llama_context*, int, bool) | monkey531[P]llama/common/sampling.cpp | llama_token common_sampler_sample(struct common_sampler * gsmpl, struct llama_context * ctx, int idx, bool grammar_first) {
gsmpl->set_logits(ctx, idx);
auto & grmr = gsmpl->grmr;
auto & chain = gsmpl->chain;
auto & cur_p = gsmpl->cur_p; // initialized by set_logits
if (grammar_first) {
llama_sampler_apply(grmr, &cur_p);
}
llama_sampler_apply(chain, &cur_p);
GGML_ASSERT(cur_p.selected != -1 && "no selected token during sampling - check your sampling configuration");
const llama_token id = cur_p.data[cur_p.selected].id;
if (grammar_first) {
return id;
}
// check if it the sampled token fits the grammar
{
llama_token_data single_token_data = { id, 1.0f, 0.0f };
llama_token_data_array single_token_data_array = { &single_token_data, 1, -1, false };
llama_sampler_apply(grmr, &single_token_data_array);
const bool is_valid = single_token_data_array.data[0].logit != -INFINITY;
if (is_valid) {
return id;
}
}
// resampling:
// if the token is not valid, sample again, but first apply the grammar sampler and then the sampling chain
gsmpl->set_logits(ctx, idx);
llama_sampler_apply(grmr, &cur_p);
llama_sampler_apply(chain, &cur_p);
GGML_ASSERT(cur_p.selected != -1 && "no selected token during re-sampling - check your sampling configuration");
return cur_p.data[cur_p.selected].id;
} | O1 | cpp | common_sampler_sample(common_sampler*, llama_context*, int, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, %r12d
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
callq 0xcfeee
leaq 0x198(%rbx), %r14
testl %r12d, %r12d
je 0xced81
movq 0x138(%rbx), %rdi
movq %r14, %rsi
callq 0x1bdb0
movq 0x140(%rbx), %rdi
movq %r14, %rsi
callq 0x1bdb0
movq 0x1a8(%rbx), %rax
cmpq $-0x1, %rax
je 0xcee60
movq (%r14), %rcx
leaq (%rax,%rax,2), %rax
movl (%rcx,%rax,4), %r13d
testb %r12b, %r12b
jne 0xcee4e
leaq 0xc(%rsp), %rax
movl %r13d, (%rax)
movss 0x1a247(%rip), %xmm0 # 0xe900c
movlps %xmm0, 0x4(%rax)
leaq 0x18(%rsp), %r12
movq %rax, (%r12)
movq $0x1, 0x8(%r12)
movq $-0x1, 0x10(%r12)
movb $0x0, 0x18(%r12)
movq 0x138(%rbx), %rdi
movq %r12, %rsi
callq 0x1bdb0
movq (%r12), %rax
movss 0x292e7(%rip), %xmm0 # 0xf80ec
ucomiss 0x4(%rax), %xmm0
jb 0xcee4e
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0xcfeee
movq 0x138(%rbx), %rdi
movq %r14, %rsi
callq 0x1bdb0
movq 0x140(%rbx), %rdi
movq %r14, %rsi
callq 0x1bdb0
movq 0x1a8(%rbx), %rax
cmpq $-0x1, %rax
je 0xcee7c
movq (%r14), %rcx
leaq (%rax,%rax,2), %rax
movl (%rcx,%rax,4), %r13d
movl %r13d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x293fa(%rip), %rdi # 0xf8261
leaq 0x1a39c(%rip), %rdx # 0xe920a
leaq 0x294b6(%rip), %rcx # 0xf832b
movl $0x133, %esi # imm = 0x133
jmp 0xcee96
leaq 0x293de(%rip), %rdi # 0xf8261
leaq 0x1a380(%rip), %rdx # 0xe920a
leaq 0x294fa(%rip), %rcx # 0xf838b
movl $0x14f, %esi # imm = 0x14F
xorl %eax, %eax
callq 0x1bec0
| _Z21common_sampler_sampleP14common_samplerP13llama_contextib:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r12d, ecx
mov ebp, edx
mov r15, rsi
mov rbx, rdi
call _ZN14common_sampler10set_logitsEP13llama_contexti; common_sampler::set_logits(llama_context *,int)
lea r14, [rbx+198h]
test r12d, r12d
jz short loc_CED81
mov rdi, [rbx+138h]
mov rsi, r14
call _llama_sampler_apply
loc_CED81:
mov rdi, [rbx+140h]
mov rsi, r14
call _llama_sampler_apply
mov rax, [rbx+1A8h]
cmp rax, 0FFFFFFFFFFFFFFFFh
jz loc_CEE60
mov rcx, [r14]
lea rax, [rax+rax*2]
mov r13d, [rcx+rax*4]
test r12b, r12b
jnz loc_CEE4E
lea rax, [rsp+68h+var_5C]
mov [rax], r13d
movss xmm0, cs:dword_E900C
movlps qword ptr [rax+4], xmm0
lea r12, [rsp+68h+var_50]
mov [r12], rax
mov qword ptr [r12+8], 1
mov qword ptr [r12+10h], 0FFFFFFFFFFFFFFFFh
mov byte ptr [r12+18h], 0
mov rdi, [rbx+138h]
mov rsi, r12
call _llama_sampler_apply
mov rax, [r12]
movss xmm0, cs:dword_F80EC
ucomiss xmm0, dword ptr [rax+4]
jb short loc_CEE4E
mov rdi, rbx
mov rsi, r15
mov edx, ebp
call _ZN14common_sampler10set_logitsEP13llama_contexti; common_sampler::set_logits(llama_context *,int)
mov rdi, [rbx+138h]
mov rsi, r14
call _llama_sampler_apply
mov rdi, [rbx+140h]
mov rsi, r14
call _llama_sampler_apply
mov rax, [rbx+1A8h]
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_CEE7C
mov rcx, [r14]
lea rax, [rax+rax*2]
mov r13d, [rcx+rax*4]
loc_CEE4E:
mov eax, r13d
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_CEE60:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCurPSelected1N; "cur_p.selected != -1 && \"no selected t"...
mov esi, 133h
jmp short loc_CEE96
loc_CEE7C:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCurPSelected1N_0; "cur_p.selected != -1 && \"no selected t"...
mov esi, 14Fh
loc_CEE96:
xor eax, eax
call _ggml_abort
| long long common_sampler_sample(_QWORD *a1, long long a2, unsigned int a3, int a4)
{
_QWORD *v6; // r14
long long v7; // rax
unsigned int v8; // r13d
long long v9; // rax
double v11; // xmm0_8
int v12; // [rsp+Ch] [rbp-5Ch] BYREF
double v13; // [rsp+10h] [rbp-58h] BYREF
_QWORD v14[3]; // [rsp+18h] [rbp-50h] BYREF
char v15; // [rsp+30h] [rbp-38h]
((void (*)(void))common_sampler::set_logits)();
v6 = a1 + 51;
if ( a4 )
llama_sampler_apply(a1[39], a1 + 51);
llama_sampler_apply(a1[40], a1 + 51);
v7 = a1[53];
if ( v7 == -1 )
{
v11 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
307LL,
"GGML_ASSERT(%s) failed",
"cur_p.selected != -1 && \"no selected token during sampling - check your sampling configuration\"");
}
else
{
v8 = *(_DWORD *)(*v6 + 12 * v7);
if ( (_BYTE)a4 )
return v8;
v12 = *(_DWORD *)(*v6 + 12 * v7);
_mm_storel_ps(&v13, (__m128)0x3F800000u);
v14[0] = &v12;
v14[1] = 1LL;
v14[2] = -1LL;
v15 = 0;
llama_sampler_apply(a1[39], v14);
if ( *(float *)(v14[0] + 4LL) > -INFINITY )
return v8;
common_sampler::set_logits(a1, a2, a3);
llama_sampler_apply(a1[39], a1 + 51);
llama_sampler_apply(a1[40], a1 + 51);
v9 = a1[53];
if ( v9 != -1 )
return *(unsigned int *)(*v6 + 12 * v9);
v11 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
335LL,
"GGML_ASSERT(%s) failed",
"cur_p.selected != -1 && \"no selected token during re-sampling - check your sampling configuration\"");
}
return common_sampler_sample_and_accept_n(v11);
}
| common_sampler_sample:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R12D,ECX
MOV EBP,EDX
MOV R15,RSI
MOV RBX,RDI
CALL 0x001cfeee
LEA R14,[RBX + 0x198]
TEST R12D,R12D
JZ 0x001ced81
MOV RDI,qword ptr [RBX + 0x138]
MOV RSI,R14
CALL 0x0011bdb0
LAB_001ced81:
MOV RDI,qword ptr [RBX + 0x140]
MOV RSI,R14
CALL 0x0011bdb0
MOV RAX,qword ptr [RBX + 0x1a8]
CMP RAX,-0x1
JZ 0x001cee60
MOV RCX,qword ptr [R14]
LEA RAX,[RAX + RAX*0x2]
MOV R13D,dword ptr [RCX + RAX*0x4]
TEST R12B,R12B
JNZ 0x001cee4e
LEA RAX,[RSP + 0xc]
MOV dword ptr [RAX],R13D
MOVSS XMM0,dword ptr [0x001e900c]
MOVLPS qword ptr [RAX + 0x4],XMM0
LEA R12,[RSP + 0x18]
MOV qword ptr [R12],RAX
MOV qword ptr [R12 + 0x8],0x1
MOV qword ptr [R12 + 0x10],-0x1
MOV byte ptr [R12 + 0x18],0x0
MOV RDI,qword ptr [RBX + 0x138]
MOV RSI,R12
CALL 0x0011bdb0
MOV RAX,qword ptr [R12]
MOVSS XMM0,dword ptr [0x001f80ec]
UCOMISS XMM0,dword ptr [RAX + 0x4]
JC 0x001cee4e
MOV RDI,RBX
MOV RSI,R15
MOV EDX,EBP
CALL 0x001cfeee
MOV RDI,qword ptr [RBX + 0x138]
MOV RSI,R14
CALL 0x0011bdb0
MOV RDI,qword ptr [RBX + 0x140]
MOV RSI,R14
CALL 0x0011bdb0
MOV RAX,qword ptr [RBX + 0x1a8]
CMP RAX,-0x1
JZ 0x001cee7c
MOV RCX,qword ptr [R14]
LEA RAX,[RAX + RAX*0x2]
MOV R13D,dword ptr [RCX + RAX*0x4]
LAB_001cee4e:
MOV EAX,R13D
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001cee60:
LEA RDI,[0x1f8261]
LEA RDX,[0x1e920a]
LEA RCX,[0x1f832b]
MOV ESI,0x133
JMP 0x001cee96
LAB_001cee7c:
LEA RDI,[0x1f8261]
LEA RDX,[0x1e920a]
LEA RCX,[0x1f838b]
MOV ESI,0x14f
LAB_001cee96:
XOR EAX,EAX
CALL 0x0011bec0
|
/* common_sampler_sample(common_sampler*, llama_context*, int, bool) */
int4
common_sampler_sample(common_sampler *param_1,llama_context *param_2,int param_3,bool param_4)
{
common_sampler *pcVar1;
int7 in_register_00000009;
char *pcVar2;
int8 uVar3;
int4 uVar4;
int4 local_5c;
ulong local_58;
int4 *local_50;
int8 local_48;
int8 local_40;
int1 local_38;
common_sampler::set_logits(param_1,param_2,param_3);
pcVar1 = param_1 + 0x198;
if ((int)CONCAT71(in_register_00000009,param_4) != 0) {
llama_sampler_apply(*(int8 *)(param_1 + 0x138),pcVar1);
}
llama_sampler_apply(*(int8 *)(param_1 + 0x140),pcVar1);
if (*(long *)(param_1 + 0x1a8) != -1) {
uVar4 = *(int4 *)(*(long *)pcVar1 + *(long *)(param_1 + 0x1a8) * 0xc);
if (!param_4) {
local_50 = &local_5c;
local_58 = (ulong)DAT_001e900c;
local_48 = 1;
local_40 = 0xffffffffffffffff;
local_38 = 0;
local_5c = uVar4;
llama_sampler_apply(*(int8 *)(param_1 + 0x138),&local_50);
if ((float)local_50[1] <= DAT_001f80ec) {
common_sampler::set_logits(param_1,param_2,param_3);
llama_sampler_apply(*(int8 *)(param_1 + 0x138),pcVar1);
llama_sampler_apply(*(int8 *)(param_1 + 0x140),pcVar1);
if (*(long *)(param_1 + 0x1a8) == -1) {
pcVar2 =
"cur_p.selected != -1 && \"no selected token during re-sampling - check your sampling configuration\""
;
uVar3 = 0x14f;
goto LAB_001cee96;
}
uVar4 = *(int4 *)(*(long *)pcVar1 + *(long *)(param_1 + 0x1a8) * 0xc);
}
}
return uVar4;
}
pcVar2 =
"cur_p.selected != -1 && \"no selected token during sampling - check your sampling configuration\""
;
uVar3 = 0x133;
LAB_001cee96:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",uVar3,
"GGML_ASSERT(%s) failed",pcVar2);
}
| |
24,257 | strmake_root | eloqsql/mysys/my_alloc.c | char *strmake_root(MEM_ROOT *root, const char *str, size_t len)
{
char *pos;
if ((pos=alloc_root(root,len+1)))
{
if (len)
memcpy(pos,str,len);
pos[len]=0;
}
return pos;
} | O3 | c | strmake_root:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x1(%rdx), %rsi
callq 0x2e303
movq %rax, %r15
testq %rax, %rax
je 0x2e6fe
testq %rbx, %rbx
je 0x2e6f9
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x24240
movb $0x0, (%r15,%rbx)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| strmake_root:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdx
mov r14, rsi
lea rsi, [rdx+1]
call alloc_root
mov r15, rax
test rax, rax
jz short loc_2E6FE
test rbx, rbx
jz short loc_2E6F9
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call _memcpy
loc_2E6F9:
mov byte ptr [r15+rbx], 0
loc_2E6FE:
mov rax, r15
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| char * strmake_root(long long a1, long long a2, long long a3)
{
char *v4; // rax
char *v5; // r15
v4 = alloc_root(a1, a3 + 1);
v5 = v4;
if ( v4 )
{
if ( a3 )
memcpy(v4, a2, a3);
v5[a3] = 0;
}
return v5;
}
| strmake_root:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RSI
LEA RSI,[RDX + 0x1]
CALL 0x0012e303
MOV R15,RAX
TEST RAX,RAX
JZ 0x0012e6fe
TEST RBX,RBX
JZ 0x0012e6f9
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x00124240
LAB_0012e6f9:
MOV byte ptr [R15 + RBX*0x1],0x0
LAB_0012e6fe:
MOV RAX,R15
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void * strmake_root(int8 param_1,void *param_2,size_t param_3)
{
void *__dest;
__dest = (void *)alloc_root(param_1,param_3 + 1);
if (__dest != (void *)0x0) {
if (param_3 != 0) {
memcpy(__dest,param_2,param_3);
}
*(int1 *)((long)__dest + param_3) = 0;
}
return __dest;
}
| |
24,258 | JS_ReadTypedArray | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_ReadTypedArray(BCReaderState *s)
{
JSContext *ctx = s->ctx;
JSValue obj = JS_UNDEFINED, array_buffer = JS_UNDEFINED;
uint8_t array_tag;
JSValue args[3];
uint32_t offset, len, idx;
if (bc_get_u8(s, &array_tag))
return JS_EXCEPTION;
if (array_tag >= JS_TYPED_ARRAY_COUNT)
return JS_ThrowTypeError(ctx, "invalid typed array");
if (bc_get_leb128(s, &len))
return JS_EXCEPTION;
if (bc_get_leb128(s, &offset))
return JS_EXCEPTION;
/* XXX: this hack could be avoided if the typed array could be
created before the array buffer */
idx = s->objects_count;
if (BC_add_object_ref1(s, NULL))
goto fail;
array_buffer = JS_ReadObjectRec(s);
if (JS_IsException(array_buffer))
return JS_EXCEPTION;
if (!js_get_array_buffer(ctx, array_buffer)) {
JS_FreeValue(ctx, array_buffer);
return JS_EXCEPTION;
}
args[0] = array_buffer;
args[1] = js_int64(offset);
args[2] = js_int64(len);
obj = js_typed_array_constructor(ctx, JS_UNDEFINED,
3, args,
JS_CLASS_UINT8C_ARRAY + array_tag);
if (JS_IsException(obj))
goto fail;
if (s->allow_reference) {
s->objects[idx] = JS_VALUE_GET_OBJ(obj);
}
JS_FreeValue(ctx, array_buffer);
return obj;
fail:
JS_FreeValue(ctx, array_buffer);
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
} | O0 | c | JS_ReadTypedArray:
subq $0xd8, %rsp
movq %rdi, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xb8(%rsp)
movq 0x91747(%rip), %rax # 0x10c210
movq %rax, 0xa8(%rsp)
movq 0x91740(%rip), %rax # 0x10c218
movq %rax, 0xb0(%rsp)
movq 0x91729(%rip), %rax # 0x10c210
movq %rax, 0x98(%rsp)
movq 0x91722(%rip), %rax # 0x10c218
movq %rax, 0xa0(%rsp)
movq 0xc0(%rsp), %rdi
leaq 0x97(%rsp), %rsi
callq 0x78ea0
cmpl $0x0, %eax
je 0x7ab34
movl $0x0, 0xc8(%rsp)
movq $0x6, 0xd0(%rsp)
jmp 0x7ae70
movzbl 0x97(%rsp), %eax
cmpl $0xc, %eax
jl 0x7ab6c
movq 0xb8(%rsp), %rdi
leaq 0x92798(%rip), %rsi # 0x10d2e8
movb $0x0, %al
callq 0x2c040
movq %rax, 0xc8(%rsp)
movq %rdx, 0xd0(%rsp)
jmp 0x7ae70
movq 0xc0(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x78f20
cmpl $0x0, %eax
je 0x7ab9f
movl $0x0, 0xc8(%rsp)
movq $0x6, 0xd0(%rsp)
jmp 0x7ae70
movq 0xc0(%rsp), %rdi
leaq 0x5c(%rsp), %rsi
callq 0x78f20
cmpl $0x0, %eax
je 0x7abd2
movl $0x0, 0xc8(%rsp)
movq $0x6, 0xd0(%rsp)
jmp 0x7ae70
movq 0xc0(%rsp), %rax
movl 0x40(%rax), %eax
movl %eax, 0x54(%rsp)
movq 0xc0(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x7c1b0
cmpl $0x0, %eax
je 0x7abfc
jmp 0x7ae1f
movq 0xc0(%rsp), %rdi
callq 0x4ade0
movq %rax, 0x40(%rsp)
movq %rdx, 0x48(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0x98(%rsp), %rdi
movq 0xa0(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0x7ac63
movl $0x0, 0xc8(%rsp)
movq $0x6, 0xd0(%rsp)
jmp 0x7ae70
movq 0xb8(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
callq 0x56df0
cmpq $0x0, %rax
jne 0x7acbf
movq 0xb8(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
callq 0x229d0
movl $0x0, 0xc8(%rsp)
movq $0x6, 0xd0(%rsp)
jmp 0x7ae70
movq 0x98(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x68(%rsp)
movl 0x5c(%rsp), %eax
movl %eax, %edi
callq 0x361c0
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x78(%rsp)
movl 0x58(%rsp), %eax
movl %eax, %edi
callq 0x361c0
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0xb8(%rsp), %rdi
movl $0x0, (%rsp)
movq $0x3, 0x8(%rsp)
leaq 0x60(%rsp), %r8
movzbl 0x97(%rsp), %r9d
addl $0x15, %r9d
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movl $0x3, %ecx
callq 0x56f60
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0xa8(%rsp), %rdi
movq 0xb0(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0x7adae
jmp 0x7ae1f
movq 0xc0(%rsp), %rax
movl 0x34(%rax), %eax
shll $0x8, %eax
sarl $0x18, %eax
cmpl $0x0, %eax
je 0x7ade0
movq 0xa8(%rsp), %rdx
movq 0xc0(%rsp), %rax
movq 0x38(%rax), %rax
movl 0x54(%rsp), %ecx
movq %rdx, (%rax,%rcx,8)
movq 0xb8(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
callq 0x229d0
movq 0xa8(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0xd0(%rsp)
jmp 0x7ae70
movq 0xb8(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
callq 0x229d0
movq 0xb8(%rsp), %rdi
movq 0xa8(%rsp), %rsi
movq 0xb0(%rsp), %rdx
callq 0x229d0
movl $0x0, 0xc8(%rsp)
movq $0x6, 0xd0(%rsp)
movq 0xc8(%rsp), %rax
movq 0xd0(%rsp), %rdx
addq $0xd8, %rsp
retq
nopl (%rax,%rax)
| JS_ReadTypedArray:
sub rsp, 0D8h
mov [rsp+0D8h+var_18], rdi
mov rax, [rsp+0D8h+var_18]
mov rax, [rax]
mov [rsp+0D8h+var_20], rax
mov rax, cs:qword_10C210
mov [rsp+0D8h+var_30], rax
mov rax, cs:qword_10C218
mov [rsp+0D8h+var_28], rax
mov rax, cs:qword_10C210
mov [rsp+0D8h+var_40], rax
mov rax, cs:qword_10C218
mov [rsp+0D8h+var_38], rax
mov rdi, [rsp+0D8h+var_18]
lea rsi, [rsp+0D8h+var_41]
call bc_get_u8
cmp eax, 0
jz short loc_7AB34
mov dword ptr [rsp+0D8h+var_10], 0
mov [rsp+0D8h+var_8], 6
jmp loc_7AE70
loc_7AB34:
movzx eax, [rsp+0D8h+var_41]
cmp eax, 0Ch
jl short loc_7AB6C
mov rdi, [rsp+0D8h+var_20]
lea rsi, aInvalidTypedAr_0; "invalid typed array"
mov al, 0
call JS_ThrowTypeError
mov [rsp+0D8h+var_10], rax
mov [rsp+0D8h+var_8], rdx
jmp loc_7AE70
loc_7AB6C:
mov rdi, [rsp+0D8h+var_18]
lea rsi, [rsp+0D8h+var_80]
call bc_get_leb128
cmp eax, 0
jz short loc_7AB9F
mov dword ptr [rsp+0D8h+var_10], 0
mov [rsp+0D8h+var_8], 6
jmp loc_7AE70
loc_7AB9F:
mov rdi, [rsp+0D8h+var_18]
lea rsi, [rsp+0D8h+var_7C]
call bc_get_leb128
cmp eax, 0
jz short loc_7ABD2
mov dword ptr [rsp+0D8h+var_10], 0
mov [rsp+0D8h+var_8], 6
jmp loc_7AE70
loc_7ABD2:
mov rax, [rsp+0D8h+var_18]
mov eax, [rax+40h]
mov [rsp+0D8h+var_84], eax
mov rdi, [rsp+0D8h+var_18]
xor eax, eax
mov esi, eax
call BC_add_object_ref1
cmp eax, 0
jz short loc_7ABFC
jmp loc_7AE1F
loc_7ABFC:
mov rdi, [rsp+0D8h+var_18]
call JS_ReadObjectRec
mov [rsp+0D8h+var_98], rax
mov [rsp+0D8h+var_90], rdx
mov rax, [rsp+0D8h+var_98]
mov [rsp+0D8h+var_40], rax
mov rax, [rsp+0D8h+var_90]
mov [rsp+0D8h+var_38], rax
mov rdi, [rsp+0D8h+var_40]
mov rsi, [rsp+0D8h+var_38]
call JS_IsException_1
cmp eax, 0
jz short loc_7AC63
mov dword ptr [rsp+0D8h+var_10], 0
mov [rsp+0D8h+var_8], 6
jmp loc_7AE70
loc_7AC63:
mov rdi, [rsp+0D8h+var_20]
mov rsi, [rsp+0D8h+var_40]
mov rdx, [rsp+0D8h+var_38]
call js_get_array_buffer
cmp rax, 0
jnz short loc_7ACBF
mov rdi, [rsp+0D8h+var_20]
mov rsi, [rsp+0D8h+var_40]
mov rdx, [rsp+0D8h+var_38]
call JS_FreeValue
mov dword ptr [rsp+0D8h+var_10], 0
mov [rsp+0D8h+var_8], 6
jmp loc_7AE70
loc_7ACBF:
mov rax, [rsp+0D8h+var_40]
mov [rsp+0D8h+var_78], rax
mov rax, [rsp+0D8h+var_38]
mov [rsp+0D8h+var_70], rax
mov eax, [rsp+0D8h+var_7C]
mov edi, eax
call js_int64
mov [rsp+0D8h+var_A8], rax
mov [rsp+0D8h+var_A0], rdx
mov rax, [rsp+0D8h+var_A8]
mov [rsp+0D8h+var_68], rax
mov rax, [rsp+0D8h+var_A0]
mov [rsp+0D8h+var_60], rax
mov eax, [rsp+0D8h+var_80]
mov edi, eax
call js_int64
mov [rsp+0D8h+var_B8], rax
mov [rsp+0D8h+var_B0], rdx
mov rax, [rsp+0D8h+var_B8]
mov [rsp+0D8h+var_58], rax
mov rax, [rsp+0D8h+var_B0]
mov [rsp+0D8h+var_50], rax
mov rdi, [rsp+0D8h+var_20]
mov dword ptr [rsp+0D8h+var_D8], 0
mov [rsp+0D8h+var_D0], 3
lea r8, [rsp+0D8h+var_78]
movzx r9d, [rsp+0D8h+var_41]
add r9d, 15h
mov rsi, [rsp+0D8h+var_D8]
mov rdx, [rsp+0D8h+var_D0]
mov ecx, 3
call js_typed_array_constructor
mov [rsp+0D8h+var_C8], rax
mov [rsp+0D8h+var_C0], rdx
mov rax, [rsp+0D8h+var_C8]
mov [rsp+0D8h+var_30], rax
mov rax, [rsp+0D8h+var_C0]
mov [rsp+0D8h+var_28], rax
mov rdi, [rsp+0D8h+var_30]
mov rsi, [rsp+0D8h+var_28]
call JS_IsException_1
cmp eax, 0
jz short loc_7ADAE
jmp short loc_7AE1F
loc_7ADAE:
mov rax, [rsp+0D8h+var_18]
mov eax, [rax+34h]
shl eax, 8
sar eax, 18h
cmp eax, 0
jz short loc_7ADE0
mov rdx, [rsp+0D8h+var_30]
mov rax, [rsp+0D8h+var_18]
mov rax, [rax+38h]
mov ecx, [rsp+0D8h+var_84]
mov [rax+rcx*8], rdx
loc_7ADE0:
mov rdi, [rsp+0D8h+var_20]
mov rsi, [rsp+0D8h+var_40]
mov rdx, [rsp+0D8h+var_38]
call JS_FreeValue
mov rax, [rsp+0D8h+var_30]
mov [rsp+0D8h+var_10], rax
mov rax, [rsp+0D8h+var_28]
mov [rsp+0D8h+var_8], rax
jmp short loc_7AE70
loc_7AE1F:
mov rdi, [rsp+0D8h+var_20]
mov rsi, [rsp+0D8h+var_40]
mov rdx, [rsp+0D8h+var_38]
call JS_FreeValue
mov rdi, [rsp+0D8h+var_20]
mov rsi, [rsp+0D8h+var_30]
mov rdx, [rsp+0D8h+var_28]
call JS_FreeValue
mov dword ptr [rsp+0D8h+var_10], 0
mov [rsp+0D8h+var_8], 6
loc_7AE70:
mov rax, [rsp+0D8h+var_10]
mov rdx, [rsp+0D8h+var_8]
add rsp, 0D8h
retn
| long long JS_ReadTypedArray(
long long *a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
double a6,
double a7,
__m128 a8,
__m128 a9)
{
long long v9; // rdx
long long v10; // rcx
long long v11; // r8
long long v12; // r9
__m128 v13; // xmm4
__m128 v14; // xmm5
long long v15; // rdx
double v16; // xmm4_8
double v17; // xmm5_8
long long v18; // rdx
long long v19; // rdx
long long v20; // rdx
double v21; // xmm4_8
double v22; // xmm5_8
long long v23; // rdx
long long v25; // [rsp+0h] [rbp-D8h]
unsigned int v26; // [rsp+54h] [rbp-84h]
unsigned int v27; // [rsp+58h] [rbp-80h] BYREF
unsigned int v28; // [rsp+5Ch] [rbp-7Ch] BYREF
_QWORD v29[6]; // [rsp+60h] [rbp-78h] BYREF
unsigned __int8 v30; // [rsp+97h] [rbp-41h] BYREF
long long ObjectRec; // [rsp+98h] [rbp-40h]
long long v32; // [rsp+A0h] [rbp-38h]
long long v33; // [rsp+A8h] [rbp-30h]
long long v34; // [rsp+B0h] [rbp-28h]
long long v35; // [rsp+B8h] [rbp-20h]
long long *v36; // [rsp+C0h] [rbp-18h]
long long v37; // [rsp+C8h] [rbp-10h]
long long v38; // [rsp+D0h] [rbp-8h]
v36 = a1;
v35 = *a1;
v33 = 0LL;
v34 = 3LL;
ObjectRec = 0LL;
v32 = 3LL;
if ( (unsigned int)bc_get_u8((long long)a1, &v30) )
{
LODWORD(v37) = 0;
v38 = 6LL;
}
else if ( v30 < 0xCu )
{
if ( (unsigned int)bc_get_leb128((long long)v36, &v27) )
{
LODWORD(v37) = 0;
v38 = 6LL;
}
else if ( (unsigned int)bc_get_leb128((long long)v36, &v28) )
{
LODWORD(v37) = 0;
v38 = 6LL;
}
else
{
v26 = *((_DWORD *)v36 + 16);
if ( (unsigned int)BC_add_object_ref1(v36, 0LL) )
goto LABEL_18;
ObjectRec = JS_ReadObjectRec(v36, a2, a3, a4, a5, v16, v17, a8, a9);
v32 = v18;
if ( JS_IsException_1(ObjectRec, v18) )
{
LODWORD(v37) = 0;
v38 = 6LL;
return v37;
}
if ( !js_get_array_buffer(v35, ObjectRec, v32) )
{
JS_FreeValue(v35, ObjectRec, v32);
LODWORD(v37) = 0;
v38 = 6LL;
return v37;
}
v29[0] = ObjectRec;
v29[1] = v32;
v29[2] = js_int64(v28);
v29[3] = v19;
v29[4] = js_int64(v27);
v29[5] = v20;
LODWORD(v25) = 0;
v33 = js_typed_array_constructor(v35, v25, 3LL, 3, v29, (unsigned int)v30 + 21, a2, a3, a4, a5, v21, v22, a8, a9);
v34 = v23;
if ( JS_IsException_1(v33, v23) )
{
LABEL_18:
JS_FreeValue(v35, ObjectRec, v32);
JS_FreeValue(v35, v33, v34);
LODWORD(v37) = 0;
v38 = 6LL;
return v37;
}
if ( (int)(*((_DWORD *)v36 + 13) << 8) >> 24 )
*(_QWORD *)(v36[7] + 8LL * v26) = v33;
JS_FreeValue(v35, ObjectRec, v32);
v37 = v33;
v38 = v34;
}
}
else
{
v37 = JS_ThrowTypeError(
v35,
(long long)"invalid typed array",
v9,
v10,
v11,
v12,
a2,
a3,
a4,
a5,
v13,
v14,
a8,
a9,
v25);
v38 = v15;
}
return v37;
}
| JS_ReadTypedArray:
SUB RSP,0xd8
MOV qword ptr [RSP + 0xc0],RDI
MOV RAX,qword ptr [RSP + 0xc0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0xb8],RAX
MOV RAX,qword ptr [0x0020c210]
MOV qword ptr [RSP + 0xa8],RAX
MOV RAX,qword ptr [0x0020c218]
MOV qword ptr [RSP + 0xb0],RAX
MOV RAX,qword ptr [0x0020c210]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [0x0020c218]
MOV qword ptr [RSP + 0xa0],RAX
MOV RDI,qword ptr [RSP + 0xc0]
LEA RSI,[RSP + 0x97]
CALL 0x00178ea0
CMP EAX,0x0
JZ 0x0017ab34
MOV dword ptr [RSP + 0xc8],0x0
MOV qword ptr [RSP + 0xd0],0x6
JMP 0x0017ae70
LAB_0017ab34:
MOVZX EAX,byte ptr [RSP + 0x97]
CMP EAX,0xc
JL 0x0017ab6c
MOV RDI,qword ptr [RSP + 0xb8]
LEA RSI,[0x20d2e8]
MOV AL,0x0
CALL 0x0012c040
MOV qword ptr [RSP + 0xc8],RAX
MOV qword ptr [RSP + 0xd0],RDX
JMP 0x0017ae70
LAB_0017ab6c:
MOV RDI,qword ptr [RSP + 0xc0]
LEA RSI,[RSP + 0x58]
CALL 0x00178f20
CMP EAX,0x0
JZ 0x0017ab9f
MOV dword ptr [RSP + 0xc8],0x0
MOV qword ptr [RSP + 0xd0],0x6
JMP 0x0017ae70
LAB_0017ab9f:
MOV RDI,qword ptr [RSP + 0xc0]
LEA RSI,[RSP + 0x5c]
CALL 0x00178f20
CMP EAX,0x0
JZ 0x0017abd2
MOV dword ptr [RSP + 0xc8],0x0
MOV qword ptr [RSP + 0xd0],0x6
JMP 0x0017ae70
LAB_0017abd2:
MOV RAX,qword ptr [RSP + 0xc0]
MOV EAX,dword ptr [RAX + 0x40]
MOV dword ptr [RSP + 0x54],EAX
MOV RDI,qword ptr [RSP + 0xc0]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0017c1b0
CMP EAX,0x0
JZ 0x0017abfc
JMP 0x0017ae1f
LAB_0017abfc:
MOV RDI,qword ptr [RSP + 0xc0]
CALL 0x0014ade0
MOV qword ptr [RSP + 0x40],RAX
MOV qword ptr [RSP + 0x48],RDX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0xa0],RAX
MOV RDI,qword ptr [RSP + 0x98]
MOV RSI,qword ptr [RSP + 0xa0]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x0017ac63
MOV dword ptr [RSP + 0xc8],0x0
MOV qword ptr [RSP + 0xd0],0x6
JMP 0x0017ae70
LAB_0017ac63:
MOV RDI,qword ptr [RSP + 0xb8]
MOV RSI,qword ptr [RSP + 0x98]
MOV RDX,qword ptr [RSP + 0xa0]
CALL 0x00156df0
CMP RAX,0x0
JNZ 0x0017acbf
MOV RDI,qword ptr [RSP + 0xb8]
MOV RSI,qword ptr [RSP + 0x98]
MOV RDX,qword ptr [RSP + 0xa0]
CALL 0x001229d0
MOV dword ptr [RSP + 0xc8],0x0
MOV qword ptr [RSP + 0xd0],0x6
JMP 0x0017ae70
LAB_0017acbf:
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x68],RAX
MOV EAX,dword ptr [RSP + 0x5c]
MOV EDI,EAX
CALL 0x001361c0
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x38],RDX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x78],RAX
MOV EAX,dword ptr [RSP + 0x58]
MOV EDI,EAX
CALL 0x001361c0
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RDX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x80],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x88],RAX
MOV RDI,qword ptr [RSP + 0xb8]
MOV dword ptr [RSP],0x0
MOV qword ptr [RSP + 0x8],0x3
LEA R8,[RSP + 0x60]
MOVZX R9D,byte ptr [RSP + 0x97]
ADD R9D,0x15
MOV RSI,qword ptr [RSP]
MOV RDX,qword ptr [RSP + 0x8]
MOV ECX,0x3
CALL 0x00156f60
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0xa8],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0xb0],RAX
MOV RDI,qword ptr [RSP + 0xa8]
MOV RSI,qword ptr [RSP + 0xb0]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x0017adae
JMP 0x0017ae1f
LAB_0017adae:
MOV RAX,qword ptr [RSP + 0xc0]
MOV EAX,dword ptr [RAX + 0x34]
SHL EAX,0x8
SAR EAX,0x18
CMP EAX,0x0
JZ 0x0017ade0
MOV RDX,qword ptr [RSP + 0xa8]
MOV RAX,qword ptr [RSP + 0xc0]
MOV RAX,qword ptr [RAX + 0x38]
MOV ECX,dword ptr [RSP + 0x54]
MOV qword ptr [RAX + RCX*0x8],RDX
LAB_0017ade0:
MOV RDI,qword ptr [RSP + 0xb8]
MOV RSI,qword ptr [RSP + 0x98]
MOV RDX,qword ptr [RSP + 0xa0]
CALL 0x001229d0
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0xc8],RAX
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0xd0],RAX
JMP 0x0017ae70
LAB_0017ae1f:
MOV RDI,qword ptr [RSP + 0xb8]
MOV RSI,qword ptr [RSP + 0x98]
MOV RDX,qword ptr [RSP + 0xa0]
CALL 0x001229d0
MOV RDI,qword ptr [RSP + 0xb8]
MOV RSI,qword ptr [RSP + 0xa8]
MOV RDX,qword ptr [RSP + 0xb0]
CALL 0x001229d0
MOV dword ptr [RSP + 0xc8],0x0
MOV qword ptr [RSP + 0xd0],0x6
LAB_0017ae70:
MOV RAX,qword ptr [RSP + 0xc8]
MOV RDX,qword ptr [RSP + 0xd0]
ADD RSP,0xd8
RET
|
int1 [16] JS_ReadTypedArray(int8 *param_1)
{
uint uVar1;
int iVar2;
long lVar3;
int1 auVar4 [16];
uint uStack_d4;
int4 local_80;
int4 local_7c;
int1 local_78 [16];
int1 local_68 [16];
int1 local_58 [16];
byte local_41;
int1 local_40 [16];
int1 local_30 [16];
int8 local_20;
int8 *local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_20 = *param_1;
local_30._0_8_ = DAT_0020c210;
local_30._8_8_ = DAT_0020c218;
local_40._0_8_ = DAT_0020c210;
local_40._8_8_ = DAT_0020c218;
local_18 = param_1;
iVar2 = bc_get_u8(param_1,&local_41);
if (iVar2 == 0) {
if (local_41 < 0xc) {
iVar2 = bc_get_leb128(local_18,&local_80);
if (iVar2 == 0) {
iVar2 = bc_get_leb128(local_18,&local_7c);
if (iVar2 == 0) {
uVar1 = *(uint *)(local_18 + 8);
iVar2 = BC_add_object_ref1(local_18,0);
if (iVar2 == 0) {
local_40 = JS_ReadObjectRec(local_18);
iVar2 = JS_IsException(local_40._0_8_,local_40._8_8_);
if (iVar2 != 0) {
local_10 = 0;
local_8 = 6;
goto LAB_0017ae70;
}
lVar3 = js_get_array_buffer(local_20,local_40._0_8_,local_40._8_8_);
if (lVar3 == 0) {
JS_FreeValue(local_20,local_40._0_8_,local_40._8_8_);
local_10 = 0;
local_8 = 6;
goto LAB_0017ae70;
}
local_78 = local_40;
local_68 = js_int64(local_7c);
local_58 = js_int64(local_80);
local_30 = js_typed_array_constructor
(local_20,(ulong)uStack_d4 << 0x20,3,3,local_78,local_41 + 0x15);
iVar2 = JS_IsException(local_30._0_8_,local_30._8_8_);
if (iVar2 == 0) {
if ((*(int *)((long)local_18 + 0x34) << 8) >> 0x18 != 0) {
*(int8 *)(local_18[7] + (ulong)uVar1 * 8) = local_30._0_8_;
}
JS_FreeValue(local_20,local_40._0_8_,local_40._8_8_);
local_10 = local_30._0_4_;
uStack_c = local_30._4_4_;
local_8 = local_30._8_8_;
goto LAB_0017ae70;
}
}
JS_FreeValue(local_20,local_40._0_8_,local_40._8_8_);
JS_FreeValue(local_20,local_30._0_8_,local_30._8_8_);
local_10 = 0;
local_8 = 6;
}
else {
local_10 = 0;
local_8 = 6;
}
}
else {
local_10 = 0;
local_8 = 6;
}
}
else {
auVar4 = JS_ThrowTypeError(local_20,"invalid typed array");
local_8 = auVar4._8_8_;
local_10 = auVar4._0_4_;
uStack_c = auVar4._4_4_;
}
}
else {
local_10 = 0;
local_8 = 6;
}
LAB_0017ae70:
auVar4._4_4_ = uStack_c;
auVar4._0_4_ = local_10;
auVar4._8_8_ = local_8;
return auVar4;
}
| |
24,259 | JS_ReadTypedArray | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_ReadTypedArray(BCReaderState *s)
{
JSContext *ctx = s->ctx;
JSValue obj = JS_UNDEFINED, array_buffer = JS_UNDEFINED;
uint8_t array_tag;
JSValue args[3];
uint32_t offset, len, idx;
if (bc_get_u8(s, &array_tag))
return JS_EXCEPTION;
if (array_tag >= JS_TYPED_ARRAY_COUNT)
return JS_ThrowTypeError(ctx, "invalid typed array");
if (bc_get_leb128(s, &len))
return JS_EXCEPTION;
if (bc_get_leb128(s, &offset))
return JS_EXCEPTION;
/* XXX: this hack could be avoided if the typed array could be
created before the array buffer */
idx = s->objects_count;
if (BC_add_object_ref1(s, NULL))
goto fail;
array_buffer = JS_ReadObjectRec(s);
if (JS_IsException(array_buffer))
return JS_EXCEPTION;
if (!js_get_array_buffer(ctx, array_buffer)) {
JS_FreeValue(ctx, array_buffer);
return JS_EXCEPTION;
}
args[0] = array_buffer;
args[1] = js_int64(offset);
args[2] = js_int64(len);
obj = js_typed_array_constructor(ctx, JS_UNDEFINED,
3, args,
JS_CLASS_UINT8C_ARRAY + array_tag);
if (JS_IsException(obj))
goto fail;
if (s->allow_reference) {
s->objects[idx] = JS_VALUE_GET_OBJ(obj);
}
JS_FreeValue(ctx, array_buffer);
return obj;
fail:
JS_FreeValue(ctx, array_buffer);
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
} | O3 | c | JS_ReadTypedArray:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %r15
movq (%rdi), %r14
leaq 0x7(%rsp), %rsi
callq 0x46998
movl $0x6, %ebx
testl %eax, %eax
je 0x47689
xorl %r13d, %r13d
movq %r13, %rax
movq %rbx, %rdx
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzbl 0x7(%rsp), %ebp
cmpl $0xc, %ebp
jb 0x476a9
leaq 0x59c22(%rip), %rsi # 0xa12bc
xorl %r13d, %r13d
movq %r14, %rdi
xorl %eax, %eax
callq 0x2214f
jmp 0x47674
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x469d0
testl %eax, %eax
jne 0x47671
leaq 0xc(%rsp), %rsi
movq %r15, %rdi
callq 0x469d0
testl %eax, %eax
jne 0x47671
movl 0x40(%r15), %r12d
xorl %r13d, %r13d
movq %r15, %rdi
xorl %esi, %esi
callq 0x48064
testl %eax, %eax
jne 0x47674
movq %r15, %rdi
callq 0x32d34
movq %rdx, %r13
movl %r13d, %ecx
cmpq $0x6, %rcx
je 0x47671
cmpl $-0x1, %ecx
jne 0x477c0
movzwl 0x6(%rax), %ecx
addl $-0x13, %ecx
cmpw $0x2, %cx
jae 0x477c0
cmpq $0x0, 0x30(%rax)
je 0x477d3
movl 0xc(%rsp), %esi
xorl %ecx, %ecx
cvtsi2sd %rsi, %xmm0
testl %esi, %esi
movq %xmm0, %rdx
cmovnsq %rsi, %rdx
movl $0x7, %r9d
cmovnsq %rcx, %r9
movl 0x8(%rsp), %esi
xorps %xmm0, %xmm0
cvtsi2sd %rsi, %xmm0
testl %esi, %esi
movq %xmm0, %rdi
cmovnsq %rsi, %rdi
leaq 0x20(%rsp), %r8
movq %rax, (%r8)
movq %r13, 0x10(%rsp)
movq %r13, 0x8(%r8)
movq %rdx, 0x10(%r8)
movl $0x7, %edx
cmovnsq %rcx, %rdx
movq %r9, 0x18(%r8)
movq %rdi, 0x20(%r8)
movq %rdx, 0x28(%r8)
addl $0x15, %ebp
movl $0x3, %edx
movq %r14, %rdi
xorl %esi, %esi
movq %rax, 0x18(%rsp)
movl %ebp, %r9d
callq 0x396d8
movq %rdx, %rbp
cmpl $0x6, %ebp
jne 0x47801
movq 0x18(%r14), %rdi
movq 0x18(%rsp), %rsi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x47671
movq 0x10(%rsp), %rdx
jmp 0x477f7
movq %r14, %rdi
movl $0x13, %esi
movq %rax, %r15
callq 0x270bb
movq %r15, %rax
cmpl $-0x9, %r13d
jb 0x47671
movq 0x18(%r14), %rdi
movl (%rax), %edx
leal -0x1(%rdx), %ecx
movl %ecx, (%rax)
cmpl $0x1, %edx
jg 0x47671
movq %rax, %rsi
movq %r13, %rdx
callq 0x20d90
jmp 0x47671
movq %rax, %r13
movq 0x18(%rsp), %rsi
cmpb $0x0, 0x36(%r15)
je 0x47818
movq 0x38(%r15), %rax
movq %r13, (%rax,%r12,8)
movq 0x18(%r14), %rdi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x47832
movq 0x10(%rsp), %rdx
callq 0x20d90
movq %rbp, %rbx
jmp 0x47674
| JS_ReadTypedArray:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r15, rdi
mov r14, [rdi]
lea rsi, [rsp+88h+var_81]
call bc_get_u8
mov ebx, 6
test eax, eax
jz short loc_47689
loc_47671:
xor r13d, r13d
loc_47674:
mov rax, r13
mov rdx, rbx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_47689:
movzx ebp, [rsp+88h+var_81]
cmp ebp, 0Ch
jb short loc_476A9
lea rsi, aInvalidTypedAr_0; "invalid typed array"
xor r13d, r13d
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
jmp short loc_47674
loc_476A9:
lea rsi, [rsp+88h+var_80]
mov rdi, r15
call bc_get_leb128
test eax, eax
jnz short loc_47671
lea rsi, [rsp+88h+var_7C]
mov rdi, r15
call bc_get_leb128
test eax, eax
jnz short loc_47671
mov r12d, [r15+40h]
xor r13d, r13d
mov rdi, r15
xor esi, esi
call BC_add_object_ref1
test eax, eax
jnz short loc_47674
mov rdi, r15
call JS_ReadObjectRec
mov r13, rdx
mov ecx, r13d
cmp rcx, 6
jz loc_47671
cmp ecx, 0FFFFFFFFh
jnz loc_477C0
movzx ecx, word ptr [rax+6]
add ecx, 0FFFFFFEDh
cmp cx, 2
jnb loc_477C0
cmp qword ptr [rax+30h], 0
jz loc_477D3
mov esi, [rsp+88h+var_7C]
xor ecx, ecx
cvtsi2sd xmm0, rsi
test esi, esi
movq rdx, xmm0
cmovns rdx, rsi
mov r9d, 7
cmovns r9, rcx
mov esi, [rsp+88h+var_80]
xorps xmm0, xmm0
cvtsi2sd xmm0, rsi
test esi, esi
movq rdi, xmm0
cmovns rdi, rsi
lea r8, [rsp+88h+var_68]
mov [r8], rax
mov [rsp+88h+var_78], r13
mov [r8+8], r13
mov [r8+10h], rdx
mov edx, 7
cmovns rdx, rcx
mov [r8+18h], r9
mov [r8+20h], rdi
mov [r8+28h], rdx
add ebp, 15h
mov edx, 3
mov rdi, r14
xor esi, esi
mov [rsp+88h+var_70], rax
mov r9d, ebp
call js_typed_array_constructor
mov rbp, rdx
cmp ebp, 6
jnz short loc_47801
mov rdi, [r14+18h]
mov rsi, [rsp+88h+var_70]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg loc_47671
mov rdx, [rsp+88h+var_78]
jmp short loc_477F7
loc_477C0:
mov rdi, r14
mov esi, 13h
mov r15, rax
call JS_ThrowTypeErrorInvalidClass
mov rax, r15
loc_477D3:
cmp r13d, 0FFFFFFF7h
jb loc_47671
mov rdi, [r14+18h]
mov edx, [rax]
lea ecx, [rdx-1]
mov [rax], ecx
cmp edx, 1
jg loc_47671
mov rsi, rax
mov rdx, r13
loc_477F7:
call js_free_value_rt
jmp loc_47671
loc_47801:
mov r13, rax
mov rsi, [rsp+88h+var_70]
cmp byte ptr [r15+36h], 0
jz short loc_47818
mov rax, [r15+38h]
mov [rax+r12*8], r13
loc_47818:
mov rdi, [r14+18h]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg short loc_47832
mov rdx, [rsp+88h+var_78]
call js_free_value_rt
loc_47832:
mov rbx, rbp
jmp loc_47674
| unsigned long long JS_ReadTypedArray(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
double a6,
double a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
int a13,
int a14)
{
long long v15; // r14
long long v16; // rdx
long long v17; // rcx
long long v18; // r8
long long v19; // r9
__m128 v20; // xmm4
__m128 v21; // xmm5
unsigned long long v22; // r13
int v24; // ebp
long long v25; // rdx
int v26; // ecx
int v27; // r8d
int v28; // r9d
long long v29; // r12
long long v30; // rdx
long long v31; // rcx
long long v32; // r8
long long v33; // r9
__m128 v34; // xmm4
__m128 v35; // xmm5
long long ObjectRec; // rax
long long v37; // rdx
long long v38; // r8
long long v39; // r9
double v40; // xmm4_8
double v41; // xmm5_8
long long v42; // r13
double v43; // rdx
long long v44; // r9
__m128 v45; // xmm0
double v46; // rdi
long long v47; // rdx
unsigned long long v48; // rax
int v49; // edx
long long v50; // rdi
_QWORD *v51; // rsi
int v52; // eax
long long v53; // rcx
long long v54; // rdx
long long v55; // r15
int v56; // edx
_QWORD *v57; // rsi
long long v58; // rdi
int v59; // eax
long long v60; // rcx
char v61; // [rsp+0h] [rbp-88h]
unsigned __int8 v62; // [rsp+7h] [rbp-81h] BYREF
int v63; // [rsp+8h] [rbp-80h] BYREF
int v64; // [rsp+Ch] [rbp-7Ch] BYREF
long long v65; // [rsp+10h] [rbp-78h]
_DWORD *v66; // [rsp+18h] [rbp-70h]
double v67[13]; // [rsp+20h] [rbp-68h] BYREF
v15 = *(_QWORD *)a1;
if ( (unsigned int)bc_get_u8(a1, &v62, a11, a12, a13, a14) )
return 0LL;
v24 = v62;
if ( v62 >= 0xCu )
{
v22 = 0LL;
JS_ThrowTypeError(v15, (long long)"invalid typed array", v16, v17, v18, v19, a2, a3, a4, a5, v20, v21, a8, a9, v61);
return v22;
}
if ( (unsigned int)bc_get_leb128(a1, &v63, v16, v17, v18, v19)
|| (unsigned int)bc_get_leb128(a1, &v64, v25, v26, v27, v28) )
{
return 0LL;
}
v29 = *(unsigned int *)(a1 + 64);
v22 = 0LL;
if ( (unsigned int)BC_add_object_ref1(a1, 0LL) )
return v22;
ObjectRec = JS_ReadObjectRec(a1, a2, a3, a4, a5, v34, v35, a8, a9, 0LL, v30, v31, v32, v33);
v42 = v37;
if ( (unsigned int)v37 == 6LL )
return 0LL;
if ( (_DWORD)v37 != -1 || (unsigned __int16)(*(_WORD *)(ObjectRec + 6) - 19) >= 2u )
{
v55 = ObjectRec;
JS_ThrowTypeErrorInvalidClass(v15, 19, a2, a3, a4, a5, v40, v41, a8, a9);
ObjectRec = v55;
LABEL_25:
if ( (unsigned int)v42 < 0xFFFFFFF7 )
return 0LL;
v50 = *(_QWORD *)(v15 + 24);
v56 = *(_DWORD *)ObjectRec;
v53 = (unsigned int)(*(_DWORD *)ObjectRec - 1);
*(_DWORD *)ObjectRec = v53;
if ( v56 > 1 )
return 0LL;
v51 = (_QWORD *)ObjectRec;
v54 = v42;
goto LABEL_28;
}
if ( !*(_QWORD *)(ObjectRec + 48) )
goto LABEL_25;
v43 = (double)v64;
if ( v64 >= 0 )
*(_QWORD *)&v43 = (unsigned int)v64;
v44 = 7LL;
if ( v64 >= 0 )
v44 = 0LL;
v45 = 0LL;
v46 = (double)v63;
if ( v63 >= 0 )
*(_QWORD *)&v46 = (unsigned int)v63;
*(_QWORD *)&v67[0] = ObjectRec;
v65 = v42;
*(_QWORD *)&v67[1] = v42;
v67[2] = v43;
v47 = 7LL;
if ( v63 >= 0 )
v47 = 0LL;
*(_QWORD *)&v67[3] = v44;
v67[4] = v46;
*(_QWORD *)&v67[5] = v47;
v66 = (_DWORD *)ObjectRec;
*(double *)v45.m128_u64 = (double)v63;
v48 = js_typed_array_constructor(v15, 0LL, 3LL, v45, a3, a4, a5, v40, v41, a8, a9, 0LL, (long long)v67, v24 + 21);
if ( v49 == 6 )
{
v50 = *(_QWORD *)(v15 + 24);
v51 = v66;
v52 = *v66;
v53 = (unsigned int)(*v66 - 1);
*v66 = v53;
if ( v52 > 1 )
return 0LL;
v54 = v65;
LABEL_28:
js_free_value_rt(v50, v51, v54, v53, v38, v39);
return 0LL;
}
v22 = v48;
v57 = v66;
if ( *(_BYTE *)(a1 + 54) )
*(_QWORD *)(*(_QWORD *)(a1 + 56) + 8 * v29) = v48;
v58 = *(_QWORD *)(v15 + 24);
v59 = *(_DWORD *)v57;
v60 = (unsigned int)(*(_DWORD *)v57 - 1);
*(_DWORD *)v57 = v60;
if ( v59 <= 1 )
js_free_value_rt(v58, v57, v65, v60, v38, v39);
return v22;
}
| JS_ReadTypedArray:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R15,RDI
MOV R14,qword ptr [RDI]
LEA RSI,[RSP + 0x7]
CALL 0x00146998
MOV EBX,0x6
TEST EAX,EAX
JZ 0x00147689
LAB_00147671:
XOR R13D,R13D
LAB_00147674:
MOV RAX,R13
MOV RDX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00147689:
MOVZX EBP,byte ptr [RSP + 0x7]
CMP EBP,0xc
JC 0x001476a9
LEA RSI,[0x1a12bc]
XOR R13D,R13D
MOV RDI,R14
XOR EAX,EAX
CALL 0x0012214f
JMP 0x00147674
LAB_001476a9:
LEA RSI,[RSP + 0x8]
MOV RDI,R15
CALL 0x001469d0
TEST EAX,EAX
JNZ 0x00147671
LEA RSI,[RSP + 0xc]
MOV RDI,R15
CALL 0x001469d0
TEST EAX,EAX
JNZ 0x00147671
MOV R12D,dword ptr [R15 + 0x40]
XOR R13D,R13D
MOV RDI,R15
XOR ESI,ESI
CALL 0x00148064
TEST EAX,EAX
JNZ 0x00147674
MOV RDI,R15
CALL 0x00132d34
MOV R13,RDX
MOV ECX,R13D
CMP RCX,0x6
JZ 0x00147671
CMP ECX,-0x1
JNZ 0x001477c0
MOVZX ECX,word ptr [RAX + 0x6]
ADD ECX,-0x13
CMP CX,0x2
JNC 0x001477c0
CMP qword ptr [RAX + 0x30],0x0
JZ 0x001477d3
MOV ESI,dword ptr [RSP + 0xc]
XOR ECX,ECX
CVTSI2SD XMM0,RSI
TEST ESI,ESI
MOVQ RDX,XMM0
CMOVNS RDX,RSI
MOV R9D,0x7
CMOVNS R9,RCX
MOV ESI,dword ptr [RSP + 0x8]
XORPS XMM0,XMM0
CVTSI2SD XMM0,RSI
TEST ESI,ESI
MOVQ RDI,XMM0
CMOVNS RDI,RSI
LEA R8,[RSP + 0x20]
MOV qword ptr [R8],RAX
MOV qword ptr [RSP + 0x10],R13
MOV qword ptr [R8 + 0x8],R13
MOV qword ptr [R8 + 0x10],RDX
MOV EDX,0x7
CMOVNS RDX,RCX
MOV qword ptr [R8 + 0x18],R9
MOV qword ptr [R8 + 0x20],RDI
MOV qword ptr [R8 + 0x28],RDX
ADD EBP,0x15
MOV EDX,0x3
MOV RDI,R14
XOR ESI,ESI
MOV qword ptr [RSP + 0x18],RAX
MOV R9D,EBP
CALL 0x001396d8
MOV RBP,RDX
CMP EBP,0x6
JNZ 0x00147801
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,qword ptr [RSP + 0x18]
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x00147671
MOV RDX,qword ptr [RSP + 0x10]
JMP 0x001477f7
LAB_001477c0:
MOV RDI,R14
MOV ESI,0x13
MOV R15,RAX
CALL 0x001270bb
MOV RAX,R15
LAB_001477d3:
CMP R13D,-0x9
JC 0x00147671
MOV RDI,qword ptr [R14 + 0x18]
MOV EDX,dword ptr [RAX]
LEA ECX,[RDX + -0x1]
MOV dword ptr [RAX],ECX
CMP EDX,0x1
JG 0x00147671
MOV RSI,RAX
MOV RDX,R13
LAB_001477f7:
CALL 0x00120d90
JMP 0x00147671
LAB_00147801:
MOV R13,RAX
MOV RSI,qword ptr [RSP + 0x18]
CMP byte ptr [R15 + 0x36],0x0
JZ 0x00147818
MOV RAX,qword ptr [R15 + 0x38]
MOV qword ptr [RAX + R12*0x8],R13
LAB_00147818:
MOV RDI,qword ptr [R14 + 0x18]
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x00147832
MOV RDX,qword ptr [RSP + 0x10]
CALL 0x00120d90
LAB_00147832:
MOV RBX,RBP
JMP 0x00147674
|
int1 [16] JS_ReadTypedArray(long *param_1)
{
uint uVar1;
long lVar2;
int8 uVar3;
int iVar4;
int1 auVar7 [16];
int1 auVar8 [16];
byte local_81;
uint local_80;
uint local_7c;
ulong local_78;
int *local_70;
int *local_68;
ulong local_60;
double local_58;
int8 local_50;
double local_48;
int8 local_40;
int *piVar5;
ulong uVar6;
lVar2 = *param_1;
iVar4 = bc_get_u8(param_1,&local_81);
if (iVar4 != 0) goto LAB_00147671;
if (0xb < local_81) {
JS_ThrowTypeError(lVar2,"invalid typed array");
return ZEXT816(6) << 0x40;
}
iVar4 = bc_get_leb128(param_1,&local_80);
if ((iVar4 != 0) || (iVar4 = bc_get_leb128(param_1,&local_7c), iVar4 != 0)) goto LAB_00147671;
uVar1 = *(uint *)(param_1 + 8);
iVar4 = BC_add_object_ref1(param_1,0);
if (iVar4 != 0) {
return ZEXT816(6) << 0x40;
}
auVar7 = JS_ReadObjectRec(param_1);
uVar6 = auVar7._8_8_;
piVar5 = auVar7._0_8_;
if ((uVar6 & 0xffffffff) == 6) goto LAB_00147671;
if ((auVar7._8_4_ == 0xffffffff) && ((ushort)(*(short *)((long)piVar5 + 6) - 0x13U) < 2)) {
if (*(long *)(piVar5 + 0xc) == 0) goto LAB_001477d3;
local_58 = (double)local_7c;
if (-1 < (int)local_7c) {
local_58 = (double)(ulong)local_7c;
}
local_50 = 7;
if (-1 < (int)local_7c) {
local_50 = 0;
}
local_48 = (double)local_80;
if (-1 < (int)local_80) {
local_48 = (double)(ulong)local_80;
}
local_40 = 7;
if (-1 < (int)local_80) {
local_40 = 0;
}
local_78 = uVar6;
local_70 = piVar5;
local_68 = piVar5;
local_60 = uVar6;
auVar8 = js_typed_array_constructor(lVar2,0,3,0,&local_68,local_81 + 0x15);
auVar7._8_8_ = local_78;
auVar7._0_8_ = local_70;
if (auVar8._8_4_ != 6) {
if (*(char *)((long)param_1 + 0x36) != '\0') {
*(long *)(param_1[7] + (ulong)uVar1 * 8) = auVar8._0_8_;
}
uVar3 = *(int8 *)(lVar2 + 0x18);
iVar4 = *local_70;
*local_70 = iVar4 + -1;
if (iVar4 < 2) {
js_free_value_rt(uVar3,local_70,local_78);
return auVar8;
}
return auVar8;
}
uVar3 = *(int8 *)(lVar2 + 0x18);
iVar4 = *local_70;
*local_70 = iVar4 + -1;
}
else {
JS_ThrowTypeErrorInvalidClass(lVar2,0x13);
LAB_001477d3:
if (auVar7._8_4_ < 0xfffffff7) goto LAB_00147671;
uVar3 = *(int8 *)(lVar2 + 0x18);
iVar4 = *piVar5;
*piVar5 = iVar4 + -1;
}
if (iVar4 < 2) {
js_free_value_rt(uVar3,auVar7._0_8_,auVar7._8_8_);
}
LAB_00147671:
return ZEXT816(6) << 0x40;
}
| |
24,260 | testing::internal::FormatDeathTestOutput(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest-death-test.cc | static ::std::string FormatDeathTestOutput(const ::std::string& output) {
::std::string ret;
for (size_t at = 0;;) {
const size_t line_end = output.find('\n', at);
ret += "[ DEATH ] ";
if (line_end == ::std::string::npos) {
ret += output.substr(at);
break;
}
ret += output.substr(at, line_end + 1 - at);
at = line_end + 1;
}
return ret;
} | O1 | cpp | testing::internal::FormatDeathTestOutput(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 $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, 0x20(%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
xorl %r15d, %r15d
movq %rsp, %r12
movq %r14, %rdi
movl $0xa, %esi
movq %r15, %rdx
callq 0x8710
movq %rax, %r13
movq %rbx, %rdi
leaq 0x3341e(%rip), %rsi # 0x43aec
callq 0x8a50
cmpq $-0x1, %r13
je 0x10722
leaq 0x1(%r13), %rbp
movq %rbp, %rcx
subq %r15, %rcx
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x8510
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x8170
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1071d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x84e0
movq %rbp, %r15
jmp 0x10763
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq $-0x1, %rcx
callq 0x8510
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x8170
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x10763
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x84e0
cmpq $-0x1, %r13
jne 0x106b1
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x10783
jmp 0x107a5
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x107a8
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x84e0
jmp 0x107a8
jmp 0x107a5
movq %rax, %r14
movq (%rbx), %rdi
movq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x107c0
movq (%rax), %rsi
incq %rsi
callq 0x84e0
movq %r14, %rdi
callq 0x8990
| _ZN7testing8internalL21FormatDeathTestOutputERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, rsi
mov rbx, rdi
lea rax, [rdi+10h]
mov [rsp+58h+var_38], rax
mov [rdi], rax
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
xor r15d, r15d
mov r12, rsp
loc_106B1:
mov rdi, r14
mov esi, 0Ah
mov rdx, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
mov r13, rax
mov rdi, rbx
lea rsi, aDeath; "[ DEATH ] "
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
cmp r13, 0FFFFFFFFFFFFFFFFh
jz short loc_10722
lea rbp, [r13+1]
mov rcx, rbp
sub rcx, r15
mov rdi, r12
mov rsi, r14
mov rdx, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rsi, [rsp+58h+var_58]
mov rdx, [rsp+58h+var_50]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+58h+var_58]; void *
lea rax, [rsp+58h+var_48]
cmp rdi, rax
jz short loc_1071D
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1071D:
mov r15, rbp
jmp short loc_10763
loc_10722:
mov rdi, r12
mov rsi, r14
mov rdx, r15
mov rcx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rsi, [rsp+58h+var_58]
mov rdx, [rsp+58h+var_50]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+58h+var_58]; void *
lea rax, [rsp+58h+var_48]
cmp rdi, rax
jz short loc_10763
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_10763:
cmp r13, 0FFFFFFFFFFFFFFFFh
jnz loc_106B1
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_10783
jmp short loc_107A5
loc_10783:
mov r14, rax
mov rdi, [rsp+0]; void *
lea rax, [rsp+arg_8]
cmp rdi, rax
jz short loc_107A8
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_107A8
jmp short $+2
loc_107A5:
mov r14, rax
loc_107A8:
mov rdi, [rbx]; void *
mov rax, [rsp+arg_18]
cmp rdi, rax
jz short loc_107C0
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_107C0:
mov rdi, r14
call __Unwind_Resume
| long long testing::internal::FormatDeathTestOutput(long long a1, long long a2)
{
long long v2; // r15
long long v3; // r13
void *v5; // [rsp+0h] [rbp-58h] BYREF
_QWORD v6[9]; // [rsp+10h] [rbp-48h] BYREF
v6[2] = a1 + 16;
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v2 = 0LL;
do
{
v3 = std::string::find(a2, 10LL, v2);
std::string::append(a1, "[ DEATH ] ");
if ( v3 == -1 )
{
std::string::substr(&v5, a2, v2, -1LL);
std::string::_M_append(a1, v5);
if ( v5 != v6 )
operator delete(v5, v6[0] + 1LL);
}
else
{
std::string::substr(&v5, a2, v2, v3 + 1 - v2);
std::string::_M_append(a1, v5);
if ( v5 != v6 )
operator delete(v5, v6[0] + 1LL);
v2 = v3 + 1;
}
}
while ( v3 != -1 );
return a1;
}
| FormatDeathTestOutput:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RDI],RAX
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
XOR R15D,R15D
MOV R12,RSP
LAB_001106b1:
MOV RDI,R14
MOV ESI,0xa
MOV RDX,R15
CALL 0x00108710
MOV R13,RAX
LAB_001106c4:
MOV RDI,RBX
LEA RSI,[0x143aec]
CALL 0x00108a50
CMP R13,-0x1
JZ 0x00110722
LEA RBP,[R13 + 0x1]
MOV RCX,RBP
SUB RCX,R15
LAB_001106e3:
MOV RDI,R12
MOV RSI,R14
MOV RDX,R15
CALL 0x00108510
MOV RSI,qword ptr [RSP]
MOV RDX,qword ptr [RSP + 0x8]
LAB_001106fa:
MOV RDI,RBX
CALL 0x00108170
MOV RDI,qword ptr [RSP]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x0011071d
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x001084e0
LAB_0011071d:
MOV R15,RBP
JMP 0x00110763
LAB_00110722:
MOV RDI,R12
MOV RSI,R14
MOV RDX,R15
MOV RCX,-0x1
CALL 0x00108510
MOV RSI,qword ptr [RSP]
MOV RDX,qword ptr [RSP + 0x8]
LAB_00110740:
MOV RDI,RBX
CALL 0x00108170
LAB_00110748:
MOV RDI,qword ptr [RSP]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x00110763
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x001084e0
LAB_00110763:
CMP R13,-0x1
JNZ 0x001106b1
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* testing::internal::FormatDeathTestOutput(std::__cxx11::string const&) */
internal * __thiscall testing::internal::FormatDeathTestOutput(internal *this,string *param_1)
{
long lVar1;
long *local_58 [2];
long local_48 [2];
internal *local_38;
local_38 = this + 0x10;
*(internal **)this = local_38;
*(int8 *)(this + 8) = 0;
this[0x10] = (internal)0x0;
do {
lVar1 = std::__cxx11::string::find((char)param_1,10);
/* try { // try from 001106c4 to 001106d2 has its CatchHandler @ 001107a5 */
std::__cxx11::string::append((char *)this);
if (lVar1 == -1) {
/* try { // try from 00110722 to 00110736 has its CatchHandler @ 00110781 */
std::__cxx11::string::substr((ulong)local_58,(ulong)param_1);
/* try { // try from 00110740 to 00110747 has its CatchHandler @ 0011077f */
std::__cxx11::string::_M_append((char *)this,(ulong)local_58[0]);
if (local_58[0] != local_48) {
operator_delete(local_58[0],local_48[0] + 1);
}
}
else {
/* try { // try from 001106e3 to 001106f0 has its CatchHandler @ 001107a3 */
std::__cxx11::string::substr((ulong)local_58,(ulong)param_1);
/* try { // try from 001106fa to 00110701 has its CatchHandler @ 00110783 */
std::__cxx11::string::_M_append((char *)this,(ulong)local_58[0]);
if (local_58[0] != local_48) {
operator_delete(local_58[0],local_48[0] + 1);
}
}
} while (lVar1 != -1);
return this;
}
| |
24,261 | ma_pvio_tls_check_fp | eloqsql/libmariadb/libmariadb/ma_tls.c | my_bool ma_pvio_tls_check_fp(MARIADB_TLS *ctls, const char *fp, const char *fp_list)
{
unsigned int cert_fp_len= 64;
char *cert_fp= NULL;
my_bool rc=1;
MYSQL *mysql= ctls->pvio->mysql;
cert_fp= (char *)malloc(cert_fp_len);
if ((cert_fp_len= ma_tls_get_finger_print(ctls, cert_fp, cert_fp_len)) < 1)
goto end;
if (fp)
rc= ma_pvio_tls_compare_fp(cert_fp, cert_fp_len, fp, (unsigned int)strlen(fp));
else if (fp_list)
{
MA_FILE *fp;
char buff[255];
if (!(fp = ma_open(fp_list, "r", mysql)))
goto end;
while (ma_gets(buff, sizeof(buff)-1, fp))
{
/* remove trailing new line character */
char *pos= strchr(buff, '\r');
if (!pos)
pos= strchr(buff, '\n');
if (pos)
*pos= '\0';
if (!ma_pvio_tls_compare_fp(cert_fp, cert_fp_len, buff, (unsigned int)strlen(buff)))
{
/* finger print is valid: close file and exit */
ma_close(fp);
rc= 0;
goto end;
}
}
/* No finger print matched - close file and return error */
ma_close(fp);
}
end:
if (cert_fp)
free(cert_fp);
if (rc)
{
my_set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN,
ER(CR_SSL_CONNECTION_ERROR),
"Fingerprint verification of server certificate failed");
}
return rc;
} | O3 | c | ma_pvio_tls_check_fp:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp # imm = 0x118
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r15
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq 0x8(%rdi), %rax
movq 0x40(%rax), %rax
movq %rax, -0x138(%rbp)
movl $0x40, %edi
callq 0x13600
movq %rax, %r14
movq %r15, %rdi
movq %rax, %rsi
movl $0x40, %edx
callq 0x2a30b
movb $0x1, %r13b
testl %eax, %eax
je 0x1e414
movl %eax, %r15d
testq %r12, %r12
je 0x1e480
movq %r12, %rdi
callq 0x131c0
movq %r14, %rdi
movl %r15d, %esi
movq %r12, %rdx
movl %eax, %ecx
callq 0x1e524
movl %eax, %r13d
testq %r14, %r14
je 0x1e421
movq %r14, %rdi
callq 0x13570
testb %r13b, %r13b
je 0x1e458
leaq 0x2d693(%rip), %rax # 0x4bac0
movq (%rax), %rdx
leaq 0x2d699(%rip), %rax # 0x4bad0
movq 0xd0(%rax), %rcx
leaq 0x18a3f(%rip), %r8 # 0x36e84
movq -0x138(%rbp), %rdi
movl $0x7ea, %esi # imm = 0x7EA
xorl %eax, %eax
callq 0x160e1
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x1e51f
movl %r13d, %eax
addq $0x118, %rsp # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testq %rbx, %rbx
je 0x1e414
leaq 0x18f07(%rip), %rsi # 0x37393
movq %rbx, %rdi
movq -0x138(%rbp), %rdx
callq 0x295b0
testq %rax, %rax
je 0x1e507
movq %rax, %r12
leaq -0x130(%rbp), %r13
movl $0xfe, %esi
movq %r13, %rdi
movq %r12, %rdx
callq 0x29787
testq %rax, %rax
je 0x1e50f
movq %r13, %rdi
movl $0xd, %esi
callq 0x13180
testq %rax, %rax
jne 0x1e4e3
movq %r13, %rdi
movl $0xa, %esi
callq 0x13180
testq %rax, %rax
je 0x1e4e6
movb $0x0, (%rax)
movq %r13, %rdi
callq 0x131c0
movq %r14, %rdi
movl %r15d, %esi
movq %r13, %rdx
movl %eax, %ecx
callq 0x1e524
testb %al, %al
jne 0x1e4aa
xorl %r13d, %r13d
jmp 0x1e512
movb $0x1, %r13b
jmp 0x1e414
movb $0x1, %r13b
movq %r12, %rdi
callq 0x296bc
jmp 0x1e414
callq 0x13500
| ma_pvio_tls_check_fp:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 118h
mov rbx, rdx
mov r12, rsi
mov r15, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rax, [rdi+8]
mov rax, [rax+40h]
mov [rbp+var_138], rax
mov edi, 40h ; '@'
call _malloc
mov r14, rax
mov rdi, r15
mov rsi, rax
mov edx, 40h ; '@'
call ma_tls_get_finger_print
mov r13b, 1
test eax, eax
jz short loc_1E414
mov r15d, eax
test r12, r12
jz loc_1E480
mov rdi, r12
call _strlen
mov rdi, r14
mov esi, r15d
mov rdx, r12
mov ecx, eax
call ma_pvio_tls_compare_fp
mov r13d, eax
loc_1E414:
test r14, r14
jz short loc_1E421
mov rdi, r14
call _free
loc_1E421:
test r13b, r13b
jz short loc_1E458
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rax, client_errors
mov rcx, [rax+0D0h]
lea r8, aFingerprintVer; "Fingerprint verification of server cert"...
mov rdi, [rbp+var_138]
mov esi, 7EAh
xor eax, eax
call my_set_error
loc_1E458:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_1E51F
mov eax, r13d
add rsp, 118h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_1E480:
test rbx, rbx
jz short loc_1E414
lea rsi, aKoi8r+4; "r"
mov rdi, rbx
mov rdx, [rbp+var_138]
call ma_open
test rax, rax
jz short loc_1E507
mov r12, rax
lea r13, [rbp+var_130]
loc_1E4AA:
mov esi, 0FEh
mov rdi, r13
mov rdx, r12
call ma_gets
test rax, rax
jz short loc_1E50F
mov rdi, r13
mov esi, 0Dh
call _strchr
test rax, rax
jnz short loc_1E4E3
mov rdi, r13
mov esi, 0Ah
call _strchr
test rax, rax
jz short loc_1E4E6
loc_1E4E3:
mov byte ptr [rax], 0
loc_1E4E6:
mov rdi, r13
call _strlen
mov rdi, r14
mov esi, r15d
mov rdx, r13
mov ecx, eax
call ma_pvio_tls_compare_fp
test al, al
jnz short loc_1E4AA
xor r13d, r13d
jmp short loc_1E512
loc_1E507:
mov r13b, 1
jmp loc_1E414
loc_1E50F:
mov r13b, 1
loc_1E512:
mov rdi, r12
call ma_close
jmp loc_1E414
loc_1E51F:
call ___stack_chk_fail
| long long ma_pvio_tls_check_fp(long long a1, long long a2, long long a3)
{
_BYTE *v3; // r13
long long v5; // r14
unsigned int finger_print; // eax
unsigned int v7; // r15d
unsigned int v8; // eax
long long v10; // rax
long long v11; // r12
_BYTE *v12; // rax
unsigned int v13; // eax
long long v14; // [rsp+8h] [rbp-138h]
_BYTE v15[256]; // [rsp+10h] [rbp-130h] BYREF
unsigned long long v16; // [rsp+110h] [rbp-30h]
v16 = __readfsqword(0x28u);
v14 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 64LL);
v5 = malloc(64LL);
finger_print = ma_tls_get_finger_print(a1, v5, 64LL);
LOBYTE(v3) = 1;
if ( finger_print )
{
v7 = finger_print;
if ( a2 )
{
v8 = strlen(a2);
LODWORD(v3) = ma_pvio_tls_compare_fp(v5, v7, a2, v8);
}
else if ( a3 )
{
v10 = ma_open(a3, "r", v14);
if ( v10 )
{
v11 = v10;
v3 = v15;
while ( ma_gets(v15, 254LL, v11) )
{
v12 = (_BYTE *)strchr(v15, 13LL);
if ( v12 || (v12 = (_BYTE *)strchr(v15, 10LL)) != 0LL )
*v12 = 0;
v13 = strlen(v15);
if ( !(unsigned __int8)ma_pvio_tls_compare_fp(v5, v7, v15, v13) )
{
LODWORD(v3) = 0;
goto LABEL_20;
}
}
LOBYTE(v3) = 1;
LABEL_20:
ma_close(v11);
}
else
{
LOBYTE(v3) = 1;
}
}
}
if ( v5 )
free(v5);
if ( (_BYTE)v3 )
my_set_error(
v14,
2026,
(long long)SQLSTATE_UNKNOWN,
client_errors[26],
"Fingerprint verification of server certificate failed");
return (unsigned int)v3;
}
| ma_pvio_tls_check_fp:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x118
MOV RBX,RDX
MOV R12,RSI
MOV R15,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RAX + 0x40]
MOV qword ptr [RBP + -0x138],RAX
MOV EDI,0x40
CALL 0x00113600
MOV R14,RAX
MOV RDI,R15
MOV RSI,RAX
MOV EDX,0x40
CALL 0x0012a30b
MOV R13B,0x1
TEST EAX,EAX
JZ 0x0011e414
MOV R15D,EAX
TEST R12,R12
JZ 0x0011e480
MOV RDI,R12
CALL 0x001131c0
MOV RDI,R14
MOV ESI,R15D
MOV RDX,R12
MOV ECX,EAX
CALL 0x0011e524
MOV R13D,EAX
LAB_0011e414:
TEST R14,R14
JZ 0x0011e421
MOV RDI,R14
CALL 0x00113570
LAB_0011e421:
TEST R13B,R13B
JZ 0x0011e458
LEA RAX,[0x14bac0]
MOV RDX,qword ptr [RAX]
LEA RAX,[0x14bad0]
MOV RCX,qword ptr [RAX + 0xd0]
LEA R8,[0x136e84]
MOV RDI,qword ptr [RBP + -0x138]
MOV ESI,0x7ea
XOR EAX,EAX
CALL 0x001160e1
LAB_0011e458:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0011e51f
MOV EAX,R13D
ADD RSP,0x118
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0011e480:
TEST RBX,RBX
JZ 0x0011e414
LEA RSI,[0x137393]
MOV RDI,RBX
MOV RDX,qword ptr [RBP + -0x138]
CALL 0x001295b0
TEST RAX,RAX
JZ 0x0011e507
MOV R12,RAX
LEA R13,[RBP + -0x130]
LAB_0011e4aa:
MOV ESI,0xfe
MOV RDI,R13
MOV RDX,R12
CALL 0x00129787
TEST RAX,RAX
JZ 0x0011e50f
MOV RDI,R13
MOV ESI,0xd
CALL 0x00113180
TEST RAX,RAX
JNZ 0x0011e4e3
MOV RDI,R13
MOV ESI,0xa
CALL 0x00113180
TEST RAX,RAX
JZ 0x0011e4e6
LAB_0011e4e3:
MOV byte ptr [RAX],0x0
LAB_0011e4e6:
MOV RDI,R13
CALL 0x001131c0
MOV RDI,R14
MOV ESI,R15D
MOV RDX,R13
MOV ECX,EAX
CALL 0x0011e524
TEST AL,AL
JNZ 0x0011e4aa
XOR R13D,R13D
JMP 0x0011e512
LAB_0011e507:
MOV R13B,0x1
JMP 0x0011e414
LAB_0011e50f:
MOV R13B,0x1
LAB_0011e512:
MOV RDI,R12
CALL 0x001296bc
JMP 0x0011e414
LAB_0011e51f:
CALL 0x00113500
|
int4 ma_pvio_tls_check_fp(long param_1,char *param_2,long param_3)
{
int8 uVar1;
char cVar2;
int iVar3;
int4 uVar4;
void *__ptr;
size_t sVar5;
long lVar6;
long lVar7;
char *pcVar8;
int8 unaff_R13;
int7 uVar9;
long in_FS_OFFSET;
char local_138 [256];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar1 = *(int8 *)(*(long *)(param_1 + 8) + 0x40);
__ptr = malloc(0x40);
iVar3 = ma_tls_get_finger_print(param_1,__ptr,0x40);
uVar9 = (int7)((ulong)unaff_R13 >> 8);
uVar4 = (int4)CONCAT71(uVar9,1);
if (iVar3 != 0) {
if (param_2 == (char *)0x0) {
if (param_3 != 0) {
lVar6 = ma_open(param_3,&DAT_00137393,uVar1);
if (lVar6 == 0) {
uVar4 = (int4)CONCAT71(uVar9,1);
}
else {
do {
lVar7 = ma_gets(local_138,0xfe,lVar6);
if (lVar7 == 0) {
uVar4 = (int4)CONCAT71((int7)((ulong)local_138 >> 8),1);
goto LAB_0011e512;
}
pcVar8 = strchr(local_138,0xd);
if (pcVar8 == (char *)0x0) {
pcVar8 = strchr(local_138,10);
if (pcVar8 != (char *)0x0) goto LAB_0011e4e3;
}
else {
LAB_0011e4e3:
*pcVar8 = '\0';
}
sVar5 = strlen(local_138);
cVar2 = ma_pvio_tls_compare_fp(__ptr,iVar3,local_138,sVar5 & 0xffffffff);
} while (cVar2 != '\0');
uVar4 = 0;
LAB_0011e512:
ma_close(lVar6);
}
}
}
else {
sVar5 = strlen(param_2);
uVar4 = ma_pvio_tls_compare_fp(__ptr,iVar3,param_2,sVar5 & 0xffffffff);
}
}
if (__ptr != (void *)0x0) {
free(__ptr);
}
if ((char)uVar4 != '\0') {
my_set_error(uVar1,0x7ea,SQLSTATE_UNKNOWN,PTR_s_TLS_SSL_error_____100s_0014bba0,
"Fingerprint verification of server certificate failed");
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return uVar4;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
24,262 | find_longest_bitstream | eloqsql/storage/myisam/mi_packrec.c | static uint find_longest_bitstream(uint16 *table, uint16 *end)
{
uint length= 1;
uint length2;
if (!(*table & IS_CHAR))
{
uint16 *next= table + *table;
if (next > end || next == table)
{
DBUG_PRINT("error", ("ERROR: illegal pointer in decode tree"));
return OFFSET_TABLE_SIZE;
}
length= find_longest_bitstream(next, end) + 1;
}
table++;
if (!(*table & IS_CHAR))
{
uint16 *next= table + *table;
if (next > end || next == table)
{
DBUG_PRINT("error", ("ERROR: illegal pointer in decode tree"));
return OFFSET_TABLE_SIZE;
}
length2= find_longest_bitstream(next, end) + 1;
length=MY_MAX(length,length2);
}
return length;
} | O3 | c | find_longest_bitstream:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movswq (%rdi), %rax
testq %rax, %rax
js 0x82b84
leaq (%r14,%rax,2), %rdi
cmpq %rbx, %rdi
seta %cl
testw %ax, %ax
sete %al
orb %cl, %al
movl $0x200, %eax # imm = 0x200
jne 0x82bc7
movq %rbx, %rsi
callq 0x82b42
movl %eax, %r15d
incl %r15d
jmp 0x82b8a
movl $0x1, %r15d
movswq 0x2(%r14), %rax
testq %rax, %rax
js 0x82bc4
addq $0x2, %r14
leaq (%r14,%rax,2), %rdi
cmpq %rbx, %rdi
setbe %cl
testw %ax, %ax
setne %dl
movl $0x200, %eax # imm = 0x200
testb %cl, %dl
je 0x82bc7
movq %rbx, %rsi
callq 0x82b42
incl %eax
cmpl %eax, %r15d
cmoval %r15d, %eax
jmp 0x82bc7
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| find_longest_bitstream_0:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
movsx rax, word ptr [rdi]
test rax, rax
js short loc_82B84
lea rdi, [r14+rax*2]
cmp rdi, rbx
setnbe cl
test ax, ax
setz al
or al, cl
mov eax, 200h
jnz short loc_82BC7
mov rsi, rbx
call find_longest_bitstream_0
mov r15d, eax
inc r15d
jmp short loc_82B8A
loc_82B84:
mov r15d, 1
loc_82B8A:
movsx rax, word ptr [r14+2]
test rax, rax
js short loc_82BC4
add r14, 2
lea rdi, [r14+rax*2]
cmp rdi, rbx
setbe cl
test ax, ax
setnz dl
mov eax, 200h
test dl, cl
jz short loc_82BC7
mov rsi, rbx
call find_longest_bitstream_0
inc eax
cmp r15d, eax
cmova eax, r15d
jmp short loc_82BC7
loc_82BC4:
mov eax, r15d
loc_82BC7:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long find_longest_bitstream_0(__int16 *a1, unsigned long long a2)
{
long long v3; // rax
__int16 *v4; // rdi
bool v5; // zf
long long result; // rax
unsigned int v7; // r15d
long long v8; // rax
unsigned long long v9; // rdi
bool v10; // dl
v3 = *a1;
if ( v3 < 0 )
{
v7 = 1;
}
else
{
v4 = &a1[v3];
v5 = (unsigned long long)v4 <= a2 && (_WORD)v3 != 0;
result = 512LL;
if ( !v5 )
return result;
v7 = find_longest_bitstream_0(v4) + 1;
}
v8 = a1[1];
if ( v8 < 0 )
return v7;
v9 = (unsigned long long)&a1[v8 + 1];
v10 = (_WORD)v8 != 0;
result = 512LL;
if ( v9 <= a2 && v10 )
{
result = (unsigned int)find_longest_bitstream_0(v9) + 1;
if ( v7 > (unsigned int)result )
return v7;
}
return result;
}
| find_longest_bitstream:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOVSX RAX,word ptr [RDI]
TEST RAX,RAX
JS 0x00182b84
LEA RDI,[R14 + RAX*0x2]
CMP RDI,RBX
SETA CL
TEST AX,AX
SETZ AL
OR AL,CL
MOV EAX,0x200
JNZ 0x00182bc7
MOV RSI,RBX
CALL 0x00182b42
MOV R15D,EAX
INC R15D
JMP 0x00182b8a
LAB_00182b84:
MOV R15D,0x1
LAB_00182b8a:
MOVSX RAX,word ptr [R14 + 0x2]
TEST RAX,RAX
JS 0x00182bc4
ADD R14,0x2
LEA RDI,[R14 + RAX*0x2]
CMP RDI,RBX
SETBE CL
TEST AX,AX
SETNZ DL
MOV EAX,0x200
TEST DL,CL
JZ 0x00182bc7
MOV RSI,RBX
CALL 0x00182b42
INC EAX
CMP R15D,EAX
CMOVA EAX,R15D
JMP 0x00182bc7
LAB_00182bc4:
MOV EAX,R15D
LAB_00182bc7:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
uint find_longest_bitstream(short *param_1,short *param_2)
{
short sVar1;
int iVar2;
uint uVar3;
uint uVar4;
sVar1 = *param_1;
if ((long)sVar1 < 0) {
uVar4 = 1;
}
else {
if (sVar1 == 0 || param_2 < param_1 + sVar1) {
return 0x200;
}
iVar2 = find_longest_bitstream(param_1 + sVar1,param_2);
uVar4 = iVar2 + 1;
}
sVar1 = param_1[1];
uVar3 = uVar4;
if (-1 < (long)sVar1) {
uVar3 = 0x200;
if (sVar1 != 0 && param_1 + (long)sVar1 + 1 <= param_2) {
iVar2 = find_longest_bitstream(param_1 + (long)sVar1 + 1,param_2);
uVar3 = iVar2 + 1U;
if (iVar2 + 1U < uVar4) {
uVar3 = uVar4;
}
}
}
return uVar3;
}
| |
24,263 | js_proxy_constructor | bluesky950520[P]quickjs/quickjs.c | static JSValue js_proxy_constructor(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue target, handler;
JSValue obj;
JSProxyData *s;
target = argv[0];
handler = argv[1];
if (JS_VALUE_GET_TAG(target) != JS_TAG_OBJECT ||
JS_VALUE_GET_TAG(handler) != JS_TAG_OBJECT)
return JS_ThrowTypeErrorNotAnObject(ctx);
obj = JS_NewObjectProtoClass(ctx, JS_NULL, JS_CLASS_PROXY);
if (JS_IsException(obj))
return obj;
s = js_malloc(ctx, sizeof(JSProxyData));
if (!s) {
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
}
s->target = js_dup(target);
s->handler = js_dup(handler);
s->is_func = JS_IsFunction(ctx, target);
s->is_revoked = FALSE;
JS_SetOpaqueInternal(obj, s);
JS_SetConstructorBit(ctx, obj, JS_IsConstructor(ctx, target));
return obj;
} | O1 | c | js_proxy_constructor:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r15
movq 0x8(%r8), %r12
movq 0x18(%r8), %r13
movl %r13d, %eax
notl %eax
movl %r12d, %ebp
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
xorq %rbp, %rcx
orq %rcx, %rax
je 0x34def
leaq 0x68b44(%rip), %rsi # 0x9d91d
xorl %ebx, %ebx
movq %r15, %rdi
xorl %eax, %eax
callq 0x21953
movl $0x6, %r14d
xorl %ecx, %ecx
jmp 0x34e33
movq (%r8), %rax
movq %rax, 0x20(%rsp)
movq 0x10(%r8), %rax
movq %rax, 0x18(%rsp)
movl $0x2, %edx
movq %r15, %rdi
xorl %esi, %esi
movl $0x30, %ecx
callq 0x202f1
movq %rax, %rbx
movq %rdx, %r14
movl %r14d, %eax
cmpq $0x6, %rax
jne 0x34e4a
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %rbx, %rcx
andq %rax, %rcx
movl %ebx, %eax
orq %rcx, %rax
movq %r14, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, 0x10(%rsp)
movl $0x28, %esi
movq %r15, %rdi
callq 0xed5d
testq %rax, %rax
je 0x34eb5
movq 0x20(%rsp), %rsi
incl (%rsi)
movq %rsi, (%rax)
movq %r12, 0x8(%rax)
movq %rax, %rcx
movq 0x18(%rsp), %rax
incl (%rax)
movq %rax, 0x10(%rcx)
movq %r13, 0x18(%rcx)
movq %rcx, %r13
movq %r15, %rdi
movq %rsi, %r15
movq %r12, %rdx
callq 0x221aa
movb %al, 0x20(%r13)
movb $0x0, 0x21(%r13)
movq %r13, 0x30(%rbx)
movq %r15, 0x8(%rsp)
cmpl $-0x1, %ebp
jne 0x34ed1
movq 0x8(%rsp), %rax
movb 0x5(%rax), %al
andb $0x10, %al
jmp 0x34ed3
movq 0x18(%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1ccb2
movl $0x6, %r14d
xorl %ebx, %ebx
jmp 0x34deb
xorl %eax, %eax
movq %rbx, 0x8(%rsp)
cmpl $-0x1, 0x10(%rsp)
jne 0x34e23
movq 0x8(%rsp), %rcx
movb 0x5(%rcx), %dl
andb $-0x11, %dl
orb %al, %dl
movb %dl, 0x5(%rcx)
jmp 0x34e23
| js_proxy_constructor:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15, rdi
mov r12, [r8+8]
mov r13, [r8+18h]
mov eax, r13d
not eax
mov ebp, r12d
mov ecx, 0FFFFFFFFh
xor rcx, rbp
or rax, rcx
jz short loc_34DEF
lea rsi, aOperandPrototy+20h; "not an object"
xor ebx, ebx
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
mov r14d, 6
loc_34DEB:
xor ecx, ecx
jmp short loc_34E33
loc_34DEF:
mov rax, [r8]
mov [rsp+58h+var_38], rax
mov rax, [r8+10h]
mov [rsp+58h+var_40], rax
mov edx, 2
mov rdi, r15
xor esi, esi
mov ecx, 30h ; '0'
call JS_NewObjectProtoClass
mov rbx, rax
mov r14, rdx
mov eax, r14d
cmp rax, 6
jnz short loc_34E4A
loc_34E23:
mov rax, 0FFFFFFFF00000000h
mov rcx, rbx
and rcx, rax
loc_34E33:
mov eax, ebx
or rax, rcx
mov rdx, r14
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_34E4A:
mov [rsp+58h+var_48], rax
mov esi, 28h ; '('
mov rdi, r15
call js_malloc
test rax, rax
jz short loc_34EB5
mov rsi, [rsp+58h+var_38]
inc dword ptr [rsi]
mov [rax], rsi
mov [rax+8], r12
mov rcx, rax
mov rax, [rsp+58h+var_40]
inc dword ptr [rax]
mov [rcx+10h], rax
mov [rcx+18h], r13
mov r13, rcx
mov rdi, r15
mov r15, rsi
mov rdx, r12
call JS_IsFunction
mov [r13+20h], al
mov byte ptr [r13+21h], 0
mov [rbx+30h], r13
mov [rsp+58h+var_50], r15
cmp ebp, 0FFFFFFFFh
jnz short loc_34ED1
mov rax, [rsp+58h+var_50]
mov al, [rax+5]
and al, 10h
jmp short loc_34ED3
loc_34EB5:
mov rdi, [r15+18h]
mov rsi, rbx
mov rdx, r14
call JS_FreeValueRT
mov r14d, 6
xor ebx, ebx
jmp loc_34DEB
loc_34ED1:
xor eax, eax
loc_34ED3:
mov [rsp+58h+var_50], rbx
cmp dword ptr [rsp+58h+var_48], 0FFFFFFFFh
jnz loc_34E23
mov rcx, [rsp+58h+var_50]
mov dl, [rcx+5]
and dl, 0EFh
or dl, al
mov [rcx+5], dl
jmp loc_34E23
| unsigned long long js_proxy_constructor(
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 v14; // r12
long long v15; // r13
long long v16; // rbx
unsigned long long v17; // rcx
long long v18; // rdx
long long v19; // r14
long long v21; // rax
long long v22; // r13
char v23; // al
char v24; // [rsp+0h] [rbp-58h]
int v25; // [rsp+10h] [rbp-48h]
_DWORD *v26; // [rsp+18h] [rbp-40h]
long long v27; // [rsp+20h] [rbp-38h]
v14 = a13[1];
v15 = a13[3];
if ( !((unsigned int)v14 ^ 0xFFFFFFFFLL | (unsigned int)~*((_DWORD *)a13 + 6)) )
{
v27 = *a13;
v26 = (_DWORD *)a13[2];
v16 = JS_NewObjectProtoClass(a1, 0LL, 2, 0x30u);
v19 = v18;
if ( (unsigned int)v18 != 6LL )
{
v25 = v18;
v21 = js_malloc(a1, 40LL);
if ( !v21 )
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v16, v19);
LODWORD(v16) = 0;
goto LABEL_3;
}
++*(_DWORD *)v27;
*(_QWORD *)v21 = v27;
*(_QWORD *)(v21 + 8) = v14;
++*v26;
*(_QWORD *)(v21 + 16) = v26;
*(_QWORD *)(v21 + 24) = v15;
v22 = v21;
*(_BYTE *)(v21 + 32) = JS_IsFunction(a1, v27, v14);
*(_BYTE *)(v22 + 33) = 0;
*(_QWORD *)(v16 + 48) = v22;
if ( (_DWORD)v14 == -1 )
v23 = *(_BYTE *)(v27 + 5) & 0x10;
else
v23 = 0;
if ( v25 == -1 )
*(_BYTE *)(v16 + 5) = v23 | *(_BYTE *)(v16 + 5) & 0xEF;
}
v17 = v16 & 0xFFFFFFFF00000000LL;
return v17 | (unsigned int)v16;
}
LODWORD(v16) = 0;
JS_ThrowTypeError(
a1,
(long long)"not an object",
a11,
(unsigned int)v14 ^ 0xFFFFFFFFLL,
(long long)a13,
a14,
a2,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
v24);
LABEL_3:
v17 = 0LL;
return v17 | (unsigned int)v16;
}
| js_proxy_constructor:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15,RDI
MOV R12,qword ptr [R8 + 0x8]
MOV R13,qword ptr [R8 + 0x18]
MOV EAX,R13D
NOT EAX
MOV EBP,R12D
MOV ECX,0xffffffff
XOR RCX,RBP
OR RAX,RCX
JZ 0x00134def
LEA RSI,[0x19d91d]
XOR EBX,EBX
MOV RDI,R15
XOR EAX,EAX
CALL 0x00121953
MOV R14D,0x6
LAB_00134deb:
XOR ECX,ECX
JMP 0x00134e33
LAB_00134def:
MOV RAX,qword ptr [R8]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [R8 + 0x10]
MOV qword ptr [RSP + 0x18],RAX
MOV EDX,0x2
MOV RDI,R15
XOR ESI,ESI
MOV ECX,0x30
CALL 0x001202f1
MOV RBX,RAX
MOV R14,RDX
MOV EAX,R14D
CMP RAX,0x6
JNZ 0x00134e4a
LAB_00134e23:
MOV RAX,-0x100000000
MOV RCX,RBX
AND RCX,RAX
LAB_00134e33:
MOV EAX,EBX
OR RAX,RCX
MOV RDX,R14
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00134e4a:
MOV qword ptr [RSP + 0x10],RAX
MOV ESI,0x28
MOV RDI,R15
CALL 0x0010ed5d
TEST RAX,RAX
JZ 0x00134eb5
MOV RSI,qword ptr [RSP + 0x20]
INC dword ptr [RSI]
MOV qword ptr [RAX],RSI
MOV qword ptr [RAX + 0x8],R12
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x18]
INC dword ptr [RAX]
MOV qword ptr [RCX + 0x10],RAX
MOV qword ptr [RCX + 0x18],R13
MOV R13,RCX
MOV RDI,R15
MOV R15,RSI
MOV RDX,R12
CALL 0x001221aa
MOV byte ptr [R13 + 0x20],AL
MOV byte ptr [R13 + 0x21],0x0
MOV qword ptr [RBX + 0x30],R13
MOV qword ptr [RSP + 0x8],R15
CMP EBP,-0x1
JNZ 0x00134ed1
MOV RAX,qword ptr [RSP + 0x8]
MOV AL,byte ptr [RAX + 0x5]
AND AL,0x10
JMP 0x00134ed3
LAB_00134eb5:
MOV RDI,qword ptr [R15 + 0x18]
MOV RSI,RBX
MOV RDX,R14
CALL 0x0011ccb2
MOV R14D,0x6
XOR EBX,EBX
JMP 0x00134deb
LAB_00134ed1:
XOR EAX,EAX
LAB_00134ed3:
MOV qword ptr [RSP + 0x8],RBX
CMP dword ptr [RSP + 0x10],-0x1
JNZ 0x00134e23
MOV RCX,qword ptr [RSP + 0x8]
MOV DL,byte ptr [RCX + 0x5]
AND DL,0xef
OR DL,AL
MOV byte ptr [RCX + 0x5],DL
JMP 0x00134e23
|
int1 [16] js_proxy_constructor(long param_1)
{
ulong uVar1;
int8 uVar2;
int *piVar3;
int *piVar4;
int1 uVar5;
byte bVar6;
int8 *puVar7;
ulong uVar8;
int8 *in_R8;
int1 auVar9 [16];
int1 auVar10 [16];
int local_48;
uVar1 = in_R8[1];
uVar2 = in_R8[3];
if ((int)uVar2 == -1 && (uVar1 & 0xffffffff) == 0xffffffff) {
piVar3 = (int *)*in_R8;
piVar4 = (int *)in_R8[2];
auVar9 = JS_NewObjectProtoClass(param_1,0,2,0x30);
uVar8 = auVar9._0_8_;
if ((auVar9._8_8_ & 0xffffffff) != 6) {
puVar7 = (int8 *)js_malloc(param_1,0x28);
if (puVar7 == (int8 *)0x0) {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar8,auVar9._8_8_);
goto LAB_00134deb;
}
*piVar3 = *piVar3 + 1;
*puVar7 = piVar3;
puVar7[1] = uVar1;
*piVar4 = *piVar4 + 1;
puVar7[2] = piVar4;
puVar7[3] = uVar2;
uVar5 = JS_IsFunction(param_1,piVar3,uVar1);
*(int1 *)(puVar7 + 4) = uVar5;
*(int1 *)((long)puVar7 + 0x21) = 0;
*(int8 **)(uVar8 + 0x30) = puVar7;
if ((int)uVar1 == -1) {
bVar6 = *(byte *)((long)piVar3 + 5) & 0x10;
}
else {
bVar6 = 0;
}
local_48 = auVar9._8_4_;
if (local_48 == -1) {
*(byte *)(uVar8 + 5) = *(byte *)(uVar8 + 5) & 0xef | bVar6;
}
}
uVar8 = uVar8 & 0xffffffff00000000;
}
else {
JS_ThrowTypeError(param_1,"not an object");
LAB_00134deb:
auVar9 = ZEXT816(6) << 0x40;
uVar8 = 0;
}
auVar10._0_8_ = auVar9._0_8_ & 0xffffffff | uVar8;
auVar10._8_8_ = auVar9._8_8_;
return auVar10;
}
| |
24,264 | js_proxy_constructor | bluesky950520[P]quickjs/quickjs.c | static JSValue js_proxy_constructor(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue target, handler;
JSValue obj;
JSProxyData *s;
target = argv[0];
handler = argv[1];
if (JS_VALUE_GET_TAG(target) != JS_TAG_OBJECT ||
JS_VALUE_GET_TAG(handler) != JS_TAG_OBJECT)
return JS_ThrowTypeErrorNotAnObject(ctx);
obj = JS_NewObjectProtoClass(ctx, JS_NULL, JS_CLASS_PROXY);
if (JS_IsException(obj))
return obj;
s = js_malloc(ctx, sizeof(JSProxyData));
if (!s) {
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
}
s->target = js_dup(target);
s->handler = js_dup(handler);
s->is_func = JS_IsFunction(ctx, target);
s->is_revoked = FALSE;
JS_SetOpaqueInternal(obj, s);
JS_SetConstructorBit(ctx, obj, JS_IsConstructor(ctx, target));
return obj;
} | O2 | c | js_proxy_constructor:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
movq 0x8(%r8), %r13
movl %r13d, %eax
notl %eax
movq 0x18(%r8), %r12
movl %r12d, %ecx
notl %ecx
orl %eax, %ecx
je 0x2e6e6
movq %r15, %rdi
callq 0x1ca65
pushq $0x6
popq %rbx
xorl %r14d, %r14d
xorl %ecx, %ecx
jmp 0x2e78e
movq (%r8), %rbp
movq 0x10(%r8), %rax
movq %rax, 0x10(%rsp)
pushq $0x2
popq %rdx
pushq $0x30
popq %rcx
movq %r15, %rdi
xorl %esi, %esi
callq 0x1a4ed
movq %rax, %r14
movq %rdx, %rbx
movl %ebx, %eax
cmpq $0x6, %rax
je 0x2e77e
movq %rax, (%rsp)
movq %rbp, 0x8(%rsp)
pushq $0x28
popq %rsi
movq %r15, %rdi
callq 0x16698
testq %rax, %rax
je 0x2e7a6
movq %rax, %rbp
movq 0x8(%rsp), %rcx
incl (%rcx)
movq %rcx, (%rax)
movq %r13, 0x8(%rax)
movq 0x10(%rsp), %rax
incl (%rax)
movq %rax, 0x10(%rbp)
movq %r12, 0x18(%rbp)
movq %r15, %rdi
movq %rcx, %r15
movq %rcx, %rsi
movq %r13, %rdx
callq 0x1c301
movb %al, 0x20(%rbp)
movb $0x0, 0x21(%rbp)
movq %rbp, 0x30(%r14)
cmpl $-0x1, (%rsp)
jne 0x2e77e
movb 0x5(%r15), %al
andb $0x10, %al
movb 0x5(%r14), %cl
andb $-0x11, %cl
orb %al, %cl
movb %cl, 0x5(%r14)
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r14, %rcx
andq %rax, %rcx
movl %r14d, %eax
orq %rcx, %rax
movq %rbx, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x174a2
jmp 0x2e6d9
| js_proxy_constructor:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15, rdi
mov r13, [r8+8]
mov eax, r13d
not eax
mov r12, [r8+18h]
mov ecx, r12d
not ecx
or ecx, eax
jz short loc_2E6E6
mov rdi, r15
call JS_ThrowTypeErrorNotAnObject
loc_2E6D9:
push 6
pop rbx
xor r14d, r14d
xor ecx, ecx
jmp loc_2E78E
loc_2E6E6:
mov rbp, [r8]
mov rax, [r8+10h]
mov [rsp+48h+var_38], rax
push 2
pop rdx
push 30h ; '0'
pop rcx
mov rdi, r15
xor esi, esi
call JS_NewObjectProtoClass
mov r14, rax
mov rbx, rdx
mov eax, ebx
cmp rax, 6
jz short loc_2E77E
mov [rsp+48h+var_48], rax
mov [rsp+48h+var_40], rbp
push 28h ; '('
pop rsi
mov rdi, r15
call js_malloc
test rax, rax
jz short loc_2E7A6
mov rbp, rax
mov rcx, [rsp+48h+var_40]
inc dword ptr [rcx]
mov [rax], rcx
mov [rax+8], r13
mov rax, [rsp+48h+var_38]
inc dword ptr [rax]
mov [rbp+10h], rax
mov [rbp+18h], r12
mov rdi, r15
mov r15, rcx
mov rsi, rcx
mov rdx, r13
call JS_IsFunction
mov [rbp+20h], al
mov byte ptr [rbp+21h], 0
mov [r14+30h], rbp
cmp dword ptr [rsp+48h+var_48], 0FFFFFFFFh
jnz short loc_2E77E
mov al, [r15+5]
and al, 10h
mov cl, [r14+5]
and cl, 0EFh
or cl, al
mov [r14+5], cl
loc_2E77E:
mov rax, 0FFFFFFFF00000000h
mov rcx, r14
and rcx, rax
loc_2E78E:
mov eax, r14d
or rax, rcx
mov rdx, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2E7A6:
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call JS_FreeValue
jmp loc_2E6D9
| unsigned long long js_proxy_constructor(
long long a1,
long long a2,
long long a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
long long a12,
_QWORD *a13,
long long a14)
{
long long v14; // r13
int v15; // eax
long long v16; // r12
long long v17; // r14
unsigned long long v18; // rcx
long long v19; // rbp
long long v20; // rdx
long long v21; // rbx
long long v22; // rax
long long v23; // rbp
char v25; // [rsp+0h] [rbp-48h]
int v26; // [rsp+0h] [rbp-48h]
long long v27; // [rsp+8h] [rbp-40h]
_DWORD *v28; // [rsp+10h] [rbp-38h]
v14 = a13[1];
v15 = ~*((_DWORD *)a13 + 2);
v16 = a13[3];
if ( !(v15 | ~(_DWORD)v16) )
{
v19 = *a13;
v28 = (_DWORD *)a13[2];
v17 = JS_NewObjectProtoClass(a1, 0LL, 2, 0x30u);
v21 = v20;
if ( (unsigned int)v20 != 6LL )
{
v26 = v20;
v27 = v19;
v22 = js_malloc(a1, 40LL);
if ( !v22 )
{
JS_FreeValue(a1, v17, v21);
goto LABEL_3;
}
v23 = v22;
++*(_DWORD *)v27;
*(_QWORD *)v22 = v27;
*(_QWORD *)(v22 + 8) = v14;
++*v28;
*(_QWORD *)(v22 + 16) = v28;
*(_QWORD *)(v22 + 24) = v16;
*(_BYTE *)(v22 + 32) = JS_IsFunction(a1, v27, v14);
*(_BYTE *)(v23 + 33) = 0;
*(_QWORD *)(v17 + 48) = v23;
if ( v26 == -1 )
*(_BYTE *)(v17 + 5) = *(_BYTE *)(v27 + 5) & 0x10 | *(_BYTE *)(v17 + 5) & 0xEF;
}
v18 = v17 & 0xFFFFFFFF00000000LL;
return v18 | (unsigned int)v17;
}
JS_ThrowTypeErrorNotAnObject(
a1,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a2,
a3,
v15 | ~(unsigned int)a13[3],
(long long)a13,
a14,
v25);
LABEL_3:
LODWORD(v17) = 0;
v18 = 0LL;
return v18 | (unsigned int)v17;
}
| js_proxy_constructor:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15,RDI
MOV R13,qword ptr [R8 + 0x8]
MOV EAX,R13D
NOT EAX
MOV R12,qword ptr [R8 + 0x18]
MOV ECX,R12D
NOT ECX
OR ECX,EAX
JZ 0x0012e6e6
MOV RDI,R15
CALL 0x0011ca65
LAB_0012e6d9:
PUSH 0x6
POP RBX
XOR R14D,R14D
XOR ECX,ECX
JMP 0x0012e78e
LAB_0012e6e6:
MOV RBP,qword ptr [R8]
MOV RAX,qword ptr [R8 + 0x10]
MOV qword ptr [RSP + 0x10],RAX
PUSH 0x2
POP RDX
PUSH 0x30
POP RCX
MOV RDI,R15
XOR ESI,ESI
CALL 0x0011a4ed
MOV R14,RAX
MOV RBX,RDX
MOV EAX,EBX
CMP RAX,0x6
JZ 0x0012e77e
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RBP
PUSH 0x28
POP RSI
MOV RDI,R15
CALL 0x00116698
TEST RAX,RAX
JZ 0x0012e7a6
MOV RBP,RAX
MOV RCX,qword ptr [RSP + 0x8]
INC dword ptr [RCX]
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],R13
MOV RAX,qword ptr [RSP + 0x10]
INC dword ptr [RAX]
MOV qword ptr [RBP + 0x10],RAX
MOV qword ptr [RBP + 0x18],R12
MOV RDI,R15
MOV R15,RCX
MOV RSI,RCX
MOV RDX,R13
CALL 0x0011c301
MOV byte ptr [RBP + 0x20],AL
MOV byte ptr [RBP + 0x21],0x0
MOV qword ptr [R14 + 0x30],RBP
CMP dword ptr [RSP],-0x1
JNZ 0x0012e77e
MOV AL,byte ptr [R15 + 0x5]
AND AL,0x10
MOV CL,byte ptr [R14 + 0x5]
AND CL,0xef
OR CL,AL
MOV byte ptr [R14 + 0x5],CL
LAB_0012e77e:
MOV RAX,-0x100000000
MOV RCX,R14
AND RCX,RAX
LAB_0012e78e:
MOV EAX,R14D
OR RAX,RCX
MOV RDX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012e7a6:
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x001174a2
JMP 0x0012e6d9
|
int1 [16] js_proxy_constructor(int8 param_1)
{
int8 uVar1;
int8 uVar2;
int *piVar3;
int *piVar4;
int1 uVar5;
int8 *puVar6;
ulong uVar7;
int8 *in_R8;
int1 auVar8 [16];
int1 auVar9 [16];
int local_48;
uVar1 = in_R8[1];
uVar2 = in_R8[3];
if ((int)uVar2 == -1 && (int)uVar1 == -1) {
piVar3 = (int *)*in_R8;
piVar4 = (int *)in_R8[2];
auVar8 = JS_NewObjectProtoClass(param_1,0,2,0x30);
uVar7 = auVar8._0_8_;
if ((auVar8._8_8_ & 0xffffffff) != 6) {
puVar6 = (int8 *)js_malloc(param_1,0x28);
if (puVar6 == (int8 *)0x0) {
JS_FreeValue(param_1,uVar7,auVar8._8_8_);
goto LAB_0012e6d9;
}
*piVar3 = *piVar3 + 1;
*puVar6 = piVar3;
puVar6[1] = uVar1;
*piVar4 = *piVar4 + 1;
puVar6[2] = piVar4;
puVar6[3] = uVar2;
uVar5 = JS_IsFunction(param_1,piVar3,uVar1);
*(int1 *)(puVar6 + 4) = uVar5;
*(int1 *)((long)puVar6 + 0x21) = 0;
*(int8 **)(uVar7 + 0x30) = puVar6;
local_48 = auVar8._8_4_;
if (local_48 == -1) {
*(byte *)(uVar7 + 5) = *(byte *)(uVar7 + 5) & 0xef | *(byte *)((long)piVar3 + 5) & 0x10;
}
}
uVar7 = uVar7 & 0xffffffff00000000;
}
else {
JS_ThrowTypeErrorNotAnObject(param_1);
LAB_0012e6d9:
auVar8 = ZEXT816(6) << 0x40;
uVar7 = 0;
}
auVar9._0_8_ = auVar8._0_8_ & 0xffffffff | uVar7;
auVar9._8_8_ = auVar8._8_8_;
return auVar9;
}
| |
24,265 | js_proxy_constructor | bluesky950520[P]quickjs/quickjs.c | static JSValue js_proxy_constructor(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue target, handler;
JSValue obj;
JSProxyData *s;
target = argv[0];
handler = argv[1];
if (JS_VALUE_GET_TAG(target) != JS_TAG_OBJECT ||
JS_VALUE_GET_TAG(handler) != JS_TAG_OBJECT)
return JS_ThrowTypeErrorNotAnObject(ctx);
obj = JS_NewObjectProtoClass(ctx, JS_NULL, JS_CLASS_PROXY);
if (JS_IsException(obj))
return obj;
s = js_malloc(ctx, sizeof(JSProxyData));
if (!s) {
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
}
s->target = js_dup(target);
s->handler = js_dup(handler);
s->is_func = JS_IsFunction(ctx, target);
s->is_revoked = FALSE;
JS_SetOpaqueInternal(obj, s);
JS_SetConstructorBit(ctx, obj, JS_IsConstructor(ctx, target));
return obj;
} | O3 | c | js_proxy_constructor:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
movq 0x8(%r8), %rbp
movl %ebp, %eax
notl %eax
movq 0x18(%r8), %r12
movl %r12d, %ecx
notl %ecx
orl %eax, %ecx
je 0x35f2b
leaq 0x6a9d8(%rip), %rsi # 0xa08ed
xorl %ebx, %ebx
movq %r15, %rdi
xorl %eax, %eax
callq 0x2214f
movl $0x6, %r14d
xorl %ecx, %ecx
jmp 0x35f6f
movq (%r8), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%r8), %rax
movq %rax, 0x8(%rsp)
movl $0x2, %edx
movq %r15, %rdi
xorl %esi, %esi
movl $0x30, %ecx
callq 0x20a15
movq %rax, %rbx
movq %rdx, %r14
movl %r14d, %r13d
cmpq $0x6, %r13
jne 0x35f86
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %rbx, %rcx
andq %rax, %rcx
movl %ebx, %eax
orq %rcx, %rax
movq %r14, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x28, %esi
movq %r15, %rdi
callq 0xed89
testq %rax, %rax
je 0x35fcc
movq 0x10(%rsp), %rsi
incl (%rsi)
movq %rsi, (%rax)
movq %rbp, 0x8(%rax)
movq 0x8(%rsp), %rcx
incl (%rcx)
movq %rcx, 0x10(%rax)
movq %r12, 0x18(%rax)
movzwl 0x6(%rsi), %ecx
cmpl $0xd, %ecx
je 0x35ffc
cmpl $0x30, %ecx
jne 0x36000
movq 0x30(%rsi), %rcx
movb 0x20(%rcx), %cl
jmp 0x36018
cmpl $-0x9, %r14d
jb 0x35fed
movq 0x18(%r15), %rdi
movl (%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rbx)
cmpl $0x1, %eax
jg 0x35fed
movq %rbx, %rsi
movq %r14, %rdx
callq 0x20d90
xorl %ebx, %ebx
xorl %ecx, %ecx
movl $0x6, %r14d
jmp 0x35f6f
movb $0x1, %cl
jmp 0x36018
movq 0x18(%r15), %rdx
movq 0x80(%rdx), %rdx
leaq (%rcx,%rcx,4), %rcx
cmpq $0x0, 0x18(%rdx,%rcx,8)
setne %cl
movb %cl, 0x20(%rax)
movb $0x0, 0x21(%rax)
movq %rax, 0x30(%rbx)
cmpl $-0x1, %r13d
jne 0x35f5f
movb 0x5(%rsi), %al
andb $0x10, %al
movb 0x5(%rbx), %cl
andb $-0x11, %cl
orb %al, %cl
movb %cl, 0x5(%rbx)
jmp 0x35f5f
| js_proxy_constructor:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15, rdi
mov rbp, [r8+8]
mov eax, ebp
not eax
mov r12, [r8+18h]
mov ecx, r12d
not ecx
or ecx, eax
jz short loc_35F2B
lea rsi, aOperandPrototy+20h; "not an object"
xor ebx, ebx
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
mov r14d, 6
xor ecx, ecx
jmp short loc_35F6F
loc_35F2B:
mov rax, [r8]
mov [rsp+48h+var_38], rax
mov rax, [r8+10h]
mov [rsp+48h+var_40], rax
mov edx, 2
mov rdi, r15
xor esi, esi
mov ecx, 30h ; '0'
call JS_NewObjectProtoClass
mov rbx, rax
mov r14, rdx
mov r13d, r14d
cmp r13, 6
jnz short loc_35F86
loc_35F5F:
mov rax, 0FFFFFFFF00000000h
mov rcx, rbx
and rcx, rax
loc_35F6F:
mov eax, ebx
or rax, rcx
mov rdx, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_35F86:
mov esi, 28h ; '('
mov rdi, r15
call js_malloc
test rax, rax
jz short loc_35FCC
mov rsi, [rsp+48h+var_38]
inc dword ptr [rsi]
mov [rax], rsi
mov [rax+8], rbp
mov rcx, [rsp+48h+var_40]
inc dword ptr [rcx]
mov [rax+10h], rcx
mov [rax+18h], r12
movzx ecx, word ptr [rsi+6]
cmp ecx, 0Dh
jz short loc_35FFC
cmp ecx, 30h ; '0'
jnz short loc_36000
mov rcx, [rsi+30h]
mov cl, [rcx+20h]
jmp short loc_36018
loc_35FCC:
cmp r14d, 0FFFFFFF7h
jb short loc_35FED
mov rdi, [r15+18h]
mov eax, [rbx]
lea ecx, [rax-1]
mov [rbx], ecx
cmp eax, 1
jg short loc_35FED
mov rsi, rbx
mov rdx, r14
call js_free_value_rt
loc_35FED:
xor ebx, ebx
xor ecx, ecx
mov r14d, 6
jmp loc_35F6F
loc_35FFC:
mov cl, 1
jmp short loc_36018
loc_36000:
mov rdx, [r15+18h]
mov rdx, [rdx+80h]
lea rcx, [rcx+rcx*4]
cmp qword ptr [rdx+rcx*8+18h], 0
setnz cl
loc_36018:
mov [rax+20h], cl
mov byte ptr [rax+21h], 0
mov [rbx+30h], rax
cmp r13d, 0FFFFFFFFh
jnz loc_35F5F
mov al, [rsi+5]
and al, 10h
mov cl, [rbx+5]
and cl, 0EFh
or cl, al
mov [rbx+5], cl
jmp loc_35F5F
| unsigned long long js_proxy_constructor(
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,
_QWORD *a13,
long long a14)
{
long long v14; // rbp
int v15; // eax
long long v16; // r12
long long v17; // rbx
unsigned long long v18; // rcx
long long v19; // rdx
long long v20; // r14
int v21; // r13d
long long v23; // rax
long long v24; // r8
long long v25; // r9
long long v26; // rcx
char v27; // cl
long long v28; // rdi
int v29; // eax
long long v30; // rcx
char v31; // [rsp+0h] [rbp-48h]
_DWORD *v32; // [rsp+8h] [rbp-40h]
long long v33; // [rsp+10h] [rbp-38h]
v14 = a13[1];
v15 = ~*((_DWORD *)a13 + 2);
v16 = a13[3];
if ( v15 | ~(_DWORD)v16 )
{
LODWORD(v17) = 0;
JS_ThrowTypeError(
a1,
(long long)"not an object",
a11,
v15 | ~(unsigned int)a13[3],
(long long)a13,
a14,
a2,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
v31);
v18 = 0LL;
return v18 | (unsigned int)v17;
}
v33 = *a13;
v32 = (_DWORD *)a13[2];
v17 = JS_NewObjectProtoClass(a1, 0LL, 2, 0x30u);
v20 = v19;
v21 = v19;
if ( (unsigned int)v19 == 6LL )
{
LABEL_4:
v18 = v17 & 0xFFFFFFFF00000000LL;
return v18 | (unsigned int)v17;
}
v23 = js_malloc(a1, 40LL);
if ( v23 )
{
++*(_DWORD *)v33;
*(_QWORD *)v23 = v33;
*(_QWORD *)(v23 + 8) = v14;
++*v32;
*(_QWORD *)(v23 + 16) = v32;
*(_QWORD *)(v23 + 24) = v16;
v26 = *(unsigned __int16 *)(v33 + 6);
if ( (_DWORD)v26 == 13 )
{
v27 = 1;
}
else if ( (_DWORD)v26 == 48 )
{
v27 = *(_BYTE *)(*(_QWORD *)(v33 + 48) + 32LL);
}
else
{
v27 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 128LL) + 40 * v26 + 24) != 0LL;
}
*(_BYTE *)(v23 + 32) = v27;
*(_BYTE *)(v23 + 33) = 0;
*(_QWORD *)(v17 + 48) = v23;
if ( v21 == -1 )
*(_BYTE *)(v17 + 5) = *(_BYTE *)(v33 + 5) & 0x10 | *(_BYTE *)(v17 + 5) & 0xEF;
goto LABEL_4;
}
if ( (unsigned int)v20 >= 0xFFFFFFF7 )
{
v28 = *(_QWORD *)(a1 + 24);
v29 = *(_DWORD *)v17;
v30 = (unsigned int)(*(_DWORD *)v17 - 1);
*(_DWORD *)v17 = v30;
if ( v29 <= 1 )
js_free_value_rt(v28, (_QWORD *)v17, v20, v30, v24, v25);
}
LODWORD(v17) = 0;
v18 = 0LL;
return v18 | (unsigned int)v17;
}
| js_proxy_constructor:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15,RDI
MOV RBP,qword ptr [R8 + 0x8]
MOV EAX,EBP
NOT EAX
MOV R12,qword ptr [R8 + 0x18]
MOV ECX,R12D
NOT ECX
OR ECX,EAX
JZ 0x00135f2b
LEA RSI,[0x1a08ed]
XOR EBX,EBX
MOV RDI,R15
XOR EAX,EAX
CALL 0x0012214f
MOV R14D,0x6
XOR ECX,ECX
JMP 0x00135f6f
LAB_00135f2b:
MOV RAX,qword ptr [R8]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [R8 + 0x10]
MOV qword ptr [RSP + 0x8],RAX
MOV EDX,0x2
MOV RDI,R15
XOR ESI,ESI
MOV ECX,0x30
CALL 0x00120a15
MOV RBX,RAX
MOV R14,RDX
MOV R13D,R14D
CMP R13,0x6
JNZ 0x00135f86
LAB_00135f5f:
MOV RAX,-0x100000000
MOV RCX,RBX
AND RCX,RAX
LAB_00135f6f:
MOV EAX,EBX
OR RAX,RCX
MOV RDX,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00135f86:
MOV ESI,0x28
MOV RDI,R15
CALL 0x0010ed89
TEST RAX,RAX
JZ 0x00135fcc
MOV RSI,qword ptr [RSP + 0x10]
INC dword ptr [RSI]
MOV qword ptr [RAX],RSI
MOV qword ptr [RAX + 0x8],RBP
MOV RCX,qword ptr [RSP + 0x8]
INC dword ptr [RCX]
MOV qword ptr [RAX + 0x10],RCX
MOV qword ptr [RAX + 0x18],R12
MOVZX ECX,word ptr [RSI + 0x6]
CMP ECX,0xd
JZ 0x00135ffc
CMP ECX,0x30
JNZ 0x00136000
MOV RCX,qword ptr [RSI + 0x30]
MOV CL,byte ptr [RCX + 0x20]
JMP 0x00136018
LAB_00135fcc:
CMP R14D,-0x9
JC 0x00135fed
MOV RDI,qword ptr [R15 + 0x18]
MOV EAX,dword ptr [RBX]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RBX],ECX
CMP EAX,0x1
JG 0x00135fed
MOV RSI,RBX
MOV RDX,R14
CALL 0x00120d90
LAB_00135fed:
XOR EBX,EBX
XOR ECX,ECX
MOV R14D,0x6
JMP 0x00135f6f
LAB_00135ffc:
MOV CL,0x1
JMP 0x00136018
LAB_00136000:
MOV RDX,qword ptr [R15 + 0x18]
MOV RDX,qword ptr [RDX + 0x80]
LEA RCX,[RCX + RCX*0x4]
CMP qword ptr [RDX + RCX*0x8 + 0x18],0x0
SETNZ CL
LAB_00136018:
MOV byte ptr [RAX + 0x20],CL
MOV byte ptr [RAX + 0x21],0x0
MOV qword ptr [RBX + 0x30],RAX
CMP R13D,-0x1
JNZ 0x00135f5f
MOV AL,byte ptr [RSI + 0x5]
AND AL,0x10
MOV CL,byte ptr [RBX + 0x5]
AND CL,0xef
OR CL,AL
MOV byte ptr [RBX + 0x5],CL
JMP 0x00135f5f
|
int1 [16] js_proxy_constructor(long param_1)
{
ushort uVar1;
int iVar2;
int8 uVar3;
int8 uVar4;
int *piVar5;
int *piVar6;
int *piVar7;
int8 *puVar8;
ulong uVar9;
int8 *in_R8;
int1 uVar10;
int1 auVar11 [16];
int1 auVar12 [16];
uVar3 = in_R8[1];
uVar4 = in_R8[3];
if ((int)uVar4 == -1 && (int)uVar3 == -1) {
piVar5 = (int *)*in_R8;
piVar6 = (int *)in_R8[2];
auVar11 = JS_NewObjectProtoClass(param_1,0,2,0x30);
piVar7 = auVar11._0_8_;
if ((auVar11._8_8_ & 0xffffffff) != 6) {
puVar8 = (int8 *)js_malloc(param_1,0x28);
if (puVar8 == (int8 *)0x0) {
if (0xfffffff6 < auVar11._8_4_) {
uVar3 = *(int8 *)(param_1 + 0x18);
iVar2 = *piVar7;
*piVar7 = iVar2 + -1;
if (iVar2 < 2) {
js_free_value_rt(uVar3,piVar7,auVar11._8_8_);
}
}
uVar9 = 0;
auVar11 = ZEXT816(6) << 0x40;
goto LAB_00135f6f;
}
*piVar5 = *piVar5 + 1;
*puVar8 = piVar5;
puVar8[1] = uVar3;
*piVar6 = *piVar6 + 1;
puVar8[2] = piVar6;
puVar8[3] = uVar4;
uVar1 = *(ushort *)((long)piVar5 + 6);
if (uVar1 == 0xd) {
uVar10 = 1;
}
else if (uVar1 == 0x30) {
uVar10 = *(int1 *)(*(long *)(piVar5 + 0xc) + 0x20);
}
else {
uVar10 = *(long *)(*(long *)(*(long *)(param_1 + 0x18) + 0x80) + 0x18 + (ulong)uVar1 * 0x28)
!= 0;
}
*(int1 *)(puVar8 + 4) = uVar10;
*(int1 *)((long)puVar8 + 0x21) = 0;
*(int8 **)(piVar7 + 0xc) = puVar8;
if (auVar11._8_4_ == 0xffffffff) {
*(byte *)((long)piVar7 + 5) =
*(byte *)((long)piVar7 + 5) & 0xef | *(byte *)((long)piVar5 + 5) & 0x10;
}
}
uVar9 = (ulong)piVar7 & 0xffffffff00000000;
}
else {
JS_ThrowTypeError(param_1,"not an object");
auVar11 = ZEXT816(6) << 0x40;
uVar9 = 0;
}
LAB_00135f6f:
auVar12._0_8_ = auVar11._0_8_ & 0xffffffff | uVar9;
auVar12._8_8_ = auVar11._8_8_;
return auVar12;
}
| |
24,266 | expand_tilde | eloqsql/mysys/mf_pack.c | static char * expand_tilde(char **path)
{
if (path[0][0] == FN_LIBCHAR)
return home_dir; /* ~/ expanded to home */
#ifdef HAVE_GETPWNAM
{
char *str,save;
struct passwd *user_entry;
if (!(str=strchr(*path,FN_LIBCHAR)))
str=strend(*path);
save= *str; *str= '\0';
user_entry=getpwnam(*path);
*str=save;
endpwent();
if (user_entry)
{
*path=str;
return user_entry->pw_dir;
}
}
#endif
return (char *) 0;
} | O0 | c | expand_tilde:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x2fd1e
leaq 0x3cf0a6(%rip), %rax # 0x3fedb8
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x2fd9f
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl $0x2f, %esi
callq 0x29120
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x2fd49
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x863c0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb (%rax), %al
movb %al, -0x19(%rbp)
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x29260
movq %rax, -0x28(%rbp)
movb -0x19(%rbp), %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
callq 0x293c0
cmpq $0x0, -0x28(%rbp)
je 0x2fd97
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x2fd9f
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| expand_tilde:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_2FD1E
lea rax, home_dir
mov rax, [rax]
mov [rbp+var_8], rax
jmp loc_2FD9F
loc_2FD1E:
mov rax, [rbp+var_10]
mov rdi, [rax]
mov esi, 2Fh ; '/'
call _strchr
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_2FD49
mov rax, [rbp+var_10]
mov rdi, [rax]
call strend
mov [rbp+var_18], rax
loc_2FD49:
mov rax, [rbp+var_18]
mov al, [rax]
mov [rbp+var_19], al
mov rax, [rbp+var_18]
mov byte ptr [rax], 0
mov rax, [rbp+var_10]
mov rdi, [rax]
call _getpwnam
mov [rbp+var_28], rax
mov cl, [rbp+var_19]
mov rax, [rbp+var_18]
mov [rax], cl
call _endpwent
cmp [rbp+var_28], 0
jz short loc_2FD97
mov rcx, [rbp+var_18]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rax, [rbp+var_28]
mov rax, [rax+20h]
mov [rbp+var_8], rax
jmp short loc_2FD9F
loc_2FD97:
mov [rbp+var_8], 0
loc_2FD9F:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| long long expand_tilde(char **a1)
{
long long v2; // [rsp+8h] [rbp-28h]
char v3; // [rsp+17h] [rbp-19h]
char *v4; // [rsp+18h] [rbp-18h]
if ( **a1 == 47 )
return home_dir;
v4 = (char *)strchr(*a1, 47LL);
if ( !v4 )
v4 = (char *)strend(*a1);
v3 = *v4;
*v4 = 0;
v2 = getpwnam(*a1);
*v4 = v3;
endpwent();
if ( !v2 )
return 0LL;
*a1 = v4;
return *(_QWORD *)(v2 + 32);
}
| expand_tilde:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x0012fd1e
LEA RAX,[0x4fedb8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0012fd9f
LAB_0012fd1e:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV ESI,0x2f
CALL 0x00129120
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x0012fd49
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x001863c0
MOV qword ptr [RBP + -0x18],RAX
LAB_0012fd49:
MOV RAX,qword ptr [RBP + -0x18]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x19],AL
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x00129260
MOV qword ptr [RBP + -0x28],RAX
MOV CL,byte ptr [RBP + -0x19]
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],CL
CALL 0x001293c0
CMP qword ptr [RBP + -0x28],0x0
JZ 0x0012fd97
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0012fd9f
LAB_0012fd97:
MOV qword ptr [RBP + -0x8],0x0
LAB_0012fd9f:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
char * expand_tilde(int8 *param_1)
{
char cVar1;
passwd *ppVar2;
char *local_20;
char *local_10;
if (*(char *)*param_1 == '/') {
local_10 = home_dir;
}
else {
local_20 = strchr((char *)*param_1,0x2f);
if (local_20 == (char *)0x0) {
local_20 = (char *)strend(*param_1);
}
cVar1 = *local_20;
*local_20 = '\0';
ppVar2 = getpwnam((char *)*param_1);
*local_20 = cVar1;
endpwent();
if (ppVar2 == (passwd *)0x0) {
local_10 = (char *)0x0;
}
else {
*param_1 = local_20;
local_10 = ppVar2->pw_dir;
}
}
return local_10;
}
| |
24,267 | minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/minja.hpp | ArgumentsValue evaluate(const std::shared_ptr<Context> & context) const {
ArgumentsValue vargs;
for (const auto& arg : this->args) {
if (auto un_expr = std::dynamic_pointer_cast<UnaryOpExpr>(arg)) {
if (un_expr->op == UnaryOpExpr::Op::Expansion) {
auto array = un_expr->expr->evaluate(context);
if (!array.is_array()) {
throw std::runtime_error("Expansion operator only supported on arrays");
}
array.for_each([&](Value & value) {
vargs.args.push_back(value);
});
continue;
} else if (un_expr->op == UnaryOpExpr::Op::ExpansionDict) {
auto dict = un_expr->expr->evaluate(context);
if (!dict.is_object()) {
throw std::runtime_error("ExpansionDict operator only supported on objects");
}
dict.for_each([&](const Value & key) {
vargs.kwargs.push_back({key.get<std::string>(), dict.at(key)});
});
continue;
}
}
vargs.args.push_back(arg->evaluate(context));
}
for (const auto& [name, value] : this->kwargs) {
vargs.kwargs.push_back({name, value->evaluate(context)});
}
return vargs;
} | O2 | cpp | minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdx, %r15
movq %rdi, %rbp
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq (%rsi), %r13
movq %rsi, 0x20(%rsp)
movq 0x8(%rsi), %r14
leaq 0x78(%rsp), %r12
leaq 0x28(%rsp), %rbx
movq %rdi, 0x8(%rsp)
cmpq %r14, %r13
je 0x6ccae
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x6d9be
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x6cc0a
movl 0x30(%rax), %ecx
cmpl $0x4, %ecx
je 0x6cc38
cmpl $0x3, %ecx
jne 0x6cc0a
movq 0x20(%rax), %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0x62ea2
cmpq $0x0, 0x88(%rsp)
je 0x6cd23
andq $0x0, 0x30(%rsp)
movq %rbp, 0x28(%rsp)
leaq 0x10a7(%rip), %rax # 0x6dc90
movq %rax, 0x40(%rsp)
leaq 0x10a1(%rip), %rax # 0x6dc96
movq %rax, 0x38(%rsp)
movq %r12, %rdi
movq %rbx, %rbp
movq %rbx, %rsi
callq 0x6da14
jmp 0x6cc86
leaq 0x18(%rsp), %rdi
callq 0x4fae0
movq (%r13), %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0x62ea2
movq %rbp, %rdi
movq %r12, %rsi
callq 0x68e0a
movq %r12, %rdi
callq 0x63132
jmp 0x6cca5
movq 0x20(%rax), %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0x62ea2
cmpq $0x0, 0x98(%rsp)
je 0x6cd55
movq %rbp, 0x28(%rsp)
movq %r12, 0x30(%rsp)
leaq 0x1085(%rip), %rax # 0x6dcec
movq %rax, 0x40(%rsp)
leaq 0x107f(%rip), %rax # 0x6dcf2
movq %rax, 0x38(%rsp)
movq %r12, %rdi
movq %rbx, %rbp
movq %rbx, %rsi
callq 0x6da14
movq %rbp, %rdi
callq 0x47f7a
movq %r12, %rdi
callq 0x63132
leaq 0x18(%rsp), %rdi
callq 0x4fae0
movq 0x8(%rsp), %rbp
addq $0x10, %r13
jmp 0x6cb88
movq 0x20(%rsp), %rcx
movq 0x18(%rcx), %r14
movq 0x20(%rcx), %rbx
leaq 0x18(%rbp), %r12
leaq 0x28(%rsp), %r13
leaq 0x78(%rsp), %rbp
cmpq %rbx, %r14
je 0x6cd0c
movq 0x20(%r14), %rsi
movq %r13, %rdi
movq %r15, %rdx
callq 0x62ea2
movq %rbp, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x6dc40
movq %r12, %rdi
movq %rbp, %rsi
callq 0x6de04
movq %rbp, %rdi
callq 0x6dc66
movq %r13, %rdi
callq 0x63132
addq $0x30, %r14
jmp 0x6ccc9
movq 0x8(%rsp), %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x24460
movq %rax, %r15
leaq 0x49758(%rip), %rsi # 0xb648d
movq %rax, %rdi
callq 0x24320
movq 0x932ac(%rip), %rsi # 0xffff0
movq 0x93205(%rip), %rdx # 0xfff50
movq %r15, %rdi
callq 0x24ee0
jmp 0x6cd85
pushq $0x10
popq %rdi
callq 0x24460
movq %rax, %r15
leaq 0x49752(%rip), %rsi # 0xb64b9
movq %rax, %rdi
callq 0x24320
movq 0x9327a(%rip), %rsi # 0xffff0
movq 0x931d3(%rip), %rdx # 0xfff50
movq %r15, %rdi
callq 0x24ee0
jmp 0x6cd89
jmp 0x6cd8e
movq %rax, %r14
jmp 0x6cdb1
movq %rax, %r14
movq %r15, %rdi
callq 0x24670
jmp 0x6cdb1
jmp 0x6cd9f
jmp 0x6cdbd
movq 0x8(%rsp), %rbp
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x47f7a
leaq 0x78(%rsp), %rdi
callq 0x63132
jmp 0x6cdc0
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x4fae0
jmp 0x6ce06
movq %rax, %r14
leaq 0x78(%rsp), %rdi
callq 0x63132
jmp 0x6ce06
movq %rax, %r14
jmp 0x6ce06
movq %rax, %r14
jmp 0x6ce01
movq %rax, %r14
jmp 0x6cdf7
movq %rax, %r14
leaq 0x78(%rsp), %rdi
callq 0x6dc66
leaq 0x28(%rsp), %rdi
callq 0x63132
movq 0x8(%rsp), %rbp
movq %rbp, %rdi
callq 0x6d9a8
movq %r14, %rdi
callq 0x24f60
| _ZNK5minja19ArgumentsExpression8evaluateERKSt10shared_ptrINS_7ContextEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0E8h
mov r15, rdx
mov rbp, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi+20h], xmm0
movups xmmword ptr [rdi+10h], xmm0
movups xmmword ptr [rdi], xmm0
mov r13, [rsi]
mov [rsp+118h+var_F8], rsi
mov r14, [rsi+8]
lea r12, [rsp+118h+var_A0]
lea rbx, [rsp+118h+var_F0]
mov [rsp+118h+var_110], rdi
loc_6CB88:
cmp r13, r14
jz loc_6CCAE
lea rdi, [rsp+118h+var_108]
mov rsi, r13
call _ZSt20dynamic_pointer_castIN5minja11UnaryOpExprENS0_10ExpressionEESt10shared_ptrIT_ERKS3_IT0_E; std::dynamic_pointer_cast<minja::UnaryOpExpr,minja::Expression>(std::shared_ptr const&<minja::Expression>)
mov rax, [rsp+118h+var_108]
test rax, rax
jz short loc_6CC0A
mov ecx, [rax+30h]
cmp ecx, 4
jz loc_6CC38
cmp ecx, 3
jnz short loc_6CC0A
mov rsi, [rax+20h]
mov rdi, r12
mov rdx, r15
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
cmp [rsp+118h+var_90], 0
jz loc_6CD23
and [rsp+118h+var_E8], 0
mov [rsp+118h+var_F0], rbp
lea rax, _ZNSt17_Function_handlerIFvRN5minja5ValueEEZNKS0_19ArgumentsExpression8evaluateERKSt10shared_ptrINS0_7ContextEEEUlS2_E_E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_invoke(std::_Any_data const&,minja::Value &)
mov [rsp+118h+var_D8], rax
lea rax, _ZNSt17_Function_handlerIFvRN5minja5ValueEEZNKS0_19ArgumentsExpression8evaluateERKSt10shared_ptrINS0_7ContextEEEUlS2_E_E10_M_managerERSt9_Any_dataRKSC_St18_Manager_operation; std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsp+118h+var_E0], rax
mov rdi, r12
mov rbp, rbx
mov rsi, rbx
call _ZNK5minja5Value8for_eachERKSt8functionIFvRS0_EE; minja::Value::for_each(std::function<void ()(minja::Value&)> const&)
jmp short loc_6CC86
loc_6CC0A:
lea rdi, [rsp+118h+var_100]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rsi, [r13+0]
mov rdi, r12
mov rdx, r15
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov rdi, rbp
mov rsi, r12
call _ZNSt6vectorIN5minja5ValueESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<minja::Value>::emplace_back<minja::Value>(minja::Value &&)
mov rdi, r12; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_6CCA5
loc_6CC38:
mov rsi, [rax+20h]
mov rdi, r12
mov rdx, r15
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
cmp [rsp+118h+var_80], 0
jz loc_6CD55
mov [rsp+118h+var_F0], rbp
mov [rsp+118h+var_E8], r12
lea rax, _ZNSt17_Function_handlerIFvRN5minja5ValueEEZNKS0_19ArgumentsExpression8evaluateERKSt10shared_ptrINS0_7ContextEEEUlRKS1_E_E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1}>::_M_invoke(std::_Any_data const&,minja::Value &)
mov [rsp+118h+var_D8], rax
lea rax, _ZNSt17_Function_handlerIFvRN5minja5ValueEEZNKS0_19ArgumentsExpression8evaluateERKSt10shared_ptrINS0_7ContextEEEUlRKS1_E_E10_M_managerERSt9_Any_dataRKSE_St18_Manager_operation; std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsp+118h+var_E0], rax
mov rdi, r12
mov rbp, rbx
mov rsi, rbx
call _ZNK5minja5Value8for_eachERKSt8functionIFvRS0_EE; minja::Value::for_each(std::function<void ()(minja::Value&)> const&)
loc_6CC86:
mov rdi, rbp; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
mov rdi, r12; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
lea rdi, [rsp+118h+var_100]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rbp, [rsp+118h+var_110]
loc_6CCA5:
add r13, 10h
jmp loc_6CB88
loc_6CCAE:
mov rcx, [rsp+118h+var_F8]
mov r14, [rcx+18h]
mov rbx, [rcx+20h]
lea r12, [rbp+18h]
lea r13, [rsp+118h+var_F0]
lea rbp, [rsp+118h+var_A0]
loc_6CCC9:
cmp r14, rbx
jz short loc_6CD0C
mov rsi, [r14+20h]
mov rdi, r13
mov rdx, r15
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov rdi, rbp
mov rsi, r14
mov rdx, r13
call _ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEEC2IS7_TnNSt9enable_ifIXclsr5_PCCPE13_CopyMovePairILb1ES5_T_EEEbE4typeELb1EEERKS5_OSB_
mov rdi, r12
mov rsi, rbp
call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEESaIS9_EE12emplace_backIJS9_EEERS9_DpOT_; std::vector<std::pair<std::string,minja::Value>>::emplace_back<std::pair<std::string,minja::Value>>(std::pair<std::string,minja::Value> &&)
mov rdi, rbp; void *
call _ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEED2Ev; std::pair<std::string,minja::Value>::~pair()
mov rdi, r13; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
add r14, 30h ; '0'
jmp short loc_6CCC9
loc_6CD0C:
mov rax, [rsp+118h+var_110]
add rsp, 0E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6CD23:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpansionOpera_0; "Expansion operator only supported on ar"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
jmp short loc_6CD85
loc_6CD55:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpansiondictO; "ExpansionDict operator only supported o"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
loc_6CD85:
jmp short loc_6CD89
jmp short loc_6CD8E
loc_6CD89:
mov r14, rax
jmp short loc_6CDB1
loc_6CD8E:
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_6CDB1
jmp short loc_6CD9F
jmp short loc_6CDBD
loc_6CD9F:
mov rbp, [rsp+118h+var_110]
mov r14, rax
lea rdi, [rsp+118h+var_F0]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
loc_6CDB1:
lea rdi, [rsp+118h+var_A0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_6CDC0
loc_6CDBD:
mov r14, rax
loc_6CDC0:
lea rdi, [rsp+118h+var_100]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_6CE06
mov r14, rax
lea rdi, [rsp+118h+var_A0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_6CE06
mov r14, rax
jmp short loc_6CE06
mov r14, rax
jmp short loc_6CE01
mov r14, rax
jmp short loc_6CDF7
mov r14, rax
lea rdi, [rsp+118h+var_A0]; void *
call _ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEED2Ev; std::pair<std::string,minja::Value>::~pair()
loc_6CDF7:
lea rdi, [rsp+118h+var_F0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_6CE01:
mov rbp, [rsp+118h+var_110]
loc_6CE06:
mov rdi, rbp; this
call _ZN5minja14ArgumentsValueD2Ev; minja::ArgumentsValue::~ArgumentsValue()
mov rdi, r14
call __Unwind_Resume
| _OWORD * minja::ArgumentsExpression::evaluate(_OWORD *a1, void (*****a2)(void))
{
long long v2; // rbp
void (****v3)(void); // r13
void (****v4)(void); // r14
int v5; // ecx
void (****v6)(void); // r14
void (****v7)(void); // rbx
std::runtime_error *v9; // r15
std::runtime_error *exception; // r15
long long v11; // [rsp+10h] [rbp-108h] BYREF
long long v12; // [rsp+18h] [rbp-100h] BYREF
void (*****v13)(void); // [rsp+20h] [rbp-F8h]
long long v14; // [rsp+28h] [rbp-F0h] BYREF
_BYTE *v15; // [rsp+30h] [rbp-E8h]
long long ( *v16)(); // [rsp+38h] [rbp-E0h]
long long ( *v17)(); // [rsp+40h] [rbp-D8h]
_BYTE v18[16]; // [rsp+78h] [rbp-A0h] BYREF
long long v19; // [rsp+88h] [rbp-90h]
long long v20; // [rsp+98h] [rbp-80h]
v2 = (long long)a1;
a1[2] = 0LL;
a1[1] = 0LL;
*a1 = 0LL;
v3 = *a2;
v13 = a2;
v4 = a2[1];
while ( v3 != v4 )
{
std::dynamic_pointer_cast<minja::UnaryOpExpr,minja::Expression>(&v11, v3);
if ( !v11 )
goto LABEL_8;
v5 = *(_DWORD *)(v11 + 48);
if ( v5 == 4 )
{
minja::Expression::evaluate((long long)v18, *(void (****)(void))(v11 + 32));
if ( !v20 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "ExpansionDict operator only supported on objects");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v14 = v2;
v15 = v18;
v17 = std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1}>::_M_invoke;
v16 = std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1}>::_M_manager;
minja::Value::for_each(v18, &v14);
}
else
{
if ( v5 != 3 )
{
LABEL_8:
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v12);
minja::Expression::evaluate((long long)v18, *v3);
std::vector<minja::Value>::emplace_back<minja::Value>(v2, (long long)v18);
minja::Value::~Value((minja::Value *)v18);
goto LABEL_12;
}
minja::Expression::evaluate((long long)v18, *(void (****)(void))(v11 + 32));
if ( !v19 )
{
v9 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v9, "Expansion operator only supported on arrays");
__cxa_throw(
v9,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v15 = 0LL;
v14 = v2;
v17 = std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_invoke;
v16 = std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_manager;
minja::Value::for_each(v18, &v14);
}
std::_Function_base::~_Function_base((std::_Function_base *)&v14);
minja::Value::~Value((minja::Value *)v18);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v12);
v2 = (long long)a1;
LABEL_12:
v3 += 2;
}
v6 = v13[3];
v7 = v13[4];
while ( v6 != v7 )
{
minja::Expression::evaluate((long long)&v14, v6[4]);
ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEEC2IS7_TnNSt9enable_ifIXclsr5_PCCPE13_CopyMovePairILb1ES5_T_EEEbE4typeELb1EEERKS5_OSB_(
v18,
v6,
&v14);
std::vector<std::pair<std::string,minja::Value>>::emplace_back<std::pair<std::string,minja::Value>>(v2 + 24, v18);
std::pair<std::string,minja::Value>::~pair(v18);
minja::Value::~Value((minja::Value *)&v14);
v6 += 6;
}
return a1;
}
| evaluate:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV R15,RDX
MOV RBP,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV R13,qword ptr [RSI]
MOV qword ptr [RSP + 0x20],RSI
MOV R14,qword ptr [RSI + 0x8]
LEA R12,[RSP + 0x78]
LEA RBX,[RSP + 0x28]
MOV qword ptr [RSP + 0x8],RDI
LAB_0016cb88:
CMP R13,R14
JZ 0x0016ccae
LEA RDI,[RSP + 0x10]
MOV RSI,R13
CALL 0x0016d9be
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x0016cc0a
MOV ECX,dword ptr [RAX + 0x30]
CMP ECX,0x4
JZ 0x0016cc38
CMP ECX,0x3
JNZ 0x0016cc0a
MOV RSI,qword ptr [RAX + 0x20]
LAB_0016cbbd:
MOV RDI,R12
MOV RDX,R15
CALL 0x00162ea2
CMP qword ptr [RSP + 0x88],0x0
JZ 0x0016cd23
AND qword ptr [RSP + 0x30],0x0
MOV qword ptr [RSP + 0x28],RBP
LEA RAX,[0x16dc90]
MOV qword ptr [RSP + 0x40],RAX
LEA RAX,[0x16dc96]
MOV qword ptr [RSP + 0x38],RAX
LAB_0016cbfa:
MOV RDI,R12
MOV RBP,RBX
MOV RSI,RBX
CALL 0x0016da14
JMP 0x0016cc86
LAB_0016cc0a:
LEA RDI,[RSP + 0x18]
CALL 0x0014fae0
MOV RSI,qword ptr [R13]
LAB_0016cc18:
MOV RDI,R12
MOV RDX,R15
CALL 0x00162ea2
LAB_0016cc23:
MOV RDI,RBP
MOV RSI,R12
CALL 0x00168e0a
MOV RDI,R12
CALL 0x00163132
JMP 0x0016cca5
LAB_0016cc38:
MOV RSI,qword ptr [RAX + 0x20]
LAB_0016cc3c:
MOV RDI,R12
MOV RDX,R15
CALL 0x00162ea2
CMP qword ptr [RSP + 0x98],0x0
JZ 0x0016cd55
MOV qword ptr [RSP + 0x28],RBP
MOV qword ptr [RSP + 0x30],R12
LEA RAX,[0x16dcec]
MOV qword ptr [RSP + 0x40],RAX
LEA RAX,[0x16dcf2]
MOV qword ptr [RSP + 0x38],RAX
LAB_0016cc78:
MOV RDI,R12
MOV RBP,RBX
MOV RSI,RBX
CALL 0x0016da14
LAB_0016cc86:
MOV RDI,RBP
CALL 0x00147f7a
MOV RDI,R12
CALL 0x00163132
LEA RDI,[RSP + 0x18]
CALL 0x0014fae0
MOV RBP,qword ptr [RSP + 0x8]
LAB_0016cca5:
ADD R13,0x10
JMP 0x0016cb88
LAB_0016ccae:
MOV RCX,qword ptr [RSP + 0x20]
MOV R14,qword ptr [RCX + 0x18]
MOV RBX,qword ptr [RCX + 0x20]
LEA R12,[RBP + 0x18]
LEA R13,[RSP + 0x28]
LEA RBP,[RSP + 0x78]
LAB_0016ccc9:
CMP R14,RBX
JZ 0x0016cd0c
MOV RSI,qword ptr [R14 + 0x20]
LAB_0016ccd2:
MOV RDI,R13
MOV RDX,R15
CALL 0x00162ea2
LAB_0016ccdd:
MOV RDI,RBP
MOV RSI,R14
MOV RDX,R13
CALL 0x0016dc40
LAB_0016cceb:
MOV RDI,R12
MOV RSI,RBP
CALL 0x0016de04
LAB_0016ccf6:
MOV RDI,RBP
CALL 0x0016dc66
MOV RDI,R13
CALL 0x00163132
ADD R14,0x30
JMP 0x0016ccc9
LAB_0016cd0c:
MOV RAX,qword ptr [RSP + 0x8]
ADD RSP,0xe8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0016cd23:
PUSH 0x10
POP RDI
CALL 0x00124460
MOV R15,RAX
LAB_0016cd2e:
LEA RSI,[0x1b648d]
MOV RDI,RAX
CALL 0x00124320
LAB_0016cd3d:
MOV RSI,qword ptr [0x001ffff0]
MOV RDX,qword ptr [0x001fff50]
MOV RDI,R15
CALL 0x00124ee0
LAB_0016cd55:
PUSH 0x10
POP RDI
CALL 0x00124460
MOV R15,RAX
LAB_0016cd60:
LEA RSI,[0x1b64b9]
MOV RDI,RAX
CALL 0x00124320
LAB_0016cd6f:
MOV RSI,qword ptr [0x001ffff0]
MOV RDX,qword ptr [0x001fff50]
MOV RDI,R15
CALL 0x00124ee0
|
/* minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&) const */
ArgumentsExpression * __thiscall
minja::ArgumentsExpression::evaluate(ArgumentsExpression *this,shared_ptr *param_1)
{
int8 *puVar1;
long lVar2;
runtime_error *prVar3;
int8 *puVar4;
long lVar5;
long local_108;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_100 [8];
shared_ptr *local_f8;
ArgumentsExpression *local_f0;
Expression *local_e8;
code *local_e0;
code *local_d8;
Expression local_a0 [16];
long local_90;
long local_80;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
puVar4 = *(int8 **)param_1;
puVar1 = *(int8 **)(param_1 + 8);
local_f8 = param_1;
do {
if (puVar4 == puVar1) {
lVar2 = *(long *)(local_f8 + 0x20);
for (lVar5 = *(long *)(local_f8 + 0x18); lVar5 != lVar2; lVar5 = lVar5 + 0x30) {
/* try { // try from 0016ccd2 to 0016ccdc has its CatchHandler @ 0016cde0 */
Expression::evaluate((Expression *)&local_f0,*(shared_ptr **)(lVar5 + 0x20));
/* try { // try from 0016ccdd to 0016ccea has its CatchHandler @ 0016cde5 */
_ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEEC2IS7_TnNSt9enable_ifIXclsr5_PCCPE13_CopyMovePairILb1ES5_T_EEEbE4typeELb1EEERKS5_OSB_
((pair<std::__cxx11::string,minja::Value> *)local_a0,lVar5,(Expression *)&local_f0
);
/* try { // try from 0016cceb to 0016ccf5 has its CatchHandler @ 0016cdea */
std::
vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>>
::emplace_back<std::pair<std::__cxx11::string,minja::Value>>
((vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>>
*)(this + 0x18),(pair<std::__cxx11::string,minja::Value> *)local_a0);
std::pair<std::__cxx11::string,minja::Value>::~pair
((pair<std::__cxx11::string,minja::Value> *)local_a0);
Value::~Value((Value *)&local_f0);
}
return this;
}
std::dynamic_pointer_cast<minja::UnaryOpExpr,minja::Expression>((shared_ptr *)&local_108);
if (local_108 == 0) {
LAB_0016cc0a:
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_100);
/* try { // try from 0016cc18 to 0016cc22 has its CatchHandler @ 0016cddb */
Expression::evaluate(local_a0,(shared_ptr *)*puVar4);
/* try { // try from 0016cc23 to 0016cc2d has its CatchHandler @ 0016cdcc */
std::vector<minja::Value,std::allocator<minja::Value>>::emplace_back<minja::Value>
((vector<minja::Value,std::allocator<minja::Value>> *)this,(Value *)local_a0);
Value::~Value((Value *)local_a0);
}
else {
if (*(int *)(local_108 + 0x30) == 4) {
/* try { // try from 0016cc3c to 0016cc46 has its CatchHandler @ 0016cd9d */
Expression::evaluate(local_a0,*(shared_ptr **)(local_108 + 0x20));
if (local_80 == 0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016cd60 to 0016cd6e has its CatchHandler @ 0016cd87 */
std::runtime_error::runtime_error
(prVar3,"ExpansionDict operator only supported on objects");
/* try { // try from 0016cd6f to 0016cd84 has its CatchHandler @ 0016cd85 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_001ffff0,PTR__runtime_error_001fff50);
}
local_d8 = std::
_Function_handler<void(minja::Value&),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context>const&)const::{lambda(minja::Value_const&)#1}>
::_M_invoke;
local_e0 = std::
_Function_handler<void(minja::Value&),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context>const&)const::{lambda(minja::Value_const&)#1}>
::_M_manager;
local_f0 = this;
local_e8 = local_a0;
/* try { // try from 0016cc78 to 0016cc85 has its CatchHandler @ 0016cd9b */
Value::for_each((Value *)local_a0,(_Function_base *)&local_f0);
}
else {
if (*(int *)(local_108 + 0x30) != 3) goto LAB_0016cc0a;
/* try { // try from 0016cbbd to 0016cbc7 has its CatchHandler @ 0016cdbd */
Expression::evaluate(local_a0,*(shared_ptr **)(local_108 + 0x20));
if (local_90 == 0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016cd2e to 0016cd3c has its CatchHandler @ 0016cd8e */
std::runtime_error::runtime_error(prVar3,"Expansion operator only supported on arrays");
/* try { // try from 0016cd3d to 0016cd52 has its CatchHandler @ 0016cd89 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_001ffff0,PTR__runtime_error_001fff50);
}
local_e8 = (Expression *)0x0;
local_d8 = std::
_Function_handler<void(minja::Value&),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context>const&)const::{lambda(minja::Value&)#1}>
::_M_invoke;
local_e0 = std::
_Function_handler<void(minja::Value&),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context>const&)const::{lambda(minja::Value&)#1}>
::_M_manager;
local_f0 = this;
/* try { // try from 0016cbfa to 0016cc07 has its CatchHandler @ 0016cd9f */
Value::for_each((Value *)local_a0,(_Function_base *)&local_f0);
}
std::_Function_base::~_Function_base((_Function_base *)&local_f0);
Value::~Value((Value *)local_a0);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_100);
}
puVar4 = puVar4 + 2;
} while( true );
}
| |
24,268 | Event_queue::Event_queue() | eloqsql/sql/event_queue.cc | Event_queue::Event_queue()
:next_activation_at(0),
mutex_last_locked_at_line(0),
mutex_last_unlocked_at_line(0),
mutex_last_attempted_lock_at_line(0),
mutex_last_locked_in_func("n/a"),
mutex_last_unlocked_in_func("n/a"),
mutex_last_attempted_lock_in_func("n/a"),
mutex_queue_data_locked(FALSE),
mutex_queue_data_attempting_lock(FALSE),
waiting_on_cond(FALSE)
{
mysql_mutex_init(key_LOCK_event_queue, &LOCK_event_queue, MY_MUTEX_INIT_FAST);
mysql_cond_init(key_COND_queue_state, &COND_queue_state, NULL);
} | O0 | cpp | Event_queue::Event_queue():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x10(%rbp)
movq $0x0, 0xb0(%rsi)
movl $0x0, 0xb8(%rsi)
movl $0x0, 0xbc(%rsi)
movl $0x0, 0xc0(%rsi)
leaq 0x5f7051(%rip), %rax # 0x13dd355
movq %rax, 0xc8(%rsi)
leaq 0x5f7043(%rip), %rax # 0x13dd355
movq %rax, 0xd0(%rsi)
leaq 0x5f7035(%rip), %rax # 0x13dd355
movq %rax, 0xd8(%rsi)
movb $0x0, 0xe0(%rsi)
movb $0x0, 0xe1(%rsi)
movb $0x0, 0xe2(%rsi)
leaq 0xef4b35(%rip), %rax # 0x1cdae78
movl (%rax), %edi
leaq 0x17bb154(%rip), %rdx # 0x25a14a0
callq 0xde6380
movq -0x10(%rbp), %rsi
leaq 0xef4b28(%rip), %rax # 0x1cdae84
movl (%rax), %edi
addq $0x48, %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0xde63f0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZN11Event_queueC2Ev:
push rbp; Alternative name is 'Event_queue::Event_queue(void)'
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rsi, [rbp+var_8]
mov [rbp+var_10], rsi
mov qword ptr [rsi+0B0h], 0
mov dword ptr [rsi+0B8h], 0
mov dword ptr [rsi+0BCh], 0
mov dword ptr [rsi+0C0h], 0
lea rax, aNA; "n/a"
mov [rsi+0C8h], rax
lea rax, aNA; "n/a"
mov [rsi+0D0h], rax
lea rax, aNA; "n/a"
mov [rsi+0D8h], rax
mov byte ptr [rsi+0E0h], 0
mov byte ptr [rsi+0E1h], 0
mov byte ptr [rsi+0E2h], 0
lea rax, key_LOCK_event_queue
mov edi, [rax]
lea rdx, my_fast_mutexattr
call _ZL23inline_mysql_mutex_initjP14st_mysql_mutexPK19pthread_mutexattr_t_25; inline_mysql_mutex_init(uint,st_mysql_mutex *,pthread_mutexattr_t const*)
mov rsi, [rbp+var_10]
lea rax, key_COND_queue_state
mov edi, [rax]
add rsi, 48h ; 'H'
xor eax, eax
mov edx, eax
call _ZL22inline_mysql_cond_initjP13st_mysql_condPK18pthread_condattr_t_18; inline_mysql_cond_init(uint,st_mysql_cond *,pthread_condattr_t const*)
add rsp, 10h
pop rbp
retn
| void Event_queue::Event_queue(Event_queue *this)
{
*((_QWORD *)this + 22) = 0LL;
*((_DWORD *)this + 46) = 0;
*((_DWORD *)this + 47) = 0;
*((_DWORD *)this + 48) = 0;
*((_QWORD *)this + 25) = "n/a";
*((_QWORD *)this + 26) = "n/a";
*((_QWORD *)this + 27) = "n/a";
*((_BYTE *)this + 224) = 0;
*((_BYTE *)this + 225) = 0;
*((_BYTE *)this + 226) = 0;
inline_mysql_mutex_init(key_LOCK_event_queue, this, &my_fast_mutexattr);
inline_mysql_cond_init(key_COND_queue_state, (char *)this + 72, 0LL);
}
| get_item_copy<Item_func_concat>:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00d2f5f0
MOV RSI,RAX
MOV qword ptr [RBP + -0x48],RSI
MOV EDI,0xc8
CALL 0x008ee3b0
MOV RCX,RAX
MOV qword ptr [RBP + -0x40],RCX
MOV byte ptr [RBP + -0x19],0x0
XOR EAX,EAX
CMP RCX,0x0
MOV qword ptr [RBP + -0x38],RAX
JZ 0x00de631e
MOV RDI,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x19],0x1
MOV RSI,qword ptr [RBP + -0x10]
LAB_00de630d:
CALL 0x00de6380
LAB_00de6312:
JMP 0x00de6314
LAB_00de6314:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00de631e
LAB_00de631e:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00de635f
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x00d4baa0
JMP 0x00de635f
LAB_00de635f:
MOV RAX,qword ptr [RBP + -0x18]
ADD RSP,0x50
POP RBP
RET
|
/* Item* get_item_copy<Item_func_concat>(THD*, Item_func_concat*) */
Item * get_item_copy<Item_func_concat>(THD *param_1,Item_func_concat *param_2)
{
st_mem_root *psVar1;
Item_func_concat *this;
int8 local_40;
psVar1 = (st_mem_root *)get_thd_memroot(param_1);
this = (Item_func_concat *)Item::operator_new(200,psVar1);
local_40 = (Item *)0x0;
if (this != (Item_func_concat *)0x0) {
/* try { // try from 00de630d to 00de6311 has its CatchHandler @ 00de633c */
Item_func_concat::Item_func_concat(this,param_2);
local_40 = (Item *)this;
}
if (local_40 != (Item *)0x0) {
Item::register_in(local_40,param_1);
}
return (Item *)local_40;
}
| |
24,269 | void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::boolean_t&) | hkr04[P]cpp-mcp/common/json.hpp | inline void from_json(const BasicJsonType& j, typename BasicJsonType::boolean_t& b)
{
if (JSON_HEDLEY_UNLIKELY(!j.is_boolean()))
{
JSON_THROW(type_error::create(302, concat("type must be boolean, but is ", j.type_name()), &j));
}
b = *j.template get_ptr<const typename BasicJsonType::boolean_t*>();
} | O0 | cpp | void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::boolean_t&):
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x50(%rsp), %rdi
callq 0x15450
xorb $-0x1, %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x15377
jmp 0x15429
movb $0x1, 0x13(%rsp)
movl $0x20, %edi
callq 0xc440
movq %rax, 0x8(%rsp)
movq 0x50(%rsp), %rdi
callq 0x156d0
movq %rax, 0x20(%rsp)
leaq 0xcea62(%rip), %rsi # 0xe3e03
leaq 0x28(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x15620
jmp 0x153b2
movq 0x8(%rsp), %rdi
movq 0x50(%rsp), %rcx
movl $0x12e, %esi # imm = 0x12E
leaq 0x28(%rsp), %rdx
callq 0x15470
jmp 0x153cd
movq 0x8(%rsp), %rdi
movb $0x0, 0x13(%rsp)
leaq 0x1276fa(%rip), %rsi # 0x13cad8
leaq 0x39b(%rip), %rdx # 0x15780
callq 0xcdc0
jmp 0x1544e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
jmp 0x15414
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
leaq 0x28(%rsp), %rdi
callq 0xcfd0
testb $0x1, 0x13(%rsp)
jne 0x1541d
jmp 0x15427
movq 0x8(%rsp), %rdi
callq 0xc670
jmp 0x15444
movq 0x50(%rsp), %rdi
callq 0x15790
movb (%rax), %cl
movq 0x48(%rsp), %rax
andb $0x1, %cl
movb %cl, (%rax)
addq $0x58, %rsp
retq
movq 0x18(%rsp), %rdi
callq 0xce40
nop
| _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_9boolean_tE:
sub rsp, 58h
mov qword ptr [rsp+58h+var_8], rdi; char
mov qword ptr [rsp+58h+var_10], rsi; int
mov rdi, qword ptr [rsp+58h+var_8]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10is_booleanEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::is_boolean(void)
xor al, 0FFh
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_15377
jmp loc_15429
loc_15377:
mov [rsp+58h+var_45], 1
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov [rsp+58h+var_50], rax; int
mov rdi, qword ptr [rsp+58h+var_8]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
mov qword ptr [rsp+58h+var_38], rax; int
lea rsi, aTypeMustBeBool; "type must be boolean, but is "
lea rdi, [rsp+58h+var_30]
lea rdx, [rsp+58h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA30_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[30],char const*>(char const(&)[30],char const* &&)
jmp short $+2
loc_153B2:
mov rdi, [rsp+58h+var_50]; int
mov rcx, qword ptr [rsp+58h+var_8]
mov esi, 12Eh
lea rdx, [rsp+58h+var_30]
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
jmp short $+2
loc_153CD:
mov rdi, [rsp+58h+var_50]; void *
mov [rsp+58h+var_45], 0
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *)
call ___cxa_throw
jmp short loc_1544E
mov rcx, rax
mov eax, edx
mov [rsp+arg_10], rcx
mov [rsp+arg_C], eax
jmp short loc_15414
mov rcx, rax
mov eax, edx
mov [rsp+arg_10], rcx
mov [rsp+arg_C], eax
lea rdi, [rsp+arg_20]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_15414:
test [rsp+arg_B], 1
jnz short loc_1541D
jmp short loc_15427
loc_1541D:
mov rdi, [rsp+arg_0]; void *
call ___cxa_free_exception
loc_15427:
jmp short loc_15444
loc_15429:
mov rdi, qword ptr [rsp+58h+var_8]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKbTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
mov cl, [rax]
mov rax, qword ptr [rsp+58h+var_10]
and cl, 1
mov [rax], cl
add rsp, 58h
retn
loc_15444:
mov rdi, [rsp+arg_10]
call __Unwind_Resume
loc_1544E:
xchg ax, ax
| from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>:
SUB RSP,0x58
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x00115450
XOR AL,0xff
XOR AL,0xff
XOR AL,0xff
TEST AL,0x1
JNZ 0x00115377
JMP 0x00115429
LAB_00115377:
MOV byte ptr [RSP + 0x13],0x1
MOV EDI,0x20
CALL 0x0010c440
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x001156d0
MOV qword ptr [RSP + 0x20],RAX
LAB_0011539a:
LEA RSI,[0x1e3e03]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x20]
CALL 0x00115620
JMP 0x001153b2
LAB_001153b2:
MOV RDI,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP + 0x50]
LAB_001153bc:
MOV ESI,0x12e
LEA RDX,[RSP + 0x28]
CALL 0x00115470
JMP 0x001153cd
LAB_001153cd:
MOV RDI,qword ptr [RSP + 0x8]
MOV byte ptr [RSP + 0x13],0x0
LEA RSI,[0x23cad8]
LEA RDX,[0x115780]
CALL 0x0010cdc0
LAB_00115429:
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x00115790
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RSP + 0x48]
AND CL,0x1
MOV byte ptr [RAX],CL
ADD RSP,0x58
RET
|
/* void
nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::boolean_t&) */
void nlohmann::json_abi_v3_11_3::detail::
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(basic_json *param_1,boolean_t *param_2)
{
byte bVar1;
int8 uVar2;
byte *pbVar3;
char *local_38;
detail local_30 [32];
boolean_t *local_10;
basic_json *local_8;
local_10 = param_2;
local_8 = param_1;
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>
::is_boolean((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);
if (((bVar1 ^ 0xff) & 1) == 0) {
pbVar3 = (byte *)_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKbTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
(local_8);
*local_10 = (boolean_t)(*pbVar3 & 1);
return;
}
uVar2 = __cxa_allocate_exception(0x20);
local_38 = (char *)basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)local_8);
/* try { // try from 0011539a to 001153af has its CatchHandler @ 001153ec */
concat<std::__cxx11::string,char_const(&)[30],char_const*>
(local_30,"type must be boolean, but is ",&local_38);
/* try { // try from 001153bc to 001153e9 has its CatchHandler @ 001153fc */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x12e,local_30,local_8);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&type_error::typeinfo,type_error::~type_error);
}
| ||
24,270 | my_copy_incomplete_char | eloqsql/strings/ctype-ucs2.c | static my_char_copy_status_t
my_copy_incomplete_char(CHARSET_INFO *cs,
char *dst, size_t dst_length,
const char *src, size_t src_length,
size_t nchars, my_bool fix)
{
size_t pad_length;
size_t src_offset= src_length % cs->mbminlen;
if (dst_length < cs->mbminlen || !nchars)
return MY_CHAR_COPY_ERROR;
pad_length= cs->mbminlen - src_offset;
bzero(dst, pad_length);
memmove(dst + pad_length, src, src_offset);
/*
In some cases left zero-padding can create an incorrect character.
For example:
INSERT INTO t1 (utf32_column) VALUES (0x110000);
We'll pad the value to 0x00110000, which is a wrong UTF32 sequence!
The valid characters range is limited to 0x00000000..0x0010FFFF.
Make sure we didn't pad to an incorrect character.
*/
if (my_ci_charlen(cs, (uchar *) dst, (uchar *) dst + cs->mbminlen) ==
(int) cs->mbminlen)
return MY_CHAR_COPY_OK;
if (fix &&
my_ci_wc_mb(cs, '?', (uchar *) dst, (uchar *) dst + cs->mbminlen) ==
(int) cs->mbminlen)
return MY_CHAR_COPY_FIXED;
return MY_CHAR_COPY_ERROR;
} | O0 | c | my_copy_incomplete_char:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb 0x10(%rbp), %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x98(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movq %rdx, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x98(%rcx), %ecx
cmpq %rcx, %rax
jb 0x6c4f4
cmpq $0x0, -0x38(%rbp)
jne 0x6c500
movl $0x1, -0x4(%rbp)
jmp 0x6c5bd
movq -0x10(%rbp), %rax
movl 0x98(%rax), %eax
subq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rdx
xorl %esi, %esi
callq 0x251d0
movq -0x18(%rbp), %rdi
addq -0x40(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x255c0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rax
movl 0x98(%rax), %eax
addq %rax, %rdx
callq 0x6c5d0
movq -0x10(%rbp), %rcx
cmpl 0x98(%rcx), %eax
jne 0x6c569
movl $0x0, -0x4(%rbp)
jmp 0x6c5bd
movsbl 0x10(%rbp), %eax
cmpl $0x0, %eax
je 0x6c5b6
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rsi
movl 0x98(%rsi), %esi
addq %rsi, %rcx
movl $0x3f, %esi
callq *%rax
movq -0x10(%rbp), %rcx
cmpl 0x98(%rcx), %eax
jne 0x6c5b6
movl $0x2, -0x4(%rbp)
jmp 0x6c5bd
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_copy_incomplete_char:
push rbp
mov rbp, rsp
sub rsp, 50h
mov al, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov rax, [rbp+var_30]
mov rcx, [rbp+var_10]
mov ecx, [rcx+98h]
xor edx, edx
div rcx
mov [rbp+var_48], rdx
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
mov ecx, [rcx+98h]
cmp rax, rcx
jb short loc_6C4F4
cmp [rbp+var_38], 0
jnz short loc_6C500
loc_6C4F4:
mov [rbp+var_4], 1
jmp loc_6C5BD
loc_6C500:
mov rax, [rbp+var_10]
mov eax, [rax+98h]
sub rax, [rbp+var_48]
mov [rbp+var_40], rax
mov rdi, [rbp+var_18]
mov rdx, [rbp+var_40]
xor esi, esi
call _memset
mov rdi, [rbp+var_18]
add rdi, [rbp+var_40]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_48]
call _memmove
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_18]
mov rax, [rbp+var_10]
mov eax, [rax+98h]
add rdx, rax
call my_ci_charlen_3
mov rcx, [rbp+var_10]
cmp eax, [rcx+98h]
jnz short loc_6C569
mov [rbp+var_4], 0
jmp short loc_6C5BD
loc_6C569:
movsx eax, [rbp+arg_0]
cmp eax, 0
jz short loc_6C5B6
mov rax, [rbp+var_10]
mov rax, [rax+0B8h]
mov rax, [rax+30h]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_18]
mov rsi, [rbp+var_10]
mov esi, [rsi+98h]
add rcx, rsi
mov esi, 3Fh ; '?'
call rax
mov rcx, [rbp+var_10]
cmp eax, [rcx+98h]
jnz short loc_6C5B6
mov [rbp+var_4], 2
jmp short loc_6C5BD
loc_6C5B6:
mov [rbp+var_4], 1
loc_6C5BD:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
| long long my_copy_incomplete_char(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
long long a6,
char a7)
{
unsigned long long v8; // [rsp+8h] [rbp-48h]
unsigned long long v9; // [rsp+10h] [rbp-40h]
v8 = a5 % *(unsigned int *)(a1 + 152);
if ( a3 >= *(unsigned int *)(a1 + 152) && a6 )
{
v9 = *(unsigned int *)(a1 + 152) - v8;
memset(a2, 0LL, v9);
memmove(v9 + a2, a4, v8);
if ( (unsigned int)my_ci_charlen_3(a1, a2, *(unsigned int *)(a1 + 152) + a2) == *(_DWORD *)(a1 + 152) )
{
return 0;
}
else if ( a7
&& (*(unsigned int ( **)(long long, long long, long long, long long))(*(_QWORD *)(a1 + 184) + 48LL))(
a1,
63LL,
a2,
*(unsigned int *)(a1 + 152) + a2) == *(_DWORD *)(a1 + 152) )
{
return 2;
}
else
{
return 1;
}
}
else
{
return 1;
}
}
| my_copy_incomplete_char:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV AL,byte ptr [RBP + 0x10]
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 qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x98]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x48],RDX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x98]
CMP RAX,RCX
JC 0x0016c4f4
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x0016c500
LAB_0016c4f4:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0016c5bd
LAB_0016c500:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x98]
SUB RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x40]
XOR ESI,ESI
CALL 0x001251d0
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x48]
CALL 0x001255c0
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x98]
ADD RDX,RAX
CALL 0x0016c5d0
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0x98]
JNZ 0x0016c569
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0016c5bd
LAB_0016c569:
MOVSX EAX,byte ptr [RBP + 0x10]
CMP EAX,0x0
JZ 0x0016c5b6
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x30]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RSI + 0x98]
ADD RCX,RSI
MOV ESI,0x3f
CALL RAX
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0x98]
JNZ 0x0016c5b6
MOV dword ptr [RBP + -0x4],0x2
JMP 0x0016c5bd
LAB_0016c5b6:
MOV dword ptr [RBP + -0x4],0x1
LAB_0016c5bd:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x50
POP RBP
RET
|
int4
my_copy_incomplete_char
(long param_1,void *param_2,ulong param_3,void *param_4,ulong param_5,long param_6,
char param_7)
{
int iVar1;
size_t __n;
int4 local_c;
param_5 = param_5 % (ulong)*(uint *)(param_1 + 0x98);
if ((param_3 < *(uint *)(param_1 + 0x98)) || (param_6 == 0)) {
local_c = 1;
}
else {
__n = *(uint *)(param_1 + 0x98) - param_5;
memset(param_2,0,__n);
memmove((void *)((long)param_2 + __n),param_4,param_5);
iVar1 = my_ci_charlen(param_1,param_2,(long)param_2 + (ulong)*(uint *)(param_1 + 0x98));
if (iVar1 == *(int *)(param_1 + 0x98)) {
local_c = 0;
}
else {
if ((param_7 != '\0') &&
(iVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))
(param_1,0x3f,param_2,(long)param_2 + (ulong)*(uint *)(param_1 + 0x98)),
iVar1 == *(int *)(param_1 + 0x98))) {
return 2;
}
local_c = 1;
}
}
return local_c;
}
| |
24,271 | ratio | eloqsql/strings/dtoa.c | static double ratio(Bigint *a, Bigint *b)
{
U da, db;
int k, ka, kb;
dval(&da)= b2d(a, &ka);
dval(&db)= b2d(b, &kb);
k= ka - kb + 32*(a->wds - b->wds);
if (k > 0)
word0(&da)+= (ULong)(k*Exp_msk1 * 1.0);
else
{
k= -k;
word0(&db)+= k*Exp_msk1;
}
return dval(&da) / dval(&db);
} | O0 | c | ratio:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xd1800
movsd %xmm0, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0xd1800
movsd %xmm0, -0x20(%rbp)
movl -0x28(%rbp), %eax
subl -0x2c(%rbp), %eax
movq -0x8(%rbp), %rcx
movl 0x14(%rcx), %ecx
movq -0x10(%rbp), %rdx
subl 0x14(%rdx), %ecx
shll $0x5, %ecx
addl %ecx, %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jle 0xd14a4
movl -0x24(%rbp), %eax
shll $0x14, %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0xd14b8
xorl %eax, %eax
subl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
shll $0x14, %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movsd -0x18(%rbp), %xmm0
divsd -0x20(%rbp), %xmm0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| ratio:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]
lea rsi, [rbp+var_28]
call b2d
movsd [rbp+var_18], xmm0
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_2C]
call b2d
movsd [rbp+var_20], xmm0
mov eax, [rbp+var_28]
sub eax, [rbp+var_2C]
mov rcx, [rbp+var_8]
mov ecx, [rcx+14h]
mov rdx, [rbp+var_10]
sub ecx, [rdx+14h]
shl ecx, 5
add eax, ecx
mov [rbp+var_24], eax
cmp [rbp+var_24], 0
jle short loc_D14A4
mov eax, [rbp+var_24]
shl eax, 14h
add eax, dword ptr [rbp+var_18+4]
mov dword ptr [rbp+var_18+4], eax
jmp short loc_D14B8
loc_D14A4:
xor eax, eax
sub eax, [rbp+var_24]
mov [rbp+var_24], eax
mov eax, [rbp+var_24]
shl eax, 14h
add eax, dword ptr [rbp+var_20+4]
mov dword ptr [rbp+var_20+4], eax
loc_D14B8:
movsd xmm0, [rbp+var_18]
divsd xmm0, [rbp+var_20]
add rsp, 30h
pop rbp
retn
| double ratio(long long a1, long long a2)
{
int v3; // [rsp+4h] [rbp-2Ch] BYREF
int v4; // [rsp+8h] [rbp-28h] BYREF
int v5; // [rsp+Ch] [rbp-24h]
double v6; // [rsp+10h] [rbp-20h]
double v7; // [rsp+18h] [rbp-18h]
long long v8; // [rsp+20h] [rbp-10h]
long long v9; // [rsp+28h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = b2d(a1, &v4);
v6 = b2d(v8, &v3);
v5 = 32 * (*(_DWORD *)(v9 + 20) - *(_DWORD *)(v8 + 20)) + v4 - v3;
if ( v5 <= 0 )
{
v5 = -v5;
HIDWORD(v6) += v5 << 20;
}
else
{
HIDWORD(v7) += v5 << 20;
}
return v7 / v6;
}
| ratio:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[RBP + -0x28]
CALL 0x001d1800
MOVSD qword ptr [RBP + -0x18],XMM0
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x2c]
CALL 0x001d1800
MOVSD qword ptr [RBP + -0x20],XMM0
MOV EAX,dword ptr [RBP + -0x28]
SUB EAX,dword ptr [RBP + -0x2c]
MOV RCX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RCX + 0x14]
MOV RDX,qword ptr [RBP + -0x10]
SUB ECX,dword ptr [RDX + 0x14]
SHL ECX,0x5
ADD EAX,ECX
MOV dword ptr [RBP + -0x24],EAX
CMP dword ptr [RBP + -0x24],0x0
JLE 0x001d14a4
MOV EAX,dword ptr [RBP + -0x24]
SHL EAX,0x14
ADD EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x14],EAX
JMP 0x001d14b8
LAB_001d14a4:
XOR EAX,EAX
SUB EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x24],EAX
MOV EAX,dword ptr [RBP + -0x24]
SHL EAX,0x14
ADD EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x1c],EAX
LAB_001d14b8:
MOVSD XMM0,qword ptr [RBP + -0x18]
DIVSD XMM0,qword ptr [RBP + -0x20]
ADD RSP,0x30
POP RBP
RET
|
double ratio(long param_1,long param_2)
{
int iVar1;
double dVar2;
int local_34;
int local_30 [2];
int8 local_28;
int8 local_20;
long local_18;
long local_10;
local_18 = param_2;
local_10 = param_1;
local_20 = (double)b2d(param_1,local_30);
dVar2 = (double)b2d(local_18,&local_34);
iVar1 = (local_30[0] - local_34) + (*(int *)(local_10 + 0x14) - *(int *)(local_18 + 0x14)) * 0x20;
if (iVar1 < 1) {
local_28._4_4_ = (int)((ulong)dVar2 >> 0x20);
local_28 = (double)CONCAT44(iVar1 * -0x100000 + local_28._4_4_,SUB84(dVar2,0));
}
else {
local_20 = (double)CONCAT44(iVar1 * 0x100000 + local_20._4_4_,(int4)local_20);
local_28 = dVar2;
}
return local_20 / local_28;
}
| |
24,272 | ma_pvio_tls_init | eloqsql/libmariadb/libmariadb/ma_tls.c | MARIADB_TLS *ma_pvio_tls_init(MYSQL *mysql)
{
MARIADB_TLS *ctls= NULL;
if (!ma_tls_initialized)
ma_tls_start(mysql->net.last_error, MYSQL_ERRMSG_SIZE);
if (!(ctls= (MARIADB_TLS *)calloc(1, sizeof(MARIADB_TLS))))
{
return NULL;
}
/* register error routine and methods */
ctls->pvio= mysql->net.pvio;
if (!(ctls->ssl= ma_tls_init(mysql)))
{
free(ctls);
ctls= NULL;
}
return ctls;
} | O0 | c | ma_pvio_tls_init:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
leaq 0x3c1a5(%rip), %rax # 0x603e0
cmpb $0x0, (%rax)
jne 0x24255
movq -0x10(%rbp), %rdi
addq $0x97, %rdi
movl $0x200, %esi # imm = 0x200
callq 0x36840
movl $0x1, %edi
movl $0x18, %esi
callq 0x132c0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x24278
movq $0x0, -0x8(%rbp)
jmp 0x242b7
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rdi
callq 0x369c0
movq -0x18(%rbp), %rcx
movq %rax, 0x10(%rcx)
cmpq $0x0, %rax
jne 0x242af
movq -0x18(%rbp), %rdi
callq 0x13520
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_pvio_tls_init:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], 0
lea rax, ma_tls_initialized
cmp byte ptr [rax], 0
jnz short loc_24255
mov rdi, [rbp+var_10]
add rdi, 97h
mov esi, 200h
call ma_tls_start
loc_24255:
mov edi, 1
mov esi, 18h
call _calloc
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_24278
mov [rbp+var_8], 0
jmp short loc_242B7
loc_24278:
mov rax, [rbp+var_10]
mov rcx, [rax]
mov rax, [rbp+var_18]
mov [rax+8], rcx
mov rdi, [rbp+var_10]
call ma_tls_init
mov rcx, [rbp+var_18]
mov [rcx+10h], rax
cmp rax, 0
jnz short loc_242AF
mov rdi, [rbp+var_18]
call _free
mov [rbp+var_18], 0
loc_242AF:
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
loc_242B7:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| long long ma_pvio_tls_init(_QWORD *a1)
{
long long v1; // rax
long long v3; // [rsp+8h] [rbp-18h]
if ( !ma_tls_initialized )
ma_tls_start((char *)a1 + 151);
v3 = calloc(1LL, 24LL);
if ( !v3 )
return 0LL;
*(_QWORD *)(v3 + 8) = *a1;
v1 = ma_tls_init(a1);
*(_QWORD *)(v3 + 16) = v1;
if ( !v1 )
{
free(v3);
return 0LL;
}
return v3;
}
| ma_pvio_tls_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],0x0
LEA RAX,[0x1603e0]
CMP byte ptr [RAX],0x0
JNZ 0x00124255
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x97
MOV ESI,0x200
CALL 0x00136840
LAB_00124255:
MOV EDI,0x1
MOV ESI,0x18
CALL 0x001132c0
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x00124278
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001242b7
LAB_00124278:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x8],RCX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001369c0
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX + 0x10],RAX
CMP RAX,0x0
JNZ 0x001242af
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00113520
MOV qword ptr [RBP + -0x18],0x0
LAB_001242af:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
LAB_001242b7:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
void * ma_pvio_tls_init(int8 *param_1)
{
long lVar1;
int8 local_20;
int8 local_10;
if (ma_tls_initialized == '\0') {
ma_tls_start((long)param_1 + 0x97,0x200);
}
local_20 = calloc(1,0x18);
if (local_20 == (void *)0x0) {
local_10 = (void *)0x0;
}
else {
*(int8 *)((long)local_20 + 8) = *param_1;
lVar1 = ma_tls_init(param_1);
*(long *)((long)local_20 + 0x10) = lVar1;
if (lVar1 == 0) {
free(local_20);
local_20 = (void *)0x0;
}
local_10 = local_20;
}
return local_10;
}
| |
24,273 | OpenSubdiv::v3_6_0::Bfr::tri::getInteriorRingFacets(int, int, OpenSubdiv::v3_6_0::Bfr::(anonymous namespace)::FacetArray) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/tessellation.cpp | int
tri::getInteriorRingFacets(int edgeRes, int coord0, FacetArray facets) {
//
// Deal with trivial cases with no inner vertices:
//
if (edgeRes < 1) {
return 0;
} else if (edgeRes == 1) {
return appendTri(facets, coord0, coord0+1, coord0+2);
} else if (edgeRes == 2) {
appendTri(facets + 0, coord0+0, coord0+1, coord0+5);
appendTri(facets + 1, coord0+2, coord0+3, coord0+1);
appendTri(facets + 2, coord0+4, coord0+5, coord0+3);
appendTri(facets + 3, coord0+1, coord0+3, coord0+5);
return 4;
}
//
// Generate facets for the 3 tri-strips for each edge:
//
int nFacets = 0;
int outerEdges = edgeRes;
int innerEdges = edgeRes - 3;
int outerRingStart = coord0;
int innerRingStart = coord0 + 3 * outerEdges;
FacetStrip tStrip;
tStrip.quadTopology = false;
tStrip.innerReversed = false;
tStrip.innerEdges = innerEdges;
tStrip.outerEdges = outerEdges;
tStrip.outerFirst = outerRingStart;
tStrip.outerLast = outerRingStart + outerEdges;
tStrip.outerPrev = innerRingStart - 1;
tStrip.innerFirst = innerRingStart;
tStrip.innerLast = innerRingStart + innerEdges;
nFacets += tStrip.connectUniformTris(facets + nFacets);
tStrip.outerFirst += outerEdges;
tStrip.outerLast += outerEdges;
tStrip.outerPrev = tStrip.outerFirst - 1;
tStrip.innerFirst += innerEdges;
tStrip.innerLast += innerEdges;
nFacets += tStrip.connectUniformTris(facets + nFacets);
tStrip.outerFirst += outerEdges;
tStrip.outerLast = outerRingStart;
tStrip.outerPrev = tStrip.outerFirst - 1;
tStrip.innerFirst += innerEdges;
tStrip.innerLast = innerRingStart;
nFacets += tStrip.connectUniformTris(facets + nFacets);
return nFacets;
} | O1 | cpp | OpenSubdiv::v3_6_0::Bfr::tri::getInteriorRingFacets(int, int, OpenSubdiv::v3_6_0::Bfr::(anonymous namespace)::FacetArray):
testl %edi, %edi
jle 0xa1059
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %rbx
movl %esi, %r14d
movl %edi, %r12d
cmpl $0x2, %edi
je 0xa105c
cmpl $0x1, %r12d
jne 0xa10e6
movq (%rbx), %rax
movslq 0x8(%rbx), %rcx
leal 0x1(%r14), %edx
movl $0xffffffff, -0x4(%rax,%rcx,4) # imm = 0xFFFFFFFF
movl %r14d, (%rax)
addl $0x2, %r14d
movl %edx, 0x4(%rax)
movl %r14d, 0x8(%rax)
movl $0x1, %eax
jmp 0xa1208
xorl %eax, %eax
retq
movq (%rbx), %rax
movslq 0x8(%rbx), %rsi
leal 0x1(%r14), %ecx
leal 0x5(%r14), %edx
movl $0xffffffff, %edi # imm = 0xFFFFFFFF
movl %edi, -0x4(%rax,%rsi,4)
movl %r14d, (%rax)
movl %ecx, 0x4(%rax)
movl %edx, 0x8(%rax)
movslq 0xc(%rbx), %rsi
leaq (%rax,%rsi,4), %rsi
movslq 0x8(%rbx), %r8
leal 0x2(%r14), %r9d
leal 0x3(%r14), %r10d
movl %edi, -0x4(%rsi,%r8,4)
movl %r9d, (%rsi)
movl %r10d, 0x4(%rsi)
movl %ecx, 0x8(%rsi)
movslq 0xc(%rbx), %rsi
leaq (%rax,%rsi,8), %rsi
movslq 0x8(%rbx), %r8
addl $0x4, %r14d
movl %edi, -0x4(%rsi,%r8,4)
movl %r14d, (%rsi)
movl %edx, 0x4(%rsi)
movl %r10d, 0x8(%rsi)
movslq 0xc(%rbx), %rsi
leaq (%rsi,%rsi,2), %rsi
leaq (%rax,%rsi,4), %rax
movslq 0x8(%rbx), %rsi
movl %edi, -0x4(%rax,%rsi,4)
movl %ecx, (%rax)
movl %r10d, 0x4(%rax)
movl %edx, 0x8(%rax)
movl $0x4, %eax
jmp 0xa1208
leal -0x3(%r12), %eax
leal (%r12,%r12,2), %ebp
xorps %xmm0, %xmm0
leaq 0x50(%rsp), %r15
movaps %xmm0, (%r15)
movaps %xmm0, 0x10(%r15)
movl %eax, 0x8(%r15)
movl %r12d, 0x4(%r15)
movl %r14d, 0xc(%r15)
leal (%r14,%r12), %eax
movq %rax, 0x10(%rsp)
movl %eax, 0x10(%r15)
leal (%r14,%rbp), %eax
decl %eax
addl %r14d, %ebp
movq %rbp, 0x18(%rsp)
movl %eax, 0x14(%r15)
movl %ebp, 0x18(%r15)
leal (%r12,%rbp), %r13d
addl $-0x3, %r13d
movl %r13d, 0x1c(%r15)
movups (%rbx), %xmm0
leaq 0x40(%rsp), %rsi
movups %xmm0, (%rsi)
movq %r15, %rdi
callq 0xa1218
movl %eax, 0x8(%rsp)
movq 0x10(%rsp), %rcx
movl %ecx, 0xc(%r15)
movl %r12d, %ebp
addl %ecx, %ebp
movl %ebp, 0x10(%r15)
leal (%r14,%r12), %ecx
decl %ecx
movl %ecx, 0x14(%r15)
movl %r13d, 0x18(%r15)
leal -0x3(%r12,%r13), %ecx
movl %ecx, 0xc(%rsp)
movl %ecx, 0x1c(%r15)
movl 0x8(%rbx), %edi
movl 0xc(%rbx), %ecx
movl %ecx, %edx
imull %eax, %edx
movslq %edx, %rdx
shlq $0x2, %rdx
addq (%rbx), %rdx
leaq 0x30(%rsp), %rsi
movq %rdx, (%rsi)
movl %edi, 0x8(%rsi)
movl %ecx, 0xc(%rsi)
movq %r15, %rdi
callq 0xa1218
movl %eax, %r13d
addl 0x8(%rsp), %r13d
movl %ebp, 0xc(%r15)
movl %r14d, 0x10(%r15)
movq 0x10(%rsp), %rax
addl %r12d, %eax
decl %eax
movl %eax, 0x14(%r15)
movl 0xc(%rsp), %eax
movl %eax, 0x18(%r15)
movq 0x18(%rsp), %rax
movl %eax, 0x1c(%r15)
movl 0x8(%rbx), %eax
movl 0xc(%rbx), %ecx
movl %ecx, %edx
imull %r13d, %edx
movslq %edx, %rdx
shlq $0x2, %rdx
addq (%rbx), %rdx
leaq 0x20(%rsp), %rsi
movq %rdx, (%rsi)
movl %eax, 0x8(%rsi)
movl %ecx, 0xc(%rsi)
movq %r15, %rdi
callq 0xa1218
addl %r13d, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN10OpenSubdiv6v3_6_03Bfr3tri21getInteriorRingFacetsEiiNS1_12_GLOBAL__N_110FacetArrayE:
test edi, edi
jle short loc_A1059
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov rbx, rdx
mov r14d, esi
mov r12d, edi
cmp edi, 2
jz short loc_A105C
cmp r12d, 1
jnz loc_A10E6
mov rax, [rbx]
movsxd rcx, dword ptr [rbx+8]
lea edx, [r14+1]
mov dword ptr [rax+rcx*4-4], 0FFFFFFFFh
mov [rax], r14d
add r14d, 2
mov [rax+4], edx
mov [rax+8], r14d
mov eax, 1
jmp loc_A1208
loc_A1059:
xor eax, eax
retn
loc_A105C:
mov rax, [rbx]
movsxd rsi, dword ptr [rbx+8]
lea ecx, [r14+1]
lea edx, [r14+5]
mov edi, 0FFFFFFFFh
mov [rax+rsi*4-4], edi
mov [rax], r14d
mov [rax+4], ecx
mov [rax+8], edx
movsxd rsi, dword ptr [rbx+0Ch]
lea rsi, [rax+rsi*4]
movsxd r8, dword ptr [rbx+8]
lea r9d, [r14+2]
lea r10d, [r14+3]
mov [rsi+r8*4-4], edi
mov [rsi], r9d
mov [rsi+4], r10d
mov [rsi+8], ecx
movsxd rsi, dword ptr [rbx+0Ch]
lea rsi, [rax+rsi*8]
movsxd r8, dword ptr [rbx+8]
add r14d, 4
mov [rsi+r8*4-4], edi
mov [rsi], r14d
mov [rsi+4], edx
mov [rsi+8], r10d
movsxd rsi, dword ptr [rbx+0Ch]
lea rsi, [rsi+rsi*2]
lea rax, [rax+rsi*4]
movsxd rsi, dword ptr [rbx+8]
mov [rax+rsi*4-4], edi
mov [rax], ecx
mov [rax+4], r10d
mov [rax+8], edx
mov eax, 4
jmp loc_A1208
loc_A10E6:
lea eax, [r12-3]
lea ebp, [r12+r12*2]
xorps xmm0, xmm0
lea r15, [rsp+0A8h+var_58]
movaps xmmword ptr [r15], xmm0
movaps xmmword ptr [r15+10h], xmm0
mov [r15+8], eax
mov [r15+4], r12d
mov [r15+0Ch], r14d
lea eax, [r14+r12]
mov [rsp+0A8h+var_98], rax
mov [r15+10h], eax
lea eax, [r14+rbp]
dec eax
add ebp, r14d
mov [rsp+0A8h+var_90], rbp
mov [r15+14h], eax
mov [r15+18h], ebp
lea r13d, [r12+rbp]
add r13d, 0FFFFFFFDh
mov [r15+1Ch], r13d
movups xmm0, xmmword ptr [rbx]
lea rsi, [rsp+0A8h+var_68]
movups xmmword ptr [rsi], xmm0
mov rdi, r15
call _ZNK10OpenSubdiv6v3_6_03Bfr12_GLOBAL__N_110FacetStrip18connectUniformTrisENS2_10FacetArrayE; OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::FacetStrip::connectUniformTris(OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::FacetArray)
mov [rsp+0A8h+var_A0], eax
mov rcx, [rsp+0A8h+var_98]
mov [r15+0Ch], ecx
mov ebp, r12d
add ebp, ecx
mov [r15+10h], ebp
lea ecx, [r14+r12]
dec ecx
mov [r15+14h], ecx
mov [r15+18h], r13d
lea ecx, [r12+r13-3]
mov [rsp+0A8h+var_9C], ecx
mov [r15+1Ch], ecx
mov edi, [rbx+8]
mov ecx, [rbx+0Ch]
mov edx, ecx
imul edx, eax
movsxd rdx, edx
shl rdx, 2
add rdx, [rbx]
lea rsi, [rsp+0A8h+var_78]
mov [rsi], rdx
mov [rsi+8], edi
mov [rsi+0Ch], ecx
mov rdi, r15
call _ZNK10OpenSubdiv6v3_6_03Bfr12_GLOBAL__N_110FacetStrip18connectUniformTrisENS2_10FacetArrayE; OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::FacetStrip::connectUniformTris(OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::FacetArray)
mov r13d, eax
add r13d, [rsp+0A8h+var_A0]
mov [r15+0Ch], ebp
mov [r15+10h], r14d
mov rax, [rsp+0A8h+var_98]
add eax, r12d
dec eax
mov [r15+14h], eax
mov eax, [rsp+0A8h+var_9C]
mov [r15+18h], eax
mov rax, [rsp+0A8h+var_90]
mov [r15+1Ch], eax
mov eax, [rbx+8]
mov ecx, [rbx+0Ch]
mov edx, ecx
imul edx, r13d
movsxd rdx, edx
shl rdx, 2
add rdx, [rbx]
lea rsi, [rsp+0A8h+var_88]
mov [rsi], rdx
mov [rsi+8], eax
mov [rsi+0Ch], ecx
mov rdi, r15
call _ZNK10OpenSubdiv6v3_6_03Bfr12_GLOBAL__N_110FacetStrip18connectUniformTrisENS2_10FacetArrayE; OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::FacetStrip::connectUniformTris(OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::FacetArray)
add eax, r13d
loc_A1208:
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Bfr::tri::getInteriorRingFacets(int a1, int a2, long long a3)
{
int *v4; // rax
int *v6; // rax
int *v7; // rsi
int *v8; // rsi
int *v9; // rax
int v10; // r13d
int v11; // r13d
int v12; // [rsp+0h] [rbp-A0h]
int v13; // [rsp+4h] [rbp-9Ch]
_DWORD v14[3]; // [rsp+48h] [rbp-58h] BYREF
int v15; // [rsp+54h] [rbp-4Ch]
int v16; // [rsp+58h] [rbp-48h]
int v17; // [rsp+5Ch] [rbp-44h]
int v18; // [rsp+60h] [rbp-40h]
int v19; // [rsp+64h] [rbp-3Ch]
if ( a1 <= 0 )
return 0LL;
if ( a1 == 2 )
{
v6 = *(int **)a3;
v6[*(int *)(a3 + 8) - 1] = -1;
*v6 = a2;
v6[1] = a2 + 1;
v6[2] = a2 + 5;
v7 = &v6[*(int *)(a3 + 12)];
v7[*(int *)(a3 + 8) - 1] = -1;
*v7 = a2 + 2;
v7[1] = a2 + 3;
v7[2] = a2 + 1;
v8 = &v6[2 * *(int *)(a3 + 12)];
v8[*(int *)(a3 + 8) - 1] = -1;
*v8 = a2 + 4;
v8[1] = a2 + 5;
v8[2] = a2 + 3;
v9 = &v6[3 * *(int *)(a3 + 12)];
v9[*(int *)(a3 + 8) - 1] = -1;
*v9 = a2 + 1;
v9[1] = a2 + 3;
v9[2] = a2 + 5;
return 4LL;
}
else if ( a1 == 1 )
{
v4 = *(int **)a3;
v4[*(int *)(a3 + 8) - 1] = -1;
*v4 = a2;
v4[1] = a2 + 1;
v4[2] = a2 + 2;
return 1LL;
}
else
{
v14[0] = 0;
v14[2] = a1 - 3;
v14[1] = a1;
v15 = a2;
v16 = a2 + a1;
v17 = a2 + 3 * a1 - 1;
v18 = a2 + 3 * a1;
v10 = a1 + v18 - 3;
v19 = v10;
v12 = OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::FacetStrip::connectUniformTris(v14);
v15 = a2 + a1;
v16 = a2 + a1 + a1;
v17 = a2 + a1 - 1;
v18 = v10;
v13 = a1 + v10 - 3;
v19 = v13;
v11 = v12 + OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::FacetStrip::connectUniformTris(v14);
v15 = a2 + a1 + a1;
v16 = a2;
v17 = v15 - 1;
v18 = v13;
v19 = a2 + 3 * a1;
return v11 + (unsigned int)OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::FacetStrip::connectUniformTris(v14);
}
}
| getInteriorRingFacets:
TEST EDI,EDI
JLE 0x001a1059
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV RBX,RDX
MOV R14D,ESI
MOV R12D,EDI
CMP EDI,0x2
JZ 0x001a105c
CMP R12D,0x1
JNZ 0x001a10e6
MOV RAX,qword ptr [RBX]
MOVSXD RCX,dword ptr [RBX + 0x8]
LEA EDX,[R14 + 0x1]
MOV dword ptr [RAX + RCX*0x4 + -0x4],0xffffffff
MOV dword ptr [RAX],R14D
ADD R14D,0x2
MOV dword ptr [RAX + 0x4],EDX
MOV dword ptr [RAX + 0x8],R14D
MOV EAX,0x1
JMP 0x001a1208
LAB_001a1059:
XOR EAX,EAX
RET
LAB_001a105c:
MOV RAX,qword ptr [RBX]
MOVSXD RSI,dword ptr [RBX + 0x8]
LEA ECX,[R14 + 0x1]
LEA EDX,[R14 + 0x5]
MOV EDI,0xffffffff
MOV dword ptr [RAX + RSI*0x4 + -0x4],EDI
MOV dword ptr [RAX],R14D
MOV dword ptr [RAX + 0x4],ECX
MOV dword ptr [RAX + 0x8],EDX
MOVSXD RSI,dword ptr [RBX + 0xc]
LEA RSI,[RAX + RSI*0x4]
MOVSXD R8,dword ptr [RBX + 0x8]
LEA R9D,[R14 + 0x2]
LEA R10D,[R14 + 0x3]
MOV dword ptr [RSI + R8*0x4 + -0x4],EDI
MOV dword ptr [RSI],R9D
MOV dword ptr [RSI + 0x4],R10D
MOV dword ptr [RSI + 0x8],ECX
MOVSXD RSI,dword ptr [RBX + 0xc]
LEA RSI,[RAX + RSI*0x8]
MOVSXD R8,dword ptr [RBX + 0x8]
ADD R14D,0x4
MOV dword ptr [RSI + R8*0x4 + -0x4],EDI
MOV dword ptr [RSI],R14D
MOV dword ptr [RSI + 0x4],EDX
MOV dword ptr [RSI + 0x8],R10D
MOVSXD RSI,dword ptr [RBX + 0xc]
LEA RSI,[RSI + RSI*0x2]
LEA RAX,[RAX + RSI*0x4]
MOVSXD RSI,dword ptr [RBX + 0x8]
MOV dword ptr [RAX + RSI*0x4 + -0x4],EDI
MOV dword ptr [RAX],ECX
MOV dword ptr [RAX + 0x4],R10D
MOV dword ptr [RAX + 0x8],EDX
MOV EAX,0x4
JMP 0x001a1208
LAB_001a10e6:
LEA EAX,[R12 + -0x3]
LEA EBP,[R12 + R12*0x2]
XORPS XMM0,XMM0
LEA R15,[RSP + 0x50]
MOVAPS xmmword ptr [R15],XMM0
MOVAPS xmmword ptr [R15 + 0x10],XMM0
MOV dword ptr [R15 + 0x8],EAX
MOV dword ptr [R15 + 0x4],R12D
MOV dword ptr [R15 + 0xc],R14D
LEA EAX,[R14 + R12*0x1]
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [R15 + 0x10],EAX
LEA EAX,[R14 + RBP*0x1]
DEC EAX
ADD EBP,R14D
MOV qword ptr [RSP + 0x18],RBP
MOV dword ptr [R15 + 0x14],EAX
MOV dword ptr [R15 + 0x18],EBP
LEA R13D,[R12 + RBP*0x1]
ADD R13D,-0x3
MOV dword ptr [R15 + 0x1c],R13D
MOVUPS XMM0,xmmword ptr [RBX]
LEA RSI,[RSP + 0x40]
MOVUPS xmmword ptr [RSI],XMM0
MOV RDI,R15
CALL 0x001a1218
MOV dword ptr [RSP + 0x8],EAX
MOV RCX,qword ptr [RSP + 0x10]
MOV dword ptr [R15 + 0xc],ECX
MOV EBP,R12D
ADD EBP,ECX
MOV dword ptr [R15 + 0x10],EBP
LEA ECX,[R14 + R12*0x1]
DEC ECX
MOV dword ptr [R15 + 0x14],ECX
MOV dword ptr [R15 + 0x18],R13D
LEA ECX,[R12 + R13*0x1 + -0x3]
MOV dword ptr [RSP + 0xc],ECX
MOV dword ptr [R15 + 0x1c],ECX
MOV EDI,dword ptr [RBX + 0x8]
MOV ECX,dword ptr [RBX + 0xc]
MOV EDX,ECX
IMUL EDX,EAX
MOVSXD RDX,EDX
SHL RDX,0x2
ADD RDX,qword ptr [RBX]
LEA RSI,[RSP + 0x30]
MOV qword ptr [RSI],RDX
MOV dword ptr [RSI + 0x8],EDI
MOV dword ptr [RSI + 0xc],ECX
MOV RDI,R15
CALL 0x001a1218
MOV R13D,EAX
ADD R13D,dword ptr [RSP + 0x8]
MOV dword ptr [R15 + 0xc],EBP
MOV dword ptr [R15 + 0x10],R14D
MOV RAX,qword ptr [RSP + 0x10]
ADD EAX,R12D
DEC EAX
MOV dword ptr [R15 + 0x14],EAX
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [R15 + 0x18],EAX
MOV RAX,qword ptr [RSP + 0x18]
MOV dword ptr [R15 + 0x1c],EAX
MOV EAX,dword ptr [RBX + 0x8]
MOV ECX,dword ptr [RBX + 0xc]
MOV EDX,ECX
IMUL EDX,R13D
MOVSXD RDX,EDX
SHL RDX,0x2
ADD RDX,qword ptr [RBX]
LEA RSI,[RSP + 0x20]
MOV qword ptr [RSI],RDX
MOV dword ptr [RSI + 0x8],EAX
MOV dword ptr [RSI + 0xc],ECX
MOV RDI,R15
CALL 0x001a1218
ADD EAX,R13D
LAB_001a1208:
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Bfr::tri::getInteriorRingFacets(int, int, OpenSubdiv::v3_6_0::Bfr::(anonymous
namespace)::FacetArray) */
int OpenSubdiv::v3_6_0::Bfr::tri::getInteriorRingFacets(uint param_1,int param_2,long *param_3)
{
int *piVar1;
int *piVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
long local_58;
int iStack_50;
int iStack_4c;
int local_48;
int iStack_44;
int iStack_40;
int iStack_3c;
if (0 < (int)param_1) {
if (param_1 == 2) {
piVar2 = (int *)*param_3;
iVar3 = param_2 + 1;
iVar4 = param_2 + 5;
piVar2[(long)(int)param_3[1] + -1] = -1;
*piVar2 = param_2;
piVar2[1] = iVar3;
piVar2[2] = iVar4;
piVar1 = piVar2 + *(int *)((long)param_3 + 0xc);
iVar7 = param_2 + 3;
piVar1[(long)(int)param_3[1] + -1] = -1;
*piVar1 = param_2 + 2;
piVar1[1] = iVar7;
piVar1[2] = iVar3;
piVar1 = piVar2 + (long)*(int *)((long)param_3 + 0xc) * 2;
piVar1[(long)(int)param_3[1] + -1] = -1;
*piVar1 = param_2 + 4;
piVar1[1] = iVar4;
piVar1[2] = iVar7;
piVar2 = piVar2 + (long)*(int *)((long)param_3 + 0xc) * 3;
piVar2[(long)(int)param_3[1] + -1] = -1;
*piVar2 = iVar3;
piVar2[1] = iVar7;
piVar2[2] = iVar4;
iVar3 = 4;
}
else if (param_1 == 1) {
piVar1 = (int *)*param_3;
piVar1[(long)(int)param_3[1] + -1] = -1;
*piVar1 = param_2;
piVar1[1] = param_2 + 1;
piVar1[2] = param_2 + 2;
iVar3 = 1;
}
else {
local_58 = (ulong)param_1 << 0x20;
_iStack_50 = CONCAT44(param_2,param_1 - 3);
iVar3 = param_2 + param_1;
iVar6 = param_1 * 3 + param_2;
_local_48 = CONCAT44(param_2 + param_1 * 3 + -1,iVar3);
iVar7 = param_1 + iVar6 + -3;
_iStack_40 = CONCAT44(iVar7,iVar6);
iVar4 = (anonymous_namespace)::FacetStrip::connectUniformTris((FacetStrip *)&local_58);
_iStack_50 = CONCAT44(iVar3,iStack_50);
_local_48 = CONCAT44(param_2 + param_1 + -1,param_1 + iVar3);
iVar5 = (param_1 - 3) + iVar7;
_iStack_40 = CONCAT44(iVar5,iVar7);
iVar7 = (anonymous_namespace)::FacetStrip::connectUniformTris((FacetStrip *)&local_58);
_iStack_50 = CONCAT44(param_1 + iVar3,iStack_50);
_local_48 = CONCAT44(iVar3 + param_1 + -1,param_2);
_iStack_40 = CONCAT44(iVar6,iVar5);
iVar3 = (anonymous_namespace)::FacetStrip::connectUniformTris((FacetStrip *)&local_58);
iVar3 = iVar3 + iVar7 + iVar4;
}
return iVar3;
}
return 0;
}
| |
24,274 | read_pack_length | eloqsql/storage/myisam/mi_packrec.c | static uint read_pack_length(uint version, const uchar *buf, ulong *length)
{
if (buf[0] < 254)
{
*length= buf[0];
return 1;
}
else if (buf[0] == 254)
{
*length= uint2korr(buf + 1);
return 3;
}
if (version == 1) /* old format */
{
*length= uint3korr(buf + 1);
return 4;
}
else
{
*length= uint4korr(buf + 1);
return 5;
}
} | O0 | c | read_pack_length:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xfe, %eax
jge 0xbbbc6
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0xbbc43
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xfe, %eax
jne 0xbbbee
movq -0x10(%rbp), %rax
movzwl 0x1(%rax), %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x3, -0x4(%rbp)
jmp 0xbbc43
jmp 0xbbbf0
cmpl $0x1, -0x8(%rbp)
jne 0xbbc2c
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
movq -0x10(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x10(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x4, -0x4(%rbp)
jmp 0xbbc43
movq -0x10(%rbp), %rax
movl 0x1(%rax), %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x5, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
| read_pack_length_0:
push rbp
mov rbp, rsp
mov [rbp+var_8], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
cmp eax, 0FEh
jge short loc_BBBC6
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 1
jmp short loc_BBC43
loc_BBBC6:
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
cmp eax, 0FEh
jnz short loc_BBBEE
mov rax, [rbp+var_10]
movzx eax, word ptr [rax+1]
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 3
jmp short loc_BBC43
loc_BBBEE:
jmp short $+2
loc_BBBF0:
cmp [rbp+var_8], 1
jnz short loc_BBC2C
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx+2]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx+3]
shl ecx, 10h
or eax, ecx
mov eax, eax
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 4
jmp short loc_BBC43
loc_BBC2C:
mov rax, [rbp+var_10]
mov eax, [rax+1]
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 5
loc_BBC43:
mov eax, [rbp+var_4]
pop rbp
retn
| long long read_pack_length_0(int a1, unsigned __int8 *a2, _QWORD *a3)
{
if ( *a2 >= 0xFEu )
{
if ( *a2 == 254 )
{
*a3 = *(unsigned __int16 *)(a2 + 1);
return 3;
}
else if ( a1 == 1 )
{
*a3 = (a2[3] << 16) | (unsigned int)*(unsigned __int16 *)(a2 + 1);
return 4;
}
else
{
*a3 = *(unsigned int *)(a2 + 1);
return 5;
}
}
else
{
*a3 = *a2;
return 1;
}
}
| read_pack_length:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x8],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xfe
JGE 0x001bbbc6
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001bbc43
LAB_001bbbc6:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xfe
JNZ 0x001bbbee
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX + 0x1]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x3
JMP 0x001bbc43
LAB_001bbbee:
JMP 0x001bbbf0
LAB_001bbbf0:
CMP dword ptr [RBP + -0x8],0x1
JNZ 0x001bbc2c
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX + 0x3]
SHL ECX,0x10
OR EAX,ECX
MOV EAX,EAX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x4
JMP 0x001bbc43
LAB_001bbc2c:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x1]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x5
LAB_001bbc43:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 read_pack_length(int param_1,byte *param_2,ulong *param_3)
{
int4 local_c;
if (*param_2 < 0xfe) {
*param_3 = (ulong)*param_2;
local_c = 1;
}
else if (*param_2 == 0xfe) {
*param_3 = (ulong)*(ushort *)(param_2 + 1);
local_c = 3;
}
else if (param_1 == 1) {
*param_3 = (ulong)*(uint3 *)(param_2 + 1);
local_c = 4;
}
else {
*param_3 = (ulong)*(uint *)(param_2 + 1);
local_c = 5;
}
return local_c;
}
| |
24,275 | nglog::LogMessage::RecordCrashReason(nglog::internal::CrashReason*) | ng-log[P]ng-log/src/logging.cc | void LogMessage::RecordCrashReason(internal::CrashReason* reason) {
reason->filename = fatal_msg_data_exclusive.fullname_;
reason->line_number = fatal_msg_data_exclusive.line_;
reason->message = fatal_msg_data_exclusive.message_text_ +
fatal_msg_data_exclusive.num_prefix_chars_;
#ifdef HAVE_STACKTRACE
// Retrieve the stack trace, omitting the logging frames that got us here.
reason->depth = GetStackTrace(reason->stack, ARRAYSIZE(reason->stack), 4);
#else
reason->depth = 0;
#endif
} | O3 | cpp | nglog::LogMessage::RecordCrashReason(nglog::internal::CrashReason*):
pushq %rbx
movq %rsi, %rbx
leaq 0x256c9(%rip), %rax # 0x30d80
movq 0x2cd9a(%rip), %rcx # 0x38458
movq %rcx, (%rsi)
movl 0x2cd55(%rip), %ecx # 0x3841c
movl %ecx, 0x8(%rsi)
movq 0x2cd67(%rip), %rcx # 0x38438
leaq 0x4(%rcx,%rax), %rax
movq %rax, 0x10(%rsi)
leaq 0x18(%rsi), %rdi
movl $0x20, %esi
movl $0x4, %edx
callq 0x20bf0
movl %eax, 0x118(%rbx)
popq %rbx
retq
nop
| _ZN5nglog10LogMessage17RecordCrashReasonEPNS_8internal11CrashReasonE:
push rbx
mov rbx, rsi
lea rax, _ZN5nglogL24fatal_msg_data_exclusiveE; nglog::fatal_msg_data_exclusive
mov rcx, cs:qword_38458
mov [rsi], rcx
mov ecx, cs:dword_3841C
mov [rsi+8], ecx
mov rcx, cs:qword_38438; int
lea rax, [rcx+rax+4]
mov [rsi+10h], rax
lea rdi, [rsi+18h]; this
mov esi, offset qword_20; void **
mov edx, 4; int
call _ZN5nglog5tools13GetStackTraceEPPvii; nglog::tools::GetStackTrace(void **,int,int)
mov [rbx+118h], eax
pop rbx
retn
| long long nglog::LogMessage::RecordCrashReason(long long a1, long long a2)
{
int v2; // ecx
long long result; // rax
*(_QWORD *)a2 = qword_38458;
*(_DWORD *)(a2 + 8) = dword_3841C;
v2 = qword_38438[0];
*(_QWORD *)(a2 + 16) = (char *)&nglog::fatal_msg_data_exclusive + *(_QWORD *)qword_38438 + 4;
result = nglog::tools::GetStackTrace((nglog::tools *)(a2 + 24), (void **)&qword_20, 4, v2);
*(_DWORD *)(a2 + 280) = result;
return result;
}
| RecordCrashReason:
PUSH RBX
MOV RBX,RSI
LEA RAX,[0x130d80]
MOV RCX,qword ptr [0x00138458]
MOV qword ptr [RSI],RCX
MOV ECX,dword ptr [0x0013841c]
MOV dword ptr [RSI + 0x8],ECX
MOV RCX,qword ptr [0x00138438]
LEA RAX,[RCX + RAX*0x1 + 0x4]
MOV qword ptr [RSI + 0x10],RAX
LEA RDI,[RSI + 0x18]
MOV ESI,0x20
MOV EDX,0x4
CALL 0x00120bf0
MOV dword ptr [RBX + 0x118],EAX
POP RBX
RET
|
/* nglog::LogMessage::RecordCrashReason(nglog::internal::CrashReason*) */
void __thiscall nglog::LogMessage::RecordCrashReason(LogMessage *this,CrashReason *param_1)
{
int4 uVar1;
*(int8 *)param_1 = fatal_msg_data_exclusive._30424_8_;
*(int4 *)(param_1 + 8) = fatal_msg_data_exclusive._30364_4_;
*(long *)(param_1 + 0x10) = fatal_msg_data_exclusive._30392_8_ + 0x130d84;
uVar1 = tools::GetStackTrace((void **)(param_1 + 0x18),0x20,4);
*(int4 *)(param_1 + 0x118) = uVar1;
return;
}
| |
24,276 | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> 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>::erase<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, 0>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>) | monkey531[P]llama/common/json.hpp | IteratorType erase(IteratorType pos)
{
// make sure iterator fits the current value
if (JSON_HEDLEY_UNLIKELY(this != pos.m_object))
{
JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", this));
}
IteratorType result = end();
switch (m_data.m_type)
{
case value_t::boolean:
case value_t::number_float:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::string:
case value_t::binary:
{
if (JSON_HEDLEY_UNLIKELY(!pos.m_it.primitive_iterator.is_begin()))
{
JSON_THROW(invalid_iterator::create(205, "iterator out of range", this));
}
if (is_string())
{
AllocatorType<string_t> alloc;
std::allocator_traits<decltype(alloc)>::destroy(alloc, m_data.m_value.string);
std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_data.m_value.string, 1);
m_data.m_value.string = nullptr;
}
else if (is_binary())
{
AllocatorType<binary_t> alloc;
std::allocator_traits<decltype(alloc)>::destroy(alloc, m_data.m_value.binary);
std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_data.m_value.binary, 1);
m_data.m_value.binary = nullptr;
}
m_data.m_type = value_t::null;
assert_invariant();
break;
}
case value_t::object:
{
result.m_it.object_iterator = m_data.m_value.object->erase(pos.m_it.object_iterator);
break;
}
case value_t::array:
{
result.m_it.array_iterator = m_data.m_value.array->erase(pos.m_it.array_iterator);
break;
}
case value_t::null:
case value_t::discarded:
default:
JSON_THROW(type_error::create(307, detail::concat("cannot use erase() with ", type_name()), this));
}
return result;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> 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>::erase<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, 0>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
cmpq %rsi, (%rdx)
jne 0x5d7b5
movq %rdx, %r15
movq %rdi, %rbx
movq %r14, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x18(%rdi)
callq 0x5e70e
movzbl (%r14), %eax
leal -0x3(%rax), %ecx
cmpl $0x6, %ecx
jae 0x5d722
cmpq $0x0, 0x18(%r15)
jne 0x5d818
cmpl $0x8, %eax
je 0x5d743
cmpl $0x3, %eax
jne 0x5d776
leaq 0x8(%r14), %r15
movq 0x8(%r14), %rdi
movq (%rdi), %rax
leaq 0x10(%rdi), %rcx
cmpq %rcx, %rax
je 0x5d71b
movq (%rcx), %rsi
incq %rsi
movq %rax, %rdi
callq 0x1a8f0
movq (%r15), %rdi
movl $0x20, %esi
jmp 0x5d76a
cmpl $0x1, %eax
je 0x5d797
cmpl $0x2, %eax
jne 0x5d878
movq 0x8(%r14), %rdi
movq 0x10(%r15), %rsi
callq 0x5ee46
movq %rax, 0x10(%rbx)
jmp 0x5d787
leaq 0x8(%r14), %r15
movq 0x8(%r14), %rdi
movq (%rdi), %rax
testq %rax, %rax
je 0x5d765
movq 0x10(%rdi), %rsi
subq %rax, %rsi
movq %rax, %rdi
callq 0x1a8f0
movq (%r15), %rdi
movl $0x28, %esi
callq 0x1a8f0
movq $0x0, (%r15)
movb $0x0, (%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x58484
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %r12
addq $0x8, %r12
movq 0x8(%r14), %rdi
movq 0x8(%r15), %rsi
leaq 0x30(%rsi), %rdx
callq 0x5e9ec
movq %rax, (%r12)
jmp 0x5d787
movl $0x20, %edi
callq 0x1a460
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x8f6c4(%rip), %rsi # 0xece96
leaq 0x8f6e0(%rip), %rdx # 0xeceb9
leaq 0x8(%rsp), %rdi
callq 0x21af4
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0xca, %esi
movq %r14, %rcx
callq 0x5e50c
xorl %ebp, %ebp
leaq 0xcc714(%rip), %rsi # 0x129f18
leaq -0x2c09(%rip), %rdx # 0x5ac02
movq %rbx, %rdi
callq 0x1af30
jmp 0x5d8d6
movl $0x20, %edi
callq 0x1a460
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x8f685(%rip), %rsi # 0xeceba
leaq 0x8f693(%rip), %rdx # 0xececf
leaq 0x8(%rsp), %rdi
callq 0x21af4
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0xcd, %esi
movq %r14, %rcx
callq 0x5e50c
xorl %ebp, %ebp
leaq 0xcc6b1(%rip), %rsi # 0x129f18
leaq -0x2c6c(%rip), %rdx # 0x5ac02
movq %rbx, %rdi
callq 0x1af30
jmp 0x5d8d6
movl $0x20, %edi
callq 0x1a460
movq %rax, %rbx
movq %r14, %rdi
callq 0x5e9cc
leaq 0x28(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x8f634(%rip), %rsi # 0xeced0
leaq 0x8(%rsp), %rdi
callq 0x5e943
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x133, %esi # imm = 0x133
movq %r14, %rcx
callq 0x5e774
xorl %ebp, %ebp
leaq 0xcc691(%rip), %rsi # 0x129f58
leaq -0x2ccc(%rip), %rdx # 0x5ac02
movq %rbx, %rdi
callq 0x1af30
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x5d8fc
jmp 0x5d909
jmp 0x5d910
jmp 0x5d8ef
jmp 0x5d910
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x5d909
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8f0
testb %bpl, %bpl
jne 0x5d913
jmp 0x5d91b
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a690
movq %r14, %rdi
callq 0x1afd0
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_:
push rbp; int
push r15; int
push r14; char
push r12; int
push rbx; __int64
sub rsp, 30h
mov r14, rsi
cmp [rdx], rsi
jnz loc_5D7B5
mov r15, rdx
mov rbx, rdi
mov [rdi], r14
xorps xmm0, xmm0
movups xmmword ptr [rdi+8], xmm0
mov rax, 8000000000000000h
mov [rdi+18h], rax
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE7set_endEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::set_end(void)
movzx eax, byte ptr [r14]
lea ecx, [rax-3]
cmp ecx, 6
jnb short loc_5D722
cmp qword ptr [r15+18h], 0
jnz loc_5D818
cmp eax, 8
jz short loc_5D743
cmp eax, 3
jnz loc_5D776
lea r15, [r14+8]
mov rdi, [r14+8]
mov rax, [rdi]
lea rcx, [rdi+10h]
cmp rax, rcx
jz short loc_5D71B
mov rsi, [rcx]
inc rsi; unsigned __int64
mov rdi, rax; void *
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, [r15]
loc_5D71B:
mov esi, 20h ; ' '
jmp short loc_5D76A
loc_5D722:
cmp eax, 1
jz short loc_5D797
cmp eax, 2
jnz loc_5D878
mov rdi, [r14+8]
mov rsi, [r15+10h]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE8_M_eraseEN9__gnu_cxx17__normal_iteratorIPSD_SF_EE; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::_M_erase(__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>*,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>)
mov [rbx+10h], rax
jmp short loc_5D787
loc_5D743:
lea r15, [r14+8]
mov rdi, [r14+8]
mov rax, [rdi]
test rax, rax
jz short loc_5D765
mov rsi, [rdi+10h]
sub rsi, rax; unsigned __int64
mov rdi, rax; void *
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, [r15]; void *
loc_5D765:
mov esi, 28h ; '('; unsigned __int64
loc_5D76A:
call __ZdlPvm; operator delete(void *,ulong)
mov qword ptr [r15], 0
loc_5D776:
mov byte ptr [r14], 0
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
loc_5D787:
mov rax, rbx
add rsp, 30h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_5D797:
mov r12, rbx
add r12, 8
mov rdi, [r14+8]
mov rsi, [r15+8]
lea rdx, [rsi+30h]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEESP_; 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>>>>::erase(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>*,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>,__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>*,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>)
mov [r12], rax
jmp short loc_5D787
loc_5D7B5:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r15, [rsp+58h+var_40]
mov [r15-10h], r15
lea rsi, aIteratorDoesNo; "iterator does not fit current value"
lea rdx, aIteratorDoesNo+23h; ""
lea rdi, [rsp+58h+var_50]
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 bpl, 1
lea rdx, [rsp+58h+var_50]
mov rdi, rbx; this
mov esi, 0CAh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp loc_5D8D6
loc_5D818:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r15, [rsp+58h+var_40]
mov [r15-10h], r15
lea rsi, aIteratorOutOfR; "iterator out of range"
lea rdx, aIteratorOutOfR+15h; ""
lea rdi, [rsp+58h+var_50]
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 bpl, 1
lea rdx, [rsp+58h+var_50]
mov rdi, rbx; this
mov esi, 0CDh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_5D8D6
loc_5D878:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+58h+var_30]
mov [rdx], rax
lea rsi, aCannotUseErase; "cannot use erase() with "
lea rdi, [rsp+58h+var_50]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA25_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[25],char const*>(char const(&)[25],char const* &&)
mov bpl, 1
lea rdx, [rsp+58h+var_50]
mov rdi, rbx; this
mov esi, 133h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_5D8D6:
mov r14, rax
lea rax, [rsp+58h+var_40]
mov rdi, [rax-10h]
cmp rdi, rax
jnz short loc_5D8FC
jmp short loc_5D909
jmp short loc_5D910
jmp short loc_5D8EF
jmp short loc_5D910
loc_5D8EF:
mov r14, rax
mov rdi, [rsp+58h+var_50]; void *
cmp rdi, r15
jz short loc_5D909
loc_5D8FC:
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5D909:
test bpl, bpl
jnz short loc_5D913
jmp short loc_5D91B
loc_5D910:
mov r14, rax
loc_5D913:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_5D91B:
mov rdi, r14
call __Unwind_Resume
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x30
MOV R14,RSI
CMP qword ptr [RDX],RSI
JNZ 0x0015d7b5
MOV R15,RDX
MOV RBX,RDI
MOV qword ptr [RDI],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x8],XMM0
MOV RAX,-0x8000000000000000
MOV qword ptr [RDI + 0x18],RAX
CALL 0x0015e70e
MOVZX EAX,byte ptr [R14]
LEA ECX,[RAX + -0x3]
CMP ECX,0x6
JNC 0x0015d722
CMP qword ptr [R15 + 0x18],0x0
JNZ 0x0015d818
CMP EAX,0x8
JZ 0x0015d743
CMP EAX,0x3
JNZ 0x0015d776
LEA R15,[R14 + 0x8]
MOV RDI,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [RDI]
LEA RCX,[RDI + 0x10]
CMP RAX,RCX
JZ 0x0015d71b
MOV RSI,qword ptr [RCX]
INC RSI
MOV RDI,RAX
CALL 0x0011a8f0
MOV RDI,qword ptr [R15]
LAB_0015d71b:
MOV ESI,0x20
JMP 0x0015d76a
LAB_0015d722:
CMP EAX,0x1
JZ 0x0015d797
CMP EAX,0x2
JNZ 0x0015d878
MOV RDI,qword ptr [R14 + 0x8]
MOV RSI,qword ptr [R15 + 0x10]
CALL 0x0015ee46
MOV qword ptr [RBX + 0x10],RAX
JMP 0x0015d787
LAB_0015d743:
LEA R15,[R14 + 0x8]
MOV RDI,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x0015d765
MOV RSI,qword ptr [RDI + 0x10]
SUB RSI,RAX
MOV RDI,RAX
CALL 0x0011a8f0
MOV RDI,qword ptr [R15]
LAB_0015d765:
MOV ESI,0x28
LAB_0015d76a:
CALL 0x0011a8f0
MOV qword ptr [R15],0x0
LAB_0015d776:
MOV byte ptr [R14],0x0
MOV RDI,R14
MOV ESI,0x1
CALL 0x00158484
LAB_0015d787:
MOV RAX,RBX
ADD RSP,0x30
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0015d797:
MOV R12,RBX
ADD R12,0x8
MOV RDI,qword ptr [R14 + 0x8]
MOV RSI,qword ptr [R15 + 0x8]
LEA RDX,[RSI + 0x30]
CALL 0x0015e9ec
MOV qword ptr [R12],RAX
JMP 0x0015d787
LAB_0015d7b5:
MOV EDI,0x20
CALL 0x0011a460
MOV RBX,RAX
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
LAB_0015d7cb:
LEA RSI,[0x1ece96]
LEA RDX,[0x1eceb9]
LEA RDI,[RSP + 0x8]
CALL 0x00121af4
MOV BPL,0x1
LAB_0015d7e6:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0xca
MOV RCX,R14
CALL 0x0015e50c
XOR EBP,EBP
LEA RSI,[0x229f18]
LEA RDX,[0x15ac02]
MOV RDI,RBX
CALL 0x0011af30
LAB_0015d818:
MOV EDI,0x20
CALL 0x0011a460
MOV RBX,RAX
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
LAB_0015d82e:
LEA RSI,[0x1eceba]
LEA RDX,[0x1ececf]
LEA RDI,[RSP + 0x8]
CALL 0x00121af4
MOV BPL,0x1
LAB_0015d849:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0xcd
MOV RCX,R14
CALL 0x0015e50c
XOR EBP,EBP
LEA RSI,[0x229f18]
LEA RDX,[0x15ac02]
MOV RDI,RBX
CALL 0x0011af30
LAB_0015d878:
MOV EDI,0x20
CALL 0x0011a460
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015e9cc
LEA RDX,[RSP + 0x28]
MOV qword ptr [RDX],RAX
LAB_0015d895:
LEA RSI,[0x1eced0]
LEA RDI,[RSP + 0x8]
CALL 0x0015e943
MOV BPL,0x1
LAB_0015d8a9:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x133
MOV RCX,R14
CALL 0x0015e774
XOR EBP,EBP
LEA RSI,[0x229f58]
LEA RDX,[0x15ac02]
MOV RDI,RBX
CALL 0x0011af30
|
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
* _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_
(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*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>
*param_2,long *param_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>
bVar1;
void *pvVar2;
int8 uVar3;
ulong uVar4;
int8 *puVar5;
int1 *local_50 [2];
int1 local_40 [16];
char *local_30;
if ((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_3 != param_2) {
uVar3 = __cxa_allocate_exception(0x20);
local_50[0] = local_40;
/* try { // try from 0015d7cb to 0015d7e2 has its CatchHandler @ 0015d910 */
std::__cxx11::string::_M_construct<char_const*>
(local_50,"iterator does not fit current value","");
/* try { // try from 0015d7e6 to 0015d812 has its CatchHandler @ 0015d8ef */
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar3,0xca,local_50,param_2);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
*(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 = param_2;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
*(int8 *)(param_1 + 0x18) = 0x8000000000000000;
nlohmann::json_abi_v3_11_3::detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::set_end(param_1);
bVar1 = *param_2;
if (5 < (byte)bVar1 - 3) {
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar3 = nlohmann::json_abi_v3_11_3::
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>>>>
::erase(*(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>>>>
**)(param_2 + 8),param_3[1],param_3[1] + 0x30);
*(int8 *)(param_1 + 8) = uVar3;
return param_1;
}
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
uVar3 = std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::_M_erase(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(param_2 + 8),param_3[2]);
*(int8 *)(param_1 + 0x10) = uVar3;
return param_1;
}
uVar3 = __cxa_allocate_exception(0x20);
local_30 = (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_2);
/* try { // try from 0015d895 to 0015d8a5 has its CatchHandler @ 0015d8e9 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[25],char_const*>
((detail *)local_50,"cannot use erase() with ",&local_30);
/* try { // try from 0015d8a9 to 0015d8d5 has its CatchHandler @ 0015d8d6 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar3,0x133,local_50,param_2);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
if (param_3[3] != 0) {
uVar3 = __cxa_allocate_exception(0x20);
local_50[0] = local_40;
/* try { // try from 0015d82e to 0015d845 has its CatchHandler @ 0015d8ed */
std::__cxx11::string::_M_construct<char_const*>(local_50,"iterator out of range","");
/* try { // try from 0015d849 to 0015d875 has its CatchHandler @ 0015d8eb */
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar3,0xcd,local_50,param_2);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x8) {
puVar5 = *(int8 **)(param_2 + 8);
pvVar2 = (void *)*puVar5;
if (pvVar2 != (void *)0x0) {
operator_delete(pvVar2,puVar5[2] - (long)pvVar2);
puVar5 = *(int8 **)(param_2 + 8);
}
uVar4 = 0x28;
}
else {
if (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x3) goto LAB_0015d776;
puVar5 = *(int8 **)(param_2 + 8);
if ((long *)*puVar5 != puVar5 + 2) {
operator_delete((long *)*puVar5,puVar5[2] + 1);
puVar5 = *(int8 **)(param_2 + 8);
}
uVar4 = 0x20;
}
operator_delete(puVar5,uVar4);
*(int8 *)(param_2 + 8) = 0;
LAB_0015d776:
*param_2 = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0;
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(param_2,0));
return param_1;
}
| ||
24,277 | ma_check_unique | eloqsql/storage/maria/ma_unique.c | my_bool _ma_check_unique(MARIA_HA *info, MARIA_UNIQUEDEF *def,
const uchar *record,
ha_checksum unique_hash, my_off_t disk_pos)
{
my_off_t lastpos=info->cur_row.lastpos;
MARIA_KEYDEF *keyinfo= &info->s->keyinfo[def->key];
uchar *key_buff= info->lastkey_buff2;
MARIA_KEY key;
int error= 0;
DBUG_ENTER("_ma_check_unique");
DBUG_PRINT("enter",("unique_hash: %lu", (ulong) unique_hash));
/* We need to store the hash value as a key in the record, breaking const */
maria_unique_store(record+keyinfo->seg->start, unique_hash);
/* Can't be spatial so it's ok to call _ma_make_key directly here */
_ma_make_key(info, &key, def->key, key_buff, record, 0, 0);
/* The above changed info->lastkey_buff2. Inform maria_rnext_same(). */
info->update&= ~HA_STATE_RNEXT_SAME;
/* Setup that unique key is active key */
info->last_key.keyinfo= keyinfo;
/* any key pointer in data is destroyed */
info->lastinx= ~0;
DBUG_ASSERT(key.data_length == MARIA_UNIQUE_HASH_LENGTH);
if (_ma_search(info, &key, SEARCH_FIND | SEARCH_SAVE_BUFF,
info->s->state.key_root[def->key]))
{
info->page_changed=1; /* Can't optimize read next */
info->cur_row.lastpos= lastpos;
goto end;
}
for (;;)
{
if (info->cur_row.lastpos != disk_pos &&
!(*info->s->compare_unique)(info,def,record,info->cur_row.lastpos))
{
my_errno=HA_ERR_FOUND_DUPP_UNIQUE;
info->errkey= (int) def->key;
info->dup_key_pos= info->cur_row.lastpos;
info->page_changed= 1; /* Can't optimize read next */
info->cur_row.lastpos= lastpos;
DBUG_PRINT("info",("Found duplicate"));
error= 1; /* Found identical */
goto end;
}
DBUG_ASSERT(info->last_key.data_length == MARIA_UNIQUE_HASH_LENGTH);
if (_ma_search_next(info, &info->last_key, SEARCH_BIGGER,
info->s->state.key_root[def->key]) ||
bcmp(info->last_key.data, key_buff, MARIA_UNIQUE_HASH_LENGTH))
{
info->page_changed= 1; /* Can't optimize read next */
info->cur_row.lastpos= lastpos;
break; /* end of tree */
}
}
end:
DBUG_RETURN(error);
} | O0 | c | ma_check_unique:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x570(%rax), %rax
movq -0x10(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
imulq $0x118, %rcx, %rcx # imm = 0x118
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x390(%rax), %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x64(%rbp)
jmp 0x68e69
movl -0x1c(%rbp), %eax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movb %al, %dl
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
movq 0xc0(%rcx), %rcx
movl 0x8(%rcx), %ecx
movb %dl, 0x3(%rax,%rcx)
movq -0x70(%rbp), %rax
shrq $0x8, %rax
movb %al, %dl
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
movq 0xc0(%rcx), %rcx
movl 0x8(%rcx), %ecx
movb %dl, 0x2(%rax,%rcx)
movq -0x70(%rbp), %rax
shrq $0x10, %rax
movb %al, %dl
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
movq 0xc0(%rcx), %rcx
movl 0x8(%rcx), %ecx
movb %dl, 0x1(%rax,%rcx)
movq -0x70(%rbp), %rax
shrq $0x18, %rax
movb %al, %dl
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
movq 0xc0(%rcx), %rcx
movl 0x8(%rcx), %ecx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl 0x2(%rax), %edx
movq -0x40(%rbp), %rcx
movq -0x18(%rbp), %r8
leaq -0x60(%rbp), %rsi
xorl %eax, %eax
movl %eax, %r9d
movq $0x0, (%rsp)
callq 0x41e10
movq -0x8(%rbp), %rax
movl 0x624(%rax), %ecx
andl $0xffffefff, %ecx # imm = 0xFFFFEFFF
movl %ecx, 0x624(%rax)
movq -0x38(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x208(%rax)
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x62c(%rax) # imm = 0xFFFFFFFF
jmp 0x68f4a
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x118(%rax), %rax
movq -0x10(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
movq (%rax,%rcx,8), %rcx
leaq -0x60(%rbp), %rsi
movl $0x21, %edx
callq 0x38320
cmpl $0x0, %eax
je 0x68f9a
movq -0x8(%rbp), %rax
movb $0x1, 0x684(%rax)
movq -0x30(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x98(%rax)
jmp 0x690b3
jmp 0x68f9c
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rax
cmpq -0x28(%rbp), %rax
je 0x69034
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x6c0(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rcx
movq 0x98(%rcx), %rcx
callq *%rax
cmpb $0x0, %al
jne 0x69034
callq 0xf9990
movl $0x8d, (%rax)
movq -0x10(%rbp), %rax
movzbl 0x2(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x660(%rax)
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x428(%rax)
movq -0x8(%rbp), %rax
movb $0x1, 0x684(%rax)
movq -0x30(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x98(%rax)
jmp 0x6902b
movl $0x1, -0x64(%rbp)
jmp 0x690b3
jmp 0x69036
jmp 0x69038
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x200, %rsi # imm = 0x200
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x118(%rax), %rax
movq -0x10(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
movq (%rax,%rcx,8), %rcx
movl $0x8, %edx
callq 0x3bec0
cmpl $0x0, %eax
jne 0x69090
movq -0x8(%rbp), %rax
movq 0x200(%rax), %rax
movq -0x40(%rbp), %rcx
movl (%rcx), %ecx
movl (%rax), %eax
subl %ecx, %eax
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x690ac
movq -0x8(%rbp), %rax
movb $0x1, 0x684(%rax)
movq -0x30(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x98(%rax)
jmp 0x690b1
jmp 0x68f9c
jmp 0x690b3
jmp 0x690b5
movl -0x64(%rbp), %eax
movb %al, -0x71(%rbp)
movb -0x71(%rbp), %al
addq $0x80, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _ma_check_unique:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_28], r8
mov rax, [rbp+var_8]
mov rax, [rax+98h]
mov [rbp+var_30], rax
mov rax, [rbp+var_8]
mov rax, [rax]
mov rax, [rax+570h]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx+2]
imul rcx, 118h
add rax, rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_8]
mov rax, [rax+390h]
mov [rbp+var_40], rax
mov [rbp+var_64], 0
jmp short $+2
loc_68E69:
mov eax, [rbp+var_1C]
mov [rbp+var_70], rax
mov rax, [rbp+var_70]
mov dl, al
mov rax, [rbp+var_18]
mov rcx, [rbp+var_38]
mov rcx, [rcx+0C0h]
mov ecx, [rcx+8]
mov [rax+rcx+3], dl
mov rax, [rbp+var_70]
shr rax, 8
mov dl, al
mov rax, [rbp+var_18]
mov rcx, [rbp+var_38]
mov rcx, [rcx+0C0h]
mov ecx, [rcx+8]
mov [rax+rcx+2], dl
mov rax, [rbp+var_70]
shr rax, 10h
mov dl, al
mov rax, [rbp+var_18]
mov rcx, [rbp+var_38]
mov rcx, [rcx+0C0h]
mov ecx, [rcx+8]
mov [rax+rcx+1], dl
mov rax, [rbp+var_70]
shr rax, 18h
mov dl, al
mov rax, [rbp+var_18]
mov rcx, [rbp+var_38]
mov rcx, [rcx+0C0h]
mov ecx, [rcx+8]
mov [rax+rcx], dl
mov rdi, [rbp+var_8]
mov rax, [rbp+var_10]
movzx edx, byte ptr [rax+2]
mov rcx, [rbp+var_40]
mov r8, [rbp+var_18]
lea rsi, [rbp+var_60]
xor eax, eax
mov r9d, eax
mov [rsp+80h+var_80], 0
call _ma_make_key
mov rax, [rbp+var_8]
mov ecx, [rax+624h]
and ecx, 0FFFFEFFFh
mov [rax+624h], ecx
mov rcx, [rbp+var_38]
mov rax, [rbp+var_8]
mov [rax+208h], rcx
mov rax, [rbp+var_8]
mov dword ptr [rax+62Ch], 0FFFFFFFFh
jmp short $+2
loc_68F4A:
mov rdi, [rbp+var_8]
mov rax, [rbp+var_8]
mov rax, [rax]
mov rax, [rax+118h]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx+2]
mov rcx, [rax+rcx*8]
lea rsi, [rbp+var_60]
mov edx, 21h ; '!'
call _ma_search
cmp eax, 0
jz short loc_68F9A
mov rax, [rbp+var_8]
mov byte ptr [rax+684h], 1
mov rcx, [rbp+var_30]
mov rax, [rbp+var_8]
mov [rax+98h], rcx
jmp loc_690B3
loc_68F9A:
jmp short $+2
loc_68F9C:
mov rax, [rbp+var_8]
mov rax, [rax+98h]
cmp rax, [rbp+var_28]
jz loc_69034
mov rax, [rbp+var_8]
mov rax, [rax]
mov rax, [rax+6C0h]
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_8]
mov rcx, [rcx+98h]
call rax
cmp al, 0
jnz short loc_69034
call _my_thread_var
mov dword ptr [rax], 8Dh
mov rax, [rbp+var_10]
movzx ecx, byte ptr [rax+2]
mov rax, [rbp+var_8]
mov [rax+660h], ecx
mov rax, [rbp+var_8]
mov rcx, [rax+98h]
mov rax, [rbp+var_8]
mov [rax+428h], rcx
mov rax, [rbp+var_8]
mov byte ptr [rax+684h], 1
mov rcx, [rbp+var_30]
mov rax, [rbp+var_8]
mov [rax+98h], rcx
jmp short $+2
loc_6902B:
mov [rbp+var_64], 1
jmp short loc_690B3
loc_69034:
jmp short $+2
loc_69036:
jmp short $+2
loc_69038:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_8]
add rsi, 200h
mov rax, [rbp+var_8]
mov rax, [rax]
mov rax, [rax+118h]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx+2]
mov rcx, [rax+rcx*8]
mov edx, 8
call _ma_search_next
cmp eax, 0
jnz short loc_69090
mov rax, [rbp+var_8]
mov rax, [rax+200h]
mov rcx, [rbp+var_40]
mov ecx, [rcx]
mov eax, [rax]
sub eax, ecx
setnz al
movzx eax, al
cmp eax, 0
jz short loc_690AC
loc_69090:
mov rax, [rbp+var_8]
mov byte ptr [rax+684h], 1
mov rcx, [rbp+var_30]
mov rax, [rbp+var_8]
mov [rax+98h], rcx
jmp short loc_690B1
loc_690AC:
jmp loc_68F9C
loc_690B1:
jmp short $+2
loc_690B3:
jmp short $+2
loc_690B5:
mov eax, [rbp+var_64]
mov [rbp+var_71], al
mov al, [rbp+var_71]
add rsp, 80h
pop rbp
retn
| char ma_check_unique(_QWORD *a1, long long a2, long long a3, int a4, long long a5)
{
long long v5; // rdi
const char *v6; // rsi
char v8; // [rsp+1Ch] [rbp-64h]
_BYTE v9[32]; // [rsp+20h] [rbp-60h] BYREF
_BYTE *v10; // [rsp+40h] [rbp-40h]
long long v11; // [rsp+48h] [rbp-38h]
long long v12; // [rsp+50h] [rbp-30h]
long long v13; // [rsp+58h] [rbp-28h]
int v14; // [rsp+64h] [rbp-1Ch]
long long v15; // [rsp+68h] [rbp-18h]
long long v16; // [rsp+70h] [rbp-10h]
_QWORD *v17; // [rsp+78h] [rbp-8h]
v17 = a1;
v16 = a2;
v15 = a3;
v14 = a4;
v13 = a5;
v12 = a1[19];
v11 = 280LL * *(unsigned __int8 *)(a2 + 2) + *(_QWORD *)(*a1 + 1392LL);
v10 = (_BYTE *)a1[114];
v8 = 0;
*(_BYTE *)(a3 + *(unsigned int *)(*(_QWORD *)(v11 + 192) + 8LL) + 3) = a4;
*(_BYTE *)(v15 + *(unsigned int *)(*(_QWORD *)(v11 + 192) + 8LL) + 2) = BYTE1(a4);
*(_BYTE *)(v15 + *(unsigned int *)(*(_QWORD *)(v11 + 192) + 8LL) + 1) = BYTE2(a4);
*(_BYTE *)(v15 + *(unsigned int *)(*(_QWORD *)(v11 + 192) + 8LL)) = HIBYTE(a4);
ma_make_key((long long)v17, (long long)v9, *(unsigned __int8 *)(v16 + 2), v10, v15, 0LL, 0LL);
*((_DWORD *)v17 + 393) &= ~0x1000u;
v17[65] = v11;
*((_DWORD *)v17 + 395) = -1;
if ( (unsigned int)ma_search(
(long long)v17,
(long long)v9,
0x21u,
*(_QWORD *)(*(_QWORD *)(*v17 + 280LL) + 8LL * *(unsigned __int8 *)(v16 + 2))) )
{
*((_BYTE *)v17 + 1668) = 1;
v17[19] = v12;
}
else
{
do
{
if ( v17[19] != v13 )
{
v5 = (long long)v17;
v6 = (const char *)v16;
if ( !(*(unsigned __int8 ( **)(_QWORD *, long long, long long, _QWORD))(*v17 + 1728LL))(
v17,
v16,
v15,
v17[19]) )
{
*(_DWORD *)my_thread_var(v5, v6) = 141;
*((_DWORD *)v17 + 408) = *(unsigned __int8 *)(v16 + 2);
v17[133] = v17[19];
*((_BYTE *)v17 + 1668) = 1;
v17[19] = v12;
return 1;
}
}
}
while ( !(unsigned int)ma_search_next(
(long long)v17,
(long long)(v17 + 64),
8,
*(_QWORD *)(*(_QWORD *)(*v17 + 280LL) + 8LL * *(unsigned __int8 *)(v16 + 2)))
&& *(_DWORD *)v17[64] == *(_DWORD *)v10 );
*((_BYTE *)v17 + 1668) = 1;
v17[19] = v12;
}
return v8;
}
| _ma_check_unique:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x570]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX + 0x2]
IMUL RCX,RCX,0x118
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x390]
MOV qword ptr [RBP + -0x40],RAX
MOV dword ptr [RBP + -0x64],0x0
JMP 0x00168e69
LAB_00168e69:
MOV EAX,dword ptr [RBP + -0x1c]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x70]
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RCX + 0xc0]
MOV ECX,dword ptr [RCX + 0x8]
MOV byte ptr [RAX + RCX*0x1 + 0x3],DL
MOV RAX,qword ptr [RBP + -0x70]
SHR RAX,0x8
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RCX + 0xc0]
MOV ECX,dword ptr [RCX + 0x8]
MOV byte ptr [RAX + RCX*0x1 + 0x2],DL
MOV RAX,qword ptr [RBP + -0x70]
SHR RAX,0x10
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RCX + 0xc0]
MOV ECX,dword ptr [RCX + 0x8]
MOV byte ptr [RAX + RCX*0x1 + 0x1],DL
MOV RAX,qword ptr [RBP + -0x70]
SHR RAX,0x18
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RCX + 0xc0]
MOV ECX,dword ptr [RCX + 0x8]
MOV byte ptr [RAX + RCX*0x1],DL
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EDX,byte ptr [RAX + 0x2]
MOV RCX,qword ptr [RBP + -0x40]
MOV R8,qword ptr [RBP + -0x18]
LEA RSI,[RBP + -0x60]
XOR EAX,EAX
MOV R9D,EAX
MOV qword ptr [RSP],0x0
CALL 0x00141e10
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x624]
AND ECX,0xffffefff
MOV dword ptr [RAX + 0x624],ECX
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x208],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x62c],0xffffffff
JMP 0x00168f4a
LAB_00168f4a:
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x118]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX + 0x2]
MOV RCX,qword ptr [RAX + RCX*0x8]
LEA RSI,[RBP + -0x60]
MOV EDX,0x21
CALL 0x00138320
CMP EAX,0x0
JZ 0x00168f9a
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x684],0x1
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x98],RCX
JMP 0x001690b3
LAB_00168f9a:
JMP 0x00168f9c
LAB_00168f9c:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x98]
CMP RAX,qword ptr [RBP + -0x28]
JZ 0x00169034
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x6c0]
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX + 0x98]
CALL RAX
CMP AL,0x0
JNZ 0x00169034
CALL 0x001f9990
MOV dword ptr [RAX],0x8d
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RAX + 0x2]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x660],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x98]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x428],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x684],0x1
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x98],RCX
JMP 0x0016902b
LAB_0016902b:
MOV dword ptr [RBP + -0x64],0x1
JMP 0x001690b3
LAB_00169034:
JMP 0x00169036
LAB_00169036:
JMP 0x00169038
LAB_00169038:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x200
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x118]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX + 0x2]
MOV RCX,qword ptr [RAX + RCX*0x8]
MOV EDX,0x8
CALL 0x0013bec0
CMP EAX,0x0
JNZ 0x00169090
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x200]
MOV RCX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RCX]
MOV EAX,dword ptr [RAX]
SUB EAX,ECX
SETNZ AL
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x001690ac
LAB_00169090:
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x684],0x1
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x98],RCX
JMP 0x001690b1
LAB_001690ac:
JMP 0x00168f9c
LAB_001690b1:
JMP 0x001690b3
LAB_001690b3:
JMP 0x001690b5
LAB_001690b5:
MOV EAX,dword ptr [RBP + -0x64]
MOV byte ptr [RBP + -0x71],AL
MOV AL,byte ptr [RBP + -0x71]
ADD RSP,0x80
POP RBP
RET
|
int4 _ma_check_unique(long *param_1,long param_2,long param_3,int4 param_4,long param_5)
{
char cVar1;
int iVar2;
int4 *puVar3;
int1 local_68 [32];
int *local_48;
long local_40;
long local_38;
long local_30;
int4 local_24;
long local_20;
long local_18;
long *local_10;
local_38 = param_1[0x13];
local_40 = *(long *)(*param_1 + 0x570) + (ulong)*(byte *)(param_2 + 2) * 0x118;
local_48 = (int *)param_1[0x72];
*(char *)(param_3 + 3 + (ulong)*(uint *)(*(long *)(local_40 + 0xc0) + 8)) = (char)param_4;
*(char *)(param_3 + 2 + (ulong)*(uint *)(*(long *)(local_40 + 0xc0) + 8)) =
(char)((uint)param_4 >> 8);
*(char *)(param_3 + 1 + (ulong)*(uint *)(*(long *)(local_40 + 0xc0) + 8)) =
(char)((uint)param_4 >> 0x10);
*(char *)(param_3 + (ulong)*(uint *)(*(long *)(local_40 + 0xc0) + 8)) =
(char)((uint)param_4 >> 0x18);
local_30 = param_5;
local_24 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
_ma_make_key(param_1,local_68,*(int1 *)(param_2 + 2),local_48,param_3,0,0);
*(uint *)((long)local_10 + 0x624) = *(uint *)((long)local_10 + 0x624) & 0xffffefff;
local_10[0x41] = local_40;
*(int4 *)((long)local_10 + 0x62c) = 0xffffffff;
iVar2 = _ma_search(local_10,local_68,0x21,
*(int8 *)
(*(long *)(*local_10 + 0x118) + (ulong)*(byte *)(local_18 + 2) * 8));
if (iVar2 == 0) {
do {
if ((local_10[0x13] != local_30) &&
(cVar1 = (**(code **)(*local_10 + 0x6c0))(local_10,local_18,local_20,local_10[0x13]),
cVar1 == '\0')) {
puVar3 = (int4 *)_my_thread_var();
*puVar3 = 0x8d;
*(uint *)(local_10 + 0xcc) = (uint)*(byte *)(local_18 + 2);
local_10[0x85] = local_10[0x13];
*(int1 *)((long)local_10 + 0x684) = 1;
local_10[0x13] = local_38;
return 1;
}
iVar2 = _ma_search_next(local_10,local_10 + 0x40,8,
*(int8 *)
(*(long *)(*local_10 + 0x118) + (ulong)*(byte *)(local_18 + 2) * 8));
} while ((iVar2 == 0) && (*(int *)local_10[0x40] == *local_48));
*(int1 *)((long)local_10 + 0x684) = 1;
local_10[0x13] = local_38;
}
else {
*(int1 *)((long)local_10 + 0x684) = 1;
local_10[0x13] = local_38;
}
return 0;
}
| |
24,278 | inline_mysql_cond_signal | eloqsql/include/mysql/psi/mysql_thread.h | static inline int inline_mysql_cond_signal(
mysql_cond_t *that)
{
int result;
#ifdef HAVE_PSI_COND_INTERFACE
if (psi_likely(that->m_psi != NULL))
PSI_COND_CALL(signal_cond)(that->m_psi);
#endif
result= pthread_cond_signal(&that->m_cond);
return result;
} | O0 | c | inline_mysql_cond_signal:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x30d6b
leaq 0x1aab51(%rip), %rax # 0x1db8a8
movq (%rax), %rax
movq 0x170(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rdi
callq *%rax
movq -0x8(%rbp), %rdi
callq 0x24030
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
| inline_mysql_cond_signal_0:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
cmp qword ptr [rax+30h], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_30D6B
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+170h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+30h]
call rax
loc_30D6B:
mov rdi, [rbp+var_8]
call _pthread_cond_signal
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
add rsp, 10h
pop rbp
retn
| long long inline_mysql_cond_signal_0(long long a1)
{
if ( *(_QWORD *)(a1 + 48) )
(*((void ( **)(_QWORD))PSI_server[0] + 46))(*(_QWORD *)(a1 + 48));
return (unsigned int)pthread_cond_signal(a1);
}
| inline_mysql_cond_signal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x30],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00130d6b
LEA RAX,[0x2db8a8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x170]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x30]
CALL RAX
LAB_00130d6b:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00124030
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
ADD RSP,0x10
POP RBP
RET
|
int inline_mysql_cond_signal(pthread_cond_t *param_1)
{
int iVar1;
if (param_1[1].__align != 0) {
(**(code **)(PSI_server + 0x170))(param_1[1].__align);
}
iVar1 = pthread_cond_signal(param_1);
return iVar1;
}
| |
24,279 | progress_bar::reset() | untodesu[P]voxelius/game/client/progress_bar.cc | void progress_bar::reset(void)
{
str_title.clear();
str_button.clear();
button_action = nullptr;
} | O3 | cpp | progress_bar::reset():
xorl %eax, %eax
movq %rax, 0x1facde(%rip) # 0x25b4b8
movq 0x1faccf(%rip), %rcx # 0x25b4b0
movb %al, (%rcx)
movq %rax, 0x1facee(%rip) # 0x25b4d8
movq 0x1facdf(%rip), %rcx # 0x25b4d0
movb %al, (%rcx)
movq %rax, 0x1facf6(%rip) # 0x25b4f0
retq
| _ZN12progress_bar5resetEv:
xor eax, eax
mov cs:qword_25B4B8, rax
mov rcx, cs:_ZL9str_titleB5cxx11_1; str_title
mov [rcx], al
mov cs:qword_25B4D8, rax
mov rcx, cs:_ZL10str_buttonB5cxx11; str_button
mov [rcx], al
mov cs:_ZL13button_action, rax; button_action
retn
| long long progress_bar::reset(progress_bar *this)
{
long long result; // rax
result = 0LL;
qword_25B4B8 = 0LL;
*(_BYTE *)str_title[abi:cxx11] = 0;
qword_25B4D8 = 0LL;
*(_BYTE *)str_button[abi:cxx11] = 0;
button_action = 0LL;
return result;
}
| reset:
XOR EAX,EAX
MOV qword ptr [0x0035b4b8],RAX
MOV RCX,qword ptr [0x0035b4b0]
MOV byte ptr [RCX],AL
MOV qword ptr [0x0035b4d8],RAX
MOV RCX,qword ptr [0x0035b4d0]
MOV byte ptr [RCX],AL
MOV qword ptr [0x0035b4f0],RAX
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* progress_bar::reset() */
void progress_bar::reset(void)
{
DAT_0035b4b8 = 0;
*str_title_abi_cxx11_ = 0;
_DAT_0035b4d8 = 0;
*str_button_abi_cxx11_ = 0;
button_action = 0;
return;
}
| |
24,280 | httplib::detail::SocketStream::read(char*, unsigned long) | llama.cpp/examples/server/httplib.h | inline ssize_t SocketStream::read(char *ptr, size_t size) {
#ifdef _WIN32
size =
(std::min)(size, static_cast<size_t>((std::numeric_limits<int>::max)()));
#else
size = (std::min)(size,
static_cast<size_t>((std::numeric_limits<ssize_t>::max)()));
#endif
if (read_buff_off_ < read_buff_content_size_) {
auto remaining_size = read_buff_content_size_ - read_buff_off_;
if (size <= remaining_size) {
memcpy(ptr, read_buff_.data() + read_buff_off_, size);
read_buff_off_ += size;
return static_cast<ssize_t>(size);
} else {
memcpy(ptr, read_buff_.data() + read_buff_off_, remaining_size);
read_buff_off_ += remaining_size;
return static_cast<ssize_t>(remaining_size);
}
}
if (!wait_readable()) { return -1; }
read_buff_off_ = 0;
read_buff_content_size_ = 0;
if (size < read_buff_size_) {
auto n = read_socket(sock_, read_buff_.data(), read_buff_size_,
CPPHTTPLIB_RECV_FLAGS);
if (n <= 0) {
return n;
} else if (n <= static_cast<ssize_t>(size)) {
memcpy(ptr, read_buff_.data(), static_cast<size_t>(n));
return n;
} else {
memcpy(ptr, read_buff_.data(), size);
read_buff_off_ = size;
read_buff_content_size_ = static_cast<size_t>(n);
return static_cast<ssize_t>(size);
}
} else {
return read_socket(sock_, ptr, size, CPPHTTPLIB_RECV_FLAGS);
}
} | O3 | c | httplib::detail::SocketStream::read(char*, unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rax
movabsq $0x7fffffffffffffff, %r14 # imm = 0x7FFFFFFFFFFFFFFF
cmpq %r14, %rdx
cmovbq %rdx, %r14
movq %rdi, %r15
movq 0x58(%rdi), %rsi
movq 0x60(%rdi), %r13
subq %rsi, %r13
jbe 0x49963
addq 0x40(%r15), %rsi
cmpq %r13, %r14
cmovbq %r14, %r13
movq %rax, %rdi
movq %r13, %rdx
callq 0x25120
addq %r13, 0x58(%r15)
jmp 0x49ae0
movq %rdx, %r12
movq %rax, 0x8(%rsp)
movq %r15, %rdi
callq 0x49686
movq $-0x1, %r13
testb %al, %al
je 0x49ae0
leaq 0x58(%r15), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movl 0x8(%r15), %edi
cmpq $0xfff, %r12 # imm = 0xFFF
movl %edi, 0x4(%rsp)
ja 0x499ef
movq 0x40(%r15), %rbx
movl $0x1000, %edx # imm = 0x1000
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x262f0
movq %rax, %r13
testq %rax, %rax
js 0x49a6b
testq %r13, %r13
movq 0x8(%rsp), %rdi
je 0x49ad3
movq 0x40(%r15), %rsi
cmpq %r14, %r13
jbe 0x49ad8
movq %r14, %rdx
callq 0x25120
movq %r14, 0x58(%r15)
movq %r13, 0x60(%r15)
movq %r12, %r13
jmp 0x49ae0
movq 0x8(%rsp), %rsi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x262f0
movq %rax, %r13
testq %rax, %rax
jns 0x49ae0
callq 0x263d0
cmpl $0x4, (%rax)
jne 0x49ae0
movq %rax, %r15
leaq 0x10(%rsp), %rbx
movq $0x0, 0x10(%rsp)
movq $0x3e8, 0x18(%rsp) # imm = 0x3E8
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x264e0
cmpl $-0x1, %eax
jne 0x49a48
cmpl $0x4, (%r15)
je 0x49a32
movl 0x4(%rsp), %edi
movq 0x8(%rsp), %rsi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x262f0
movq %rax, %r13
testq %rax, %rax
jns 0x49ae0
cmpl $0x4, (%r15)
je 0x49a20
jmp 0x49ae0
movq %rbx, 0x20(%rsp)
callq 0x263d0
cmpl $0x4, (%rax)
jne 0x49ae0
movq %rax, %rbp
leaq 0x10(%rsp), %rbx
movq $0x0, 0x10(%rsp)
movq $0x3e8, 0x18(%rsp) # imm = 0x3E8
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x264e0
cmpl $-0x1, %eax
jne 0x49aaa
cmpl $0x4, (%rbp)
je 0x49a94
movl $0x1000, %edx # imm = 0x1000
movl 0x4(%rsp), %edi
movq 0x20(%rsp), %rsi
xorl %ecx, %ecx
callq 0x262f0
movq %rax, %r13
testq %rax, %rax
jns 0x499bc
cmpl $0x4, (%rbp)
je 0x49a82
jmp 0x49ae0
xorl %r13d, %r13d
jmp 0x49ae0
movq %r13, %rdx
callq 0x25120
movq %r13, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN7httplib6detail12SocketStream4readEPcm:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rax, rsi
mov r14, 7FFFFFFFFFFFFFFFh
cmp rdx, r14
cmovb r14, rdx
mov r15, rdi
mov rsi, [rdi+58h]
mov r13, [rdi+60h]
sub r13, rsi
jbe short loc_49963
add rsi, [r15+40h]
cmp r14, r13
cmovb r13, r14
mov rdi, rax
mov rdx, r13
call _memcpy
add [r15+58h], r13
jmp loc_49AE0
loc_49963:
mov r12, rdx
mov [rsp+58h+var_50], rax
mov rdi, r15; this
call _ZNK7httplib6detail12SocketStream13wait_readableEv; httplib::detail::SocketStream::wait_readable(void)
mov r13, 0FFFFFFFFFFFFFFFFh
test al, al
jz loc_49AE0
lea rax, [r15+58h]
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
mov edi, [r15+8]
cmp r12, 0FFFh
mov [rsp+58h+var_54], edi
ja short loc_499EF
mov rbx, [r15+40h]
mov edx, 1000h
mov rsi, rbx
xor ecx, ecx
call _recv
mov r13, rax
test rax, rax
js loc_49A6B
loc_499BC:
test r13, r13
mov rdi, [rsp+58h+var_50]
jz loc_49AD3
mov rsi, [r15+40h]
cmp r13, r14
jbe loc_49AD8
mov rdx, r14
call _memcpy
mov [r15+58h], r14
mov [r15+60h], r13
mov r13, r12
jmp loc_49AE0
loc_499EF:
mov rsi, [rsp+58h+var_50]
mov rdx, r14
xor ecx, ecx
call _recv
mov r13, rax
test rax, rax
jns loc_49AE0
call ___errno_location
cmp dword ptr [rax], 4
jnz loc_49AE0
mov r15, rax
lea rbx, [rsp+58h+var_48]
loc_49A20:
mov [rsp+58h+var_48], 0
mov [rsp+58h+var_40], 3E8h
loc_49A32:
mov rdi, rbx
mov rsi, rbx
call _nanosleep
cmp eax, 0FFFFFFFFh
jnz short loc_49A48
cmp dword ptr [r15], 4
jz short loc_49A32
loc_49A48:
mov edi, [rsp+58h+var_54]
mov rsi, [rsp+58h+var_50]
mov rdx, r14
xor ecx, ecx
call _recv
mov r13, rax
test rax, rax
jns short loc_49AE0
cmp dword ptr [r15], 4
jz short loc_49A20
jmp short loc_49AE0
loc_49A6B:
mov [rsp+58h+var_38], rbx
call ___errno_location
cmp dword ptr [rax], 4
jnz short loc_49AE0
mov rbp, rax
lea rbx, [rsp+58h+var_48]
loc_49A82:
mov [rsp+58h+var_48], 0
mov [rsp+58h+var_40], 3E8h
loc_49A94:
mov rdi, rbx
mov rsi, rbx
call _nanosleep
cmp eax, 0FFFFFFFFh
jnz short loc_49AAA
cmp dword ptr [rbp+0], 4
jz short loc_49A94
loc_49AAA:
mov edx, 1000h
mov edi, [rsp+58h+var_54]
mov rsi, [rsp+58h+var_38]
xor ecx, ecx
call _recv
mov r13, rax
test rax, rax
jns loc_499BC
cmp dword ptr [rbp+0], 4
jz short loc_49A82
jmp short loc_49AE0
loc_49AD3:
xor r13d, r13d
jmp short loc_49AE0
loc_49AD8:
mov rdx, r13
call _memcpy
loc_49AE0:
mov rax, r13
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long httplib::detail::SocketStream::read(
httplib::detail::SocketStream *this,
char *a2,
unsigned long long a3)
{
unsigned long long v4; // r14
unsigned long long v6; // rsi
unsigned long long v7; // r13
bool v8; // cc
long long v9; // r13
unsigned long long v10; // rsi
long long v12; // rdi
long long v13; // rbx
long long v14; // rsi
_DWORD *v15; // rax
_DWORD *v16; // r15
_DWORD *v17; // rax
_DWORD *v18; // rbp
unsigned int v20; // [rsp+4h] [rbp-54h]
char *v21; // [rsp+8h] [rbp-50h]
long long v22; // [rsp+10h] [rbp-48h] BYREF
long long v23; // [rsp+18h] [rbp-40h]
long long v24; // [rsp+20h] [rbp-38h]
v4 = 0x7FFFFFFFFFFFFFFFLL;
if ( a3 < 0x7FFFFFFFFFFFFFFFLL )
v4 = a3;
v6 = *((_QWORD *)this + 11);
v7 = *((_QWORD *)this + 12);
v8 = v7 <= v6;
v9 = v7 - v6;
if ( v8 )
{
v21 = a2;
v9 = -1LL;
if ( httplib::detail::SocketStream::wait_readable(this) )
{
*(_OWORD *)((char *)this + 88) = 0LL;
v12 = *((unsigned int *)this + 2);
v20 = *((_DWORD *)this + 2);
if ( a3 > 0xFFF )
{
v9 = recv(v12, v21, v4, 0LL);
if ( v9 < 0 )
{
v15 = (_DWORD *)__errno_location();
if ( *v15 == 4 )
{
v16 = v15;
do
{
v22 = 0LL;
v23 = 1000LL;
while ( (unsigned int)nanosleep(&v22, &v22) == -1 && *v16 == 4 )
;
v9 = recv(v20, v21, v4, 0LL);
}
while ( v9 < 0 && *v16 == 4 );
}
}
}
else
{
v13 = *((_QWORD *)this + 8);
v9 = recv(v12, v13, 4096LL, 0LL);
if ( v9 < 0 )
{
v24 = v13;
v17 = (_DWORD *)__errno_location();
if ( *v17 != 4 )
return v9;
v18 = v17;
while ( 1 )
{
v22 = 0LL;
v23 = 1000LL;
while ( (unsigned int)nanosleep(&v22, &v22) == -1 && *v18 == 4 )
;
v9 = recv(v20, v24, 4096LL, 0LL);
if ( v9 >= 0 )
break;
if ( *v18 != 4 )
return v9;
}
}
if ( v9 )
{
v14 = *((_QWORD *)this + 8);
if ( v9 <= v4 )
{
memcpy(v21, v14, v9);
}
else
{
memcpy(v21, v14, v4);
*((_QWORD *)this + 11) = v4;
*((_QWORD *)this + 12) = v9;
return a3;
}
}
else
{
return 0LL;
}
}
}
}
else
{
v10 = *((_QWORD *)this + 8) + v6;
if ( v4 < v9 )
v9 = v4;
memcpy(a2, v10, v9);
*((_QWORD *)this + 11) += v9;
}
return v9;
}
| read:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RAX,RSI
MOV R14,0x7fffffffffffffff
CMP RDX,R14
CMOVC R14,RDX
MOV R15,RDI
MOV RSI,qword ptr [RDI + 0x58]
MOV R13,qword ptr [RDI + 0x60]
SUB R13,RSI
JBE 0x00149963
ADD RSI,qword ptr [R15 + 0x40]
CMP R14,R13
CMOVC R13,R14
MOV RDI,RAX
MOV RDX,R13
CALL 0x00125120
ADD qword ptr [R15 + 0x58],R13
JMP 0x00149ae0
LAB_00149963:
MOV R12,RDX
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,R15
CALL 0x00149686
MOV R13,-0x1
TEST AL,AL
JZ 0x00149ae0
LEA RAX,[R15 + 0x58]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV EDI,dword ptr [R15 + 0x8]
CMP R12,0xfff
MOV dword ptr [RSP + 0x4],EDI
JA 0x001499ef
MOV RBX,qword ptr [R15 + 0x40]
MOV EDX,0x1000
MOV RSI,RBX
XOR ECX,ECX
CALL 0x001262f0
MOV R13,RAX
TEST RAX,RAX
JS 0x00149a6b
LAB_001499bc:
TEST R13,R13
MOV RDI,qword ptr [RSP + 0x8]
JZ 0x00149ad3
MOV RSI,qword ptr [R15 + 0x40]
CMP R13,R14
JBE 0x00149ad8
MOV RDX,R14
CALL 0x00125120
MOV qword ptr [R15 + 0x58],R14
MOV qword ptr [R15 + 0x60],R13
MOV R13,R12
JMP 0x00149ae0
LAB_001499ef:
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,R14
XOR ECX,ECX
CALL 0x001262f0
MOV R13,RAX
TEST RAX,RAX
JNS 0x00149ae0
CALL 0x001263d0
CMP dword ptr [RAX],0x4
JNZ 0x00149ae0
MOV R15,RAX
LEA RBX,[RSP + 0x10]
LAB_00149a20:
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x3e8
LAB_00149a32:
MOV RDI,RBX
MOV RSI,RBX
CALL 0x001264e0
CMP EAX,-0x1
JNZ 0x00149a48
CMP dword ptr [R15],0x4
JZ 0x00149a32
LAB_00149a48:
MOV EDI,dword ptr [RSP + 0x4]
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,R14
XOR ECX,ECX
CALL 0x001262f0
MOV R13,RAX
TEST RAX,RAX
JNS 0x00149ae0
CMP dword ptr [R15],0x4
JZ 0x00149a20
JMP 0x00149ae0
LAB_00149a6b:
MOV qword ptr [RSP + 0x20],RBX
CALL 0x001263d0
CMP dword ptr [RAX],0x4
JNZ 0x00149ae0
MOV RBP,RAX
LEA RBX,[RSP + 0x10]
LAB_00149a82:
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x3e8
LAB_00149a94:
MOV RDI,RBX
MOV RSI,RBX
CALL 0x001264e0
CMP EAX,-0x1
JNZ 0x00149aaa
CMP dword ptr [RBP],0x4
JZ 0x00149a94
LAB_00149aaa:
MOV EDX,0x1000
MOV EDI,dword ptr [RSP + 0x4]
MOV RSI,qword ptr [RSP + 0x20]
XOR ECX,ECX
CALL 0x001262f0
MOV R13,RAX
TEST RAX,RAX
JNS 0x001499bc
CMP dword ptr [RBP],0x4
JZ 0x00149a82
JMP 0x00149ae0
LAB_00149ad3:
XOR R13D,R13D
JMP 0x00149ae0
LAB_00149ad8:
MOV RDX,R13
CALL 0x00125120
LAB_00149ae0:
MOV RAX,R13
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* httplib::detail::SocketStream::read(char*, unsigned long) */
ulong __thiscall httplib::detail::SocketStream::read(SocketStream *this,char *param_1,ulong param_2)
{
int __fd;
ulong uVar1;
void *__buf;
char cVar2;
int iVar3;
int *piVar4;
size_t __n;
ulong __n_00;
timespec local_48;
void *local_38;
__n_00 = 0x7fffffffffffffff;
if (param_2 < 0x7fffffffffffffff) {
__n_00 = param_2;
}
uVar1 = *(ulong *)(this + 0x58);
__n = *(ulong *)(this + 0x60) - uVar1;
if (*(ulong *)(this + 0x60) < uVar1 || __n == 0) {
cVar2 = wait_readable(this);
__n = 0xffffffffffffffff;
if (cVar2 != '\0') {
*(int8 *)(this + 0x58) = 0;
*(int8 *)(this + 0x60) = 0;
__fd = *(int *)(this + 8);
if (param_2 < 0x1000) {
__buf = *(void **)(this + 0x40);
__n = recv(__fd,__buf,0x1000,0);
if ((long)__n < 0) {
local_38 = __buf;
piVar4 = __errno_location();
if (*piVar4 == 4) {
do {
local_48.tv_sec = 0;
local_48.tv_nsec = 1000;
do {
iVar3 = nanosleep(&local_48,&local_48);
if (iVar3 != -1) break;
} while (*piVar4 == 4);
__n = recv(__fd,local_38,0x1000,0);
if (-1 < (long)__n) goto LAB_001499bc;
} while (*piVar4 == 4);
}
}
else {
LAB_001499bc:
if (__n == 0) {
__n = 0;
}
else if (__n_00 < __n) {
memcpy(param_1,*(void **)(this + 0x40),__n_00);
*(ulong *)(this + 0x58) = __n_00;
*(size_t *)(this + 0x60) = __n;
__n = param_2;
}
else {
memcpy(param_1,*(void **)(this + 0x40),__n);
}
}
}
else {
__n = recv(__fd,param_1,__n_00,0);
if (((long)__n < 0) && (piVar4 = __errno_location(), *piVar4 == 4)) {
do {
local_48.tv_sec = 0;
local_48.tv_nsec = 1000;
do {
iVar3 = nanosleep(&local_48,&local_48);
if (iVar3 != -1) break;
} while (*piVar4 == 4);
__n = recv(__fd,param_1,__n_00,0);
} while (((long)__n < 0) && (*piVar4 == 4));
}
}
}
}
else {
if (__n_00 < __n) {
__n = __n_00;
}
memcpy(param_1,(void *)(uVar1 + *(long *)(this + 0x40)),__n);
*(size_t *)(this + 0x58) = *(long *)(this + 0x58) + __n;
}
return __n;
}
| |
24,281 | ma_store_blob_length | eloqsql/storage/maria/ma_dynrec.c | void _ma_store_blob_length(uchar *pos,uint pack_length,uint length)
{
switch (pack_length) {
case 1:
*pos= (uchar) length;
break;
case 2:
int2store(pos,length);
break;
case 3:
int3store(pos,length);
break;
case 4:
int4store(pos,length);
default:
break;
}
return;
} | O3 | c | ma_store_blob_length:
pushq %rbp
movq %rsp, %rbp
decl %esi
cmpl $0x3, %esi
ja 0x499f5
leaq 0x9c438(%rip), %rax # 0xe5e0c
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movb %dl, (%rdi)
jmp 0x499f5
movb %dl, (%rdi)
movb %dh, 0x1(%rdi)
shrl $0x10, %edx
movb %dl, 0x2(%rdi)
jmp 0x499f5
movl %edx, (%rdi)
jmp 0x499f5
movw %dx, (%rdi)
popq %rbp
retq
| _ma_store_blob_length:
push rbp
mov rbp, rsp
dec esi; switch 4 cases
cmp esi, 3
ja short def_499DB; jumptable 00000000000499DB default case
lea rax, jpt_499DB
movsxd rcx, ds:(jpt_499DB - 0E5E0Ch)[rax+rsi*4]
add rcx, rax
jmp rcx; switch jump
loc_499DD:
mov [rdi], dl; jumptable 00000000000499DB case 1
jmp short def_499DB; jumptable 00000000000499DB default case
loc_499E1:
mov [rdi], dl; jumptable 00000000000499DB case 3
mov [rdi+1], dh
shr edx, 10h
mov [rdi+2], dl
jmp short def_499DB; jumptable 00000000000499DB default case
loc_499EE:
mov [rdi], edx; jumptable 00000000000499DB case 4
jmp short def_499DB; jumptable 00000000000499DB default case
loc_499F2:
mov [rdi], dx; jumptable 00000000000499DB case 2
def_499DB:
pop rbp; jumptable 00000000000499DB default case
retn
| void ma_store_blob_length(_BYTE *a1, int a2, int a3)
{
switch ( a2 )
{
case 1:
*a1 = a3;
break;
case 2:
*(_WORD *)a1 = a3;
break;
case 3:
*(_WORD *)a1 = a3;
a1[2] = BYTE2(a3);
break;
case 4:
*(_DWORD *)a1 = a3;
break;
default:
return;
}
}
| _ma_store_blob_length:
PUSH RBP
MOV RBP,RSP
DEC ESI
CMP ESI,0x3
JA 0x001499f5
LEA RAX,[0x1e5e0c]
MOVSXD RCX,dword ptr [RAX + RSI*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_1:
MOV byte ptr [RDI],DL
JMP 0x001499f5
caseD_3:
MOV byte ptr [RDI],DL
MOV byte ptr [RDI + 0x1],DH
SHR EDX,0x10
MOV byte ptr [RDI + 0x2],DL
JMP 0x001499f5
caseD_4:
MOV dword ptr [RDI],EDX
JMP 0x001499f5
caseD_2:
MOV word ptr [RDI],DX
default:
POP RBP
RET
|
void _ma_store_blob_length(int4 *param_1,int4 param_2,int4 param_3)
{
switch(param_2) {
case 1:
*(char *)param_1 = (char)param_3;
break;
case 2:
*(short *)param_1 = (short)param_3;
break;
case 3:
*(char *)param_1 = (char)param_3;
*(char *)((long)param_1 + 1) = (char)((uint)param_3 >> 8);
*(char *)((long)param_1 + 2) = (char)((uint)param_3 >> 0x10);
break;
case 4:
*param_1 = param_3;
}
return;
}
| |
24,282 | psi_rwlock_trywrlock | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD
int psi_rwlock_trywrlock(mysql_rwlock_t *that, const char *file, uint line)
{
PSI_rwlock_locker_state state;
PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_wrwait)
(&state, that->m_psi, PSI_RWLOCK_TRYWRITELOCK, file, line);
int result= rw_trywrlock(&that->m_rwlock);
if (locker)
PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result);
return result;
} | O0 | c | psi_rwlock_trywrlock:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x1a54be(%rip), %rax # 0x1d1858
movq (%rax), %rax
movq 0x1b0(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x90(%rcx), %rsi
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %r8d
leaq -0x48(%rbp), %rdi
movl $0x3, %edx
callq *%rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2ca00
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x2c3f3
leaq 0x1a5478(%rip), %rax # 0x1d1858
movq (%rax), %rax
movq 0x1b8(%rax), %rax
movq -0x50(%rbp), %rdi
movl -0x54(%rbp), %esi
callq *%rax
movl -0x54(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| psi_rwlock_trywrlock:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1B0h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+90h]
mov rcx, [rbp+var_10]
mov r8d, [rbp+var_14]
lea rdi, [rbp+var_48]
mov edx, 3
call rax
mov [rbp+var_50], rax
mov rdi, [rbp+var_8]
call my_rw_trywrlock
mov [rbp+var_54], eax
cmp [rbp+var_50], 0
jz short loc_2C3F3
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1B8h]
mov rdi, [rbp+var_50]
mov esi, [rbp+var_54]
call rax
loc_2C3F3:
mov eax, [rbp+var_54]
add rsp, 60h
pop rbp
retn
| long long psi_rwlock_trywrlock(long long a1, long long a2, unsigned int a3)
{
unsigned int v4; // [rsp+Ch] [rbp-54h]
long long v5; // [rsp+10h] [rbp-50h]
_BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF
unsigned int v7; // [rsp+4Ch] [rbp-14h]
long long v8; // [rsp+50h] [rbp-10h]
long long v9; // [rsp+58h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = a3;
v5 = (*((long long ( **)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[0] + 54))(
v6,
*(_QWORD *)(a1 + 144),
3LL,
a2,
a3);
v4 = my_rw_trywrlock(v9);
if ( v5 )
(*((void ( **)(long long, _QWORD))PSI_server[0] + 55))(v5, v4);
return v4;
}
| psi_rwlock_trywrlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
LEA RAX,[0x2d1858]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1b0]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x90]
MOV RCX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RBP + -0x14]
LEA RDI,[RBP + -0x48]
MOV EDX,0x3
CALL RAX
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012ca00
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x0012c3f3
LEA RAX,[0x2d1858]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1b8]
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RBP + -0x54]
CALL RAX
LAB_0012c3f3:
MOV EAX,dword ptr [RBP + -0x54]
ADD RSP,0x60
POP RBP
RET
|
int4 psi_rwlock_trywrlock(long param_1,int8 param_2,int4 param_3)
{
int4 uVar1;
long lVar2;
int1 local_50 [52];
int4 local_1c;
int8 local_18;
long local_10;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
lVar2 = (**(code **)(PSI_server + 0x1b0))
(local_50,*(int8 *)(param_1 + 0x90),3,param_2,param_3);
uVar1 = my_rw_trywrlock(local_10);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1b8))(lVar2,uVar1);
}
return uVar1;
}
| |
24,283 | wt_thd_will_wait_for | eloqsql/mysys/waiting_threads.c | int wt_thd_will_wait_for(WT_THD *thd, WT_THD *blocker,
const WT_RESOURCE_ID *resid)
{
uint i;
WT_RESOURCE *rc;
DBUG_ENTER("wt_thd_will_wait_for");
DBUG_PRINT("wt", ("enter: thd=%s, blocker=%s, resid=%lu",
thd->name, blocker->name, (ulong)resid->value));
if (fix_thd_pins(thd))
DBUG_RETURN(WT_DEADLOCK);
if (thd->waiting_for == 0)
{
uint keylen;
const void *key;
/* XXX if (restype->make_key) key= restype->make_key(resid, &keylen); else */
{
key= resid;
keylen= sizeof_WT_RESOURCE_ID;
}
DBUG_PRINT("wt", ("first blocker"));
retry:
while ((rc= lf_hash_search(&reshash, thd->pins, key, keylen)) == 0)
{
DBUG_PRINT("wt", ("failed to find rc in hash, inserting"));
if (lf_hash_insert(&reshash, thd->pins, resid) == -1) /* if OOM */
DBUG_RETURN(WT_DEADLOCK);
/*
Two cases: either lf_hash_insert() failed - because another thread
has just inserted a resource with the same id - and we need to retry.
Or lf_hash_insert() succeeded, and then we need to repeat
lf_hash_search() to find a real address of the newly inserted element.
That is, we don't care what lf_hash_insert() has returned.
And we need to repeat the loop anyway.
*/
}
if (rc == MY_ERRPTR)
DBUG_RETURN(WT_DEADLOCK);
DBUG_PRINT("wt", ("found in hash rc=%p", rc));
rc_wrlock(rc);
if (rc->state != ACTIVE)
{
DBUG_PRINT("wt", ("but it's not active, retrying"));
/* Somebody has freed the element while we weren't looking */
rc_unlock(rc);
lf_hash_search_unpin(thd->pins);
goto retry;
}
lf_hash_search_unpin(thd->pins); /* the element cannot go away anymore */
thd->waiting_for= rc;
rc->waiter_count++;
thd->killed= 0;
}
else
{
DBUG_ASSERT(thd->waiting_for->id.type == resid->type);
DBUG_ASSERT(resid->type->compare(&thd->waiting_for->id, resid) == 0);
DBUG_PRINT("wt", ("adding another blocker"));
/*
we can safely access the resource here, it's in the hash as it has
non-zero waiter_count
*/
rc= thd->waiting_for;
rc_wrlock(rc);
DBUG_ASSERT(rc->waiter_count);
DBUG_ASSERT(rc->state == ACTIVE);
if (thd->killed)
{
stop_waiting_locked(thd);
DBUG_RETURN(WT_DEADLOCK);
}
}
/*
Another thread could be waiting on this resource for this very 'blocker'.
In this case we should not add it to the list for the second time.
*/
for (i= 0; i < rc->owners.elements; i++)
if (*dynamic_element(&rc->owners, i, WT_THD**) == blocker)
break;
if (i >= rc->owners.elements)
{
if (push_dynamic(&blocker->my_resources, (void*)&rc))
{
stop_waiting_locked(thd);
DBUG_RETURN(WT_DEADLOCK); /* deadlock and OOM use the same error code */
}
if (push_dynamic(&rc->owners, (void*)&blocker))
{
pop_dynamic(&blocker->my_resources);
stop_waiting_locked(thd);
DBUG_RETURN(WT_DEADLOCK);
}
}
rc_unlock(rc);
if (deadlock(thd, blocker, 1, *thd->deadlock_search_depth_short) != WT_OK)
{
stop_waiting(thd);
DBUG_RETURN(WT_DEADLOCK);
}
DBUG_RETURN(WT_OK);
} | O0 | c | wt_thd_will_wait_for:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
jmp 0xffdd6
movq -0x10(%rbp), %rdi
callq 0x100050
cmpl $0x0, %eax
je 0xffdf2
jmp 0xffde6
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x10003f
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0xfff0b
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x10, -0x34(%rbp)
jmp 0xffe12
jmp 0xffe14
jmp 0xffe16
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rsi
movq -0x40(%rbp), %rdx
movl -0x34(%rbp), %ecx
leaq 0xb838a4(%rip), %rdi # 0xc836d0
callq 0xfe550
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0xffe6c
jmp 0xffe3d
jmp 0xffe3f
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rsi
movq -0x20(%rbp), %rdx
leaq 0xb8387e(%rip), %rdi # 0xc836d0
callq 0xfd530
cmpl $-0x1, %eax
jne 0xffe6a
jmp 0xffe5e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x10003f
jmp 0xffe16
movl $0x1, %eax
cmpq %rax, -0x30(%rbp)
jne 0xffe85
jmp 0xffe79
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x10003f
jmp 0xffe87
jmp 0xffe89
movq -0x30(%rbp), %rdi
callq 0x1000c0
movq -0x30(%rbp), %rax
cmpl $0x0, 0x14(%rax)
je 0xffeca
jmp 0xffe9e
jmp 0xffea0
movq -0x30(%rbp), %rdi
callq 0x1000f0
jmp 0xffeab
jmp 0xffead
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rcx
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
xchgq %rax, 0x10(%rcx)
jmp 0xffe14
jmp 0xffecc
jmp 0xffece
jmp 0xffed0
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rcx
movq $0x0, -0x50(%rbp)
movq -0x50(%rbp), %rax
xchgq %rax, 0x10(%rcx)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x30(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x60(%rax)
jmp 0xfff53
jmp 0xfff0d
jmp 0xfff0f
jmp 0xfff11
jmp 0xfff13
jmp 0xfff15
jmp 0xfff17
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x1000c0
jmp 0xfff2e
jmp 0xfff30
jmp 0xfff32
movq -0x10(%rbp), %rax
cmpb $0x0, 0x60(%rax)
je 0xfff51
movq -0x10(%rbp), %rdi
callq 0x100120
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x10003f
jmp 0xfff53
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpl 0xe8(%rcx), %eax
jae 0xfff90
movq -0x30(%rbp), %rax
movq 0xe0(%rax), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rax
cmpq -0x18(%rbp), %rax
jne 0xfff83
jmp 0xfff90
jmp 0xfff85
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xfff5a
movl -0x24(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpl 0xe8(%rcx), %eax
jb 0xffff7
movq -0x18(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xda910
cmpb $0x0, %al
je 0xfffc2
movq -0x10(%rbp), %rdi
callq 0x100120
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x10003f
movq -0x30(%rbp), %rdi
addq $0xe0, %rdi
leaq -0x18(%rbp), %rsi
callq 0xda910
cmpb $0x0, %al
je 0xffff5
movq -0x18(%rbp), %rdi
callq 0xdab10
movq -0x10(%rbp), %rdi
callq 0x100120
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x10003f
jmp 0xffff7
movq -0x30(%rbp), %rdi
callq 0x1000f0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq (%rax), %rax
movl %eax, %ecx
movl $0x1, %edx
callq 0x1001a0
cmpl $0x0, %eax
je 0x100036
movq -0x10(%rbp), %rdi
callq 0x1002c0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x10003f
jmp 0x100038
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| wt_thd_will_wait_for:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
jmp short $+2
loc_FFDD6:
mov rdi, [rbp+var_10]
call fix_thd_pins
cmp eax, 0
jz short loc_FFDF2
jmp short $+2
loc_FFDE6:
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_10003F
loc_FFDF2:
mov rax, [rbp+var_10]
cmp qword ptr [rax+28h], 0
jnz loc_FFF0B
mov rax, [rbp+var_20]
mov [rbp+var_40], rax
mov [rbp+var_34], 10h
jmp short $+2
loc_FFE12:
jmp short $+2
loc_FFE14:
jmp short $+2
loc_FFE16:
mov rax, [rbp+var_10]
mov rsi, [rax+30h]
mov rdx, [rbp+var_40]
mov ecx, [rbp+var_34]
lea rdi, reshash
call lf_hash_search
mov [rbp+var_30], rax
cmp rax, 0
jnz short loc_FFE6C
jmp short $+2
loc_FFE3D:
jmp short $+2
loc_FFE3F:
mov rax, [rbp+var_10]
mov rsi, [rax+30h]
mov rdx, [rbp+var_20]
lea rdi, reshash
call lf_hash_insert
cmp eax, 0FFFFFFFFh
jnz short loc_FFE6A
jmp short $+2
loc_FFE5E:
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_10003F
loc_FFE6A:
jmp short loc_FFE16
loc_FFE6C:
mov eax, 1
cmp [rbp+var_30], rax
jnz short loc_FFE85
jmp short $+2
loc_FFE79:
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_10003F
loc_FFE85:
jmp short $+2
loc_FFE87:
jmp short $+2
loc_FFE89:
mov rdi, [rbp+var_30]
call rc_wrlock
mov rax, [rbp+var_30]
cmp dword ptr [rax+14h], 0
jz short loc_FFECA
jmp short $+2
loc_FFE9E:
jmp short $+2
loc_FFEA0:
mov rdi, [rbp+var_30]
call rc_unlock
jmp short $+2
loc_FFEAB:
jmp short $+2
loc_FFEAD:
mov rax, [rbp+var_10]
mov rcx, [rax+30h]
mov [rbp+var_48], 0
mov rax, [rbp+var_48]
xchg rax, [rcx+10h]
jmp loc_FFE14
loc_FFECA:
jmp short $+2
loc_FFECC:
jmp short $+2
loc_FFECE:
jmp short $+2
loc_FFED0:
mov rax, [rbp+var_10]
mov rcx, [rax+30h]
mov [rbp+var_50], 0
mov rax, [rbp+var_50]
xchg rax, [rcx+10h]
mov rcx, [rbp+var_30]
mov rax, [rbp+var_10]
mov [rax+28h], rcx
mov rax, [rbp+var_30]
mov ecx, [rax+10h]
add ecx, 1
mov [rax+10h], ecx
mov rax, [rbp+var_10]
mov byte ptr [rax+60h], 0
jmp short loc_FFF53
loc_FFF0B:
jmp short $+2
loc_FFF0D:
jmp short $+2
loc_FFF0F:
jmp short $+2
loc_FFF11:
jmp short $+2
loc_FFF13:
jmp short $+2
loc_FFF15:
jmp short $+2
loc_FFF17:
mov rax, [rbp+var_10]
mov rax, [rax+28h]
mov [rbp+var_30], rax
mov rdi, [rbp+var_30]
call rc_wrlock
jmp short $+2
loc_FFF2E:
jmp short $+2
loc_FFF30:
jmp short $+2
loc_FFF32:
mov rax, [rbp+var_10]
cmp byte ptr [rax+60h], 0
jz short loc_FFF51
mov rdi, [rbp+var_10]
call stop_waiting_locked
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_10003F
loc_FFF51:
jmp short $+2
loc_FFF53:
mov [rbp+var_24], 0
loc_FFF5A:
mov eax, [rbp+var_24]
mov rcx, [rbp+var_30]
cmp eax, [rcx+0E8h]
jnb short loc_FFF90
mov rax, [rbp+var_30]
mov rax, [rax+0E0h]
mov ecx, [rbp+var_24]
mov rax, [rax+rcx*8]
cmp rax, [rbp+var_18]
jnz short loc_FFF83
jmp short loc_FFF90
loc_FFF83:
jmp short $+2
loc_FFF85:
mov eax, [rbp+var_24]
add eax, 1
mov [rbp+var_24], eax
jmp short loc_FFF5A
loc_FFF90:
mov eax, [rbp+var_24]
mov rcx, [rbp+var_30]
cmp eax, [rcx+0E8h]
jb short loc_FFFF7
mov rdi, [rbp+var_18]
lea rsi, [rbp+var_30]
call insert_dynamic
cmp al, 0
jz short loc_FFFC2
mov rdi, [rbp+var_10]
call stop_waiting_locked
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_10003F
loc_FFFC2:
mov rdi, [rbp+var_30]
add rdi, 0E0h
lea rsi, [rbp+var_18]
call insert_dynamic
cmp al, 0
jz short loc_FFFF5
mov rdi, [rbp+var_18]
call pop_dynamic
mov rdi, [rbp+var_10]
call stop_waiting_locked
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_10003F
loc_FFFF5:
jmp short $+2
loc_FFFF7:
mov rdi, [rbp+var_30]
call rc_unlock
loc_100000:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
loc_100008:
mov rax, [rbp+var_10]
mov rax, [rax+40h]
loc_100010:
mov rax, [rax]
mov ecx, eax
mov edx, 1
call deadlock
cmp eax, 0
jz short loc_100036
mov rdi, [rbp+var_10]
loc_100028:
call stop_waiting
mov [rbp+var_4], 0FFFFFFFFh
loc_100034:
jmp short loc_10003F
loc_100036:
jmp short $+2
loc_100038:
mov [rbp+var_4], 0
loc_10003F:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
| long long wt_thd_will_wait_for(long long a1, long long *a2, long long a3)
{
long long v4; // [rsp+20h] [rbp-30h] BYREF
unsigned int i; // [rsp+2Ch] [rbp-24h]
long long v6; // [rsp+30h] [rbp-20h]
long long *v7; // [rsp+38h] [rbp-18h] BYREF
long long v8; // [rsp+40h] [rbp-10h]
v8 = a1;
v7 = a2;
v6 = a3;
if ( (unsigned int)fix_thd_pins(a1) )
{
return (unsigned int)-1;
}
else
{
if ( *(_QWORD *)(v8 + 40) )
{
v4 = *(_QWORD *)(v8 + 40);
rc_wrlock(v4);
if ( *(_BYTE *)(v8 + 96) )
{
stop_waiting_locked(v8);
return (unsigned int)-1;
}
}
else
{
while ( 1 )
{
while ( 1 )
{
v4 = lf_hash_search((long long)&reshash, *(_QWORD *)(v8 + 48), v6, 0x10u);
if ( v4 )
break;
if ( (unsigned int)lf_hash_insert((long long)&reshash, *(_QWORD *)(v8 + 48), v6) == -1 )
return (unsigned int)-1;
}
if ( v4 == 1 )
return (unsigned int)-1;
rc_wrlock(v4);
if ( !*(_DWORD *)(v4 + 20) )
break;
rc_unlock(v4);
_InterlockedExchange64((volatile long long *)(*(_QWORD *)(v8 + 48) + 16LL), 0LL);
}
_InterlockedExchange64((volatile long long *)(*(_QWORD *)(v8 + 48) + 16LL), 0LL);
*(_QWORD *)(v8 + 40) = v4;
++*(_DWORD *)(v4 + 16);
*(_BYTE *)(v8 + 96) = 0;
}
for ( i = 0; i < *(_DWORD *)(v4 + 232) && *(long long **)(*(_QWORD *)(v4 + 224) + 8LL * i) != v7; ++i )
;
if ( i >= *(_DWORD *)(v4 + 232) )
{
if ( insert_dynamic((long long)v7, (long long)&v4) )
{
stop_waiting_locked(v8);
return (unsigned int)-1;
}
if ( insert_dynamic(v4 + 224, (long long)&v7) )
{
pop_dynamic(v7);
stop_waiting_locked(v8);
return (unsigned int)-1;
}
}
rc_unlock(v4);
if ( (unsigned int)deadlock(v8, v7, 1LL, (unsigned int)**(_QWORD **)(v8 + 64)) )
{
stop_waiting(v8);
return (unsigned int)-1;
}
else
{
return 0;
}
}
}
| wt_thd_will_wait_for:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
JMP 0x001ffdd6
LAB_001ffdd6:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00200050
CMP EAX,0x0
JZ 0x001ffdf2
JMP 0x001ffde6
LAB_001ffde6:
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0020003f
LAB_001ffdf2:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x28],0x0
JNZ 0x001fff0b
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x40],RAX
MOV dword ptr [RBP + -0x34],0x10
JMP 0x001ffe12
LAB_001ffe12:
JMP 0x001ffe14
LAB_001ffe14:
JMP 0x001ffe16
LAB_001ffe16:
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x30]
MOV RDX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x34]
LEA RDI,[0xd836d0]
CALL 0x001fe550
MOV qword ptr [RBP + -0x30],RAX
CMP RAX,0x0
JNZ 0x001ffe6c
JMP 0x001ffe3d
LAB_001ffe3d:
JMP 0x001ffe3f
LAB_001ffe3f:
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x30]
MOV RDX,qword ptr [RBP + -0x20]
LEA RDI,[0xd836d0]
CALL 0x001fd530
CMP EAX,-0x1
JNZ 0x001ffe6a
JMP 0x001ffe5e
LAB_001ffe5e:
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0020003f
LAB_001ffe6a:
JMP 0x001ffe16
LAB_001ffe6c:
MOV EAX,0x1
CMP qword ptr [RBP + -0x30],RAX
JNZ 0x001ffe85
JMP 0x001ffe79
LAB_001ffe79:
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0020003f
LAB_001ffe85:
JMP 0x001ffe87
LAB_001ffe87:
JMP 0x001ffe89
LAB_001ffe89:
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x002000c0
MOV RAX,qword ptr [RBP + -0x30]
CMP dword ptr [RAX + 0x14],0x0
JZ 0x001ffeca
JMP 0x001ffe9e
LAB_001ffe9e:
JMP 0x001ffea0
LAB_001ffea0:
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x002000f0
JMP 0x001ffeab
LAB_001ffeab:
JMP 0x001ffead
LAB_001ffead:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x30]
MOV qword ptr [RBP + -0x48],0x0
MOV RAX,qword ptr [RBP + -0x48]
XCHG qword ptr [RCX + 0x10],RAX
JMP 0x001ffe14
LAB_001ffeca:
JMP 0x001ffecc
LAB_001ffecc:
JMP 0x001ffece
LAB_001ffece:
JMP 0x001ffed0
LAB_001ffed0:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x30]
MOV qword ptr [RBP + -0x50],0x0
MOV RAX,qword ptr [RBP + -0x50]
XCHG qword ptr [RCX + 0x10],RAX
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x28],RCX
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RAX + 0x10]
ADD ECX,0x1
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x60],0x0
JMP 0x001fff53
LAB_001fff0b:
JMP 0x001fff0d
LAB_001fff0d:
JMP 0x001fff0f
LAB_001fff0f:
JMP 0x001fff11
LAB_001fff11:
JMP 0x001fff13
LAB_001fff13:
JMP 0x001fff15
LAB_001fff15:
JMP 0x001fff17
LAB_001fff17:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x002000c0
JMP 0x001fff2e
LAB_001fff2e:
JMP 0x001fff30
LAB_001fff30:
JMP 0x001fff32
LAB_001fff32:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX + 0x60],0x0
JZ 0x001fff51
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00200120
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0020003f
LAB_001fff51:
JMP 0x001fff53
LAB_001fff53:
MOV dword ptr [RBP + -0x24],0x0
LAB_001fff5a:
MOV EAX,dword ptr [RBP + -0x24]
MOV RCX,qword ptr [RBP + -0x30]
CMP EAX,dword ptr [RCX + 0xe8]
JNC 0x001fff90
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0xe0]
MOV ECX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RAX + RCX*0x8]
CMP RAX,qword ptr [RBP + -0x18]
JNZ 0x001fff83
JMP 0x001fff90
LAB_001fff83:
JMP 0x001fff85
LAB_001fff85:
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,0x1
MOV dword ptr [RBP + -0x24],EAX
JMP 0x001fff5a
LAB_001fff90:
MOV EAX,dword ptr [RBP + -0x24]
MOV RCX,qword ptr [RBP + -0x30]
CMP EAX,dword ptr [RCX + 0xe8]
JC 0x001ffff7
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[RBP + -0x30]
CALL 0x001da910
CMP AL,0x0
JZ 0x001fffc2
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00200120
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0020003f
LAB_001fffc2:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0xe0
LEA RSI,[RBP + -0x18]
CALL 0x001da910
CMP AL,0x0
JZ 0x001ffff5
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001dab10
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00200120
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0020003f
LAB_001ffff5:
JMP 0x001ffff7
LAB_001ffff7:
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x002000f0
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RAX]
MOV ECX,EAX
MOV EDX,0x1
CALL 0x002001a0
CMP EAX,0x0
JZ 0x00200036
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x002002c0
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0020003f
LAB_00200036:
JMP 0x00200038
LAB_00200038:
MOV dword ptr [RBP + -0x4],0x0
LAB_0020003f:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x50
POP RBP
RET
|
int4 wt_thd_will_wait_for(long param_1,long param_2,int8 param_3)
{
int8 uVar1;
char cVar2;
int iVar3;
long local_38;
uint local_2c;
int8 local_28;
long local_20;
long local_18;
int4 local_c;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
iVar3 = fix_thd_pins(param_1);
uVar1 = local_28;
if (iVar3 == 0) {
if (*(long *)(local_18 + 0x28) == 0) {
do {
while (local_38 = lf_hash_search(reshash,*(int8 *)(local_18 + 0x30),uVar1,0x10),
local_38 != 0) {
if (local_38 == 1) {
return 0xffffffff;
}
rc_wrlock(local_38);
if (*(int *)(local_38 + 0x14) == 0) {
LOCK();
*(int8 *)(*(long *)(local_18 + 0x30) + 0x10) = 0;
UNLOCK();
*(long *)(local_18 + 0x28) = local_38;
*(int *)(local_38 + 0x10) = *(int *)(local_38 + 0x10) + 1;
*(int1 *)(local_18 + 0x60) = 0;
goto LAB_001fff53;
}
rc_unlock(local_38);
LOCK();
*(int8 *)(*(long *)(local_18 + 0x30) + 0x10) = 0;
UNLOCK();
}
iVar3 = lf_hash_insert(reshash,*(int8 *)(local_18 + 0x30),local_28);
} while (iVar3 != -1);
local_c = 0xffffffff;
}
else {
local_38 = *(long *)(local_18 + 0x28);
rc_wrlock(local_38);
if (*(char *)(local_18 + 0x60) == '\0') {
LAB_001fff53:
local_2c = 0;
while ((local_2c < *(uint *)(local_38 + 0xe8) &&
(*(long *)(*(long *)(local_38 + 0xe0) + (ulong)local_2c * 8) != local_20))) {
local_2c = local_2c + 1;
}
if (*(uint *)(local_38 + 0xe8) <= local_2c) {
cVar2 = insert_dynamic(local_20,&local_38);
if (cVar2 != '\0') {
stop_waiting_locked(local_18);
return 0xffffffff;
}
cVar2 = insert_dynamic(local_38 + 0xe0,&local_20);
if (cVar2 != '\0') {
pop_dynamic(local_20);
stop_waiting_locked(local_18);
return 0xffffffff;
}
}
rc_unlock(local_38);
iVar3 = deadlock(local_18,local_20,1,**(ulong **)(local_18 + 0x40) & 0xffffffff);
if (iVar3 == 0) {
local_c = 0;
}
else {
stop_waiting(local_18);
local_c = 0xffffffff;
}
}
else {
stop_waiting_locked(local_18);
local_c = 0xffffffff;
}
}
}
else {
local_c = 0xffffffff;
}
return local_c;
}
| |
24,284 | composition_source_over | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-blend.c | static void composition_source_over(uint32_t* dest, int length, const uint32_t* src, uint32_t const_alpha)
{
if(const_alpha == 255) {
for(int i = 0; i < length; i++) {
uint32_t s = src[i];
if(s >= 0xff000000) {
dest[i] = s;
} else if (s != 0) {
dest[i] = s + BYTE_MUL(dest[i], plutovg_alpha(~s));
}
}
} else {
for(int i = 0; i < length; i++) {
uint32_t s = BYTE_MUL(src[i], const_alpha);
dest[i] = s + BYTE_MUL(dest[i], plutovg_alpha(~s));
}
}
} | O1 | c | composition_source_over:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
cmpl $0xff, %ecx
jne 0x4155b
testl %esi, %esi
jle 0x41617
movl %esi, %eax
xorl %ecx, %ecx
movl $0xff00ff, %esi # imm = 0xFF00FF
movl $0x800080, %r8d # imm = 0x800080
movl (%rdx,%rcx,4), %r9d
cmpl $0xff000000, %r9d # imm = 0xFF000000
jb 0x414f4
movl %r9d, (%rdi,%rcx,4)
jmp 0x4154e
testl %r9d, %r9d
je 0x4154e
movl (%rdi,%rcx,4), %r10d
movl %r9d, %ebx
notl %ebx
shrl $0x18, %ebx
movl %r10d, %r11d
andl %esi, %r11d
imull %ebx, %r11d
movl %r11d, %ebp
shrl $0x8, %ebp
andl %esi, %ebp
addl %r8d, %r11d
addl %ebp, %r11d
shrl $0x8, %r11d
andl %esi, %r11d
shrl $0x8, %r10d
andl %esi, %r10d
imull %ebx, %r10d
movl %r10d, %ebx
shrl $0x8, %ebx
andl %esi, %ebx
addl %r8d, %r10d
addl %ebx, %r10d
andl $0xff00ff00, %r10d # imm = 0xFF00FF00
addl %r9d, %r10d
addl %r11d, %r10d
movl %r10d, (%rdi,%rcx,4)
incq %rcx
cmpq %rcx, %rax
jne 0x414e1
jmp 0x41617
testl %esi, %esi
jle 0x41617
movl %esi, %eax
xorl %esi, %esi
movl $0xff00ff, %r8d # imm = 0xFF00FF
movl $0x800080, %r9d # imm = 0x800080
movl $0xff00ff00, %r10d # imm = 0xFF00FF00
movl (%rdx,%rsi,4), %r11d
movl %r11d, %ebp
andl %r8d, %ebp
imull %ecx, %ebp
movl %ebp, %ebx
shrl $0x8, %ebx
andl %r8d, %ebx
addl %r9d, %ebp
addl %ebx, %ebp
shrl $0x8, %ebp
andl %r8d, %ebp
shrl $0x8, %r11d
andl %r8d, %r11d
imull %ecx, %r11d
movl %r11d, %ebx
shrl $0x8, %ebx
andl %r8d, %ebx
addl %r9d, %r11d
addl %ebx, %r11d
movl %r11d, %ebx
andl %r10d, %ebx
orl %ebp, %ebx
movl (%rdi,%rsi,4), %ebp
notl %r11d
shrl $0x18, %r11d
movl %ebp, %r14d
andl %r8d, %r14d
imull %r11d, %r14d
movl %r14d, %r15d
shrl $0x8, %r15d
andl %r8d, %r15d
addl %r9d, %r14d
addl %r15d, %r14d
shrl $0x8, %r14d
andl %r8d, %r14d
shrl $0x8, %ebp
andl %r8d, %ebp
imull %r11d, %ebp
movl %ebp, %r11d
shrl $0x8, %r11d
andl %r8d, %r11d
addl %r9d, %ebp
addl %r11d, %ebp
andl %r10d, %ebp
addl %ebx, %ebp
addl %r14d, %ebp
movl %ebp, (%rdi,%rsi,4)
incq %rsi
cmpq %rsi, %rax
jne 0x41579
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| composition_source_over:
push rbp
push r15
push r14
push rbx
cmp ecx, 0FFh
jnz loc_4155B
test esi, esi
jle loc_41617
mov eax, esi
xor ecx, ecx
mov esi, 0FF00FFh
mov r8d, 800080h
loc_414E1:
mov r9d, [rdx+rcx*4]
cmp r9d, 0FF000000h
jb short loc_414F4
mov [rdi+rcx*4], r9d
jmp short loc_4154E
loc_414F4:
test r9d, r9d
jz short loc_4154E
mov r10d, [rdi+rcx*4]
mov ebx, r9d
not ebx
shr ebx, 18h
mov r11d, r10d
and r11d, esi
imul r11d, ebx
mov ebp, r11d
shr ebp, 8
and ebp, esi
add r11d, r8d
add r11d, ebp
shr r11d, 8
and r11d, esi
shr r10d, 8
and r10d, esi
imul r10d, ebx
mov ebx, r10d
shr ebx, 8
and ebx, esi
add r10d, r8d
add r10d, ebx
and r10d, 0FF00FF00h
add r10d, r9d
add r10d, r11d
mov [rdi+rcx*4], r10d
loc_4154E:
inc rcx
cmp rax, rcx
jnz short loc_414E1
jmp loc_41617
loc_4155B:
test esi, esi
jle loc_41617
mov eax, esi
xor esi, esi
mov r8d, 0FF00FFh
mov r9d, 800080h
mov r10d, 0FF00FF00h
loc_41579:
mov r11d, [rdx+rsi*4]
mov ebp, r11d
and ebp, r8d
imul ebp, ecx
mov ebx, ebp
shr ebx, 8
and ebx, r8d
add ebp, r9d
add ebp, ebx
shr ebp, 8
and ebp, r8d
shr r11d, 8
and r11d, r8d
imul r11d, ecx
mov ebx, r11d
shr ebx, 8
and ebx, r8d
add r11d, r9d
add r11d, ebx
mov ebx, r11d
and ebx, r10d
or ebx, ebp
mov ebp, [rdi+rsi*4]
not r11d
shr r11d, 18h
mov r14d, ebp
and r14d, r8d
imul r14d, r11d
mov r15d, r14d
shr r15d, 8
and r15d, r8d
add r14d, r9d
add r14d, r15d
shr r14d, 8
and r14d, r8d
shr ebp, 8
and ebp, r8d
imul ebp, r11d
mov r11d, ebp
shr r11d, 8
and r11d, r8d
add ebp, r9d
add ebp, r11d
and ebp, r10d
add ebp, ebx
add ebp, r14d
mov [rdi+rsi*4], ebp
inc rsi
cmp rax, rsi
jnz loc_41579
loc_41617:
pop rbx
pop r14
pop r15
pop rbp
retn
| void composition_source_over(long long a1, int a2, long long a3, int a4)
{
long long i; // rcx
unsigned int v5; // r9d
unsigned int v6; // ebx
long long v7; // rax
long long j; // rsi
unsigned int v9; // r11d
if ( a4 == 255 )
{
if ( a2 > 0 )
{
for ( i = 0LL; i != a2; ++i )
{
v5 = *(_DWORD *)(a3 + 4 * i);
if ( v5 < 0xFF000000 )
{
if ( v5 )
{
v6 = ~v5 >> 24;
*(_DWORD *)(a1 + 4 * i) = ((((((v6 * (*(_DWORD *)(a1 + 4 * i) & 0xFF00FF)) >> 8) & 0xFF00FF)
+ v6 * (*(_DWORD *)(a1 + 4 * i) & 0xFF00FF)
+ 8388736) >> 8) & 0xFF00FF)
+ v5
+ (((((v6 * ((*(_DWORD *)(a1 + 4 * i) >> 8) & 0xFF00FF)) >> 8) & 0xFF00FF)
+ v6 * ((*(_DWORD *)(a1 + 4 * i) >> 8) & 0xFF00FF)
+ 8388736) & 0xFF00FF00);
}
}
else
{
*(_DWORD *)(a1 + 4 * i) = v5;
}
}
}
}
else if ( a2 > 0 )
{
v7 = (unsigned int)a2;
for ( j = 0LL; j != v7; ++j )
{
v9 = ~((((a4 * ((*(_DWORD *)(a3 + 4 * j) >> 8) & 0xFF00FFu)) >> 8) & 0xFF00FF)
+ a4 * ((*(_DWORD *)(a3 + 4 * j) >> 8) & 0xFF00FF)
+ 8388736) >> 24;
*(_DWORD *)(a1 + 4 * j) = ((((((v9 * (*(_DWORD *)(a1 + 4 * j) & 0xFF00FF)) >> 8) & 0xFF00FF)
+ v9 * (*(_DWORD *)(a1 + 4 * j) & 0xFF00FF)
+ 8388736) >> 8) & 0xFF00FF)
+ ((((((a4 * (*(_DWORD *)(a3 + 4 * j) & 0xFF00FFu)) >> 8) & 0xFF00FF)
+ a4 * (*(_DWORD *)(a3 + 4 * j) & 0xFF00FF)
+ 8388736) >> 8) & 0xFF00FF | ((((a4 * ((*(_DWORD *)(a3 + 4 * j) >> 8) & 0xFF00FFu)) >> 8) & 0xFF00FF)
+ a4 * ((*(_DWORD *)(a3 + 4 * j) >> 8) & 0xFF00FF)
+ 8388736) & 0xFF00FF00)
+ (((((v9 * ((*(_DWORD *)(a1 + 4 * j) >> 8) & 0xFF00FF)) >> 8) & 0xFF00FF)
+ v9 * ((*(_DWORD *)(a1 + 4 * j) >> 8) & 0xFF00FF)
+ 8388736) & 0xFF00FF00);
}
}
}
| composition_source_over:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
CMP ECX,0xff
JNZ 0x0014155b
TEST ESI,ESI
JLE 0x00141617
MOV EAX,ESI
XOR ECX,ECX
MOV ESI,0xff00ff
MOV R8D,0x800080
LAB_001414e1:
MOV R9D,dword ptr [RDX + RCX*0x4]
CMP R9D,0xff000000
JC 0x001414f4
MOV dword ptr [RDI + RCX*0x4],R9D
JMP 0x0014154e
LAB_001414f4:
TEST R9D,R9D
JZ 0x0014154e
MOV R10D,dword ptr [RDI + RCX*0x4]
MOV EBX,R9D
NOT EBX
SHR EBX,0x18
MOV R11D,R10D
AND R11D,ESI
IMUL R11D,EBX
MOV EBP,R11D
SHR EBP,0x8
AND EBP,ESI
ADD R11D,R8D
ADD R11D,EBP
SHR R11D,0x8
AND R11D,ESI
SHR R10D,0x8
AND R10D,ESI
IMUL R10D,EBX
MOV EBX,R10D
SHR EBX,0x8
AND EBX,ESI
ADD R10D,R8D
ADD R10D,EBX
AND R10D,0xff00ff00
ADD R10D,R9D
ADD R10D,R11D
MOV dword ptr [RDI + RCX*0x4],R10D
LAB_0014154e:
INC RCX
CMP RAX,RCX
JNZ 0x001414e1
JMP 0x00141617
LAB_0014155b:
TEST ESI,ESI
JLE 0x00141617
MOV EAX,ESI
XOR ESI,ESI
MOV R8D,0xff00ff
MOV R9D,0x800080
MOV R10D,0xff00ff00
LAB_00141579:
MOV R11D,dword ptr [RDX + RSI*0x4]
MOV EBP,R11D
AND EBP,R8D
IMUL EBP,ECX
MOV EBX,EBP
SHR EBX,0x8
AND EBX,R8D
ADD EBP,R9D
ADD EBP,EBX
SHR EBP,0x8
AND EBP,R8D
SHR R11D,0x8
AND R11D,R8D
IMUL R11D,ECX
MOV EBX,R11D
SHR EBX,0x8
AND EBX,R8D
ADD R11D,R9D
ADD R11D,EBX
MOV EBX,R11D
AND EBX,R10D
OR EBX,EBP
MOV EBP,dword ptr [RDI + RSI*0x4]
NOT R11D
SHR R11D,0x18
MOV R14D,EBP
AND R14D,R8D
IMUL R14D,R11D
MOV R15D,R14D
SHR R15D,0x8
AND R15D,R8D
ADD R14D,R9D
ADD R14D,R15D
SHR R14D,0x8
AND R14D,R8D
SHR EBP,0x8
AND EBP,R8D
IMUL EBP,R11D
MOV R11D,EBP
SHR R11D,0x8
AND R11D,R8D
ADD EBP,R9D
ADD EBP,R11D
AND EBP,R10D
ADD EBP,EBX
ADD EBP,R14D
MOV dword ptr [RDI + RSI*0x4],EBP
INC RSI
CMP RAX,RSI
JNZ 0x00141579
LAB_00141617:
POP RBX
POP R14
POP R15
POP RBP
RET
|
void composition_source_over(long param_1,uint param_2,long param_3,int param_4)
{
ulong uVar1;
uint uVar2;
uint uVar3;
uint uVar4;
uint uVar5;
uint uVar6;
if (param_4 == 0xff) {
if (0 < (int)param_2) {
uVar1 = 0;
do {
uVar4 = *(uint *)(param_3 + uVar1 * 4);
if (uVar4 < 0xff000000) {
if (uVar4 != 0) {
uVar2 = *(uint *)(param_1 + uVar1 * 4);
uVar3 = (uVar2 & 0xff00ff) * (~uVar4 >> 0x18);
uVar2 = (uVar2 >> 8 & 0xff00ff) * (~uVar4 >> 0x18);
*(uint *)(param_1 + uVar1 * 4) =
(uVar2 + 0x800080 + (uVar2 >> 8 & 0xff00ff) & 0xff00ff00) + uVar4 +
(uVar3 + 0x800080 + (uVar3 >> 8 & 0xff00ff) >> 8 & 0xff00ff);
}
}
else {
*(uint *)(param_1 + uVar1 * 4) = uVar4;
}
uVar1 = uVar1 + 1;
} while (param_2 != uVar1);
}
}
else if (0 < (int)param_2) {
uVar1 = 0;
do {
uVar4 = *(uint *)(param_3 + uVar1 * 4);
uVar2 = (uVar4 & 0xff00ff) * param_4;
uVar4 = (uVar4 >> 8 & 0xff00ff) * param_4;
uVar5 = uVar4 + 0x800080 + (uVar4 >> 8 & 0xff00ff);
uVar4 = *(uint *)(param_1 + uVar1 * 4);
uVar3 = ~uVar5 >> 0x18;
uVar6 = (uVar4 & 0xff00ff) * uVar3;
uVar3 = (uVar4 >> 8 & 0xff00ff) * uVar3;
*(uint *)(param_1 + uVar1 * 4) =
(uVar3 + 0x800080 + (uVar3 >> 8 & 0xff00ff) & 0xff00ff00) +
(uVar5 & 0xff00ff00 | uVar2 + 0x800080 + (uVar2 >> 8 & 0xff00ff) >> 8 & 0xff00ff) +
(uVar6 + 0x800080 + (uVar6 >> 8 & 0xff00ff) >> 8 & 0xff00ff);
uVar1 = uVar1 + 1;
} while (param_2 != uVar1);
}
return;
}
| |
24,285 | bitmap_fast_test_and_clear | eloqsql/mysys/my_bitmap.c | my_bool bitmap_fast_test_and_clear(MY_BITMAP *map, uint bitmap_bit)
{
uchar *byte= (uchar*) map->bitmap + (bitmap_bit / 8);
uchar bit= 1 << ((bitmap_bit) & 7);
uchar res= (*byte) & bit;
*byte&= ~bit;
return res;
} | O3 | c | bitmap_fast_test_and_clear:
pushq %rbp
movq %rsp, %rbp
movl %esi, %ecx
movq (%rdi), %rdx
andb $0x7, %cl
movl $0x1, %edi
shll %cl, %edi
shrl $0x3, %esi
movb (%rdx,%rsi), %cl
movl %ecx, %eax
andb %dil, %al
notb %dil
andb %cl, %dil
movb %dil, (%rdx,%rsi)
popq %rbp
retq
| bitmap_fast_test_and_clear:
push rbp
mov rbp, rsp
mov ecx, esi
mov rdx, [rdi]
and cl, 7
mov edi, 1
shl edi, cl
shr esi, 3
mov cl, [rdx+rsi]
mov eax, ecx
and al, dil
not dil
and dil, cl
mov [rdx+rsi], dil
pop rbp
retn
| char bitmap_fast_test_and_clear(long long *a1, unsigned int a2)
{
long long v2; // rdx
int v3; // edi
long long v4; // rsi
char v5; // cl
char result; // al
v2 = *a1;
v3 = 1 << (a2 & 7);
v4 = a2 >> 3;
v5 = *(_BYTE *)(v2 + v4);
result = v3 & v5;
*(_BYTE *)(v2 + v4) = v5 & ~(_BYTE)v3;
return result;
}
| bitmap_fast_test_and_clear:
PUSH RBP
MOV RBP,RSP
MOV ECX,ESI
MOV RDX,qword ptr [RDI]
AND CL,0x7
MOV EDI,0x1
SHL EDI,CL
SHR ESI,0x3
MOV CL,byte ptr [RDX + RSI*0x1]
MOV EAX,ECX
AND AL,DIL
NOT DIL
AND DIL,CL
MOV byte ptr [RDX + RSI*0x1],DIL
POP RBP
RET
|
int8 bitmap_fast_test_and_clear(long *param_1,ulong param_2)
{
byte bVar1;
ulong uVar2;
byte bVar3;
uVar2 = param_2 >> 3 & 0x1fffffff;
bVar1 = *(byte *)(*param_1 + uVar2);
bVar3 = (byte)(1 << (sbyte)(param_2 & 0xffffff07));
*(byte *)(*param_1 + uVar2) = ~bVar3 & bVar1;
return CONCAT71((int7)((param_2 & 0xffffff07) >> 8),bVar1 & bVar3);
}
| |
24,286 | LefDefParser::lefiMaxStackVia::Destroy() | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiMisc.cpp | void
lefiMaxStackVia::Destroy()
{
if (bottomLayer_)
lefFree(bottomLayer_);
if (topLayer_)
lefFree(topLayer_);
bottomLayer_ = 0;
topLayer_ = 0;
hasRange_ = 0;
value_ = 0;
} | O3 | cpp | LefDefParser::lefiMaxStackVia::Destroy():
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0xdce0
callq 0x322d0
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xdcee
callq 0x322d0
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
popq %rbx
retq
| _ZN12LefDefParser15lefiMaxStackVia7DestroyEv:
push rbx
mov rbx, rdi
mov rdi, [rdi+8]; this
test rdi, rdi
jz short loc_DCE0
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
loc_DCE0:
mov rdi, [rbx+10h]; this
test rdi, rdi
jz short loc_DCEE
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
loc_DCEE:
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
mov qword ptr [rbx+10h], 0
pop rbx
retn
| long long LefDefParser::lefiMaxStackVia::Destroy(LefDefParser::lefiMaxStackVia *this, void *a2)
{
LefDefParser *v3; // rdi
long long result; // rax
LefDefParser *v5; // rdi
v3 = (LefDefParser *)*((_QWORD *)this + 1);
if ( v3 )
result = LefDefParser::lefFree(v3, a2);
v5 = (LefDefParser *)*((_QWORD *)this + 2);
if ( v5 )
result = LefDefParser::lefFree(v5, a2);
*(_OWORD *)this = 0LL;
*((_QWORD *)this + 2) = 0LL;
return result;
}
| Destroy:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x8]
TEST RDI,RDI
JZ 0x0010dce0
CALL 0x001322d0
LAB_0010dce0:
MOV RDI,qword ptr [RBX + 0x10]
TEST RDI,RDI
JZ 0x0010dcee
CALL 0x001322d0
LAB_0010dcee:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOV qword ptr [RBX + 0x10],0x0
POP RBX
RET
|
/* LefDefParser::lefiMaxStackVia::Destroy() */
void __thiscall LefDefParser::lefiMaxStackVia::Destroy(lefiMaxStackVia *this)
{
if (*(void **)(this + 8) != (void *)0x0) {
lefFree(*(void **)(this + 8));
}
if (*(void **)(this + 0x10) != (void *)0x0) {
lefFree(*(void **)(this + 0x10));
}
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
return;
}
| |
24,287 | testing::internal::CapturedStream::~CapturedStream() | AlayaLite/build_O3/_deps/googletest-src/googletest/src/gtest-port.cc | ~CapturedStream() { remove(filename_.c_str()); } | O3 | cpp | testing::internal::CapturedStream::~CapturedStream():
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x11260
movq 0x8(%rbx), %rdi
addq $0x18, %rbx
cmpq %rbx, %rdi
je 0x77f5e
movq (%rbx), %rsi
incq %rsi
popq %rbx
jmp 0x11120
popq %rbx
retq
| _ZN7testing8internal14CapturedStreamD2Ev:
push rbx
mov rbx, rdi
mov rdi, [rdi+8]
call _remove
mov rdi, [rbx+8]; void *
add rbx, 18h
cmp rdi, rbx
jz short loc_77F5E
mov rsi, [rbx]
inc rsi; unsigned __int64
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
loc_77F5E:
pop rbx
retn
| void testing::internal::CapturedStream::~CapturedStream(testing::internal::CapturedStream *this)
{
_QWORD *v2; // rdi
_QWORD *v3; // rbx
remove(*((_QWORD *)this + 1));
v2 = (_QWORD *)*((_QWORD *)this + 1);
v3 = (_QWORD *)((char *)this + 24);
if ( v2 != v3 )
operator delete(v2, *v3 + 1LL);
}
| ~CapturedStream:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x8]
CALL 0x00111260
MOV RDI,qword ptr [RBX + 0x8]
ADD RBX,0x18
CMP RDI,RBX
JZ 0x00177f5e
MOV RSI,qword ptr [RBX]
INC RSI
POP RBX
JMP 0x00111120
LAB_00177f5e:
POP RBX
RET
|
/* testing::internal::CapturedStream::~CapturedStream() */
void __thiscall testing::internal::CapturedStream::~CapturedStream(CapturedStream *this)
{
remove(*(char **)(this + 8));
if (*(CapturedStream **)(this + 8) != this + 0x18) {
operator_delete(*(CapturedStream **)(this + 8),*(long *)(this + 0x18) + 1);
return;
}
return;
}
| |
24,288 | CLI::App::get_options(std::function<bool (CLI::Option const*)>) const | MikePodsytnik[P]TCRtrie/build_O2/_deps/cli11-src/include/CLI/impl/App_inl.hpp | CLI11_INLINE std::vector<const Option *> App::get_options(const std::function<bool(const Option *)> filter) const {
std::vector<const Option *> options(options_.size());
std::transform(
std::begin(options_), std::end(options_), std::begin(options), [](const Option_p &val) { return val.get(); });
if(filter) {
options.erase(std::remove_if(std::begin(options),
std::end(options),
[&filter](const Option *opt) { return !filter(opt); }),
std::end(options));
}
return options;
} | O2 | cpp | CLI::App::get_options(std::function<bool (CLI::Option const*)>) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0xe0(%rsi), %rsi
subq 0xd8(%r15), %rsi
sarq $0x3, %rsi
leaq 0xf(%rsp), %rdx
callq 0xe456
movq 0xd8(%r15), %rax
movq 0xe0(%r15), %rcx
movq (%rbx), %rdx
cmpq %rcx, %rax
je 0x96d8
movq (%rax), %rsi
movq %rsi, (%rdx)
addq $0x8, %rax
addq $0x8, %rdx
jmp 0x96c3
cmpq $0x0, 0x10(%r14)
je 0x96fd
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
movq %r14, %rdx
callq 0xe602
movq 0x8(%rbx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xe4a8
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x970c
movq %rax, %r14
movq %rbx, %rdi
callq 0xe4da
movq %r14, %rdi
callq 0x7770
| _ZNK3CLI3App11get_optionsESt8functionIFbPKNS_6OptionEEE:
push r15
push r14
push rbx
sub rsp, 10h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov rsi, [rsi+0E0h]
sub rsi, [r15+0D8h]
sar rsi, 3
lea rdx, [rsp+28h+var_19]
call _ZNSt6vectorIPKN3CLI6OptionESaIS3_EEC2EmRKS4_; std::vector<CLI::Option const*>::vector(ulong,std::allocator<CLI::Option const*> const&)
mov rax, [r15+0D8h]
mov rcx, [r15+0E0h]
mov rdx, [rbx]
loc_96C3:
cmp rax, rcx
jz short loc_96D8
mov rsi, [rax]
mov [rdx], rsi
add rax, 8
add rdx, 8
jmp short loc_96C3
loc_96D8:
cmp qword ptr [r14+10h], 0
jz short loc_96FD
mov rdi, [rbx]
mov rsi, [rbx+8]
mov rdx, r14
call _ZSt11__remove_ifIN9__gnu_cxx17__normal_iteratorIPPKN3CLI6OptionESt6vectorIS5_SaIS5_EEEENS0_5__ops10_Iter_predIZNKS2_3App11get_optionsESt8functionIFbS5_EEEUlS5_E_EEET_SJ_SJ_T0_; std::__remove_if<__gnu_cxx::__normal_iterator<CLI::Option const**,std::vector<CLI::Option const*>>,__gnu_cxx::__ops::_Iter_pred<CLI::App::get_options(std::function<bool ()(CLI::Option const*)>)::{lambda(CLI::Option const*)#1}>>(__gnu_cxx::__normal_iterator<CLI::Option const**,std::vector<CLI::Option const*>>,__gnu_cxx::__normal_iterator<CLI::Option const**,std::vector<CLI::Option const*>>,__gnu_cxx::__ops::_Iter_pred<CLI::App::get_options(std::function<bool ()(CLI::Option const*)>)::{lambda(CLI::Option const*)#1}>)
mov rdx, [rbx+8]
mov rdi, rbx
mov rsi, rax
call _ZNSt6vectorIPKN3CLI6OptionESaIS3_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS3_S5_EESA_; std::vector<CLI::Option const*>::erase(__gnu_cxx::__normal_iterator<CLI::Option const* const*,std::vector<CLI::Option const*>>,__gnu_cxx::__normal_iterator<CLI::Option const* const*,std::vector<CLI::Option const*>>)
loc_96FD:
mov rax, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
retn
jmp short $+2
loc_970C:
mov r14, rax
mov rdi, rbx
call _ZNSt12_Vector_baseIPKN3CLI6OptionESaIS3_EED2Ev; std::_Vector_base<CLI::Option const*>::~_Vector_base()
mov rdi, r14
call __Unwind_Resume
| _QWORD * CLI::App::get_options(_QWORD *a1, long long a2, long long a3)
{
_QWORD *v4; // rax
_QWORD *v5; // rcx
_QWORD *v6; // rdx
long long v7; // rax
_BYTE v9[25]; // [rsp+Fh] [rbp-19h] BYREF
std::vector<CLI::Option const*>::vector(a1, (long long)(*(_QWORD *)(a2 + 224) - *(_QWORD *)(a2 + 216)) >> 3, v9);
v4 = *(_QWORD **)(a2 + 216);
v5 = *(_QWORD **)(a2 + 224);
v6 = (_QWORD *)*a1;
while ( v4 != v5 )
*v6++ = *v4++;
if ( *(_QWORD *)(a3 + 16) )
{
v7 = std::__remove_if<__gnu_cxx::__normal_iterator<CLI::Option const**,std::vector<CLI::Option const*>>,__gnu_cxx::__ops::_Iter_pred<CLI::App::get_options(std::function<bool ()(CLI::Option const*)>)::{lambda(CLI::Option const*)#1}>>(
*a1,
a1[1],
a3);
std::vector<CLI::Option const*>::erase(a1, v7, a1[1]);
}
return a1;
}
| get_options:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV RSI,qword ptr [RSI + 0xe0]
SUB RSI,qword ptr [R15 + 0xd8]
SAR RSI,0x3
LEA RDX,[RSP + 0xf]
CALL 0x0010e456
MOV RAX,qword ptr [R15 + 0xd8]
MOV RCX,qword ptr [R15 + 0xe0]
MOV RDX,qword ptr [RBX]
LAB_001096c3:
CMP RAX,RCX
JZ 0x001096d8
MOV RSI,qword ptr [RAX]
MOV qword ptr [RDX],RSI
ADD RAX,0x8
ADD RDX,0x8
JMP 0x001096c3
LAB_001096d8:
CMP qword ptr [R14 + 0x10],0x0
JZ 0x001096fd
MOV RDI,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x8]
LAB_001096e6:
MOV RDX,R14
CALL 0x0010e602
MOV RDX,qword ptr [RBX + 0x8]
LAB_001096f2:
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0010e4a8
LAB_001096fd:
MOV RAX,RBX
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
/* CLI::App::get_options(std::function<bool (CLI::Option const*)>) const */
vector<CLI::Option_const*,std::allocator<CLI::Option_const*>> *
CLI::App::get_options
(vector<CLI::Option_const*,std::allocator<CLI::Option_const*>> *param_1,long param_2,
long param_3)
{
int8 *puVar1;
int8 *puVar2;
int8 uVar3;
int8 *puVar4;
allocator local_19;
std::vector<CLI::Option_const*,std::allocator<CLI::Option_const*>>::vector
(param_1,*(long *)(param_2 + 0xe0) - *(long *)(param_2 + 0xd8) >> 3,&local_19);
puVar1 = *(int8 **)(param_2 + 0xe0);
puVar4 = *(int8 **)param_1;
for (puVar2 = *(int8 **)(param_2 + 0xd8); puVar2 != puVar1; puVar2 = puVar2 + 1) {
*puVar4 = *puVar2;
puVar4 = puVar4 + 1;
}
if (*(long *)(param_3 + 0x10) != 0) {
/* try { // try from 001096e6 to 001096ed has its CatchHandler @ 0010970c */
uVar3 = std::
__remove_if<__gnu_cxx::__normal_iterator<CLI::Option_const**,std::vector<CLI::Option_const*,std::allocator<CLI::Option_const*>>>,__gnu_cxx::__ops::_Iter_pred<CLI::App::get_options(std::function<bool(CLI::Option_const*)>)const::_lambda(CLI::Option_const*)_1_>>
(*(int8 *)param_1,*(int8 *)(param_1 + 8),param_3);
/* try { // try from 001096f2 to 001096fc has its CatchHandler @ 0010970a */
std::vector<CLI::Option_const*,std::allocator<CLI::Option_const*>>::erase
(param_1,uVar3,*(int8 *)(param_1 + 8));
}
return param_1;
}
| |
24,289 | parse_cpu_mask(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512]) | monkey531[P]llama/common/common.cpp | bool parse_cpu_mask(const std::string & mask, bool (&boolmask)[GGML_MAX_N_THREADS]) {
// Discard potential 0x prefix
size_t start_i = 0;
if (mask.length() >= 2 && mask.substr(0, 2) == "0x") {
start_i = 2;
}
size_t num_digits = mask.length() - start_i;
if (num_digits > 128) num_digits = 128;
size_t end_i = num_digits + start_i;
for (size_t i = start_i, n = (num_digits*4 - 1); i < end_i; i++, n-=4) {
char c = mask.at(i);
int8_t id = c;
if ((c >= '0' && c <= '9')) {
id -= '0';
} else if (c >= 'a' && c <= 'f') {
id -= 'a' - 10;
} else if (c >= 'A' && c <= 'F') {
id -= 'A' - 10;
} else {
LOG_ERR("Invalid hex character '%c' at position %d\n", c, int32_t(i));
return false;
}
boolmask[ n ] = boolmask[ n ] || ((id & 8) != 0);
boolmask[n - 1] = boolmask[n - 1] || ((id & 4) != 0);
boolmask[n - 2] = boolmask[n - 2] || ((id & 2) != 0);
boolmask[n - 3] = boolmask[n - 3] || ((id & 1) != 0);
}
return true;
} | O0 | cpp | parse_cpu_mask(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512]):
subq $0x98, %rsp
movq %rdi, 0x88(%rsp)
movq %rsi, 0x80(%rsp)
movq $0x0, 0x78(%rsp)
movq 0x88(%rsp), %rdi
callq 0x5a9f0
movq %rax, %rcx
movb $0x0, 0x57(%rsp)
xorl %eax, %eax
cmpq $0x2, %rcx
movb %al, 0x1d(%rsp)
jb 0xeb507
movq 0x88(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edx
leaq 0x58(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movl $0x2, %ecx
callq 0x5b100
movq 0x10(%rsp), %rdi
movb $0x1, 0x57(%rsp)
leaq 0x12dd8b(%rip), %rsi # 0x21927d
callq 0x8b980
movb %al, 0x1c(%rsp)
jmp 0xeb4fd
movb 0x1c(%rsp), %al
movb %al, 0x1d(%rsp)
jmp 0xeb507
movb 0x1d(%rsp), %al
movb %al, 0xf(%rsp)
testb $0x1, 0x57(%rsp)
jne 0xeb518
jmp 0xeb522
leaq 0x58(%rsp), %rdi
callq 0x5b528
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0xeb52c
jmp 0xeb55d
movq $0x2, 0x78(%rsp)
jmp 0xeb55d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
testb $0x1, 0x57(%rsp)
jne 0xeb54e
jmp 0xeb558
leaq 0x58(%rsp), %rdi
callq 0x5b528
jmp 0xeb7f0
movq 0x88(%rsp), %rdi
callq 0x5a9f0
subq 0x78(%rsp), %rax
movq %rax, 0x38(%rsp)
cmpq $0x80, 0x38(%rsp)
jbe 0xeb588
movq $0x80, 0x38(%rsp)
movq 0x38(%rsp), %rax
addq 0x78(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x38(%rsp), %rax
shlq $0x2, %rax
subq $0x1, %rax
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x30(%rsp), %rax
jae 0xeb7d7
movq 0x88(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x5ade0
movb (%rax), %al
movb %al, 0x1f(%rsp)
movb 0x1f(%rsp), %al
movb %al, 0x1e(%rsp)
movsbl 0x1f(%rsp), %eax
cmpl $0x30, %eax
jl 0xeb608
movsbl 0x1f(%rsp), %eax
cmpl $0x39, %eax
jg 0xeb608
movsbl 0x1e(%rsp), %eax
subl $0x30, %eax
movb %al, 0x1e(%rsp)
jmp 0xeb696
movsbl 0x1f(%rsp), %eax
cmpl $0x61, %eax
jl 0xeb62a
movsbl 0x1f(%rsp), %eax
cmpl $0x66, %eax
jg 0xeb62a
movsbl 0x1e(%rsp), %eax
subl $0x57, %eax
movb %al, 0x1e(%rsp)
jmp 0xeb694
movsbl 0x1f(%rsp), %eax
cmpl $0x41, %eax
jl 0xeb64c
movsbl 0x1f(%rsp), %eax
cmpl $0x46, %eax
jg 0xeb64c
movsbl 0x1e(%rsp), %eax
subl $0x37, %eax
movb %al, 0x1e(%rsp)
jmp 0xeb692
jmp 0xeb64e
xorl %eax, %eax
leaq 0x1b7f91(%rip), %rcx # 0x2a35e8
cmpl (%rcx), %eax
jg 0xeb683
callq 0x1be200
movq %rax, %rdi
movsbl 0x1f(%rsp), %ecx
movq 0x28(%rsp), %rax
movl %eax, %r8d
movl $0x4, %esi
leaq 0x12401a(%rip), %rdx # 0x20f696
movb $0x0, %al
callq 0x1be2f0
jmp 0xeb685
movb $0x0, 0x97(%rsp)
jmp 0xeb7df
jmp 0xeb694
jmp 0xeb696
movq 0x80(%rsp), %rcx
movq 0x20(%rsp), %rdx
movb $0x1, %al
testb $0x1, (%rcx,%rdx)
movb %al, 0xe(%rsp)
jne 0xeb6c1
movsbl 0x1e(%rsp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
setne %al
movb %al, 0xe(%rsp)
movb 0xe(%rsp), %dl
movq 0x80(%rsp), %rax
movq 0x20(%rsp), %rcx
andb $0x1, %dl
movb %dl, (%rax,%rcx)
movq 0x80(%rsp), %rcx
movq 0x20(%rsp), %rdx
subq $0x1, %rdx
movb $0x1, %al
testb $0x1, (%rcx,%rdx)
movb %al, 0xd(%rsp)
jne 0xeb707
movsbl 0x1e(%rsp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
setne %al
movb %al, 0xd(%rsp)
movb 0xd(%rsp), %dl
movq 0x80(%rsp), %rax
movq 0x20(%rsp), %rcx
subq $0x1, %rcx
andb $0x1, %dl
movb %dl, (%rax,%rcx)
movq 0x80(%rsp), %rcx
movq 0x20(%rsp), %rdx
subq $0x2, %rdx
movb $0x1, %al
testb $0x1, (%rcx,%rdx)
movb %al, 0xc(%rsp)
jne 0xeb751
movsbl 0x1e(%rsp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
setne %al
movb %al, 0xc(%rsp)
movb 0xc(%rsp), %dl
movq 0x80(%rsp), %rax
movq 0x20(%rsp), %rcx
subq $0x2, %rcx
andb $0x1, %dl
movb %dl, (%rax,%rcx)
movq 0x80(%rsp), %rcx
movq 0x20(%rsp), %rdx
subq $0x3, %rdx
movb $0x1, %al
testb $0x1, (%rcx,%rdx)
movb %al, 0xb(%rsp)
jne 0xeb79b
movsbl 0x1e(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
setne %al
movb %al, 0xb(%rsp)
movb 0xb(%rsp), %dl
movq 0x80(%rsp), %rax
movq 0x20(%rsp), %rcx
subq $0x3, %rcx
andb $0x1, %dl
movb %dl, (%rax,%rcx)
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
movq 0x20(%rsp), %rax
subq $0x4, %rax
movq %rax, 0x20(%rsp)
jmp 0xeb5b3
movb $0x1, 0x97(%rsp)
movb 0x97(%rsp), %al
andb $0x1, %al
addq $0x98, %rsp
retq
movq 0x48(%rsp), %rdi
callq 0x5aba0
nopw (%rax,%rax)
| _Z14parse_cpu_maskRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA512_b:
sub rsp, 98h
mov [rsp+98h+var_10], rdi
mov [rsp+98h+var_18], rsi
mov [rsp+98h+var_20], 0
mov rdi, [rsp+98h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void)
mov rcx, rax
mov [rsp+98h+var_41], 0
xor eax, eax
cmp rcx, 2
mov [rsp+98h+var_7B], al
jb short loc_EB507
mov rsi, [rsp+98h+var_10]
xor eax, eax
mov edx, eax
lea rdi, [rsp+98h+var_40]
mov [rsp+98h+var_88], rdi
mov ecx, 2
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rdi, [rsp+98h+var_88]
mov [rsp+98h+var_41], 1
lea rsi, aInvalidByte0x+0Eh; "0x"
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
mov [rsp+98h+var_7C], al
jmp short $+2
loc_EB4FD:
mov al, [rsp+98h+var_7C]
mov [rsp+98h+var_7B], al
jmp short $+2
loc_EB507:
mov al, [rsp+98h+var_7B]
mov [rsp+98h+var_89], al
test [rsp+98h+var_41], 1
jnz short loc_EB518
jmp short loc_EB522
loc_EB518:
lea rdi, [rsp+98h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_EB522:
mov al, [rsp+98h+var_89]
test al, 1
jnz short loc_EB52C
jmp short loc_EB55D
loc_EB52C:
mov [rsp+98h+var_20], 2
jmp short loc_EB55D
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
test [rsp+arg_4F], 1
jnz short loc_EB54E
jmp short loc_EB558
loc_EB54E:
lea rdi, [rsp+arg_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_EB558:
jmp loc_EB7F0
loc_EB55D:
mov rdi, [rsp+98h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void)
sub rax, [rsp+98h+var_20]
mov [rsp+98h+var_60], rax
cmp [rsp+98h+var_60], 80h
jbe short loc_EB588
mov [rsp+98h+var_60], 80h
loc_EB588:
mov rax, [rsp+98h+var_60]
add rax, [rsp+98h+var_20]
mov [rsp+98h+var_68], rax
mov rax, [rsp+98h+var_20]
mov [rsp+98h+var_70], rax
mov rax, [rsp+98h+var_60]
shl rax, 2
sub rax, 1
mov [rsp+98h+var_78], rax
loc_EB5B3:
mov rax, [rsp+98h+var_70]
cmp rax, [rsp+98h+var_68]
jnb loc_EB7D7
mov rdi, [rsp+98h+var_10]
mov rsi, [rsp+98h+var_70]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE2atEm; std::string::at(ulong)
mov al, [rax]
mov [rsp+98h+var_79], al
mov al, [rsp+98h+var_79]
mov [rsp+98h+var_7A], al
movsx eax, [rsp+98h+var_79]
cmp eax, 30h ; '0'
jl short loc_EB608
movsx eax, [rsp+98h+var_79]
cmp eax, 39h ; '9'
jg short loc_EB608
movsx eax, [rsp+98h+var_7A]
sub eax, 30h ; '0'
mov [rsp+98h+var_7A], al
jmp loc_EB696
loc_EB608:
movsx eax, [rsp+98h+var_79]
cmp eax, 61h ; 'a'
jl short loc_EB62A
movsx eax, [rsp+98h+var_79]
cmp eax, 66h ; 'f'
jg short loc_EB62A
movsx eax, [rsp+98h+var_7A]
sub eax, 57h ; 'W'
mov [rsp+98h+var_7A], al
jmp short loc_EB694
loc_EB62A:
movsx eax, [rsp+98h+var_79]
cmp eax, 41h ; 'A'
jl short loc_EB64C
movsx eax, [rsp+98h+var_79]
cmp eax, 46h ; 'F'
jg short loc_EB64C
movsx eax, [rsp+98h+var_7A]
sub eax, 37h ; '7'
mov [rsp+98h+var_7A], al
jmp short loc_EB692
loc_EB64C:
jmp short $+2
loc_EB64E:
xor eax, eax
lea rcx, common_log_verbosity_thold
cmp eax, [rcx]
jg short loc_EB683
call _Z15common_log_mainv; common_log_main(void)
mov rdi, rax
movsx ecx, [rsp+98h+var_79]
mov rax, [rsp+98h+var_70]
mov r8d, eax
mov esi, 4
lea rdx, aInvalidHexChar; "Invalid hex character '%c' at position "...
mov al, 0
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
loc_EB683:
jmp short $+2
loc_EB685:
mov [rsp+98h+var_1], 0
jmp loc_EB7DF
loc_EB692:
jmp short $+2
loc_EB694:
jmp short $+2
loc_EB696:
mov rcx, [rsp+98h+var_18]
mov rdx, [rsp+98h+var_78]
mov al, 1
test byte ptr [rcx+rdx], 1
mov [rsp+98h+var_8A], al
jnz short loc_EB6C1
movsx eax, [rsp+98h+var_7A]
and eax, 8
cmp eax, 0
setnz al
mov [rsp+98h+var_8A], al
loc_EB6C1:
mov dl, [rsp+98h+var_8A]
mov rax, [rsp+98h+var_18]
mov rcx, [rsp+98h+var_78]
and dl, 1
mov [rax+rcx], dl
mov rcx, [rsp+98h+var_18]
mov rdx, [rsp+98h+var_78]
sub rdx, 1
mov al, 1
test byte ptr [rcx+rdx], 1
mov [rsp+98h+var_8B], al
jnz short loc_EB707
movsx eax, [rsp+98h+var_7A]
and eax, 4
cmp eax, 0
setnz al
mov [rsp+98h+var_8B], al
loc_EB707:
mov dl, [rsp+98h+var_8B]
mov rax, [rsp+98h+var_18]
mov rcx, [rsp+98h+var_78]
sub rcx, 1
and dl, 1
mov [rax+rcx], dl
mov rcx, [rsp+98h+var_18]
mov rdx, [rsp+98h+var_78]
sub rdx, 2
mov al, 1
test byte ptr [rcx+rdx], 1
mov [rsp+98h+var_8C], al
jnz short loc_EB751
movsx eax, [rsp+98h+var_7A]
and eax, 2
cmp eax, 0
setnz al
mov [rsp+98h+var_8C], al
loc_EB751:
mov dl, [rsp+98h+var_8C]
mov rax, [rsp+98h+var_18]
mov rcx, [rsp+98h+var_78]
sub rcx, 2
and dl, 1
mov [rax+rcx], dl
mov rcx, [rsp+98h+var_18]
mov rdx, [rsp+98h+var_78]
sub rdx, 3
mov al, 1
test byte ptr [rcx+rdx], 1
mov [rsp+98h+var_8D], al
jnz short loc_EB79B
movsx eax, [rsp+98h+var_7A]
and eax, 1
cmp eax, 0
setnz al
mov [rsp+98h+var_8D], al
loc_EB79B:
mov dl, [rsp+98h+var_8D]
mov rax, [rsp+98h+var_18]
mov rcx, [rsp+98h+var_78]
sub rcx, 3
and dl, 1
mov [rax+rcx], dl
mov rax, [rsp+98h+var_70]
add rax, 1
mov [rsp+98h+var_70], rax
mov rax, [rsp+98h+var_78]
sub rax, 4
mov [rsp+98h+var_78], rax
jmp loc_EB5B3
loc_EB7D7:
mov [rsp+98h+var_1], 1
loc_EB7DF:
mov al, [rsp+98h+var_1]
and al, 1
add rsp, 98h
retn
loc_EB7F0:
mov rdi, [rsp+arg_40]
call __Unwind_Resume
| char parse_cpu_mask(long long a1, long long a2)
{
long long v2; // rax
int v3; // eax
int v4; // r9d
bool v6; // [rsp+Bh] [rbp-8Dh]
bool v7; // [rsp+Ch] [rbp-8Ch]
bool v8; // [rsp+Dh] [rbp-8Bh]
bool v9; // [rsp+Eh] [rbp-8Ah]
bool v10; // [rsp+1Dh] [rbp-7Bh]
char v11; // [rsp+1Eh] [rbp-7Ah]
char v12; // [rsp+1Fh] [rbp-79h]
long long i; // [rsp+20h] [rbp-78h]
unsigned long long v14; // [rsp+28h] [rbp-70h]
unsigned long long v15; // [rsp+30h] [rbp-68h]
long long v16; // [rsp+38h] [rbp-60h]
char v17; // [rsp+57h] [rbp-41h]
_BYTE v18[32]; // [rsp+58h] [rbp-40h] BYREF
long long v19; // [rsp+78h] [rbp-20h]
long long v20; // [rsp+80h] [rbp-18h]
long long v21; // [rsp+88h] [rbp-10h]
v21 = a1;
v20 = a2;
v19 = 0LL;
v17 = 0;
v10 = 0;
if ( (unsigned long long)std::string::length(a1) >= 2 )
{
std::string::substr(v18, v21, 0LL, 2LL);
v17 = 1;
v10 = std::operator==<char>((long long)v18, (long long)"0x");
}
if ( (v17 & 1) != 0 )
std::string::~string(v18);
if ( v10 )
v19 = 2LL;
v2 = std::string::length(v21);
v16 = v2 - v19;
if ( (unsigned long long)(v2 - v19) > 0x80 )
v16 = 128LL;
v15 = v19 + v16;
v14 = v19;
for ( i = 4 * v16 - 1; ; i -= 4LL )
{
if ( v14 >= v15 )
return 1;
v12 = *(_BYTE *)std::string::at(v21, v14);
if ( v12 >= 48 && v12 <= 57 )
{
v11 = v12 - 48;
goto LABEL_23;
}
if ( v12 >= 97 && v12 <= 102 )
{
v11 = v12 - 87;
goto LABEL_23;
}
if ( v12 < 65 || v12 > 70 )
break;
v11 = v12 - 55;
LABEL_23:
v9 = 1;
if ( (*(_BYTE *)(v20 + i) & 1) == 0 )
v9 = (v11 & 8) != 0;
*(_BYTE *)(v20 + i) = v9;
v8 = 1;
if ( (*(_BYTE *)(v20 + i - 1) & 1) == 0 )
v8 = (v11 & 4) != 0;
*(_BYTE *)(v20 + i - 1) = v8;
v7 = 1;
if ( (*(_BYTE *)(v20 + i - 2) & 1) == 0 )
v7 = (v11 & 2) != 0;
*(_BYTE *)(v20 + i - 2) = v7;
v6 = 1;
if ( (*(_BYTE *)(v20 + i - 3) & 1) == 0 )
v6 = (v11 & 1) != 0;
*(_BYTE *)(v20 + i - 3) = v6;
++v14;
}
if ( common_log_verbosity_thold >= 0 )
{
v3 = common_log_main();
common_log_add(v3, 4, (unsigned int)"Invalid hex character '%c' at position %d\n", v12, v14, v4);
}
return 0;
}
| parse_cpu_mask:
SUB RSP,0x98
MOV qword ptr [RSP + 0x88],RDI
MOV qword ptr [RSP + 0x80],RSI
MOV qword ptr [RSP + 0x78],0x0
MOV RDI,qword ptr [RSP + 0x88]
CALL 0x0015a9f0
MOV RCX,RAX
MOV byte ptr [RSP + 0x57],0x0
XOR EAX,EAX
CMP RCX,0x2
MOV byte ptr [RSP + 0x1d],AL
JC 0x001eb507
MOV RSI,qword ptr [RSP + 0x88]
XOR EAX,EAX
MOV EDX,EAX
LEA RDI,[RSP + 0x58]
MOV qword ptr [RSP + 0x10],RDI
MOV ECX,0x2
CALL 0x0015b100
MOV RDI,qword ptr [RSP + 0x10]
MOV byte ptr [RSP + 0x57],0x1
LAB_001eb4eb:
LEA RSI,[0x31927d]
CALL 0x0018b980
LAB_001eb4f7:
MOV byte ptr [RSP + 0x1c],AL
JMP 0x001eb4fd
LAB_001eb4fd:
MOV AL,byte ptr [RSP + 0x1c]
MOV byte ptr [RSP + 0x1d],AL
JMP 0x001eb507
LAB_001eb507:
MOV AL,byte ptr [RSP + 0x1d]
MOV byte ptr [RSP + 0xf],AL
TEST byte ptr [RSP + 0x57],0x1
JNZ 0x001eb518
JMP 0x001eb522
LAB_001eb518:
LEA RDI,[RSP + 0x58]
CALL 0x0015b528
LAB_001eb522:
MOV AL,byte ptr [RSP + 0xf]
TEST AL,0x1
JNZ 0x001eb52c
JMP 0x001eb55d
LAB_001eb52c:
MOV qword ptr [RSP + 0x78],0x2
JMP 0x001eb55d
LAB_001eb55d:
MOV RDI,qword ptr [RSP + 0x88]
CALL 0x0015a9f0
SUB RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0x38],RAX
CMP qword ptr [RSP + 0x38],0x80
JBE 0x001eb588
MOV qword ptr [RSP + 0x38],0x80
LAB_001eb588:
MOV RAX,qword ptr [RSP + 0x38]
ADD RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x38]
SHL RAX,0x2
SUB RAX,0x1
MOV qword ptr [RSP + 0x20],RAX
LAB_001eb5b3:
MOV RAX,qword ptr [RSP + 0x28]
CMP RAX,qword ptr [RSP + 0x30]
JNC 0x001eb7d7
MOV RDI,qword ptr [RSP + 0x88]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x0015ade0
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + 0x1f],AL
MOV AL,byte ptr [RSP + 0x1f]
MOV byte ptr [RSP + 0x1e],AL
MOVSX EAX,byte ptr [RSP + 0x1f]
CMP EAX,0x30
JL 0x001eb608
MOVSX EAX,byte ptr [RSP + 0x1f]
CMP EAX,0x39
JG 0x001eb608
MOVSX EAX,byte ptr [RSP + 0x1e]
SUB EAX,0x30
MOV byte ptr [RSP + 0x1e],AL
JMP 0x001eb696
LAB_001eb608:
MOVSX EAX,byte ptr [RSP + 0x1f]
CMP EAX,0x61
JL 0x001eb62a
MOVSX EAX,byte ptr [RSP + 0x1f]
CMP EAX,0x66
JG 0x001eb62a
MOVSX EAX,byte ptr [RSP + 0x1e]
SUB EAX,0x57
MOV byte ptr [RSP + 0x1e],AL
JMP 0x001eb694
LAB_001eb62a:
MOVSX EAX,byte ptr [RSP + 0x1f]
CMP EAX,0x41
JL 0x001eb64c
MOVSX EAX,byte ptr [RSP + 0x1f]
CMP EAX,0x46
JG 0x001eb64c
MOVSX EAX,byte ptr [RSP + 0x1e]
SUB EAX,0x37
MOV byte ptr [RSP + 0x1e],AL
JMP 0x001eb692
LAB_001eb64c:
JMP 0x001eb64e
LAB_001eb64e:
XOR EAX,EAX
LEA RCX,[0x3a35e8]
CMP EAX,dword ptr [RCX]
JG 0x001eb683
CALL 0x002be200
MOV RDI,RAX
MOVSX ECX,byte ptr [RSP + 0x1f]
MOV RAX,qword ptr [RSP + 0x28]
MOV R8D,EAX
MOV ESI,0x4
LEA RDX,[0x30f696]
MOV AL,0x0
CALL 0x002be2f0
LAB_001eb683:
JMP 0x001eb685
LAB_001eb685:
MOV byte ptr [RSP + 0x97],0x0
JMP 0x001eb7df
LAB_001eb692:
JMP 0x001eb694
LAB_001eb694:
JMP 0x001eb696
LAB_001eb696:
MOV RCX,qword ptr [RSP + 0x80]
MOV RDX,qword ptr [RSP + 0x20]
MOV AL,0x1
TEST byte ptr [RCX + RDX*0x1],0x1
MOV byte ptr [RSP + 0xe],AL
JNZ 0x001eb6c1
MOVSX EAX,byte ptr [RSP + 0x1e]
AND EAX,0x8
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RSP + 0xe],AL
LAB_001eb6c1:
MOV DL,byte ptr [RSP + 0xe]
MOV RAX,qword ptr [RSP + 0x80]
MOV RCX,qword ptr [RSP + 0x20]
AND DL,0x1
MOV byte ptr [RAX + RCX*0x1],DL
MOV RCX,qword ptr [RSP + 0x80]
MOV RDX,qword ptr [RSP + 0x20]
SUB RDX,0x1
MOV AL,0x1
TEST byte ptr [RCX + RDX*0x1],0x1
MOV byte ptr [RSP + 0xd],AL
JNZ 0x001eb707
MOVSX EAX,byte ptr [RSP + 0x1e]
AND EAX,0x4
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RSP + 0xd],AL
LAB_001eb707:
MOV DL,byte ptr [RSP + 0xd]
MOV RAX,qword ptr [RSP + 0x80]
MOV RCX,qword ptr [RSP + 0x20]
SUB RCX,0x1
AND DL,0x1
MOV byte ptr [RAX + RCX*0x1],DL
MOV RCX,qword ptr [RSP + 0x80]
MOV RDX,qword ptr [RSP + 0x20]
SUB RDX,0x2
MOV AL,0x1
TEST byte ptr [RCX + RDX*0x1],0x1
MOV byte ptr [RSP + 0xc],AL
JNZ 0x001eb751
MOVSX EAX,byte ptr [RSP + 0x1e]
AND EAX,0x2
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RSP + 0xc],AL
LAB_001eb751:
MOV DL,byte ptr [RSP + 0xc]
MOV RAX,qword ptr [RSP + 0x80]
MOV RCX,qword ptr [RSP + 0x20]
SUB RCX,0x2
AND DL,0x1
MOV byte ptr [RAX + RCX*0x1],DL
MOV RCX,qword ptr [RSP + 0x80]
MOV RDX,qword ptr [RSP + 0x20]
SUB RDX,0x3
MOV AL,0x1
TEST byte ptr [RCX + RDX*0x1],0x1
MOV byte ptr [RSP + 0xb],AL
JNZ 0x001eb79b
MOVSX EAX,byte ptr [RSP + 0x1e]
AND EAX,0x1
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RSP + 0xb],AL
LAB_001eb79b:
MOV DL,byte ptr [RSP + 0xb]
MOV RAX,qword ptr [RSP + 0x80]
MOV RCX,qword ptr [RSP + 0x20]
SUB RCX,0x3
AND DL,0x1
MOV byte ptr [RAX + RCX*0x1],DL
MOV RAX,qword ptr [RSP + 0x28]
ADD RAX,0x1
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x20]
SUB RAX,0x4
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001eb5b3
LAB_001eb7d7:
MOV byte ptr [RSP + 0x97],0x1
LAB_001eb7df:
MOV AL,byte ptr [RSP + 0x97]
AND AL,0x1
ADD RSP,0x98
RET
|
/* parse_cpu_mask(std::__cxx11::string const&, bool (&) [512]) */
int1 parse_cpu_mask(string *param_1,bool *param_2)
{
char cVar1;
ulong uVar2;
long lVar3;
char *pcVar4;
int8 uVar5;
bool local_8d;
bool local_8c;
bool local_8b;
bool local_8a;
bool local_7b;
byte local_7a;
long local_78;
ulong local_70;
ulong local_60;
string local_40 [32];
ulong local_20;
bool *local_18;
string *local_10;
local_20 = 0;
local_18 = param_2;
local_10 = param_1;
uVar2 = std::__cxx11::string::length();
local_7b = false;
if (1 < uVar2) {
std::__cxx11::string::substr((ulong)local_40,(ulong)local_10);
/* try { // try from 001eb4eb to 001eb4f6 has its CatchHandler @ 001eb537 */
local_7b = std::operator==(local_40,"0x");
std::__cxx11::string::~string(local_40);
}
if (local_7b != false) {
local_20 = 2;
}
lVar3 = std::__cxx11::string::length();
local_60 = lVar3 - local_20;
if (0x80 < local_60) {
local_60 = 0x80;
}
uVar2 = local_60 + local_20;
local_70 = local_20;
local_78 = local_60 * 4 + -1;
do {
if (uVar2 <= local_70) {
return 1;
}
pcVar4 = (char *)std::__cxx11::string::at((ulong)local_10);
cVar1 = *pcVar4;
if ((cVar1 < '0') || ('9' < cVar1)) {
if ((cVar1 < 'a') || ('f' < cVar1)) {
if ((cVar1 < 'A') || ('F' < cVar1)) {
if (-1 < common_log_verbosity_thold) {
uVar5 = common_log_main();
common_log_add(uVar5,4,"Invalid hex character \'%c\' at position %d\n",(int)cVar1,
local_70 & 0xffffffff);
}
return 0;
}
local_7a = cVar1 - 0x37;
}
else {
local_7a = cVar1 + 0xa9;
}
}
else {
local_7a = cVar1 - 0x30;
}
local_8a = (local_18[local_78] & 1U) != 0 || (local_7a & 8) != 0;
local_18[local_78] = local_8a;
local_8b = (local_18[local_78 + -1] & 1U) != 0 || (local_7a & 4) != 0;
local_18[local_78 + -1] = local_8b;
local_8c = (local_18[local_78 + -2] & 1U) != 0 || (local_7a & 2) != 0;
local_18[local_78 + -2] = local_8c;
local_8d = (local_18[local_78 + -3] & 1U) != 0 || (local_7a & 1) != 0;
local_18[local_78 + -3] = local_8d;
local_70 = local_70 + 1;
local_78 = local_78 + -4;
} while( true );
}
| |
24,290 | count_square | eloqsql/storage/myisam/rt_split.c | static double count_square(const double *a, int n_dim)
{
const double *end = a + n_dim * 2;
double square = 1.0;
do
{
square *= a[1] - a[0];
a += 2;
}while (a != end);
return square;
} | O0 | c | count_square:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movsd 0x81dde(%rip), %xmm0 # 0x15b028
movsd %xmm0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movsd 0x8(%rax), %xmm0
movq -0x8(%rbp), %rax
subsd (%rax), %xmm0
mulsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq -0x18(%rbp), %rax
jne 0xd924f
movsd -0x20(%rbp), %xmm0
popq %rbp
retq
nopw (%rax,%rax)
| count_square_0:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov rax, [rbp+var_8]
mov ecx, [rbp+var_C]
shl ecx, 1
movsxd rcx, ecx
shl rcx, 3
add rax, rcx
mov [rbp+var_18], rax
movsd xmm0, cs:qword_15B028
movsd [rbp+var_20], xmm0
loc_D924F:
mov rax, [rbp+var_8]
movsd xmm0, qword ptr [rax+8]
mov rax, [rbp+var_8]
subsd xmm0, qword ptr [rax]
mulsd xmm0, [rbp+var_20]
movsd [rbp+var_20], xmm0
mov rax, [rbp+var_8]
add rax, 10h
mov [rbp+var_8], rax
mov rax, [rbp+var_8]
cmp rax, [rbp+var_18]
jnz short loc_D924F
movsd xmm0, [rbp+var_20]
pop rbp
retn
| double count_square_0(double *a1, int a2)
{
double v3; // [rsp+0h] [rbp-20h]
double *v4; // [rsp+18h] [rbp-8h]
v4 = a1;
v3 = 1.0;
do
{
v3 = (v4[1] - *v4) * v3;
v4 += 2;
}
while ( v4 != &a1[2 * a2] );
return v3;
}
| count_square:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0xc]
SHL ECX,0x1
MOVSXD RCX,ECX
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOVSD XMM0,qword ptr [0x0025b028]
MOVSD qword ptr [RBP + -0x20],XMM0
LAB_001d924f:
MOV RAX,qword ptr [RBP + -0x8]
MOVSD XMM0,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x8]
SUBSD XMM0,qword ptr [RAX]
MULSD XMM0,qword ptr [RBP + -0x20]
MOVSD qword ptr [RBP + -0x20],XMM0
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x10
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RBP + -0x18]
JNZ 0x001d924f
MOVSD XMM0,qword ptr [RBP + -0x20]
POP RBP
RET
|
double count_square(double *param_1,int param_2)
{
double local_28;
double *local_10;
local_28 = DAT_0025b028;
local_10 = param_1;
do {
local_28 = (local_10[1] - *local_10) * local_28;
local_10 = local_10 + 2;
} while (local_10 != param_1 + (param_2 << 1));
return local_28;
}
| |
24,291 | lunasvg::SVGPreserveAspectRatio::getTransform(lunasvg::Rect const&, lunasvg::Size const&) const | dmazzella[P]pylunasvg/lunasvg/source/svgproperty.cpp | Transform SVGPreserveAspectRatio::getTransform(const Rect& viewBoxRect, const Size& viewportSize) const
{
assert(!viewBoxRect.isEmpty() && !viewportSize.isEmpty());
auto xScale = viewportSize.w / viewBoxRect.w;
auto yScale = viewportSize.h / viewBoxRect.h;
if(m_alignType == AlignType::None) {
return Transform(xScale, 0, 0, yScale, -viewBoxRect.x * xScale, -viewBoxRect.y * yScale);
}
auto scale = (m_meetOrSlice == MeetOrSlice::Meet) ? std::min(xScale, yScale) : std::max(xScale, yScale);
auto xOffset = -viewBoxRect.x * scale;
auto yOffset = -viewBoxRect.y * scale;
auto viewWidth = viewBoxRect.w * scale;
auto viewHeight = viewBoxRect.h * scale;
switch(m_alignType) {
case AlignType::xMidYMin:
case AlignType::xMidYMid:
case AlignType::xMidYMax:
xOffset += (viewportSize.w - viewWidth) * 0.5f;
break;
case AlignType::xMaxYMin:
case AlignType::xMaxYMid:
case AlignType::xMaxYMax:
xOffset += (viewportSize.w - viewWidth);
break;
default:
break;
}
switch(m_alignType) {
case AlignType::xMinYMid:
case AlignType::xMidYMid:
case AlignType::xMaxYMid:
yOffset += (viewportSize.h - viewHeight) * 0.5f;
break;
case AlignType::xMinYMax:
case AlignType::xMidYMax:
case AlignType::xMaxYMax:
yOffset += (viewportSize.h - viewHeight);
break;
default:
break;
}
return Transform(scale, 0, 0, scale, xOffset, yOffset);
} | O0 | cpp | lunasvg::SVGPreserveAspectRatio::getTransform(lunasvg::Rect const&, lunasvg::Size const&) const:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x50(%rbp)
movq %rdi, -0x48(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
callq 0xe850
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x35(%rbp)
jne 0x4a8a7
movq -0x18(%rbp), %rdi
callq 0x20540
xorb $-0x1, %al
movb %al, -0x35(%rbp)
movb -0x35(%rbp), %al
testb $0x1, %al
jne 0x4a8b0
jmp 0x4a8b2
jmp 0x4a8d1
leaq 0x429bd(%rip), %rdi # 0x8d276
leaq 0x429e8(%rip), %rsi # 0x8d2a8
movl $0x23c, %edx # imm = 0x23C
leaq 0x42a8d(%rip), %rcx # 0x8d359
callq 0xb210
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
movss (%rcx), %xmm0
movq -0x10(%rbp), %rcx
divss 0x8(%rcx), %xmm0
movss %xmm0, -0x1c(%rbp)
movq -0x18(%rbp), %rcx
movss 0x4(%rcx), %xmm0
movq -0x10(%rbp), %rcx
divss 0xc(%rcx), %xmm0
movss %xmm0, -0x20(%rbp)
cmpl $0x0, 0xc(%rax)
jne 0x4a95b
movq -0x50(%rbp), %rdi
movss -0x1c(%rbp), %xmm0
movss -0x20(%rbp), %xmm3
movq -0x10(%rbp), %rax
movss (%rax), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax # imm = 0x80000000
movd %eax, %xmm4
mulss -0x1c(%rbp), %xmm4
movq -0x10(%rbp), %rax
movss 0x4(%rax), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax # imm = 0x80000000
movd %eax, %xmm5
mulss -0x20(%rbp), %xmm5
xorps %xmm2, %xmm2
movaps %xmm2, %xmm1
callq 0x11790
jmp 0x4ab18
movq -0x40(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x4a97d
leaq -0x1c(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x22510
movss (%rax), %xmm0
movss %xmm0, -0x54(%rbp)
jmp 0x4a993
leaq -0x1c(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x22550
movss (%rax), %xmm0
movss %xmm0, -0x54(%rbp)
movq -0x40(%rbp), %rax
movss -0x54(%rbp), %xmm0
movss %xmm0, -0x24(%rbp)
movq -0x10(%rbp), %rcx
movss (%rcx), %xmm0
movaps 0x41720(%rip), %xmm1 # 0x8c0d0
pxor %xmm1, %xmm0
movss -0x24(%rbp), %xmm2
mulss %xmm2, %xmm0
movss %xmm0, -0x28(%rbp)
movq -0x10(%rbp), %rcx
movss 0x4(%rcx), %xmm0
pxor %xmm1, %xmm0
movss -0x24(%rbp), %xmm1
mulss %xmm1, %xmm0
movss %xmm0, -0x2c(%rbp)
movq -0x10(%rbp), %rcx
movss 0x8(%rcx), %xmm0
movss -0x24(%rbp), %xmm1
mulss %xmm1, %xmm0
movss %xmm0, -0x30(%rbp)
movq -0x10(%rbp), %rcx
movss 0xc(%rcx), %xmm0
movss -0x24(%rbp), %xmm1
mulss %xmm1, %xmm0
movss %xmm0, -0x34(%rbp)
movl 0xc(%rax), %eax
movl %eax, -0x58(%rbp)
subl $0x2, %eax
je 0x4aa4a
jmp 0x4aa18
movl -0x58(%rbp), %eax
subl $0x3, %eax
je 0x4aa73
jmp 0x4aa22
movl -0x58(%rbp), %eax
subl $0x5, %eax
je 0x4aa4a
jmp 0x4aa2c
movl -0x58(%rbp), %eax
subl $0x6, %eax
je 0x4aa73
jmp 0x4aa36
movl -0x58(%rbp), %eax
subl $0x8, %eax
je 0x4aa4a
jmp 0x4aa40
movl -0x58(%rbp), %eax
subl $0x9, %eax
je 0x4aa73
jmp 0x4aa8c
movq -0x18(%rbp), %rax
movss (%rax), %xmm0
subss -0x30(%rbp), %xmm0
movss -0x28(%rbp), %xmm1
movss 0x41dfc(%rip), %xmm2 # 0x8c860
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x28(%rbp)
jmp 0x4aa8e
movq -0x18(%rbp), %rax
movss (%rax), %xmm0
subss -0x30(%rbp), %xmm0
addss -0x28(%rbp), %xmm0
movss %xmm0, -0x28(%rbp)
jmp 0x4aa8e
jmp 0x4aa8e
movq -0x40(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x5c(%rbp)
addl $-0x4, %eax
subl $0x3, %eax
jb 0x4aaaf
jmp 0x4aaa2
movl -0x5c(%rbp), %eax
addl $-0x7, %eax
subl $0x3, %eax
jb 0x4aad9
jmp 0x4aaf3
movq -0x18(%rbp), %rax
movss 0x4(%rax), %xmm0
subss -0x34(%rbp), %xmm0
movss -0x2c(%rbp), %xmm1
movss 0x41d96(%rip), %xmm2 # 0x8c860
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x2c(%rbp)
jmp 0x4aaf5
movq -0x18(%rbp), %rax
movss 0x4(%rax), %xmm0
subss -0x34(%rbp), %xmm0
addss -0x2c(%rbp), %xmm0
movss %xmm0, -0x2c(%rbp)
jmp 0x4aaf5
jmp 0x4aaf5
movq -0x50(%rbp), %rdi
movss -0x24(%rbp), %xmm0
movss -0x24(%rbp), %xmm3
movss -0x28(%rbp), %xmm4
movss -0x2c(%rbp), %xmm5
xorps %xmm2, %xmm2
movaps %xmm2, %xmm1
callq 0x11790
movq -0x48(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZNK7lunasvg22SVGPreserveAspectRatio12getTransformERKNS_4RectERKNS_4SizeE:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_50], rdi
mov [rbp+var_48], rdi
mov [rbp+var_8], rsi
mov [rbp+var_10], rdx
mov [rbp+var_18], rcx
mov rax, [rbp+var_8]
mov [rbp+var_40], rax
mov rdi, [rbp+var_10]; this
call _ZNK7lunasvg4Rect7isEmptyEv; lunasvg::Rect::isEmpty(void)
mov cl, al
xor eax, eax
test cl, 1
mov [rbp+var_35], al
jnz short loc_4A8A7
mov rdi, [rbp+var_18]; this
call _ZNK7lunasvg4Size7isEmptyEv; lunasvg::Size::isEmpty(void)
xor al, 0FFh
mov [rbp+var_35], al
loc_4A8A7:
mov al, [rbp+var_35]
test al, 1
jnz short loc_4A8B0
jmp short loc_4A8B2
loc_4A8B0:
jmp short loc_4A8D1
loc_4A8B2:
lea rdi, aViewboxrectIse; "!viewBoxRect.isEmpty() && !viewportSize"...
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov edx, 23Ch
lea rcx, aTransformLunas; "Transform lunasvg::SVGPreserveAspectRat"...
call ___assert_fail
loc_4A8D1:
mov rax, [rbp+var_40]
mov rcx, [rbp+var_18]
movss xmm0, dword ptr [rcx]
mov rcx, [rbp+var_10]
divss xmm0, dword ptr [rcx+8]
movss [rbp+var_1C], xmm0
mov rcx, [rbp+var_18]
movss xmm0, dword ptr [rcx+4]
mov rcx, [rbp+var_10]
divss xmm0, dword ptr [rcx+0Ch]
movss [rbp+var_20], xmm0
cmp dword ptr [rax+0Ch], 0
jnz short loc_4A95B
mov rdi, [rbp+var_50]; this
movss xmm0, [rbp+var_1C]; float
movss xmm3, [rbp+var_20]; float
mov rax, [rbp+var_10]
movss xmm1, dword ptr [rax]
movd eax, xmm1
xor eax, 80000000h
movd xmm4, eax
mulss xmm4, [rbp+var_1C]; float
mov rax, [rbp+var_10]
movss xmm1, dword ptr [rax+4]
movd eax, xmm1
xor eax, 80000000h
movd xmm5, eax
mulss xmm5, [rbp+var_20]; float
xorps xmm2, xmm2; float
movaps xmm1, xmm2; float
call _ZN7lunasvg9TransformC2Effffff; lunasvg::Transform::Transform(float,float,float,float,float,float)
jmp loc_4AB18
loc_4A95B:
mov rax, [rbp+var_40]
cmp dword ptr [rax+10h], 0
jnz short loc_4A97D
lea rdi, [rbp+var_1C]
lea rsi, [rbp+var_20]
call _ZSt3minIfERKT_S2_S2_; std::min<float>(float const&,float const&)
movss xmm0, dword ptr [rax]
movss [rbp+var_54], xmm0
jmp short loc_4A993
loc_4A97D:
lea rdi, [rbp+var_1C]
lea rsi, [rbp+var_20]
call _ZSt3maxIfERKT_S2_S2_; std::max<float>(float const&,float const&)
movss xmm0, dword ptr [rax]
movss [rbp+var_54], xmm0
loc_4A993:
mov rax, [rbp+var_40]
movss xmm0, [rbp+var_54]
movss [rbp+var_24], xmm0
mov rcx, [rbp+var_10]
movss xmm0, dword ptr [rcx]
movaps xmm1, cs:xmmword_8C0D0
pxor xmm0, xmm1
movss xmm2, [rbp+var_24]
mulss xmm0, xmm2
movss [rbp+var_28], xmm0
mov rcx, [rbp+var_10]
movss xmm0, dword ptr [rcx+4]
pxor xmm0, xmm1
movss xmm1, [rbp+var_24]
mulss xmm0, xmm1
movss [rbp+var_2C], xmm0
mov rcx, [rbp+var_10]
movss xmm0, dword ptr [rcx+8]
movss xmm1, [rbp+var_24]
mulss xmm0, xmm1
movss [rbp+var_30], xmm0
mov rcx, [rbp+var_10]
movss xmm0, dword ptr [rcx+0Ch]
movss xmm1, [rbp+var_24]
mulss xmm0, xmm1
movss [rbp+var_34], xmm0
mov eax, [rax+0Ch]
mov [rbp+var_58], eax
sub eax, 2
jz short loc_4AA4A
jmp short $+2
loc_4AA18:
mov eax, [rbp+var_58]
sub eax, 3
jz short loc_4AA73
jmp short $+2
loc_4AA22:
mov eax, [rbp+var_58]
sub eax, 5
jz short loc_4AA4A
jmp short $+2
loc_4AA2C:
mov eax, [rbp+var_58]
sub eax, 6
jz short loc_4AA73
jmp short $+2
loc_4AA36:
mov eax, [rbp+var_58]
sub eax, 8
jz short loc_4AA4A
jmp short $+2
loc_4AA40:
mov eax, [rbp+var_58]
sub eax, 9
jz short loc_4AA73
jmp short loc_4AA8C
loc_4AA4A:
mov rax, [rbp+var_18]
movss xmm0, dword ptr [rax]
subss xmm0, [rbp+var_30]
movss xmm1, [rbp+var_28]
movss xmm2, cs:dword_8C860
mulss xmm0, xmm2
addss xmm0, xmm1
movss [rbp+var_28], xmm0
jmp short loc_4AA8E
loc_4AA73:
mov rax, [rbp+var_18]
movss xmm0, dword ptr [rax]
subss xmm0, [rbp+var_30]
addss xmm0, [rbp+var_28]
movss [rbp+var_28], xmm0
jmp short loc_4AA8E
loc_4AA8C:
jmp short $+2
loc_4AA8E:
mov rax, [rbp+var_40]
mov eax, [rax+0Ch]
mov [rbp+var_5C], eax
add eax, 0FFFFFFFCh
sub eax, 3
jb short loc_4AAAF
jmp short $+2
loc_4AAA2:
mov eax, [rbp+var_5C]
add eax, 0FFFFFFF9h
sub eax, 3
jb short loc_4AAD9
jmp short loc_4AAF3
loc_4AAAF:
mov rax, [rbp+var_18]
movss xmm0, dword ptr [rax+4]
subss xmm0, [rbp+var_34]
movss xmm1, [rbp+var_2C]
movss xmm2, cs:dword_8C860
mulss xmm0, xmm2
addss xmm0, xmm1
movss [rbp+var_2C], xmm0
jmp short loc_4AAF5
loc_4AAD9:
mov rax, [rbp+var_18]
movss xmm0, dword ptr [rax+4]
subss xmm0, [rbp+var_34]
addss xmm0, [rbp+var_2C]
movss [rbp+var_2C], xmm0
jmp short loc_4AAF5
loc_4AAF3:
jmp short $+2
loc_4AAF5:
mov rdi, [rbp+var_50]; this
movss xmm0, [rbp+var_24]; float
movss xmm3, [rbp+var_24]; float
movss xmm4, [rbp+var_28]; float
movss xmm5, [rbp+var_2C]; float
xorps xmm2, xmm2; float
movaps xmm1, xmm2; float
call _ZN7lunasvg9TransformC2Effffff; lunasvg::Transform::Transform(float,float,float,float,float,float)
loc_4AB18:
mov rax, [rbp+var_48]
add rsp, 60h
pop rbp
retn
| lunasvg::SVGPreserveAspectRatio * lunasvg::SVGPreserveAspectRatio::getTransform(
lunasvg::SVGPreserveAspectRatio *this,
const lunasvg::Rect *a2,
const lunasvg::Size *a3,
lunasvg::Size *a4,
double a5,
double a6,
double a7,
double a8,
double a9,
double a10,
double a11,
double a12)
{
int v13; // [rsp+4h] [rbp-5Ch]
int v14; // [rsp+8h] [rbp-58h]
float v15; // [rsp+Ch] [rbp-54h]
char v16; // [rsp+2Bh] [rbp-35h]
float v17; // [rsp+2Ch] [rbp-34h]
float v18; // [rsp+30h] [rbp-30h]
float v19; // [rsp+34h] [rbp-2Ch]
float v20; // [rsp+38h] [rbp-28h]
float v21; // [rsp+40h] [rbp-20h] BYREF
float v22; // [rsp+44h] [rbp-1Ch] BYREF
lunasvg::Size *v23; // [rsp+48h] [rbp-18h]
lunasvg::Rect *v24; // [rsp+50h] [rbp-10h]
const lunasvg::Rect *v25; // [rsp+58h] [rbp-8h]
v25 = a2;
v24 = a3;
v23 = a4;
v16 = 0;
if ( !lunasvg::Rect::isEmpty(a3) )
v16 = ~lunasvg::Size::isEmpty(v23);
if ( (v16 & 1) == 0 )
__assert_fail(
"!viewBoxRect.isEmpty() && !viewportSize.isEmpty()",
"/workspace/llm4binary/github/2025_star3/dmazzella[P]pylunasvg/lunasvg/source/svgproperty.cpp",
572LL,
"Transform lunasvg::SVGPreserveAspectRatio::getTransform(const Rect &, const Size &) const");
v22 = *(float *)v23 / *((float *)v24 + 2);
v21 = *((float *)v23 + 1) / *((float *)v24 + 3);
if ( !*((_DWORD *)a2 + 3) )
{
lunasvg::Transform::Transform(
this,
v22,
0.0,
0.0,
v21,
COERCE_FLOAT(_mm_cvtsi128_si32((__m128i)*(unsigned int *)v24) ^ 0x80000000) * v22,
COERCE_FLOAT(_mm_cvtsi128_si32((__m128i)*((unsigned int *)v24 + 1)) ^ 0x80000000) * v21,
a11,
a12);
return this;
}
if ( *((_DWORD *)a2 + 4) )
v15 = *std::max<float>(&v22, &v21);
else
v15 = *std::min<float>(&v22, &v21);
v20 = *(float *)_mm_xor_si128((__m128i)*(unsigned int *)v24, (__m128i)xmmword_8C0D0).m128i_i32 * v15;
v19 = *(float *)_mm_xor_si128((__m128i)*((unsigned int *)v24 + 1), (__m128i)xmmword_8C0D0).m128i_i32 * v15;
v18 = *((float *)v24 + 2) * v15;
v17 = *((float *)v24 + 3) * v15;
v14 = *((_DWORD *)a2 + 3);
switch ( v14 )
{
case 2:
goto LABEL_17;
case 3:
goto LABEL_18;
case 5:
LABEL_17:
v20 = (float)((float)(*(float *)v23 - v18) * 0.5) + v20;
break;
case 6:
LABEL_18:
v20 = (float)(*(float *)v23 - v18) + v20;
break;
case 8:
goto LABEL_17;
case 9:
goto LABEL_18;
}
v13 = *((_DWORD *)a2 + 3);
if ( (unsigned int)(v13 - 4) < 3 )
{
lunasvg::Transform::Transform(
this,
v15,
0.0,
0.0,
v15,
v20,
(float)((float)(*((float *)v23 + 1) - v17) * 0.5) + v19,
a11,
a12);
}
else
{
if ( (unsigned int)(v13 - 7) < 3 )
v19 = (float)(*((float *)v23 + 1) - v17) + v19;
lunasvg::Transform::Transform(this, v15, 0.0, 0.0, v15, v20, v19, a11, a12);
}
return this;
}
| getTransform:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x50],RDI
MOV qword ptr [RBP + -0x48],RDI
MOV qword ptr [RBP + -0x8],RSI
MOV qword ptr [RBP + -0x10],RDX
MOV qword ptr [RBP + -0x18],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0010e850
MOV CL,AL
XOR EAX,EAX
TEST CL,0x1
MOV byte ptr [RBP + -0x35],AL
JNZ 0x0014a8a7
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00120540
XOR AL,0xff
MOV byte ptr [RBP + -0x35],AL
LAB_0014a8a7:
MOV AL,byte ptr [RBP + -0x35]
TEST AL,0x1
JNZ 0x0014a8b0
JMP 0x0014a8b2
LAB_0014a8b0:
JMP 0x0014a8d1
LAB_0014a8b2:
LEA RDI,[0x18d276]
LEA RSI,[0x18d2a8]
MOV EDX,0x23c
LEA RCX,[0x18d359]
CALL 0x0010b210
LAB_0014a8d1:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x18]
MOVSS XMM0,dword ptr [RCX]
MOV RCX,qword ptr [RBP + -0x10]
DIVSS XMM0,dword ptr [RCX + 0x8]
MOVSS dword ptr [RBP + -0x1c],XMM0
MOV RCX,qword ptr [RBP + -0x18]
MOVSS XMM0,dword ptr [RCX + 0x4]
MOV RCX,qword ptr [RBP + -0x10]
DIVSS XMM0,dword ptr [RCX + 0xc]
MOVSS dword ptr [RBP + -0x20],XMM0
CMP dword ptr [RAX + 0xc],0x0
JNZ 0x0014a95b
MOV RDI,qword ptr [RBP + -0x50]
MOVSS XMM0,dword ptr [RBP + -0x1c]
MOVSS XMM3,dword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOVSS XMM1,dword ptr [RAX]
MOVD EAX,XMM1
XOR EAX,0x80000000
MOVD XMM4,EAX
MULSS XMM4,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x10]
MOVSS XMM1,dword ptr [RAX + 0x4]
MOVD EAX,XMM1
XOR EAX,0x80000000
MOVD XMM5,EAX
MULSS XMM5,dword ptr [RBP + -0x20]
XORPS XMM2,XMM2
MOVAPS XMM1,XMM2
CALL 0x00111790
JMP 0x0014ab18
LAB_0014a95b:
MOV RAX,qword ptr [RBP + -0x40]
CMP dword ptr [RAX + 0x10],0x0
JNZ 0x0014a97d
LEA RDI,[RBP + -0x1c]
LEA RSI,[RBP + -0x20]
CALL 0x00122510
MOVSS XMM0,dword ptr [RAX]
MOVSS dword ptr [RBP + -0x54],XMM0
JMP 0x0014a993
LAB_0014a97d:
LEA RDI,[RBP + -0x1c]
LEA RSI,[RBP + -0x20]
CALL 0x00122550
MOVSS XMM0,dword ptr [RAX]
MOVSS dword ptr [RBP + -0x54],XMM0
LAB_0014a993:
MOV RAX,qword ptr [RBP + -0x40]
MOVSS XMM0,dword ptr [RBP + -0x54]
MOVSS dword ptr [RBP + -0x24],XMM0
MOV RCX,qword ptr [RBP + -0x10]
MOVSS XMM0,dword ptr [RCX]
MOVAPS XMM1,xmmword ptr [0x0018c0d0]
PXOR XMM0,XMM1
MOVSS XMM2,dword ptr [RBP + -0x24]
MULSS XMM0,XMM2
MOVSS dword ptr [RBP + -0x28],XMM0
MOV RCX,qword ptr [RBP + -0x10]
MOVSS XMM0,dword ptr [RCX + 0x4]
PXOR XMM0,XMM1
MOVSS XMM1,dword ptr [RBP + -0x24]
MULSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x2c],XMM0
MOV RCX,qword ptr [RBP + -0x10]
MOVSS XMM0,dword ptr [RCX + 0x8]
MOVSS XMM1,dword ptr [RBP + -0x24]
MULSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x30],XMM0
MOV RCX,qword ptr [RBP + -0x10]
MOVSS XMM0,dword ptr [RCX + 0xc]
MOVSS XMM1,dword ptr [RBP + -0x24]
MULSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x34],XMM0
MOV EAX,dword ptr [RAX + 0xc]
MOV dword ptr [RBP + -0x58],EAX
SUB EAX,0x2
JZ 0x0014aa4a
JMP 0x0014aa18
LAB_0014aa18:
MOV EAX,dword ptr [RBP + -0x58]
SUB EAX,0x3
JZ 0x0014aa73
JMP 0x0014aa22
LAB_0014aa22:
MOV EAX,dword ptr [RBP + -0x58]
SUB EAX,0x5
JZ 0x0014aa4a
JMP 0x0014aa2c
LAB_0014aa2c:
MOV EAX,dword ptr [RBP + -0x58]
SUB EAX,0x6
JZ 0x0014aa73
JMP 0x0014aa36
LAB_0014aa36:
MOV EAX,dword ptr [RBP + -0x58]
SUB EAX,0x8
JZ 0x0014aa4a
JMP 0x0014aa40
LAB_0014aa40:
MOV EAX,dword ptr [RBP + -0x58]
SUB EAX,0x9
JZ 0x0014aa73
JMP 0x0014aa8c
LAB_0014aa4a:
MOV RAX,qword ptr [RBP + -0x18]
MOVSS XMM0,dword ptr [RAX]
SUBSS XMM0,dword ptr [RBP + -0x30]
MOVSS XMM1,dword ptr [RBP + -0x28]
MOVSS XMM2,dword ptr [0x0018c860]
MULSS XMM0,XMM2
ADDSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x28],XMM0
JMP 0x0014aa8e
LAB_0014aa73:
MOV RAX,qword ptr [RBP + -0x18]
MOVSS XMM0,dword ptr [RAX]
SUBSS XMM0,dword ptr [RBP + -0x30]
ADDSS XMM0,dword ptr [RBP + -0x28]
MOVSS dword ptr [RBP + -0x28],XMM0
JMP 0x0014aa8e
LAB_0014aa8c:
JMP 0x0014aa8e
LAB_0014aa8e:
MOV RAX,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RAX + 0xc]
MOV dword ptr [RBP + -0x5c],EAX
ADD EAX,-0x4
SUB EAX,0x3
JC 0x0014aaaf
JMP 0x0014aaa2
LAB_0014aaa2:
MOV EAX,dword ptr [RBP + -0x5c]
ADD EAX,-0x7
SUB EAX,0x3
JC 0x0014aad9
JMP 0x0014aaf3
LAB_0014aaaf:
MOV RAX,qword ptr [RBP + -0x18]
MOVSS XMM0,dword ptr [RAX + 0x4]
SUBSS XMM0,dword ptr [RBP + -0x34]
MOVSS XMM1,dword ptr [RBP + -0x2c]
MOVSS XMM2,dword ptr [0x0018c860]
MULSS XMM0,XMM2
ADDSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x2c],XMM0
JMP 0x0014aaf5
LAB_0014aad9:
MOV RAX,qword ptr [RBP + -0x18]
MOVSS XMM0,dword ptr [RAX + 0x4]
SUBSS XMM0,dword ptr [RBP + -0x34]
ADDSS XMM0,dword ptr [RBP + -0x2c]
MOVSS dword ptr [RBP + -0x2c],XMM0
JMP 0x0014aaf5
LAB_0014aaf3:
JMP 0x0014aaf5
LAB_0014aaf5:
MOV RDI,qword ptr [RBP + -0x50]
MOVSS XMM0,dword ptr [RBP + -0x24]
MOVSS XMM3,dword ptr [RBP + -0x24]
MOVSS XMM4,dword ptr [RBP + -0x28]
MOVSS XMM5,dword ptr [RBP + -0x2c]
XORPS XMM2,XMM2
MOVAPS XMM1,XMM2
CALL 0x00111790
LAB_0014ab18:
MOV RAX,qword ptr [RBP + -0x48]
ADD RSP,0x60
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* lunasvg::SVGPreserveAspectRatio::getTransform(lunasvg::Rect const&, lunasvg::Size const&) const
*/
Rect * lunasvg::SVGPreserveAspectRatio::getTransform(Rect *param_1,Size *param_2)
{
int iVar1;
uint uVar2;
float *pfVar3;
Size *in_RCX;
Rect *in_RDX;
float local_5c;
byte local_3d;
float local_34;
float local_30;
float local_28;
float local_24;
Size *local_20;
Rect *local_18;
Size *local_10;
local_20 = in_RCX;
local_18 = in_RDX;
local_10 = param_2;
uVar2 = Rect::isEmpty(in_RDX);
local_3d = 0;
if ((uVar2 & 1) == 0) {
local_3d = Size::isEmpty(local_20);
local_3d = local_3d ^ 0xff;
}
if ((local_3d & 1) == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("!viewBoxRect.isEmpty() && !viewportSize.isEmpty()",
"/workspace/llm4binary/github/2025_star3/dmazzella[P]pylunasvg/lunasvg/source/svgproperty.cpp"
,0x23c,
"Transform lunasvg::SVGPreserveAspectRatio::getTransform(const Rect &, const Size &) const"
);
}
local_24 = *(float *)local_20 / *(float *)(local_18 + 8);
local_28 = *(float *)(local_20 + 4) / *(float *)(local_18 + 0xc);
if (*(int *)(param_2 + 0xc) == 0) {
Transform::Transform
((Transform *)param_1,local_24,0.0,0.0,local_28,-*(float *)local_18 * local_24,
-*(float *)(local_18 + 4) * local_28);
return param_1;
}
if (*(int *)(param_2 + 0x10) == 0) {
pfVar3 = std::min<float>(&local_24,&local_28);
local_5c = *pfVar3;
}
else {
pfVar3 = std::max<float>(&local_24,&local_28);
local_5c = *pfVar3;
}
local_30 = (float)((uint)*(float *)local_18 ^ _DAT_0018c0d0) * local_5c;
local_34 = (float)((uint)*(float *)(local_18 + 4) ^ _DAT_0018c0d0) * local_5c;
iVar1 = *(int *)(param_2 + 0xc);
if (iVar1 == 2) {
LAB_0014aa4a:
local_30 = (*(float *)local_20 - *(float *)(local_18 + 8) * local_5c) * DAT_0018c860 + local_30;
}
else {
if (iVar1 != 3) {
if (iVar1 == 5) goto LAB_0014aa4a;
if (iVar1 != 6) {
if (iVar1 == 8) goto LAB_0014aa4a;
if (iVar1 != 9) goto LAB_0014aa8e;
}
}
local_30 = (*(float *)local_20 - *(float *)(local_18 + 8) * local_5c) + local_30;
}
LAB_0014aa8e:
if (*(int *)(param_2 + 0xc) - 4U < 3) {
local_34 = (*(float *)(local_20 + 4) - *(float *)(local_18 + 0xc) * local_5c) * DAT_0018c860 +
local_34;
}
else if (*(int *)(param_2 + 0xc) - 7U < 3) {
local_34 = (*(float *)(local_20 + 4) - *(float *)(local_18 + 0xc) * local_5c) + local_34;
}
Transform::Transform((Transform *)param_1,local_5c,0.0,0.0,local_5c,local_30,local_34);
return param_1;
}
| |
24,292 | my_clear_highest_bit(unsigned int) | eloqsql/include/my_bit.h | static inline uint32 my_clear_highest_bit(uint32 v)
{
uint32 w=v >> 1;
w|= w >> 1;
w|= w >> 2;
w|= w >> 4;
w|= w >> 8;
w|= w >> 16;
return v & w;
} | O0 | c | my_clear_highest_bit(unsigned int):
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
shrl %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
shrl %eax
orl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
shrl $0x2, %eax
orl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
shrl $0x4, %eax
orl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
shrl $0x8, %eax
orl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
shrl $0x10, %eax
orl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x4(%rbp), %eax
andl -0x8(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZL20my_clear_highest_bitj:
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov eax, [rbp+var_4]
shr eax, 1
mov [rbp+var_8], eax
mov eax, [rbp+var_8]
shr eax, 1
or eax, [rbp+var_8]
mov [rbp+var_8], eax
mov eax, [rbp+var_8]
shr eax, 2
or eax, [rbp+var_8]
mov [rbp+var_8], eax
mov eax, [rbp+var_8]
shr eax, 4
or eax, [rbp+var_8]
mov [rbp+var_8], eax
mov eax, [rbp+var_8]
shr eax, 8
or eax, [rbp+var_8]
mov [rbp+var_8], eax
mov eax, [rbp+var_8]
shr eax, 10h
or eax, [rbp+var_8]
mov [rbp+var_8], eax
mov eax, [rbp+var_4]
and eax, [rbp+var_8]
pop rbp
retn
| long long my_clear_highest_bit(unsigned int a1)
{
unsigned int v2; // [rsp+0h] [rbp-8h]
unsigned int v3; // [rsp+0h] [rbp-8h]
v2 = (a1 >> 1) | (a1 >> 2) | (((a1 >> 1) | (a1 >> 2)) >> 2);
v3 = v2 | (v2 >> 4) | ((v2 | (v2 >> 4)) >> 8);
return (v3 | HIWORD(v3)) & a1;
}
| my_clear_highest_bit:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV EAX,dword ptr [RBP + -0x4]
SHR EAX,0x1
MOV dword ptr [RBP + -0x8],EAX
MOV EAX,dword ptr [RBP + -0x8]
SHR EAX,0x1
OR EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0x8],EAX
MOV EAX,dword ptr [RBP + -0x8]
SHR EAX,0x2
OR EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0x8],EAX
MOV EAX,dword ptr [RBP + -0x8]
SHR EAX,0x4
OR EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0x8],EAX
MOV EAX,dword ptr [RBP + -0x8]
SHR EAX,0x8
OR EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0x8],EAX
MOV EAX,dword ptr [RBP + -0x8]
SHR EAX,0x10
OR EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0x8],EAX
MOV EAX,dword ptr [RBP + -0x4]
AND EAX,dword ptr [RBP + -0x8]
POP RBP
RET
|
/* my_clear_highest_bit(unsigned int) */
uint my_clear_highest_bit(uint param_1)
{
uint uVar1;
uVar1 = param_1 >> 1 | param_1;
uVar1 = uVar1 >> 3 | uVar1 >> 1;
uVar1 = uVar1 >> 4 | uVar1;
uVar1 = uVar1 >> 8 | uVar1;
return param_1 & (uVar1 >> 0x10 | uVar1);
}
| |
24,293 | SEMANTICANALYZER::SemanticAnalyzer::checkRelation(SEMANTICANALYZER::Relation const&, int) | 11AgReS1SoR11[P]Graph/Common/SemanticAnalyzer/src/SemanticAnalyzer.cpp | void SEMANTICANALYZER::SemanticAnalyzer::checkRelation(const Relation &rel, int statementNumber)
{
if (!isObjectDeclared(rel.id1))
{
throw SemanticError("Объект " + rel.id1 + " не объявлен.", statementNumber);
}
if (!isObjectDeclared(rel.id2))
{
throw SemanticError("Объект " + rel.id2 + " не объявлен.", statementNumber);
}
if (rel.id1 == GRAMMERCONSTANTS::GRAPH || rel.id1 == GRAMMERCONSTANTS::DOT_CLOUD || rel.id2 == GRAMMERCONSTANTS::GRAPH || rel.id2 == GRAMMERCONSTANTS::DOT_CLOUD)
{
throw SemanticError("Связь не может быть создана с графом или облаком точек.", statementNumber);
}
for (const Property& prop : rel.properties)
{
if (std::find(COMMON_PROPERTIES.begin(), COMMON_PROPERTIES.end(), prop.key) == COMMON_PROPERTIES.end())
{
throw SemanticError("Недопустимое свойство " + prop.key + " для отношения.", statementNumber);
}
checkPropertyValue(prop, PROPERTY_CONSTRAINTS.at(prop.key), statementNumber);
}
} | O2 | cpp | SEMANTICANALYZER::SemanticAnalyzer::checkRelation(SEMANTICANALYZER::Relation const&, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x10760
testb %al, %al
je 0x13946
leaq 0x40(%r14), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x10760
testb %al, %al
je 0x139a8
leaq 0x7919(%rip), %rsi # 0x1b0f8
movq %r14, %rdi
callq 0x116e0
testb %al, %al
jne 0x138f5
leaq 0x7908(%rip), %rsi # 0x1b0fe
movq %r14, %rdi
callq 0x116e0
testb %al, %al
jne 0x138f5
leaq 0x78eb(%rip), %rsi # 0x1b0f8
movq %r15, %rdi
callq 0x116e0
testb %al, %al
jne 0x138f5
leaq 0x78da(%rip), %rsi # 0x1b0fe
movq %r15, %rdi
callq 0x116e0
testb %al, %al
jne 0x138f5
movq 0x60(%r14), %r15
movq 0x68(%r14), %r14
leaq 0xf3a5(%rip), %rbx # 0x22be8
cmpq %r14, %r15
je 0x13885
movq 0xf351(%rip), %rdi # 0x22ba0
movq 0xf352(%rip), %rsi # 0x22ba8
movq %r15, %rdx
callq 0x10400
cmpq 0xf343(%rip), %rax # 0x22ba8
je 0x13890
movq %rbx, %rdi
movq %r15, %rsi
callq 0x10360
movq %r15, %rsi
movq %rax, %rdx
movl %ebp, %ecx
callq 0x11120
addq $0x40, %r15
jmp 0x13843
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x10530
movq %rax, %rbx
leaq 0x7a1f(%rip), %rsi # 0x1b2c1
leaq 0x28(%rsp), %rdi
movq %r15, %rdx
callq 0x10970
leaq 0x7ac9(%rip), %rdx # 0x1b37f
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x10270
movb $0x1, %r15b
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x10b20
xorl %r15d, %r15d
movq 0xe61f(%rip), %rsi # 0x21f00
movq 0xe698(%rip), %rdx # 0x21f80
movq %rbx, %rdi
callq 0x11380
jmp 0x13a08
pushq $0x10
popq %rdi
callq 0x10530
movq %rax, %rbx
leaq 0x7a13(%rip), %rsi # 0x1b31a
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x11350
movb $0x1, %r15b
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x10b20
xorl %r15d, %r15d
movq 0xe5ce(%rip), %rsi # 0x21f00
movq 0xe647(%rip), %rdx # 0x21f80
movq %rbx, %rdi
callq 0x11380
jmp 0x13a08
pushq $0x10
popq %rdi
callq 0x10530
movq %rax, %rbx
leaq 0x77c2(%rip), %rsi # 0x1b11a
leaq 0x28(%rsp), %rdi
movq %r14, %rdx
callq 0x10970
leaq 0x7996(%rip), %rdx # 0x1b302
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x10270
movb $0x1, %r15b
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x10b20
xorl %r15d, %r15d
movq 0xe569(%rip), %rsi # 0x21f00
movq 0xe5e2(%rip), %rdx # 0x21f80
movq %rbx, %rdi
callq 0x11380
jmp 0x13a08
pushq $0x10
popq %rdi
callq 0x10530
movq %rax, %rbx
leaq 0x7760(%rip), %rsi # 0x1b11a
leaq 0x28(%rsp), %rdi
movq %r15, %rdx
callq 0x10970
leaq 0x7934(%rip), %rdx # 0x1b302
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x10270
movb $0x1, %r15b
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x10b20
xorl %r15d, %r15d
movq 0xe507(%rip), %rsi # 0x21f00
movq 0xe580(%rip), %rdx # 0x21f80
movq %rbx, %rdi
callq 0x11380
jmp 0x13a20
jmp 0x13a2f
jmp 0x13a20
jmp 0x13a2f
jmp 0x13a46
jmp 0x13a46
movq %rax, %r14
leaq 0x8(%rsp), %rdi
jmp 0x13a3a
jmp 0x13a46
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x104a0
jmp 0x13a35
movq %rax, %r14
movb $0x1, %r15b
leaq 0x28(%rsp), %rdi
callq 0x104a0
testb %r15b, %r15b
jne 0x13a49
jmp 0x13a51
movq %rax, %r14
movq %rbx, %rdi
callq 0x107b0
movq %r14, %rdi
callq 0x11420
nop
| _ZN16SEMANTICANALYZER16SemanticAnalyzer13checkRelationERKNS_8RelationEi:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov ebp, edx
mov r14, rsi
mov rbx, rdi
call __ZNK16SEMANTICANALYZER16SemanticAnalyzer16isObjectDeclaredERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; SEMANTICANALYZER::SemanticAnalyzer::isObjectDeclared(std::string const&)
test al, al
jz loc_13946
lea r15, [r14+40h]
mov rdi, rbx
mov rsi, r15
call __ZNK16SEMANTICANALYZER16SemanticAnalyzer16isObjectDeclaredERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; SEMANTICANALYZER::SemanticAnalyzer::isObjectDeclared(std::string const&)
test al, al
jz loc_139A8
lea rsi, aGraph; "graph"
mov rdi, r14
call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jnz loc_138F5
lea rsi, aDotCloud; "dot_cloud"
mov rdi, r14
call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jnz loc_138F5
lea rsi, aGraph; "graph"
mov rdi, r15
call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jnz loc_138F5
lea rsi, aDotCloud; "dot_cloud"
mov rdi, r15
call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jnz loc_138F5
mov r15, [r14+60h]
mov r14, [r14+68h]
lea rbx, _ZN16SEMANTICANALYZERL20PROPERTY_CONSTRAINTSB5cxx11E; SEMANTICANALYZER::PROPERTY_CONSTRAINTS
loc_13843:
cmp r15, r14
jz short loc_13885
mov rdi, cs:_ZN16SEMANTICANALYZERL17COMMON_PROPERTIESB5cxx11E; SEMANTICANALYZER::COMMON_PROPERTIES
mov rsi, cs:qword_22BA8
mov rdx, r15
call __ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEEENS0_5__ops16_Iter_equals_valIS8_EEET_SH_SH_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>,__gnu_cxx::__ops::_Iter_equals_val<std::string const>>(__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>,__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>,__gnu_cxx::__ops::_Iter_equals_val<std::string const>,std::random_access_iterator_tag)
cmp rax, cs:qword_22BA8
jz short loc_13890
mov rdi, rbx
mov rsi, r15
call __ZNKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN16SEMANTICANALYZER14ConstraintInfoESt4lessIS5_ESaISt4pairIKS5_S7_EEE2atERSB_; std::map<std::string,SEMANTICANALYZER::ConstraintInfo>::at(std::string const&)
mov rsi, r15
mov rdx, rax
mov ecx, ebp
call __ZNK16SEMANTICANALYZER16SemanticAnalyzer18checkPropertyValueERKNS_8PropertyERKNS_14ConstraintInfoEi; SEMANTICANALYZER::SemanticAnalyzer::checkPropertyValue(SEMANTICANALYZER::Property const&,SEMANTICANALYZER::ConstraintInfo const&,int)
add r15, 40h ; '@'
jmp short loc_13843
loc_13885:
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_13890:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, unk_1B2C1
lea rdi, [rsp+68h+var_40]
mov rdx, r15
call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
lea rdx, unk_1B37F
lea rdi, [rsp+68h+var_60]
lea rsi, [rsp+68h+var_40]
call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
mov r15b, 1
lea rsi, [rsp+68h+var_60]
mov rdi, rbx
mov edx, ebp
call __ZN16SEMANTICANALYZER13SemanticErrorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; SEMANTICANALYZER::SemanticError::SemanticError(std::string const&,int)
xor r15d, r15d
mov rsi, cs:_ZTIN16SEMANTICANALYZER13SemanticErrorE_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD2Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp loc_13A08
loc_138F5:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, unk_1B31A
lea rdi, [rsp+68h+var_60]
lea rdx, [rsp+68h+var_40]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov r15b, 1
lea rsi, [rsp+68h+var_60]
mov rdi, rbx
mov edx, ebp
call __ZN16SEMANTICANALYZER13SemanticErrorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; SEMANTICANALYZER::SemanticError::SemanticError(std::string const&,int)
xor r15d, r15d
mov rsi, cs:_ZTIN16SEMANTICANALYZER13SemanticErrorE_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD2Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp loc_13A08
loc_13946:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, unk_1B11A
lea rdi, [rsp+68h+var_40]
mov rdx, r14
call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
lea rdx, unk_1B302
lea rdi, [rsp+68h+var_60]
lea rsi, [rsp+68h+var_40]
call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
mov r15b, 1
lea rsi, [rsp+68h+var_60]
mov rdi, rbx
mov edx, ebp
call __ZN16SEMANTICANALYZER13SemanticErrorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; SEMANTICANALYZER::SemanticError::SemanticError(std::string const&,int)
xor r15d, r15d
mov rsi, cs:_ZTIN16SEMANTICANALYZER13SemanticErrorE_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD2Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_13A08
loc_139A8:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, unk_1B11A
lea rdi, [rsp+68h+var_40]
mov rdx, r15
call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
lea rdx, unk_1B302
lea rdi, [rsp+68h+var_60]
lea rsi, [rsp+68h+var_40]
call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
mov r15b, 1
lea rsi, [rsp+68h+var_60]
mov rdi, rbx
mov edx, ebp
call __ZN16SEMANTICANALYZER13SemanticErrorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; SEMANTICANALYZER::SemanticError::SemanticError(std::string const&,int)
xor r15d, r15d
mov rsi, cs:_ZTIN16SEMANTICANALYZER13SemanticErrorE_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD2Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_13A08:
jmp short loc_13A20
jmp short loc_13A2F
jmp short loc_13A20
jmp short loc_13A2F
jmp short loc_13A46
jmp short loc_13A46
mov r14, rax
lea rdi, [rsp+68h+var_60]
jmp short loc_13A3A
jmp short loc_13A46
loc_13A20:
mov r14, rax
lea rdi, [rsp+68h+var_60]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_13A35
loc_13A2F:
mov r14, rax
mov r15b, 1
loc_13A35:
lea rdi, [rsp+68h+var_40]
loc_13A3A:
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test r15b, r15b
jnz short loc_13A49
jmp short loc_13A51
loc_13A46:
mov r14, rax
loc_13A49:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_13A51:
mov rdi, r14
call __Unwind_Resume
| long long SEMANTICANALYZER::SemanticAnalyzer::checkRelation(
SEMANTICANALYZER::SemanticAnalyzer *this,
const SEMANTICANALYZER::Relation *a2,
unsigned int a3)
{
long long result; // rax
long long v5; // r15
long long v6; // r14
long long v7; // rax
void *v8; // rbx
void *v9; // rbx
void *exception; // rbx
void *v11; // rbx
_BYTE v12[32]; // [rsp+8h] [rbp-60h] BYREF
_BYTE v13[64]; // [rsp+28h] [rbp-40h] BYREF
if ( !(unsigned __int8)SEMANTICANALYZER::SemanticAnalyzer::isObjectDeclared(this, a2) )
{
exception = __cxa_allocate_exception(0x10uLL);
std::operator+<char>(v13, &unk_1B11A, a2);
std::operator+<char>(v12, v13, &unk_1B302);
SEMANTICANALYZER::SemanticError::SemanticError(exception, v12, a3);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'SEMANTICANALYZER::SemanticError,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( !(unsigned __int8)SEMANTICANALYZER::SemanticAnalyzer::isObjectDeclared(this, (char *)a2 + 64) )
{
v11 = __cxa_allocate_exception(0x10uLL);
std::operator+<char>(v13, &unk_1B11A, (char *)a2 + 64);
std::operator+<char>(v12, v13, &unk_1B302);
SEMANTICANALYZER::SemanticError::SemanticError(v11, v12, a3);
__cxa_throw(
v11,
(struct type_info *)&`typeinfo for'SEMANTICANALYZER::SemanticError,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( (unsigned __int8)std::operator==<char>(a2, "graph")
|| (unsigned __int8)std::operator==<char>(a2, "dot_cloud")
|| (unsigned __int8)std::operator==<char>((char *)a2 + 64, "graph")
|| (result = std::operator==<char>((char *)a2 + 64, "dot_cloud"), (_BYTE)result) )
{
v9 = __cxa_allocate_exception(0x10uLL);
std::string::basic_string<std::allocator<char>>(v12, &unk_1B31A, v13);
SEMANTICANALYZER::SemanticError::SemanticError(v9, v12, a3);
__cxa_throw(
v9,
(struct type_info *)&`typeinfo for'SEMANTICANALYZER::SemanticError,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v5 = *((_QWORD *)a2 + 12);
v6 = *((_QWORD *)a2 + 13);
while ( v5 != v6 )
{
if ( std::__find_if<__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>,__gnu_cxx::__ops::_Iter_equals_val<std::string const>>(
SEMANTICANALYZER::COMMON_PROPERTIES[abi:cxx11],
qword_22BA8,
v5) == qword_22BA8 )
{
v8 = __cxa_allocate_exception(0x10uLL);
std::operator+<char>(v13, &unk_1B2C1, v5);
std::operator+<char>(v12, v13, &unk_1B37F);
SEMANTICANALYZER::SemanticError::SemanticError(v8, v12, a3);
__cxa_throw(
v8,
(struct type_info *)&`typeinfo for'SEMANTICANALYZER::SemanticError,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v7 = std::map<std::string,SEMANTICANALYZER::ConstraintInfo>::at(
&SEMANTICANALYZER::PROPERTY_CONSTRAINTS[abi:cxx11],
v5);
result = SEMANTICANALYZER::SemanticAnalyzer::checkPropertyValue(
&SEMANTICANALYZER::PROPERTY_CONSTRAINTS[abi:cxx11],
v5,
v7,
a3);
v5 += 64LL;
}
return result;
}
| checkRelation:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
CALL 0x00110760
TEST AL,AL
JZ 0x00113946
LEA R15,[R14 + 0x40]
MOV RDI,RBX
MOV RSI,R15
CALL 0x00110760
TEST AL,AL
JZ 0x001139a8
LEA RSI,[0x11b0f8]
MOV RDI,R14
CALL 0x001116e0
TEST AL,AL
JNZ 0x001138f5
LEA RSI,[0x11b0fe]
MOV RDI,R14
CALL 0x001116e0
TEST AL,AL
JNZ 0x001138f5
LEA RSI,[0x11b0f8]
MOV RDI,R15
CALL 0x001116e0
TEST AL,AL
JNZ 0x001138f5
LEA RSI,[0x11b0fe]
MOV RDI,R15
CALL 0x001116e0
TEST AL,AL
JNZ 0x001138f5
MOV R15,qword ptr [R14 + 0x60]
MOV R14,qword ptr [R14 + 0x68]
LEA RBX,[0x122be8]
LAB_00113843:
CMP R15,R14
JZ 0x00113885
MOV RDI,qword ptr [0x00122ba0]
MOV RSI,qword ptr [0x00122ba8]
MOV RDX,R15
CALL 0x00110400
CMP RAX,qword ptr [0x00122ba8]
JZ 0x00113890
MOV RDI,RBX
MOV RSI,R15
CALL 0x00110360
MOV RSI,R15
MOV RDX,RAX
MOV ECX,EBP
CALL 0x00111120
ADD R15,0x40
JMP 0x00113843
LAB_00113885:
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00113890:
PUSH 0x10
POP RDI
CALL 0x00110530
MOV RBX,RAX
LAB_0011389b:
LEA RSI,[0x11b2c1]
LEA RDI,[RSP + 0x28]
MOV RDX,R15
CALL 0x00110970
LAB_001138af:
LEA RDX,[0x11b37f]
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x28]
CALL 0x00110270
MOV R15B,0x1
LAB_001138c8:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
MOV EDX,EBP
CALL 0x00110b20
XOR R15D,R15D
MOV RSI,qword ptr [0x00121f00]
MOV RDX,qword ptr [0x00121f80]
MOV RDI,RBX
CALL 0x00111380
LAB_001138f5:
PUSH 0x10
POP RDI
CALL 0x00110530
MOV RBX,RAX
LAB_00113900:
LEA RSI,[0x11b31a]
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x28]
CALL 0x00111350
MOV R15B,0x1
LAB_00113919:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
MOV EDX,EBP
CALL 0x00110b20
XOR R15D,R15D
MOV RSI,qword ptr [0x00121f00]
MOV RDX,qword ptr [0x00121f80]
MOV RDI,RBX
CALL 0x00111380
LAB_00113946:
PUSH 0x10
POP RDI
CALL 0x00110530
MOV RBX,RAX
LAB_00113951:
LEA RSI,[0x11b11a]
LEA RDI,[RSP + 0x28]
MOV RDX,R14
CALL 0x00110970
LAB_00113965:
LEA RDX,[0x11b302]
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x28]
CALL 0x00110270
MOV R15B,0x1
LAB_0011397e:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
MOV EDX,EBP
CALL 0x00110b20
XOR R15D,R15D
MOV RSI,qword ptr [0x00121f00]
MOV RDX,qword ptr [0x00121f80]
MOV RDI,RBX
CALL 0x00111380
LAB_001139a8:
PUSH 0x10
POP RDI
CALL 0x00110530
MOV RBX,RAX
LAB_001139b3:
LEA RSI,[0x11b11a]
LEA RDI,[RSP + 0x28]
MOV RDX,R15
CALL 0x00110970
LAB_001139c7:
LEA RDX,[0x11b302]
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x28]
CALL 0x00110270
MOV R15B,0x1
LAB_001139e0:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
MOV EDX,EBP
CALL 0x00110b20
XOR R15D,R15D
MOV RSI,qword ptr [0x00121f00]
MOV RDX,qword ptr [0x00121f80]
MOV RDI,RBX
CALL 0x00111380
|
/* SEMANTICANALYZER::SemanticAnalyzer::checkRelation(SEMANTICANALYZER::Relation const&, int) */
void __thiscall
SEMANTICANALYZER::SemanticAnalyzer::checkRelation
(SemanticAnalyzer *this,Relation *param_1,int param_2)
{
string *psVar1;
Property *pPVar2;
long lVar3;
ConstraintInfo *pCVar4;
SemanticError *pSVar5;
char cVar6;
bool bVar7;
int1 *this_00;
Property *pPVar8;
string local_60 [32];
allocator local_40 [32];
cVar6 = isObjectDeclared(this,(string *)param_1);
if (cVar6 == '\0') {
pSVar5 = (SemanticError *)__cxa_allocate_exception(0x10);
/* try { // try from 00113951 to 00113964 has its CatchHandler @ 00113a12 */
std::operator+((char *)local_40,(string *)&DAT_0011b11a);
/* try { // try from 00113965 to 0011397a has its CatchHandler @ 00113a0e */
std::operator+(local_60,(char *)local_40);
/* try { // try from 0011397e to 001139a5 has its CatchHandler @ 00113a0c */
SemanticError::SemanticError(pSVar5,local_60,param_2);
/* WARNING: Subroutine does not return */
__cxa_throw(pSVar5,PTR_typeinfo_00121f00,PTR__runtime_error_00121f80);
}
psVar1 = (string *)(param_1 + 0x40);
cVar6 = isObjectDeclared(this,psVar1);
if (cVar6 != '\0') {
bVar7 = std::operator==((string *)param_1,"graph");
if (!bVar7) {
bVar7 = std::operator==((string *)param_1,"dot_cloud");
if (!bVar7) {
bVar7 = std::operator==(psVar1,"graph");
if (!bVar7) {
bVar7 = std::operator==(psVar1,"dot_cloud");
if (!bVar7) {
pPVar8 = *(Property **)(param_1 + 0x60);
pPVar2 = *(Property **)(param_1 + 0x68);
while( true ) {
if (pPVar8 == pPVar2) {
return;
}
lVar3 = std::
__find_if<__gnu_cxx::__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,__gnu_cxx::__ops::_Iter_equals_val<std::__cxx11::string_const>>
(COMMON_PROPERTIES_abi_cxx11_,DAT_00122ba8,pPVar8);
if (lVar3 == DAT_00122ba8) break;
this_00 = PROPERTY_CONSTRAINTS_abi_cxx11_;
pCVar4 = (ConstraintInfo *)
std::
map<std::__cxx11::string,SEMANTICANALYZER::ConstraintInfo,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,SEMANTICANALYZER::ConstraintInfo>>>
::at((map<std::__cxx11::string,SEMANTICANALYZER::ConstraintInfo,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,SEMANTICANALYZER::ConstraintInfo>>>
*)PROPERTY_CONSTRAINTS_abi_cxx11_,(string *)pPVar8);
checkPropertyValue((SemanticAnalyzer *)this_00,pPVar8,pCVar4,param_2);
pPVar8 = pPVar8 + 0x40;
}
pSVar5 = (SemanticError *)__cxa_allocate_exception(0x10);
/* try { // try from 0011389b to 001138ae has its CatchHandler @ 00113a46 */
std::operator+((char *)local_40,(string *)&DAT_0011b2c1);
/* try { // try from 001138af to 001138c4 has its CatchHandler @ 00113a2f */
std::operator+(local_60,(char *)local_40);
/* try { // try from 001138c8 to 001138ef has its CatchHandler @ 00113a20 */
SemanticError::SemanticError(pSVar5,local_60,param_2);
/* WARNING: Subroutine does not return */
__cxa_throw(pSVar5,PTR_typeinfo_00121f00,PTR__runtime_error_00121f80);
}
}
}
}
pSVar5 = (SemanticError *)__cxa_allocate_exception(0x10);
/* try { // try from 00113900 to 00113915 has its CatchHandler @ 00113a1e */
std::__cxx11::string::string<std::allocator<char>>(local_60,&DAT_0011b31a,local_40);
/* try { // try from 00113919 to 00113940 has its CatchHandler @ 00113a14 */
SemanticError::SemanticError(pSVar5,local_60,param_2);
/* WARNING: Subroutine does not return */
__cxa_throw(pSVar5,PTR_typeinfo_00121f00,PTR__runtime_error_00121f80);
}
pSVar5 = (SemanticError *)__cxa_allocate_exception(0x10);
/* try { // try from 001139b3 to 001139c6 has its CatchHandler @ 00113a10 */
std::operator+((char *)local_40,(string *)&DAT_0011b11a);
/* try { // try from 001139c7 to 001139dc has its CatchHandler @ 00113a0a */
std::operator+(local_60,(char *)local_40);
/* try { // try from 001139e0 to 00113a07 has its CatchHandler @ 00113a08 */
SemanticError::SemanticError(pSVar5,local_60,param_2);
/* WARNING: Subroutine does not return */
__cxa_throw(pSVar5,PTR_typeinfo_00121f00,PTR__runtime_error_00121f80);
}
| |
24,294 | mi_fetch_keypage | eloqsql/storage/myisam/mi_page.c | uchar *_mi_fetch_keypage(register MI_INFO *info, MI_KEYDEF *keyinfo,
my_off_t page, int level,
uchar *buff, int return_buffer)
{
uchar *tmp;
uint page_size;
DBUG_ENTER("_mi_fetch_keypage");
DBUG_PRINT("enter",("page: %ld", (long) page));
tmp=(uchar*) key_cache_read(info->s->key_cache,
info->s->kfile, page, level, (uchar*) buff,
(uint) keyinfo->block_length,
(uint) keyinfo->block_length,
return_buffer);
if (tmp == info->buff)
info->buff_used=1;
else if (!tmp)
{
DBUG_PRINT("error",("Got errno: %d from key_cache_read",my_errno));
info->last_keypage=HA_OFFSET_ERROR;
mi_print_error(info->s, HA_ERR_CRASHED);
my_errno=HA_ERR_CRASHED;
DBUG_RETURN(0);
}
info->last_keypage=page;
page_size=mi_getint(tmp);
if (page_size < 4 || page_size > keyinfo->block_length)
{
DBUG_PRINT("error",("page %lu had wrong page length: %u",
(ulong) page, page_size));
DBUG_DUMP("page", tmp, keyinfo->block_length);
info->last_keypage = HA_OFFSET_ERROR;
mi_print_error(info->s, HA_ERR_CRASHED);
my_errno = HA_ERR_CRASHED;
tmp = 0;
}
DBUG_RETURN(tmp);
} | O0 | c | mi_fetch_keypage:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
jmp 0xbe041
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x278(%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x350(%rax), %esi
movq -0x20(%rbp), %rdx
movl -0x24(%rbp), %ecx
movq -0x30(%rbp), %r8
movq -0x18(%rbp), %rax
movzwl 0xe(%rax), %r9d
movq -0x18(%rbp), %rax
movzwl 0xe(%rax), %r10d
movl -0x34(%rbp), %eax
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
callq 0xe4ad0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x100(%rcx), %rax
jne 0xbe0ab
movq -0x10(%rbp), %rax
movb $0x1, 0x33d(%rax)
jmp 0xbe0f7
cmpq $0x0, -0x40(%rbp)
jne 0xbe0f5
jmp 0xbe0b4
jmp 0xbe0b6
movq -0x10(%rbp), %rax
movq $-0x1, 0x190(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %edi
callq 0xae540
callq 0xf6090
movl $0x7e, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0xbe18c
jmp 0xbe0f7
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x190(%rax)
movq -0x40(%rbp), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x40(%rbp), %rcx
movzbl (%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzwl %ax, %eax
andl $0x7fff, %eax # imm = 0x7FFF
movl %eax, -0x44(%rbp)
cmpl $0x4, -0x44(%rbp)
jb 0xbe140
movl -0x44(%rbp), %eax
movq -0x18(%rbp), %rcx
movzwl 0xe(%rcx), %ecx
cmpl %ecx, %eax
jbe 0xbe182
jmp 0xbe142
jmp 0xbe144
jmp 0xbe146
jmp 0xbe148
movq -0x10(%rbp), %rax
movq $-0x1, 0x190(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %edi
callq 0xae540
callq 0xf6090
movl $0x7e, (%rax)
movq $0x0, -0x40(%rbp)
jmp 0xbe184
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _mi_fetch_keypage:
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_24], ecx
mov [rbp+var_30], r8
mov [rbp+var_34], r9d
jmp short $+2
loc_BE041:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rdi, [rax+278h]
mov rax, [rbp+var_10]
mov rax, [rax]
mov esi, [rax+350h]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_24]
mov r8, [rbp+var_30]
mov rax, [rbp+var_18]
movzx r9d, word ptr [rax+0Eh]
mov rax, [rbp+var_18]
movzx r10d, word ptr [rax+0Eh]
mov eax, [rbp+var_34]
mov [rsp+60h+var_60], r10d
mov [rsp+60h+var_58], eax
call key_cache_read
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov rcx, [rbp+var_10]
cmp rax, [rcx+100h]
jnz short loc_BE0AB
mov rax, [rbp+var_10]
mov byte ptr [rax+33Dh], 1
jmp short loc_BE0F7
loc_BE0AB:
cmp [rbp+var_40], 0
jnz short loc_BE0F5
jmp short $+2
loc_BE0B4:
jmp short $+2
loc_BE0B6:
mov rax, [rbp+var_10]
mov qword ptr [rax+190h], 0FFFFFFFFFFFFFFFFh
mov rax, [rbp+var_10]
mov rax, [rax]
mov rsi, [rax+268h]
mov edi, 7Eh ; '~'
call mi_report_error
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
mov [rbp+var_8], 0
jmp loc_BE18C
loc_BE0F5:
jmp short $+2
loc_BE0F7:
mov rcx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax+190h], rcx
mov rax, [rbp+var_40]
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rcx, [rbp+var_40]
movzx ecx, byte ptr [rcx]
movzx ecx, cx
shl ecx, 8
or eax, ecx
movzx eax, ax
and eax, 7FFFh
mov [rbp+var_44], eax
cmp [rbp+var_44], 4
jb short loc_BE140
mov eax, [rbp+var_44]
mov rcx, [rbp+var_18]
movzx ecx, word ptr [rcx+0Eh]
cmp eax, ecx
jbe short loc_BE182
loc_BE140:
jmp short $+2
loc_BE142:
jmp short $+2
loc_BE144:
jmp short $+2
loc_BE146:
jmp short $+2
loc_BE148:
mov rax, [rbp+var_10]
mov qword ptr [rax+190h], 0FFFFFFFFFFFFFFFFh
mov rax, [rbp+var_10]
mov rax, [rax]
mov rsi, [rax+268h]
mov edi, 7Eh ; '~'
call mi_report_error
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
mov [rbp+var_40], 0
loc_BE182:
jmp short $+2
loc_BE184:
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
loc_BE18C:
mov rax, [rbp+var_8]
add rsp, 60h
pop rbp
retn
| unsigned __int16 * mi_fetch_keypage(_QWORD *a1, long long a2, long long a3, int a4, int a5, int a6)
{
const char *v6; // rsi
const char *v7; // rsi
unsigned int v9; // [rsp+1Ch] [rbp-44h]
unsigned __int16 *v10; // [rsp+20h] [rbp-40h]
v10 = (unsigned __int16 *)key_cache_read(
*(_QWORD *)(*a1 + 632LL),
*(_DWORD *)(*a1 + 848LL),
a3,
a4,
a5,
*(unsigned __int16 *)(a2 + 14),
*(unsigned __int16 *)(a2 + 14),
a6);
if ( v10 == (unsigned __int16 *)a1[32] )
{
*((_BYTE *)a1 + 829) = 1;
}
else if ( !v10 )
{
a1[50] = -1LL;
v6 = *(const char **)(*a1 + 616LL);
mi_report_error(126, (long long)v6);
*(_DWORD *)my_thread_var(126LL, v6) = 126;
return 0LL;
}
a1[50] = a3;
v9 = _byteswap_ushort(*v10) & 0x7FFF;
if ( v9 < 4 || v9 > *(unsigned __int16 *)(a2 + 14) )
{
a1[50] = -1LL;
v7 = *(const char **)(*a1 + 616LL);
mi_report_error(126, (long long)v7);
*(_DWORD *)my_thread_var(126LL, v7) = 126;
return 0LL;
}
return v10;
}
| _mi_fetch_keypage:
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 dword ptr [RBP + -0x24],ECX
MOV qword ptr [RBP + -0x30],R8
MOV dword ptr [RBP + -0x34],R9D
JMP 0x001be041
LAB_001be041:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + 0x278]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV ESI,dword ptr [RAX + 0x350]
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x24]
MOV R8,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x18]
MOVZX R9D,word ptr [RAX + 0xe]
MOV RAX,qword ptr [RBP + -0x18]
MOVZX R10D,word ptr [RAX + 0xe]
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RSP],R10D
MOV dword ptr [RSP + 0x8],EAX
CALL 0x001e4ad0
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x100]
JNZ 0x001be0ab
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x33d],0x1
JMP 0x001be0f7
LAB_001be0ab:
CMP qword ptr [RBP + -0x40],0x0
JNZ 0x001be0f5
JMP 0x001be0b4
LAB_001be0b4:
JMP 0x001be0b6
LAB_001be0b6:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x190],-0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x268]
MOV EDI,0x7e
CALL 0x001ae540
CALL 0x001f6090
MOV dword ptr [RAX],0x7e
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001be18c
LAB_001be0f5:
JMP 0x001be0f7
LAB_001be0f7:
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x190],RCX
MOV RAX,qword ptr [RBP + -0x40]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x40]
MOVZX ECX,byte ptr [RCX]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOVZX EAX,AX
AND EAX,0x7fff
MOV dword ptr [RBP + -0x44],EAX
CMP dword ptr [RBP + -0x44],0x4
JC 0x001be140
MOV EAX,dword ptr [RBP + -0x44]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,word ptr [RCX + 0xe]
CMP EAX,ECX
JBE 0x001be182
LAB_001be140:
JMP 0x001be142
LAB_001be142:
JMP 0x001be144
LAB_001be144:
JMP 0x001be146
LAB_001be146:
JMP 0x001be148
LAB_001be148:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x190],-0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x268]
MOV EDI,0x7e
CALL 0x001ae540
CALL 0x001f6090
MOV dword ptr [RAX],0x7e
MOV qword ptr [RBP + -0x40],0x0
LAB_001be182:
JMP 0x001be184
LAB_001be184:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
LAB_001be18c:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x60
POP RBP
RET
|
byte * _mi_fetch_keypage(long *param_1,long param_2,long param_3,int4 param_4,
int8 param_5,int4 param_6)
{
uint uVar1;
int4 *puVar2;
byte *local_48;
local_48 = (byte *)key_cache_read(*(int8 *)(*param_1 + 0x278),
*(int4 *)(*param_1 + 0x350),param_3,param_4,param_5,
*(int2 *)(param_2 + 0xe),*(int2 *)(param_2 + 0xe),
param_6);
if (local_48 == (byte *)param_1[0x20]) {
*(int1 *)((long)param_1 + 0x33d) = 1;
}
else if (local_48 == (byte *)0x0) {
param_1[0x32] = -1;
mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268));
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x7e;
return (byte *)0x0;
}
param_1[0x32] = param_3;
uVar1 = (uint)local_48[1] | (*local_48 & 0x7f) << 8;
if ((uVar1 < 4) || (*(ushort *)(param_2 + 0xe) < uVar1)) {
param_1[0x32] = -1;
mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268));
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x7e;
local_48 = (byte *)0x0;
}
return local_48;
}
| |
24,295 | restore_cs_variables | eloqsql/client/mysqldump.c | static void restore_cs_variables(FILE *sql_file,
const char *delimiter)
{
fprintf(sql_file,
"/*!50003 SET character_set_client = @saved_cs_client */ %s\n"
"/*!50003 SET character_set_results = @saved_cs_results */ %s\n"
"/*!50003 SET collation_connection = @saved_col_connection */ %s\n",
(const char *) delimiter,
(const char *) delimiter,
(const char *) delimiter);
} | O0 | c | restore_cs_variables:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x10(%rbp), %rcx
movq -0x10(%rbp), %r8
leaq 0x97b71(%rip), %rsi # 0xdd078
movb $0x0, %al
callq 0x381d0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| restore_cs_variables:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_10]
mov r8, [rbp+var_10]
lea rsi, a50003SetCharac; "/*!50003 SET character_set_client = @s"...
mov al, 0
call _fprintf
add rsp, 10h
pop rbp
retn
| long long restore_cs_variables(long long a1, const char *a2)
{
return fprintf(
a1,
"/*!50003 SET character_set_client = @saved_cs_client */ %s\n"
"/*!50003 SET character_set_results = @saved_cs_results */ %s\n"
"/*!50003 SET collation_connection = @saved_col_connection */ %s\n",
a2,
a2,
a2);
}
| restore_cs_variables:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x10]
MOV R8,qword ptr [RBP + -0x10]
LEA RSI,[0x1dd078]
MOV AL,0x0
CALL 0x001381d0
ADD RSP,0x10
POP RBP
RET
|
void restore_cs_variables(FILE *param_1,int8 param_2)
{
fprintf(param_1,
"/*!50003 SET character_set_client = @saved_cs_client */ %s\n/*!50003 SET character_set_results = @saved_cs_results */ %s\n/*!50003 SET collation_connection = @saved_col_connection */ %s\n"
,param_2,param_2,param_2);
return;
}
| |
24,296 | lunasvg::parseStyleSheet(std::basic_string_view<char, std::char_traits<char>>) | dmazzella[P]pylunasvg/lunasvg/source/svgparser.cpp | static RuleDataList parseStyleSheet(std::string_view input)
{
RuleDataList rules;
while(!input.empty()) {
skipOptionalSpaces(input);
if(skipDelimiter(input, '@')) {
int depth = 0;
while(!input.empty()) {
auto ch = input.front();
input.remove_prefix(1);
if(ch == ';' && depth == 0)
break;
if(ch == '{') ++depth;
else if(ch == '}' && depth > 0) {
if(depth == 1)
break;
--depth;
}
}
continue;
}
Rule rule;
if(!parseRule(input, rule))
break;
for(const auto& selector : rule.selectors) {
size_t specificity = 0;
for(const auto& simpleSelector : selector) {
specificity += (simpleSelector.id == ElementID::Star) ? 0x0 : 0x1;
for(const auto& attributeSelector : simpleSelector.attributeSelectors) {
specificity += (attributeSelector.id == PropertyID::Id) ? 0x10000 : 0x100;
}
}
rules.emplace_back(selector, rule.declarations, specificity, rules.size());
}
}
return rules;
} | O0 | cpp | lunasvg::parseStyleSheet(std::basic_string_view<char, std::char_traits<char>>):
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp # imm = 0x110
movq %rdi, -0xe8(%rbp)
movq %rdi, %rax
movq %rax, -0xe0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x10(%rbp)
movb $0x0, -0x19(%rbp)
callq 0x3fd10
leaq -0x18(%rbp), %rdi
callq 0x20620
xorb $-0x1, %al
testb $0x1, %al
jne 0x3c1e5
jmp 0x3c4ff
leaq -0x18(%rbp), %rdi
callq 0x332b0
leaq -0x18(%rbp), %rdi
movl $0x40, %esi
callq 0x33420
testb $0x1, %al
jne 0x3c205
jmp 0x3c287
movl $0x0, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x20620
xorb $-0x1, %al
testb $0x1, %al
jne 0x3c21d
jmp 0x3c282
leaq -0x18(%rbp), %rdi
callq 0x20640
movb (%rax), %al
movb %al, -0x21(%rbp)
leaq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0x231b0
movsbl -0x21(%rbp), %eax
cmpl $0x3b, %eax
jne 0x3c24a
cmpl $0x0, -0x20(%rbp)
jne 0x3c24a
jmp 0x3c282
movsbl -0x21(%rbp), %eax
cmpl $0x7b, %eax
jne 0x3c25e
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x3c280
movsbl -0x21(%rbp), %eax
cmpl $0x7d, %eax
jne 0x3c27e
cmpl $0x0, -0x20(%rbp)
jle 0x3c27e
cmpl $0x1, -0x20(%rbp)
jne 0x3c275
jmp 0x3c282
movl -0x20(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x3c280
jmp 0x3c20c
jmp 0x3c1d1
leaq -0x58(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0x3fd30
movq -0xf8(%rbp), %rsi
leaq -0x18(%rbp), %rdi
callq 0x3cfa0
movb %al, -0xe9(%rbp)
jmp 0x3c2af
movb -0xe9(%rbp), %al
testb $0x1, %al
jne 0x3c2ed
jmp 0x3c2bb
movl $0x3, -0x68(%rbp)
jmp 0x3c4e6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x3ff00
movq -0xe8(%rbp), %rdi
callq 0x3e9c0
jmp 0x3c52c
leaq -0x58(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rdi
callq 0x3fd60
movq %rax, -0x78(%rbp)
movq -0x70(%rbp), %rdi
callq 0x3fd90
movq %rax, -0x80(%rbp)
leaq -0x78(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x3fdc0
testb $0x1, %al
jne 0x3c325
jmp 0x3c4df
leaq -0x78(%rbp), %rdi
callq 0x3fe00
movq %rax, -0x88(%rbp)
movq $0x0, -0x90(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rdi
callq 0x3ed30
movq %rax, -0xa0(%rbp)
movq -0x98(%rbp), %rdi
callq 0x3ed60
movq %rax, -0xa8(%rbp)
leaq -0xa0(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x3f6c0
testb $0x1, %al
jne 0x3c390
jmp 0x3c479
leaq -0xa0(%rbp), %rdi
callq 0x3f700
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movb 0x4(%rax), %dl
movl $0x1, %eax
xorl %ecx, %ecx
cmpb $0x1, %dl
cmovel %ecx, %eax
cltq
addq -0x90(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0xb0(%rbp), %rax
addq $0x8, %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rdi
callq 0x3ede0
movq %rax, -0xc0(%rbp)
movq -0xb8(%rbp), %rdi
callq 0x3ee10
movq %rax, -0xc8(%rbp)
leaq -0xc0(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x3ee40
testb $0x1, %al
jne 0x3c41b
jmp 0x3c466
leaq -0xc0(%rbp), %rdi
callq 0x3ee80
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
movb 0x4(%rax), %dl
movl $0x100, %eax # imm = 0x100
movl $0x10000, %ecx # imm = 0x10000
cmpb $0x1d, %dl
cmovel %ecx, %eax
cltq
addq -0x90(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x3eea0
jmp 0x3c402
jmp 0x3c468
leaq -0xa0(%rbp), %rdi
callq 0x3f720
jmp 0x3c374
movq -0xe8(%rbp), %rdi
movq -0x88(%rbp), %rax
movq %rax, -0x108(%rbp)
leaq -0x40(%rbp), %rax
movq %rax, -0x100(%rbp)
callq 0x3fec0
movq -0xe8(%rbp), %rdi
movq -0x108(%rbp), %rsi
movq -0x100(%rbp), %rdx
movq %rax, -0xd8(%rbp)
leaq -0x90(%rbp), %rcx
leaq -0xd8(%rbp), %r8
callq 0x3fe20
jmp 0x3c4cf
jmp 0x3c4d1
leaq -0x78(%rbp), %rdi
callq 0x3fee0
jmp 0x3c30f
movl $0x0, -0x68(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x3ff00
movl -0x68(%rbp), %eax
testl %eax, %eax
je 0x3c4fa
jmp 0x3c4f8
jmp 0x3c4ff
jmp 0x3c1d1
movb $0x1, -0x19(%rbp)
movl $0x1, -0x68(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x3c51c
movq -0xe8(%rbp), %rdi
callq 0x3e9c0
movq -0xe0(%rbp), %rax
addq $0x110, %rsp # imm = 0x110
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0xb6c0
nopw %cs:(%rax,%rax)
| _ZN7lunasvgL15parseStyleSheetESt17basic_string_viewIcSt11char_traitsIcEE:
push rbp
mov rbp, rsp
sub rsp, 110h
mov [rbp+var_E8], rdi
mov rax, rdi
mov [rbp+var_E0], rax
mov [rbp+var_8], rdi
mov [rbp+var_18], rsi
mov [rbp+var_10], rdx
mov [rbp+var_19], 0
call _ZNSt6vectorIN7lunasvg8RuleDataESaIS1_EEC2Ev; std::vector<lunasvg::RuleData>::vector(void)
loc_3C1D1:
lea rdi, [rbp+var_18]
call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE5emptyEv; std::string_view::empty(void)
xor al, 0FFh
test al, 1
jnz short loc_3C1E5
jmp loc_3C4FF
loc_3C1E5:
lea rdi, [rbp+var_18]
call _ZN7lunasvg18skipOptionalSpacesERSt17basic_string_viewIcSt11char_traitsIcEE; lunasvg::skipOptionalSpaces(std::string_view &)
lea rdi, [rbp+var_18]
mov esi, 40h ; '@'
call _ZN7lunasvg13skipDelimiterERSt17basic_string_viewIcSt11char_traitsIcEEc; lunasvg::skipDelimiter(std::string_view &,char)
test al, 1
jnz short loc_3C205
jmp loc_3C287
loc_3C205:
mov [rbp+var_20], 0
loc_3C20C:
lea rdi, [rbp+var_18]
call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE5emptyEv; std::string_view::empty(void)
xor al, 0FFh
test al, 1
jnz short loc_3C21D
jmp short loc_3C282
loc_3C21D:
lea rdi, [rbp+var_18]
call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE5frontEv; std::string_view::front(void)
mov al, [rax]
mov [rbp+var_21], al
lea rdi, [rbp+var_18]
mov esi, 1
call _ZNSt17basic_string_viewIcSt11char_traitsIcEE13remove_prefixEm; std::string_view::remove_prefix(ulong)
movsx eax, [rbp+var_21]
cmp eax, 3Bh ; ';'
jnz short loc_3C24A
cmp [rbp+var_20], 0
jnz short loc_3C24A
jmp short loc_3C282
loc_3C24A:
movsx eax, [rbp+var_21]
cmp eax, 7Bh ; '{'
jnz short loc_3C25E
mov eax, [rbp+var_20]
add eax, 1
mov [rbp+var_20], eax
jmp short loc_3C280
loc_3C25E:
movsx eax, [rbp+var_21]
cmp eax, 7Dh ; '}'
jnz short loc_3C27E
cmp [rbp+var_20], 0
jle short loc_3C27E
cmp [rbp+var_20], 1
jnz short loc_3C275
jmp short loc_3C282
loc_3C275:
mov eax, [rbp+var_20]
add eax, 0FFFFFFFFh
mov [rbp+var_20], eax
loc_3C27E:
jmp short $+2
loc_3C280:
jmp short loc_3C20C
loc_3C282:
jmp loc_3C1D1
loc_3C287:
lea rdi, [rbp+var_58]; this
mov [rbp+var_F8], rdi
call _ZN7lunasvg4RuleC2Ev; lunasvg::Rule::Rule(void)
mov rsi, [rbp+var_F8]
lea rdi, [rbp+var_18]
call _ZN7lunasvgL9parseRuleERSt17basic_string_viewIcSt11char_traitsIcEERNS_4RuleE; lunasvg::parseRule(std::string_view &,lunasvg::Rule &)
mov [rbp+var_E9], al
jmp short $+2
loc_3C2AF:
mov al, [rbp+var_E9]
test al, 1
jnz short loc_3C2ED
jmp short $+2
loc_3C2BB:
mov [rbp+var_68], 3
jmp loc_3C4E6
mov rcx, rax
mov eax, edx
mov [rbp+var_60], rcx
mov [rbp+var_64], eax
lea rdi, [rbp+var_58]; this
call _ZN7lunasvg4RuleD2Ev; lunasvg::Rule::~Rule()
mov rdi, [rbp+var_E8]
call _ZNSt6vectorIN7lunasvg8RuleDataESaIS1_EED2Ev; std::vector<lunasvg::RuleData>::~vector()
jmp loc_3C52C
loc_3C2ED:
lea rax, [rbp+var_58]
mov [rbp+var_70], rax
mov rdi, [rbp+var_70]
call _ZNSt6vectorIS_IN7lunasvg14SimpleSelectorESaIS1_EESaIS3_EE5beginEv; std::vector<std::vector<lunasvg::SimpleSelector>>::begin(void)
mov [rbp+var_78], rax
mov rdi, [rbp+var_70]
call _ZNSt6vectorIS_IN7lunasvg14SimpleSelectorESaIS1_EESaIS3_EE3endEv; std::vector<std::vector<lunasvg::SimpleSelector>>::end(void)
mov [rbp+var_80], rax
loc_3C30F:
lea rdi, [rbp+var_78]
lea rsi, [rbp+var_80]
call _ZN9__gnu_cxxneIPSt6vectorIN7lunasvg14SimpleSelectorESaIS3_EES1_IS5_SaIS5_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_; __gnu_cxx::operator!=<std::vector<lunasvg::SimpleSelector> *,std::vector<std::vector<lunasvg::SimpleSelector>>>(__gnu_cxx::__normal_iterator<std::vector<lunasvg::SimpleSelector> *,std::vector<std::vector<lunasvg::SimpleSelector>>> const&,__gnu_cxx::__normal_iterator<std::vector<lunasvg::SimpleSelector> *,std::vector<std::vector<lunasvg::SimpleSelector>>> const&)
test al, 1
jnz short loc_3C325
jmp loc_3C4DF
loc_3C325:
lea rdi, [rbp+var_78]
call _ZNK9__gnu_cxx17__normal_iteratorIPSt6vectorIN7lunasvg14SimpleSelectorESaIS3_EES1_IS5_SaIS5_EEEdeEv; __gnu_cxx::__normal_iterator<std::vector<lunasvg::SimpleSelector> *,std::vector<std::vector<lunasvg::SimpleSelector>>>::operator*(void)
mov [rbp+var_88], rax
mov [rbp+var_90], 0
mov rax, [rbp+var_88]
mov [rbp+var_98], rax
mov rdi, [rbp+var_98]
call _ZNKSt6vectorIN7lunasvg14SimpleSelectorESaIS1_EE5beginEv; std::vector<lunasvg::SimpleSelector>::begin(void)
mov [rbp+var_A0], rax
mov rdi, [rbp+var_98]
call _ZNKSt6vectorIN7lunasvg14SimpleSelectorESaIS1_EE3endEv; std::vector<lunasvg::SimpleSelector>::end(void)
mov [rbp+var_A8], rax
loc_3C374:
lea rdi, [rbp+var_A0]
lea rsi, [rbp+var_A8]
call _ZN9__gnu_cxxneIPKN7lunasvg14SimpleSelectorESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_; __gnu_cxx::operator!=<lunasvg::SimpleSelector const*,std::vector<lunasvg::SimpleSelector>>(__gnu_cxx::__normal_iterator<lunasvg::SimpleSelector const*,std::vector<lunasvg::SimpleSelector>> const&,__gnu_cxx::__normal_iterator<lunasvg::SimpleSelector const*,std::vector<lunasvg::SimpleSelector>> const&)
test al, 1
jnz short loc_3C390
jmp loc_3C479
loc_3C390:
lea rdi, [rbp+var_A0]
call _ZNK9__gnu_cxx17__normal_iteratorIPKN7lunasvg14SimpleSelectorESt6vectorIS2_SaIS2_EEEdeEv; __gnu_cxx::__normal_iterator<lunasvg::SimpleSelector const*,std::vector<lunasvg::SimpleSelector>>::operator*(void)
mov [rbp+var_B0], rax
mov rax, [rbp+var_B0]
mov dl, [rax+4]
mov eax, 1
xor ecx, ecx
cmp dl, 1
cmovz eax, ecx
cdqe
add rax, [rbp+var_90]
mov [rbp+var_90], rax
mov rax, [rbp+var_B0]
add rax, 8
mov [rbp+var_B8], rax
mov rdi, [rbp+var_B8]
call _ZNKSt6vectorIN7lunasvg17AttributeSelectorESaIS1_EE5beginEv; std::vector<lunasvg::AttributeSelector>::begin(void)
mov [rbp+var_C0], rax
mov rdi, [rbp+var_B8]
call _ZNKSt6vectorIN7lunasvg17AttributeSelectorESaIS1_EE3endEv; std::vector<lunasvg::AttributeSelector>::end(void)
mov [rbp+var_C8], rax
loc_3C402:
lea rdi, [rbp+var_C0]
lea rsi, [rbp+var_C8]
call _ZN9__gnu_cxxneIPKN7lunasvg17AttributeSelectorESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_; __gnu_cxx::operator!=<lunasvg::AttributeSelector const*,std::vector<lunasvg::AttributeSelector>>(__gnu_cxx::__normal_iterator<lunasvg::AttributeSelector const*,std::vector<lunasvg::AttributeSelector>> const&,__gnu_cxx::__normal_iterator<lunasvg::AttributeSelector const*,std::vector<lunasvg::AttributeSelector>> const&)
test al, 1
jnz short loc_3C41B
jmp short loc_3C466
loc_3C41B:
lea rdi, [rbp+var_C0]
call _ZNK9__gnu_cxx17__normal_iteratorIPKN7lunasvg17AttributeSelectorESt6vectorIS2_SaIS2_EEEdeEv; __gnu_cxx::__normal_iterator<lunasvg::AttributeSelector const*,std::vector<lunasvg::AttributeSelector>>::operator*(void)
mov [rbp+var_D0], rax
mov rax, [rbp+var_D0]
mov dl, [rax+4]
mov eax, 100h
mov ecx, offset _ZNSt15__uniq_ptr_implIN7lunasvg7SVGNodeESt14default_deleteIS1_EE10_M_deleterEv; std::__uniq_ptr_impl<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>::_M_deleter(void)
cmp dl, 1Dh
cmovz eax, ecx
cdqe
add rax, [rbp+var_90]
mov [rbp+var_90], rax
lea rdi, [rbp+var_C0]
call _ZN9__gnu_cxx17__normal_iteratorIPKN7lunasvg17AttributeSelectorESt6vectorIS2_SaIS2_EEEppEv; __gnu_cxx::__normal_iterator<lunasvg::AttributeSelector const*,std::vector<lunasvg::AttributeSelector>>::operator++(void)
jmp short loc_3C402
loc_3C466:
jmp short $+2
loc_3C468:
lea rdi, [rbp+var_A0]
call _ZN9__gnu_cxx17__normal_iteratorIPKN7lunasvg14SimpleSelectorESt6vectorIS2_SaIS2_EEEppEv; __gnu_cxx::__normal_iterator<lunasvg::SimpleSelector const*,std::vector<lunasvg::SimpleSelector>>::operator++(void)
jmp loc_3C374
loc_3C479:
mov rdi, [rbp+var_E8]
mov rax, [rbp+var_88]
mov [rbp+var_108], rax
lea rax, [rbp+var_40]
mov [rbp+var_100], rax
call _ZNKSt6vectorIN7lunasvg8RuleDataESaIS1_EE4sizeEv; std::vector<lunasvg::RuleData>::size(void)
mov rdi, [rbp+var_E8]
mov rsi, [rbp+var_108]
mov rdx, [rbp+var_100]
mov [rbp+var_D8], rax
lea rcx, [rbp+var_90]
lea r8, [rbp+var_D8]
call _ZNSt6vectorIN7lunasvg8RuleDataESaIS1_EE12emplace_backIJRKS_INS0_14SimpleSelectorESaIS5_EERS_INS0_11DeclarationESaISA_EERmmEEERS1_DpOT_; std::vector<lunasvg::RuleData>::emplace_back<std::vector const&<lunasvg::SimpleSelector,std::allocator<std::vector const>>,std::vector&<lunasvg::Declaration,std::allocator<std::vector&>>,ulong &,ulong>(std::vector const&<lunasvg::SimpleSelector,std::allocator<std::vector const>>,std::vector&<lunasvg::Declaration,std::allocator<std::vector&>>,ulong &,ulong &&)
jmp short $+2
loc_3C4CF:
jmp short $+2
loc_3C4D1:
lea rdi, [rbp+var_78]
call _ZN9__gnu_cxx17__normal_iteratorIPSt6vectorIN7lunasvg14SimpleSelectorESaIS3_EES1_IS5_SaIS5_EEEppEv; __gnu_cxx::__normal_iterator<std::vector<lunasvg::SimpleSelector> *,std::vector<std::vector<lunasvg::SimpleSelector>>>::operator++(void)
jmp loc_3C30F
loc_3C4DF:
mov [rbp+var_68], 0
loc_3C4E6:
lea rdi, [rbp+var_58]; this
call _ZN7lunasvg4RuleD2Ev; lunasvg::Rule::~Rule()
mov eax, [rbp+var_68]
test eax, eax
jz short loc_3C4FA
jmp short $+2
loc_3C4F8:
jmp short loc_3C4FF
loc_3C4FA:
jmp loc_3C1D1
loc_3C4FF:
mov [rbp+var_19], 1
mov [rbp+var_68], 1
test [rbp+var_19], 1
jnz short loc_3C51C
mov rdi, [rbp+var_E8]
call _ZNSt6vectorIN7lunasvg8RuleDataESaIS1_EED2Ev; std::vector<lunasvg::RuleData>::~vector()
loc_3C51C:
mov rax, [rbp+var_E0]
add rsp, 110h
pop rbp
retn
loc_3C52C:
mov rdi, [rbp+var_60]
call __Unwind_Resume
| long long lunasvg::parseStyleSheet(long long a1, long long a2, long long a3)
{
signed int v3; // eax
long long v5; // [rsp+8h] [rbp-108h]
long long v6; // [rsp+38h] [rbp-D8h] BYREF
long long v7; // [rsp+40h] [rbp-D0h]
long long v8; // [rsp+48h] [rbp-C8h] BYREF
long long v9; // [rsp+50h] [rbp-C0h] BYREF
long long v10; // [rsp+58h] [rbp-B8h]
long long v11; // [rsp+60h] [rbp-B0h]
long long v12; // [rsp+68h] [rbp-A8h] BYREF
long long v13; // [rsp+70h] [rbp-A0h] BYREF
long long v14; // [rsp+78h] [rbp-98h]
long long v15; // [rsp+80h] [rbp-90h] BYREF
long long v16; // [rsp+88h] [rbp-88h]
long long v17; // [rsp+90h] [rbp-80h] BYREF
long long v18; // [rsp+98h] [rbp-78h] BYREF
_BYTE *v19; // [rsp+A0h] [rbp-70h]
int v20; // [rsp+A8h] [rbp-68h]
_BYTE v21[24]; // [rsp+B8h] [rbp-58h] BYREF
_BYTE v22[31]; // [rsp+D0h] [rbp-40h] BYREF
char v23; // [rsp+EFh] [rbp-21h]
int v24; // [rsp+F0h] [rbp-20h]
char v25; // [rsp+F7h] [rbp-19h]
_QWORD v26[3]; // [rsp+F8h] [rbp-18h] BYREF
v26[2] = a1;
v26[0] = a2;
v26[1] = a3;
v25 = 0;
std::vector<lunasvg::RuleData>::vector();
LABEL_2:
while ( !std::string_view::empty(v26) )
{
lunasvg::skipOptionalSpaces(v26);
if ( (lunasvg::skipDelimiter(v26, 64) & 1) != 0 )
{
v24 = 0;
while ( !std::string_view::empty(v26) )
{
v23 = *(_BYTE *)std::string_view::front((long long)v26);
std::string_view::remove_prefix(v26, 1LL);
if ( v23 == 59 && !v24 )
break;
if ( v23 == 123 )
{
++v24;
}
else if ( v23 == 125 && v24 > 0 )
{
if ( v24 == 1 )
goto LABEL_2;
--v24;
}
}
}
else
{
lunasvg::Rule::Rule((lunasvg::Rule *)v21);
if ( (lunasvg::parseRule(v26, v21) & 1) != 0 )
{
v19 = v21;
v18 = std::vector<std::vector<lunasvg::SimpleSelector>>::begin(v21);
v17 = std::vector<std::vector<lunasvg::SimpleSelector>>::end(v19);
while ( (__gnu_cxx::operator!=<std::vector<lunasvg::SimpleSelector> *,std::vector<std::vector<lunasvg::SimpleSelector>>>(
&v18,
&v17) & 1) != 0 )
{
v16 = __gnu_cxx::__normal_iterator<std::vector<lunasvg::SimpleSelector> *,std::vector<std::vector<lunasvg::SimpleSelector>>>::operator*(&v18);
v15 = 0LL;
v14 = v16;
v13 = std::vector<lunasvg::SimpleSelector>::begin(v16);
v12 = std::vector<lunasvg::SimpleSelector>::end(v14);
while ( (__gnu_cxx::operator!=<lunasvg::SimpleSelector const*,std::vector<lunasvg::SimpleSelector>>(
&v13,
&v12) & 1) != 0 )
{
v11 = __gnu_cxx::__normal_iterator<lunasvg::SimpleSelector const*,std::vector<lunasvg::SimpleSelector>>::operator*(&v13);
v15 += *(_BYTE *)(v11 + 4) != 1;
v10 = v11 + 8;
v9 = std::vector<lunasvg::AttributeSelector>::begin(v11 + 8);
v8 = std::vector<lunasvg::AttributeSelector>::end(v10);
while ( (__gnu_cxx::operator!=<lunasvg::AttributeSelector const*,std::vector<lunasvg::AttributeSelector>>(
&v9,
&v8) & 1) != 0 )
{
v7 = __gnu_cxx::__normal_iterator<lunasvg::AttributeSelector const*,std::vector<lunasvg::AttributeSelector>>::operator*(&v9);
v3 = 256;
if ( *(_BYTE *)(v7 + 4) == 29 )
v3 = (unsigned int)std::__uniq_ptr_impl<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>::_M_deleter;
v15 += v3;
__gnu_cxx::__normal_iterator<lunasvg::AttributeSelector const*,std::vector<lunasvg::AttributeSelector>>::operator++(&v9);
}
__gnu_cxx::__normal_iterator<lunasvg::SimpleSelector const*,std::vector<lunasvg::SimpleSelector>>::operator++(&v13);
}
v5 = v16;
v6 = std::vector<lunasvg::RuleData>::size(a1);
std::vector<lunasvg::RuleData>::emplace_back<std::vector const&<lunasvg::SimpleSelector,std::allocator<std::vector const>>,std::vector&<lunasvg::Declaration,std::allocator<std::vector&>>,unsigned long &,unsigned long>(
a1,
v5,
v22,
&v15,
&v6);
__gnu_cxx::__normal_iterator<std::vector<lunasvg::SimpleSelector> *,std::vector<std::vector<lunasvg::SimpleSelector>>>::operator++(&v18);
}
v20 = 0;
}
else
{
v20 = 3;
}
lunasvg::Rule::~Rule((lunasvg::Rule *)v21);
if ( v20 )
return a1;
}
}
return a1;
}
| parseStyleSheet:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x110
MOV qword ptr [RBP + -0xe8],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0xe0],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RBP + -0x19],0x0
CALL 0x0013fd10
LAB_0013c1d1:
LEA RDI,[RBP + -0x18]
CALL 0x00120620
XOR AL,0xff
TEST AL,0x1
JNZ 0x0013c1e5
JMP 0x0013c4ff
LAB_0013c1e5:
LEA RDI,[RBP + -0x18]
CALL 0x001332b0
LEA RDI,[RBP + -0x18]
MOV ESI,0x40
CALL 0x00133420
TEST AL,0x1
JNZ 0x0013c205
JMP 0x0013c287
LAB_0013c205:
MOV dword ptr [RBP + -0x20],0x0
LAB_0013c20c:
LEA RDI,[RBP + -0x18]
CALL 0x00120620
XOR AL,0xff
TEST AL,0x1
JNZ 0x0013c21d
JMP 0x0013c282
LAB_0013c21d:
LEA RDI,[RBP + -0x18]
CALL 0x00120640
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x21],AL
LEA RDI,[RBP + -0x18]
MOV ESI,0x1
CALL 0x001231b0
MOVSX EAX,byte ptr [RBP + -0x21]
CMP EAX,0x3b
JNZ 0x0013c24a
CMP dword ptr [RBP + -0x20],0x0
JNZ 0x0013c24a
JMP 0x0013c282
LAB_0013c24a:
MOVSX EAX,byte ptr [RBP + -0x21]
CMP EAX,0x7b
JNZ 0x0013c25e
MOV EAX,dword ptr [RBP + -0x20]
ADD EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
JMP 0x0013c280
LAB_0013c25e:
MOVSX EAX,byte ptr [RBP + -0x21]
CMP EAX,0x7d
JNZ 0x0013c27e
CMP dword ptr [RBP + -0x20],0x0
JLE 0x0013c27e
CMP dword ptr [RBP + -0x20],0x1
JNZ 0x0013c275
JMP 0x0013c282
LAB_0013c275:
MOV EAX,dword ptr [RBP + -0x20]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x20],EAX
LAB_0013c27e:
JMP 0x0013c280
LAB_0013c280:
JMP 0x0013c20c
LAB_0013c282:
JMP 0x0013c1d1
LAB_0013c287:
LEA RDI,[RBP + -0x58]
MOV qword ptr [RBP + -0xf8],RDI
CALL 0x0013fd30
MOV RSI,qword ptr [RBP + -0xf8]
LAB_0013c29e:
LEA RDI,[RBP + -0x18]
CALL 0x0013cfa0
MOV byte ptr [RBP + -0xe9],AL
JMP 0x0013c2af
LAB_0013c2af:
MOV AL,byte ptr [RBP + -0xe9]
TEST AL,0x1
JNZ 0x0013c2ed
JMP 0x0013c2bb
LAB_0013c2bb:
MOV dword ptr [RBP + -0x68],0x3
JMP 0x0013c4e6
LAB_0013c2ed:
LEA RAX,[RBP + -0x58]
MOV qword ptr [RBP + -0x70],RAX
MOV RDI,qword ptr [RBP + -0x70]
CALL 0x0013fd60
MOV qword ptr [RBP + -0x78],RAX
MOV RDI,qword ptr [RBP + -0x70]
CALL 0x0013fd90
MOV qword ptr [RBP + -0x80],RAX
LAB_0013c30f:
LEA RDI,[RBP + -0x78]
LEA RSI,[RBP + -0x80]
CALL 0x0013fdc0
TEST AL,0x1
JNZ 0x0013c325
JMP 0x0013c4df
LAB_0013c325:
LEA RDI,[RBP + -0x78]
CALL 0x0013fe00
MOV qword ptr [RBP + -0x88],RAX
MOV qword ptr [RBP + -0x90],0x0
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RBP + -0x98],RAX
MOV RDI,qword ptr [RBP + -0x98]
CALL 0x0013ed30
MOV qword ptr [RBP + -0xa0],RAX
MOV RDI,qword ptr [RBP + -0x98]
CALL 0x0013ed60
MOV qword ptr [RBP + -0xa8],RAX
LAB_0013c374:
LEA RDI,[RBP + -0xa0]
LEA RSI,[RBP + -0xa8]
CALL 0x0013f6c0
TEST AL,0x1
JNZ 0x0013c390
JMP 0x0013c479
LAB_0013c390:
LEA RDI,[RBP + -0xa0]
CALL 0x0013f700
MOV qword ptr [RBP + -0xb0],RAX
MOV RAX,qword ptr [RBP + -0xb0]
MOV DL,byte ptr [RAX + 0x4]
MOV EAX,0x1
XOR ECX,ECX
CMP DL,0x1
CMOVZ EAX,ECX
CDQE
ADD RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RBP + -0x90],RAX
MOV RAX,qword ptr [RBP + -0xb0]
ADD RAX,0x8
MOV qword ptr [RBP + -0xb8],RAX
MOV RDI,qword ptr [RBP + -0xb8]
CALL 0x0013ede0
MOV qword ptr [RBP + -0xc0],RAX
MOV RDI,qword ptr [RBP + -0xb8]
CALL 0x0013ee10
MOV qword ptr [RBP + -0xc8],RAX
LAB_0013c402:
LEA RDI,[RBP + -0xc0]
LEA RSI,[RBP + -0xc8]
CALL 0x0013ee40
TEST AL,0x1
JNZ 0x0013c41b
JMP 0x0013c466
LAB_0013c41b:
LEA RDI,[RBP + -0xc0]
CALL 0x0013ee80
MOV qword ptr [RBP + -0xd0],RAX
MOV RAX,qword ptr [RBP + -0xd0]
MOV DL,byte ptr [RAX + 0x4]
MOV EAX,0x100
MOV ECX,0x10000
CMP DL,0x1d
CMOVZ EAX,ECX
CDQE
ADD RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RBP + -0x90],RAX
LEA RDI,[RBP + -0xc0]
CALL 0x0013eea0
JMP 0x0013c402
LAB_0013c466:
JMP 0x0013c468
LAB_0013c468:
LEA RDI,[RBP + -0xa0]
CALL 0x0013f720
JMP 0x0013c374
LAB_0013c479:
MOV RDI,qword ptr [RBP + -0xe8]
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RBP + -0x108],RAX
LEA RAX,[RBP + -0x40]
MOV qword ptr [RBP + -0x100],RAX
CALL 0x0013fec0
MOV RDI,qword ptr [RBP + -0xe8]
MOV RSI,qword ptr [RBP + -0x108]
MOV RDX,qword ptr [RBP + -0x100]
MOV qword ptr [RBP + -0xd8],RAX
LEA RCX,[RBP + -0x90]
LEA R8,[RBP + -0xd8]
CALL 0x0013fe20
LAB_0013c4cd:
JMP 0x0013c4cf
LAB_0013c4cf:
JMP 0x0013c4d1
LAB_0013c4d1:
LEA RDI,[RBP + -0x78]
CALL 0x0013fee0
JMP 0x0013c30f
LAB_0013c4df:
MOV dword ptr [RBP + -0x68],0x0
LAB_0013c4e6:
LEA RDI,[RBP + -0x58]
CALL 0x0013ff00
MOV EAX,dword ptr [RBP + -0x68]
TEST EAX,EAX
JZ 0x0013c4fa
JMP 0x0013c4f8
LAB_0013c4f8:
JMP 0x0013c4ff
LAB_0013c4fa:
JMP 0x0013c1d1
LAB_0013c4ff:
MOV byte ptr [RBP + -0x19],0x1
MOV dword ptr [RBP + -0x68],0x1
TEST byte ptr [RBP + -0x19],0x1
JNZ 0x0013c51c
MOV RDI,qword ptr [RBP + -0xe8]
CALL 0x0013e9c0
LAB_0013c51c:
MOV RAX,qword ptr [RBP + -0xe0]
ADD RSP,0x110
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x0013c510) */
/* lunasvg::parseStyleSheet(std::basic_string_view<char, std::char_traits<char> >) */
vector<lunasvg::RuleData,std::allocator<lunasvg::RuleData>> *
lunasvg::parseStyleSheet
(vector<lunasvg::RuleData,std::allocator<lunasvg::RuleData>> *param_1,int8 param_2,
int8 param_3)
{
vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>> *pvVar1;
byte bVar2;
bool bVar3;
int iVar4;
ulong uVar5;
char *pcVar6;
ulong local_e0;
long local_d8;
int8 local_d0;
int8 local_c8;
vector<lunasvg::AttributeSelector,std::allocator<lunasvg::AttributeSelector>> *local_c0;
long local_b8;
int8 local_b0;
int8 local_a8;
vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>> *local_a0;
ulong local_98;
vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>> *local_90;
int8 local_88;
int8 local_80;
vector<std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>,std::allocator<std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>>>
*local_78;
int local_70;
Rule local_60 [24];
vector local_48 [31];
char local_29;
int local_28;
int1 local_21;
int8 local_20;
int8 local_18;
vector<lunasvg::RuleData,std::allocator<lunasvg::RuleData>> *local_10;
local_21 = 0;
local_20 = param_2;
local_18 = param_3;
local_10 = param_1;
std::vector<lunasvg::RuleData,std::allocator<lunasvg::RuleData>>::vector(param_1);
do {
while( true ) {
bVar2 = std::basic_string_view<char,std::char_traits<char>>::empty
((basic_string_view<char,std::char_traits<char>> *)&local_20);
if (((bVar2 ^ 0xff) & 1) == 0) {
return param_1;
}
skipOptionalSpaces((basic_string_view *)&local_20);
uVar5 = skipDelimiter((basic_string_view *)&local_20,'@');
if ((uVar5 & 1) != 0) break;
Rule::Rule(local_60);
/* try { // try from 0013c29e to 0013c4cc has its CatchHandler @ 0013c2c7 */
bVar2 = parseRule((basic_string_view *)&local_20,local_60);
if ((bVar2 & 1) == 0) {
local_70 = 3;
}
else {
local_78 = (vector<std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>,std::allocator<std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>>>
*)local_60;
local_80 = std::
vector<std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>,std::allocator<std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>>>
::begin(local_78);
local_88 = std::
vector<std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>,std::allocator<std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>>>
::end(local_78);
while (bVar3 = __gnu_cxx::operator!=
((__normal_iterator *)&local_80,(__normal_iterator *)&local_88),
bVar3) {
local_a0 = (vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>> *)
__gnu_cxx::
__normal_iterator<std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>*,std::vector<std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>,std::allocator<std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>>>>
::operator*((__normal_iterator<std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>*,std::vector<std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>,std::allocator<std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>>>>
*)&local_80);
local_98 = 0;
local_90 = local_a0;
local_a8 = std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>::
begin(local_a0);
local_b0 = std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>::
end(local_a0);
while (bVar3 = __gnu_cxx::operator!=
((__normal_iterator *)&local_a8,(__normal_iterator *)&local_b0),
pvVar1 = local_90, bVar3) {
local_b8 = __gnu_cxx::
__normal_iterator<lunasvg::SimpleSelector_const*,std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>>
::operator*((__normal_iterator<lunasvg::SimpleSelector_const*,std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>>
*)&local_a8);
local_98 = (long)(int)(uint)(*(char *)(local_b8 + 4) != '\x01') + local_98;
local_c0 = (vector<lunasvg::AttributeSelector,std::allocator<lunasvg::AttributeSelector>>
*)(local_b8 + 8);
local_c8 = std::
vector<lunasvg::AttributeSelector,std::allocator<lunasvg::AttributeSelector>>
::begin(local_c0);
local_d0 = std::
vector<lunasvg::AttributeSelector,std::allocator<lunasvg::AttributeSelector>>
::end(local_c0);
while (bVar3 = __gnu_cxx::operator!=
((__normal_iterator *)&local_c8,(__normal_iterator *)&local_d0)
, bVar3) {
local_d8 = __gnu_cxx::
__normal_iterator<lunasvg::AttributeSelector_const*,std::vector<lunasvg::AttributeSelector,std::allocator<lunasvg::AttributeSelector>>>
::operator*((__normal_iterator<lunasvg::AttributeSelector_const*,std::vector<lunasvg::AttributeSelector,std::allocator<lunasvg::AttributeSelector>>>
*)&local_c8);
iVar4 = 0x100;
if (*(char *)(local_d8 + 4) == '\x1d') {
iVar4 = 0x10000;
}
local_98 = (long)iVar4 + local_98;
__gnu_cxx::
__normal_iterator<lunasvg::AttributeSelector_const*,std::vector<lunasvg::AttributeSelector,std::allocator<lunasvg::AttributeSelector>>>
::operator++((__normal_iterator<lunasvg::AttributeSelector_const*,std::vector<lunasvg::AttributeSelector,std::allocator<lunasvg::AttributeSelector>>>
*)&local_c8);
}
__gnu_cxx::
__normal_iterator<lunasvg::SimpleSelector_const*,std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>>
::operator++((__normal_iterator<lunasvg::SimpleSelector_const*,std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>>
*)&local_a8);
}
local_e0 = std::vector<lunasvg::RuleData,std::allocator<lunasvg::RuleData>>::size(param_1)
;
std::vector<lunasvg::RuleData,std::allocator<lunasvg::RuleData>>::
emplace_back<std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>const&,std::vector<lunasvg::Declaration,std::allocator<lunasvg::Declaration>>&,unsigned_long&,unsigned_long>
(param_1,(vector *)pvVar1,local_48,&local_98,&local_e0);
__gnu_cxx::
__normal_iterator<std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>*,std::vector<std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>,std::allocator<std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>>>>
::operator++((__normal_iterator<std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>*,std::vector<std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>,std::allocator<std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>>>>
*)&local_80);
}
local_70 = 0;
}
Rule::~Rule(local_60);
if (local_70 != 0) {
return param_1;
}
}
local_28 = 0;
while (bVar2 = std::basic_string_view<char,std::char_traits<char>>::empty
((basic_string_view<char,std::char_traits<char>> *)&local_20),
((bVar2 ^ 0xff) & 1) != 0) {
pcVar6 = (char *)std::basic_string_view<char,std::char_traits<char>>::front
((basic_string_view<char,std::char_traits<char>> *)&local_20);
local_29 = *pcVar6;
std::basic_string_view<char,std::char_traits<char>>::remove_prefix
((basic_string_view<char,std::char_traits<char>> *)&local_20,1);
if ((local_29 == ';') && (local_28 == 0)) break;
if (local_29 == '{') {
local_28 = local_28 + 1;
}
else if ((local_29 == '}') && (0 < local_28)) {
if (local_28 == 1) break;
local_28 = local_28 + -1;
}
}
} while( true );
}
| |
24,297 | 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 0x984d9(%rip), %rax # 0x154da0
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x20(%rdi), %rdi
leaq 0x30(%rbx), %rax
cmpq %rax, %rdi
je 0xbc8e6
movq (%rax), %rsi
incq %rsi
callq 0x1dc50
leaq 0x97aab(%rip), %rax # 0x154398
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xbc902
callq 0x516f8
movl $0x40, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x1dc50
| _ZN5minja12VariableExprD0Ev:
push rbx
mov rbx, rdi
lea rax, _ZTVN5minja12VariableExprE; `vtable for'minja::VariableExpr
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+20h]; void *
lea rax, [rbx+30h]
cmp rdi, rax
jz short loc_BC8E6
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BC8E6:
lea rax, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression
add rax, 10h
mov [rbx], rax
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_BC902
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_BC902:
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 = &`vtable for'minja::VariableExpr + 2;
v2 = (char *)*((_QWORD *)this + 4);
if ( v2 != (char *)this + 48 )
operator delete(v2, *((_QWORD *)this + 6) + 1LL);
*(_QWORD *)this = &`vtable for'minja::Expression + 2;
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,[0x254da0]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x20]
LEA RAX,[RBX + 0x30]
CMP RDI,RAX
JZ 0x001bc8e6
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x0011dc50
LAB_001bc8e6:
LEA RAX,[0x254398]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x10]
TEST RDI,RDI
JZ 0x001bc902
CALL 0x001516f8
LAB_001bc902:
MOV ESI,0x40
MOV RDI,RBX
POP RBX
JMP 0x0011dc50
|
/* minja::VariableExpr::~VariableExpr() */
void __thiscall minja::VariableExpr::~VariableExpr(VariableExpr *this)
{
*(int ***)this = &PTR_do_evaluate_00254db0;
if (*(VariableExpr **)(this + 0x20) != this + 0x30) {
operator_delete(*(VariableExpr **)(this + 0x20),*(long *)(this + 0x30) + 1);
}
*(int ***)this = &PTR___cxa_pure_virtual_002543a8;
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;
}
| |
24,298 | backtick_string | eloqsql/strings/my_vsnprintf.c | static char *backtick_string(CHARSET_INFO *cs, char *to, const char *end,
char *par, size_t par_len, char quote_char,
my_bool cut)
{
char *last[3]= {0,0,0};
uint char_len;
char *start= to;
char *par_end= par + par_len;
size_t buff_length= (size_t) (end - to);
uint index= 0;
if (buff_length <= par_len)
goto err;
*start++= quote_char;
for ( ; par < par_end; par+= char_len)
{
uchar c= *(uchar *) par;
if (cut)
{
last[index]= start;
index= (index + 1) % 3;
}
char_len= my_ci_charlen_fix(cs, (const uchar *) par, (const uchar *) par_end);
if (char_len == 1 && c == (uchar) quote_char )
{
if (start + 1 >= end)
goto err;
*start++= quote_char;
}
if (start + char_len >= end)
goto err;
start= strnmov(start, par, char_len);
}
if (start + 1 >= end)
goto err;
if (cut)
{
uint dots= 0;
start= NULL;
for (; dots < 3; dots++)
{
if (index == 0)
index= 2;
else
index--;
if (!last[index])
break;
start= last[index];
}
if (start == NULL)
goto err; // there was no characters at all
for (; dots; dots--)
*start++= '.';
}
*start++= quote_char;
return start;
err:
*to='\0';
return to;
} | O0 | c | backtick_string:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movb %r9b, %al
movb 0x10(%rbp), %r9b
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movb %al, -0x31(%rbp)
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x251e0
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x70(%rbp)
movl $0x0, -0x74(%rbp)
movq -0x70(%rbp), %rax
cmpq -0x30(%rbp), %rax
ja 0x8b502
jmp 0x8b69a
movb -0x31(%rbp), %cl
movq -0x60(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x60(%rbp)
movb %cl, (%rax)
movq -0x28(%rbp), %rax
cmpq -0x68(%rbp), %rax
jae 0x8b5de
movq -0x28(%rbp), %rax
movb (%rax), %al
movb %al, -0x75(%rbp)
cmpb $0x0, 0x10(%rbp)
je 0x8b551
movq -0x60(%rbp), %rcx
movl -0x74(%rbp), %eax
movq %rcx, -0x50(%rbp,%rax,8)
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl $0x3, %ecx
xorl %edx, %edx
divl %ecx
movl %edx, -0x74(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x68(%rbp), %rdx
callq 0x8b710
movl %eax, -0x54(%rbp)
cmpl $0x1, -0x54(%rbp)
jne 0x8b59e
movzbl -0x75(%rbp), %eax
movzbl -0x31(%rbp), %ecx
cmpl %ecx, %eax
jne 0x8b59e
movq -0x60(%rbp), %rax
addq $0x1, %rax
cmpq -0x20(%rbp), %rax
jb 0x8b58a
jmp 0x8b69a
movb -0x31(%rbp), %cl
movq -0x60(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x60(%rbp)
movb %cl, (%rax)
movq -0x60(%rbp), %rax
movl -0x54(%rbp), %ecx
addq %rcx, %rax
cmpq -0x20(%rbp), %rax
jb 0x8b5b3
jmp 0x8b69a
movq -0x60(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0x54(%rbp), %eax
movl %eax, %edx
callq 0x8bc70
movq %rax, -0x60(%rbp)
movl -0x54(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x8b516
movq -0x60(%rbp), %rax
addq $0x1, %rax
cmpq -0x20(%rbp), %rax
jb 0x8b5f1
jmp 0x8b69a
cmpb $0x0, 0x10(%rbp)
je 0x8b67c
movl $0x0, -0x7c(%rbp)
movq $0x0, -0x60(%rbp)
cmpl $0x3, -0x7c(%rbp)
jae 0x8b64c
cmpl $0x0, -0x74(%rbp)
jne 0x8b61f
movl $0x2, -0x74(%rbp)
jmp 0x8b628
movl -0x74(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x74(%rbp)
movl -0x74(%rbp), %eax
cmpq $0x0, -0x50(%rbp,%rax,8)
jne 0x8b635
jmp 0x8b64c
movl -0x74(%rbp), %eax
movq -0x50(%rbp,%rax,8), %rax
movq %rax, -0x60(%rbp)
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0x8b60a
cmpq $0x0, -0x60(%rbp)
jne 0x8b655
jmp 0x8b69a
jmp 0x8b657
cmpl $0x0, -0x7c(%rbp)
je 0x8b67a
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x2e, (%rax)
movl -0x7c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0x8b657
jmp 0x8b67c
movb -0x31(%rbp), %cl
movq -0x60(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x60(%rbp)
movb %cl, (%rax)
movq -0x60(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x8b6a9
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| backtick_string:
push rbp
mov rbp, rsp
sub rsp, 80h
mov al, r9b
mov r9b, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_31], al
lea rdi, [rbp+var_50]
xor esi, esi
mov edx, 18h
call _memset
mov rax, [rbp+var_18]
mov [rbp+var_60], rax
mov rax, [rbp+var_28]
add rax, [rbp+var_30]
mov [rbp+var_68], rax
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rax, rcx
mov [rbp+var_70], rax
mov [rbp+var_74], 0
mov rax, [rbp+var_70]
cmp rax, [rbp+var_30]
ja short loc_8B502
jmp loc_8B69A
loc_8B502:
mov cl, [rbp+var_31]
mov rax, [rbp+var_60]
mov rdx, rax
add rdx, 1
mov [rbp+var_60], rdx
mov [rax], cl
loc_8B516:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_68]
jnb loc_8B5DE
mov rax, [rbp+var_28]
mov al, [rax]
mov [rbp+var_75], al
cmp [rbp+arg_0], 0
jz short loc_8B551
mov rcx, [rbp+var_60]
mov eax, [rbp+var_74]
mov [rbp+rax*8+var_50], rcx
mov eax, [rbp+var_74]
add eax, 1
mov ecx, 3
xor edx, edx
div ecx
mov [rbp+var_74], edx
loc_8B551:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_68]
call my_ci_charlen_fix
mov [rbp+var_54], eax
cmp [rbp+var_54], 1
jnz short loc_8B59E
movzx eax, [rbp+var_75]
movzx ecx, [rbp+var_31]
cmp eax, ecx
jnz short loc_8B59E
mov rax, [rbp+var_60]
add rax, 1
cmp rax, [rbp+var_20]
jb short loc_8B58A
jmp loc_8B69A
loc_8B58A:
mov cl, [rbp+var_31]
mov rax, [rbp+var_60]
mov rdx, rax
add rdx, 1
mov [rbp+var_60], rdx
mov [rax], cl
loc_8B59E:
mov rax, [rbp+var_60]
mov ecx, [rbp+var_54]
add rax, rcx
cmp rax, [rbp+var_20]
jb short loc_8B5B3
jmp loc_8B69A
loc_8B5B3:
mov rdi, [rbp+var_60]
mov rsi, [rbp+var_28]
mov eax, [rbp+var_54]
mov edx, eax
call strnmov
mov [rbp+var_60], rax
mov ecx, [rbp+var_54]
mov rax, [rbp+var_28]
mov ecx, ecx
add rax, rcx
mov [rbp+var_28], rax
jmp loc_8B516
loc_8B5DE:
mov rax, [rbp+var_60]
add rax, 1
cmp rax, [rbp+var_20]
jb short loc_8B5F1
jmp loc_8B69A
loc_8B5F1:
cmp [rbp+arg_0], 0
jz loc_8B67C
mov [rbp+var_7C], 0
mov [rbp+var_60], 0
loc_8B60A:
cmp [rbp+var_7C], 3
jnb short loc_8B64C
cmp [rbp+var_74], 0
jnz short loc_8B61F
mov [rbp+var_74], 2
jmp short loc_8B628
loc_8B61F:
mov eax, [rbp+var_74]
add eax, 0FFFFFFFFh
mov [rbp+var_74], eax
loc_8B628:
mov eax, [rbp+var_74]
cmp [rbp+rax*8+var_50], 0
jnz short loc_8B635
jmp short loc_8B64C
loc_8B635:
mov eax, [rbp+var_74]
mov rax, [rbp+rax*8+var_50]
mov [rbp+var_60], rax
mov eax, [rbp+var_7C]
add eax, 1
mov [rbp+var_7C], eax
jmp short loc_8B60A
loc_8B64C:
cmp [rbp+var_60], 0
jnz short loc_8B655
jmp short loc_8B69A
loc_8B655:
jmp short $+2
loc_8B657:
cmp [rbp+var_7C], 0
jz short loc_8B67A
mov rax, [rbp+var_60]
mov rcx, rax
add rcx, 1
mov [rbp+var_60], rcx
mov byte ptr [rax], 2Eh ; '.'
mov eax, [rbp+var_7C]
add eax, 0FFFFFFFFh
mov [rbp+var_7C], eax
jmp short loc_8B657
loc_8B67A:
jmp short $+2
loc_8B67C:
mov cl, [rbp+var_31]
mov rax, [rbp+var_60]
mov rdx, rax
add rdx, 1
mov [rbp+var_60], rdx
mov [rax], cl
mov rax, [rbp+var_60]
mov [rbp+var_8], rax
jmp short loc_8B6A9
loc_8B69A:
mov rax, [rbp+var_18]
mov byte ptr [rax], 0
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
loc_8B6A9:
mov rax, [rbp+var_8]
add rsp, 80h
pop rbp
retn
| _BYTE * backtick_string(
long long a1,
_BYTE *a2,
unsigned long long a3,
char *a4,
unsigned long long a5,
char a6,
char a7)
{
_BYTE *v7; // rax
_BYTE *v8; // rax
unsigned int v10; // [rsp+4h] [rbp-7Ch]
char v11; // [rsp+Bh] [rbp-75h]
unsigned int v12; // [rsp+Ch] [rbp-74h]
char *v13; // [rsp+18h] [rbp-68h]
_BYTE *v14; // [rsp+20h] [rbp-60h]
unsigned int v15; // [rsp+2Ch] [rbp-54h]
_QWORD v16[3]; // [rsp+30h] [rbp-50h] BYREF
char v17; // [rsp+4Fh] [rbp-31h]
unsigned long long v18; // [rsp+50h] [rbp-30h]
char *v19; // [rsp+58h] [rbp-28h]
unsigned long long v20; // [rsp+60h] [rbp-20h]
_BYTE *v21; // [rsp+68h] [rbp-18h]
long long v22; // [rsp+70h] [rbp-10h]
v22 = a1;
v21 = a2;
v20 = a3;
v19 = a4;
v18 = a5;
v17 = a6;
memset(v16, 0LL, sizeof(v16));
v13 = &v19[v18];
v12 = 0;
if ( v20 - (unsigned long long)v21 <= v18 )
goto LABEL_25;
v14 = v21 + 1;
*v21 = v17;
while ( v19 < v13 )
{
v11 = *v19;
if ( a7 )
{
v16[v12] = v14;
v12 = (v12 + 1) % 3;
}
v15 = my_ci_charlen_fix(v22, v19, v13);
if ( v15 == 1 && v11 == v17 )
{
if ( (unsigned long long)(v14 + 1) >= v20 )
goto LABEL_25;
v7 = v14++;
*v7 = v17;
}
if ( (unsigned long long)&v14[v15] >= v20 )
goto LABEL_25;
v14 = (_BYTE *)strnmov(v14, v19, v15);
v19 += v15;
}
if ( (unsigned long long)(v14 + 1) >= v20 )
goto LABEL_25;
if ( a7 )
{
v10 = 0;
v14 = 0LL;
while ( v10 < 3 )
{
if ( v12 )
--v12;
else
v12 = 2;
if ( !v16[v12] )
break;
v14 = (_BYTE *)v16[v12];
++v10;
}
if ( v14 )
{
while ( v10 )
{
v8 = v14++;
*v8 = 46;
--v10;
}
goto LABEL_24;
}
LABEL_25:
*v21 = 0;
return v21;
}
LABEL_24:
*v14 = v17;
return v14 + 1;
}
| backtick_string:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV AL,R9B
MOV R9B,byte ptr [RBP + 0x10]
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 qword ptr [RBP + -0x30],R8
MOV byte ptr [RBP + -0x31],AL
LEA RDI,[RBP + -0x50]
XOR ESI,ESI
MOV EDX,0x18
CALL 0x001251e0
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV qword ptr [RBP + -0x70],RAX
MOV dword ptr [RBP + -0x74],0x0
MOV RAX,qword ptr [RBP + -0x70]
CMP RAX,qword ptr [RBP + -0x30]
JA 0x0018b502
JMP 0x0018b69a
LAB_0018b502:
MOV CL,byte ptr [RBP + -0x31]
MOV RAX,qword ptr [RBP + -0x60]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x60],RDX
MOV byte ptr [RAX],CL
LAB_0018b516:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x68]
JNC 0x0018b5de
MOV RAX,qword ptr [RBP + -0x28]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x75],AL
CMP byte ptr [RBP + 0x10],0x0
JZ 0x0018b551
MOV RCX,qword ptr [RBP + -0x60]
MOV EAX,dword ptr [RBP + -0x74]
MOV qword ptr [RBP + RAX*0x8 + -0x50],RCX
MOV EAX,dword ptr [RBP + -0x74]
ADD EAX,0x1
MOV ECX,0x3
XOR EDX,EDX
DIV ECX
MOV dword ptr [RBP + -0x74],EDX
LAB_0018b551:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x68]
CALL 0x0018b710
MOV dword ptr [RBP + -0x54],EAX
CMP dword ptr [RBP + -0x54],0x1
JNZ 0x0018b59e
MOVZX EAX,byte ptr [RBP + -0x75]
MOVZX ECX,byte ptr [RBP + -0x31]
CMP EAX,ECX
JNZ 0x0018b59e
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
CMP RAX,qword ptr [RBP + -0x20]
JC 0x0018b58a
JMP 0x0018b69a
LAB_0018b58a:
MOV CL,byte ptr [RBP + -0x31]
MOV RAX,qword ptr [RBP + -0x60]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x60],RDX
MOV byte ptr [RAX],CL
LAB_0018b59e:
MOV RAX,qword ptr [RBP + -0x60]
MOV ECX,dword ptr [RBP + -0x54]
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x20]
JC 0x0018b5b3
JMP 0x0018b69a
LAB_0018b5b3:
MOV RDI,qword ptr [RBP + -0x60]
MOV RSI,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RBP + -0x54]
MOV EDX,EAX
CALL 0x0018bc70
MOV qword ptr [RBP + -0x60],RAX
MOV ECX,dword ptr [RBP + -0x54]
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0018b516
LAB_0018b5de:
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
CMP RAX,qword ptr [RBP + -0x20]
JC 0x0018b5f1
JMP 0x0018b69a
LAB_0018b5f1:
CMP byte ptr [RBP + 0x10],0x0
JZ 0x0018b67c
MOV dword ptr [RBP + -0x7c],0x0
MOV qword ptr [RBP + -0x60],0x0
LAB_0018b60a:
CMP dword ptr [RBP + -0x7c],0x3
JNC 0x0018b64c
CMP dword ptr [RBP + -0x74],0x0
JNZ 0x0018b61f
MOV dword ptr [RBP + -0x74],0x2
JMP 0x0018b628
LAB_0018b61f:
MOV EAX,dword ptr [RBP + -0x74]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x74],EAX
LAB_0018b628:
MOV EAX,dword ptr [RBP + -0x74]
CMP qword ptr [RBP + RAX*0x8 + -0x50],0x0
JNZ 0x0018b635
JMP 0x0018b64c
LAB_0018b635:
MOV EAX,dword ptr [RBP + -0x74]
MOV RAX,qword ptr [RBP + RAX*0x8 + -0x50]
MOV qword ptr [RBP + -0x60],RAX
MOV EAX,dword ptr [RBP + -0x7c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x7c],EAX
JMP 0x0018b60a
LAB_0018b64c:
CMP qword ptr [RBP + -0x60],0x0
JNZ 0x0018b655
JMP 0x0018b69a
LAB_0018b655:
JMP 0x0018b657
LAB_0018b657:
CMP dword ptr [RBP + -0x7c],0x0
JZ 0x0018b67a
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x60],RCX
MOV byte ptr [RAX],0x2e
MOV EAX,dword ptr [RBP + -0x7c]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x7c],EAX
JMP 0x0018b657
LAB_0018b67a:
JMP 0x0018b67c
LAB_0018b67c:
MOV CL,byte ptr [RBP + -0x31]
MOV RAX,qword ptr [RBP + -0x60]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x60],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0018b6a9
LAB_0018b69a:
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
LAB_0018b6a9:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x80
POP RBP
RET
|
char * backtick_string(int8 param_1,char *param_2,char *param_3,char *param_4,ulong param_5,
char param_6,char param_7)
{
char cVar1;
uint uVar2;
char *pcVar3;
uint local_84;
uint local_7c;
char *local_68;
long local_58 [3];
char local_39;
ulong local_38;
char *local_30;
char *local_28;
char *local_20;
int8 local_18;
local_39 = param_6;
local_38 = param_5;
local_30 = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
memset(local_58,0,0x18);
pcVar3 = local_30 + local_38;
local_7c = 0;
if (local_38 < (ulong)((long)local_28 - (long)local_20)) {
local_68 = local_20 + 1;
*local_20 = local_39;
for (; local_30 < pcVar3; local_30 = local_30 + uVar2) {
cVar1 = *local_30;
if (param_7 != '\0') {
local_58[local_7c] = (long)local_68;
local_7c = (local_7c + 1) % 3;
}
uVar2 = my_ci_charlen_fix(local_18,local_30,pcVar3);
if ((uVar2 == 1) && (cVar1 == local_39)) {
if (local_28 <= local_68 + 1) goto LAB_0018b69a;
*local_68 = local_39;
local_68 = local_68 + 1;
}
if (local_28 <= local_68 + uVar2) goto LAB_0018b69a;
local_68 = (char *)strnmov(local_68,local_30,uVar2);
}
if (local_68 + 1 < local_28) {
if (param_7 != '\0') {
local_68 = (char *)0x0;
for (local_84 = 0; local_84 < 3; local_84 = local_84 + 1) {
if (local_7c == 0) {
local_7c = 2;
}
else {
local_7c = local_7c - 1;
}
if (local_58[local_7c] == 0) break;
local_68 = (char *)local_58[local_7c];
}
if (local_68 == (char *)0x0) goto LAB_0018b69a;
for (; local_84 != 0; local_84 = local_84 - 1) {
*local_68 = '.';
local_68 = local_68 + 1;
}
}
*local_68 = local_39;
return local_68 + 1;
}
}
LAB_0018b69a:
*local_20 = '\0';
return local_20;
}
| |
24,299 | test_bug11037 | eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c | static int test_bug11037(MYSQL *mysql)
{
MYSQL_STMT *stmt;
int rc;
const char *stmt_text;
rc= mysql_query(mysql, "drop table if exists t1");
check_mysql_rc(rc, mysql);
rc= mysql_query(mysql, "create table t1 (id int not null)");
check_mysql_rc(rc, mysql);
rc= mysql_query(mysql, "insert into t1 values (1)");
check_mysql_rc(rc, mysql);
stmt_text= "select id FROM t1";
stmt= mysql_stmt_init(mysql);
FAIL_IF(!stmt, mysql_error(mysql));
rc= mysql_stmt_prepare(stmt, SL(stmt_text));
check_stmt_rc(rc, stmt);
/* expected error */
rc = mysql_stmt_fetch(stmt);
FAIL_UNLESS(rc==1, "Error expected");
rc= mysql_stmt_execute(stmt);
check_stmt_rc(rc, stmt);
rc= mysql_stmt_fetch(stmt);
check_stmt_rc(rc, stmt);
rc= mysql_stmt_fetch(stmt);
FAIL_UNLESS(rc==MYSQL_NO_DATA, "rc != MYSQL_NO_DATA");
rc= mysql_stmt_fetch(stmt);
FAIL_UNLESS(rc==MYSQL_NO_DATA, "rc != MYSQL_NO_DATA");
mysql_stmt_close(stmt);
rc= mysql_query(mysql, "drop table t1");
check_mysql_rc(rc, mysql);
return OK;
} | O0 | c | test_bug11037:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x47128(%rip), %rsi # 0x664d2
callq 0x38a70
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x1f404
movl -0x1c(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3f0
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3c0
movl -0x34(%rbp), %esi
movq -0x30(%rbp), %rdx
movl %eax, %ecx
leaq 0x462f1(%rip), %rdi # 0x656d5
leaq 0x46c82(%rip), %r8 # 0x6606d
movl $0x1c0, %r9d # imm = 0x1C0
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x1f74d
jmp 0x1f406
movq -0x10(%rbp), %rdi
leaq 0x48a57(%rip), %rsi # 0x67e68
callq 0x38a70
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x1f46b
movl -0x1c(%rbp), %eax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3f0
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3c0
movl -0x44(%rbp), %esi
movq -0x40(%rbp), %rdx
movl %eax, %ecx
leaq 0x4628a(%rip), %rdi # 0x656d5
leaq 0x46c1b(%rip), %r8 # 0x6606d
movl $0x1c3, %r9d # imm = 0x1C3
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x1f74d
jmp 0x1f46d
movq -0x10(%rbp), %rdi
leaq 0x48a12(%rip), %rsi # 0x67e8a
callq 0x38a70
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x1f4d2
movl -0x1c(%rbp), %eax
movl %eax, -0x54(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3f0
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3c0
movl -0x54(%rbp), %esi
movq -0x50(%rbp), %rdx
movl %eax, %ecx
leaq 0x46223(%rip), %rdi # 0x656d5
leaq 0x46bb4(%rip), %r8 # 0x6606d
movl $0x1c6, %r9d # imm = 0x1C6
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x1f74d
jmp 0x1f4d4
leaq 0x489c9(%rip), %rax # 0x67ea4
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x44950
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x1f525
movq -0x10(%rbp), %rdi
callq 0x3c3f0
movq %rax, %rsi
leaq 0x4608a(%rip), %rdi # 0x65590
leaq 0x46b60(%rip), %rdx # 0x6606d
movl $0x1ca, %ecx # imm = 0x1CA
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x1f74d
jmp 0x1f527
movq -0x18(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rdi
callq 0x141a0
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rsi
movq %rax, %rdx
callq 0x45070
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x1f58b
movq -0x18(%rbp), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x46024(%rip), %rdi # 0x65590
leaq 0x46afa(%rip), %rdx # 0x6606d
movl $0x1cc, %ecx # imm = 0x1CC
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x1f74d
jmp 0x1f58d
movq -0x18(%rbp), %rdi
callq 0x44020
movl %eax, -0x1c(%rbp)
cmpl $0x1, -0x1c(%rbp)
je 0x1f5cc
leaq 0x45fea(%rip), %rdi # 0x65590
leaq 0x481dc(%rip), %rsi # 0x67789
leaq 0x46ab9(%rip), %rdx # 0x6606d
movl $0x1d0, %ecx # imm = 0x1D0
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x1f74d
jmp 0x1f5ce
movq -0x18(%rbp), %rdi
callq 0x46580
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x1f612
movq -0x18(%rbp), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x45f9d(%rip), %rdi # 0x65590
leaq 0x46a73(%rip), %rdx # 0x6606d
movl $0x1d3, %ecx # imm = 0x1D3
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x1f74d
jmp 0x1f614
movq -0x18(%rbp), %rdi
callq 0x44020
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x1f658
movq -0x18(%rbp), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x45f57(%rip), %rdi # 0x65590
leaq 0x46a2d(%rip), %rdx # 0x6606d
movl $0x1d6, %ecx # imm = 0x1D6
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x1f74d
jmp 0x1f65a
movq -0x18(%rbp), %rdi
callq 0x44020
movl %eax, -0x1c(%rbp)
cmpl $0x64, -0x1c(%rbp)
je 0x1f699
leaq 0x45f1d(%rip), %rdi # 0x65590
leaq 0x4883c(%rip), %rsi # 0x67eb6
leaq 0x469ec(%rip), %rdx # 0x6606d
movl $0x1d9, %ecx # imm = 0x1D9
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x1f74d
jmp 0x1f69b
movq -0x18(%rbp), %rdi
callq 0x44020
movl %eax, -0x1c(%rbp)
cmpl $0x64, -0x1c(%rbp)
je 0x1f6d7
leaq 0x45edc(%rip), %rdi # 0x65590
leaq 0x487fb(%rip), %rsi # 0x67eb6
leaq 0x469ab(%rip), %rdx # 0x6606d
movl $0x1dc, %ecx # imm = 0x1DC
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x1f74d
jmp 0x1f6d9
movq -0x18(%rbp), %rdi
callq 0x43eb0
movq -0x10(%rbp), %rdi
leaq 0x47b1c(%rip), %rsi # 0x67209
callq 0x38a70
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x1f744
movl -0x1c(%rbp), %eax
movl %eax, -0x74(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3f0
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3c0
movl -0x74(%rbp), %esi
movq -0x70(%rbp), %rdx
movl %eax, %ecx
leaq 0x45fae(%rip), %rdi # 0x656d5
leaq 0x4693f(%rip), %r8 # 0x6606d
movl $0x1e0, %r9d # imm = 0x1E0
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x1f74d
jmp 0x1f746
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)
| test_bug11037:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_10], rdi
mov rdi, [rbp+var_10]
lea rsi, aDropTableIfExi; "drop table if exists t1"
call mysql_query
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_1F404
mov eax, [rbp+var_1C]
mov [rbp+var_34], eax
mov rdi, [rbp+var_10]
call mysql_error
mov [rbp+var_30], rax
mov rdi, [rbp+var_10]
call mysql_errno
mov esi, [rbp+var_34]
mov rdx, [rbp+var_30]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 1C0h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_1F74D
loc_1F404:
jmp short $+2
loc_1F406:
mov rdi, [rbp+var_10]
lea rsi, aCreateTableT1I_1; "create table t1 (id int not null)"
call mysql_query
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_1F46B
mov eax, [rbp+var_1C]
mov [rbp+var_44], eax
mov rdi, [rbp+var_10]
call mysql_error
mov [rbp+var_40], rax
mov rdi, [rbp+var_10]
call mysql_errno
mov esi, [rbp+var_44]
mov rdx, [rbp+var_40]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 1C3h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_1F74D
loc_1F46B:
jmp short $+2
loc_1F46D:
mov rdi, [rbp+var_10]
lea rsi, aInsertIntoT1Va_9; "insert into t1 values (1)"
call mysql_query
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_1F4D2
mov eax, [rbp+var_1C]
mov [rbp+var_54], eax
mov rdi, [rbp+var_10]
call mysql_error
mov [rbp+var_50], rax
mov rdi, [rbp+var_10]
call mysql_errno
mov esi, [rbp+var_54]
mov rdx, [rbp+var_50]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 1C6h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_1F74D
loc_1F4D2:
jmp short $+2
loc_1F4D4:
lea rax, aSelectIdFromT1; "select id FROM t1"
mov [rbp+var_28], rax
mov rdi, [rbp+var_10]
call mysql_stmt_init
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jnz short loc_1F525
mov rdi, [rbp+var_10]
call mysql_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 1CAh
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_1F74D
loc_1F525:
jmp short $+2
loc_1F527:
mov rax, [rbp+var_18]
mov [rbp+var_68], rax
mov rax, [rbp+var_28]
mov [rbp+var_60], rax
mov rdi, [rbp+var_28]
call _strlen
mov rdi, [rbp+var_68]
mov rsi, [rbp+var_60]
mov rdx, rax
call mysql_stmt_prepare
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_1F58B
mov rdi, [rbp+var_18]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 1CCh
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_1F74D
loc_1F58B:
jmp short $+2
loc_1F58D:
mov rdi, [rbp+var_18]
call mysql_stmt_fetch
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 1
jz short loc_1F5CC
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aNoErrorExpecte+3; "Error expected"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 1D0h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_1F74D
loc_1F5CC:
jmp short $+2
loc_1F5CE:
mov rdi, [rbp+var_18]
call mysql_stmt_execute
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_1F612
mov rdi, [rbp+var_18]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 1D3h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_1F74D
loc_1F612:
jmp short $+2
loc_1F614:
mov rdi, [rbp+var_18]
call mysql_stmt_fetch
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_1F658
mov rdi, [rbp+var_18]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 1D6h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_1F74D
loc_1F658:
jmp short $+2
loc_1F65A:
mov rdi, [rbp+var_18]
call mysql_stmt_fetch
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 64h ; 'd'
jz short loc_1F699
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aRcMysqlNoData; "rc != MYSQL_NO_DATA"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 1D9h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_1F74D
loc_1F699:
jmp short $+2
loc_1F69B:
mov rdi, [rbp+var_18]
call mysql_stmt_fetch
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 64h ; 'd'
jz short loc_1F6D7
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aRcMysqlNoData; "rc != MYSQL_NO_DATA"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 1DCh
mov al, 0
call diag
mov [rbp+var_4], 1
jmp short loc_1F74D
loc_1F6D7:
jmp short $+2
loc_1F6D9:
mov rdi, [rbp+var_18]
call mysql_stmt_close
mov rdi, [rbp+var_10]
lea rsi, aDropTableT1_0; "drop table t1"
call mysql_query
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_1F744
mov eax, [rbp+var_1C]
mov [rbp+var_74], eax
mov rdi, [rbp+var_10]
call mysql_error
mov [rbp+var_70], rax
mov rdi, [rbp+var_10]
call mysql_errno
mov esi, [rbp+var_74]
mov rdx, [rbp+var_70]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 1E0h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp short loc_1F74D
loc_1F744:
jmp short $+2
loc_1F746:
mov [rbp+var_4], 0
loc_1F74D:
mov eax, [rbp+var_4]
add rsp, 80h
pop rbp
retn
| long long test_bug11037(long long a1)
{
int v1; // eax
int v2; // eax
int v3; // eax
int v4; // eax
int v5; // r8d
int v6; // r9d
long long v7; // rax
int v8; // eax
int v9; // r8d
int v10; // r9d
int v11; // r8d
int v12; // r9d
int v13; // eax
int v14; // r8d
int v15; // r9d
int v16; // eax
int v17; // r8d
int v18; // r9d
int v19; // r8d
int v20; // r9d
int v21; // r8d
int v22; // r9d
int v23; // eax
int v25; // [rsp+10h] [rbp-70h]
int v26; // [rsp+30h] [rbp-50h]
int v27; // [rsp+40h] [rbp-40h]
int v28; // [rsp+50h] [rbp-30h]
int v29; // [rsp+64h] [rbp-1Ch]
int v30; // [rsp+64h] [rbp-1Ch]
int v31; // [rsp+64h] [rbp-1Ch]
int v32; // [rsp+64h] [rbp-1Ch]
long long v33; // [rsp+68h] [rbp-18h]
v29 = mysql_query(a1, "drop table if exists t1");
if ( v29 )
{
v28 = mysql_error(a1);
v1 = mysql_errno(a1);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v29,
v28,
v1,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
448);
return 1;
}
else
{
v30 = mysql_query(a1, "create table t1 (id int not null)");
if ( v30 )
{
v27 = mysql_error(a1);
v2 = mysql_errno(a1);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v30,
v27,
v2,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
451);
return 1;
}
else
{
v31 = mysql_query(a1, "insert into t1 values (1)");
if ( v31 )
{
v26 = mysql_error(a1);
v3 = mysql_errno(a1);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v31,
v26,
v3,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
454);
return 1;
}
else
{
v33 = mysql_stmt_init(a1);
if ( v33 )
{
v7 = strlen("select id FROM t1");
if ( (unsigned int)mysql_stmt_prepare(v33, "select id FROM t1", v7) )
{
v8 = mysql_stmt_error(v33);
diag(
(unsigned int)"Error: %s (%s: %d)",
v8,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
460,
v9,
v10);
return 1;
}
else if ( (unsigned int)mysql_stmt_fetch(v33) == 1 )
{
if ( (unsigned int)mysql_stmt_execute(v33) )
{
v13 = mysql_stmt_error(v33);
diag(
(unsigned int)"Error: %s (%s: %d)",
v13,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
467,
v14,
v15);
return 1;
}
else if ( (unsigned int)mysql_stmt_fetch(v33) )
{
v16 = mysql_stmt_error(v33);
diag(
(unsigned int)"Error: %s (%s: %d)",
v16,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
470,
v17,
v18);
return 1;
}
else if ( (unsigned int)mysql_stmt_fetch(v33) == 100 )
{
if ( (unsigned int)mysql_stmt_fetch(v33) == 100 )
{
mysql_stmt_close(v33);
v32 = mysql_query(a1, "drop table t1");
if ( v32 )
{
v25 = mysql_error(a1);
v23 = mysql_errno(a1);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v32,
v25,
v23,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
480);
return 1;
}
else
{
return 0;
}
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"rc != MYSQL_NO_DATA",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
476,
v21,
v22);
return 1;
}
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"rc != MYSQL_NO_DATA",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
473,
v19,
v20);
return 1;
}
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"Error expected",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
464,
v11,
v12);
return 1;
}
}
else
{
v4 = mysql_error(a1);
diag(
(unsigned int)"Error: %s (%s: %d)",
v4,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
458,
v5,
v6);
return 1;
}
}
}
}
}
| test_bug11037:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x10],RDI
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x1664d2]
CALL 0x00138a70
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x0011f404
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x34],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3f0
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3c0
MOV ESI,dword ptr [RBP + -0x34]
MOV RDX,qword ptr [RBP + -0x30]
MOV ECX,EAX
LEA RDI,[0x1656d5]
LEA R8,[0x16606d]
MOV R9D,0x1c0
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0011f74d
LAB_0011f404:
JMP 0x0011f406
LAB_0011f406:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x167e68]
CALL 0x00138a70
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x0011f46b
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x44],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3f0
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3c0
MOV ESI,dword ptr [RBP + -0x44]
MOV RDX,qword ptr [RBP + -0x40]
MOV ECX,EAX
LEA RDI,[0x1656d5]
LEA R8,[0x16606d]
MOV R9D,0x1c3
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0011f74d
LAB_0011f46b:
JMP 0x0011f46d
LAB_0011f46d:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x167e8a]
CALL 0x00138a70
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x0011f4d2
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x54],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3f0
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3c0
MOV ESI,dword ptr [RBP + -0x54]
MOV RDX,qword ptr [RBP + -0x50]
MOV ECX,EAX
LEA RDI,[0x1656d5]
LEA R8,[0x16606d]
MOV R9D,0x1c6
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0011f74d
LAB_0011f4d2:
JMP 0x0011f4d4
LAB_0011f4d4:
LEA RAX,[0x167ea4]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00144950
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x0011f525
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3f0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0x1ca
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0011f74d
LAB_0011f525:
JMP 0x0011f527
LAB_0011f527:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x60],RAX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001141a0
MOV RDI,qword ptr [RBP + -0x68]
MOV RSI,qword ptr [RBP + -0x60]
MOV RDX,RAX
CALL 0x00145070
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x0011f58b
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0x1cc
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0011f74d
LAB_0011f58b:
JMP 0x0011f58d
LAB_0011f58d:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00144020
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x1
JZ 0x0011f5cc
LEA RDI,[0x165590]
LEA RSI,[0x167789]
LEA RDX,[0x16606d]
MOV ECX,0x1d0
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0011f74d
LAB_0011f5cc:
JMP 0x0011f5ce
LAB_0011f5ce:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00146580
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x0011f612
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0x1d3
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0011f74d
LAB_0011f612:
JMP 0x0011f614
LAB_0011f614:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00144020
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x0011f658
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0x1d6
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0011f74d
LAB_0011f658:
JMP 0x0011f65a
LAB_0011f65a:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00144020
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x64
JZ 0x0011f699
LEA RDI,[0x165590]
LEA RSI,[0x167eb6]
LEA RDX,[0x16606d]
MOV ECX,0x1d9
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0011f74d
LAB_0011f699:
JMP 0x0011f69b
LAB_0011f69b:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00144020
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x64
JZ 0x0011f6d7
LEA RDI,[0x165590]
LEA RSI,[0x167eb6]
LEA RDX,[0x16606d]
MOV ECX,0x1dc
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0011f74d
LAB_0011f6d7:
JMP 0x0011f6d9
LAB_0011f6d9:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00143eb0
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x167209]
CALL 0x00138a70
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x0011f744
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x74],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3f0
MOV qword ptr [RBP + -0x70],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3c0
MOV ESI,dword ptr [RBP + -0x74]
MOV RDX,qword ptr [RBP + -0x70]
MOV ECX,EAX
LEA RDI,[0x1656d5]
LEA R8,[0x16606d]
MOV R9D,0x1e0
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0011f74d
LAB_0011f744:
JMP 0x0011f746
LAB_0011f746:
MOV dword ptr [RBP + -0x4],0x0
LAB_0011f74d:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x80
POP RBP
RET
|
int4 test_bug11037(int8 param_1)
{
int iVar1;
int4 uVar2;
int8 uVar3;
long lVar4;
size_t sVar5;
int4 local_c;
iVar1 = mysql_query(param_1,"drop table if exists t1");
if (iVar1 == 0) {
iVar1 = mysql_query(param_1,"create table t1 (id int not null)");
if (iVar1 == 0) {
iVar1 = mysql_query(param_1,"insert into t1 values (1)");
if (iVar1 == 0) {
lVar4 = mysql_stmt_init(param_1);
if (lVar4 == 0) {
uVar3 = mysql_error(param_1);
diag("Error: %s (%s: %d)",uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
0x1ca);
local_c = 1;
}
else {
sVar5 = strlen("select id FROM t1");
iVar1 = mysql_stmt_prepare(lVar4,"select id FROM t1",sVar5);
if (iVar1 == 0) {
iVar1 = mysql_stmt_fetch(lVar4);
if (iVar1 == 1) {
iVar1 = mysql_stmt_execute(lVar4);
if (iVar1 == 0) {
iVar1 = mysql_stmt_fetch(lVar4);
if (iVar1 == 0) {
iVar1 = mysql_stmt_fetch(lVar4);
if (iVar1 == 100) {
iVar1 = mysql_stmt_fetch(lVar4);
if (iVar1 == 100) {
mysql_stmt_close(lVar4);
iVar1 = mysql_query(param_1,"drop table t1");
if (iVar1 == 0) {
local_c = 0;
}
else {
uVar3 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x1e0);
local_c = 1;
}
}
else {
diag("Error: %s (%s: %d)","rc != MYSQL_NO_DATA",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x1dc);
local_c = 1;
}
}
else {
diag("Error: %s (%s: %d)","rc != MYSQL_NO_DATA",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x1d9);
local_c = 1;
}
}
else {
uVar3 = mysql_stmt_error(lVar4);
diag("Error: %s (%s: %d)",uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x1d6);
local_c = 1;
}
}
else {
uVar3 = mysql_stmt_error(lVar4);
diag("Error: %s (%s: %d)",uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x1d3);
local_c = 1;
}
}
else {
diag("Error: %s (%s: %d)","Error expected",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x1d0);
local_c = 1;
}
}
else {
uVar3 = mysql_stmt_error(lVar4);
diag("Error: %s (%s: %d)",uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x1cc);
local_c = 1;
}
}
}
else {
uVar3 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
0x1c6);
local_c = 1;
}
}
else {
uVar3 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0x1c3
);
local_c = 1;
}
}
else {
uVar3 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0x1c0);
local_c = 1;
}
return local_c;
}
|
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.