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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
54,600 | ma_tls_verify_server_cert | eloqsql/libmariadb/libmariadb/secure/openssl.c | int ma_tls_verify_server_cert(MARIADB_TLS *ctls)
{
X509 *cert;
MYSQL *mysql;
SSL *ssl;
MARIADB_PVIO *pvio;
#if !defined(HAVE_OPENSSL_CHECK_HOST)
X509_NAME *x509sn;
int cn_pos;
X509_NAME_ENTRY *cn_entry;
ASN1_STRING *cn_asn1;
const char *cn_str;
#endif
if (!ctls || !ctls->ssl)
return 1;
ssl= (SSL *)ctls->ssl;
mysql= (MYSQL *)SSL_get_app_data(ssl);
pvio= mysql->net.pvio;
if (!mysql->host)
{
pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN,
ER(CR_SSL_CONNECTION_ERROR), "Invalid (empty) hostname");
return 1;
}
if (!(cert= SSL_get_peer_certificate(ssl)))
{
pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN,
ER(CR_SSL_CONNECTION_ERROR), "Unable to get server certificate");
return 1;
}
#ifdef HAVE_OPENSSL_CHECK_HOST
if (X509_check_host(cert, mysql->host, 0, 0, 0) != 1
&& X509_check_ip_asc(cert, mysql->host, 0) != 1)
goto error;
#else
x509sn= X509_get_subject_name(cert);
if ((cn_pos= X509_NAME_get_index_by_NID(x509sn, NID_commonName, -1)) < 0)
goto error;
if (!(cn_entry= X509_NAME_get_entry(x509sn, cn_pos)))
goto error;
if (!(cn_asn1 = X509_NAME_ENTRY_get_data(cn_entry)))
goto error;
cn_str = (char *)ASN1_STRING_data(cn_asn1);
/* Make sure there is no embedded \0 in the CN */
if ((size_t)ASN1_STRING_length(cn_asn1) != strlen(cn_str))
goto error;
if (strcmp(cn_str, mysql->host))
goto error;
#endif
X509_free(cert);
return 0;
error:
X509_free(cert);
pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN,
ER(CR_SSL_CONNECTION_ERROR), "Validation of SSL server certificate failed");
return 1;
} | O0 | c | ma_tls_verify_server_cert:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x51ece
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x51eda
movl $0x1, -0x4(%rbp)
jmp 0x5203a
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
xorl %esi, %esi
callq 0x14150
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x2b0(%rax)
jne 0x51f4f
movq -0x30(%rbp), %rax
movq 0x50(%rax), %r9
movq -0x20(%rbp), %rdi
leaq 0x2ef7f(%rip), %rax # 0x80ea0
movq (%rax), %rdx
leaq 0x2ef85(%rip), %rax # 0x80eb0
movq 0xd0(%rax), %rcx
movl $0x7ea, %esi # imm = 0x7EA
leaq 0x193ef(%rip), %r8 # 0x6b32d
movb $0x0, %al
callq *%r9
movl $0x1, -0x4(%rbp)
jmp 0x5203a
movq -0x28(%rbp), %rdi
callq 0x147e0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x51fa3
movq -0x30(%rbp), %rax
movq 0x50(%rax), %r9
movq -0x20(%rbp), %rdi
leaq 0x2ef2b(%rip), %rax # 0x80ea0
movq (%rax), %rdx
leaq 0x2ef31(%rip), %rax # 0x80eb0
movq 0xd0(%rax), %rcx
movl $0x7ea, %esi # imm = 0x7EA
leaq 0x193b4(%rip), %r8 # 0x6b346
movb $0x0, %al
callq *%r9
movl $0x1, -0x4(%rbp)
jmp 0x5203a
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x2b0(%rax), %rsi
xorl %eax, %eax
movl %eax, %r8d
xorl %ecx, %ecx
movq %r8, %rdx
callq 0x14860
cmpl $0x1, %eax
je 0x51fe3
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x2b0(%rax), %rsi
xorl %edx, %edx
callq 0x14330
cmpl $0x1, %eax
je 0x51fe3
jmp 0x51ff5
movq -0x18(%rbp), %rdi
callq 0x14240
movl $0x0, -0x4(%rbp)
jmp 0x5203a
movq -0x18(%rbp), %rdi
callq 0x14240
movq -0x30(%rbp), %rax
movq 0x50(%rax), %r9
movq -0x20(%rbp), %rdi
leaq 0x2ee8f(%rip), %rax # 0x80ea0
movq (%rax), %rdx
leaq 0x2ee95(%rip), %rax # 0x80eb0
movq 0xd0(%rax), %rcx
movl $0x7ea, %esi # imm = 0x7EA
leaq 0x19339(%rip), %r8 # 0x6b367
movb $0x0, %al
callq *%r9
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_tls_verify_server_cert:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
cmp [rbp+var_10], 0
jz short loc_51ECE
mov rax, [rbp+var_10]
cmp qword ptr [rax+10h], 0
jnz short loc_51EDA
loc_51ECE:
mov [rbp+var_4], 1
jmp loc_5203A
loc_51EDA:
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov [rbp+var_28], rax
mov rdi, [rbp+var_28]
xor esi, esi
call _SSL_get_ex_data
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_30], rax
mov rax, [rbp+var_20]
cmp qword ptr [rax+2B0h], 0
jnz short loc_51F4F
mov rax, [rbp+var_30]
mov r9, [rax+50h]
mov rdi, [rbp+var_20]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rax, client_errors
mov rcx, [rax+0D0h]
mov esi, 7EAh
lea r8, aInvalidEmptyHo; "Invalid (empty) hostname"
mov al, 0
call r9
mov [rbp+var_4], 1
jmp loc_5203A
loc_51F4F:
mov rdi, [rbp+var_28]
call _SSL_get1_peer_certificate
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_51FA3
mov rax, [rbp+var_30]
mov r9, [rax+50h]
mov rdi, [rbp+var_20]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rax, client_errors
mov rcx, [rax+0D0h]
mov esi, 7EAh
lea r8, aUnableToGetSer; "Unable to get server certificate"
mov al, 0
call r9
mov [rbp+var_4], 1
jmp loc_5203A
loc_51FA3:
mov rdi, [rbp+var_18]
mov rax, [rbp+var_20]
mov rsi, [rax+2B0h]
xor eax, eax
mov r8d, eax
xor ecx, ecx
mov rdx, r8
call _X509_check_host
cmp eax, 1
jz short loc_51FE3
mov rdi, [rbp+var_18]
mov rax, [rbp+var_20]
mov rsi, [rax+2B0h]
xor edx, edx
call _X509_check_ip_asc
cmp eax, 1
jz short loc_51FE3
jmp short loc_51FF5
loc_51FE3:
mov rdi, [rbp+var_18]
call _X509_free
mov [rbp+var_4], 0
jmp short loc_5203A
loc_51FF5:
mov rdi, [rbp+var_18]
call _X509_free
mov rax, [rbp+var_30]
mov r9, [rax+50h]
mov rdi, [rbp+var_20]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rax, client_errors
mov rcx, [rax+0D0h]
mov esi, 7EAh
lea r8, aValidationOfSs; "Validation of SSL server certificate fa"...
mov al, 0
call r9
mov [rbp+var_4], 1
loc_5203A:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long ma_tls_verify_server_cert(long long a1)
{
long long v2; // [rsp+0h] [rbp-30h]
long long v3; // [rsp+8h] [rbp-28h]
long long *v4; // [rsp+10h] [rbp-20h]
long long v5; // [rsp+18h] [rbp-18h]
if ( a1 && *(_QWORD *)(a1 + 16) )
{
v3 = *(_QWORD *)(a1 + 16);
v4 = (long long *)SSL_get_ex_data(v3, 0LL);
v2 = *v4;
if ( v4[86] )
{
v5 = SSL_get1_peer_certificate(v3);
if ( v5 )
{
if ( (unsigned int)X509_check_host(v5, v4[86], 0LL, 0LL) == 1
|| (unsigned int)X509_check_ip_asc(v5, v4[86], 0LL) == 1 )
{
X509_free(v5);
return 0;
}
else
{
X509_free(v5);
(*(void ( **)(long long *, long long, char *, char *, const char *))(v2 + 80))(
v4,
2026LL,
SQLSTATE_UNKNOWN,
client_errors[26],
"Validation of SSL server certificate failed");
return 1;
}
}
else
{
(*(void ( **)(long long *, long long, char *, char *, const char *))(v2 + 80))(
v4,
2026LL,
SQLSTATE_UNKNOWN,
client_errors[26],
"Unable to get server certificate");
return 1;
}
}
else
{
(*(void ( **)(long long *, long long, char *, char *, const char *))(v2 + 80))(
v4,
2026LL,
SQLSTATE_UNKNOWN,
client_errors[26],
"Invalid (empty) hostname");
return 1;
}
}
else
{
return 1;
}
}
| ma_tls_verify_server_cert:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00151ece
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x10],0x0
JNZ 0x00151eda
LAB_00151ece:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0015203a
LAB_00151eda:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x28]
XOR ESI,ESI
CALL 0x00114150
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0x2b0],0x0
JNZ 0x00151f4f
MOV RAX,qword ptr [RBP + -0x30]
MOV R9,qword ptr [RAX + 0x50]
MOV RDI,qword ptr [RBP + -0x20]
LEA RAX,[0x180ea0]
MOV RDX,qword ptr [RAX]
LEA RAX,[0x180eb0]
MOV RCX,qword ptr [RAX + 0xd0]
MOV ESI,0x7ea
LEA R8,[0x16b32d]
MOV AL,0x0
CALL R9
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0015203a
LAB_00151f4f:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001147e0
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x00151fa3
MOV RAX,qword ptr [RBP + -0x30]
MOV R9,qword ptr [RAX + 0x50]
MOV RDI,qword ptr [RBP + -0x20]
LEA RAX,[0x180ea0]
MOV RDX,qword ptr [RAX]
LEA RAX,[0x180eb0]
MOV RCX,qword ptr [RAX + 0xd0]
MOV ESI,0x7ea
LEA R8,[0x16b346]
MOV AL,0x0
CALL R9
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0015203a
LAB_00151fa3:
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RAX + 0x2b0]
XOR EAX,EAX
MOV R8D,EAX
XOR ECX,ECX
MOV RDX,R8
CALL 0x00114860
CMP EAX,0x1
JZ 0x00151fe3
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RAX + 0x2b0]
XOR EDX,EDX
CALL 0x00114330
CMP EAX,0x1
JZ 0x00151fe3
JMP 0x00151ff5
LAB_00151fe3:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00114240
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0015203a
LAB_00151ff5:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00114240
MOV RAX,qword ptr [RBP + -0x30]
MOV R9,qword ptr [RAX + 0x50]
MOV RDI,qword ptr [RBP + -0x20]
LEA RAX,[0x180ea0]
MOV RDX,qword ptr [RAX]
LEA RAX,[0x180eb0]
MOV RCX,qword ptr [RAX + 0xd0]
MOV ESI,0x7ea
LEA R8,[0x16b367]
MOV AL,0x0
CALL R9
MOV dword ptr [RBP + -0x4],0x1
LAB_0015203a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 ma_tls_verify_server_cert(long param_1)
{
SSL *ssl;
long lVar1;
int iVar2;
long *plVar3;
X509 *a;
int4 local_c;
if ((param_1 == 0) || (*(long *)(param_1 + 0x10) == 0)) {
local_c = 1;
}
else {
ssl = *(SSL **)(param_1 + 0x10);
plVar3 = (long *)SSL_get_ex_data(ssl,0);
lVar1 = *plVar3;
if (plVar3[0x56] == 0) {
(**(code **)(lVar1 + 0x50))
(plVar3,0x7ea,SQLSTATE_UNKNOWN,PTR_s_TLS_SSL_error_____100s_00180f80,
"Invalid (empty) hostname");
local_c = 1;
}
else {
a = (X509 *)SSL_get1_peer_certificate(ssl);
if (a == (X509 *)0x0) {
(**(code **)(lVar1 + 0x50))
(plVar3,0x7ea,SQLSTATE_UNKNOWN,PTR_s_TLS_SSL_error_____100s_00180f80,
"Unable to get server certificate");
local_c = 1;
}
else {
iVar2 = X509_check_host(a,plVar3[0x56],0,0);
if ((iVar2 != 1) && (iVar2 = X509_check_ip_asc(a,plVar3[0x56],0), iVar2 != 1)) {
X509_free(a);
(**(code **)(lVar1 + 0x50))
(plVar3,0x7ea,SQLSTATE_UNKNOWN,PTR_s_TLS_SSL_error_____100s_00180f80,
"Validation of SSL server certificate failed");
return 1;
}
X509_free(a);
local_c = 0;
}
}
}
return local_c;
}
| |
54,601 | nglog::tools::itoa_r(unsigned long, char*, unsigned long, unsigned int, unsigned long) | ng-log[P]ng-log/src/symbolize.cc | static char* itoa_r(uintptr_t i, char* buf, size_t sz, unsigned base,
size_t padding) {
// Make sure we can write at least one NUL byte.
size_t n = 1;
if (n > sz) {
return nullptr;
}
if (base < 2 || base > 16) {
buf[0] = '\000';
return nullptr;
}
char* start = buf;
// Loop until we have converted the entire number. Output at least one
// character (i.e. '0').
char* ptr = start;
do {
// Make sure there is still enough space left in our output buffer.
if (++n > sz) {
buf[0] = '\000';
return nullptr;
}
// Output the next digit.
*ptr++ = "0123456789abcdef"[i % base];
i /= base;
if (padding > 0) {
padding--;
}
} while (i > 0 || padding > 0);
// Terminate the output with a NUL character.
*ptr = '\000';
// Conversion to ASCII actually resulted in the digits being in reverse
// order. We can't easily generate them in forward order, as we can't tell
// the number of characters needed until we are done converting.
// So, now, we reverse the string (except for the possible "-" sign).
while (--ptr > start) {
char ch = *ptr;
*ptr = *start;
*start++ = ch;
}
return buf;
} | O0 | cpp | nglog::tools::itoa_r(unsigned long, char*, unsigned long, unsigned int, unsigned long):
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq $0x1, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x20(%rbp), %rax
jbe 0x51136
movq $0x0, -0x8(%rbp)
jmp 0x51248
cmpl $0x2, -0x24(%rbp)
jb 0x51142
cmpl $0x10, -0x24(%rbp)
jbe 0x51156
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x51248
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
cmpq -0x20(%rbp), %rax
jbe 0x5118c
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x51248
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
xorl %edx, %edx
divq %rcx
leaq 0x3ea0(%rip), %rax # 0x5503f
movb (%rax,%rdx), %cl
movq -0x48(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x48(%rbp)
movb %cl, (%rax)
movl -0x24(%rbp), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
xorl %edx, %edx
divq %rcx
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x30(%rbp)
jbe 0x511d8
movq -0x30(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x511da
movb $0x1, %al
cmpq $0x0, -0x10(%rbp)
movb %al, -0x4a(%rbp)
ja 0x511f1
cmpq $0x0, -0x30(%rbp)
seta %al
movb %al, -0x4a(%rbp)
movb -0x4a(%rbp), %al
testb $0x1, %al
jne 0x51166
movq -0x48(%rbp), %rax
movb $0x0, (%rax)
movq -0x48(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x48(%rbp)
cmpq -0x40(%rbp), %rax
jbe 0x51240
movq -0x48(%rbp), %rax
movb (%rax), %al
movb %al, -0x49(%rbp)
movq -0x40(%rbp), %rax
movb (%rax), %cl
movq -0x48(%rbp), %rax
movb %cl, (%rax)
movb -0x49(%rbp), %cl
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
movb %cl, (%rax)
jmp 0x51203
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nop
| _ZN5nglog5toolsL6itoa_rEmPcmjm:
push rbp
mov rbp, rsp
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_38], 1
mov rax, [rbp+var_38]
cmp rax, [rbp+var_20]
jbe short loc_51136
mov [rbp+var_8], 0
jmp loc_51248
loc_51136:
cmp [rbp+var_24], 2
jb short loc_51142
cmp [rbp+var_24], 10h
jbe short loc_51156
loc_51142:
mov rax, [rbp+var_18]
mov byte ptr [rax], 0
mov [rbp+var_8], 0
jmp loc_51248
loc_51156:
mov rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov [rbp+var_48], rax
loc_51166:
mov rax, [rbp+var_38]
add rax, 1
mov [rbp+var_38], rax
cmp rax, [rbp+var_20]
jbe short loc_5118C
mov rax, [rbp+var_18]
mov byte ptr [rax], 0
mov [rbp+var_8], 0
jmp loc_51248
loc_5118C:
mov rax, [rbp+var_10]
mov ecx, [rbp+var_24]
xor edx, edx
div rcx
lea rax, a0123456789abcd; "0123456789abcdef"
mov cl, [rax+rdx]
mov rax, [rbp+var_48]
mov rdx, rax
add rdx, 1
mov [rbp+var_48], rdx
mov [rax], cl
mov eax, [rbp+var_24]
mov ecx, eax
mov rax, [rbp+var_10]
xor edx, edx
div rcx
mov [rbp+var_10], rax
cmp [rbp+var_30], 0
jbe short loc_511D8
mov rax, [rbp+var_30]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_30], rax
loc_511D8:
jmp short $+2
loc_511DA:
mov al, 1
cmp [rbp+var_10], 0
mov [rbp+var_4A], al
ja short loc_511F1
cmp [rbp+var_30], 0
setnbe al
mov [rbp+var_4A], al
loc_511F1:
mov al, [rbp+var_4A]
test al, 1
jnz loc_51166
mov rax, [rbp+var_48]
mov byte ptr [rax], 0
loc_51203:
mov rax, [rbp+var_48]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_48], rax
cmp rax, [rbp+var_40]
jbe short loc_51240
mov rax, [rbp+var_48]
mov al, [rax]
mov [rbp+var_49], al
mov rax, [rbp+var_40]
mov cl, [rax]
mov rax, [rbp+var_48]
mov [rax], cl
mov cl, [rbp+var_49]
mov rax, [rbp+var_40]
mov rdx, rax
add rdx, 1
mov [rbp+var_40], rdx
mov [rax], cl
jmp short loc_51203
loc_51240:
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
loc_51248:
mov rax, [rbp+var_8]
pop rbp
retn
| char * nglog::tools::itoa_r(unsigned long long this, char *a2, char *a3, unsigned int a4, long long a5)
{
char *v5; // rax
char *v6; // rax
bool v8; // [rsp+0h] [rbp-4Ah]
char v9; // [rsp+1h] [rbp-49h]
char *v10; // [rsp+2h] [rbp-48h]
char *v11; // [rsp+Ah] [rbp-40h]
long long v12; // [rsp+12h] [rbp-38h]
v12 = 1LL;
if ( !a3 )
return 0LL;
if ( a4 >= 2 && a4 <= 0x10 )
{
v11 = a2;
v10 = a2;
do
{
if ( ++v12 > (unsigned long long)a3 )
{
*a2 = 0;
return 0LL;
}
v5 = v10++;
*v5 = a0123456789abcd[this % a4];
this /= a4;
if ( a5 )
--a5;
v8 = 1;
if ( !this )
v8 = a5 != 0;
}
while ( v8 );
*v10 = 0;
while ( --v10 > v11 )
{
v9 = *v10;
*v10 = *v11;
v6 = v11++;
*v6 = v9;
}
return a2;
}
else
{
*a2 = 0;
return 0LL;
}
}
| itoa_r:
PUSH RBP
MOV RBP,RSP
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 qword ptr [RBP + -0x38],0x1
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x00151136
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00151248
LAB_00151136:
CMP dword ptr [RBP + -0x24],0x2
JC 0x00151142
CMP dword ptr [RBP + -0x24],0x10
JBE 0x00151156
LAB_00151142:
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],0x0
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00151248
LAB_00151156:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x48],RAX
LAB_00151166:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x0015118c
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],0x0
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00151248
LAB_0015118c:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x24]
XOR EDX,EDX
DIV RCX
LEA RAX,[0x15503f]
MOV CL,byte ptr [RAX + RDX*0x1]
MOV RAX,qword ptr [RBP + -0x48]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x48],RDX
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x24]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x10],RAX
CMP qword ptr [RBP + -0x30],0x0
JBE 0x001511d8
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x30],RAX
LAB_001511d8:
JMP 0x001511da
LAB_001511da:
MOV AL,0x1
CMP qword ptr [RBP + -0x10],0x0
MOV byte ptr [RBP + -0x4a],AL
JA 0x001511f1
CMP qword ptr [RBP + -0x30],0x0
SETA AL
MOV byte ptr [RBP + -0x4a],AL
LAB_001511f1:
MOV AL,byte ptr [RBP + -0x4a]
TEST AL,0x1
JNZ 0x00151166
MOV RAX,qword ptr [RBP + -0x48]
MOV byte ptr [RAX],0x0
LAB_00151203:
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x48],RAX
CMP RAX,qword ptr [RBP + -0x40]
JBE 0x00151240
MOV RAX,qword ptr [RBP + -0x48]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x49],AL
MOV RAX,qword ptr [RBP + -0x40]
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x48]
MOV byte ptr [RAX],CL
MOV CL,byte ptr [RBP + -0x49]
MOV RAX,qword ptr [RBP + -0x40]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x40],RDX
MOV byte ptr [RAX],CL
JMP 0x00151203
LAB_00151240:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
LAB_00151248:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
/* nglog::tools::itoa_r(unsigned long, char*, unsigned long, unsigned int, unsigned long) */
char * nglog::tools::itoa_r(ulong param_1,char *param_2,ulong param_3,uint param_4,ulong param_5)
{
char cVar1;
char *pcVar2;
bool local_52;
char *local_50;
char *local_48;
ulong local_40;
ulong local_38;
ulong local_18;
char *local_10;
local_40 = 1;
if (param_3 == 0) {
local_10 = (char *)0x0;
}
else if ((param_4 < 2) ||
(local_50 = param_2, local_38 = param_5, local_18 = param_1, 0x10 < param_4)) {
*param_2 = '\0';
local_10 = (char *)0x0;
}
else {
do {
local_40 = local_40 + 1;
if (param_3 < local_40) {
*param_2 = '\0';
return (char *)0x0;
}
pcVar2 = local_50 + 1;
*local_50 = "0123456789abcdef"[local_18 % (ulong)param_4];
local_18 = local_18 / param_4;
if (local_38 != 0) {
local_38 = local_38 - 1;
}
local_52 = local_18 != 0 || local_38 != 0;
local_50 = pcVar2;
} while (local_52);
*pcVar2 = '\0';
local_48 = param_2;
while (local_50 = local_50 + -1, local_10 = param_2, local_48 < local_50) {
cVar1 = *local_50;
*local_50 = *local_48;
*local_48 = cVar1;
local_48 = local_48 + 1;
}
}
return local_10;
}
| |
54,602 | 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 0x31bd3b(%rip), %rcx # 0x369960
movq %rdi, (%rcx,%rax,8)
orb $0x2, 0xd(%rdi)
leaq 0x31fd2c(%rip), %rdi # 0x36d960
popq %rbp
jmp 0x4f5ea
| 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,[0x469960]
MOV qword ptr [RCX + RAX*0x8],RDI
OR byte ptr [RDI + 0xd],0x2
LEA RDI,[0x46d960]
POP RBP
JMP 0x0014f5ea
|
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;
}
| |
54,603 | ma_SHA1Encode | eloqsql/libmariadb/libmariadb/ma_sha1.c | static void ma_SHA1Encode(unsigned char *output, uint32 *input, unsigned int len)
{
unsigned int i, j;
for (i = 0, j = 0; j < len; i++, j += 4) {
output[j] = (unsigned char) ((input[i] >> 24) & 0xff);
output[j + 1] = (unsigned char) ((input[i] >> 16) & 0xff);
output[j + 2] = (unsigned char) ((input[i] >> 8) & 0xff);
output[j + 3] = (unsigned char) (input[i] & 0xff);
}
} | O0 | c | ma_SHA1Encode:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x4a6f4
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movl (%rax,%rcx,4), %eax
shrl $0x18, %eax
andl $0xff, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movl (%rax,%rcx,4), %eax
shrl $0x10, %eax
andl $0xff, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movl (%rax,%rcx,4), %eax
shrl $0x8, %eax
andl $0xff, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x2, %ecx
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movl (%rax,%rcx,4), %eax
andl $0xff, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x3, %ecx
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x1c(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x1c(%rbp)
jmp 0x4a64d
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_SHA1Encode:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_18], 0
mov [rbp+var_1C], 0
loc_4A64D:
mov eax, [rbp+var_1C]
cmp eax, [rbp+var_14]
jnb loc_4A6F4
mov rax, [rbp+var_10]
mov ecx, [rbp+var_18]
mov eax, [rax+rcx*4]
shr eax, 18h
and eax, 0FFh
mov dl, al
mov rax, [rbp+var_8]
mov ecx, [rbp+var_1C]
mov [rax+rcx], dl
mov rax, [rbp+var_10]
mov ecx, [rbp+var_18]
mov eax, [rax+rcx*4]
shr eax, 10h
and eax, 0FFh
mov dl, al
mov rax, [rbp+var_8]
mov ecx, [rbp+var_1C]
add ecx, 1
mov ecx, ecx
mov [rax+rcx], dl
mov rax, [rbp+var_10]
mov ecx, [rbp+var_18]
mov eax, [rax+rcx*4]
shr eax, 8
and eax, 0FFh
mov dl, al
mov rax, [rbp+var_8]
mov ecx, [rbp+var_1C]
add ecx, 2
mov ecx, ecx
mov [rax+rcx], dl
mov rax, [rbp+var_10]
mov ecx, [rbp+var_18]
mov eax, [rax+rcx*4]
and eax, 0FFh
mov dl, al
mov rax, [rbp+var_8]
mov ecx, [rbp+var_1C]
add ecx, 3
mov ecx, ecx
mov [rax+rcx], dl
mov eax, [rbp+var_18]
add eax, 1
mov [rbp+var_18], eax
mov eax, [rbp+var_1C]
add eax, 4
mov [rbp+var_1C], eax
jmp loc_4A64D
loc_4A6F4:
pop rbp
retn
| long long ma_SHA1Encode(long long a1, long long a2, unsigned int a3)
{
long long result; // rax
unsigned int i; // [rsp+0h] [rbp-1Ch]
unsigned int v5; // [rsp+4h] [rbp-18h]
v5 = 0;
for ( i = 0; ; i += 4 )
{
result = i;
if ( i >= a3 )
break;
*(_BYTE *)(a1 + i) = HIBYTE(*(_DWORD *)(a2 + 4LL * v5));
*(_BYTE *)(a1 + i + 1) = BYTE2(*(_DWORD *)(a2 + 4LL * v5));
*(_BYTE *)(a1 + i + 2) = BYTE1(*(_DWORD *)(a2 + 4LL * v5));
*(_BYTE *)(a1 + i + 3) = *(_DWORD *)(a2 + 4LL * v5++);
}
return result;
}
| ma_SHA1Encode:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV dword ptr [RBP + -0x18],0x0
MOV dword ptr [RBP + -0x1c],0x0
LAB_0014a64d:
MOV EAX,dword ptr [RBP + -0x1c]
CMP EAX,dword ptr [RBP + -0x14]
JNC 0x0014a6f4
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + RCX*0x4]
SHR EAX,0x18
AND EAX,0xff
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x1c]
MOV byte ptr [RAX + RCX*0x1],DL
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + RCX*0x4]
SHR EAX,0x10
AND EAX,0xff
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x1c]
ADD ECX,0x1
MOV ECX,ECX
MOV byte ptr [RAX + RCX*0x1],DL
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + RCX*0x4]
SHR EAX,0x8
AND EAX,0xff
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x1c]
ADD ECX,0x2
MOV ECX,ECX
MOV byte ptr [RAX + RCX*0x1],DL
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + RCX*0x4]
AND EAX,0xff
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x1c]
ADD ECX,0x3
MOV ECX,ECX
MOV byte ptr [RAX + RCX*0x1],DL
MOV EAX,dword ptr [RBP + -0x18]
ADD EAX,0x1
MOV dword ptr [RBP + -0x18],EAX
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x4
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x0014a64d
LAB_0014a6f4:
POP RBP
RET
|
void ma_SHA1Encode(long param_1,long param_2,uint param_3)
{
int4 local_24;
int4 local_20;
local_20 = 0;
for (local_24 = 0; local_24 < param_3; local_24 = local_24 + 4) {
*(char *)(param_1 + (ulong)local_24) =
(char)((uint)*(int4 *)(param_2 + (ulong)local_20 * 4) >> 0x18);
*(char *)(param_1 + (ulong)(local_24 + 1)) =
(char)((uint)*(int4 *)(param_2 + (ulong)local_20 * 4) >> 0x10);
*(char *)(param_1 + (ulong)(local_24 + 2)) =
(char)((uint)*(int4 *)(param_2 + (ulong)local_20 * 4) >> 8);
*(char *)(param_1 + (ulong)(local_24 + 3)) =
(char)*(int4 *)(param_2 + (ulong)local_20 * 4);
local_20 = local_20 + 1;
}
return;
}
| |
54,604 | unpack_filename | eloqsql/mysys/mf_pack.c | size_t unpack_filename(char * to, const char *from)
{
size_t length, n_length, buff_length;
char buff[FN_REFLEN + 1];
DBUG_ENTER("unpack_filename");
length=dirname_part(buff, from, &buff_length);/* copy & convert dirname */
n_length=unpack_dirname(buff,buff);
if (n_length+strlen(from+length) < FN_REFLEN)
{
(void) strmov(buff+n_length,from+length);
length= system_filename(to,buff); /* Fix to usably filename */
}
else
length= system_filename(to,from); /* Fix to usably filename */
DBUG_RETURN(length);
} | O0 | c | unpack_filename:
pushq %rbp
movq %rsp, %rbp
subq $0x250, %rsp # imm = 0x250
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x218(%rbp)
movq %rsi, -0x220(%rbp)
leaq -0x210(%rbp), %rdi
movq -0x220(%rbp), %rsi
leaq -0x238(%rbp), %rdx
callq 0x2caa0
movq %rax, -0x228(%rbp)
leaq -0x210(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x2d640
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
movq %rax, -0x240(%rbp)
movq -0x220(%rbp), %rdi
addq -0x228(%rbp), %rdi
callq 0x24110
movq %rax, %rcx
movq -0x240(%rbp), %rax
addq %rcx, %rax
cmpq $0x200, %rax # imm = 0x200
jae 0x2d9f4
leaq -0x210(%rbp), %rdi
addq -0x230(%rbp), %rdi
movq -0x220(%rbp), %rsi
addq -0x228(%rbp), %rsi
callq 0x24270
movq -0x218(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x2d8f0
movq %rax, -0x228(%rbp)
jmp 0x2da0e
movq -0x218(%rbp), %rdi
movq -0x220(%rbp), %rsi
callq 0x2d8f0
movq %rax, -0x228(%rbp)
jmp 0x2da10
movq -0x228(%rbp), %rax
movq %rax, -0x248(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x2da40
movq -0x248(%rbp), %rax
addq $0x250, %rsp # imm = 0x250
popq %rbp
retq
callq 0x242a0
nopw %cs:(%rax,%rax)
nop
| unpack_filename:
push rbp
mov rbp, rsp
sub rsp, 250h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_218], rdi
mov [rbp+var_220], rsi
lea rdi, [rbp+var_210]
mov rsi, [rbp+var_220]
lea rdx, [rbp+var_238]
call dirname_part
mov [rbp+var_228], rax
lea rdi, [rbp+var_210]
lea rsi, [rbp+var_210]
call unpack_dirname
mov [rbp+var_230], rax
mov rax, [rbp+var_230]
mov [rbp+var_240], rax
mov rdi, [rbp+var_220]
add rdi, [rbp+var_228]
call _strlen
mov rcx, rax
mov rax, [rbp+var_240]
add rax, rcx
cmp rax, 200h
jnb short loc_2D9F4
lea rdi, [rbp+var_210]
add rdi, [rbp+var_230]
mov rsi, [rbp+var_220]
add rsi, [rbp+var_228]
call _stpcpy
mov rdi, [rbp+var_218]
lea rsi, [rbp+var_210]
call system_filename
mov [rbp+var_228], rax
jmp short loc_2DA0E
loc_2D9F4:
mov rdi, [rbp+var_218]
mov rsi, [rbp+var_220]
call system_filename
mov [rbp+var_228], rax
loc_2DA0E:
jmp short $+2
loc_2DA10:
mov rax, [rbp+var_228]
mov [rbp+var_248], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_2DA40
mov rax, [rbp+var_248]
add rsp, 250h
pop rbp
retn
loc_2DA40:
call ___stack_chk_fail
| long long unpack_filename(long long a1, _BYTE *a2)
{
long long v3; // [rsp+10h] [rbp-240h]
long long v4; // [rsp+18h] [rbp-238h] BYREF
long long v5; // [rsp+20h] [rbp-230h]
long long v6; // [rsp+28h] [rbp-228h]
_BYTE *v7; // [rsp+30h] [rbp-220h]
long long v8; // [rsp+38h] [rbp-218h]
_BYTE v9[520]; // [rsp+40h] [rbp-210h] BYREF
unsigned long long v10; // [rsp+248h] [rbp-8h]
v10 = __readfsqword(0x28u);
v8 = a1;
v7 = a2;
v6 = dirname_part((long long)v9, a2, &v4);
v5 = unpack_dirname((long long)v9, v9);
v3 = v5;
if ( (unsigned long long)(strlen(&v7[v6]) + v3) >= 0x200 )
return system_filename(v8, (long long)v7);
stpcpy(&v9[v5], &v7[v6]);
return system_filename(v8, (long long)v9);
}
| unpack_filename:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x250
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x218],RDI
MOV qword ptr [RBP + -0x220],RSI
LEA RDI,[RBP + -0x210]
MOV RSI,qword ptr [RBP + -0x220]
LEA RDX,[RBP + -0x238]
CALL 0x0012caa0
MOV qword ptr [RBP + -0x228],RAX
LEA RDI,[RBP + -0x210]
LEA RSI,[RBP + -0x210]
CALL 0x0012d640
MOV qword ptr [RBP + -0x230],RAX
MOV RAX,qword ptr [RBP + -0x230]
MOV qword ptr [RBP + -0x240],RAX
MOV RDI,qword ptr [RBP + -0x220]
ADD RDI,qword ptr [RBP + -0x228]
CALL 0x00124110
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x240]
ADD RAX,RCX
CMP RAX,0x200
JNC 0x0012d9f4
LEA RDI,[RBP + -0x210]
ADD RDI,qword ptr [RBP + -0x230]
MOV RSI,qword ptr [RBP + -0x220]
ADD RSI,qword ptr [RBP + -0x228]
CALL 0x00124270
MOV RDI,qword ptr [RBP + -0x218]
LEA RSI,[RBP + -0x210]
CALL 0x0012d8f0
MOV qword ptr [RBP + -0x228],RAX
JMP 0x0012da0e
LAB_0012d9f4:
MOV RDI,qword ptr [RBP + -0x218]
MOV RSI,qword ptr [RBP + -0x220]
CALL 0x0012d8f0
MOV qword ptr [RBP + -0x228],RAX
LAB_0012da0e:
JMP 0x0012da10
LAB_0012da10:
MOV RAX,qword ptr [RBP + -0x228]
MOV qword ptr [RBP + -0x248],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0012da40
MOV RAX,qword ptr [RBP + -0x248]
ADD RSP,0x250
POP RBP
RET
LAB_0012da40:
CALL 0x001242a0
|
int8 unpack_filename(int8 param_1,long param_2)
{
long lVar1;
size_t sVar2;
long in_FS_OFFSET;
int1 local_240 [8];
long local_238;
long local_230;
long local_228;
int8 local_220;
char local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_228 = param_2;
local_220 = param_1;
local_230 = dirname_part(local_218,param_2,local_240);
lVar1 = unpack_dirname(local_218,local_218);
local_238 = lVar1;
sVar2 = strlen((char *)(local_228 + local_230));
if (lVar1 + sVar2 < 0x200) {
stpcpy(local_218 + local_238,(char *)(local_228 + local_230));
local_230 = system_filename(local_220,local_218);
}
else {
local_230 = system_filename(local_220,local_228);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_230;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
54,605 | google::protobuf::io::EpsCopyOutputStream::Trim(unsigned char*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/coded_stream.cc | uint8_t* EpsCopyOutputStream::Trim(uint8_t* ptr) {
if (had_error_) return ptr;
int s = Flush(ptr);
stream_->BackUp(s);
// Reset to initial state (expecting new buffer)
buffer_end_ = end_ = buffer_;
return buffer_;
} | O0 | cpp | google::protobuf::io::EpsCopyOutputStream::Trim(unsigned char*):
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
testb $0x1, 0x38(%rax)
je 0x16ecc9
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x16ed0a
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x16e8e0
movl %eax, %ecx
movq (%rsp), %rax
movl %ecx, 0xc(%rsp)
movq 0x30(%rax), %rdi
movl 0xc(%rsp), %esi
movq (%rdi), %rax
callq *0x18(%rax)
movq (%rsp), %rax
movq %rax, %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
movq %rcx, 0x8(%rax)
addq $0x10, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN6google8protobuf2io19EpsCopyOutputStream4TrimEPh:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_18], rsi
mov rax, [rsp+28h+var_10]
mov [rsp+28h+var_28], rax
test byte ptr [rax+38h], 1
jz short loc_16ECC9
mov rax, [rsp+28h+var_18]
mov [rsp+28h+var_8], rax
jmp short loc_16ED0A
loc_16ECC9:
mov rdi, [rsp+28h+var_28]; this
mov rsi, [rsp+28h+var_18]; unsigned __int8 *
call _ZN6google8protobuf2io19EpsCopyOutputStream5FlushEPh; google::protobuf::io::EpsCopyOutputStream::Flush(uchar *)
mov ecx, eax
mov rax, [rsp+28h+var_28]
mov [rsp+28h+var_1C], ecx
mov rdi, [rax+30h]
mov esi, [rsp+28h+var_1C]
mov rax, [rdi]
call qword ptr [rax+18h]
mov rax, [rsp+28h+var_28]
mov rcx, rax
add rcx, 10h
mov [rax], rcx
mov [rax+8], rcx
add rax, 10h
mov [rsp+28h+var_8], rax
loc_16ED0A:
mov rax, [rsp+28h+var_8]
add rsp, 28h
retn
| unsigned __int8 * google::protobuf::io::EpsCopyOutputStream::Trim(
google::protobuf::io::EpsCopyOutputStream *this,
unsigned __int8 *a2)
{
unsigned int v3; // [rsp+Ch] [rbp-1Ch]
if ( (*((_BYTE *)this + 56) & 1) != 0 )
return a2;
v3 = google::protobuf::io::EpsCopyOutputStream::Flush(this, a2);
(*(void ( **)(_QWORD, _QWORD))(**((_QWORD **)this + 6) + 24LL))(*((_QWORD *)this + 6), v3);
*(_QWORD *)this = (char *)this + 16;
*((_QWORD *)this + 1) = (char *)this + 16;
return (unsigned __int8 *)this + 16;
}
| |||
54,606 | google::protobuf::io::EpsCopyOutputStream::Trim(unsigned char*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/coded_stream.cc | uint8_t* EpsCopyOutputStream::Trim(uint8_t* ptr) {
if (had_error_) return ptr;
int s = Flush(ptr);
stream_->BackUp(s);
// Reset to initial state (expecting new buffer)
buffer_end_ = end_ = buffer_;
return buffer_;
} | O3 | cpp | google::protobuf::io::EpsCopyOutputStream::Trim(unsigned char*):
cmpb $0x0, 0x38(%rdi)
jne 0x79ffb
pushq %rbx
movq %rdi, %rbx
callq 0x79eba
movq 0x30(%rbx), %rdi
movq (%rdi), %rcx
movl %eax, %esi
callq *0x18(%rcx)
leaq 0x10(%rbx), %rsi
movq %rsi, (%rbx)
movq %rsi, 0x8(%rbx)
popq %rbx
movq %rsi, %rax
retq
nop
| _ZN6google8protobuf2io19EpsCopyOutputStream4TrimEPh:
cmp byte ptr [rdi+38h], 0
jnz short loc_79FFB
push rbx
mov rbx, rdi
call _ZN6google8protobuf2io19EpsCopyOutputStream5FlushEPh; google::protobuf::io::EpsCopyOutputStream::Flush(uchar *)
mov rdi, [rbx+30h]
mov rcx, [rdi]
mov esi, eax
call qword ptr [rcx+18h]
lea rsi, [rbx+10h]
mov [rbx], rsi
mov [rbx+8], rsi
pop rbx
loc_79FFB:
mov rax, rsi
retn
| unsigned __int8 * google::protobuf::io::EpsCopyOutputStream::Trim(
google::protobuf::io::EpsCopyOutputStream *this,
unsigned __int8 *a2)
{
unsigned int v2; // eax
if ( !*((_BYTE *)this + 56) )
{
v2 = google::protobuf::io::EpsCopyOutputStream::Flush(this, a2);
(*(void ( **)(_QWORD, _QWORD))(**((_QWORD **)this + 6) + 24LL))(*((_QWORD *)this + 6), v2);
a2 = (unsigned __int8 *)this + 16;
*(_QWORD *)this = (char *)this + 16;
*((_QWORD *)this + 1) = (char *)this + 16;
}
return a2;
}
| Trim:
CMP byte ptr [RDI + 0x38],0x0
JNZ 0x00179ffb
PUSH RBX
MOV RBX,RDI
CALL 0x00179eba
MOV RDI,qword ptr [RBX + 0x30]
MOV RCX,qword ptr [RDI]
MOV ESI,EAX
CALL qword ptr [RCX + 0x18]
LEA RSI,[RBX + 0x10]
MOV qword ptr [RBX],RSI
MOV qword ptr [RBX + 0x8],RSI
POP RBX
LAB_00179ffb:
MOV RAX,RSI
RET
|
/* google::protobuf::io::EpsCopyOutputStream::Trim(unsigned char*) */
EpsCopyOutputStream * __thiscall
google::protobuf::io::EpsCopyOutputStream::Trim(EpsCopyOutputStream *this,uchar *param_1)
{
int4 uVar1;
if (this[0x38] == (EpsCopyOutputStream)0x0) {
uVar1 = Flush(this,param_1);
(**(code **)(**(long **)(this + 0x30) + 0x18))(*(long **)(this + 0x30),uVar1);
param_1 = (uchar *)(this + 0x10);
*(uchar **)this = param_1;
*(uchar **)(this + 8) = param_1;
}
return (EpsCopyOutputStream *)param_1;
}
| |
54,607 | ma_tls_get_finger_print | eloqsql/libmariadb/libmariadb/secure/openssl.c | unsigned int ma_tls_get_finger_print(MARIADB_TLS *ctls, char *fp, unsigned int len)
{
X509 *cert= NULL;
MYSQL *mysql;
unsigned int fp_len;
if (!ctls || !ctls->ssl)
return 0;
mysql= SSL_get_app_data(ctls->ssl);
if (!(cert= SSL_get_peer_certificate(ctls->ssl)))
{
my_set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN,
ER(CR_SSL_CONNECTION_ERROR),
"Unable to get server certificate");
goto end;
}
if (len < EVP_MAX_MD_SIZE)
{
my_set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN,
ER(CR_SSL_CONNECTION_ERROR),
"Finger print buffer too small");
goto end;
}
if (!X509_digest(cert, EVP_sha1(), (unsigned char *)fp, &fp_len))
{
my_set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN,
ER(CR_SSL_CONNECTION_ERROR),
"invalid finger print of server certificate");
goto end;
}
X509_free(cert);
return (fp_len);
end:
X509_free(cert);
return 0;
} | O3 | c | ma_tls_get_finger_print:
xorl %eax, %eax
testq %rdi, %rdi
je 0x6ca76
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x6ca6a
movl %edx, %r12d
movq %rsi, %r15
xorl %esi, %esi
callq 0x3a3b0
movq %rax, %r14
movq 0x10(%rbx), %rdi
callq 0x3ac80
movq %rax, %rbx
testq %rax, %rax
je 0x6c9e9
cmpl $0x3f, %r12d
ja 0x6ca0a
leaq 0x3010e1(%rip), %rax # 0x36dab0
movq (%rax), %rdx
leaq 0x3010e7(%rip), %rax # 0x36dac0
movq 0xd0(%rax), %rcx
leaq 0x51326(%rip), %r8 # 0xbdd0d
jmp 0x6ca51
leaq 0x3010c0(%rip), %rax # 0x36dab0
movq (%rax), %rdx
leaq 0x3010c6(%rip), %rax # 0x36dac0
movq 0xd0(%rax), %rcx
leaq 0x512b8(%rip), %r8 # 0xbdcc0
jmp 0x6ca51
callq 0x3a3e0
leaq -0x24(%rbp), %rcx
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x3a2c0
testl %eax, %eax
je 0x6ca32
movq %rbx, %rdi
callq 0x3add0
movl -0x24(%rbp), %eax
jmp 0x6ca6a
leaq 0x301077(%rip), %rax # 0x36dab0
movq (%rax), %rdx
leaq 0x30107d(%rip), %rax # 0x36dac0
movq 0xd0(%rax), %rcx
leaq 0x512da(%rip), %r8 # 0xbdd2b
movq %r14, %rdi
movl $0x7ea, %esi # imm = 0x7EA
xorl %eax, %eax
callq 0x5986d
movq %rbx, %rdi
callq 0x3add0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| ma_tls_get_finger_print:
xor eax, eax
test rdi, rdi
jz locret_6CA76
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov rbx, rdi
mov rdi, [rdi+10h]
test rdi, rdi
jz loc_6CA6A
mov r12d, edx
mov r15, rsi
xor esi, esi
call _SSL_get_ex_data
mov r14, rax
mov rdi, [rbx+10h]
call _SSL_get1_peer_certificate
mov rbx, rax
test rax, rax
jz short loc_6C9E9
cmp r12d, 3Fh ; '?'
ja short loc_6CA0A
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rax, client_errors
mov rcx, [rax+0D0h]
lea r8, aFingerPrintBuf; "Finger print buffer too small"
jmp short loc_6CA51
loc_6C9E9:
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rax, client_errors
mov rcx, [rax+0D0h]
lea r8, aUnableToGetSer; "Unable to get server certificate"
jmp short loc_6CA51
loc_6CA0A:
call _EVP_sha1
lea rcx, [rbp-24h]
mov rdi, rbx
mov rsi, rax
mov rdx, r15
call _X509_digest
test eax, eax
jz short loc_6CA32
mov rdi, rbx
call _X509_free
mov eax, [rbp-24h]
jmp short loc_6CA6A
loc_6CA32:
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rax, client_errors
mov rcx, [rax+0D0h]
lea r8, aInvalidFingerP; "invalid finger print of server certific"...
loc_6CA51:
mov rdi, r14
mov esi, 7EAh
xor eax, eax
call my_set_error
mov rdi, rbx
call _X509_free
xor eax, eax
loc_6CA6A:
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
locret_6CA76:
retn
| long long ma_tls_get_finger_print(long long a1, long long a2, unsigned int a3)
{
long long result; // rax
long long v5; // rdi
long long v7; // r14
long long v8; // rbx
long long v9; // rax
unsigned int v10; // [rsp-2Ch] [rbp-2Ch] BYREF
result = 0LL;
if ( a1 )
{
v5 = *(_QWORD *)(a1 + 16);
if ( v5 )
{
v7 = SSL_get_ex_data(v5, 0LL);
v8 = SSL_get1_peer_certificate(*(_QWORD *)(a1 + 16));
if ( v8 )
{
if ( a3 > 0x3F )
{
v9 = EVP_sha1();
if ( (unsigned int)X509_digest(v8, v9, a2, &v10) )
{
X509_free(v8);
return v10;
}
my_set_error(
v7,
2026,
(long long)SQLSTATE_UNKNOWN,
client_errors[26],
"invalid finger print of server certificate");
}
else
{
my_set_error(v7, 2026, (long long)SQLSTATE_UNKNOWN, client_errors[26], "Finger print buffer too small");
}
}
else
{
my_set_error(v7, 2026, (long long)SQLSTATE_UNKNOWN, client_errors[26], "Unable to get server certificate");
}
X509_free(v8);
return 0LL;
}
}
return result;
}
| ma_tls_get_finger_print:
XOR EAX,EAX
TEST RDI,RDI
JZ 0x0016ca76
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x10]
TEST RDI,RDI
JZ 0x0016ca6a
MOV R12D,EDX
MOV R15,RSI
XOR ESI,ESI
CALL 0x0013a3b0
MOV R14,RAX
MOV RDI,qword ptr [RBX + 0x10]
CALL 0x0013ac80
MOV RBX,RAX
TEST RAX,RAX
JZ 0x0016c9e9
CMP R12D,0x3f
JA 0x0016ca0a
LEA RAX,[0x46dab0]
MOV RDX,qword ptr [RAX]
LEA RAX,[0x46dac0]
MOV RCX,qword ptr [RAX + 0xd0]
LEA R8,[0x1bdd0d]
JMP 0x0016ca51
LAB_0016c9e9:
LEA RAX,[0x46dab0]
MOV RDX,qword ptr [RAX]
LEA RAX,[0x46dac0]
MOV RCX,qword ptr [RAX + 0xd0]
LEA R8,[0x1bdcc0]
JMP 0x0016ca51
LAB_0016ca0a:
CALL 0x0013a3e0
LEA RCX,[RBP + -0x24]
MOV RDI,RBX
MOV RSI,RAX
MOV RDX,R15
CALL 0x0013a2c0
TEST EAX,EAX
JZ 0x0016ca32
MOV RDI,RBX
CALL 0x0013add0
MOV EAX,dword ptr [RBP + -0x24]
JMP 0x0016ca6a
LAB_0016ca32:
LEA RAX,[0x46dab0]
MOV RDX,qword ptr [RAX]
LEA RAX,[0x46dac0]
MOV RCX,qword ptr [RAX + 0xd0]
LEA R8,[0x1bdd2b]
LAB_0016ca51:
MOV RDI,R14
MOV ESI,0x7ea
XOR EAX,EAX
CALL 0x0015986d
MOV RDI,RBX
CALL 0x0013add0
XOR EAX,EAX
LAB_0016ca6a:
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
LAB_0016ca76:
RET
|
int4 ma_tls_get_finger_print(long param_1,uchar *param_2,uint param_3)
{
int iVar1;
void *pvVar2;
X509 *data;
EVP_MD *type;
char *pcVar3;
uint local_2c;
if ((param_1 != 0) && (*(SSL **)(param_1 + 0x10) != (SSL *)0x0)) {
pvVar2 = SSL_get_ex_data(*(SSL **)(param_1 + 0x10),0);
data = (X509 *)SSL_get1_peer_certificate(*(int8 *)(param_1 + 0x10));
if (data == (X509 *)0x0) {
pcVar3 = "Unable to get server certificate";
}
else if (param_3 < 0x40) {
pcVar3 = "Finger print buffer too small";
}
else {
type = EVP_sha1();
iVar1 = X509_digest(data,type,param_2,&local_2c);
if (iVar1 != 0) {
X509_free(data);
return local_2c;
}
pcVar3 = "invalid finger print of server certificate";
}
my_set_error(pvVar2,0x7ea,SQLSTATE_UNKNOWN,PTR_s_TLS_SSL_error_____100s_0046db90,pcVar3);
X509_free(data);
}
return 0;
}
| |
54,608 | my_wc_to_printable_ex | eloqsql/strings/ctype.c | int
my_wc_to_printable_ex(CHARSET_INFO *cs, my_wc_t wc,
uchar *str, uchar *end,
uint bs, uint bslen, uint diglen)
{
uchar *str0;
uint i, length;
uchar tmp[MY_CS_PRINTABLE_CHAR_LENGTH * MY_CS_MBMAXLEN];
if (my_is_printable(wc))
{
int mblen= my_ci_wc_mb(cs, wc, str, end);
if (mblen > 0)
return mblen;
}
if (str + my_printable_length(bslen, diglen) > end)
return MY_CS_TOOSMALLN(my_printable_length(bslen, diglen));
if ((cs->state & MY_CS_NONASCII) == 0)
return to_printable_8bit(str, wc, bs);
length= to_printable_8bit(tmp, wc, bs);
str0= str;
for (i= 0; i < length; i++)
{
uint expected_length= i == 0 ? bslen : diglen;
if (my_ci_wc_mb(cs, tmp[i], str, end) != (int) expected_length)
{
DBUG_ASSERT(0);
return MY_CS_ILSEQ;
}
str+= expected_length;
}
return (int) (str - str0);
} | O3 | c | my_wc_to_printable_ex:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, -0x60(%rbp)
movl %r8d, -0x58(%rbp)
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %r12
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
leaq -0x20(%rsi), %rax
cmpq $0x5f, %rax
jae 0xd1ab7
movq 0xb8(%r12), %rax
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq *0x30(%rax)
movl %eax, %ebx
testl %eax, %eax
jg 0xd1bda
jmp 0xd1ae8
cmpq $0x9f, %r13
ja 0xd1ad7
cmpb $0xa, %r13b
je 0xd1a94
movzbl %r13b, %eax
cmpl $0xd, %eax
je 0xd1a94
cmpq $0x9, %r13
je 0xd1a94
jmp 0xd1ae8
movq %r13, %rax
andq $-0x800, %rax # imm = 0xF800
cmpq $0xd800, %rax # imm = 0xD800
jne 0xd1a94
movl 0x10(%rbp), %ecx
movq -0x60(%rbp), %rax
leal (%rax,%rcx,4), %eax
leaq (%r15,%rax), %rcx
cmpq %r14, %rcx
jbe 0xd1b07
movl $0xffffff9c, %ebx # imm = 0xFFFFFF9C
subl %eax, %ebx
jmp 0xd1bda
movl %r13d, %eax
shrl $0xc, %eax
andl $0xf, %eax
movl %r13d, %ecx
shrl $0x8, %ecx
andl $0xf, %ecx
movl %r13d, %edx
shrl $0x4, %edx
andl $0xf, %edx
andl $0xf, %r13d
testb $0x20, 0xd(%r12)
jne 0xd1b5f
movl -0x58(%rbp), %esi
movb %sil, (%r15)
leaq 0x28a025(%rip), %rsi # 0x35bb60
movb (%rsi,%rax), %al
movb %al, 0x1(%r15)
movb (%rsi,%rcx), %al
movb %al, 0x2(%r15)
movb (%rsi,%rdx), %al
movb %al, 0x3(%r15)
movb (%rsi,%r13), %al
movb %al, 0x4(%r15)
movl $0x5, %ebx
jmp 0xd1bda
movq %r14, -0x68(%rbp)
movl -0x58(%rbp), %esi
movb %sil, -0x50(%rbp)
leaq 0x289fef(%rip), %rsi # 0x35bb60
movb (%rsi,%rax), %al
movb %al, -0x4f(%rbp)
movb (%rsi,%rcx), %al
movb %al, -0x4e(%rbp)
movb (%rsi,%rdx), %al
movb %al, -0x4d(%rbp)
movb (%rsi,%r13), %al
movb %al, -0x4c(%rbp)
xorl %ebx, %ebx
xorl %r14d, %r14d
movq %r15, -0x58(%rbp)
movq %r15, %r13
testq %r14, %r14
movl 0x10(%rbp), %eax
movl %eax, %r15d
cmovel -0x60(%rbp), %r15d
movq 0xb8(%r12), %rax
movzbl -0x50(%rbp,%r14), %esi
movq %r12, %rdi
movq %r13, %rdx
movq -0x68(%rbp), %rcx
callq *0x30(%rax)
cmpl %r15d, %eax
jne 0xd1bda
movl %r15d, %eax
addq %rax, %r13
incq %r14
cmpq $0x5, %r14
jne 0xd1b96
subl -0x58(%rbp), %r13d
movl %r13d, %ebx
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0xd1bfa
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29250
| my_wc_to_printable_ex:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_60], r9
mov dword ptr [rbp+var_58], r8d
mov r14, rcx
mov r15, rdx
mov r13, rsi
mov r12, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
lea rax, [rsi-20h]
cmp rax, 5Fh ; '_'
jnb short loc_D1AB7
loc_D1A94:
mov rax, [r12+0B8h]
mov rdi, r12
mov rsi, r13
mov rdx, r15
mov rcx, r14
call qword ptr [rax+30h]
mov ebx, eax
test eax, eax
jg loc_D1BDA
jmp short loc_D1AE8
loc_D1AB7:
cmp r13, 9Fh
ja short loc_D1AD7
cmp r13b, 0Ah
jz short loc_D1A94
movzx eax, r13b
cmp eax, 0Dh
jz short loc_D1A94
cmp r13, 9
jz short loc_D1A94
jmp short loc_D1AE8
loc_D1AD7:
mov rax, r13
and rax, 0FFFFFFFFFFFFF800h
cmp rax, 0D800h
jnz short loc_D1A94
loc_D1AE8:
mov ecx, [rbp+arg_0]
mov rax, [rbp+var_60]
lea eax, [rax+rcx*4]
lea rcx, [r15+rax]
cmp rcx, r14
jbe short loc_D1B07
mov ebx, 0FFFFFF9Ch
sub ebx, eax
jmp loc_D1BDA
loc_D1B07:
mov eax, r13d
shr eax, 0Ch
and eax, 0Fh
mov ecx, r13d
shr ecx, 8
and ecx, 0Fh
mov edx, r13d
shr edx, 4
and edx, 0Fh
and r13d, 0Fh
test byte ptr [r12+0Dh], 20h
jnz short loc_D1B5F
mov esi, dword ptr [rbp+var_58]
mov [r15], sil
lea rsi, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
mov al, [rsi+rax]
mov [r15+1], al
mov al, [rsi+rcx]
mov [r15+2], al
mov al, [rsi+rdx]
mov [r15+3], al
mov al, [rsi+r13]
mov [r15+4], al
mov ebx, 5
jmp short loc_D1BDA
loc_D1B5F:
mov [rbp+var_68], r14
mov esi, dword ptr [rbp+var_58]
mov [rbp+var_50], sil
lea rsi, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
mov al, [rsi+rax]
mov [rbp+var_4F], al
mov al, [rsi+rcx]
mov [rbp+var_4E], al
mov al, [rsi+rdx]
mov [rbp+var_4D], al
mov al, [rsi+r13]
mov [rbp+var_4C], al
xor ebx, ebx
xor r14d, r14d
mov [rbp+var_58], r15
mov r13, r15
loc_D1B96:
test r14, r14
mov eax, [rbp+arg_0]
mov r15d, eax
cmovz r15d, dword ptr [rbp+var_60]
mov rax, [r12+0B8h]
movzx esi, [rbp+r14+var_50]
mov rdi, r12
mov rdx, r13
mov rcx, [rbp+var_68]
call qword ptr [rax+30h]
cmp eax, r15d
jnz short loc_D1BDA
mov eax, r15d
add r13, rax
inc r14
cmp r14, 5
jnz short loc_D1B96
sub r13d, dword ptr [rbp+var_58]
mov ebx, r13d
loc_D1BDA:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_D1BFA
mov eax, ebx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_D1BFA:
call ___stack_chk_fail
| long long my_wc_to_printable_ex(
long long a1,
unsigned long long a2,
_BYTE *a3,
unsigned long long a4,
char a5,
unsigned int a6,
unsigned int a7)
{
int v9; // ebx
long long v10; // rax
long long v11; // rax
long long v12; // rcx
long long v13; // rdx
unsigned long long v14; // r13
long long v15; // r14
_BYTE *v16; // r13
unsigned int v17; // r15d
unsigned long long v19; // [rsp+8h] [rbp-68h]
int v22; // [rsp+18h] [rbp-58h]
_BYTE v23[32]; // [rsp+20h] [rbp-50h]
unsigned long long v24; // [rsp+40h] [rbp-30h]
v24 = __readfsqword(0x28u);
if ( a2 - 32 < 0x5F )
{
LABEL_2:
v9 = (*(long long ( **)(long long, unsigned long long, _BYTE *, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))(
a1,
a2,
a3,
a4);
if ( v9 > 0 )
return (unsigned int)v9;
goto LABEL_10;
}
if ( a2 > 0x9F )
{
if ( (a2 & 0xFFFFFFFFFFFFF800LL) != 0xD800 )
goto LABEL_2;
}
else if ( (_BYTE)a2 == 10 || (unsigned __int8)a2 == 13 || a2 == 9 )
{
goto LABEL_2;
}
LABEL_10:
v10 = a6 + 4 * a7;
if ( (unsigned long long)&a3[v10] <= a4 )
{
v11 = (unsigned __int16)a2 >> 12;
v12 = ((unsigned int)a2 >> 8) & 0xF;
v13 = (unsigned __int8)a2 >> 4;
v14 = a2 & 0xF;
if ( (*(_BYTE *)(a1 + 13) & 0x20) != 0 )
{
v19 = a4;
v23[0] = a5;
v23[1] = dig_vec_upper[v11];
v23[2] = dig_vec_upper[v12];
v23[3] = dig_vec_upper[v13];
v23[4] = dig_vec_upper[v14];
v9 = 0;
v15 = 0LL;
v22 = (int)a3;
v16 = a3;
while ( 1 )
{
v17 = a7;
if ( !v15 )
v17 = a6;
if ( (*(unsigned int ( **)(long long, _QWORD, _BYTE *, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))(
a1,
(unsigned __int8)v23[v15],
v16,
v19) != v17 )
break;
v16 += v17;
if ( ++v15 == 5 )
return (unsigned int)((_DWORD)v16 - v22);
}
}
else
{
*a3 = a5;
a3[1] = dig_vec_upper[v11];
a3[2] = dig_vec_upper[v12];
a3[3] = dig_vec_upper[v13];
a3[4] = dig_vec_upper[v14];
return 5;
}
}
else
{
return (unsigned int)(-100 - v10);
}
return (unsigned int)v9;
}
| my_wc_to_printable_ex:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x60],R9
MOV dword ptr [RBP + -0x58],R8D
MOV R14,RCX
MOV R15,RDX
MOV R13,RSI
MOV R12,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[RSI + -0x20]
CMP RAX,0x5f
JNC 0x001d1ab7
LAB_001d1a94:
MOV RAX,qword ptr [R12 + 0xb8]
MOV RDI,R12
MOV RSI,R13
MOV RDX,R15
MOV RCX,R14
CALL qword ptr [RAX + 0x30]
MOV EBX,EAX
TEST EAX,EAX
JG 0x001d1bda
JMP 0x001d1ae8
LAB_001d1ab7:
CMP R13,0x9f
JA 0x001d1ad7
CMP R13B,0xa
JZ 0x001d1a94
MOVZX EAX,R13B
CMP EAX,0xd
JZ 0x001d1a94
CMP R13,0x9
JZ 0x001d1a94
JMP 0x001d1ae8
LAB_001d1ad7:
MOV RAX,R13
AND RAX,-0x800
CMP RAX,0xd800
JNZ 0x001d1a94
LAB_001d1ae8:
MOV ECX,dword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + -0x60]
LEA EAX,[RAX + RCX*0x4]
LEA RCX,[R15 + RAX*0x1]
CMP RCX,R14
JBE 0x001d1b07
MOV EBX,0xffffff9c
SUB EBX,EAX
JMP 0x001d1bda
LAB_001d1b07:
MOV EAX,R13D
SHR EAX,0xc
AND EAX,0xf
MOV ECX,R13D
SHR ECX,0x8
AND ECX,0xf
MOV EDX,R13D
SHR EDX,0x4
AND EDX,0xf
AND R13D,0xf
TEST byte ptr [R12 + 0xd],0x20
JNZ 0x001d1b5f
MOV ESI,dword ptr [RBP + -0x58]
MOV byte ptr [R15],SIL
LEA RSI,[0x45bb60]
MOV AL,byte ptr [RSI + RAX*0x1]
MOV byte ptr [R15 + 0x1],AL
MOV AL,byte ptr [RSI + RCX*0x1]
MOV byte ptr [R15 + 0x2],AL
MOV AL,byte ptr [RSI + RDX*0x1]
MOV byte ptr [R15 + 0x3],AL
MOV AL,byte ptr [RSI + R13*0x1]
MOV byte ptr [R15 + 0x4],AL
MOV EBX,0x5
JMP 0x001d1bda
LAB_001d1b5f:
MOV qword ptr [RBP + -0x68],R14
MOV ESI,dword ptr [RBP + -0x58]
MOV byte ptr [RBP + -0x50],SIL
LEA RSI,[0x45bb60]
MOV AL,byte ptr [RSI + RAX*0x1]
MOV byte ptr [RBP + -0x4f],AL
MOV AL,byte ptr [RSI + RCX*0x1]
MOV byte ptr [RBP + -0x4e],AL
MOV AL,byte ptr [RSI + RDX*0x1]
MOV byte ptr [RBP + -0x4d],AL
MOV AL,byte ptr [RSI + R13*0x1]
MOV byte ptr [RBP + -0x4c],AL
XOR EBX,EBX
XOR R14D,R14D
MOV qword ptr [RBP + -0x58],R15
MOV R13,R15
LAB_001d1b96:
TEST R14,R14
MOV EAX,dword ptr [RBP + 0x10]
MOV R15D,EAX
CMOVZ R15D,dword ptr [RBP + -0x60]
MOV RAX,qword ptr [R12 + 0xb8]
MOVZX ESI,byte ptr [RBP + R14*0x1 + -0x50]
MOV RDI,R12
MOV RDX,R13
MOV RCX,qword ptr [RBP + -0x68]
CALL qword ptr [RAX + 0x30]
CMP EAX,R15D
JNZ 0x001d1bda
MOV EAX,R15D
ADD R13,RAX
INC R14
CMP R14,0x5
JNZ 0x001d1b96
SUB R13D,dword ptr [RBP + -0x58]
MOV EBX,R13D
LAB_001d1bda:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001d1bfa
MOV EAX,EBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001d1bfa:
CALL 0x00129250
|
int my_wc_to_printable_ex
(long param_1,ulong param_2,char *param_3,char *param_4,char param_5,uint param_6,
uint param_7)
{
uint uVar1;
uint uVar2;
uint uVar3;
uint uVar4;
char *pcVar5;
long lVar6;
long in_FS_OFFSET;
int local_60;
char local_58 [32];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
if (param_2 - 0x20 < 0x5f) {
LAB_001d1a94:
local_60 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))(param_1,param_2,param_3,param_4);
if (0 < local_60) goto LAB_001d1bda;
}
else if (param_2 < 0xa0) {
if ((((char)param_2 == '\n') || (((uint)param_2 & 0xff) == 0xd)) || (param_2 == 9))
goto LAB_001d1a94;
}
else if ((param_2 & 0xfffffffffffff800) != 0xd800) goto LAB_001d1a94;
uVar1 = param_6 + param_7 * 4;
if (param_4 < param_3 + uVar1) {
local_60 = -100 - uVar1;
}
else {
uVar1 = (uint)(param_2 >> 0xc) & 0xf;
uVar2 = (uint)(param_2 >> 8) & 0xf;
uVar3 = (uint)(param_2 >> 4) & 0xf;
uVar4 = (uint)param_2 & 0xf;
if ((*(byte *)(param_1 + 0xd) & 0x20) == 0) {
*param_3 = param_5;
param_3[1] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[uVar1];
param_3[2] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[uVar2];
param_3[3] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[uVar3];
param_3[4] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[uVar4];
local_60 = 5;
}
else {
local_58[0] = param_5;
local_58[1] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[uVar1];
local_58[2] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[uVar2];
local_58[3] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[uVar3];
local_58[4] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[uVar4];
local_60 = 0;
lVar6 = 0;
pcVar5 = param_3;
do {
uVar1 = param_7;
if (lVar6 == 0) {
uVar1 = param_6;
}
uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))
(param_1,local_58[lVar6],pcVar5,param_4);
if (uVar2 != uVar1) goto LAB_001d1bda;
pcVar5 = pcVar5 + uVar1;
lVar6 = lVar6 + 1;
} while (lVar6 != 5);
local_60 = (int)param_3;
local_60 = (int)pcVar5 - local_60;
}
}
LAB_001d1bda:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_60;
}
| |
54,609 | 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>>::operator++() | monkey531[P]llama/common/json.hpp | iter_impl& operator++()
{
JSON_ASSERT(m_object != nullptr);
switch (m_object->m_data.m_type)
{
case value_t::object:
{
std::advance(m_it.object_iterator, 1);
break;
}
case value_t::array:
{
std::advance(m_it.array_iterator, 1);
break;
}
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
{
++m_it.primitive_iterator;
break;
}
}
return *this;
} | O0 | 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>>::operator++():
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, (%rax)
jne 0xb080a
leaq 0x15cdee(%rip), %rdi # 0x20d5de
movl $0x33c0, %esi # imm = 0x33C0
leaq 0x1569dd(%rip), %rdx # 0x2071d9
leaq 0x162431(%rip), %rcx # 0x212c34
movb $0x0, %al
callq 0x5aef0
movq 0x8(%rsp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
movq %rax, (%rsp)
subq $0x9, %rax
ja 0xb0863
movq (%rsp), %rax
leaq 0x1577ae(%rip), %rcx # 0x207fd8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
movl $0x1, %esi
callq 0xb6610
jmp 0xb0875
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
addq $0x8, %rdi
movl $0x1, %esi
callq 0xb6660
jmp 0xb0875
jmp 0xb0863
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
addq $0x10, %rdi
callq 0xb66b0
movq 0x8(%rsp), %rax
addq $0x18, %rsp
retq
nop
| _ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov rax, [rsp+18h+var_8]
mov [rsp+18h+var_10], rax
cmp qword ptr [rax], 0
jnz short loc_B080A
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov esi, 33C0h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAnchorMObjectN+7; "m_object != nullptr"
mov al, 0
call _ggml_abort
loc_B080A:
mov rax, [rsp+18h+var_10]
mov rax, [rax]
movzx eax, byte ptr [rax]
mov [rsp+18h+var_18], rax
sub rax, 9; switch 10 cases
ja short def_B0831; jumptable 00000000000B0831 default case
mov rax, [rsp+18h+var_18]
lea rcx, jpt_B0831
movsxd rax, ds:(jpt_B0831 - 207FD8h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_B0833:
mov rdi, [rsp+18h+var_10]; jumptable 00000000000B0831 case 1
add rdi, 8
mov esi, 1
call _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSB_11ordered_mapESt6vectorS8_blmdSaNSB_14adl_serializerESE_IhSaIhEEvEEESE_ISJ_SaISJ_EEEEiEvRT_T0_; std::advance<__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>>>>,int>(__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>>>> &,int)
jmp short loc_B0875
loc_B0848:
mov rdi, [rsp+18h+var_10]; jumptable 00000000000B0831 case 2
add rdi, 8
add rdi, 8
mov esi, 1
call _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEES6_ISG_SaISG_EEEEiEvRT_T0_; std::advance<__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>>>,int>(__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>>> &,int)
jmp short loc_B0875
loc_B0861:
jmp short $+2; jumptable 00000000000B0831 cases 0,3-9
def_B0831:
mov rdi, [rsp+18h+var_10]; jumptable 00000000000B0831 default case
add rdi, 8
add rdi, 10h
call _ZN8nlohmann16json_abi_v3_11_36detail20primitive_iterator_tppEv; nlohmann::json_abi_v3_11_3::detail::primitive_iterator_t::operator++(void)
loc_B0875:
mov rax, [rsp+18h+var_10]
add rsp, 18h
retn
| _QWORD * nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::operator++(
_QWORD *a1)
{
if ( !*a1 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
13248LL,
"GGML_ASSERT(%s) failed",
"m_object != nullptr");
switch ( *(_BYTE *)*a1 )
{
case 1:
std::advance<__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,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,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,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>,int>(
a1 + 1,
1LL);
break;
case 2:
std::advance<__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,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,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,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>,int>(
a1 + 2,
1LL);
break;
default:
nlohmann::json_abi_v3_11_3::detail::primitive_iterator_t::operator++(a1 + 3);
break;
}
return a1;
}
| operator++:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x8],RAX
CMP qword ptr [RAX],0x0
JNZ 0x001b080a
LEA RDI,[0x30d5de]
MOV ESI,0x33c0
LEA RDX,[0x3071d9]
LEA RCX,[0x312c34]
MOV AL,0x0
CALL 0x0015aef0
LAB_001b080a:
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX]
MOVZX EAX,byte ptr [RAX]
MOV qword ptr [RSP],RAX
SUB RAX,0x9
JA 0x001b0863
MOV RAX,qword ptr [RSP]
LEA RCX,[0x307fd8]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x8
MOV ESI,0x1
CALL 0x001b6610
JMP 0x001b0875
caseD_2:
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x8
ADD RDI,0x8
MOV ESI,0x1
CALL 0x001b6660
JMP 0x001b0875
caseD_0:
JMP 0x001b0863
default:
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x8
ADD RDI,0x10
CALL 0x001b66b0
LAB_001b0875:
MOV RAX,qword ptr [RSP + 0x8]
ADD RSP,0x18
RET
|
/* 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> >::TEMPNAMEPLACEHOLDERVALUE() */
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>>
* __thiscall
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>>
::operator++(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this)
{
if (*(long *)this == 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x33c0,
"GGML_ASSERT(%s) failed","m_object != nullptr");
}
switch(**(int1 **)this) {
case 0:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
default:
primitive_iterator_t::operator++((primitive_iterator_t *)(this + 0x18));
break;
case 1:
std::
advance<__gnu_cxx::__normal_iterator<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>>*,std::vector<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>>,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>>>>>,int>
(this + 8,1);
break;
case 2:
std::
advance<__gnu_cxx::__normal_iterator<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::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>>>>,int>
(this + 0x10,1);
}
return this;
}
| |
54,610 | my_bitmap_free | eloqsql/mysys/my_bitmap.c | void my_bitmap_free(MY_BITMAP *map)
{
DBUG_ENTER("my_bitmap_free");
if (map->bitmap)
{
if (map->mutex)
mysql_mutex_destroy(map->mutex);
my_free(map->bitmap);
map->bitmap=0;
}
DBUG_VOID_RETURN;
} | O0 | c | my_bitmap_free:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0xf3965
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0xf394e
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xf3970
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0xfcc60
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
jmp 0xf3967
jmp 0xf3969
addq $0x10, %rsp
popq %rbp
retq
nop
| my_bitmap_free:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
cmp qword ptr [rax], 0
jz short loc_F3965
mov rax, [rbp+var_8]
cmp qword ptr [rax+10h], 0
jz short loc_F394E
mov rax, [rbp+var_8]
mov rdi, [rax+10h]
call inline_mysql_mutex_destroy_10
loc_F394E:
mov rax, [rbp+var_8]
mov rdi, [rax]
call my_free
mov rax, [rbp+var_8]
mov qword ptr [rax], 0
loc_F3965:
jmp short $+2
loc_F3967:
jmp short $+2
loc_F3969:
add rsp, 10h
pop rbp
retn
| _QWORD * my_bitmap_free(_QWORD *a1)
{
_QWORD *result; // rax
result = a1;
if ( *a1 )
{
if ( a1[2] )
inline_mysql_mutex_destroy_10(a1[2]);
my_free(*a1);
result = a1;
*a1 = 0LL;
}
return result;
}
| my_bitmap_free:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX],0x0
JZ 0x001f3965
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x10],0x0
JZ 0x001f394e
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x001f3970
LAB_001f394e:
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
CALL 0x001fcc60
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],0x0
LAB_001f3965:
JMP 0x001f3967
LAB_001f3967:
JMP 0x001f3969
LAB_001f3969:
ADD RSP,0x10
POP RBP
RET
|
void my_bitmap_free(long *param_1)
{
if (*param_1 != 0) {
if (param_1[2] != 0) {
inline_mysql_mutex_destroy(param_1[2]);
}
my_free(*param_1);
*param_1 = 0;
}
return;
}
| |
54,611 | js_setlike_get_size | bluesky950520[P]quickjs/quickjs.c | static int js_setlike_get_size(JSContext *ctx, JSValue setlike, int64_t *pout)
{
JSMapState *s;
JSValue v;
double d;
s = JS_GetOpaque(setlike, JS_CLASS_SET);
if (s) {
*pout = s->record_count;
} else {
v = JS_GetProperty(ctx, setlike, JS_ATOM_size);
if (JS_IsException(v))
return -1;
if (JS_IsUndefined(v)) {
JS_ThrowTypeError(ctx, ".size is undefined");
return -1;
}
if (JS_ToFloat64Free(ctx, &d, v) < 0)
return -1;
if (isnan(d)) {
JS_ThrowTypeError(ctx, ".size is not a number");
return -1;
}
*pout = d;
}
return 0;
} | O1 | c | js_setlike_get_size:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdi, %r14
movq %rsi, 0x8(%rsp)
cmpl $-0x1, %edx
jne 0x51e13
movq 0x8(%rsp), %rax
cmpw $0x24, 0x6(%rax)
jne 0x51e13
movq 0x30(%rax), %rax
jmp 0x51e15
xorl %eax, %eax
testq %rax, %rax
je 0x51e2d
movl 0x18(%rax), %eax
movq %rax, (%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %r14, %rdi
movl $0x31, %ecx
movq %rsi, %r8
movq %rdx, %r9
pushq $0x0
pushq $0x0
callq 0x22fa3
addq $0x10, %rsp
movq %rdx, %rcx
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
cmpl $0x6, %ecx
je 0x51e22
cmpl $0x3, %ecx
jne 0x51e6d
leaq 0x4e3cd(%rip), %rsi # 0xa022e
movq %r14, %rdi
xorl %eax, %eax
callq 0x22567
jmp 0x51e22
cmpl $0x2, %ecx
ja 0x51e7e
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x8(%rsp)
jmp 0x51e9e
cmpl $0x7, %ecx
jne 0x51e8a
movq %rax, 0x8(%rsp)
jmp 0x51e9e
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
movq %rax, %rdx
callq 0x3df2f
testl %eax, %eax
js 0x51e22
movsd 0x8(%rsp), %xmm0
ucomisd %xmm0, %xmm0
jp 0x51eb4
cvttsd2si %xmm0, %rax
jmp 0x51e1d
leaq 0x4e386(%rip), %rsi # 0xa0241
jmp 0x51e61
| js_setlike_get_size:
push rbp
push r14
push rbx
sub rsp, 10h
mov rbx, rcx
mov r14, rdi
mov [rsp+28h+var_20], rsi
cmp edx, 0FFFFFFFFh
jnz short loc_51E13
mov rax, [rsp+28h+var_20]
cmp word ptr [rax+6], 24h ; '$'
jnz short loc_51E13
mov rax, [rax+30h]
jmp short loc_51E15
loc_51E13:
xor eax, eax
loc_51E15:
test rax, rax
jz short loc_51E2D
mov eax, [rax+18h]
loc_51E1D:
mov [rbx], rax
xor ebp, ebp
loc_51E22:
mov eax, ebp
add rsp, 10h
pop rbx
pop r14
pop rbp
retn
loc_51E2D:
mov rdi, r14
mov ecx, 31h ; '1'
mov r8, rsi
mov r9, rdx
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov rcx, rdx
mov ebp, 0FFFFFFFFh
cmp ecx, 6
jz short loc_51E22
cmp ecx, 3
jnz short loc_51E6D
lea rsi, aSizeIsUndefine; ".size is undefined"
loc_51E61:
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
jmp short loc_51E22
loc_51E6D:
cmp ecx, 2
ja short loc_51E7E
cvtsi2sd xmm0, eax
movsd [rsp+28h+var_20], xmm0
jmp short loc_51E9E
loc_51E7E:
cmp ecx, 7
jnz short loc_51E8A
mov [rsp+28h+var_20], rax
jmp short loc_51E9E
loc_51E8A:
lea rsi, [rsp+28h+var_20]
mov rdi, r14
mov rdx, rax
call __JS_ToFloat64Free
test eax, eax
js short loc_51E22
loc_51E9E:
movsd xmm0, [rsp+28h+var_20]
ucomisd xmm0, xmm0
jp short loc_51EB4
cvttsd2si rax, xmm0
jmp loc_51E1D
loc_51EB4:
lea rsi, aSizeIsNotANumb; ".size is not a number"
jmp short loc_51E61
| long long js_setlike_get_size(
long long a1,
long long a2,
long long a3,
_QWORD *a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long v13; // rax
long long v14; // rax
unsigned int v15; // ebp
unsigned long long PropertyInternal2; // rax
long long v18; // rdx
long long v19; // r8
long long v20; // r9
__m128 v21; // xmm4
__m128 v22; // xmm5
char v23; // [rsp+0h] [rbp-28h]
double v24[4]; // [rsp+8h] [rbp-20h] BYREF
v24[0] = *(double *)&a2;
if ( (_DWORD)a3 == -1 && *(_WORD *)(*(_QWORD *)&v24[0] + 6LL) == 36 )
v13 = *(_QWORD *)(*(_QWORD *)&v24[0] + 48LL);
else
v13 = 0LL;
if ( v13 )
{
v14 = *(unsigned int *)(v13 + 24);
}
else
{
PropertyInternal2 = JS_GetPropertyInternal2(a1, a2, a3, 0x31u, a2, a3, 0LL, 0);
v15 = -1;
if ( (_DWORD)v18 == 6 )
return v15;
if ( (_DWORD)v18 == 3 )
{
JS_ThrowTypeError(a1, (long long)".size is undefined", v18, v18, v19, v20, a5, a6, a7, a8, v21, v22, a11, a12, v23);
return v15;
}
if ( (unsigned int)v18 > 2 )
{
if ( (_DWORD)v18 == 7 )
{
v24[0] = *(double *)&PropertyInternal2;
}
else if ( (int)_JS_ToFloat64Free(a1, (long long *)v24, PropertyInternal2, v18) < 0 )
{
return v15;
}
}
else
{
v24[0] = (double)(int)PropertyInternal2;
}
v14 = (unsigned int)(int)v24[0];
}
*a4 = v14;
return 0;
}
| |||
54,612 | js_setlike_get_size | bluesky950520[P]quickjs/quickjs.c | static int js_setlike_get_size(JSContext *ctx, JSValue setlike, int64_t *pout)
{
JSMapState *s;
JSValue v;
double d;
s = JS_GetOpaque(setlike, JS_CLASS_SET);
if (s) {
*pout = s->record_count;
} else {
v = JS_GetProperty(ctx, setlike, JS_ATOM_size);
if (JS_IsException(v))
return -1;
if (JS_IsUndefined(v)) {
JS_ThrowTypeError(ctx, ".size is undefined");
return -1;
}
if (JS_ToFloat64Free(ctx, &d, v) < 0)
return -1;
if (isnan(d)) {
JS_ThrowTypeError(ctx, ".size is not a number");
return -1;
}
*pout = d;
}
return 0;
} | O2 | c | js_setlike_get_size:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdi, %r14
cmpl $-0x1, %edx
jne 0x46463
cmpw $0x24, 0x6(%rsi)
jne 0x46463
movq 0x30(%rsi), %rax
testq %rax, %rax
je 0x46463
movl 0x18(%rax), %eax
jmp 0x464b6
pushq $0x31
popq %rcx
movq %r14, %rdi
callq 0x1b043
movq %rdx, %rcx
pushq $-0x1
popq %rbp
cmpl $0x6, %ecx
je 0x464bb
cmpl $0x3, %ecx
jne 0x46491
leaq 0x40ce3(%rip), %rsi # 0x87168
movq %r14, %rdi
xorl %eax, %eax
callq 0x1c64d
jmp 0x464bb
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
movq %rax, %rdx
callq 0x21288
testl %eax, %eax
js 0x464bb
movsd 0x8(%rsp), %xmm0
ucomisd %xmm0, %xmm0
jp 0x464c6
cvttsd2si %xmm0, %rax
movq %rax, (%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x40cae(%rip), %rsi # 0x8717b
jmp 0x46485
| js_setlike_get_size:
push rbp
push r14
push rbx
sub rsp, 10h
mov rbx, rcx
mov r14, rdi
cmp edx, 0FFFFFFFFh
jnz short loc_46463
cmp word ptr [rsi+6], 24h ; '$'
jnz short loc_46463
mov rax, [rsi+30h]
test rax, rax
jz short loc_46463
mov eax, [rax+18h]
jmp short loc_464B6
loc_46463:
push 31h ; '1'
pop rcx
mov rdi, r14
call JS_GetProperty
mov rcx, rdx
push 0FFFFFFFFFFFFFFFFh
pop rbp
cmp ecx, 6
jz short loc_464BB
cmp ecx, 3
jnz short loc_46491
lea rsi, aSizeIsUndefine; ".size is undefined"
loc_46485:
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
jmp short loc_464BB
loc_46491:
lea rsi, [rsp+28h+var_20]
mov rdi, r14
mov rdx, rax
call JS_ToFloat64Free
test eax, eax
js short loc_464BB
movsd xmm0, [rsp+28h+var_20]
ucomisd xmm0, xmm0
jp short loc_464C6
cvttsd2si rax, xmm0
loc_464B6:
mov [rbx], rax
xor ebp, ebp
loc_464BB:
mov eax, ebp
add rsp, 10h
pop rbx
pop r14
pop rbp
retn
loc_464C6:
lea rsi, aSizeIsNotANumb; ".size is not a number"
jmp short loc_46485
| long long js_setlike_get_size(
const char *a1,
long long a2,
int a3,
_QWORD *a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long v13; // rax
long long v14; // rax
long long Property; // rax
long long v16; // rdx
long long v17; // r8
long long v18; // r9
__m128 v19; // xmm4
__m128 v20; // xmm5
unsigned int v21; // ebp
char v23; // [rsp+0h] [rbp-28h]
double v24[4]; // [rsp+8h] [rbp-20h] BYREF
if ( a3 == -1 && *(_WORD *)(a2 + 6) == 36 )
{
v13 = *(_QWORD *)(a2 + 48);
if ( v13 )
{
v14 = *(unsigned int *)(v13 + 24);
LABEL_10:
*a4 = v14;
return 0;
}
}
Property = JS_GetProperty((int)a1, a2, a3, 49);
v21 = -1;
if ( (_DWORD)v16 != 6 )
{
if ( (_DWORD)v16 == 3 )
{
JS_ThrowTypeError(
(long long)a1,
(long long)".size is undefined",
v16,
v16,
v17,
v18,
a5,
a6,
a7,
a8,
v19,
v20,
a11,
a12,
v23);
}
else if ( (int)JS_ToFloat64Free(a1, v24, Property, v16) >= 0 )
{
v14 = (unsigned int)(int)v24[0];
goto LABEL_10;
}
}
return v21;
}
| js_setlike_get_size:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV RBX,RCX
MOV R14,RDI
CMP EDX,-0x1
JNZ 0x00146463
CMP word ptr [RSI + 0x6],0x24
JNZ 0x00146463
MOV RAX,qword ptr [RSI + 0x30]
TEST RAX,RAX
JZ 0x00146463
MOV EAX,dword ptr [RAX + 0x18]
JMP 0x001464b6
LAB_00146463:
PUSH 0x31
POP RCX
MOV RDI,R14
CALL 0x0011b043
MOV RCX,RDX
PUSH -0x1
POP RBP
CMP ECX,0x6
JZ 0x001464bb
CMP ECX,0x3
JNZ 0x00146491
LEA RSI,[0x187168]
LAB_00146485:
MOV RDI,R14
XOR EAX,EAX
CALL 0x0011c64d
JMP 0x001464bb
LAB_00146491:
LEA RSI,[RSP + 0x8]
MOV RDI,R14
MOV RDX,RAX
CALL 0x00121288
TEST EAX,EAX
JS 0x001464bb
MOVSD XMM0,qword ptr [RSP + 0x8]
UCOMISD XMM0,XMM0
JP 0x001464c6
CVTTSD2SI RAX,XMM0
LAB_001464b6:
MOV qword ptr [RBX],RAX
XOR EBP,EBP
LAB_001464bb:
MOV EAX,EBP
ADD RSP,0x10
POP RBX
POP R14
POP RBP
RET
LAB_001464c6:
LEA RSI,[0x18717b]
JMP 0x00146485
|
int4 js_setlike_get_size(int8 param_1,long param_2,int8 param_3,ulong *param_4)
{
int iVar1;
ulong uVar2;
int4 uVar3;
char *pcVar4;
int1 auVar5 [12];
double local_20;
if ((((int)param_3 == -1) && (*(short *)(param_2 + 6) == 0x24)) &&
(*(long *)(param_2 + 0x30) != 0)) {
uVar2 = (ulong)*(uint *)(*(long *)(param_2 + 0x30) + 0x18);
LAB_001464b6:
*param_4 = uVar2;
uVar3 = 0;
}
else {
auVar5 = JS_GetProperty(param_1,param_2,param_3,0x31);
uVar3 = 0xffffffff;
if (auVar5._8_4_ == 6) {
return 0xffffffff;
}
if (auVar5._8_4_ == 3) {
pcVar4 = ".size is int";
}
else {
iVar1 = JS_ToFloat64Free(param_1,&local_20,auVar5._0_8_);
if (iVar1 < 0) {
return 0xffffffff;
}
if (!NAN(local_20)) {
uVar2 = (ulong)local_20;
goto LAB_001464b6;
}
pcVar4 = ".size is not a number";
}
JS_ThrowTypeError(param_1,pcVar4);
}
return uVar3;
}
| |
54,613 | google::protobuf::ServiceOptions::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | uint8_t* ServiceOptions::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ServiceOptions)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
// optional bool deprecated = 33 [default = false];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteBoolToArray(33, this->_internal_deprecated(), target);
}
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
for (unsigned i = 0,
n = static_cast<unsigned>(this->_internal_uninterpreted_option_size()); i < n; i++) {
const auto& repfield = this->_internal_uninterpreted_option(i);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(999, repfield, repfield.GetCachedSize(), target, stream);
}
// Extension range [1000, 536870912)
target = _impl_._extensions_._InternalSerialize(
internal_default_instance(), 1000, 536870912, target, stream);
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ServiceOptions)
return target;
} | O0 | cpp | google::protobuf::ServiceOptions::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const:
subq $0xd8, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x18(%rsp)
movl $0x0, 0x34(%rsp)
addq $0x10, %rax
addq $0x18, %rax
movq %rax, 0x80(%rsp)
movl $0x0, 0x7c(%rsp)
movq 0x80(%rsp), %rax
movslq 0x7c(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xc6c3e
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x22890
movq 0x18(%rsp), %rdi
movq %rax, 0x40(%rsp)
callq 0xdb3a0
movb %al, %cl
movq 0x40(%rsp), %rax
movl $0x21, 0x94(%rsp)
andb $0x1, %cl
movb %cl, 0x93(%rsp)
movq %rax, 0x88(%rsp)
movl 0x94(%rsp), %ecx
movq 0x88(%rsp), %rax
movl %ecx, 0xb4(%rsp)
movl $0x0, 0xb0(%rsp)
movq %rax, 0xa8(%rsp)
movl 0xb4(%rsp), %edi
movl 0xb0(%rsp), %esi
callq 0xde2e0
movl %eax, %ecx
movq 0xa8(%rsp), %rax
movl %ecx, 0xc4(%rsp)
movq %rax, 0xb8(%rsp)
movl 0xc4(%rsp), %edi
movq 0xb8(%rsp), %rsi
callq 0x22990
movq %rax, 0x88(%rsp)
movb 0x93(%rsp), %cl
movq 0x88(%rsp), %rax
andb $0x1, %cl
movb %cl, 0xd7(%rsp)
movq %rax, 0xc8(%rsp)
movb 0xd7(%rsp), %cl
xorl %edi, %edi
movl $0x1, %eax
testb $0x1, %cl
cmovnel %eax, %edi
movq 0xc8(%rsp), %rsi
callq 0x22990
movq %rax, 0x40(%rsp)
movq 0x18(%rsp), %rdi
movl $0x0, 0x30(%rsp)
callq 0xa1c90
movl %eax, 0x2c(%rsp)
movl 0x30(%rsp), %eax
cmpl 0x2c(%rsp), %eax
jae 0xc6cb2
movq 0x18(%rsp), %rdi
movl 0x30(%rsp), %esi
callq 0xdb3b0
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rdi
callq 0xd6cb0
movq 0x10(%rsp), %rsi
movl %eax, %edx
movq 0x40(%rsp), %rcx
movq 0x38(%rsp), %r8
movl $0x3e7, %edi # imm = 0x3E7
callq 0x1d88f0
movq %rax, 0x40(%rsp)
movl 0x30(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x30(%rsp)
jmp 0xc6c54
movq 0x18(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x8(%rsp)
callq 0x81a50
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq 0x40(%rsp), %r8
movq 0x38(%rsp), %r9
movl $0x3e8, %edx # imm = 0x3E8
movl $0x20000000, %ecx # imm = 0x20000000
callq 0xd6cd0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x40(%rsp)
addq $0x8, %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0xc6da2
movq 0x18(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x60(%rsp)
leaq 0x9bdb9(%rip), %rax # 0x162af0
movq %rax, 0x58(%rsp)
movq 0x60(%rsp), %rax
movq %rax, (%rsp)
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0xc6d80
movq (%rsp), %rdi
callq 0x9cd40
addq $0x8, %rax
movq %rax, 0x68(%rsp)
jmp 0xc6d89
callq *0x58(%rsp)
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x1672d0
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0xd8, %rsp
retq
nop
| _ZNK6google8protobuf14ServiceOptions18_InternalSerializeEPhPNS0_2io19EpsCopyOutputStreamE:
sub rsp, 0D8h
mov [rsp+0D8h+var_90], rdi
mov [rsp+0D8h+var_98], rsi
mov [rsp+0D8h+var_A0], rdx
mov rax, [rsp+0D8h+var_90]
mov [rsp+0D8h+var_C0], rax
mov [rsp+0D8h+var_A4], 0
add rax, 10h
add rax, 18h
mov [rsp+0D8h+var_58], rax
mov [rsp+0D8h+var_5C], 0
mov rax, [rsp+0D8h+var_58]
movsxd rcx, [rsp+0D8h+var_5C]
mov eax, [rax+rcx*4]
mov [rsp+0D8h+var_A4], eax
mov eax, [rsp+0D8h+var_A4]
and eax, 1
cmp eax, 0
jz loc_C6C3E
mov rdi, [rsp+0D8h+var_A0]; this
mov rsi, [rsp+0D8h+var_98]; unsigned __int8 *
call _ZN6google8protobuf2io19EpsCopyOutputStream11EnsureSpaceEPh; google::protobuf::io::EpsCopyOutputStream::EnsureSpace(uchar *)
mov rdi, [rsp+0D8h+var_C0]; this
mov [rsp+0D8h+var_98], rax
call _ZNK6google8protobuf14ServiceOptions20_internal_deprecatedEv; google::protobuf::ServiceOptions::_internal_deprecated(void)
mov cl, al
mov rax, [rsp+0D8h+var_98]
mov [rsp+0D8h+var_44], 21h ; '!'
and cl, 1
mov [rsp+0D8h+var_45], cl
mov [rsp+0D8h+var_50], rax
mov ecx, [rsp+0D8h+var_44]
mov rax, [rsp+0D8h+var_50]
mov [rsp+0D8h+var_24], ecx
mov [rsp+0D8h+var_28], 0
mov [rsp+0D8h+var_30], rax
mov edi, [rsp+0D8h+var_24]
mov esi, [rsp+0D8h+var_28]
call _ZN6google8protobuf8internal14WireFormatLite7MakeTagEiNS2_8WireTypeE; google::protobuf::internal::WireFormatLite::MakeTag(int,google::protobuf::internal::WireFormatLite::WireType)
mov ecx, eax
mov rax, [rsp+0D8h+var_30]
mov dword ptr [rsp+0D8h+var_14], ecx
mov qword ptr [rsp+0D8h+var_20], rax
mov edi, dword ptr [rsp+0D8h+var_14]; this
mov rsi, qword ptr [rsp+0D8h+var_20]; unsigned int
call _ZN6google8protobuf2io17CodedOutputStream20WriteVarint32ToArrayEjPh; google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(uint,uchar *)
mov [rsp+0D8h+var_50], rax
mov cl, [rsp+0D8h+var_45]
mov rax, [rsp+0D8h+var_50]
and cl, 1
mov [rsp+0D8h+var_1], cl
mov [rsp+0D8h+var_14+4], rax
mov cl, [rsp+0D8h+var_1]
xor edi, edi
mov eax, (offset dword_0+1)
test cl, 1
cmovnz edi, eax; this
mov rsi, [rsp+0D8h+var_14+4]; unsigned int
call _ZN6google8protobuf2io17CodedOutputStream20WriteVarint32ToArrayEjPh; google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(uint,uchar *)
mov [rsp+0D8h+var_98], rax
loc_C6C3E:
mov rdi, [rsp+0D8h+var_C0]; this
mov [rsp+0D8h+var_A8], 0
call _ZNK6google8protobuf14ServiceOptions35_internal_uninterpreted_option_sizeEv; google::protobuf::ServiceOptions::_internal_uninterpreted_option_size(void)
mov [rsp+0D8h+var_AC], eax
loc_C6C54:
mov eax, [rsp+0D8h+var_A8]
cmp eax, [rsp+0D8h+var_AC]
jnb short loc_C6CB2
mov rdi, [rsp+0D8h+var_C0]; this
mov esi, [rsp+0D8h+var_A8]; int
call _ZNK6google8protobuf14ServiceOptions30_internal_uninterpreted_optionEi; google::protobuf::ServiceOptions::_internal_uninterpreted_option(int)
mov [rsp+0D8h+var_B8], rax
mov rax, [rsp+0D8h+var_B8]
mov qword ptr [rsp+0D8h+var_C8], rax
mov rdi, [rsp+0D8h+var_B8]; this
call _ZNK6google8protobuf19UninterpretedOption13GetCachedSizeEv; google::protobuf::UninterpretedOption::GetCachedSize(void)
mov rsi, qword ptr [rsp+0D8h+var_C8]; int
mov edx, eax; google::protobuf::MessageLite *
mov rcx, [rsp+0D8h+var_98]; int
mov r8, [rsp+0D8h+var_A0]; unsigned __int8 *
mov edi, (offset elf_gnu_hash_indexes+27h); this
call _ZN6google8protobuf8internal14WireFormatLite20InternalWriteMessageEiRKNS0_11MessageLiteEiPhPNS0_2io19EpsCopyOutputStreamE; google::protobuf::internal::WireFormatLite::InternalWriteMessage(int,google::protobuf::MessageLite const&,int,uchar *,google::protobuf::io::EpsCopyOutputStream *)
mov [rsp+0D8h+var_98], rax
mov eax, [rsp+0D8h+var_A8]
add eax, 1
mov [rsp+0D8h+var_A8], eax
jmp short loc_C6C54
loc_C6CB2:
mov rax, [rsp+0D8h+var_C0]
add rax, 10h
mov [rsp+0D8h+var_D0], rax
call _ZN6google8protobuf14ServiceOptions25internal_default_instanceEv; google::protobuf::ServiceOptions::internal_default_instance(void)
mov rdi, [rsp+0D8h+var_D0]; this
mov rsi, rax; google::protobuf::MessageLite *
mov r8, [rsp+0D8h+var_98]; unsigned __int8 *
mov r9, [rsp+0D8h+var_A0]; google::protobuf::io::EpsCopyOutputStream *
mov edx, 3E8h; int
mov ecx, 20000000h; int
call _ZNK6google8protobuf8internal12ExtensionSet18_InternalSerializeEPKNS0_11MessageLiteEiiPhPNS0_2io19EpsCopyOutputStreamE; google::protobuf::internal::ExtensionSet::_InternalSerialize(google::protobuf::MessageLite const*,int,int,uchar *,google::protobuf::io::EpsCopyOutputStream *)
mov rcx, rax
mov rax, [rsp+0D8h+var_C0]
mov [rsp+0D8h+var_98], rcx
add rax, 8
mov [rsp+0D8h+var_88], rax
mov rax, [rsp+0D8h+var_88]
mov [rsp+0D8h+var_38], rax
mov rax, [rsp+0D8h+var_38]
mov rax, [rax]
and rax, 1
cmp rax, 0
jz loc_C6DA2
mov rax, [rsp+0D8h+var_C0]
add rax, 8
mov [rsp+0D8h+var_78], rax
lea rax, _ZN6google8protobuf15UnknownFieldSet16default_instanceEv; google::protobuf::UnknownFieldSet::default_instance(void)
mov [rsp+0D8h+var_80], rax
mov rax, [rsp+0D8h+var_78]
mov [rsp+0D8h+var_D8], rax
mov [rsp+0D8h+var_68], rax
mov rax, [rsp+0D8h+var_68]
mov [rsp+0D8h+var_40], rax
mov rax, [rsp+0D8h+var_40]
mov rax, [rax]
and rax, 1
cmp rax, 0
jz short loc_C6D80
mov rdi, [rsp+0D8h+var_D8]
call _ZNK6google8protobuf8internal16InternalMetadata8PtrValueINS2_9ContainerINS0_15UnknownFieldSetEEEEEPT_v; google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(void)
add rax, 8
mov [rsp+0D8h+var_70], rax
jmp short loc_C6D89
loc_C6D80:
call [rsp+0D8h+var_80]
mov [rsp+0D8h+var_70], rax
loc_C6D89:
mov rdi, [rsp+0D8h+var_70]; this
mov rsi, [rsp+0D8h+var_98]; google::protobuf::UnknownFieldSet *
mov rdx, [rsp+0D8h+var_A0]; unsigned __int8 *
call _ZN6google8protobuf8internal10WireFormat37InternalSerializeUnknownFieldsToArrayERKNS0_15UnknownFieldSetEPhPNS0_2io19EpsCopyOutputStreamE; google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray(google::protobuf::UnknownFieldSet const&,uchar *,google::protobuf::io::EpsCopyOutputStream *)
mov [rsp+0D8h+var_98], rax
loc_C6DA2:
mov rax, [rsp+0D8h+var_98]
add rsp, 0D8h
retn
| google::protobuf::UnknownFieldSet * google::protobuf::ServiceOptions::_InternalSerialize(
google::protobuf::ServiceOptions *this,
unsigned __int8 *a2,
google::protobuf::io::EpsCopyOutputStream *a3)
{
unsigned __int8 *v3; // rdx
unsigned __int8 *v4; // rdx
google::protobuf::io::CodedOutputStream *v5; // rdi
google::protobuf::ServiceOptions *v6; // rdi
unsigned int CachedSize; // eax
google::protobuf::io::EpsCopyOutputStream *v8; // r9
void ( ***v9)(google::protobuf::ServiceOptions *__hidden); // rax
google::protobuf::io::EpsCopyOutputStream *v10; // rcx
google::protobuf::UninterpretedOption *v12; // [rsp+10h] [rbp-C8h]
unsigned int v14; // [rsp+2Ch] [rbp-ACh]
unsigned int v15; // [rsp+30h] [rbp-A8h]
unsigned __int8 *v17; // [rsp+40h] [rbp-98h]
unsigned __int8 *v18; // [rsp+40h] [rbp-98h]
google::protobuf::UnknownFieldSet *v19; // [rsp+40h] [rbp-98h]
google::protobuf::internal::WireFormat *v20; // [rsp+68h] [rbp-70h]
char v21; // [rsp+93h] [rbp-45h]
unsigned int Tag; // [rsp+C4h] [rbp-14h]
google::protobuf::io::CodedOutputStream *v23; // [rsp+C8h] [rbp-10h]
v17 = a2;
if ( (*((_DWORD *)this + 10) & 1) != 0 )
{
v18 = google::protobuf::io::EpsCopyOutputStream::EnsureSpace(a3, a2);
v21 = google::protobuf::ServiceOptions::_internal_deprecated(this) & 1;
Tag = google::protobuf::internal::WireFormatLite::MakeTag(33LL, 0LL);
v23 = (google::protobuf::io::CodedOutputStream *)google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
(google::protobuf::io::CodedOutputStream *)Tag,
v18,
v3);
v5 = 0LL;
if ( (v21 & 1) != 0 )
v5 = (google::protobuf::io::CodedOutputStream *)((unsigned int)&dword_0 + 1);
v17 = google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(v5, v23, v4);
}
v6 = this;
v15 = 0;
v14 = google::protobuf::ServiceOptions::_internal_uninterpreted_option_size(this);
while ( v15 < v14 )
{
v12 = (google::protobuf::UninterpretedOption *)google::protobuf::ServiceOptions::_internal_uninterpreted_option(
this,
v15);
CachedSize = google::protobuf::UninterpretedOption::GetCachedSize(v12);
v6 = (google::protobuf::ServiceOptions *)((char *)&elf_gnu_hash_indexes[4] + 7);
v17 = (unsigned __int8 *)google::protobuf::internal::WireFormatLite::InternalWriteMessage(
(google::protobuf::internal::WireFormatLite *)((char *)&elf_gnu_hash_indexes[4] + 7),
(int)v12,
(const google::protobuf::MessageLite *)CachedSize,
(int)v17,
(unsigned __int8 *)a3,
v8);
++v15;
}
v9 = google::protobuf::ServiceOptions::internal_default_instance(v6);
v19 = (google::protobuf::UnknownFieldSet *)google::protobuf::internal::ExtensionSet::_InternalSerialize(
(google::protobuf::ServiceOptions *)((char *)this + 16),
(const google::protobuf::MessageLite *)v9,
1000,
0x20000000,
v17,
a3);
if ( (*((_QWORD *)this + 1) & 1LL) != 0 )
{
v20 = (google::protobuf::internal::WireFormat *)(google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>((_QWORD *)this + 1)
+ 8);
return (google::protobuf::UnknownFieldSet *)google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
v20,
v19,
(unsigned __int8 *)a3,
v10);
}
return v19;
}
| _InternalSerialize:
SUB RSP,0xd8
MOV qword ptr [RSP + 0x48],RDI
MOV qword ptr [RSP + 0x40],RSI
MOV qword ptr [RSP + 0x38],RDX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x18],RAX
MOV dword ptr [RSP + 0x34],0x0
ADD RAX,0x10
ADD RAX,0x18
MOV qword ptr [RSP + 0x80],RAX
MOV dword ptr [RSP + 0x7c],0x0
MOV RAX,qword ptr [RSP + 0x80]
MOVSXD RCX,dword ptr [RSP + 0x7c]
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV dword ptr [RSP + 0x34],EAX
MOV EAX,dword ptr [RSP + 0x34]
AND EAX,0x1
CMP EAX,0x0
JZ 0x001c6c3e
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x40]
CALL 0x00122890
MOV RDI,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x40],RAX
CALL 0x001db3a0
MOV CL,AL
MOV RAX,qword ptr [RSP + 0x40]
MOV dword ptr [RSP + 0x94],0x21
AND CL,0x1
MOV byte ptr [RSP + 0x93],CL
MOV qword ptr [RSP + 0x88],RAX
MOV ECX,dword ptr [RSP + 0x94]
MOV RAX,qword ptr [RSP + 0x88]
MOV dword ptr [RSP + 0xb4],ECX
MOV dword ptr [RSP + 0xb0],0x0
MOV qword ptr [RSP + 0xa8],RAX
MOV EDI,dword ptr [RSP + 0xb4]
MOV ESI,dword ptr [RSP + 0xb0]
CALL 0x001de2e0
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0xa8]
MOV dword ptr [RSP + 0xc4],ECX
MOV qword ptr [RSP + 0xb8],RAX
MOV EDI,dword ptr [RSP + 0xc4]
MOV RSI,qword ptr [RSP + 0xb8]
CALL 0x00122990
MOV qword ptr [RSP + 0x88],RAX
MOV CL,byte ptr [RSP + 0x93]
MOV RAX,qword ptr [RSP + 0x88]
AND CL,0x1
MOV byte ptr [RSP + 0xd7],CL
MOV qword ptr [RSP + 0xc8],RAX
MOV CL,byte ptr [RSP + 0xd7]
XOR EDI,EDI
MOV EAX,0x1
TEST CL,0x1
CMOVNZ EDI,EAX
MOV RSI,qword ptr [RSP + 0xc8]
CALL 0x00122990
MOV qword ptr [RSP + 0x40],RAX
LAB_001c6c3e:
MOV RDI,qword ptr [RSP + 0x18]
MOV dword ptr [RSP + 0x30],0x0
CALL 0x001a1c90
MOV dword ptr [RSP + 0x2c],EAX
LAB_001c6c54:
MOV EAX,dword ptr [RSP + 0x30]
CMP EAX,dword ptr [RSP + 0x2c]
JNC 0x001c6cb2
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,dword ptr [RSP + 0x30]
CALL 0x001db3b0
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x001d6cb0
MOV RSI,qword ptr [RSP + 0x10]
MOV EDX,EAX
MOV RCX,qword ptr [RSP + 0x40]
MOV R8,qword ptr [RSP + 0x38]
MOV EDI,0x3e7
CALL 0x002d88f0
MOV qword ptr [RSP + 0x40],RAX
MOV EAX,dword ptr [RSP + 0x30]
ADD EAX,0x1
MOV dword ptr [RSP + 0x30],EAX
JMP 0x001c6c54
LAB_001c6cb2:
MOV RAX,qword ptr [RSP + 0x18]
ADD RAX,0x10
MOV qword ptr [RSP + 0x8],RAX
CALL 0x00181a50
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,RAX
MOV R8,qword ptr [RSP + 0x40]
MOV R9,qword ptr [RSP + 0x38]
MOV EDX,0x3e8
MOV ECX,0x20000000
CALL 0x001d6cd0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x40],RCX
ADD RAX,0x8
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0xa0],RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV RAX,qword ptr [RAX]
AND RAX,0x1
CMP RAX,0x0
JZ 0x001c6da2
MOV RAX,qword ptr [RSP + 0x18]
ADD RAX,0x8
MOV qword ptr [RSP + 0x60],RAX
LEA RAX,[0x262af0]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [RSP + 0x98]
MOV RAX,qword ptr [RAX]
AND RAX,0x1
CMP RAX,0x0
JZ 0x001c6d80
MOV RDI,qword ptr [RSP]
CALL 0x0019cd40
ADD RAX,0x8
MOV qword ptr [RSP + 0x68],RAX
JMP 0x001c6d89
LAB_001c6d80:
CALL qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x68],RAX
LAB_001c6d89:
MOV RDI,qword ptr [RSP + 0x68]
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x38]
CALL 0x002672d0
MOV qword ptr [RSP + 0x40],RAX
LAB_001c6da2:
MOV RAX,qword ptr [RSP + 0x40]
ADD RSP,0xd8
RET
|
/* google::protobuf::ServiceOptions::_InternalSerialize(unsigned char*,
google::protobuf::io::EpsCopyOutputStream*) const */
uchar * __thiscall
google::protobuf::ServiceOptions::_InternalSerialize
(ServiceOptions *this,uchar *param_1,EpsCopyOutputStream *param_2)
{
byte bVar1;
uint uVar2;
int iVar3;
uchar *puVar4;
UninterpretedOption *this_00;
MessageLite *pMVar5;
uint local_a8;
uchar *local_98;
UnknownFieldSet *local_70;
local_98 = param_1;
if ((*(uint *)(this + 0x28) & 1) != 0) {
puVar4 = (uchar *)io::EpsCopyOutputStream::EnsureSpace(param_2,param_1);
bVar1 = _internal_deprecated(this);
uVar2 = internal::WireFormatLite::MakeTag(0x21,0);
puVar4 = (uchar *)io::CodedOutputStream::WriteVarint32ToArray(uVar2,puVar4);
local_98 = (uchar *)io::CodedOutputStream::WriteVarint32ToArray((uint)((bVar1 & 1) != 0),puVar4)
;
}
local_a8 = 0;
uVar2 = _internal_uninterpreted_option_size(this);
for (; local_a8 < uVar2; local_a8 = local_a8 + 1) {
this_00 = (UninterpretedOption *)_internal_uninterpreted_option(this,local_a8);
iVar3 = UninterpretedOption::GetCachedSize(this_00);
local_98 = (uchar *)internal::WireFormatLite::InternalWriteMessage
(999,(MessageLite *)this_00,iVar3,local_98,param_2);
}
pMVar5 = (MessageLite *)internal_default_instance();
local_98 = (uchar *)internal::ExtensionSet::_InternalSerialize
((ExtensionSet *)(this + 0x10),pMVar5,1000,0x20000000,local_98,
param_2);
if ((*(ulong *)(this + 8) & 1) != 0) {
if ((*(ulong *)(this + 8) & 1) == 0) {
local_70 = (UnknownFieldSet *)UnknownFieldSet::default_instance();
}
else {
local_70 = (UnknownFieldSet *)
internal::InternalMetadata::
PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>
((InternalMetadata *)(this + 8));
local_70 = (UnknownFieldSet *)((Container *)local_70 + 8);
}
local_98 = (uchar *)internal::WireFormat::InternalSerializeUnknownFieldsToArray
(local_70,local_98,param_2);
}
return local_98;
}
| |
54,614 | bool Diagnostics_information::evaluate<Condition_information_item, Sql_condition const*>(THD*, Condition_information_item*, Sql_condition const*) | eloqsql/sql/sql_get_diagnostics.h | bool evaluate(THD *thd, Diag_item *diag_item, Context ctx)
{
Item *value;
/* Get this item's value. */
if (! (value= diag_item->get_value(thd, ctx)))
return true;
/* Set variable/parameter value. */
return diag_item->set_value(thd, &value);
} | O0 | c | bool Diagnostics_information::evaluate<Condition_information_item, Sql_condition const*>(THD*, Condition_information_item*, Sql_condition const*):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0xe36600
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0xe36c09
movb $0x1, -0x1(%rbp)
jmp 0xe36c1f
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0xe360a0
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _ZN23Diagnostics_information8evaluateI26Condition_information_itemPK13Sql_conditionEEbP3THDPT_T0_:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rdi, [rbp+var_20]; this
mov rsi, [rbp+var_18]; THD *
mov rdx, [rbp+var_28]; Sql_condition *
call _ZN26Condition_information_item9get_valueEP3THDPK13Sql_condition; Condition_information_item::get_value(THD *,Sql_condition const*)
mov [rbp+var_30], rax
cmp rax, 0
jnz short loc_E36C09
mov [rbp+var_1], 1
jmp short loc_E36C1F
loc_E36C09:
mov rdi, [rbp+var_20]; this
mov rsi, [rbp+var_18]; THD *
lea rdx, [rbp+var_30]; Item **
call _ZN28Diagnostics_information_item9set_valueEP3THDPP4Item; Diagnostics_information_item::set_value(THD *,Item **)
and al, 1
mov [rbp+var_1], al
loc_E36C1F:
mov al, [rbp+var_1]
and al, 1
add rsp, 30h
pop rbp
retn
| char Diagnostics_information::evaluate<Condition_information_item,Sql_condition const*>(
long long a1,
THD *a2,
Diagnostics_information_item *a3,
Item *a4)
{
Item *v5[2]; // [rsp+0h] [rbp-30h] BYREF
Diagnostics_information_item *v6; // [rsp+10h] [rbp-20h]
THD *v7; // [rsp+18h] [rbp-18h]
long long v8; // [rsp+20h] [rbp-10h]
v8 = a1;
v7 = a2;
v6 = a3;
v5[1] = a4;
v5[0] = (Item *)Condition_information_item::get_value(a3, a2, a4);
if ( v5[0] )
return Diagnostics_information_item::set_value(v6, v7, v5) & 1;
else
return 1;
}
| fix_fields:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00e36bee
LAB_00e36bee:
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0xf0]
MOV RDI,qword ptr [RAX]
CALL 0x009e90b0
TEST AL,0x1
JNZ 0x00e36c07
JMP 0x00e36c72
LAB_00e36c07:
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0xf0]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x2f0]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0xc8]
CMP EAX,0x0
JNZ 0x00e36c70
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0xf8]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00e36c45
LAB_00e36c45:
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x40],0x2
JNZ 0x00e36c6e
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x18]
MOV RDI,qword ptr [RAX + 0x1f0]
MOV RAX,qword ptr [RBP + -0x30]
MOVZX ESI,word ptr [RAX + 0x8c]
CALL 0x00e21500
LAB_00e36c6e:
JMP 0x00e36c70
LAB_00e36c70:
JMP 0x00e36c9e
LAB_00e36c72:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RAX + 0xf0]
MOV RDI,qword ptr [RCX]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RAX + 0xf0]
CALL 0x009e9060
TEST AL,0x1
JNZ 0x00e36c96
JMP 0x00e36c9c
LAB_00e36c96:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00e36d01
LAB_00e36c9c:
JMP 0x00e36c9e
LAB_00e36c9e:
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00e3db20
TEST AL,0x1
JNZ 0x00e36cb5
JMP 0x00e36cbb
LAB_00e36cb5:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00e36d01
LAB_00e36cbb:
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x108]
CMP qword ptr [RAX + 0x100],0x0
JZ 0x00e36cf4
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x108]
MOV RAX,qword ptr [RAX + 0x100]
CMP dword ptr [RAX + 0x29c],0x0
JZ 0x00e36cf4
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x00985060
LAB_00e36cf4:
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x00c1c440
MOV byte ptr [RBP + -0x1],0x0
LAB_00e36d01:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x40
POP RBP
RET
|
/* Item_direct_view_ref::fix_fields(THD*, Item**) */
int1 __thiscall
Item_direct_view_ref::fix_fields(Item_direct_view_ref *this,THD *param_1,Item **param_2)
{
int iVar1;
ulong uVar2;
long *plVar3;
int1 local_9;
uVar2 = Item::fixed((Item *)**(int8 **)(this + 0xf0));
if ((uVar2 & 1) == 0) {
uVar2 = Item::fix_fields_if_needed
((Item *)**(int8 **)(this + 0xf0),param_1,*(Item ***)(this + 0xf0));
if ((uVar2 & 1) != 0) {
return 1;
}
}
else {
plVar3 = (long *)(**(code **)(*(long *)**(int8 **)(this + 0xf0) + 0x2f0))();
iVar1 = (**(code **)(*plVar3 + 200))();
if ((iVar1 == 0) && (*(int *)(param_1 + 0x40) == 2)) {
::bitmap_set_bit(*(st_bitmap **)(*(long *)(plVar3[0x1f] + 0x18) + 0x1f0),
(uint)*(ushort *)(plVar3[0x1f] + 0x8c));
}
}
uVar2 = Item_direct_ref::fix_fields((Item_direct_ref *)this,param_1,param_2);
if ((uVar2 & 1) == 0) {
if ((*(long *)(*(long *)(this + 0x108) + 0x100) != 0) &&
(*(int *)(*(long *)(*(long *)(this + 0x108) + 0x100) + 0x29c) != 0)) {
Item::set_maybe_null((Item *)this);
}
set_null_ref_table(this);
local_9 = 0;
}
else {
local_9 = 1;
}
return local_9;
}
| |
54,615 | bool Diagnostics_information::evaluate<Condition_information_item, Sql_condition const*>(THD*, Condition_information_item*, Sql_condition const*) | eloqsql/sql/sql_get_diagnostics.h | bool evaluate(THD *thd, Diag_item *diag_item, Context ctx)
{
Item *value;
/* Get this item's value. */
if (! (value= diag_item->get_value(thd, ctx)))
return true;
/* Set variable/parameter value. */
return diag_item->set_value(thd, &value);
} | O3 | c | bool Diagnostics_information::evaluate<Condition_information_item, Sql_condition const*>(THD*, Condition_information_item*, Sql_condition const*):
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdx, %rdi
movq %rcx, %rdx
callq 0xa4737a
movq %rax, -0x18(%rbp)
testq %rax, %rax
je 0xa477e4
movq 0x8(%r14), %rdi
movq (%rdi), %rax
callq *0x5a8(%rax)
movq 0x3fd8(%rbx), %rdx
movq (%rax), %r8
leaq -0x18(%rbp), %rcx
movq %rax, %rdi
movq %rbx, %rsi
callq *0x18(%r8)
jmp 0xa477e6
movb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
| _ZN23Diagnostics_information8evaluateI26Statement_information_itemPK16Diagnostics_areaEEbP3THDPT_T0_:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 10h
mov r14, rdx
mov rbx, rsi
mov rdi, rdx; this
mov rdx, rcx; Diagnostics_area *
call _ZN26Statement_information_item9get_valueEP3THDPK16Diagnostics_area; Statement_information_item::get_value(THD *,Diagnostics_area const*)
mov [rbp+var_18], rax
test rax, rax
jz short loc_A477E4
mov rdi, [r14+8]
mov rax, [rdi]
call qword ptr [rax+5A8h]
mov rdx, [rbx+3FD8h]
mov r8, [rax]
lea rcx, [rbp+var_18]
mov rdi, rax
mov rsi, rbx
call qword ptr [r8+18h]
jmp short loc_A477E6
loc_A477E4:
mov al, 1
loc_A477E6:
add rsp, 10h
pop rbx
pop r14
pop rbp
retn
| long long Diagnostics_information::evaluate<Statement_information_item,Diagnostics_area const*>(
long long a1,
THD *a2,
Statement_information_item *a3,
const Diagnostics_area *a4)
{
long long v5; // rax
Item *value; // [rsp+8h] [rbp-18h] BYREF
value = Statement_information_item::get_value(a3, a2, a4);
if ( !value )
return 1LL;
v5 = (*(long long ( **)(_QWORD *))(**((_QWORD **)a3 + 1) + 1448LL))(*((_QWORD **)a3 + 1));
return (*(long long ( **)(long long, THD *, _QWORD, Item **))(*(_QWORD *)v5 + 24LL))(
v5,
a2,
*((_QWORD *)a2 + 2043),
&value);
}
| |||
54,616 | ggml_backend_sched_alloc_graph | ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp | bool ggml_backend_sched_alloc_graph(ggml_backend_sched_t sched, struct ggml_cgraph * graph) {
GGML_ASSERT((int)sched->hash_set.size >= graph->n_nodes + graph->n_leafs);
ggml_backend_sched_split_graph(sched, graph);
if (!ggml_backend_sched_alloc_splits(sched)) {
return false;
}
sched->is_alloc = true;
return true;
} | O0 | cpp | ggml_backend_sched_alloc_graph:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq %rsi, (%rsp)
movq 0x8(%rsp), %rax
movq 0x110(%rax), %rax
movq (%rsp), %rcx
movl 0x4(%rcx), %ecx
movq (%rsp), %rdx
addl 0x8(%rdx), %ecx
cmpl %ecx, %eax
jge 0x61f0c
leaq 0x55737(%rip), %rdi # 0xb7629
movl $0x617, %esi # imm = 0x617
leaq 0x52704(%rip), %rdx # 0xb4602
leaq 0x55b88(%rip), %rcx # 0xb7a8d
movb $0x0, %al
callq 0x46780
movq 0x8(%rsp), %rdi
movq (%rsp), %rsi
callq 0x5fad0
movq 0x8(%rsp), %rdi
callq 0x61f50
testb $0x1, %al
jne 0x61f2f
movb $0x0, 0x17(%rsp)
jmp 0x61f3d
movq 0x8(%rsp), %rax
movb $0x1, 0x1(%rax)
movb $0x1, 0x17(%rsp)
movb 0x17(%rsp), %al
andb $0x1, %al
addq $0x18, %rsp
retq
nopl (%rax,%rax)
| ggml_backend_sched_alloc_graph:
sub rsp, 18h
mov [rsp+18h+var_10], rdi
mov [rsp+18h+var_18], rsi
mov rax, [rsp+18h+var_10]
mov rax, [rax+110h]
mov rcx, [rsp+18h+var_18]
mov ecx, [rcx+4]
mov rdx, [rsp+18h+var_18]
add ecx, [rdx+8]
cmp eax, ecx
jge short loc_61F0C
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
mov esi, 617h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIntSchedHashSe_0; "(int)sched->hash_set.size >= graph->n_n"...
mov al, 0
call _ggml_abort
loc_61F0C:
mov rdi, [rsp+18h+var_10]
mov rsi, [rsp+18h+var_18]
call _ZL30ggml_backend_sched_split_graphP18ggml_backend_schedP11ggml_cgraph; ggml_backend_sched_split_graph(ggml_backend_sched *,ggml_cgraph *)
mov rdi, [rsp+18h+var_10]
call _ZL31ggml_backend_sched_alloc_splitsP18ggml_backend_sched; ggml_backend_sched_alloc_splits(ggml_backend_sched *)
test al, 1
jnz short loc_61F2F
mov [rsp+18h+var_1], 0
jmp short loc_61F3D
loc_61F2F:
mov rax, [rsp+18h+var_10]
mov byte ptr [rax+1], 1
mov [rsp+18h+var_1], 1
loc_61F3D:
mov al, [rsp+18h+var_1]
and al, 1
add rsp, 18h
retn
| char ggml_backend_sched_alloc_graph(
long long a1,
long long a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
if ( (int)*(_QWORD *)(a1 + 272) < *(_DWORD *)(a2 + 8) + *(_DWORD *)(a2 + 4) )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp",
1559,
(long long)"GGML_ASSERT(%s) failed",
"(int)sched->hash_set.size >= graph->n_nodes + graph->n_leafs");
ggml_backend_sched_split_graph(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
if ( (ggml_backend_sched_alloc_splits(a1) & 1) == 0 )
return 0;
*(_BYTE *)(a1 + 1) = 1;
return 1;
}
| ggml_backend_sched_alloc_graph:
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RDI
MOV qword ptr [RSP],RSI
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x110]
MOV RCX,qword ptr [RSP]
MOV ECX,dword ptr [RCX + 0x4]
MOV RDX,qword ptr [RSP]
ADD ECX,dword ptr [RDX + 0x8]
CMP EAX,ECX
JGE 0x00161f0c
LEA RDI,[0x1b7629]
MOV ESI,0x617
LEA RDX,[0x1b4602]
LEA RCX,[0x1b7a8d]
MOV AL,0x0
CALL 0x00146780
LAB_00161f0c:
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP]
CALL 0x0015fad0
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00161f50
TEST AL,0x1
JNZ 0x00161f2f
MOV byte ptr [RSP + 0x17],0x0
JMP 0x00161f3d
LAB_00161f2f:
MOV RAX,qword ptr [RSP + 0x8]
MOV byte ptr [RAX + 0x1],0x1
MOV byte ptr [RSP + 0x17],0x1
LAB_00161f3d:
MOV AL,byte ptr [RSP + 0x17]
AND AL,0x1
ADD RSP,0x18
RET
|
bool ggml_backend_sched_alloc_graph(ggml_backend_sched *param_1,ggml_cgraph *param_2)
{
ulong uVar1;
bool bVar2;
if ((int)*(int8 *)(param_1 + 0x110) < *(int *)(param_2 + 4) + *(int *)(param_2 + 8)) {
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp"
,0x617,"GGML_ASSERT(%s) failed",
"(int)sched->hash_set.size >= graph->n_nodes + graph->n_leafs");
}
ggml_backend_sched_split_graph(param_1,param_2);
uVar1 = ggml_backend_sched_alloc_splits(param_1);
bVar2 = (uVar1 & 1) != 0;
if (bVar2) {
param_1[1] = (ggml_backend_sched)0x1;
}
return bVar2;
}
| |
54,617 | ggml_backend_sched_alloc_graph | ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp | bool ggml_backend_sched_alloc_graph(ggml_backend_sched_t sched, struct ggml_cgraph * graph) {
GGML_ASSERT((int)sched->hash_set.size >= graph->n_nodes + graph->n_leafs);
ggml_backend_sched_split_graph(sched, graph);
if (!ggml_backend_sched_alloc_splits(sched)) {
return false;
}
sched->is_alloc = true;
return true;
} | O1 | cpp | ggml_backend_sched_alloc_graph:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl 0x8(%rsi), %eax
addl 0x4(%rsi), %eax
cmpl 0x110(%rdi), %eax
jg 0x27a11
movq %rdi, %rbx
callq 0x2639b
movslq 0x15c(%rbx), %rax
testq %rax, %rax
jle 0x27915
movq 0x138(%rbx), %rcx
movq 0x148(%rbx), %rdx
xorl %esi, %esi
movslq (%rcx,%rsi,4), %rdi
movslq (%rdx,%rsi,4), %r8
cmpl %r8d, %edi
je 0x2790d
movq 0x88(%rbx,%rdi,8), %rdi
cmpq 0x88(%rbx,%r8,8), %rdi
jne 0x27919
incq %rsi
cmpq %rsi, %rax
jne 0x278ee
xorl %eax, %eax
jmp 0x2791b
movb $0x1, %al
testb %al, %al
jne 0x27966
movslq 0x160(%rbx), %rcx
testq %rcx, %rcx
jle 0x27966
movq 0x140(%rbx), %rdx
movq 0x150(%rbx), %rsi
xorl %edi, %edi
movslq (%rdx,%rdi,4), %r8
movslq (%rsi,%rdi,4), %r9
cmpl %r9d, %r8d
je 0x2795a
movq 0x88(%rbx,%r8,8), %r8
cmpq 0x88(%rbx,%r9,8), %r8
jne 0x27964
incq %rdi
cmpq %rdi, %rcx
jne 0x2793b
jmp 0x27966
movb $0x1, %al
leaq 0x158(%rbx), %r14
testb %al, %al
jne 0x27987
movq 0x108(%rbx), %rdi
movq %r14, %rsi
callq 0x17870
movb $0x1, %bpl
testb %al, %al
jne 0x279fb
cmpl $0x0, 0x4(%rbx)
jle 0x279ac
xorl %r15d, %r15d
movq 0x8(%rbx,%r15,8), %rdi
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0x279a0
callq *%rax
incq %r15
movslq 0x4(%rbx), %rax
cmpq %rax, %r15
jl 0x27990
movq 0x108(%rbx), %rdi
movq 0x138(%rbx), %rdx
movq 0x140(%rbx), %rcx
movq %r14, %rsi
callq 0x17460
movq 0x108(%rbx), %rdi
movq %r14, %rsi
callq 0x17870
movb $0x1, %bpl
testb %al, %al
jne 0x279fb
leaq 0x2625a(%rip), %rsi # 0x4dc40
leaq 0x26271(%rip), %rdx # 0x4dc5e
xorl %ebp, %ebp
movl $0x4, %edi
xorl %eax, %eax
callq 0x167f0
testb %bpl, %bpl
je 0x27a04
movb $0x1, 0x1(%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2594a(%rip), %rdi # 0x4d362
leaq 0x22c3b(%rip), %rdx # 0x4a65a
leaq 0x25da0(%rip), %rcx # 0x4d7c6
movl $0x617, %esi # imm = 0x617
xorl %eax, %eax
callq 0x17c70
| ggml_backend_sched_alloc_graph:
push rbp
push r15
push r14
push rbx
push rax
mov eax, [rsi+8]
add eax, [rsi+4]
cmp eax, [rdi+110h]
jg loc_27A11
mov rbx, rdi
call _ZL30ggml_backend_sched_split_graphP18ggml_backend_schedP11ggml_cgraph; ggml_backend_sched_split_graph(ggml_backend_sched *,ggml_cgraph *)
movsxd rax, dword ptr [rbx+15Ch]
test rax, rax
jle short loc_27915
mov rcx, [rbx+138h]
mov rdx, [rbx+148h]
xor esi, esi
loc_278EE:
movsxd rdi, dword ptr [rcx+rsi*4]
movsxd r8, dword ptr [rdx+rsi*4]
cmp edi, r8d
jz short loc_2790D
mov rdi, [rbx+rdi*8+88h]
cmp rdi, [rbx+r8*8+88h]
jnz short loc_27919
loc_2790D:
inc rsi
cmp rax, rsi
jnz short loc_278EE
loc_27915:
xor eax, eax
jmp short loc_2791B
loc_27919:
mov al, 1
loc_2791B:
test al, al
jnz short loc_27966
movsxd rcx, dword ptr [rbx+160h]
test rcx, rcx
jle short loc_27966
mov rdx, [rbx+140h]
mov rsi, [rbx+150h]
xor edi, edi
loc_2793B:
movsxd r8, dword ptr [rdx+rdi*4]
movsxd r9, dword ptr [rsi+rdi*4]
cmp r8d, r9d
jz short loc_2795A
mov r8, [rbx+r8*8+88h]
cmp r8, [rbx+r9*8+88h]
jnz short loc_27964
loc_2795A:
inc rdi
cmp rcx, rdi
jnz short loc_2793B
jmp short loc_27966
loc_27964:
mov al, 1
loc_27966:
lea r14, [rbx+158h]
test al, al
jnz short loc_27987
mov rdi, [rbx+108h]
mov rsi, r14
call _ggml_gallocr_alloc_graph
mov bpl, 1
test al, al
jnz short loc_279FB
loc_27987:
cmp dword ptr [rbx+4], 0
jle short loc_279AC
xor r15d, r15d
loc_27990:
mov rdi, [rbx+r15*8+8]
mov rax, [rdi+30h]
test rax, rax
jz short loc_279A0
call rax
loc_279A0:
inc r15
movsxd rax, dword ptr [rbx+4]
cmp r15, rax
jl short loc_27990
loc_279AC:
mov rdi, [rbx+108h]
mov rdx, [rbx+138h]
mov rcx, [rbx+140h]
mov rsi, r14
call _ggml_gallocr_reserve_n
mov rdi, [rbx+108h]
mov rsi, r14
call _ggml_gallocr_alloc_graph
mov bpl, 1
test al, al
jnz short loc_279FB
lea rsi, aSFailedToAlloc_1; "%s: failed to allocate graph\n"
lea rdx, aGgmlBackendSch_16; "ggml_backend_sched_alloc_splits"
xor ebp, ebp
mov edi, 4
xor eax, eax
call _ggml_log_internal
loc_279FB:
test bpl, bpl
jz short loc_27A04
mov byte ptr [rbx+1], 1
loc_27A04:
mov eax, ebp
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_27A11:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIntSchedHashSe_0; "(int)sched->hash_set.size >= graph->n_n"...
mov esi, 617h
xor eax, eax
call _ggml_abort
| long long ggml_backend_sched_alloc_graph(
long long a1,
long long a2,
__m128 a3,
__m128i a4,
__m128i a5,
__m128i a6,
double a7,
double a8,
__m128i a9,
__m128 a10,
long long a11,
long long a12,
int a13,
int a14)
{
unsigned int v14; // ebp
double v16; // xmm4_8
double v17; // xmm5_8
long long v18; // rax
long long v19; // rcx
long long v20; // rdx
long long v21; // rsi
long long v22; // rdi
long long v23; // r8
char v24; // al
long long v25; // rcx
long long v26; // rdi
long long v27; // r8
long long v28; // r9
long long v29; // r15
long long v30; // rdi
void ( *v31)(long long); // rax
double v32; // xmm4_8
double v33; // xmm5_8
long long v34; // rcx
long long v35; // r8
long long v36; // r9
__m128 v37; // xmm4
__m128 v38; // xmm5
if ( *(_DWORD *)(a2 + 4) + *(_DWORD *)(a2 + 8) > *(_DWORD *)(a1 + 272) )
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp",
1559,
(unsigned int)"GGML_ASSERT(%s) failed",
(unsigned int)"(int)sched->hash_set.size >= graph->n_nodes + graph->n_leafs",
a13,
a14);
ggml_backend_sched_split_graph(a1, a2, *(double *)a3.m128_u64, a4, a5, a6, a7, a8, a9, a10);
v18 = *(int *)(a1 + 348);
if ( v18 <= 0 )
{
LABEL_7:
v24 = 0;
}
else
{
v19 = *(_QWORD *)(a1 + 312);
v20 = *(_QWORD *)(a1 + 328);
v21 = 0LL;
while ( 1 )
{
v22 = *(int *)(v19 + 4 * v21);
v23 = *(int *)(v20 + 4 * v21);
if ( (_DWORD)v22 != (_DWORD)v23 && *(_QWORD *)(a1 + 8 * v22 + 136) != *(_QWORD *)(a1 + 8 * v23 + 136) )
break;
if ( v18 == ++v21 )
goto LABEL_7;
}
v24 = 1;
}
if ( !v24 )
{
v25 = *(int *)(a1 + 352);
if ( v25 > 0 )
{
v26 = 0LL;
while ( 1 )
{
v27 = *(int *)(*(_QWORD *)(a1 + 320) + 4 * v26);
v28 = *(int *)(*(_QWORD *)(a1 + 336) + 4 * v26);
if ( (_DWORD)v27 != (_DWORD)v28 && *(_QWORD *)(a1 + 8 * v27 + 136) != *(_QWORD *)(a1 + 8 * v28 + 136) )
break;
if ( v25 == ++v26 )
goto LABEL_17;
}
v24 = 1;
}
}
LABEL_17:
if ( v24
|| (LOBYTE(v14) = 1,
!(unsigned __int8)ggml_gallocr_alloc_graph(
*(__m128 **)(a1 + 264),
a1 + 344,
a3,
(__m128)a4,
(__m128)a5,
(__m128)a6,
v16,
v17,
(__m128)a9,
a10)) )
{
if ( *(int *)(a1 + 4) > 0 )
{
v29 = 0LL;
do
{
v30 = *(_QWORD *)(a1 + 8 * v29 + 8);
v31 = *(void ( **)(long long))(v30 + 48);
if ( v31 )
v31(v30);
++v29;
}
while ( v29 < *(int *)(a1 + 4) );
}
ggml_gallocr_reserve_n(
*(__m128 **)(a1 + 264),
a1 + 344,
*(_QWORD *)(a1 + 312),
*(_QWORD *)(a1 + 320),
a3,
(__m128)a4,
(__m128)a5,
(__m128)a6,
v16,
v17,
(__m128)a9,
a10);
LOBYTE(v14) = 1;
if ( !(unsigned __int8)ggml_gallocr_alloc_graph(
*(__m128 **)(a1 + 264),
a1 + 344,
a3,
(__m128)a4,
(__m128)a5,
(__m128)a6,
v32,
v33,
(__m128)a9,
a10) )
{
v14 = 0;
ggml_log_internal(
4u,
(long long)"%s: failed to allocate graph\n",
(long long)"ggml_backend_sched_alloc_splits",
v34,
v35,
v36,
a3,
(__m128)a4,
(__m128)a5,
(__m128)a6,
v37,
v38,
(__m128)a9,
a10);
}
}
if ( (_BYTE)v14 )
*(_BYTE *)(a1 + 1) = 1;
return v14;
}
| ggml_backend_sched_alloc_graph:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EAX,dword ptr [RSI + 0x8]
ADD EAX,dword ptr [RSI + 0x4]
CMP EAX,dword ptr [RDI + 0x110]
JG 0x00127a11
MOV RBX,RDI
CALL 0x0012639b
MOVSXD RAX,dword ptr [RBX + 0x15c]
TEST RAX,RAX
JLE 0x00127915
MOV RCX,qword ptr [RBX + 0x138]
MOV RDX,qword ptr [RBX + 0x148]
XOR ESI,ESI
LAB_001278ee:
MOVSXD RDI,dword ptr [RCX + RSI*0x4]
MOVSXD R8,dword ptr [RDX + RSI*0x4]
CMP EDI,R8D
JZ 0x0012790d
MOV RDI,qword ptr [RBX + RDI*0x8 + 0x88]
CMP RDI,qword ptr [RBX + R8*0x8 + 0x88]
JNZ 0x00127919
LAB_0012790d:
INC RSI
CMP RAX,RSI
JNZ 0x001278ee
LAB_00127915:
XOR EAX,EAX
JMP 0x0012791b
LAB_00127919:
MOV AL,0x1
LAB_0012791b:
TEST AL,AL
JNZ 0x00127966
MOVSXD RCX,dword ptr [RBX + 0x160]
TEST RCX,RCX
JLE 0x00127966
MOV RDX,qword ptr [RBX + 0x140]
MOV RSI,qword ptr [RBX + 0x150]
XOR EDI,EDI
LAB_0012793b:
MOVSXD R8,dword ptr [RDX + RDI*0x4]
MOVSXD R9,dword ptr [RSI + RDI*0x4]
CMP R8D,R9D
JZ 0x0012795a
MOV R8,qword ptr [RBX + R8*0x8 + 0x88]
CMP R8,qword ptr [RBX + R9*0x8 + 0x88]
JNZ 0x00127964
LAB_0012795a:
INC RDI
CMP RCX,RDI
JNZ 0x0012793b
JMP 0x00127966
LAB_00127964:
MOV AL,0x1
LAB_00127966:
LEA R14,[RBX + 0x158]
TEST AL,AL
JNZ 0x00127987
MOV RDI,qword ptr [RBX + 0x108]
MOV RSI,R14
CALL 0x00117870
MOV BPL,0x1
TEST AL,AL
JNZ 0x001279fb
LAB_00127987:
CMP dword ptr [RBX + 0x4],0x0
JLE 0x001279ac
XOR R15D,R15D
LAB_00127990:
MOV RDI,qword ptr [RBX + R15*0x8 + 0x8]
MOV RAX,qword ptr [RDI + 0x30]
TEST RAX,RAX
JZ 0x001279a0
CALL RAX
LAB_001279a0:
INC R15
MOVSXD RAX,dword ptr [RBX + 0x4]
CMP R15,RAX
JL 0x00127990
LAB_001279ac:
MOV RDI,qword ptr [RBX + 0x108]
MOV RDX,qword ptr [RBX + 0x138]
MOV RCX,qword ptr [RBX + 0x140]
MOV RSI,R14
CALL 0x00117460
MOV RDI,qword ptr [RBX + 0x108]
MOV RSI,R14
CALL 0x00117870
MOV BPL,0x1
TEST AL,AL
JNZ 0x001279fb
LEA RSI,[0x14dc40]
LEA RDX,[0x14dc5e]
XOR EBP,EBP
MOV EDI,0x4
XOR EAX,EAX
CALL 0x001167f0
LAB_001279fb:
TEST BPL,BPL
JZ 0x00127a04
MOV byte ptr [RBX + 0x1],0x1
LAB_00127a04:
MOV EAX,EBP
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00127a11:
LEA RDI,[0x14d362]
LEA RDX,[0x14a65a]
LEA RCX,[0x14d7c6]
MOV ESI,0x617
XOR EAX,EAX
CALL 0x00117c70
|
int4 ggml_backend_sched_alloc_graph(ggml_backend_sched *param_1,ggml_cgraph *param_2)
{
ggml_backend_sched *pgVar1;
int iVar2;
int iVar3;
bool bVar4;
char cVar5;
int4 uVar6;
int8 unaff_RBP;
long lVar7;
if (*(int *)(param_1 + 0x110) < *(int *)(param_2 + 8) + *(int *)(param_2 + 4)) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp"
,0x617,"GGML_ASSERT(%s) failed",
"(int)sched->hash_set.size >= graph->n_nodes + graph->n_leafs");
}
ggml_backend_sched_split_graph(param_1,param_2);
if (0 < (long)*(int *)(param_1 + 0x15c)) {
lVar7 = 0;
do {
iVar2 = *(int *)(*(long *)(param_1 + 0x138) + lVar7 * 4);
iVar3 = *(int *)(*(long *)(param_1 + 0x148) + lVar7 * 4);
if ((iVar2 != iVar3) &&
(*(long *)(param_1 + (long)iVar2 * 8 + 0x88) != *(long *)(param_1 + (long)iVar3 * 8 + 0x88)
)) {
bVar4 = true;
goto LAB_0012791b;
}
lVar7 = lVar7 + 1;
} while (*(int *)(param_1 + 0x15c) != lVar7);
}
bVar4 = false;
LAB_0012791b:
if ((!bVar4) && (0 < (long)*(int *)(param_1 + 0x160))) {
lVar7 = 0;
do {
iVar2 = *(int *)(*(long *)(param_1 + 0x140) + lVar7 * 4);
iVar3 = *(int *)(*(long *)(param_1 + 0x150) + lVar7 * 4);
if ((iVar2 != iVar3) &&
(*(long *)(param_1 + (long)iVar2 * 8 + 0x88) != *(long *)(param_1 + (long)iVar3 * 8 + 0x88)
)) {
bVar4 = true;
break;
}
lVar7 = lVar7 + 1;
} while (*(int *)(param_1 + 0x160) != lVar7);
}
pgVar1 = param_1 + 0x158;
if (!bVar4) {
cVar5 = ggml_gallocr_alloc_graph(*(int8 *)(param_1 + 0x108),pgVar1);
unaff_RBP = CONCAT71((int7)((ulong)unaff_RBP >> 8),1);
uVar6 = (int4)unaff_RBP;
if (cVar5 != '\0') goto LAB_001279fb;
}
if (0 < *(int *)(param_1 + 4)) {
lVar7 = 0;
do {
if (*(code **)(*(long *)(param_1 + lVar7 * 8 + 8) + 0x30) != (code *)0x0) {
(**(code **)(*(long *)(param_1 + lVar7 * 8 + 8) + 0x30))();
}
lVar7 = lVar7 + 1;
} while (lVar7 < *(int *)(param_1 + 4));
}
ggml_gallocr_reserve_n
(*(int8 *)(param_1 + 0x108),pgVar1,*(int8 *)(param_1 + 0x138),
*(int8 *)(param_1 + 0x140));
cVar5 = ggml_gallocr_alloc_graph(*(int8 *)(param_1 + 0x108),pgVar1);
uVar6 = (int4)CONCAT71((int7)((ulong)unaff_RBP >> 8),1);
if (cVar5 == '\0') {
uVar6 = 0;
ggml_log_internal(4,"%s: failed to allocate graph\n","ggml_backend_sched_alloc_splits");
}
LAB_001279fb:
if ((char)uVar6 != '\0') {
param_1[1] = (ggml_backend_sched)0x1;
}
return uVar6;
}
| |
54,618 | ggml_backend_sched_alloc_graph | ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp | bool ggml_backend_sched_alloc_graph(ggml_backend_sched_t sched, struct ggml_cgraph * graph) {
GGML_ASSERT((int)sched->hash_set.size >= graph->n_nodes + graph->n_leafs);
ggml_backend_sched_split_graph(sched, graph);
if (!ggml_backend_sched_alloc_splits(sched)) {
return false;
}
sched->is_alloc = true;
return true;
} | O2 | cpp | ggml_backend_sched_alloc_graph:
pushq %r14
pushq %rbx
pushq %rax
movl 0x8(%rsi), %eax
addl 0x4(%rsi), %eax
cmpl 0x110(%rdi), %eax
jg 0x2c774
movq %rdi, %rbx
callq 0x2b35d
movl 0x15c(%rbx), %eax
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
cmpq %rcx, %rax
je 0x2c6aa
movq 0x138(%rbx), %rdx
movq 0x148(%rbx), %rsi
movslq (%rdx,%rcx,4), %rdx
movslq (%rsi,%rcx,4), %rsi
cmpl %esi, %edx
je 0x2c6a5
movq 0x88(%rbx,%rdx,8), %rdx
cmpq 0x88(%rbx,%rsi,8), %rdx
jne 0x2c709
incq %rcx
jmp 0x2c674
leaq 0x158(%rbx), %r14
movl 0x160(%rbx), %eax
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
cmpq %rcx, %rax
je 0x2c6f4
movq 0x140(%rbx), %rdx
movq 0x150(%rbx), %rsi
movslq (%rdx,%rcx,4), %rdx
movslq (%rsi,%rcx,4), %rsi
cmpl %esi, %edx
je 0x2c6ef
movq 0x88(%rbx,%rdx,8), %rdx
cmpq 0x88(%rbx,%rsi,8), %rdx
jne 0x2c710
incq %rcx
jmp 0x2c6be
movq 0x108(%rbx), %rdi
movq %r14, %rsi
callq 0x1e1f0
testb %al, %al
je 0x2c710
jmp 0x2c748
leaq 0x158(%rbx), %r14
movq %rbx, %rdi
callq 0x1de10
movq 0x108(%rbx), %rdi
movq 0x138(%rbx), %rdx
movq 0x140(%rbx), %rcx
movq %r14, %rsi
callq 0x1dc20
movq 0x108(%rbx), %rdi
movq %r14, %rsi
callq 0x1e1f0
testb %al, %al
je 0x2c750
movb $0x1, 0x1(%rbx)
movb $0x1, %bl
jmp 0x2c76a
leaq 0x22459(%rip), %rsi # 0x4ebb0
leaq 0x22470(%rip), %rdx # 0x4ebce
xorl %ebx, %ebx
pushq $0x4
popq %rdi
xorl %eax, %eax
callq 0x1cad0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x21b57(%rip), %rdi # 0x4e2d2
leaq 0x1ee4c(%rip), %rdx # 0x4b5ce
leaq 0x21fad(%rip), %rcx # 0x4e736
movl $0x617, %esi # imm = 0x617
xorl %eax, %eax
callq 0x1e770
| ggml_backend_sched_alloc_graph:
push r14
push rbx
push rax
mov eax, [rsi+8]
add eax, [rsi+4]
cmp eax, [rdi+110h]
jg loc_2C774
mov rbx, rdi
call _ZL30ggml_backend_sched_split_graphP18ggml_backend_schedP11ggml_cgraph; ggml_backend_sched_split_graph(ggml_backend_sched *,ggml_cgraph *)
mov eax, [rbx+15Ch]
xor ecx, ecx
test eax, eax
cmovle eax, ecx
loc_2C674:
cmp rax, rcx
jz short loc_2C6AA
mov rdx, [rbx+138h]
mov rsi, [rbx+148h]
movsxd rdx, dword ptr [rdx+rcx*4]
movsxd rsi, dword ptr [rsi+rcx*4]
cmp edx, esi
jz short loc_2C6A5
mov rdx, [rbx+rdx*8+88h]
cmp rdx, [rbx+rsi*8+88h]
jnz short loc_2C709
loc_2C6A5:
inc rcx
jmp short loc_2C674
loc_2C6AA:
lea r14, [rbx+158h]
mov eax, [rbx+160h]
xor ecx, ecx
test eax, eax
cmovle eax, ecx
loc_2C6BE:
cmp rax, rcx
jz short loc_2C6F4
mov rdx, [rbx+140h]
mov rsi, [rbx+150h]
movsxd rdx, dword ptr [rdx+rcx*4]
movsxd rsi, dword ptr [rsi+rcx*4]
cmp edx, esi
jz short loc_2C6EF
mov rdx, [rbx+rdx*8+88h]
cmp rdx, [rbx+rsi*8+88h]
jnz short loc_2C710
loc_2C6EF:
inc rcx
jmp short loc_2C6BE
loc_2C6F4:
mov rdi, [rbx+108h]
mov rsi, r14
call _ggml_gallocr_alloc_graph
test al, al
jz short loc_2C710
jmp short loc_2C748
loc_2C709:
lea r14, [rbx+158h]
loc_2C710:
mov rdi, rbx
call _ggml_backend_sched_synchronize
mov rdi, [rbx+108h]
mov rdx, [rbx+138h]
mov rcx, [rbx+140h]
mov rsi, r14
call _ggml_gallocr_reserve_n
mov rdi, [rbx+108h]
mov rsi, r14
call _ggml_gallocr_alloc_graph
test al, al
jz short loc_2C750
loc_2C748:
mov byte ptr [rbx+1], 1
mov bl, 1
jmp short loc_2C76A
loc_2C750:
lea rsi, aSFailedToAlloc_1; "%s: failed to allocate graph\n"
lea rdx, aGgmlBackendSch_16; "ggml_backend_sched_alloc_splits"
xor ebx, ebx
push 4
pop rdi
xor eax, eax
call _ggml_log_internal
loc_2C76A:
mov eax, ebx
add rsp, 8
pop rbx
pop r14
retn
loc_2C774:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIntSchedHashSe_0; "(int)sched->hash_set.size >= graph->n_n"...
mov esi, 617h
xor eax, eax
call _ggml_abort
| long long ggml_backend_sched_alloc_graph(
long long a1,
long long a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
long long a11,
long long a12,
long long a13,
long long a14)
{
char v14; // al
unsigned int v15; // ebx
double v16; // xmm4_8
double v17; // xmm5_8
long long v18; // rax
long long v19; // rcx
long long v20; // rdx
long long v21; // rsi
long long v22; // r14
long long v23; // rax
long long v24; // rcx
long long v25; // rdx
long long v26; // rsi
double v27; // xmm4_8
double v28; // xmm5_8
double v29; // xmm4_8
double v30; // xmm5_8
long long v31; // rcx
long long v32; // r8
long long v33; // r9
__m128 v34; // xmm4
__m128 v35; // xmm5
if ( *(_DWORD *)(a2 + 4) + *(_DWORD *)(a2 + 8) > *(_DWORD *)(a1 + 272) )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp",
1559,
(long long)"GGML_ASSERT(%s) failed",
(long long)"(int)sched->hash_set.size >= graph->n_nodes + graph->n_leafs",
a13,
a14,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
v14);
v15 = a1;
ggml_backend_sched_split_graph(
a1,
a2,
*(double *)a3.m128_u64,
a4,
a5,
(__m128i)a6,
*(double *)a7.m128_u64,
*(double *)a8.m128_u64,
a9,
a10);
v18 = *(unsigned int *)(a1 + 348);
v19 = 0LL;
if ( (int)v18 <= 0 )
v18 = 0LL;
while ( v18 != v19 )
{
v20 = *(int *)(*(_QWORD *)(a1 + 312) + 4 * v19);
v21 = *(int *)(*(_QWORD *)(a1 + 328) + 4 * v19);
if ( (_DWORD)v20 != (_DWORD)v21 && *(_QWORD *)(a1 + 8 * v20 + 136) != *(_QWORD *)(a1 + 8 * v21 + 136) )
{
v22 = a1 + 344;
goto LABEL_17;
}
++v19;
}
v22 = a1 + 344;
v23 = *(unsigned int *)(a1 + 352);
v24 = 0LL;
if ( (int)v23 <= 0 )
v23 = 0LL;
while ( v23 != v24 )
{
v25 = *(int *)(*(_QWORD *)(a1 + 320) + 4 * v24);
v26 = *(int *)(*(_QWORD *)(a1 + 336) + 4 * v24);
if ( (_DWORD)v25 != (_DWORD)v26 && *(_QWORD *)(a1 + 8 * v25 + 136) != *(_QWORD *)(a1 + 8 * v26 + 136) )
goto LABEL_17;
++v24;
}
if ( ggml_gallocr_alloc_graph(*(__m128 **)(a1 + 264), a1 + 344, a3, a4, a5, a6, v16, v17, a9, a10) )
{
LABEL_18:
*(_BYTE *)(a1 + 1) = 1;
LOBYTE(v15) = 1;
return v15;
}
LABEL_17:
*(double *)a3.m128_u64 = ggml_backend_sched_synchronize(a1);
ggml_gallocr_reserve_n(
*(__m128 **)(a1 + 264),
v22,
*(_QWORD *)(a1 + 312),
*(_QWORD *)(a1 + 320),
a3,
a4,
a5,
a6,
v27,
v28,
a9,
a10);
if ( ggml_gallocr_alloc_graph(*(__m128 **)(a1 + 264), v22, a3, a4, a5, a6, v29, v30, a9, a10) )
goto LABEL_18;
v15 = 0;
ggml_log_internal(
a3,
a4,
a5,
a6,
v34,
v35,
a9,
a10,
4LL,
(long long)"%s: failed to allocate graph\n",
(long long)"ggml_backend_sched_alloc_splits",
v31,
v32,
v33);
return v15;
}
| ggml_backend_sched_alloc_graph:
PUSH R14
PUSH RBX
PUSH RAX
MOV EAX,dword ptr [RSI + 0x8]
ADD EAX,dword ptr [RSI + 0x4]
CMP EAX,dword ptr [RDI + 0x110]
JG 0x0012c774
MOV RBX,RDI
CALL 0x0012b35d
MOV EAX,dword ptr [RBX + 0x15c]
XOR ECX,ECX
TEST EAX,EAX
CMOVLE EAX,ECX
LAB_0012c674:
CMP RAX,RCX
JZ 0x0012c6aa
MOV RDX,qword ptr [RBX + 0x138]
MOV RSI,qword ptr [RBX + 0x148]
MOVSXD RDX,dword ptr [RDX + RCX*0x4]
MOVSXD RSI,dword ptr [RSI + RCX*0x4]
CMP EDX,ESI
JZ 0x0012c6a5
MOV RDX,qword ptr [RBX + RDX*0x8 + 0x88]
CMP RDX,qword ptr [RBX + RSI*0x8 + 0x88]
JNZ 0x0012c709
LAB_0012c6a5:
INC RCX
JMP 0x0012c674
LAB_0012c6aa:
LEA R14,[RBX + 0x158]
MOV EAX,dword ptr [RBX + 0x160]
XOR ECX,ECX
TEST EAX,EAX
CMOVLE EAX,ECX
LAB_0012c6be:
CMP RAX,RCX
JZ 0x0012c6f4
MOV RDX,qword ptr [RBX + 0x140]
MOV RSI,qword ptr [RBX + 0x150]
MOVSXD RDX,dword ptr [RDX + RCX*0x4]
MOVSXD RSI,dword ptr [RSI + RCX*0x4]
CMP EDX,ESI
JZ 0x0012c6ef
MOV RDX,qword ptr [RBX + RDX*0x8 + 0x88]
CMP RDX,qword ptr [RBX + RSI*0x8 + 0x88]
JNZ 0x0012c710
LAB_0012c6ef:
INC RCX
JMP 0x0012c6be
LAB_0012c6f4:
MOV RDI,qword ptr [RBX + 0x108]
MOV RSI,R14
CALL 0x0011e1f0
TEST AL,AL
JZ 0x0012c710
JMP 0x0012c748
LAB_0012c709:
LEA R14,[RBX + 0x158]
LAB_0012c710:
MOV RDI,RBX
CALL 0x0011de10
MOV RDI,qword ptr [RBX + 0x108]
MOV RDX,qword ptr [RBX + 0x138]
MOV RCX,qword ptr [RBX + 0x140]
MOV RSI,R14
CALL 0x0011dc20
MOV RDI,qword ptr [RBX + 0x108]
MOV RSI,R14
CALL 0x0011e1f0
TEST AL,AL
JZ 0x0012c750
LAB_0012c748:
MOV byte ptr [RBX + 0x1],0x1
MOV BL,0x1
JMP 0x0012c76a
LAB_0012c750:
LEA RSI,[0x14ebb0]
LEA RDX,[0x14ebce]
XOR EBX,EBX
PUSH 0x4
POP RDI
XOR EAX,EAX
CALL 0x0011cad0
LAB_0012c76a:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_0012c774:
LEA RDI,[0x14e2d2]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14e736]
MOV ESI,0x617
XOR EAX,EAX
CALL 0x0011e770
|
ulong ggml_backend_sched_alloc_graph(ggml_backend_sched *param_1,ggml_cgraph *param_2)
{
int iVar1;
int iVar2;
char cVar3;
ulong uVar4;
ulong uVar5;
if (*(int *)(param_1 + 0x110) < *(int *)(param_2 + 8) + *(int *)(param_2 + 4)) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp"
,0x617,"GGML_ASSERT(%s) failed",
"(int)sched->hash_set.size >= graph->n_nodes + graph->n_leafs");
}
ggml_backend_sched_split_graph(param_1,param_2);
uVar5 = 0;
uVar4 = (ulong)*(uint *)(param_1 + 0x15c);
if ((int)*(uint *)(param_1 + 0x15c) < 1) {
uVar4 = uVar5;
}
for (; uVar4 != uVar5; uVar5 = uVar5 + 1) {
iVar1 = *(int *)(*(long *)(param_1 + 0x138) + uVar5 * 4);
iVar2 = *(int *)(*(long *)(param_1 + 0x148) + uVar5 * 4);
if ((iVar1 != iVar2) &&
(*(long *)(param_1 + (long)iVar1 * 8 + 0x88) != *(long *)(param_1 + (long)iVar2 * 8 + 0x88)))
goto LAB_0012c710;
}
uVar5 = 0;
uVar4 = (ulong)*(uint *)(param_1 + 0x160);
if ((int)*(uint *)(param_1 + 0x160) < 1) {
uVar4 = uVar5;
}
for (; uVar4 != uVar5; uVar5 = uVar5 + 1) {
iVar1 = *(int *)(*(long *)(param_1 + 0x140) + uVar5 * 4);
iVar2 = *(int *)(*(long *)(param_1 + 0x150) + uVar5 * 4);
if ((iVar1 != iVar2) &&
(*(long *)(param_1 + (long)iVar1 * 8 + 0x88) != *(long *)(param_1 + (long)iVar2 * 8 + 0x88)))
goto LAB_0012c710;
}
cVar3 = ggml_gallocr_alloc_graph(*(int8 *)(param_1 + 0x108),param_1 + 0x158);
if (cVar3 == '\0') {
LAB_0012c710:
ggml_backend_sched_synchronize(param_1);
ggml_gallocr_reserve_n
(*(int8 *)(param_1 + 0x108),param_1 + 0x158,*(int8 *)(param_1 + 0x138),
*(int8 *)(param_1 + 0x140));
cVar3 = ggml_gallocr_alloc_graph(*(int8 *)(param_1 + 0x108),param_1 + 0x158);
if (cVar3 == '\0') {
uVar4 = 0;
ggml_log_internal(4,"%s: failed to allocate graph\n","ggml_backend_sched_alloc_splits");
goto LAB_0012c76a;
}
}
param_1[1] = (ggml_backend_sched)0x1;
uVar4 = CONCAT71((int7)((ulong)param_1 >> 8),1);
LAB_0012c76a:
return uVar4 & 0xffffffff;
}
| |
54,619 | ggml_backend_sched_alloc_graph | ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp | bool ggml_backend_sched_alloc_graph(ggml_backend_sched_t sched, struct ggml_cgraph * graph) {
GGML_ASSERT((int)sched->hash_set.size >= graph->n_nodes + graph->n_leafs);
ggml_backend_sched_split_graph(sched, graph);
if (!ggml_backend_sched_alloc_splits(sched)) {
return false;
}
sched->is_alloc = true;
return true;
} | O3 | cpp | ggml_backend_sched_alloc_graph:
pushq %r15
pushq %r14
pushq %rbx
movl 0x8(%rsi), %eax
addl 0x4(%rsi), %eax
cmpl 0x110(%rdi), %eax
jg 0x279fa
movq %rdi, %rbx
callq 0x262fe
movslq 0x15c(%rbx), %rax
testq %rax, %rax
jle 0x27910
movq 0x138(%rbx), %rcx
movq 0x148(%rbx), %rdx
xorl %esi, %esi
movslq (%rcx,%rsi,4), %rdi
movslq (%rdx,%rsi,4), %r8
cmpl %r8d, %edi
je 0x27908
movq 0x88(%rbx,%rdi,8), %rdi
cmpq 0x88(%rbx,%r8,8), %rdi
jne 0x2796f
incq %rsi
cmpq %rsi, %rax
jne 0x278e9
leaq 0x158(%rbx), %r14
movslq 0x160(%rbx), %rax
testq %rax, %rax
jle 0x2795a
movq 0x140(%rbx), %rcx
movq 0x150(%rbx), %rdx
xorl %esi, %esi
movslq (%rcx,%rsi,4), %rdi
movslq (%rdx,%rsi,4), %r8
cmpl %r8d, %edi
je 0x27952
movq 0x88(%rbx,%rdi,8), %rdi
cmpq 0x88(%rbx,%r8,8), %rdi
jne 0x27976
incq %rsi
cmpq %rsi, %rax
jne 0x27933
movq 0x108(%rbx), %rdi
movq %r14, %rsi
callq 0x17860
testb %al, %al
je 0x27976
jmp 0x279ce
leaq 0x158(%rbx), %r14
movl 0x4(%rbx), %eax
testl %eax, %eax
jle 0x2799e
xorl %r15d, %r15d
movq 0x8(%rbx,%r15,8), %rdi
movq 0x30(%rdi), %rcx
testq %rcx, %rcx
je 0x27993
callq *%rcx
movl 0x4(%rbx), %eax
incq %r15
movslq %eax, %rcx
cmpq %rcx, %r15
jl 0x27980
movq 0x108(%rbx), %rdi
movq 0x138(%rbx), %rdx
movq 0x140(%rbx), %rcx
movq %r14, %rsi
callq 0x17450
movq 0x108(%rbx), %rdi
movq %r14, %rsi
callq 0x17860
testb %al, %al
je 0x279d6
movb $0x1, 0x1(%rbx)
movb $0x1, %bl
jmp 0x279f2
leaq 0x26263(%rip), %rsi # 0x4dc40
leaq 0x2627a(%rip), %rdx # 0x4dc5e
xorl %ebx, %ebx
movl $0x4, %edi
xorl %eax, %eax
callq 0x167f0
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x25961(%rip), %rdi # 0x4d362
leaq 0x22c56(%rip), %rdx # 0x4a65e
leaq 0x25db7(%rip), %rcx # 0x4d7c6
movl $0x617, %esi # imm = 0x617
xorl %eax, %eax
callq 0x17c60
| ggml_backend_sched_alloc_graph:
push r15
push r14
push rbx
mov eax, [rsi+8]
add eax, [rsi+4]
cmp eax, [rdi+110h]
jg loc_279FA
mov rbx, rdi
call _ZL30ggml_backend_sched_split_graphP18ggml_backend_schedP11ggml_cgraph; ggml_backend_sched_split_graph(ggml_backend_sched *,ggml_cgraph *)
movsxd rax, dword ptr [rbx+15Ch]
test rax, rax
jle short loc_27910
mov rcx, [rbx+138h]
mov rdx, [rbx+148h]
xor esi, esi
loc_278E9:
movsxd rdi, dword ptr [rcx+rsi*4]
movsxd r8, dword ptr [rdx+rsi*4]
cmp edi, r8d
jz short loc_27908
mov rdi, [rbx+rdi*8+88h]
cmp rdi, [rbx+r8*8+88h]
jnz short loc_2796F
loc_27908:
inc rsi
cmp rax, rsi
jnz short loc_278E9
loc_27910:
lea r14, [rbx+158h]
movsxd rax, dword ptr [rbx+160h]
test rax, rax
jle short loc_2795A
mov rcx, [rbx+140h]
mov rdx, [rbx+150h]
xor esi, esi
loc_27933:
movsxd rdi, dword ptr [rcx+rsi*4]
movsxd r8, dword ptr [rdx+rsi*4]
cmp edi, r8d
jz short loc_27952
mov rdi, [rbx+rdi*8+88h]
cmp rdi, [rbx+r8*8+88h]
jnz short loc_27976
loc_27952:
inc rsi
cmp rax, rsi
jnz short loc_27933
loc_2795A:
mov rdi, [rbx+108h]
mov rsi, r14
call _ggml_gallocr_alloc_graph
test al, al
jz short loc_27976
jmp short loc_279CE
loc_2796F:
lea r14, [rbx+158h]
loc_27976:
mov eax, [rbx+4]
test eax, eax
jle short loc_2799E
xor r15d, r15d
loc_27980:
mov rdi, [rbx+r15*8+8]
mov rcx, [rdi+30h]
test rcx, rcx
jz short loc_27993
call rcx
mov eax, [rbx+4]
loc_27993:
inc r15
movsxd rcx, eax
cmp r15, rcx
jl short loc_27980
loc_2799E:
mov rdi, [rbx+108h]
mov rdx, [rbx+138h]
mov rcx, [rbx+140h]
mov rsi, r14
call _ggml_gallocr_reserve_n
mov rdi, [rbx+108h]
mov rsi, r14
call _ggml_gallocr_alloc_graph
test al, al
jz short loc_279D6
loc_279CE:
mov byte ptr [rbx+1], 1
mov bl, 1
jmp short loc_279F2
loc_279D6:
lea rsi, aSFailedToAlloc_1; "%s: failed to allocate graph\n"
lea rdx, aGgmlBackendSch_16; "ggml_backend_sched_alloc_splits"
xor ebx, ebx
mov edi, 4
xor eax, eax
call _ggml_log_internal
loc_279F2:
mov eax, ebx
pop rbx
pop r14
pop r15
retn
loc_279FA:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIntSchedHashSe_0; "(int)sched->hash_set.size >= graph->n_n"...
mov esi, 617h
xor eax, eax
call _ggml_abort
| long long ggml_backend_sched_alloc_graph(
long long a1,
long long a2,
__m128 a3,
__m128i a4,
__m128i a5,
__m128i a6,
double a7,
double a8,
__m128i a9,
__m128 a10,
long long a11,
long long a12,
int a13,
int a14)
{
long long v14; // rbx
double v15; // xmm4_8
double v16; // xmm5_8
long long v17; // rax
long long v18; // rcx
long long v19; // rdx
long long v20; // rsi
long long v21; // rdi
long long v22; // r8
long long v23; // r14
long long v24; // rax
long long v25; // rsi
long long v26; // rdi
long long v27; // r8
int v28; // eax
long long i; // r15
void (*v30)(void); // rcx
double v31; // xmm4_8
double v32; // xmm5_8
long long v33; // rcx
long long v34; // r8
long long v35; // r9
__m128 v36; // xmm4
__m128 v37; // xmm5
if ( *(_DWORD *)(a2 + 4) + *(_DWORD *)(a2 + 8) > *(_DWORD *)(a1 + 272) )
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp",
1559,
(unsigned int)"GGML_ASSERT(%s) failed",
(unsigned int)"(int)sched->hash_set.size >= graph->n_nodes + graph->n_leafs",
a13,
a14);
v14 = a1;
ggml_backend_sched_split_graph(a1, a2, *(double *)a3.m128_u64, a4, a5, a6, a7, a8, a9, a10);
v17 = *(int *)(a1 + 348);
if ( v17 <= 0 )
{
LABEL_7:
v23 = v14 + 344;
v24 = *(int *)(v14 + 352);
if ( v24 <= 0 )
{
LABEL_12:
if ( (unsigned __int8)ggml_gallocr_alloc_graph(
*(__m128 **)(v14 + 264),
v14 + 344,
a3,
(__m128)a4,
(__m128)a5,
(__m128)a6,
v15,
v16,
(__m128)a9,
a10) )
goto LABEL_21;
}
else
{
v25 = 0LL;
while ( 1 )
{
v26 = *(int *)(*(_QWORD *)(v14 + 320) + 4 * v25);
v27 = *(int *)(*(_QWORD *)(v14 + 336) + 4 * v25);
if ( (_DWORD)v26 != (_DWORD)v27 && *(_QWORD *)(v14 + 8 * v26 + 136) != *(_QWORD *)(v14 + 8 * v27 + 136) )
break;
if ( v24 == ++v25 )
goto LABEL_12;
}
}
}
else
{
v18 = *(_QWORD *)(a1 + 312);
v19 = *(_QWORD *)(a1 + 328);
v20 = 0LL;
while ( 1 )
{
v21 = *(int *)(v18 + 4 * v20);
v22 = *(int *)(v19 + 4 * v20);
if ( (_DWORD)v21 != (_DWORD)v22 && *(_QWORD *)(v14 + 8 * v21 + 136) != *(_QWORD *)(v14 + 8 * v22 + 136) )
break;
if ( v17 == ++v20 )
goto LABEL_7;
}
v23 = v14 + 344;
}
v28 = *(_DWORD *)(v14 + 4);
if ( v28 > 0 )
{
for ( i = 0LL; i < v28; ++i )
{
v30 = *(void (**)(void))(*(_QWORD *)(v14 + 8 * i + 8) + 48LL);
if ( v30 )
{
v30();
v28 = *(_DWORD *)(v14 + 4);
}
}
}
ggml_gallocr_reserve_n(
*(__m128 **)(v14 + 264),
v23,
*(_QWORD *)(v14 + 312),
*(_QWORD *)(v14 + 320),
a3,
(__m128)a4,
(__m128)a5,
(__m128)a6,
v15,
v16,
(__m128)a9,
a10);
if ( !(unsigned __int8)ggml_gallocr_alloc_graph(
*(__m128 **)(v14 + 264),
v23,
a3,
(__m128)a4,
(__m128)a5,
(__m128)a6,
v31,
v32,
(__m128)a9,
a10) )
{
LODWORD(v14) = 0;
ggml_log_internal(
4u,
(long long)"%s: failed to allocate graph\n",
(long long)"ggml_backend_sched_alloc_splits",
v33,
v34,
v35,
a3,
(__m128)a4,
(__m128)a5,
(__m128)a6,
v36,
v37,
(__m128)a9,
a10);
return (unsigned int)v14;
}
LABEL_21:
*(_BYTE *)(v14 + 1) = 1;
LOBYTE(v14) = 1;
return (unsigned int)v14;
}
| ggml_backend_sched_alloc_graph:
PUSH R15
PUSH R14
PUSH RBX
MOV EAX,dword ptr [RSI + 0x8]
ADD EAX,dword ptr [RSI + 0x4]
CMP EAX,dword ptr [RDI + 0x110]
JG 0x001279fa
MOV RBX,RDI
CALL 0x001262fe
MOVSXD RAX,dword ptr [RBX + 0x15c]
TEST RAX,RAX
JLE 0x00127910
MOV RCX,qword ptr [RBX + 0x138]
MOV RDX,qword ptr [RBX + 0x148]
XOR ESI,ESI
LAB_001278e9:
MOVSXD RDI,dword ptr [RCX + RSI*0x4]
MOVSXD R8,dword ptr [RDX + RSI*0x4]
CMP EDI,R8D
JZ 0x00127908
MOV RDI,qword ptr [RBX + RDI*0x8 + 0x88]
CMP RDI,qword ptr [RBX + R8*0x8 + 0x88]
JNZ 0x0012796f
LAB_00127908:
INC RSI
CMP RAX,RSI
JNZ 0x001278e9
LAB_00127910:
LEA R14,[RBX + 0x158]
MOVSXD RAX,dword ptr [RBX + 0x160]
TEST RAX,RAX
JLE 0x0012795a
MOV RCX,qword ptr [RBX + 0x140]
MOV RDX,qword ptr [RBX + 0x150]
XOR ESI,ESI
LAB_00127933:
MOVSXD RDI,dword ptr [RCX + RSI*0x4]
MOVSXD R8,dword ptr [RDX + RSI*0x4]
CMP EDI,R8D
JZ 0x00127952
MOV RDI,qword ptr [RBX + RDI*0x8 + 0x88]
CMP RDI,qword ptr [RBX + R8*0x8 + 0x88]
JNZ 0x00127976
LAB_00127952:
INC RSI
CMP RAX,RSI
JNZ 0x00127933
LAB_0012795a:
MOV RDI,qword ptr [RBX + 0x108]
MOV RSI,R14
CALL 0x00117860
TEST AL,AL
JZ 0x00127976
JMP 0x001279ce
LAB_0012796f:
LEA R14,[RBX + 0x158]
LAB_00127976:
MOV EAX,dword ptr [RBX + 0x4]
TEST EAX,EAX
JLE 0x0012799e
XOR R15D,R15D
LAB_00127980:
MOV RDI,qword ptr [RBX + R15*0x8 + 0x8]
MOV RCX,qword ptr [RDI + 0x30]
TEST RCX,RCX
JZ 0x00127993
CALL RCX
MOV EAX,dword ptr [RBX + 0x4]
LAB_00127993:
INC R15
MOVSXD RCX,EAX
CMP R15,RCX
JL 0x00127980
LAB_0012799e:
MOV RDI,qword ptr [RBX + 0x108]
MOV RDX,qword ptr [RBX + 0x138]
MOV RCX,qword ptr [RBX + 0x140]
MOV RSI,R14
CALL 0x00117450
MOV RDI,qword ptr [RBX + 0x108]
MOV RSI,R14
CALL 0x00117860
TEST AL,AL
JZ 0x001279d6
LAB_001279ce:
MOV byte ptr [RBX + 0x1],0x1
MOV BL,0x1
JMP 0x001279f2
LAB_001279d6:
LEA RSI,[0x14dc40]
LEA RDX,[0x14dc5e]
XOR EBX,EBX
MOV EDI,0x4
XOR EAX,EAX
CALL 0x001167f0
LAB_001279f2:
MOV EAX,EBX
POP RBX
POP R14
POP R15
RET
LAB_001279fa:
LEA RDI,[0x14d362]
LEA RDX,[0x14a65e]
LEA RCX,[0x14d7c6]
MOV ESI,0x617
XOR EAX,EAX
CALL 0x00117c60
|
ulong ggml_backend_sched_alloc_graph(ggml_backend_sched *param_1,ggml_cgraph *param_2)
{
int iVar1;
char cVar2;
int iVar3;
ulong uVar4;
long lVar5;
if (*(int *)(param_1 + 0x110) < *(int *)(param_2 + 8) + *(int *)(param_2 + 4)) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp"
,0x617,"GGML_ASSERT(%s) failed",
"(int)sched->hash_set.size >= graph->n_nodes + graph->n_leafs");
}
ggml_backend_sched_split_graph(param_1,param_2);
if (0 < (long)*(int *)(param_1 + 0x15c)) {
lVar5 = 0;
do {
iVar3 = *(int *)(*(long *)(param_1 + 0x138) + lVar5 * 4);
iVar1 = *(int *)(*(long *)(param_1 + 0x148) + lVar5 * 4);
if ((iVar3 != iVar1) &&
(*(long *)(param_1 + (long)iVar3 * 8 + 0x88) != *(long *)(param_1 + (long)iVar1 * 8 + 0x88)
)) goto LAB_00127976;
lVar5 = lVar5 + 1;
} while (*(int *)(param_1 + 0x15c) != lVar5);
}
if (0 < (long)*(int *)(param_1 + 0x160)) {
lVar5 = 0;
do {
iVar3 = *(int *)(*(long *)(param_1 + 0x140) + lVar5 * 4);
iVar1 = *(int *)(*(long *)(param_1 + 0x150) + lVar5 * 4);
if ((iVar3 != iVar1) &&
(*(long *)(param_1 + (long)iVar3 * 8 + 0x88) != *(long *)(param_1 + (long)iVar1 * 8 + 0x88)
)) goto LAB_00127976;
lVar5 = lVar5 + 1;
} while (*(int *)(param_1 + 0x160) != lVar5);
}
cVar2 = ggml_gallocr_alloc_graph(*(int8 *)(param_1 + 0x108),param_1 + 0x158);
if (cVar2 == '\0') {
LAB_00127976:
iVar3 = *(int *)(param_1 + 4);
if (0 < iVar3) {
lVar5 = 0;
do {
if (*(code **)(*(long *)(param_1 + lVar5 * 8 + 8) + 0x30) != (code *)0x0) {
(**(code **)(*(long *)(param_1 + lVar5 * 8 + 8) + 0x30))();
iVar3 = *(int *)(param_1 + 4);
}
lVar5 = lVar5 + 1;
} while (lVar5 < iVar3);
}
ggml_gallocr_reserve_n
(*(int8 *)(param_1 + 0x108),param_1 + 0x158,*(int8 *)(param_1 + 0x138),
*(int8 *)(param_1 + 0x140));
cVar2 = ggml_gallocr_alloc_graph(*(int8 *)(param_1 + 0x108),param_1 + 0x158);
if (cVar2 == '\0') {
uVar4 = 0;
ggml_log_internal(4,"%s: failed to allocate graph\n","ggml_backend_sched_alloc_splits");
goto LAB_001279f2;
}
}
param_1[1] = (ggml_backend_sched)0x1;
uVar4 = CONCAT71((int7)((ulong)param_1 >> 8),1);
LAB_001279f2:
return uVar4 & 0xffffffff;
}
| |
54,620 | find_set_from_flags | eloqsql/mysys/typelib.c | my_ulonglong find_set_from_flags(const TYPELIB *lib, uint default_name,
my_ulonglong cur_set, my_ulonglong default_set,
const char *str, uint length,
char **err_pos, uint *err_len)
{
const char *end= str + length;
my_ulonglong flags_to_set= 0, flags_to_clear= 0, res;
my_bool set_defaults= 0;
*err_pos= 0; /* No error yet */
if (str != end)
{
const char *start= str;
for (;;)
{
const char *pos= start;
uint flag_no, value;
if (!(flag_no= parse_name(lib, &pos, end)))
goto err;
if (flag_no == default_name)
{
/* Using 'default' twice isn't allowed. */
if (set_defaults)
goto err;
set_defaults= TRUE;
}
else
{
my_ulonglong bit= (1ULL << (flag_no - 1));
/* parse the '=on|off|default' */
if ((flags_to_clear | flags_to_set) & bit ||
pos >= end || *pos++ != '=' ||
!(value= parse_name(&on_off_default_typelib, &pos, end)))
goto err;
if (value == 1) /* this is '=off' */
flags_to_clear|= bit;
else if (value == 2) /* this is '=on' */
flags_to_set|= bit;
else /* this is '=default' */
{
if (default_set & bit)
flags_to_set|= bit;
else
flags_to_clear|= bit;
}
}
if (pos >= end)
break;
if (*pos++ != ',')
goto err;
start=pos;
continue;
err:
*err_pos= (char*)start;
*err_len= (uint)(end - start);
break;
}
}
res= set_defaults? default_set : cur_set;
res|= flags_to_set;
res&= ~flags_to_clear;
return res;
} | O0 | c | find_set_from_flags:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq -0x28(%rbp), %rax
movl -0x2c(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movb $0x0, -0x51(%rbp)
movq 0x10(%rbp), %rax
movq $0x0, (%rax)
movq -0x28(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0x807f1
movq -0x28(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rdx
leaq -0x68(%rbp), %rsi
callq 0x80840
movl %eax, -0x6c(%rbp)
cmpl $0x0, %eax
jne 0x806c3
jmp 0x807d1
movl -0x6c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jne 0x806df
cmpb $0x0, -0x51(%rbp)
je 0x806d6
jmp 0x807d1
movb $0x1, -0x51(%rbp)
jmp 0x8079f
movl -0x6c(%rbp), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0x78(%rbp)
movq -0x48(%rbp), %rax
orq -0x40(%rbp), %rax
andq -0x78(%rbp), %rax
cmpq $0x0, %rax
jne 0x80744
movq -0x68(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x80744
movq -0x68(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x68(%rbp)
movsbl (%rax), %eax
cmpl $0x3d, %eax
jne 0x80744
movq -0x38(%rbp), %rdx
leaq 0x1b36ad(%rip), %rdi # 0x233de0
leaq -0x68(%rbp), %rsi
callq 0x80840
movl %eax, -0x70(%rbp)
cmpl $0x0, %eax
jne 0x80749
jmp 0x807d1
cmpl $0x1, -0x70(%rbp)
jne 0x8075d
movq -0x78(%rbp), %rax
orq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x8079d
cmpl $0x2, -0x70(%rbp)
jne 0x80771
movq -0x78(%rbp), %rax
orq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x8079b
movq -0x20(%rbp), %rax
andq -0x78(%rbp), %rax
cmpq $0x0, %rax
je 0x8078d
movq -0x78(%rbp), %rax
orq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x80799
movq -0x78(%rbp), %rax
orq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x8079b
jmp 0x8079d
jmp 0x8079f
movq -0x68(%rbp), %rax
cmpq -0x38(%rbp), %rax
jb 0x807ab
jmp 0x807ef
movq -0x68(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x68(%rbp)
movsbl (%rax), %eax
cmpl $0x2c, %eax
je 0x807c4
jmp 0x807d1
movq -0x68(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x8069d
movq -0x60(%rbp), %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
movq -0x60(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq 0x18(%rbp), %rax
movl %ecx, (%rax)
jmp 0x807f1
movsbl -0x51(%rbp), %eax
cmpl $0x0, %eax
je 0x80804
movq -0x20(%rbp), %rax
movq %rax, -0x80(%rbp)
jmp 0x8080c
movq -0x18(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rax
orq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
xorq $-0x1, %rax
andq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)
| find_set_from_flags:
push rbp
mov rbp, rsp
sub rsp, 80h
mov rax, [rbp+arg_8]
mov rax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_2C], r9d
mov rax, [rbp+var_28]
mov ecx, [rbp+var_2C]
add rax, rcx
mov [rbp+var_38], rax
mov [rbp+var_40], 0
mov [rbp+var_48], 0
mov [rbp+var_51], 0
mov rax, [rbp+arg_0]
mov qword ptr [rax], 0
mov rax, [rbp+var_28]
cmp rax, [rbp+var_38]
jz loc_807F1
mov rax, [rbp+var_28]
mov [rbp+var_60], rax
loc_8069D:
mov rax, [rbp+var_60]
mov [rbp+var_68], rax
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_38]
lea rsi, [rbp+var_68]
call parse_name
mov [rbp+var_6C], eax
cmp eax, 0
jnz short loc_806C3
jmp loc_807D1
loc_806C3:
mov eax, [rbp+var_6C]
cmp eax, [rbp+var_C]
jnz short loc_806DF
cmp [rbp+var_51], 0
jz short loc_806D6
jmp loc_807D1
loc_806D6:
mov [rbp+var_51], 1
jmp loc_8079F
loc_806DF:
mov eax, [rbp+var_6C]
sub eax, 1
mov eax, eax
mov ecx, eax
mov eax, 1
shl rax, cl
mov [rbp+var_78], rax
mov rax, [rbp+var_48]
or rax, [rbp+var_40]
and rax, [rbp+var_78]
cmp rax, 0
jnz short loc_80744
mov rax, [rbp+var_68]
cmp rax, [rbp+var_38]
jnb short loc_80744
mov rax, [rbp+var_68]
mov rcx, rax
add rcx, 1
mov [rbp+var_68], rcx
movsx eax, byte ptr [rax]
cmp eax, 3Dh ; '='
jnz short loc_80744
mov rdx, [rbp+var_38]
lea rdi, on_off_default_typelib
lea rsi, [rbp+var_68]
call parse_name
mov [rbp+var_70], eax
cmp eax, 0
jnz short loc_80749
loc_80744:
jmp loc_807D1
loc_80749:
cmp [rbp+var_70], 1
jnz short loc_8075D
mov rax, [rbp+var_78]
or rax, [rbp+var_48]
mov [rbp+var_48], rax
jmp short loc_8079D
loc_8075D:
cmp [rbp+var_70], 2
jnz short loc_80771
mov rax, [rbp+var_78]
or rax, [rbp+var_40]
mov [rbp+var_40], rax
jmp short loc_8079B
loc_80771:
mov rax, [rbp+var_20]
and rax, [rbp+var_78]
cmp rax, 0
jz short loc_8078D
mov rax, [rbp+var_78]
or rax, [rbp+var_40]
mov [rbp+var_40], rax
jmp short loc_80799
loc_8078D:
mov rax, [rbp+var_78]
or rax, [rbp+var_48]
mov [rbp+var_48], rax
loc_80799:
jmp short $+2
loc_8079B:
jmp short $+2
loc_8079D:
jmp short $+2
loc_8079F:
mov rax, [rbp+var_68]
cmp rax, [rbp+var_38]
jb short loc_807AB
jmp short loc_807EF
loc_807AB:
mov rax, [rbp+var_68]
mov rcx, rax
add rcx, 1
mov [rbp+var_68], rcx
movsx eax, byte ptr [rax]
cmp eax, 2Ch ; ','
jz short loc_807C4
jmp short loc_807D1
loc_807C4:
mov rax, [rbp+var_68]
mov [rbp+var_60], rax
jmp loc_8069D
loc_807D1:
mov rcx, [rbp+var_60]
mov rax, [rbp+arg_0]
mov [rax], rcx
mov rax, [rbp+var_38]
mov rcx, [rbp+var_60]
sub rax, rcx
mov ecx, eax
mov rax, [rbp+arg_8]
mov [rax], ecx
loc_807EF:
jmp short $+2
loc_807F1:
movsx eax, [rbp+var_51]
cmp eax, 0
jz short loc_80804
mov rax, [rbp+var_20]
mov [rbp+var_80], rax
jmp short loc_8080C
loc_80804:
mov rax, [rbp+var_18]
mov [rbp+var_80], rax
loc_8080C:
mov rax, [rbp+var_80]
mov [rbp+var_50], rax
mov rax, [rbp+var_40]
or rax, [rbp+var_50]
mov [rbp+var_50], rax
mov rax, [rbp+var_48]
xor rax, 0FFFFFFFFFFFFFFFFh
and rax, [rbp+var_50]
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
add rsp, 80h
pop rbp
retn
| long long find_set_from_flags(
long long a1,
int a2,
long long a3,
long long a4,
_BYTE *a5,
unsigned int a6,
_QWORD *a7,
_DWORD *a8)
{
_BYTE *v8; // rax
_BYTE *v9; // rax
long long v11; // [rsp+0h] [rbp-80h]
long long v12; // [rsp+8h] [rbp-78h]
int v13; // [rsp+10h] [rbp-70h]
int v14; // [rsp+14h] [rbp-6Ch]
_BYTE *v15; // [rsp+18h] [rbp-68h] BYREF
_BYTE *i; // [rsp+20h] [rbp-60h]
char v17; // [rsp+2Fh] [rbp-51h]
long long v18; // [rsp+38h] [rbp-48h]
long long v19; // [rsp+40h] [rbp-40h]
unsigned long long v20; // [rsp+48h] [rbp-38h]
unsigned int v21; // [rsp+54h] [rbp-2Ch]
_BYTE *v22; // [rsp+58h] [rbp-28h]
long long v23; // [rsp+60h] [rbp-20h]
long long v24; // [rsp+68h] [rbp-18h]
int v25; // [rsp+74h] [rbp-Ch]
long long v26; // [rsp+78h] [rbp-8h]
v26 = a1;
v25 = a2;
v24 = a3;
v23 = a4;
v22 = a5;
v21 = a6;
v20 = (unsigned long long)&a5[a6];
v19 = 0LL;
v18 = 0LL;
v17 = 0;
*a7 = 0LL;
if ( v22 != (_BYTE *)v20 )
{
for ( i = v22; ; i = v15 )
{
v15 = i;
v14 = parse_name(v26, &v15, v20);
if ( !v14 )
break;
if ( v14 == v25 )
{
if ( v17 )
break;
v17 = 1;
}
else
{
v12 = 1LL << ((unsigned __int8)v14 - 1);
if ( (v12 & (v19 | v18)) != 0 )
break;
if ( (unsigned long long)v15 >= v20 )
break;
v8 = v15++;
if ( *v8 != 61 )
break;
v13 = parse_name(&on_off_default_typelib, &v15, v20);
switch ( v13 )
{
case 0:
goto LABEL_22;
case 1:
v18 |= v12;
break;
case 2:
v19 |= v12;
break;
default:
if ( (v12 & v23) != 0 )
v19 |= v12;
else
v18 |= v12;
break;
}
}
if ( (unsigned long long)v15 >= v20 )
goto LABEL_23;
v9 = v15++;
if ( *v9 != 44 )
break;
}
LABEL_22:
*a7 = i;
*a8 = v20 - (_DWORD)i;
}
LABEL_23:
if ( v17 )
v11 = v23;
else
v11 = v24;
return (v11 | v19) & ~v18;
}
| find_set_from_flags:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV RAX,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV dword ptr [RBP + -0x2c],R9D
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RBP + -0x2c]
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV qword ptr [RBP + -0x40],0x0
MOV qword ptr [RBP + -0x48],0x0
MOV byte ptr [RBP + -0x51],0x0
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x38]
JZ 0x001807f1
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x60],RAX
LAB_0018069d:
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x68],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x38]
LEA RSI,[RBP + -0x68]
CALL 0x00180840
MOV dword ptr [RBP + -0x6c],EAX
CMP EAX,0x0
JNZ 0x001806c3
JMP 0x001807d1
LAB_001806c3:
MOV EAX,dword ptr [RBP + -0x6c]
CMP EAX,dword ptr [RBP + -0xc]
JNZ 0x001806df
CMP byte ptr [RBP + -0x51],0x0
JZ 0x001806d6
JMP 0x001807d1
LAB_001806d6:
MOV byte ptr [RBP + -0x51],0x1
JMP 0x0018079f
LAB_001806df:
MOV EAX,dword ptr [RBP + -0x6c]
SUB EAX,0x1
MOV EAX,EAX
MOV ECX,EAX
MOV EAX,0x1
SHL RAX,CL
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x48]
OR RAX,qword ptr [RBP + -0x40]
AND RAX,qword ptr [RBP + -0x78]
CMP RAX,0x0
JNZ 0x00180744
MOV RAX,qword ptr [RBP + -0x68]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x00180744
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x68],RCX
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x3d
JNZ 0x00180744
MOV RDX,qword ptr [RBP + -0x38]
LEA RDI,[0x333de0]
LEA RSI,[RBP + -0x68]
CALL 0x00180840
MOV dword ptr [RBP + -0x70],EAX
CMP EAX,0x0
JNZ 0x00180749
LAB_00180744:
JMP 0x001807d1
LAB_00180749:
CMP dword ptr [RBP + -0x70],0x1
JNZ 0x0018075d
MOV RAX,qword ptr [RBP + -0x78]
OR RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0018079d
LAB_0018075d:
CMP dword ptr [RBP + -0x70],0x2
JNZ 0x00180771
MOV RAX,qword ptr [RBP + -0x78]
OR RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0018079b
LAB_00180771:
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,qword ptr [RBP + -0x78]
CMP RAX,0x0
JZ 0x0018078d
MOV RAX,qword ptr [RBP + -0x78]
OR RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x40],RAX
JMP 0x00180799
LAB_0018078d:
MOV RAX,qword ptr [RBP + -0x78]
OR RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x48],RAX
LAB_00180799:
JMP 0x0018079b
LAB_0018079b:
JMP 0x0018079d
LAB_0018079d:
JMP 0x0018079f
LAB_0018079f:
MOV RAX,qword ptr [RBP + -0x68]
CMP RAX,qword ptr [RBP + -0x38]
JC 0x001807ab
JMP 0x001807ef
LAB_001807ab:
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x68],RCX
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2c
JZ 0x001807c4
JMP 0x001807d1
LAB_001807c4:
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0018069d
LAB_001807d1:
MOV RCX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x60]
SUB RAX,RCX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + 0x18]
MOV dword ptr [RAX],ECX
LAB_001807ef:
JMP 0x001807f1
LAB_001807f1:
MOVSX EAX,byte ptr [RBP + -0x51]
CMP EAX,0x0
JZ 0x00180804
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x80],RAX
JMP 0x0018080c
LAB_00180804:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x80],RAX
LAB_0018080c:
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x40]
OR RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x48]
XOR RAX,-0x1
AND RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
ADD RSP,0x80
POP RBP
RET
|
ulong find_set_from_flags(int8 param_1,int param_2,ulong param_3,ulong param_4,char *param_5,
uint param_6,int8 *param_7,int *param_8)
{
char *pcVar1;
int iVar2;
ulong uVar3;
ulong local_88;
char *local_70;
char *local_68;
char local_59;
ulong local_50;
ulong local_48;
char *local_40;
uint local_34;
char *local_30;
ulong local_28;
ulong local_20;
int local_14;
int8 local_10;
local_40 = param_5 + param_6;
local_48 = 0;
local_50 = 0;
local_59 = '\0';
*param_7 = 0;
pcVar1 = param_5;
local_34 = param_6;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_14 = param_2;
local_10 = param_1;
if (param_5 != local_40) {
while( true ) {
local_68 = pcVar1;
local_70 = local_68;
iVar2 = parse_name(local_10,&local_70,local_40);
if (iVar2 == 0) break;
if (iVar2 == local_14) {
if (local_59 != '\0') break;
local_59 = '\x01';
}
else {
uVar3 = 1L << ((char)iVar2 - 1U & 0x3f);
if ((((((local_50 | local_48) & uVar3) != 0) || (local_40 <= local_70)) ||
(*local_70 != '=')) ||
(local_70 = local_70 + 1, iVar2 = parse_name(on_off_default_typelib,&local_70,local_40),
iVar2 == 0)) break;
if (iVar2 == 1) {
local_50 = uVar3 | local_50;
}
else if (iVar2 == 2) {
local_48 = uVar3 | local_48;
}
else if ((local_28 & uVar3) == 0) {
local_50 = uVar3 | local_50;
}
else {
local_48 = uVar3 | local_48;
}
}
if (local_40 <= local_70) goto LAB_001807f1;
pcVar1 = local_70 + 1;
if (*local_70 != ',') break;
}
*param_7 = local_68;
*param_8 = (int)local_40 - (int)local_68;
}
LAB_001807f1:
if (local_59 == '\0') {
local_88 = local_20;
}
else {
local_88 = local_28;
}
return (local_50 ^ 0xffffffffffffffff) & (local_48 | local_88);
}
| |
54,621 | ma_write_keypage | eloqsql/storage/maria/ma_page.c | my_bool _ma_write_keypage(MARIA_PAGE *page, enum pagecache_page_lock lock,
int level)
{
MARIA_SHARE *share= page->info->s;
uint block_size= share->block_size;
uchar *buff= page->buff;
my_bool res;
MARIA_PINNED_PAGE page_link;
DBUG_ENTER("_ma_write_keypage");
/*
The following ensures that for transactional tables we have logged
all changes that changes the page size (as the logging code sets
page->org_size)
*/
DBUG_ASSERT(!share->now_transactional || page->size == page->org_size);
#ifdef EXTRA_DEBUG /* Safety check */
{
uint page_length, nod_flag;
page_length= _ma_get_page_used(share, buff);
nod_flag= _ma_test_if_nod(share, buff);
DBUG_ASSERT(page->size == page_length);
DBUG_ASSERT(page->size <= share->max_index_block_size);
DBUG_ASSERT(page->flag == _ma_get_keypage_flag(share, buff));
if (page->pos < share->base.keystart ||
page->pos+block_size > share->state.state.key_file_length ||
(page->pos & (maria_block_size-1)))
{
DBUG_PRINT("error",("Trying to write inside key status region: "
"key_start: %lu length: %lu page_pos: %lu",
(long) share->base.keystart,
(long) share->state.state.key_file_length,
(long) page->pos));
my_errno=EINVAL;
DBUG_ASSERT(0);
DBUG_RETURN(1);
}
DBUG_PRINT("page",("write page at: %lu",(ulong) (page->pos / block_size)));
DBUG_DUMP("buff", buff, page_length);
DBUG_ASSERT(page_length >= share->keypage_header + nod_flag +
page->keyinfo->minlength || maria_in_recovery);
}
#endif
/* Verify that keynr is correct */
DBUG_ASSERT(_ma_get_keynr(share, buff) == page->keyinfo->key_nr);
#if defined(EXTRA_DEBUG) && defined(HAVE_valgrind) && defined(WHEN_DEBUGGING)
MEM_CHECK_DEFINED(buff, block_size);
#endif
page_cleanup(share, page);
{
PAGECACHE_BLOCK_LINK **link;
enum pagecache_page_pin pin;
if (lock == PAGECACHE_LOCK_LEFT_WRITELOCKED)
{
pin= PAGECACHE_PIN_LEFT_PINNED;
link= &page_link.link;
}
else if (lock == PAGECACHE_LOCK_WRITE_UNLOCK)
{
pin= PAGECACHE_UNPIN;
/*
We unlock this page so link should be 0 to prevent it usage
even accidentally
*/
link= NULL;
}
else
{
pin= PAGECACHE_PIN;
link= &page_link.link;
}
res= pagecache_write(share->pagecache,
&share->kfile,
(pgcache_page_no_t) (page->pos / block_size),
level, buff, share->page_type,
lock, pin, PAGECACHE_WRITE_DELAY, link,
LSN_IMPOSSIBLE);
}
if (lock == PAGECACHE_LOCK_WRITE)
{
/* It was not locked before, we have to unlock it when we unpin pages */
page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK;
page_link.changed= 1;
push_dynamic(&page->info->pinned_pages, (void*) &page_link);
}
DBUG_RETURN(res);
} | O3 | c | ma_write_keypage:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %edx, %ecx
movl %esi, %r14d
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x10(%rdi), %r8
movq (%rax), %r9
movl 0x7bc(%r9), %r12d
leaq -0x38(%rbp), %r11
xorl %r10d, %r10d
cmpl $0x2, %esi
je 0x58f6a
cmpl $0x6, %r14d
jne 0x58f6f
movl $0x3, %r15d
xorl %r11d, %r11d
jmp 0x58f75
xorl %r15d, %r15d
jmp 0x58f75
movl $0x2, %r15d
movq 0x600(%r9), %rdi
leaq 0x750(%r9), %rsi
movq 0x18(%rbx), %rax
xorl %edx, %edx
divq %r12
movl 0x7d4(%r9), %r9d
movl 0x80(%rdi), %r12d
subq $0x8, %rsp
movq %rax, %rdx
pushq %r12
pushq %r10
pushq $0x0
pushq %r11
pushq %r10
pushq %r15
pushq %r14
callq 0x33986
addq $0x40, %rsp
movl %eax, %r15d
cmpl $0x4, %r14d
jne 0x58fdd
leaq -0x38(%rbp), %rsi
movl $0x6, 0x8(%rsi)
movb $0x1, 0x10(%rsi)
movl $0x2e8, %edi # imm = 0x2E8
addq (%rbx), %rdi
callq 0x91aae
movl %r15d, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _ma_write_keypage:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 20h
mov ecx, edx
mov r14d, esi
mov rbx, rdi
mov rax, [rdi]
mov r8, [rdi+10h]
mov r9, [rax]
mov r12d, [r9+7BCh]
lea r11, [rbp+var_38]
xor r10d, r10d
cmp esi, 2
jz short loc_58F6A
cmp r14d, 6
jnz short loc_58F6F
mov r15d, 3
xor r11d, r11d
jmp short loc_58F75
loc_58F6A:
xor r15d, r15d
jmp short loc_58F75
loc_58F6F:
mov r15d, 2
loc_58F75:
mov rdi, [r9+600h]
lea rsi, [r9+750h]
mov rax, [rbx+18h]
xor edx, edx
div r12
mov r9d, [r9+7D4h]
mov r12d, [rdi+80h]
sub rsp, 8
mov rdx, rax
push r12
push r10
push 0
push r11
push r10
push r15
push r14
call pagecache_write_part
add rsp, 40h
mov r15d, eax
cmp r14d, 4
jnz short loc_58FDD
lea rsi, [rbp+var_38]
mov dword ptr [rsi+8], 6
mov byte ptr [rsi+10h], 1
mov edi, 2E8h
add rdi, [rbx]
call insert_dynamic
loc_58FDD:
mov eax, r15d
add rsp, 20h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long ma_write_keypage(long long **a1, unsigned int a2, int a3)
{
long long v3; // r9
_QWORD *v4; // r11
unsigned int v5; // r15d
unsigned int v6; // r15d
_BYTE v8[8]; // [rsp+8h] [rbp-38h] BYREF
int v9; // [rsp+10h] [rbp-30h]
char v10; // [rsp+18h] [rbp-28h]
v4 = v8;
if ( a2 == 2 )
{
v5 = 0;
}
else if ( a2 == 6 )
{
v5 = 3;
v4 = 0LL;
}
else
{
v5 = 2;
}
v3 = **a1;
v6 = pagecache_write_part(
*(__m128i **)(v3 + 1536),
(char *)(v3 + 1872),
(unsigned long long)a1[3] / *(unsigned int *)(v3 + 1980),
a3,
(char *)a1[2],
*(_DWORD *)(v3 + 2004),
a2,
v5,
0,
v4,
0LL,
0,
*(_DWORD *)(*(_QWORD *)(v3 + 1536) + 128LL));
if ( a2 == 4 )
{
v9 = 6;
v10 = 1;
insert_dynamic(*a1 + 93, v8);
}
return v6;
}
| _ma_write_keypage:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV ECX,EDX
MOV R14D,ESI
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
MOV R8,qword ptr [RDI + 0x10]
MOV R9,qword ptr [RAX]
MOV R12D,dword ptr [R9 + 0x7bc]
LEA R11,[RBP + -0x38]
XOR R10D,R10D
CMP ESI,0x2
JZ 0x00158f6a
CMP R14D,0x6
JNZ 0x00158f6f
MOV R15D,0x3
XOR R11D,R11D
JMP 0x00158f75
LAB_00158f6a:
XOR R15D,R15D
JMP 0x00158f75
LAB_00158f6f:
MOV R15D,0x2
LAB_00158f75:
MOV RDI,qword ptr [R9 + 0x600]
LEA RSI,[R9 + 0x750]
MOV RAX,qword ptr [RBX + 0x18]
XOR EDX,EDX
DIV R12
MOV R9D,dword ptr [R9 + 0x7d4]
MOV R12D,dword ptr [RDI + 0x80]
SUB RSP,0x8
MOV RDX,RAX
PUSH R12
PUSH R10
PUSH 0x0
PUSH R11
PUSH R10
PUSH R15
PUSH R14
CALL 0x00133986
ADD RSP,0x40
MOV R15D,EAX
CMP R14D,0x4
JNZ 0x00158fdd
LEA RSI,[RBP + -0x38]
MOV dword ptr [RSI + 0x8],0x6
MOV byte ptr [RSI + 0x10],0x1
MOV EDI,0x2e8
ADD RDI,qword ptr [RBX]
CALL 0x00191aae
LAB_00158fdd:
MOV EAX,R15D
ADD RSP,0x20
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int4 _ma_write_keypage(long *param_1,int param_2,int4 param_3)
{
long lVar1;
int4 uVar2;
int1 *puVar3;
int8 uVar4;
int1 local_40 [8];
int4 local_38;
int1 local_30;
lVar1 = *(long *)*param_1;
puVar3 = local_40;
if (param_2 == 2) {
uVar4 = 0;
}
else if (param_2 == 6) {
uVar4 = 3;
puVar3 = (int1 *)0x0;
}
else {
uVar4 = 2;
}
uVar2 = pagecache_write_part
(*(long *)(lVar1 + 0x600),lVar1 + 0x750,
(ulong)param_1[3] / (ulong)*(uint *)(lVar1 + 0x7bc),param_3,param_1[2],
*(int4 *)(lVar1 + 0x7d4),param_2,uVar4,0,puVar3,0,0,
*(int4 *)(*(long *)(lVar1 + 0x600) + 0x80));
if (param_2 == 4) {
local_38 = 6;
local_30 = 1;
insert_dynamic(*param_1 + 0x2e8);
}
return uVar2;
}
| |
54,622 | moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::add_block_to_free_list(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::Block*) | angrymouse[P]emittra/include/concurrentqueue.h | inline void add_block_to_free_list(Block* block)
{
#ifdef MCDBGQ_TRACKMEM
block->owner = nullptr;
#endif
if (!Traits::RECYCLE_ALLOCATED_BLOCKS && block->dynamicallyAllocated) {
destroy(block);
}
else {
freeList.add(block);
}
} | O0 | c | moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::add_block_to_free_list(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::Block*):
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x8(%rsp), %rax
testb $0x1, 0x540(%rax)
je 0x16b71
movq 0x8(%rsp), %rdi
callq 0x12600
jmp 0x16b83
movq (%rsp), %rdi
addq $0x28, %rdi
movq 0x8(%rsp), %rsi
callq 0x16b90
addq $0x18, %rsp
retq
nopl (%rax,%rax)
| _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE22add_block_to_free_listEPNS5_5BlockE:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_10], rsi
mov rax, [rsp+18h+var_8]
mov [rsp+18h+var_18], rax
mov rax, [rsp+18h+var_10]
test byte ptr [rax+540h], 1
jz short loc_16B71
mov rdi, [rsp+18h+var_10]
call _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE7destroyINS5_5BlockEEEvPT_; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::destroy<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::Block>(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::Block *)
jmp short loc_16B83
loc_16B71:
mov rdi, [rsp+18h+var_18]
add rdi, 28h ; '('
mov rsi, [rsp+18h+var_10]
call _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE8FreeListINS5_5BlockEE3addEPS7_; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::FreeList<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::Block>::add(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::Block*)
loc_16B83:
add rsp, 18h
retn
| long long moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::add_block_to_free_list(
long long a1,
long long a2)
{
if ( (*(_BYTE *)(a2 + 1344) & 1) != 0 )
return moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::destroy<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::Block>(a2);
else
return moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::FreeList<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::Block>::add(
a1 + 40,
a2);
}
| add_block_to_free_list:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP + 0x8]
TEST byte ptr [RAX + 0x540],0x1
JZ 0x00116b71
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00112600
JMP 0x00116b83
LAB_00116b71:
MOV RDI,qword ptr [RSP]
ADD RDI,0x28
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x00116b90
LAB_00116b83:
ADD RSP,0x18
RET
|
/* moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,
moodycamel::ConcurrentQueueDefaultTraits>::add_block_to_free_list(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,
moodycamel::ConcurrentQueueDefaultTraits>::Block*) */
void __thiscall
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>
::add_block_to_free_list
(ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>
*this,Block *param_1)
{
if (((byte)param_1[0x540] & 1) == 0) {
FreeList<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::Block>
::add((FreeList<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::Block>
*)(this + 0x28),param_1);
}
else {
destroy<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::Block>
(param_1);
}
return;
}
| |
54,623 | gguf_get_val_u64 | ngxson[P]ggml-easy/ggml/src/gguf.cpp | uint64_t gguf_get_val_u64(const struct gguf_context * ctx, int64_t key_id) {
GGML_ASSERT(key_id >= 0 && key_id < gguf_get_n_kv(ctx));
GGML_ASSERT(ctx->kv[key_id].get_ne() == 1);
return ctx->kv[key_id].get_val<uint64_t>();
} | O1 | cpp | gguf_get_val_u64:
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
js 0x3dc36
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
movq 0x10(%rbx), %rax
subq %rdi, %rax
sarq $0x3, %rax
movabsq $0x2e8ba2e8ba2e8ba3, %rcx # imm = 0x2E8BA2E8BA2E8BA3
imulq %rax, %rcx
cmpq %rsi, %rcx
jle 0x3dc36
imulq $0x58, %rsi, %r14
addq %r14, %rdi
callq 0x16620
cmpq $0x1, %rax
jne 0x3dc52
addq 0x8(%rbx), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x16a70
movq (%rax), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1c1e8(%rip), %rdi # 0x59e25
leaq 0xca16(%rip), %rdx # 0x4a65a
leaq 0x1c666(%rip), %rcx # 0x5a2b1
movl $0x34d, %esi # imm = 0x34D
jmp 0x3dc6c
leaq 0x1c1cc(%rip), %rdi # 0x59e25
leaq 0xc9fa(%rip), %rdx # 0x4a65a
leaq 0x1c719(%rip), %rcx # 0x5a380
movl $0x34e, %esi # imm = 0x34E
xorl %eax, %eax
callq 0x17c70
| gguf_get_val_u64:
push r14
push rbx
push rax
test rsi, rsi
js short loc_3DC36
mov rbx, rdi
mov rdi, [rdi+8]
mov rax, [rbx+10h]
sub rax, rdi
sar rax, 3
mov rcx, 2E8BA2E8BA2E8BA3h
imul rcx, rax
cmp rcx, rsi
jle short loc_3DC36
imul r14, rsi, 58h ; 'X'
add rdi, r14; this
call __ZNK7gguf_kv6get_neEv; gguf_kv::get_ne(void)
cmp rax, 1
jnz short loc_3DC52
add r14, [rbx+8]
mov rdi, r14
xor esi, esi
call __ZNK7gguf_kv7get_valImEERKT_m; gguf_kv::get_val<ulong>(ulong)
mov rax, [rax]
add rsp, 8
pop rbx
pop r14
retn
loc_3DC36:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeyId0KeyIdGgu; "key_id >= 0 && key_id < gguf_get_n_kv(c"...
mov esi, 34Dh
jmp short loc_3DC6C
loc_3DC52:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCtxKvKeyIdGetN; "ctx->kv[key_id].get_ne() == 1"
mov esi, 34Eh
loc_3DC6C:
xor eax, eax
call _ggml_abort
| long long gguf_get_val_u64(long long a1, long long a2, long long a3, long long a4, int a5, int a6)
{
long long v7; // rdi
const char *v9; // rcx
int v10; // esi
if ( a2 < 0 || (v7 = *(_QWORD *)(a1 + 8), 0x2E8BA2E8BA2E8BA3LL * ((*(_QWORD *)(a1 + 16) - v7) >> 3) <= a2) )
{
v9 = "key_id >= 0 && key_id < gguf_get_n_kv(ctx)";
v10 = 845;
goto LABEL_7;
}
if ( gguf_kv::get_ne((gguf_kv *)(88 * a2 + v7)) != 1 )
{
v9 = "ctx->kv[key_id].get_ne() == 1";
v10 = 846;
LABEL_7:
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/gguf.cpp",
v10,
(unsigned int)"GGML_ASSERT(%s) failed",
(_DWORD)v9,
a5,
a6);
}
return *(_QWORD *)gguf_kv::get_val<unsigned long>(*(_QWORD *)(a1 + 8) + 88 * a2, 0LL);
}
| gguf_get_val_u64:
PUSH R14
PUSH RBX
PUSH RAX
TEST RSI,RSI
JS 0x0013dc36
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RBX + 0x10]
SUB RAX,RDI
SAR RAX,0x3
MOV RCX,0x2e8ba2e8ba2e8ba3
IMUL RCX,RAX
CMP RCX,RSI
JLE 0x0013dc36
IMUL R14,RSI,0x58
ADD RDI,R14
CALL 0x00116620
CMP RAX,0x1
JNZ 0x0013dc52
ADD R14,qword ptr [RBX + 0x8]
MOV RDI,R14
XOR ESI,ESI
CALL 0x00116a70
MOV RAX,qword ptr [RAX]
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_0013dc36:
LEA RDI,[0x159e25]
LEA RDX,[0x14a65a]
LEA RCX,[0x15a2b1]
MOV ESI,0x34d
JMP 0x0013dc6c
LAB_0013dc52:
LEA RDI,[0x159e25]
LEA RDX,[0x14a65a]
LEA RCX,[0x15a380]
MOV ESI,0x34e
LAB_0013dc6c:
XOR EAX,EAX
CALL 0x00117c70
|
ulong gguf_get_val_u64(long param_1,long param_2)
{
ulong *puVar1;
long lVar2;
char *pcVar3;
int8 uVar4;
if ((param_2 < 0) ||
(lVar2 = (*(long *)(param_1 + 0x10) - *(long *)(param_1 + 8) >> 3) * 0x2e8ba2e8ba2e8ba3,
lVar2 - param_2 == 0 || lVar2 < param_2)) {
pcVar3 = "key_id >= 0 && key_id < gguf_get_n_kv(ctx)";
uVar4 = 0x34d;
}
else {
lVar2 = gguf_kv::get_ne((gguf_kv *)(*(long *)(param_1 + 8) + param_2 * 0x58));
if (lVar2 == 1) {
puVar1 = gguf_kv::get_val<unsigned_long>
((gguf_kv *)(param_2 * 0x58 + *(long *)(param_1 + 8)),0);
return *puVar1;
}
pcVar3 = "ctx->kv[key_id].get_ne() == 1";
uVar4 = 0x34e;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/gguf.cpp",uVar4,
"GGML_ASSERT(%s) failed",pcVar3);
}
| |
54,624 | gguf_get_val_u64 | ngxson[P]ggml-easy/ggml/src/gguf.cpp | uint64_t gguf_get_val_u64(const struct gguf_context * ctx, int64_t key_id) {
GGML_ASSERT(key_id >= 0 && key_id < gguf_get_n_kv(ctx));
GGML_ASSERT(ctx->kv[key_id].get_ne() == 1);
return ctx->kv[key_id].get_val<uint64_t>();
} | O2 | cpp | gguf_get_val_u64:
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
js 0x3f88e
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
movq 0x10(%rbx), %rax
subq %rdi, %rax
pushq $0x58
popq %rcx
cqto
idivq %rcx
cmpq %rsi, %rax
jle 0x3f88e
imulq $0x58, %rsi, %r14
addq %r14, %rdi
callq 0x1c880
cmpq $0x1, %rax
jne 0x3f8aa
addq 0x8(%rbx), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x1ce70
movq (%rax), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1b080(%rip), %rdi # 0x5a915
leaq 0xbd32(%rip), %rdx # 0x4b5ce
leaq 0x1b4fe(%rip), %rcx # 0x5ada1
movl $0x34d, %esi # imm = 0x34D
jmp 0x3f8c4
leaq 0x1b064(%rip), %rdi # 0x5a915
leaq 0xbd16(%rip), %rdx # 0x4b5ce
leaq 0x1b5b1(%rip), %rcx # 0x5ae70
movl $0x34e, %esi # imm = 0x34E
xorl %eax, %eax
callq 0x1e770
| gguf_get_val_u64:
push r14
push rbx
push rax
test rsi, rsi
js short loc_3F88E
mov rbx, rdi
mov rdi, [rdi+8]
mov rax, [rbx+10h]
sub rax, rdi
push 58h ; 'X'
pop rcx
cqo
idiv rcx
cmp rax, rsi
jle short loc_3F88E
imul r14, rsi, 58h ; 'X'
add rdi, r14; this
call __ZNK7gguf_kv6get_neEv; gguf_kv::get_ne(void)
cmp rax, 1
jnz short loc_3F8AA
add r14, [rbx+8]
mov rdi, r14
xor esi, esi
call __ZNK7gguf_kv7get_valImEERKT_m; gguf_kv::get_val<ulong>(ulong)
mov rax, [rax]
add rsp, 8
pop rbx
pop r14
retn
loc_3F88E:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeyId0KeyIdGgu; "key_id >= 0 && key_id < gguf_get_n_kv(c"...
mov esi, 34Dh
jmp short loc_3F8C4
loc_3F8AA:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCtxKvKeyIdGetN; "ctx->kv[key_id].get_ne() == 1"
mov esi, 34Eh
loc_3F8C4:
xor eax, eax
call _ggml_abort
| long long gguf_get_val_u64(
long long a1,
long long a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
long long a11,
long long a12,
long long a13,
long long a14)
{
char v14; // al
long long v16; // rdi
const char *v18; // rcx
int v19; // esi
char v20; // [rsp-8h] [rbp-18h]
v20 = v14;
if ( a2 < 0 || (v16 = *(_QWORD *)(a1 + 8), (*(_QWORD *)(a1 + 16) - v16) / 88 <= a2) )
{
v18 = "key_id >= 0 && key_id < gguf_get_n_kv(ctx)";
v19 = 845;
goto LABEL_7;
}
if ( gguf_kv::get_ne((gguf_kv *)(88 * a2 + v16)) != 1 )
{
v18 = "ctx->kv[key_id].get_ne() == 1";
v19 = 846;
LABEL_7:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/gguf.cpp",
v19,
(long long)"GGML_ASSERT(%s) failed",
(long long)v18,
a13,
a14,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
v20);
}
return *(_QWORD *)gguf_kv::get_val<unsigned long>(*(_QWORD *)(a1 + 8) + 88 * a2, 0LL);
}
| gguf_get_val_u64:
PUSH R14
PUSH RBX
PUSH RAX
TEST RSI,RSI
JS 0x0013f88e
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RBX + 0x10]
SUB RAX,RDI
PUSH 0x58
POP RCX
CQO
IDIV RCX
CMP RAX,RSI
JLE 0x0013f88e
IMUL R14,RSI,0x58
ADD RDI,R14
CALL 0x0011c880
CMP RAX,0x1
JNZ 0x0013f8aa
ADD R14,qword ptr [RBX + 0x8]
MOV RDI,R14
XOR ESI,ESI
CALL 0x0011ce70
MOV RAX,qword ptr [RAX]
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_0013f88e:
LEA RDI,[0x15a915]
LEA RDX,[0x14b5ce]
LEA RCX,[0x15ada1]
MOV ESI,0x34d
JMP 0x0013f8c4
LAB_0013f8aa:
LEA RDI,[0x15a915]
LEA RDX,[0x14b5ce]
LEA RCX,[0x15ae70]
MOV ESI,0x34e
LAB_0013f8c4:
XOR EAX,EAX
CALL 0x0011e770
|
ulong gguf_get_val_u64(long param_1,long param_2)
{
long lVar1;
ulong *puVar2;
char *pcVar3;
int8 uVar4;
if (-1 < param_2) {
if (param_2 < (*(long *)(param_1 + 0x10) - *(long *)(param_1 + 8)) / 0x58) {
lVar1 = gguf_kv::get_ne((gguf_kv *)(*(long *)(param_1 + 8) + param_2 * 0x58));
if (lVar1 == 1) {
puVar2 = gguf_kv::get_val<unsigned_long>
((gguf_kv *)(param_2 * 0x58 + *(long *)(param_1 + 8)),0);
return *puVar2;
}
pcVar3 = "ctx->kv[key_id].get_ne() == 1";
uVar4 = 0x34e;
goto LAB_0013f8c4;
}
}
pcVar3 = "key_id >= 0 && key_id < gguf_get_n_kv(ctx)";
uVar4 = 0x34d;
LAB_0013f8c4:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/gguf.cpp",uVar4,
"GGML_ASSERT(%s) failed",pcVar3);
}
| |
54,625 | find_jump_target | bluesky950520[P]quickjs/quickjs.c | static int find_jump_target(JSFunctionDef *s, int label, int *pop)
{
int i, pos, op;
update_label(s, label, -1);
for (i = 0; i < 10; i++) {
assert(label >= 0 && label < s->label_count);
pos = s->label_slots[label].pos2;
for (;;) {
switch(op = s->byte_code.buf[pos]) {
case OP_source_loc:
case OP_label:
pos += opcode_info[op].size;
continue;
case OP_goto:
label = get_u32(s->byte_code.buf + pos + 1);
break;
case OP_drop:
/* ignore drop opcodes if followed by OP_return_undef */
while (s->byte_code.buf[++pos] == OP_drop)
continue;
if (s->byte_code.buf[pos] == OP_return_undef)
op = OP_return_undef;
/* fall thru */
default:
goto done;
}
break;
}
}
/* cycle detected, could issue a warning */
done:
*pop = op;
update_label(s, label, +1);
return label;
} | O1 | c | find_jump_target:
pushq %rbx
movq 0x170(%rdi), %rcx
movslq %esi, %rax
leaq (%rax,%rax,2), %rax
decl (%rcx,%rax,8)
movq 0x138(%rdi), %rdi
xorl %r8d, %r8d
leaq 0x2eb46(%rip), %r9 # 0x9e140
movslq %esi, %rax
leaq (%rax,%rax,2), %rax
movl 0x8(%rcx,%rax,8), %r10d
movslq %r10d, %r11
movb (%rdi,%r11), %al
movzbl %al, %ebx
cmpl $0xc3, %ebx
jg 0x6f622
cmpl $0xb5, %ebx
je 0x6f62a
jmp 0x6f634
cmpl $0xc4, %ebx
jne 0x6f66a
movzbl (%r9,%rbx,4), %eax
addl %eax, %r10d
jmp 0x6f606
cmpl $0xe, %ebx
je 0x6f650
cmpl $0x6b, %ebx
jne 0x6f66a
movl 0x1(%rdi,%r11), %esi
incl %r8d
cmpl $0xa, %r8d
jne 0x6f5fa
movb $0x6b, %al
jmp 0x6f66a
leaq (%rdi,%r11), %r8
incq %r8
movzbl (%r8), %edi
incq %r8
cmpl $0xe, %edi
je 0x6f657
cmpl $0x29, %edi
jne 0x6f66a
movl %edi, %eax
movzbl %al, %eax
movl %eax, (%rdx)
movslq %esi, %rax
leaq (%rax,%rax,2), %rdx
incl (%rcx,%rdx,8)
popq %rbx
retq
| find_jump_target:
push rbx
mov rcx, [rdi+170h]
movsxd rax, esi
lea rax, [rax+rax*2]
dec dword ptr [rcx+rax*8]
mov rdi, [rdi+138h]
xor r8d, r8d
lea r9, opcode_info
loc_6F5FA:
movsxd rax, esi
lea rax, [rax+rax*2]
mov r10d, [rcx+rax*8+8]
loc_6F606:
movsxd r11, r10d
mov al, [rdi+r11]
movzx ebx, al
cmp ebx, 0C3h
jg short loc_6F622
cmp ebx, 0B5h
jz short loc_6F62A
jmp short loc_6F634
loc_6F622:
cmp ebx, 0C4h
jnz short loc_6F66A
loc_6F62A:
movzx eax, byte ptr [r9+rbx*4]
add r10d, eax
jmp short loc_6F606
loc_6F634:
cmp ebx, 0Eh
jz short loc_6F650
cmp ebx, 6Bh ; 'k'
jnz short loc_6F66A
mov esi, [rdi+r11+1]
inc r8d
cmp r8d, 0Ah
jnz short loc_6F5FA
mov al, 6Bh ; 'k'
jmp short loc_6F66A
loc_6F650:
lea r8, [rdi+r11]
inc r8
loc_6F657:
movzx edi, byte ptr [r8]
inc r8
cmp edi, 0Eh
jz short loc_6F657
cmp edi, 29h ; ')'
jnz short loc_6F66A
mov eax, edi
loc_6F66A:
movzx eax, al
mov [rdx], eax
movsxd rax, esi
lea rdx, [rax+rax*2]
inc dword ptr [rcx+rdx*8]
pop rbx
retn
| long long find_jump_target(long long a1, int a2, _DWORD *a3)
{
long long v3; // rcx
long long v4; // rdi
int v5; // r8d
int i; // r10d
unsigned __int8 v7; // al
unsigned __int8 *v8; // r8
int v9; // edi
long long result; // rax
v3 = *(_QWORD *)(a1 + 368);
--*(_DWORD *)(v3 + 24LL * a2);
v4 = *(_QWORD *)(a1 + 312);
v5 = 0;
while ( 2 )
{
for ( i = *(_DWORD *)(v3 + 24LL * a2 + 8); ; i += opcode_info[4 * v7] )
{
v7 = *(_BYTE *)(v4 + i);
if ( v7 <= 0xC3u )
break;
if ( v7 != 196 )
goto LABEL_16;
LABEL_7:
;
}
switch ( v7 )
{
case 0xB5u:
goto LABEL_7;
case 0xEu:
v8 = (unsigned __int8 *)(v4 + i + 1);
do
v9 = *v8++;
while ( v9 == 14 );
if ( v9 == 41 )
v7 = 41;
break;
case 0x6Bu:
a2 = *(_DWORD *)(v4 + i + 1);
if ( ++v5 == 10 )
{
v7 = 107;
break;
}
continue;
}
break;
}
LABEL_16:
*a3 = v7;
result = a2;
++*(_DWORD *)(v3 + 24LL * a2);
return result;
}
| |||
54,626 | find_jump_target | bluesky950520[P]quickjs/quickjs.c | static int find_jump_target(JSFunctionDef *s, int label, int *pop)
{
int i, pos, op;
update_label(s, label, -1);
for (i = 0; i < 10; i++) {
assert(label >= 0 && label < s->label_count);
pos = s->label_slots[label].pos2;
for (;;) {
switch(op = s->byte_code.buf[pos]) {
case OP_source_loc:
case OP_label:
pos += opcode_info[op].size;
continue;
case OP_goto:
label = get_u32(s->byte_code.buf + pos + 1);
break;
case OP_drop:
/* ignore drop opcodes if followed by OP_return_undef */
while (s->byte_code.buf[++pos] == OP_drop)
continue;
if (s->byte_code.buf[pos] == OP_return_undef)
op = OP_return_undef;
/* fall thru */
default:
goto done;
}
break;
}
}
/* cycle detected, could issue a warning */
done:
*pop = op;
update_label(s, label, +1);
return label;
} | O2 | c | find_jump_target:
pushq %rbx
movq 0x170(%rdi), %rcx
movslq %esi, %rax
imulq $0x18, %rax, %rax
decl (%rcx,%rax)
movq 0x138(%rdi), %r8
xorl %r9d, %r9d
movl $0x6b, %edi
leaq 0x2766f(%rip), %r10 # 0x850e0
movslq %esi, %rax
cmpl $0xa, %r9d
je 0x5dae2
imulq $0x18, %rax, %rsi
movl 0x8(%rcx,%rsi), %ebx
movslq %ebx, %rsi
movzbl (%r8,%rsi), %r11d
cmpl $0xb5, %r11d
je 0x5da9c
cmpl $0xc4, %r11d
jne 0x5daa5
movzbl (%r10,%r11,4), %esi
addl %esi, %ebx
jmp 0x5da82
cmpl $0x6b, %r11d
jne 0x5dab5
movl 0x1(%r8,%rsi), %esi
incl %r9d
jmp 0x5da71
cmpl $0xe, %r11d
jne 0x5dad8
addq %r8, %rsi
incq %rsi
movzbl (%rsi), %edi
incq %rsi
cmpl $0xe, %edi
je 0x5dac1
cmpl $0x29, %edi
jne 0x5dadd
movl $0x29, %edi
jmp 0x5dae2
movl %r11d, %edi
jmp 0x5dae2
movl $0xe, %edi
movl %edi, (%rdx)
imulq $0x18, %rax, %rdx
incl (%rcx,%rdx)
popq %rbx
retq
| find_jump_target:
push rbx
mov rcx, [rdi+170h]
movsxd rax, esi
imul rax, 18h
dec dword ptr [rcx+rax]
mov r8, [rdi+138h]
xor r9d, r9d
mov edi, 6Bh ; 'k'
lea r10, opcode_info
loc_5DA71:
movsxd rax, esi
cmp r9d, 0Ah
jz short loc_5DAE2
imul rsi, rax, 18h
mov ebx, [rcx+rsi+8]
loc_5DA82:
movsxd rsi, ebx
movzx r11d, byte ptr [r8+rsi]
cmp r11d, 0B5h
jz short loc_5DA9C
cmp r11d, 0C4h
jnz short loc_5DAA5
loc_5DA9C:
movzx esi, byte ptr [r10+r11*4]
add ebx, esi
jmp short loc_5DA82
loc_5DAA5:
cmp r11d, 6Bh ; 'k'
jnz short loc_5DAB5
mov esi, [r8+rsi+1]
inc r9d
jmp short loc_5DA71
loc_5DAB5:
cmp r11d, 0Eh
jnz short loc_5DAD8
add rsi, r8
inc rsi
loc_5DAC1:
movzx edi, byte ptr [rsi]
inc rsi
cmp edi, 0Eh
jz short loc_5DAC1
cmp edi, 29h ; ')'
jnz short loc_5DADD
mov edi, 29h ; ')'
jmp short loc_5DAE2
loc_5DAD8:
mov edi, r11d
jmp short loc_5DAE2
loc_5DADD:
mov edi, 0Eh
loc_5DAE2:
mov [rdx], edi
imul rdx, rax, 18h
inc dword ptr [rcx+rdx]
pop rbx
retn
| long long find_jump_target(long long a1, int a2, int *a3)
{
long long v3; // rcx
long long v4; // r8
int v5; // r9d
int v6; // edi
long long result; // rax
int i; // ebx
long long v9; // r11
unsigned __int8 *v10; // rsi
int v11; // edi
v3 = *(_QWORD *)(a1 + 368);
--*(_DWORD *)(v3 + 24LL * a2);
v4 = *(_QWORD *)(a1 + 312);
v5 = 0;
v6 = 107;
while ( 1 )
{
result = a2;
if ( v5 == 10 )
break;
for ( i = *(_DWORD *)(v3 + 24LL * a2 + 8); ; i += opcode_info[4 * v9] )
{
v9 = *(unsigned __int8 *)(v4 + i);
if ( (_DWORD)v9 != 181 && (_DWORD)v9 != 196 )
break;
}
if ( (_DWORD)v9 != 107 )
{
if ( (_DWORD)v9 == 14 )
{
v10 = (unsigned __int8 *)(v4 + i + 1);
do
v11 = *v10++;
while ( v11 == 14 );
if ( v11 == 41 )
v6 = 41;
else
v6 = 14;
}
else
{
v6 = *(unsigned __int8 *)(v4 + i);
}
break;
}
a2 = *(_DWORD *)(v4 + i + 1);
++v5;
}
*a3 = v6;
++*(_DWORD *)(v3 + 24 * result);
return result;
}
| find_jump_target:
PUSH RBX
MOV RCX,qword ptr [RDI + 0x170]
MOVSXD RAX,ESI
IMUL RAX,RAX,0x18
DEC dword ptr [RCX + RAX*0x1]
MOV R8,qword ptr [RDI + 0x138]
XOR R9D,R9D
MOV EDI,0x6b
LEA R10,[0x1850e0]
LAB_0015da71:
MOVSXD RAX,ESI
CMP R9D,0xa
JZ 0x0015dae2
IMUL RSI,RAX,0x18
MOV EBX,dword ptr [RCX + RSI*0x1 + 0x8]
LAB_0015da82:
MOVSXD RSI,EBX
MOVZX R11D,byte ptr [R8 + RSI*0x1]
CMP R11D,0xb5
JZ 0x0015da9c
CMP R11D,0xc4
JNZ 0x0015daa5
LAB_0015da9c:
MOVZX ESI,byte ptr [R10 + R11*0x4]
ADD EBX,ESI
JMP 0x0015da82
LAB_0015daa5:
CMP R11D,0x6b
JNZ 0x0015dab5
MOV ESI,dword ptr [R8 + RSI*0x1 + 0x1]
INC R9D
JMP 0x0015da71
LAB_0015dab5:
CMP R11D,0xe
JNZ 0x0015dad8
ADD RSI,R8
INC RSI
LAB_0015dac1:
MOVZX EDI,byte ptr [RSI]
INC RSI
CMP EDI,0xe
JZ 0x0015dac1
CMP EDI,0x29
JNZ 0x0015dadd
MOV EDI,0x29
JMP 0x0015dae2
LAB_0015dad8:
MOV EDI,R11D
JMP 0x0015dae2
LAB_0015dadd:
MOV EDI,0xe
LAB_0015dae2:
MOV dword ptr [RDX],EDI
IMUL RDX,RAX,0x18
INC dword ptr [RCX + RDX*0x1]
POP RBX
RET
|
void find_jump_target(long param_1,int param_2,uint *param_3)
{
int *piVar1;
byte bVar2;
long lVar3;
long lVar4;
int iVar5;
long lVar6;
char *pcVar7;
int iVar8;
uint uVar9;
lVar3 = *(long *)(param_1 + 0x170);
piVar1 = (int *)(lVar3 + (long)param_2 * 0x18);
*piVar1 = *piVar1 + -1;
lVar4 = *(long *)(param_1 + 0x138);
iVar8 = 0;
do {
uVar9 = 0x6b;
if (iVar8 == 10) {
LAB_0015dae2:
*param_3 = uVar9;
piVar1 = (int *)(lVar3 + (long)param_2 * 0x18);
*piVar1 = *piVar1 + 1;
return;
}
iVar5 = *(int *)(lVar3 + 8 + (long)param_2 * 0x18);
while( true ) {
lVar6 = (long)iVar5;
bVar2 = *(byte *)(lVar4 + lVar6);
if ((bVar2 != 0xb5) && (bVar2 != 0xc4)) break;
iVar5 = iVar5 + (uint)(byte)opcode_info[(ulong)bVar2 * 4];
}
uVar9 = (uint)bVar2;
if (uVar9 != 0x6b) {
if (uVar9 == 0xe) {
pcVar7 = (char *)(lVar6 + lVar4);
do {
pcVar7 = pcVar7 + 1;
} while (*pcVar7 == '\x0e');
if (*pcVar7 == ')') {
uVar9 = 0x29;
}
else {
uVar9 = 0xe;
}
}
goto LAB_0015dae2;
}
param_2 = *(int *)(lVar4 + 1 + lVar6);
iVar8 = iVar8 + 1;
} while( true );
}
| |
54,627 | translog_buffer_lock | eloqsql/storage/maria/ma_loghandler.c | static void translog_buffer_lock(struct st_translog_buffer *buffer)
{
DBUG_ENTER("translog_buffer_lock");
DBUG_PRINT("enter",
("Lock buffer #%u: %p", buffer->buffer_no,
buffer));
mysql_mutex_lock(&buffer->mutex);
DBUG_VOID_RETURN;
} | O3 | c | translog_buffer_lock:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
addq $0x100090, %rdi # imm = 0x100090
cmpq $0x0, 0x1000d0(%rax)
jne 0x44379
popq %rbp
jmp 0x29210
leaq 0x948e8(%rip), %rsi # 0xd8c68
movl $0x6cb, %edx # imm = 0x6CB
popq %rbp
jmp 0x2eb6f
| translog_buffer_lock:
push rbp
mov rbp, rsp
mov rax, rdi
add rdi, 100090h
cmp ds:qword_1000D0[rax], 0
jnz short loc_44379
pop rbp
jmp _pthread_mutex_lock
loc_44379:
lea rsi, aWorkspaceLlm4b_7; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 6CBh
pop rbp
jmp psi_mutex_lock
| long long translog_buffer_lock(long long a1)
{
long long v2; // rdi
v2 = a1 + 1048720;
if ( *(long long *)((char *)&qword_1000D0 + a1) )
return psi_mutex_lock(v2, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0x6CBu);
else
return pthread_mutex_lock(v2);
}
| translog_buffer_lock:
PUSH RBP
MOV RBP,RSP
MOV RAX,RDI
ADD RDI,0x100090
CMP qword ptr [RAX + 0x1000d0],0x0
JNZ 0x00144379
POP RBP
JMP 0x00129210
LAB_00144379:
LEA RSI,[0x1d8c68]
MOV EDX,0x6cb
POP RBP
JMP 0x0012eb6f
|
void translog_buffer_lock(long param_1)
{
pthread_mutex_t *__mutex;
__mutex = (pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + param_1);
if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_filesz + param_1) == 0) {
pthread_mutex_lock(__mutex);
return;
}
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x6cb);
return;
}
| |
54,628 | string_process_escapes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) | monkey531[P]llama/common/common.cpp | void string_process_escapes(std::string & input) {
std::size_t input_len = input.length();
std::size_t output_idx = 0;
for (std::size_t input_idx = 0; input_idx < input_len; ++input_idx) {
if (input[input_idx] == '\\' && input_idx + 1 < input_len) {
switch (input[++input_idx]) {
case 'n': input[output_idx++] = '\n'; break;
case 'r': input[output_idx++] = '\r'; break;
case 't': input[output_idx++] = '\t'; break;
case '\'': input[output_idx++] = '\''; break;
case '\"': input[output_idx++] = '\"'; break;
case '\\': input[output_idx++] = '\\'; break;
case 'x':
// Handle \x12, etc
if (input_idx + 2 < input_len) {
const char x[3] = { input[input_idx + 1], input[input_idx + 2], 0 };
char *err_p = nullptr;
const long val = std::strtol(x, &err_p, 16);
if (err_p == x + 2) {
input_idx += 2;
input[output_idx++] = char(val);
break;
}
}
// fall through
default: input[output_idx++] = '\\';
input[output_idx++] = input[input_idx]; break;
}
} else {
input[output_idx++] = input[input_idx];
}
}
input.resize(output_idx);
} | O3 | cpp | string_process_escapes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %r13
testq %r13, %r13
je 0x96c03
leaq 0xf(%rsp), %r12
xorl %r14d, %r14d
leaq 0xd(%rsp), %rdi
leaq 0x10(%rsp), %rsi
xorl %ecx, %ecx
movq (%rbx), %rax
movb (%rax,%rcx), %dl
cmpb $0x5c, %dl
jne 0x96b22
leaq 0x1(%rcx), %rbp
cmpq %r13, %rbp
jae 0x96b22
movzbl (%rax,%rbp), %edx
cmpl $0x6d, %edx
jle 0x96b3c
cmpl $0x73, %edx
jg 0x96b5d
cmpl $0x6e, %edx
je 0x96bcc
cmpl $0x72, %edx
jne 0x96bac
movb $0xd, (%rax,%r14)
jmp 0x96bdf
movb %dl, (%rax,%r14)
incq %r14
movq %rcx, %rbp
incq %rbp
movq %rbp, %rcx
cmpq %r13, %rbp
jb 0x96ae4
jmp 0x96c06
cmpl $0x22, %edx
je 0x96bc5
cmpl $0x27, %edx
je 0x96bda
cmpl $0x5c, %edx
jne 0x96bac
movb $0x5c, (%rax,%r14)
jmp 0x96bdf
cmpl $0x74, %edx
je 0x96bd3
cmpl $0x78, %edx
jne 0x96bac
leaq 0x3(%rcx), %r15
cmpq %r13, %r15
jae 0x96bac
movb 0x2(%rax,%rcx), %dl
movb %dl, 0xd(%rsp)
movb 0x3(%rax,%rcx), %al
movb %al, 0xe(%rsp)
movb $0x0, 0xf(%rsp)
movq $0x0, 0x10(%rsp)
movl $0x10, %edx
callq 0x1e180
cmpq %r12, 0x10(%rsp)
je 0x96be7
movq (%rbx), %rax
leaq 0xd(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movb $0x5c, (%rax,%r14)
movq (%rbx), %rax
movb (%rax,%rbp), %cl
movb %cl, 0x1(%rax,%r14)
addq $0x2, %r14
jmp 0x96b2c
movb $0x22, (%rax,%r14)
jmp 0x96bdf
movb $0xa, (%rax,%r14)
jmp 0x96bdf
movb $0x9, (%rax,%r14)
jmp 0x96bdf
movb $0x27, (%rax,%r14)
incq %r14
jmp 0x96b2c
movq (%rbx), %rcx
movb %al, (%rcx,%r14)
incq %r14
movq %r15, %rbp
leaq 0xd(%rsp), %rdi
leaq 0x10(%rsp), %rsi
jmp 0x96b2c
xorl %r14d, %r14d
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x1d300
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _Z22string_process_escapesRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
mov r13, [rdi+8]
test r13, r13
jz loc_96C03
lea r12, [rsp+48h+var_39]
xor r14d, r14d
lea rdi, [rsp+48h+var_3B]
lea rsi, [rsp+48h+var_38]
xor ecx, ecx
loc_96AE4:
mov rax, [rbx]
mov dl, [rax+rcx]
cmp dl, 5Ch ; '\'
jnz short loc_96B22
lea rbp, [rcx+1]
cmp rbp, r13
jnb short loc_96B22
movzx edx, byte ptr [rax+rbp]
cmp edx, 6Dh ; 'm'
jle short loc_96B3C
cmp edx, 73h ; 's'
jg short loc_96B5D
cmp edx, 6Eh ; 'n'
jz loc_96BCC
cmp edx, 72h ; 'r'
jnz loc_96BAC
mov byte ptr [rax+r14], 0Dh
jmp loc_96BDF
loc_96B22:
mov [rax+r14], dl
inc r14
mov rbp, rcx
loc_96B2C:
inc rbp
mov rcx, rbp
cmp rbp, r13
jb short loc_96AE4
jmp loc_96C06
loc_96B3C:
cmp edx, 22h ; '"'
jz loc_96BC5
cmp edx, 27h ; '''
jz loc_96BDA
cmp edx, 5Ch ; '\'
jnz short loc_96BAC
mov byte ptr [rax+r14], 5Ch ; '\'
jmp loc_96BDF
loc_96B5D:
cmp edx, 74h ; 't'
jz short loc_96BD3
cmp edx, 78h ; 'x'
jnz short loc_96BAC
lea r15, [rcx+3]
cmp r15, r13
jnb short loc_96BAC
mov dl, [rax+rcx+2]
mov [rsp+48h+var_3B], dl
mov al, [rax+rcx+3]
mov [rsp+48h+var_3A], al
mov [rsp+48h+var_39], 0
mov [rsp+48h+var_38], 0
mov edx, 10h
call _strtol
cmp [rsp+48h+var_38], r12
jz short loc_96BE7
mov rax, [rbx]
lea rdi, [rsp+48h+var_3B]
lea rsi, [rsp+48h+var_38]
loc_96BAC:
mov byte ptr [rax+r14], 5Ch ; '\'
mov rax, [rbx]
mov cl, [rax+rbp]
mov [rax+r14+1], cl
add r14, 2
jmp loc_96B2C
loc_96BC5:
mov byte ptr [rax+r14], 22h ; '"'
jmp short loc_96BDF
loc_96BCC:
mov byte ptr [rax+r14], 0Ah
jmp short loc_96BDF
loc_96BD3:
mov byte ptr [rax+r14], 9
jmp short loc_96BDF
loc_96BDA:
mov byte ptr [rax+r14], 27h ; '''
loc_96BDF:
inc r14
jmp loc_96B2C
loc_96BE7:
mov rcx, [rbx]
mov [rcx+r14], al
inc r14
mov rbp, r15
lea rdi, [rsp+48h+var_3B]
lea rsi, [rsp+48h+var_38]
jmp loc_96B2C
loc_96C03:
xor r14d, r14d
loc_96C06:
mov rdi, rbx
mov rsi, r14
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long string_process_escapes(long long *a1, long long a2, long long a3, long long a4)
{
unsigned long long v4; // r13
long long v5; // r14
long long v6; // rax
char v7; // dl
long long v8; // rbp
unsigned int v9; // edx
long long v10; // r15
char v11; // al
_BYTE v13[2]; // [rsp+Dh] [rbp-3Bh] BYREF
char v14; // [rsp+Fh] [rbp-39h] BYREF
char *v15; // [rsp+10h] [rbp-38h] BYREF
v4 = a1[1];
if ( v4 )
{
v5 = 0LL;
a4 = 0LL;
while ( 1 )
{
v6 = *a1;
v7 = *(_BYTE *)(*a1 + a4);
if ( v7 == 92 && (v8 = a4 + 1, a4 + 1 < v4) )
{
v9 = *(unsigned __int8 *)(v6 + v8);
if ( v9 <= 0x6D )
{
switch ( v9 )
{
case '"':
*(_BYTE *)(v6 + v5) = 34;
goto LABEL_27;
case '\'':
*(_BYTE *)(v6 + v5) = 39;
goto LABEL_27;
case '\\':
*(_BYTE *)(v6 + v5) = 92;
goto LABEL_27;
}
}
else if ( *(unsigned __int8 *)(v6 + v8) > 0x73u )
{
if ( v9 == 116 )
{
*(_BYTE *)(v6 + v5) = 9;
goto LABEL_27;
}
if ( v9 == 120 )
{
v10 = a4 + 3;
if ( a4 + 3 < v4 )
{
v13[0] = *(_BYTE *)(v6 + a4 + 2);
v13[1] = *(_BYTE *)(v6 + a4 + 3);
v14 = 0;
v15 = 0LL;
v11 = strtol(v13, &v15, 16LL);
if ( v15 == &v14 )
{
*(_BYTE *)(*a1 + v5++) = v11;
v8 = v10;
goto LABEL_11;
}
v6 = *a1;
}
}
}
else
{
if ( v9 == 110 )
{
*(_BYTE *)(v6 + v5) = 10;
goto LABEL_27;
}
if ( v9 == 114 )
{
*(_BYTE *)(v6 + v5) = 13;
LABEL_27:
++v5;
goto LABEL_11;
}
}
*(_BYTE *)(v6 + v5) = 92;
*(_BYTE *)(*a1 + v5 + 1) = *(_BYTE *)(*a1 + v8);
v5 += 2LL;
}
else
{
*(_BYTE *)(v6 + v5++) = v7;
v8 = a4;
}
LABEL_11:
a4 = v8 + 1;
if ( v8 + 1 >= v4 )
return std::string::resize(a1, v5, 0LL, a4);
}
}
v5 = 0LL;
return std::string::resize(a1, v5, 0LL, a4);
}
| string_process_escapes:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV R13,qword ptr [RDI + 0x8]
TEST R13,R13
JZ 0x00196c03
LEA R12,[RSP + 0xf]
XOR R14D,R14D
LEA RDI,[RSP + 0xd]
LEA RSI,[RSP + 0x10]
XOR ECX,ECX
LAB_00196ae4:
MOV RAX,qword ptr [RBX]
MOV DL,byte ptr [RAX + RCX*0x1]
CMP DL,0x5c
JNZ 0x00196b22
LEA RBP,[RCX + 0x1]
CMP RBP,R13
JNC 0x00196b22
MOVZX EDX,byte ptr [RAX + RBP*0x1]
CMP EDX,0x6d
JLE 0x00196b3c
CMP EDX,0x73
JG 0x00196b5d
CMP EDX,0x6e
JZ 0x00196bcc
CMP EDX,0x72
JNZ 0x00196bac
MOV byte ptr [RAX + R14*0x1],0xd
JMP 0x00196bdf
LAB_00196b22:
MOV byte ptr [RAX + R14*0x1],DL
INC R14
MOV RBP,RCX
LAB_00196b2c:
INC RBP
MOV RCX,RBP
CMP RBP,R13
JC 0x00196ae4
JMP 0x00196c06
LAB_00196b3c:
CMP EDX,0x22
JZ 0x00196bc5
CMP EDX,0x27
JZ 0x00196bda
CMP EDX,0x5c
JNZ 0x00196bac
MOV byte ptr [RAX + R14*0x1],0x5c
JMP 0x00196bdf
LAB_00196b5d:
CMP EDX,0x74
JZ 0x00196bd3
CMP EDX,0x78
JNZ 0x00196bac
LEA R15,[RCX + 0x3]
CMP R15,R13
JNC 0x00196bac
MOV DL,byte ptr [RAX + RCX*0x1 + 0x2]
MOV byte ptr [RSP + 0xd],DL
MOV AL,byte ptr [RAX + RCX*0x1 + 0x3]
MOV byte ptr [RSP + 0xe],AL
MOV byte ptr [RSP + 0xf],0x0
MOV qword ptr [RSP + 0x10],0x0
MOV EDX,0x10
CALL 0x0011e180
CMP qword ptr [RSP + 0x10],R12
JZ 0x00196be7
MOV RAX,qword ptr [RBX]
LEA RDI,[RSP + 0xd]
LEA RSI,[RSP + 0x10]
LAB_00196bac:
MOV byte ptr [RAX + R14*0x1],0x5c
MOV RAX,qword ptr [RBX]
MOV CL,byte ptr [RAX + RBP*0x1]
MOV byte ptr [RAX + R14*0x1 + 0x1],CL
ADD R14,0x2
JMP 0x00196b2c
LAB_00196bc5:
MOV byte ptr [RAX + R14*0x1],0x22
JMP 0x00196bdf
LAB_00196bcc:
MOV byte ptr [RAX + R14*0x1],0xa
JMP 0x00196bdf
LAB_00196bd3:
MOV byte ptr [RAX + R14*0x1],0x9
JMP 0x00196bdf
LAB_00196bda:
MOV byte ptr [RAX + R14*0x1],0x27
LAB_00196bdf:
INC R14
JMP 0x00196b2c
LAB_00196be7:
MOV RCX,qword ptr [RBX]
MOV byte ptr [RCX + R14*0x1],AL
INC R14
MOV RBP,R15
LEA RDI,[RSP + 0xd]
LEA RSI,[RSP + 0x10]
JMP 0x00196b2c
LAB_00196c03:
XOR R14D,R14D
LAB_00196c06:
MOV RDI,RBX
MOV RSI,R14
XOR EDX,EDX
CALL 0x0011d300
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* string_process_escapes(std::__cxx11::string&) */
void string_process_escapes(string *param_1)
{
ulong uVar1;
byte bVar2;
ulong uVar3;
long lVar4;
ulong uVar5;
long lVar6;
char local_3b;
int1 local_3a;
char local_39;
char *local_38;
uVar3 = *(ulong *)(param_1 + 8);
if (uVar3 == 0) {
lVar6 = 0;
}
else {
lVar6 = 0;
uVar5 = 0;
do {
lVar4 = *(long *)param_1;
if ((*(char *)(lVar4 + uVar5) == '\\') && (uVar1 = uVar5 + 1, uVar1 < uVar3)) {
bVar2 = *(byte *)(lVar4 + uVar1);
if (bVar2 < 0x6e) {
if (bVar2 == 0x22) {
*(int1 *)(lVar4 + lVar6) = 0x22;
}
else if (bVar2 == 0x27) {
*(int1 *)(lVar4 + lVar6) = 0x27;
}
else {
if (bVar2 != 0x5c) goto LAB_00196bac;
*(int1 *)(lVar4 + lVar6) = 0x5c;
}
}
else if (bVar2 < 0x74) {
if (bVar2 == 0x6e) {
*(int1 *)(lVar4 + lVar6) = 10;
}
else {
if (bVar2 != 0x72) goto LAB_00196bac;
*(int1 *)(lVar4 + lVar6) = 0xd;
}
}
else {
if (bVar2 != 0x74) {
if ((bVar2 == 0x78) && (uVar5 + 3 < uVar3)) {
local_3b = *(char *)(lVar4 + 2 + uVar5);
local_3a = *(int1 *)(lVar4 + 3 + uVar5);
local_39 = '\0';
local_38 = (char *)0x0;
lVar4 = strtol(&local_3b,&local_38,0x10);
if (local_38 == &local_39) {
*(char *)(*(long *)param_1 + lVar6) = (char)lVar4;
lVar6 = lVar6 + 1;
uVar5 = uVar5 + 3;
goto LAB_00196b2c;
}
lVar4 = *(long *)param_1;
}
LAB_00196bac:
*(int1 *)(lVar4 + lVar6) = 0x5c;
*(int1 *)(*(long *)param_1 + 1 + lVar6) =
*(int1 *)(*(long *)param_1 + uVar1);
lVar6 = lVar6 + 2;
uVar5 = uVar1;
goto LAB_00196b2c;
}
*(int1 *)(lVar4 + lVar6) = 9;
}
lVar6 = lVar6 + 1;
uVar5 = uVar1;
}
else {
*(char *)(lVar4 + lVar6) = *(char *)(lVar4 + uVar5);
lVar6 = lVar6 + 1;
}
LAB_00196b2c:
uVar5 = uVar5 + 1;
} while (uVar5 < uVar3);
}
std::__cxx11::string::resize((ulong)param_1,(char)lVar6);
return;
}
| |
54,629 | google::protobuf::DescriptorBuilder::AllocateNameStrings(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, google::protobuf::internal::FlatAllocator&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc | const std::string* DescriptorBuilder::AllocateNameStrings(
const std::string& scope, const std::string& proto_name,
internal::FlatAllocator& alloc) {
if (scope.empty()) {
return alloc.AllocateStrings(proto_name, proto_name);
} else {
return alloc.AllocateStrings(proto_name,
StrCat(scope, ".", proto_name));
}
} | O0 | cpp | google::protobuf::DescriptorBuilder::AllocateNameStrings(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, google::protobuf::internal::FlatAllocator&):
subq $0x128, %rsp # imm = 0x128
movq %rdi, 0x118(%rsp)
movq %rsi, 0x110(%rsp)
movq %rdx, 0x108(%rsp)
movq %rcx, 0x100(%rsp)
movq 0x110(%rsp), %rdi
callq 0x147f0
testb $0x1, %al
jne 0x5184a
jmp 0x51874
movq 0x100(%rsp), %rdi
movq 0x108(%rsp), %rsi
movq 0x108(%rsp), %rdx
callq 0x51970
movq %rax, 0x120(%rsp)
jmp 0x5194d
movq 0x100(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x108(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x110(%rsp), %rsi
leaq 0xb0(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x781b0
leaq 0x19c43e(%rip), %rsi # 0x1edced
leaq 0x80(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x76c30
movq 0x108(%rsp), %rsi
leaq 0x50(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x781b0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rcx
leaq 0xe0(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x2b220
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x51ad0
movq %rax, 0x38(%rsp)
jmp 0x51914
movq 0x38(%rsp), %rax
movq %rax, 0x120(%rsp)
leaq 0xe0(%rsp), %rdi
callq 0x13290
jmp 0x5194d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0xe0(%rsp), %rdi
callq 0x13290
jmp 0x5195d
movq 0x120(%rsp), %rax
addq $0x128, %rsp # imm = 0x128
retq
movq 0x48(%rsp), %rdi
callq 0x13750
nopw (%rax,%rax)
| _ZN6google8protobuf17DescriptorBuilder19AllocateNameStringsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_RNS0_8internal13FlatAllocatorE:
sub rsp, 128h
mov [rsp+128h+var_10], rdi
mov [rsp+128h+var_18], rsi
mov [rsp+128h+var_20], rdx
mov [rsp+128h+var_28], rcx
mov rdi, [rsp+128h+var_18]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_5184A
jmp short loc_51874
loc_5184A:
mov rdi, [rsp+128h+var_28]
mov rsi, [rsp+128h+var_20]
mov rdx, [rsp+128h+var_20]
call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE15AllocateStringsIJRKS8_SN_EEEPSM_DpOT_; google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::AllocateStrings<std::string const&,std::string const&>(std::string const&,std::string const&)
mov [rsp+128h+var_8], rax
jmp loc_5194D
loc_51874:
mov rax, [rsp+128h+var_28]
mov [rsp+128h+var_108], rax
mov rax, [rsp+128h+var_20]
mov [rsp+128h+var_100], rax
mov rsi, [rsp+128h+var_18]
lea rdi, [rsp+128h+var_78]
mov [rsp+128h+var_120], rdi
call _ZN6google8protobuf7strings8AlphaNumC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::strings::AlphaNum::AlphaNum(std::string const&)
lea rsi, aWhichIsNotDefi+77h; char *
lea rdi, [rsp+128h+var_A8]; this
mov [rsp+128h+var_118], rdi
call _ZN6google8protobuf7strings8AlphaNumC2EPKc; google::protobuf::strings::AlphaNum::AlphaNum(char const*)
mov rsi, [rsp+128h+var_20]
lea rdi, [rsp+128h+var_D8]
mov [rsp+128h+var_110], rdi
call _ZN6google8protobuf7strings8AlphaNumC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::strings::AlphaNum::AlphaNum(std::string const&)
mov rsi, [rsp+128h+var_120]
mov rdx, [rsp+128h+var_118]
mov rcx, [rsp+128h+var_110]
lea rdi, [rsp+128h+var_48]
mov [rsp+128h+var_F8], rdi
call _ZN6google8protobuf6StrCatB5cxx11ERKNS0_7strings8AlphaNumES4_S4_; google::protobuf::StrCat(google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&)
mov rdi, [rsp+128h+var_108]
mov rsi, [rsp+128h+var_100]
mov rdx, [rsp+128h+var_F8]
call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE15AllocateStringsIJRKS8_S8_EEEPSM_DpOT_; google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::AllocateStrings<std::string const&,std::string>(std::string const&,std::string &&)
mov [rsp+128h+var_F0], rax
jmp short $+2
loc_51914:
mov rax, [rsp+128h+var_F0]
mov [rsp+128h+var_8], rax
lea rdi, [rsp+128h+var_48]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_5194D
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
lea rdi, [rsp+arg_D8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_5195D
loc_5194D:
mov rax, [rsp+128h+var_8]
add rsp, 128h
retn
loc_5195D:
mov rdi, [rsp+arg_40]
call __Unwind_Resume
| long long google::protobuf::DescriptorBuilder::AllocateNameStrings(
long long a1,
long long a2,
long long a3,
long long a4)
{
int v4; // ecx
int v5; // r8d
int v6; // r9d
int v7; // ecx
int v8; // r8d
int v9; // r9d
int v11; // [rsp+20h] [rbp-108h]
int v12; // [rsp+28h] [rbp-100h]
_BYTE v13[48]; // [rsp+50h] [rbp-D8h] BYREF
_BYTE v14[48]; // [rsp+80h] [rbp-A8h] BYREF
_BYTE v15[48]; // [rsp+B0h] [rbp-78h] BYREF
_BYTE v16[32]; // [rsp+E0h] [rbp-48h] BYREF
long long v17; // [rsp+100h] [rbp-28h]
long long v18; // [rsp+108h] [rbp-20h]
long long v19; // [rsp+110h] [rbp-18h]
long long v20; // [rsp+118h] [rbp-10h]
long long v21; // [rsp+120h] [rbp-8h]
v20 = a1;
v19 = a2;
v18 = a3;
v17 = a4;
if ( std::string::empty(a2) )
return google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::AllocateStrings<std::string const&,std::string const&>(
v17,
v18,
v18,
v4,
v5,
v6);
v11 = v17;
v12 = v18;
google::protobuf::strings::AlphaNum::AlphaNum(v15, v19);
google::protobuf::strings::AlphaNum::AlphaNum((google::protobuf::strings::AlphaNum *)v14, ".");
google::protobuf::strings::AlphaNum::AlphaNum(v13, v18);
google::protobuf::StrCat[abi:cxx11](
(long long)v16,
(google::protobuf::strings::AlphaNum *)v15,
(google::protobuf::strings::AlphaNum *)v14,
(google::protobuf::strings::AlphaNum *)v13);
v21 = google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::AllocateStrings<std::string const&,std::string>(
v11,
v12,
(unsigned int)v16,
v7,
v8,
v9);
std::string::~string(v16);
return v21;
}
| AllocateNameStrings:
SUB RSP,0x128
MOV qword ptr [RSP + 0x118],RDI
MOV qword ptr [RSP + 0x110],RSI
MOV qword ptr [RSP + 0x108],RDX
MOV qword ptr [RSP + 0x100],RCX
MOV RDI,qword ptr [RSP + 0x110]
CALL 0x001147f0
TEST AL,0x1
JNZ 0x0015184a
JMP 0x00151874
LAB_0015184a:
MOV RDI,qword ptr [RSP + 0x100]
MOV RSI,qword ptr [RSP + 0x108]
MOV RDX,qword ptr [RSP + 0x108]
CALL 0x00151970
MOV qword ptr [RSP + 0x120],RAX
JMP 0x0015194d
LAB_00151874:
MOV RAX,qword ptr [RSP + 0x100]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x108]
MOV qword ptr [RSP + 0x28],RAX
MOV RSI,qword ptr [RSP + 0x110]
LEA RDI,[RSP + 0xb0]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x001781b0
LEA RSI,[0x2edced]
LEA RDI,[RSP + 0x80]
MOV qword ptr [RSP + 0x10],RDI
CALL 0x00176c30
MOV RSI,qword ptr [RSP + 0x108]
LEA RDI,[RSP + 0x50]
MOV qword ptr [RSP + 0x18],RDI
CALL 0x001781b0
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x18]
LEA RDI,[RSP + 0xe0]
MOV qword ptr [RSP + 0x30],RDI
CALL 0x0012b220
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
LAB_00151908:
CALL 0x00151ad0
LAB_0015190d:
MOV qword ptr [RSP + 0x38],RAX
JMP 0x00151914
LAB_00151914:
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x120],RAX
LEA RDI,[RSP + 0xe0]
CALL 0x00113290
JMP 0x0015194d
LAB_0015194d:
MOV RAX,qword ptr [RSP + 0x120]
ADD RSP,0x128
RET
|
/* google::protobuf::DescriptorBuilder::AllocateNameStrings(std::__cxx11::string const&,
std::__cxx11::string const&, google::protobuf::internal::FlatAllocator&) */
string * __thiscall
google::protobuf::DescriptorBuilder::AllocateNameStrings
(DescriptorBuilder *this,string *param_1,string *param_2,FlatAllocator *param_3)
{
FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>
*this_00;
string *psVar1;
ulong uVar2;
AlphaNum local_d8 [48];
AlphaNum local_a8 [48];
AlphaNum local_78 [48];
protobuf local_48 [32];
FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>
*local_28;
string *local_20;
string *local_18;
DescriptorBuilder *local_10;
string *local_8;
local_28 = (FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>
*)param_3;
local_20 = param_2;
local_18 = param_1;
local_10 = this;
uVar2 = std::__cxx11::string::empty(param_1);
psVar1 = local_20;
this_00 = local_28;
if ((uVar2 & 1) == 0) {
strings::AlphaNum::AlphaNum(local_78,local_18);
strings::AlphaNum::AlphaNum(local_a8,".");
strings::AlphaNum::AlphaNum(local_d8,local_20);
StrCat_abi_cxx11_(local_48,local_78,local_a8,local_d8);
/* try { // try from 00151908 to 0015190c has its CatchHandler @ 00151930 */
local_8 = (anonymous_namespace)::
FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>
::AllocateStrings<std::__cxx11::string_const&,std::__cxx11::string>
(this_00,psVar1,(string *)local_48);
std::__cxx11::string::~string((string *)local_48);
}
else {
local_8 = (anonymous_namespace)::
FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>
::AllocateStrings<std::__cxx11::string_const&,std::__cxx11::string_const&>
(local_28,local_20,local_20);
}
return local_8;
}
| |
54,630 | google::protobuf::DescriptorBuilder::AllocateNameStrings(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, google::protobuf::internal::FlatAllocator&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc | const std::string* DescriptorBuilder::AllocateNameStrings(
const std::string& scope, const std::string& proto_name,
internal::FlatAllocator& alloc) {
if (scope.empty()) {
return alloc.AllocateStrings(proto_name, proto_name);
} else {
return alloc.AllocateStrings(proto_name,
StrCat(scope, ".", proto_name));
}
} | O3 | cpp | google::protobuf::DescriptorBuilder::AllocateNameStrings(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, google::protobuf::internal::FlatAllocator&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq 0x8(%rsi), %rax
testq %rax, %rax
je 0x30900
movq (%rsi), %rcx
leaq 0x8(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, 0x8(%rsi)
leaq 0x85c47(%rip), %rax # 0xb64de
leaq 0x58(%rsp), %rdx
movq %rax, (%rdx)
movq $0x1, 0x8(%rdx)
movq (%r14), %rax
leaq 0x88(%rsp), %rcx
movq %rax, (%rcx)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rcx)
leaq 0x38(%rsp), %r15
movq %r15, %rdi
callq 0x19946
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x309b8
movq %rax, %rbx
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x308ee
callq 0xf330
movq %rbx, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rbx, %rdi
movl $0x2, %esi
callq 0x3b316
movq %rax, %rbx
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x13ffc
movq %rbx, %rdi
movq %r15, %rsi
callq 0xf620
leaq 0x68(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x58(%rsp), %rdi
callq 0x13ffc
leaq 0x20(%rbx), %rdi
leaq 0x58(%rsp), %r14
movq %r14, %rsi
callq 0xf620
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x30977
callq 0xf330
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
jne 0x308e9
jmp 0x308ee
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
jne 0x309aa
jmp 0x309af
movq %rax, %rbx
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x309af
callq 0xf330
movq %rbx, %rdi
callq 0xf570
nop
| _ZN6google8protobuf17DescriptorBuilder19AllocateNameStringsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_RNS0_8internal13FlatAllocatorE:
push r15
push r14
push r12
push rbx
sub rsp, 0B8h
mov rbx, rcx
mov r14, rdx
mov rax, [rsi+8]
test rax, rax
jz short loc_30900
mov rcx, [rsi]
lea rsi, [rsp+0D8h+var_D0]
mov [rsi], rcx
mov [rsi+8], rax
lea rax, aWhichIsNotDefi+77h; "."
lea rdx, [rsp+0D8h+var_80]
mov [rdx], rax
mov qword ptr [rdx+8], 1
mov rax, [r14]
lea rcx, [rsp+0D8h+var_50]
mov [rcx], rax
mov rax, [r14+8]
mov [rcx+8], rax
lea r15, [rsp+0D8h+var_A0]
mov rdi, r15
call _ZN6google8protobuf6StrCatB5cxx11ERKNS0_7strings8AlphaNumES4_S4_; google::protobuf::StrCat(google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&)
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE15AllocateStringsIJRKS8_S8_EEEPSM_DpOT_; google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::AllocateStrings<std::string const&,std::string>(std::string const&,std::string &&)
mov rbx, rax
lea rax, [rsp+0D8h+var_90]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_308EE
loc_308E9:
call __ZdlPv; operator delete(void *)
loc_308EE:
mov rax, rbx
add rsp, 0B8h
pop rbx
pop r12
pop r14
pop r15
retn
loc_30900:
mov rdi, rbx
mov esi, 2
call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE13AllocateArrayIS8_EEPT_i; google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::AllocateArray<std::string>(int)
mov rbx, rax
lea r12, [rsp+0D8h+var_C0]
mov [r12-10h], r12
mov rsi, [r14]
mov rdx, [r14+8]
add rdx, rsi
lea r15, [rsp+0D8h+var_D0]
mov rdi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rdi, rbx
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
lea r15, [rsp+0D8h+var_70]
mov [r15-10h], r15
mov rsi, [r14]
mov rdx, [r14+8]
add rdx, rsi
lea rdi, [rsp+0D8h+var_80]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rdi, [rbx+20h]
lea r14, [rsp+0D8h+var_80]
mov rsi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r14]; void *
cmp rdi, r15
jz short loc_30977
call __ZdlPv; operator delete(void *)
loc_30977:
mov rdi, [rsp+0D8h+var_D0]
cmp rdi, r12
jnz loc_308E9
jmp loc_308EE
mov rbx, rax
mov rdi, [rsp+arg_0]
cmp rdi, r12
jnz short loc_309AA
jmp short loc_309AF
mov rbx, rax
lea rax, [rsp+arg_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_309AF
loc_309AA:
call __ZdlPv; operator delete(void *)
loc_309AF:
mov rdi, rbx
call __Unwind_Resume
| _QWORD * google::protobuf::DescriptorBuilder::AllocateNameStrings(
_DWORD a1,
_QWORD *a2,
_BYTE **a3,
long long a4,
int a5,
int a6)
{
long long v8; // rax
_QWORD *v9; // rbx
void *v10; // rdi
_QWORD v12[2]; // [rsp+8h] [rbp-D0h] BYREF
_BYTE v13[32]; // [rsp+18h] [rbp-C0h] BYREF
long long v14[2]; // [rsp+38h] [rbp-A0h] BYREF
char v15; // [rsp+48h] [rbp-90h] BYREF
void *v16[2]; // [rsp+58h] [rbp-80h] BYREF
_BYTE v17[32]; // [rsp+68h] [rbp-70h] BYREF
_QWORD v18[10]; // [rsp+88h] [rbp-50h] BYREF
v8 = a2[1];
if ( v8 )
{
v12[0] = *a2;
v12[1] = v8;
v16[0] = ".";
v16[1] = &dword_0 + 1;
v18[0] = *a3;
v18[1] = a3[1];
google::protobuf::StrCat[abi:cxx11](v14, (long long)v12, (long long)v16, (long long)v18);
v9 = (_QWORD *)google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::AllocateStrings<std::string const&,std::string>(
a4,
a3,
v14);
v10 = (void *)v14[0];
if ( (char *)v14[0] != &v15 )
LABEL_3:
operator delete(v10);
}
else
{
v9 = (_QWORD *)google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::AllocateArray<std::string>(
a4,
2,
(_DWORD)a3,
a4,
a5,
a6);
v12[0] = v13;
std::string::_M_construct<char *>(v12, *a3, (long long)&a3[1][(_QWORD)*a3]);
std::string::operator=(v9, (long long)v12);
v16[0] = v17;
std::string::_M_construct<char *>(v16, *a3, (long long)&a3[1][(_QWORD)*a3]);
std::string::operator=(v9 + 4, (long long)v16);
if ( v16[0] != v17 )
operator delete(v16[0]);
v10 = (void *)v12[0];
if ( (_BYTE *)v12[0] != v13 )
goto LABEL_3;
}
return v9;
}
| AllocateNameStrings:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0xb8
MOV RBX,RCX
MOV R14,RDX
MOV RAX,qword ptr [RSI + 0x8]
TEST RAX,RAX
JZ 0x00130900
MOV RCX,qword ptr [RSI]
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI],RCX
MOV qword ptr [RSI + 0x8],RAX
LEA RAX,[0x1b64de]
LEA RDX,[RSP + 0x58]
MOV qword ptr [RDX],RAX
MOV qword ptr [RDX + 0x8],0x1
MOV RAX,qword ptr [R14]
LEA RCX,[RSP + 0x88]
MOV qword ptr [RCX],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RCX + 0x8],RAX
LEA R15,[RSP + 0x38]
MOV RDI,R15
CALL 0x00119946
LAB_001308ca:
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x001309b8
LAB_001308d8:
MOV RBX,RAX
LEA RAX,[RSP + 0x48]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001308ee
LAB_001308e9:
CALL 0x0010f330
LAB_001308ee:
MOV RAX,RBX
ADD RSP,0xb8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_00130900:
MOV RDI,RBX
MOV ESI,0x2
CALL 0x0013b316
MOV RBX,RAX
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
ADD RDX,RSI
LEA R15,[RSP + 0x8]
MOV RDI,R15
CALL 0x00113ffc
MOV RDI,RBX
MOV RSI,R15
CALL 0x0010f620
LEA R15,[RSP + 0x68]
MOV qword ptr [R15 + -0x10],R15
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
ADD RDX,RSI
LAB_0013094f:
LEA RDI,[RSP + 0x58]
CALL 0x00113ffc
LAB_00130959:
LEA RDI,[RBX + 0x20]
LEA R14,[RSP + 0x58]
MOV RSI,R14
CALL 0x0010f620
MOV RDI,qword ptr [R14]
CMP RDI,R15
JZ 0x00130977
CALL 0x0010f330
LAB_00130977:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JNZ 0x001308e9
JMP 0x001308ee
|
/* google::protobuf::DescriptorBuilder::AllocateNameStrings(std::__cxx11::string const&,
std::__cxx11::string const&, google::protobuf::internal::FlatAllocator&) */
string * __thiscall
google::protobuf::DescriptorBuilder::AllocateNameStrings
(DescriptorBuilder *this,string *param_1,string *param_2,FlatAllocator *param_3)
{
string *this_00;
int1 *local_d0;
long local_c8;
int1 local_c0 [32];
int1 *local_a0 [2];
int1 local_90 [16];
char *local_80;
int8 local_78;
char local_70 [32];
int8 local_50;
int8 local_48;
if (*(long *)(param_1 + 8) == 0) {
this_00 = (anonymous_namespace)::
FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>
::AllocateArray<std::__cxx11::string>
((FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>
*)param_3,2);
local_d0 = local_c0;
std::__cxx11::string::_M_construct<char*>
((string *)&local_d0,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2);
std::__cxx11::string::operator=(this_00,(string *)&local_d0);
/* try { // try from 0013094f to 00130958 has its CatchHandler @ 0013098a */
local_80 = local_70;
std::__cxx11::string::_M_construct<char*>
(&local_80,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2);
std::__cxx11::string::operator=(this_00 + 0x20,(string *)&local_80);
if (local_80 != local_70) {
operator_delete(local_80);
}
local_a0[0] = local_d0;
if (local_d0 == local_c0) {
return this_00;
}
}
else {
local_d0 = *(int1 **)param_1;
local_80 = ".";
local_78 = 1;
local_50 = *(int8 *)param_2;
local_48 = *(int8 *)(param_2 + 8);
local_c8 = *(long *)(param_1 + 8);
StrCat_abi_cxx11_((protobuf *)local_a0,(AlphaNum *)&local_d0,(AlphaNum *)&local_80,
(AlphaNum *)&local_50);
/* try { // try from 001308ca to 001308d7 has its CatchHandler @ 00130999 */
this_00 = (anonymous_namespace)::
FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>
::AllocateStrings<std::__cxx11::string_const&,std::__cxx11::string>
((FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>
*)param_3,param_2,(string *)local_a0);
if (local_a0[0] == local_90) {
return this_00;
}
}
operator_delete(local_a0[0]);
return this_00;
}
| |
54,631 | my_hash_sort_utf16_bin | eloqsql/strings/ctype-ucs2.c | static void
my_hash_sort_utf16_bin(CHARSET_INFO *cs,
const uchar *pos, size_t len, ulong *nr1, ulong *nr2)
{
size_t lengthsp= my_ci_lengthsp(cs, (const char *) pos, len);
my_hash_sort_utf16_nopad_bin(cs, pos, lengthsp, nr1, nr2);
} | O3 | c | my_hash_sort_utf16_bin:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rsi, %r15
movq 0xb8(%rdi), %rax
callq *0x18(%rax)
movq (%r14), %rcx
movq (%rbx), %rdx
testq %rax, %rax
jle 0xa58b5
addq %r15, %rax
movl %ecx, %esi
andl $0x3f, %esi
addq %rdx, %rsi
movzbl (%r15), %edi
imulq %rsi, %rdi
movq %rcx, %rsi
shlq $0x8, %rsi
addq %rdi, %rsi
xorq %rsi, %rcx
addq $0x3, %rdx
incq %r15
cmpq %rax, %r15
jb 0xa588c
movq %rcx, (%r14)
movq %rdx, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| my_hash_sort_utf16_bin:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, r8
mov r14, rcx
mov r15, rsi
mov rax, [rdi+0B8h]
call qword ptr [rax+18h]
mov rcx, [r14]
mov rdx, [rbx]
test rax, rax
jle short loc_A58B5
add rax, r15
loc_A588C:
mov esi, ecx
and esi, 3Fh
add rsi, rdx
movzx edi, byte ptr [r15]
imul rdi, rsi
mov rsi, rcx
shl rsi, 8
add rsi, rdi
xor rcx, rsi
add rdx, 3
inc r15
cmp r15, rax
jb short loc_A588C
loc_A58B5:
mov [r14], rcx
mov [rbx], rdx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long my_hash_sort_utf16_bin(long long a1, unsigned __int8 *a2, long long a3, long long *a4, long long *a5)
{
unsigned __int8 *v7; // r15
long long result; // rax
long long v9; // rcx
long long v10; // rdx
v7 = a2;
result = (*(long long ( **)(long long))(*(_QWORD *)(a1 + 184) + 24LL))(a1);
v9 = *a4;
v10 = *a5;
if ( result > 0 )
{
result += (long long)a2;
do
{
v9 ^= (v10 + (v9 & 0x3F)) * *v7 + (v9 << 8);
v10 += 3LL;
++v7;
}
while ( (unsigned long long)v7 < result );
}
*a4 = v9;
*a5 = v10;
return result;
}
| my_hash_sort_utf16_bin:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,R8
MOV R14,RCX
MOV R15,RSI
MOV RAX,qword ptr [RDI + 0xb8]
CALL qword ptr [RAX + 0x18]
MOV RCX,qword ptr [R14]
MOV RDX,qword ptr [RBX]
TEST RAX,RAX
JLE 0x001a58b5
ADD RAX,R15
LAB_001a588c:
MOV ESI,ECX
AND ESI,0x3f
ADD RSI,RDX
MOVZX EDI,byte ptr [R15]
IMUL RDI,RSI
MOV RSI,RCX
SHL RSI,0x8
ADD RSI,RDI
XOR RCX,RSI
ADD RDX,0x3
INC R15
CMP R15,RAX
JC 0x001a588c
LAB_001a58b5:
MOV qword ptr [R14],RCX
MOV qword ptr [RBX],RDX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void my_hash_sort_utf16_bin
(long param_1,byte *param_2,int8 param_3,ulong *param_4,long *param_5)
{
long lVar1;
byte *pbVar2;
ulong uVar3;
long lVar4;
lVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x18))();
uVar3 = *param_4;
lVar4 = *param_5;
if (0 < lVar1) {
pbVar2 = param_2 + lVar1;
do {
uVar3 = uVar3 ^ uVar3 * 0x100 + (ulong)*param_2 * ((ulong)((uint)uVar3 & 0x3f) + lVar4);
lVar4 = lVar4 + 3;
param_2 = param_2 + 1;
} while (param_2 < pbVar2);
}
*param_4 = uVar3;
*param_5 = lVar4;
return;
}
| |
54,632 | blst_aggregate_in_g1 | corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/aggregate.c | BLST_ERROR blst_aggregate_in_g1(POINTonE1 *out, const POINTonE1 *in,
const unsigned char *zwire)
{
POINTonE1 P[1];
BLST_ERROR ret;
ret = POINTonE1_Deserialize_Z((POINTonE1_affine *)P, zwire);
if (ret != BLST_SUCCESS)
return ret;
if (vec_is_zero(P, sizeof(POINTonE1_affine))) {
if (in == NULL)
vec_zero(out, sizeof(*out));
return BLST_SUCCESS;
}
vec_copy(P->Z, BLS12_381_Rx.p, sizeof(P->Z));
if (!POINTonE1_in_G1(P))
return BLST_POINT_NOT_IN_GROUP;
if (in == NULL)
vec_copy(out, P, sizeof(P));
else
POINTonE1_dadd_affine(out, in, (POINTonE1_affine *)P);
return BLST_SUCCESS;
} | O1 | c | blst_aggregate_in_g1:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0xa0(%rbp), %rdi
movq %rdx, %rsi
callq 0x19af6
testl %eax, %eax
jne 0x21e66
leaq -0xa0(%rbp), %rdi
movl $0x60, %esi
callq 0x30680
testq %rax, %rax
je 0x21dfb
xorl %eax, %eax
testq %r14, %r14
jne 0x21e66
xorl %eax, %eax
movq $0x0, (%rbx,%rax,8)
incq %rax
cmpq $0x12, %rax
jne 0x21de8
jmp 0x21e64
movups 0x1dd76(%rip), %xmm0 # 0x3fb78
leaq -0xa0(%rbp), %rdi
movaps %xmm0, 0x80(%rdi)
movups 0x1dd51(%rip), %xmm0 # 0x3fb68
movaps %xmm0, 0x70(%rdi)
movups 0x1dd36(%rip), %xmm0 # 0x3fb58
movaps %xmm0, 0x60(%rdi)
callq 0x1bed0
testq %rax, %rax
je 0x21e49
testq %r14, %r14
je 0x21e50
leaq -0xa0(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1a723
jmp 0x21e64
movl $0x3, %eax
jmp 0x21e66
leaq -0xa0(%rbp), %rsi
movl $0x90, %edx
movq %rbx, %rdi
callq 0x5060
xorl %eax, %eax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
| blst_aggregate_in_g1:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 90h
mov r14, rsi
mov rbx, rdi
lea rdi, [rbp+var_A0]
mov rsi, rdx
call POINTonE1_Deserialize_Z
test eax, eax
jnz loc_21E66
lea rdi, [rbp+var_A0]
mov esi, 60h ; '`'
call vec_is_zero_16x
test rax, rax
jz short loc_21DFB
xor eax, eax
test r14, r14
jnz loc_21E66
xor eax, eax
loc_21DE8:
mov qword ptr [rbx+rax*8], 0
inc rax
cmp rax, 12h
jnz short loc_21DE8
jmp short loc_21E64
loc_21DFB:
movups xmm0, cs:xmmword_3FB78
lea rdi, [rbp+var_A0]
movaps xmmword ptr [rdi+80h], xmm0
movups xmm0, cs:xmmword_3FB68
movaps xmmword ptr [rdi+70h], xmm0
movups xmm0, cs:BLS12_381_Rx
movaps xmmword ptr [rdi+60h], xmm0
call POINTonE1_in_G1
test rax, rax
jz short loc_21E49
test r14, r14
jz short loc_21E50
lea rdx, [rbp+var_A0]
mov rdi, rbx
mov rsi, r14
call POINTonE1_dadd_affine
jmp short loc_21E64
loc_21E49:
mov eax, 3
jmp short loc_21E66
loc_21E50:
lea rsi, [rbp+var_A0]
mov edx, 90h
mov rdi, rbx
call _memcpy
loc_21E64:
xor eax, eax
loc_21E66:
add rsp, 90h
pop rbx
pop r14
pop rbp
retn
| long long blst_aggregate_in_g1(long long a1, long long a2, unsigned __int8 *a3)
{
long long result; // rax
long long i; // rax
_QWORD v5[12]; // [rsp+0h] [rbp-A0h] BYREF
__int128 v6; // [rsp+60h] [rbp-40h]
__int128 v7; // [rsp+70h] [rbp-30h]
__int128 v8; // [rsp+80h] [rbp-20h]
result = POINTonE1_Deserialize_Z(v5, a3);
if ( !(_DWORD)result )
{
if ( vec_is_zero_16x(v5, 96LL) )
{
result = 0LL;
if ( a2 )
return result;
for ( i = 0LL; i != 18; ++i )
*(_QWORD *)(a1 + 8 * i) = 0LL;
}
else
{
v8 = xmmword_3FB78;
v7 = xmmword_3FB68;
v6 = BLS12_381_Rx;
if ( !POINTonE1_in_G1((char *)v5) )
return 3LL;
if ( a2 )
POINTonE1_dadd_affine(a1, a2, (long long)v5);
else
memcpy(a1, v5, 144LL);
}
return 0LL;
}
return result;
}
| blst_aggregate_in_g1:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x90
MOV R14,RSI
MOV RBX,RDI
LEA RDI,[RBP + -0xa0]
MOV RSI,RDX
CALL 0x00119af6
TEST EAX,EAX
JNZ 0x00121e66
LEA RDI,[RBP + -0xa0]
MOV ESI,0x60
CALL 0x00130680
TEST RAX,RAX
JZ 0x00121dfb
XOR EAX,EAX
TEST R14,R14
JNZ 0x00121e66
XOR EAX,EAX
LAB_00121de8:
MOV qword ptr [RBX + RAX*0x8],0x0
INC RAX
CMP RAX,0x12
JNZ 0x00121de8
JMP 0x00121e64
LAB_00121dfb:
MOVUPS XMM0,xmmword ptr [0x0013fb78]
LEA RDI,[RBP + -0xa0]
MOVAPS xmmword ptr [RDI + 0x80],XMM0
MOVUPS XMM0,xmmword ptr [0x0013fb68]
MOVAPS xmmword ptr [RDI + 0x70],XMM0
MOVUPS XMM0,xmmword ptr [0x0013fb58]
MOVAPS xmmword ptr [RDI + 0x60],XMM0
CALL 0x0011bed0
TEST RAX,RAX
JZ 0x00121e49
TEST R14,R14
JZ 0x00121e50
LEA RDX,[RBP + -0xa0]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011a723
JMP 0x00121e64
LAB_00121e49:
MOV EAX,0x3
JMP 0x00121e66
LAB_00121e50:
LEA RSI,[RBP + -0xa0]
MOV EDX,0x90
MOV RDI,RBX
CALL 0x00105060
LAB_00121e64:
XOR EAX,EAX
LAB_00121e66:
ADD RSP,0x90
POP RBX
POP R14
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int8 blst_aggregate_in_g1(void *param_1,long param_2,int8 param_3)
{
int8 uVar1;
long lVar2;
int1 local_a8 [96];
int4 local_48;
int4 uStack_44;
int4 uStack_40;
int4 uStack_3c;
int8 local_38;
int8 uStack_30;
int8 local_28;
int8 uStack_20;
uVar1 = POINTonE1_Deserialize_Z(local_a8,param_3);
if ((int)uVar1 == 0) {
lVar2 = vec_is_zero_16x(local_a8,0x60);
if (lVar2 == 0) {
local_28 = _DAT_0013fb78;
uStack_20 = _UNK_0013fb80;
local_38 = _DAT_0013fb68;
uStack_30 = _UNK_0013fb70;
local_48 = (int4)BLS12_381_Rx;
uStack_44 = BLS12_381_Rx._4_4_;
uStack_40 = _UNK_0013fb60;
uStack_3c = _UNK_0013fb64;
lVar2 = POINTonE1_in_G1();
if (lVar2 == 0) {
return 3;
}
if (param_2 == 0) {
memcpy(param_1,local_a8,0x90);
}
else {
POINTonE1_dadd_affine(param_1,param_2,local_a8);
}
}
else {
if (param_2 != 0) {
return 0;
}
lVar2 = 0;
do {
*(int8 *)((long)param_1 + lVar2 * 8) = 0;
lVar2 = lVar2 + 1;
} while (lVar2 != 0x12);
}
uVar1 = 0;
}
return uVar1;
}
| |
54,633 | my_mb_wc_euc_kr | eloqsql/strings/ctype-euc_kr.c | static int
my_mb_wc_euc_kr(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)
{
pwc[0]=hi;
return 1;
}
if (s+2>e)
return MY_CS_TOOSMALL2;
if (!IS_MB2_CHAR(hi, s[1]))
return MY_CS_ILSEQ;
if (!(pwc[0]=func_ksc5601_uni_onechar((hi<<8)+s[1])))
return -2;
return 2;
} | O3 | c | my_mb_wc_euc_kr:
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x32ea1
movsbq (%rdx), %rdi
testq %rdi, %rdi
js 0x32e60
movq %rdi, (%rsi)
movl $0x1, %eax
retq
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0x32ea1
movzbl %dil, %ecx
xorl %eax, %eax
cmpl $0x80, %ecx
je 0x32ea1
cmpl $0xff, %ecx
je 0x32ea1
movzbl 0x1(%rdx), %edx
leal 0x1(%rdx), %edi
cmpb $-0x7f, %dil
ja 0x32ea2
movl %edx, %edi
andb $-0x21, %dil
addb $-0x5b, %dil
cmpb $-0x1a, %dil
jae 0x32ea2
retq
pushq %rbp
movq %rsp, %rbp
shll $0x8, %ecx
leal (%rcx,%rdx), %eax
addl $0xffff7ebf, %eax # imm = 0xFFFF7EBF
cmpl $0x47bd, %eax # imm = 0x47BD
ja 0x32ec3
movl %eax, %eax
leaq 0x86d5f(%rip), %rcx # 0xb9c20
jmp 0x32edc
orl %edx, %ecx
addl $0xffff355f, %ecx # imm = 0xFFFF355F
cmpl $0x335e, %ecx # imm = 0x335E
jae 0x32ef5
movl %ecx, %eax
leaq 0x8fcc4(%rip), %rcx # 0xc2ba0
leaq (%rcx,%rax,2), %rax
movzwl (%rax), %eax
movzwl %ax, %ecx
movq %rcx, (%rsi)
movl $0x2, %eax
testw %cx, %cx
jne 0x32f01
jmp 0x32efc
movq $0x0, (%rsi)
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
popq %rbp
retq
| my_mb_wc_euc_kr:
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_32EA1
movsx rdi, byte ptr [rdx]
test rdi, rdi
js short loc_32E60
mov [rsi], rdi
mov eax, 1
retn
loc_32E60:
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja short locret_32EA1
movzx ecx, dil
xor eax, eax
cmp ecx, 80h
jz short locret_32EA1
cmp ecx, 0FFh
jz short locret_32EA1
movzx edx, byte ptr [rdx+1]
lea edi, [rdx+1]
cmp dil, 81h
ja short loc_32EA2
mov edi, edx
and dil, 0DFh
add dil, 0A5h
cmp dil, 0E6h
jnb short loc_32EA2
locret_32EA1:
retn
loc_32EA2:
push rbp
mov rbp, rsp
shl ecx, 8
lea eax, [rcx+rdx]
add eax, 0FFFF7EBFh
cmp eax, 47BDh
ja short loc_32EC3
mov eax, eax
lea rcx, tab_ksc5601_uni0
jmp short loc_32EDC
loc_32EC3:
or ecx, edx
add ecx, 0FFFF355Fh
cmp ecx, 335Eh
jnb short loc_32EF5
mov eax, ecx
lea rcx, tab_ksc5601_uni1
loc_32EDC:
lea rax, [rcx+rax*2]
movzx eax, word ptr [rax]
movzx ecx, ax
mov [rsi], rcx
mov eax, 2
test cx, cx
jnz short loc_32F01
jmp short loc_32EFC
loc_32EF5:
mov qword ptr [rsi], 0
loc_32EFC:
mov eax, 0FFFFFFFEh
loc_32F01:
pop rbp
retn
| long long my_mb_wc_euc_kr(long long a1, long long *a2, char *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rdi
int v6; // edx
int v7; // ecx
long long v8; // rax
unsigned __int16 *v9; // rcx
unsigned int v10; // ecx
long long v11; // rcx
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
v5 = *a3;
if ( v5 >= 0 )
{
*a2 = v5;
return 1LL;
}
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
result = 0LL;
if ( (unsigned __int8)v5 != 128 && (unsigned __int8)v5 != 255 )
{
v6 = (unsigned __int8)a3[1];
if ( (unsigned __int8)(v6 + 1) > 0x81u || (unsigned __int8)((v6 & 0xDF) - 91) >= 0xE6u )
{
v7 = (unsigned __int8)v5 << 8;
LODWORD(v8) = v7 + v6 - 33089;
if ( (unsigned int)v8 > 0x47BD )
{
v10 = (v6 | v7) - 51873;
if ( v10 >= 0x335E )
{
*a2 = 0LL;
return 4294967294LL;
}
v8 = v10;
v9 = (unsigned __int16 *)&tab_ksc5601_uni1;
}
else
{
v8 = (unsigned int)v8;
v9 = (unsigned __int16 *)&tab_ksc5601_uni0;
}
v11 = v9[v8];
*a2 = v11;
result = 2LL;
if ( (_WORD)v11 )
return result;
return 4294967294LL;
}
}
}
}
return result;
}
| my_mb_wc_euc_kr:
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x00132ea1
MOVSX RDI,byte ptr [RDX]
TEST RDI,RDI
JS 0x00132e60
MOV qword ptr [RSI],RDI
MOV EAX,0x1
RET
LAB_00132e60:
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x00132ea1
MOVZX ECX,DIL
XOR EAX,EAX
CMP ECX,0x80
JZ 0x00132ea1
CMP ECX,0xff
JZ 0x00132ea1
MOVZX EDX,byte ptr [RDX + 0x1]
LEA EDI,[RDX + 0x1]
CMP DIL,0x81
JA 0x00132ea2
MOV EDI,EDX
AND DIL,0xdf
ADD DIL,0xa5
CMP DIL,0xe6
JNC 0x00132ea2
LAB_00132ea1:
RET
LAB_00132ea2:
PUSH RBP
MOV RBP,RSP
SHL ECX,0x8
LEA EAX,[RCX + RDX*0x1]
ADD EAX,0xffff7ebf
CMP EAX,0x47bd
JA 0x00132ec3
MOV EAX,EAX
LEA RCX,[0x1b9c20]
JMP 0x00132edc
LAB_00132ec3:
OR ECX,EDX
ADD ECX,0xffff355f
CMP ECX,0x335e
JNC 0x00132ef5
MOV EAX,ECX
LEA RCX,[0x1c2ba0]
LAB_00132edc:
LEA RAX,[RCX + RAX*0x2]
MOVZX EAX,word ptr [RAX]
MOVZX ECX,AX
MOV qword ptr [RSI],RCX
MOV EAX,0x2
TEST CX,CX
JNZ 0x00132f01
JMP 0x00132efc
LAB_00132ef5:
MOV qword ptr [RSI],0x0
LAB_00132efc:
MOV EAX,0xfffffffe
LAB_00132f01:
POP RBP
RET
|
int8 my_mb_wc_euc_kr(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
byte bVar1;
byte bVar2;
ushort uVar3;
uint uVar4;
int1 *puVar5;
if (param_4 <= param_3) {
return 0xffffff9b;
}
bVar1 = *param_3;
if (-1 < (long)(char)bVar1) {
*param_2 = (long)(char)bVar1;
return 1;
}
if (param_4 < param_3 + 2) {
return 0xffffff9a;
}
if (bVar1 == 0x80) {
return 0;
}
if (bVar1 == 0xff) {
return 0;
}
bVar2 = param_3[1];
if (((byte)(bVar2 + 1) < 0x82) && ((byte)((bVar2 & 0xdf) + 0xa5) < 0xe6)) {
return 0;
}
uVar4 = ((uint)bVar1 * 0x100 + (uint)bVar2) - 0x8141;
if (uVar4 < 0x47be) {
puVar5 = tab_ksc5601_uni0;
}
else {
uVar4 = CONCAT11(bVar1,bVar2) - 0xcaa1;
if (0x335d < uVar4) {
*param_2 = 0;
return 0xfffffffe;
}
puVar5 = tab_ksc5601_uni1;
}
uVar3 = *(ushort *)(puVar5 + (ulong)uVar4 * 2);
*param_2 = (ulong)uVar3;
if (uVar3 == 0) {
return 0xfffffffe;
}
return 2;
}
| |
54,634 | nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>>::~iteration_proxy_value() | monkey531[P]llama/common/json.hpp | ~iteration_proxy_value() = default; | O1 | cpp | nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>>::~iteration_proxy_value():
pushq %rbx
movq %rdi, %rbx
movq 0x50(%rdi), %rdi
leaq 0x60(%rbx), %rax
cmpq %rax, %rdi
je 0xaa2ac
movq (%rax), %rsi
incq %rsi
callq 0x1a890
movq 0x30(%rbx), %rdi
addq $0x40, %rbx
cmpq %rbx, %rdi
je 0xaa2c5
movq (%rbx), %rsi
incq %rsi
popq %rbx
jmp 0x1a890
popq %rbx
retq
nop
| _ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEED2Ev:
push rbx
mov rbx, rdi
mov rdi, [rdi+50h]; void *
lea rax, [rbx+60h]
cmp rdi, rax
jz short loc_AA2AC
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_AA2AC:
mov rdi, [rbx+30h]; void *
add rbx, 40h ; '@'
cmp rdi, rbx
jz short loc_AA2C5
mov rsi, [rbx]
inc rsi; unsigned __int64
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
loc_AA2C5:
pop rbx
retn
| void nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::~iteration_proxy_value(
_QWORD *a1)
{
_QWORD *v2; // rdi
_QWORD *v3; // rdi
_QWORD *v4; // rbx
v2 = (_QWORD *)a1[10];
if ( v2 != a1 + 12 )
operator delete(v2, a1[12] + 1LL);
v3 = (_QWORD *)a1[6];
v4 = a1 + 8;
if ( v3 != v4 )
operator delete(v3, *v4 + 1LL);
}
| ~iteration_proxy_value:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x50]
LEA RAX,[RBX + 0x60]
CMP RDI,RAX
JZ 0x001aa2ac
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x0011a890
LAB_001aa2ac:
MOV RDI,qword ptr [RBX + 0x30]
ADD RBX,0x40
CMP RDI,RBX
JZ 0x001aa2c5
MOV RSI,qword ptr [RBX]
INC RSI
POP RBX
JMP 0x0011a890
LAB_001aa2c5:
POP RBX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__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> >::~iteration_proxy_value() */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__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>>
::~iteration_proxy_value
(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
*this)
{
if (*(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
**)(this + 0x50) != this + 0x60) {
operator_delete(*(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
**)(this + 0x50),*(long *)(this + 0x60) + 1);
}
if (*(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
**)(this + 0x30) != this + 0x40) {
operator_delete(*(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
**)(this + 0x30),*(long *)(this + 0x40) + 1);
return;
}
return;
}
| |
54,635 | nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>>::~iteration_proxy_value() | monkey531[P]llama/common/json.hpp | ~iteration_proxy_value() = default; | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>>::~iteration_proxy_value():
pushq %rbx
movq %rdi, %rbx
movq 0x50(%rdi), %rdi
leaq 0x60(%rbx), %rax
cmpq %rax, %rdi
je 0xac6c2
movq (%rax), %rsi
incq %rsi
callq 0x1a890
movq 0x30(%rbx), %rdi
addq $0x40, %rbx
cmpq %rbx, %rdi
je 0xac6db
movq (%rbx), %rsi
incq %rsi
popq %rbx
jmp 0x1a890
popq %rbx
retq
nop
| _ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEED2Ev:
push rbx
mov rbx, rdi
mov rdi, [rdi+50h]; void *
lea rax, [rbx+60h]
cmp rdi, rax
jz short loc_AC6C2
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_AC6C2:
mov rdi, [rbx+30h]; void *
add rbx, 40h ; '@'
cmp rdi, rbx
jz short loc_AC6DB
mov rsi, [rbx]
inc rsi; unsigned __int64
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
loc_AC6DB:
pop rbx
retn
| void nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::~iteration_proxy_value(
_QWORD *a1)
{
_QWORD *v2; // rdi
_QWORD *v3; // rdi
_QWORD *v4; // rbx
v2 = (_QWORD *)a1[10];
if ( v2 != a1 + 12 )
operator delete(v2, a1[12] + 1LL);
v3 = (_QWORD *)a1[6];
v4 = a1 + 8;
if ( v3 != v4 )
operator delete(v3, *v4 + 1LL);
}
| ~iteration_proxy_value:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x50]
LEA RAX,[RBX + 0x60]
CMP RDI,RAX
JZ 0x001ac6c2
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x0011a890
LAB_001ac6c2:
MOV RDI,qword ptr [RBX + 0x30]
ADD RBX,0x40
CMP RDI,RBX
JZ 0x001ac6db
MOV RSI,qword ptr [RBX]
INC RSI
POP RBX
JMP 0x0011a890
LAB_001ac6db:
POP RBX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > >::~iteration_proxy_value() */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::~iteration_proxy_value
(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*this)
{
if (*(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(this + 0x50) != this + 0x60) {
operator_delete(*(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(this + 0x50),*(long *)(this + 0x60) + 1);
}
if (*(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(this + 0x30) != this + 0x40) {
operator_delete(*(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(this + 0x30),*(long *)(this + 0x40) + 1);
return;
}
return;
}
| |
54,636 | mysql_list_processes_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_list_processes_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_list_processes,
(parms->mysql),
parms->mysql,
MYSQL_RES *,
r_ptr)
} | O3 | c | mysql_list_processes_start_internal:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rdi
movq 0x480(%rdi), %rax
movq 0x28(%rax), %rbx
callq 0x1b839
movq %rax, 0x8(%rbx)
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| mysql_list_processes_start_internal:
push rbp
mov rbp, rsp
push rbx
push rax
mov rdi, [rdi]
mov rax, [rdi+480h]
mov rbx, [rax+28h]
call mysql_list_processes
mov [rbx+8], rax
mov dword ptr [rbx], 0
add rsp, 8
pop rbx
pop rbp
retn
| long long mysql_list_processes_start_internal(long long *a1)
{
long long v1; // rdi
long long v2; // rbx
long long result; // rax
v1 = *a1;
v2 = *(_QWORD *)(*(_QWORD *)(v1 + 1152) + 40LL);
result = mysql_list_processes(v1);
*(_QWORD *)(v2 + 8) = result;
*(_DWORD *)v2 = 0;
return result;
}
| mysql_list_processes_start_internal:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RDI,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x480]
MOV RBX,qword ptr [RAX + 0x28]
CALL 0x0011b839
MOV qword ptr [RBX + 0x8],RAX
MOV dword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void mysql_list_processes_start_internal(long *param_1)
{
int4 *puVar1;
int8 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_list_processes();
*(int8 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
| |
54,637 | llama_vocab::token_get_text(int) const | monkey531[P]llama/src/llama-vocab.cpp | const char * llama_vocab::token_get_text(llama_token id) const {
GGML_ASSERT(pimpl->type != LLAMA_VOCAB_TYPE_NONE);
return pimpl->id_to_token.at(id).text.c_str();
} | O3 | cpp | llama_vocab::token_get_text(int) const:
pushq %rax
movq (%rdi), %rcx
cmpl $0x0, 0x4(%rcx)
je 0xe8b39
movslq %esi, %rsi
movq 0x90(%rcx), %rax
movq 0x98(%rcx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x3333333333333333, %rdx # imm = 0xCCCCCCCCCCCCCCCD
imulq %rcx, %rdx
cmpq %rsi, %rdx
jbe 0xe8b5a
leaq (%rsi,%rsi,4), %rcx
movq (%rax,%rcx,8), %rax
popq %rcx
retq
leaq 0x31a4c(%rip), %rdi # 0x11a58c
leaq 0x2787d(%rip), %rdx # 0x1103c4
leaq 0x32396(%rip), %rcx # 0x11aee4
movl $0xb06, %esi # imm = 0xB06
xorl %eax, %eax
callq 0x6af70
leaq 0x2d0b2(%rip), %rdi # 0x115c13
xorl %eax, %eax
callq 0x6a230
| _ZNK11llama_vocab14token_get_textEi:
push rax
mov rcx, [rdi]
cmp dword ptr [rcx+4], 0
jz short loc_E8B39
movsxd rsi, esi
mov rax, [rcx+90h]
mov rcx, [rcx+98h]
sub rcx, rax
sar rcx, 3
mov rdx, 0CCCCCCCCCCCCCCCDh
imul rdx, rcx
cmp rdx, rsi
jbe short loc_E8B5A
lea rcx, [rsi+rsi*4]
mov rax, [rax+rcx*8]
pop rcx
retn
loc_E8B39:
lea rdi, aWorkspaceLlm4b_13; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aPimplTypeLlama; "pimpl->type != LLAMA_VOCAB_TYPE_NONE"
mov esi, 0B06h
xor eax, eax
call _ggml_abort
loc_E8B5A:
lea rdi, aVectorMRangeCh; "vector::_M_range_check: __n (which is %"...
xor eax, eax
call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...)
| long long llama_vocab::token_get_text(llama_vocab *this, long long a2)
{
long long v2; // rcx
long long v3; // rax
unsigned long long v4; // rdx
v2 = *(_QWORD *)this;
if ( !*(_DWORD *)(*(_QWORD *)this + 4LL) )
{
a2 = 2822LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-vocab.cpp",
2822LL,
"GGML_ASSERT(%s) failed",
"pimpl->type != LLAMA_VOCAB_TYPE_NONE");
LABEL_5:
std::__throw_out_of_range_fmt("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)", a2, v4);
}
a2 = (int)a2;
v3 = *(_QWORD *)(v2 + 144);
v4 = 0xCCCCCCCCCCCCCCCDLL * ((*(_QWORD *)(v2 + 152) - v3) >> 3);
if ( v4 <= (int)a2 )
goto LABEL_5;
return *(_QWORD *)(v3 + 40LL * (int)a2);
}
| token_get_text:
PUSH RAX
MOV RCX,qword ptr [RDI]
CMP dword ptr [RCX + 0x4],0x0
JZ 0x001e8b39
MOVSXD RSI,ESI
MOV RAX,qword ptr [RCX + 0x90]
MOV RCX,qword ptr [RCX + 0x98]
SUB RCX,RAX
SAR RCX,0x3
MOV RDX,-0x3333333333333333
IMUL RDX,RCX
CMP RDX,RSI
JBE 0x001e8b5a
LEA RCX,[RSI + RSI*0x4]
MOV RAX,qword ptr [RAX + RCX*0x8]
POP RCX
RET
LAB_001e8b39:
LEA RDI,[0x21a58c]
LEA RDX,[0x2103c4]
LEA RCX,[0x21aee4]
MOV ESI,0xb06
XOR EAX,EAX
CALL 0x0016af70
LAB_001e8b5a:
LEA RDI,[0x215c13]
XOR EAX,EAX
CALL 0x0016a230
|
/* llama_vocab::token_get_text(int) const */
int8 __thiscall llama_vocab::token_get_text(llama_vocab *this,int param_1)
{
long lVar1;
ulong uVar2;
ulong uVar3;
lVar1 = *(long *)this;
if (*(int *)(lVar1 + 4) == 0) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-vocab.cpp",0xb06
,"GGML_ASSERT(%s) failed","pimpl->type != LLAMA_VOCAB_TYPE_NONE");
}
uVar3 = (ulong)param_1;
uVar2 = (*(long *)(lVar1 + 0x98) - *(long *)(lVar1 + 0x90) >> 3) * -0x3333333333333333;
if (uVar3 <= uVar2 && uVar2 - uVar3 != 0) {
return *(int8 *)(*(long *)(lVar1 + 0x90) + uVar3 * 0x28);
}
/* WARNING: Subroutine does not return */
std::__throw_out_of_range_fmt
("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)");
}
| |
54,638 | ma_alloc_dynamic | eloqsql/libmariadb/libmariadb/ma_array.c | unsigned char *ma_alloc_dynamic(DYNAMIC_ARRAY *array)
{
if (array->elements == array->max_element)
{
char *new_ptr;
if (!(new_ptr=(char*) realloc(array->buffer,(array->max_element+
array->alloc_increment)*
array->size_of_element)))
return 0;
array->buffer=new_ptr;
array->max_element+=array->alloc_increment;
}
return (unsigned char *)array->buffer+(array->elements++ * array->size_of_element);
} | O0 | c | ma_alloc_dynamic:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jne 0x47832
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movq -0x10(%rbp), %rcx
addl 0x10(%rcx), %eax
movq -0x10(%rbp), %rcx
imull 0x14(%rcx), %eax
movl %eax, %eax
movl %eax, %esi
callq 0x13700
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x47816
movq $0x0, -0x8(%rbp)
jmp 0x47859
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x10(%rbp), %rax
addl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdx
movl 0x8(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x8(%rdx)
movq -0x10(%rbp), %rdx
imull 0x14(%rdx), %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_alloc_dynamic:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov eax, [rax+8]
mov rcx, [rbp+var_10]
cmp eax, [rcx+0Ch]
jnz short loc_47832
mov rax, [rbp+var_10]
mov rdi, [rax]
mov rax, [rbp+var_10]
mov eax, [rax+0Ch]
mov rcx, [rbp+var_10]
add eax, [rcx+10h]
mov rcx, [rbp+var_10]
imul eax, [rcx+14h]
mov eax, eax
mov esi, eax
call _realloc
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_47816
mov [rbp+var_8], 0
jmp short loc_47859
loc_47816:
mov rcx, [rbp+var_18]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rax, [rbp+var_10]
mov ecx, [rax+10h]
mov rax, [rbp+var_10]
add ecx, [rax+0Ch]
mov [rax+0Ch], ecx
loc_47832:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rdx, [rbp+var_10]
mov ecx, [rdx+8]
mov esi, ecx
add esi, 1
mov [rdx+8], esi
mov rdx, [rbp+var_10]
imul ecx, [rdx+14h]
mov ecx, ecx
add rax, rcx
mov [rbp+var_8], rax
loc_47859:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| long long ma_alloc_dynamic(long long *a1)
{
long long v1; // rax
int v2; // ecx
long long v4; // [rsp+8h] [rbp-18h]
if ( *((_DWORD *)a1 + 2) != *((_DWORD *)a1 + 3) )
goto LABEL_5;
v4 = realloc(*a1, (unsigned int)(*((_DWORD *)a1 + 5) * (*((_DWORD *)a1 + 4) + *((_DWORD *)a1 + 3))));
if ( v4 )
{
*a1 = v4;
*((_DWORD *)a1 + 3) += *((_DWORD *)a1 + 4);
LABEL_5:
v1 = *a1;
v2 = *((_DWORD *)a1 + 2);
*((_DWORD *)a1 + 2) = v2 + 1;
return (unsigned int)(*((_DWORD *)a1 + 5) * v2) + v1;
}
return 0LL;
}
| ma_alloc_dynamic:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0xc]
JNZ 0x00147832
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0xc]
MOV RCX,qword ptr [RBP + -0x10]
ADD EAX,dword ptr [RCX + 0x10]
MOV RCX,qword ptr [RBP + -0x10]
IMUL EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
MOV ESI,EAX
CALL 0x00113700
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x00147816
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00147859
LAB_00147816:
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
ADD ECX,dword ptr [RAX + 0xc]
MOV dword ptr [RAX + 0xc],ECX
LAB_00147832:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RDX + 0x8]
MOV ESI,ECX
ADD ESI,0x1
MOV dword ptr [RDX + 0x8],ESI
MOV RDX,qword ptr [RBP + -0x10]
IMUL ECX,dword ptr [RDX + 0x14]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
LAB_00147859:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
long ma_alloc_dynamic(long *param_1)
{
long lVar1;
void *pvVar2;
if ((int)param_1[1] == *(int *)((long)param_1 + 0xc)) {
pvVar2 = realloc((void *)*param_1,
(ulong)(uint)((*(int *)((long)param_1 + 0xc) + (int)param_1[2]) *
*(int *)((long)param_1 + 0x14)));
if (pvVar2 == (void *)0x0) {
return 0;
}
*param_1 = (long)pvVar2;
*(int *)((long)param_1 + 0xc) = (int)param_1[2] + *(int *)((long)param_1 + 0xc);
}
lVar1 = param_1[1];
*(int *)(param_1 + 1) = (int)lVar1 + 1;
return *param_1 + (ulong)(uint)((int)lVar1 * *(int *)((long)param_1 + 0x14));
}
| |
54,639 | my_rename_with_symlink | eloqsql/mysys/my_symlink2.c | int my_rename_with_symlink(const char *from, const char *to, myf MyFlags)
{
#ifndef HAVE_READLINK
return my_rename(from, to, MyFlags);
#else
char link_name[FN_REFLEN], tmp_name[FN_REFLEN];
int was_symlink= (!my_disable_symlinks &&
!my_readlink(link_name, from, MYF(0)));
int result=0;
int name_is_different;
DBUG_ENTER("my_rename_with_symlink");
if (!was_symlink)
DBUG_RETURN(my_rename(from, to, MyFlags));
/* Change filename that symlink pointed to */
strmov(tmp_name, to);
fn_same(tmp_name,link_name,1); /* Copy dir */
name_is_different= strcmp(link_name, tmp_name);
if (name_is_different && !access(tmp_name, F_OK))
{
my_errno= EEXIST;
if (MyFlags & MY_WME)
my_error(EE_CANTCREATEFILE, MYF(0), tmp_name, EEXIST);
DBUG_RETURN(1);
}
/* Create new symlink */
if (my_symlink(tmp_name, to, MyFlags))
DBUG_RETURN(1);
/*
Rename symlinked file if the base name didn't change.
This can happen if you use this function where 'from' and 'to' has
the same basename and different directories.
*/
if (name_is_different && my_rename(link_name, tmp_name, MyFlags))
{
int save_errno=my_errno;
my_delete(to, MyFlags); /* Remove created symlink */
my_errno=save_errno;
DBUG_RETURN(1);
}
/* Remove original symlink */
if (my_delete(from, MyFlags))
{
int save_errno=my_errno;
/* Remove created link */
my_delete(to, MyFlags);
/* Rename file back */
if (strcmp(link_name, tmp_name))
(void) my_rename(tmp_name, link_name, MyFlags);
my_errno=save_errno;
result= 1;
}
DBUG_RETURN(result);
#endif /* HAVE_READLINK */
} | O0 | c | my_rename_with_symlink:
pushq %rbp
movq %rsp, %rbp
subq $0x460, %rsp # imm = 0x460
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x420(%rbp)
movq %rsi, -0x428(%rbp)
movq %rdx, -0x430(%rbp)
xorl %eax, %eax
leaq 0x376ce6(%rip), %rcx # 0x3f902c
cmpb $0x0, (%rcx)
movb %al, -0x445(%rbp)
jne 0x82376
leaq -0x210(%rbp), %rdi
movq -0x420(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x81a80
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, -0x445(%rbp)
movb -0x445(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x434(%rbp)
movl $0x0, -0x438(%rbp)
cmpl $0x0, -0x434(%rbp)
jne 0x823c1
jmp 0x8239c
movq -0x420(%rbp), %rdi
movq -0x428(%rbp), %rsi
movq -0x430(%rbp), %rdx
callq 0x8bc50
movl %eax, -0x414(%rbp)
jmp 0x825a5
leaq -0x410(%rbp), %rdi
movq -0x428(%rbp), %rsi
callq 0x28350
leaq -0x410(%rbp), %rdi
leaq -0x210(%rbp), %rsi
movl $0x1, %edx
callq 0x8b710
leaq -0x210(%rbp), %rdi
leaq -0x410(%rbp), %rsi
callq 0x28490
movl %eax, -0x43c(%rbp)
cmpl $0x0, -0x43c(%rbp)
je 0x8246a
leaq -0x410(%rbp), %rdi
xorl %esi, %esi
callq 0x285f0
cmpl $0x0, %eax
jne 0x8246a
callq 0x82cc0
movl $0x11, (%rax)
movq -0x430(%rbp), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0x82459
leaq -0x410(%rbp), %rdx
movl $0x1, %edi
xorl %eax, %eax
movl %eax, %esi
movl $0x11, %ecx
movb $0x0, %al
callq 0x7c950
jmp 0x8245b
movl $0x1, -0x414(%rbp)
jmp 0x825a5
leaq -0x410(%rbp), %rdi
movq -0x428(%rbp), %rsi
movq -0x430(%rbp), %rdx
callq 0x81b50
cmpl $0x0, %eax
je 0x8249a
jmp 0x8248b
movl $0x1, -0x414(%rbp)
jmp 0x825a5
cmpl $0x0, -0x43c(%rbp)
je 0x8250a
leaq -0x210(%rbp), %rdi
leaq -0x410(%rbp), %rsi
movq -0x430(%rbp), %rdx
callq 0x8bc50
cmpl $0x0, %eax
je 0x8250a
callq 0x82cc0
movl (%rax), %eax
movl %eax, -0x440(%rbp)
movq -0x428(%rbp), %rdi
movq -0x430(%rbp), %rsi
callq 0x7c560
movl -0x440(%rbp), %eax
movl %eax, -0x44c(%rbp)
callq 0x82cc0
movl -0x44c(%rbp), %ecx
movl %ecx, (%rax)
movl $0x1, -0x414(%rbp)
jmp 0x825a5
movq -0x420(%rbp), %rdi
movq -0x430(%rbp), %rsi
callq 0x7c560
cmpl $0x0, %eax
je 0x82597
callq 0x82cc0
movl (%rax), %eax
movl %eax, -0x444(%rbp)
movq -0x428(%rbp), %rdi
movq -0x430(%rbp), %rsi
callq 0x7c560
leaq -0x210(%rbp), %rdi
leaq -0x410(%rbp), %rsi
callq 0x28490
cmpl $0x0, %eax
je 0x82574
leaq -0x410(%rbp), %rdi
leaq -0x210(%rbp), %rsi
movq -0x430(%rbp), %rdx
callq 0x8bc50
movl -0x444(%rbp), %eax
movl %eax, -0x450(%rbp)
callq 0x82cc0
movl -0x450(%rbp), %ecx
movl %ecx, (%rax)
movl $0x1, -0x438(%rbp)
jmp 0x82599
movl -0x438(%rbp), %eax
movl %eax, -0x414(%rbp)
movl -0x414(%rbp), %eax
movl %eax, -0x454(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x825d2
movl -0x454(%rbp), %eax
addq $0x460, %rsp # imm = 0x460
popq %rbp
retq
callq 0x28390
nopw (%rax,%rax)
| my_rename_with_symlink:
push rbp
mov rbp, rsp
sub rsp, 460h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_420], rdi
mov [rbp+var_428], rsi
mov [rbp+var_430], rdx
xor eax, eax
lea rcx, my_disable_symlinks
cmp byte ptr [rcx], 0
mov [rbp+var_445], al
jnz short loc_82376
lea rdi, [rbp+var_210]
mov rsi, [rbp+var_420]
xor eax, eax
mov edx, eax
call my_readlink
cmp eax, 0
setnz al
xor al, 0FFh
mov [rbp+var_445], al
loc_82376:
mov al, [rbp+var_445]
and al, 1
movzx eax, al
mov [rbp+var_434], eax
mov [rbp+var_438], 0
cmp [rbp+var_434], 0
jnz short loc_823C1
jmp short $+2
loc_8239C:
mov rdi, [rbp+var_420]
mov rsi, [rbp+var_428]
mov rdx, [rbp+var_430]
call my_rename
mov [rbp+var_414], eax
jmp loc_825A5
loc_823C1:
lea rdi, [rbp+var_410]
mov rsi, [rbp+var_428]
call _stpcpy
lea rdi, [rbp+var_410]
lea rsi, [rbp+var_210]
mov edx, 1
call fn_same
lea rdi, [rbp+var_210]
lea rsi, [rbp+var_410]
call _strcmp
mov [rbp+var_43C], eax
cmp [rbp+var_43C], 0
jz short loc_8246A
lea rdi, [rbp+var_410]
xor esi, esi
call _access
cmp eax, 0
jnz short loc_8246A
call _my_thread_var
mov dword ptr [rax], 11h
mov rax, [rbp+var_430]
and rax, 10h
cmp rax, 0
jz short loc_82459
lea rdx, [rbp+var_410]
mov edi, 1
xor eax, eax
mov esi, eax
mov ecx, 11h
mov al, 0
call my_error
loc_82459:
jmp short $+2
loc_8245B:
mov [rbp+var_414], 1
jmp loc_825A5
loc_8246A:
lea rdi, [rbp+var_410]
mov rsi, [rbp+var_428]
mov rdx, [rbp+var_430]
call my_symlink
cmp eax, 0
jz short loc_8249A
jmp short $+2
loc_8248B:
mov [rbp+var_414], 1
jmp loc_825A5
loc_8249A:
cmp [rbp+var_43C], 0
jz short loc_8250A
lea rdi, [rbp+var_210]
lea rsi, [rbp+var_410]
mov rdx, [rbp+var_430]
call my_rename
cmp eax, 0
jz short loc_8250A
call _my_thread_var
mov eax, [rax]
mov [rbp+var_440], eax
mov rdi, [rbp+var_428]
mov rsi, [rbp+var_430]
call my_delete
mov eax, [rbp+var_440]
mov [rbp+var_44C], eax
call _my_thread_var
mov ecx, [rbp+var_44C]
mov [rax], ecx
mov [rbp+var_414], 1
jmp loc_825A5
loc_8250A:
mov rdi, [rbp+var_420]
mov rsi, [rbp+var_430]
call my_delete
cmp eax, 0
jz short loc_82597
call _my_thread_var
mov eax, [rax]
mov [rbp+var_444], eax
mov rdi, [rbp+var_428]
mov rsi, [rbp+var_430]
call my_delete
lea rdi, [rbp+var_210]
lea rsi, [rbp+var_410]
call _strcmp
cmp eax, 0
jz short loc_82574
lea rdi, [rbp+var_410]
lea rsi, [rbp+var_210]
mov rdx, [rbp+var_430]
call my_rename
loc_82574:
mov eax, [rbp+var_444]
mov [rbp+var_450], eax
call _my_thread_var
mov ecx, [rbp+var_450]
mov [rax], ecx
mov [rbp+var_438], 1
loc_82597:
jmp short $+2
loc_82599:
mov eax, [rbp+var_438]
mov [rbp+var_414], eax
loc_825A5:
mov eax, [rbp+var_414]
mov [rbp+var_454], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_825D2
mov eax, [rbp+var_454]
add rsp, 460h
pop rbp
retn
loc_825D2:
call ___stack_chk_fail
| long long my_rename_with_symlink(long long a1, const char *a2, long long a3)
{
char *v3; // rdi
const char *v4; // rsi
char v6; // [rsp+1Bh] [rbp-445h]
int v7; // [rsp+1Ch] [rbp-444h]
int v8; // [rsp+20h] [rbp-440h]
int v9; // [rsp+24h] [rbp-43Ch]
unsigned int v10; // [rsp+28h] [rbp-438h]
char v13[512]; // [rsp+50h] [rbp-410h] BYREF
char v14[520]; // [rsp+250h] [rbp-210h] BYREF
unsigned long long v15; // [rsp+458h] [rbp-8h]
v15 = __readfsqword(0x28u);
v6 = 0;
if ( !my_disable_symlinks )
v6 = ~((unsigned int)my_readlink(v14, a1, 0) != 0);
v10 = 0;
if ( (v6 & 1) != 0 )
{
stpcpy(v13, a2);
fn_same(v13, v14, 1LL);
v9 = strcmp(v14, v13);
if ( !v9 || (unsigned int)access(v13, 0LL) )
{
if ( (unsigned int)my_symlink((long long)v13, a2, a3) )
{
return 1;
}
else if ( v9 && (unsigned int)my_rename(v14, v13, a3) )
{
v8 = *(_DWORD *)my_thread_var(v14, v13);
my_delete((long long)a2, (const char *)a3);
*(_DWORD *)my_thread_var(a2, (const char *)a3) = v8;
return 1;
}
else
{
if ( (unsigned int)my_delete(a1, (const char *)a3) )
{
v7 = *(_DWORD *)my_thread_var(a1, (const char *)a3);
my_delete((long long)a2, (const char *)a3);
v3 = v14;
v4 = v13;
if ( (unsigned int)strcmp(v14, v13) )
{
v3 = v13;
v4 = v14;
my_rename(v13, v14, a3);
}
*(_DWORD *)my_thread_var(v3, v4) = v7;
return 1;
}
return v10;
}
}
else
{
*(_DWORD *)my_thread_var(v13, 0LL) = 17;
if ( (a3 & 0x10) != 0 )
my_error(1u, 0LL, v13, 17LL);
return 1;
}
}
else
{
return (unsigned int)my_rename(a1, a2, a3);
}
}
| my_rename_with_symlink:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x460
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x420],RDI
MOV qword ptr [RBP + -0x428],RSI
MOV qword ptr [RBP + -0x430],RDX
XOR EAX,EAX
LEA RCX,[0x4f902c]
CMP byte ptr [RCX],0x0
MOV byte ptr [RBP + -0x445],AL
JNZ 0x00182376
LEA RDI,[RBP + -0x210]
MOV RSI,qword ptr [RBP + -0x420]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00181a80
CMP EAX,0x0
SETNZ AL
XOR AL,0xff
MOV byte ptr [RBP + -0x445],AL
LAB_00182376:
MOV AL,byte ptr [RBP + -0x445]
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x434],EAX
MOV dword ptr [RBP + -0x438],0x0
CMP dword ptr [RBP + -0x434],0x0
JNZ 0x001823c1
JMP 0x0018239c
LAB_0018239c:
MOV RDI,qword ptr [RBP + -0x420]
MOV RSI,qword ptr [RBP + -0x428]
MOV RDX,qword ptr [RBP + -0x430]
CALL 0x0018bc50
MOV dword ptr [RBP + -0x414],EAX
JMP 0x001825a5
LAB_001823c1:
LEA RDI,[RBP + -0x410]
MOV RSI,qword ptr [RBP + -0x428]
CALL 0x00128350
LEA RDI,[RBP + -0x410]
LEA RSI,[RBP + -0x210]
MOV EDX,0x1
CALL 0x0018b710
LEA RDI,[RBP + -0x210]
LEA RSI,[RBP + -0x410]
CALL 0x00128490
MOV dword ptr [RBP + -0x43c],EAX
CMP dword ptr [RBP + -0x43c],0x0
JZ 0x0018246a
LEA RDI,[RBP + -0x410]
XOR ESI,ESI
CALL 0x001285f0
CMP EAX,0x0
JNZ 0x0018246a
CALL 0x00182cc0
MOV dword ptr [RAX],0x11
MOV RAX,qword ptr [RBP + -0x430]
AND RAX,0x10
CMP RAX,0x0
JZ 0x00182459
LEA RDX,[RBP + -0x410]
MOV EDI,0x1
XOR EAX,EAX
MOV ESI,EAX
MOV ECX,0x11
MOV AL,0x0
CALL 0x0017c950
LAB_00182459:
JMP 0x0018245b
LAB_0018245b:
MOV dword ptr [RBP + -0x414],0x1
JMP 0x001825a5
LAB_0018246a:
LEA RDI,[RBP + -0x410]
MOV RSI,qword ptr [RBP + -0x428]
MOV RDX,qword ptr [RBP + -0x430]
CALL 0x00181b50
CMP EAX,0x0
JZ 0x0018249a
JMP 0x0018248b
LAB_0018248b:
MOV dword ptr [RBP + -0x414],0x1
JMP 0x001825a5
LAB_0018249a:
CMP dword ptr [RBP + -0x43c],0x0
JZ 0x0018250a
LEA RDI,[RBP + -0x210]
LEA RSI,[RBP + -0x410]
MOV RDX,qword ptr [RBP + -0x430]
CALL 0x0018bc50
CMP EAX,0x0
JZ 0x0018250a
CALL 0x00182cc0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x440],EAX
MOV RDI,qword ptr [RBP + -0x428]
MOV RSI,qword ptr [RBP + -0x430]
CALL 0x0017c560
MOV EAX,dword ptr [RBP + -0x440]
MOV dword ptr [RBP + -0x44c],EAX
CALL 0x00182cc0
MOV ECX,dword ptr [RBP + -0x44c]
MOV dword ptr [RAX],ECX
MOV dword ptr [RBP + -0x414],0x1
JMP 0x001825a5
LAB_0018250a:
MOV RDI,qword ptr [RBP + -0x420]
MOV RSI,qword ptr [RBP + -0x430]
CALL 0x0017c560
CMP EAX,0x0
JZ 0x00182597
CALL 0x00182cc0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x444],EAX
MOV RDI,qword ptr [RBP + -0x428]
MOV RSI,qword ptr [RBP + -0x430]
CALL 0x0017c560
LEA RDI,[RBP + -0x210]
LEA RSI,[RBP + -0x410]
CALL 0x00128490
CMP EAX,0x0
JZ 0x00182574
LEA RDI,[RBP + -0x410]
LEA RSI,[RBP + -0x210]
MOV RDX,qword ptr [RBP + -0x430]
CALL 0x0018bc50
LAB_00182574:
MOV EAX,dword ptr [RBP + -0x444]
MOV dword ptr [RBP + -0x450],EAX
CALL 0x00182cc0
MOV ECX,dword ptr [RBP + -0x450]
MOV dword ptr [RAX],ECX
MOV dword ptr [RBP + -0x438],0x1
LAB_00182597:
JMP 0x00182599
LAB_00182599:
MOV EAX,dword ptr [RBP + -0x438]
MOV dword ptr [RBP + -0x414],EAX
LAB_001825a5:
MOV EAX,dword ptr [RBP + -0x414]
MOV dword ptr [RBP + -0x454],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001825d2
MOV EAX,dword ptr [RBP + -0x454]
ADD RSP,0x460
POP RBP
RET
LAB_001825d2:
CALL 0x00128390
|
int4 my_rename_with_symlink(int8 param_1,char *param_2,ulong param_3)
{
int4 uVar1;
int iVar2;
int iVar3;
int4 *puVar4;
long in_FS_OFFSET;
bool bVar5;
int4 local_440;
int4 local_41c;
char local_418 [512];
char local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
bVar5 = false;
if (my_disable_symlinks == '\0') {
iVar2 = my_readlink(local_218,param_1,0);
bVar5 = iVar2 == 0;
}
local_440 = 0;
if (bVar5) {
stpcpy(local_418,param_2);
fn_same(local_418,local_218,1);
iVar2 = strcmp(local_218,local_418);
if (iVar2 != 0) {
iVar3 = access(local_418,0);
if (iVar3 == 0) {
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0x11;
if ((param_3 & 0x10) != 0) {
my_error(1,0,local_418,0x11);
}
local_41c = 1;
goto LAB_001825a5;
}
}
iVar3 = my_symlink(local_418,param_2,param_3);
if (iVar3 == 0) {
if (iVar2 != 0) {
iVar2 = my_rename(local_218,local_418,param_3);
if (iVar2 != 0) {
puVar4 = (int4 *)_my_thread_var();
uVar1 = *puVar4;
my_delete(param_2,param_3);
puVar4 = (int4 *)_my_thread_var();
*puVar4 = uVar1;
local_41c = 1;
goto LAB_001825a5;
}
}
iVar2 = my_delete(param_1,param_3);
if (iVar2 != 0) {
puVar4 = (int4 *)_my_thread_var();
uVar1 = *puVar4;
my_delete(param_2,param_3);
iVar2 = strcmp(local_218,local_418);
if (iVar2 != 0) {
my_rename(local_418,local_218,param_3);
}
puVar4 = (int4 *)_my_thread_var();
*puVar4 = uVar1;
local_440 = 1;
}
local_41c = local_440;
}
else {
local_41c = 1;
}
}
else {
local_41c = my_rename(param_1,param_2,param_3);
}
LAB_001825a5:
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_41c;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
54,640 | my_like_range_czech | eloqsql/strings/ctype-czech.c | static my_bool my_like_range_czech(CHARSET_INFO *cs __attribute__((unused)),
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)
{
#ifdef EXAMPLE
uchar value;
const char *end=ptr+ptr_length;
char *min_org=min_str;
char *min_end=min_str+res_length;
for (; ptr != end && min_str != min_end ; ptr++)
{
if (*ptr == w_one) /* '_' in SQL */
{ break; }
if (*ptr == w_many) /* '%' in SQL */
{ break; }
if (*ptr == escape && ptr+1 != end)
{ ptr++; } /* Skip escape */
value = CZ_SORT_TABLE[0][(int) (uchar) *ptr];
if (value == 0) /* Ignore in the first pass */
{ continue; }
if (value <= 2) /* End of pass or end of string */
{ break; }
if (value == 255) /* Double char too compicated */
{ break; }
*min_str++= *max_str++ = *ptr;
}
if (cs->state & MY_CS_BINSORT)
*min_length= (size_t) (min_str - min_org);
else
{
/* 'a\0\0... is the smallest possible string */
*min_length= res_length;
}
/* a\ff\ff... is the biggest possible string */
*max_length= res_length;
while (min_str != min_end)
{
*min_str++ = min_sort_char; /* Because of key compression */
*max_str++ = max_sort_char;
}
return 0;
#else
return 1;
#endif
} | O3 | c | my_like_range_czech:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r11
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %r12
movq 0x10(%rbp), %r15
leaq (%r12,%r15), %r10
testq %rdx, %rdx
sete %sil
testq %r15, %r15
sete %bl
orb %sil, %bl
jne 0x3831c
addq %r11, %rdx
leaq 0x88f2d(%rip), %r13 # 0xc11f7
movq %r12, %r14
movb (%r11), %bl
cmpb %r8b, %bl
je 0x3831f
cmpb %r9b, %bl
je 0x3831f
leaq 0x1(%r11), %rsi
cmpq %rdx, %rsi
cmoveq %r11, %rsi
cmpb %cl, %bl
cmovneq %r11, %rsi
movzbl (%rsi), %r11d
movb (%r11,%r13), %bl
testb %bl, %bl
je 0x3830a
incb %bl
cmpb $0x4, %bl
jb 0x3831f
movb %r11b, (%rax)
incq %rax
movb %r11b, (%r14)
incq %r14
incq %rsi
cmpq %rdx, %rsi
je 0x3831f
movq %rsi, %r11
cmpq %r10, %r14
jne 0x382cd
jmp 0x3831f
movq %r12, %r14
movq %r14, %rcx
subq %r12, %rcx
testb $0x10, 0xc(%rdi)
cmoveq %r15, %rcx
movq 0x28(%rbp), %rdx
movq %rcx, (%rdx)
movq 0x30(%rbp), %rcx
movq %r15, (%rcx)
cmpq %r10, %r14
je 0x3834f
movb $0x20, (%r14)
incq %r14
movb $0x39, (%rax)
incq %rax
jmp 0x3833b
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_like_range_czech:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
mov r11, rsi
mov rax, [rbp+arg_10]
mov r12, [rbp+arg_8]
mov r15, [rbp+arg_0]
lea r10, [r12+r15]
test rdx, rdx
setz sil
test r15, r15
setz bl
or bl, sil
jnz short loc_3831C
add rdx, r11
lea r13, unk_C11F7
mov r14, r12
loc_382CD:
mov bl, [r11]
cmp bl, r8b
jz short loc_3831F
cmp bl, r9b
jz short loc_3831F
lea rsi, [r11+1]
cmp rsi, rdx
cmovz rsi, r11
cmp bl, cl
cmovnz rsi, r11
movzx r11d, byte ptr [rsi]
mov bl, [r11+r13]
test bl, bl
jz short loc_3830A
inc bl
cmp bl, 4
jb short loc_3831F
mov [rax], r11b
inc rax
mov [r14], r11b
inc r14
loc_3830A:
inc rsi
cmp rsi, rdx
jz short loc_3831F
mov r11, rsi
cmp r14, r10
jnz short loc_382CD
jmp short loc_3831F
loc_3831C:
mov r14, r12
loc_3831F:
mov rcx, r14
sub rcx, r12
test byte ptr [rdi+0Ch], 10h
cmovz rcx, r15
mov rdx, [rbp+arg_18]
mov [rdx], rcx
mov rcx, [rbp+arg_20]
mov [rcx], r15
loc_3833B:
cmp r14, r10
jz short loc_3834F
mov byte ptr [r14], 20h ; ' '
inc r14
mov byte ptr [rax], 39h ; '9'
inc rax
jmp short loc_3833B
loc_3834F:
xor eax, eax
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_like_range_czech(
long long a1,
unsigned __int8 *a2,
long long a3,
char a4,
char a5,
char a6,
long long a7,
long long a8,
_BYTE *a9,
long long *a10,
_QWORD *a11)
{
unsigned __int8 *v11; // r11
_BYTE *v13; // r10
unsigned __int8 *v14; // rdx
_BYTE *v15; // r14
unsigned __int8 v16; // bl
unsigned __int8 *v17; // rsi
long long v18; // r11
char v19; // bl
unsigned __int8 *v20; // rsi
long long v21; // rcx
v11 = a2;
v13 = (_BYTE *)(a8 + a7);
if ( a3 == 0 || a7 == 0 )
{
v15 = (_BYTE *)a8;
}
else
{
v14 = &a2[a3];
v15 = (_BYTE *)a8;
do
{
v16 = *v11;
if ( *v11 == a5 || v16 == a6 )
break;
v17 = v11 + 1;
if ( v11 + 1 == v14 )
v17 = v11;
if ( v16 != a4 )
v17 = v11;
v18 = *v17;
v19 = byte_C11F7[v18];
if ( v19 )
{
if ( (unsigned __int8)(v19 + 1) < 4u )
break;
*a9++ = v18;
*v15++ = v18;
}
v20 = v17 + 1;
if ( v20 == v14 )
break;
v11 = v20;
}
while ( v15 != v13 );
}
v21 = (long long)&v15[-a8];
if ( (*(_BYTE *)(a1 + 12) & 0x10) == 0 )
v21 = a7;
*a10 = v21;
*a11 = a7;
while ( v15 != v13 )
{
*v15++ = 32;
*a9++ = 57;
}
return 0LL;
}
| my_like_range_czech:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R11,RSI
MOV RAX,qword ptr [RBP + 0x20]
MOV R12,qword ptr [RBP + 0x18]
MOV R15,qword ptr [RBP + 0x10]
LEA R10,[R12 + R15*0x1]
TEST RDX,RDX
SETZ SIL
TEST R15,R15
SETZ BL
OR BL,SIL
JNZ 0x0013831c
ADD RDX,R11
LEA R13,[0x1c11f7]
MOV R14,R12
LAB_001382cd:
MOV BL,byte ptr [R11]
CMP BL,R8B
JZ 0x0013831f
CMP BL,R9B
JZ 0x0013831f
LEA RSI,[R11 + 0x1]
CMP RSI,RDX
CMOVZ RSI,R11
CMP BL,CL
CMOVNZ RSI,R11
MOVZX R11D,byte ptr [RSI]
MOV BL,byte ptr [R11 + R13*0x1]
TEST BL,BL
JZ 0x0013830a
INC BL
CMP BL,0x4
JC 0x0013831f
MOV byte ptr [RAX],R11B
INC RAX
MOV byte ptr [R14],R11B
INC R14
LAB_0013830a:
INC RSI
CMP RSI,RDX
JZ 0x0013831f
MOV R11,RSI
CMP R14,R10
JNZ 0x001382cd
JMP 0x0013831f
LAB_0013831c:
MOV R14,R12
LAB_0013831f:
MOV RCX,R14
SUB RCX,R12
TEST byte ptr [RDI + 0xc],0x10
CMOVZ RCX,R15
MOV RDX,qword ptr [RBP + 0x28]
MOV qword ptr [RDX],RCX
MOV RCX,qword ptr [RBP + 0x30]
MOV qword ptr [RCX],R15
LAB_0013833b:
CMP R14,R10
JZ 0x0013834f
MOV byte ptr [R14],0x20
INC R14
MOV byte ptr [RAX],0x39
INC RAX
JMP 0x0013833b
LAB_0013834f:
XOR EAX,EAX
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
my_like_range_czech(long param_1,byte *param_2,long param_3,byte param_4,byte param_5,byte param_6,
long param_7,byte *param_8,byte *param_9,long *param_10,long *param_11)
{
byte bVar1;
long lVar2;
byte *pbVar3;
byte *pbVar4;
byte *pbVar5;
pbVar5 = param_8;
if (param_7 != 0 && param_3 != 0) {
pbVar3 = param_2 + param_3;
while ((bVar1 = *param_2, bVar1 != param_5 && (bVar1 != param_6))) {
pbVar4 = param_2 + 1;
if (param_2 + 1 == pbVar3) {
pbVar4 = param_2;
}
if (bVar1 != param_4) {
pbVar4 = param_2;
}
bVar1 = *pbVar4;
if ((&DAT_001c11f7)[bVar1] != '\0') {
if ((byte)((&DAT_001c11f7)[bVar1] + 1) < 4) break;
*param_9 = bVar1;
param_9 = param_9 + 1;
*pbVar5 = bVar1;
pbVar5 = pbVar5 + 1;
}
param_2 = pbVar4 + 1;
if ((param_2 == pbVar3) || (pbVar5 == param_8 + param_7)) break;
}
}
lVar2 = (long)pbVar5 - (long)param_8;
if ((*(byte *)(param_1 + 0xc) & 0x10) == 0) {
lVar2 = param_7;
}
*param_10 = lVar2;
*param_11 = param_7;
for (; pbVar5 != param_8 + param_7; pbVar5 = pbVar5 + 1) {
*pbVar5 = 0x20;
*param_9 = 0x39;
param_9 = param_9 + 1;
}
return 0;
}
| |
54,641 | error_token | tsotchke[P]eshkol/src/frontend/lexer/lexer.c | static Token error_token(Lexer* lexer, const char* message) {
Token token;
token.type = TOKEN_ERROR;
token.lexeme = message;
token.length = strlen(message);
token.line = lexer->line;
token.column = lexer->column;
lexer->had_error = true;
// Report the error
diagnostic_error(lexer->diag, token.line, token.column, message);
return token;
} | O0 | c | error_token:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x20(%rbp)
movq %rdi, %rax
movq %rax, -0x18(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movl $0x12, (%rdi)
movq -0x10(%rbp), %rax
movq %rax, 0x8(%rdi)
movq -0x10(%rbp), %rdi
callq 0x1060
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rcx
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rcx
movq 0x38(%rcx), %rcx
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rcx
movb $0x1, 0x40(%rcx)
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rdi
movq 0x18(%rax), %rcx
movl %ecx, %esi
movq 0x20(%rax), %rax
movl %eax, %edx
movq -0x10(%rbp), %rcx
callq 0x4e30
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| error_token:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_20], rdi
mov rax, rdi
mov [rbp+var_18], rax
mov [rbp+var_8], rsi
mov [rbp+var_10], rdx
mov dword ptr [rdi], 12h
mov rax, [rbp+var_10]
mov [rdi+8], rax
mov rdi, [rbp+var_10]
call _strlen
mov rcx, rax
mov rax, [rbp+var_20]
mov [rax+10h], rcx
mov rcx, [rbp+var_8]
mov rcx, [rcx+30h]
mov [rax+18h], rcx
mov rcx, [rbp+var_8]
mov rcx, [rcx+38h]
mov [rax+20h], rcx
mov rcx, [rbp+var_8]
mov byte ptr [rcx+40h], 1
mov rcx, [rbp+var_8]
mov rdi, [rcx+10h]
mov rcx, [rax+18h]
mov esi, ecx
mov rax, [rax+20h]
mov edx, eax
mov rcx, [rbp+var_10]
call diagnostic_error
mov rax, [rbp+var_18]
add rsp, 20h
pop rbp
retn
| long long error_token(long long a1, long long a2, long long a3)
{
*(_DWORD *)a1 = 18;
*(_QWORD *)(a1 + 8) = a3;
*(_QWORD *)(a1 + 16) = strlen(a3);
*(_QWORD *)(a1 + 24) = *(_QWORD *)(a2 + 48);
*(_QWORD *)(a1 + 32) = *(_QWORD *)(a2 + 56);
*(_BYTE *)(a2 + 64) = 1;
diagnostic_error(*(long long **)(a2 + 16), *(_QWORD *)(a1 + 24), *(_QWORD *)(a1 + 32), a3);
return a1;
}
| error_token:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x20],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x18],RAX
MOV qword ptr [RBP + -0x8],RSI
MOV qword ptr [RBP + -0x10],RDX
MOV dword ptr [RDI],0x12
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RDI + 0x8],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00101060
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x10],RCX
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX + 0x30]
MOV qword ptr [RAX + 0x18],RCX
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX + 0x38]
MOV qword ptr [RAX + 0x20],RCX
MOV RCX,qword ptr [RBP + -0x8]
MOV byte ptr [RCX + 0x40],0x1
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x10]
MOV RCX,qword ptr [RAX + 0x18]
MOV ESI,ECX
MOV RAX,qword ptr [RAX + 0x20]
MOV EDX,EAX
MOV RCX,qword ptr [RBP + -0x10]
CALL 0x00104e30
MOV RAX,qword ptr [RBP + -0x18]
ADD RSP,0x20
POP RBP
RET
|
int4 * error_token(int4 *param_1,long param_2,char *param_3)
{
size_t sVar1;
*param_1 = 0x12;
*(char **)(param_1 + 2) = param_3;
sVar1 = strlen(param_3);
*(size_t *)(param_1 + 4) = sVar1;
*(int8 *)(param_1 + 6) = *(int8 *)(param_2 + 0x30);
*(int8 *)(param_1 + 8) = *(int8 *)(param_2 + 0x38);
*(int1 *)(param_2 + 0x40) = 1;
diagnostic_error(*(int8 *)(param_2 + 0x10),*(ulong *)(param_1 + 6) & 0xffffffff,
*(ulong *)(param_1 + 8) & 0xffffffff,param_3);
return param_1;
}
| |
54,642 | read_block | eloqsql/storage/maria/ma_pagecache.c | static void read_block(PAGECACHE *pagecache,
PAGECACHE_BLOCK_LINK *block,
my_bool primary)
{
DBUG_ENTER("read_block");
DBUG_PRINT("enter", ("read block: %p primary: %d", block, primary));
if (primary)
{
size_t error;
PAGECACHE_IO_HOOK_ARGS args;
/*
This code is executed only by threads
that submitted primary requests
*/
pagecache->global_cache_read++;
/*
Page is not in buffer yet, is to be read from disk
Here other threads may step in and register as secondary readers.
They will register in block->wqueue[COND_FOR_REQUESTED].
*/
pagecache_pthread_mutex_unlock(&pagecache->cache_lock);
args.page= block->buffer;
args.pageno= block->hash_link->pageno;
args.data= block->hash_link->file.callback_data;
error= (*block->hash_link->file.pre_read_hook)(&args);
if (!error)
{
error= pagecache_fread(pagecache, &block->hash_link->file,
args.page,
block->hash_link->pageno,
pagecache->readwrite_flags);
}
error= (*block->hash_link->file.post_read_hook)(error != 0, &args);
pagecache_pthread_mutex_lock(&pagecache->cache_lock);
if (error)
{
DBUG_ASSERT(maria_in_recovery || !maria_assert_if_crashed_table);
block->status|= PCBLOCK_ERROR;
block->error= (int16) my_errno;
my_debug_put_break_here();
}
else
{
block->status|= PCBLOCK_READ;
}
DBUG_PRINT("read_block",
("primary request: new page in cache"));
/* Signal that all pending requests for this page now can be processed */
if (block->wqueue[COND_FOR_REQUESTED].last_thread)
wqueue_release_queue(&block->wqueue[COND_FOR_REQUESTED]);
}
else
{
/*
This code is executed only by threads
that submitted secondary requests
*/
struct st_my_thread_var *thread= my_thread_var;
/* Put the request into a queue and wait until it can be processed */
wqueue_add_to_queue(&block->wqueue[COND_FOR_REQUESTED], thread);
do
{
DBUG_PRINT("wait",
("suspend thread %s %ld", thread->name,
(ulong) thread->id));
pagecache_pthread_cond_wait(&thread->suspend,
&pagecache->cache_lock);
}
while (thread->next);
DBUG_PRINT("read_block",
("secondary request: new page in cache"));
}
DBUG_VOID_RETURN;
} | O3 | c | read_block:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %rbx
movq %rdi, %r14
testb %dl, %dl
je 0x3bcd6
incq 0x188(%r14)
leaq 0xc8(%r14), %r15
movq 0x108(%r14), %rdi
testq %rdi, %rdi
jne 0x3be21
movq %r15, %rdi
callq 0x291c0
movq 0x30(%rbx), %rax
leaq -0x68(%rbp), %rdi
movq %rax, (%rdi)
movq 0x20(%rbx), %rax
movq 0x60(%rax), %rcx
movq %rcx, 0x8(%rdi)
movq 0x58(%rax), %rcx
movq %rcx, 0x10(%rdi)
callq *0x30(%rax)
testb %al, %al
je 0x3bd38
movsbq %al, %r12
jmp 0x3bdae
callq 0xa1ac2
movq %rax, %r15
addq $0x48, %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xa6603
movq %r15, %rbx
addq $0x8, %rbx
addq $0xc8, %r14
leaq 0x9e608(%rip), %r12 # 0xda30a
cmpq $0x0, 0x38(%r15)
jne 0x3bd23
movq %rbx, %rdi
movq %r14, %rsi
callq 0x29420
cmpq $0x0, 0x88(%r15)
jne 0x3bd02
jmp 0x3be0f
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
movl $0xc3b, %ecx # imm = 0xC3B
callq 0x2ee80
jmp 0x3bd14
movq 0x20(%rbx), %rax
movl 0x28(%rax), %r13d
movq -0x68(%rbp), %rcx
movq %rcx, -0x40(%rbp)
movq 0x60(%rax), %r12
movb 0x190(%r14), %cl
shlq %cl, %r12
movl 0x80(%r14), %eax
movq %rax, -0x38(%rbp)
movq 0x198(%r14), %rax
movq %rax, -0x30(%rbp)
leaq 0x34a29d(%rip), %rax # 0x386010
movq (%rax), %rax
leaq -0xb0(%rbp), %rdi
movl %r13d, %esi
movl $0x6, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x3be4c
movl %r13d, %edi
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq %r12, %rcx
movq -0x30(%rbp), %r8
callq 0xa0600
movq %rax, %r12
movq 0x20(%rbx), %rax
xorl %edi, %edi
testq %r12, %r12
setne %dil
leaq -0x68(%rbp), %rsi
callq *0x38(%rax)
movl %eax, %r12d
cmpq $0x0, 0x108(%r14)
jne 0x3be36
movq %r15, %rdi
callq 0x29200
movzwl 0x74(%rbx), %eax
testb %r12b, %r12b
je 0x3bdf5
orl $0x1, %eax
movw %ax, 0x74(%rbx)
callq 0xa1ac2
movzwl (%rax), %eax
movw %ax, 0x76(%rbx)
jmp 0x3bdfc
orl $0x2, %eax
movw %ax, 0x74(%rbx)
cmpq $0x0, 0x48(%rbx)
je 0x3be0f
addq $0x48, %rbx
movq %rbx, %rdi
callq 0xa6683
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x34a1e8(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x3bc9f
leaq 0x9e4cd(%rip), %rsi # 0xda30a
movq %r15, %rdi
movl $0xc19, %edx # imm = 0xC19
callq 0x2eb6f
jmp 0x3bdd7
movq %rax, %rcx
leaq 0x34a1ba(%rip), %rax # 0x386010
movq (%rax), %rax
leaq 0x9e4aa(%rip), %rdx # 0xda30a
movq %rcx, -0x48(%rbp)
movq %rcx, %rdi
movq -0x38(%rbp), %rsi
movl $0xc16, %ecx # imm = 0xC16
callq *0x210(%rax)
movl %r13d, %edi
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %r13
movq %r13, %rdx
movq %r12, %rcx
movq -0x30(%rbp), %r8
callq 0xa0600
movq %rax, %r12
xorl %esi, %esi
testq %rax, %rax
cmovneq %rsi, %r13
cmpq $-0x1, %rax
cmovneq %rax, %rsi
testb $0x6, -0x30(%rbp)
cmovneq %r13, %rsi
leaq 0x34a15d(%rip), %rax # 0x386010
movq (%rax), %rax
movq -0x48(%rbp), %rdi
callq *0x218(%rax)
jmp 0x3bdae
| read_block:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov rbx, rsi
mov r14, rdi
test dl, dl
jz short loc_3BCD6
inc qword ptr [r14+188h]
lea r15, [r14+0C8h]
mov rdi, [r14+108h]
test rdi, rdi
jnz loc_3BE21
loc_3BC9F:
mov rdi, r15
call _pthread_mutex_unlock
mov rax, [rbx+30h]
lea rdi, [rbp+var_68]
mov [rdi], rax
mov rax, [rbx+20h]
mov rcx, [rax+60h]
mov [rdi+8], rcx
mov rcx, [rax+58h]
mov [rdi+10h], rcx
call qword ptr [rax+30h]
test al, al
jz short loc_3BD38
movsx r12, al
jmp loc_3BDAE
loc_3BCD6:
call _my_thread_var
mov r15, rax
add rbx, 48h ; 'H'
mov rdi, rbx
mov rsi, rax
call wqueue_add_to_queue
mov rbx, r15
add rbx, 8
add r14, 0C8h
lea r12, aWorkspaceLlm4b_25; "/workspace/llm4binary/github2025/eloqsq"...
loc_3BD02:
cmp qword ptr [r15+38h], 0
jnz short loc_3BD23
mov rdi, rbx
mov rsi, r14
call _pthread_cond_wait
loc_3BD14:
cmp qword ptr [r15+88h], 0
jnz short loc_3BD02
jmp loc_3BE0F
loc_3BD23:
mov rdi, rbx
mov rsi, r14
mov rdx, r12
mov ecx, 0C3Bh
call psi_cond_wait
jmp short loc_3BD14
loc_3BD38:
mov rax, [rbx+20h]
mov r13d, [rax+28h]
mov rcx, [rbp+var_68]
mov [rbp+var_40], rcx
mov r12, [rax+60h]
mov cl, [r14+190h]
shl r12, cl
mov eax, [r14+80h]
mov [rbp+var_38], rax
mov rax, [r14+198h]
mov [rbp+var_30], rax
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_B0]
mov esi, r13d
mov edx, 6
call qword ptr [rax+158h]
test rax, rax
jnz loc_3BE4C
mov edi, r13d
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
mov rcx, r12
mov r8, [rbp+var_30]
call my_pread
mov r12, rax
loc_3BDAE:
mov rax, [rbx+20h]
xor edi, edi
test r12, r12
setnz dil
lea rsi, [rbp+var_68]
call qword ptr [rax+38h]
mov r12d, eax
cmp qword ptr [r14+108h], 0
jnz short loc_3BE36
mov rdi, r15
call _pthread_mutex_lock
loc_3BDD7:
movzx eax, word ptr [rbx+74h]
test r12b, r12b
jz short loc_3BDF5
or eax, 1
mov [rbx+74h], ax
call _my_thread_var
movzx eax, word ptr [rax]
mov [rbx+76h], ax
jmp short loc_3BDFC
loc_3BDF5:
or eax, 2
mov [rbx+74h], ax
loc_3BDFC:
cmp qword ptr [rbx+48h], 0
jz short loc_3BE0F
add rbx, 48h ; 'H'
mov rdi, rbx
call wqueue_release_queue
loc_3BE0F:
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3BE21:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_3BC9F
loc_3BE36:
lea rsi, aWorkspaceLlm4b_25; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r15
mov edx, 0C19h
call psi_mutex_lock
jmp short loc_3BDD7
loc_3BE4C:
mov rcx, rax
lea rax, PSI_server
mov rax, [rax]
lea rdx, aWorkspaceLlm4b_25; "/workspace/llm4binary/github2025/eloqsq"...
mov [rbp+var_48], rcx
mov rdi, rcx
mov rsi, [rbp+var_38]
mov ecx, 0C16h
call qword ptr [rax+210h]
mov edi, r13d
mov rsi, [rbp+var_40]
mov r13, [rbp+var_38]
mov rdx, r13
mov rcx, r12
mov r8, [rbp+var_30]
call my_pread
mov r12, rax
xor esi, esi
test rax, rax
cmovnz r13, rsi
cmp rax, 0FFFFFFFFFFFFFFFFh
cmovnz rsi, rax
test byte ptr [rbp+var_30], 6
cmovnz rsi, r13
lea rax, PSI_server
mov rax, [rax]
mov rdi, [rbp+var_48]
call qword ptr [rax+218h]
jmp loc_3BDAE
| long long read_block(long long a1, long long a2, char a3)
{
long long v3; // rax
char v4; // al
long long v5; // r12
long long v6; // r15
long long v7; // r14
long long result; // rax
long long v9; // rax
unsigned int v10; // r13d
long long v11; // r12
long long v12; // rax
char v13; // r12
int v14; // eax
_BYTE v15[72]; // [rsp+0h] [rbp-B0h] BYREF
_QWORD v16[4]; // [rsp+48h] [rbp-68h] BYREF
long long v17; // [rsp+68h] [rbp-48h]
long long v18; // [rsp+70h] [rbp-40h]
long long v19; // [rsp+78h] [rbp-38h]
long long v20; // [rsp+80h] [rbp-30h]
if ( a3 )
{
++*(_QWORD *)(a1 + 392);
if ( *(_QWORD *)(a1 + 264) )
PSI_server[44]();
pthread_mutex_unlock(a1 + 200);
v16[0] = *(_QWORD *)(a2 + 48);
v3 = *(_QWORD *)(a2 + 32);
v16[1] = *(_QWORD *)(v3 + 96);
v16[2] = *(_QWORD *)(v3 + 88);
v4 = (*(long long (**)(void))(v3 + 48))();
if ( v4 )
{
v5 = v4;
}
else
{
v9 = *(_QWORD *)(a2 + 32);
v10 = *(_DWORD *)(v9 + 40);
v18 = v16[0];
v11 = *(_QWORD *)(v9 + 96) << *(_BYTE *)(a1 + 400);
v19 = *(unsigned int *)(a1 + 128);
v20 = *(_QWORD *)(a1 + 408);
v12 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v15, v10, 6LL);
if ( v12 )
{
v17 = v12;
((void ( *)(long long, long long, const char *, long long))PSI_server[66])(
v12,
v19,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",
3094LL);
v5 = my_pread(v10, v18, v19, v11, v20);
((void ( *)(long long))PSI_server[67])(v17);
}
else
{
v5 = my_pread(v10, v18, v19, v11, v20);
}
}
v13 = (*(long long ( **)(bool, _QWORD *))(*(_QWORD *)(a2 + 32) + 56LL))(v5 != 0, v16);
if ( *(_QWORD *)(a1 + 264) )
psi_mutex_lock(a1 + 200, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0xC19u);
else
pthread_mutex_lock(a1 + 200);
v14 = *(unsigned __int16 *)(a2 + 116);
if ( v13 )
{
*(_WORD *)(a2 + 116) = v14 | 1;
result = *(unsigned __int16 *)my_thread_var(a1 + 200);
*(_WORD *)(a2 + 118) = result;
}
else
{
result = v14 | 2u;
*(_WORD *)(a2 + 116) = result;
}
if ( *(_QWORD *)(a2 + 72) )
return wqueue_release_queue(a2 + 72);
}
else
{
v6 = my_thread_var(a1);
wqueue_add_to_queue(a2 + 72, v6);
v7 = a1 + 200;
do
{
if ( *(_QWORD *)(v6 + 56) )
result = psi_cond_wait(
v6 + 8,
v7,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",
0xC3Bu);
else
result = pthread_cond_wait(v6 + 8, v7);
}
while ( *(_QWORD *)(v6 + 136) );
}
return result;
}
| read_block:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV RBX,RSI
MOV R14,RDI
TEST DL,DL
JZ 0x0013bcd6
INC qword ptr [R14 + 0x188]
LEA R15,[R14 + 0xc8]
MOV RDI,qword ptr [R14 + 0x108]
TEST RDI,RDI
JNZ 0x0013be21
LAB_0013bc9f:
MOV RDI,R15
CALL 0x001291c0
MOV RAX,qword ptr [RBX + 0x30]
LEA RDI,[RBP + -0x68]
MOV qword ptr [RDI],RAX
MOV RAX,qword ptr [RBX + 0x20]
MOV RCX,qword ptr [RAX + 0x60]
MOV qword ptr [RDI + 0x8],RCX
MOV RCX,qword ptr [RAX + 0x58]
MOV qword ptr [RDI + 0x10],RCX
CALL qword ptr [RAX + 0x30]
TEST AL,AL
JZ 0x0013bd38
MOVSX R12,AL
JMP 0x0013bdae
LAB_0013bcd6:
CALL 0x001a1ac2
MOV R15,RAX
ADD RBX,0x48
MOV RDI,RBX
MOV RSI,RAX
CALL 0x001a6603
MOV RBX,R15
ADD RBX,0x8
ADD R14,0xc8
LEA R12,[0x1da30a]
LAB_0013bd02:
CMP qword ptr [R15 + 0x38],0x0
JNZ 0x0013bd23
MOV RDI,RBX
MOV RSI,R14
CALL 0x00129420
LAB_0013bd14:
CMP qword ptr [R15 + 0x88],0x0
JNZ 0x0013bd02
JMP 0x0013be0f
LAB_0013bd23:
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R12
MOV ECX,0xc3b
CALL 0x0012ee80
JMP 0x0013bd14
LAB_0013bd38:
MOV RAX,qword ptr [RBX + 0x20]
MOV R13D,dword ptr [RAX + 0x28]
MOV RCX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x40],RCX
MOV R12,qword ptr [RAX + 0x60]
MOV CL,byte ptr [R14 + 0x190]
SHL R12,CL
MOV EAX,dword ptr [R14 + 0x80]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [R14 + 0x198]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0xb0]
MOV ESI,R13D
MOV EDX,0x6
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0013be4c
MOV EDI,R13D
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
MOV RCX,R12
MOV R8,qword ptr [RBP + -0x30]
CALL 0x001a0600
MOV R12,RAX
LAB_0013bdae:
MOV RAX,qword ptr [RBX + 0x20]
XOR EDI,EDI
TEST R12,R12
SETNZ DIL
LEA RSI,[RBP + -0x68]
CALL qword ptr [RAX + 0x38]
MOV R12D,EAX
CMP qword ptr [R14 + 0x108],0x0
JNZ 0x0013be36
MOV RDI,R15
CALL 0x00129200
LAB_0013bdd7:
MOVZX EAX,word ptr [RBX + 0x74]
TEST R12B,R12B
JZ 0x0013bdf5
OR EAX,0x1
MOV word ptr [RBX + 0x74],AX
CALL 0x001a1ac2
MOVZX EAX,word ptr [RAX]
MOV word ptr [RBX + 0x76],AX
JMP 0x0013bdfc
LAB_0013bdf5:
OR EAX,0x2
MOV word ptr [RBX + 0x74],AX
LAB_0013bdfc:
CMP qword ptr [RBX + 0x48],0x0
JZ 0x0013be0f
ADD RBX,0x48
MOV RDI,RBX
CALL 0x001a6683
LAB_0013be0f:
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013be21:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0013bc9f
LAB_0013be36:
LEA RSI,[0x1da30a]
MOV RDI,R15
MOV EDX,0xc19
CALL 0x0012eb6f
JMP 0x0013bdd7
LAB_0013be4c:
MOV RCX,RAX
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
LEA RDX,[0x1da30a]
MOV qword ptr [RBP + -0x48],RCX
MOV RDI,RCX
MOV RSI,qword ptr [RBP + -0x38]
MOV ECX,0xc16
CALL qword ptr [RAX + 0x210]
MOV EDI,R13D
MOV RSI,qword ptr [RBP + -0x40]
MOV R13,qword ptr [RBP + -0x38]
MOV RDX,R13
MOV RCX,R12
MOV R8,qword ptr [RBP + -0x30]
CALL 0x001a0600
MOV R12,RAX
XOR ESI,ESI
TEST RAX,RAX
CMOVNZ R13,RSI
CMP RAX,-0x1
CMOVNZ RSI,RAX
TEST byte ptr [RBP + -0x30],0x6
CMOVNZ RSI,R13
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RBP + -0x48]
CALL qword ptr [RAX + 0x218]
JMP 0x0013bdae
|
void read_block(long param_1,long param_2,char param_3)
{
pthread_mutex_t *__mutex;
int4 uVar1;
char cVar2;
long lVar3;
int2 *puVar4;
ulong uVar5;
ulong uVar6;
long lVar7;
ulong uVar8;
int1 local_b8 [72];
int8 local_70;
int8 local_68;
int8 local_60;
long local_50;
int8 local_48;
ulong local_40;
ulong local_38;
if (param_3 == '\0') {
lVar3 = _my_thread_var();
wqueue_add_to_queue(param_2 + 0x48,lVar3);
do {
if (*(long *)(lVar3 + 0x38) == 0) {
pthread_cond_wait((pthread_cond_t *)(lVar3 + 8),(pthread_mutex_t *)(param_1 + 200));
}
else {
psi_cond_wait((pthread_cond_t *)(lVar3 + 8),(pthread_mutex_t *)(param_1 + 200),
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",0xc3b)
;
}
} while (*(long *)(lVar3 + 0x88) != 0);
}
else {
*(long *)(param_1 + 0x188) = *(long *)(param_1 + 0x188) + 1;
__mutex = (pthread_mutex_t *)(param_1 + 200);
if (*(long *)(param_1 + 0x108) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
local_70 = *(int8 *)(param_2 + 0x30);
lVar3 = *(long *)(param_2 + 0x20);
local_68 = *(int8 *)(lVar3 + 0x60);
local_60 = *(int8 *)(lVar3 + 0x58);
cVar2 = (**(code **)(lVar3 + 0x30))();
if (cVar2 == '\0') {
uVar1 = *(int4 *)(*(long *)(param_2 + 0x20) + 0x28);
local_48 = local_70;
lVar7 = *(long *)(*(long *)(param_2 + 0x20) + 0x60) << (*(byte *)(param_1 + 400) & 0x3f);
local_40 = (ulong)*(uint *)(param_1 + 0x80);
local_38 = *(ulong *)(param_1 + 0x198);
lVar3 = (**(code **)(PSI_server + 0x158))(local_b8,uVar1,6);
if (lVar3 == 0) {
uVar6 = my_pread(uVar1,local_48,local_40,lVar7,local_38);
}
else {
local_50 = lVar3;
(**(code **)(PSI_server + 0x210))
(lVar3,local_40,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",0xc16);
uVar8 = local_40;
uVar6 = my_pread(uVar1,local_48,local_40,lVar7,local_38);
if (uVar6 != 0) {
uVar8 = 0;
}
uVar5 = 0;
if (uVar6 != 0xffffffffffffffff) {
uVar5 = uVar6;
}
if ((local_38 & 6) != 0) {
uVar5 = uVar8;
}
(**(code **)(PSI_server + 0x218))(local_50,uVar5);
}
}
else {
uVar6 = (ulong)cVar2;
}
cVar2 = (**(code **)(*(long *)(param_2 + 0x20) + 0x38))(uVar6 != 0,&local_70);
if (*(long *)(param_1 + 0x108) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c"
,0xc19);
}
if (cVar2 == '\0') {
*(ushort *)(param_2 + 0x74) = *(ushort *)(param_2 + 0x74) | 2;
}
else {
*(ushort *)(param_2 + 0x74) = *(ushort *)(param_2 + 0x74) | 1;
puVar4 = (int2 *)_my_thread_var();
*(int2 *)(param_2 + 0x76) = *puVar4;
}
if (*(long *)(param_2 + 0x48) != 0) {
wqueue_release_queue(param_2 + 0x48);
}
}
return;
}
| |
54,643 | my_fread | eloqsql/mysys/my_fstream.c | size_t my_fread(FILE *stream, uchar *Buffer, size_t Count, myf MyFlags)
{
size_t readbytes;
DBUG_ENTER("my_fread");
DBUG_PRINT("my",("stream: %p Buffer %p Count: %u MyFlags: %lu",
stream, Buffer, (uint) Count, MyFlags));
if ((readbytes= fread(Buffer, sizeof(char), Count, stream)) != Count)
{
DBUG_PRINT("error",("Read only %d bytes", (int) readbytes));
if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
{
if (ferror(stream))
my_error(EE_READ, MYF(ME_BELL),
my_filename(my_fileno(stream)),errno);
else
if (MyFlags & (MY_NABP | MY_FNABP))
my_error(EE_EOFERR, MYF(ME_BELL),
my_filename(my_fileno(stream)),errno);
}
my_errno=errno ? errno : -1;
if (ferror(stream) || MyFlags & (MY_NABP | MY_FNABP))
DBUG_RETURN((size_t) -1); /* Return with error */
}
if (MyFlags & (MY_NABP | MY_FNABP))
DBUG_RETURN(0); /* Read ok */
DBUG_RETURN(readbytes);
} | O3 | c | my_fread:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %rax
movq %rdi, %r15
movl $0x1, %esi
movq %rax, %rdi
movq %r15, %rcx
callq 0x24510
movq %rax, %r14
cmpq %r12, %rax
jne 0x2eef9
xorl %r12d, %r12d
testb $0x6, %bl
cmoveq %r14, %r12
jmp 0x2ef88
testb $0x1a, %bl
je 0x2ef46
movq %r15, %rdi
callq 0x24660
movl $0x2, %r12d
testl %eax, %eax
jne 0x2ef1b
movl $0x9, %r12d
testb $0x6, %bl
je 0x2ef46
movq %r15, %rdi
callq 0x24310
movl %eax, %edi
callq 0x31948
movq %rax, %r13
callq 0x24050
movl (%rax), %ecx
movl $0x4, %esi
movl %r12d, %edi
movq %r13, %rdx
xorl %eax, %eax
callq 0x2e7bf
callq 0x24050
movl (%rax), %eax
xorl %r12d, %r12d
cmpl $0x1, %eax
movl $0x0, %r13d
sbbl %r13d, %r13d
orl %eax, %r13d
callq 0x28ca6
movl %r13d, (%rax)
movq %r15, %rdi
callq 0x24660
andl $0x6, %ebx
negq %rbx
movl $0x0, %ecx
sbbq %rcx, %rcx
negl %eax
sbbq %r12, %r12
orq %r14, %r12
orq %rcx, %r12
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_fread:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rcx
mov r12, rdx
mov rax, rsi
mov r15, rdi
mov esi, 1
mov rdi, rax
mov rcx, r15
call _fread
mov r14, rax
cmp rax, r12
jnz short loc_2EEF9
xor r12d, r12d
test bl, 6
cmovz r12, r14
jmp loc_2EF88
loc_2EEF9:
test bl, 1Ah
jz short loc_2EF46
mov rdi, r15
call _ferror
mov r12d, 2
test eax, eax
jnz short loc_2EF1B
mov r12d, 9
test bl, 6
jz short loc_2EF46
loc_2EF1B:
mov rdi, r15
call _fileno
mov edi, eax
call my_filename
mov r13, rax
call ___errno_location
mov ecx, [rax]
mov esi, 4
mov edi, r12d
mov rdx, r13
xor eax, eax
call my_error
loc_2EF46:
call ___errno_location
mov eax, [rax]
xor r12d, r12d
cmp eax, 1
mov r13d, 0
sbb r13d, r13d
or r13d, eax
call _my_thread_var
mov [rax], r13d
mov rdi, r15
call _ferror
and ebx, 6
neg rbx
mov ecx, 0
sbb rcx, rcx
neg eax
sbb r12, r12
or r12, r14
or r12, rcx
loc_2EF88:
mov rax, r12
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_fread(long long a1, long long a2, long long a3, char a4)
{
long long v7; // rdi
long long v8; // rax
long long v9; // r14
long long v10; // r12
unsigned int v11; // r12d
long long v12; // rdi
long long v13; // r13
unsigned int *v14; // rax
_DWORD *v15; // rax
int v16; // r13d
v7 = a2;
v8 = fread(a2, 1LL, a3, a1);
v9 = v8;
if ( v8 == a3 )
{
v10 = 0LL;
if ( (a4 & 6) == 0 )
return v8;
}
else
{
if ( (a4 & 0x1A) != 0 )
{
v7 = a1;
v11 = 2;
if ( (unsigned int)ferror(a1) || (v11 = 9, (a4 & 6) != 0) )
{
v12 = (unsigned int)fileno(a1);
v13 = my_filename(v12);
v14 = (unsigned int *)__errno_location(v12);
v7 = v11;
my_error(v11, 4, v13, *v14);
}
}
v15 = (_DWORD *)__errno_location(v7);
v16 = *v15 == 0 ? -1 : *v15;
*(_DWORD *)my_thread_var() = v16;
return -(long long)((a4 & 6) != 0LL) | v9 | -(long long)((unsigned int)ferror(a1) != 0);
}
return v10;
}
| my_fread:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RCX
MOV R12,RDX
MOV RAX,RSI
MOV R15,RDI
MOV ESI,0x1
MOV RDI,RAX
MOV RCX,R15
CALL 0x00124510
MOV R14,RAX
CMP RAX,R12
JNZ 0x0012eef9
XOR R12D,R12D
TEST BL,0x6
CMOVZ R12,R14
JMP 0x0012ef88
LAB_0012eef9:
TEST BL,0x1a
JZ 0x0012ef46
MOV RDI,R15
CALL 0x00124660
MOV R12D,0x2
TEST EAX,EAX
JNZ 0x0012ef1b
MOV R12D,0x9
TEST BL,0x6
JZ 0x0012ef46
LAB_0012ef1b:
MOV RDI,R15
CALL 0x00124310
MOV EDI,EAX
CALL 0x00131948
MOV R13,RAX
CALL 0x00124050
MOV ECX,dword ptr [RAX]
MOV ESI,0x4
MOV EDI,R12D
MOV RDX,R13
XOR EAX,EAX
CALL 0x0012e7bf
LAB_0012ef46:
CALL 0x00124050
MOV EAX,dword ptr [RAX]
XOR R12D,R12D
CMP EAX,0x1
MOV R13D,0x0
SBB R13D,R13D
OR R13D,EAX
CALL 0x00128ca6
MOV dword ptr [RAX],R13D
MOV RDI,R15
CALL 0x00124660
AND EBX,0x6
NEG RBX
MOV ECX,0x0
SBB RCX,RCX
NEG EAX
SBB R12,R12
OR R12,R14
OR R12,RCX
LAB_0012ef88:
MOV RAX,R12
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
size_t my_fread(FILE *param_1,void *param_2,size_t param_3,ulong param_4)
{
uint uVar1;
int iVar2;
size_t sVar3;
int8 uVar4;
int *piVar5;
uint *puVar6;
int8 uVar7;
ulong uVar8;
sVar3 = fread(param_2,1,param_3,param_1);
if (sVar3 == param_3) {
uVar8 = 0;
if ((param_4 & 6) == 0) {
uVar8 = sVar3;
}
}
else {
if ((param_4 & 0x1a) != 0) {
iVar2 = ferror(param_1);
uVar7 = 2;
if ((iVar2 != 0) || (uVar7 = 9, (param_4 & 6) != 0)) {
iVar2 = fileno(param_1);
uVar4 = my_filename(iVar2);
piVar5 = __errno_location();
my_error(uVar7,4,uVar4,*piVar5);
}
}
puVar6 = (uint *)__errno_location();
uVar1 = *puVar6;
puVar6 = (uint *)_my_thread_var();
*puVar6 = -(uint)(uVar1 == 0) | uVar1;
iVar2 = ferror(param_1);
uVar8 = -(ulong)(iVar2 != 0) | sVar3 | -(ulong)((param_4 & 6) != 0);
}
return uVar8;
}
| |
54,644 | run_tool(char const*, st_dynamic_string*, ...) | eloqsql/client/mysqltest.cc | static int run_tool(const char *tool_path, DYNAMIC_STRING *ds_res, ...)
{
int ret;
const char* arg;
va_list args;
DYNAMIC_STRING ds_cmdline;
DBUG_ENTER("run_tool");
DBUG_PRINT("enter", ("tool_path: %s", tool_path));
if (init_dynamic_string(&ds_cmdline, IF_WIN("\"", ""), FN_REFLEN, FN_REFLEN))
die("Out of memory");
dynstr_append_os_quoted(&ds_cmdline, tool_path, NullS);
dynstr_append(&ds_cmdline, " ");
va_start(args, ds_res);
while ((arg= va_arg(args, char *)))
{
/* Options should be os quoted */
if (strncmp(arg, "--", 2) == 0)
dynstr_append_os_quoted(&ds_cmdline, arg, NullS);
else
dynstr_append(&ds_cmdline, arg);
dynstr_append(&ds_cmdline, " ");
}
va_end(args);
#ifdef _WIN32
dynstr_append(&ds_cmdline, "\"");
#endif
DBUG_PRINT("info", ("Running: %s", ds_cmdline.str));
ret= run_command(ds_cmdline.str, ds_res);
DBUG_PRINT("exit", ("ret: %d", ret));
dynstr_free(&ds_cmdline);
DBUG_RETURN(ret);
} | O0 | cpp | run_tool(char const*, st_dynamic_string*, ...):
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp # imm = 0x130
testb %al, %al
je 0x64191
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)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
jmp 0x641b7
leaq -0x60(%rbp), %rdi
leaq 0xe7bfc(%rip), %rsi # 0x14bdbe
movl $0x200, %ecx # imm = 0x200
movq %rcx, %rdx
callq 0xc5c30
cmpb $0x0, %al
je 0x641e1
leaq 0xe7826(%rip), %rdi # 0x14ba00
movb $0x0, %al
callq 0x62b40
movq -0x8(%rbp), %rsi
leaq -0x60(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0xc6070
leaq -0x60(%rbp), %rdi
leaq 0x106579(%rip), %rsi # 0x16a778
callq 0xc5f00
leaq -0x40(%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)
leaq -0x40(%rbp), %rax
movq %rax, -0x120(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x114(%rbp)
cmpl $0x28, %eax
ja 0x64263
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 0x64280
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, -0x20(%rbp)
cmpq $0x0, %rax
je 0x642e5
movq -0x20(%rbp), %rdi
leaq 0x10d10b(%rip), %rsi # 0x1713aa
movl $0x2, %edx
callq 0x60270
cmpl $0x0, %eax
jne 0x642c3
movq -0x20(%rbp), %rsi
leaq -0x60(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0xc6070
jmp 0x642d0
movq -0x20(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0xc5f00
leaq -0x60(%rbp), %rdi
leaq 0x10649d(%rip), %rsi # 0x16a778
callq 0xc5f00
jmp 0x64228
leaq -0x40(%rbp), %rax
jmp 0x642eb
movq -0x60(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x76580
movl %eax, -0x14(%rbp)
jmp 0x642fd
leaq -0x60(%rbp), %rdi
callq 0xc6410
movl -0x14(%rbp), %eax
addq $0x130, %rsp # imm = 0x130
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZL8run_toolPKcP17st_dynamic_stringz:
push rbp
mov rbp, rsp
sub rsp, 130h
test al, al
jz short loc_64191
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_64191:
mov [rbp+var_E8], r9
mov [rbp+var_F0], r8
mov [rbp+var_F8], rcx
mov [rbp+var_100], rdx
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
jmp short $+2
loc_641B7:
lea rdi, [rbp+var_60]
lea rsi, asc_14BDBD+1; ""
mov ecx, 200h
mov rdx, rcx
call init_dynamic_string
cmp al, 0
jz short loc_641E1
lea rdi, aOutOfMemory; "Out of memory"
mov al, 0
call _ZL3diePKcz; die(char const*,...)
loc_641E1:
mov rsi, [rbp+var_8]
lea rdi, [rbp+var_60]
xor eax, eax
mov edx, eax
mov al, 0
call dynstr_append_os_quoted
lea rdi, [rbp+var_60]
lea rsi, asc_16A777+1; " "
call dynstr_append
lea rax, [rbp+var_40]
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
loc_64228:
lea rax, [rbp+var_40]
mov [rbp+var_120], rax
mov eax, [rbp+var_40]
mov [rbp+var_114], eax
cmp eax, 28h ; '('
ja short loc_64263
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_64280
loc_64263:
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_64280:
mov rax, [rbp+var_128]
mov rax, [rax]
mov [rbp+var_20], rax
cmp rax, 0
jz short loc_642E5
mov rdi, [rbp+var_20]
lea rsi, asc_1713A8+2; "--"
mov edx, 2
call _strncmp
cmp eax, 0
jnz short loc_642C3
mov rsi, [rbp+var_20]
lea rdi, [rbp+var_60]
xor eax, eax
mov edx, eax
mov al, 0
call dynstr_append_os_quoted
jmp short loc_642D0
loc_642C3:
mov rsi, [rbp+var_20]
lea rdi, [rbp+var_60]
call dynstr_append
loc_642D0:
lea rdi, [rbp+var_60]
lea rsi, asc_16A777+1; " "
call dynstr_append
jmp loc_64228
loc_642E5:
lea rax, [rbp+var_40]
jmp short $+2
loc_642EB:
mov rdi, [rbp+var_60]
mov rsi, [rbp+var_10]
call _ZL11run_commandPcP17st_dynamic_string; run_command(char *,st_dynamic_string *)
mov [rbp+var_14], eax
jmp short $+2
loc_642FD:
lea rdi, [rbp+var_60]
call dynstr_free
mov eax, [rbp+var_14]
add rsp, 130h
pop rbp
retn
| long long run_tool(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
int v15; // ecx
int v16; // r8d
int v17; // r9d
char *v18; // rax
int v19; // ecx
int v20; // r8d
int v21; // r9d
char v23; // [rsp+20h] [rbp-110h] BYREF
long long v24; // [rsp+30h] [rbp-100h]
long long v25; // [rsp+38h] [rbp-F8h]
long long v26; // [rsp+40h] [rbp-F0h]
long long v27; // [rsp+48h] [rbp-E8h]
__m128 v28; // [rsp+50h] [rbp-E0h]
__m128 v29; // [rsp+60h] [rbp-D0h]
__m128 v30; // [rsp+70h] [rbp-C0h]
__m128 v31; // [rsp+80h] [rbp-B0h]
__m128 v32; // [rsp+90h] [rbp-A0h]
__m128 v33; // [rsp+A0h] [rbp-90h]
__m128 v34; // [rsp+B0h] [rbp-80h]
__m128 v35; // [rsp+C0h] [rbp-70h]
_QWORD v36[4]; // [rsp+D0h] [rbp-60h] BYREF
int v37; // [rsp+F0h] [rbp-40h]
int v38; // [rsp+F4h] [rbp-3Ch]
char *v39; // [rsp+F8h] [rbp-38h]
char *v40; // [rsp+100h] [rbp-30h]
long long v41; // [rsp+110h] [rbp-20h]
unsigned int v42; // [rsp+11Ch] [rbp-14h]
long long v43; // [rsp+120h] [rbp-10h]
long long v44; // [rsp+128h] [rbp-8h]
v28 = a7;
v29 = a8;
v30 = a9;
v31 = a10;
v32 = a11;
v33 = a12;
v34 = a13;
v35 = a14;
v27 = a6;
v26 = a5;
v25 = a4;
v24 = a3;
v44 = a1;
v43 = a2;
if ( (unsigned __int8)init_dynamic_string(v36, "", 512LL) )
die("Out of memory");
dynstr_append_os_quoted((unsigned int)v36, v44, 0, v15, v16, v17);
dynstr_append(v36, " ");
v40 = &v23;
v39 = &a15;
v38 = 48;
v37 = 16;
while ( 1 )
{
if ( (unsigned int)v37 > 0x28 )
{
v18 = v39;
v39 += 8;
}
else
{
v18 = &v40[v37];
v37 += 8;
}
v41 = *(_QWORD *)v18;
if ( !v41 )
break;
if ( !(unsigned int)strncmp(v41, "--", 2LL) )
dynstr_append_os_quoted((unsigned int)v36, v41, 0, v19, v20, v21);
else
dynstr_append(v36, v41);
dynstr_append(v36, " ");
}
v42 = run_command(v36[0], v43);
dynstr_free(v36);
return v42;
}
| run_tool:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x130
TEST AL,AL
JZ 0x00164191
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_00164191:
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 qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
JMP 0x001641b7
LAB_001641b7:
LEA RDI,[RBP + -0x60]
LEA RSI,[0x24bdbe]
MOV ECX,0x200
MOV RDX,RCX
CALL 0x001c5c30
CMP AL,0x0
JZ 0x001641e1
LEA RDI,[0x24ba00]
MOV AL,0x0
CALL 0x00162b40
LAB_001641e1:
MOV RSI,qword ptr [RBP + -0x8]
LEA RDI,[RBP + -0x60]
XOR EAX,EAX
MOV EDX,EAX
MOV AL,0x0
CALL 0x001c6070
LEA RDI,[RBP + -0x60]
LEA RSI,[0x26a778]
CALL 0x001c5f00
LEA RAX,[RBP + -0x40]
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
LAB_00164228:
LEA RAX,[RBP + -0x40]
MOV qword ptr [RBP + -0x120],RAX
MOV EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x114],EAX
CMP EAX,0x28
JA 0x00164263
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 0x00164280
LAB_00164263:
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_00164280:
MOV RAX,qword ptr [RBP + -0x128]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JZ 0x001642e5
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[0x2713aa]
MOV EDX,0x2
CALL 0x00160270
CMP EAX,0x0
JNZ 0x001642c3
MOV RSI,qword ptr [RBP + -0x20]
LEA RDI,[RBP + -0x60]
XOR EAX,EAX
MOV EDX,EAX
MOV AL,0x0
CALL 0x001c6070
JMP 0x001642d0
LAB_001642c3:
MOV RSI,qword ptr [RBP + -0x20]
LEA RDI,[RBP + -0x60]
CALL 0x001c5f00
LAB_001642d0:
LEA RDI,[RBP + -0x60]
LEA RSI,[0x26a778]
CALL 0x001c5f00
JMP 0x00164228
LAB_001642e5:
LEA RAX,[RBP + -0x40]
JMP 0x001642eb
LAB_001642eb:
MOV RDI,qword ptr [RBP + -0x60]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00176580
MOV dword ptr [RBP + -0x14],EAX
JMP 0x001642fd
LAB_001642fd:
LEA RDI,[RBP + -0x60]
CALL 0x001c6410
MOV EAX,dword ptr [RBP + -0x14]
ADD RSP,0x130
POP RBP
RET
|
/* WARNING: Restarted to delay deadcode elimination for space: stack */
/* run_tool(char const*, st_dynamic_string*, ...) */
int4 run_tool(char *param_1,st_dynamic_string *param_2,...)
{
char in_AL;
char cVar1;
int iVar2;
int8 in_RCX;
int8 in_RDX;
int8 in_R8;
int8 in_R9;
int8 in_XMM0_Qa;
int8 in_XMM1_Qa;
int8 in_XMM2_Qa;
int8 in_XMM3_Qa;
int8 in_XMM4_Qa;
int8 in_XMM5_Qa;
int8 in_XMM6_Qa;
int8 in_XMM7_Qa;
int8 *local_130;
int1 local_118 [16];
int8 local_108;
int8 local_100;
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;
char *local_68 [4];
uint local_48;
int4 local_44;
int8 *local_40;
int1 *local_38;
char *local_28;
int4 local_1c;
st_dynamic_string *local_18;
char *local_10;
if (in_AL != '\0') {
local_e8 = in_XMM0_Qa;
local_d8 = in_XMM1_Qa;
local_c8 = in_XMM2_Qa;
local_b8 = in_XMM3_Qa;
local_a8 = in_XMM4_Qa;
local_98 = in_XMM5_Qa;
local_88 = in_XMM6_Qa;
local_78 = in_XMM7_Qa;
}
local_108 = in_RDX;
local_100 = in_RCX;
local_f8 = in_R8;
local_f0 = in_R9;
local_18 = param_2;
local_10 = param_1;
cVar1 = init_dynamic_string(local_68,&DAT_0024bdbe,0x200);
if (cVar1 != '\0') {
die("Out of memory");
}
dynstr_append_os_quoted(local_68,local_10,0);
dynstr_append(local_68,&DAT_0026a778);
local_38 = local_118;
local_40 = (int8 *)&stack0x00000008;
local_44 = 0x30;
local_48 = 0x10;
while( true ) {
if (local_48 < 0x29) {
local_130 = (int8 *)(local_38 + (int)local_48);
local_48 = local_48 + 8;
}
else {
local_130 = local_40;
local_40 = local_40 + 1;
}
local_28 = (char *)*local_130;
if (local_28 == (char *)0x0) break;
iVar2 = strncmp(local_28,"--",2);
if (iVar2 == 0) {
dynstr_append_os_quoted(local_68,local_28,0);
}
else {
dynstr_append(local_68,local_28);
}
dynstr_append(local_68,&DAT_0026a778);
}
local_1c = run_command(local_68[0],local_18);
dynstr_free(local_68);
return local_1c;
}
| |
54,645 | process_bin_arg | eloqsql/strings/my_vsnprintf.c | static char *process_bin_arg(char *to, char *end, size_t width, char *par)
{
DBUG_ASSERT(to <= end);
if (to + width + 1 > end)
width= end - to - 1; /* sign doesn't matter */
memmove(to, par, width);
to+= width;
return to;
} | O0 | c | process_bin_arg:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
jmp 0xe03aa
movq -0x8(%rbp), %rax
addq -0x18(%rbp), %rax
addq $0x1, %rax
cmpq -0x10(%rbp), %rax
jbe 0xe03cf
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
subq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x296b0
movq -0x18(%rbp), %rax
addq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| process_bin_arg:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
jmp short $+2
loc_E03AA:
mov rax, [rbp+var_8]
add rax, [rbp+var_18]
add rax, 1
cmp rax, [rbp+var_10]
jbe short loc_E03CF
mov rax, [rbp+var_10]
mov rcx, [rbp+var_8]
sub rax, rcx
sub rax, 1
mov [rbp+var_18], rax
loc_E03CF:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_18]
call _memmove
mov rax, [rbp+var_18]
add rax, [rbp+var_8]
mov [rbp+var_8], rax
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| long long process_bin_arg(long long a1, unsigned long long a2, long long a3, long long a4)
{
long long v5; // [rsp+8h] [rbp-18h]
v5 = a3;
if ( a3 + a1 + 1 > a2 )
v5 = a2 - a1 - 1;
memmove(a1, a4, v5);
return a1 + v5;
}
| process_bin_arg:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
JMP 0x001e03aa
LAB_001e03aa:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
CMP RAX,qword ptr [RBP + -0x10]
JBE 0x001e03cf
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x8]
SUB RAX,RCX
SUB RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
LAB_001e03cf:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x001296b0
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
long process_bin_arg(void *param_1,ulong param_2,size_t param_3,void *param_4)
{
size_t local_20;
local_20 = param_3;
if (param_2 < (long)param_1 + param_3 + 1) {
local_20 = (param_2 - (long)param_1) - 1;
}
memmove(param_1,param_4,local_20);
return local_20 + (long)param_1;
}
| |
54,646 | mi_delete | eloqsql/storage/myisam/mi_delete.c | int mi_delete(MI_INFO *info,const uchar *record)
{
uint i;
uchar *old_key;
int save_errno;
char lastpos[8];
MYISAM_SHARE *share=info->s;
DBUG_ENTER("mi_delete");
/* Test if record is in datafile */
DBUG_EXECUTE_IF("myisam_pretend_crashed_table_on_usage",
mi_print_error(info->s, HA_ERR_CRASHED);
DBUG_RETURN(my_errno= HA_ERR_CRASHED););
DBUG_EXECUTE_IF("my_error_test_undefined_error",
mi_print_error(info->s, INT_MAX);
DBUG_RETURN(my_errno= INT_MAX););
if (!(info->update & HA_STATE_AKTIV))
{
DBUG_RETURN(my_errno=HA_ERR_KEY_NOT_FOUND); /* No database read */
}
if (share->options & HA_OPTION_READ_ONLY_DATA)
{
DBUG_RETURN(my_errno=EACCES);
}
if (_mi_readinfo(info,F_WRLCK,1))
DBUG_RETURN(my_errno);
if (info->s->calc_checksum)
info->checksum=(*info->s->calc_checksum)(info,record);
if ((*share->compare_record)(info,record))
goto err; /* Error on read-check */
if (_mi_mark_file_changed(info))
goto err;
/* Remove all keys from the .ISAM file */
old_key=info->lastkey2;
for (i=0 ; i < share->base.keys ; i++ )
{
if (mi_is_key_active(info->s->state.key_map, i))
{
info->s->keyinfo[i].version++;
if (info->s->keyinfo[i].flag & HA_FULLTEXT )
{
if (_mi_ft_del(info,i, old_key,record,info->lastpos))
goto err;
}
else
{
if (info->s->keyinfo[i].ck_delete(info,i,old_key,
_mi_make_key(info,i,old_key,record,info->lastpos)))
goto err;
}
/* The above changed info->lastkey2. Inform mi_rnext_same(). */
info->update&= ~HA_STATE_RNEXT_SAME;
}
}
if ((*share->delete_record)(info))
goto err; /* Remove record from database */
info->state->checksum-=info->checksum;
info->update= HA_STATE_CHANGED+HA_STATE_DELETED+HA_STATE_ROW_CHANGED;
info->state->records--;
mi_sizestore(lastpos,info->lastpos);
myisam_log_command(MI_LOG_DELETE,info,(uchar*) lastpos,sizeof(lastpos),0);
(void) _mi_writeinfo(info,WRITEINFO_UPDATE_KEYFILE);
if (info->invalidator != 0)
{
DBUG_PRINT("info", ("invalidator... '%s' (delete)", info->filename));
(*info->invalidator)(info->filename);
info->invalidator=0;
}
DBUG_RETURN(0);
err:
save_errno=my_errno;
mi_sizestore(lastpos,info->lastpos);
myisam_log_command(MI_LOG_DELETE,info,(uchar*) lastpos, sizeof(lastpos),0);
if (save_errno != HA_ERR_RECORD_CHANGED)
{
mi_print_error(info->s, HA_ERR_CRASHED);
mi_mark_crashed(info); /* mark table crashed */
}
(void) _mi_writeinfo(info,WRITEINFO_UPDATE_KEYFILE);
info->update|=HA_STATE_WRITTEN; /* Buffer changed */
my_errno=save_errno;
if (save_errno == HA_ERR_KEY_NOT_FOUND)
{
mi_print_error(info->s, HA_ERR_CRASHED);
my_errno=HA_ERR_CRASHED;
}
DBUG_RETURN(my_errno);
} | O3 | c | mi_delete:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
testb $0x2, 0x1d0(%rdi)
jne 0x74a21
callq 0xa1afa
movl $0x78, (%rax)
movl $0x78, %r14d
jmp 0x74c35
movq %rdi, %rbx
movq (%rdi), %r13
testb $0x1, 0x31a(%r13)
jne 0x74c24
movq %rsi, %r14
movq %rbx, %rdi
movl $0x1, %esi
movl $0x1, %edx
callq 0x7c7fb
testl %eax, %eax
jne 0x74c1a
movq (%rbx), %rax
movq 0x2c8(%rax), %rax
testq %rax, %rax
je 0x74a6f
movq %rbx, %rdi
movq %r14, %rsi
callq *%rax
movl %eax, 0x1a8(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq *0x2c0(%r13)
testl %eax, %eax
jne 0x74b64
movq %rbx, %rdi
callq 0x7c9da
testl %eax, %eax
jne 0x74b64
movl 0x180(%r13), %eax
testl %eax, %eax
je 0x74b52
movq 0x110(%rbx), %rcx
movq %rcx, -0x40(%rbp)
xorl %r15d, %r15d
xorl %r12d, %r12d
movq (%rbx), %rcx
movq 0xc0(%rcx), %rdx
btq %r12, %rdx
jae 0x74b40
movq 0x218(%rcx), %rax
incl 0x1c(%rax,%r15)
movq (%rbx), %rax
movq 0x218(%rax), %rax
testb $-0x80, 0xa(%rax,%r15)
jne 0x74b15
movq 0x68(%rax,%r15), %rax
movq %rax, -0x48(%rbp)
movq 0x170(%rbx), %r8
movq %rbx, %rdi
movl %r12d, %esi
movq -0x40(%rbp), %rdx
movq %r14, %rcx
callq 0x7af5c
movq %rbx, %rdi
movl %r12d, %esi
movq -0x40(%rbp), %rdx
movl %eax, %ecx
callq *-0x48(%rbp)
jmp 0x74b2e
movq 0x170(%rbx), %r8
movq %rbx, %rdi
movl %r12d, %esi
movq -0x40(%rbp), %rdx
movq %r14, %rcx
callq 0x74794
testl %eax, %eax
jne 0x74b64
andb $-0x11, 0x1d1(%rbx)
movl 0x180(%r13), %eax
incq %r12
movl %eax, %ecx
addq $0x70, %r15
cmpq %rcx, %r12
jb 0x74ab4
movq %rbx, %rdi
callq *0x2b0(%r13)
testl %eax, %eax
je 0x74c5a
callq 0xa1afa
movl (%rax), %r14d
movq 0x170(%rbx), %rax
bswapq %rax
movq %rax, -0x38(%rbp)
leaq 0x3107af(%rip), %rax # 0x385330
cmpl $0x0, (%rax)
js 0x74b9f
leaq -0x38(%rbp), %rdx
movl $0x3, %edi
movq %rbx, %rsi
movl $0x8, %ecx
xorl %r8d, %r8d
callq 0x7cf3e
cmpl $0x7b, %r14d
je 0x74bd9
movq (%rbx), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %edi
callq 0x7af26
movq (%rbx), %rax
orb $0x2, 0xf0(%rax)
leaq 0x66f9c(%rip), %rdx # 0xdbb66
movq %rbx, %rdi
xorl %esi, %esi
movl $0x79, %ecx
callq 0x30c4b
movq %rbx, %rdi
movl $0x1, %esi
callq 0x7c8ee
orb $0x4, 0x1d0(%rbx)
callq 0xa1afa
movl %r14d, (%rax)
cmpl $0x78, %r14d
jne 0x74c1a
movq (%rbx), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %edi
callq 0x7af26
callq 0xa1afa
movl $0x7e, (%rax)
callq 0xa1afa
movl (%rax), %r14d
jmp 0x74c35
callq 0xa1afa
movl $0xd, (%rax)
movl $0xd, %r14d
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x74ce4
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x1a8(%rbx), %eax
movq 0x8(%rbx), %rcx
subl %eax, 0x30(%rcx)
movl $0x409, 0x1d0(%rbx) # imm = 0x409
movq 0x8(%rbx), %rax
decq (%rax)
movq 0x170(%rbx), %rax
bswapq %rax
movq %rax, -0x38(%rbp)
leaq 0x3106a3(%rip), %rax # 0x385330
cmpl $0x0, (%rax)
js 0x74cab
leaq -0x38(%rbp), %rdx
movl $0x3, %edi
movq %rbx, %rsi
movl $0x8, %ecx
xorl %r8d, %r8d
callq 0x7cf3e
movq %rbx, %rdi
movl $0x1, %esi
callq 0x7c8ee
movq 0x148(%rbx), %rax
xorl %r14d, %r14d
testq %rax, %rax
je 0x74c35
movq 0xf8(%rbx), %rdi
callq *%rax
movq $0x0, 0x148(%rbx)
jmp 0x74c35
callq 0x29270
| mi_delete:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rax, fs:28h
mov [rbp+var_30], rax
test byte ptr [rdi+1D0h], 2
jnz short loc_74A21
call _my_thread_var
mov dword ptr [rax], 78h ; 'x'
mov r14d, 78h ; 'x'
jmp loc_74C35
loc_74A21:
mov rbx, rdi
mov r13, [rdi]
test byte ptr [r13+31Ah], 1
jnz loc_74C24
mov r14, rsi
mov rdi, rbx
mov esi, 1
mov edx, 1
call _mi_readinfo
test eax, eax
jnz loc_74C1A
mov rax, [rbx]
mov rax, [rax+2C8h]
test rax, rax
jz short loc_74A6F
mov rdi, rbx
mov rsi, r14
call rax
mov [rbx+1A8h], eax
loc_74A6F:
mov rdi, rbx
mov rsi, r14
call qword ptr [r13+2C0h]
test eax, eax
jnz loc_74B64
mov rdi, rbx
call _mi_mark_file_changed
test eax, eax
jnz loc_74B64
mov eax, [r13+180h]
test eax, eax
jz loc_74B52
mov rcx, [rbx+110h]
mov [rbp+var_40], rcx
xor r15d, r15d
xor r12d, r12d
loc_74AB4:
mov rcx, [rbx]
mov rdx, [rcx+0C0h]
bt rdx, r12
jnb short loc_74B40
mov rax, [rcx+218h]
inc dword ptr [rax+r15+1Ch]
mov rax, [rbx]
mov rax, [rax+218h]
test byte ptr [rax+r15+0Ah], 80h
jnz short loc_74B15
mov rax, [rax+r15+68h]
mov [rbp+var_48], rax
mov r8, [rbx+170h]
mov rdi, rbx
mov esi, r12d
mov rdx, [rbp+var_40]
mov rcx, r14
call _mi_make_key
mov rdi, rbx
mov esi, r12d
mov rdx, [rbp+var_40]
mov ecx, eax
call [rbp+var_48]
jmp short loc_74B2E
loc_74B15:
mov r8, [rbx+170h]
mov rdi, rbx
mov esi, r12d
mov rdx, [rbp+var_40]
mov rcx, r14
call _mi_ft_del
loc_74B2E:
test eax, eax
jnz short loc_74B64
and byte ptr [rbx+1D1h], 0EFh
mov eax, [r13+180h]
loc_74B40:
inc r12
mov ecx, eax
add r15, 70h ; 'p'
cmp r12, rcx
jb loc_74AB4
loc_74B52:
mov rdi, rbx
call qword ptr [r13+2B0h]
test eax, eax
jz loc_74C5A
loc_74B64:
call _my_thread_var
mov r14d, [rax]
mov rax, [rbx+170h]
bswap rax
mov [rbp+var_38], rax
lea rax, myisam_log_file
cmp dword ptr [rax], 0
js short loc_74B9F
lea rdx, [rbp+var_38]
mov edi, 3
mov rsi, rbx
mov ecx, 8
xor r8d, r8d
call _myisam_log_command
loc_74B9F:
cmp r14d, 7Bh ; '{'
jz short loc_74BD9
mov rax, [rbx]
mov rsi, [rax+268h]
mov edi, 7Eh ; '~'
call mi_report_error
mov rax, [rbx]
or byte ptr [rax+0F0h], 2
lea rdx, aWorkspaceLlm4b_36; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rbx
xor esi, esi
mov ecx, 79h ; 'y'
call _mi_report_crashed
loc_74BD9:
mov rdi, rbx
mov esi, 1
call _mi_writeinfo
or byte ptr [rbx+1D0h], 4
call _my_thread_var
mov [rax], r14d
cmp r14d, 78h ; 'x'
jnz short loc_74C1A
mov rax, [rbx]
mov rsi, [rax+268h]
mov edi, 7Eh ; '~'
call mi_report_error
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
loc_74C1A:
call _my_thread_var
mov r14d, [rax]
jmp short loc_74C35
loc_74C24:
call _my_thread_var
mov dword ptr [rax], 0Dh
mov r14d, 0Dh
loc_74C35:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_74CE4
mov eax, r14d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_74C5A:
mov eax, [rbx+1A8h]
mov rcx, [rbx+8]
sub [rcx+30h], eax
mov dword ptr [rbx+1D0h], 409h
mov rax, [rbx+8]
dec qword ptr [rax]
mov rax, [rbx+170h]
bswap rax
mov [rbp+var_38], rax
lea rax, myisam_log_file
cmp dword ptr [rax], 0
js short loc_74CAB
lea rdx, [rbp+var_38]
mov edi, 3
mov rsi, rbx
mov ecx, 8
xor r8d, r8d
call _myisam_log_command
loc_74CAB:
mov rdi, rbx
mov esi, 1
call _mi_writeinfo
mov rax, [rbx+148h]
xor r14d, r14d
test rax, rax
jz loc_74C35
mov rdi, [rbx+0F8h]
call rax
mov qword ptr [rbx+148h], 0
jmp loc_74C35
loc_74CE4:
call ___stack_chk_fail
| long long mi_delete(_BYTE *a1, const char *a2, __m128i a3)
{
unsigned int v3; // r14d
_BYTE *v4; // rbx
long long v5; // r13
const char *v7; // rsi
long long ( *v8)(_BYTE *, const char *); // rax
const char *v9; // rsi
unsigned int v10; // eax
long long v11; // r15
unsigned long long i; // r12
long long v13; // rdx
long long v14; // rax
unsigned int key; // eax
int v16; // eax
int v17; // r14d
void ( *v19)(_QWORD); // rax
long long ( *v20)(_BYTE *, _QWORD, long long, _QWORD); // [rsp+8h] [rbp-48h]
long long v21; // [rsp+10h] [rbp-40h]
_QWORD v22[7]; // [rsp+18h] [rbp-38h] BYREF
v22[1] = __readfsqword(0x28u);
if ( (a1[464] & 2) == 0 )
{
*(_DWORD *)my_thread_var(a1, a2) = 120;
return 120;
}
v4 = a1;
v5 = *(_QWORD *)a1;
if ( (*(_BYTE *)(*(_QWORD *)a1 + 794LL) & 1) != 0 )
{
*(_DWORD *)my_thread_var(a1, a2) = 13;
return 13;
}
v7 = (_BYTE *)(&dword_0 + 1);
if ( (unsigned int)mi_readinfo(a1, 1LL, 1LL) )
return *(unsigned int *)my_thread_var(a1, v7);
v8 = *(long long ( **)(_BYTE *, const char *))(*(_QWORD *)a1 + 712LL);
if ( v8 )
*((_DWORD *)a1 + 106) = v8(a1, a2);
v9 = a2;
if ( (*(unsigned int ( **)(_BYTE *, const char *))(v5 + 704))(a1, a2)
|| (unsigned int)mi_mark_file_changed(a1) )
{
goto LABEL_19;
}
v10 = *(_DWORD *)(v5 + 384);
if ( v10 )
{
v21 = *((_QWORD *)a1 + 34);
v11 = 0LL;
for ( i = 0LL; i < v10; ++i )
{
v13 = *(_QWORD *)(*(_QWORD *)v4 + 192LL);
if ( _bittest64(&v13, i) )
{
++*(_DWORD *)(*(_QWORD *)(*(_QWORD *)v4 + 536LL) + v11 + 28);
v14 = *(_QWORD *)(*(_QWORD *)v4 + 536LL);
if ( *(char *)(v14 + v11 + 10) < 0 )
{
a1 = v4;
v9 = (const char *)(unsigned int)i;
v16 = mi_ft_del(v4, i, v21, (long long)a2, *((_QWORD *)v4 + 46), a3);
}
else
{
v20 = *(long long ( **)(_BYTE *, _QWORD, long long, _QWORD))(v14 + v11 + 104);
key = mi_make_key(v4, (unsigned int)i, v21, a2, *((_QWORD *)v4 + 46));
a1 = v4;
v9 = (const char *)(unsigned int)i;
v16 = v20(v4, (unsigned int)i, v21, key);
}
if ( v16 )
goto LABEL_19;
v4[465] &= ~0x10u;
v10 = *(_DWORD *)(v5 + 384);
}
v11 += 112LL;
}
}
a1 = v4;
if ( (*(unsigned int ( **)(_BYTE *))(v5 + 688))(v4) )
{
LABEL_19:
v17 = *(_DWORD *)my_thread_var(a1, v9);
v22[0] = _byteswap_uint64(*((_QWORD *)v4 + 46));
if ( myisam_log_file >= 0 )
myisam_log_command(3LL, v4, v22, 8LL, 0LL);
if ( v17 != 123 )
{
mi_report_error(126LL, *(_QWORD *)(*(_QWORD *)v4 + 616LL));
*(_BYTE *)(*(_QWORD *)v4 + 240LL) |= 2u;
mi_report_crashed();
}
a1 = v4;
v7 = (_BYTE *)(&dword_0 + 1);
mi_writeinfo(v4, 1LL);
v4[464] |= 4u;
*(_DWORD *)my_thread_var(v4, (_BYTE *)&dword_0 + 1) = v17;
if ( v17 == 120 )
{
v7 = *(const char **)(*(_QWORD *)v4 + 616LL);
a1 = (_BYTE *)(&dword_7C + 2);
mi_report_error(126LL, v7);
*(_DWORD *)my_thread_var(126LL, v7) = 126;
}
return *(unsigned int *)my_thread_var(a1, v7);
}
*(_DWORD *)(*((_QWORD *)v4 + 1) + 48LL) -= *((_DWORD *)v4 + 106);
*((_DWORD *)v4 + 116) = 1033;
--**((_QWORD **)v4 + 1);
v22[0] = _byteswap_uint64(*((_QWORD *)v4 + 46));
if ( myisam_log_file >= 0 )
myisam_log_command(3LL, v4, v22, 8LL, 0LL);
mi_writeinfo(v4, 1LL);
v19 = (void ( *)(_QWORD))*((_QWORD *)v4 + 41);
v3 = 0;
if ( v19 )
{
v19(*((_QWORD *)v4 + 31));
*((_QWORD *)v4 + 41) = 0LL;
}
return v3;
}
| mi_delete:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
TEST byte ptr [RDI + 0x1d0],0x2
JNZ 0x00174a21
CALL 0x001a1afa
MOV dword ptr [RAX],0x78
MOV R14D,0x78
JMP 0x00174c35
LAB_00174a21:
MOV RBX,RDI
MOV R13,qword ptr [RDI]
TEST byte ptr [R13 + 0x31a],0x1
JNZ 0x00174c24
MOV R14,RSI
MOV RDI,RBX
MOV ESI,0x1
MOV EDX,0x1
CALL 0x0017c7fb
TEST EAX,EAX
JNZ 0x00174c1a
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + 0x2c8]
TEST RAX,RAX
JZ 0x00174a6f
MOV RDI,RBX
MOV RSI,R14
CALL RAX
MOV dword ptr [RBX + 0x1a8],EAX
LAB_00174a6f:
MOV RDI,RBX
MOV RSI,R14
CALL qword ptr [R13 + 0x2c0]
TEST EAX,EAX
JNZ 0x00174b64
MOV RDI,RBX
CALL 0x0017c9da
TEST EAX,EAX
JNZ 0x00174b64
MOV EAX,dword ptr [R13 + 0x180]
TEST EAX,EAX
JZ 0x00174b52
MOV RCX,qword ptr [RBX + 0x110]
MOV qword ptr [RBP + -0x40],RCX
XOR R15D,R15D
XOR R12D,R12D
LAB_00174ab4:
MOV RCX,qword ptr [RBX]
MOV RDX,qword ptr [RCX + 0xc0]
BT RDX,R12
JNC 0x00174b40
MOV RAX,qword ptr [RCX + 0x218]
INC dword ptr [RAX + R15*0x1 + 0x1c]
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + 0x218]
TEST byte ptr [RAX + R15*0x1 + 0xa],0x80
JNZ 0x00174b15
MOV RAX,qword ptr [RAX + R15*0x1 + 0x68]
MOV qword ptr [RBP + -0x48],RAX
MOV R8,qword ptr [RBX + 0x170]
MOV RDI,RBX
MOV ESI,R12D
MOV RDX,qword ptr [RBP + -0x40]
MOV RCX,R14
CALL 0x0017af5c
MOV RDI,RBX
MOV ESI,R12D
MOV RDX,qword ptr [RBP + -0x40]
MOV ECX,EAX
CALL qword ptr [RBP + -0x48]
JMP 0x00174b2e
LAB_00174b15:
MOV R8,qword ptr [RBX + 0x170]
MOV RDI,RBX
MOV ESI,R12D
MOV RDX,qword ptr [RBP + -0x40]
MOV RCX,R14
CALL 0x00174794
LAB_00174b2e:
TEST EAX,EAX
JNZ 0x00174b64
AND byte ptr [RBX + 0x1d1],0xef
MOV EAX,dword ptr [R13 + 0x180]
LAB_00174b40:
INC R12
MOV ECX,EAX
ADD R15,0x70
CMP R12,RCX
JC 0x00174ab4
LAB_00174b52:
MOV RDI,RBX
CALL qword ptr [R13 + 0x2b0]
TEST EAX,EAX
JZ 0x00174c5a
LAB_00174b64:
CALL 0x001a1afa
MOV R14D,dword ptr [RAX]
MOV RAX,qword ptr [RBX + 0x170]
BSWAP RAX
MOV qword ptr [RBP + -0x38],RAX
LEA RAX,[0x485330]
CMP dword ptr [RAX],0x0
JS 0x00174b9f
LEA RDX,[RBP + -0x38]
MOV EDI,0x3
MOV RSI,RBX
MOV ECX,0x8
XOR R8D,R8D
CALL 0x0017cf3e
LAB_00174b9f:
CMP R14D,0x7b
JZ 0x00174bd9
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RAX + 0x268]
MOV EDI,0x7e
CALL 0x0017af26
MOV RAX,qword ptr [RBX]
OR byte ptr [RAX + 0xf0],0x2
LEA RDX,[0x1dbb66]
MOV RDI,RBX
XOR ESI,ESI
MOV ECX,0x79
CALL 0x00130c4b
LAB_00174bd9:
MOV RDI,RBX
MOV ESI,0x1
CALL 0x0017c8ee
OR byte ptr [RBX + 0x1d0],0x4
CALL 0x001a1afa
MOV dword ptr [RAX],R14D
CMP R14D,0x78
JNZ 0x00174c1a
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RAX + 0x268]
MOV EDI,0x7e
CALL 0x0017af26
CALL 0x001a1afa
MOV dword ptr [RAX],0x7e
LAB_00174c1a:
CALL 0x001a1afa
MOV R14D,dword ptr [RAX]
JMP 0x00174c35
LAB_00174c24:
CALL 0x001a1afa
MOV dword ptr [RAX],0xd
MOV R14D,0xd
LAB_00174c35:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00174ce4
MOV EAX,R14D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00174c5a:
MOV EAX,dword ptr [RBX + 0x1a8]
MOV RCX,qword ptr [RBX + 0x8]
SUB dword ptr [RCX + 0x30],EAX
MOV dword ptr [RBX + 0x1d0],0x409
MOV RAX,qword ptr [RBX + 0x8]
DEC qword ptr [RAX]
MOV RAX,qword ptr [RBX + 0x170]
BSWAP RAX
MOV qword ptr [RBP + -0x38],RAX
LEA RAX,[0x485330]
CMP dword ptr [RAX],0x0
JS 0x00174cab
LEA RDX,[RBP + -0x38]
MOV EDI,0x3
MOV RSI,RBX
MOV ECX,0x8
XOR R8D,R8D
CALL 0x0017cf3e
LAB_00174cab:
MOV RDI,RBX
MOV ESI,0x1
CALL 0x0017c8ee
MOV RAX,qword ptr [RBX + 0x148]
XOR R14D,R14D
TEST RAX,RAX
JZ 0x00174c35
MOV RDI,qword ptr [RBX + 0xf8]
CALL RAX
MOV qword ptr [RBX + 0x148],0x0
JMP 0x00174c35
LAB_00174ce4:
CALL 0x00129270
|
int4 mi_delete(long *param_1,int8 param_2)
{
long lVar1;
long lVar2;
code *pcVar3;
int iVar4;
int4 uVar5;
uint uVar6;
int4 *puVar7;
int *piVar8;
ulong uVar9;
long lVar10;
long in_FS_OFFSET;
ulong local_40;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
if ((*(byte *)(param_1 + 0x3a) & 2) == 0) {
puVar7 = (int4 *)_my_thread_var();
*puVar7 = 0x78;
uVar5 = 0x78;
}
else {
lVar1 = *param_1;
if ((*(byte *)(lVar1 + 0x31a) & 1) == 0) {
iVar4 = _mi_readinfo(param_1,1,1);
if (iVar4 == 0) {
if (*(code **)(*param_1 + 0x2c8) != (code *)0x0) {
uVar5 = (**(code **)(*param_1 + 0x2c8))(param_1,param_2);
*(int4 *)(param_1 + 0x35) = uVar5;
}
iVar4 = (**(code **)(lVar1 + 0x2c0))(param_1,param_2);
if (iVar4 == 0) {
iVar4 = _mi_mark_file_changed(param_1);
if (iVar4 == 0) {
uVar6 = *(uint *)(lVar1 + 0x180);
if (uVar6 != 0) {
lVar2 = param_1[0x22];
lVar10 = 0;
uVar9 = 0;
do {
if ((*(ulong *)(*param_1 + 0xc0) >> (uVar9 & 0x3f) & 1) != 0) {
piVar8 = (int *)(*(long *)(*param_1 + 0x218) + 0x1c + lVar10);
*piVar8 = *piVar8 + 1;
if ((*(byte *)(*(long *)(*param_1 + 0x218) + 10 + lVar10) & 0x80) == 0) {
pcVar3 = *(code **)(*(long *)(*param_1 + 0x218) + 0x68 + lVar10);
uVar5 = _mi_make_key(param_1,uVar9 & 0xffffffff,lVar2,param_2,param_1[0x2e]);
iVar4 = (*pcVar3)(param_1,uVar9 & 0xffffffff,lVar2,uVar5);
}
else {
iVar4 = _mi_ft_del(param_1,uVar9 & 0xffffffff,lVar2,param_2,param_1[0x2e]);
}
if (iVar4 != 0) goto LAB_00174b64;
*(byte *)((long)param_1 + 0x1d1) = *(byte *)((long)param_1 + 0x1d1) & 0xef;
uVar6 = *(uint *)(lVar1 + 0x180);
}
uVar9 = uVar9 + 1;
lVar10 = lVar10 + 0x70;
} while (uVar9 < uVar6);
}
iVar4 = (**(code **)(lVar1 + 0x2b0))(param_1);
if (iVar4 == 0) {
*(int *)(param_1[1] + 0x30) = *(int *)(param_1[1] + 0x30) - (int)param_1[0x35];
*(int4 *)(param_1 + 0x3a) = 0x409;
*(long *)param_1[1] = *(long *)param_1[1] + -1;
uVar9 = param_1[0x2e];
local_40 = uVar9 >> 0x38 | (uVar9 & 0xff000000000000) >> 0x28 |
(uVar9 & 0xff0000000000) >> 0x18 | (uVar9 & 0xff00000000) >> 8 |
(uVar9 & 0xff000000) << 8 | (uVar9 & 0xff0000) << 0x18 |
(uVar9 & 0xff00) << 0x28 | uVar9 << 0x38;
if (-1 < myisam_log_file) {
_myisam_log_command(3,param_1,&local_40,8,0);
}
_mi_writeinfo(param_1,1);
uVar5 = 0;
if ((code *)param_1[0x29] != (code *)0x0) {
(*(code *)param_1[0x29])(param_1[0x1f]);
param_1[0x29] = 0;
}
goto LAB_00174c35;
}
}
}
LAB_00174b64:
piVar8 = (int *)_my_thread_var();
iVar4 = *piVar8;
uVar9 = param_1[0x2e];
local_40 = uVar9 >> 0x38 | (uVar9 & 0xff000000000000) >> 0x28 |
(uVar9 & 0xff0000000000) >> 0x18 | (uVar9 & 0xff00000000) >> 8 |
(uVar9 & 0xff000000) << 8 | (uVar9 & 0xff0000) << 0x18 | (uVar9 & 0xff00) << 0x28
| uVar9 << 0x38;
if (-1 < myisam_log_file) {
_myisam_log_command(3,param_1,&local_40,8,0);
}
if (iVar4 != 0x7b) {
mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268));
*(byte *)(*param_1 + 0xf0) = *(byte *)(*param_1 + 0xf0) | 2;
_mi_report_crashed(param_1,0,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_delete.c",
0x79);
}
_mi_writeinfo(param_1,1);
*(byte *)(param_1 + 0x3a) = *(byte *)(param_1 + 0x3a) | 4;
piVar8 = (int *)_my_thread_var();
*piVar8 = iVar4;
if (iVar4 == 0x78) {
mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268));
puVar7 = (int4 *)_my_thread_var();
*puVar7 = 0x7e;
}
}
puVar7 = (int4 *)_my_thread_var();
uVar5 = *puVar7;
}
else {
puVar7 = (int4 *)_my_thread_var();
*puVar7 = 0xd;
uVar5 = 0xd;
}
}
LAB_00174c35:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return uVar5;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
54,647 | my_strxfrm_pad_unicode | eloqsql/strings/ctype-utf8.c | size_t
my_strxfrm_pad_unicode(uchar *str, uchar *strend)
{
uchar *str0= str;
DBUG_ASSERT(str && str <= strend);
for ( ; str < strend ; )
{
*str++= 0x00;
if (str < strend)
*str++= 0x20;
}
return str - str0;
} | O3 | c | my_strxfrm_pad_unicode:
movq %rdi, %rax
cmpq %rsi, %rdi
jae 0x539f8
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rcx
leaq 0x1(%rcx), %rax
movb $0x0, (%rcx)
cmpq %rsi, %rax
jae 0x539ef
movb $0x20, 0x1(%rcx)
addq $0x2, %rcx
movq %rcx, %rax
movq %rax, %rcx
cmpq %rsi, %rax
jb 0x539d8
popq %rbp
subq %rdi, %rax
retq
| my_strxfrm_pad_unicode:
mov rax, rdi
cmp rdi, rsi
jnb short loc_539F8
push rbp
mov rbp, rsp
mov rcx, rdi
loc_539D8:
lea rax, [rcx+1]
mov byte ptr [rcx], 0
cmp rax, rsi
jnb short loc_539EF
mov byte ptr [rcx+1], 20h ; ' '
add rcx, 2
mov rax, rcx
loc_539EF:
mov rcx, rax
cmp rax, rsi
jb short loc_539D8
pop rbp
loc_539F8:
sub rax, rdi
retn
| long long my_strxfrm_pad_unicode(_BYTE *a1, unsigned long long a2)
{
_BYTE *v2; // rax
_BYTE *v3; // rcx
v2 = a1;
if ( (unsigned long long)a1 < a2 )
{
v3 = a1;
do
{
v2 = v3 + 1;
*v3 = 0;
if ( (unsigned long long)(v3 + 1) < a2 )
{
v3[1] = 32;
v2 = v3 + 2;
}
v3 = v2;
}
while ( (unsigned long long)v2 < a2 );
}
return v2 - a1;
}
| my_strxfrm_pad_unicode:
MOV RAX,RDI
CMP RDI,RSI
JNC 0x001539f8
PUSH RBP
MOV RBP,RSP
MOV RCX,RDI
LAB_001539d8:
LEA RAX,[RCX + 0x1]
MOV byte ptr [RCX],0x0
CMP RAX,RSI
JNC 0x001539ef
MOV byte ptr [RCX + 0x1],0x20
ADD RCX,0x2
MOV RAX,RCX
LAB_001539ef:
MOV RCX,RAX
CMP RAX,RSI
JC 0x001539d8
POP RBP
LAB_001539f8:
SUB RAX,RDI
RET
|
long my_strxfrm_pad_unicode(int1 *param_1,int1 *param_2)
{
int1 *puVar1;
int1 *puVar2;
puVar2 = param_1;
puVar1 = param_1;
if (param_1 < param_2) {
do {
puVar2 = puVar1 + 1;
*puVar1 = 0;
if (puVar2 < param_2) {
puVar1[1] = 0x20;
puVar2 = puVar1 + 2;
}
puVar1 = puVar2;
} while (puVar2 < param_2);
}
return (long)puVar2 - (long)param_1;
}
| |
54,648 | get_relative_path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | AlayaLite/include/executor/jobs/../../index/graph/../../utils/log.hpp | auto inline get_relative_path(const std::string &full_path,
const std::string &base_path) -> std::string {
std::filesystem::path full(full_path);
std::filesystem::path base(base_path);
return std::filesystem::relative(full, base).string();
} | O3 | cpp | get_relative_path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r14
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x50(%rsp), %rdi
movl $0x2, %edx
callq 0x190aa
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl $0x2, %edx
callq 0x190aa
movq %rsp, %rdi
leaq 0x50(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x110a0
movq (%rsp), %rsi
leaq 0x10(%rbx), %rax
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
movq %rax, (%rbx)
movq %rbx, %rdi
callq 0x19014
movq %rsp, %rdi
callq 0x18280
leaq 0x28(%rsp), %rdi
callq 0x18280
leaq 0x50(%rsp), %rdi
callq 0x18280
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x18280
jmp 0x1701c
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x18280
jmp 0x1702b
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x18280
movq %rbx, %rdi
callq 0x11760
nop
| _Z17get_relative_pathRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_:
push r14
push rbx
sub rsp, 78h
mov r14, rdx
mov rbx, rdi
lea rdi, [rsp+88h+var_38]; this
mov edx, 2
call _ZNSt10filesystem7__cxx114pathC2INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES1_EERKT_NS1_6formatE; std::filesystem::__cxx11::path::path<std::string,std::filesystem::__cxx11::path>(std::string const&,std::filesystem::__cxx11::path::format)
lea rdi, [rsp+88h+var_60]; this
mov rsi, r14
mov edx, 2
call _ZNSt10filesystem7__cxx114pathC2INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES1_EERKT_NS1_6formatE; std::filesystem::__cxx11::path::path<std::string,std::filesystem::__cxx11::path>(std::string const&,std::filesystem::__cxx11::path::format)
mov rdi, rsp; this
lea rsi, [rsp+88h+var_38]; std::filesystem::__cxx11::path *
lea rdx, [rsp+88h+var_60]; std::filesystem::__cxx11::path *
call __ZNSt10filesystem8relativeERKNS_7__cxx114pathES3_; std::filesystem::relative(std::filesystem::__cxx11::path const&,std::filesystem::__cxx11::path const&)
mov rsi, [rsp+88h+var_88]
lea rax, [rbx+10h]
mov rdx, [rsp+88h+var_80]
add rdx, rsi
mov [rbx], rax
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rdi, rsp; this
call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path()
lea rdi, [rsp+88h+var_60]; this
call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path()
lea rdi, [rsp+88h+var_38]; this
call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path()
mov rax, rbx
add rsp, 78h
pop rbx
pop r14
retn
mov rbx, rax
mov rdi, rsp; this
call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path()
jmp short loc_1701C
mov rbx, rax
loc_1701C:
lea rdi, [rsp+arg_20]; this
call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path()
jmp short loc_1702B
mov rbx, rax
loc_1702B:
lea rdi, [rsp+arg_48]; this
call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path()
mov rdi, rbx
call __Unwind_Resume
| _QWORD * get_relative_path(_QWORD *a1)
{
long long v1; // rsi
long long v2; // rdx
_QWORD v4[5]; // [rsp+0h] [rbp-88h] BYREF
_BYTE v5[40]; // [rsp+28h] [rbp-60h] BYREF
_BYTE v6[56]; // [rsp+50h] [rbp-38h] BYREF
std::filesystem::__cxx11::path::path<std::string,std::filesystem::__cxx11::path>((std::filesystem::__cxx11::path *)v6);
std::filesystem::__cxx11::path::path<std::string,std::filesystem::__cxx11::path>((std::filesystem::__cxx11::path *)v5);
std::filesystem::relative(
(std::filesystem *)v4,
(const std::filesystem::__cxx11::path *)v6,
(const std::filesystem::__cxx11::path *)v5);
v1 = v4[0];
v2 = v4[0] + v4[1];
*a1 = a1 + 2;
std::string::_M_construct<char const*>(a1, v1, v2);
std::filesystem::__cxx11::path::~path((std::filesystem::__cxx11::path *)v4);
std::filesystem::__cxx11::path::~path((std::filesystem::__cxx11::path *)v5);
std::filesystem::__cxx11::path::~path((std::filesystem::__cxx11::path *)v6);
return a1;
}
| get_relative_path:
PUSH R14
PUSH RBX
SUB RSP,0x78
MOV R14,RDX
MOV RBX,RDI
LEA RDI,[RSP + 0x50]
MOV EDX,0x2
CALL 0x001190aa
LAB_00116fa6:
LEA RDI,[RSP + 0x28]
MOV RSI,R14
MOV EDX,0x2
CALL 0x001190aa
LAB_00116fb8:
MOV RDI,RSP
LEA RSI,[RSP + 0x50]
LEA RDX,[RSP + 0x28]
CALL 0x001110a0
MOV RSI,qword ptr [RSP]
LEA RAX,[RBX + 0x10]
MOV RDX,qword ptr [RSP + 0x8]
ADD RDX,RSI
MOV qword ptr [RBX],RAX
LAB_00116fdd:
MOV RDI,RBX
CALL 0x00119014
LAB_00116fe5:
MOV RDI,RSP
CALL 0x00118280
LEA RDI,[RSP + 0x28]
CALL 0x00118280
LEA RDI,[RSP + 0x50]
CALL 0x00118280
MOV RAX,RBX
ADD RSP,0x78
POP RBX
POP R14
RET
|
/* get_relative_path(std::__cxx11::string const&, std::__cxx11::string const&) */
string * get_relative_path(string *param_1,string *param_2)
{
long local_88;
long local_80;
path local_60 [40];
path local_38 [40];
std::filesystem::__cxx11::path::path<std::__cxx11::string,std::filesystem::__cxx11::path>
(local_38,param_2,2);
/* try { // try from 00116fa6 to 00116fb7 has its CatchHandler @ 00117028 */
std::filesystem::__cxx11::path::path<std::__cxx11::string,std::filesystem::__cxx11::path>
(local_60);
/* try { // try from 00116fb8 to 00116fc9 has its CatchHandler @ 00117019 */
std::filesystem::relative((path *)&local_88,local_38);
*(string **)param_1 = param_1 + 0x10;
/* try { // try from 00116fdd to 00116fe4 has its CatchHandler @ 0011700c */
std::__cxx11::string::_M_construct<char_const*>(param_1,local_88,local_80 + local_88);
std::filesystem::__cxx11::path::~path((path *)&local_88);
std::filesystem::__cxx11::path::~path(local_60);
std::filesystem::__cxx11::path::~path(local_38);
return param_1;
}
| |
54,649 | is_num_string | bluesky950520[P]quickjs/quickjs.c | static inline BOOL is_num_string(uint32_t *pval, const JSString *p)
{
uint32_t n;
uint64_t n64;
int c, i, len;
len = p->len;
if (len == 0 || len > 10)
return FALSE;
c = string_get(p, 0);
if (is_num(c)) {
if (c == '0') {
if (len != 1)
return FALSE;
n = 0;
} else {
n = c - '0';
for(i = 1; i < len; i++) {
c = string_get(p, i);
if (!is_num(c))
return FALSE;
n64 = (uint64_t)n * 10 + (c - '0');
if ((n64 >> 32) != 0)
return FALSE;
n = n64;
}
}
*pval = n;
return TRUE;
} else {
return FALSE;
}
} | O0 | c | is_num_string:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
movl %eax, 0x4(%rsp)
cmpl $0x0, 0x4(%rsp)
je 0x5b79f
cmpl $0xa, 0x4(%rsp)
jle 0x5b7ac
movl $0x0, 0x34(%rsp)
jmp 0x5b8a5
movq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x5b910
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %edi
callq 0x5b960
cmpl $0x0, %eax
je 0x5b89d
cmpl $0x30, 0xc(%rsp)
jne 0x5b7f6
cmpl $0x1, 0x4(%rsp)
je 0x5b7e9
movl $0x0, 0x34(%rsp)
jmp 0x5b8a5
movl $0x0, 0x1c(%rsp)
jmp 0x5b888
movl 0xc(%rsp), %eax
subl $0x30, %eax
movl %eax, 0x1c(%rsp)
movl $0x1, 0x8(%rsp)
movl 0x8(%rsp), %eax
cmpl 0x4(%rsp), %eax
jge 0x5b886
movq 0x20(%rsp), %rdi
movl 0x8(%rsp), %esi
callq 0x5b910
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %edi
callq 0x5b960
cmpl $0x0, %eax
jne 0x5b83d
movl $0x0, 0x34(%rsp)
jmp 0x5b8a5
movl 0x1c(%rsp), %eax
imulq $0xa, %rax, %rax
movl 0xc(%rsp), %ecx
subl $0x30, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
shrq $0x20, %rax
cmpq $0x0, %rax
je 0x5b870
movl $0x0, 0x34(%rsp)
jmp 0x5b8a5
movq 0x10(%rsp), %rax
movl %eax, 0x1c(%rsp)
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x5b809
jmp 0x5b888
movl 0x1c(%rsp), %ecx
movq 0x28(%rsp), %rax
movl %ecx, (%rax)
movl $0x1, 0x34(%rsp)
jmp 0x5b8a5
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nop
| is_num_string:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov rax, [rsp+38h+var_18]
mov rax, [rax+4]
and rax, 7FFFFFFFh
mov [rsp+38h+var_34], eax
cmp [rsp+38h+var_34], 0
jz short loc_5B79F
cmp [rsp+38h+var_34], 0Ah
jle short loc_5B7AC
loc_5B79F:
mov [rsp+38h+var_4], 0
jmp loc_5B8A5
loc_5B7AC:
mov rdi, [rsp+38h+var_18]
xor esi, esi
call string_get
mov [rsp+38h+var_2C], eax
mov edi, [rsp+38h+var_2C]
call is_num
cmp eax, 0
jz loc_5B89D
cmp [rsp+38h+var_2C], 30h ; '0'
jnz short loc_5B7F6
cmp [rsp+38h+var_34], 1
jz short loc_5B7E9
mov [rsp+38h+var_4], 0
jmp loc_5B8A5
loc_5B7E9:
mov [rsp+38h+var_1C], 0
jmp loc_5B888
loc_5B7F6:
mov eax, [rsp+38h+var_2C]
sub eax, 30h ; '0'
mov [rsp+38h+var_1C], eax
mov [rsp+38h+var_30], 1
loc_5B809:
mov eax, [rsp+38h+var_30]
cmp eax, [rsp+38h+var_34]
jge short loc_5B886
mov rdi, [rsp+38h+var_18]
mov esi, [rsp+38h+var_30]
call string_get
mov [rsp+38h+var_2C], eax
mov edi, [rsp+38h+var_2C]
call is_num
cmp eax, 0
jnz short loc_5B83D
mov [rsp+38h+var_4], 0
jmp short loc_5B8A5
loc_5B83D:
mov eax, [rsp+38h+var_1C]
imul rax, 0Ah
mov ecx, [rsp+38h+var_2C]
sub ecx, 30h ; '0'
movsxd rcx, ecx
add rax, rcx
mov [rsp+38h+var_28], rax
mov rax, [rsp+38h+var_28]
shr rax, 20h
cmp rax, 0
jz short loc_5B870
mov [rsp+38h+var_4], 0
jmp short loc_5B8A5
loc_5B870:
mov rax, [rsp+38h+var_28]
mov [rsp+38h+var_1C], eax
mov eax, [rsp+38h+var_30]
add eax, 1
mov [rsp+38h+var_30], eax
jmp short loc_5B809
loc_5B886:
jmp short $+2
loc_5B888:
mov ecx, [rsp+38h+var_1C]
mov rax, [rsp+38h+var_10]
mov [rax], ecx
mov [rsp+38h+var_4], 1
jmp short loc_5B8A5
loc_5B89D:
mov [rsp+38h+var_4], 0
loc_5B8A5:
mov eax, [rsp+38h+var_4]
add rsp, 38h
retn
| long long is_num_string(unsigned int *a1, long long a2)
{
int v3; // [rsp+4h] [rbp-34h]
int i; // [rsp+8h] [rbp-30h]
unsigned int v5; // [rsp+Ch] [rbp-2Ch]
unsigned int v6; // [rsp+Ch] [rbp-2Ch]
unsigned int v7; // [rsp+1Ch] [rbp-1Ch]
v3 = *(_DWORD *)(a2 + 4) & 0x7FFFFFFF;
if ( v3 && (*(_DWORD *)(a2 + 4) & 0x7FFFFFFFu) <= 0xA )
{
v5 = string_get(a2, 0LL);
if ( !(unsigned int)is_num(v5) )
return 0;
if ( v5 == 48 )
{
if ( v3 != 1 )
return 0;
v7 = 0;
}
else
{
v7 = v5 - 48;
for ( i = 1; i < v3; ++i )
{
v6 = string_get(a2, (unsigned int)i);
if ( !(unsigned int)is_num(v6) )
return 0;
if ( ((int)(v6 - 48) + 10 * (unsigned long long)v7) >> 32 )
return 0;
v7 = v6 - 48 + 10 * v7;
}
}
*a1 = v7;
return 1;
}
return 0;
}
| is_num_string:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
MOV dword ptr [RSP + 0x4],EAX
CMP dword ptr [RSP + 0x4],0x0
JZ 0x0015b79f
CMP dword ptr [RSP + 0x4],0xa
JLE 0x0015b7ac
LAB_0015b79f:
MOV dword ptr [RSP + 0x34],0x0
JMP 0x0015b8a5
LAB_0015b7ac:
MOV RDI,qword ptr [RSP + 0x20]
XOR ESI,ESI
CALL 0x0015b910
MOV dword ptr [RSP + 0xc],EAX
MOV EDI,dword ptr [RSP + 0xc]
CALL 0x0015b960
CMP EAX,0x0
JZ 0x0015b89d
CMP dword ptr [RSP + 0xc],0x30
JNZ 0x0015b7f6
CMP dword ptr [RSP + 0x4],0x1
JZ 0x0015b7e9
MOV dword ptr [RSP + 0x34],0x0
JMP 0x0015b8a5
LAB_0015b7e9:
MOV dword ptr [RSP + 0x1c],0x0
JMP 0x0015b888
LAB_0015b7f6:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x30
MOV dword ptr [RSP + 0x1c],EAX
MOV dword ptr [RSP + 0x8],0x1
LAB_0015b809:
MOV EAX,dword ptr [RSP + 0x8]
CMP EAX,dword ptr [RSP + 0x4]
JGE 0x0015b886
MOV RDI,qword ptr [RSP + 0x20]
MOV ESI,dword ptr [RSP + 0x8]
CALL 0x0015b910
MOV dword ptr [RSP + 0xc],EAX
MOV EDI,dword ptr [RSP + 0xc]
CALL 0x0015b960
CMP EAX,0x0
JNZ 0x0015b83d
MOV dword ptr [RSP + 0x34],0x0
JMP 0x0015b8a5
LAB_0015b83d:
MOV EAX,dword ptr [RSP + 0x1c]
IMUL RAX,RAX,0xa
MOV ECX,dword ptr [RSP + 0xc]
SUB ECX,0x30
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x10]
SHR RAX,0x20
CMP RAX,0x0
JZ 0x0015b870
MOV dword ptr [RSP + 0x34],0x0
JMP 0x0015b8a5
LAB_0015b870:
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RSP + 0x1c],EAX
MOV EAX,dword ptr [RSP + 0x8]
ADD EAX,0x1
MOV dword ptr [RSP + 0x8],EAX
JMP 0x0015b809
LAB_0015b886:
JMP 0x0015b888
LAB_0015b888:
MOV ECX,dword ptr [RSP + 0x1c]
MOV RAX,qword ptr [RSP + 0x28]
MOV dword ptr [RAX],ECX
MOV dword ptr [RSP + 0x34],0x1
JMP 0x0015b8a5
LAB_0015b89d:
MOV dword ptr [RSP + 0x34],0x0
LAB_0015b8a5:
MOV EAX,dword ptr [RSP + 0x34]
ADD RSP,0x38
RET
|
int4 is_num_string(uint *param_1,long param_2)
{
uint uVar1;
int iVar2;
int iVar3;
ulong uVar4;
int local_30;
uint local_1c;
int4 local_4;
uVar1 = (uint)*(ulong *)(param_2 + 4) & 0x7fffffff;
if (((*(ulong *)(param_2 + 4) & 0x7fffffff) == 0) || (10 < uVar1)) {
local_4 = 0;
}
else {
iVar2 = string_get(param_2,0);
iVar3 = is_num(iVar2);
if (iVar3 == 0) {
local_4 = 0;
}
else {
if (iVar2 == 0x30) {
if (uVar1 != 1) {
return 0;
}
local_1c = 0;
}
else {
local_1c = iVar2 - 0x30;
for (local_30 = 1; local_30 < (int)uVar1; local_30 = local_30 + 1) {
iVar2 = string_get(param_2,local_30);
iVar3 = is_num(iVar2);
if (iVar3 == 0) {
return 0;
}
uVar4 = (ulong)local_1c * 10 + (long)(iVar2 + -0x30);
if (uVar4 >> 0x20 != 0) {
return 0;
}
local_1c = (uint)uVar4;
}
}
*param_1 = local_1c;
local_4 = 1;
}
}
return local_4;
}
| |
54,650 | glfwSetCursorPos | untodesu[P]riteg/build_O3/_deps/glfw-src/src/input.c | GLFWAPI void glfwSetCursorPos(GLFWwindow* handle, double xpos, double ypos)
{
_GLFWwindow* window = (_GLFWwindow*) handle;
assert(window != NULL);
_GLFW_REQUIRE_INIT();
if (xpos != xpos || xpos < -DBL_MAX || xpos > DBL_MAX ||
ypos != ypos || ypos < -DBL_MAX || ypos > DBL_MAX)
{
_glfwInputError(GLFW_INVALID_VALUE,
"Invalid cursor position %f %f",
xpos, ypos);
return;
}
if (!_glfwPlatformWindowFocused(window))
return;
if (window->cursorMode == GLFW_CURSOR_DISABLED)
{
// Only update the accumulated position if the cursor is disabled
window->virtualCursorPosX = xpos;
window->virtualCursorPosY = ypos;
}
else
{
// Update system cursor position
_glfwPlatformSetCursorPos(window, xpos, ypos);
}
} | O3 | c | glfwSetCursorPos:
pushq %rbx
subq $0x10, %rsp
testq %rdi, %rdi
je 0x19f61
leaq 0x8e798(%rip), %rax # 0xa8638
cmpl $0x0, (%rax)
je 0x19f36
ucomisd 0x68cf7(%rip), %xmm0 # 0x82ba8
ja 0x19f1e
ucomisd %xmm0, %xmm0
jp 0x19f1e
movsd 0x68cef(%rip), %xmm2 # 0x82bb0
ucomisd %xmm0, %xmm2
ja 0x19f1e
ucomisd 0x68cd9(%rip), %xmm1 # 0x82ba8
ja 0x19f1e
ucomisd %xmm1, %xmm1
jp 0x19f1e
ucomisd %xmm1, %xmm2
ja 0x19f1e
movq %rdi, %rbx
movsd %xmm0, (%rsp)
movsd %xmm1, 0x8(%rsp)
callq 0x23853
testl %eax, %eax
je 0x19f18
cmpl $0x34003, 0x74(%rbx) # imm = 0x34003
jne 0x19f49
movsd (%rsp), %xmm0
movsd %xmm0, 0x1e0(%rbx)
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x1e8(%rbx)
addq $0x10, %rsp
popq %rbx
retq
leaq 0x68f87(%rip), %rsi # 0x82eac
movl $0x10004, %edi # imm = 0x10004
movb $0x2, %al
addq $0x10, %rsp
popq %rbx
jmp 0x18e91
movl $0x10001, %edi # imm = 0x10001
xorl %esi, %esi
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
jmp 0x18e91
movq %rbx, %rdi
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
addq $0x10, %rsp
popq %rbx
jmp 0x24f72
leaq 0x4d696(%rip), %rdi # 0x675fe
leaq 0x68d45(%rip), %rsi # 0x82cb4
leaq 0x68f02(%rip), %rcx # 0x82e78
movl $0x2bb, %edx # imm = 0x2BB
callq 0xc540
| glfwSetCursorPos:
push rbx
sub rsp, 10h
test rdi, rdi
jz loc_19F61
lea rax, _glfw
cmp dword ptr [rax], 0
jz loc_19F36
ucomisd xmm0, cs:qword_82BA8
ja short loc_19F1E
ucomisd xmm0, xmm0
jp short loc_19F1E
movsd xmm2, cs:qword_82BB0
ucomisd xmm2, xmm0
ja short loc_19F1E
ucomisd xmm1, cs:qword_82BA8
ja short loc_19F1E
ucomisd xmm1, xmm1
jp short loc_19F1E
ucomisd xmm2, xmm1
ja short loc_19F1E
mov rbx, rdi
movsd [rsp+18h+var_18], xmm0
movsd [rsp+18h+var_10], xmm1
call _glfwPlatformWindowFocused
test eax, eax
jz short loc_19F18
cmp dword ptr [rbx+74h], offset loc_34003
jnz short loc_19F49
movsd xmm0, [rsp+18h+var_18]
movsd qword ptr [rbx+1E0h], xmm0
movsd xmm0, [rsp+18h+var_10]
movsd qword ptr [rbx+1E8h], xmm0
loc_19F18:
add rsp, 10h
pop rbx
retn
loc_19F1E:
lea rsi, aInvalidCursorP; "Invalid cursor position %f %f"
mov edi, 10004h
mov al, 2
add rsp, 10h
pop rbx
jmp _glfwInputError
loc_19F36:
mov edi, offset loc_10001
xor esi, esi
xor eax, eax
add rsp, 10h
pop rbx
jmp _glfwInputError
loc_19F49:
mov rdi, rbx
movsd xmm0, [rsp+18h+var_18]
movsd xmm1, [rsp+18h+var_10]
add rsp, 10h
pop rbx
jmp _glfwPlatformSetCursorPos
loc_19F61:
lea rdi, aWindowNull; "window != NULL"
lea rsi, aWorkspaceLlm4b_12; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidGlfwsetcur; "void glfwSetCursorPos(GLFWwindow *, dou"...
mov edx, 2BBh
call ___assert_fail
| long long ( * glfwSetCursorPos(long long a1, double a2, double a3))(_QWORD, _QWORD)
{
long long ( *result)(_QWORD, _QWORD); // rax
if ( !a1 )
__assert_fail(
"window != NULL",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O3/_deps/glfw-src/src/input.c",
699LL,
"void glfwSetCursorPos(GLFWwindow *, double, double)");
if ( !glfw[0] )
return glfwInputError((unsigned int)&loc_10001, 0LL);
if ( a2 > 1.797693134862316e308
|| a2 < -1.797693134862316e308
|| a3 > 1.797693134862316e308
|| a3 < -1.797693134862316e308 )
{
return glfwInputError(0x10004u, (long long)"Invalid cursor position %f %f", a2, a3);
}
result = (long long ( *)(_QWORD, _QWORD))glfwPlatformWindowFocused();
if ( (_DWORD)result )
{
if ( *(_DWORD *)(a1 + 116) == (_DWORD)&loc_34003 )
{
*(double *)(a1 + 480) = a2;
*(double *)(a1 + 488) = a3;
}
else
{
return (long long ( *)(_QWORD, _QWORD))glfwPlatformSetCursorPos(a1, a2, a3);
}
}
return result;
}
| glfwSetCursorPos:
PUSH RBX
SUB RSP,0x10
TEST RDI,RDI
JZ 0x00119f61
LEA RAX,[0x1a8638]
CMP dword ptr [RAX],0x0
JZ 0x00119f36
UCOMISD XMM0,qword ptr [0x00182ba8]
JA 0x00119f1e
UCOMISD XMM0,XMM0
JP 0x00119f1e
MOVSD XMM2,qword ptr [0x00182bb0]
UCOMISD XMM2,XMM0
JA 0x00119f1e
UCOMISD XMM1,qword ptr [0x00182ba8]
JA 0x00119f1e
UCOMISD XMM1,XMM1
JP 0x00119f1e
UCOMISD XMM2,XMM1
JA 0x00119f1e
MOV RBX,RDI
MOVSD qword ptr [RSP],XMM0
MOVSD qword ptr [RSP + 0x8],XMM1
CALL 0x00123853
TEST EAX,EAX
JZ 0x00119f18
CMP dword ptr [RBX + 0x74],0x34003
JNZ 0x00119f49
MOVSD XMM0,qword ptr [RSP]
MOVSD qword ptr [RBX + 0x1e0],XMM0
MOVSD XMM0,qword ptr [RSP + 0x8]
MOVSD qword ptr [RBX + 0x1e8],XMM0
LAB_00119f18:
ADD RSP,0x10
POP RBX
RET
LAB_00119f1e:
LEA RSI,[0x182eac]
MOV EDI,0x10004
MOV AL,0x2
ADD RSP,0x10
POP RBX
JMP 0x00118e91
LAB_00119f36:
MOV EDI,0x10001
XOR ESI,ESI
XOR EAX,EAX
ADD RSP,0x10
POP RBX
JMP 0x00118e91
LAB_00119f49:
MOV RDI,RBX
MOVSD XMM0,qword ptr [RSP]
MOVSD XMM1,qword ptr [RSP + 0x8]
ADD RSP,0x10
POP RBX
JMP 0x00124f72
LAB_00119f61:
LEA RDI,[0x1675fe]
LEA RSI,[0x182cb4]
LEA RCX,[0x182e78]
MOV EDX,0x2bb
CALL 0x0010c540
|
void glfwSetCursorPos(double param_1,double param_2,long param_3)
{
int iVar1;
if (param_3 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("window != NULL",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O3/_deps/glfw-src/src/input.c"
,699,"void glfwSetCursorPos(GLFWwindow *, double, double)");
}
if (_glfw == 0) {
_glfwInputError(0x10001,0);
return;
}
if ((((param_1 <= DAT_00182ba8) && (DAT_00182bb0 <= param_1)) && (param_2 <= DAT_00182ba8)) &&
(DAT_00182bb0 <= param_2)) {
iVar1 = _glfwPlatformWindowFocused();
if (iVar1 != 0) {
if (*(int *)(param_3 + 0x74) != 0x34003) {
_glfwPlatformSetCursorPos(param_1,param_2,param_3);
return;
}
*(double *)(param_3 + 0x1e0) = param_1;
*(double *)(param_3 + 0x1e8) = param_2;
}
return;
}
_glfwInputError(0x10004,"Invalid cursor position %f %f");
return;
}
| |
54,651 | find_type_with_warning | eloqsql/mysys/typelib.c | int find_type_with_warning(const char *x, TYPELIB *typelib, const char *option)
{
int res;
const char **ptr;
if ((res= find_type((char *) x, typelib, FIND_TYPE_BASIC)) <= 0)
{
ptr= typelib->type_names;
if (!*x)
fprintf(stderr, "No option given to %s\n", option);
else
fprintf(stderr, "Unknown option to %s: %s\n", option, x);
fprintf(stderr, "Alternatives are: '%s'", *ptr);
while (*++ptr)
fprintf(stderr, ",'%s'", *ptr);
fprintf(stderr, "\n");
}
return res;
} | O0 | c | find_type_with_warning:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0x2c3d0
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
jg 0x2c3c0
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x2c332
movq 0x1a9cc5(%rip), %rax # 0x1d5fe0
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
leaq 0x54c11(%rip), %rsi # 0x80f3a
movb $0x0, %al
callq 0x24430
jmp 0x2c352
movq 0x1a9ca7(%rip), %rax # 0x1d5fe0
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rcx
leaq 0x54c06(%rip), %rsi # 0x80f51
movb $0x0, %al
callq 0x24430
movq 0x1a9c87(%rip), %rax # 0x1d5fe0
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
leaq 0x54c01(%rip), %rsi # 0x80f6b
movb $0x0, %al
callq 0x24430
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x28(%rbp)
cmpq $0x0, 0x8(%rax)
je 0x2c3a8
movq 0x1a9c52(%rip), %rax # 0x1d5fe0
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
leaq 0x54be3(%rip), %rsi # 0x80f82
movb $0x0, %al
callq 0x24430
jmp 0x2c371
movq 0x1a9c31(%rip), %rax # 0x1d5fe0
movq (%rax), %rdi
leaq 0x53dc1(%rip), %rsi # 0x8017a
movb $0x0, %al
callq 0x24430
movl -0x1c(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| find_type_with_warning:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
xor edx, edx
call find_type
mov [rbp+var_1C], eax
cmp eax, 0
jg loc_2C3C0
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov [rbp+var_28], rax
mov rax, [rbp+var_8]
cmp byte ptr [rax], 0
jnz short loc_2C332
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov rdx, [rbp+var_18]
lea rsi, aNoOptionGivenT; "No option given to %s\n"
mov al, 0
call _fprintf
jmp short loc_2C352
loc_2C332:
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_8]
lea rsi, aUnknownOptionT; "Unknown option to %s: %s\n"
mov al, 0
call _fprintf
loc_2C352:
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov rax, [rbp+var_28]
mov rdx, [rax]
lea rsi, aAlternativesAr; "Alternatives are: '%s'"
mov al, 0
call _fprintf
loc_2C371:
mov rax, [rbp+var_28]
mov rcx, rax
add rcx, 8
mov [rbp+var_28], rcx
cmp qword ptr [rax+8], 0
jz short loc_2C3A8
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov rax, [rbp+var_28]
mov rdx, [rax]
lea rsi, aS_1; ",'%s'"
mov al, 0
call _fprintf
jmp short loc_2C371
loc_2C3A8:
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aResolveNumeric+30h; "\n"
mov al, 0
call _fprintf
loc_2C3C0:
mov eax, [rbp+var_1C]
add rsp, 30h
pop rbp
retn
| long long find_type_with_warning(const char *a1, long long a2, const char *a3)
{
const char **v3; // rax
const char **v5; // [rsp+8h] [rbp-28h]
int type; // [rsp+14h] [rbp-1Ch]
type = find_type(a1, a2, 0LL);
if ( type <= 0 )
{
v5 = *(const char ***)(a2 + 16);
if ( *a1 )
fprintf(stderr, "Unknown option to %s: %s\n", a3, a1);
else
fprintf(stderr, "No option given to %s\n", a3);
fprintf(stderr, "Alternatives are: '%s'", *v5);
while ( 1 )
{
v3 = v5++;
if ( !v3[1] )
break;
fprintf(stderr, ",'%s'", *v5);
}
fprintf(stderr, "\n");
}
return (unsigned int)type;
}
| find_type_with_warning:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
XOR EDX,EDX
CALL 0x0012c3d0
MOV dword ptr [RBP + -0x1c],EAX
CMP EAX,0x0
JG 0x0012c3c0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX],0x0
JNZ 0x0012c332
MOV RAX,qword ptr [0x002d5fe0]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x18]
LEA RSI,[0x180f3a]
MOV AL,0x0
CALL 0x00124430
JMP 0x0012c352
LAB_0012c332:
MOV RAX,qword ptr [0x002d5fe0]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x8]
LEA RSI,[0x180f51]
MOV AL,0x0
CALL 0x00124430
LAB_0012c352:
MOV RAX,qword ptr [0x002d5fe0]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RAX]
LEA RSI,[0x180f6b]
MOV AL,0x0
CALL 0x00124430
LAB_0012c371:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,RAX
ADD RCX,0x8
MOV qword ptr [RBP + -0x28],RCX
CMP qword ptr [RAX + 0x8],0x0
JZ 0x0012c3a8
MOV RAX,qword ptr [0x002d5fe0]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RAX]
LEA RSI,[0x180f82]
MOV AL,0x0
CALL 0x00124430
JMP 0x0012c371
LAB_0012c3a8:
MOV RAX,qword ptr [0x002d5fe0]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x18017a]
MOV AL,0x0
CALL 0x00124430
LAB_0012c3c0:
MOV EAX,dword ptr [RBP + -0x1c]
ADD RSP,0x30
POP RBP
RET
|
int find_type_with_warning(char *param_1,long param_2,int8 param_3)
{
int iVar1;
int8 *local_30;
iVar1 = find_type(param_1,param_2,0);
if (iVar1 < 1) {
local_30 = *(int8 **)(param_2 + 0x10);
if (*param_1 == '\0') {
fprintf(*(FILE **)PTR_stderr_002d5fe0,"No option given to %s\n",param_3);
}
else {
fprintf(*(FILE **)PTR_stderr_002d5fe0,"Unknown option to %s: %s\n",param_3,param_1);
}
fprintf(*(FILE **)PTR_stderr_002d5fe0,"Alternatives are: \'%s\'",*local_30);
while( true ) {
if (local_30[1] == 0) break;
fprintf(*(FILE **)PTR_stderr_002d5fe0,",\'%s\'",local_30[1]);
local_30 = local_30 + 1;
}
fprintf(*(FILE **)PTR_stderr_002d5fe0,"\n");
}
return iVar1;
}
| |
54,652 | minja::Parser::parseConstant() | monkey531[P]llama/common/minja.hpp | std::shared_ptr<Value> parseConstant() {
auto start = it;
consumeSpaces();
if (it == end) return nullptr;
if (*it == '"' || *it == '\'') {
auto str = parseString();
if (str) return std::make_shared<Value>(*str);
}
static std::regex prim_tok(R"(true\b|True\b|false\b|False\b|None\b)");
auto token = consumeToken(prim_tok);
if (!token.empty()) {
if (token == "true" || token == "True") return std::make_shared<Value>(true);
if (token == "false" || token == "False") return std::make_shared<Value>(false);
if (token == "None") return std::make_shared<Value>(nullptr);
throw std::runtime_error("Unknown constant token: " + token);
}
auto number = parseNumber(it, end);
if (!number.is_null()) return std::make_shared<Value>(number);
it = start;
return nullptr;
} | O2 | cpp | minja::Parser::parseConstant():
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rsi), %r12
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x62946
movq 0x20(%r14), %rax
cmpq 0x18(%r14), %rax
je 0x6727f
movzbl (%rax), %eax
cmpl $0x27, %eax
je 0x67254
cmpl $0x22, %eax
jne 0x67292
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x67f6c
movq (%r15), %rsi
testq %rsi, %rsi
je 0x6728a
movq %rbx, %rdi
callq 0x67fc2
movq %rsp, %rdi
callq 0x67fe0
jmp 0x6737b
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0x6737b
movq %rsp, %rdi
callq 0x67fe0
leaq 0x98ef7(%rip), %rax # 0x100190
movb (%rax), %al
testb %al, %al
je 0x673b1
leaq 0x98ec6(%rip), %rdx # 0x100170
movq %rsp, %r15
pushq $0x1
popq %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0x61a3c
cmpq $0x0, 0x8(%r15)
je 0x672fa
leaq 0x44a41(%rip), %rsi # 0xabd0a
movq %rsp, %rdi
callq 0x3a932
testb %al, %al
jne 0x672e8
leaq 0x4dac0(%rip), %rsi # 0xb4d9c
movq %rsp, %rdi
callq 0x3a932
testb %al, %al
je 0x67328
leaq 0x20(%rsp), %rsi
movb $0x1, (%rsi)
movq %rbx, %rdi
callq 0x67ffa
jmp 0x67373
leaq 0x20(%r14), %r15
leaq 0x18(%r14), %rcx
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x68036
cmpb $0x0, 0x20(%rsp)
je 0x67360
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x682ff
jmp 0x67369
leaq 0x476c4(%rip), %rsi # 0xae9f3
movq %rsp, %rdi
callq 0x3a932
testb %al, %al
jne 0x6734e
leaq 0x4da5f(%rip), %rsi # 0xb4da1
movq %rsp, %rdi
callq 0x3a932
testb %al, %al
je 0x6738b
leaq 0x20(%rsp), %rsi
movb $0x0, (%rsi)
movq %rbx, %rdi
callq 0x67ffa
jmp 0x67373
movq %r12, (%r15)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
leaq 0x20(%rsp), %rdi
callq 0x3e62c
movq %rsp, %rdi
callq 0x241c8
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4de2a(%rip), %rsi # 0xb51bc
movq %rsp, %rdi
callq 0x3a932
testb %al, %al
je 0x67406
leaq 0x20(%rsp), %rsi
andq $0x0, (%rsi)
movq %rbx, %rdi
callq 0x68018
jmp 0x67373
leaq 0x98dd8(%rip), %rdi # 0x100190
callq 0x23ff0
testl %eax, %eax
je 0x672a3
leaq 0x98da4(%rip), %rdi # 0x100170
leaq 0x4ddc4(%rip), %rsi # 0xb5197
pushq $0x10
popq %rdx
callq 0x4772a
leaq -0x1fa92(%rip), %rdi # 0x47950
leaq 0x98d87(%rip), %rsi # 0x100170
leaq 0x984f8(%rip), %rdx # 0xff8e8
callq 0x237d0
leaq 0x98d94(%rip), %rdi # 0x100190
callq 0x235f0
jmp 0x672a3
pushq $0x10
popq %rdi
callq 0x23470
movq %rax, %r14
leaq 0x4dda9(%rip), %rsi # 0xb51c1
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x3aa98
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x23e30
xorl %ebp, %ebp
movq 0x97baa(%rip), %rsi # 0xfefe8
movq 0x97b03(%rip), %rdx # 0xfef48
movq %r14, %rdi
callq 0x23f00
movq %rax, %rbx
leaq 0x98d39(%rip), %rdi # 0x100190
callq 0x235e0
jmp 0x674ac
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x241c8
testb %bpl, %bpl
jne 0x67475
jmp 0x67497
movq %rax, %rbx
movq %r14, %rdi
callq 0x236a0
jmp 0x67497
jmp 0x67494
jmp 0x67494
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x3e62c
jmp 0x67497
jmp 0x67494
movq %rax, %rbx
movq %rsp, %rdi
callq 0x241c8
jmp 0x674ac
movq %rax, %rbx
movq %rsp, %rdi
callq 0x67fe0
movq %rbx, %rdi
callq 0x23f80
| _ZN5minja6Parser13parseConstantEv:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 40h
mov r14, rsi
mov rbx, rdi
mov r12, [rsi+20h]
push 1
pop rsi
mov rdi, r14
call _ZN5minja6Parser13consumeSpacesENS_13SpaceHandlingE; minja::Parser::consumeSpaces(minja::SpaceHandling)
mov rax, [r14+20h]
cmp rax, [r14+18h]
jz short loc_6727F
movzx eax, byte ptr [rax]
cmp eax, 27h ; '''
jz short loc_67254
cmp eax, 22h ; '"'
jnz short loc_67292
loc_67254:
mov r15, rsp
mov rdi, r15
mov rsi, r14
call _ZN5minja6Parser11parseStringB5cxx11Ev; minja::Parser::parseString(void)
mov rsi, [r15]
test rsi, rsi
jz short loc_6728A
mov rdi, rbx
call _ZSt11make_sharedIN5minja5ValueEJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESt10shared_ptrIT_EDpOT0_; std::make_shared<minja::Value,std::string &>(std::string &)
mov rdi, rsp
call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::string>::~unique_ptr()
jmp loc_6737B
loc_6727F:
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
jmp loc_6737B
loc_6728A:
mov rdi, rsp
call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::string>::~unique_ptr()
loc_67292:
lea rax, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; `guard variable for'minja::Parser::parseConstant(void)::prim_tok
mov al, [rax]
test al, al
jz loc_673B1
loc_672A3:
lea rdx, _ZZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; minja::Parser::parseConstant(void)::prim_tok
mov r15, rsp
push 1
pop rcx
mov rdi, r15
mov rsi, r14
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
cmp qword ptr [r15+8], 0
jz short loc_672FA
lea rsi, aTrue; "true"
mov rdi, rsp
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jnz short loc_672E8
lea rsi, aTrue_0; "True"
mov rdi, rsp
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_67328
loc_672E8:
lea rsi, [rsp+68h+var_48]
mov byte ptr [rsi], 1
mov rdi, rbx
call _ZSt11make_sharedIN5minja5ValueEJbEESt10shared_ptrIT_EDpOT0_; std::make_shared<minja::Value,bool>(bool &&)
jmp short loc_67373
loc_672FA:
lea r15, [r14+20h]
lea rcx, [r14+18h]
lea rdi, [rsp+68h+var_48]
mov rsi, r14
mov rdx, r15
call _ZN5minja6Parser11parseNumberERN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERKSB_; minja::Parser::parseNumber(__gnu_cxx::__normal_iterator<char const*,std::string> &,__gnu_cxx::__normal_iterator<char const*,std::string> const&)
cmp [rsp+68h+var_48], 0
jz short loc_67360
lea rsi, [rsp+68h+var_48]
mov rdi, rbx
call _ZSt11make_sharedIN5minja5ValueEJRN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEEESt10shared_ptrIT_EDpOT0_; std::make_shared<minja::Value,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)
jmp short loc_67369
loc_67328:
lea rsi, aAdvancedOption+0ABh; "false"
mov rdi, rsp
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jnz short loc_6734E
lea rsi, aFalse; "False"
mov rdi, rsp
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_6738B
loc_6734E:
lea rsi, [rsp+68h+var_48]
mov byte ptr [rsi], 0
mov rdi, rbx
call _ZSt11make_sharedIN5minja5ValueEJbEESt10shared_ptrIT_EDpOT0_; std::make_shared<minja::Value,bool>(bool &&)
jmp short loc_67373
loc_67360:
mov [r15], r12
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
loc_67369:
lea rdi, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
loc_67373:
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_6737B:
mov rax, rbx
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_6738B:
lea rsi, aNone_0; "None"
mov rdi, rsp
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_67406
lea rsi, [rsp+68h+var_48]
and qword ptr [rsi], 0
mov rdi, rbx
call _ZSt11make_sharedIN5minja5ValueEJDnEESt10shared_ptrIT_EDpOT0_; std::make_shared<minja::Value,decltype(nullptr)>(decltype(nullptr) &&)
jmp short loc_67373
loc_673B1:
lea rdi, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_672A3
lea rdi, _ZZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; minja::Parser::parseConstant(void)::prim_tok
lea rsi, aTrueBTrueBFals; "true\\b|True\\b|false\\b|False\\b|None"...
push 10h
pop rdx
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_672A3
loc_67406:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aUnknownConstan; "Unknown constant token: "
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
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
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_674AC
mov rbx, rax
lea rdi, [rsp+68h+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_67475
jmp short loc_67497
mov rbx, rax
loc_67475:
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_67497
jmp short loc_67494
jmp short loc_67494
mov rbx, rax
lea rdi, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
jmp short loc_67497
jmp short $+2
loc_67494:
mov rbx, rax
loc_67497:
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_674AC
mov rbx, rax
mov rdi, rsp
call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::string>::~unique_ptr()
loc_674AC:
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::parseConstant(minja::Parser *this, long long a2)
{
long long v2; // r12
unsigned __int8 *v3; // rax
int v4; // eax
void *exception; // r14
_QWORD v7[4]; // [rsp+0h] [rbp-68h] BYREF
_QWORD v8[9]; // [rsp+20h] [rbp-48h] BYREF
v2 = *(_QWORD *)(a2 + 32);
minja::Parser::consumeSpaces(a2, 1);
v3 = *(unsigned __int8 **)(a2 + 32);
if ( v3 == *(unsigned __int8 **)(a2 + 24) )
{
*(_OWORD *)this = 0LL;
return this;
}
v4 = *v3;
if ( v4 == 39 || v4 == 34 )
{
minja::Parser::parseString[abi:cxx11](v7, a2);
if ( v7[0] )
{
std::make_shared<minja::Value,std::string &>(this);
std::unique_ptr<std::string>::~unique_ptr(v7);
return this;
}
std::unique_ptr<std::string>::~unique_ptr(v7);
}
if ( !(_BYTE)`guard variable for'minja::Parser::parseConstant(void)::prim_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseConstant(void)::prim_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseConstant(void)::prim_tok[abi:cxx11],
(long long)"true\\b|True\\b|false\\b|False\\b|None\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseConstant(void)::prim_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseConstant(void)::prim_tok[abi:cxx11]);
}
minja::Parser::consumeToken(v7, a2, (long long)&minja::Parser::parseConstant(void)::prim_tok[abi:cxx11], 1u);
if ( v7[1] )
{
if ( std::operator==<char>((long long)v7) || std::operator==<char>((long long)v7) )
{
LOBYTE(v8[0]) = 1;
std::make_shared<minja::Value,bool>(this, v8);
}
else if ( std::operator==<char>((long long)v7) || std::operator==<char>((long long)v7) )
{
LOBYTE(v8[0]) = 0;
std::make_shared<minja::Value,bool>(this, v8);
}
else
{
if ( !std::operator==<char>((long long)v7) )
{
exception = __cxa_allocate_exception(0x10uLL);
std::operator+<char>((long long)v8, (long long)"Unknown constant token: ", (long long)v7);
std::runtime_error::runtime_error(exception, v8);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v8[0] = 0LL;
std::make_shared<minja::Value,decltype(nullptr)>(this, v8);
}
}
else
{
minja::Parser::parseNumber(v8, a2, a2 + 32, a2 + 24);
if ( LOBYTE(v8[0]) )
{
std::make_shared<minja::Value,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> &>(
this,
v8);
}
else
{
*(_QWORD *)(a2 + 32) = v2;
*(_OWORD *)this = 0LL;
}
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v8);
}
std::string::~string(v7);
return this;
}
| parseConstant:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RSI
MOV RBX,RDI
MOV R12,qword ptr [RSI + 0x20]
PUSH 0x1
POP RSI
MOV RDI,R14
CALL 0x00162946
MOV RAX,qword ptr [R14 + 0x20]
CMP RAX,qword ptr [R14 + 0x18]
JZ 0x0016727f
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x27
JZ 0x00167254
CMP EAX,0x22
JNZ 0x00167292
LAB_00167254:
MOV R15,RSP
MOV RDI,R15
MOV RSI,R14
CALL 0x00167f6c
MOV RSI,qword ptr [R15]
TEST RSI,RSI
JZ 0x0016728a
LAB_0016726a:
MOV RDI,RBX
CALL 0x00167fc2
LAB_00167272:
MOV RDI,RSP
CALL 0x00167fe0
JMP 0x0016737b
LAB_0016727f:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
JMP 0x0016737b
LAB_0016728a:
MOV RDI,RSP
CALL 0x00167fe0
LAB_00167292:
LEA RAX,[0x200190]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x001673b1
LAB_001672a3:
LEA RDX,[0x200170]
MOV R15,RSP
PUSH 0x1
POP RCX
MOV RDI,R15
MOV RSI,R14
CALL 0x00161a3c
CMP qword ptr [R15 + 0x8],0x0
JZ 0x001672fa
LEA RSI,[0x1abd0a]
MOV RDI,RSP
CALL 0x0013a932
TEST AL,AL
JNZ 0x001672e8
LEA RSI,[0x1b4d9c]
MOV RDI,RSP
CALL 0x0013a932
TEST AL,AL
JZ 0x00167328
LAB_001672e8:
LEA RSI,[RSP + 0x20]
MOV byte ptr [RSI],0x1
LAB_001672f0:
MOV RDI,RBX
CALL 0x00167ffa
JMP 0x00167373
LAB_001672fa:
LEA R15,[R14 + 0x20]
LEA RCX,[R14 + 0x18]
LEA RDI,[RSP + 0x20]
MOV RSI,R14
MOV RDX,R15
CALL 0x00168036
CMP byte ptr [RSP + 0x20],0x0
JZ 0x00167360
LAB_00167319:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x001682ff
JMP 0x00167369
LAB_00167328:
LEA RSI,[0x1ae9f3]
MOV RDI,RSP
CALL 0x0013a932
TEST AL,AL
JNZ 0x0016734e
LEA RSI,[0x1b4da1]
MOV RDI,RSP
CALL 0x0013a932
TEST AL,AL
JZ 0x0016738b
LAB_0016734e:
LEA RSI,[RSP + 0x20]
MOV byte ptr [RSI],0x0
LAB_00167356:
MOV RDI,RBX
CALL 0x00167ffa
JMP 0x00167373
LAB_00167360:
MOV qword ptr [R15],R12
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
LAB_00167369:
LEA RDI,[RSP + 0x20]
CALL 0x0013e62c
LAB_00167373:
MOV RDI,RSP
CALL 0x001241c8
LAB_0016737b:
MOV RAX,RBX
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0016738b:
LEA RSI,[0x1b51bc]
MOV RDI,RSP
CALL 0x0013a932
TEST AL,AL
JZ 0x00167406
LEA RSI,[RSP + 0x20]
AND qword ptr [RSI],0x0
LAB_001673a7:
MOV RDI,RBX
CALL 0x00168018
JMP 0x00167373
LAB_001673b1:
LEA RDI,[0x200190]
CALL 0x00123ff0
TEST EAX,EAX
JZ 0x001672a3
LAB_001673c5:
LEA RDI,[0x200170]
LEA RSI,[0x1b5197]
PUSH 0x10
POP RDX
CALL 0x0014772a
LAB_001673db:
LEA RDI,[0x147950]
LEA RSI,[0x200170]
LEA RDX,[0x1ff8e8]
CALL 0x001237d0
LEA RDI,[0x200190]
CALL 0x001235f0
JMP 0x001672a3
LAB_00167406:
PUSH 0x10
POP RDI
CALL 0x00123470
MOV R14,RAX
LAB_00167411:
LEA RSI,[0x1b51c1]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x0013aa98
MOV BPL,0x1
LAB_00167428:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x00123e30
XOR EBP,EBP
MOV RSI,qword ptr [0x001fefe8]
MOV RDX,qword ptr [0x001fef48]
MOV RDI,R14
CALL 0x00123f00
|
/* minja::Parser::parseConstant() */
void minja::Parser::parseConstant(void)
{
char cVar1;
int8 uVar2;
bool bVar3;
int iVar4;
runtime_error *this;
__normal_iterator *in_RSI;
string *in_RDI;
long local_68;
long local_60;
ulong local_48 [4];
uVar2 = *(int8 *)(in_RSI + 0x20);
consumeSpaces();
if (*(char **)(in_RSI + 0x20) == *(char **)(in_RSI + 0x18)) {
*(int8 *)in_RDI = 0;
*(int8 *)(in_RDI + 8) = 0;
return;
}
cVar1 = **(char **)(in_RSI + 0x20);
if ((cVar1 == '\'') || (cVar1 == '\"')) {
parseString_abi_cxx11_();
if (local_68 != 0) {
/* try { // try from 0016726a to 00167271 has its CatchHandler @ 001674a1 */
std::make_shared<minja::Value,std::__cxx11::string&>(in_RDI);
std::unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>>::~unique_ptr
((unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>> *)
&local_68);
return;
}
std::unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>>::~unique_ptr
((unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>> *)
&local_68);
}
if ((parseConstant()::prim_tok_abi_cxx11_ == '\0') &&
(iVar4 = __cxa_guard_acquire(&parseConstant()::prim_tok_abi_cxx11_), iVar4 != 0)) {
/* try { // try from 001673c5 to 001673da has its CatchHandler @ 0016744d */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseConstant()::prim_tok_abi_cxx11_,"true\\b|True\\b|false\\b|False\\b|None\\b",0x10
);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseConstant()::prim_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseConstant()::prim_tok_abi_cxx11_);
}
consumeToken(&local_68);
if (local_60 == 0) {
/* try { // try from 001672fa to 00167311 has its CatchHandler @ 00167492 */
parseNumber((__normal_iterator *)local_48,in_RSI);
if (local_48[0]._0_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>
)0x0) {
*(int8 *)(in_RSI + 0x20) = uVar2;
*(int8 *)in_RDI = 0;
*(int8 *)(in_RDI + 8) = 0;
}
else {
/* try { // try from 00167319 to 00167325 has its CatchHandler @ 00167483 */
std::
make_shared<minja::Value,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>&>
(in_RDI);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::~basic_json((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)local_48);
}
else {
bVar3 = std::operator==((string *)&local_68,"true");
if ((bVar3) || (bVar3 = std::operator==((string *)&local_68,"True"), bVar3)) {
local_48[0] = CONCAT71(local_48[0]._1_7_,1);
/* try { // try from 001672f0 to 001672f7 has its CatchHandler @ 00167494 */
std::make_shared<minja::Value,bool>((bool *)in_RDI);
}
else {
bVar3 = std::operator==((string *)&local_68,"false");
if ((bVar3) || (bVar3 = std::operator==((string *)&local_68,"False"), bVar3)) {
local_48[0] = local_48[0] & 0xffffffffffffff00;
/* try { // try from 00167356 to 0016735d has its CatchHandler @ 00167481 */
std::make_shared<minja::Value,bool>((bool *)in_RDI);
}
else {
bVar3 = std::operator==((string *)&local_68,"None");
if (!bVar3) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00167411 to 00167424 has its CatchHandler @ 00167472 */
std::operator+((char *)local_48,(string *)"Unknown constant token: ");
/* try { // try from 00167428 to 0016744c has its CatchHandler @ 0016745e */
std::runtime_error::runtime_error(this,(string *)local_48);
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_001fefe8,PTR__runtime_error_001fef48);
}
local_48[0] = 0;
/* try { // try from 001673a7 to 001673ae has its CatchHandler @ 0016747f */
std::make_shared<minja::Value,decltype(nullptr)>((_func_decltype_nullptr **)in_RDI);
}
}
}
std::__cxx11::string::~string((string *)&local_68);
return;
}
| |
54,653 | ma_check_index_cond | eloqsql/storage/maria/ma_key.c | check_result_t ma_check_index_cond(register MARIA_HA *info, uint keynr,
uchar *record)
{
check_result_t res= CHECK_POS;
if (info->index_cond_func)
{
if (_ma_put_key_in_record(info, keynr, FALSE, record))
{
/* Impossible case; Can only happen if bug in code */
_ma_print_error(info, HA_ERR_CRASHED, 0);
info->cur_row.lastpos= HA_OFFSET_ERROR; /* No active record */
my_errno= HA_ERR_CRASHED;
res= CHECK_ERROR;
}
else if ((res= info->index_cond_func(info->index_cond_func_arg)) ==
CHECK_OUT_OF_RANGE)
{
/* We got beyond the end of scanned range */
info->cur_row.lastpos= HA_OFFSET_ERROR; /* No active record */
my_errno= HA_ERR_END_OF_FILE;
}
}
return res;
} | O3 | c | ma_check_index_cond:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x0, 0x6f8(%rdi)
je 0x37891
movq %rdx, %rcx
movq %rdi, %rbx
xorl %edx, %edx
callq 0x37451
testl %eax, %eax
je 0x37899
movl $0x7e, %r15d
movq %rbx, %rdi
movl $0x7e, %esi
xorl %edx, %edx
callq 0x369ee
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
jmp 0x378ba
movl $0x1, %r14d
jmp 0x378cd
movq 0x700(%rbx), %rdi
callq *0x6f8(%rbx)
movl %eax, %r14d
cmpl $0x2, %eax
jne 0x378cd
movl $0x2, %r14d
movl $0x89, %r15d
movq $-0x1, 0x98(%rbx)
callq 0xa1b22
movl %r15d, (%rax)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| ma_check_index_cond:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
cmp qword ptr [rdi+6F8h], 0
jz short loc_37891
mov rcx, rdx
mov rbx, rdi
xor edx, edx
call _ma_put_key_in_record
test eax, eax
jz short loc_37899
mov r15d, 7Eh ; '~'
mov rdi, rbx
mov esi, 7Eh ; '~'
xor edx, edx
call _ma_print_error
mov r14d, 0FFFFFFFFh
jmp short loc_378BA
loc_37891:
mov r14d, 1
jmp short loc_378CD
loc_37899:
mov rdi, [rbx+700h]
call qword ptr [rbx+6F8h]
mov r14d, eax
cmp eax, 2
jnz short loc_378CD
mov r14d, 2
mov r15d, 89h
loc_378BA:
mov qword ptr [rbx+98h], 0FFFFFFFFFFFFFFFFh
call _my_thread_var
mov [rax], r15d
loc_378CD:
mov eax, r14d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long ma_check_index_cond(long long a1, long long a2, long long a3)
{
long long v3; // rbx
long long v4; // rcx
long long v5; // r8
int v6; // r9d
int v7; // r15d
long long v8; // rdx
long long v9; // rcx
long long v10; // r8
unsigned int v11; // r14d
if ( *(_QWORD *)(a1 + 1784) )
{
v3 = a1;
if ( (unsigned int)ma_put_key_in_record(a1, a2, 0, a3) )
{
v7 = 126;
a2 = 126LL;
ma_print_error((_DWORD *)a1, 126, 0, v4, v5, v6);
v11 = -1;
LABEL_7:
*(_QWORD *)(v3 + 152) = -1LL;
*(_DWORD *)my_thread_var(a1, a2, v8, v9, v10) = v7;
return v11;
}
a1 = *(_QWORD *)(a1 + 1792);
v11 = (*(long long ( **)(long long))(v3 + 1784))(a1);
if ( v11 == 2 )
{
v11 = 2;
v7 = 137;
goto LABEL_7;
}
}
else
{
return 1;
}
return v11;
}
| ma_check_index_cond:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
CMP qword ptr [RDI + 0x6f8],0x0
JZ 0x00137891
MOV RCX,RDX
MOV RBX,RDI
XOR EDX,EDX
CALL 0x00137451
TEST EAX,EAX
JZ 0x00137899
MOV R15D,0x7e
MOV RDI,RBX
MOV ESI,0x7e
XOR EDX,EDX
CALL 0x001369ee
MOV R14D,0xffffffff
JMP 0x001378ba
LAB_00137891:
MOV R14D,0x1
JMP 0x001378cd
LAB_00137899:
MOV RDI,qword ptr [RBX + 0x700]
CALL qword ptr [RBX + 0x6f8]
MOV R14D,EAX
CMP EAX,0x2
JNZ 0x001378cd
MOV R14D,0x2
MOV R15D,0x89
LAB_001378ba:
MOV qword ptr [RBX + 0x98],-0x1
CALL 0x001a1b22
MOV dword ptr [RAX],R15D
LAB_001378cd:
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int ma_check_index_cond(long param_1,int8 param_2,int8 param_3)
{
int iVar1;
int4 *puVar2;
int4 uVar3;
if (*(long *)(param_1 + 0x6f8) == 0) {
iVar1 = 1;
}
else {
iVar1 = _ma_put_key_in_record(param_1,param_2,0,param_3);
if (iVar1 == 0) {
iVar1 = (**(code **)(param_1 + 0x6f8))(*(int8 *)(param_1 + 0x700));
if (iVar1 != 2) {
return iVar1;
}
iVar1 = 2;
uVar3 = 0x89;
}
else {
uVar3 = 0x7e;
_ma_print_error(param_1,0x7e,0);
iVar1 = -1;
}
*(int8 *)(param_1 + 0x98) = 0xffffffffffffffff;
puVar2 = (int4 *)_my_thread_var();
*puVar2 = uVar3;
}
return iVar1;
}
| |
54,654 | mysql_free_result | eloqsql/libmariadb/libmariadb/mariadb_lib.c | void STDCALL
mysql_free_result(MYSQL_RES *result)
{
if (result)
{
if (result->handle && result->handle->status == MYSQL_STATUS_USE_RESULT)
{
result->handle->methods->db_skip_result(result->handle);
result->handle->status=MYSQL_STATUS_READY;
}
free_rows(result->data);
if (result->fields)
ma_free_root(&result->field_alloc,MYF(0));
if (result->row)
free(result->row);
free(result);
}
return;
} | O0 | c | mysql_free_result:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x3e06a
movq -0x8(%rbp), %rax
cmpq $0x0, 0x78(%rax)
je 0x3e022
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
cmpl $0x2, 0x488(%rax)
jne 0x3e022
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq 0x4d0(%rax), %rax
movq 0x18(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x78(%rcx), %rdi
callq *%rax
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movl $0x0, 0x488(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x3d2e0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x3e049
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
xorl %esi, %esi
callq 0x4bae0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x3e061
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x371c0
movq -0x8(%rbp), %rdi
callq 0x371c0
addq $0x10, %rsp
popq %rbp
retq
| mysql_free_result:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
cmp [rbp+var_8], 0
jz loc_3E06A
mov rax, [rbp+var_8]
cmp qword ptr [rax+78h], 0
jz short loc_3E022
mov rax, [rbp+var_8]
mov rax, [rax+78h]
cmp dword ptr [rax+488h], 2
jnz short loc_3E022
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov rax, [rax+4D0h]
mov rax, [rax+18h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+78h]
call rax
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov dword ptr [rax+488h], 0
loc_3E022:
mov rax, [rbp+var_8]
mov rdi, [rax+18h]
call free_rows
mov rax, [rbp+var_8]
cmp qword ptr [rax+10h], 0
jz short loc_3E049
mov rdi, [rbp+var_8]
add rdi, 28h ; '('
xor esi, esi
call ma_free_root
loc_3E049:
mov rax, [rbp+var_8]
cmp qword ptr [rax+60h], 0
jz short loc_3E061
mov rax, [rbp+var_8]
mov rdi, [rax+60h]
call _free
loc_3E061:
mov rdi, [rbp+var_8]
call _free
loc_3E06A:
add rsp, 10h
pop rbp
retn
| long long mysql_free_result(_QWORD *a1)
{
long long result; // rax
if ( a1 )
{
if ( a1[15] && *(_DWORD *)(a1[15] + 1160LL) == 2 )
{
(*(void ( **)(_QWORD))(*(_QWORD *)(a1[15] + 1232LL) + 24LL))(a1[15]);
*(_DWORD *)(a1[15] + 1160LL) = 0;
}
free_rows(a1[3]);
if ( a1[2] )
ma_free_root(a1 + 5, 0LL);
if ( a1[12] )
free(a1[12]);
return free(a1);
}
return result;
}
| mysql_free_result:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
CMP qword ptr [RBP + -0x8],0x0
JZ 0x0013e06a
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x78],0x0
JZ 0x0013e022
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
CMP dword ptr [RAX + 0x488],0x2
JNZ 0x0013e022
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x78]
CALL RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV dword ptr [RAX + 0x488],0x0
LAB_0013e022:
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x18]
CALL 0x0013d2e0
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x10],0x0
JZ 0x0013e049
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x28
XOR ESI,ESI
CALL 0x0014bae0
LAB_0013e049:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x60],0x0
JZ 0x0013e061
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x60]
CALL 0x001371c0
LAB_0013e061:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001371c0
LAB_0013e06a:
ADD RSP,0x10
POP RBP
RET
|
void mysql_free_result(void *param_1)
{
if (param_1 != (void *)0x0) {
if ((*(long *)((long)param_1 + 0x78) != 0) &&
(*(int *)(*(long *)((long)param_1 + 0x78) + 0x488) == 2)) {
(**(code **)(*(long *)(*(long *)((long)param_1 + 0x78) + 0x4d0) + 0x18))
(*(int8 *)((long)param_1 + 0x78));
*(int4 *)(*(long *)((long)param_1 + 0x78) + 0x488) = 0;
}
free_rows(*(int8 *)((long)param_1 + 0x18));
if (*(long *)((long)param_1 + 0x10) != 0) {
ma_free_root((long)param_1 + 0x28,0);
}
if (*(long *)((long)param_1 + 0x60) != 0) {
free(*(void **)((long)param_1 + 0x60));
}
free(param_1);
}
return;
}
| |
54,655 | bitmap_fast_test_and_set | eloqsql/mysys/my_bitmap.c | my_bool bitmap_fast_test_and_set(MY_BITMAP *map, uint bitmap_bit)
{
uchar *value= ((uchar*) map->bitmap) + (bitmap_bit / 8);
uchar bit= 1 << ((bitmap_bit) & 7);
uchar res= (*value) & bit;
*value|= bit;
return res;
} | O3 | c | bitmap_fast_test_and_set:
pushq %rbp
movq %rsp, %rbp
movl %esi, %ecx
movl %esi, %edx
andb $0x7, %cl
movl $0x1, %esi
shll %cl, %esi
movq (%rdi), %rcx
shrl $0x3, %edx
movb (%rcx,%rdx), %dil
movl %edi, %eax
andb %sil, %al
orb %sil, %dil
movb %dil, (%rcx,%rdx)
popq %rbp
retq
| bitmap_fast_test_and_set:
push rbp
mov rbp, rsp
mov ecx, esi
mov edx, esi
and cl, 7
mov esi, 1
shl esi, cl
mov rcx, [rdi]
shr edx, 3
mov dil, [rcx+rdx]
mov eax, edi
and al, sil
or dil, sil
mov [rcx+rdx], dil
pop rbp
retn
| char bitmap_fast_test_and_set(long long *a1, unsigned int a2)
{
int v3; // esi
long long v4; // rcx
long long v5; // rdx
char v6; // di
char result; // al
v3 = 1 << (a2 & 7);
v4 = *a1;
v5 = a2 >> 3;
v6 = *(_BYTE *)(*a1 + v5);
result = v3 & v6;
*(_BYTE *)(v4 + v5) = v3 | v6;
return result;
}
| bitmap_fast_test_and_set:
PUSH RBP
MOV RBP,RSP
MOV ECX,ESI
MOV EDX,ESI
AND CL,0x7
MOV ESI,0x1
SHL ESI,CL
MOV RCX,qword ptr [RDI]
SHR EDX,0x3
MOV DIL,byte ptr [RCX + RDX*0x1]
MOV EAX,EDI
AND AL,SIL
OR DIL,SIL
MOV byte ptr [RCX + RDX*0x1],DIL
POP RBP
RET
|
byte bitmap_fast_test_and_set(long *param_1,uint param_2)
{
byte bVar1;
byte bVar2;
bVar1 = *(byte *)(*param_1 + (ulong)(param_2 >> 3));
bVar2 = (byte)(1 << ((byte)param_2 & 7));
*(byte *)(*param_1 + (ulong)(param_2 >> 3)) = bVar1 | bVar2;
return bVar1 & bVar2;
}
| |
54,656 | list_delete | eloqsql/libmariadb/libmariadb/ma_list.c | LIST *list_delete(LIST *root, LIST *element)
{
if (element->prev)
element->prev->next=element->next;
else
root=element->next;
if (element->next)
element->next->prev=element->prev;
return root;
} | O3 | c | list_delete:
pushq %rbp
movq %rsp, %rbp
movq (%rsi), %rdx
movq 0x8(%rsi), %rcx
movq %rcx, %rax
testq %rdx, %rdx
je 0x1ff3a
movq %rcx, 0x8(%rdx)
movq %rdi, %rax
testq %rcx, %rcx
je 0x1ff45
movq (%rsi), %rdx
movq %rdx, (%rcx)
popq %rbp
retq
| list_delete:
push rbp
mov rbp, rsp
mov rdx, [rsi]
mov rcx, [rsi+8]
mov rax, rcx
test rdx, rdx
jz short loc_1FF3A
mov [rdx+8], rcx
mov rax, rdi
loc_1FF3A:
test rcx, rcx
jz short loc_1FF45
mov rdx, [rsi]
mov [rcx], rdx
loc_1FF45:
pop rbp
retn
| _QWORD * list_delete(_QWORD *a1, _QWORD *a2)
{
_QWORD *v2; // rcx
_QWORD *result; // rax
v2 = (_QWORD *)a2[1];
result = v2;
if ( *a2 )
{
*(_QWORD *)(*a2 + 8LL) = v2;
result = a1;
}
if ( v2 )
*v2 = *a2;
return result;
}
| list_delete:
PUSH RBP
MOV RBP,RSP
MOV RDX,qword ptr [RSI]
MOV RCX,qword ptr [RSI + 0x8]
MOV RAX,RCX
TEST RDX,RDX
JZ 0x0011ff3a
MOV qword ptr [RDX + 0x8],RCX
MOV RAX,RDI
LAB_0011ff3a:
TEST RCX,RCX
JZ 0x0011ff45
MOV RDX,qword ptr [RSI]
MOV qword ptr [RCX],RDX
LAB_0011ff45:
POP RBP
RET
|
long * list_delete(long *param_1,long *param_2)
{
long *plVar1;
long *plVar2;
plVar1 = (long *)param_2[1];
plVar2 = plVar1;
if (*param_2 != 0) {
*(long **)(*param_2 + 8) = plVar1;
plVar2 = param_1;
}
if (plVar1 != (long *)0x0) {
*plVar1 = *param_2;
}
return plVar2;
}
| |
54,657 | testing::AssertionResult testing::internal::FloatingPointLE<double>(char const*, char const*, double, double) | AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc | AssertionResult FloatingPointLE(const char* expr1, const char* expr2,
RawType val1, RawType val2) {
// Returns success if val1 is less than val2,
if (val1 < val2) {
return AssertionSuccess();
}
// or if val1 is almost equal to val2.
const FloatingPoint<RawType> lhs(val1), rhs(val2);
if (lhs.AlmostEquals(rhs)) {
return AssertionSuccess();
}
// Note that the above two checks will both fail if either val1 or
// val2 is NaN, as the IEEE floating-point standard requires that
// any predicate involving a NaN must return false.
::std::stringstream val1_ss;
val1_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)
<< val1;
::std::stringstream val2_ss;
val2_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)
<< val2;
return AssertionFailure()
<< "Expected: (" << expr1 << ") <= (" << expr2 << ")\n"
<< " Actual: " << StringStreamToString(&val1_ss) << " vs "
<< StringStreamToString(&val2_ss);
} | O0 | cpp | testing::AssertionResult testing::internal::FloatingPointLE<double>(char const*, char const*, double, double):
subq $0x438, %rsp # imm = 0x438
movq %rdi, 0x70(%rsp)
movq %rdi, %rax
movq %rax, 0x78(%rsp)
movq %rdi, 0x430(%rsp)
movq %rsi, 0x428(%rsp)
movq %rdx, 0x420(%rsp)
movsd %xmm0, 0x418(%rsp)
movsd %xmm1, 0x410(%rsp)
movsd 0x418(%rsp), %xmm1
movsd 0x410(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x49bd5
movq 0x70(%rsp), %rdi
callq 0x13220
jmp 0x49f00
leaq 0x408(%rsp), %rdi
leaq 0x418(%rsp), %rsi
callq 0x67970
leaq 0x400(%rsp), %rdi
leaq 0x410(%rsp), %rsi
callq 0x67970
leaq 0x408(%rsp), %rdi
leaq 0x400(%rsp), %rsi
callq 0x67990
testb $0x1, %al
jne 0x49c1a
jmp 0x49c29
movq 0x70(%rsp), %rdi
callq 0x13220
jmp 0x49f00
leaq 0x278(%rsp), %rdi
callq 0xb300
leaq 0x288(%rsp), %rax
movq %rax, 0x60(%rsp)
movl $0x11, %edi
callq 0x48790
movq 0x60(%rsp), %rdi
movl %eax, 0x274(%rsp)
movl 0x274(%rsp), %esi
callq 0xb860
movq %rax, 0x68(%rsp)
jmp 0x49c6c
movq 0x68(%rsp), %rdi
movsd 0x418(%rsp), %xmm0
callq 0xba10
jmp 0x49c81
leaq 0xd8(%rsp), %rdi
callq 0xb300
jmp 0x49c90
leaq 0xe8(%rsp), %rax
movq %rax, 0x50(%rsp)
movl $0x11, %edi
callq 0x48790
movq 0x50(%rsp), %rdi
movl %eax, 0xd4(%rsp)
movl 0xd4(%rsp), %esi
callq 0xb860
movq %rax, 0x58(%rsp)
jmp 0x49cc6
movq 0x58(%rsp), %rdi
movsd 0x410(%rsp), %xmm0
callq 0xba10
jmp 0x49cdb
leaq 0xc0(%rsp), %rdi
callq 0x13250
jmp 0x49cea
leaq 0x28693(%rip), %rsi # 0x72384
leaq 0xc0(%rsp), %rdi
callq 0x11290
movq %rax, 0x48(%rsp)
jmp 0x49d05
movq 0x48(%rsp), %rdi
leaq 0x428(%rsp), %rsi
callq 0x11320
movq %rax, 0x40(%rsp)
jmp 0x49d1e
movq 0x40(%rsp), %rdi
leaq 0x2c9e4(%rip), %rsi # 0x7670e
callq 0x496a0
movq %rax, 0x38(%rsp)
jmp 0x49d36
movq 0x38(%rsp), %rdi
leaq 0x420(%rsp), %rsi
callq 0x11320
movq %rax, 0x30(%rsp)
jmp 0x49d4f
movq 0x30(%rsp), %rdi
leaq 0x2b4a6(%rip), %rsi # 0x75201
callq 0x113b0
movq %rax, 0x28(%rsp)
jmp 0x49d67
movq 0x28(%rsp), %rdi
leaq 0x2ad2b(%rip), %rsi # 0x74a9e
callq 0x56450
movq %rax, 0x20(%rsp)
jmp 0x49d7f
leaq 0xa0(%rsp), %rdi
leaq 0x278(%rsp), %rsi
callq 0x23260
jmp 0x49d96
movq 0x20(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x11440
movq %rax, 0x18(%rsp)
jmp 0x49daf
movq 0x18(%rsp), %rdi
leaq 0x285e4(%rip), %rsi # 0x7239f
callq 0x11500
movq %rax, 0x10(%rsp)
jmp 0x49dc7
leaq 0x80(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x23260
jmp 0x49dde
movq 0x10(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x11440
movq %rax, 0x8(%rsp)
jmp 0x49df7
movq 0x8(%rsp), %rsi
movq 0x70(%rsp), %rdi
callq 0x13020
jmp 0x49e08
leaq 0x80(%rsp), %rdi
callq 0xec60
leaq 0xa0(%rsp), %rdi
callq 0xec60
leaq 0xc0(%rsp), %rdi
callq 0xee60
leaq 0xd8(%rsp), %rdi
callq 0xb360
leaq 0x278(%rsp), %rdi
callq 0xb360
jmp 0x49f00
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x268(%rsp)
movl %eax, 0x264(%rsp)
jmp 0x49ef1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x268(%rsp)
movl %eax, 0x264(%rsp)
jmp 0x49ee4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x268(%rsp)
movl %eax, 0x264(%rsp)
jmp 0x49ed7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x268(%rsp)
movl %eax, 0x264(%rsp)
jmp 0x49eca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x268(%rsp)
movl %eax, 0x264(%rsp)
leaq 0x80(%rsp), %rdi
callq 0xec60
leaq 0xa0(%rsp), %rdi
callq 0xec60
leaq 0xc0(%rsp), %rdi
callq 0xee60
leaq 0xd8(%rsp), %rdi
callq 0xb360
leaq 0x278(%rsp), %rdi
callq 0xb360
jmp 0x49f0d
movq 0x78(%rsp), %rax
addq $0x438, %rsp # imm = 0x438
retq
movq 0x268(%rsp), %rdi
callq 0xb910
nopw (%rax,%rax)
| _ZN7testing8internal15FloatingPointLEIdEENS_15AssertionResultEPKcS4_T_S5_:
sub rsp, 438h
mov [rsp+438h+var_3C8], rdi
mov rax, rdi
mov [rsp+438h+var_3C0], rax
mov [rsp+438h+var_8], rdi
mov [rsp+438h+var_10], rsi
mov [rsp+438h+var_18], rdx
movsd [rsp+438h+var_20], xmm0
movsd [rsp+438h+var_28], xmm1
movsd xmm1, [rsp+438h+var_20]
movsd xmm0, [rsp+438h+var_28]
ucomisd xmm0, xmm1
jbe short loc_49BD5
mov rdi, [rsp+438h+var_3C8]; this
call _ZN7testing16AssertionSuccessEv; testing::AssertionSuccess(void)
jmp loc_49F00
loc_49BD5:
lea rdi, [rsp+438h+var_30]
lea rsi, [rsp+438h+var_20]
call _ZN7testing8internal13FloatingPointIdEC2ERKd; testing::internal::FloatingPoint<double>::FloatingPoint(double const&)
lea rdi, [rsp+438h+var_38]
lea rsi, [rsp+438h+var_28]
call _ZN7testing8internal13FloatingPointIdEC2ERKd; testing::internal::FloatingPoint<double>::FloatingPoint(double const&)
lea rdi, [rsp+438h+var_30]
lea rsi, [rsp+438h+var_38]
call _ZNK7testing8internal13FloatingPointIdE12AlmostEqualsERKS2_; testing::internal::FloatingPoint<double>::AlmostEquals(testing::internal::FloatingPoint<double> const&)
test al, 1
jnz short loc_49C1A
jmp short loc_49C29
loc_49C1A:
mov rdi, [rsp+438h+var_3C8]; this
call _ZN7testing16AssertionSuccessEv; testing::AssertionSuccess(void)
jmp loc_49F00
loc_49C29:
lea rdi, [rsp+438h+var_1C0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
lea rax, [rsp+438h+var_1B0]
mov [rsp+438h+var_3D8], rax
mov edi, 11h; int
call _ZSt12setprecisioni; std::setprecision(int)
mov rdi, [rsp+438h+var_3D8]
mov [rsp+438h+var_1C4], eax
mov esi, [rsp+438h+var_1C4]
call __ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Setprecision)
mov [rsp+438h+var_3D0], rax
jmp short $+2
loc_49C6C:
mov rdi, [rsp+438h+var_3D0]
movsd xmm0, [rsp+438h+var_20]
call __ZNSolsEd; std::ostream::operator<<(double)
jmp short $+2
loc_49C81:
lea rdi, [rsp+438h+var_360]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
jmp short $+2
loc_49C90:
lea rax, [rsp+438h+var_350]
mov [rsp+438h+var_3E8], rax
mov edi, 11h; int
call _ZSt12setprecisioni; std::setprecision(int)
mov rdi, [rsp+438h+var_3E8]
mov [rsp+438h+var_364], eax
mov esi, [rsp+438h+var_364]
call __ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Setprecision)
mov [rsp+438h+var_3E0], rax
jmp short $+2
loc_49CC6:
mov rdi, [rsp+438h+var_3E0]
movsd xmm0, [rsp+438h+var_28]
call __ZNSolsEd; std::ostream::operator<<(double)
jmp short $+2
loc_49CDB:
lea rdi, [rsp+438h+var_378]; this
call _ZN7testing16AssertionFailureEv; testing::AssertionFailure(void)
jmp short $+2
loc_49CEA:
lea rsi, aExpected; "Expected: ("
lea rdi, [rsp+438h+var_378]
call _ZN7testing15AssertionResultlsIA12_cEERS0_RKT_; testing::AssertionResult::operator<<<char [12]>(char [12] const&)
mov qword ptr [rsp+438h+var_3F0], rax; char
jmp short $+2
loc_49D05:
mov rdi, qword ptr [rsp+438h+var_3F0]
lea rsi, [rsp+438h+var_10]
call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&)
mov qword ptr [rsp+438h+var_3F8], rax; int
jmp short $+2
loc_49D1E:
mov rdi, qword ptr [rsp+438h+var_3F8]
lea rsi, asc_7670E; ") <= ("
call _ZN7testing15AssertionResultlsIA7_cEERS0_RKT_; testing::AssertionResult::operator<<<char [7]>(char [7] const&)
mov qword ptr [rsp+438h+var_400], rax; int
jmp short $+2
loc_49D36:
mov rdi, qword ptr [rsp+438h+var_400]
lea rsi, [rsp+438h+var_18]
call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&)
mov qword ptr [rsp+438h+var_408], rax; int
jmp short $+2
loc_49D4F:
mov rdi, qword ptr [rsp+438h+var_408]
lea rsi, aSMs+7; ")\n"
call _ZN7testing15AssertionResultlsIA3_cEERS0_RKT_; testing::AssertionResult::operator<<<char [3]>(char [3] const&)
mov [rsp+438h+var_410], rax; __int64
jmp short $+2
loc_49D67:
mov rdi, [rsp+438h+var_410]
lea rsi, aActual_0+1; " Actual: "
call _ZN7testing15AssertionResultlsIA11_cEERS0_RKT_; testing::AssertionResult::operator<<<char [11]>(char [11] const&)
mov qword ptr [rsp+438h+var_418], rax; int
jmp short $+2
loc_49D7F:
lea rdi, [rsp+438h+var_398]; int
lea rsi, [rsp+438h+var_1C0]; int
call _ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE; testing::internal::StringStreamToString(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> *)
jmp short $+2
loc_49D96:
mov rdi, qword ptr [rsp+438h+var_418]
lea rsi, [rsp+438h+var_398]
call _ZN7testing15AssertionResultlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS0_RKT_; testing::AssertionResult::operator<<<std::string>(std::string const&)
mov qword ptr [rsp+438h+var_420], rax; int
jmp short $+2
loc_49DAF:
mov rdi, qword ptr [rsp+438h+var_420]
lea rsi, aVs; " vs "
call _ZN7testing15AssertionResultlsIA5_cEERS0_RKT_; testing::AssertionResult::operator<<<char [5]>(char [5] const&)
mov [rsp+438h+var_428], rax; void *
jmp short $+2
loc_49DC7:
lea rdi, [rsp+438h+var_3B8]; int
lea rsi, [rsp+438h+var_360]; int
call _ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE; testing::internal::StringStreamToString(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> *)
jmp short $+2
loc_49DDE:
mov rdi, [rsp+438h+var_428]
lea rsi, [rsp+438h+var_3B8]
call _ZN7testing15AssertionResultlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS0_RKT_; testing::AssertionResult::operator<<<std::string>(std::string const&)
mov [rsp+438h+var_430], rax
jmp short $+2
loc_49DF7:
mov rsi, [rsp+438h+var_430]; testing::AssertionResult *
mov rdi, [rsp+438h+var_3C8]; this
call _ZN7testing15AssertionResultC2ERKS0_; testing::AssertionResult::AssertionResult(testing::AssertionResult const&)
jmp short $+2
loc_49E08:
lea rdi, [rsp+438h+var_3B8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+438h+var_398]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+438h+var_378]; this
call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult()
lea rdi, [rsp+438h+var_360]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+438h+var_1C0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
jmp loc_49F00
mov rcx, rax
mov eax, edx
mov [rsp+arg_260], rcx
mov [rsp+arg_25C], eax
jmp loc_49EF1
mov rcx, rax
mov eax, edx
mov [rsp+arg_260], rcx
mov [rsp+arg_25C], eax
jmp short loc_49EE4
mov rcx, rax
mov eax, edx
mov [rsp+arg_260], rcx
mov [rsp+arg_25C], eax
jmp short loc_49ED7
mov rcx, rax
mov eax, edx
mov [rsp+arg_260], rcx
mov [rsp+arg_25C], eax
jmp short loc_49ECA
mov rcx, rax
mov eax, edx
mov [rsp+arg_260], rcx
mov [rsp+arg_25C], eax
lea rdi, [rsp+arg_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_49ECA:
lea rdi, [rsp+arg_98]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_49ED7:
lea rdi, [rsp+arg_B8]; this
call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult()
loc_49EE4:
lea rdi, [rsp+arg_D0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
loc_49EF1:
lea rdi, [rsp+arg_270]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
jmp short loc_49F0D
loc_49F00:
mov rax, [rsp+438h+var_3C0]
add rsp, 438h
retn
loc_49F0D:
mov rdi, [rsp+arg_260]
call __Unwind_Resume
| testing * testing::internal::FloatingPointLE<double>(
testing *a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
double a7,
double a8)
{
long long v8; // rdx
long long v9; // rcx
long long v10; // r8
long long v11; // r9
long long v12; // rdx
long long v13; // rcx
long long v14; // r8
long long v15; // r9
int v16; // edx
int v17; // ecx
int v18; // r8d
int v19; // r9d
const testing::AssertionResult *v21; // [rsp+8h] [rbp-430h]
testing::AssertionResult *v22; // [rsp+10h] [rbp-428h]
testing::AssertionResult *v23; // [rsp+18h] [rbp-420h]
testing::AssertionResult *v24; // [rsp+20h] [rbp-418h]
unsigned int v25; // [rsp+28h] [rbp-410h]
testing::AssertionResult *v26; // [rsp+30h] [rbp-408h]
testing::AssertionResult *v27; // [rsp+38h] [rbp-400h]
testing::AssertionResult *v28; // [rsp+40h] [rbp-3F8h]
testing::AssertionResult *v29; // [rsp+48h] [rbp-3F0h]
long long v30; // [rsp+58h] [rbp-3E0h]
long long v31; // [rsp+68h] [rbp-3D0h]
_QWORD v32[4]; // [rsp+80h] [rbp-3B8h] BYREF
_QWORD v33[4]; // [rsp+A0h] [rbp-398h] BYREF
_BYTE v34[20]; // [rsp+C0h] [rbp-378h] BYREF
unsigned int v35; // [rsp+D4h] [rbp-364h]
int v36[4]; // [rsp+D8h] [rbp-360h] BYREF
_BYTE v37[396]; // [rsp+E8h] [rbp-350h] BYREF
unsigned int v38; // [rsp+274h] [rbp-1C4h]
int v39[4]; // [rsp+278h] [rbp-1C0h] BYREF
_BYTE v40[376]; // [rsp+288h] [rbp-1B0h] BYREF
_BYTE v41[8]; // [rsp+400h] [rbp-38h] BYREF
_BYTE v42[8]; // [rsp+408h] [rbp-30h] BYREF
double v43; // [rsp+410h] [rbp-28h] BYREF
double v44; // [rsp+418h] [rbp-20h] BYREF
long long v45; // [rsp+420h] [rbp-18h] BYREF
_QWORD v46[2]; // [rsp+428h] [rbp-10h] BYREF
v46[1] = a1;
v46[0] = a2;
v45 = a3;
v44 = a7;
v43 = a8;
if ( a8 <= a7 )
{
testing::internal::FloatingPoint<double>::FloatingPoint(v42, &v44);
testing::internal::FloatingPoint<double>::FloatingPoint(v41, &v43);
if ( (testing::internal::FloatingPoint<double>::AlmostEquals(v42, v41) & 1) != 0 )
{
testing::AssertionSuccess(a1, (long long)v41, v8, v9, v10, v11);
}
else
{
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v39);
v38 = std::setprecision(0x11u);
v31 = std::operator<<<char,std::char_traits<char>>(v40, v38);
std::ostream::operator<<(v31, v44);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v36);
v35 = std::setprecision(0x11u);
v30 = std::operator<<<char,std::char_traits<char>>(v37, v35);
std::ostream::operator<<(v30, v43);
testing::AssertionFailure((testing *)v34, v35, v12, v13, v14, v15);
v29 = testing::AssertionResult::operator<<<char [12]>((testing::AssertionResult *)v34, (long long)"Expected: (");
v28 = testing::AssertionResult::operator<<<char const*>(v29, (long long)v46);
v27 = testing::AssertionResult::operator<<<char [7]>(v28, (long long)") <= (");
v26 = testing::AssertionResult::operator<<<char const*>(v27, (long long)&v45);
v25 = (unsigned int)testing::AssertionResult::operator<<<char [3]>(v26, (long long)")\n");
v24 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [11]>(
v25,
(unsigned int)" Actual: ",
v16,
v17,
v18,
v19);
testing::internal::StringStreamToString(v33, (long long)v39);
v23 = testing::AssertionResult::operator<<<std::string>(v24, (long long)v33);
v22 = testing::AssertionResult::operator<<<char [5]>(v23, (long long)" vs ");
testing::internal::StringStreamToString(v32, (long long)v36);
v21 = testing::AssertionResult::operator<<<std::string>(v22, (long long)v32);
testing::AssertionResult::AssertionResult(a1, v21);
std::string::~string(v32);
std::string::~string(v33);
testing::AssertionResult::~AssertionResult((testing::AssertionResult *)v34);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v36);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v39);
}
}
else
{
testing::AssertionSuccess(a1, a2, a3, a4, a5, a6);
}
return a1;
}
| FloatingPointLE<double>:
SUB RSP,0x438
MOV qword ptr [RSP + 0x70],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x78],RAX
MOV qword ptr [RSP + 0x430],RDI
MOV qword ptr [RSP + 0x428],RSI
MOV qword ptr [RSP + 0x420],RDX
MOVSD qword ptr [RSP + 0x418],XMM0
MOVSD qword ptr [RSP + 0x410],XMM1
MOVSD XMM1,qword ptr [RSP + 0x418]
MOVSD XMM0,qword ptr [RSP + 0x410]
UCOMISD XMM0,XMM1
JBE 0x00149bd5
MOV RDI,qword ptr [RSP + 0x70]
CALL 0x00113220
JMP 0x00149f00
LAB_00149bd5:
LEA RDI,[RSP + 0x408]
LEA RSI,[RSP + 0x418]
CALL 0x00167970
LEA RDI,[RSP + 0x400]
LEA RSI,[RSP + 0x410]
CALL 0x00167970
LEA RDI,[RSP + 0x408]
LEA RSI,[RSP + 0x400]
CALL 0x00167990
TEST AL,0x1
JNZ 0x00149c1a
JMP 0x00149c29
LAB_00149c1a:
MOV RDI,qword ptr [RSP + 0x70]
CALL 0x00113220
JMP 0x00149f00
LAB_00149c29:
LEA RDI,[RSP + 0x278]
CALL 0x0010b300
LEA RAX,[RSP + 0x288]
MOV qword ptr [RSP + 0x60],RAX
MOV EDI,0x11
CALL 0x00148790
MOV RDI,qword ptr [RSP + 0x60]
MOV dword ptr [RSP + 0x274],EAX
MOV ESI,dword ptr [RSP + 0x274]
LAB_00149c60:
CALL 0x0010b860
MOV qword ptr [RSP + 0x68],RAX
JMP 0x00149c6c
LAB_00149c6c:
MOV RDI,qword ptr [RSP + 0x68]
MOVSD XMM0,qword ptr [RSP + 0x418]
CALL 0x0010ba10
JMP 0x00149c81
LAB_00149c81:
LEA RDI,[RSP + 0xd8]
CALL 0x0010b300
JMP 0x00149c90
LAB_00149c90:
LEA RAX,[RSP + 0xe8]
MOV qword ptr [RSP + 0x50],RAX
MOV EDI,0x11
CALL 0x00148790
MOV RDI,qword ptr [RSP + 0x50]
MOV dword ptr [RSP + 0xd4],EAX
MOV ESI,dword ptr [RSP + 0xd4]
LAB_00149cba:
CALL 0x0010b860
MOV qword ptr [RSP + 0x58],RAX
JMP 0x00149cc6
LAB_00149cc6:
MOV RDI,qword ptr [RSP + 0x58]
MOVSD XMM0,qword ptr [RSP + 0x410]
CALL 0x0010ba10
JMP 0x00149cdb
LAB_00149cdb:
LEA RDI,[RSP + 0xc0]
CALL 0x00113250
JMP 0x00149cea
LAB_00149cea:
LEA RSI,[0x172384]
LEA RDI,[RSP + 0xc0]
CALL 0x00111290
MOV qword ptr [RSP + 0x48],RAX
JMP 0x00149d05
LAB_00149d05:
MOV RDI,qword ptr [RSP + 0x48]
LEA RSI,[RSP + 0x428]
CALL 0x00111320
MOV qword ptr [RSP + 0x40],RAX
JMP 0x00149d1e
LAB_00149d1e:
MOV RDI,qword ptr [RSP + 0x40]
LEA RSI,[0x17670e]
CALL 0x001496a0
MOV qword ptr [RSP + 0x38],RAX
JMP 0x00149d36
LAB_00149d36:
MOV RDI,qword ptr [RSP + 0x38]
LEA RSI,[RSP + 0x420]
CALL 0x00111320
MOV qword ptr [RSP + 0x30],RAX
JMP 0x00149d4f
LAB_00149d4f:
MOV RDI,qword ptr [RSP + 0x30]
LEA RSI,[0x175201]
CALL 0x001113b0
MOV qword ptr [RSP + 0x28],RAX
JMP 0x00149d67
LAB_00149d67:
MOV RDI,qword ptr [RSP + 0x28]
LEA RSI,[0x174a9e]
CALL 0x00156450
MOV qword ptr [RSP + 0x20],RAX
JMP 0x00149d7f
LAB_00149d7f:
LEA RDI,[RSP + 0xa0]
LEA RSI,[RSP + 0x278]
CALL 0x00123260
JMP 0x00149d96
LAB_00149d96:
MOV RDI,qword ptr [RSP + 0x20]
LEA RSI,[RSP + 0xa0]
CALL 0x00111440
MOV qword ptr [RSP + 0x18],RAX
JMP 0x00149daf
LAB_00149daf:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[0x17239f]
CALL 0x00111500
MOV qword ptr [RSP + 0x10],RAX
JMP 0x00149dc7
LAB_00149dc7:
LEA RDI,[RSP + 0x80]
LEA RSI,[RSP + 0xd8]
CALL 0x00123260
JMP 0x00149dde
LAB_00149dde:
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[RSP + 0x80]
CALL 0x00111440
MOV qword ptr [RSP + 0x8],RAX
JMP 0x00149df7
LAB_00149df7:
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RSP + 0x70]
CALL 0x00113020
LAB_00149e06:
JMP 0x00149e08
LAB_00149e08:
LEA RDI,[RSP + 0x80]
CALL 0x0010ec60
LEA RDI,[RSP + 0xa0]
CALL 0x0010ec60
LEA RDI,[RSP + 0xc0]
CALL 0x0010ee60
LEA RDI,[RSP + 0xd8]
CALL 0x0010b360
LEA RDI,[RSP + 0x278]
CALL 0x0010b360
JMP 0x00149f00
LAB_00149f00:
MOV RAX,qword ptr [RSP + 0x78]
ADD RSP,0x438
RET
|
/* testing::AssertionResult testing::internal::FloatingPointLE<double>(char const*, char const*,
double, double) */
internal * __thiscall
testing::internal::FloatingPointLE<double>
(internal *this,char *param_1,char *param_2,double param_3,double param_4)
{
ulong uVar1;
ostream *poVar2;
AssertionResult *pAVar3;
internal local_3b8 [32];
internal local_398 [32];
testing local_378 [20];
int4 local_364;
stringstream local_360 [16];
int1 local_350 [396];
int4 local_1c4;
stringstream local_1c0 [16];
int1 local_1b0 [376];
FloatingPoint<double> local_38 [8];
FloatingPoint<double> local_30 [8];
double local_28;
double local_20;
char *local_18;
char *local_10;
internal *local_8;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
local_8 = this;
if (param_4 <= param_3) {
FloatingPoint<double>::FloatingPoint(local_30,&local_20);
FloatingPoint<double>::FloatingPoint(local_38,&local_28);
uVar1 = FloatingPoint<double>::AlmostEquals(local_30,(FloatingPoint *)local_38);
if ((uVar1 & 1) == 0) {
std::__cxx11::stringstream::stringstream(local_1c0);
local_1c4 = std::setprecision(0x11);
/* try { // try from 00149c60 to 00149c8d has its CatchHandler @ 00149e4e */
poVar2 = std::operator<<(local_1b0,local_1c4);
std::ostream::operator<<(poVar2,local_20);
std::__cxx11::stringstream::stringstream(local_360);
local_364 = std::setprecision(0x11);
/* try { // try from 00149cba to 00149ce7 has its CatchHandler @ 00149e67 */
poVar2 = std::operator<<(local_350,local_364);
std::ostream::operator<<(poVar2,local_28);
AssertionFailure(local_378);
/* try { // try from 00149cea to 00149d93 has its CatchHandler @ 00149e7d */
pAVar3 = AssertionResult::operator<<((AssertionResult *)local_378,"Expected: (");
pAVar3 = AssertionResult::operator<<(pAVar3,&local_10);
pAVar3 = AssertionResult::operator<<(pAVar3,") <= (");
pAVar3 = AssertionResult::operator<<(pAVar3,&local_18);
pAVar3 = AssertionResult::operator<<(pAVar3,")\n");
pAVar3 = AssertionResult::operator<<(pAVar3," Actual: ");
StringStreamToString(local_398,local_1c0);
/* try { // try from 00149d96 to 00149ddb has its CatchHandler @ 00149e93 */
pAVar3 = AssertionResult::operator<<(pAVar3,(string *)local_398);
pAVar3 = AssertionResult::operator<<(pAVar3," vs ");
StringStreamToString(local_3b8,local_360);
/* try { // try from 00149dde to 00149e05 has its CatchHandler @ 00149ea9 */
pAVar3 = AssertionResult::operator<<(pAVar3,(string *)local_3b8);
AssertionResult::AssertionResult((AssertionResult *)this,pAVar3);
std::__cxx11::string::~string((string *)local_3b8);
std::__cxx11::string::~string((string *)local_398);
AssertionResult::~AssertionResult((AssertionResult *)local_378);
std::__cxx11::stringstream::~stringstream(local_360);
std::__cxx11::stringstream::~stringstream(local_1c0);
}
else {
AssertionSuccess((testing *)this);
}
}
else {
AssertionSuccess((testing *)this);
}
return this;
}
| |
54,658 | fill_buffer | eloqsql/storage/myisam/mi_packrec.c | static void fill_buffer(MI_BIT_BUFF *bit_buff)
{
if (bit_buff->pos >= bit_buff->end)
{
bit_buff->error= 1;
bit_buff->current_byte=0;
return;
}
#if BITS_SAVED == 64
bit_buff->current_byte= ((((uint) ((uchar) bit_buff->pos[7]))) |
(((uint) ((uchar) bit_buff->pos[6])) << 8) |
(((uint) ((uchar) bit_buff->pos[5])) << 16) |
(((uint) ((uchar) bit_buff->pos[4])) << 24) |
((ulonglong)
((((uint) ((uchar) bit_buff->pos[3]))) |
(((uint) ((uchar) bit_buff->pos[2])) << 8) |
(((uint) ((uchar) bit_buff->pos[1])) << 16) |
(((uint) ((uchar) bit_buff->pos[0])) << 24)) << 32));
bit_buff->pos+=8;
#else
#if BITS_SAVED == 32
bit_buff->current_byte= (((uint) ((uchar) bit_buff->pos[3])) |
(((uint) ((uchar) bit_buff->pos[2])) << 8) |
(((uint) ((uchar) bit_buff->pos[1])) << 16) |
(((uint) ((uchar) bit_buff->pos[0])) << 24));
bit_buff->pos+=4;
#else
bit_buff->current_byte= (uint) (((uint) ((uchar) bit_buff->pos[1])) |
(((uint) ((uchar) bit_buff->pos[0])) << 8));
bit_buff->pos+=2;
#endif
#endif
} | O0 | c | fill_buffer:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jb 0xbd001
movq -0x8(%rbp), %rax
movl $0x1, 0x28(%rax)
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
jmp 0xbd055
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movzbl 0x3(%rax), %ecx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movzbl 0x2(%rax), %eax
shll $0x8, %eax
orl %eax, %ecx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movzbl 0x1(%rax), %eax
shll $0x10, %eax
orl %eax, %ecx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movzbl (%rax), %eax
shll $0x18, %eax
orl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x4, %rcx
movq %rcx, 0x8(%rax)
popq %rbp
retq
nopw (%rax,%rax)
| fill_buffer_0:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov rcx, [rbp+var_8]
cmp rax, [rcx+10h]
jb short loc_BD001
mov rax, [rbp+var_8]
mov dword ptr [rax+28h], 1
mov rax, [rbp+var_8]
mov dword ptr [rax], 0
jmp short loc_BD055
loc_BD001:
mov rax, [rbp+var_8]
mov rax, [rax+8]
movzx ecx, byte ptr [rax+3]
mov rax, [rbp+var_8]
mov rax, [rax+8]
movzx eax, byte ptr [rax+2]
shl eax, 8
or ecx, eax
mov rax, [rbp+var_8]
mov rax, [rax+8]
movzx eax, byte ptr [rax+1]
shl eax, 10h
or ecx, eax
mov rax, [rbp+var_8]
mov rax, [rax+8]
movzx eax, byte ptr [rax]
shl eax, 18h
or ecx, eax
mov rax, [rbp+var_8]
mov [rax], ecx
mov rax, [rbp+var_8]
mov rcx, [rax+8]
add rcx, 4
mov [rax+8], rcx
loc_BD055:
pop rbp
retn
| long long fill_buffer_0(long long a1)
{
long long result; // rax
if ( *(_QWORD *)(a1 + 8) < *(_QWORD *)(a1 + 16) )
{
*(_DWORD *)a1 = _byteswap_ulong(**(_DWORD **)(a1 + 8));
result = a1;
*(_QWORD *)(a1 + 8) += 4LL;
}
else
{
*(_DWORD *)(a1 + 40) = 1;
result = a1;
*(_DWORD *)a1 = 0;
}
return result;
}
| fill_buffer:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x10]
JC 0x001bd001
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x28],0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX],0x0
JMP 0x001bd055
LAB_001bd001:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOVZX ECX,byte ptr [RAX + 0x3]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOVZX EAX,byte ptr [RAX + 0x2]
SHL EAX,0x8
OR ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOVZX EAX,byte ptr [RAX + 0x1]
SHL EAX,0x10
OR ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOVZX EAX,byte ptr [RAX]
SHL EAX,0x18
OR ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x8]
ADD RCX,0x4
MOV qword ptr [RAX + 0x8],RCX
LAB_001bd055:
POP RBP
RET
|
void fill_buffer(int4 *param_1)
{
if (*(ulong *)(param_1 + 2) < *(ulong *)(param_1 + 4)) {
*param_1 = CONCAT13(**(int1 **)(param_1 + 2),
CONCAT12(*(int1 *)(*(long *)(param_1 + 2) + 1),
CONCAT11(*(int1 *)(*(long *)(param_1 + 2) + 2),
*(int1 *)(*(long *)(param_1 + 2) + 3))));
*(long *)(param_1 + 2) = *(long *)(param_1 + 2) + 4;
}
else {
param_1[10] = 1;
*param_1 = 0;
}
return;
}
| |
54,659 | arena_destroy | eshkol/src/core/memory/arena.c | void arena_destroy(Arena* arena) {
assert(arena != NULL);
// Free all blocks
Block* block = arena->first;
while (block) {
Block* next = block->next;
free(block);
block = next;
}
// Free arena control structure
free(arena);
} | O3 | c | arena_destroy:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x1d2b
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x1d1f
movq (%rdi), %r14
callq 0x1030
movq %r14, %rdi
testq %r14, %r14
jne 0x1d0f
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1030
leaq 0xc2de(%rip), %rdi # 0xe010
leaq 0xc51e(%rip), %rsi # 0xe257
leaq 0xc624(%rip), %rcx # 0xe364
movl $0xba, %edx
callq 0x1130
| arena_destroy:
push rbp
mov rbp, rsp
push r14
push rbx
test rdi, rdi
jz short loc_1D2B
mov rbx, rdi
mov rdi, [rdi+8]
test rdi, rdi
jz short loc_1D1F
loc_1D0F:
mov r14, [rdi]
call _free
mov rdi, r14
test r14, r14
jnz short loc_1D0F
loc_1D1F:
mov rdi, rbx
pop rbx
pop r14
pop rbp
jmp _free
loc_1D2B:
lea rdi, aArenaNull; "arena != NULL"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eshkol"...
lea rcx, aVoidArenaDestr; "void arena_destroy(Arena *)"
mov edx, 0BAh
call ___assert_fail
| long long arena_destroy(long long a1)
{
_QWORD *v2; // rdi
_QWORD *v3; // r14
if ( !a1 )
__assert_fail(
"arena != NULL",
"/workspace/llm4binary/github2025/eshkol/src/core/memory/arena.c",
186LL,
"void arena_destroy(Arena *)");
v2 = *(_QWORD **)(a1 + 8);
if ( v2 )
{
do
{
v3 = (_QWORD *)*v2;
free(v2);
v2 = v3;
}
while ( v3 );
}
return free(a1);
}
| arena_destroy:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
TEST RDI,RDI
JZ 0x00101d2b
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x8]
TEST RDI,RDI
JZ 0x00101d1f
LAB_00101d0f:
MOV R14,qword ptr [RDI]
CALL 0x00101030
MOV RDI,R14
TEST R14,R14
JNZ 0x00101d0f
LAB_00101d1f:
MOV RDI,RBX
POP RBX
POP R14
POP RBP
JMP 0x00101030
LAB_00101d2b:
LEA RDI,[0x10e010]
LEA RSI,[0x10e257]
LEA RCX,[0x10e364]
MOV EDX,0xba
CALL 0x00101130
|
void arena_destroy(void *param_1)
{
int8 *puVar1;
int8 *__ptr;
if (param_1 == (void *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("arena != NULL","/workspace/llm4binary/github2025/eshkol/src/core/memory/arena.c",
0xba,"void arena_destroy(Arena *)");
}
__ptr = *(int8 **)((long)param_1 + 8);
while (__ptr != (int8 *)0x0) {
puVar1 = (int8 *)*__ptr;
free(__ptr);
__ptr = puVar1;
}
free(param_1);
return;
}
| |
54,660 | PVG_FT_Vector_Polarize | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-ft-math.c | void PVG_FT_Vector_Polarize(PVG_FT_Vector* vec, PVG_FT_Fixed* length,
PVG_FT_Angle* angle)
{
PVG_FT_Int shift;
PVG_FT_Vector v;
v = *vec;
if (v.x == 0 && v.y == 0) return;
shift = ft_trig_prenorm(&v);
ft_trig_pseudo_polarize(&v);
v.x = ft_trig_downscale(v.x);
*length = (shift >= 0) ? (v.x >> shift)
: (PVG_FT_Fixed)((PVG_FT_UInt32)v.x << -shift);
*angle = v.y;
} | O1 | c | PVG_FT_Vector_Polarize:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movups (%rdi), %xmm0
movaps %xmm0, (%rsp)
movq (%rsp), %rdx
movq 0x8(%rsp), %rax
movq %rdx, %rcx
orq %rax, %rcx
je 0x427f7
movq %rsi, %r14
movq %rdx, %rcx
negq %rcx
cmovsq %rdx, %rcx
movq %rax, %rsi
negq %rsi
cmovsq %rax, %rsi
orl %ecx, %esi
bsrl %esi, %esi
cmpl $0x1d, %esi
ja 0x42783
movl $0x1d, %ebp
subl %esi, %ebp
movl %ebp, %ecx
shlq %cl, %rdx
movq %rdx, (%rsp)
shlq %cl, %rax
jmp 0x42798
xorl $0x1f, %esi
leal -0x2(%rsi), %ebp
movb $0x2, %cl
subb %sil, %cl
sarq %cl, %rdx
movq %rdx, (%rsp)
sarq %cl, %rax
movq %rsp, %r15
movq %rax, 0x8(%r15)
movq %r15, %rdi
callq 0x423f2
movq (%r15), %rax
movq %rax, %rcx
negq %rcx
cmovsq %rax, %rcx
movl $0xdbd95b16, %edx # imm = 0xDBD95B16
imulq %rdx, %rcx
addq %rdx, %rcx
addq $0x2426a4ea, %rcx # imm = 0x2426A4EA
sarq $0x20, %rcx
movq %rcx, %rdx
negq %rdx
testq %rax, %rax
cmovnsq %rcx, %rdx
movq %rdx, %rax
movl %ebp, %ecx
sarq %cl, %rax
movq %rdx, (%r15)
negb %cl
shll %cl, %edx
testl %ebp, %ebp
cmovnsq %rax, %rdx
movq %rdx, (%r14)
movq 0x8(%r15), %rax
movq %rax, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| PVG_FT_Vector_Polarize:
push rbp
push r15
push r14
push rbx
sub rsp, 18h
mov rbx, rdx
movups xmm0, xmmword ptr [rdi]
movaps [rsp+38h+var_38], xmm0
mov rdx, qword ptr [rsp+38h+var_38]
mov rax, qword ptr [rsp+38h+var_38+8]
mov rcx, rdx
or rcx, rax
jz loc_427F7
mov r14, rsi
mov rcx, rdx
neg rcx
cmovs rcx, rdx
mov rsi, rax
neg rsi
cmovs rsi, rax
or esi, ecx
bsr esi, esi
cmp esi, 1Dh
ja short loc_42783
mov ebp, 1Dh
sub ebp, esi
mov ecx, ebp
shl rdx, cl
mov qword ptr [rsp+38h+var_38], rdx
shl rax, cl
jmp short loc_42798
loc_42783:
xor esi, 1Fh
lea ebp, [rsi-2]
mov cl, 2
sub cl, sil
sar rdx, cl
mov qword ptr [rsp+38h+var_38], rdx
sar rax, cl
loc_42798:
mov r15, rsp
mov [r15+8], rax
mov rdi, r15
call ft_trig_pseudo_polarize
mov rax, [r15]
mov rcx, rax
neg rcx
cmovs rcx, rax
mov edx, 0DBD95B16h
imul rcx, rdx
add rcx, rdx
add rcx, 2426A4EAh
sar rcx, 20h
mov rdx, rcx
neg rdx
test rax, rax
cmovns rdx, rcx
mov rax, rdx
mov ecx, ebp
sar rax, cl
mov [r15], rdx
neg cl
shl edx, cl
test ebp, ebp
cmovns rdx, rax
mov [r14], rdx
mov rax, [r15+8]
mov [rbx], rax
loc_427F7:
add rsp, 18h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long PVG_FT_Vector_Polarize(__int128 *a1, long long *a2, _QWORD *a3)
{
long long result; // rax
long long v6; // rcx
long long v7; // rsi
int v8; // ebp
long long v9; // rax
int v10; // esi
long long v11; // rcx
long long v12; // rcx
long long v13; // rdx
long long v14; // rax
long long v15; // rdx
__int128 v16; // [rsp+0h] [rbp-38h] BYREF
v16 = *a1;
result = *((_QWORD *)&v16 + 1);
if ( v16 != 0 )
{
v6 = -(long long)v16;
if ( (long long)v16 > 0 )
LODWORD(v6) = v16;
v7 = -*((_QWORD *)&v16 + 1);
if ( *((long long *)&v16 + 1) > 0 )
LODWORD(v7) = DWORD2(v16);
_BitScanReverse((unsigned int *)&v7, v6 | v7);
if ( (unsigned int)v7 > 0x1D )
{
v10 = v7 ^ 0x1F;
v8 = v10 - 2;
*(_QWORD *)&v16 = (long long)v16 >> (2 - (unsigned __int8)v10);
v9 = *((long long *)&v16 + 1) >> (2 - (unsigned __int8)v10);
}
else
{
v8 = 29 - v7;
*(_QWORD *)&v16 = (_QWORD)v16 << (29 - (unsigned __int8)v7);
v9 = *((_QWORD *)&v16 + 1) << (29 - (unsigned __int8)v7);
}
*((_QWORD *)&v16 + 1) = v9;
ft_trig_pseudo_polarize((long long *)&v16);
v11 = -(long long)v16;
if ( (long long)v16 > 0 )
v11 = v16;
v12 = (3688454934LL * v11 + 0x100000000LL) >> 32;
v13 = -v12;
if ( (long long)v16 >= 0 )
v13 = v12;
v14 = v13 >> v8;
*(_QWORD *)&v16 = v13;
v15 = (unsigned int)((_DWORD)v13 << -(char)v8);
if ( v8 >= 0 )
v15 = v14;
*a2 = v15;
result = *((_QWORD *)&v16 + 1);
*a3 = *((_QWORD *)&v16 + 1);
}
return result;
}
| PVG_FT_Vector_Polarize:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDX
MOVUPS XMM0,xmmword ptr [RDI]
MOVAPS xmmword ptr [RSP],XMM0
MOV RDX,qword ptr [RSP]
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,RDX
OR RCX,RAX
JZ 0x001427f7
MOV R14,RSI
MOV RCX,RDX
NEG RCX
CMOVS RCX,RDX
MOV RSI,RAX
NEG RSI
CMOVS RSI,RAX
OR ESI,ECX
BSR ESI,ESI
CMP ESI,0x1d
JA 0x00142783
MOV EBP,0x1d
SUB EBP,ESI
MOV ECX,EBP
SHL RDX,CL
MOV qword ptr [RSP],RDX
SHL RAX,CL
JMP 0x00142798
LAB_00142783:
XOR ESI,0x1f
LEA EBP,[RSI + -0x2]
MOV CL,0x2
SUB CL,SIL
SAR RDX,CL
MOV qword ptr [RSP],RDX
SAR RAX,CL
LAB_00142798:
MOV R15,RSP
MOV qword ptr [R15 + 0x8],RAX
MOV RDI,R15
CALL 0x001423f2
MOV RAX,qword ptr [R15]
MOV RCX,RAX
NEG RCX
CMOVS RCX,RAX
MOV EDX,0xdbd95b16
IMUL RCX,RDX
ADD RCX,RDX
ADD RCX,0x2426a4ea
SAR RCX,0x20
MOV RDX,RCX
NEG RDX
TEST RAX,RAX
CMOVNS RDX,RCX
MOV RAX,RDX
MOV ECX,EBP
SAR RAX,CL
MOV qword ptr [R15],RDX
NEG CL
SHL EDX,CL
TEST EBP,EBP
CMOVNS RDX,RAX
MOV qword ptr [R14],RDX
MOV RAX,qword ptr [R15 + 0x8]
MOV qword ptr [RBX],RAX
LAB_001427f7:
ADD RSP,0x18
POP RBX
POP R14
POP R15
POP RBP
RET
|
void PVG_FT_Vector_Polarize(long *param_1,ulong *param_2,long *param_3)
{
uint uVar1;
byte bVar2;
long lVar3;
long lVar4;
ulong uVar5;
int iVar6;
uint uVar7;
long local_38;
long lStack_30;
local_38 = *param_1;
lStack_30 = param_1[1];
if (local_38 != 0 || lStack_30 != 0) {
lVar3 = -local_38;
if (0 < local_38) {
lVar3 = local_38;
}
lVar4 = -lStack_30;
if (0 < lStack_30) {
lVar4 = lStack_30;
}
uVar7 = (uint)lVar4 | (uint)lVar3;
uVar1 = 0x1f;
if (uVar7 != 0) {
for (; uVar7 >> uVar1 == 0; uVar1 = uVar1 - 1) {
}
}
if (uVar1 < 0x1e) {
iVar6 = 0x1d - uVar1;
local_38 = local_38 << ((byte)iVar6 & 0x3f);
lStack_30 = lStack_30 << ((byte)iVar6 & 0x3f);
}
else {
iVar6 = (uVar1 ^ 0x1f) - 2;
bVar2 = 2 - (char)(uVar1 ^ 0x1f);
local_38 = local_38 >> (bVar2 & 0x3f);
lStack_30 = lStack_30 >> (bVar2 & 0x3f);
}
ft_trig_pseudo_polarize(&local_38);
lVar3 = -local_38;
if (0 < local_38) {
lVar3 = local_38;
}
lVar4 = lVar3 * 0xdbd95b16 + 0x100000000 >> 0x20;
lVar3 = -lVar4;
if (-1 < local_38) {
lVar3 = lVar4;
}
uVar5 = (ulong)(uint)((int)lVar3 << (-(byte)iVar6 & 0x1f));
if (-1 < iVar6) {
uVar5 = lVar3 >> ((byte)iVar6 & 0x3f);
}
*param_2 = uVar5;
*param_3 = lStack_30;
}
return;
}
| |
54,661 | Config::Layer::Set(Config::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) | Dolphin-anty/Source/Core/Common/Config/Layer.h | bool Set(const Location& location, std::string new_value)
{
const auto iter = m_map.find(location);
if (iter != m_map.end() && iter->second == new_value)
return false;
m_is_dirty = true;
m_map.insert_or_assign(location, std::move(new_value));
return true;
} | O3 | c | Config::Layer::Set(Config::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
leaq 0x10(%rdi), %r15
movq %r15, %rdi
callq 0xde62
leaq 0x18(%r12), %rcx
cmpq %rcx, %rax
je 0xdd66
addq $0x68, %rax
movq %rax, %rdi
movq %rbx, %rsi
callq 0xdd88
testb %al, %al
je 0xdd66
xorl %eax, %eax
jmp 0xdd7c
movb $0x1, 0x8(%r12)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xddba
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| _ZN6Config5Layer3SetERKNS_8LocationENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdx
mov r14, rsi
mov r12, rdi
lea r15, [rdi+10h]
mov rdi, r15
call _ZNSt8_Rb_treeIN6Config8LocationESt4pairIKS1_St8optionalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESt10_Select1stISC_ESt4lessIS1_ESaISC_EE4findERS3_; std::_Rb_tree<Config::Location,std::pair<Config::Location const,std::optional<std::string>>,std::_Select1st<std::pair<Config::Location const,std::optional<std::string>>>,std::less<Config::Location>,std::allocator<std::pair<Config::Location const,std::optional<std::string>>>>::find(Config::Location const&)
lea rcx, [r12+18h]
cmp rax, rcx
jz short loc_DD66
add rax, 68h ; 'h'
mov rdi, rax
mov rsi, rbx
call _ZSteqINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ENSt9enable_ifIXsr14is_convertibleIDTeqclsr3stdE7declvalIRKT_EEclsr3stdE7declvalIRKT0_EEEbEE5valueEbE4typeERKSt8optionalIS7_ESC_
test al, al
jz short loc_DD66
xor eax, eax
jmp short loc_DD7C
loc_DD66:
mov byte ptr [r12+8], 1
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call _ZNSt3mapIN6Config8LocationESt8optionalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4lessIS1_ESaISt4pairIKS1_S9_EEE16insert_or_assignIS8_EESC_ISt17_Rb_tree_iteratorISE_EbERSD_OT_; std::map<Config::Location,std::optional<std::string>>::insert_or_assign<std::string>(Config::Location const&,std::string &&)
mov al, 1
loc_DD7C:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| char Config::Layer::Set(long long a1, long long a2, long long a3)
{
long long v4; // rax
v4 = std::_Rb_tree<Config::Location,std::pair<Config::Location const,std::optional<std::string>>,std::_Select1st<std::pair<Config::Location const,std::optional<std::string>>>,std::less<Config::Location>,std::allocator<std::pair<Config::Location const,std::optional<std::string>>>>::find(a1 + 16);
if ( v4 != a1 + 24 && (unsigned __int8)std::operator==<std::string,std::string>(v4 + 104, a3) )
return 0;
*(_BYTE *)(a1 + 8) = 1;
std::map<Config::Location,std::optional<std::string>>::insert_or_assign<std::string>(a1 + 16, a2, a3);
return 1;
}
| Set:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RSI
MOV R12,RDI
LEA R15,[RDI + 0x10]
MOV RDI,R15
CALL 0x0010de62
LEA RCX,[R12 + 0x18]
CMP RAX,RCX
JZ 0x0010dd66
ADD RAX,0x68
MOV RDI,RAX
MOV RSI,RBX
CALL 0x0010dd88
TEST AL,AL
JZ 0x0010dd66
XOR EAX,EAX
JMP 0x0010dd7c
LAB_0010dd66:
MOV byte ptr [R12 + 0x8],0x1
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x0010ddba
MOV AL,0x1
LAB_0010dd7c:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* Config::Layer::Set(Config::Location const&, std::__cxx11::string) */
int8 __thiscall Config::Layer::Set(Layer *this,Location *param_1,string *param_3)
{
char cVar1;
Layer *pLVar2;
pLVar2 = (Layer *)std::
_Rb_tree<Config::Location,std::pair<Config::Location_const,std::optional<std::__cxx11::string>>,std::_Select1st<std::pair<Config::Location_const,std::optional<std::__cxx11::string>>>,std::less<Config::Location>,std::allocator<std::pair<Config::Location_const,std::optional<std::__cxx11::string>>>>
::find((_Rb_tree<Config::Location,std::pair<Config::Location_const,std::optional<std::__cxx11::string>>,std::_Select1st<std::pair<Config::Location_const,std::optional<std::__cxx11::string>>>,std::less<Config::Location>,std::allocator<std::pair<Config::Location_const,std::optional<std::__cxx11::string>>>>
*)(this + 0x10),param_1);
if ((pLVar2 != this + 0x18) &&
(cVar1 = std::operator==((optional *)(pLVar2 + 0x68),param_3), cVar1 != '\0')) {
return 0;
}
this[8] = (Layer)0x1;
std::
map<Config::Location,std::optional<std::__cxx11::string>,std::less<Config::Location>,std::allocator<std::pair<Config::Location_const,std::optional<std::__cxx11::string>>>>
::insert_or_assign<std::__cxx11::string>
((map<Config::Location,std::optional<std::__cxx11::string>,std::less<Config::Location>,std::allocator<std::pair<Config::Location_const,std::optional<std::__cxx11::string>>>>
*)(this + 0x10),param_1,param_3);
return 1;
}
| |
54,662 | getopt_ll_limit_value | eloqsql/mysys/my_getopt.c | longlong getopt_ll_limit_value(longlong num, const struct my_option *optp,
my_bool *fix)
{
longlong old= num;
my_bool adjusted= FALSE;
char buf1[255], buf2[255];
ulonglong block_size= (optp->block_size ? (ulonglong) optp->block_size : 1L);
DBUG_ENTER("getopt_ll_limit_value");
if (num > 0 && ((ulonglong) num > (ulonglong) optp->max_value) &&
optp->max_value) /* if max value is not set -> no upper limit */
{
num= (ulonglong) optp->max_value;
adjusted= TRUE;
}
switch ((optp->var_type & GET_TYPE_MASK)) {
case GET_INT:
if (num > (longlong) INT_MAX)
{
num= ((longlong) INT_MAX);
adjusted= TRUE;
}
break;
case GET_LONG:
#if SIZEOF_LONG < SIZEOF_LONG_LONG
if (num > (longlong) LONG_MAX)
{
num= ((longlong) LONG_MAX);
adjusted= TRUE;
}
#endif
break;
default:
DBUG_ASSERT((optp->var_type & GET_TYPE_MASK) == GET_LL);
break;
}
num= (num / block_size);
num= (longlong) (num * block_size);
if (num < optp->min_value)
{
num= optp->min_value;
if (old < optp->min_value)
adjusted= TRUE;
}
if (fix)
*fix= old != num;
else if (adjusted)
my_getopt_error_reporter(WARNING_LEVEL,
"option '%s': signed value %s adjusted to %s",
optp->name, llstr(old, buf1), llstr(num, buf2));
DBUG_RETURN(num);
} | O3 | c | getopt_ll_limit_value:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x210, %rsp # imm = 0x210
movq %rdx, %rcx
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
movq 0x60(%rsi), %r10
cmpq $0x1, %r10
adcq $0x0, %r10
testq %rdi, %rdi
jle 0x5dd6c
movq 0x50(%rsi), %rax
cmpq %rdi, %rax
setae %dl
testq %rax, %rax
sete %r9b
orb %dl, %r9b
cmovneq %rdi, %rax
jmp 0x5dd72
movb $0x1, %r9b
movq %rdi, %rax
movl 0x30(%rsi), %edx
andl $0x3f, %edx
cmpl $0x3, %edx
setne %dl
movl $0x80000000, %r8d # imm = 0x80000000
cmpq %r8, %rax
setl %r11b
orb %dl, %r11b
movl $0x7fffffff, %r8d # imm = 0x7FFFFFFF
cmovneq %rax, %r8
movq %r8, %rax
xorl %edx, %edx
divq %r10
subq %rdx, %r8
movq 0x48(%rsi), %rax
cmpq %rax, %r8
movq %rax, %rbx
cmovgq %r8, %rbx
testq %rcx, %rcx
je 0x5ddbe
cmpq %rdi, %rbx
setne (%rcx)
jmp 0x5de19
cmpq %rax, %r8
setge %cl
cmpq %rdi, %rax
setle %al
orb %cl, %al
andb %r11b, %al
testb %r9b, %al
jne 0x5de19
leaq 0x2dade5(%rip), %rax # 0x338bc0
movq (%rax), %r12
movq (%rsi), %r14
leaq -0x130(%rbp), %rsi
callq 0x949e0
movq %rax, %r15
leaq -0x230(%rbp), %rsi
movq %rbx, %rdi
callq 0x949e0
leaq 0x3cecf(%rip), %rsi # 0x9acd5
movl $0x1, %edi
movq %r14, %rdx
movq %r15, %rcx
movq %rax, %r8
xorl %eax, %eax
callq *%r12
movq %fs:0x28, %rax
cmpq -0x28(%rbp), %rax
jne 0x5de3b
movq %rbx, %rax
addq $0x210, %rsp # imm = 0x210
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x28470
| getopt_ll_limit_value:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 210h
mov rcx, rdx
mov rax, fs:28h
mov [rbp+var_28], rax
mov r10, [rsi+60h]
cmp r10, 1
adc r10, 0
test rdi, rdi
jle short loc_5DD6C
mov rax, [rsi+50h]
cmp rax, rdi
setnb dl
test rax, rax
setz r9b
or r9b, dl
cmovnz rax, rdi
jmp short loc_5DD72
loc_5DD6C:
mov r9b, 1
mov rax, rdi
loc_5DD72:
mov edx, [rsi+30h]
and edx, 3Fh
cmp edx, 3
setnz dl
mov r8d, 80000000h
cmp rax, r8
setl r11b
or r11b, dl
mov r8d, 7FFFFFFFh
cmovnz r8, rax
mov rax, r8
xor edx, edx
div r10
sub r8, rdx
mov rax, [rsi+48h]
cmp r8, rax
mov rbx, rax
cmovg rbx, r8
test rcx, rcx
jz short loc_5DDBE
cmp rbx, rdi
setnz byte ptr [rcx]
jmp short loc_5DE19
loc_5DDBE:
cmp r8, rax
setnl cl
cmp rax, rdi
setle al
or al, cl
and al, r11b
test al, r9b
jnz short loc_5DE19
lea rax, my_getopt_error_reporter
mov r12, [rax]
mov r14, [rsi]
lea rsi, [rbp+var_130]
call llstr
mov r15, rax
lea rsi, [rbp+var_230]
mov rdi, rbx
call llstr
lea rsi, aOptionSSignedV; "option '%s': signed value %s adjusted t"...
mov edi, 1
mov rdx, r14
mov rcx, r15
mov r8, rax
xor eax, eax
call r12
loc_5DE19:
mov rax, fs:28h
cmp rax, [rbp+var_28]
jnz short loc_5DE3B
mov rax, rbx
add rsp, 210h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_5DE3B:
call ___stack_chk_fail
| long long getopt_ll_limit_value(long long a1, long long a2, bool *a3)
{
long long v3; // rax
bool v4; // r9
bool v5; // r11
unsigned long long v6; // r8
signed long long v7; // r8
long long v8; // rax
long long v9; // rbx
long long (*v10)(int, const char *, ...); // r12
const char *v11; // r14
const char *v12; // r15
const char *v13; // rax
char v15[256]; // [rsp+0h] [rbp-230h] BYREF
char v16[264]; // [rsp+100h] [rbp-130h] BYREF
unsigned long long v17; // [rsp+208h] [rbp-28h]
v17 = __readfsqword(0x28u);
if ( a1 <= 0 )
{
v4 = 1;
v3 = a1;
}
else
{
v3 = *(_QWORD *)(a2 + 80);
v4 = v3 >= (unsigned long long)a1 || v3 == 0;
if ( v4 )
v3 = a1;
}
v5 = (*(_DWORD *)(a2 + 48) & 0x3F) != 3 || v3 < 0x80000000LL;
v6 = 0x7FFFFFFFLL;
if ( v5 )
v6 = v3;
v7 = v6 - v6 % ((unsigned long long)(*(_QWORD *)(a2 + 96) == 0LL) + *(_QWORD *)(a2 + 96));
v8 = *(_QWORD *)(a2 + 72);
v9 = v8;
if ( v7 > v8 )
v9 = v7;
if ( a3 )
{
*a3 = v9 != a1;
}
else if ( !v4 || !v5 || v7 < v8 && v8 > a1 )
{
v10 = my_getopt_error_reporter;
v11 = *(const char **)a2;
v12 = (const char *)llstr(a1, v16);
v13 = (const char *)llstr(v9, v15);
v10(1, "option '%s': signed value %s adjusted to %s", v11, v12, v13);
}
return v9;
}
| getopt_ll_limit_value:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x210
MOV RCX,RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV R10,qword ptr [RSI + 0x60]
CMP R10,0x1
ADC R10,0x0
TEST RDI,RDI
JLE 0x0015dd6c
MOV RAX,qword ptr [RSI + 0x50]
CMP RAX,RDI
SETNC DL
TEST RAX,RAX
SETZ R9B
OR R9B,DL
CMOVNZ RAX,RDI
JMP 0x0015dd72
LAB_0015dd6c:
MOV R9B,0x1
MOV RAX,RDI
LAB_0015dd72:
MOV EDX,dword ptr [RSI + 0x30]
AND EDX,0x3f
CMP EDX,0x3
SETNZ DL
MOV R8D,0x80000000
CMP RAX,R8
SETL R11B
OR R11B,DL
MOV R8D,0x7fffffff
CMOVNZ R8,RAX
MOV RAX,R8
XOR EDX,EDX
DIV R10
SUB R8,RDX
MOV RAX,qword ptr [RSI + 0x48]
CMP R8,RAX
MOV RBX,RAX
CMOVG RBX,R8
TEST RCX,RCX
JZ 0x0015ddbe
CMP RBX,RDI
SETNZ byte ptr [RCX]
JMP 0x0015de19
LAB_0015ddbe:
CMP R8,RAX
SETGE CL
CMP RAX,RDI
SETLE AL
OR AL,CL
AND AL,R11B
TEST AL,R9B
JNZ 0x0015de19
LEA RAX,[0x438bc0]
MOV R12,qword ptr [RAX]
MOV R14,qword ptr [RSI]
LEA RSI,[RBP + -0x130]
CALL 0x001949e0
MOV R15,RAX
LEA RSI,[RBP + -0x230]
MOV RDI,RBX
CALL 0x001949e0
LEA RSI,[0x19acd5]
MOV EDI,0x1
MOV RDX,R14
MOV RCX,R15
MOV R8,RAX
XOR EAX,EAX
CALL R12
LAB_0015de19:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x0015de3b
MOV RAX,RBX
ADD RSP,0x210
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0015de3b:
CALL 0x00128470
|
ulong getopt_ll_limit_value(ulong param_1,int8 *param_2,long param_3)
{
ulong uVar1;
int8 uVar2;
int *puVar3;
ulong uVar4;
int8 uVar5;
int8 uVar6;
ulong uVar7;
ulong uVar8;
bool bVar9;
long in_FS_OFFSET;
bool bVar10;
int1 local_238 [256];
int1 local_138 [264];
long local_30;
puVar3 = my_getopt_error_reporter;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
if ((long)param_1 < 1) {
bVar9 = true;
uVar4 = param_1;
}
else {
uVar4 = param_2[10];
bVar9 = uVar4 == 0 || param_1 <= uVar4;
if (uVar4 == 0 || param_1 <= uVar4) {
uVar4 = param_1;
}
}
bVar10 = (*(uint *)(param_2 + 6) & 0x3f) != 3;
uVar8 = 0x7fffffff;
if ((long)uVar4 < 0x80000000 || bVar10) {
uVar8 = uVar4;
}
uVar8 = uVar8 - uVar8 % (param_2[0xc] + (ulong)(param_2[0xc] == 0));
uVar1 = param_2[9];
uVar7 = uVar1;
if ((long)uVar1 < (long)uVar8) {
uVar7 = uVar8;
}
if (param_3 == 0) {
if (!(bool)((((long)uVar1 <= (long)param_1 || (long)uVar1 <= (long)uVar8) &&
((long)uVar4 < 0x80000000 || bVar10)) & bVar9)) {
uVar2 = *param_2;
uVar5 = llstr(param_1,local_138);
uVar6 = llstr(uVar7,local_238);
(*(code *)puVar3)(1,"option \'%s\': signed value %s adjusted to %s",uVar2,uVar5,uVar6);
}
}
else {
*(bool *)param_3 = uVar7 != param_1;
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_30) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar7;
}
| |
54,663 | wqueue_link_into_queue | eloqsql/mysys/wqueue.c | void wqueue_link_into_queue(WQUEUE *wqueue, struct st_my_thread_var *thread)
{
struct st_my_thread_var *last;
if (!(last= wqueue->last_thread))
{
/* Queue is empty */
thread->next= thread;
thread->prev= &thread->next;
}
else
{
thread->prev= last->next->prev;
last->next->prev= &thread->next;
thread->next= last->next;
last->next= thread;
}
wqueue->last_thread= thread;
} | O3 | c | wqueue_link_into_queue:
movq (%rdi), %rax
testq %rax, %rax
je 0xa5f0e
pushq %rbp
movq %rsp, %rbp
movq 0x88(%rax), %rcx
movq 0x90(%rcx), %rcx
movq %rcx, 0x90(%rsi)
leaq 0x88(%rsi), %rcx
movq 0x88(%rax), %rdx
movq %rcx, 0x90(%rdx)
movq 0x88(%rax), %rcx
movq %rcx, 0x88(%rsi)
movq %rsi, 0x88(%rax)
popq %rbp
jmp 0xa5f23
leaq 0x88(%rsi), %rax
movq %rsi, 0x88(%rsi)
movq %rax, 0x90(%rsi)
movq %rsi, (%rdi)
retq
| wqueue_link_into_queue:
mov rax, [rdi]
test rax, rax
jz short loc_A5F0E
push rbp
mov rbp, rsp
mov rcx, [rax+88h]
mov rcx, [rcx+90h]
mov [rsi+90h], rcx
lea rcx, [rsi+88h]
mov rdx, [rax+88h]
mov [rdx+90h], rcx
mov rcx, [rax+88h]
mov [rsi+88h], rcx
mov [rax+88h], rsi
pop rbp
jmp short loc_A5F23
loc_A5F0E:
lea rax, [rsi+88h]
mov [rsi+88h], rsi
mov [rsi+90h], rax
loc_A5F23:
mov [rdi], rsi
retn
| long long wqueue_link_into_queue(long long *a1, long long a2)
{
long long result; // rax
result = *a1;
if ( *a1 )
{
*(_QWORD *)(a2 + 144) = *(_QWORD *)(*(_QWORD *)(result + 136) + 144LL);
*(_QWORD *)(*(_QWORD *)(result + 136) + 144LL) = a2 + 136;
*(_QWORD *)(a2 + 136) = *(_QWORD *)(result + 136);
*(_QWORD *)(result + 136) = a2;
}
else
{
result = a2 + 136;
*(_QWORD *)(a2 + 136) = a2;
*(_QWORD *)(a2 + 144) = a2 + 136;
}
*a1 = a2;
return result;
}
| wqueue_link_into_queue:
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x001a5f0e
PUSH RBP
MOV RBP,RSP
MOV RCX,qword ptr [RAX + 0x88]
MOV RCX,qword ptr [RCX + 0x90]
MOV qword ptr [RSI + 0x90],RCX
LEA RCX,[RSI + 0x88]
MOV RDX,qword ptr [RAX + 0x88]
MOV qword ptr [RDX + 0x90],RCX
MOV RCX,qword ptr [RAX + 0x88]
MOV qword ptr [RSI + 0x88],RCX
MOV qword ptr [RAX + 0x88],RSI
POP RBP
JMP 0x001a5f23
LAB_001a5f0e:
LEA RAX,[RSI + 0x88]
MOV qword ptr [RSI + 0x88],RSI
MOV qword ptr [RSI + 0x90],RAX
LAB_001a5f23:
MOV qword ptr [RDI],RSI
RET
|
void wqueue_link_into_queue(long *param_1,long param_2)
{
long lVar1;
lVar1 = *param_1;
if (lVar1 == 0) {
*(long *)(param_2 + 0x88) = param_2;
*(long *)(param_2 + 0x90) = param_2 + 0x88;
}
else {
*(int8 *)(param_2 + 0x90) = *(int8 *)(*(long *)(lVar1 + 0x88) + 0x90);
*(long *)(*(long *)(lVar1 + 0x88) + 0x90) = param_2 + 0x88;
*(int8 *)(param_2 + 0x88) = *(int8 *)(lVar1 + 0x88);
*(long *)(lVar1 + 0x88) = param_2;
}
*param_1 = param_2;
return;
}
| |
54,664 | minja::TextNode::TextNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/./minja.hpp | TextNode(const Location & location, const std::string& t) : TemplateNode(location), text(t) {} | O3 | cpp | minja::TextNode::TextNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x8dc35(%rip), %r15 # 0xeefe8
movq %r15, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0x613df
movq 0x8ebcf(%rip), %rcx # 0xeffa0
cmpb $0x0, (%rcx)
je 0x613db
incl 0x8(%rax)
jmp 0x613df
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rbx)
leaq 0x8de4a(%rip), %rax # 0xef238
movq %rax, (%rbx)
leaq 0x20(%rbx), %rdi
leaq 0x30(%rbx), %rax
movq %rax, 0x20(%rbx)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
callq 0x2bdf8
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %r15, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x61426
callq 0x2f80e
movq %r14, %rdi
callq 0x18b90
| _ZN5minja8TextNodeC2ERKNS_8LocationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push rbx
mov rbx, rdi
lea r15, off_EEFE8
mov [rdi], r15
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_613DF
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_613DB
inc dword ptr [rax+8]
jmp short loc_613DF
loc_613DB:
lock inc dword ptr [rax+8]
loc_613DF:
mov rax, [rsi+10h]
mov [rbx+18h], rax
lea rax, off_EF238
mov [rbx], rax
lea rdi, [rbx+20h]
lea rax, [rbx+30h]
mov [rbx+20h], rax
mov rsi, [rdx]
mov rdx, [rdx+8]
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov [rbx], r15
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_61426
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_61426:
mov rdi, r14
call __Unwind_Resume
| long long minja::TextNode::TextNode(_QWORD *a1, _QWORD *a2, long long a3)
{
long long v3; // rax
*a1 = &off_EEFE8;
a1[1] = *a2;
v3 = a2[1];
a1[2] = v3;
if ( v3 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v3 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v3 + 8));
}
a1[3] = a2[2];
*a1 = &off_EF238;
a1[4] = a1 + 6;
return std::string::_M_construct<char *>((long long)(a1 + 4), *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8));
}
| TextNode:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
LEA R15,[0x1eefe8]
MOV qword ptr [RDI],R15
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],RAX
TEST RAX,RAX
JZ 0x001613df
MOV RCX,qword ptr [0x001effa0]
CMP byte ptr [RCX],0x0
JZ 0x001613db
INC dword ptr [RAX + 0x8]
JMP 0x001613df
LAB_001613db:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001613df:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RBX + 0x18],RAX
LEA RAX,[0x1ef238]
MOV qword ptr [RBX],RAX
LEA RDI,[RBX + 0x20]
LEA RAX,[RBX + 0x30]
MOV qword ptr [RBX + 0x20],RAX
MOV RSI,qword ptr [RDX]
MOV RDX,qword ptr [RDX + 0x8]
ADD RDX,RSI
LAB_00161407:
CALL 0x0012bdf8
LAB_0016140c:
POP RBX
POP R14
POP R15
RET
|
/* minja::TextNode::TextNode(minja::Location const&, std::__cxx11::string const&) */
void __thiscall minja::TextNode::TextNode(TextNode *this,Location *param_1,string *param_2)
{
long lVar1;
*(int ***)this = &PTR___cxa_pure_virtual_001eefe8;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_001effa0 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10);
*(int ***)this = &PTR_do_render_001ef238;
*(TextNode **)(this + 0x20) = this + 0x30;
/* try { // try from 00161407 to 0016140b has its CatchHandler @ 00161412 */
std::__cxx11::string::_M_construct<char*>
(this + 0x20,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2);
return;
}
| |
54,665 | emit_ic | bluesky950520[P]quickjs/quickjs.c | static void emit_ic(JSParseState *s, JSAtom atom)
{
uint32_t h;
JSContext *ctx;
JSInlineCache *ic;
JSInlineCacheHashSlot *ch;
ic = s->cur_func->ic;
ctx = s->ctx;
if (ic->count + 1 >= ic->capacity && resize_ic_hash(ctx, ic))
return;
h = get_index_hash(atom, ic->hash_bits);
for (ch = ic->hash[h]; ch != NULL; ch = ch->next)
if (ch->atom == atom)
return;
ch = js_malloc(ctx, sizeof(*ch));
if (unlikely(!ch))
return;
ch->atom = JS_DupAtom(ctx, atom);
ch->index = 0;
ch->next = ic->hash[h];
ic->hash[h] = ch;
ic->count += 1;
} | O1 | c | emit_ic:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %esi, %ebx
movq (%rdi), %r14
movq 0x90(%rdi), %rax
movq 0x230(%rax), %r12
movl (%r12), %eax
incl %eax
cmpl 0x4(%r12), %eax
jae 0x11e51
imull $0x9e370001, %ebx, %r15d # imm = 0x9E370001
xorl %ecx, %ecx
subb 0x8(%r12), %cl
shrl %cl, %r15d
movq 0x10(%r12), %rax
movq (%rax,%r15,8), %rax
testq %rax, %rax
je 0x11e04
cmpl %ebx, (%rax)
je 0x11e47
movq 0x8(%rax), %rax
jmp 0x11df5
pushq $0x10
popq %rsi
movq %r14, %rdi
callq 0xf082
testq %rax, %rax
je 0x11e47
cmpl $0xe0, %ebx
jl 0x11e2c
movq 0x18(%r14), %rcx
movq 0x68(%rcx), %rcx
movl %ebx, %edx
movq (%rcx,%rdx,8), %rcx
incl (%rcx)
movl %ebx, (%rax)
andl $0x0, 0x4(%rax)
movq 0x10(%r12), %rcx
movq (%rcx,%r15,8), %rdx
movq %rdx, 0x8(%rax)
movq %rax, (%rcx,%r15,8)
incl (%r12)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movb 0x8(%r12), %cl
incb %cl
pushq $0x1
popq %r13
shll %cl, %r13d
leaq (,%r13,8), %rsi
movq %r14, %rdi
callq 0xf0a2
testq %rax, %rax
je 0x11e47
movq %rax, %r15
movl 0x4(%r12), %eax
movl 0x8(%r12), %edx
leal 0x1(%rdx), %ecx
movl %ecx, 0x8(%r12)
testq %rax, %rax
je 0x11ecb
pushq $0x1f
popq %rcx
subl %edx, %ecx
xorl %edx, %edx
movq 0x10(%r12), %rsi
movq (%rsi,%rdx,8), %rsi
testq %rsi, %rsi
je 0x11ec3
imull $0x9e370001, (%rsi), %edi # imm = 0x9E370001
shrl %cl, %edi
movq 0x8(%rsi), %r8
movq (%r15,%rdi,8), %r9
movq %r9, 0x8(%rsi)
movq %rsi, (%r15,%rdi,8)
movq %r8, %rsi
testq %r8, %r8
jne 0x11ea3
incq %rdx
cmpq %rax, %rdx
jne 0x11e95
movq 0x10(%r12), %rsi
movq %r14, %rdi
callq 0x20bf5
movq %r15, 0x10(%r12)
movl %r13d, 0x4(%r12)
testq %r15, %r15
jne 0x11ddb
jmp 0x11e47
| emit_ic:
push r15
push r14
push r13
push r12
push rbx
mov ebx, esi
mov r14, [rdi]
mov rax, [rdi+90h]
mov r12, [rax+230h]
mov eax, [r12]
inc eax
cmp eax, [r12+4]
jnb short loc_11E51
loc_11DDB:
imul r15d, ebx, 9E370001h
xor ecx, ecx
sub cl, [r12+8]
shr r15d, cl
mov rax, [r12+10h]
mov rax, [rax+r15*8]
loc_11DF5:
test rax, rax
jz short loc_11E04
cmp [rax], ebx
jz short loc_11E47
mov rax, [rax+8]
jmp short loc_11DF5
loc_11E04:
push 10h
pop rsi
mov rdi, r14
call js_malloc
test rax, rax
jz short loc_11E47
cmp ebx, 0E0h
jl short loc_11E2C
mov rcx, [r14+18h]
mov rcx, [rcx+68h]
mov edx, ebx
mov rcx, [rcx+rdx*8]
inc dword ptr [rcx]
loc_11E2C:
mov [rax], ebx
and dword ptr [rax+4], 0
mov rcx, [r12+10h]
mov rdx, [rcx+r15*8]
mov [rax+8], rdx
mov [rcx+r15*8], rax
inc dword ptr [r12]
loc_11E47:
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_11E51:
mov cl, [r12+8]
inc cl
push 1
pop r13
shl r13d, cl
lea rsi, ds:0[r13*8]
mov rdi, r14
call js_mallocz
test rax, rax
jz short loc_11E47
mov r15, rax
mov eax, [r12+4]
mov edx, [r12+8]
lea ecx, [rdx+1]
mov [r12+8], ecx
test rax, rax
jz short loc_11ECB
push 1Fh
pop rcx
sub ecx, edx
xor edx, edx
loc_11E95:
mov rsi, [r12+10h]
mov rsi, [rsi+rdx*8]
test rsi, rsi
jz short loc_11EC3
loc_11EA3:
imul edi, [rsi], 9E370001h
shr edi, cl
mov r8, [rsi+8]
mov r9, [r15+rdi*8]
mov [rsi+8], r9
mov [r15+rdi*8], rsi
mov rsi, r8
test r8, r8
jnz short loc_11EA3
loc_11EC3:
inc rdx
cmp rdx, rax
jnz short loc_11E95
loc_11ECB:
mov rsi, [r12+10h]
mov rdi, r14
call js_free
mov [r12+10h], r15
mov [r12+4], r13d
test r15, r15
jnz loc_11DDB
jmp loc_11E47
| long long emit_ic(long long *a1, int a2)
{
long long v3; // r14
long long v4; // r12
long long v5; // r15
long long result; // rax
_DWORD *v7; // rcx
long long v8; // rcx
long long v9; // r13
long long v10; // r15
long long v11; // rax
int v12; // edx
char v13; // cl
long long i; // rdx
long long v15; // rsi
long long v16; // rdi
long long v17; // r8
v3 = *a1;
v4 = *(_QWORD *)(a1[18] + 560);
if ( (unsigned int)(*(_DWORD *)v4 + 1) >= *(_DWORD *)(v4 + 4) )
{
v9 = (unsigned int)(1 << (*(_BYTE *)(v4 + 8) + 1));
result = js_mallocz(*a1, 8 * v9);
if ( !result )
return result;
v10 = result;
v11 = *(unsigned int *)(v4 + 4);
v12 = *(_DWORD *)(v4 + 8);
*(_DWORD *)(v4 + 8) = v12 + 1;
if ( v11 )
{
v13 = 31 - v12;
for ( i = 0LL; i != v11; ++i )
{
v15 = *(_QWORD *)(*(_QWORD *)(v4 + 16) + 8 * i);
if ( v15 )
{
do
{
v16 = (unsigned int)(-1640562687 * *(_DWORD *)v15) >> v13;
v17 = *(_QWORD *)(v15 + 8);
*(_QWORD *)(v15 + 8) = *(_QWORD *)(v10 + 8 * v16);
*(_QWORD *)(v10 + 8 * v16) = v15;
v15 = v17;
}
while ( v17 );
}
}
}
js_free(v3, *(_QWORD *)(v4 + 16));
*(_QWORD *)(v4 + 16) = v10;
*(_DWORD *)(v4 + 4) = v9;
}
v5 = (unsigned int)(-1640562687 * a2) >> -*(_BYTE *)(v4 + 8);
for ( result = *(_QWORD *)(*(_QWORD *)(v4 + 16) + 8 * v5); result; result = *(_QWORD *)(result + 8) )
{
if ( *(_DWORD *)result == a2 )
return result;
}
result = js_malloc(v3, 16LL);
if ( result )
{
if ( a2 >= 224 )
{
v7 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(v3 + 24) + 104LL) + 8LL * (unsigned int)a2);
++*v7;
}
*(_DWORD *)result = a2;
*(_DWORD *)(result + 4) = 0;
v8 = *(_QWORD *)(v4 + 16);
*(_QWORD *)(result + 8) = *(_QWORD *)(v8 + 8 * v5);
*(_QWORD *)(v8 + 8 * v5) = result;
++*(_DWORD *)v4;
}
return result;
}
| emit_ic:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV EBX,ESI
MOV R14,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x90]
MOV R12,qword ptr [RAX + 0x230]
MOV EAX,dword ptr [R12]
INC EAX
CMP EAX,dword ptr [R12 + 0x4]
JNC 0x00111e51
LAB_00111ddb:
IMUL R15D,EBX,-0x61c8ffff
XOR ECX,ECX
SUB CL,byte ptr [R12 + 0x8]
SHR R15D,CL
MOV RAX,qword ptr [R12 + 0x10]
MOV RAX,qword ptr [RAX + R15*0x8]
LAB_00111df5:
TEST RAX,RAX
JZ 0x00111e04
CMP dword ptr [RAX],EBX
JZ 0x00111e47
MOV RAX,qword ptr [RAX + 0x8]
JMP 0x00111df5
LAB_00111e04:
PUSH 0x10
POP RSI
MOV RDI,R14
CALL 0x0010f082
TEST RAX,RAX
JZ 0x00111e47
CMP EBX,0xe0
JL 0x00111e2c
MOV RCX,qword ptr [R14 + 0x18]
MOV RCX,qword ptr [RCX + 0x68]
MOV EDX,EBX
MOV RCX,qword ptr [RCX + RDX*0x8]
INC dword ptr [RCX]
LAB_00111e2c:
MOV dword ptr [RAX],EBX
AND dword ptr [RAX + 0x4],0x0
MOV RCX,qword ptr [R12 + 0x10]
MOV RDX,qword ptr [RCX + R15*0x8]
MOV qword ptr [RAX + 0x8],RDX
MOV qword ptr [RCX + R15*0x8],RAX
INC dword ptr [R12]
LAB_00111e47:
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_00111e51:
MOV CL,byte ptr [R12 + 0x8]
INC CL
PUSH 0x1
POP R13
SHL R13D,CL
LEA RSI,[R13*0x8]
MOV RDI,R14
CALL 0x0010f0a2
TEST RAX,RAX
JZ 0x00111e47
MOV R15,RAX
MOV EAX,dword ptr [R12 + 0x4]
MOV EDX,dword ptr [R12 + 0x8]
LEA ECX,[RDX + 0x1]
MOV dword ptr [R12 + 0x8],ECX
TEST RAX,RAX
JZ 0x00111ecb
PUSH 0x1f
POP RCX
SUB ECX,EDX
XOR EDX,EDX
LAB_00111e95:
MOV RSI,qword ptr [R12 + 0x10]
MOV RSI,qword ptr [RSI + RDX*0x8]
TEST RSI,RSI
JZ 0x00111ec3
LAB_00111ea3:
IMUL EDI,dword ptr [RSI],-0x61c8ffff
SHR EDI,CL
MOV R8,qword ptr [RSI + 0x8]
MOV R9,qword ptr [R15 + RDI*0x8]
MOV qword ptr [RSI + 0x8],R9
MOV qword ptr [R15 + RDI*0x8],RSI
MOV RSI,R8
TEST R8,R8
JNZ 0x00111ea3
LAB_00111ec3:
INC RDX
CMP RDX,RAX
JNZ 0x00111e95
LAB_00111ecb:
MOV RSI,qword ptr [R12 + 0x10]
MOV RDI,R14
CALL 0x00120bf5
MOV qword ptr [R12 + 0x10],R15
MOV dword ptr [R12 + 0x4],R13D
TEST R15,R15
JNZ 0x00111ddb
JMP 0x00111e47
|
void emit_ic(long *param_1,uint param_2)
{
uint uVar1;
int iVar2;
long lVar3;
int *piVar4;
int *piVar5;
int *piVar6;
uint *puVar7;
long lVar8;
ulong uVar9;
ulong uVar10;
uint uVar11;
lVar3 = *param_1;
piVar4 = *(int **)(param_1[0x12] + 0x230);
if ((uint)piVar4[1] <= *piVar4 + 1U) {
uVar11 = 1 << ((char)piVar4[2] + 1U & 0x1f);
lVar8 = js_mallocz(lVar3,(ulong)uVar11 * 8);
if (lVar8 == 0) {
return;
}
uVar1 = piVar4[1];
iVar2 = piVar4[2];
piVar4[2] = iVar2 + 1;
if ((ulong)uVar1 != 0) {
uVar9 = 0;
do {
piVar5 = *(int **)(*(long *)(piVar4 + 4) + uVar9 * 8);
while (piVar5 != (int *)0x0) {
uVar10 = (ulong)((uint)(*piVar5 * -0x61c8ffff) >> (0x1fU - (char)iVar2 & 0x1f));
piVar6 = *(int **)(piVar5 + 2);
*(int8 *)(piVar5 + 2) = *(int8 *)(lVar8 + uVar10 * 8);
*(int **)(lVar8 + uVar10 * 8) = piVar5;
piVar5 = piVar6;
}
uVar9 = uVar9 + 1;
} while (uVar9 != uVar1);
}
js_free(lVar3,*(int8 *)(piVar4 + 4));
*(long *)(piVar4 + 4) = lVar8;
piVar4[1] = uVar11;
if (lVar8 == 0) {
return;
}
}
uVar9 = (ulong)(param_2 * -0x61c8ffff >> (-(char)piVar4[2] & 0x1fU));
puVar7 = *(uint **)(*(long *)(piVar4 + 4) + uVar9 * 8);
while( true ) {
if (puVar7 == (uint *)0x0) {
puVar7 = (uint *)js_malloc(lVar3,0x10);
if (puVar7 != (uint *)0x0) {
if (0xdf < (int)param_2) {
piVar5 = *(int **)(*(long *)(*(long *)(lVar3 + 0x18) + 0x68) + (ulong)param_2 * 8);
*piVar5 = *piVar5 + 1;
}
*puVar7 = param_2;
puVar7[1] = 0;
lVar3 = *(long *)(piVar4 + 4);
*(int8 *)(puVar7 + 2) = *(int8 *)(lVar3 + uVar9 * 8);
*(uint **)(lVar3 + uVar9 * 8) = puVar7;
*piVar4 = *piVar4 + 1;
}
return;
}
if (*puVar7 == param_2) break;
puVar7 = *(uint **)(puVar7 + 2);
}
return;
}
| |
54,666 | emit_ic | bluesky950520[P]quickjs/quickjs.c | static void emit_ic(JSParseState *s, JSAtom atom)
{
uint32_t h;
JSContext *ctx;
JSInlineCache *ic;
JSInlineCacheHashSlot *ch;
ic = s->cur_func->ic;
ctx = s->ctx;
if (ic->count + 1 >= ic->capacity && resize_ic_hash(ctx, ic))
return;
h = get_index_hash(atom, ic->hash_bits);
for (ch = ic->hash[h]; ch != NULL; ch = ch->next)
if (ch->atom == atom)
return;
ch = js_malloc(ctx, sizeof(*ch));
if (unlikely(!ch))
return;
ch->atom = JS_DupAtom(ctx, atom);
ch->index = 0;
ch->next = ic->hash[h];
ic->hash[h] = ch;
ic->count += 1;
} | O2 | c | emit_ic:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %esi, %ebx
movq (%rdi), %r14
movq 0x90(%rdi), %rax
movq 0x230(%rax), %r12
movl (%r12), %eax
incl %eax
cmpl 0x4(%r12), %eax
jae 0x5aaa9
movq 0x10(%r12), %r15
jmp 0x5ab33
movb 0x8(%r12), %cl
incb %cl
pushq $0x1
popq %r13
shll %cl, %r13d
leaq (,%r13,8), %rsi
movq %r14, %rdi
callq 0x1adf1
testq %rax, %rax
je 0x5ab9d
movq %rax, %r15
movl 0x4(%r12), %eax
movl 0x8(%r12), %edx
leal 0x1(%rdx), %ecx
movl %ecx, 0x8(%r12)
pushq $0x1f
popq %rcx
subl %edx, %ecx
xorl %edx, %edx
movq 0x10(%r12), %rsi
cmpq %rax, %rdx
je 0x5ab21
movq (%rsi,%rdx,8), %rsi
testq %rsi, %rsi
je 0x5ab1c
imull $0x9e370001, (%rsi), %edi # imm = 0x9E370001
shrl %cl, %edi
movq 0x8(%rsi), %r8
movq (%r15,%rdi,8), %r9
movq %r9, 0x8(%rsi)
movq %rsi, (%r15,%rdi,8)
movq %r8, %rsi
jmp 0x5aafa
incq %rdx
jmp 0x5aaec
movq %r14, %rdi
callq 0x1ae1e
movq %r15, 0x10(%r12)
movl %r13d, 0x4(%r12)
imull $0x9e370001, %ebx, %r13d # imm = 0x9E370001
xorl %ecx, %ecx
subb 0x8(%r12), %cl
shrl %cl, %r13d
leaq (%r15,%r13,8), %rax
movq (%rax), %rcx
testq %rcx, %rcx
je 0x5ab5a
leaq 0x8(%rcx), %rax
cmpl %ebx, (%rcx)
jne 0x5ab48
jmp 0x5ab9d
pushq $0x10
popq %rsi
movq %r14, %rdi
callq 0x1adc4
testq %rax, %rax
je 0x5ab9d
cmpl $0xe0, %ebx
jl 0x5ab82
movq 0x18(%r14), %rcx
movq 0x68(%rcx), %rcx
movl %ebx, %edx
movq (%rcx,%rdx,8), %rcx
incl (%rcx)
movl %ebx, (%rax)
andl $0x0, 0x4(%rax)
movq 0x10(%r12), %rcx
movq (%rcx,%r13,8), %rdx
movq %rdx, 0x8(%rax)
movq %rax, (%rcx,%r13,8)
incl (%r12)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| emit_ic:
push r15
push r14
push r13
push r12
push rbx
mov ebx, esi
mov r14, [rdi]
mov rax, [rdi+90h]
mov r12, [rax+230h]
mov eax, [r12]
inc eax
cmp eax, [r12+4]
jnb short loc_5AAA9
mov r15, [r12+10h]
jmp loc_5AB33
loc_5AAA9:
mov cl, [r12+8]
inc cl
push 1
pop r13
shl r13d, cl
lea rsi, ds:0[r13*8]
mov rdi, r14
call js_mallocz
test rax, rax
jz loc_5AB9D
mov r15, rax
mov eax, [r12+4]
mov edx, [r12+8]
lea ecx, [rdx+1]
mov [r12+8], ecx
push 1Fh
pop rcx
sub ecx, edx
xor edx, edx
loc_5AAEC:
mov rsi, [r12+10h]
cmp rdx, rax
jz short loc_5AB21
mov rsi, [rsi+rdx*8]
loc_5AAFA:
test rsi, rsi
jz short loc_5AB1C
imul edi, [rsi], 9E370001h
shr edi, cl
mov r8, [rsi+8]
mov r9, [r15+rdi*8]
mov [rsi+8], r9
mov [r15+rdi*8], rsi
mov rsi, r8
jmp short loc_5AAFA
loc_5AB1C:
inc rdx
jmp short loc_5AAEC
loc_5AB21:
mov rdi, r14
call js_free
mov [r12+10h], r15
mov [r12+4], r13d
loc_5AB33:
imul r13d, ebx, 9E370001h
xor ecx, ecx
sub cl, [r12+8]
shr r13d, cl
lea rax, [r15+r13*8]
loc_5AB48:
mov rcx, [rax]
test rcx, rcx
jz short loc_5AB5A
lea rax, [rcx+8]
cmp [rcx], ebx
jnz short loc_5AB48
jmp short loc_5AB9D
loc_5AB5A:
push 10h
pop rsi
mov rdi, r14
call js_malloc
test rax, rax
jz short loc_5AB9D
cmp ebx, 0E0h
jl short loc_5AB82
mov rcx, [r14+18h]
mov rcx, [rcx+68h]
mov edx, ebx
mov rcx, [rcx+rdx*8]
inc dword ptr [rcx]
loc_5AB82:
mov [rax], ebx
and dword ptr [rax+4], 0
mov rcx, [r12+10h]
mov rdx, [rcx+r13*8]
mov [rax+8], rdx
mov [rcx+r13*8], rax
inc dword ptr [r12]
loc_5AB9D:
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| long long emit_ic(long long *a1, int a2)
{
long long v3; // r14
long long v4; // r12
long long v5; // r15
long long v6; // r13
long long result; // rax
long long v8; // rax
int v9; // edx
char v10; // cl
long long i; // rdx
long long v12; // rsi
long long j; // rsi
unsigned int v14; // edi
long long v15; // r8
long long v16; // r13
_DWORD *v17; // rcx
_DWORD *v18; // rcx
long long v19; // rcx
v3 = *a1;
v4 = *(_QWORD *)(a1[18] + 560);
if ( (unsigned int)(*(_DWORD *)v4 + 1) >= *(_DWORD *)(v4 + 4) )
{
v6 = (unsigned int)(1 << (*(_BYTE *)(v4 + 8) + 1));
result = js_mallocz(*a1, 8 * v6);
if ( !result )
return result;
v5 = result;
v8 = *(unsigned int *)(v4 + 4);
v9 = *(_DWORD *)(v4 + 8);
*(_DWORD *)(v4 + 8) = v9 + 1;
v10 = 31 - v9;
for ( i = 0LL; ; ++i )
{
v12 = *(_QWORD *)(v4 + 16);
if ( i == v8 )
break;
for ( j = *(_QWORD *)(v12 + 8 * i); j; j = v15 )
{
v14 = (unsigned int)(-1640562687 * *(_DWORD *)j) >> v10;
v15 = *(_QWORD *)(j + 8);
*(_QWORD *)(j + 8) = *(_QWORD *)(v5 + 8LL * v14);
*(_QWORD *)(v5 + 8LL * v14) = j;
}
}
js_free(v3, v12);
*(_QWORD *)(v4 + 16) = v5;
*(_DWORD *)(v4 + 4) = v6;
}
else
{
v5 = *(_QWORD *)(v4 + 16);
}
v16 = (unsigned int)(-1640562687 * a2) >> -*(_BYTE *)(v4 + 8);
result = v5 + 8 * v16;
while ( 1 )
{
v17 = *(_DWORD **)result;
if ( !*(_QWORD *)result )
break;
result = (long long)(v17 + 2);
if ( *v17 == a2 )
return result;
}
result = js_malloc(v3, 16LL);
if ( result )
{
if ( a2 >= 224 )
{
v18 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(v3 + 24) + 104LL) + 8LL * (unsigned int)a2);
++*v18;
}
*(_DWORD *)result = a2;
*(_DWORD *)(result + 4) = 0;
v19 = *(_QWORD *)(v4 + 16);
*(_QWORD *)(result + 8) = *(_QWORD *)(v19 + 8 * v16);
*(_QWORD *)(v19 + 8 * v16) = result;
++*(_DWORD *)v4;
}
return result;
}
| emit_ic:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV EBX,ESI
MOV R14,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x90]
MOV R12,qword ptr [RAX + 0x230]
MOV EAX,dword ptr [R12]
INC EAX
CMP EAX,dword ptr [R12 + 0x4]
JNC 0x0015aaa9
MOV R15,qword ptr [R12 + 0x10]
JMP 0x0015ab33
LAB_0015aaa9:
MOV CL,byte ptr [R12 + 0x8]
INC CL
PUSH 0x1
POP R13
SHL R13D,CL
LEA RSI,[R13*0x8]
MOV RDI,R14
CALL 0x0011adf1
TEST RAX,RAX
JZ 0x0015ab9d
MOV R15,RAX
MOV EAX,dword ptr [R12 + 0x4]
MOV EDX,dword ptr [R12 + 0x8]
LEA ECX,[RDX + 0x1]
MOV dword ptr [R12 + 0x8],ECX
PUSH 0x1f
POP RCX
SUB ECX,EDX
XOR EDX,EDX
LAB_0015aaec:
MOV RSI,qword ptr [R12 + 0x10]
CMP RDX,RAX
JZ 0x0015ab21
MOV RSI,qword ptr [RSI + RDX*0x8]
LAB_0015aafa:
TEST RSI,RSI
JZ 0x0015ab1c
IMUL EDI,dword ptr [RSI],-0x61c8ffff
SHR EDI,CL
MOV R8,qword ptr [RSI + 0x8]
MOV R9,qword ptr [R15 + RDI*0x8]
MOV qword ptr [RSI + 0x8],R9
MOV qword ptr [R15 + RDI*0x8],RSI
MOV RSI,R8
JMP 0x0015aafa
LAB_0015ab1c:
INC RDX
JMP 0x0015aaec
LAB_0015ab21:
MOV RDI,R14
CALL 0x0011ae1e
MOV qword ptr [R12 + 0x10],R15
MOV dword ptr [R12 + 0x4],R13D
LAB_0015ab33:
IMUL R13D,EBX,-0x61c8ffff
XOR ECX,ECX
SUB CL,byte ptr [R12 + 0x8]
SHR R13D,CL
LEA RAX,[R15 + R13*0x8]
LAB_0015ab48:
MOV RCX,qword ptr [RAX]
TEST RCX,RCX
JZ 0x0015ab5a
LEA RAX,[RCX + 0x8]
CMP dword ptr [RCX],EBX
JNZ 0x0015ab48
JMP 0x0015ab9d
LAB_0015ab5a:
PUSH 0x10
POP RSI
MOV RDI,R14
CALL 0x0011adc4
TEST RAX,RAX
JZ 0x0015ab9d
CMP EBX,0xe0
JL 0x0015ab82
MOV RCX,qword ptr [R14 + 0x18]
MOV RCX,qword ptr [RCX + 0x68]
MOV EDX,EBX
MOV RCX,qword ptr [RCX + RDX*0x8]
INC dword ptr [RCX]
LAB_0015ab82:
MOV dword ptr [RAX],EBX
AND dword ptr [RAX + 0x4],0x0
MOV RCX,qword ptr [R12 + 0x10]
MOV RDX,qword ptr [RCX + R13*0x8]
MOV qword ptr [RAX + 0x8],RDX
MOV qword ptr [RCX + R13*0x8],RAX
INC dword ptr [R12]
LAB_0015ab9d:
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
void emit_ic(long *param_1,uint param_2)
{
uint uVar1;
int iVar2;
long lVar3;
int *piVar4;
int *piVar5;
uint *puVar6;
long lVar7;
uint *puVar8;
ulong uVar9;
int *piVar10;
ulong uVar11;
uint uVar12;
lVar3 = *param_1;
piVar4 = *(int **)(param_1[0x12] + 0x230);
if (*piVar4 + 1U < (uint)piVar4[1]) {
lVar7 = *(long *)(piVar4 + 4);
}
else {
uVar12 = 1 << ((char)piVar4[2] + 1U & 0x1f);
lVar7 = js_mallocz(lVar3,(ulong)uVar12 * 8);
if (lVar7 == 0) {
return;
}
uVar1 = piVar4[1];
iVar2 = piVar4[2];
piVar4[2] = iVar2 + 1;
for (uVar9 = 0; uVar9 != uVar1; uVar9 = uVar9 + 1) {
piVar10 = *(int **)(*(long *)(piVar4 + 4) + uVar9 * 8);
while (piVar10 != (int *)0x0) {
uVar11 = (ulong)((uint)(*piVar10 * -0x61c8ffff) >> (0x1fU - (char)iVar2 & 0x1f));
piVar5 = *(int **)(piVar10 + 2);
*(int8 *)(piVar10 + 2) = *(int8 *)(lVar7 + uVar11 * 8);
*(int **)(lVar7 + uVar11 * 8) = piVar10;
piVar10 = piVar5;
}
}
js_free(lVar3);
*(long *)(piVar4 + 4) = lVar7;
piVar4[1] = uVar12;
}
uVar9 = (ulong)(param_2 * -0x61c8ffff >> (-(char)piVar4[2] & 0x1fU));
puVar8 = (uint *)(lVar7 + uVar9 * 8);
do {
puVar6 = *(uint **)puVar8;
if (puVar6 == (uint *)0x0) {
puVar8 = (uint *)js_malloc(lVar3,0x10);
if (puVar8 == (uint *)0x0) {
return;
}
if (0xdf < (int)param_2) {
piVar10 = *(int **)(*(long *)(*(long *)(lVar3 + 0x18) + 0x68) + (ulong)param_2 * 8);
*piVar10 = *piVar10 + 1;
}
*puVar8 = param_2;
puVar8[1] = 0;
lVar3 = *(long *)(piVar4 + 4);
*(int8 *)(puVar8 + 2) = *(int8 *)(lVar3 + uVar9 * 8);
*(uint **)(lVar3 + uVar9 * 8) = puVar8;
*piVar4 = *piVar4 + 1;
return;
}
puVar8 = puVar6 + 2;
} while (*puVar6 != param_2);
return;
}
| |
54,667 | ma_pvio_tls_compare_fp | eloqsql/libmariadb/libmariadb/ma_tls.c | static my_bool ma_pvio_tls_compare_fp(const char *cert_fp,
unsigned int cert_fp_len,
const char *fp, unsigned int fp_len)
{
char *p= (char *)fp,
*c;
/* check length */
if (cert_fp_len != 20)
return 1;
/* We support two formats:
2 digits hex numbers, separated by colons (length=59)
20 * 2 digits hex numbers without separators (length = 40)
*/
if (fp_len != (strchr(fp, ':') ? 59 : 40))
return 1;
for(c= (char *)cert_fp; c < cert_fp + cert_fp_len; c++)
{
signed char d1, d2;
if (*p == ':')
p++;
if (p - fp > (int)fp_len -1)
return 1;
if ((d1 = ma_hex2int(*p)) == - 1 ||
(d2 = ma_hex2int(*(p+1))) == -1 ||
(char)(d1 * 16 + d2) != *c)
return 1;
p+= 2;
}
return 0;
} | O0 | c | ma_pvio_tls_compare_fp:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpl $0x14, -0x14(%rbp)
je 0x2459d
movb $0x1, -0x1(%rbp)
jmp 0x2469c
movl -0x24(%rbp), %eax
movl %eax, -0x40(%rbp)
movq -0x20(%rbp), %rdi
movl $0x3a, %esi
callq 0x13170
movq %rax, %rsi
movl -0x40(%rbp), %eax
movl $0x28, %ecx
movl $0x3b, %edx
cmpq $0x0, %rsi
cmovnel %edx, %ecx
cmpl %ecx, %eax
je 0x245d5
movb $0x1, -0x1(%rbp)
jmp 0x2469c
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x24698
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3a, %eax
jne 0x2460c
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
movl -0x24(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
cmpq %rcx, %rax
jle 0x2462b
movb $0x1, -0x1(%rbp)
jmp 0x2469c
movq -0x30(%rbp), %rax
movsbl (%rax), %edi
callq 0x246d0
movb %al, -0x39(%rbp)
movsbl %al, %eax
cmpl $-0x1, %eax
je 0x24675
movq -0x30(%rbp), %rax
movsbl 0x1(%rax), %edi
callq 0x246d0
movb %al, -0x3a(%rbp)
movsbl %al, %eax
cmpl $-0x1, %eax
je 0x24675
movsbl -0x39(%rbp), %eax
shll $0x4, %eax
movsbl -0x3a(%rbp), %ecx
addl %ecx, %eax
movsbl %al, %eax
movq -0x38(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
je 0x2467b
movb $0x1, -0x1(%rbp)
jmp 0x2469c
movq -0x30(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x245dd
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_pvio_tls_compare_fp:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov rax, [rbp+var_20]
mov [rbp+var_30], rax
cmp [rbp+var_14], 14h
jz short loc_2459D
mov [rbp+var_1], 1
jmp loc_2469C
loc_2459D:
mov eax, [rbp+var_24]
mov [rbp+var_40], eax
mov rdi, [rbp+var_20]
mov esi, 3Ah ; ':'
call _strchr
mov rsi, rax
mov eax, [rbp+var_40]
mov ecx, 28h ; '('
mov edx, 3Bh ; ';'
cmp rsi, 0
cmovnz ecx, edx
cmp eax, ecx
jz short loc_245D5
mov [rbp+var_1], 1
jmp loc_2469C
loc_245D5:
mov rax, [rbp+var_10]
mov [rbp+var_38], rax
loc_245DD:
mov rax, [rbp+var_38]
mov rcx, [rbp+var_10]
mov edx, [rbp+var_14]
add rcx, rdx
cmp rax, rcx
jnb loc_24698
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax]
cmp eax, 3Ah ; ':'
jnz short loc_2460C
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
loc_2460C:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_20]
sub rax, rcx
mov ecx, [rbp+var_24]
sub ecx, 1
movsxd rcx, ecx
cmp rax, rcx
jle short loc_2462B
mov [rbp+var_1], 1
jmp short loc_2469C
loc_2462B:
mov rax, [rbp+var_30]
movsx edi, byte ptr [rax]
call ma_hex2int
mov [rbp+var_39], al
movsx eax, al
cmp eax, 0FFFFFFFFh
jz short loc_24675
mov rax, [rbp+var_30]
movsx edi, byte ptr [rax+1]
call ma_hex2int
mov [rbp+var_3A], al
movsx eax, al
cmp eax, 0FFFFFFFFh
jz short loc_24675
movsx eax, [rbp+var_39]
shl eax, 4
movsx ecx, [rbp+var_3A]
add eax, ecx
movsx eax, al
mov rcx, [rbp+var_38]
movsx ecx, byte ptr [rcx]
cmp eax, ecx
jz short loc_2467B
loc_24675:
mov [rbp+var_1], 1
jmp short loc_2469C
loc_2467B:
mov rax, [rbp+var_30]
add rax, 2
mov [rbp+var_30], rax
mov rax, [rbp+var_38]
add rax, 1
mov [rbp+var_38], rax
jmp loc_245DD
loc_24698:
mov [rbp+var_1], 0
loc_2469C:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
| char ma_pvio_tls_compare_fp(char *a1, int a2, char *a3, int a4)
{
long long v4; // rsi
int v5; // ecx
char v7; // [rsp+6h] [rbp-3Ah]
char v8; // [rsp+7h] [rbp-39h]
char *i; // [rsp+8h] [rbp-38h]
char *v10; // [rsp+10h] [rbp-30h]
v10 = a3;
if ( a2 != 20 )
return 1;
v4 = strchr(a3, 58LL);
v5 = 40;
if ( v4 )
v5 = 59;
if ( a4 != v5 )
return 1;
for ( i = a1; i < a1 + 20; ++i )
{
if ( *v10 == 58 )
++v10;
if ( v10 - a3 > a4 - 1 )
return 1;
v8 = ma_hex2int((unsigned int)*v10);
if ( v8 == -1 )
return 1;
v7 = ma_hex2int((unsigned int)v10[1]);
if ( v7 == -1 || (char)(v7 + 16 * v8) != *i )
return 1;
v10 += 2;
}
return 0;
}
| ma_pvio_tls_compare_fp:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x30],RAX
CMP dword ptr [RBP + -0x14],0x14
JZ 0x0012459d
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0012469c
LAB_0012459d:
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x40],EAX
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,0x3a
CALL 0x00113170
MOV RSI,RAX
MOV EAX,dword ptr [RBP + -0x40]
MOV ECX,0x28
MOV EDX,0x3b
CMP RSI,0x0
CMOVNZ ECX,EDX
CMP EAX,ECX
JZ 0x001245d5
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0012469c
LAB_001245d5:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
LAB_001245dd:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
ADD RCX,RDX
CMP RAX,RCX
JNC 0x00124698
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x3a
JNZ 0x0012460c
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
LAB_0012460c:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOV ECX,dword ptr [RBP + -0x24]
SUB ECX,0x1
MOVSXD RCX,ECX
CMP RAX,RCX
JLE 0x0012462b
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0012469c
LAB_0012462b:
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EDI,byte ptr [RAX]
CALL 0x001246d0
MOV byte ptr [RBP + -0x39],AL
MOVSX EAX,AL
CMP EAX,-0x1
JZ 0x00124675
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EDI,byte ptr [RAX + 0x1]
CALL 0x001246d0
MOV byte ptr [RBP + -0x3a],AL
MOVSX EAX,AL
CMP EAX,-0x1
JZ 0x00124675
MOVSX EAX,byte ptr [RBP + -0x39]
SHL EAX,0x4
MOVSX ECX,byte ptr [RBP + -0x3a]
ADD EAX,ECX
MOVSX EAX,AL
MOV RCX,qword ptr [RBP + -0x38]
MOVSX ECX,byte ptr [RCX]
CMP EAX,ECX
JZ 0x0012467b
LAB_00124675:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0012469c
LAB_0012467b:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x2
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001245dd
LAB_00124698:
MOV byte ptr [RBP + -0x1],0x0
LAB_0012469c:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int1 ma_pvio_tls_compare_fp(char *param_1,int param_2,char *param_3,int param_4)
{
char cVar1;
char cVar2;
char *pcVar3;
int iVar4;
char *local_40;
char *local_38;
int1 local_9;
if (param_2 == 0x14) {
pcVar3 = strchr(param_3,0x3a);
iVar4 = 0x28;
if (pcVar3 != (char *)0x0) {
iVar4 = 0x3b;
}
local_40 = param_1;
local_38 = param_3;
if (param_4 == iVar4) {
for (; local_40 < param_1 + 0x14; local_40 = local_40 + 1) {
if (*local_38 == ':') {
local_38 = local_38 + 1;
}
if ((long)(param_4 + -1) < (long)local_38 - (long)param_3) {
return 1;
}
cVar1 = ma_hex2int((int)*local_38);
if (((cVar1 == -1) || (cVar2 = ma_hex2int((int)local_38[1]), cVar2 == -1)) ||
((char)((char)((int)cVar1 << 4) + cVar2) != *local_40)) {
return 1;
}
local_38 = local_38 + 2;
}
local_9 = 0;
}
else {
local_9 = 1;
}
}
else {
local_9 = 1;
}
return local_9;
}
| |
54,668 | write_hook_for_undo_key_delete | eloqsql/storage/maria/ma_key_recover.c | my_bool write_hook_for_undo_key_delete(enum translog_record_type type,
TRN *trn, MARIA_HA *tbl_info,
LSN *lsn, void *hook_arg)
{
struct st_msg_to_write_hook_for_undo_key *msg=
(struct st_msg_to_write_hook_for_undo_key *) hook_arg;
MARIA_SHARE *share= tbl_info->s;
if (msg->auto_increment > 0) /* If auto increment key */
{
/* Restore auto increment if no one has changed it in between */
if (share->last_auto_increment == tbl_info->last_auto_increment &&
tbl_info->last_auto_increment != ~(ulonglong) 0)
share->state.auto_increment= tbl_info->last_auto_increment;
}
return write_hook_for_undo_key(type, trn, tbl_info, lsn, hook_arg);
} | O0 | c | write_hook_for_undo_key_delete:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jbe 0x42ae7
movq -0x38(%rbp), %rax
movq 0x610(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x3e8(%rcx), %rax
jne 0x42ae5
movq -0x18(%rbp), %rax
cmpq $-0x1, 0x3e8(%rax)
je 0x42ae5
movq -0x18(%rbp), %rax
movq 0x3e8(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0xd8(%rax)
jmp 0x42ae7
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
callq 0x42910
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| write_hook_for_undo_key_delete:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_28]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_30]
cmp qword ptr [rax+18h], 0
jbe short loc_42AE7
mov rax, [rbp+var_38]
mov rax, [rax+610h]
mov rcx, [rbp+var_18]
cmp rax, [rcx+3E8h]
jnz short loc_42AE5
mov rax, [rbp+var_18]
cmp qword ptr [rax+3E8h], 0FFFFFFFFFFFFFFFFh
jz short loc_42AE5
mov rax, [rbp+var_18]
mov rcx, [rax+3E8h]
mov rax, [rbp+var_38]
mov [rax+0D8h], rcx
loc_42AE5:
jmp short $+2
loc_42AE7:
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
mov r8, [rbp+var_28]
call write_hook_for_undo_key
add rsp, 40h
pop rbp
retn
| long long write_hook_for_undo_key_delete(unsigned int a1, long long a2, long long *a3, long long a4, long long a5)
{
long long v6; // [rsp+8h] [rbp-38h]
v6 = *a3;
if ( *(_QWORD *)(a5 + 24) && *(_QWORD *)(v6 + 1552) == a3[125] && a3[125] != -1 )
*(_QWORD *)(v6 + 216) = a3[125];
return write_hook_for_undo_key(a1, a2, (long long)a3, a4, a5);
}
| write_hook_for_undo_key_delete:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x30]
CMP qword ptr [RAX + 0x18],0x0
JBE 0x00142ae7
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x610]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x3e8]
JNZ 0x00142ae5
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x3e8],-0x1
JZ 0x00142ae5
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x3e8]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0xd8],RCX
LAB_00142ae5:
JMP 0x00142ae7
LAB_00142ae7:
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
MOV R8,qword ptr [RBP + -0x28]
CALL 0x00142910
ADD RSP,0x40
POP RBP
RET
|
void write_hook_for_undo_key_delete
(int4 param_1,int8 param_2,long *param_3,int8 param_4,long param_5)
{
if (((*(long *)(param_5 + 0x18) != 0) && (*(long *)(*param_3 + 0x610) == param_3[0x7d])) &&
(param_3[0x7d] != -1)) {
*(long *)(*param_3 + 0xd8) = param_3[0x7d];
}
write_hook_for_undo_key(param_1,param_2,param_3,param_4,param_5);
return;
}
| |
54,669 | minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&) | monkey531[P]llama/common/minja.hpp | MacroNode(const Location & location, std::shared_ptr<VariableExpr> && n, Expression::Parameters && p, std::shared_ptr<TemplateNode> && b)
: TemplateNode(location), name(std::move(n)), params(std::move(p)), body(std::move(b)) {
for (size_t i = 0; i < params.size(); ++i) {
const auto & name = params[i].first;
if (!name.empty()) {
named_param_positions[name] = i;
}
}
} | O1 | cpp | minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x20(%rdi), %r15
movq 0x28(%rdi), %r12
cmpq %r12, %r15
je 0xa3082
movq %rdx, %rbx
movq %rsi, %r14
movq (%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x9c044
addq $0x10, %r15
cmpq %r12, %r15
jne 0xa306b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| _ZNK5minja12SequenceNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE:
push r15
push r14
push r12
push rbx
push rax
mov r15, [rdi+20h]
mov r12, [rdi+28h]
cmp r15, r12
jz short loc_A3082
mov rbx, rdx
mov r14, rsi
loc_A306B:
mov rdi, [r15]
mov rsi, r14
mov rdx, rbx
call _ZNK5minja12TemplateNode6renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE; minja::TemplateNode::render(std::ostringstream &,std::shared_ptr<minja::Context> const&)
add r15, 10h
cmp r15, r12
jnz short loc_A306B
loc_A3082:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long minja::SequenceNode::do_render(long long a1)
{
long long ( ****v1)(_QWORD); // r15
long long ( ****i)(_QWORD); // r12
long long result; // rax
v1 = *(long long ( *****)(_QWORD))(a1 + 32);
for ( i = *(long long ( *****)(_QWORD))(a1 + 40); v1 != i; v1 += 2 )
result = minja::TemplateNode::render(*v1);
return result;
}
| do_render:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,qword ptr [RDI + 0x20]
MOV R12,qword ptr [RDI + 0x28]
CMP R15,R12
JZ 0x001a3082
MOV RBX,RDX
MOV R14,RSI
LAB_001a306b:
MOV RDI,qword ptr [R15]
MOV RSI,R14
MOV RDX,RBX
CALL 0x0019c044
ADD R15,0x10
CMP R15,R12
JNZ 0x001a306b
LAB_001a3082:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* minja::SequenceNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context>
const&) const */
void minja::SequenceNode::do_render(ostringstream *param_1,shared_ptr *param_2)
{
int8 *puVar1;
int8 *puVar2;
puVar1 = *(int8 **)(param_1 + 0x28);
for (puVar2 = *(int8 **)(param_1 + 0x20); puVar2 != puVar1; puVar2 = puVar2 + 2) {
TemplateNode::render((ostringstream *)*puVar2,param_2);
}
return;
}
| |
54,670 | minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&) | monkey531[P]llama/common/minja.hpp | MacroNode(const Location & location, std::shared_ptr<VariableExpr> && n, Expression::Parameters && p, std::shared_ptr<TemplateNode> && b)
: TemplateNode(location), name(std::move(n)), params(std::move(p)), body(std::move(b)) {
for (size_t i = 0; i < params.size(); ++i) {
const auto & name = params[i].first;
if (!name.empty()) {
named_param_positions[name] = i;
}
}
} | O3 | cpp | minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x8b820(%rip), %rax # 0x12afd8
addq $0x10, %rax
movq %rax, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0x9f7e8
movq 0x8c7ae(%rip), %rdi # 0x12bf88
cmpb $0x0, (%rdi)
je 0x9f7e4
incl 0x8(%rax)
jmp 0x9f7e8
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rbx)
leaq 0x8bc71(%rip), %rax # 0x12b468
addq $0x10, %rax
movq %rax, (%rbx)
xorl %eax, %eax
movq %rax, 0x28(%rbx)
movups (%rdx), %xmm0
movq %rax, 0x8(%rdx)
movups %xmm0, 0x20(%rbx)
movq %rax, (%rdx)
movups (%rcx), %xmm0
movups %xmm0, 0x30(%rbx)
movq 0x10(%rcx), %rdx
movq %rdx, 0x40(%rbx)
movq %rax, 0x10(%rcx)
xorps %xmm0, %xmm0
movups %xmm0, (%rcx)
movq %rax, 0x50(%rbx)
movups (%r8), %xmm1
movq %rax, 0x8(%r8)
movups %xmm1, 0x48(%rbx)
movq %rax, (%r8)
leaq 0x88(%rbx), %rax
movq %rax, 0x58(%rbx)
movq $0x1, 0x60(%rbx)
movups %xmm0, 0x68(%rbx)
movl $0x3f800000, 0x78(%rbx) # imm = 0x3F800000
movups %xmm0, 0x80(%rbx)
movq 0x30(%rbx), %rsi
movq 0x38(%rbx), %rax
cmpq %rsi, %rax
je 0x9f8d1
leaq 0x10(%rbx), %rcx
movq %rcx, 0x10(%rsp)
leaq 0x28(%rbx), %rcx
movq %rcx, 0x8(%rsp)
leaq 0x30(%rbx), %r12
leaq 0x58(%rbx), %r13
xorl %ebp, %ebp
movabsq $-0x5555555555555555, %r14 # imm = 0xAAAAAAAAAAAAAAAB
xorl %r15d, %r15d
cmpq $0x0, 0x8(%rsi,%rbp)
je 0x9f8b7
addq %rbp, %rsi
movq %r13, %rdi
callq 0x9fc74
movq %r15, (%rax)
movq 0x30(%rbx), %rsi
movq 0x38(%rbx), %rax
incq %r15
movq %rax, %rcx
subq %rsi, %rcx
sarq $0x4, %rcx
imulq %r14, %rcx
addq $0x30, %rbp
cmpq %rcx, %r15
jb 0x9f899
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbp
movq %r13, %rdi
callq 0xa0096
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0x9f8f9
callq 0x6e096
movq %r12, %rdi
movq 0x8(%rsp), %rsi
movq %rbx, %rdx
movq 0x10(%rsp), %rcx
callq 0x1bf87
movq %rbp, %rdi
callq 0x1afb0
| _ZN5minja9MacroNodeC2ERKNS_8LocationEOSt10shared_ptrINS_12VariableExprEEOSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_INS_10ExpressionEEESaISI_EEOS4_INS_12TemplateNodeEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
lea rax, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode
add rax, 10h
mov [rdi], rax
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_9F7E8
mov rdi, cs:__libc_single_threaded_ptr
cmp byte ptr [rdi], 0
jz short loc_9F7E4
inc dword ptr [rax+8]
jmp short loc_9F7E8
loc_9F7E4:
lock inc dword ptr [rax+8]
loc_9F7E8:
mov rax, [rsi+10h]
mov [rbx+18h], rax
lea rax, _ZTVN5minja9MacroNodeE; `vtable for'minja::MacroNode
add rax, 10h
mov [rbx], rax
xor eax, eax
mov [rbx+28h], rax
movups xmm0, xmmword ptr [rdx]
mov [rdx+8], rax
movups xmmword ptr [rbx+20h], xmm0
mov [rdx], rax
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rbx+30h], xmm0
mov rdx, [rcx+10h]
mov [rbx+40h], rdx
mov [rcx+10h], rax
xorps xmm0, xmm0
movups xmmword ptr [rcx], xmm0
mov [rbx+50h], rax
movups xmm1, xmmword ptr [r8]
mov [r8+8], rax
movups xmmword ptr [rbx+48h], xmm1
mov [r8], rax
lea rax, [rbx+88h]
mov [rbx+58h], rax
mov qword ptr [rbx+60h], 1
movups xmmword ptr [rbx+68h], xmm0
mov dword ptr [rbx+78h], 3F800000h
movups xmmword ptr [rbx+80h], xmm0
mov rsi, [rbx+30h]
mov rax, [rbx+38h]
cmp rax, rsi
jz short loc_9F8D1
lea rcx, [rbx+10h]
mov [rsp+48h+var_38], rcx
lea rcx, [rbx+28h]
mov [rsp+48h+var_40], rcx
lea r12, [rbx+30h]
lea r13, [rbx+58h]
xor ebp, ebp
mov r14, 0AAAAAAAAAAAAAAABh
xor r15d, r15d
loc_9F899:
cmp qword ptr [rsi+rbp+8], 0
jz short loc_9F8B7
add rsi, rbp
mov rdi, r13
call _ZNSt8__detail9_Map_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS6_mESaIS9_ENS_10_Select1stESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb0ELb1EEELb1EEixERS8_; std::__detail::_Map_base<std::string,std::pair<std::string const,ulong>,std::allocator<std::pair<std::string const,ulong>>,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>,true>::operator[](std::string const&)
mov [rax], r15
mov rsi, [rbx+30h]
mov rax, [rbx+38h]
loc_9F8B7:
inc r15
mov rcx, rax
sub rcx, rsi
sar rcx, 4
imul rcx, r14
add rbp, 30h ; '0'
cmp r15, rcx
jb short loc_9F899
loc_9F8D1:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbp, rax
mov rdi, r13
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,ulong>,std::allocator<std::pair<std::string const,ulong>>,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, [rbx+50h]
test rdi, rdi
jz short loc_9F8F9
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9F8F9:
mov rdi, r12
mov rsi, [rsp+arg_0]
mov rdx, rbx
mov rcx, [rsp+arg_8]
call _ZN5minja9MacroNodeC2ERKNS_8LocationEOSt10shared_ptrINS_12VariableExprEEOSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_INS_10ExpressionEEESaISI_EEOS4_INS_12TemplateNodeEE_cold_1; minja::MacroNode::MacroNode(minja::Location const&,std::shared_ptr<minja::VariableExpr> &&,std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>> &&,std::shared_ptr&&<minja::TemplateNode>) [clone]
mov rdi, rbp
call __Unwind_Resume
| long long minja::MacroNode::MacroNode(long long a1, _QWORD *a2, __int128 *a3, long long a4, __int128 *a5, int a6)
{
long long v6; // rax
__int128 v7; // xmm0
long long v8; // rdx
__int128 v9; // xmm1
long long v10; // rsi
long long result; // rax
unsigned long long v12; // rcx
long long v13; // rbp
unsigned long long v14; // r15
char v15; // [rsp+0h] [rbp-48h]
*(_QWORD *)a1 = &`vtable for'minja::TemplateNode + 2;
*(_QWORD *)(a1 + 8) = *a2;
v6 = a2[1];
*(_QWORD *)(a1 + 16) = v6;
if ( v6 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v6 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v6 + 8));
}
*(_QWORD *)(a1 + 24) = a2[2];
*(_QWORD *)a1 = &`vtable for'minja::MacroNode + 2;
*(_QWORD *)(a1 + 40) = 0LL;
v7 = *a3;
*((_QWORD *)a3 + 1) = 0LL;
*(_OWORD *)(a1 + 32) = v7;
*(_QWORD *)a3 = 0LL;
*(_OWORD *)(a1 + 48) = *(_OWORD *)a4;
v8 = *(_QWORD *)(a4 + 16);
*(_QWORD *)(a1 + 64) = v8;
*(_QWORD *)(a4 + 16) = 0LL;
*(_OWORD *)a4 = 0LL;
*(_QWORD *)(a1 + 80) = 0LL;
v9 = *a5;
*((_QWORD *)a5 + 1) = 0LL;
*(_OWORD *)(a1 + 72) = v9;
*(_QWORD *)a5 = 0LL;
*(_QWORD *)(a1 + 88) = a1 + 136;
*(_QWORD *)(a1 + 96) = 1LL;
*(_OWORD *)(a1 + 104) = 0LL;
*(_DWORD *)(a1 + 120) = 1065353216;
*(_OWORD *)(a1 + 128) = 0LL;
v10 = *(_QWORD *)(a1 + 48);
result = *(_QWORD *)(a1 + 56);
if ( result != v10 )
{
LODWORD(v12) = a1 + 40;
v13 = 0LL;
v14 = 0LL;
do
{
if ( *(_QWORD *)(v10 + v13 + 8) )
{
*(_QWORD *)std::__detail::_Map_base<std::string,std::pair<std::string const,unsigned long>,std::allocator<std::pair<std::string const,unsigned long>>,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>,true>::operator[](
(int)a1 + 88,
(int)v13 + (int)v10,
v8,
v12,
(_DWORD)a5,
a6,
v15) = v14;
v10 = *(_QWORD *)(a1 + 48);
result = *(_QWORD *)(a1 + 56);
}
++v14;
v12 = 0xAAAAAAAAAAAAAAABLL * ((result - v10) >> 4);
v13 += 48LL;
}
while ( v14 < v12 );
}
return result;
}
| MacroNode:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
LEA RAX,[0x22afd8]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],RAX
TEST RAX,RAX
JZ 0x0019f7e8
MOV RDI,qword ptr [0x0022bf88]
CMP byte ptr [RDI],0x0
JZ 0x0019f7e4
INC dword ptr [RAX + 0x8]
JMP 0x0019f7e8
LAB_0019f7e4:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0019f7e8:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RBX + 0x18],RAX
LEA RAX,[0x22b468]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
XOR EAX,EAX
MOV qword ptr [RBX + 0x28],RAX
MOVUPS XMM0,xmmword ptr [RDX]
MOV qword ptr [RDX + 0x8],RAX
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOV qword ptr [RDX],RAX
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RBX + 0x30],XMM0
MOV RDX,qword ptr [RCX + 0x10]
MOV qword ptr [RBX + 0x40],RDX
MOV qword ptr [RCX + 0x10],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RCX],XMM0
MOV qword ptr [RBX + 0x50],RAX
MOVUPS XMM1,xmmword ptr [R8]
MOV qword ptr [R8 + 0x8],RAX
MOVUPS xmmword ptr [RBX + 0x48],XMM1
MOV qword ptr [R8],RAX
LEA RAX,[RBX + 0x88]
MOV qword ptr [RBX + 0x58],RAX
MOV qword ptr [RBX + 0x60],0x1
MOVUPS xmmword ptr [RBX + 0x68],XMM0
MOV dword ptr [RBX + 0x78],0x3f800000
MOVUPS xmmword ptr [RBX + 0x80],XMM0
MOV RSI,qword ptr [RBX + 0x30]
MOV RAX,qword ptr [RBX + 0x38]
CMP RAX,RSI
JZ 0x0019f8d1
LEA RCX,[RBX + 0x10]
MOV qword ptr [RSP + 0x10],RCX
LEA RCX,[RBX + 0x28]
MOV qword ptr [RSP + 0x8],RCX
LEA R12,[RBX + 0x30]
LEA R13,[RBX + 0x58]
XOR EBP,EBP
MOV R14,-0x5555555555555555
XOR R15D,R15D
LAB_0019f899:
CMP qword ptr [RSI + RBP*0x1 + 0x8],0x0
JZ 0x0019f8b7
ADD RSI,RBP
LAB_0019f8a4:
MOV RDI,R13
CALL 0x0019fc74
LAB_0019f8ac:
MOV qword ptr [RAX],R15
MOV RSI,qword ptr [RBX + 0x30]
MOV RAX,qword ptr [RBX + 0x38]
LAB_0019f8b7:
INC R15
MOV RCX,RAX
SUB RCX,RSI
SAR RCX,0x4
IMUL RCX,R14
ADD RBP,0x30
CMP R15,RCX
JC 0x0019f899
LAB_0019f8d1:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&,
std::vector<std::pair<std::__cxx11::string, std::shared_ptr<minja::Expression> >,
std::allocator<std::pair<std::__cxx11::string, std::shared_ptr<minja::Expression> > > >&&,
std::shared_ptr<minja::TemplateNode>&&) */
void __thiscall
minja::MacroNode::MacroNode
(MacroNode *this,Location *param_1,shared_ptr *param_2,vector *param_3,shared_ptr *param_4
)
{
int8 uVar1;
ulong *puVar2;
long lVar3;
long lVar4;
long lVar5;
ulong uVar6;
*(int ***)this = &PTR___cxa_pure_virtual_0022afe8;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar5 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar5;
if (lVar5 != 0) {
if (*PTR___libc_single_threaded_0022bf88 == '\0') {
LOCK();
*(int *)(lVar5 + 8) = *(int *)(lVar5 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar5 + 8) = *(int *)(lVar5 + 8) + 1;
}
}
*(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10);
*(int ***)this = &PTR_do_render_0022b478;
*(int8 *)(this + 0x28) = 0;
uVar1 = *(int8 *)(param_2 + 8);
*(int8 *)(param_2 + 8) = 0;
*(int8 *)(this + 0x20) = *(int8 *)param_2;
*(int8 *)(this + 0x28) = uVar1;
*(int8 *)param_2 = 0;
uVar1 = *(int8 *)(param_3 + 8);
*(int8 *)(this + 0x30) = *(int8 *)param_3;
*(int8 *)(this + 0x38) = uVar1;
*(int8 *)(this + 0x40) = *(int8 *)(param_3 + 0x10);
*(int8 *)(param_3 + 0x10) = 0;
*(int8 *)param_3 = 0;
*(int8 *)(param_3 + 8) = 0;
*(int8 *)(this + 0x50) = 0;
uVar1 = *(int8 *)(param_4 + 8);
*(int8 *)(param_4 + 8) = 0;
*(int8 *)(this + 0x48) = *(int8 *)param_4;
*(int8 *)(this + 0x50) = uVar1;
*(int8 *)param_4 = 0;
*(MacroNode **)(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;
lVar5 = *(long *)(this + 0x30);
lVar3 = *(long *)(this + 0x38);
if (lVar3 != lVar5) {
lVar4 = 0;
uVar6 = 0;
do {
if (*(long *)(lVar5 + 8 + lVar4) != 0) {
/* try { // try from 0019f8a4 to 0019f8ab has its CatchHandler @ 0019f8e0 */
puVar2 = (ulong *)std::__detail::
_Map_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>,std::__detail::_Select1st,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,false,true>,true>
::operator[]((_Map_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>,std::__detail::_Select1st,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,false,true>,true>
*)(this + 0x58),(string *)(lVar5 + lVar4));
*puVar2 = uVar6;
lVar5 = *(long *)(this + 0x30);
lVar3 = *(long *)(this + 0x38);
}
uVar6 = uVar6 + 1;
lVar4 = lVar4 + 0x30;
} while (uVar6 < (ulong)((lVar3 - lVar5 >> 4) * -0x5555555555555555));
}
return;
}
| |
54,671 | mysql_stat | eloqsql/libmariadb/libmariadb/mariadb_lib.c | char * STDCALL
mysql_stat(MYSQL *mysql)
{
if (ma_simple_command(mysql, COM_STATISTICS,0,0,0,0))
return mysql->net.last_error;
mysql->net.read_pos[mysql->packet_length]=0; /* End of stat string */
if (!mysql->net.read_pos[0])
{
SET_CLIENT_ERROR(mysql, CR_WRONG_HOST_INFO , SQLSTATE_UNKNOWN, 0);
return mysql->net.last_error;
}
return((char*) mysql->net.read_pos);
} | O3 | c | mysql_stat:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x4d0(%rdi), %rax
movl $0x9, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq *0x10(%rax)
testl %eax, %eax
je 0x1be21
addq $0x97, %rbx
movq %rbx, %r14
jmp 0x1be8f
movq 0x20(%rbx), %rax
movq 0x358(%rbx), %rcx
movb $0x0, (%rax,%rcx)
movq 0x20(%rbx), %r14
cmpb $0x0, (%r14)
jne 0x1be8f
movl $0x7d9, 0x90(%rbx) # imm = 0x7D9
leaq 0x297(%rbx), %rdi
leaq 0x2cc6e(%rip), %rax # 0x48ac0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
xorl %r15d, %r15d
movb %r15b, 0x29c(%rbx)
leaq 0x97(%rbx), %r14
leaq 0x2cc59(%rip), %rax # 0x48ad0
movq 0x48(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
movq %r14, %rdi
callq 0x13220
movb %r15b, 0x296(%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| mysql_stat:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov rax, [rdi+4D0h]
mov esi, 9
xor edx, edx
xor ecx, ecx
xor r8d, r8d
xor r9d, r9d
call qword ptr [rax+10h]
test eax, eax
jz short loc_1BE21
add rbx, 97h
mov r14, rbx
jmp short loc_1BE8F
loc_1BE21:
mov rax, [rbx+20h]
mov rcx, [rbx+358h]
mov byte ptr [rax+rcx], 0
mov r14, [rbx+20h]
cmp byte ptr [r14], 0
jnz short loc_1BE8F
mov dword ptr [rbx+90h], 7D9h
lea rdi, [rbx+297h]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r15d, r15d
mov [rbx+29Ch], r15b
lea r14, [rbx+97h]
lea rax, client_errors
mov rsi, [rax+48h]
mov edx, 1FFh
mov rdi, r14
call _strncpy
mov [rbx+296h], r15b
loc_1BE8F:
mov rax, r14
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| _BYTE * mysql_stat(long long a1)
{
long long v1; // rax
_BYTE *v2; // r14
if ( (*(unsigned int ( **)(long long, long long, _QWORD, _QWORD, _QWORD, _QWORD, long long))(*(_QWORD *)(a1 + 1232)
+ 16LL))(
a1,
9LL,
0LL,
0LL,
0LL,
0LL,
v1) )
{
return (_BYTE *)(a1 + 151);
}
*(_BYTE *)(*(_QWORD *)(a1 + 32) + *(_QWORD *)(a1 + 856)) = 0;
v2 = *(_BYTE **)(a1 + 32);
if ( !*v2 )
{
*(_DWORD *)(a1 + 144) = 2009;
strncpy(a1 + 663, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 668) = 0;
v2 = (_BYTE *)(a1 + 151);
strncpy(a1 + 151, client_errors[9], 511LL);
*(_BYTE *)(a1 + 662) = 0;
}
return v2;
}
| mysql_stat:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x4d0]
MOV ESI,0x9
XOR EDX,EDX
XOR ECX,ECX
XOR R8D,R8D
XOR R9D,R9D
CALL qword ptr [RAX + 0x10]
TEST EAX,EAX
JZ 0x0011be21
ADD RBX,0x97
MOV R14,RBX
JMP 0x0011be8f
LAB_0011be21:
MOV RAX,qword ptr [RBX + 0x20]
MOV RCX,qword ptr [RBX + 0x358]
MOV byte ptr [RAX + RCX*0x1],0x0
MOV R14,qword ptr [RBX + 0x20]
CMP byte ptr [R14],0x0
JNZ 0x0011be8f
MOV dword ptr [RBX + 0x90],0x7d9
LEA RDI,[RBX + 0x297]
LEA RAX,[0x148ac0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
XOR R15D,R15D
MOV byte ptr [RBX + 0x29c],R15B
LEA R14,[RBX + 0x97]
LEA RAX,[0x148ad0]
MOV RSI,qword ptr [RAX + 0x48]
MOV EDX,0x1ff
MOV RDI,R14
CALL 0x00113220
MOV byte ptr [RBX + 0x296],R15B
LAB_0011be8f:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
char * mysql_stat(long param_1)
{
int iVar1;
char *__dest;
iVar1 = (**(code **)(*(long *)(param_1 + 0x4d0) + 0x10))(param_1,9,0,0,0,0);
if (iVar1 == 0) {
*(int1 *)(*(long *)(param_1 + 0x20) + *(long *)(param_1 + 0x358)) = 0;
__dest = *(char **)(param_1 + 0x20);
if (*__dest == '\0') {
*(int4 *)(param_1 + 0x90) = 0x7d9;
strncpy((char *)(param_1 + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x29c) = 0;
__dest = (char *)(param_1 + 0x97);
strncpy(__dest,PTR_s_Wrong_host_info_00148b18,0x1ff);
*(int1 *)(param_1 + 0x296) = 0;
}
}
else {
__dest = (char *)(param_1 + 0x97);
}
return __dest;
}
| |
54,672 | my_casedn_str_mb | eloqsql/strings/ctype-mb.c | size_t my_casedn_str_mb(CHARSET_INFO * cs, char *str)
{
register uint32 l;
register const uchar *map= cs->to_lower;
char *str_orig= str;
while (*str)
{
/* Pointing after the '\0' is safe here. */
if ((l= my_ismbchar(cs, str, str + cs->mbmaxlen)))
str+= l;
else
{
*str= (char) map[(uchar)*str];
str++;
}
}
return (size_t) (str - str_orig);
} | O3 | c | my_casedn_str_mb:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
cmpb $0x0, (%rsi)
movq %rsi, %rax
je 0xb2f18
movq %rdi, %r14
movq 0x48(%rdi), %r12
movq %rbx, %r15
movl 0x9c(%r14), %edx
addq %r15, %rdx
movq 0xb8(%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0xc0(%rax)
cmpl $0x2, %eax
jge 0xb2f08
movzbl (%r15), %eax
movb (%r12,%rax), %al
movb %al, (%r15)
movl $0x1, %ecx
jmp 0xb2f0a
movl %eax, %ecx
leaq (%r15,%rcx), %rax
cmpb $0x0, (%r15,%rcx)
movq %rax, %r15
jne 0xb2ed4
subq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| my_casedn_str_mb:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rsi
cmp byte ptr [rsi], 0
mov rax, rsi
jz short loc_B2F18
mov r14, rdi
mov r12, [rdi+48h]
mov r15, rbx
loc_B2ED4:
mov edx, [r14+9Ch]
add rdx, r15
mov rax, [r14+0B8h]
mov rdi, r14
mov rsi, r15
call qword ptr [rax+0C0h]
cmp eax, 2
jge short loc_B2F08
movzx eax, byte ptr [r15]
mov al, [r12+rax]
mov [r15], al
mov ecx, 1
jmp short loc_B2F0A
loc_B2F08:
mov ecx, eax
loc_B2F0A:
lea rax, [r15+rcx]
cmp byte ptr [r15+rcx], 0
mov r15, rax
jnz short loc_B2ED4
loc_B2F18:
sub rax, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long my_casedn_str_mb(long long a1, _BYTE *a2)
{
_BYTE *v2; // rax
long long v3; // r12
_BYTE *v4; // r15
int v5; // eax
long long v6; // rcx
bool v7; // zf
v2 = a2;
if ( *a2 )
{
v3 = *(_QWORD *)(a1 + 72);
v4 = a2;
do
{
v5 = (*(long long ( **)(long long, _BYTE *, _BYTE *))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
v4,
&v4[*(unsigned int *)(a1 + 156)]);
if ( v5 >= 2 )
{
v6 = (unsigned int)v5;
}
else
{
*v4 = *(_BYTE *)(v3 + (unsigned __int8)*v4);
v6 = 1LL;
}
v2 = &v4[v6];
v7 = v4[v6] == 0;
v4 += v6;
}
while ( !v7 );
}
return v2 - a2;
}
| my_casedn_str_mb:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RSI
CMP byte ptr [RSI],0x0
MOV RAX,RSI
JZ 0x001b2f18
MOV R14,RDI
MOV R12,qword ptr [RDI + 0x48]
MOV R15,RBX
LAB_001b2ed4:
MOV EDX,dword ptr [R14 + 0x9c]
ADD RDX,R15
MOV RAX,qword ptr [R14 + 0xb8]
MOV RDI,R14
MOV RSI,R15
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
JGE 0x001b2f08
MOVZX EAX,byte ptr [R15]
MOV AL,byte ptr [R12 + RAX*0x1]
MOV byte ptr [R15],AL
MOV ECX,0x1
JMP 0x001b2f0a
LAB_001b2f08:
MOV ECX,EAX
LAB_001b2f0a:
LEA RAX,[R15 + RCX*0x1]
CMP byte ptr [R15 + RCX*0x1],0x0
MOV R15,RAX
JNZ 0x001b2ed4
LAB_001b2f18:
SUB RAX,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
long my_casedn_str_mb(long param_1,byte *param_2)
{
byte *pbVar1;
long lVar2;
uint uVar3;
byte *pbVar4;
ulong uVar5;
byte *pbVar6;
pbVar4 = param_2;
if (*param_2 != 0) {
lVar2 = *(long *)(param_1 + 0x48);
pbVar6 = param_2;
do {
uVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))
(param_1,pbVar6,pbVar6 + *(uint *)(param_1 + 0x9c));
if ((int)uVar3 < 2) {
*pbVar6 = *(byte *)(lVar2 + (ulong)*pbVar6);
uVar5 = 1;
}
else {
uVar5 = (ulong)uVar3;
}
pbVar4 = pbVar6 + uVar5;
pbVar1 = pbVar6 + uVar5;
pbVar6 = pbVar4;
} while (*pbVar1 != 0);
}
return (long)pbVar4 - (long)param_2;
}
| |
54,673 | my_hash_init2 | eloqsql/mysys/hash.c | my_bool
my_hash_init2(PSI_memory_key psi_key, HASH *hash, uint growth_size,
CHARSET_INFO *charset, ulong size, size_t key_offset,
size_t key_length, my_hash_get_key get_key,
my_hash_function hash_function,
void (*free_element)(void*), uint flags)
{
my_bool res;
DBUG_ENTER("my_hash_init2");
DBUG_PRINT("enter",("hash:%p size: %u", hash, (uint) size));
hash->records=0;
hash->key_offset=key_offset;
hash->key_length=key_length;
hash->blength=1;
hash->get_key=get_key;
hash->hash_function= hash_function ? hash_function : my_hash_sort;
hash->free=free_element;
hash->flags=flags;
hash->charset=charset;
res= init_dynamic_array2(psi_key, &hash->array, sizeof(HASH_LINK), NULL, size,
growth_size, MYF((flags & HASH_THREAD_SPECIFIC ?
MY_THREAD_SPECIFIC : 0)));
DBUG_RETURN(res);
} | O0 | c | my_hash_init2:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl 0x30(%rbp), %eax
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
jmp 0xe5843
movq -0x10(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq 0x10(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq $0x1, 0x10(%rax)
movq 0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x50(%rax)
cmpq $0x0, 0x20(%rbp)
je 0xe588f
movq 0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0xe589c
leaq -0x126(%rip), %rax # 0xe5770
movq %rax, -0x40(%rbp)
jmp 0xe589c
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x58(%rax)
movq 0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x60(%rax)
movl 0x30(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x68(%rax)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x28, %rsi
movq -0x28(%rbp), %rax
movl %eax, %r8d
movl -0x14(%rbp), %r9d
movl 0x30(%rbp), %edx
andl $0x2, %edx
xorl %eax, %eax
movl $0x10000, %ecx # imm = 0x10000
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, %eax
movl $0x10, %edx
xorl %ecx, %ecx
movq %rax, (%rsp)
callq 0xe21b0
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| my_hash_init2:
push rbp
mov rbp, rsp
sub rsp, 50h
mov eax, [rbp+arg_20]
mov rax, [rbp+arg_18]
mov rax, [rbp+arg_10]
mov rax, [rbp+arg_8]
mov rax, [rbp+arg_0]
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
jmp short $+2
loc_E5843:
mov rax, [rbp+var_10]
mov qword ptr [rax+18h], 0
mov rcx, [rbp+var_30]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rcx, [rbp+arg_0]
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov rax, [rbp+var_10]
mov qword ptr [rax+10h], 1
mov rcx, [rbp+arg_8]
mov rax, [rbp+var_10]
mov [rax+50h], rcx
cmp [rbp+arg_10], 0
jz short loc_E588F
mov rax, [rbp+arg_10]
mov [rbp+var_40], rax
jmp short loc_E589C
loc_E588F:
lea rax, my_hash_sort
mov [rbp+var_40], rax
jmp short $+2
loc_E589C:
mov rcx, [rbp+var_40]
mov rax, [rbp+var_10]
mov [rax+58h], rcx
mov rcx, [rbp+arg_18]
mov rax, [rbp+var_10]
mov [rax+60h], rcx
mov ecx, [rbp+arg_20]
mov rax, [rbp+var_10]
mov [rax+20h], ecx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax+68h], rcx
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
add rsi, 28h ; '('
mov rax, [rbp+var_28]
mov r8d, eax
mov r9d, [rbp+var_14]
mov edx, [rbp+arg_20]
and edx, 2
xor eax, eax
mov ecx, 10000h
cmp edx, 0
cmovnz eax, ecx
mov eax, eax
mov edx, 10h
xor ecx, ecx
mov [rsp+50h+var_50], rax
call init_dynamic_array2
mov [rbp+var_31], al
mov al, [rbp+var_31]
mov [rbp+var_41], al
mov al, [rbp+var_41]
add rsp, 50h
pop rbp
retn
| char my_hash_init2(
unsigned int a1,
long long a2,
int a3,
long long a4,
unsigned int a5,
long long a6,
long long a7,
long long a8,
long long ( *a9)(long long a1, long long a2, long long a3),
long long a10,
int a11)
{
long long v11; // rsi
unsigned int v12; // eax
long long ( *v14)(long long, long long, long long); // [rsp+10h] [rbp-40h]
*(_QWORD *)(a2 + 24) = 0LL;
*(_QWORD *)a2 = a6;
*(_QWORD *)(a2 + 8) = a7;
*(_QWORD *)(a2 + 16) = 1LL;
*(_QWORD *)(a2 + 80) = a8;
if ( a9 )
v14 = a9;
else
v14 = my_hash_sort;
*(_QWORD *)(a2 + 88) = v14;
*(_QWORD *)(a2 + 96) = a10;
*(_DWORD *)(a2 + 32) = a11;
*(_QWORD *)(a2 + 104) = a4;
v11 = a2 + 40;
v12 = 0;
if ( (a11 & 2) != 0 )
v12 = 0x10000;
return init_dynamic_array2(a1, v11, 0x10u, 0LL, a5, a3, v12);
}
| my_hash_init2:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV EAX,dword ptr [RBP + 0x30]
MOV RAX,qword ptr [RBP + 0x28]
MOV RAX,qword ptr [RBP + 0x20]
MOV RAX,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + 0x10]
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
JMP 0x001e5843
LAB_001e5843:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x18],0x0
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],0x1
MOV RCX,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x50],RCX
CMP qword ptr [RBP + 0x20],0x0
JZ 0x001e588f
MOV RAX,qword ptr [RBP + 0x20]
MOV qword ptr [RBP + -0x40],RAX
JMP 0x001e589c
LAB_001e588f:
LEA RAX,[0x1e5770]
MOV qword ptr [RBP + -0x40],RAX
JMP 0x001e589c
LAB_001e589c:
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x58],RCX
MOV RCX,qword ptr [RBP + 0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x60],RCX
MOV ECX,dword ptr [RBP + 0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x20],ECX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x68],RCX
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x28
MOV RAX,qword ptr [RBP + -0x28]
MOV R8D,EAX
MOV R9D,dword ptr [RBP + -0x14]
MOV EDX,dword ptr [RBP + 0x30]
AND EDX,0x2
XOR EAX,EAX
MOV ECX,0x10000
CMP EDX,0x0
CMOVNZ EAX,ECX
MOV EAX,EAX
MOV EDX,0x10
XOR ECX,ECX
MOV qword ptr [RSP],RAX
CALL 0x001e21b0
MOV byte ptr [RBP + -0x31],AL
MOV AL,byte ptr [RBP + -0x31]
MOV byte ptr [RBP + -0x41],AL
MOV AL,byte ptr [RBP + -0x41]
ADD RSP,0x50
POP RBP
RET
|
int8
my_hash_init2(int4 param_1,int8 *param_2,int4 param_3,int8 param_4,
int4 param_5,int8 param_6,int8 param_7,int8 param_8,
code *param_9,int8 param_10,uint param_11)
{
int4 uVar1;
int8 uVar2;
code *local_48;
param_2[3] = 0;
*param_2 = param_6;
param_2[1] = param_7;
param_2[2] = 1;
param_2[10] = param_8;
if (param_9 == (code *)0x0) {
local_48 = my_hash_sort;
}
else {
local_48 = param_9;
}
param_2[0xb] = local_48;
param_2[0xc] = param_10;
*(uint *)(param_2 + 4) = param_11;
param_2[0xd] = param_4;
uVar1 = 0;
if ((param_11 & 2) != 0) {
uVar1 = 0x10000;
}
uVar2 = init_dynamic_array2(param_1,param_2 + 5,0x10,0,param_5,param_3,uVar1);
return uVar2;
}
| |
54,674 | mi_ft_del | eloqsql/storage/myisam/ft_update.c | int _mi_ft_del(MI_INFO *info, uint keynr, uchar *keybuf, const uchar *record,
my_off_t pos)
{
int error= -1;
FT_WORD *wlist;
DBUG_ENTER("_mi_ft_del");
DBUG_PRINT("enter",("keynr: %d",keynr));
if ((wlist=_mi_ft_parserecord(info, keynr, record, &info->ft_memroot)))
error=_mi_ft_erase(info,keynr,keybuf,wlist,pos);
free_root(&info->ft_memroot, MYF(MY_MARK_BLOCKS_FREE));
DBUG_PRINT("exit",("Return: %d",error));
DBUG_RETURN(error);
} | O3 | c | mi_ft_del:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rdx, %r15
movl %esi, %r12d
movq %rdi, %r13
leaq 0x90(%rdi), %rbx
movq %rcx, %rdx
movq %rbx, %rcx
callq 0x4983b
testq %rax, %rax
je 0x49dda
movq %r13, %rdi
movl %r12d, %esi
movq %r15, %rdx
movq %rax, %rcx
movq %r14, %r8
callq 0x49c28
movl %eax, %r14d
jmp 0x49de0
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
movl $0x2, %esi
movq %rbx, %rdi
callq 0x58287
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _mi_ft_del:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r8
mov r15, rdx
mov r12d, esi
mov r13, rdi
lea rbx, [rdi+90h]
mov rdx, rcx
mov rcx, rbx
call _mi_ft_parserecord
test rax, rax
jz short loc_49DDA
mov rdi, r13
mov esi, r12d
mov rdx, r15
mov rcx, rax
mov r8, r14
call _mi_ft_erase
mov r14d, eax
jmp short loc_49DE0
loc_49DDA:
mov r14d, 0FFFFFFFFh
loc_49DE0:
mov esi, 2
mov rdi, rbx
call free_root
mov eax, r14d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mi_ft_del(_QWORD *a1, long long a2, char *a3, long long a4, long long a5, __m128i a6)
{
_QWORD *v8; // rax
unsigned int v9; // r14d
v8 = mi_ft_parserecord(a1, a2, a4, (long long)(a1 + 18));
if ( v8 )
v9 = mi_ft_erase((long long)a1, a2, a3, v8, a5, a6);
else
v9 = -1;
free_root(a1 + 18, 2LL);
return v9;
}
| _mi_ft_del:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R8
MOV R15,RDX
MOV R12D,ESI
MOV R13,RDI
LEA RBX,[RDI + 0x90]
MOV RDX,RCX
MOV RCX,RBX
CALL 0x0014983b
TEST RAX,RAX
JZ 0x00149dda
MOV RDI,R13
MOV ESI,R12D
MOV RDX,R15
MOV RCX,RAX
MOV R8,R14
CALL 0x00149c28
MOV R14D,EAX
JMP 0x00149de0
LAB_00149dda:
MOV R14D,0xffffffff
LAB_00149de0:
MOV ESI,0x2
MOV RDI,RBX
CALL 0x00158287
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4
_mi_ft_del(long param_1,ulong param_2,int8 param_3,int8 param_4,int8 param_5)
{
int4 uVar1;
long lVar2;
lVar2 = _mi_ft_parserecord(param_1,param_2,param_4,param_1 + 0x90);
if (lVar2 == 0) {
uVar1 = 0xffffffff;
}
else {
uVar1 = _mi_ft_erase(param_1,param_2 & 0xffffffff,param_3,lVar2,param_5);
}
free_root(param_1 + 0x90,2);
return uVar1;
}
| |
54,675 | pick_next | eloqsql/storage/maria/ma_rt_split.c | static void pick_next(SplitStruct *node, int n_entries, double *g1, double *g2,
SplitStruct **choice, int *n_group, int n_dim)
{
SplitStruct *cur= node;
SplitStruct *end= node + n_entries;
double max_diff= -DBL_MAX;
for (; cur < end; cur++)
{
double diff;
double abs_diff;
if (cur->n_node)
{
continue;
}
diff= mbr_join_square(g1, cur->coords, n_dim) -
mbr_join_square(g2, cur->coords, n_dim);
abs_diff= fabs(diff);
if (abs_diff > max_diff)
{
max_diff= abs_diff;
*n_group= 1 + (diff > 0);
*choice= cur;
}
}
} | O0 | c | pick_next:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movsd 0xd5483(%rip), %xmm0 # 0x15a088
movsd %xmm0, -0x48(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x84ccb
movq -0x38(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x84c27
jmp 0x84cba
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rsi
movl 0x10(%rbp), %edx
callq 0x84d80
movsd %xmm0, -0x60(%rbp)
movq -0x20(%rbp), %rdi
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rsi
movl 0x10(%rbp), %edx
callq 0x84d80
movaps %xmm0, %xmm1
movsd -0x60(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
movsd -0x50(%rbp), %xmm0
movaps 0xd53cf(%rip), %xmm1 # 0x15a040
pand %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x58(%rbp), %xmm0
ucomisd -0x48(%rbp), %xmm0
jbe 0x84cb8
movsd -0x58(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
movsd -0x50(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
seta %al
andb $0x1, %al
movzbl %al, %ecx
addl $0x1, %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
jmp 0x84cba
movq -0x38(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x38(%rbp)
jmp 0x84c0a
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| pick_next:
push rbp
mov rbp, rsp
sub rsp, 60h
mov eax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_8]
mov [rbp+var_38], rax
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_C]
shl rcx, 5
add rax, rcx
mov [rbp+var_40], rax
movsd xmm0, cs:qword_15A088
movsd [rbp+var_48], xmm0
loc_84C0A:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_40]
jnb loc_84CCB
mov rax, [rbp+var_38]
cmp dword ptr [rax+8], 0
jz short loc_84C27
jmp loc_84CBA
loc_84C27:
mov rdi, [rbp+var_18]
mov rax, [rbp+var_38]
mov rsi, [rax+18h]
mov edx, [rbp+arg_0]
call mbr_join_square
movsd [rbp+var_60], xmm0
mov rdi, [rbp+var_20]
mov rax, [rbp+var_38]
mov rsi, [rax+18h]
mov edx, [rbp+arg_0]
call mbr_join_square
movaps xmm1, xmm0
movsd xmm0, [rbp+var_60]
subsd xmm0, xmm1
movsd [rbp+var_50], xmm0
movsd xmm0, [rbp+var_50]
movaps xmm1, cs:xmmword_15A040
pand xmm0, xmm1
movsd [rbp+var_58], xmm0
movsd xmm0, [rbp+var_58]
ucomisd xmm0, [rbp+var_48]
jbe short loc_84CB8
movsd xmm0, [rbp+var_58]
movsd [rbp+var_48], xmm0
movsd xmm0, [rbp+var_50]
xorps xmm1, xmm1
ucomisd xmm0, xmm1
setnbe al
and al, 1
movzx ecx, al
add ecx, 1
mov rax, [rbp+var_30]
mov [rax], ecx
mov rcx, [rbp+var_38]
mov rax, [rbp+var_28]
mov [rax], rcx
loc_84CB8:
jmp short $+2
loc_84CBA:
mov rax, [rbp+var_38]
add rax, 20h ; ' '
mov [rbp+var_38], rax
jmp loc_84C0A
loc_84CCB:
add rsp, 60h
pop rbp
retn
| unsigned long long pick_next(
unsigned long long a1,
int a2,
long long a3,
long long a4,
unsigned long long *a5,
_DWORD *a6,
unsigned int a7)
{
unsigned long long result; // rax
double v8; // [rsp+0h] [rbp-60h]
double v9; // [rsp+8h] [rbp-58h]
double v10; // [rsp+10h] [rbp-50h]
double v11; // [rsp+18h] [rbp-48h]
unsigned long long v12; // [rsp+28h] [rbp-38h]
v12 = a1;
v11 = -1.797693134862316e308;
while ( 1 )
{
result = v12;
if ( v12 >= 32LL * a2 + a1 )
break;
if ( !*(_DWORD *)(v12 + 8) )
{
v8 = mbr_join_square(a3, *(_QWORD *)(v12 + 24), a7);
v10 = v8 - mbr_join_square(a4, *(_QWORD *)(v12 + 24), a7);
v9 = *(double *)_mm_and_si128((__m128i)*(unsigned long long *)&v10, (__m128i)xmmword_15A040).m128i_i64;
if ( v9 > v11 )
{
v11 = v9;
*a6 = (v10 > 0.0) + 1;
*a5 = v12;
}
}
v12 += 32LL;
}
return result;
}
| pick_next:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0xc]
SHL RCX,0x5
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
MOVSD XMM0,qword ptr [0x0025a088]
MOVSD qword ptr [RBP + -0x48],XMM0
LAB_00184c0a:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x00184ccb
MOV RAX,qword ptr [RBP + -0x38]
CMP dword ptr [RAX + 0x8],0x0
JZ 0x00184c27
JMP 0x00184cba
LAB_00184c27:
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RAX + 0x18]
MOV EDX,dword ptr [RBP + 0x10]
CALL 0x00184d80
MOVSD qword ptr [RBP + -0x60],XMM0
MOV RDI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RAX + 0x18]
MOV EDX,dword ptr [RBP + 0x10]
CALL 0x00184d80
MOVAPS XMM1,XMM0
MOVSD XMM0,qword ptr [RBP + -0x60]
SUBSD XMM0,XMM1
MOVSD qword ptr [RBP + -0x50],XMM0
MOVSD XMM0,qword ptr [RBP + -0x50]
MOVAPS XMM1,xmmword ptr [0x0025a040]
PAND XMM0,XMM1
MOVSD qword ptr [RBP + -0x58],XMM0
MOVSD XMM0,qword ptr [RBP + -0x58]
UCOMISD XMM0,qword ptr [RBP + -0x48]
JBE 0x00184cb8
MOVSD XMM0,qword ptr [RBP + -0x58]
MOVSD qword ptr [RBP + -0x48],XMM0
MOVSD XMM0,qword ptr [RBP + -0x50]
XORPS XMM1,XMM1
UCOMISD XMM0,XMM1
SETA AL
AND AL,0x1
MOVZX ECX,AL
ADD ECX,0x1
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],ECX
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
LAB_00184cb8:
JMP 0x00184cba
LAB_00184cba:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x20
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00184c0a
LAB_00184ccb:
ADD RSP,0x60
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void pick_next(ulong param_1,int param_2,int8 param_3,int8 param_4,ulong *param_5,
int *param_6,int4 param_7)
{
double dVar1;
double dVar2;
int4 local_58;
int4 uStack_54;
int8 local_50;
int8 local_40;
local_50 = DAT_0025a088;
for (local_40 = param_1; local_40 < param_1 + (long)param_2 * 0x20; local_40 = local_40 + 0x20) {
if (*(int *)(local_40 + 8) == 0) {
dVar1 = (double)mbr_join_square(param_3,*(int8 *)(local_40 + 0x18),param_7);
dVar2 = (double)mbr_join_square(param_4,*(int8 *)(local_40 + 0x18),param_7);
dVar1 = dVar1 - dVar2;
local_58 = SUB84(dVar1,0);
uStack_54 = (uint)((ulong)dVar1 >> 0x20);
if (local_50 < (double)CONCAT44(uStack_54 & _UNK_0025a044,local_58 & _DAT_0025a040)) {
local_50 = (double)CONCAT44(uStack_54 & _UNK_0025a044,local_58 & _DAT_0025a040);
*param_6 = (0.0 < dVar1) + 1;
*param_5 = local_40;
}
}
}
return;
}
| |
54,676 | ggml_opt_default_params | ngxson[P]ggml-easy/ggml/src/ggml-opt.cpp | struct ggml_opt_params ggml_opt_default_params(
ggml_backend_sched_t backend_sched,
struct ggml_context * ctx_compute,
struct ggml_tensor * inputs,
struct ggml_tensor * outputs,
enum ggml_opt_loss_type loss_type) {
return {
/*backend_sched =*/ backend_sched,
/*ctx_compute =*/ ctx_compute,
/*inputs =*/ inputs,
/*logits =*/ outputs,
/*loss_type =*/ loss_type,
/*build_type =*/ GGML_OPT_BUILD_TYPE_OPT,
/*opt_period =*/ 1,
/*get_opt_pars =*/ ggml_opt_get_default_optimizer_params,
/*get_opt_pars_ud =*/ nullptr,
};
} | O2 | cpp | ggml_opt_default_params:
movq %rdi, %rax
movq %rsi, (%rdi)
movq %rdx, 0x8(%rdi)
movq %rcx, 0x10(%rdi)
movq %r8, 0x18(%rdi)
movl %r9d, 0x20(%rdi)
movabsq $0x100000002, %rcx # imm = 0x100000002
movq %rcx, 0x24(%rdi)
movq 0x3f03e(%rip), %rcx # 0x6cfb8
movq %rcx, 0x30(%rdi)
andq $0x0, 0x38(%rdi)
retq
| ggml_opt_default_params:
mov rax, rdi
mov [rdi], rsi
mov [rdi+8], rdx
mov [rdi+10h], rcx
mov [rdi+18h], r8
mov [rdi+20h], r9d
mov rcx, 100000002h
mov [rdi+24h], rcx
mov rcx, cs:ggml_opt_get_default_optimizer_params_ptr
mov [rdi+30h], rcx
and qword ptr [rdi+38h], 0
retn
| long long ggml_opt_default_params(long long a1, long long a2, long long a3, long long a4, long long a5, int a6)
{
long long result; // rax
result = a1;
*(_QWORD *)a1 = a2;
*(_QWORD *)(a1 + 8) = a3;
*(_QWORD *)(a1 + 16) = a4;
*(_QWORD *)(a1 + 24) = a5;
*(_DWORD *)(a1 + 32) = a6;
*(_QWORD *)(a1 + 36) = 0x100000002LL;
*(_QWORD *)(a1 + 48) = ggml_opt_get_default_optimizer_params;
*(_QWORD *)(a1 + 56) = 0LL;
return result;
}
| ggml_opt_default_params:
MOV RAX,RDI
MOV qword ptr [RDI],RSI
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RDI + 0x10],RCX
MOV qword ptr [RDI + 0x18],R8
MOV dword ptr [RDI + 0x20],R9D
MOV RCX,0x100000002
MOV qword ptr [RDI + 0x24],RCX
MOV RCX,qword ptr [0x0016cfb8]
MOV qword ptr [RDI + 0x30],RCX
AND qword ptr [RDI + 0x38],0x0
RET
|
int8 *
ggml_opt_default_params
(int8 *param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int4 param_6)
{
*param_1 = param_2;
param_1[1] = param_3;
param_1[2] = param_4;
param_1[3] = param_5;
*(int4 *)(param_1 + 4) = param_6;
*(int8 *)((long)param_1 + 0x24) = 0x100000002;
param_1[6] = PTR_ggml_opt_get_default_optimizer_params_0016cfb8;
param_1[7] = 0;
return param_1;
}
| |
54,677 | test_conc167 | eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c | static int test_conc167(MYSQL *mysql)
{
MYSQL_STMT *stmt= mysql_stmt_init(mysql);
MYSQL_BIND bind[3];
char buffer[100];
int bit1=0, bit2=0;
int rc;
const char *stmt_str= "SELECT a,b,c FROM conc168";
rc= mysql_query(mysql, "DROP TABLE IF EXISTS conc168");
check_mysql_rc(rc, mysql);
rc= mysql_query(mysql, "CREATE TABLE conc168(a bit, b bit, c varchar(10))");
check_mysql_rc(rc, mysql);
rc= mysql_query(mysql, "INSERT INTO conc168 VALUES (1,0, 'test12345')");
check_mysql_rc(rc, mysql);
memset(bind, 0, 3 * sizeof(MYSQL_BIND));
bind[0].buffer= &bit1;
bind[0].buffer_type= MYSQL_TYPE_BIT;
bind[0].buffer_length= sizeof(int);
bind[1].buffer= &bit2;
bind[1].buffer_type= MYSQL_TYPE_BIT;
bind[1].buffer_length= sizeof(int);
bind[2].buffer= buffer;
bind[2].buffer_type= MYSQL_TYPE_STRING;
bind[2].buffer_length= 100;
rc= mysql_stmt_prepare(stmt, SL(stmt_str));
check_stmt_rc(rc, stmt);
rc= mysql_stmt_execute(stmt);
check_stmt_rc(rc, stmt);
rc= mysql_stmt_bind_result(stmt, bind);
check_stmt_rc(rc, stmt);
rc= mysql_stmt_store_result(stmt);
check_stmt_rc(rc, stmt);
rc= mysql_stmt_fetch(stmt);
check_stmt_rc(rc, stmt);
diag("bit=%d %d char=%s", bit1, bit2, buffer);
mysql_stmt_close(stmt);
return OK;
} | O0 | c | test_conc167:
pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp # imm = 0x240
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x80(%rbp)
movq -0x80(%rbp), %rdi
callq 0x44950
movq %rax, -0x88(%rbp)
movl $0x0, -0x1e4(%rbp)
movl $0x0, -0x1e8(%rbp)
leaq 0x4c216(%rip), %rax # 0x673fd
movq %rax, -0x1f8(%rbp)
movq -0x80(%rbp), %rdi
leaq 0x4c21e(%rip), %rsi # 0x67417
callq 0x38a70
movl %eax, -0x1ec(%rbp)
cmpl $0x0, -0x1ec(%rbp)
je 0x1b268
movl -0x1ec(%rbp), %eax
movl %eax, -0x204(%rbp)
movq -0x80(%rbp), %rdi
callq 0x3c3f0
movq %rax, -0x200(%rbp)
movq -0x80(%rbp), %rdi
callq 0x3c3c0
movl -0x204(%rbp), %esi
movq -0x200(%rbp), %rdx
movl %eax, %ecx
leaq 0x4a48d(%rip), %rdi # 0x656d5
leaq 0x4ae1e(%rip), %r8 # 0x6606d
movl $0x105e, %r9d # imm = 0x105E
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x74(%rbp)
jmp 0x1b5df
jmp 0x1b26a
movq -0x80(%rbp), %rdi
leaq 0x4c1bf(%rip), %rsi # 0x67434
callq 0x38a70
movl %eax, -0x1ec(%rbp)
cmpl $0x0, -0x1ec(%rbp)
je 0x1b2e4
movl -0x1ec(%rbp), %eax
movl %eax, -0x214(%rbp)
movq -0x80(%rbp), %rdi
callq 0x3c3f0
movq %rax, -0x210(%rbp)
movq -0x80(%rbp), %rdi
callq 0x3c3c0
movl -0x214(%rbp), %esi
movq -0x210(%rbp), %rdx
movl %eax, %ecx
leaq 0x4a411(%rip), %rdi # 0x656d5
leaq 0x4ada2(%rip), %r8 # 0x6606d
movl $0x1060, %r9d # imm = 0x1060
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x74(%rbp)
jmp 0x1b5df
jmp 0x1b2e6
movq -0x80(%rbp), %rdi
leaq 0x4c175(%rip), %rsi # 0x67466
callq 0x38a70
movl %eax, -0x1ec(%rbp)
cmpl $0x0, -0x1ec(%rbp)
je 0x1b360
movl -0x1ec(%rbp), %eax
movl %eax, -0x224(%rbp)
movq -0x80(%rbp), %rdi
callq 0x3c3f0
movq %rax, -0x220(%rbp)
movq -0x80(%rbp), %rdi
callq 0x3c3c0
movl -0x224(%rbp), %esi
movq -0x220(%rbp), %rdx
movl %eax, %ecx
leaq 0x4a395(%rip), %rdi # 0x656d5
leaq 0x4ad26(%rip), %r8 # 0x6606d
movl $0x1062, %r9d # imm = 0x1062
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x74(%rbp)
jmp 0x1b5df
jmp 0x1b362
leaq -0x1e0(%rbp), %rdi
xorl %esi, %esi
movl $0x150, %edx # imm = 0x150
callq 0x14260
leaq -0x1e4(%rbp), %rax
movq %rax, -0x1d0(%rbp)
movl $0x10, -0x180(%rbp)
movq $0x4, -0x1a0(%rbp)
leaq -0x1e8(%rbp), %rax
movq %rax, -0x160(%rbp)
movl $0x10, -0x110(%rbp)
movq $0x4, -0x130(%rbp)
leaq -0x70(%rbp), %rax
movq %rax, -0xf0(%rbp)
movl $0xfe, -0xa0(%rbp)
movq $0x64, -0xc0(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x238(%rbp)
movq -0x1f8(%rbp), %rax
movq %rax, -0x230(%rbp)
movq -0x1f8(%rbp), %rdi
callq 0x141a0
movq -0x238(%rbp), %rdi
movq -0x230(%rbp), %rsi
movq %rax, %rdx
callq 0x45070
movl %eax, -0x1ec(%rbp)
cmpl $0x0, -0x1ec(%rbp)
je 0x1b45d
movq -0x88(%rbp), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x4a152(%rip), %rdi # 0x65590
leaq 0x4ac28(%rip), %rdx # 0x6606d
movl $0x1070, %ecx # imm = 0x1070
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x74(%rbp)
jmp 0x1b5df
jmp 0x1b45f
movq -0x88(%rbp), %rdi
callq 0x46580
movl %eax, -0x1ec(%rbp)
cmpl $0x0, -0x1ec(%rbp)
je 0x1b4af
movq -0x88(%rbp), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x4a100(%rip), %rdi # 0x65590
leaq 0x4abd6(%rip), %rdx # 0x6606d
movl $0x1073, %ecx # imm = 0x1073
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x74(%rbp)
jmp 0x1b5df
jmp 0x1b4b1
movq -0x88(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0x43940
movsbl %al, %eax
movl %eax, -0x1ec(%rbp)
cmpl $0x0, -0x1ec(%rbp)
je 0x1b50b
movq -0x88(%rbp), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x4a0a4(%rip), %rdi # 0x65590
leaq 0x4ab7a(%rip), %rdx # 0x6606d
movl $0x1076, %ecx # imm = 0x1076
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x74(%rbp)
jmp 0x1b5df
jmp 0x1b50d
movq -0x88(%rbp), %rdi
callq 0x454d0
movl %eax, -0x1ec(%rbp)
cmpl $0x0, -0x1ec(%rbp)
je 0x1b55d
movq -0x88(%rbp), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x4a052(%rip), %rdi # 0x65590
leaq 0x4ab28(%rip), %rdx # 0x6606d
movl $0x1079, %ecx # imm = 0x1079
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x74(%rbp)
jmp 0x1b5df
jmp 0x1b55f
movq -0x88(%rbp), %rdi
callq 0x44020
movl %eax, -0x1ec(%rbp)
cmpl $0x0, -0x1ec(%rbp)
je 0x1b5ac
movq -0x88(%rbp), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x4a000(%rip), %rdi # 0x65590
leaq 0x4aad6(%rip), %rdx # 0x6606d
movl $0x107c, %ecx # imm = 0x107C
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x74(%rbp)
jmp 0x1b5df
jmp 0x1b5ae
movl -0x1e4(%rbp), %esi
movl -0x1e8(%rbp), %edx
leaq -0x70(%rbp), %rcx
leaq 0x4becf(%rip), %rdi # 0x67494
movb $0x0, %al
callq 0x2fc40
movq -0x88(%rbp), %rdi
callq 0x43eb0
movl $0x0, -0x74(%rbp)
movl -0x74(%rbp), %eax
movl %eax, -0x23c(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x1b609
movl -0x23c(%rbp), %eax
addq $0x240, %rsp # imm = 0x240
popq %rbp
retq
callq 0x144c0
nop
| test_conc167:
push rbp
mov rbp, rsp
sub rsp, 240h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_80], rdi
mov rdi, [rbp+var_80]
call mysql_stmt_init
mov [rbp+var_88], rax
mov [rbp+var_1E4], 0
mov [rbp+var_1E8], 0
lea rax, aSelectABCFromC; "SELECT a,b,c FROM conc168"
mov [rbp+var_1F8], rax
mov rdi, [rbp+var_80]
lea rsi, aDropTableIfExi_4; "DROP TABLE IF EXISTS conc168"
call mysql_query
mov [rbp+var_1EC], eax
cmp [rbp+var_1EC], 0
jz short loc_1B268
mov eax, [rbp+var_1EC]
mov [rbp+var_204], eax
mov rdi, [rbp+var_80]
call mysql_error
mov [rbp+var_200], rax
mov rdi, [rbp+var_80]
call mysql_errno
mov esi, [rbp+var_204]
mov rdx, [rbp+var_200]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 105Eh
mov al, 0
call diag
mov [rbp+var_74], 1
jmp loc_1B5DF
loc_1B268:
jmp short $+2
loc_1B26A:
mov rdi, [rbp+var_80]
lea rsi, aCreateTableCon; "CREATE TABLE conc168(a bit, b bit, c va"...
call mysql_query
mov [rbp+var_1EC], eax
cmp [rbp+var_1EC], 0
jz short loc_1B2E4
mov eax, [rbp+var_1EC]
mov [rbp+var_214], eax
mov rdi, [rbp+var_80]
call mysql_error
mov [rbp+var_210], rax
mov rdi, [rbp+var_80]
call mysql_errno
mov esi, [rbp+var_214]
mov rdx, [rbp+var_210]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 1060h
mov al, 0
call diag
mov [rbp+var_74], 1
jmp loc_1B5DF
loc_1B2E4:
jmp short $+2
loc_1B2E6:
mov rdi, [rbp+var_80]
lea rsi, aInsertIntoConc; "INSERT INTO conc168 VALUES (1,0, 'test1"...
call mysql_query
mov [rbp+var_1EC], eax
cmp [rbp+var_1EC], 0
jz short loc_1B360
mov eax, [rbp+var_1EC]
mov [rbp+var_224], eax
mov rdi, [rbp+var_80]
call mysql_error
mov [rbp+var_220], rax
mov rdi, [rbp+var_80]
call mysql_errno
mov esi, [rbp+var_224]
mov rdx, [rbp+var_220]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 1062h
mov al, 0
call diag
mov [rbp+var_74], 1
jmp loc_1B5DF
loc_1B360:
jmp short $+2
loc_1B362:
lea rdi, [rbp+var_1E0]
xor esi, esi
mov edx, 150h
call _memset
lea rax, [rbp+var_1E4]
mov [rbp+var_1D0], rax
mov [rbp+var_180], 10h
mov [rbp+var_1A0], 4
lea rax, [rbp+var_1E8]
mov [rbp+var_160], rax
mov [rbp+var_110], 10h
mov [rbp+var_130], 4
lea rax, [rbp+var_70]
mov [rbp+var_F0], rax
mov [rbp+var_A0], 0FEh
mov [rbp+var_C0], 64h ; 'd'
mov rax, [rbp+var_88]
mov [rbp+var_238], rax
mov rax, [rbp+var_1F8]
mov [rbp+var_230], rax
mov rdi, [rbp+var_1F8]
call _strlen
mov rdi, [rbp+var_238]
mov rsi, [rbp+var_230]
mov rdx, rax
call mysql_stmt_prepare
mov [rbp+var_1EC], eax
cmp [rbp+var_1EC], 0
jz short loc_1B45D
mov rdi, [rbp+var_88]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 1070h
mov al, 0
call diag
mov [rbp+var_74], 1
jmp loc_1B5DF
loc_1B45D:
jmp short $+2
loc_1B45F:
mov rdi, [rbp+var_88]
call mysql_stmt_execute
mov [rbp+var_1EC], eax
cmp [rbp+var_1EC], 0
jz short loc_1B4AF
mov rdi, [rbp+var_88]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 1073h
mov al, 0
call diag
mov [rbp+var_74], 1
jmp loc_1B5DF
loc_1B4AF:
jmp short $+2
loc_1B4B1:
mov rdi, [rbp+var_88]
lea rsi, [rbp+var_1E0]
call mysql_stmt_bind_result
movsx eax, al
mov [rbp+var_1EC], eax
cmp [rbp+var_1EC], 0
jz short loc_1B50B
mov rdi, [rbp+var_88]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 1076h
mov al, 0
call diag
mov [rbp+var_74], 1
jmp loc_1B5DF
loc_1B50B:
jmp short $+2
loc_1B50D:
mov rdi, [rbp+var_88]
call mysql_stmt_store_result
mov [rbp+var_1EC], eax
cmp [rbp+var_1EC], 0
jz short loc_1B55D
mov rdi, [rbp+var_88]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 1079h
mov al, 0
call diag
mov [rbp+var_74], 1
jmp loc_1B5DF
loc_1B55D:
jmp short $+2
loc_1B55F:
mov rdi, [rbp+var_88]
call mysql_stmt_fetch
mov [rbp+var_1EC], eax
cmp [rbp+var_1EC], 0
jz short loc_1B5AC
mov rdi, [rbp+var_88]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 107Ch
mov al, 0
call diag
mov [rbp+var_74], 1
jmp short loc_1B5DF
loc_1B5AC:
jmp short $+2
loc_1B5AE:
mov esi, [rbp+var_1E4]
mov edx, [rbp+var_1E8]
lea rcx, [rbp+var_70]
lea rdi, aBitDDCharS; "bit=%d %d char=%s"
mov al, 0
call diag
mov rdi, [rbp+var_88]
call mysql_stmt_close
mov [rbp+var_74], 0
loc_1B5DF:
mov eax, [rbp+var_74]
mov [rbp+var_23C], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_1B609
mov eax, [rbp+var_23C]
add rsp, 240h
pop rbp
retn
loc_1B609:
call ___stack_chk_fail
| long long test_conc167(long long a1)
{
int v1; // eax
int v2; // eax
int v3; // eax
long long v4; // rax
int v5; // eax
int v6; // r8d
int v7; // r9d
int v8; // eax
int v9; // r8d
int v10; // r9d
int v11; // eax
int v12; // r8d
int v13; // r9d
int v14; // eax
int v15; // r8d
int v16; // r9d
int v17; // r8d
int v18; // r9d
int v19; // eax
int v20; // r8d
int v21; // r9d
long long v23; // [rsp+8h] [rbp-238h]
int v24; // [rsp+20h] [rbp-220h]
int v25; // [rsp+30h] [rbp-210h]
int v26; // [rsp+40h] [rbp-200h]
int v27; // [rsp+54h] [rbp-1ECh]
int v28; // [rsp+54h] [rbp-1ECh]
int v29; // [rsp+54h] [rbp-1ECh]
int v30; // [rsp+58h] [rbp-1E8h] BYREF
int v31; // [rsp+5Ch] [rbp-1E4h] BYREF
_BYTE v32[16]; // [rsp+60h] [rbp-1E0h] BYREF
int *v33; // [rsp+70h] [rbp-1D0h]
long long v34; // [rsp+A0h] [rbp-1A0h]
int v35; // [rsp+C0h] [rbp-180h]
int *v36; // [rsp+E0h] [rbp-160h]
long long v37; // [rsp+110h] [rbp-130h]
int v38; // [rsp+130h] [rbp-110h]
_BYTE *v39; // [rsp+150h] [rbp-F0h]
long long v40; // [rsp+180h] [rbp-C0h]
int v41; // [rsp+1A0h] [rbp-A0h]
long long v42; // [rsp+1B8h] [rbp-88h]
long long v43; // [rsp+1C0h] [rbp-80h]
_BYTE v45[104]; // [rsp+1D0h] [rbp-70h] BYREF
unsigned long long v46; // [rsp+238h] [rbp-8h]
v46 = __readfsqword(0x28u);
v43 = a1;
v42 = mysql_stmt_init(a1);
v31 = 0;
v30 = 0;
v27 = mysql_query(a1, "DROP TABLE IF EXISTS conc168");
if ( v27 )
{
v26 = mysql_error(v43);
v1 = mysql_errno(v43);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v27,
v26,
v1,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
4190);
return 1;
}
else
{
v28 = mysql_query(v43, "CREATE TABLE conc168(a bit, b bit, c varchar(10))");
if ( v28 )
{
v25 = mysql_error(v43);
v2 = mysql_errno(v43);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v28,
v25,
v2,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
4192);
return 1;
}
else
{
v29 = mysql_query(v43, "INSERT INTO conc168 VALUES (1,0, 'test12345')");
if ( v29 )
{
v24 = mysql_error(v43);
v3 = mysql_errno(v43);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v29,
v24,
v3,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
4194);
return 1;
}
else
{
memset(v32, 0LL, 336LL);
v33 = &v31;
v35 = 16;
v34 = 4LL;
v36 = &v30;
v38 = 16;
v37 = 4LL;
v39 = v45;
v41 = 254;
v40 = 100LL;
v23 = v42;
v4 = strlen("SELECT a,b,c FROM conc168");
if ( (unsigned int)mysql_stmt_prepare(v23, "SELECT a,b,c FROM conc168", v4) )
{
v5 = mysql_stmt_error(v42);
diag(
(unsigned int)"Error: %s (%s: %d)",
v5,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
4208,
v6,
v7);
return 1;
}
else if ( (unsigned int)mysql_stmt_execute(v42) )
{
v8 = mysql_stmt_error(v42);
diag(
(unsigned int)"Error: %s (%s: %d)",
v8,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
4211,
v9,
v10);
return 1;
}
else if ( (unsigned __int8)mysql_stmt_bind_result(v42, v32) )
{
v11 = mysql_stmt_error(v42);
diag(
(unsigned int)"Error: %s (%s: %d)",
v11,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
4214,
v12,
v13);
return 1;
}
else if ( (unsigned int)mysql_stmt_store_result(v42) )
{
v14 = mysql_stmt_error(v42);
diag(
(unsigned int)"Error: %s (%s: %d)",
v14,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
4217,
v15,
v16);
return 1;
}
else if ( (unsigned int)mysql_stmt_fetch(v42) )
{
v19 = mysql_stmt_error(v42);
diag(
(unsigned int)"Error: %s (%s: %d)",
v19,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
4220,
v20,
v21);
return 1;
}
else
{
diag((unsigned int)"bit=%d %d char=%s", v31, v30, (unsigned int)v45, v17, v18);
mysql_stmt_close(v42);
return 0;
}
}
}
}
}
| test_conc167:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x240
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x80],RDI
MOV RDI,qword ptr [RBP + -0x80]
CALL 0x00144950
MOV qword ptr [RBP + -0x88],RAX
MOV dword ptr [RBP + -0x1e4],0x0
MOV dword ptr [RBP + -0x1e8],0x0
LEA RAX,[0x1673fd]
MOV qword ptr [RBP + -0x1f8],RAX
MOV RDI,qword ptr [RBP + -0x80]
LEA RSI,[0x167417]
CALL 0x00138a70
MOV dword ptr [RBP + -0x1ec],EAX
CMP dword ptr [RBP + -0x1ec],0x0
JZ 0x0011b268
MOV EAX,dword ptr [RBP + -0x1ec]
MOV dword ptr [RBP + -0x204],EAX
MOV RDI,qword ptr [RBP + -0x80]
CALL 0x0013c3f0
MOV qword ptr [RBP + -0x200],RAX
MOV RDI,qword ptr [RBP + -0x80]
CALL 0x0013c3c0
MOV ESI,dword ptr [RBP + -0x204]
MOV RDX,qword ptr [RBP + -0x200]
MOV ECX,EAX
LEA RDI,[0x1656d5]
LEA R8,[0x16606d]
MOV R9D,0x105e
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x74],0x1
JMP 0x0011b5df
LAB_0011b268:
JMP 0x0011b26a
LAB_0011b26a:
MOV RDI,qword ptr [RBP + -0x80]
LEA RSI,[0x167434]
CALL 0x00138a70
MOV dword ptr [RBP + -0x1ec],EAX
CMP dword ptr [RBP + -0x1ec],0x0
JZ 0x0011b2e4
MOV EAX,dword ptr [RBP + -0x1ec]
MOV dword ptr [RBP + -0x214],EAX
MOV RDI,qword ptr [RBP + -0x80]
CALL 0x0013c3f0
MOV qword ptr [RBP + -0x210],RAX
MOV RDI,qword ptr [RBP + -0x80]
CALL 0x0013c3c0
MOV ESI,dword ptr [RBP + -0x214]
MOV RDX,qword ptr [RBP + -0x210]
MOV ECX,EAX
LEA RDI,[0x1656d5]
LEA R8,[0x16606d]
MOV R9D,0x1060
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x74],0x1
JMP 0x0011b5df
LAB_0011b2e4:
JMP 0x0011b2e6
LAB_0011b2e6:
MOV RDI,qword ptr [RBP + -0x80]
LEA RSI,[0x167466]
CALL 0x00138a70
MOV dword ptr [RBP + -0x1ec],EAX
CMP dword ptr [RBP + -0x1ec],0x0
JZ 0x0011b360
MOV EAX,dword ptr [RBP + -0x1ec]
MOV dword ptr [RBP + -0x224],EAX
MOV RDI,qword ptr [RBP + -0x80]
CALL 0x0013c3f0
MOV qword ptr [RBP + -0x220],RAX
MOV RDI,qword ptr [RBP + -0x80]
CALL 0x0013c3c0
MOV ESI,dword ptr [RBP + -0x224]
MOV RDX,qword ptr [RBP + -0x220]
MOV ECX,EAX
LEA RDI,[0x1656d5]
LEA R8,[0x16606d]
MOV R9D,0x1062
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x74],0x1
JMP 0x0011b5df
LAB_0011b360:
JMP 0x0011b362
LAB_0011b362:
LEA RDI,[RBP + -0x1e0]
XOR ESI,ESI
MOV EDX,0x150
CALL 0x00114260
LEA RAX,[RBP + -0x1e4]
MOV qword ptr [RBP + -0x1d0],RAX
MOV dword ptr [RBP + -0x180],0x10
MOV qword ptr [RBP + -0x1a0],0x4
LEA RAX,[RBP + -0x1e8]
MOV qword ptr [RBP + -0x160],RAX
MOV dword ptr [RBP + -0x110],0x10
MOV qword ptr [RBP + -0x130],0x4
LEA RAX,[RBP + -0x70]
MOV qword ptr [RBP + -0xf0],RAX
MOV dword ptr [RBP + -0xa0],0xfe
MOV qword ptr [RBP + -0xc0],0x64
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RBP + -0x238],RAX
MOV RAX,qword ptr [RBP + -0x1f8]
MOV qword ptr [RBP + -0x230],RAX
MOV RDI,qword ptr [RBP + -0x1f8]
CALL 0x001141a0
MOV RDI,qword ptr [RBP + -0x238]
MOV RSI,qword ptr [RBP + -0x230]
MOV RDX,RAX
CALL 0x00145070
MOV dword ptr [RBP + -0x1ec],EAX
CMP dword ptr [RBP + -0x1ec],0x0
JZ 0x0011b45d
MOV RDI,qword ptr [RBP + -0x88]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0x1070
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x74],0x1
JMP 0x0011b5df
LAB_0011b45d:
JMP 0x0011b45f
LAB_0011b45f:
MOV RDI,qword ptr [RBP + -0x88]
CALL 0x00146580
MOV dword ptr [RBP + -0x1ec],EAX
CMP dword ptr [RBP + -0x1ec],0x0
JZ 0x0011b4af
MOV RDI,qword ptr [RBP + -0x88]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0x1073
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x74],0x1
JMP 0x0011b5df
LAB_0011b4af:
JMP 0x0011b4b1
LAB_0011b4b1:
MOV RDI,qword ptr [RBP + -0x88]
LEA RSI,[RBP + -0x1e0]
CALL 0x00143940
MOVSX EAX,AL
MOV dword ptr [RBP + -0x1ec],EAX
CMP dword ptr [RBP + -0x1ec],0x0
JZ 0x0011b50b
MOV RDI,qword ptr [RBP + -0x88]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0x1076
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x74],0x1
JMP 0x0011b5df
LAB_0011b50b:
JMP 0x0011b50d
LAB_0011b50d:
MOV RDI,qword ptr [RBP + -0x88]
CALL 0x001454d0
MOV dword ptr [RBP + -0x1ec],EAX
CMP dword ptr [RBP + -0x1ec],0x0
JZ 0x0011b55d
MOV RDI,qword ptr [RBP + -0x88]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0x1079
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x74],0x1
JMP 0x0011b5df
LAB_0011b55d:
JMP 0x0011b55f
LAB_0011b55f:
MOV RDI,qword ptr [RBP + -0x88]
CALL 0x00144020
MOV dword ptr [RBP + -0x1ec],EAX
CMP dword ptr [RBP + -0x1ec],0x0
JZ 0x0011b5ac
MOV RDI,qword ptr [RBP + -0x88]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0x107c
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x74],0x1
JMP 0x0011b5df
LAB_0011b5ac:
JMP 0x0011b5ae
LAB_0011b5ae:
MOV ESI,dword ptr [RBP + -0x1e4]
MOV EDX,dword ptr [RBP + -0x1e8]
LEA RCX,[RBP + -0x70]
LEA RDI,[0x167494]
MOV AL,0x0
CALL 0x0012fc40
MOV RDI,qword ptr [RBP + -0x88]
CALL 0x00143eb0
MOV dword ptr [RBP + -0x74],0x0
LAB_0011b5df:
MOV EAX,dword ptr [RBP + -0x74]
MOV dword ptr [RBP + -0x23c],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0011b609
MOV EAX,dword ptr [RBP + -0x23c]
ADD RSP,0x240
POP RBP
RET
LAB_0011b609:
CALL 0x001144c0
|
int4 test_conc167(int8 param_1)
{
char cVar1;
int iVar2;
int4 uVar3;
int8 uVar4;
size_t sVar5;
long in_FS_OFFSET;
int4 local_1f0;
int4 local_1ec;
int1 local_1e8 [16];
int4 *local_1d8;
int8 local_1a8;
int4 local_188;
int4 *local_168;
int8 local_138;
int4 local_118;
int1 *local_f8;
int8 local_c8;
int4 local_a8;
int8 local_90;
int8 local_88;
int4 local_7c;
int1 local_78 [104];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_88 = param_1;
local_90 = mysql_stmt_init(param_1);
local_1ec = 0;
local_1f0 = 0;
iVar2 = mysql_query(local_88,"DROP TABLE IF EXISTS conc168");
if (iVar2 == 0) {
iVar2 = mysql_query(local_88,"CREATE TABLE conc168(a bit, b bit, c varchar(10))");
if (iVar2 == 0) {
iVar2 = mysql_query(local_88);
if (iVar2 == 0) {
memset(local_1e8,0,0x150);
uVar4 = local_90;
local_1d8 = &local_1ec;
local_188 = 0x10;
local_1a8 = 4;
local_168 = &local_1f0;
local_118 = 0x10;
local_138 = 4;
local_f8 = local_78;
local_a8 = 0xfe;
local_c8 = 100;
sVar5 = strlen("SELECT a,b,c FROM conc168");
iVar2 = mysql_stmt_prepare(uVar4,"SELECT a,b,c FROM conc168",sVar5);
if (iVar2 == 0) {
iVar2 = mysql_stmt_execute(local_90);
if (iVar2 == 0) {
cVar1 = mysql_stmt_bind_result(local_90,local_1e8);
if (cVar1 == '\0') {
iVar2 = mysql_stmt_store_result(local_90);
if (iVar2 == 0) {
iVar2 = mysql_stmt_fetch(local_90);
if (iVar2 == 0) {
diag("bit=%d %d char=%s",local_1ec,local_1f0,local_78);
mysql_stmt_close(local_90);
local_7c = 0;
}
else {
uVar4 = mysql_stmt_error(local_90);
diag("Error: %s (%s: %d)",uVar4,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x107c);
local_7c = 1;
}
}
else {
uVar4 = mysql_stmt_error(local_90);
diag("Error: %s (%s: %d)",uVar4,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x1079);
local_7c = 1;
}
}
else {
uVar4 = mysql_stmt_error(local_90);
diag("Error: %s (%s: %d)",uVar4,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x1076);
local_7c = 1;
}
}
else {
uVar4 = mysql_stmt_error(local_90);
diag("Error: %s (%s: %d)",uVar4,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x1073);
local_7c = 1;
}
}
else {
uVar4 = mysql_stmt_error(local_90);
diag("Error: %s (%s: %d)",uVar4,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
0x1070);
local_7c = 1;
}
}
else {
uVar4 = mysql_error(local_88);
uVar3 = mysql_errno(local_88);
diag("Error (%d): %s (%d) in %s line %d",iVar2,uVar4,uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
0x1062);
local_7c = 1;
}
}
else {
uVar4 = mysql_error(local_88);
uVar3 = mysql_errno(local_88);
diag("Error (%d): %s (%d) in %s line %d",iVar2,uVar4,uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
0x1060);
local_7c = 1;
}
}
else {
uVar4 = mysql_error(local_88);
uVar3 = mysql_errno(local_88);
diag("Error (%d): %s (%d) in %s line %d",iVar2,uVar4,uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0x105e)
;
local_7c = 1;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_7c;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
54,678 | nlohmann::json_abi_v3_11_3::detail::out_of_range nlohmann::json_abi_v3_11_3::detail::out_of_range::create<std::nullptr_t, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t) | msxemulator/build_O3/_deps/picotool-src/lib/nlohmann_json/single_include/nlohmann/json.hpp | static out_of_range create(int id_, const std::string& what_arg, BasicJsonContext context)
{
const std::string w = concat(exception::name("out_of_range", id_), exception::diagnostics(context), what_arg);
return {id_, w.c_str()};
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::out_of_range nlohmann::json_abi_v3_11_3::detail::out_of_range::create<std::nullptr_t, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x3f545(%rip), %rsi # 0xa7ec4
leaq 0x3f54a(%rip), %rdx # 0xa7ed0
leaq 0x28(%rsp), %rdi
callq 0x5c00c
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl %ebp, %edx
callq 0x568b2
leaq 0x78(%rsp), %r14
movq %r14, -0x10(%r14)
xorl %eax, %eax
movq %rax, -0x8(%r14)
movb %al, (%r14)
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
movq 0x8(%r15), %rsi
addq 0x50(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0xf6d0
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0xf170
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0xf170
movq (%r15), %rsi
movq 0x8(%r15), %rdx
leaq 0x8(%rsp), %rdi
callq 0xf170
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x68a29
movq 0x78(%rsp), %rsi
incq %rsi
callq 0xf470
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x68a44
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xf470
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x68a5b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xf470
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x56aae
leaq 0x78e3f(%rip), %rax # 0xe18b0
movq %rax, (%rbx)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x68a8b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xf470
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x68b19
movq 0x18(%rsp), %rsi
jmp 0x68b11
movq %rax, %rbx
jmp 0x68b02
movq %rax, %rbx
jmp 0x68b19
movq %rdx, %rbx
movq %rax, %r15
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x68adb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xf470
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rdx
leaq 0x88(%rsp), %r12
movq %r14, %rsi
movq %r15, %rcx
movl %ebx, %r8d
movq %r12, %r9
callq 0x101ed
movq (%r12), %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x68b19
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xf470
movq %rbx, %rdi
callq 0xf7d0
| _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov r15, rdx
mov ebp, esi
mov rbx, rdi
lea r13, [rsp+0C8h+var_90]
mov [r13-10h], r13
lea rsi, aOutOfRange; "out_of_range"
lea rdx, aOutOfRange+0Ch; ""
lea rdi, [rsp+0C8h+var_A0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rsp+0C8h+var_80]; int
lea rsi, [rsp+0C8h+var_A0]; int
mov edx, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int)
lea r14, [rsp+0C8h+var_50]
mov [r14-10h], r14
xor eax, eax
mov [r14-8], rax
mov [r14], al
lea r12, [rsp+0C8h+var_B0]
mov [r12-10h], r12
mov [r12-8], rax
mov [r12], al
mov rsi, [r15+8]
add rsi, [rsp+0C8h+var_78]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rsi, qword ptr [rsp+0C8h+var_80]
mov rdx, [rsp+0C8h+var_78]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rsi, [rsp+0C8h+var_60]
mov rdx, [rsp+0C8h+var_58]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rsi, [r15]
mov rdx, [r15+8]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+0C8h+var_60]; void *
cmp rdi, r14
jz short loc_68A29
mov rsi, [rsp+0C8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_68A29:
lea rax, [rsp+0C8h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_68A44
mov rsi, [rsp+0C8h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_68A44:
mov rdi, [rsp+0C8h+var_A0]; void *
cmp rdi, r13
jz short loc_68A5B
mov rsi, [rsp+0C8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_68A5B:
mov rdx, [rsp+0C8h+var_C0]; char *
mov rdi, rbx; this
mov esi, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail9exceptionC2EiPKc; nlohmann::json_abi_v3_11_3::detail::exception::exception(int,char const*)
lea rax, off_E18B0
mov [rbx], rax
mov rdi, [rsp+0C8h+var_C0]; void *
cmp rdi, r12
jz short loc_68A8B
mov rsi, [rsp+0C8h+var_B0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_68A8B:
mov rax, rbx
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_0]
cmp rdi, r12
jz short loc_68B19
mov rsi, [rsp+arg_10]
jmp short loc_68B11
mov rbx, rax
jmp short loc_68B02
mov rbx, rax
jmp short loc_68B19
mov rbx, rdx
mov r15, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_68ADB
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_68ADB:
lea rdi, [rsp+arg_60]
lea rdx, [rsp+arg_40]
lea r12, [rsp+arg_80]
mov rsi, r14
mov rcx, r15
mov r8d, ebx
mov r9, r12
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5__cold_1
mov rbx, [r12]
loc_68B02:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r13
jz short loc_68B19
mov rsi, [rsp+arg_30]
loc_68B11:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_68B19:
mov rdi, rbx
call __Unwind_Resume
| nlohmann::json_abi_v3_11_3::detail::exception * ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_(
nlohmann::json_abi_v3_11_3::detail::exception *this,
int a2,
_QWORD *a3)
{
char *v5[2]; // [rsp+8h] [rbp-C0h] BYREF
_QWORD v6[2]; // [rsp+18h] [rbp-B0h] BYREF
void *v7[2]; // [rsp+28h] [rbp-A0h] BYREF
_QWORD v8[2]; // [rsp+38h] [rbp-90h] BYREF
int v9[2]; // [rsp+48h] [rbp-80h] BYREF
long long v10; // [rsp+50h] [rbp-78h]
long long v11; // [rsp+58h] [rbp-70h] BYREF
void *v12; // [rsp+68h] [rbp-60h]
long long v13; // [rsp+70h] [rbp-58h]
_QWORD v14[10]; // [rsp+78h] [rbp-50h] BYREF
v7[0] = v8;
std::string::_M_construct<char const*>((long long)v7, "out_of_range", (long long)"");
nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v9, (long long)v7, a2);
v12 = v14;
v13 = 0LL;
LOBYTE(v14[0]) = 0;
v5[0] = (char *)v6;
v5[1] = 0LL;
LOBYTE(v6[0]) = 0;
std::string::reserve(v5, v10 + a3[1]);
std::string::_M_append(v5, *(_QWORD *)v9, v10);
std::string::_M_append(v5, v12, v13);
std::string::_M_append(v5, *a3, a3[1]);
if ( v12 != v14 )
operator delete(v12, v14[0] + 1LL);
if ( *(long long **)v9 != &v11 )
operator delete(*(void **)v9, v11 + 1);
if ( v7[0] != v8 )
operator delete(v7[0], v8[0] + 1LL);
nlohmann::json_abi_v3_11_3::detail::exception::exception(this, a2, v5[0]);
*(_QWORD *)this = off_E18B0;
if ( (_QWORD *)v5[0] != v6 )
operator delete(v5[0], v6[0] + 1LL);
return this;
}
| _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV R15,RDX
MOV EBP,ESI
MOV RBX,RDI
LEA R13,[RSP + 0x38]
MOV qword ptr [R13 + -0x10],R13
LAB_00168978:
LEA RSI,[0x1a7ec4]
LEA RDX,[0x1a7ed0]
LEA RDI,[RSP + 0x28]
CALL 0x0015c00c
LAB_00168990:
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x28]
MOV EDX,EBP
CALL 0x001568b2
LEA R14,[RSP + 0x78]
MOV qword ptr [R14 + -0x10],R14
XOR EAX,EAX
MOV qword ptr [R14 + -0x8],RAX
MOV byte ptr [R14],AL
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
MOV qword ptr [R12 + -0x8],RAX
MOV byte ptr [R12],AL
MOV RSI,qword ptr [R15 + 0x8]
ADD RSI,qword ptr [RSP + 0x50]
LAB_001689cf:
LEA RDI,[RSP + 0x8]
CALL 0x0010f6d0
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
LEA RDI,[RSP + 0x8]
CALL 0x0010f170
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
LEA RDI,[RSP + 0x8]
CALL 0x0010f170
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
LEA RDI,[RSP + 0x8]
CALL 0x0010f170
MOV RDI,qword ptr [RSP + 0x68]
CMP RDI,R14
JZ 0x00168a29
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x0010f470
LAB_00168a29:
LEA RAX,[RSP + 0x58]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00168a44
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x0010f470
LAB_00168a44:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R13
JZ 0x00168a5b
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0010f470
LAB_00168a5b:
MOV RDX,qword ptr [RSP + 0x8]
LAB_00168a60:
MOV RDI,RBX
MOV ESI,EBP
CALL 0x00156aae
LAB_00168a6a:
LEA RAX,[0x1e18b0]
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x00168a8b
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0010f470
LAB_00168a8b:
MOV RAX,RBX
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
exception *
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_
(exception *param_1,int param_2,ulong *param_3)
{
char *local_c0;
int8 local_b8;
char local_b0;
int7 uStack_af;
long *local_a0 [2];
long local_90 [2];
long *local_80 [2];
long local_70 [2];
int1 *local_60;
int8 local_58;
int1 local_50;
int7 uStack_4f;
/* try { // try from 00168978 to 0016898f has its CatchHandler @ 00168ab9 */
local_a0[0] = local_90;
std::__cxx11::string::_M_construct<char_const*>((string *)local_a0,"out_of_range","");
/* try { // try from 00168990 to 001689a0 has its CatchHandler @ 00168ab4 */
nlohmann::json_abi_v3_11_3::detail::exception::name
((exception *)local_80,(string *)local_a0,param_2);
local_58 = 0;
local_50 = 0;
local_b8 = 0;
local_b0 = '\0';
/* try { // try from 001689cf to 00168a11 has its CatchHandler @ 00168abe */
local_c0 = &local_b0;
local_60 = &local_50;
std::__cxx11::string::reserve((ulong)&local_c0);
std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_80[0]);
std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_60);
std::__cxx11::string::_M_append((char *)&local_c0,*param_3);
if (local_60 != &local_50) {
operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1);
}
if (local_80[0] != local_70) {
operator_delete(local_80[0],local_70[0] + 1);
}
if (local_a0[0] != local_90) {
operator_delete(local_a0[0],local_90[0] + 1);
}
/* try { // try from 00168a60 to 00168a69 has its CatchHandler @ 00168aa0 */
nlohmann::json_abi_v3_11_3::detail::exception::exception(param_1,param_2,local_c0);
*(int ***)param_1 = &PTR__exception_001e18b0;
if (local_c0 != &local_b0) {
operator_delete(local_c0,CONCAT71(uStack_af,local_b0) + 1);
}
return param_1;
}
| |
54,679 | common_kv_cache_dump_view(llama_kv_cache_view const&, int) | monkey531[P]llama/common/common.cpp | void common_kv_cache_dump_view(const llama_kv_cache_view & view, int row_size) {
static const char slot_chars[] = ".123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+";
printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d",
view.n_cells, view.n_seq_max, view.used_cells, view.token_count, view.max_contiguous, view.max_contiguous_idx);
llama_kv_cache_view_cell * c_curr = view.cells;
llama_seq_id * cs_curr = view.cells_sequences;
for (int i = 0; i < view.n_cells; i++, c_curr++, cs_curr += view.n_seq_max) {
if (i % row_size == 0) {
printf("\n%5d: ", i);
}
int seq_count = 0;
for (int j = 0; j < view.n_seq_max; j++) {
if (cs_curr[j] >= 0) { seq_count++; }
}
putchar(slot_chars[std::min(sizeof(slot_chars) - 2, size_t(seq_count))]);
}
printf("\n=== Done dumping\n");
} | O1 | cpp | common_kv_cache_dump_view(llama_kv_cache_view const&, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl (%rdi), %esi
movl 0x4(%rdi), %edx
movl 0xc(%rdi), %ecx
movl 0x8(%rdi), %r8d
movl 0x10(%rdi), %r9d
movl 0x14(%rdi), %eax
movl %eax, (%rsp)
leaq 0x7c5fc(%rip), %rdi # 0xf334b
xorl %eax, %eax
callq 0x1b070
cmpl $0x0, (%r14)
jle 0x76dcc
movq 0x20(%r14), %r12
movl $0x3e, %r13d
leaq 0x7eb33(%rip), %r15 # 0xf58a0
xorl %ebp, %ebp
movl %ebp, %eax
cltd
idivl %ebx
testl %edx, %edx
jne 0x76d88
leaq 0x7c656(%rip), %rdi # 0xf33d5
movl %ebp, %esi
xorl %eax, %eax
callq 0x1b070
movslq 0x4(%r14), %rcx
testq %rcx, %rcx
jle 0x76daa
xorl %edx, %edx
xorl %eax, %eax
movl (%r12,%rdx,4), %esi
notl %esi
shrl $0x1f, %esi
addl %esi, %eax
incq %rdx
cmpq %rdx, %rcx
jne 0x76d95
jmp 0x76dac
xorl %eax, %eax
cmpl $0x3e, %eax
cmovael %r13d, %eax
movsbl (%rax,%r15), %edi
callq 0x1bc00
incl %ebp
movslq 0x4(%r14), %rax
leaq (%r12,%rax,4), %r12
cmpl (%r14), %ebp
jl 0x76d6f
leaq 0x7eab9(%rip), %rdi # 0xf588c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1bd40
| _Z25common_kv_cache_dump_viewRK19llama_kv_cache_viewi:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebx, esi
mov r14, rdi
mov esi, [rdi]
mov edx, [rdi+4]
mov ecx, [rdi+0Ch]
mov r8d, [rdi+8]
mov r9d, [rdi+10h]
mov eax, [rdi+14h]
mov [rsp+38h+var_38], eax
lea rdi, aDumpingKvCache; "=== Dumping KV cache. total cells %d, m"...
xor eax, eax
call _printf
cmp dword ptr [r14], 0
jle short loc_76DCC
mov r12, [r14+20h]
mov r13d, 3Eh ; '>'
lea r15, _ZZ25common_kv_cache_dump_viewRK19llama_kv_cache_viewiE10slot_chars; ".123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabc"...
xor ebp, ebp
loc_76D6F:
mov eax, ebp
cdq
idiv ebx
test edx, edx
jnz short loc_76D88
lea rdi, a5d; "\n%5d: "
mov esi, ebp
xor eax, eax
call _printf
loc_76D88:
movsxd rcx, dword ptr [r14+4]
test rcx, rcx
jle short loc_76DAA
xor edx, edx
xor eax, eax
loc_76D95:
mov esi, [r12+rdx*4]
not esi
shr esi, 1Fh
add eax, esi
inc rdx
cmp rcx, rdx
jnz short loc_76D95
jmp short loc_76DAC
loc_76DAA:
xor eax, eax
loc_76DAC:
cmp eax, 3Eh ; '>'
cmovnb eax, r13d
movsx edi, byte ptr [rax+r15]
call _putchar
inc ebp
movsxd rax, dword ptr [r14+4]
lea r12, [r12+rax*4]
cmp ebp, [r14]
jl short loc_76D6F
loc_76DCC:
lea rdi, aDoneDumping; "\n=== Done dumping"
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _puts
| long long common_kv_cache_dump_view(long long a1, int a2)
{
long long v2; // r12
int v3; // ebp
long long v4; // rcx
long long v5; // rdx
long long v6; // rax
printf(
"=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, large"
"st empty slot=%d @ %d",
*(_DWORD *)a1,
*(_DWORD *)(a1 + 4),
*(_DWORD *)(a1 + 12),
*(_DWORD *)(a1 + 8),
*(_DWORD *)(a1 + 16),
*(_DWORD *)(a1 + 20));
if ( *(int *)a1 > 0 )
{
v2 = *(_QWORD *)(a1 + 32);
v3 = 0;
do
{
if ( !(v3 % a2) )
printf("\n%5d: ", v3);
v4 = *(int *)(a1 + 4);
if ( v4 <= 0 )
{
v6 = 0LL;
}
else
{
v5 = 0LL;
LODWORD(v6) = 0;
do
v6 = (*(_DWORD *)(v2 + 4 * v5++) >= 0) + (unsigned int)v6;
while ( v4 != v5 );
}
if ( (unsigned int)v6 >= 0x3E )
v6 = 62LL;
putchar((unsigned int)common_kv_cache_dump_view(llama_kv_cache_view const&,int)::slot_chars[v6]);
++v3;
v2 += 4LL * *(int *)(a1 + 4);
}
while ( v3 < *(_DWORD *)a1 );
}
return puts("\n=== Done dumping");
}
| common_kv_cache_dump_view:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
MOV ESI,dword ptr [RDI]
MOV EDX,dword ptr [RDI + 0x4]
MOV ECX,dword ptr [RDI + 0xc]
MOV R8D,dword ptr [RDI + 0x8]
MOV R9D,dword ptr [RDI + 0x10]
MOV EAX,dword ptr [RDI + 0x14]
MOV dword ptr [RSP],EAX
LEA RDI,[0x1f334b]
XOR EAX,EAX
CALL 0x0011b070
CMP dword ptr [R14],0x0
JLE 0x00176dcc
MOV R12,qword ptr [R14 + 0x20]
MOV R13D,0x3e
LEA R15,[0x1f58a0]
XOR EBP,EBP
LAB_00176d6f:
MOV EAX,EBP
CDQ
IDIV EBX
TEST EDX,EDX
JNZ 0x00176d88
LEA RDI,[0x1f33d5]
MOV ESI,EBP
XOR EAX,EAX
CALL 0x0011b070
LAB_00176d88:
MOVSXD RCX,dword ptr [R14 + 0x4]
TEST RCX,RCX
JLE 0x00176daa
XOR EDX,EDX
XOR EAX,EAX
LAB_00176d95:
MOV ESI,dword ptr [R12 + RDX*0x4]
NOT ESI
SHR ESI,0x1f
ADD EAX,ESI
INC RDX
CMP RCX,RDX
JNZ 0x00176d95
JMP 0x00176dac
LAB_00176daa:
XOR EAX,EAX
LAB_00176dac:
CMP EAX,0x3e
CMOVNC EAX,R13D
MOVSX EDI,byte ptr [RAX + R15*0x1]
CALL 0x0011bc00
INC EBP
MOVSXD RAX,dword ptr [R14 + 0x4]
LEA R12,[R12 + RAX*0x4]
CMP EBP,dword ptr [R14]
JL 0x00176d6f
LAB_00176dcc:
LEA RDI,[0x1f588c]
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0011bd40
|
/* common_kv_cache_dump_view(llama_kv_cache_view const&, int) */
void common_kv_cache_dump_view(llama_kv_cache_view *param_1,int param_2)
{
uint uVar1;
int8 in_RAX;
ulong uVar2;
long lVar3;
uint uVar4;
long lVar5;
printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d"
,(ulong)*(uint *)param_1,(ulong)*(uint *)(param_1 + 4),(ulong)*(uint *)(param_1 + 0xc),
(ulong)*(uint *)(param_1 + 8),(ulong)*(uint *)(param_1 + 0x10),
CONCAT44((int)((ulong)in_RAX >> 0x20),*(int4 *)(param_1 + 0x14)));
if (0 < *(int *)param_1) {
lVar5 = *(long *)(param_1 + 0x20);
uVar4 = 0;
do {
if ((int)uVar4 % param_2 == 0) {
printf("\n%5d: ",(ulong)uVar4);
}
if ((long)*(int *)(param_1 + 4) < 1) {
uVar1 = 0;
}
else {
lVar3 = 0;
uVar1 = 0;
do {
uVar1 = uVar1 - ((int)~*(uint *)(lVar5 + lVar3 * 4) >> 0x1f);
lVar3 = lVar3 + 1;
} while (*(int *)(param_1 + 4) != lVar3);
}
uVar2 = (ulong)uVar1;
if (0x3d < uVar1) {
uVar2 = 0x3e;
}
putchar((int)".123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+"[uVar2]);
uVar4 = uVar4 + 1;
lVar5 = lVar5 + (long)*(int *)(param_1 + 4) * 4;
} while ((int)uVar4 < *(int *)param_1);
}
puts("\n=== Done dumping");
return;
}
| |
54,680 | common_kv_cache_dump_view(llama_kv_cache_view const&, int) | monkey531[P]llama/common/common.cpp | void common_kv_cache_dump_view(const llama_kv_cache_view & view, int row_size) {
static const char slot_chars[] = ".123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+";
printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d",
view.n_cells, view.n_seq_max, view.used_cells, view.token_count, view.max_contiguous, view.max_contiguous_idx);
llama_kv_cache_view_cell * c_curr = view.cells;
llama_seq_id * cs_curr = view.cells_sequences;
for (int i = 0; i < view.n_cells; i++, c_curr++, cs_curr += view.n_seq_max) {
if (i % row_size == 0) {
printf("\n%5d: ", i);
}
int seq_count = 0;
for (int j = 0; j < view.n_seq_max; j++) {
if (cs_curr[j] >= 0) { seq_count++; }
}
putchar(slot_chars[std::min(sizeof(slot_chars) - 2, size_t(seq_count))]);
}
printf("\n=== Done dumping\n");
} | O2 | cpp | common_kv_cache_dump_view(llama_kv_cache_view const&, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl (%rdi), %esi
movl 0x4(%rdi), %edx
movl 0xc(%rdi), %ecx
movl 0x8(%rdi), %r8d
movl 0x10(%rdi), %r9d
movl 0x14(%rdi), %eax
movl %eax, (%rsp)
leaq 0x5d8eb(%rip), %rdi # 0xb532b
xorl %eax, %eax
callq 0x24060
movq 0x20(%r14), %r12
pushq $0x3e
popq %r13
leaq 0x5fe2a(%rip), %r15 # 0xb7880
xorl %ebp, %ebp
cmpl (%r14), %ebp
jge 0x57ab5
movl %ebp, %eax
cltd
idivl %ebx
testl %edx, %edx
jne 0x57a76
leaq 0x5d948(%rip), %rdi # 0xb53b5
movl %ebp, %esi
xorl %eax, %eax
callq 0x24060
movl 0x4(%r14), %eax
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
xorl %edx, %edx
cmpq %rcx, %rax
je 0x57a98
movl (%r12,%rcx,4), %esi
notl %esi
shrl $0x1f, %esi
addl %esi, %edx
incq %rcx
jmp 0x57a83
cmpl $0x3e, %edx
cmovael %r13d, %edx
movsbl (%rdx,%r15), %edi
callq 0x24c20
incl %ebp
movslq 0x4(%r14), %rax
leaq (%r12,%rax,4), %r12
jmp 0x57a58
leaq 0x5fda8(%rip), %rdi # 0xb7864
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x24d50
| _Z25common_kv_cache_dump_viewRK19llama_kv_cache_viewi:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebx, esi
mov r14, rdi
mov esi, [rdi]
mov edx, [rdi+4]
mov ecx, [rdi+0Ch]
mov r8d, [rdi+8]
mov r9d, [rdi+10h]
mov eax, [rdi+14h]
mov [rsp+38h+var_38], eax
lea rdi, aDumpingKvCache; "=== Dumping KV cache. total cells %d, m"...
xor eax, eax
call _printf
mov r12, [r14+20h]
push 3Eh ; '>'
pop r13
lea r15, _ZZ25common_kv_cache_dump_viewRK19llama_kv_cache_viewiE10slot_chars; ".123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabc"...
xor ebp, ebp
loc_57A58:
cmp ebp, [r14]
jge short loc_57AB5
mov eax, ebp
cdq
idiv ebx
test edx, edx
jnz short loc_57A76
lea rdi, a5d; "\n%5d: "
mov esi, ebp
xor eax, eax
call _printf
loc_57A76:
mov eax, [r14+4]
xor ecx, ecx
test eax, eax
cmovle eax, ecx
xor edx, edx
loc_57A83:
cmp rax, rcx
jz short loc_57A98
mov esi, [r12+rcx*4]
not esi
shr esi, 1Fh
add edx, esi
inc rcx
jmp short loc_57A83
loc_57A98:
cmp edx, 3Eh ; '>'
cmovnb edx, r13d
movsx edi, byte ptr [rdx+r15]
call _putchar
inc ebp
movsxd rax, dword ptr [r14+4]
lea r12, [r12+rax*4]
jmp short loc_57A58
loc_57AB5:
lea rdi, aDoneDumping; "\n=== Done dumping"
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _puts
| long long common_kv_cache_dump_view(long long a1, int a2)
{
long long v2; // r12
int i; // ebp
long long v4; // rax
long long v5; // rcx
long long v6; // rdx
printf(
"=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, large"
"st empty slot=%d @ %d",
*(_DWORD *)a1,
*(_DWORD *)(a1 + 4),
*(_DWORD *)(a1 + 12),
*(_DWORD *)(a1 + 8),
*(_DWORD *)(a1 + 16),
*(_DWORD *)(a1 + 20));
v2 = *(_QWORD *)(a1 + 32);
for ( i = 0; i < *(_DWORD *)a1; ++i )
{
if ( !(i % a2) )
printf("\n%5d: ", i);
v4 = *(unsigned int *)(a1 + 4);
v5 = 0LL;
if ( (int)v4 <= 0 )
v4 = 0LL;
v6 = 0LL;
while ( v4 != v5 )
v6 = (*(_DWORD *)(v2 + 4 * v5++) >= 0) + (unsigned int)v6;
if ( (unsigned int)v6 >= 0x3E )
v6 = 62LL;
putchar((unsigned int)common_kv_cache_dump_view(llama_kv_cache_view const&,int)::slot_chars[v6]);
v2 += 4LL * *(int *)(a1 + 4);
}
return puts("\n=== Done dumping");
}
| common_kv_cache_dump_view:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
MOV ESI,dword ptr [RDI]
MOV EDX,dword ptr [RDI + 0x4]
MOV ECX,dword ptr [RDI + 0xc]
MOV R8D,dword ptr [RDI + 0x8]
MOV R9D,dword ptr [RDI + 0x10]
MOV EAX,dword ptr [RDI + 0x14]
MOV dword ptr [RSP],EAX
LEA RDI,[0x1b532b]
XOR EAX,EAX
CALL 0x00124060
MOV R12,qword ptr [R14 + 0x20]
PUSH 0x3e
POP R13
LEA R15,[0x1b7880]
XOR EBP,EBP
LAB_00157a58:
CMP EBP,dword ptr [R14]
JGE 0x00157ab5
MOV EAX,EBP
CDQ
IDIV EBX
TEST EDX,EDX
JNZ 0x00157a76
LEA RDI,[0x1b53b5]
MOV ESI,EBP
XOR EAX,EAX
CALL 0x00124060
LAB_00157a76:
MOV EAX,dword ptr [R14 + 0x4]
XOR ECX,ECX
TEST EAX,EAX
CMOVLE EAX,ECX
XOR EDX,EDX
LAB_00157a83:
CMP RAX,RCX
JZ 0x00157a98
MOV ESI,dword ptr [R12 + RCX*0x4]
NOT ESI
SHR ESI,0x1f
ADD EDX,ESI
INC RCX
JMP 0x00157a83
LAB_00157a98:
CMP EDX,0x3e
CMOVNC EDX,R13D
MOVSX EDI,byte ptr [RDX + R15*0x1]
CALL 0x00124c20
INC EBP
MOVSXD RAX,dword ptr [R14 + 0x4]
LEA R12,[R12 + RAX*0x4]
JMP 0x00157a58
LAB_00157ab5:
LEA RDI,[0x1b7864]
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00124d50
|
/* common_kv_cache_dump_view(llama_kv_cache_view const&, int) */
void common_kv_cache_dump_view(llama_kv_cache_view *param_1,int param_2)
{
int8 in_RAX;
ulong uVar1;
uint uVar2;
ulong uVar3;
uint uVar4;
long lVar5;
printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d"
,(ulong)*(uint *)param_1,(ulong)*(uint *)(param_1 + 4),(ulong)*(uint *)(param_1 + 0xc),
(ulong)*(uint *)(param_1 + 8),(ulong)*(uint *)(param_1 + 0x10),
CONCAT44((int)((ulong)in_RAX >> 0x20),*(int4 *)(param_1 + 0x14)));
lVar5 = *(long *)(param_1 + 0x20);
for (uVar4 = 0; (int)uVar4 < *(int *)param_1; uVar4 = uVar4 + 1) {
if ((int)uVar4 % param_2 == 0) {
printf("\n%5d: ",(ulong)uVar4);
}
uVar1 = 0;
uVar3 = (ulong)*(uint *)(param_1 + 4);
if ((int)*(uint *)(param_1 + 4) < 1) {
uVar3 = uVar1;
}
uVar2 = 0;
for (; uVar3 != uVar1; uVar1 = uVar1 + 1) {
uVar2 = uVar2 - ((int)~*(uint *)(lVar5 + uVar1 * 4) >> 0x1f);
}
uVar3 = (ulong)uVar2;
if (0x3d < uVar2) {
uVar3 = 0x3e;
}
putchar((int)".123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+"[uVar3]);
lVar5 = lVar5 + (long)*(int *)(param_1 + 4) * 4;
}
puts("\n=== Done dumping");
return;
}
| |
54,681 | Generator::gen_bin_expr(NodeBinExpr const*)::BinExprVisitor::operator()(NodeBinExprMulti const*) const | BhuvanGudi[P]LexiParse/src/generation.hpp | void operator()(const NodeBinExprMulti* multi) const
{
gen.gen_expr(multi->rhs);
gen.gen_expr(multi->lhs);
gen.pop("rax");
gen.pop("rbx");
gen.m_output << " mul rbx\n";
gen.push("rax");
} | O0 | cpp | Generator::gen_bin_expr(NodeBinExpr const*)::BinExprVisitor::operator()(NodeBinExprMulti const*) const:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x114c0
movq -0xb0(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x114c0
movq -0xb0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xa8(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x32e0
movq -0xa0(%rbp), %rdx
leaq 0x4826(%rip), %rsi # 0x17459
leaq -0x30(%rbp), %rdi
callq 0x90b0
jmp 0x12c3e
movq -0xa8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x114f0
jmp 0x12c50
leaq -0x30(%rbp), %rdi
callq 0x3bd0
leaq -0x31(%rbp), %rdi
callq 0x3220
movq -0xb0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xc0(%rbp)
leaq -0x69(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x32e0
movq -0xb8(%rbp), %rdx
leaq 0x47fe(%rip), %rsi # 0x1748f
leaq -0x68(%rbp), %rdi
callq 0x90b0
jmp 0x12c9c
movq -0xc0(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x114f0
jmp 0x12cae
leaq -0x68(%rbp), %rdi
callq 0x3bd0
leaq -0x69(%rbp), %rdi
callq 0x3220
movq -0xb0(%rbp), %rax
movq (%rax), %rdi
addq $0x28, %rdi
leaq 0x47d0(%rip), %rsi # 0x174a5
callq 0x31c0
movq -0xb0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xd0(%rbp)
leaq -0x91(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x32e0
movq -0xc8(%rbp), %rdx
leaq 0x474d(%rip), %rsi # 0x17459
leaq -0x90(%rbp), %rdi
callq 0x90b0
jmp 0x12d1a
movq -0xd0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x11b40
jmp 0x12d2f
leaq -0x90(%rbp), %rdi
callq 0x3bd0
leaq -0x91(%rbp), %rdi
callq 0x3220
addq $0xd0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x12d73
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3bd0
leaq -0x31(%rbp), %rdi
callq 0x3220
jmp 0x12dde
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x12da1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x3bd0
leaq -0x69(%rbp), %rdi
callq 0x3220
jmp 0x12dde
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x12dd2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x3bd0
leaq -0x91(%rbp), %rdi
callq 0x3220
movq -0x40(%rbp), %rdi
callq 0x32d0
nopw (%rax,%rax)
| _ZZN9Generator12gen_bin_exprEPK11NodeBinExprENK14BinExprVisitorclEPK16NodeBinExprMulti:
push rbp
mov rbp, rsp
sub rsp, 0D0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_B0], rax
mov rdi, [rax]
mov rax, [rbp+var_10]
mov rsi, [rax+8]
call _ZN9Generator8gen_exprEPK8NodeExpr; Generator::gen_expr(NodeExpr const*)
mov rax, [rbp+var_B0]
mov rdi, [rax]
mov rax, [rbp+var_10]
mov rsi, [rax]
call _ZN9Generator8gen_exprEPK8NodeExpr; Generator::gen_expr(NodeExpr const*)
mov rax, [rbp+var_B0]
mov rax, [rax]
mov [rbp+var_A8], rax
lea rdi, [rbp+var_31]
mov [rbp+var_A0], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rbp+var_A0]
lea rsi, aRax; "rax"
lea rdi, [rbp+var_30]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_12C3E:
mov rdi, [rbp+var_A8]
lea rsi, [rbp+var_30]
call _ZN9Generator3popERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Generator::pop(std::string const&)
jmp short $+2
loc_12C50:
lea rdi, [rbp+var_30]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rbp+var_31]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rax, [rbp+var_B0]
mov rax, [rax]
mov [rbp+var_C0], rax
lea rdi, [rbp+var_69]
mov [rbp+var_B8], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rbp+var_B8]
lea rsi, aRbx; "rbx"
lea rdi, [rbp+var_68]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_12C9C:
mov rdi, [rbp+var_C0]
lea rsi, [rbp+var_68]
call _ZN9Generator3popERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Generator::pop(std::string const&)
jmp short $+2
loc_12CAE:
lea rdi, [rbp+var_68]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rbp+var_69]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rax, [rbp+var_B0]
mov rdi, [rax]
add rdi, 28h ; '('
lea rsi, aMulRbx; " mul rbx\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rax, [rbp+var_B0]
mov rax, [rax]
mov [rbp+var_D0], rax
lea rdi, [rbp+var_91]
mov [rbp+var_C8], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rbp+var_C8]
lea rsi, aRax; "rax"
lea rdi, [rbp+var_90]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_12D1A:
mov rdi, [rbp+var_D0]
lea rsi, [rbp+var_90]
call _ZN9Generator4pushERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Generator::push(std::string const&)
jmp short $+2
loc_12D2F:
lea rdi, [rbp+var_90]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rbp+var_91]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
add rsp, 0D0h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
jmp short loc_12D73
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
lea rdi, [rbp+var_30]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_12D73:
lea rdi, [rbp+var_31]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_12DDE
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
jmp short loc_12DA1
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
lea rdi, [rbp+var_68]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_12DA1:
lea rdi, [rbp+var_69]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_12DDE
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
jmp short loc_12DD2
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
lea rdi, [rbp+var_90]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_12DD2:
lea rdi, [rbp+var_91]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
loc_12DDE:
mov rdi, [rbp+var_40]
call __Unwind_Resume
| long long Generator::gen_bin_expr(NodeBinExpr const*)::BinExprVisitor::operator()(long long *a1, long long *a2)
{
long long v3; // [rsp+0h] [rbp-D0h]
long long v4; // [rsp+10h] [rbp-C0h]
long long v5; // [rsp+28h] [rbp-A8h]
char v6; // [rsp+3Fh] [rbp-91h] BYREF
_BYTE v7[39]; // [rsp+40h] [rbp-90h] BYREF
char v8; // [rsp+67h] [rbp-69h] BYREF
_BYTE v9[36]; // [rsp+68h] [rbp-68h] BYREF
char v10; // [rsp+9Fh] [rbp-31h] BYREF
_BYTE v11[32]; // [rsp+A0h] [rbp-30h] BYREF
long long *v12; // [rsp+C0h] [rbp-10h]
long long *v13; // [rsp+C8h] [rbp-8h]
v13 = a1;
v12 = a2;
Generator::gen_expr(*a1, a2[1]);
Generator::gen_expr(*a1, *a2);
v5 = *a1;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((long long)v11, (long long)"rax", (long long)&v10);
Generator::pop(v5, (long long)v11);
std::string::~string((long long)v11);
std::allocator<char>::~allocator(&v10);
v4 = *a1;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((long long)v9, (long long)"rbx", (long long)&v8);
Generator::pop(v4, (long long)v9);
std::string::~string((long long)v9);
std::allocator<char>::~allocator(&v8);
std::operator<<<std::char_traits<char>>(*a1 + 40, " mul rbx\n");
v3 = *a1;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((long long)v7, (long long)"rax", (long long)&v6);
Generator::push(v3, (long long)v7);
std::string::~string((long long)v7);
return std::allocator<char>::~allocator(&v6);
}
| operator():
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0xb0],RAX
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x001114c0
MOV RAX,qword ptr [RBP + -0xb0]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX]
CALL 0x001114c0
MOV RAX,qword ptr [RBP + -0xb0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0xa8],RAX
LEA RDI,[RBP + -0x31]
MOV qword ptr [RBP + -0xa0],RDI
CALL 0x001032e0
MOV RDX,qword ptr [RBP + -0xa0]
LAB_00112c2c:
LEA RSI,[0x117459]
LEA RDI,[RBP + -0x30]
CALL 0x001090b0
JMP 0x00112c3e
LAB_00112c3e:
MOV RDI,qword ptr [RBP + -0xa8]
LEA RSI,[RBP + -0x30]
CALL 0x001114f0
JMP 0x00112c50
LAB_00112c50:
LEA RDI,[RBP + -0x30]
CALL 0x00103bd0
LEA RDI,[RBP + -0x31]
CALL 0x00103220
MOV RAX,qword ptr [RBP + -0xb0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0xc0],RAX
LEA RDI,[RBP + -0x69]
MOV qword ptr [RBP + -0xb8],RDI
CALL 0x001032e0
MOV RDX,qword ptr [RBP + -0xb8]
LAB_00112c8a:
LEA RSI,[0x11748f]
LEA RDI,[RBP + -0x68]
CALL 0x001090b0
JMP 0x00112c9c
LAB_00112c9c:
MOV RDI,qword ptr [RBP + -0xc0]
LEA RSI,[RBP + -0x68]
CALL 0x001114f0
LAB_00112cac:
JMP 0x00112cae
LAB_00112cae:
LEA RDI,[RBP + -0x68]
CALL 0x00103bd0
LEA RDI,[RBP + -0x69]
CALL 0x00103220
MOV RAX,qword ptr [RBP + -0xb0]
MOV RDI,qword ptr [RAX]
ADD RDI,0x28
LEA RSI,[0x1174a5]
CALL 0x001031c0
MOV RAX,qword ptr [RBP + -0xb0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0xd0],RAX
LEA RDI,[RBP + -0x91]
MOV qword ptr [RBP + -0xc8],RDI
CALL 0x001032e0
MOV RDX,qword ptr [RBP + -0xc8]
LAB_00112d05:
LEA RSI,[0x117459]
LEA RDI,[RBP + -0x90]
CALL 0x001090b0
JMP 0x00112d1a
LAB_00112d1a:
MOV RDI,qword ptr [RBP + -0xd0]
LEA RSI,[RBP + -0x90]
CALL 0x00111b40
LAB_00112d2d:
JMP 0x00112d2f
LAB_00112d2f:
LEA RDI,[RBP + -0x90]
CALL 0x00103bd0
LEA RDI,[RBP + -0x91]
CALL 0x00103220
ADD RSP,0xd0
POP RBP
RET
|
/* Generator::gen_bin_expr(NodeBinExpr
const*)::BinExprVisitor::TEMPNAMEPLACEHOLDERVALUE(NodeBinExprMulti const*) const */
void __thiscall
Generator::gen_bin_expr(NodeBinExpr_const*)::BinExprVisitor::operator()
(BinExprVisitor *this,NodeBinExprMulti *param_1)
{
Generator *pGVar1;
allocator local_99;
string local_98 [39];
allocator local_71;
string local_70 [55];
allocator local_39;
string local_38 [32];
NodeBinExprMulti *local_18;
BinExprVisitor *local_10;
local_18 = param_1;
local_10 = this;
gen_expr(*(Generator **)this,*(NodeExpr **)(param_1 + 8));
gen_expr(*(Generator **)this,*(NodeExpr **)local_18);
pGVar1 = *(Generator **)this;
std::allocator<char>::allocator();
/* try { // try from 00112c2c to 00112c3b has its CatchHandler @ 00112d50 */
std::__cxx11::string::string<std::allocator<char>>(local_38,"rax",&local_39);
/* try { // try from 00112c3e to 00112c4d has its CatchHandler @ 00112d5e */
pop(pGVar1,local_38);
std::__cxx11::string::~string(local_38);
std::allocator<char>::~allocator((allocator<char> *)&local_39);
pGVar1 = *(Generator **)this;
std::allocator<char>::allocator();
/* try { // try from 00112c8a to 00112c99 has its CatchHandler @ 00112d7e */
std::__cxx11::string::string<std::allocator<char>>(local_70,"rbx",&local_71);
/* try { // try from 00112c9c to 00112cab has its CatchHandler @ 00112d8c */
pop(pGVar1,local_70);
std::__cxx11::string::~string(local_70);
std::allocator<char>::~allocator((allocator<char> *)&local_71);
std::operator<<((ostream *)(*(long *)this + 0x28)," mul rbx\n");
pGVar1 = *(Generator **)this;
std::allocator<char>::allocator();
/* try { // try from 00112d05 to 00112d17 has its CatchHandler @ 00112dac */
std::__cxx11::string::string<std::allocator<char>>(local_98,"rax",&local_99);
/* try { // try from 00112d1a to 00112d2c has its CatchHandler @ 00112dba */
push(pGVar1,local_98);
std::__cxx11::string::~string(local_98);
std::allocator<char>::~allocator((allocator<char> *)&local_99);
return;
}
| |
54,682 | Generator::gen_bin_expr(NodeBinExpr const*)::BinExprVisitor::operator()(NodeBinExprMulti const*) const | BhuvanGudi[P]LexiParse/src/generation.hpp | void operator()(const NodeBinExprMulti* multi) const
{
gen.gen_expr(multi->rhs);
gen.gen_expr(multi->lhs);
gen.pop("rax");
gen.pop("rbx");
gen.m_output << " mul rbx\n";
gen.push("rax");
} | O1 | cpp | Generator::gen_bin_expr(NodeBinExpr const*)::BinExprVisitor::operator()(NodeBinExprMulti const*) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x8(%rsi), %rsi
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
movzbl 0x8(%rsi), %eax
leaq 0x51c3(%rip), %r12 # 0xcd38
movq %r15, %rdi
callq *(%r12,%rax,8)
movq (%rbx), %rax
movq (%r14), %rsi
movq %rax, (%r15)
movzbl 0x8(%rsi), %eax
leaq 0x8(%rsp), %rdi
callq *(%r12,%rax,8)
movq (%rbx), %r14
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x18a0(%rip), %rsi # 0x9445
leaq 0x189c(%rip), %rdx # 0x9448
leaq 0x8(%rsp), %rdi
callq 0x73ac
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x75ea
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x7bda
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2200
movq (%rbx), %r14
leaq 0x8(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x188f(%rip), %rsi # 0x947b
leaq 0x188b(%rip), %rdx # 0x947e
callq 0x73ac
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x75ea
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x7c1c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2200
movq (%rbx), %rdi
addq $0x28, %rdi
leaq 0x1867(%rip), %rsi # 0x9491
movl $0xc, %edx
callq 0x2230
movq (%rbx), %rbx
leaq 0x8(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x17ff(%rip), %rsi # 0x9445
leaq 0x17fb(%rip), %rdx # 0x9448
callq 0x73ac
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x7786
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x7c76
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2200
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x7c8a
jmp 0x7ca6
jmp 0x7c8a
jmp 0x7ca6
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x7ca9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2200
jmp 0x7ca9
movq %rax, %rbx
movq %rbx, %rdi
callq 0x22d0
nop
| _ZZN9Generator12gen_bin_exprEPK11NodeBinExprENK14BinExprVisitorclEPK16NodeBinExprMulti:
push r15
push r14
push r12
push rbx
sub rsp, 28h
mov r14, rsi
mov rbx, rdi
mov rax, [rdi]
mov rsi, [rsi+8]
lea r15, [rsp+48h+var_40]
mov [r15], rax
movzx eax, byte ptr [rsi+8]
lea r12, _ZNSt8__detail9__variant12__gen_vtableINS0_21__deduce_visit_resultIvEERZN9Generator8gen_exprEPK8NodeExprE11ExprVisitorJRKSt7variantIJP8NodeTermP11NodeBinExprEEEE9_S_vtableE; std::__detail::__variant::__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&>::_S_vtable
mov rdi, r15
call ds:(_ZNSt8__detail9__variant12__gen_vtableINS0_21__deduce_visit_resultIvEERZN9Generator8gen_exprEPK8NodeExprE11ExprVisitorJRKSt7variantIJP8NodeTermP11NodeBinExprEEEE9_S_vtableE - 0CD38h)[r12+rax*8]; std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<std::__detail::__variant::__deduce_visit_result<void> (*)(Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&)>,std::integer_sequence<ulong,0ul>>::__visit_invoke(Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&)
mov rax, [rbx]
mov rsi, [r14]
mov [r15], rax
movzx eax, byte ptr [rsi+8]
lea rdi, [rsp+48h+var_40]
call ds:(_ZNSt8__detail9__variant12__gen_vtableINS0_21__deduce_visit_resultIvEERZN9Generator8gen_exprEPK8NodeExprE11ExprVisitorJRKSt7variantIJP8NodeTermP11NodeBinExprEEEE9_S_vtableE - 0CD38h)[r12+rax*8]; std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<std::__detail::__variant::__deduce_visit_result<void> (*)(Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&)>,std::integer_sequence<ulong,0ul>>::__visit_invoke(Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&)
mov r14, [rbx]
lea r15, [rsp+48h+var_30]
mov [r15-10h], r15
lea rsi, aRax; "rax"
lea rdx, aRax+3; ""
lea rdi, [rsp+48h+var_40]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, [rsp+48h+var_40]
mov rdi, r14
call _ZN9Generator3popERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Generator::pop(std::string const&)
mov rdi, [rsp+48h+var_40]; void *
cmp rdi, r15
jz short loc_7BDA
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7BDA:
mov r14, [rbx]
lea rdi, [rsp+48h+var_40]
mov [rdi], r15
lea rsi, aRbx; "rbx"
lea rdx, aRbx+3; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, [rsp+48h+var_40]
mov rdi, r14
call _ZN9Generator3popERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Generator::pop(std::string const&)
mov rdi, [rsp+48h+var_40]; void *
cmp rdi, r15
jz short loc_7C1C
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7C1C:
mov rdi, [rbx]
add rdi, 28h ; '('
lea rsi, aMulRbx; " mul rbx\n"
mov edx, 0Ch
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rbx, [rbx]
lea rdi, [rsp+48h+var_40]
mov [rdi], r15
lea rsi, aRax; "rax"
lea rdx, aRax+3; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, [rsp+48h+var_40]
mov rdi, rbx
call _ZN9Generator4pushERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Generator::push(std::string const&)
mov rdi, [rsp+48h+var_40]; void *
cmp rdi, r15
jz short loc_7C76
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7C76:
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
retn
jmp short loc_7C8A
jmp short loc_7CA6
jmp short loc_7C8A
jmp short loc_7CA6
loc_7C8A:
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r15
jz short loc_7CA9
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_7CA9
loc_7CA6:
mov rbx, rax
loc_7CA9:
mov rdi, rbx
call __Unwind_Resume
| void Generator::gen_bin_expr(NodeBinExpr const*)::BinExprVisitor::operator()(void **a1, long long *a2)
{
long long v3; // rsi
long long v4; // rsi
void *v5; // r14
void *v6; // r14
void *v7; // rbx
void *v8[2]; // [rsp+8h] [rbp-40h] BYREF
_QWORD v9[6]; // [rsp+18h] [rbp-30h] BYREF
v3 = a2[1];
v8[0] = *a1;
((void ( *)(long long *, long long))*(&std::__detail::__variant::__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&>::_S_vtable
+ *(unsigned __int8 *)(v3 + 8)))(
(long long *)v8,
v3);
v4 = *a2;
v8[0] = *a1;
((void ( *)(long long *, long long))*(&std::__detail::__variant::__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&>::_S_vtable
+ *(unsigned __int8 *)(v4 + 8)))(
(long long *)v8,
v4);
v5 = *a1;
v8[0] = v9;
std::string::_M_construct<char const*>((long long *)v8, "rax", (long long)"");
Generator::pop((long long)v5, v8);
if ( v8[0] != v9 )
operator delete(v8[0], v9[0] + 1LL);
v6 = *a1;
v8[0] = v9;
std::string::_M_construct<char const*>((long long *)v8, "rbx", (long long)"");
Generator::pop((long long)v6, v8);
if ( v8[0] != v9 )
operator delete(v8[0], v9[0] + 1LL);
std::__ostream_insert<char,std::char_traits<char>>((char *)*a1 + 40, " mul rbx\n", 12LL);
v7 = *a1;
v8[0] = v9;
std::string::_M_construct<char const*>((long long *)v8, "rax", (long long)"");
Generator::push((long long)v7, v8);
if ( v8[0] != v9 )
operator delete(v8[0], v9[0] + 1LL);
}
| operator():
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
MOV RSI,qword ptr [RSI + 0x8]
LEA R15,[RSP + 0x8]
MOV qword ptr [R15],RAX
MOVZX EAX,byte ptr [RSI + 0x8]
LEA R12,[0x10cd38]
MOV RDI,R15
CALL qword ptr [R12 + RAX*0x8]
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [R14]
MOV qword ptr [R15],RAX
MOVZX EAX,byte ptr [RSI + 0x8]
LEA RDI,[RSP + 0x8]
CALL qword ptr [R12 + RAX*0x8]
MOV R14,qword ptr [RBX]
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
LAB_00107b9e:
LEA RSI,[0x109445]
LEA RDX,[0x109448]
LEA RDI,[RSP + 0x8]
CALL 0x001073ac
LAB_00107bb6:
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x001075ea
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R15
JZ 0x00107bda
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00102200
LAB_00107bda:
MOV R14,qword ptr [RBX]
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],R15
LAB_00107be5:
LEA RSI,[0x10947b]
LEA RDX,[0x10947e]
CALL 0x001073ac
LAB_00107bf8:
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x001075ea
LAB_00107c05:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R15
JZ 0x00107c1c
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00102200
LAB_00107c1c:
MOV RDI,qword ptr [RBX]
ADD RDI,0x28
LEA RSI,[0x109491]
MOV EDX,0xc
CALL 0x00102230
MOV RBX,qword ptr [RBX]
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],R15
LAB_00107c3f:
LEA RSI,[0x109445]
LEA RDX,[0x109448]
CALL 0x001073ac
LAB_00107c52:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00107786
LAB_00107c5f:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R15
JZ 0x00107c76
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00102200
LAB_00107c76:
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
RET
|
/* Generator::gen_bin_expr(NodeBinExpr
const*)::BinExprVisitor::TEMPNAMEPLACEHOLDERVALUE(NodeBinExprMulti const*) const */
void __thiscall
Generator::gen_bin_expr(NodeBinExpr_const*)::BinExprVisitor::operator()
(BinExprVisitor *this,NodeBinExprMulti *param_1)
{
Generator *pGVar1;
long *local_40 [2];
long local_30 [2];
local_40[0] = *(long **)this;
(**(code **)(std::__detail::__variant::
__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr_const*)::ExprVisitor&,std::variant<NodeTerm*,NodeBinExpr*>const&>
::_S_vtable + (ulong)*(byte *)(*(long *)(param_1 + 8) + 8) * 8))(local_40);
local_40[0] = *(long **)this;
(**(code **)(std::__detail::__variant::
__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr_const*)::ExprVisitor&,std::variant<NodeTerm*,NodeBinExpr*>const&>
::_S_vtable + (ulong)*(byte *)(*(long *)param_1 + 8) * 8))(local_40);
pGVar1 = *(Generator **)this;
/* try { // try from 00107b9e to 00107bb5 has its CatchHandler @ 00107ca6 */
local_40[0] = local_30;
std::__cxx11::string::_M_construct<char_const*>(local_40,&DAT_00109445,&DAT_00109448);
/* try { // try from 00107bb6 to 00107bc2 has its CatchHandler @ 00107c8a */
pop(pGVar1,(string *)local_40);
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
pGVar1 = *(Generator **)this;
local_40[0] = local_30;
/* try { // try from 00107be5 to 00107bf7 has its CatchHandler @ 00107c88 */
std::__cxx11::string::_M_construct<char_const*>(local_40,&DAT_0010947b,&DAT_0010947e);
/* try { // try from 00107bf8 to 00107c04 has its CatchHandler @ 00107c86 */
pop(pGVar1,(string *)local_40);
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(*(long *)this + 0x28)," mul rbx\n",0xc);
pGVar1 = *(Generator **)this;
local_40[0] = local_30;
/* try { // try from 00107c3f to 00107c51 has its CatchHandler @ 00107c84 */
std::__cxx11::string::_M_construct<char_const*>(local_40,&DAT_00109445,&DAT_00109448);
/* try { // try from 00107c52 to 00107c5e has its CatchHandler @ 00107c82 */
push(pGVar1,(string *)local_40);
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
return;
}
| |
54,683 | pack_dirname | eloqsql/mysys/mf_pack.c | void pack_dirname(char * to, const char *from)
{
int cwd_err;
size_t d_length,length,UNINIT_VAR(buff_length);
char * start;
char buff[FN_REFLEN + 1];
DBUG_ENTER("pack_dirname");
(void) intern_filename(to,from); /* Change to intern name */
#ifdef FN_DEVCHAR
if ((start=strrchr(to,FN_DEVCHAR)) != 0) /* Skip device part */
start++;
else
#endif
start=to;
if (!(cwd_err= my_getwd(buff,FN_REFLEN,MYF(0))))
{
buff_length= strlen(buff);
d_length= (size_t) (start-to);
if ((start == to ||
(buff_length == d_length && !memcmp(buff,start,d_length))) &&
*start != FN_LIBCHAR && *start)
{ /* Put current dir before */
bchange((uchar*) to, d_length, (uchar*) buff, buff_length, strlen(to)+1);
}
}
if ((d_length= cleanup_dirname(to,to)) != 0)
{
length=0;
if (home_dir)
{
length= strlen(home_dir);
if (home_dir[length-1] == FN_LIBCHAR)
length--; /* Don't test last '/' */
}
if (length > 1 && length < d_length)
{ /* test if /xx/yy -> ~/yy */
if (memcmp(to,home_dir,length) == 0 && to[length] == FN_LIBCHAR)
{
to[0]=FN_HOMELIB; /* Filename begins with ~ */
(void) strmov_overlapp(to+1,to+length);
}
}
if (! cwd_err)
{ /* Test if cwd is ~/... */
if (length > 1 && length < buff_length)
{
if (memcmp(buff,home_dir,length) == 0 && buff[length] == FN_LIBCHAR)
{
buff[0]=FN_HOMELIB;
(void) strmov_overlapp(buff+1,buff+length);
}
}
if (is_prefix(to,buff))
{
length= strlen(buff);
if (to[length])
(void) strmov_overlapp(to,to+length); /* Remove everything before */
else
{
to[0]= FN_CURLIB; /* Put ./ instead of cwd */
to[1]= FN_LIBCHAR;
to[2]= '\0';
}
}
}
}
DBUG_PRINT("exit",("to: '%s'",to));
DBUG_VOID_RETURN;
} | O3 | c | pack_dirname:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp # imm = 0x228
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
callq 0x9ff25
leaq -0x240(%rbp), %rdi
movl $0x200, %esi # imm = 0x200
xorl %edx, %edx
callq 0xa5808
movl %eax, %r14d
testl %r14d, %r14d
je 0x9fdfd
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x9ffbb
testq %rax, %rax
je 0x9fe5b
movq %rax, %r15
movl %r14d, -0x244(%rbp)
leaq 0xb74117(%rip), %rax # 0xc13ea8
movq (%rax), %r13
testq %r13, %r13
je 0x9fe4c
movq %r13, %rdi
callq 0x2a320
movq %rax, %r12
xorl %eax, %eax
cmpb $0x2f, -0x1(%r13,%r12)
sete %al
subq %rax, %r12
cmpq $0x2, %r12
setae %r14b
setb %al
cmpq %r15, %r12
setae %cl
orb %al, %cl
jne 0x9fe52
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x2a560
movb $0x1, %r14b
testl %eax, %eax
jne 0x9fe52
cmpb $0x2f, (%rbx,%r12)
jne 0x9fe52
leaq (%rbx,%r12), %rsi
movb $0x7e, (%rbx)
leaq 0x1(%rbx), %rdi
callq 0xe0a20
jmp 0x9fe52
leaq -0x240(%rbp), %rdi
callq 0x2a320
movq %rax, %r15
movzbl (%rbx), %eax
testl %eax, %eax
movq %r15, -0x250(%rbp)
je 0x9fd6c
cmpl $0x2f, %eax
je 0x9fd6c
movq %rbx, %rdi
callq 0x2a320
leaq 0x1(%rax), %r8
leaq -0x240(%rbp), %rdx
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rcx
callq 0xb3710
jmp 0x9fd6c
xorl %r14d, %r14d
xorl %r12d, %r12d
cmpl $0x0, -0x244(%rbp)
je 0x9fe80
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x9ff20
addq $0x228, %rsp # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq -0x250(%rbp), %r12
setb %al
andb %al, %r14b
cmpb $0x1, %r14b
jne 0x9fed6
leaq 0xb7400e(%rip), %rax # 0xc13ea8
movq (%rax), %rsi
leaq -0x240(%rbp), %rdi
movq %r12, %rdx
callq 0x2a560
testl %eax, %eax
jne 0x9fed6
cmpb $0x2f, -0x240(%rbp,%r12)
jne 0x9fed6
leaq (%r12,%rbp), %rsi
addq $-0x240, %rsi # imm = 0xFDC0
leaq -0x23f(%rbp), %rdi
movb $0x7e, -0x1(%rdi)
callq 0xe0a20
leaq -0x240(%rbp), %rsi
movq %rbx, %rdi
callq 0xde348
testl %eax, %eax
je 0x9fe5b
leaq -0x240(%rbp), %rdi
callq 0x2a320
cmpb $0x0, (%rbx,%rax)
je 0x9ff12
addq %rbx, %rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0xe0a20
jmp 0x9fe5b
movw $0x2f2e, (%rbx) # imm = 0x2F2E
movb $0x0, 0x2(%rbx)
jmp 0x9fe5b
callq 0x2a240
| pack_dirname:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 228h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
call intern_filename
lea rdi, [rbp+var_240]
mov esi, 200h
xor edx, edx
call my_getwd
mov r14d, eax
test r14d, r14d
jz loc_9FDFD
loc_9FD6C:
mov rdi, rbx
mov rsi, rbx
call cleanup_dirname
test rax, rax
jz loc_9FE5B
mov r15, rax
mov [rbp+var_244], r14d
lea rax, home_dir
mov r13, [rax]
test r13, r13
jz loc_9FE4C
mov rdi, r13
call _strlen
mov r12, rax
xor eax, eax
cmp byte ptr [r13+r12-1], 2Fh ; '/'
setz al
sub r12, rax
cmp r12, 2
setnb r14b
setb al
cmp r12, r15
setnb cl
or cl, al
jnz loc_9FE52
mov rdi, rbx
mov rsi, r13
mov rdx, r12
call _bcmp
mov r14b, 1
test eax, eax
jnz short loc_9FE52
cmp byte ptr [rbx+r12], 2Fh ; '/'
jnz short loc_9FE52
lea rsi, [rbx+r12]
mov byte ptr [rbx], 7Eh ; '~'
lea rdi, [rbx+1]
call strmov_overlapp
jmp short loc_9FE52
loc_9FDFD:
lea rdi, [rbp+var_240]
call _strlen
mov r15, rax
movzx eax, byte ptr [rbx]
test eax, eax
mov [rbp+var_250], r15
jz loc_9FD6C
cmp eax, 2Fh ; '/'
jz loc_9FD6C
mov rdi, rbx
call _strlen
lea r8, [rax+1]
lea rdx, [rbp+var_240]
mov rdi, rbx
xor esi, esi
mov rcx, r15
call bchange
jmp loc_9FD6C
loc_9FE4C:
xor r14d, r14d
xor r12d, r12d
loc_9FE52:
cmp [rbp+var_244], 0
jz short loc_9FE80
loc_9FE5B:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_9FF20
add rsp, 228h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9FE80:
cmp r12, [rbp+var_250]
setb al
and r14b, al
cmp r14b, 1
jnz short loc_9FED6
lea rax, home_dir
mov rsi, [rax]
lea rdi, [rbp+var_240]
mov rdx, r12
call _bcmp
test eax, eax
jnz short loc_9FED6
cmp [rbp+r12+var_240], 2Fh ; '/'
jnz short loc_9FED6
lea rsi, [r12+rbp]
add rsi, 0FFFFFFFFFFFFFDC0h
lea rdi, [rbp+var_23F]
mov byte ptr [rdi-1], 7Eh ; '~'
call strmov_overlapp
loc_9FED6:
lea rsi, [rbp+var_240]
mov rdi, rbx
call is_prefix
test eax, eax
jz loc_9FE5B
lea rdi, [rbp+var_240]
call _strlen
cmp byte ptr [rbx+rax], 0
jz short loc_9FF12
add rax, rbx
mov rdi, rbx
mov rsi, rax
call strmov_overlapp
jmp loc_9FE5B
loc_9FF12:
mov word ptr [rbx], 2F2Eh
mov byte ptr [rbx+2], 0
jmp loc_9FE5B
loc_9FF20:
call ___stack_chk_fail
| unsigned long long pack_dirname(char *a1, long long a2)
{
int v2; // r14d
long long v3; // rax
unsigned long long v4; // r15
long long v5; // r13
long long v6; // rax
unsigned long long v7; // r12
bool v8; // r14
long long v9; // r15
long long v10; // rax
long long v12; // rax
unsigned long long v13; // [rsp+0h] [rbp-250h]
int v14; // [rsp+Ch] [rbp-244h]
char v15; // [rsp+10h] [rbp-240h] BYREF
_BYTE v16[527]; // [rsp+11h] [rbp-23Fh] BYREF
unsigned long long v17; // [rsp+220h] [rbp-30h]
v17 = __readfsqword(0x28u);
intern_filename(a1, a2);
v2 = my_getwd(&v15, 512LL, 0LL);
if ( !v2 )
{
v9 = strlen(&v15);
v13 = v9;
if ( *a1 )
{
if ( *a1 != 47 )
{
v10 = strlen(a1);
bchange(a1, 0LL, &v15, v9, v10 + 1);
}
}
}
v3 = cleanup_dirname(a1, a1);
if ( v3 )
{
v4 = v3;
v14 = v2;
v5 = home_dir;
if ( home_dir )
{
v6 = strlen(home_dir);
v7 = v6 - (*(_BYTE *)(v5 + v6 - 1) == 47);
v8 = v7 >= 2;
if ( v7 >= 2 && v7 < v4 )
{
v8 = 1;
if ( !(unsigned int)bcmp(a1, v5, v7) && a1[v7] == 47 )
{
*a1 = 126;
strmov_overlapp(a1 + 1, &a1[v7]);
}
}
}
else
{
v8 = 0;
v7 = 0LL;
}
if ( !v14 )
{
if ( v7 < v13 && v8 && !(unsigned int)bcmp(&v15, home_dir, v7) && v16[v7 - 1] == 47 )
{
v15 = 126;
strmov_overlapp(v16, &v16[v7 - 1]);
}
if ( (unsigned int)is_prefix(a1, &v15) )
{
v12 = strlen(&v15);
if ( a1[v12] )
strmov_overlapp(a1, &a1[v12]);
else
strcpy(a1, "./");
}
}
}
return __readfsqword(0x28u);
}
| pack_dirname:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x228
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
CALL 0x0019ff25
LEA RDI,[RBP + -0x240]
MOV ESI,0x200
XOR EDX,EDX
CALL 0x001a5808
MOV R14D,EAX
TEST R14D,R14D
JZ 0x0019fdfd
LAB_0019fd6c:
MOV RDI,RBX
MOV RSI,RBX
CALL 0x0019ffbb
TEST RAX,RAX
JZ 0x0019fe5b
MOV R15,RAX
MOV dword ptr [RBP + -0x244],R14D
LEA RAX,[0xd13ea8]
MOV R13,qword ptr [RAX]
TEST R13,R13
JZ 0x0019fe4c
MOV RDI,R13
CALL 0x0012a320
MOV R12,RAX
XOR EAX,EAX
CMP byte ptr [R13 + R12*0x1 + -0x1],0x2f
SETZ AL
SUB R12,RAX
CMP R12,0x2
SETNC R14B
SETC AL
CMP R12,R15
SETNC CL
OR CL,AL
JNZ 0x0019fe52
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R12
CALL 0x0012a560
MOV R14B,0x1
TEST EAX,EAX
JNZ 0x0019fe52
CMP byte ptr [RBX + R12*0x1],0x2f
JNZ 0x0019fe52
LEA RSI,[RBX + R12*0x1]
MOV byte ptr [RBX],0x7e
LEA RDI,[RBX + 0x1]
CALL 0x001e0a20
JMP 0x0019fe52
LAB_0019fdfd:
LEA RDI,[RBP + -0x240]
CALL 0x0012a320
MOV R15,RAX
MOVZX EAX,byte ptr [RBX]
TEST EAX,EAX
MOV qword ptr [RBP + -0x250],R15
JZ 0x0019fd6c
CMP EAX,0x2f
JZ 0x0019fd6c
MOV RDI,RBX
CALL 0x0012a320
LEA R8,[RAX + 0x1]
LEA RDX,[RBP + -0x240]
MOV RDI,RBX
XOR ESI,ESI
MOV RCX,R15
CALL 0x001b3710
JMP 0x0019fd6c
LAB_0019fe4c:
XOR R14D,R14D
XOR R12D,R12D
LAB_0019fe52:
CMP dword ptr [RBP + -0x244],0x0
JZ 0x0019fe80
LAB_0019fe5b:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0019ff20
ADD RSP,0x228
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0019fe80:
CMP R12,qword ptr [RBP + -0x250]
SETC AL
AND R14B,AL
CMP R14B,0x1
JNZ 0x0019fed6
LEA RAX,[0xd13ea8]
MOV RSI,qword ptr [RAX]
LEA RDI,[RBP + -0x240]
MOV RDX,R12
CALL 0x0012a560
TEST EAX,EAX
JNZ 0x0019fed6
CMP byte ptr [RBP + R12*0x1 + -0x240],0x2f
JNZ 0x0019fed6
LEA RSI,[R12 + RBP*0x1]
ADD RSI,-0x240
LEA RDI,[RBP + -0x23f]
MOV byte ptr [RDI + -0x1],0x7e
CALL 0x001e0a20
LAB_0019fed6:
LEA RSI,[RBP + -0x240]
MOV RDI,RBX
CALL 0x001de348
TEST EAX,EAX
JZ 0x0019fe5b
LEA RDI,[RBP + -0x240]
CALL 0x0012a320
CMP byte ptr [RBX + RAX*0x1],0x0
JZ 0x0019ff12
ADD RAX,RBX
MOV RDI,RBX
MOV RSI,RAX
CALL 0x001e0a20
JMP 0x0019fe5b
LAB_0019ff12:
MOV word ptr [RBX],0x2f2e
MOV byte ptr [RBX + 0x2],0x0
JMP 0x0019fe5b
LAB_0019ff20:
CALL 0x0012a240
|
void pack_dirname(char *param_1)
{
char *__s2;
int iVar1;
int iVar2;
ulong uVar3;
size_t sVar4;
ulong __n;
long in_FS_OFFSET;
bool bVar5;
ulong local_258;
char local_248 [528];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
intern_filename();
iVar1 = my_getwd(local_248,0x200,0);
if (iVar1 == 0) {
local_258 = strlen(local_248);
if ((*param_1 != '\0') && (*param_1 != '/')) {
sVar4 = strlen(param_1);
bchange(param_1,0,local_248,local_258,sVar4 + 1);
}
}
uVar3 = cleanup_dirname(param_1,param_1);
__s2 = home_dir;
if (uVar3 != 0) {
if (home_dir == (char *)0x0) {
bVar5 = false;
__n = 0;
}
else {
sVar4 = strlen(home_dir);
__n = sVar4 - (__s2[sVar4 - 1] == '/');
bVar5 = 1 < __n;
if (__n < uVar3 && bVar5) {
iVar2 = bcmp(param_1,__s2,__n);
bVar5 = true;
if ((iVar2 == 0) && (param_1[__n] == '/')) {
*param_1 = '~';
strmov_overlapp(param_1 + 1,param_1 + __n);
}
}
}
if (iVar1 == 0) {
if ((bool)(bVar5 & __n < local_258)) {
iVar1 = bcmp(local_248,home_dir,__n);
if ((iVar1 == 0) && (local_248[__n] == '/')) {
local_248[0] = '~';
strmov_overlapp(local_248 + 1,local_248 + __n);
}
}
iVar1 = is_prefix(param_1,local_248);
if (iVar1 != 0) {
sVar4 = strlen(local_248);
if (param_1[sVar4] == '\0') {
param_1[0] = '.';
param_1[1] = '/';
param_1[2] = '\0';
}
else {
strmov_overlapp(param_1,param_1 + sVar4);
}
}
}
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
54,684 | cxxopts::values::abstract_value<bool>::abstract_value() | shubhamoy[P]dir2txt/include/cxxopts.hpp | abstract_value()
: m_result(std::make_shared<T>())
, m_store(m_result.get())
{
} | O1 | cpp | cxxopts::values::abstract_value<bool>::abstract_value():
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
leaq 0x28ba9(%rip), %rax # 0x4d8c0
movq %rax, (%rdi)
movq $0x0, 0x18(%rdi)
movl $0x18, %edi
callq 0x8370
movabsq $0x100000001, %rcx # imm = 0x100000001
movq %rcx, 0x8(%rax)
leaq 0x28c07(%rip), %rcx # 0x4d948
movq %rcx, (%rax)
movq %rax, %rcx
addq $0x10, %rcx
xorl %edx, %edx
movb %dl, 0x10(%rax)
movq %rax, 0x20(%rbx)
movq %rcx, 0x18(%rbx)
movq %rcx, 0x28(%rbx)
movw $0x0, 0x30(%rbx)
leaq 0x48(%rbx), %rax
movq %rax, 0x38(%rbx)
movq %rdx, 0x40(%rbx)
movb %dl, 0x48(%rbx)
leaq 0x68(%rbx), %rax
movq %rax, 0x58(%rbx)
movq %rdx, 0x60(%rbx)
movb %dl, 0x68(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2488e
movq %r14, %rdi
callq 0x85d0
nop
| _ZN7cxxopts6values14abstract_valueIbEC2Ev:
push r14
push rbx
push rax
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi+8], xmm0
lea rax, off_4D8C0
mov [rdi], rax
mov qword ptr [rdi+18h], 0
mov edi, 18h; unsigned __int64
call __Znwm; operator new(ulong)
mov rcx, 100000001h
mov [rax+8], rcx
lea rcx, off_4D948
mov [rax], rcx
mov rcx, rax
add rcx, 10h
xor edx, edx
mov [rax+10h], dl
mov [rbx+20h], rax
mov [rbx+18h], rcx
mov [rbx+28h], rcx
mov word ptr [rbx+30h], 0
lea rax, [rbx+48h]
mov [rbx+38h], rax
mov [rbx+40h], rdx
mov [rbx+48h], dl
lea rax, [rbx+68h]
mov [rbx+58h], rax
mov [rbx+60h], rdx
mov [rbx+68h], dl
add rsp, 8
pop rbx
pop r14
retn
mov r14, rax
mov rdi, rbx; this
call _ZN7cxxopts5ValueD2Ev; cxxopts::Value::~Value()
mov rdi, r14
call __Unwind_Resume
| long long cxxopts::values::abstract_value<bool>::abstract_value(long long a1)
{
long long v1; // rax
long long result; // rax
*(_OWORD *)(a1 + 8) = 0LL;
*(_QWORD *)a1 = &off_4D8C0;
*(_QWORD *)(a1 + 24) = 0LL;
v1 = operator new(0x18uLL);
*(_QWORD *)(v1 + 8) = 0x100000001LL;
*(_QWORD *)v1 = off_4D948;
*(_BYTE *)(v1 + 16) = 0;
*(_QWORD *)(a1 + 32) = v1;
*(_QWORD *)(a1 + 24) = v1 + 16;
*(_QWORD *)(a1 + 40) = v1 + 16;
*(_WORD *)(a1 + 48) = 0;
*(_QWORD *)(a1 + 56) = a1 + 72;
*(_QWORD *)(a1 + 64) = 0LL;
*(_BYTE *)(a1 + 72) = 0;
result = a1 + 104;
*(_QWORD *)(a1 + 88) = a1 + 104;
*(_QWORD *)(a1 + 96) = 0LL;
*(_BYTE *)(a1 + 104) = 0;
return result;
}
| abstract_value:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x8],XMM0
LEA RAX,[0x14d8c0]
MOV qword ptr [RDI],RAX
MOV qword ptr [RDI + 0x18],0x0
LAB_00124d22:
MOV EDI,0x18
CALL 0x00108370
LAB_00124d2c:
MOV RCX,0x100000001
MOV qword ptr [RAX + 0x8],RCX
LEA RCX,[0x14d948]
MOV qword ptr [RAX],RCX
MOV RCX,RAX
ADD RCX,0x10
XOR EDX,EDX
MOV byte ptr [RAX + 0x10],DL
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],RCX
MOV qword ptr [RBX + 0x28],RCX
MOV word ptr [RBX + 0x30],0x0
LEA RAX,[RBX + 0x48]
MOV qword ptr [RBX + 0x38],RAX
MOV qword ptr [RBX + 0x40],RDX
MOV byte ptr [RBX + 0x48],DL
LEA RAX,[RBX + 0x68]
MOV qword ptr [RBX + 0x58],RAX
MOV qword ptr [RBX + 0x60],RDX
MOV byte ptr [RBX + 0x68],DL
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* cxxopts::values::abstract_value<bool>::abstract_value() */
void __thiscall cxxopts::values::abstract_value<bool>::abstract_value(abstract_value<bool> *this)
{
int8 *puVar1;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int ***)this = &PTR__abstract_value_0014d8c0;
*(int8 *)(this + 0x18) = 0;
/* try { // try from 00124d22 to 00124d2b has its CatchHandler @ 00124d88 */
puVar1 = (int8 *)operator_new(0x18);
puVar1[1] = 0x100000001;
*puVar1 = &PTR___Sp_counted_ptr_inplace_0014d948;
*(int1 *)(puVar1 + 2) = 0;
*(int8 **)(this + 0x20) = puVar1;
*(int8 **)(this + 0x18) = puVar1 + 2;
*(int8 **)(this + 0x28) = puVar1 + 2;
*(int2 *)(this + 0x30) = 0;
*(abstract_value<bool> **)(this + 0x38) = this + 0x48;
*(int8 *)(this + 0x40) = 0;
this[0x48] = (abstract_value<bool>)0x0;
*(abstract_value<bool> **)(this + 0x58) = this + 0x68;
*(int8 *)(this + 0x60) = 0;
this[0x68] = (abstract_value<bool>)0x0;
return;
}
| |
54,685 | pfs_memory_alloc_v1 | eloqsql/storage/perfschema/pfs.cc | PSI_memory_key pfs_memory_alloc_v1(PSI_memory_key key, size_t size, PSI_thread **owner)
{
PFS_thread ** owner_thread= reinterpret_cast<PFS_thread**>(owner);
assert(owner_thread != NULL);
if (! flag_global_instrumentation)
{
*owner_thread= NULL;
return PSI_NOT_INSTRUMENTED;
}
PFS_memory_class *klass= find_memory_class(key);
if (klass == NULL)
{
*owner_thread= NULL;
return PSI_NOT_INSTRUMENTED;
}
if (! klass->m_enabled)
{
*owner_thread= NULL;
return PSI_NOT_INSTRUMENTED;
}
PFS_memory_stat *event_name_array;
PFS_memory_stat *stat;
uint index= klass->m_event_name_index;
PFS_memory_stat_delta delta_buffer;
PFS_memory_stat_delta *delta;
if (flag_thread_instrumentation && ! klass->is_global())
{
PFS_thread *pfs_thread= my_thread_get_THR_PFS();
if (unlikely(pfs_thread == NULL))
{
*owner_thread= NULL;
return PSI_NOT_INSTRUMENTED;
}
if (! pfs_thread->m_enabled)
{
*owner_thread= NULL;
return PSI_NOT_INSTRUMENTED;
}
/* Aggregate to MEMORY_SUMMARY_BY_THREAD_BY_EVENT_NAME */
event_name_array= pfs_thread->write_instr_class_memory_stats();
stat= & event_name_array[index];
delta= stat->count_alloc(size, &delta_buffer);
if (delta != NULL)
{
pfs_thread->carry_memory_stat_delta(delta, index);
}
/* Flag this memory as owned by the current thread. */
*owner_thread= pfs_thread;
}
else
{
/* Aggregate to MEMORY_SUMMARY_GLOBAL_BY_EVENT_NAME */
event_name_array= global_instr_class_memory_array;
stat= & event_name_array[index];
(void) stat->count_alloc(size, &delta_buffer);
*owner_thread= NULL;
}
return key;
} | O0 | cpp | pfs_memory_alloc_v1:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x3b690e(%rip), %rax # 0x40c000
testb $0x1, (%rax)
jne 0x5570e
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x55874
movl -0x8(%rbp), %edi
callq 0x437c0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x55738
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x55874
movq -0x28(%rbp), %rax
testb $0x1, 0x4(%rax)
jne 0x55759
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x55874
movq -0x28(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x3c(%rbp)
leaq 0x3b68d6(%rip), %rax # 0x40c040
testb $0x1, (%rax)
je 0x55832
movq -0x28(%rbp), %rdi
callq 0x568a0
testb $0x1, %al
jne 0x55832
callq 0x4d760
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x70(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x557b6
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x55874
movq -0x70(%rbp), %rax
testb $0x1, 0x7e0(%rax)
jne 0x557da
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x55874
movq -0x70(%rbp), %rdi
callq 0x2cd50
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x568c0
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x68(%rbp)
je 0x55825
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rsi
movl -0x3c(%rbp), %edx
callq 0x37c20
movq -0x70(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
jmp 0x5586e
leaq 0x3b6b8f(%rip), %rax # 0x40c3c8
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x568c0
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
| pfs_memory_alloc_v1:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_8], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_18]
mov [rbp+var_20], rax
lea rax, flag_global_instrumentation
test byte ptr [rax], 1
jnz short loc_5570E
mov rax, [rbp+var_20]
mov qword ptr [rax], 0
mov [rbp+var_4], 0
jmp loc_55874
loc_5570E:
mov edi, [rbp+var_8]; unsigned int
call _Z17find_memory_classj; find_memory_class(uint)
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jnz short loc_55738
mov rax, [rbp+var_20]
mov qword ptr [rax], 0
mov [rbp+var_4], 0
jmp loc_55874
loc_55738:
mov rax, [rbp+var_28]
test byte ptr [rax+4], 1
jnz short loc_55759
mov rax, [rbp+var_20]
mov qword ptr [rax], 0
mov [rbp+var_4], 0
jmp loc_55874
loc_55759:
mov rax, [rbp+var_28]
mov eax, [rax+10h]
mov [rbp+var_3C], eax
lea rax, flag_thread_instrumentation
test byte ptr [rax], 1
jz loc_55832
mov rdi, [rbp+var_28]; this
call _ZNK16PFS_memory_class9is_globalEv; PFS_memory_class::is_global(void)
test al, 1
jnz loc_55832
call _ZL21my_thread_get_THR_PFSv; my_thread_get_THR_PFS(void)
mov [rbp+var_70], rax
cmp [rbp+var_70], 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_557B6
mov rax, [rbp+var_20]
mov qword ptr [rax], 0
mov [rbp+var_4], 0
jmp loc_55874
loc_557B6:
mov rax, [rbp+var_70]
test byte ptr [rax+7E0h], 1
jnz short loc_557DA
mov rax, [rbp+var_20]
mov qword ptr [rax], 0
mov [rbp+var_4], 0
jmp loc_55874
loc_557DA:
mov rdi, [rbp+var_70]; this
call _ZN20PFS_connection_slice30write_instr_class_memory_statsEv; PFS_connection_slice::write_instr_class_memory_stats(void)
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov ecx, [rbp+var_3C]
imul rcx, 48h ; 'H'
add rax, rcx
mov [rbp+var_38], rax
mov rdi, [rbp+var_38]; this
mov rsi, [rbp+var_10]; unsigned __int64
lea rdx, [rbp+var_60]; PFS_memory_stat_delta *
call _ZN15PFS_memory_stat11count_allocEmP21PFS_memory_stat_delta; PFS_memory_stat::count_alloc(ulong,PFS_memory_stat_delta *)
mov [rbp+var_68], rax
cmp [rbp+var_68], 0
jz short loc_55825
mov rdi, [rbp+var_70]; this
mov rsi, [rbp+var_68]; PFS_memory_stat_delta *
mov edx, [rbp+var_3C]; unsigned int
call _ZN10PFS_thread23carry_memory_stat_deltaEP21PFS_memory_stat_deltaj; PFS_thread::carry_memory_stat_delta(PFS_memory_stat_delta *,uint)
loc_55825:
mov rcx, [rbp+var_70]
mov rax, [rbp+var_20]
mov [rax], rcx
jmp short loc_5586E
loc_55832:
lea rax, global_instr_class_memory_array
mov rax, [rax]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov ecx, [rbp+var_3C]
imul rcx, 48h ; 'H'
add rax, rcx
mov [rbp+var_38], rax
mov rdi, [rbp+var_38]; this
mov rsi, [rbp+var_10]; unsigned __int64
lea rdx, [rbp+var_60]; PFS_memory_stat_delta *
call _ZN15PFS_memory_stat11count_allocEmP21PFS_memory_stat_delta; PFS_memory_stat::count_alloc(ulong,PFS_memory_stat_delta *)
mov rax, [rbp+var_20]
mov qword ptr [rax], 0
loc_5586E:
mov eax, [rbp+var_8]
mov [rbp+var_4], eax
loc_55874:
mov eax, [rbp+var_4]
add rsp, 70h
pop rbp
retn
| long long pfs_memory_alloc_v1(unsigned int a1, unsigned long long a2, PFS_connection_slice **a3)
{
PFS_connection_slice *THR_PFS; // [rsp+0h] [rbp-70h]
PFS_memory_stat_delta *v5; // [rsp+8h] [rbp-68h]
_BYTE v6[36]; // [rsp+10h] [rbp-60h] BYREF
unsigned int v7; // [rsp+34h] [rbp-3Ch]
PFS_memory_stat *v8; // [rsp+38h] [rbp-38h]
PFS_memory_stat *v9; // [rsp+40h] [rbp-30h]
PFS_memory_class *memory_class; // [rsp+48h] [rbp-28h]
PFS_connection_slice **v11; // [rsp+50h] [rbp-20h]
PFS_connection_slice **v12; // [rsp+58h] [rbp-18h]
unsigned long long v13; // [rsp+60h] [rbp-10h]
unsigned int v14; // [rsp+68h] [rbp-8h]
v14 = a1;
v13 = a2;
v12 = a3;
v11 = a3;
if ( (flag_global_instrumentation & 1) != 0 )
{
memory_class = (PFS_memory_class *)find_memory_class(v14);
if ( memory_class )
{
if ( (*((_BYTE *)memory_class + 4) & 1) != 0 )
{
v7 = *((_DWORD *)memory_class + 4);
if ( (flag_thread_instrumentation & 1) == 0 || (PFS_memory_class::is_global(memory_class) & 1) != 0 )
{
v9 = global_instr_class_memory_array;
v8 = (PFS_memory_stat *)((char *)global_instr_class_memory_array + 72 * v7);
PFS_memory_stat::count_alloc(v8, v13, (PFS_memory_stat_delta *)v6);
*v11 = 0LL;
}
else
{
THR_PFS = (PFS_connection_slice *)my_thread_get_THR_PFS();
if ( !THR_PFS )
{
*v11 = 0LL;
return 0;
}
if ( (*((_BYTE *)THR_PFS + 2016) & 1) == 0 )
{
*v11 = 0LL;
return 0;
}
v9 = (PFS_memory_stat *)PFS_connection_slice::write_instr_class_memory_stats(THR_PFS);
v8 = (PFS_memory_stat *)((char *)v9 + 72 * v7);
v5 = (PFS_memory_stat_delta *)PFS_memory_stat::count_alloc(v8, v13, (PFS_memory_stat_delta *)v6);
if ( v5 )
PFS_thread::carry_memory_stat_delta(THR_PFS, v5, v7);
*v11 = THR_PFS;
}
return v14;
}
*v11 = 0LL;
return 0;
}
else
{
*v11 = 0LL;
return 0;
}
}
else
{
*v11 = 0LL;
return 0;
}
}
| pfs_memory_alloc_v1:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV dword ptr [RBP + -0x8],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
LEA RAX,[0x50c000]
TEST byte ptr [RAX],0x1
JNZ 0x0015570e
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],0x0
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00155874
LAB_0015570e:
MOV EDI,dword ptr [RBP + -0x8]
CALL 0x001437c0
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x00155738
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],0x0
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00155874
LAB_00155738:
MOV RAX,qword ptr [RBP + -0x28]
TEST byte ptr [RAX + 0x4],0x1
JNZ 0x00155759
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],0x0
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00155874
LAB_00155759:
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x10]
MOV dword ptr [RBP + -0x3c],EAX
LEA RAX,[0x50c040]
TEST byte ptr [RAX],0x1
JZ 0x00155832
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001568a0
TEST AL,0x1
JNZ 0x00155832
CALL 0x0014d760
MOV qword ptr [RBP + -0x70],RAX
CMP qword ptr [RBP + -0x70],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x001557b6
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],0x0
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00155874
LAB_001557b6:
MOV RAX,qword ptr [RBP + -0x70]
TEST byte ptr [RAX + 0x7e0],0x1
JNZ 0x001557da
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],0x0
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00155874
LAB_001557da:
MOV RDI,qword ptr [RBP + -0x70]
CALL 0x0012cd50
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RBP + -0x3c]
IMUL RCX,RCX,0x48
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDX,[RBP + -0x60]
CALL 0x001568c0
MOV qword ptr [RBP + -0x68],RAX
CMP qword ptr [RBP + -0x68],0x0
JZ 0x00155825
MOV RDI,qword ptr [RBP + -0x70]
MOV RSI,qword ptr [RBP + -0x68]
MOV EDX,dword ptr [RBP + -0x3c]
CALL 0x00137c20
LAB_00155825:
MOV RCX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
JMP 0x0015586e
LAB_00155832:
LEA RAX,[0x50c3c8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RBP + -0x3c]
IMUL RCX,RCX,0x48
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDX,[RBP + -0x60]
CALL 0x001568c0
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],0x0
LAB_0015586e:
MOV EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0x4],EAX
LAB_00155874:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x70
POP RBP
RET
|
uint pfs_memory_alloc_v1(uint param_1,ulong param_2,int8 *param_3)
{
ulong uVar1;
PFS_connection_slice *this;
PFS_memory_stat_delta *pPVar2;
PFS_memory_stat_delta local_68 [36];
uint local_44;
PFS_memory_stat *local_40;
long local_38;
PFS_memory_class *local_30;
int8 *local_28;
int8 *local_20;
ulong local_18;
uint local_10;
if ((flag_global_instrumentation & 1) == 0) {
*param_3 = 0;
return 0;
}
local_28 = param_3;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
local_30 = (PFS_memory_class *)find_memory_class(param_1);
if (local_30 == (PFS_memory_class *)0x0) {
*local_28 = 0;
return 0;
}
if (((byte)local_30[4] & 1) == 0) {
*local_28 = 0;
return 0;
}
local_44 = *(uint *)(local_30 + 0x10);
if (((flag_thread_instrumentation & 1) == 0) ||
(uVar1 = PFS_memory_class::is_global(local_30), (uVar1 & 1) != 0)) {
local_38 = global_instr_class_memory_array;
local_40 = (PFS_memory_stat *)(global_instr_class_memory_array + (ulong)local_44 * 0x48);
PFS_memory_stat::count_alloc(local_40,local_18,local_68);
*local_28 = 0;
}
else {
this = (PFS_connection_slice *)my_thread_get_THR_PFS();
if (this == (PFS_connection_slice *)0x0) {
*local_28 = 0;
return 0;
}
if (((byte)this[0x7e0] & 1) == 0) {
*local_28 = 0;
return 0;
}
local_38 = PFS_connection_slice::write_instr_class_memory_stats(this);
local_40 = (PFS_memory_stat *)(local_38 + (ulong)local_44 * 0x48);
pPVar2 = (PFS_memory_stat_delta *)PFS_memory_stat::count_alloc(local_40,local_18,local_68);
if (pPVar2 != (PFS_memory_stat_delta *)0x0) {
PFS_thread::carry_memory_stat_delta((PFS_thread *)this,pPVar2,local_44);
}
*local_28 = this;
}
return local_10;
}
| |
54,686 | ft_parse_internal | eloqsql/storage/myisam/ft_parser.c | static int 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("ft_parse_internal");
while (ft_simple_get_word(wtree->custom_arg, &doc, end, &w, TRUE))
if (param->mysql_add_word(param, (char*) w.pos, (int)w.len, 0))
DBUG_RETURN(1);
DBUG_RETURN(0);
} | O3 | c | 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 0x74e6d
testb %al, %al
je 0x750a7
movq -0x40(%rbp), %rsi
movl -0x30(%rbp), %edx
movq %rbx, %rdi
xorl %ecx, %ecx
callq *0x8(%rbx)
testl %eax, %eax
je 0x7506d
movl $0x1, %eax
jmp 0x750a9
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| 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_7506D:
mov rdi, [r12+230h]
mov rsi, r14
mov rdx, r15
mov rcx, r13
mov r8d, 1
call ft_simple_get_word
test al, al
jz short loc_750A7
mov rsi, [rbp+var_40]
mov edx, [rbp+var_30]
mov rdi, rbx
xor ecx, ecx
call qword ptr [rbx+8]
test eax, eax
jz short loc_7506D
mov eax, 1
jmp short loc_750A9
loc_750A7:
xor eax, eax
loc_750A9:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long 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+20h] [rbp-30h]
v6 = a2;
v3 = (unsigned long long)&a2[a3];
v4 = **(_QWORD **)(a1 + 24);
while ( 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;
}
| 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_0017506d:
MOV RDI,qword ptr [R12 + 0x230]
MOV RSI,R14
MOV RDX,R15
MOV RCX,R13
MOV R8D,0x1
CALL 0x00174e6d
TEST AL,AL
JZ 0x001750a7
MOV RSI,qword ptr [RBP + -0x40]
MOV EDX,dword ptr [RBP + -0x30]
MOV RDI,RBX
XOR ECX,ECX
CALL qword ptr [RBX + 0x8]
TEST EAX,EAX
JZ 0x0017506d
MOV EAX,0x1
JMP 0x001750a9
LAB_001750a7:
XOR EAX,EAX
LAB_001750a9:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 ft_parse_internal(long param_1,long param_2,int param_3)
{
long lVar1;
char cVar2;
int iVar3;
long local_50;
int8 local_48 [2];
int4 local_38;
lVar1 = **(long **)(param_1 + 0x18);
local_50 = param_2;
do {
cVar2 = 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[0],local_38,0);
} while (iVar3 == 0);
return 1;
}
| |
54,687 | LefDefParser::defiNonDefault::Destroy() | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNonDefault.cpp | void defiNonDefault::Destroy() {
clear();
if (propsAllocated_) {
free((char*)(names_));
free((char*)(values_));
free((char*)(dvalues_));
free((char*)(types_));
}
if (layersAllocated_) {
free((char*)(layerName_));
free((char*)(width_));
free((char*)(hasDiagWidth_));
free((char*)(diagWidth_));
free((char*)(hasSpacing_));
free((char*)(spacing_));
free((char*)(hasWireExt_));
free((char*)(wireExt_));
}
if (viasAllocated_)
free((char*)(viaNames_));
if (viaRulesAllocated_)
free((char*)(viaRuleNames_));
if (minCutsAllocated_) {
free((char*)(cutLayerName_));
free((char*)(numCuts_));
}
} | O3 | cpp | LefDefParser::defiNonDefault::Destroy():
pushq %rbx
movq %rdi, %rbx
callq 0x2b378
cmpl $0x0, 0x94(%rbx)
je 0x2b2ea
movq 0x98(%rbx), %rdi
callq 0x7220
movq 0xa0(%rbx), %rdi
callq 0x7220
movq 0xa8(%rbx), %rdi
callq 0x7220
movq 0xb0(%rbx), %rdi
callq 0x7220
cmpl $0x0, 0x10(%rbx)
je 0x2b338
movq 0x18(%rbx), %rdi
callq 0x7220
movq 0x20(%rbx), %rdi
callq 0x7220
movq 0x28(%rbx), %rdi
callq 0x7220
movq 0x30(%rbx), %rdi
callq 0x7220
movq 0x38(%rbx), %rdi
callq 0x7220
movq 0x40(%rbx), %rdi
callq 0x7220
movq 0x48(%rbx), %rdi
callq 0x7220
movq 0x50(%rbx), %rdi
callq 0x7220
cmpl $0x0, 0x5c(%rbx)
je 0x2b347
movq 0x60(%rbx), %rdi
callq 0x7220
cmpl $0x0, 0x6c(%rbx)
je 0x2b356
movq 0x70(%rbx), %rdi
callq 0x7220
cmpl $0x0, 0x7c(%rbx)
je 0x2b375
movq 0x80(%rbx), %rdi
callq 0x7220
movq 0x88(%rbx), %rdi
popq %rbx
jmp 0x7220
popq %rbx
retq
nop
| _ZN12LefDefParser14defiNonDefault7DestroyEv:
push rbx
mov rbx, rdi
call _ZN12LefDefParser14defiNonDefault5clearEv; LefDefParser::defiNonDefault::clear(void)
cmp dword ptr [rbx+94h], 0
jz short loc_2B2EA
mov rdi, [rbx+98h]
call _free
mov rdi, [rbx+0A0h]
call _free
mov rdi, [rbx+0A8h]
call _free
mov rdi, [rbx+0B0h]
call _free
loc_2B2EA:
cmp dword ptr [rbx+10h], 0
jz short loc_2B338
mov rdi, [rbx+18h]
call _free
mov rdi, [rbx+20h]
call _free
mov rdi, [rbx+28h]
call _free
mov rdi, [rbx+30h]
call _free
mov rdi, [rbx+38h]
call _free
mov rdi, [rbx+40h]
call _free
mov rdi, [rbx+48h]
call _free
mov rdi, [rbx+50h]
call _free
loc_2B338:
cmp dword ptr [rbx+5Ch], 0
jz short loc_2B347
mov rdi, [rbx+60h]
call _free
loc_2B347:
cmp dword ptr [rbx+6Ch], 0
jz short loc_2B356
mov rdi, [rbx+70h]
call _free
loc_2B356:
cmp dword ptr [rbx+7Ch], 0
jz short loc_2B375
mov rdi, [rbx+80h]
call _free
mov rdi, [rbx+88h]
pop rbx
jmp _free
loc_2B375:
pop rbx
retn
| long long LefDefParser::defiNonDefault::Destroy(void **this)
{
long long result; // rax
result = LefDefParser::defiNonDefault::clear((LefDefParser::defiNonDefault *)this);
if ( *((_DWORD *)this + 37) )
{
free(this[19]);
free(this[20]);
free(this[21]);
result = free(this[22]);
}
if ( *((_DWORD *)this + 4) )
{
free(this[3]);
free(this[4]);
free(this[5]);
free(this[6]);
free(this[7]);
free(this[8]);
free(this[9]);
result = free(this[10]);
}
if ( *((_DWORD *)this + 23) )
result = free(this[12]);
if ( *((_DWORD *)this + 27) )
result = free(this[14]);
if ( *((_DWORD *)this + 31) )
{
free(this[16]);
return free(this[17]);
}
return result;
}
| Destroy:
PUSH RBX
MOV RBX,RDI
CALL 0x0012b378
CMP dword ptr [RBX + 0x94],0x0
JZ 0x0012b2ea
MOV RDI,qword ptr [RBX + 0x98]
CALL 0x00107220
MOV RDI,qword ptr [RBX + 0xa0]
CALL 0x00107220
MOV RDI,qword ptr [RBX + 0xa8]
CALL 0x00107220
MOV RDI,qword ptr [RBX + 0xb0]
CALL 0x00107220
LAB_0012b2ea:
CMP dword ptr [RBX + 0x10],0x0
JZ 0x0012b338
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x00107220
MOV RDI,qword ptr [RBX + 0x20]
CALL 0x00107220
MOV RDI,qword ptr [RBX + 0x28]
CALL 0x00107220
MOV RDI,qword ptr [RBX + 0x30]
CALL 0x00107220
MOV RDI,qword ptr [RBX + 0x38]
CALL 0x00107220
MOV RDI,qword ptr [RBX + 0x40]
CALL 0x00107220
MOV RDI,qword ptr [RBX + 0x48]
CALL 0x00107220
MOV RDI,qword ptr [RBX + 0x50]
CALL 0x00107220
LAB_0012b338:
CMP dword ptr [RBX + 0x5c],0x0
JZ 0x0012b347
MOV RDI,qword ptr [RBX + 0x60]
CALL 0x00107220
LAB_0012b347:
CMP dword ptr [RBX + 0x6c],0x0
JZ 0x0012b356
MOV RDI,qword ptr [RBX + 0x70]
CALL 0x00107220
LAB_0012b356:
CMP dword ptr [RBX + 0x7c],0x0
JZ 0x0012b375
MOV RDI,qword ptr [RBX + 0x80]
CALL 0x00107220
MOV RDI,qword ptr [RBX + 0x88]
POP RBX
JMP 0x00107220
LAB_0012b375:
POP RBX
RET
|
/* LefDefParser::defiNonDefault::Destroy() */
void __thiscall LefDefParser::defiNonDefault::Destroy(defiNonDefault *this)
{
clear(this);
if (*(int *)(this + 0x94) != 0) {
free(*(void **)(this + 0x98));
free(*(void **)(this + 0xa0));
free(*(void **)(this + 0xa8));
free(*(void **)(this + 0xb0));
}
if (*(int *)(this + 0x10) != 0) {
free(*(void **)(this + 0x18));
free(*(void **)(this + 0x20));
free(*(void **)(this + 0x28));
free(*(void **)(this + 0x30));
free(*(void **)(this + 0x38));
free(*(void **)(this + 0x40));
free(*(void **)(this + 0x48));
free(*(void **)(this + 0x50));
}
if (*(int *)(this + 0x5c) != 0) {
free(*(void **)(this + 0x60));
}
if (*(int *)(this + 0x6c) != 0) {
free(*(void **)(this + 0x70));
}
if (*(int *)(this + 0x7c) != 0) {
free(*(void **)(this + 0x80));
free(*(void **)(this + 0x88));
return;
}
return;
}
| |
54,688 | my_wildcmp_bin_impl | eloqsql/strings/ctype-bin.c | static
int my_wildcmp_bin_impl(CHARSET_INFO *cs,
const char *str,const char *str_end,
const char *wildstr,const char *wildend,
int escape, int w_one, int w_many, int recurse_level)
{
int result= -1; /* Not found, using wildcards */
if (my_string_stack_guard && my_string_stack_guard(recurse_level))
return 1;
while (wildstr != wildend)
{
while (*wildstr != w_many && *wildstr != w_one)
{
if (*wildstr == escape && wildstr+1 != wildend)
wildstr++;
if (str == str_end || likeconv(cs,*wildstr++) != likeconv(cs,*str++))
return(1); /* No match */
if (wildstr == wildend)
return(str != str_end); /* Match if both are at end */
result=1; /* Found an anchor char */
}
if (*wildstr == w_one)
{
do
{
if (str == str_end) /* Skip one char if possible */
return(result);
INC_PTR(cs,str,str_end);
} while (++wildstr < wildend && *wildstr == w_one);
if (wildstr == wildend)
break;
}
if (*wildstr == w_many)
{ /* Found w_many */
uchar cmp;
wildstr++;
/* Remove any '%' and '_' from the wild search string */
for (; wildstr != wildend ; wildstr++)
{
if (*wildstr == w_many)
continue;
if (*wildstr == w_one)
{
if (str == str_end)
return(-1);
INC_PTR(cs,str,str_end);
continue;
}
break; /* Not a wild character */
}
if (wildstr == wildend)
return(0); /* match if w_many is last */
if (str == str_end)
return(-1);
if ((cmp= *wildstr) == escape && wildstr+1 != wildend)
cmp= *++wildstr;
INC_PTR(cs,wildstr,wildend); /* This is compared through cmp */
cmp=likeconv(cs,cmp);
do
{
while (str != str_end && (uchar) likeconv(cs,*str) != cmp)
str++;
if (str++ == str_end)
return(-1);
{
int tmp=my_wildcmp_bin_impl(cs,str,str_end,wildstr,wildend,escape,w_one,
w_many, recurse_level + 1);
if (tmp <= 0)
return(tmp);
}
} while (str != str_end);
return(-1);
}
}
return(str != str_end ? 1 : 0);
} | O3 | c | my_wildcmp_bin_impl:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %r15d
movq %rcx, %r13
movq %rdx, %rbx
movq %rdi, %r12
movl 0x18(%rbp), %r10d
leaq 0xb5c99a(%rip), %rax # 0xc08e58
movq (%rax), %rax
testq %rax, %rax
je 0xac4f1
movl %r10d, %edi
movq %rsi, %r14
movl %r15d, -0x30(%rbp)
movl %r8d, %r15d
callq *%rax
movl 0x18(%rbp), %r10d
movl %r15d, %r8d
movl -0x30(%rbp), %r15d
movq %r14, %rsi
movl $0x1, %r14d
testl %eax, %eax
jne 0xac5fd
movl 0x10(%rbp), %r11d
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
cmpq %r13, %rbx
je 0xac5f3
movb (%rbx), %al
movsbl %al, %ecx
cmpl %r11d, %ecx
sete %dil
cmpl %r15d, %ecx
sete %dl
orb %dl, %dil
je 0xac564
testb %dl, %dl
je 0xac55a
incq %rbx
movq %rbx, %rax
cmpq %rsi, %r12
je 0xac5fd
movq %r12, %rcx
movq %rax, %rbx
cmpq %r13, %rax
jae 0xac549
leaq 0x1(%rcx), %r12
movsbl (%rbx), %edx
leaq 0x1(%rbx), %rax
cmpl %r15d, %edx
je 0xac525
incq %rcx
cmpq %r13, %rbx
je 0xac5f0
movb (%rbx), %al
movq %rcx, %r12
movsbl %al, %eax
cmpl %r11d, %eax
jne 0xac4fb
jmp 0xac5b6
movl $0x1, %r14d
cmpq %rsi, %r12
je 0xac5fd
leaq 0x1(%rbx), %rax
cmpq %r13, %rax
cmoveq %rbx, %rax
cmpl %r8d, %ecx
cmoveq %rax, %rbx
movb (%rbx), %al
cmpb (%r12), %al
jne 0xac5fd
incq %r12
incq %rbx
cmpq %r13, %rbx
je 0xac5f3
movb (%rbx), %al
movsbl %al, %ecx
cmpl %r15d, %ecx
sete %dl
cmpl %r11d, %ecx
je 0xac51b
cmpl %r15d, %ecx
jne 0xac564
jmp 0xac51b
leaq 0x1(%rbx), %rax
xorl %r14d, %r14d
cmpq %r13, %rax
je 0xac5fd
addq $0x2, %rbx
movb -0x1(%rbx), %cl
movsbl %cl, %eax
cmpl %r11d, %eax
je 0xac5e2
cmpl %r15d, %eax
jne 0xac60f
cmpq %rsi, %r12
je 0xac695
incq %r12
leaq 0x1(%rbx), %rax
cmpq %r13, %rbx
movq %rax, %rbx
jne 0xac5c6
jmp 0xac5fd
movq %rcx, %r12
xorl %r14d, %r14d
cmpq %rsi, %r12
setne %r14b
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
cmpq %rsi, %r12
je 0xac5fd
movzbl %cl, %eax
leaq -0x1(%rbx), %rdx
cmpl %r8d, %eax
jne 0xac630
cmpq %r13, %rbx
je 0xac630
movb (%rbx), %cl
movq %rbx, %rdx
incq %rdx
incl %r10d
cmpq %rsi, %r12
je 0xac5fd
cmpb %cl, (%r12)
je 0xac646
incq %r12
jmp 0xac636
movb %cl, -0x29(%rbp)
incq %r12
movq %r12, %rdi
movq %rdx, -0x38(%rbp)
movq %r13, %rcx
movq %rsi, %rbx
movl %r8d, -0x30(%rbp)
movl %r15d, %r9d
movq %r10, -0x40(%rbp)
pushq %r10
pushq %r11
callq 0xac496
addq $0x10, %rsp
testl %eax, %eax
jle 0xac6a0
cmpq %rbx, %r12
movq %rbx, %rsi
movl -0x30(%rbp), %r8d
movq -0x40(%rbp), %r10
movl 0x10(%rbp), %r11d
movb -0x29(%rbp), %cl
movq -0x38(%rbp), %rdx
jne 0xac636
jmp 0xac5fd
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
jmp 0xac5fd
movl %eax, %r14d
jmp 0xac5fd
| my_wildcmp_bin_impl:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15d, r9d
mov r13, rcx
mov rbx, rdx
mov r12, rdi
mov r10d, [rbp+arg_8]
lea rax, my_string_stack_guard
mov rax, [rax]
test rax, rax
jz short loc_AC4F1
mov edi, r10d
mov r14, rsi
mov [rbp+var_30], r15d
mov r15d, r8d
call rax
mov r10d, [rbp+arg_8]
mov r8d, r15d
mov r15d, [rbp+var_30]
mov rsi, r14
mov r14d, 1
test eax, eax
jnz loc_AC5FD
loc_AC4F1:
mov r11d, [rbp+arg_0]
mov r14d, 0FFFFFFFFh
loc_AC4FB:
cmp rbx, r13
jz loc_AC5F3
mov al, [rbx]
movsx ecx, al
cmp ecx, r11d
setz dil
cmp ecx, r15d
setz dl
or dil, dl
jz short loc_AC564
loc_AC51B:
test dl, dl
jz short loc_AC55A
inc rbx
mov rax, rbx
loc_AC525:
cmp r12, rsi
jz loc_AC5FD
mov rcx, r12
mov rbx, rax
cmp rax, r13
jnb short loc_AC549
lea r12, [rcx+1]
movsx edx, byte ptr [rbx]
lea rax, [rbx+1]
cmp edx, r15d
jz short loc_AC525
loc_AC549:
inc rcx
cmp rbx, r13
jz loc_AC5F0
mov al, [rbx]
mov r12, rcx
loc_AC55A:
movsx eax, al
cmp eax, r11d
jnz short loc_AC4FB
jmp short loc_AC5B6
loc_AC564:
mov r14d, 1
cmp r12, rsi
jz loc_AC5FD
lea rax, [rbx+1]
cmp rax, r13
cmovz rax, rbx
cmp ecx, r8d
cmovz rbx, rax
mov al, [rbx]
cmp al, [r12]
jnz short loc_AC5FD
inc r12
inc rbx
cmp rbx, r13
jz short loc_AC5F3
mov al, [rbx]
movsx ecx, al
cmp ecx, r15d
setz dl
cmp ecx, r11d
jz loc_AC51B
cmp ecx, r15d
jnz short loc_AC564
jmp loc_AC51B
loc_AC5B6:
lea rax, [rbx+1]
xor r14d, r14d
cmp rax, r13
jz short loc_AC5FD
add rbx, 2
loc_AC5C6:
mov cl, [rbx-1]
movsx eax, cl
cmp eax, r11d
jz short loc_AC5E2
cmp eax, r15d
jnz short loc_AC60F
cmp r12, rsi
jz loc_AC695
inc r12
loc_AC5E2:
lea rax, [rbx+1]
cmp rbx, r13
mov rbx, rax
jnz short loc_AC5C6
jmp short loc_AC5FD
loc_AC5F0:
mov r12, rcx
loc_AC5F3:
xor r14d, r14d
cmp r12, rsi
setnz r14b
loc_AC5FD:
mov eax, r14d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_AC60F:
mov r14d, 0FFFFFFFFh
cmp r12, rsi
jz short loc_AC5FD
movzx eax, cl
lea rdx, [rbx-1]
cmp eax, r8d
jnz short loc_AC630
cmp rbx, r13
jz short loc_AC630
mov cl, [rbx]
mov rdx, rbx
loc_AC630:
inc rdx
inc r10d
loc_AC636:
cmp r12, rsi
jz short loc_AC5FD
cmp [r12], cl
jz short loc_AC646
inc r12
jmp short loc_AC636
loc_AC646:
mov [rbp+var_29], cl
inc r12
mov rdi, r12
mov [rbp+var_38], rdx
mov rcx, r13
mov rbx, rsi
mov [rbp+var_30], r8d
mov r9d, r15d
mov [rbp+var_40], r10
push r10
push r11
call my_wildcmp_bin_impl
add rsp, 10h
test eax, eax
jle short loc_AC6A0
cmp r12, rbx
mov rsi, rbx
mov r8d, [rbp+var_30]
mov r10, [rbp+var_40]
mov r11d, [rbp+arg_0]
mov cl, [rbp+var_29]
mov rdx, [rbp+var_38]
jnz short loc_AC636
jmp loc_AC5FD
loc_AC695:
mov r14d, 0FFFFFFFFh
jmp loc_AC5FD
loc_AC6A0:
mov r14d, eax
jmp loc_AC5FD
| long long my_wildcmp_bin_impl(
_BYTE *a1,
_BYTE *a2,
char *a3,
char *a4,
int a5,
int a6,
int a7,
unsigned int a8)
{
int v8; // r15d
unsigned int v12; // r10d
int v13; // r15d
int v14; // eax
unsigned int v15; // r14d
int v16; // r11d
char v17; // al
int v18; // ecx
bool v19; // dl
char *v20; // rax
_BYTE *v21; // rcx
int v22; // edx
_BYTE *v23; // rcx
char *v24; // rax
char *v25; // rbx
unsigned __int8 v26; // cl
char *v29; // rdx
_BYTE *v30; // rdx
long long v31; // r10
int v32; // eax
long long v33; // [rsp+0h] [rbp-40h]
_BYTE *v34; // [rsp+8h] [rbp-38h]
int v36; // [rsp+10h] [rbp-30h]
unsigned __int8 v37; // [rsp+17h] [rbp-29h]
v8 = a6;
v12 = a8;
if ( my_string_stack_guard )
{
v13 = a5;
v14 = my_string_stack_guard(a8);
v12 = a8;
a5 = v13;
v8 = a6;
v15 = 1;
if ( v14 )
return v15;
}
v16 = a7;
v15 = -1;
do
{
if ( a3 == a4 )
return a1 != a2;
v17 = *a3;
v18 = *a3;
v19 = v18 == v8;
if ( v18 != v8 && v18 != a7 )
{
do
{
v15 = 1;
if ( a1 == a2 )
return v15;
v24 = a3 + 1;
if ( a3 + 1 == a4 )
v24 = a3;
if ( v18 == a5 )
a3 = v24;
if ( *a3 != *a1 )
return v15;
++a1;
if ( ++a3 == a4 )
return a1 != a2;
v17 = *a3;
v18 = *a3;
v19 = v18 == v8;
}
while ( v18 != a7 && v18 != v8 );
}
if ( v19 )
{
v20 = a3 + 1;
do
{
if ( a1 == a2 )
return v15;
v21 = a1;
a3 = v20;
if ( v20 >= a4 )
break;
++a1;
v22 = *v20++;
}
while ( v22 == v8 );
v23 = v21 + 1;
if ( a3 == a4 )
{
a1 = v23;
return a1 != a2;
}
v17 = *a3;
a1 = v23;
}
}
while ( v17 != a7 );
v15 = 0;
if ( a3 + 1 == a4 )
return v15;
v25 = a3 + 2;
while ( 1 )
{
v26 = *(v25 - 1);
if ( (char)v26 == a7 )
goto LABEL_31;
if ( (char)v26 != v8 )
break;
if ( a1 == a2 )
return (unsigned int)-1;
++a1;
LABEL_31:
if ( v25++ == a4 )
return v15;
}
v15 = -1;
if ( a1 != a2 )
{
v29 = v25 - 1;
if ( v26 == a5 && v25 != a4 )
{
v26 = *v25;
v29 = v25;
}
v30 = v29 + 1;
v31 = v12 + 1;
while ( a1 != a2 )
{
if ( *a1 == v26 )
{
v37 = v26;
++a1;
v34 = v30;
v36 = a5;
v33 = v31;
v32 = my_wildcmp_bin_impl((_DWORD)a1, (_DWORD)a2, (_DWORD)v30, (_DWORD)a4, a5, v8, v16, v31);
if ( v32 <= 0 )
return (unsigned int)v32;
a5 = v36;
v31 = v33;
v16 = a7;
v26 = v37;
v30 = v34;
if ( a1 == a2 )
return v15;
}
else
{
++a1;
}
}
}
return v15;
}
| my_wildcmp_bin_impl:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15D,R9D
MOV R13,RCX
MOV RBX,RDX
MOV R12,RDI
MOV R10D,dword ptr [RBP + 0x18]
LEA RAX,[0xd08e58]
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x001ac4f1
MOV EDI,R10D
MOV R14,RSI
MOV dword ptr [RBP + -0x30],R15D
MOV R15D,R8D
CALL RAX
MOV R10D,dword ptr [RBP + 0x18]
MOV R8D,R15D
MOV R15D,dword ptr [RBP + -0x30]
MOV RSI,R14
MOV R14D,0x1
TEST EAX,EAX
JNZ 0x001ac5fd
LAB_001ac4f1:
MOV R11D,dword ptr [RBP + 0x10]
MOV R14D,0xffffffff
LAB_001ac4fb:
CMP RBX,R13
JZ 0x001ac5f3
MOV AL,byte ptr [RBX]
MOVSX ECX,AL
CMP ECX,R11D
SETZ DIL
CMP ECX,R15D
SETZ DL
OR DIL,DL
JZ 0x001ac564
LAB_001ac51b:
TEST DL,DL
JZ 0x001ac55a
INC RBX
MOV RAX,RBX
LAB_001ac525:
CMP R12,RSI
JZ 0x001ac5fd
MOV RCX,R12
MOV RBX,RAX
CMP RAX,R13
JNC 0x001ac549
LEA R12,[RCX + 0x1]
MOVSX EDX,byte ptr [RBX]
LEA RAX,[RBX + 0x1]
CMP EDX,R15D
JZ 0x001ac525
LAB_001ac549:
INC RCX
CMP RBX,R13
JZ 0x001ac5f0
MOV AL,byte ptr [RBX]
MOV R12,RCX
LAB_001ac55a:
MOVSX EAX,AL
CMP EAX,R11D
JNZ 0x001ac4fb
JMP 0x001ac5b6
LAB_001ac564:
MOV R14D,0x1
CMP R12,RSI
JZ 0x001ac5fd
LEA RAX,[RBX + 0x1]
CMP RAX,R13
CMOVZ RAX,RBX
CMP ECX,R8D
CMOVZ RBX,RAX
MOV AL,byte ptr [RBX]
CMP AL,byte ptr [R12]
JNZ 0x001ac5fd
INC R12
INC RBX
CMP RBX,R13
JZ 0x001ac5f3
MOV AL,byte ptr [RBX]
MOVSX ECX,AL
CMP ECX,R15D
SETZ DL
CMP ECX,R11D
JZ 0x001ac51b
CMP ECX,R15D
JNZ 0x001ac564
JMP 0x001ac51b
LAB_001ac5b6:
LEA RAX,[RBX + 0x1]
XOR R14D,R14D
CMP RAX,R13
JZ 0x001ac5fd
ADD RBX,0x2
LAB_001ac5c6:
MOV CL,byte ptr [RBX + -0x1]
MOVSX EAX,CL
CMP EAX,R11D
JZ 0x001ac5e2
CMP EAX,R15D
JNZ 0x001ac60f
CMP R12,RSI
JZ 0x001ac695
INC R12
LAB_001ac5e2:
LEA RAX,[RBX + 0x1]
CMP RBX,R13
MOV RBX,RAX
JNZ 0x001ac5c6
JMP 0x001ac5fd
LAB_001ac5f0:
MOV R12,RCX
LAB_001ac5f3:
XOR R14D,R14D
CMP R12,RSI
SETNZ R14B
LAB_001ac5fd:
MOV EAX,R14D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001ac60f:
MOV R14D,0xffffffff
CMP R12,RSI
JZ 0x001ac5fd
MOVZX EAX,CL
LEA RDX,[RBX + -0x1]
CMP EAX,R8D
JNZ 0x001ac630
CMP RBX,R13
JZ 0x001ac630
MOV CL,byte ptr [RBX]
MOV RDX,RBX
LAB_001ac630:
INC RDX
INC R10D
LAB_001ac636:
CMP R12,RSI
JZ 0x001ac5fd
CMP byte ptr [R12],CL
JZ 0x001ac646
INC R12
JMP 0x001ac636
LAB_001ac646:
MOV byte ptr [RBP + -0x29],CL
INC R12
MOV RDI,R12
MOV qword ptr [RBP + -0x38],RDX
MOV RCX,R13
MOV RBX,RSI
MOV dword ptr [RBP + -0x30],R8D
MOV R9D,R15D
MOV qword ptr [RBP + -0x40],R10
PUSH R10
PUSH R11
CALL 0x001ac496
ADD RSP,0x10
TEST EAX,EAX
JLE 0x001ac6a0
CMP R12,RBX
MOV RSI,RBX
MOV R8D,dword ptr [RBP + -0x30]
MOV R10,qword ptr [RBP + -0x40]
MOV R11D,dword ptr [RBP + 0x10]
MOV CL,byte ptr [RBP + -0x29]
MOV RDX,qword ptr [RBP + -0x38]
JNZ 0x001ac636
JMP 0x001ac5fd
LAB_001ac695:
MOV R14D,0xffffffff
JMP 0x001ac5fd
LAB_001ac6a0:
MOV R14D,EAX
JMP 0x001ac5fd
|
uint my_wildcmp_bin_impl(byte *param_1,byte *param_2,byte *param_3,byte *param_4,ulong param_5,
uint param_6,uint param_7,int param_8)
{
byte bVar1;
int iVar2;
uint uVar3;
byte *pbVar4;
uint uVar5;
byte *pbVar6;
ulong uVar7;
bool bVar8;
if (my_string_stack_guard != (code *)0x0) {
param_5 = param_5 & 0xffffffff;
iVar2 = (*my_string_stack_guard)(param_8);
if (iVar2 != 0) {
return 1;
}
}
uVar3 = 0xffffffff;
while (param_3 != param_4) {
bVar1 = *param_3;
uVar5 = (uint)(char)bVar1;
bVar8 = uVar5 == param_6;
if (uVar5 != param_7 && !bVar8) {
do {
uVar3 = 1;
if (param_1 == param_2) {
return 1;
}
pbVar4 = param_3 + 1;
if (param_3 + 1 == param_4) {
pbVar4 = param_3;
}
if (uVar5 == (uint)param_5) {
param_3 = pbVar4;
}
if (*param_3 != *param_1) {
return 1;
}
param_1 = param_1 + 1;
param_3 = param_3 + 1;
if (param_3 == param_4) goto LAB_001ac5f3;
bVar1 = *param_3;
uVar5 = (uint)(char)bVar1;
bVar8 = uVar5 == param_6;
} while ((uVar5 != param_7) && (uVar5 != param_6));
}
if (bVar8) {
do {
pbVar4 = param_1;
param_3 = param_3 + 1;
if (pbVar4 == param_2) {
return uVar3;
}
} while ((param_3 < param_4) && (param_1 = pbVar4 + 1, (int)(char)*param_3 == param_6));
param_1 = pbVar4 + 1;
if (param_3 == param_4) break;
bVar1 = *param_3;
}
if ((int)(char)bVar1 == param_7) {
if (param_3 + 1 != param_4) {
pbVar4 = param_3 + 2;
do {
bVar1 = pbVar4[-1];
if ((int)(char)bVar1 != param_7) {
if ((int)(char)bVar1 != param_6) {
if (param_1 == param_2) {
return 0xffffffff;
}
pbVar6 = pbVar4 + -1;
if (((uint)bVar1 == (uint)param_5) && (pbVar4 != param_4)) {
bVar1 = *pbVar4;
pbVar6 = pbVar4;
}
pbVar6 = pbVar6 + 1;
uVar7 = (ulong)(param_8 + 1);
while( true ) {
while( true ) {
if (param_1 == param_2) {
return 0xffffffff;
}
if (*param_1 == bVar1) break;
param_1 = param_1 + 1;
}
param_1 = param_1 + 1;
uVar5 = (uint)param_5;
uVar3 = my_wildcmp_bin_impl(param_1,param_2,pbVar6,param_4,param_5,param_6,param_7,
uVar7,uVar7,pbVar6,uVar5);
if ((int)uVar3 < 1) break;
param_5 = (ulong)uVar5;
if (param_1 == param_2) {
return 0xffffffff;
}
}
return uVar3;
}
if (param_1 == param_2) {
return 0xffffffff;
}
param_1 = param_1 + 1;
}
bVar8 = pbVar4 != param_4;
pbVar4 = pbVar4 + 1;
} while (bVar8);
}
return 0;
}
}
LAB_001ac5f3:
return (uint)(param_1 != param_2);
}
| |
54,689 | nglog::LogMessage::LogStream::~LogStream() | ng-log[P]ng-log/src/ng-log/logging.h | class NGLOG_EXPORT LogStream : public std::ostream {
NGLOG_MSVC_POP_WARNING()
public:
// In some cases, like when compiling glog as a static library with GCC and
// linking against a Clang-built executable, this constructor will be
// removed by the linker. We use this attribute to prevent the linker from
// discarding it.
NGLOG_USED
LogStream(char* buf, int len, int64 ctr)
: std::ostream(nullptr), streambuf_(buf, len), ctr_(ctr), self_(this) {
rdbuf(&streambuf_);
}
LogStream(LogStream&& other) noexcept
: std::ostream(nullptr),
streambuf_(std::move(other.streambuf_)),
ctr_(std::exchange(other.ctr_, 0)),
self_(this) {
rdbuf(&streambuf_);
}
LogStream& operator=(LogStream&& other) noexcept {
streambuf_ = std::move(other.streambuf_);
ctr_ = std::exchange(other.ctr_, 0);
rdbuf(&streambuf_);
return *this;
}
int64 ctr() const { return ctr_; }
void set_ctr(int64 ctr) { ctr_ = ctr; }
LogStream* self() const { return self_; }
// Legacy std::streambuf methods.
size_t pcount() const { return streambuf_.pcount(); }
char* pbase() const { return streambuf_.pbase(); }
char* str() const { return pbase(); }
LogStream(const LogStream&) = delete;
LogStream& operator=(const LogStream&) = delete;
private:
base_logging::LogStreamBuf streambuf_;
int64 ctr_; // Counter hack (for the LOG_EVERY_X() macro)
LogStream* self_; // Consistency check hack
} | O0 | c | nglog::LogMessage::LogStream::~LogStream():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0xc0f0
movq -0x10(%rbp), %rdi
movl $0x160, %esi # imm = 0x160
callq 0x9720
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN5nglog10LogMessage9LogStreamD0Ev:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]; this
mov [rbp+var_10], rdi
call _ZN5nglog10LogMessage9LogStreamD1Ev; nglog::LogMessage::LogStream::~LogStream()
mov rdi, [rbp+var_10]; void *
mov esi, 160h; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
add rsp, 10h
pop rbp
retn
| void nglog::LogMessage::LogStream::~LogStream(nglog::LogMessage::LogStream *this)
{
nglog::LogMessage::LogStream::~LogStream(this);
operator delete(this, 0x160uLL);
}
| ~LogStream:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RDI
CALL 0x0010c0f0
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x160
CALL 0x00109720
ADD RSP,0x10
POP RBP
RET
|
/* nglog::LogMessage::LogStream::~LogStream() */
void __thiscall nglog::LogMessage::LogStream::~LogStream(LogStream *this)
{
~LogStream(this);
operator_delete(this,0x160);
return;
}
| |
54,690 | nglog::LogMessage::LogStream::~LogStream() | ng-log[P]ng-log/src/ng-log/logging.h | class NGLOG_EXPORT LogStream : public std::ostream {
NGLOG_MSVC_POP_WARNING()
public:
// In some cases, like when compiling glog as a static library with GCC and
// linking against a Clang-built executable, this constructor will be
// removed by the linker. We use this attribute to prevent the linker from
// discarding it.
NGLOG_USED
LogStream(char* buf, int len, int64 ctr)
: std::ostream(nullptr), streambuf_(buf, len), ctr_(ctr), self_(this) {
rdbuf(&streambuf_);
}
LogStream(LogStream&& other) noexcept
: std::ostream(nullptr),
streambuf_(std::move(other.streambuf_)),
ctr_(std::exchange(other.ctr_, 0)),
self_(this) {
rdbuf(&streambuf_);
}
LogStream& operator=(LogStream&& other) noexcept {
streambuf_ = std::move(other.streambuf_);
ctr_ = std::exchange(other.ctr_, 0);
rdbuf(&streambuf_);
return *this;
}
int64 ctr() const { return ctr_; }
void set_ctr(int64 ctr) { ctr_ = ctr; }
LogStream* self() const { return self_; }
// Legacy std::streambuf methods.
size_t pcount() const { return streambuf_.pcount(); }
char* pbase() const { return streambuf_.pbase(); }
char* str() const { return pbase(); }
LogStream(const LogStream&) = delete;
LogStream& operator=(const LogStream&) = delete;
private:
base_logging::LogStreamBuf streambuf_;
int64 ctr_; // Counter hack (for the LOG_EVERY_X() macro)
LogStream* self_; // Consistency check hack
} | O1 | c | nglog::LogMessage::LogStream::~LogStream():
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %rax
movq -0x18(%rax), %rax
leaq (%rdi,%rax), %rbx
leaq 0x25144(%rip), %rcx # 0x2e408
leaq 0x58(%rdi,%rax), %r14
movq %rcx, -0x58(%r14)
leaq 0x2515c(%rip), %rcx # 0x2e430
movq %rcx, (%r14)
movq 0x25c62(%rip), %rcx # 0x2ef40
addq $0x10, %rcx
movq %rcx, -0x50(%r14)
addq %rax, %rdi
addq $0x40, %rdi
callq 0x77a0
movq %r14, %rdi
callq 0x7170
movl $0x160, %esi # imm = 0x160
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x7530
| _ZTv0_n24_N5nglog10LogMessage9LogStreamD0Ev:
push r14
push rbx
push rax
mov rax, [rdi]
mov rax, [rax-18h]
lea rbx, [rdi+rax]
lea rcx, off_2E408
lea r14, [rdi+rax+58h]
mov [r14-58h], rcx
lea rcx, off_2E430
mov [r14], rcx
mov rcx, cs:_ZTVSt15basic_streambufIcSt11char_traitsIcEE_ptr
add rcx, 10h
mov [r14-50h], 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, 160h; unsigned __int64
mov rdi, rbx; void *
add rsp, 8
pop rbx
pop r14
jmp __ZdlPvm; operator delete(void *,ulong)
| void `virtual thunk to'nglog::LogMessage::LogStream::~LogStream(nglog::LogMessage::LogStream *this)
{
_QWORD *v1; // rbx
v1 = (_QWORD *)((char *)this + *(_QWORD *)(*(_QWORD *)this - 24LL));
*v1 = off_2E408;
v1[11] = off_2E430;
v1[1] = (char *)&`vtable for'std::streambuf + 16;
std::locale::~locale((std::locale *)(v1 + 8));
std::ios_base::~ios_base((std::ios_base *)(v1 + 11));
operator delete(v1, 0x160uLL);
}
| ~LogStream:
PUSH R14
PUSH RBX
PUSH RAX
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + -0x18]
LEA RBX,[RDI + RAX*0x1]
LEA RCX,[0x12e408]
LEA R14,[RDI + RAX*0x1 + 0x58]
MOV qword ptr [R14 + -0x58],RCX
LEA RCX,[0x12e430]
MOV qword ptr [R14],RCX
MOV RCX,qword ptr [0x0012ef40]
ADD RCX,0x10
MOV qword ptr [R14 + -0x50],RCX
ADD RDI,RAX
ADD RDI,0x40
CALL 0x001077a0
MOV RDI,R14
CALL 0x00107170
MOV ESI,0x160
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x00107530
|
/* virtual thunk to nglog::LogMessage::LogStream::~LogStream() */
void __thiscall nglog::LogMessage::LogStream::~LogStream(LogStream *this)
{
ios_base *this_00;
long lVar1;
lVar1 = *(long *)(*(long *)this + -0x18);
this_00 = (ios_base *)(this + lVar1 + 0x58);
*(int ***)(this_00 + -0x58) = &PTR__LogStream_0012e408;
*(int ***)this_00 = &PTR__LogStream_0012e430;
*(int **)(this_00 + -0x50) = PTR_vtable_0012ef40 + 0x10;
std::locale::~locale((locale *)(this + lVar1 + 0x40));
std::ios_base::~ios_base(this_00);
operator_delete(this + lVar1,0x160);
return;
}
| |
54,691 | nglog::LogMessage::LogStream::~LogStream() | ng-log[P]ng-log/src/ng-log/logging.h | class NGLOG_EXPORT LogStream : public std::ostream {
NGLOG_MSVC_POP_WARNING()
public:
// In some cases, like when compiling glog as a static library with GCC and
// linking against a Clang-built executable, this constructor will be
// removed by the linker. We use this attribute to prevent the linker from
// discarding it.
NGLOG_USED
LogStream(char* buf, int len, int64 ctr)
: std::ostream(nullptr), streambuf_(buf, len), ctr_(ctr), self_(this) {
rdbuf(&streambuf_);
}
LogStream(LogStream&& other) noexcept
: std::ostream(nullptr),
streambuf_(std::move(other.streambuf_)),
ctr_(std::exchange(other.ctr_, 0)),
self_(this) {
rdbuf(&streambuf_);
}
LogStream& operator=(LogStream&& other) noexcept {
streambuf_ = std::move(other.streambuf_);
ctr_ = std::exchange(other.ctr_, 0);
rdbuf(&streambuf_);
return *this;
}
int64 ctr() const { return ctr_; }
void set_ctr(int64 ctr) { ctr_ = ctr; }
LogStream* self() const { return self_; }
// Legacy std::streambuf methods.
size_t pcount() const { return streambuf_.pcount(); }
char* pbase() const { return streambuf_.pbase(); }
char* str() const { return pbase(); }
LogStream(const LogStream&) = delete;
LogStream& operator=(const LogStream&) = delete;
private:
base_logging::LogStreamBuf streambuf_;
int64 ctr_; // Counter hack (for the LOG_EVERY_X() macro)
LogStream* self_; // Consistency check hack
} | O3 | c | nglog::LogMessage::LogStream::~LogStream():
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x25356(%rip), %rax # 0x2e448
movq %rax, (%rdi)
leaq 0x58(%rdi), %r14
leaq 0x25370(%rip), %rax # 0x2e470
movq %rax, 0x58(%rdi)
movq 0x25e35(%rip), %rax # 0x2ef40
addq $0x10, %rax
movq %rax, 0x8(%rdi)
addq $0x40, %rdi
callq 0x77a0
movq %r14, %rdi
callq 0x7170
movl $0x160, %esi # imm = 0x160
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x7530
| _ZN5nglog10LogMessage9LogStreamD0Ev:
push r14
push rbx
push rax
mov rbx, rdi
lea rax, off_2E448
mov [rdi], rax
lea r14, [rdi+58h]
lea rax, off_2E470
mov [rdi+58h], rax
mov rax, cs:_ZTVSt15basic_streambufIcSt11char_traitsIcEE_ptr
add rax, 10h
mov [rdi+8], rax
add rdi, 40h ; '@'; this
call __ZNSt6localeD1Ev; std::locale::~locale()
mov rdi, r14; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov esi, 160h; unsigned __int64
mov rdi, rbx; void *
add rsp, 8
pop rbx
pop r14
jmp __ZdlPvm; operator delete(void *,ulong)
| void nglog::LogMessage::LogStream::~LogStream(nglog::LogMessage::LogStream *this)
{
*(_QWORD *)this = off_2E448;
*((_QWORD *)this + 11) = off_2E470;
*((_QWORD *)this + 1) = (char *)&`vtable for'std::streambuf + 16;
std::locale::~locale((nglog::LogMessage::LogStream *)((char *)this + 64));
std::ios_base::~ios_base((nglog::LogMessage::LogStream *)((char *)this + 88));
operator delete(this, 0x160uLL);
}
| ~LogStream:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA RAX,[0x12e448]
MOV qword ptr [RDI],RAX
LEA R14,[RDI + 0x58]
LEA RAX,[0x12e470]
MOV qword ptr [RDI + 0x58],RAX
MOV RAX,qword ptr [0x0012ef40]
ADD RAX,0x10
MOV qword ptr [RDI + 0x8],RAX
ADD RDI,0x40
CALL 0x001077a0
MOV RDI,R14
CALL 0x00107170
MOV ESI,0x160
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x00107530
|
/* nglog::LogMessage::LogStream::~LogStream() */
void __thiscall nglog::LogMessage::LogStream::~LogStream(LogStream *this)
{
*(int ***)this = &PTR__LogStream_0012e448;
*(int ***)(this + 0x58) = &PTR__LogStream_0012e470;
*(int **)(this + 8) = PTR_vtable_0012ef40 + 0x10;
std::locale::~locale((locale *)(this + 0x40));
std::ios_base::~ios_base((ios_base *)(this + 0x58));
operator_delete(this,0x160);
return;
}
| |
54,692 | ma_pvio_tls_compare_fp | eloqsql/libmariadb/libmariadb/ma_tls.c | static my_bool ma_pvio_tls_compare_fp(const char *cert_fp,
unsigned int cert_fp_len,
const char *fp, unsigned int fp_len)
{
char *p= (char *)fp,
*c;
/* check length */
if (cert_fp_len != 20)
return 1;
/* We support two formats:
2 digits hex numbers, separated by colons (length=59)
20 * 2 digits hex numbers without separators (length = 40)
*/
if (fp_len != (strchr(fp, ':') ? 59 : 40))
return 1;
for(c= (char *)cert_fp; c < cert_fp + cert_fp_len; c++)
{
signed char d1, d2;
if (*p == ':')
p++;
if (p - fp > (int)fp_len -1)
return 1;
if ((d1 = ma_hex2int(*p)) == - 1 ||
(d2 = ma_hex2int(*(p+1))) == -1 ||
(char)(d1 * 16 + d2) != *c)
return 1;
p+= 2;
}
return 0;
} | O0 | c | ma_pvio_tls_compare_fp:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpl $0x14, -0x14(%rbp)
je 0x4860d
movb $0x1, -0x1(%rbp)
jmp 0x4870c
movl -0x24(%rbp), %eax
movl %eax, -0x40(%rbp)
movq -0x20(%rbp), %rdi
movl $0x3a, %esi
callq 0x364c0
movq %rax, %rsi
movl -0x40(%rbp), %eax
movl $0x28, %ecx
movl $0x3b, %edx
cmpq $0x0, %rsi
cmovnel %edx, %ecx
cmpl %ecx, %eax
je 0x48645
movb $0x1, -0x1(%rbp)
jmp 0x4870c
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x48708
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3a, %eax
jne 0x4867c
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
movl -0x24(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
cmpq %rcx, %rax
jle 0x4869b
movb $0x1, -0x1(%rbp)
jmp 0x4870c
movq -0x30(%rbp), %rax
movsbl (%rax), %edi
callq 0x48740
movb %al, -0x39(%rbp)
movsbl %al, %eax
cmpl $-0x1, %eax
je 0x486e5
movq -0x30(%rbp), %rax
movsbl 0x1(%rax), %edi
callq 0x48740
movb %al, -0x3a(%rbp)
movsbl %al, %eax
cmpl $-0x1, %eax
je 0x486e5
movsbl -0x39(%rbp), %eax
shll $0x4, %eax
movsbl -0x3a(%rbp), %ecx
addl %ecx, %eax
movsbl %al, %eax
movq -0x38(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
je 0x486eb
movb $0x1, -0x1(%rbp)
jmp 0x4870c
movq -0x30(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x4864d
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_pvio_tls_compare_fp:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov rax, [rbp+var_20]
mov [rbp+var_30], rax
cmp [rbp+var_14], 14h
jz short loc_4860D
mov [rbp+var_1], 1
jmp loc_4870C
loc_4860D:
mov eax, [rbp+var_24]
mov [rbp+var_40], eax
mov rdi, [rbp+var_20]
mov esi, 3Ah ; ':'
call _strchr
mov rsi, rax
mov eax, [rbp+var_40]
mov ecx, 28h ; '('
mov edx, 3Bh ; ';'
cmp rsi, 0
cmovnz ecx, edx
cmp eax, ecx
jz short loc_48645
mov [rbp+var_1], 1
jmp loc_4870C
loc_48645:
mov rax, [rbp+var_10]
mov [rbp+var_38], rax
loc_4864D:
mov rax, [rbp+var_38]
mov rcx, [rbp+var_10]
mov edx, [rbp+var_14]
add rcx, rdx
cmp rax, rcx
jnb loc_48708
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax]
cmp eax, 3Ah ; ':'
jnz short loc_4867C
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
loc_4867C:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_20]
sub rax, rcx
mov ecx, [rbp+var_24]
sub ecx, 1
movsxd rcx, ecx
cmp rax, rcx
jle short loc_4869B
mov [rbp+var_1], 1
jmp short loc_4870C
loc_4869B:
mov rax, [rbp+var_30]
movsx edi, byte ptr [rax]
call ma_hex2int
mov [rbp+var_39], al
movsx eax, al
cmp eax, 0FFFFFFFFh
jz short loc_486E5
mov rax, [rbp+var_30]
movsx edi, byte ptr [rax+1]
call ma_hex2int
mov [rbp+var_3A], al
movsx eax, al
cmp eax, 0FFFFFFFFh
jz short loc_486E5
movsx eax, [rbp+var_39]
shl eax, 4
movsx ecx, [rbp+var_3A]
add eax, ecx
movsx eax, al
mov rcx, [rbp+var_38]
movsx ecx, byte ptr [rcx]
cmp eax, ecx
jz short loc_486EB
loc_486E5:
mov [rbp+var_1], 1
jmp short loc_4870C
loc_486EB:
mov rax, [rbp+var_30]
add rax, 2
mov [rbp+var_30], rax
mov rax, [rbp+var_38]
add rax, 1
mov [rbp+var_38], rax
jmp loc_4864D
loc_48708:
mov [rbp+var_1], 0
loc_4870C:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
| char ma_pvio_tls_compare_fp(char *a1, int a2, char *a3, int a4)
{
long long v4; // rsi
int v5; // ecx
char v7; // [rsp+6h] [rbp-3Ah]
char v8; // [rsp+7h] [rbp-39h]
char *i; // [rsp+8h] [rbp-38h]
char *v10; // [rsp+10h] [rbp-30h]
v10 = a3;
if ( a2 != 20 )
return 1;
v4 = strchr(a3, 58LL);
v5 = 40;
if ( v4 )
v5 = 59;
if ( a4 != v5 )
return 1;
for ( i = a1; i < a1 + 20; ++i )
{
if ( *v10 == 58 )
++v10;
if ( v10 - a3 > a4 - 1 )
return 1;
v8 = ma_hex2int((unsigned int)*v10);
if ( v8 == -1 )
return 1;
v7 = ma_hex2int((unsigned int)v10[1]);
if ( v7 == -1 || (char)(v7 + 16 * v8) != *i )
return 1;
v10 += 2;
}
return 0;
}
| ma_pvio_tls_compare_fp:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x30],RAX
CMP dword ptr [RBP + -0x14],0x14
JZ 0x0014860d
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0014870c
LAB_0014860d:
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x40],EAX
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,0x3a
CALL 0x001364c0
MOV RSI,RAX
MOV EAX,dword ptr [RBP + -0x40]
MOV ECX,0x28
MOV EDX,0x3b
CMP RSI,0x0
CMOVNZ ECX,EDX
CMP EAX,ECX
JZ 0x00148645
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0014870c
LAB_00148645:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
LAB_0014864d:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
ADD RCX,RDX
CMP RAX,RCX
JNC 0x00148708
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x3a
JNZ 0x0014867c
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
LAB_0014867c:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOV ECX,dword ptr [RBP + -0x24]
SUB ECX,0x1
MOVSXD RCX,ECX
CMP RAX,RCX
JLE 0x0014869b
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0014870c
LAB_0014869b:
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EDI,byte ptr [RAX]
CALL 0x00148740
MOV byte ptr [RBP + -0x39],AL
MOVSX EAX,AL
CMP EAX,-0x1
JZ 0x001486e5
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EDI,byte ptr [RAX + 0x1]
CALL 0x00148740
MOV byte ptr [RBP + -0x3a],AL
MOVSX EAX,AL
CMP EAX,-0x1
JZ 0x001486e5
MOVSX EAX,byte ptr [RBP + -0x39]
SHL EAX,0x4
MOVSX ECX,byte ptr [RBP + -0x3a]
ADD EAX,ECX
MOVSX EAX,AL
MOV RCX,qword ptr [RBP + -0x38]
MOVSX ECX,byte ptr [RCX]
CMP EAX,ECX
JZ 0x001486eb
LAB_001486e5:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0014870c
LAB_001486eb:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x2
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0014864d
LAB_00148708:
MOV byte ptr [RBP + -0x1],0x0
LAB_0014870c:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int1 ma_pvio_tls_compare_fp(char *param_1,int param_2,char *param_3,int param_4)
{
char cVar1;
char cVar2;
char *pcVar3;
int iVar4;
char *local_40;
char *local_38;
int1 local_9;
if (param_2 == 0x14) {
pcVar3 = strchr(param_3,0x3a);
iVar4 = 0x28;
if (pcVar3 != (char *)0x0) {
iVar4 = 0x3b;
}
local_40 = param_1;
local_38 = param_3;
if (param_4 == iVar4) {
for (; local_40 < param_1 + 0x14; local_40 = local_40 + 1) {
if (*local_38 == ':') {
local_38 = local_38 + 1;
}
if ((long)(param_4 + -1) < (long)local_38 - (long)param_3) {
return 1;
}
cVar1 = ma_hex2int((int)*local_38);
if (((cVar1 == -1) || (cVar2 = ma_hex2int((int)local_38[1]), cVar2 == -1)) ||
((char)((char)((int)cVar1 << 4) + cVar2) != *local_40)) {
return 1;
}
local_38 = local_38 + 2;
}
local_9 = 0;
}
else {
local_9 = 1;
}
}
else {
local_9 = 1;
}
return local_9;
}
| |
54,693 | LoadWaveFromMemory | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raudio.c | Wave LoadWaveFromMemory(const char *fileType, const unsigned char *fileData, int dataSize)
{
Wave wave = { 0 };
if (false) { }
#if defined(SUPPORT_FILEFORMAT_WAV)
else if ((strcmp(fileType, ".wav") == 0) || (strcmp(fileType, ".WAV") == 0))
{
drwav wav = { 0 };
bool success = drwav_init_memory(&wav, fileData, dataSize, NULL);
if (success)
{
wave.frameCount = (unsigned int)wav.totalPCMFrameCount;
wave.sampleRate = wav.sampleRate;
wave.sampleSize = 16;
wave.channels = wav.channels;
wave.data = (short *)RL_MALLOC(wave.frameCount*wave.channels*sizeof(short));
// NOTE: We are forcing conversion to 16bit sample size on reading
drwav_read_pcm_frames_s16(&wav, wav.totalPCMFrameCount, wave.data);
}
else TRACELOG(LOG_WARNING, "WAVE: Failed to load WAV data");
drwav_uninit(&wav);
}
#endif
#if defined(SUPPORT_FILEFORMAT_OGG)
else if ((strcmp(fileType, ".ogg") == 0) || (strcmp(fileType, ".OGG") == 0))
{
stb_vorbis *oggData = stb_vorbis_open_memory((unsigned char *)fileData, dataSize, NULL, NULL);
if (oggData != NULL)
{
stb_vorbis_info info = stb_vorbis_get_info(oggData);
wave.sampleRate = info.sample_rate;
wave.sampleSize = 16; // By default, ogg data is 16 bit per sample (short)
wave.channels = info.channels;
wave.frameCount = (unsigned int)stb_vorbis_stream_length_in_samples(oggData); // NOTE: It returns frames!
wave.data = (short *)RL_MALLOC(wave.frameCount*wave.channels*sizeof(short));
// NOTE: Get the number of samples to process (be careful! we ask for number of shorts, not bytes!)
stb_vorbis_get_samples_short_interleaved(oggData, info.channels, (short *)wave.data, wave.frameCount*wave.channels);
stb_vorbis_close(oggData);
}
else TRACELOG(LOG_WARNING, "WAVE: Failed to load OGG data");
}
#endif
#if defined(SUPPORT_FILEFORMAT_MP3)
else if ((strcmp(fileType, ".mp3") == 0) || (strcmp(fileType, ".MP3") == 0))
{
drmp3_config config = { 0 };
unsigned long long int totalFrameCount = 0;
// NOTE: We are forcing conversion to 32bit float sample size on reading
wave.data = drmp3_open_memory_and_read_pcm_frames_f32(fileData, dataSize, &config, &totalFrameCount, NULL);
wave.sampleSize = 32;
if (wave.data != NULL)
{
wave.channels = config.channels;
wave.sampleRate = config.sampleRate;
wave.frameCount = (int)totalFrameCount;
}
else TRACELOG(LOG_WARNING, "WAVE: Failed to load MP3 data");
}
#endif
#if defined(SUPPORT_FILEFORMAT_QOA)
else if ((strcmp(fileType, ".qoa") == 0) || (strcmp(fileType, ".QOA") == 0))
{
qoa_desc qoa = { 0 };
// NOTE: Returned sample data is always 16 bit?
wave.data = qoa_decode(fileData, dataSize, &qoa);
wave.sampleSize = 16;
if (wave.data != NULL)
{
wave.channels = qoa.channels;
wave.sampleRate = qoa.samplerate;
wave.frameCount = qoa.samples;
}
else TRACELOG(LOG_WARNING, "WAVE: Failed to load QOA data");
}
#endif
#if defined(SUPPORT_FILEFORMAT_FLAC)
else if ((strcmp(fileType, ".flac") == 0) || (strcmp(fileType, ".FLAC") == 0))
{
unsigned long long int totalFrameCount = 0;
// NOTE: We are forcing conversion to 16bit sample size on reading
wave.data = drflac_open_memory_and_read_pcm_frames_s16(fileData, dataSize, &wave.channels, &wave.sampleRate, &totalFrameCount, NULL);
wave.sampleSize = 16;
if (wave.data != NULL) wave.frameCount = (unsigned int)totalFrameCount;
else TRACELOG(LOG_WARNING, "WAVE: Failed to load FLAC data");
}
#endif
else TRACELOG(LOG_WARNING, "WAVE: Data format not supported");
TRACELOG(LOG_INFO, "WAVE: Data loaded successfully (%i Hz, %i bit, %i channels)", wave.sampleRate, wave.sampleSize, wave.channels);
return wave;
} | O0 | c | LoadWaveFromMemory:
pushq %rbp
movq %rsp, %rbp
subq $0x300, %rsp # imm = 0x300
movq %rdi, -0x300(%rbp)
movq %rdi, %rax
movq %rax, -0x2f8(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
xorl %esi, %esi
movl $0x18, %edx
callq 0xa2d0
movq -0x8(%rbp), %rdi
leaq 0x12feb6(%rip), %rsi # 0x1aa574
callq 0xa750
cmpl $0x0, %eax
je 0x7a6e1
movq -0x8(%rbp), %rdi
leaq 0x12fea6(%rip), %rsi # 0x1aa579
callq 0xa750
cmpl $0x0, %eax
jne 0x7a7aa
leaq -0x1a8(%rbp), %rdi
xorl %esi, %esi
movl $0x190, %edx # imm = 0x190
callq 0xa2d0
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rdx
leaq -0x1a8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
callq 0x5dcd0
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x1a9(%rbp)
testb $0x1, -0x1a9(%rbp)
je 0x7a786
movq -0x300(%rbp), %rcx
movq -0x130(%rbp), %rax
movl %eax, (%rcx)
movl -0x13c(%rbp), %eax
movl %eax, 0x4(%rcx)
movl $0x10, 0x8(%rcx)
movzwl -0x138(%rbp), %eax
movl %eax, 0xc(%rcx)
movl (%rcx), %eax
imull 0xc(%rcx), %eax
movl %eax, %eax
movl %eax, %edi
shlq %rdi
callq 0xa6e0
movq %rax, %rcx
movq -0x300(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x130(%rbp), %rsi
movq 0x10(%rax), %rdx
leaq -0x1a8(%rbp), %rdi
callq 0x61210
jmp 0x7a799
movl $0x4, %edi
leaq 0x12fdec(%rip), %rsi # 0x1aa57e
movb $0x0, %al
callq 0x182c40
leaq -0x1a8(%rbp), %rdi
callq 0x5e290
jmp 0x7aa2b
movq -0x8(%rbp), %rdi
leaq 0x12fde7(%rip), %rsi # 0x1aa59c
callq 0xa750
cmpl $0x0, %eax
je 0x7a7d8
movq -0x8(%rbp), %rdi
leaq 0x12fdd7(%rip), %rsi # 0x1aa5a1
callq 0xa750
cmpl $0x0, %eax
jne 0x7a8aa
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x6ad30
movq %rax, -0x1b8(%rbp)
cmpq $0x0, -0x1b8(%rbp)
je 0x7a892
movq -0x1b8(%rbp), %rsi
leaq -0x1d0(%rbp), %rdi
callq 0x656b0
movq -0x300(%rbp), %rax
movl -0x1d0(%rbp), %ecx
movl %ecx, 0x4(%rax)
movl $0x10, 0x8(%rax)
movl -0x1cc(%rbp), %ecx
movl %ecx, 0xc(%rax)
movq -0x1b8(%rbp), %rdi
callq 0x6a510
movq -0x300(%rbp), %rcx
movl %eax, (%rcx)
movl (%rcx), %eax
imull 0xc(%rcx), %eax
movl %eax, %eax
movl %eax, %edi
shlq %rdi
callq 0xa6e0
movq %rax, %rcx
movq -0x300(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x1b8(%rbp), %rdi
movl -0x1cc(%rbp), %esi
movq 0x10(%rax), %rdx
movl (%rax), %ecx
imull 0xc(%rax), %ecx
callq 0x6b270
movq -0x1b8(%rbp), %rdi
callq 0x65210
jmp 0x7a8a5
movl $0x4, %edi
leaq 0x12fd08(%rip), %rsi # 0x1aa5a6
movb $0x0, %al
callq 0x182c40
jmp 0x7aa29
movq -0x8(%rbp), %rdi
leaq 0x12fd0f(%rip), %rsi # 0x1aa5c4
callq 0xa750
cmpl $0x0, %eax
je 0x7a8d8
movq -0x8(%rbp), %rdi
leaq 0x12fcff(%rip), %rsi # 0x1aa5c9
callq 0xa750
cmpl $0x0, %eax
jne 0x7a96e
leaq -0x1d8(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0xa2d0
movq $0x0, -0x1e0(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x14(%rbp), %rsi
leaq -0x1d8(%rbp), %rdx
leaq -0x1e0(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0x6f840
movq %rax, %rcx
movq -0x300(%rbp), %rax
movq %rcx, 0x10(%rax)
movl $0x20, 0x8(%rax)
cmpq $0x0, 0x10(%rax)
je 0x7a956
movq -0x300(%rbp), %rax
movl -0x1d8(%rbp), %ecx
movl %ecx, 0xc(%rax)
movl -0x1d4(%rbp), %ecx
movl %ecx, 0x4(%rax)
movq -0x1e0(%rbp), %rcx
movl %ecx, (%rax)
jmp 0x7a969
movl $0x4, %edi
leaq 0x12fc6c(%rip), %rsi # 0x1aa5ce
movb $0x0, %al
callq 0x182c40
jmp 0x7aa27
movq -0x8(%rbp), %rdi
leaq 0x12fc73(%rip), %rsi # 0x1aa5ec
callq 0xa750
cmpl $0x0, %eax
je 0x7a998
movq -0x8(%rbp), %rdi
leaq 0x12fc63(%rip), %rsi # 0x1aa5f1
callq 0xa750
cmpl $0x0, %eax
jne 0x7aa12
leaq -0x2ec(%rbp), %rdi
xorl %esi, %esi
movl $0x10c, %edx # imm = 0x10C
callq 0xa2d0
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
leaq -0x2ec(%rbp), %rdx
callq 0x70b90
movq %rax, %rcx
movq -0x300(%rbp), %rax
movq %rcx, 0x10(%rax)
movl $0x10, 0x8(%rax)
cmpq $0x0, 0x10(%rax)
je 0x7a9fd
movq -0x300(%rbp), %rax
movl -0x2ec(%rbp), %ecx
movl %ecx, 0xc(%rax)
movl -0x2e8(%rbp), %ecx
movl %ecx, 0x4(%rax)
movl -0x2e4(%rbp), %ecx
movl %ecx, (%rax)
jmp 0x7aa10
movl $0x4, %edi
leaq 0x12fbed(%rip), %rsi # 0x1aa5f6
movb $0x0, %al
callq 0x182c40
jmp 0x7aa25
movl $0x4, %edi
leaq 0x12fbf6(%rip), %rsi # 0x1aa614
movb $0x0, %al
callq 0x182c40
jmp 0x7aa27
jmp 0x7aa29
jmp 0x7aa2b
movq -0x300(%rbp), %rax
movl 0x4(%rax), %edx
movl 0x8(%rax), %ecx
movl 0xc(%rax), %r8d
movl $0x3, %edi
leaq 0x12fbec(%rip), %rsi # 0x1aa634
movb $0x0, %al
callq 0x182c40
movq -0x2f8(%rbp), %rax
addq $0x300, %rsp # imm = 0x300
popq %rbp
retq
nop
| LoadWaveFromMemory:
push rbp
mov rbp, rsp
sub rsp, 300h
mov [rbp+var_300], rdi
mov rax, rdi
mov [rbp+var_2F8], rax
mov [rbp+var_8], rsi
mov [rbp+var_10], rdx
mov [rbp+var_14], ecx
xor esi, esi
mov edx, 18h
call _memset
mov rdi, [rbp+var_8]
lea rsi, aWav; ".wav"
call _strcmp
cmp eax, 0
jz short loc_7A6E1
mov rdi, [rbp+var_8]
lea rsi, aWav_0; ".WAV"
call _strcmp
cmp eax, 0
jnz loc_7A7AA
loc_7A6E1:
lea rdi, [rbp+var_1A8]
xor esi, esi
mov edx, 190h
call _memset
mov rsi, [rbp+var_10]
movsxd rdx, [rbp+var_14]
lea rdi, [rbp+var_1A8]
xor eax, eax
mov ecx, eax
call drwav_init_memory
cmp eax, 0
setnz al
and al, 1
mov [rbp+var_1A9], al
test [rbp+var_1A9], 1
jz short loc_7A786
mov rcx, [rbp+var_300]
mov rax, [rbp+var_130]
mov [rcx], eax
mov eax, [rbp+var_13C]
mov [rcx+4], eax
mov dword ptr [rcx+8], 10h
movzx eax, [rbp+var_138]
mov [rcx+0Ch], eax
mov eax, [rcx]
imul eax, [rcx+0Ch]
mov eax, eax
mov edi, eax
shl rdi, 1
call _malloc
mov rcx, rax
mov rax, [rbp+var_300]
mov [rax+10h], rcx
mov rsi, [rbp+var_130]
mov rdx, [rax+10h]
lea rdi, [rbp+var_1A8]
call drwav_read_pcm_frames_s16
jmp short loc_7A799
loc_7A786:
mov edi, 4
lea rsi, aWaveFailedToLo; "WAVE: Failed to load WAV data"
mov al, 0
call TraceLog
loc_7A799:
lea rdi, [rbp+var_1A8]
call drwav_uninit
jmp loc_7AA2B
loc_7A7AA:
mov rdi, [rbp+var_8]
lea rsi, aOgg; ".ogg"
call _strcmp
cmp eax, 0
jz short loc_7A7D8
mov rdi, [rbp+var_8]
lea rsi, aOgg_0; ".OGG"
call _strcmp
cmp eax, 0
jnz loc_7A8AA
loc_7A7D8:
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
xor eax, eax
mov ecx, eax
mov rdx, rcx
call stb_vorbis_open_memory
mov [rbp+var_1B8], rax
cmp [rbp+var_1B8], 0
jz loc_7A892
mov rsi, [rbp+var_1B8]
lea rdi, [rbp+var_1D0]
call stb_vorbis_get_info
mov rax, [rbp+var_300]
mov ecx, [rbp+var_1D0]
mov [rax+4], ecx
mov dword ptr [rax+8], 10h
mov ecx, [rbp+var_1CC]
mov [rax+0Ch], ecx
mov rdi, [rbp+var_1B8]
call stb_vorbis_stream_length_in_samples
mov rcx, [rbp+var_300]
mov [rcx], eax
mov eax, [rcx]
imul eax, [rcx+0Ch]
mov eax, eax
mov edi, eax
shl rdi, 1
call _malloc
mov rcx, rax
mov rax, [rbp+var_300]
mov [rax+10h], rcx
mov rdi, [rbp+var_1B8]
mov esi, [rbp+var_1CC]
mov rdx, [rax+10h]
mov ecx, [rax]
imul ecx, [rax+0Ch]
call stb_vorbis_get_samples_short_interleaved
mov rdi, [rbp+var_1B8]
call stb_vorbis_close
jmp short loc_7A8A5
loc_7A892:
mov edi, 4
lea rsi, aWaveFailedToLo_0; "WAVE: Failed to load OGG data"
mov al, 0
call TraceLog
loc_7A8A5:
jmp loc_7AA29
loc_7A8AA:
mov rdi, [rbp+var_8]
lea rsi, aMp3; ".mp3"
call _strcmp
cmp eax, 0
jz short loc_7A8D8
mov rdi, [rbp+var_8]
lea rsi, aMp3_0; ".MP3"
call _strcmp
cmp eax, 0
jnz loc_7A96E
loc_7A8D8:
lea rdi, [rbp+var_1D8]
xor esi, esi
mov edx, 8
call _memset
mov [rbp+var_1E0], 0
mov rdi, [rbp+var_10]
movsxd rsi, [rbp+var_14]
lea rdx, [rbp+var_1D8]
lea rcx, [rbp+var_1E0]
xor eax, eax
mov r8d, eax
call drmp3_open_memory_and_read_pcm_frames_f32
mov rcx, rax
mov rax, [rbp+var_300]
mov [rax+10h], rcx
mov dword ptr [rax+8], 20h ; ' '
cmp qword ptr [rax+10h], 0
jz short loc_7A956
mov rax, [rbp+var_300]
mov ecx, [rbp+var_1D8]
mov [rax+0Ch], ecx
mov ecx, [rbp+var_1D4]
mov [rax+4], ecx
mov rcx, [rbp+var_1E0]
mov [rax], ecx
jmp short loc_7A969
loc_7A956:
mov edi, 4
lea rsi, aWaveFailedToLo_1; "WAVE: Failed to load MP3 data"
mov al, 0
call TraceLog
loc_7A969:
jmp loc_7AA27
loc_7A96E:
mov rdi, [rbp+var_8]
lea rsi, aQoa; ".qoa"
call _strcmp
cmp eax, 0
jz short loc_7A998
mov rdi, [rbp+var_8]
lea rsi, aQoa_0; ".QOA"
call _strcmp
cmp eax, 0
jnz short loc_7AA12
loc_7A998:
lea rdi, [rbp+var_2EC]
xor esi, esi
mov edx, 10Ch
call _memset
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
lea rdx, [rbp+var_2EC]
call qoa_decode
mov rcx, rax
mov rax, [rbp+var_300]
mov [rax+10h], rcx
mov dword ptr [rax+8], 10h
cmp qword ptr [rax+10h], 0
jz short loc_7A9FD
mov rax, [rbp+var_300]
mov ecx, [rbp+var_2EC]
mov [rax+0Ch], ecx
mov ecx, [rbp+var_2E8]
mov [rax+4], ecx
mov ecx, [rbp+var_2E4]
mov [rax], ecx
jmp short loc_7AA10
loc_7A9FD:
mov edi, 4
lea rsi, aWaveFailedToLo_2; "WAVE: Failed to load QOA data"
mov al, 0
call TraceLog
loc_7AA10:
jmp short loc_7AA25
loc_7AA12:
mov edi, 4
lea rsi, aWaveDataFormat; "WAVE: Data format not supported"
mov al, 0
call TraceLog
loc_7AA25:
jmp short $+2
loc_7AA27:
jmp short $+2
loc_7AA29:
jmp short $+2
loc_7AA2B:
mov rax, [rbp+var_300]
mov edx, [rax+4]
mov ecx, [rax+8]
mov r8d, [rax+0Ch]
mov edi, 3
lea rsi, aWaveDataLoaded; "WAVE: Data loaded successfully (%i Hz, "...
mov al, 0
call TraceLog
mov rax, [rbp+var_2F8]
add rsp, 300h
pop rbp
retn
| long long LoadWaveFromMemory(long long a1, long long a2, long long a3, int a4)
{
int inited; // eax
int v5; // edx
int v6; // ecx
int v7; // r8d
int v8; // r9d
int v9; // r9d
int v10; // edx
int v11; // ecx
int v12; // r8d
int v13; // r9d
long long v14; // rax
int v15; // edx
int v16; // r8d
int v17; // edx
int v18; // ecx
int v19; // r8d
int v20; // r9d
long long v21; // rax
int v22; // edx
int v23; // r8d
long long v25; // [rsp+14h] [rbp-2ECh] BYREF
int v26; // [rsp+1Ch] [rbp-2E4h]
long long v27; // [rsp+120h] [rbp-1E0h] BYREF
_DWORD v28[2]; // [rsp+128h] [rbp-1D8h] BYREF
int v29; // [rsp+130h] [rbp-1D0h] BYREF
int v30; // [rsp+134h] [rbp-1CCh]
_DWORD *v31; // [rsp+148h] [rbp-1B8h]
bool v32; // [rsp+157h] [rbp-1A9h]
_BYTE v33[108]; // [rsp+158h] [rbp-1A8h] BYREF
int v34; // [rsp+1C4h] [rbp-13Ch]
unsigned __int16 v35; // [rsp+1C8h] [rbp-138h]
unsigned long long v36; // [rsp+1D0h] [rbp-130h]
int v37; // [rsp+2ECh] [rbp-14h]
long long v38; // [rsp+2F0h] [rbp-10h]
long long v39; // [rsp+2F8h] [rbp-8h]
v39 = a2;
v38 = a3;
v37 = a4;
memset(a1, 0LL, 24LL);
if ( !(unsigned int)strcmp(a2, ".wav") || !(unsigned int)strcmp(v39, ".WAV") )
{
memset(v33, 0LL, 400LL);
inited = drwav_init_memory((int)v33, v38, v37, 0LL);
v32 = inited != 0;
if ( inited )
{
*(_DWORD *)a1 = v36;
*(_DWORD *)(a1 + 4) = v34;
*(_DWORD *)(a1 + 8) = 16;
*(_DWORD *)(a1 + 12) = v35;
*(_QWORD *)(a1 + 16) = malloc(2LL * (unsigned int)(*(_DWORD *)(a1 + 12) * *(_DWORD *)a1));
drwav_read_pcm_frames_s16((long long)v33, v36, *(_QWORD *)(a1 + 16));
}
else
{
TraceLog(4, (unsigned int)"WAVE: Failed to load WAV data", v5, v6, v7, v8);
}
drwav_uninit((long long)v33);
}
else if ( !(unsigned int)strcmp(v39, ".ogg") || !(unsigned int)strcmp(v39, ".OGG") )
{
v31 = stb_vorbis_open_memory(v38, v37, 0LL, 0LL);
if ( v31 )
{
stb_vorbis_get_info(&v29, v31);
*(_DWORD *)(a1 + 4) = v29;
*(_DWORD *)(a1 + 8) = 16;
*(_DWORD *)(a1 + 12) = v30;
*(_DWORD *)a1 = stb_vorbis_stream_length_in_samples(v31);
*(_QWORD *)(a1 + 16) = malloc(2LL * (unsigned int)(*(_DWORD *)(a1 + 12) * *(_DWORD *)a1));
stb_vorbis_get_samples_short_interleaved(v31, v30, *(_WORD **)(a1 + 16), *(_DWORD *)(a1 + 12) * *(_DWORD *)a1);
stb_vorbis_close((long long)v31);
}
else
{
TraceLog(4, (unsigned int)"WAVE: Failed to load OGG data", v10, v11, v12, v13);
}
}
else if ( !(unsigned int)strcmp(v39, ".mp3") || !(unsigned int)strcmp(v39, ".MP3") )
{
memset(v28, 0LL, sizeof(v28));
v27 = 0LL;
v14 = drmp3_open_memory_and_read_pcm_frames_f32(v38, v37, v28, &v27, 0LL);
*(_QWORD *)(a1 + 16) = v14;
*(_DWORD *)(a1 + 8) = 32;
if ( *(_QWORD *)(a1 + 16) )
{
*(_DWORD *)(a1 + 12) = v28[0];
*(_DWORD *)(a1 + 4) = v28[1];
*(_DWORD *)a1 = v27;
}
else
{
TraceLog(4, (unsigned int)"WAVE: Failed to load MP3 data", v15, v14, v16, v9);
}
}
else if ( !(unsigned int)strcmp(v39, ".qoa") || !(unsigned int)strcmp(v39, ".QOA") )
{
memset(&v25, 0LL, 268LL);
v21 = qoa_decode(v38, v37, &v25);
*(_QWORD *)(a1 + 16) = v21;
*(_DWORD *)(a1 + 8) = 16;
if ( *(_QWORD *)(a1 + 16) )
{
*(_DWORD *)(a1 + 12) = v25;
*(_DWORD *)(a1 + 4) = HIDWORD(v25);
*(_DWORD *)a1 = v26;
}
else
{
TraceLog(4, (unsigned int)"WAVE: Failed to load QOA data", v22, v21, v23, v9);
}
}
else
{
TraceLog(4, (unsigned int)"WAVE: Data format not supported", v17, v18, v19, v20);
}
TraceLog(
3,
(unsigned int)"WAVE: Data loaded successfully (%i Hz, %i bit, %i channels)",
*(_DWORD *)(a1 + 4),
*(_DWORD *)(a1 + 8),
*(_DWORD *)(a1 + 12),
v9);
return a1;
}
| LoadWaveFromMemory:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x300
MOV qword ptr [RBP + -0x300],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x2f8],RAX
MOV qword ptr [RBP + -0x8],RSI
MOV qword ptr [RBP + -0x10],RDX
MOV dword ptr [RBP + -0x14],ECX
XOR ESI,ESI
MOV EDX,0x18
CALL 0x0010a2d0
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x2aa574]
CALL 0x0010a750
CMP EAX,0x0
JZ 0x0017a6e1
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x2aa579]
CALL 0x0010a750
CMP EAX,0x0
JNZ 0x0017a7aa
LAB_0017a6e1:
LEA RDI,[RBP + -0x1a8]
XOR ESI,ESI
MOV EDX,0x190
CALL 0x0010a2d0
MOV RSI,qword ptr [RBP + -0x10]
MOVSXD RDX,dword ptr [RBP + -0x14]
LEA RDI,[RBP + -0x1a8]
XOR EAX,EAX
MOV ECX,EAX
CALL 0x0015dcd0
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOV byte ptr [RBP + -0x1a9],AL
TEST byte ptr [RBP + -0x1a9],0x1
JZ 0x0017a786
MOV RCX,qword ptr [RBP + -0x300]
MOV RAX,qword ptr [RBP + -0x130]
MOV dword ptr [RCX],EAX
MOV EAX,dword ptr [RBP + -0x13c]
MOV dword ptr [RCX + 0x4],EAX
MOV dword ptr [RCX + 0x8],0x10
MOVZX EAX,word ptr [RBP + -0x138]
MOV dword ptr [RCX + 0xc],EAX
MOV EAX,dword ptr [RCX]
IMUL EAX,dword ptr [RCX + 0xc]
MOV EAX,EAX
MOV EDI,EAX
SHL RDI,0x1
CALL 0x0010a6e0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x300]
MOV qword ptr [RAX + 0x10],RCX
MOV RSI,qword ptr [RBP + -0x130]
MOV RDX,qword ptr [RAX + 0x10]
LEA RDI,[RBP + -0x1a8]
CALL 0x00161210
JMP 0x0017a799
LAB_0017a786:
MOV EDI,0x4
LEA RSI,[0x2aa57e]
MOV AL,0x0
CALL 0x00282c40
LAB_0017a799:
LEA RDI,[RBP + -0x1a8]
CALL 0x0015e290
JMP 0x0017aa2b
LAB_0017a7aa:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x2aa59c]
CALL 0x0010a750
CMP EAX,0x0
JZ 0x0017a7d8
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x2aa5a1]
CALL 0x0010a750
CMP EAX,0x0
JNZ 0x0017a8aa
LAB_0017a7d8:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
XOR EAX,EAX
MOV ECX,EAX
MOV RDX,RCX
CALL 0x0016ad30
MOV qword ptr [RBP + -0x1b8],RAX
CMP qword ptr [RBP + -0x1b8],0x0
JZ 0x0017a892
MOV RSI,qword ptr [RBP + -0x1b8]
LEA RDI,[RBP + -0x1d0]
CALL 0x001656b0
MOV RAX,qword ptr [RBP + -0x300]
MOV ECX,dword ptr [RBP + -0x1d0]
MOV dword ptr [RAX + 0x4],ECX
MOV dword ptr [RAX + 0x8],0x10
MOV ECX,dword ptr [RBP + -0x1cc]
MOV dword ptr [RAX + 0xc],ECX
MOV RDI,qword ptr [RBP + -0x1b8]
CALL 0x0016a510
MOV RCX,qword ptr [RBP + -0x300]
MOV dword ptr [RCX],EAX
MOV EAX,dword ptr [RCX]
IMUL EAX,dword ptr [RCX + 0xc]
MOV EAX,EAX
MOV EDI,EAX
SHL RDI,0x1
CALL 0x0010a6e0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x300]
MOV qword ptr [RAX + 0x10],RCX
MOV RDI,qword ptr [RBP + -0x1b8]
MOV ESI,dword ptr [RBP + -0x1cc]
MOV RDX,qword ptr [RAX + 0x10]
MOV ECX,dword ptr [RAX]
IMUL ECX,dword ptr [RAX + 0xc]
CALL 0x0016b270
MOV RDI,qword ptr [RBP + -0x1b8]
CALL 0x00165210
JMP 0x0017a8a5
LAB_0017a892:
MOV EDI,0x4
LEA RSI,[0x2aa5a6]
MOV AL,0x0
CALL 0x00282c40
LAB_0017a8a5:
JMP 0x0017aa29
LAB_0017a8aa:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x2aa5c4]
CALL 0x0010a750
CMP EAX,0x0
JZ 0x0017a8d8
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x2aa5c9]
CALL 0x0010a750
CMP EAX,0x0
JNZ 0x0017a96e
LAB_0017a8d8:
LEA RDI,[RBP + -0x1d8]
XOR ESI,ESI
MOV EDX,0x8
CALL 0x0010a2d0
MOV qword ptr [RBP + -0x1e0],0x0
MOV RDI,qword ptr [RBP + -0x10]
MOVSXD RSI,dword ptr [RBP + -0x14]
LEA RDX,[RBP + -0x1d8]
LEA RCX,[RBP + -0x1e0]
XOR EAX,EAX
MOV R8D,EAX
CALL 0x0016f840
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x300]
MOV qword ptr [RAX + 0x10],RCX
MOV dword ptr [RAX + 0x8],0x20
CMP qword ptr [RAX + 0x10],0x0
JZ 0x0017a956
MOV RAX,qword ptr [RBP + -0x300]
MOV ECX,dword ptr [RBP + -0x1d8]
MOV dword ptr [RAX + 0xc],ECX
MOV ECX,dword ptr [RBP + -0x1d4]
MOV dword ptr [RAX + 0x4],ECX
MOV RCX,qword ptr [RBP + -0x1e0]
MOV dword ptr [RAX],ECX
JMP 0x0017a969
LAB_0017a956:
MOV EDI,0x4
LEA RSI,[0x2aa5ce]
MOV AL,0x0
CALL 0x00282c40
LAB_0017a969:
JMP 0x0017aa27
LAB_0017a96e:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x2aa5ec]
CALL 0x0010a750
CMP EAX,0x0
JZ 0x0017a998
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x2aa5f1]
CALL 0x0010a750
CMP EAX,0x0
JNZ 0x0017aa12
LAB_0017a998:
LEA RDI,[RBP + -0x2ec]
XOR ESI,ESI
MOV EDX,0x10c
CALL 0x0010a2d0
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
LEA RDX,[RBP + -0x2ec]
CALL 0x00170b90
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x300]
MOV qword ptr [RAX + 0x10],RCX
MOV dword ptr [RAX + 0x8],0x10
CMP qword ptr [RAX + 0x10],0x0
JZ 0x0017a9fd
MOV RAX,qword ptr [RBP + -0x300]
MOV ECX,dword ptr [RBP + -0x2ec]
MOV dword ptr [RAX + 0xc],ECX
MOV ECX,dword ptr [RBP + -0x2e8]
MOV dword ptr [RAX + 0x4],ECX
MOV ECX,dword ptr [RBP + -0x2e4]
MOV dword ptr [RAX],ECX
JMP 0x0017aa10
LAB_0017a9fd:
MOV EDI,0x4
LEA RSI,[0x2aa5f6]
MOV AL,0x0
CALL 0x00282c40
LAB_0017aa10:
JMP 0x0017aa25
LAB_0017aa12:
MOV EDI,0x4
LEA RSI,[0x2aa614]
MOV AL,0x0
CALL 0x00282c40
LAB_0017aa25:
JMP 0x0017aa27
LAB_0017aa27:
JMP 0x0017aa29
LAB_0017aa29:
JMP 0x0017aa2b
LAB_0017aa2b:
MOV RAX,qword ptr [RBP + -0x300]
MOV EDX,dword ptr [RAX + 0x4]
MOV ECX,dword ptr [RAX + 0x8]
MOV R8D,dword ptr [RAX + 0xc]
MOV EDI,0x3
LEA RSI,[0x2aa634]
MOV AL,0x0
CALL 0x00282c40
MOV RAX,qword ptr [RBP + -0x2f8]
ADD RSP,0x300
POP RBP
RET
|
int * LoadWaveFromMemory(int *param_1,char *param_2,int8 param_3,int param_4)
{
int iVar1;
void *pvVar2;
int8 uVar3;
int local_2f4;
int local_2f0;
int local_2ec;
int8 local_1e8;
int local_1e0;
int local_1dc;
int local_1d8;
int local_1d4;
long local_1c0;
int1 local_1b1;
int1 local_1b0 [108];
int local_144;
ushort local_140;
int8 local_138;
int local_1c;
int8 local_18;
char *local_10;
local_1c = param_4;
local_18 = param_3;
local_10 = param_2;
memset(param_1,0,0x18);
iVar1 = strcmp(local_10,".wav");
if ((iVar1 == 0) || (iVar1 = strcmp(local_10,".WAV"), iVar1 == 0)) {
memset(local_1b0,0,400);
iVar1 = drwav_init_memory(local_1b0,local_18,(long)local_1c,0);
local_1b1 = iVar1 != 0;
if ((bool)local_1b1) {
*param_1 = (int)local_138;
param_1[1] = local_144;
param_1[2] = 0x10;
param_1[3] = (uint)local_140;
pvVar2 = malloc((ulong)(uint)(*param_1 * param_1[3]) << 1);
*(void **)(param_1 + 4) = pvVar2;
drwav_read_pcm_frames_s16(local_1b0,local_138,*(int8 *)(param_1 + 4));
}
else {
TraceLog(4,"WAVE: Failed to load WAV data");
}
drwav_uninit(local_1b0);
}
else {
iVar1 = strcmp(local_10,".ogg");
if ((iVar1 == 0) || (iVar1 = strcmp(local_10,".OGG"), iVar1 == 0)) {
local_1c0 = stb_vorbis_open_memory(local_18,local_1c,0);
if (local_1c0 == 0) {
TraceLog(4,"WAVE: Failed to load OGG data");
}
else {
stb_vorbis_get_info(&local_1d8,local_1c0);
param_1[1] = local_1d8;
param_1[2] = 0x10;
param_1[3] = local_1d4;
iVar1 = stb_vorbis_stream_length_in_samples(local_1c0);
*param_1 = iVar1;
pvVar2 = malloc((ulong)(uint)(*param_1 * param_1[3]) << 1);
*(void **)(param_1 + 4) = pvVar2;
stb_vorbis_get_samples_short_interleaved
(local_1c0,local_1d4,*(int8 *)(param_1 + 4),*param_1 * param_1[3]);
stb_vorbis_close(local_1c0);
}
}
else {
iVar1 = strcmp(local_10,".mp3");
if ((iVar1 == 0) || (iVar1 = strcmp(local_10,".MP3"), iVar1 == 0)) {
memset(&local_1e0,0,8);
local_1e8 = 0;
uVar3 = drmp3_open_memory_and_read_pcm_frames_f32
(local_18,(long)local_1c,&local_1e0,&local_1e8,0);
*(int8 *)(param_1 + 4) = uVar3;
param_1[2] = 0x20;
if (*(long *)(param_1 + 4) == 0) {
TraceLog(4,"WAVE: Failed to load MP3 data");
}
else {
param_1[3] = local_1e0;
param_1[1] = local_1dc;
*param_1 = (int)local_1e8;
}
}
else {
iVar1 = strcmp(local_10,".qoa");
if ((iVar1 == 0) || (iVar1 = strcmp(local_10,".QOA"), iVar1 == 0)) {
memset(&local_2f4,0,0x10c);
uVar3 = qoa_decode(local_18,local_1c,&local_2f4);
*(int8 *)(param_1 + 4) = uVar3;
param_1[2] = 0x10;
if (*(long *)(param_1 + 4) == 0) {
TraceLog(4,"WAVE: Failed to load QOA data");
}
else {
param_1[3] = local_2f4;
param_1[1] = local_2f0;
*param_1 = local_2ec;
}
}
else {
TraceLog(4,"WAVE: Data format not supported");
}
}
}
}
TraceLog(3,"WAVE: Data loaded successfully (%i Hz, %i bit, %i channels)",param_1[1],param_1[2],
param_1[3]);
return param_1;
}
| |
54,694 | test_file_size | tsotchke[P]eshkol/tests/unit/test_file_io.c | static void test_file_size(void) {
printf("Testing file size...\n");
// Create a temporary file
const char* test_file = "test_file.txt";
// Open the file for writing
File* file = file_open(test_file, FILE_MODE_WRITE);
assert(file != NULL);
// Write to the file
const char* test_data = "Hello, world!";
size_t test_data_len = strlen(test_data);
size_t bytes_written = file_write(file, test_data, test_data_len);
assert(bytes_written == test_data_len);
// Get the file size
long size = file_size(file);
assert(size == (long)test_data_len);
// Close the file
file_close(file);
// Open the file for reading
file = file_open(test_file, FILE_MODE_READ);
assert(file != NULL);
// Get the file size
size = file_size(file);
assert(size == (long)test_data_len);
// Close the file
file_close(file);
// Delete the file
assert(file_delete(test_file));
printf("PASS: file_size\n");
} | O0 | c | test_file_size:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
leaq 0x487f(%rip), %rdi # 0x729e
movb $0x0, %al
callq 0x2130
leaq 0x4f19(%rip), %rax # 0x7946
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x4780
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x2a4c
jmp 0x2a6b
leaq 0x4fdb(%rip), %rdi # 0x7a2e
leaq 0x4601(%rip), %rsi # 0x705b
movl $0x9f, %edx
leaq 0x484e(%rip), %rcx # 0x72b4
callq 0x2170
leaq 0x46cb(%rip), %rax # 0x713d
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2100
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x4b00
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0x2aa4
jmp 0x2ac3
leaq 0x46a0(%rip), %rdi # 0x714b
leaq 0x45a9(%rip), %rsi # 0x705b
movl $0xa5, %edx
leaq 0x47f6(%rip), %rcx # 0x72b4
callq 0x2170
movq -0x10(%rbp), %rdi
callq 0x4e10
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0x2adc
jmp 0x2afb
leaq 0x47eb(%rip), %rdi # 0x72ce
leaq 0x4571(%rip), %rsi # 0x705b
movl $0xa9, %edx
leaq 0x47be(%rip), %rcx # 0x72b4
callq 0x2170
movq -0x10(%rbp), %rdi
callq 0x49c0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x4780
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x2b1c
jmp 0x2b3b
leaq 0x4f0b(%rip), %rdi # 0x7a2e
leaq 0x4531(%rip), %rsi # 0x705b
movl $0xb0, %edx
leaq 0x477e(%rip), %rcx # 0x72b4
callq 0x2170
movq -0x10(%rbp), %rdi
callq 0x4e10
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0x2b54
jmp 0x2b73
leaq 0x4773(%rip), %rdi # 0x72ce
leaq 0x44f9(%rip), %rsi # 0x705b
movl $0xb4, %edx
leaq 0x4746(%rip), %rcx # 0x72b4
callq 0x2170
movq -0x10(%rbp), %rdi
callq 0x49c0
movq -0x8(%rbp), %rdi
callq 0x4fc0
testb $0x1, %al
jne 0x2b8b
jmp 0x2b8d
jmp 0x2bac
leaq 0x453b(%rip), %rdi # 0x70cf
leaq 0x44c0(%rip), %rsi # 0x705b
movl $0xba, %edx
leaq 0x470d(%rip), %rcx # 0x72b4
callq 0x2170
leaq 0x4737(%rip), %rdi # 0x72ea
movb $0x0, %al
callq 0x2130
addq $0x30, %rsp
popq %rbp
retq
| test_file_size:
push rbp
mov rbp, rsp
sub rsp, 30h
lea rdi, aTestingFileSiz; "Testing file size...\n"
mov al, 0
call _printf
lea rax, aTestDirTestFil+9; "test_file.txt"
mov [rbp+var_8], rax
mov rdi, [rbp+var_8]
mov esi, 1
call file_open
mov [rbp+var_10], rax
cmp [rbp+var_10], 0
jz short loc_2A4C
jmp short loc_2A6B
loc_2A4C:
lea rdi, aTempFileNull+5; "file != NULL"
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov edx, 9Fh
lea rcx, aVoidTestFileSi; "void test_file_size(void)"
call ___assert_fail
loc_2A6B:
lea rax, aHelloWorld; "Hello, world!"
mov [rbp+var_18], rax
mov rdi, [rbp+var_18]
call _strlen
mov [rbp+var_20], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call file_write
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
cmp rax, [rbp+var_20]
jnz short loc_2AA4
jmp short loc_2AC3
loc_2AA4:
lea rdi, aBytesWrittenTe; "bytes_written == test_data_len"
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov edx, 0A5h
lea rcx, aVoidTestFileSi; "void test_file_size(void)"
call ___assert_fail
loc_2AC3:
mov rdi, [rbp+var_10]
call file_size
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
cmp rax, [rbp+var_20]
jnz short loc_2ADC
jmp short loc_2AFB
loc_2ADC:
lea rdi, aSizeLongTestDa; "size == (long)test_data_len"
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov edx, 0A9h
lea rcx, aVoidTestFileSi; "void test_file_size(void)"
call ___assert_fail
loc_2AFB:
mov rdi, [rbp+var_10]
call file_close
mov rdi, [rbp+var_8]
xor esi, esi
call file_open
mov [rbp+var_10], rax
cmp [rbp+var_10], 0
jz short loc_2B1C
jmp short loc_2B3B
loc_2B1C:
lea rdi, aTempFileNull+5; "file != NULL"
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov edx, 0B0h
lea rcx, aVoidTestFileSi; "void test_file_size(void)"
call ___assert_fail
loc_2B3B:
mov rdi, [rbp+var_10]
call file_size
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
cmp rax, [rbp+var_20]
jnz short loc_2B54
jmp short loc_2B73
loc_2B54:
lea rdi, aSizeLongTestDa; "size == (long)test_data_len"
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov edx, 0B4h
lea rcx, aVoidTestFileSi; "void test_file_size(void)"
call ___assert_fail
loc_2B73:
mov rdi, [rbp+var_10]
call file_close
mov rdi, [rbp+var_8]
call file_delete
test al, 1
jnz short loc_2B8B
jmp short loc_2B8D
loc_2B8B:
jmp short loc_2BAC
loc_2B8D:
lea rdi, aFileDeleteTest; "file_delete(test_file)"
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov edx, 0BAh
lea rcx, aVoidTestFileSi; "void test_file_size(void)"
call ___assert_fail
loc_2BAC:
lea rdi, aPassFileSize; "PASS: file_size\n"
mov al, 0
call _printf
add rsp, 30h
pop rbp
retn
| long long test_file_size(long long a1, long long a2, long long a3)
{
long long v3; // rdx
long long v5; // [rsp+10h] [rbp-20h]
long long v6; // [rsp+20h] [rbp-10h]
long long v7; // [rsp+20h] [rbp-10h]
printf("Testing file size...\n", a2, a3);
v6 = file_open("test_file.txt", 1LL);
if ( !v6 )
__assert_fail(
"file != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_file_io.c",
159LL,
"void test_file_size(void)");
v5 = strlen("Hello, world!");
if ( file_write(v6, "Hello, world!", v5) != v5 )
__assert_fail(
"bytes_written == test_data_len",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_file_io.c",
165LL,
"void test_file_size(void)");
if ( file_size(v6) != v5 )
__assert_fail(
"size == (long)test_data_len",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_file_io.c",
169LL,
"void test_file_size(void)");
file_close(v6);
v7 = file_open("test_file.txt", 0LL);
if ( !v7 )
__assert_fail(
"file != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_file_io.c",
176LL,
"void test_file_size(void)");
if ( file_size(v7) != v5 )
__assert_fail(
"size == (long)test_data_len",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_file_io.c",
180LL,
"void test_file_size(void)");
file_close(v7);
if ( (file_delete("test_file.txt") & 1) == 0 )
__assert_fail(
"file_delete(test_file)",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_file_io.c",
186LL,
"void test_file_size(void)");
return printf("PASS: file_size\n", 0LL, v3);
}
| test_file_size:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
LEA RDI,[0x10728c]
MOV AL,0x0
CALL 0x00102130
LEA RAX,[0x107934]
MOV qword ptr [RBP + -0x8],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,0x1
CALL 0x00104780
MOV qword ptr [RBP + -0x10],RAX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00102a4c
JMP 0x00102a6b
LAB_00102a4c:
LEA RDI,[0x107a1c]
LEA RSI,[0x10705b]
MOV EDX,0x9f
LEA RCX,[0x1072a2]
CALL 0x00102170
LAB_00102a6b:
LEA RAX,[0x10712b]
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00102100
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00104b00
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x00102aa4
JMP 0x00102ac3
LAB_00102aa4:
LEA RDI,[0x107139]
LEA RSI,[0x10705b]
MOV EDX,0xa5
LEA RCX,[0x1072a2]
CALL 0x00102170
LAB_00102ac3:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00104e10
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x00102adc
JMP 0x00102afb
LAB_00102adc:
LEA RDI,[0x1072bc]
LEA RSI,[0x10705b]
MOV EDX,0xa9
LEA RCX,[0x1072a2]
CALL 0x00102170
LAB_00102afb:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001049c0
MOV RDI,qword ptr [RBP + -0x8]
XOR ESI,ESI
CALL 0x00104780
MOV qword ptr [RBP + -0x10],RAX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00102b1c
JMP 0x00102b3b
LAB_00102b1c:
LEA RDI,[0x107a1c]
LEA RSI,[0x10705b]
MOV EDX,0xb0
LEA RCX,[0x1072a2]
CALL 0x00102170
LAB_00102b3b:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00104e10
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x00102b54
JMP 0x00102b73
LAB_00102b54:
LEA RDI,[0x1072bc]
LEA RSI,[0x10705b]
MOV EDX,0xb4
LEA RCX,[0x1072a2]
CALL 0x00102170
LAB_00102b73:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001049c0
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00104fc0
TEST AL,0x1
JNZ 0x00102b8b
JMP 0x00102b8d
LAB_00102b8b:
JMP 0x00102bac
LAB_00102b8d:
LEA RDI,[0x1070bd]
LEA RSI,[0x10705b]
MOV EDX,0xba
LEA RCX,[0x1072a2]
CALL 0x00102170
LAB_00102bac:
LEA RDI,[0x1072d8]
MOV AL,0x0
CALL 0x00102130
ADD RSP,0x30
POP RBP
RET
|
void test_file_size(void)
{
long lVar1;
size_t sVar2;
size_t sVar3;
ulong uVar4;
printf("Testing file size...\n");
lVar1 = file_open("test_file.txt",1);
if (lVar1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("file != NULL","/workspace/llm4binary/github2025/eshkol/tests/unit/test_file_io.c"
,0x9f,"void test_file_size(void)");
}
sVar2 = strlen("Hello, world!");
sVar3 = file_write(lVar1,"Hello, world!",sVar2);
if (sVar3 != sVar2) {
/* WARNING: Subroutine does not return */
__assert_fail("bytes_written == test_data_len",
"/workspace/llm4binary/github2025/eshkol/tests/unit/test_file_io.c",0xa5,
"void test_file_size(void)");
}
sVar3 = file_size(lVar1);
if (sVar3 != sVar2) {
/* WARNING: Subroutine does not return */
__assert_fail("size == (long)test_data_len",
"/workspace/llm4binary/github2025/eshkol/tests/unit/test_file_io.c",0xa9,
"void test_file_size(void)");
}
file_close(lVar1);
lVar1 = file_open("test_file.txt",0);
if (lVar1 != 0) {
sVar3 = file_size(lVar1);
if (sVar3 != sVar2) {
/* WARNING: Subroutine does not return */
__assert_fail("size == (long)test_data_len",
"/workspace/llm4binary/github2025/eshkol/tests/unit/test_file_io.c",0xb4,
"void test_file_size(void)");
}
file_close(lVar1);
uVar4 = file_delete("test_file.txt");
if ((uVar4 & 1) == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("file_delete(test_file)",
"/workspace/llm4binary/github2025/eshkol/tests/unit/test_file_io.c",0xba,
"void test_file_size(void)");
}
printf("PASS: file_size\n");
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("file != NULL","/workspace/llm4binary/github2025/eshkol/tests/unit/test_file_io.c",
0xb0,"void test_file_size(void)");
}
| |
54,695 | LefDefParser::defiAssertion::addNet(char const*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiAssertion.cpp | void defiAssertion::addNet(const char* name) {
int i;
char* s, *s1;
// set wiredlogic to false
isWiredlogic_ = 0;
// make our own copy
i = strlen(name) + 1;
if (name[i-2] == ',') {
s = (char*)malloc(i-1);
s1 = (char*)malloc(i-1);
strncpy(s1, name, i-2);
s1[i-2] = '\0';
strcpy(s, defData->DEFCASE(s1));
free(s1);
} else {
s = (char*)malloc(i);
strcpy(s, defData->DEFCASE(name));
}
// make sure there is space in the array
if (numItems_ >= numItemsAllocated_)
bumpItems();
// place it
i = numItems_;
items_[i] = (int*)s;
itemTypes_[i] = 'n';
numItems_ = i + 1;
//strcpy(itemTypes_, "n");
} | O3 | cpp | LefDefParser::defiAssertion::addNet(char const*):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movb $0x0, 0x7(%rdi)
movq %rsi, %rdi
callq 0x70d0
movq %rax, %r12
shlq $0x20, %r12
movabsq $-0x100000000, %r13 # imm = 0xFFFFFFFF00000000
addq %r12, %r13
sarq $0x20, %r13
cmpb $0x2c, (%r15,%r13)
jne 0x2a5d8
sarq $0x20, %r12
movq %r12, %rdi
callq 0x7270
movq %rax, %r14
movq %r12, %rdi
callq 0x7270
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x70f0
movb $0x0, (%r12,%r13)
movq 0x58(%rbx), %rdi
movq %r12, %rsi
callq 0x1b638
movq %r14, %rdi
movq %rax, %rsi
callq 0x7190
movq %r12, %rdi
callq 0x7220
jmp 0x2a60b
movabsq $0x100000000, %rax # imm = 0x100000000
addq %rax, %r12
sarq $0x20, %r12
movq %r12, %rdi
callq 0x7270
movq %rax, %r14
movq 0x58(%rbx), %rdi
movq %r15, %rsi
callq 0x1b638
movq %r14, %rdi
movq %rax, %rsi
callq 0x7190
movl 0x40(%rbx), %eax
cmpl 0x44(%rbx), %eax
jl 0x2a61e
movq %rbx, %rdi
callq 0x2a4de
movl 0x40(%rbx), %eax
movq 0x50(%rbx), %rcx
cltq
movq %r14, (%rcx,%rax,8)
movq 0x48(%rbx), %rcx
movb $0x6e, (%rcx,%rax)
incl %eax
movl %eax, 0x40(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
| _ZN12LefDefParser13defiAssertion6addNetEPKc:
push r15
push r14
push r13
push r12
push rbx
mov r15, rsi
mov rbx, rdi
mov byte ptr [rdi+7], 0
mov rdi, rsi
call _strlen
mov r12, rax
shl r12, 20h
mov r13, 0FFFFFFFF00000000h
add r13, r12
sar r13, 20h
cmp byte ptr [r15+r13], 2Ch ; ','
jnz short loc_2A5D8
sar r12, 20h
mov rdi, r12
call _malloc
mov r14, rax
mov rdi, r12
call _malloc
mov r12, rax
mov rdi, rax
mov rsi, r15
mov rdx, r13
call _strncpy
mov byte ptr [r12+r13], 0
mov rdi, [rbx+58h]; this
mov rsi, r12; char *
call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*)
mov rdi, r14
mov rsi, rax
call _strcpy
mov rdi, r12
call _free
jmp short loc_2A60B
loc_2A5D8:
mov rax, 100000000h
add r12, rax
sar r12, 20h
mov rdi, r12
call _malloc
mov r14, rax
mov rdi, [rbx+58h]; this
mov rsi, r15; char *
call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*)
mov rdi, r14
mov rsi, rax
call _strcpy
loc_2A60B:
mov eax, [rbx+40h]
cmp eax, [rbx+44h]
jl short loc_2A61E
mov rdi, rbx; this
call _ZN12LefDefParser13defiAssertion9bumpItemsEv; LefDefParser::defiAssertion::bumpItems(void)
mov eax, [rbx+40h]
loc_2A61E:
mov rcx, [rbx+50h]
cdqe
mov [rcx+rax*8], r14
mov rcx, [rbx+48h]
mov byte ptr [rcx+rax], 6Eh ; 'n'
inc eax
mov [rbx+40h], eax
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| long long LefDefParser::defiAssertion::addNet(LefDefParser::defiAssertion *this, const char *a2)
{
long long v2; // rax
long long v3; // r13
unsigned long long v4; // r12
long long v5; // r14
char *v6; // r12
const char *v7; // rax
const char *v8; // rax
int v9; // eax
long long result; // rax
*((_BYTE *)this + 7) = 0;
v2 = strlen(a2);
v3 = ((v2 << 32) - 0x100000000LL) >> 32;
if ( a2[v3] == 44 )
{
v4 = (int)v2;
v5 = malloc((int)v2);
v6 = (char *)malloc(v4);
strncpy(v6, a2, v3);
v6[v3] = 0;
v7 = LefDefParser::defrData::DEFCASE(*((LefDefParser::defrData **)this + 11), v6);
strcpy(v5, v7);
free(v6);
}
else
{
v5 = malloc(((v2 << 32) + 0x100000000LL) >> 32);
v8 = LefDefParser::defrData::DEFCASE(*((LefDefParser::defrData **)this + 11), a2);
strcpy(v5, v8);
}
v9 = *((_DWORD *)this + 16);
if ( v9 >= *((_DWORD *)this + 17) )
{
LefDefParser::defiAssertion::bumpItems(this);
v9 = *((_DWORD *)this + 16);
}
*(_QWORD *)(*((_QWORD *)this + 10) + 8LL * v9) = v5;
*(_BYTE *)(*((_QWORD *)this + 9) + v9) = 110;
result = (unsigned int)(v9 + 1);
*((_DWORD *)this + 16) = result;
return result;
}
| addNet:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R15,RSI
MOV RBX,RDI
MOV byte ptr [RDI + 0x7],0x0
MOV RDI,RSI
CALL 0x001070d0
MOV R12,RAX
SHL R12,0x20
MOV R13,-0x100000000
ADD R13,R12
SAR R13,0x20
CMP byte ptr [R15 + R13*0x1],0x2c
JNZ 0x0012a5d8
SAR R12,0x20
MOV RDI,R12
CALL 0x00107270
MOV R14,RAX
MOV RDI,R12
CALL 0x00107270
MOV R12,RAX
MOV RDI,RAX
MOV RSI,R15
MOV RDX,R13
CALL 0x001070f0
MOV byte ptr [R12 + R13*0x1],0x0
MOV RDI,qword ptr [RBX + 0x58]
MOV RSI,R12
CALL 0x0011b638
MOV RDI,R14
MOV RSI,RAX
CALL 0x00107190
MOV RDI,R12
CALL 0x00107220
JMP 0x0012a60b
LAB_0012a5d8:
MOV RAX,0x100000000
ADD R12,RAX
SAR R12,0x20
MOV RDI,R12
CALL 0x00107270
MOV R14,RAX
MOV RDI,qword ptr [RBX + 0x58]
MOV RSI,R15
CALL 0x0011b638
MOV RDI,R14
MOV RSI,RAX
CALL 0x00107190
LAB_0012a60b:
MOV EAX,dword ptr [RBX + 0x40]
CMP EAX,dword ptr [RBX + 0x44]
JL 0x0012a61e
MOV RDI,RBX
CALL 0x0012a4de
MOV EAX,dword ptr [RBX + 0x40]
LAB_0012a61e:
MOV RCX,qword ptr [RBX + 0x50]
CDQE
MOV qword ptr [RCX + RAX*0x8],R14
MOV RCX,qword ptr [RBX + 0x48]
MOV byte ptr [RCX + RAX*0x1],0x6e
INC EAX
MOV dword ptr [RBX + 0x40],EAX
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* LefDefParser::defiAssertion::addNet(char const*) */
void __thiscall LefDefParser::defiAssertion::addNet(defiAssertion *this,char *param_1)
{
int iVar1;
size_t sVar2;
char *__dest;
char *pcVar3;
char *__src;
long lVar4;
this[7] = (defiAssertion)0x0;
sVar2 = strlen(param_1);
lVar4 = sVar2 << 0x20;
sVar2 = lVar4 + -0x100000000 >> 0x20;
if (param_1[sVar2] == ',') {
__dest = (char *)malloc(lVar4 >> 0x20);
pcVar3 = (char *)malloc(lVar4 >> 0x20);
strncpy(pcVar3,param_1,sVar2);
pcVar3[sVar2] = '\0';
__src = (char *)defrData::DEFCASE(*(defrData **)(this + 0x58),pcVar3);
strcpy(__dest,__src);
free(pcVar3);
}
else {
__dest = (char *)malloc(lVar4 + 0x100000000 >> 0x20);
pcVar3 = (char *)defrData::DEFCASE(*(defrData **)(this + 0x58),param_1);
strcpy(__dest,pcVar3);
}
iVar1 = *(int *)(this + 0x40);
if (*(int *)(this + 0x44) <= iVar1) {
bumpItems(this);
iVar1 = *(int *)(this + 0x40);
}
*(char **)(*(long *)(this + 0x50) + (long)iVar1 * 8) = __dest;
*(int1 *)(*(long *)(this + 0x48) + (long)iVar1) = 0x6e;
*(int *)(this + 0x40) = iVar1 + 1;
return;
}
| |
54,696 | void fmt::v10::detail::bigint::assign<unsigned long, 0>(unsigned long) | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h | FMT_CONSTEXPR20 void assign(UInt n) {
size_t num_bigits = 0;
do {
bigits_[num_bigits++] = static_cast<bigit>(n);
n >>= bigit_bits;
} while (n != 0);
bigits_.resize(num_bigits);
exp_ = 0;
} | O0 | c | void fmt::v10::detail::bigint::assign<unsigned long, 0>(unsigned long):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rax
movl %eax, 0x4(%rsp)
movq 0x10(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
callq 0xdb510
movl 0x4(%rsp), %ecx
movl %ecx, (%rax)
movq 0x18(%rsp), %rax
shrq $0x20, %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0xdb671
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0xdb530
movq 0x8(%rsp), %rax
movl $0x0, 0xa0(%rax)
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nop
| _ZN3fmt3v106detail6bigint6assignImTnNSt9enable_ifIXoosr3std7is_sameIT_mEE5valuesr3std7is_sameIS5_oEE5valueEiE4typeELi0EEEvS5_:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov rax, [rsp+28h+var_8]
mov [rsp+28h+var_20], rax
mov [rsp+28h+var_18], 0
loc_DB671:
mov rdi, [rsp+28h+var_20]
mov rax, [rsp+28h+var_10]
mov [rsp+28h+var_24], eax
mov rsi, [rsp+28h+var_18]
mov rax, rsi
add rax, 1
mov [rsp+28h+var_18], rax
call _ZN3fmt3v106detail6bufferIjEixImEERjT_; fmt::v10::detail::buffer<uint>::operator[]<ulong>(ulong)
mov ecx, [rsp+28h+var_24]
mov [rax], ecx
mov rax, [rsp+28h+var_10]
shr rax, 20h
mov [rsp+28h+var_10], rax
cmp [rsp+28h+var_10], 0
jnz short loc_DB671
mov rdi, [rsp+28h+var_20]
mov rsi, [rsp+28h+var_18]
call _ZN3fmt3v1019basic_memory_bufferIjLm32ESaIjEE6resizeEm; fmt::v10::basic_memory_buffer<uint,32ul,std::allocator<uint>>::resize(ulong)
mov rax, [rsp+28h+var_20]
mov dword ptr [rax+0A0h], 0
add rsp, 28h
retn
| long long ZN3fmt3v106detail6bigint6assignImTnNSt9enable_ifIXoosr3std7is_sameIT_mEE5valuesr3std7is_sameIS5_oEE5valueEiE4typeELi0EEEvS5_(
long long a1,
unsigned long long a2)
{
long long v2; // rsi
long long result; // rax
long long v4; // [rsp+10h] [rbp-18h]
v4 = 0LL;
do
{
v2 = v4++;
*(_DWORD *)fmt::v10::detail::buffer<unsigned int>::operator[]<unsigned long>(a1, v2) = a2;
a2 >>= 32;
}
while ( a2 );
fmt::v10::basic_memory_buffer<unsigned int,32ul,std::allocator<unsigned int>>::resize(a1, v4);
result = a1;
*(_DWORD *)(a1 + 160) = 0;
return result;
}
| _ZN3fmt3v106detail6bigint6assignImTnNSt9enable_ifIXoosr3std7is_sameIT_mEE5valuesr3std7is_sameIS5_oEE5valueEiE4typeELi0EEEvS5_:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],0x0
LAB_001db671:
MOV RDI,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x18]
MOV dword ptr [RSP + 0x4],EAX
MOV RSI,qword ptr [RSP + 0x10]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x10],RAX
CALL 0x001db510
MOV ECX,dword ptr [RSP + 0x4]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RSP + 0x18]
SHR RAX,0x20
MOV qword ptr [RSP + 0x18],RAX
CMP qword ptr [RSP + 0x18],0x0
JNZ 0x001db671
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x001db530
MOV RAX,qword ptr [RSP + 0x8]
MOV dword ptr [RAX + 0xa0],0x0
ADD RSP,0x28
RET
|
void _ZN3fmt3v106detail6bigint6assignImTnNSt9enable_ifIXoosr3std7is_sameIT_mEE5valuesr3std7is_sameIS5_oEE5valueEiE4typeELi0EEEvS5_
(buffer<unsigned_int> *param_1,ulong param_2)
{
ulong uVar1;
uint *puVar2;
ulong local_18;
ulong local_10;
local_18 = 0;
local_10 = param_2;
do {
uVar1 = local_18 + 1;
puVar2 = fmt::v10::detail::buffer<unsigned_int>::operator[]<unsigned_long>(param_1,local_18);
*puVar2 = (uint)local_10;
local_10 = local_10 >> 0x20;
local_18 = uVar1;
} while (local_10 != 0);
fmt::v10::basic_memory_buffer<unsigned_int,32ul,std::allocator<unsigned_int>>::resize
((basic_memory_buffer<unsigned_int,32ul,std::allocator<unsigned_int>> *)param_1,uVar1);
*(int4 *)(param_1 + 0xa0) = 0;
return;
}
| |
54,697 | lo0bits | eloqsql/strings/dtoa.c | static int lo0bits(ULong *y)
{
register int k;
register ULong x= *y;
if (x & 7)
{
if (x & 1)
return 0;
if (x & 2)
{
*y= x >> 1;
return 1;
}
*y= x >> 2;
return 2;
}
k= 0;
if (!(x & 0xffff))
{
k= 16;
x>>= 16;
}
if (!(x & 0xff))
{
k+= 8;
x>>= 8;
}
if (!(x & 0xf))
{
k+= 4;
x>>= 4;
}
if (!(x & 0x3))
{
k+= 2;
x>>= 2;
}
if (!(x & 1))
{
k++;
x>>= 1;
if (!x)
return 32;
}
*y= x;
return k;
} | O3 | c | lo0bits:
pushq %rbp
movq %rsp, %rbp
movl (%rdi), %ecx
testb $0x7, %cl
je 0x5830a
xorl %eax, %eax
testb $0x1, %cl
jne 0x58371
testb $0x2, %cl
jne 0x58368
shrl $0x2, %ecx
movl $0x2, %eax
jmp 0x5836f
movl %ecx, %eax
shrl $0x10, %eax
xorl %edx, %edx
testl $0xfff8, %ecx # imm = 0xFFF8
cmovnel %ecx, %eax
sete %dl
shll $0x4, %edx
leal 0x8(%rdx), %ecx
movl %eax, %esi
shrl $0x8, %esi
testb %al, %al
cmovnel %edx, %ecx
cmovnel %eax, %esi
leal 0x4(%rcx), %edx
movl %esi, %r8d
shrl $0x4, %r8d
testb $0xf, %sil
cmovnel %ecx, %edx
cmovnel %esi, %r8d
leal 0x2(%rdx), %eax
movl %r8d, %ecx
shrl $0x2, %ecx
testb $0x3, %r8b
cmovnel %edx, %eax
cmovnel %r8d, %ecx
testb $0x1, %cl
jne 0x5836f
testl %ecx, %ecx
je 0x58373
incl %eax
shrl %ecx
jmp 0x5836f
shrl %ecx
movl $0x1, %eax
movl %ecx, (%rdi)
popq %rbp
retq
movl $0x20, %eax
jmp 0x58371
| lo0bits:
push rbp
mov rbp, rsp
mov ecx, [rdi]
test cl, 7
jz short loc_5830A
xor eax, eax
test cl, 1
jnz short loc_58371
test cl, 2
jnz short loc_58368
shr ecx, 2
mov eax, 2
jmp short loc_5836F
loc_5830A:
mov eax, ecx
shr eax, 10h
xor edx, edx
test ecx, 0FFF8h
cmovnz eax, ecx
setz dl
shl edx, 4
lea ecx, [rdx+8]
mov esi, eax
shr esi, 8
test al, al
cmovnz ecx, edx
cmovnz esi, eax
lea edx, [rcx+4]
mov r8d, esi
shr r8d, 4
test sil, 0Fh
cmovnz edx, ecx
cmovnz r8d, esi
lea eax, [rdx+2]
mov ecx, r8d
shr ecx, 2
test r8b, 3
cmovnz eax, edx
cmovnz ecx, r8d
test cl, 1
jnz short loc_5836F
test ecx, ecx
jz short loc_58373
inc eax
shr ecx, 1
jmp short loc_5836F
loc_58368:
shr ecx, 1
mov eax, 1
loc_5836F:
mov [rdi], ecx
loc_58371:
pop rbp
retn
loc_58373:
mov eax, 20h ; ' '
jmp short loc_58371
| long long lo0bits(unsigned int *a1)
{
unsigned int v1; // ecx
long long result; // rax
unsigned int v3; // ecx
unsigned int v4; // eax
int v5; // edx
int v6; // edx
int v7; // ecx
unsigned int v8; // esi
unsigned int v9; // edx
unsigned int v10; // r8d
v1 = *a1;
if ( (*a1 & 7) != 0 )
{
result = 0LL;
if ( (v1 & 1) != 0 )
return result;
if ( (v1 & 2) != 0 )
{
v3 = v1 >> 1;
result = 1LL;
}
else
{
v3 = v1 >> 2;
result = 2LL;
}
}
else
{
v4 = HIWORD(v1);
v5 = 0;
if ( (v1 & 0xFFF8) != 0 )
v4 = *a1;
LOBYTE(v5) = (*a1 & 0xFFF8) == 0;
v6 = 16 * v5;
v7 = v6 + 8;
v8 = v4 >> 8;
if ( (_BYTE)v4 )
{
v7 = v6;
v8 = v4;
}
v9 = v7 + 4;
v10 = v8 >> 4;
if ( (v8 & 0xF) != 0 )
{
v9 = v7;
v10 = v8;
}
result = v9 + 2;
v3 = v10 >> 2;
if ( (v10 & 3) != 0 )
{
result = v9;
v3 = v10;
}
if ( (v3 & 1) == 0 )
{
if ( !v3 )
return 32LL;
result = (unsigned int)(result + 1);
v3 >>= 1;
}
}
*a1 = v3;
return result;
}
| lo0bits:
PUSH RBP
MOV RBP,RSP
MOV ECX,dword ptr [RDI]
TEST CL,0x7
JZ 0x0015830a
XOR EAX,EAX
TEST CL,0x1
JNZ 0x00158371
TEST CL,0x2
JNZ 0x00158368
SHR ECX,0x2
MOV EAX,0x2
JMP 0x0015836f
LAB_0015830a:
MOV EAX,ECX
SHR EAX,0x10
XOR EDX,EDX
TEST ECX,0xfff8
CMOVNZ EAX,ECX
SETZ DL
SHL EDX,0x4
LEA ECX,[RDX + 0x8]
MOV ESI,EAX
SHR ESI,0x8
TEST AL,AL
CMOVNZ ECX,EDX
CMOVNZ ESI,EAX
LEA EDX,[RCX + 0x4]
MOV R8D,ESI
SHR R8D,0x4
TEST SIL,0xf
CMOVNZ EDX,ECX
CMOVNZ R8D,ESI
LEA EAX,[RDX + 0x2]
MOV ECX,R8D
SHR ECX,0x2
TEST R8B,0x3
CMOVNZ EAX,EDX
CMOVNZ ECX,R8D
TEST CL,0x1
JNZ 0x0015836f
TEST ECX,ECX
JZ 0x00158373
INC EAX
SHR ECX,0x1
JMP 0x0015836f
LAB_00158368:
SHR ECX,0x1
MOV EAX,0x1
LAB_0015836f:
MOV dword ptr [RDI],ECX
LAB_00158371:
POP RBP
RET
LAB_00158373:
MOV EAX,0x20
JMP 0x00158371
|
int lo0bits(uint *param_1)
{
uint uVar1;
int iVar2;
uint uVar3;
int iVar4;
bool bVar5;
uVar3 = *param_1;
if ((uVar3 & 7) == 0) {
bVar5 = (uVar3 & 0xfff8) == 0;
uVar1 = uVar3 >> 0x10;
if (!bVar5) {
uVar1 = uVar3;
}
iVar4 = (uint)bVar5 * 0x10;
uVar3 = uVar1 >> 8;
iVar2 = iVar4 + 8;
if ((char)uVar1 != '\0') {
uVar3 = uVar1;
iVar2 = iVar4;
}
uVar1 = uVar3 >> 4;
iVar4 = iVar2 + 4;
if ((uVar3 & 0xf) != 0) {
uVar1 = uVar3;
iVar4 = iVar2;
}
uVar3 = uVar1 >> 2;
iVar2 = iVar4 + 2;
if ((uVar1 & 3) != 0) {
uVar3 = uVar1;
iVar2 = iVar4;
}
if ((uVar3 & 1) == 0) {
if (uVar3 == 0) {
return 0x20;
}
iVar2 = iVar2 + 1;
uVar3 = uVar3 >> 1;
}
}
else {
if ((uVar3 & 1) != 0) {
return 0;
}
if ((uVar3 & 2) == 0) {
uVar3 = uVar3 >> 2;
iVar2 = 2;
}
else {
uVar3 = uVar3 >> 1;
iVar2 = 1;
}
}
*param_1 = uVar3;
return iVar2;
}
| |
54,698 | my_strnxfrm_unicode_full_nopad_bin | eloqsql/strings/ctype-utf8.c | size_t
my_strnxfrm_unicode_full_nopad_bin(CHARSET_INFO *cs,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags)
{
uchar *dst0= dst;
uchar *de= dst + dstlen;
dst+= my_strnxfrm_unicode_full_bin_internal(cs, dst, de, &nweights,
src, src + srclen);
DBUG_ASSERT(dst <= de); /* Safety */
if (dst < de && nweights && (flags & MY_STRXFRM_PAD_WITH_SPACE))
{
size_t len= de - dst;
set_if_smaller(len, nweights * 3);
memset(dst, 0x00, len);
dst+= len;
}
my_strxfrm_desc_and_reverse(dst0, dst, flags, 0);
if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && dst < de)
{
memset(dst, 0x00, de - dst);
dst= de;
}
return dst - dst0;
} | O0 | c | my_strnxfrm_unicode_full_nopad_bin:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x28(%rbp), %r8
movq -0x28(%rbp), %r9
addq -0x30(%rbp), %r9
leaq -0x1c(%rbp), %rcx
callq 0x74610
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x74931
movq -0x10(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x74991
cmpl $0x0, -0x1c(%rbp)
je 0x74991
movl 0x10(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x74991
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
imull $0x3, -0x1c(%rbp), %ecx
movl %ecx, %ecx
cmpq %rcx, %rax
jbe 0x74974
imull $0x3, -0x1c(%rbp), %eax
movl %eax, %eax
movq %rax, -0x48(%rbp)
jmp 0x74976
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rdx
xorl %esi, %esi
callq 0x251d0
movq -0x48(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl 0x10(%rbp), %edx
xorl %ecx, %ecx
callq 0x55b10
movl 0x10(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x749d8
movq -0x10(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x749d8
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rdx
movq -0x10(%rbp), %rax
subq %rax, %rdx
xorl %esi, %esi
callq 0x251d0
movq -0x40(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
subq %rcx, %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
| my_strnxfrm_unicode_full_nopad_bin:
push rbp
mov rbp, rsp
sub rsp, 50h
mov eax, [rbp+arg_0]
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 [rbp+var_30], r9
mov rax, [rbp+var_10]
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_40]
mov r8, [rbp+var_28]
mov r9, [rbp+var_28]
add r9, [rbp+var_30]
lea rcx, [rbp+var_1C]
call my_strnxfrm_unicode_full_bin_internal
add rax, [rbp+var_10]
mov [rbp+var_10], rax
jmp short $+2
loc_74931:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_40]
jnb short loc_74991
cmp [rbp+var_1C], 0
jz short loc_74991
mov eax, [rbp+arg_0]
and eax, 40h
cmp eax, 0
jz short loc_74991
mov rax, [rbp+var_40]
mov rcx, [rbp+var_10]
sub rax, rcx
mov [rbp+var_48], rax
mov rax, [rbp+var_48]
imul ecx, [rbp+var_1C], 3
mov ecx, ecx
cmp rax, rcx
jbe short loc_74974
imul eax, [rbp+var_1C], 3
mov eax, eax
mov [rbp+var_48], rax
loc_74974:
jmp short $+2
loc_74976:
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_48]
xor esi, esi
call _memset
mov rax, [rbp+var_48]
add rax, [rbp+var_10]
mov [rbp+var_10], rax
loc_74991:
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_10]
mov edx, [rbp+arg_0]
xor ecx, ecx
call my_strxfrm_desc_and_reverse
mov eax, [rbp+arg_0]
and eax, 80h
cmp eax, 0
jz short loc_749D8
mov rax, [rbp+var_10]
cmp rax, [rbp+var_40]
jnb short loc_749D8
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_40]
mov rax, [rbp+var_10]
sub rdx, rax
xor esi, esi
call _memset
mov rax, [rbp+var_40]
mov [rbp+var_10], rax
loc_749D8:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_38]
sub rax, rcx
add rsp, 50h
pop rbp
retn
| unsigned long long my_strnxfrm_unicode_full_nopad_bin(
long long a1,
_BYTE *a2,
long long a3,
int a4,
long long a5,
long long a6,
unsigned int a7)
{
_BYTE *v7; // rax
unsigned long long v9; // [rsp+8h] [rbp-48h]
unsigned long long v10; // [rsp+10h] [rbp-40h]
int v11; // [rsp+34h] [rbp-1Ch] BYREF
long long v12; // [rsp+38h] [rbp-18h]
unsigned long long v13; // [rsp+40h] [rbp-10h]
long long v14; // [rsp+48h] [rbp-8h]
v14 = a1;
v13 = (unsigned long long)a2;
v12 = a3;
v11 = a4;
v10 = (unsigned long long)&a2[a3];
v7 = my_strnxfrm_unicode_full_bin_internal(a1, a2, (unsigned long long)&a2[a3], &v11, a5, a6 + a5);
v13 += (unsigned long long)v7;
if ( v13 < v10 && v11 && (a7 & 0x40) != 0 )
{
v9 = v10 - v13;
if ( v10 - v13 > (unsigned int)(3 * v11) )
v9 = (unsigned int)(3 * v11);
memset(v13, 0LL, v9);
v13 += v9;
}
my_strxfrm_desc_and_reverse(a2, v13, a7, 0);
if ( (a7 & 0x80) != 0 && v13 < v10 )
{
memset(v13, 0LL, v10 - v13);
v13 = v10;
}
return v13 - (_QWORD)a2;
}
| my_strnxfrm_unicode_full_nopad_bin:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x40]
MOV R8,qword ptr [RBP + -0x28]
MOV R9,qword ptr [RBP + -0x28]
ADD R9,qword ptr [RBP + -0x30]
LEA RCX,[RBP + -0x1c]
CALL 0x00174610
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00174931
LAB_00174931:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x00174991
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x00174991
MOV EAX,dword ptr [RBP + 0x10]
AND EAX,0x40
CMP EAX,0x0
JZ 0x00174991
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x48]
IMUL ECX,dword ptr [RBP + -0x1c],0x3
MOV ECX,ECX
CMP RAX,RCX
JBE 0x00174974
IMUL EAX,dword ptr [RBP + -0x1c],0x3
MOV EAX,EAX
MOV qword ptr [RBP + -0x48],RAX
LAB_00174974:
JMP 0x00174976
LAB_00174976:
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x48]
XOR ESI,ESI
CALL 0x001251d0
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
LAB_00174991:
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + 0x10]
XOR ECX,ECX
CALL 0x00155b10
MOV EAX,dword ptr [RBP + 0x10]
AND EAX,0x80
CMP EAX,0x0
JZ 0x001749d8
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x001749d8
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x10]
SUB RDX,RAX
XOR ESI,ESI
CALL 0x001251d0
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x10],RAX
LAB_001749d8:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x38]
SUB RAX,RCX
ADD RSP,0x50
POP RBP
RET
|
long my_strnxfrm_unicode_full_nopad_bin
(int8 param_1,long param_2,long param_3,int param_4,long param_5,long param_6,
uint param_7)
{
void *pvVar1;
long lVar2;
size_t local_50;
int local_24;
long local_20;
void *local_18;
int8 local_10;
pvVar1 = (void *)(param_2 + param_3);
local_24 = param_4;
local_20 = param_3;
local_18 = (void *)param_2;
local_10 = param_1;
lVar2 = my_strnxfrm_unicode_full_bin_internal
(param_1,param_2,pvVar1,&local_24,param_5,param_5 + param_6);
local_18 = (void *)(lVar2 + (long)local_18);
if (((local_18 < pvVar1) && (local_24 != 0)) && ((param_7 & 0x40) != 0)) {
local_50 = (long)pvVar1 - (long)local_18;
if ((uint)(local_24 * 3) < local_50) {
local_50 = (size_t)(uint)(local_24 * 3);
}
memset(local_18,0,local_50);
local_18 = (void *)(local_50 + (long)local_18);
}
my_strxfrm_desc_and_reverse(param_2,local_18,param_7,0);
if (((param_7 & 0x80) != 0) && (local_18 < pvVar1)) {
memset(local_18,0,(long)pvVar1 - (long)local_18);
local_18 = pvVar1;
}
return (long)local_18 - param_2;
}
| |
54,699 | mp_print_str | bluesky950520[P]quickjs/libbf.c | void mp_print_str(const char *str, const limb_t *tab, limb_t n)
{
slimb_t i;
printf("%s= 0x", str);
for(i = n - 1; i >= 0; i--) {
if (i != (n - 1))
printf("_");
printf(FMT_LIMB, tab[i]);
}
printf("\n");
} | O0 | c | mp_print_str:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x20(%rsp), %rsi
leaq 0x2b301(%rip), %rdi # 0x118380
movb $0x0, %al
callq 0xe2a0
movq 0x10(%rsp), %rax
subq $0x1, %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jl 0xed0e9
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
je 0xed0bd
leaq 0x29bea(%rip), %rdi # 0x116ca0
movb $0x0, %al
callq 0xe2a0
movq 0x18(%rsp), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x2b2b5(%rip), %rdi # 0x118387
movb $0x0, %al
callq 0xe2a0
movq 0x8(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0xed094
leaq 0x226be(%rip), %rdi # 0x10f7ae
movb $0x0, %al
callq 0xe2a0
addq $0x28, %rsp
retq
nopl (%rax)
| mp_print_str:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov [rsp+28h+var_18], rdx
mov rsi, [rsp+28h+var_8]
lea rdi, aS0x; "%s= 0x"
mov al, 0
call _printf
mov rax, [rsp+28h+var_18]
sub rax, 1
mov [rsp+28h+var_20], rax
loc_ED094:
cmp [rsp+28h+var_20], 0
jl short loc_ED0E9
mov rax, [rsp+28h+var_20]
mov rcx, [rsp+28h+var_18]
sub rcx, 1
cmp rax, rcx
jz short loc_ED0BD
lea rdi, aProto+8; "_"
mov al, 0
call _printf
loc_ED0BD:
mov rax, [rsp+28h+var_10]
mov rcx, [rsp+28h+var_20]
mov rsi, [rax+rcx*8]
lea rdi, a016lx; "%016lx"
mov al, 0
call _printf
mov rax, [rsp+28h+var_20]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rsp+28h+var_20], rax
jmp short loc_ED094
loc_ED0E9:
lea rdi, aMaximumMemoryS+23h; "\n"
mov al, 0
call _printf
add rsp, 28h
retn
| long long mp_print_str(const char *a1, long long a2, long long a3)
{
long long i; // [rsp+8h] [rbp-20h]
printf("%s= 0x", a1);
for ( i = a3 - 1; i >= 0; --i )
{
if ( i != a3 - 1 )
printf("_");
printf("%016lx", *(_QWORD *)(a2 + 8 * i));
}
return printf("\n");
}
| mp_print_str:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x10],RDX
MOV RSI,qword ptr [RSP + 0x20]
LEA RDI,[0x218380]
MOV AL,0x0
CALL 0x0010e2a0
MOV RAX,qword ptr [RSP + 0x10]
SUB RAX,0x1
MOV qword ptr [RSP + 0x8],RAX
LAB_001ed094:
CMP qword ptr [RSP + 0x8],0x0
JL 0x001ed0e9
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP + 0x10]
SUB RCX,0x1
CMP RAX,RCX
JZ 0x001ed0bd
LEA RDI,[0x216ca0]
MOV AL,0x0
CALL 0x0010e2a0
LAB_001ed0bd:
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RAX + RCX*0x8]
LEA RDI,[0x218387]
MOV AL,0x0
CALL 0x0010e2a0
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,-0x1
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001ed094
LAB_001ed0e9:
LEA RDI,[0x20f7ae]
MOV AL,0x0
CALL 0x0010e2a0
ADD RSP,0x28
RET
|
void mp_print_str(int8 param_1,long param_2,long param_3)
{
long local_20;
printf("%s= 0x",param_1);
for (local_20 = param_3 + -1; -1 < local_20; local_20 = local_20 + -1) {
if (local_20 != param_3 + -1) {
printf("_");
}
printf("%016lx",*(int8 *)(param_2 + local_20 * 8));
}
printf("\n");
return;
}
|
Subsets and Splits
C++ Functions With Standard Library Dependencies
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.