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
|
---|---|---|---|---|---|---|---|---|---|---|---|
6,500 | mbedtls_rsa_rsassa_pss_verify | msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/rsa.c | int mbedtls_rsa_rsassa_pss_verify(mbedtls_rsa_context *ctx,
int (*f_rng)(void *, unsigned char *, size_t),
void *p_rng,
int mode,
mbedtls_md_type_t md_alg,
unsigned int hashlen,
const unsigned char *hash,
const unsigned char *sig)
{
mbedtls_md_type_t mgf1_hash_id;
RSA_VALIDATE_RET(ctx != NULL);
RSA_VALIDATE_RET(mode == MBEDTLS_RSA_PRIVATE ||
mode == MBEDTLS_RSA_PUBLIC);
RSA_VALIDATE_RET(sig != NULL);
RSA_VALIDATE_RET((md_alg == MBEDTLS_MD_NONE &&
hashlen == 0) ||
hash != NULL);
mgf1_hash_id = (ctx->hash_id != MBEDTLS_MD_NONE)
? (mbedtls_md_type_t) ctx->hash_id
: md_alg;
return mbedtls_rsa_rsassa_pss_verify_ext(ctx, f_rng, p_rng, mode,
md_alg, hashlen, hash,
mgf1_hash_id, MBEDTLS_RSA_SALT_LEN_ANY,
sig);
} | O3 | c | mbedtls_rsa_rsassa_pss_verify:
pushq %rax
movl 0x14c(%rdi), %eax
testl %eax, %eax
cmovel %r8d, %eax
pushq 0x18(%rsp)
pushq $-0x1
pushq %rax
pushq 0x28(%rsp)
callq 0x91ad0
addq $0x20, %rsp
popq %rcx
retq
| mbedtls_rsa_rsassa_pss_verify:
push rax
mov eax, [rdi+14Ch]
test eax, eax
cmovz eax, r8d
push [rsp+8+arg_8]
push 0FFFFFFFFFFFFFFFFh
push rax
push [rsp+20h+arg_0]
call mbedtls_rsa_rsassa_pss_verify_ext
add rsp, 20h
pop rcx
retn
| long long mbedtls_rsa_rsassa_pss_verify(
long long a1,
long long a2,
long long a3,
int a4,
int a5,
unsigned int a6,
long long a7,
long long a8)
{
int v8; // eax
v8 = *(_DWORD *)(a1 + 332);
if ( !v8 )
v8 = a5;
return mbedtls_rsa_rsassa_pss_verify_ext(a1, a2, a3, a4, a5, a6, a7, v8, -1, a8);
}
| mbedtls_rsa_rsassa_pss_verify:
PUSH RAX
MOV EAX,dword ptr [RDI + 0x14c]
TEST EAX,EAX
CMOVZ EAX,R8D
PUSH qword ptr [RSP + 0x18]
PUSH -0x1
PUSH RAX
PUSH qword ptr [RSP + 0x28]
CALL 0x00191ad0
ADD RSP,0x20
POP RCX
RET
|
void mbedtls_rsa_rsassa_pss_verify(void)
{
mbedtls_rsa_rsassa_pss_verify_ext();
return;
}
|
|
6,501 | walk_and_copy | eloqsql/storage/maria/ma_ft_parser.c | static int walk_and_copy(FT_WORD *word,uint32 count,FT_DOCSTAT *docstat)
{
word->weight=LWS_IN_USE;
docstat->sum+=word->weight;
memcpy((docstat->list)++, word, sizeof(FT_WORD));
return 0;
} | O3 | c | walk_and_copy:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
testl %esi, %esi
je 0x5f3c1
movl %esi, %eax
cvtsi2sd %rax, %xmm0
callq 0x29140
addsd 0x81ae9(%rip), %xmm0 # 0xe0ea8
jmp 0x5f3c5
xorpd %xmm0, %xmm0
movsd %xmm0, 0x10(%rbx)
addsd 0x10(%r14), %xmm0
movsd %xmm0, 0x10(%r14)
movq (%r14), %rax
leaq 0x18(%rax), %rcx
movq %rcx, (%r14)
movq 0x10(%rbx), %rcx
movq %rcx, 0x10(%rax)
movups (%rbx), %xmm0
movups %xmm0, (%rax)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
| walk_and_copy:
push rbp
mov rbp, rsp
push r14
push rbx
mov r14, rdx
mov rbx, rdi
test esi, esi
jz short loc_5F3C1
mov eax, esi
cvtsi2sd xmm0, rax
call _log
addsd xmm0, cs:qword_E0EA8
jmp short loc_5F3C5
loc_5F3C1:
xorpd xmm0, xmm0
loc_5F3C5:
movsd qword ptr [rbx+10h], xmm0
addsd xmm0, qword ptr [r14+10h]
movsd qword ptr [r14+10h], xmm0
mov rax, [r14]
lea rcx, [rax+18h]
mov [r14], rcx
mov rcx, [rbx+10h]
mov [rax+10h], rcx
movups xmm0, xmmword ptr [rbx]
movups xmmword ptr [rax], xmm0
xor eax, eax
pop rbx
pop r14
pop rbp
retn
| long long walk_and_copy(long long a1, int a2, double *a3)
{
double v4; // xmm0_8
double v5; // rax
if ( a2 )
v4 = log((double)a2) + 1.0;
else
v4 = 0.0;
*(double *)(a1 + 16) = v4;
a3[2] = v4 + a3[2];
v5 = *a3;
*(_QWORD *)a3 += 24LL;
*(_QWORD *)(*(_QWORD *)&v5 + 16LL) = *(_QWORD *)(a1 + 16);
**(_OWORD **)&v5 = *(_OWORD *)a1;
return 0LL;
}
| walk_and_copy:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R14,RDX
MOV RBX,RDI
TEST ESI,ESI
JZ 0x0015f3c1
MOV EAX,ESI
CVTSI2SD XMM0,RAX
CALL 0x00129140
ADDSD XMM0,qword ptr [0x001e0ea8]
JMP 0x0015f3c5
LAB_0015f3c1:
XORPD XMM0,XMM0
LAB_0015f3c5:
MOVSD qword ptr [RBX + 0x10],XMM0
ADDSD XMM0,qword ptr [R14 + 0x10]
MOVSD qword ptr [R14 + 0x10],XMM0
MOV RAX,qword ptr [R14]
LEA RCX,[RAX + 0x18]
MOV qword ptr [R14],RCX
MOV RCX,qword ptr [RBX + 0x10]
MOV qword ptr [RAX + 0x10],RCX
MOVUPS XMM0,xmmword ptr [RBX]
MOVUPS xmmword ptr [RAX],XMM0
XOR EAX,EAX
POP RBX
POP R14
POP RBP
RET
|
int8 walk_and_copy(int8 *param_1,uint param_2,long *param_3)
{
int8 *puVar1;
double dVar2;
int8 uVar3;
if (param_2 == 0) {
dVar2 = 0.0;
}
else {
dVar2 = log((double)param_2);
dVar2 = dVar2 + DAT_001e0ea8;
}
param_1[2] = dVar2;
param_3[2] = (long)(dVar2 + (double)param_3[2]);
puVar1 = (int8 *)*param_3;
*param_3 = (long)(puVar1 + 3);
puVar1[2] = param_1[2];
uVar3 = param_1[1];
*puVar1 = *param_1;
puVar1[1] = uVar3;
return 0;
}
|
|
6,502 | DrawRectangleLinesEx | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rshapes.c | void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color)
{
if ((lineThick > rec.width) || (lineThick > rec.height))
{
if (rec.width >= rec.height) lineThick = rec.height/2;
else if (rec.width <= rec.height) lineThick = rec.width/2;
}
// When rec = { x, y, 8.0f, 6.0f } and lineThick = 2, the following
// four rectangles are drawn ([T]op, [B]ottom, [L]eft, [R]ight):
//
// TTTTTTTT
// TTTTTTTT
// LL RR
// LL RR
// BBBBBBBB
// BBBBBBBB
//
Rectangle top = { rec.x, rec.y, rec.width, lineThick };
Rectangle bottom = { rec.x, rec.y - lineThick + rec.height, rec.width, lineThick };
Rectangle left = { rec.x, rec.y + lineThick, lineThick, rec.height - lineThick*2.0f };
Rectangle right = { rec.x - lineThick + rec.width, rec.y + lineThick, lineThick, rec.height - lineThick*2.0f };
DrawRectangleRec(top, color);
DrawRectangleRec(bottom, color);
DrawRectangleRec(left, color);
DrawRectangleRec(right, color);
} | O0 | c | DrawRectangleLinesEx:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movlpd %xmm0, -0x10(%rbp)
movlpd %xmm1, -0x8(%rbp)
movl %edi, -0x14(%rbp)
movss %xmm2, -0x18(%rbp)
movss -0x18(%rbp), %xmm0
ucomiss -0x8(%rbp), %xmm0
ja 0xd9f70
movss -0x18(%rbp), %xmm0
ucomiss -0x4(%rbp), %xmm0
jbe 0xd9fbc
movss -0x8(%rbp), %xmm0
ucomiss -0x4(%rbp), %xmm0
jb 0xd9f93
movss -0x4(%rbp), %xmm0
movss 0xce094(%rip), %xmm1 # 0x1a801c
divss %xmm1, %xmm0
movss %xmm0, -0x18(%rbp)
jmp 0xd9fba
movss -0x8(%rbp), %xmm1
movss -0x4(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jb 0xd9fb8
movss -0x8(%rbp), %xmm0
movss 0xce06d(%rip), %xmm1 # 0x1a801c
divss %xmm1, %xmm0
movss %xmm0, -0x18(%rbp)
jmp 0xd9fba
jmp 0xd9fbc
movss -0x10(%rbp), %xmm0
movss %xmm0, -0x28(%rbp)
movss -0xc(%rbp), %xmm0
movss %xmm0, -0x24(%rbp)
movss -0x8(%rbp), %xmm0
movss %xmm0, -0x20(%rbp)
movss -0x18(%rbp), %xmm0
movss %xmm0, -0x1c(%rbp)
movss -0x10(%rbp), %xmm0
movss %xmm0, -0x38(%rbp)
movss -0x18(%rbp), %xmm2
movss -0xc(%rbp), %xmm0
movss -0x4(%rbp), %xmm1
subss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x34(%rbp)
movss -0x8(%rbp), %xmm0
movss %xmm0, -0x30(%rbp)
movss -0x18(%rbp), %xmm0
movss %xmm0, -0x2c(%rbp)
movss -0x10(%rbp), %xmm0
movss %xmm0, -0x48(%rbp)
movss -0xc(%rbp), %xmm0
movss -0x18(%rbp), %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0x44(%rbp)
movss -0x18(%rbp), %xmm0
movss %xmm0, -0x40(%rbp)
movss -0x4(%rbp), %xmm0
movss -0x18(%rbp), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, -0x3c(%rbp)
movss -0x18(%rbp), %xmm2
movss -0x10(%rbp), %xmm0
movss -0x8(%rbp), %xmm1
subss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x58(%rbp)
movss -0xc(%rbp), %xmm0
movss -0x18(%rbp), %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0x54(%rbp)
movss -0x18(%rbp), %xmm0
movss %xmm0, -0x50(%rbp)
movss -0x4(%rbp), %xmm0
movss -0x18(%rbp), %xmm1
addss %xmm1, %xmm1
subss %xmm1, %xmm0
movss %xmm0, -0x4c(%rbp)
movsd -0x28(%rbp), %xmm0
movsd -0x20(%rbp), %xmm1
movl -0x14(%rbp), %edi
callq 0xd9ae0
movsd -0x38(%rbp), %xmm0
movsd -0x30(%rbp), %xmm1
movl -0x14(%rbp), %edi
callq 0xd9ae0
movsd -0x48(%rbp), %xmm0
movsd -0x40(%rbp), %xmm1
movl -0x14(%rbp), %edi
callq 0xd9ae0
movsd -0x58(%rbp), %xmm0
movsd -0x50(%rbp), %xmm1
movl -0x14(%rbp), %edi
callq 0xd9ae0
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| DrawRectangleLinesEx:
push rbp
mov rbp, rsp
sub rsp, 60h
movlpd [rbp+var_10], xmm0
movlpd [rbp+var_8], xmm1
mov [rbp+var_14], edi
movss [rbp+var_18], xmm2
movss xmm0, [rbp+var_18]
ucomiss xmm0, dword ptr [rbp+var_8]
ja short loc_D9F70
movss xmm0, [rbp+var_18]
ucomiss xmm0, dword ptr [rbp+var_8+4]
jbe short loc_D9FBC
loc_D9F70:
movss xmm0, dword ptr [rbp+var_8]
ucomiss xmm0, dword ptr [rbp+var_8+4]
jb short loc_D9F93
movss xmm0, dword ptr [rbp+var_8+4]
movss xmm1, cs:dword_1A801C
divss xmm0, xmm1
movss [rbp+var_18], xmm0
jmp short loc_D9FBA
loc_D9F93:
movss xmm1, dword ptr [rbp+var_8]
movss xmm0, dword ptr [rbp+var_8+4]
ucomiss xmm0, xmm1
jb short loc_D9FB8
movss xmm0, dword ptr [rbp+var_8]
movss xmm1, cs:dword_1A801C
divss xmm0, xmm1
movss [rbp+var_18], xmm0
loc_D9FB8:
jmp short $+2
loc_D9FBA:
jmp short $+2
loc_D9FBC:
movss xmm0, dword ptr [rbp+var_10]
movss dword ptr [rbp+var_28], xmm0
movss xmm0, dword ptr [rbp+var_10+4]
movss dword ptr [rbp+var_28+4], xmm0
movss xmm0, dword ptr [rbp+var_8]
movss dword ptr [rbp+var_20], xmm0
movss xmm0, [rbp+var_18]
movss dword ptr [rbp+var_20+4], xmm0
movss xmm0, dword ptr [rbp+var_10]
movss dword ptr [rbp+var_38], xmm0
movss xmm2, [rbp+var_18]
movss xmm0, dword ptr [rbp+var_10+4]
movss xmm1, dword ptr [rbp+var_8+4]
subss xmm0, xmm2
addss xmm0, xmm1
movss dword ptr [rbp+var_38+4], xmm0
movss xmm0, dword ptr [rbp+var_8]
movss dword ptr [rbp+var_30], xmm0
movss xmm0, [rbp+var_18]
movss dword ptr [rbp+var_30+4], xmm0
movss xmm0, dword ptr [rbp+var_10]
movss dword ptr [rbp+var_48], xmm0
movss xmm0, dword ptr [rbp+var_10+4]
movss xmm1, [rbp+var_18]
addss xmm0, xmm1
movss dword ptr [rbp+var_48+4], xmm0
movss xmm0, [rbp+var_18]
movss dword ptr [rbp+var_40], xmm0
movss xmm0, dword ptr [rbp+var_8+4]
movss xmm1, [rbp+var_18]
addss xmm1, xmm1
subss xmm0, xmm1
movss dword ptr [rbp+var_40+4], xmm0
movss xmm2, [rbp+var_18]
movss xmm0, dword ptr [rbp+var_10]
movss xmm1, dword ptr [rbp+var_8]
subss xmm0, xmm2
addss xmm0, xmm1
movss dword ptr [rbp+var_58], xmm0
movss xmm0, dword ptr [rbp+var_10+4]
movss xmm1, [rbp+var_18]
addss xmm0, xmm1
movss dword ptr [rbp+var_58+4], xmm0
movss xmm0, [rbp+var_18]
movss dword ptr [rbp+var_50], xmm0
movss xmm0, dword ptr [rbp+var_8+4]
movss xmm1, [rbp+var_18]
addss xmm1, xmm1
subss xmm0, xmm1
movss dword ptr [rbp+var_50+4], xmm0
movsd xmm0, [rbp+var_28]
movsd xmm1, [rbp+var_20]
mov edi, [rbp+var_14]
call DrawRectangleRec
movsd xmm0, [rbp+var_38]
movsd xmm1, [rbp+var_30]
mov edi, [rbp+var_14]
call DrawRectangleRec
movsd xmm0, [rbp+var_48]
movsd xmm1, [rbp+var_40]
mov edi, [rbp+var_14]
call DrawRectangleRec
movsd xmm0, [rbp+var_58]
movsd xmm1, [rbp+var_50]
mov edi, [rbp+var_14]
call DrawRectangleRec
add rsp, 60h
pop rbp
retn
| long long DrawRectangleLinesEx(
int a1,
double a2,
double a3,
float a4,
double a5,
double a6,
double a7,
double a8,
double a9)
{
double v9; // xmm4_8
double v10; // xmm5_8
double v11; // xmm4_8
double v12; // xmm5_8
double v13; // xmm4_8
double v14; // xmm5_8
double v16; // [rsp+8h] [rbp-58h]
double v17; // [rsp+10h] [rbp-50h]
double v18; // [rsp+18h] [rbp-48h]
double v19; // [rsp+20h] [rbp-40h]
double v20; // [rsp+28h] [rbp-38h]
float v21; // [rsp+48h] [rbp-18h]
v21 = a4;
if ( a4 > *(float *)&a3 || a4 > *((float *)&a3 + 1) )
{
if ( *(float *)&a3 < *((float *)&a3 + 1) )
{
if ( *((float *)&a3 + 1) >= *(float *)&a3 )
v21 = *(float *)&a3 / 2.0;
}
else
{
v21 = *((float *)&a3 + 1) / 2.0;
}
}
LODWORD(v20) = LODWORD(a2);
*((float *)&v20 + 1) = (float)(*((float *)&a2 + 1) - v21) + *((float *)&a3 + 1);
LODWORD(v18) = LODWORD(a2);
*((float *)&v18 + 1) = *((float *)&a2 + 1) + v21;
*(float *)&v19 = v21;
*((float *)&v19 + 1) = *((float *)&a3 + 1) - (float)(v21 + v21);
*(float *)&v16 = (float)(*(float *)&a2 - v21) + *(float *)&a3;
*((float *)&v16 + 1) = *((float *)&a2 + 1) + v21;
*(float *)&v17 = v21;
*((float *)&v17 + 1) = *((float *)&v19 + 1);
DrawRectangleRec(
a1,
a2,
COERCE_DOUBLE(__PAIR64__(LODWORD(v21), LODWORD(a3))),
COERCE_DOUBLE((unsigned long long)LODWORD(v21)),
a5,
a6,
a7,
a8,
a9);
DrawRectangleRec(
a1,
v20,
COERCE_DOUBLE(__PAIR64__(LODWORD(v21), LODWORD(a3))),
COERCE_DOUBLE((unsigned long long)LODWORD(v21)),
a5,
v9,
v10,
a8,
a9);
DrawRectangleRec(a1, v18, v19, COERCE_DOUBLE((unsigned long long)LODWORD(v21)), a5, v11, v12, a8, a9);
return DrawRectangleRec(a1, v16, v17, COERCE_DOUBLE((unsigned long long)LODWORD(v21)), a5, v13, v14, a8, a9);
}
| DrawRectangleLinesEx:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOVLPD qword ptr [RBP + -0x10],XMM0
MOVLPD qword ptr [RBP + -0x8],XMM1
MOV dword ptr [RBP + -0x14],EDI
MOVSS dword ptr [RBP + -0x18],XMM2
MOVSS XMM0,dword ptr [RBP + -0x18]
UCOMISS XMM0,dword ptr [RBP + -0x8]
JA 0x001d9f70
MOVSS XMM0,dword ptr [RBP + -0x18]
UCOMISS XMM0,dword ptr [RBP + -0x4]
JBE 0x001d9fbc
LAB_001d9f70:
MOVSS XMM0,dword ptr [RBP + -0x8]
UCOMISS XMM0,dword ptr [RBP + -0x4]
JC 0x001d9f93
MOVSS XMM0,dword ptr [RBP + -0x4]
MOVSS XMM1,dword ptr [0x002a801c]
DIVSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x18],XMM0
JMP 0x001d9fba
LAB_001d9f93:
MOVSS XMM1,dword ptr [RBP + -0x8]
MOVSS XMM0,dword ptr [RBP + -0x4]
UCOMISS XMM0,XMM1
JC 0x001d9fb8
MOVSS XMM0,dword ptr [RBP + -0x8]
MOVSS XMM1,dword ptr [0x002a801c]
DIVSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x18],XMM0
LAB_001d9fb8:
JMP 0x001d9fba
LAB_001d9fba:
JMP 0x001d9fbc
LAB_001d9fbc:
MOVSS XMM0,dword ptr [RBP + -0x10]
MOVSS dword ptr [RBP + -0x28],XMM0
MOVSS XMM0,dword ptr [RBP + -0xc]
MOVSS dword ptr [RBP + -0x24],XMM0
MOVSS XMM0,dword ptr [RBP + -0x8]
MOVSS dword ptr [RBP + -0x20],XMM0
MOVSS XMM0,dword ptr [RBP + -0x18]
MOVSS dword ptr [RBP + -0x1c],XMM0
MOVSS XMM0,dword ptr [RBP + -0x10]
MOVSS dword ptr [RBP + -0x38],XMM0
MOVSS XMM2,dword ptr [RBP + -0x18]
MOVSS XMM0,dword ptr [RBP + -0xc]
MOVSS XMM1,dword ptr [RBP + -0x4]
SUBSS XMM0,XMM2
ADDSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x34],XMM0
MOVSS XMM0,dword ptr [RBP + -0x8]
MOVSS dword ptr [RBP + -0x30],XMM0
MOVSS XMM0,dword ptr [RBP + -0x18]
MOVSS dword ptr [RBP + -0x2c],XMM0
MOVSS XMM0,dword ptr [RBP + -0x10]
MOVSS dword ptr [RBP + -0x48],XMM0
MOVSS XMM0,dword ptr [RBP + -0xc]
MOVSS XMM1,dword ptr [RBP + -0x18]
ADDSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x44],XMM0
MOVSS XMM0,dword ptr [RBP + -0x18]
MOVSS dword ptr [RBP + -0x40],XMM0
MOVSS XMM0,dword ptr [RBP + -0x4]
MOVSS XMM1,dword ptr [RBP + -0x18]
ADDSS XMM1,XMM1
SUBSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x3c],XMM0
MOVSS XMM2,dword ptr [RBP + -0x18]
MOVSS XMM0,dword ptr [RBP + -0x10]
MOVSS XMM1,dword ptr [RBP + -0x8]
SUBSS XMM0,XMM2
ADDSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x58],XMM0
MOVSS XMM0,dword ptr [RBP + -0xc]
MOVSS XMM1,dword ptr [RBP + -0x18]
ADDSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x54],XMM0
MOVSS XMM0,dword ptr [RBP + -0x18]
MOVSS dword ptr [RBP + -0x50],XMM0
MOVSS XMM0,dword ptr [RBP + -0x4]
MOVSS XMM1,dword ptr [RBP + -0x18]
ADDSS XMM1,XMM1
SUBSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x4c],XMM0
MOVSD XMM0,qword ptr [RBP + -0x28]
MOVSD XMM1,qword ptr [RBP + -0x20]
MOV EDI,dword ptr [RBP + -0x14]
CALL 0x001d9ae0
MOVSD XMM0,qword ptr [RBP + -0x38]
MOVSD XMM1,qword ptr [RBP + -0x30]
MOV EDI,dword ptr [RBP + -0x14]
CALL 0x001d9ae0
MOVSD XMM0,qword ptr [RBP + -0x48]
MOVSD XMM1,qword ptr [RBP + -0x40]
MOV EDI,dword ptr [RBP + -0x14]
CALL 0x001d9ae0
MOVSD XMM0,qword ptr [RBP + -0x58]
MOVSD XMM1,qword ptr [RBP + -0x50]
MOV EDI,dword ptr [RBP + -0x14]
CALL 0x001d9ae0
ADD RSP,0x60
POP RBP
RET
|
void DrawRectangleLinesEx(int8 param_1,int8 param_2,float param_3,int4 param_4)
{
int4 local_20;
int4 local_18;
int4 uStack_14;
int4 local_10;
int4 uStack_c;
local_10 = (float)param_2;
uStack_c = (float)((ulong)param_2 >> 0x20);
local_20 = param_3;
if ((local_10 < param_3) || (uStack_c < param_3)) {
if (local_10 < uStack_c) {
if (local_10 <= uStack_c) {
local_20 = local_10 / DAT_002a801c;
}
}
else {
local_20 = uStack_c / DAT_002a801c;
}
}
local_18 = (float)param_1;
uStack_14 = (float)((ulong)param_1 >> 0x20);
DrawRectangleRec(param_1,CONCAT44(local_20,local_10),param_4);
DrawRectangleRec(CONCAT44((uStack_14 - local_20) + uStack_c,local_18),CONCAT44(local_20,local_10),
param_4);
DrawRectangleRec(CONCAT44(uStack_14 + local_20,local_18),
CONCAT44(uStack_c - (local_20 + local_20),local_20),param_4);
DrawRectangleRec(CONCAT44(uStack_14 + local_20,(local_18 - local_20) + local_10),
CONCAT44(uStack_c - (local_20 + local_20),local_20),param_4);
return;
}
|
|
6,503 | DrawRectangleLinesEx | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rshapes.c | void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color)
{
if ((lineThick > rec.width) || (lineThick > rec.height))
{
if (rec.width >= rec.height) lineThick = rec.height/2;
else if (rec.width <= rec.height) lineThick = rec.width/2;
}
// When rec = { x, y, 8.0f, 6.0f } and lineThick = 2, the following
// four rectangles are drawn ([T]op, [B]ottom, [L]eft, [R]ight):
//
// TTTTTTTT
// TTTTTTTT
// LL RR
// LL RR
// BBBBBBBB
// BBBBBBBB
//
Rectangle top = { rec.x, rec.y, rec.width, lineThick };
Rectangle bottom = { rec.x, rec.y - lineThick + rec.height, rec.width, lineThick };
Rectangle left = { rec.x, rec.y + lineThick, lineThick, rec.height - lineThick*2.0f };
Rectangle right = { rec.x - lineThick + rec.width, rec.y + lineThick, lineThick, rec.height - lineThick*2.0f };
DrawRectangleRec(top, color);
DrawRectangleRec(bottom, color);
DrawRectangleRec(left, color);
DrawRectangleRec(right, color);
} | O1 | c | DrawRectangleLinesEx:
pushq %rbx
subq $0x70, %rsp
movl %edi, %ebx
movaps %xmm1, %xmm3
shufps $0x55, %xmm1, %xmm3 # xmm3 = xmm3[1,1],xmm1[1,1]
ucomiss %xmm1, %xmm2
ja 0x7f26b
ucomiss %xmm3, %xmm2
jbe 0x7f28f
ucomiss %xmm3, %xmm1
jae 0x7f283
ucomiss %xmm1, %xmm3
jb 0x7f28f
movss 0x55dbb(%rip), %xmm2 # 0xd5038
mulss %xmm1, %xmm2
jmp 0x7f28f
movss 0x55dad(%rip), %xmm2 # 0xd5038
mulss %xmm3, %xmm2
movaps %xmm2, (%rsp)
movaps %xmm0, %xmm4
shufps $0x55, %xmm0, %xmm4 # xmm4 = xmm4[1,1],xmm0[1,1]
movaps %xmm4, %xmm5
subss %xmm2, %xmm5
addss %xmm3, %xmm5
movaps %xmm5, 0x50(%rsp)
addss %xmm2, %xmm4
movaps %xmm4, 0x20(%rsp)
movaps %xmm0, %xmm4
movaps %xmm2, %xmm0
addss %xmm2, %xmm0
subss %xmm0, %xmm3
movaps %xmm3, 0x40(%rsp)
movaps %xmm4, %xmm0
movaps %xmm4, 0x10(%rsp)
subss %xmm2, %xmm0
addss %xmm1, %xmm0
movaps %xmm0, 0x60(%rsp)
movaps %xmm2, %xmm0
movlhps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0]
shufps $0xe2, %xmm1, %xmm0 # xmm0 = xmm0[2,0],xmm1[2,3]
movaps %xmm0, %xmm1
movaps %xmm0, 0x30(%rsp)
xorps %xmm2, %xmm2
xorps %xmm3, %xmm3
movaps %xmm4, %xmm0
movl %ebx, %edi
callq 0x7ead3
movaps 0x10(%rsp), %xmm1
movaps 0x50(%rsp), %xmm0
movlhps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0]
shufps $0xe2, %xmm1, %xmm0 # xmm0 = xmm0[2,0],xmm1[2,3]
xorps %xmm2, %xmm2
xorps %xmm3, %xmm3
movaps 0x30(%rsp), %xmm1
movl %ebx, %edi
callq 0x7ead3
movaps (%rsp), %xmm1
unpcklps 0x40(%rsp), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
movaps %xmm1, (%rsp)
movaps 0x20(%rsp), %xmm0
movaps 0x10(%rsp), %xmm2
movlhps %xmm2, %xmm0 # xmm0 = xmm0[0],xmm2[0]
shufps $0xe2, %xmm2, %xmm0 # xmm0 = xmm0[2,0],xmm2[2,3]
xorps %xmm2, %xmm2
xorps %xmm3, %xmm3
movl %ebx, %edi
callq 0x7ead3
movaps 0x60(%rsp), %xmm0
unpcklps 0x20(%rsp), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
xorps %xmm2, %xmm2
xorps %xmm3, %xmm3
movaps (%rsp), %xmm1
movl %ebx, %edi
addq $0x70, %rsp
popq %rbx
jmp 0x7ead3
| DrawRectangleLinesEx:
push rbx
sub rsp, 70h
mov ebx, edi
movaps xmm3, xmm1
shufps xmm3, xmm1, 55h ; 'U'
ucomiss xmm2, xmm1
ja short loc_7F26B
ucomiss xmm2, xmm3
jbe short loc_7F28F
loc_7F26B:
ucomiss xmm1, xmm3
jnb short loc_7F283
ucomiss xmm3, xmm1
jb short loc_7F28F
movss xmm2, cs:dword_D5038
mulss xmm2, xmm1
jmp short loc_7F28F
loc_7F283:
movss xmm2, cs:dword_D5038
mulss xmm2, xmm3
loc_7F28F:
movaps [rsp+78h+var_78], xmm2
movaps xmm4, xmm0
shufps xmm4, xmm0, 55h ; 'U'
movaps xmm5, xmm4
subss xmm5, xmm2
addss xmm5, xmm3
movaps [rsp+78h+var_28], xmm5
addss xmm4, xmm2
movaps [rsp+78h+var_58], xmm4
movaps xmm4, xmm0
movaps xmm0, xmm2
addss xmm0, xmm2
subss xmm3, xmm0
movaps [rsp+78h+var_38], xmm3
movaps xmm0, xmm4
movaps [rsp+78h+var_68], xmm4
subss xmm0, xmm2
addss xmm0, xmm1
movaps [rsp+78h+var_18], xmm0
movaps xmm0, xmm2
movlhps xmm0, xmm1
shufps xmm0, xmm1, 0E2h
movaps xmm1, xmm0
movaps [rsp+78h+var_48], xmm0
xorps xmm2, xmm2
xorps xmm3, xmm3
movaps xmm0, xmm4
mov edi, ebx
call DrawRectanglePro
movaps xmm1, [rsp+78h+var_68]
movaps xmm0, [rsp+78h+var_28]
movlhps xmm0, xmm1
shufps xmm0, xmm1, 0E2h
xorps xmm2, xmm2
xorps xmm3, xmm3
movaps xmm1, [rsp+78h+var_48]
mov edi, ebx
call DrawRectanglePro
movaps xmm1, [rsp+78h+var_78]
unpcklps xmm1, [rsp+78h+var_38]
movaps [rsp+78h+var_78], xmm1
movaps xmm0, [rsp+78h+var_58]
movaps xmm2, [rsp+78h+var_68]
movlhps xmm0, xmm2
shufps xmm0, xmm2, 0E2h
xorps xmm2, xmm2
xorps xmm3, xmm3
mov edi, ebx
call DrawRectanglePro
movaps xmm0, [rsp+78h+var_18]
unpcklps xmm0, [rsp+78h+var_58]
xorps xmm2, xmm2
xorps xmm3, xmm3
movaps xmm1, [rsp+78h+var_78]
mov edi, ebx
add rsp, 70h
pop rbx
jmp DrawRectanglePro
| long long DrawRectangleLinesEx(int a1, long long a2, __m128 a3, __m128 a4, __m128 a5)
{
__m128 v5; // xmm3
__m128 v6; // xmm4
__m128 v7; // xmm5
__m128 v8; // xmm4
__m128 v10; // [rsp+0h] [rbp-78h]
__m128 v11; // [rsp+10h] [rbp-68h]
__m128 v12; // [rsp+20h] [rbp-58h]
__m128 v13; // [rsp+30h] [rbp-48h]
__m128 v14; // [rsp+50h] [rbp-28h]
v5 = _mm_shuffle_ps(a4, a4, 85);
if ( a5.m128_f32[0] > a4.m128_f32[0] || a5.m128_f32[0] > v5.m128_f32[0] )
{
if ( a4.m128_f32[0] >= v5.m128_f32[0] )
{
a5 = (__m128)0x3F000000u;
a5.m128_f32[0] = 0.5 * v5.m128_f32[0];
}
else if ( v5.m128_f32[0] >= a4.m128_f32[0] )
{
a5 = (__m128)0x3F000000u;
a5.m128_f32[0] = 0.5 * a4.m128_f32[0];
}
}
v6 = _mm_shuffle_ps(a3, a3, 85);
v7 = v6;
v7.m128_f32[0] = (float)(v6.m128_f32[0] - a5.m128_f32[0]) + v5.m128_f32[0];
v14 = v7;
v6.m128_f32[0] = v6.m128_f32[0] + a5.m128_f32[0];
v12 = v6;
v8 = a3;
v5.m128_f32[0] = v5.m128_f32[0] - (float)(a5.m128_f32[0] + a5.m128_f32[0]);
v11 = a3;
a3.m128_f32[0] = (float)(a3.m128_f32[0] - a5.m128_f32[0]) + a4.m128_f32[0];
v13 = _mm_shuffle_ps(_mm_movelh_ps(a5, a4), a4, 226);
DrawRectanglePro(a1, a2, v8, v13, (__m128)0LL, 0.0);
DrawRectanglePro(a1, a2, _mm_shuffle_ps(_mm_movelh_ps(v14, v11), v11, 226), v13, (__m128)0LL, 0.0);
v10 = _mm_unpacklo_ps(a5, v5);
DrawRectanglePro(a1, a2, _mm_shuffle_ps(_mm_movelh_ps(v12, v11), v11, 226), v10, (__m128)0LL, 0.0);
return DrawRectanglePro(a1, a2, _mm_unpacklo_ps(a3, v12), v10, (__m128)0LL, 0.0);
}
| DrawRectangleLinesEx:
PUSH RBX
SUB RSP,0x70
MOV EBX,EDI
MOVAPS XMM3,XMM1
SHUFPS XMM3,XMM1,0x55
UCOMISS XMM2,XMM1
JA 0x0017f26b
UCOMISS XMM2,XMM3
JBE 0x0017f28f
LAB_0017f26b:
UCOMISS XMM1,XMM3
JNC 0x0017f283
UCOMISS XMM3,XMM1
JC 0x0017f28f
MOVSS XMM2,dword ptr [0x001d5038]
MULSS XMM2,XMM1
JMP 0x0017f28f
LAB_0017f283:
MOVSS XMM2,dword ptr [0x001d5038]
MULSS XMM2,XMM3
LAB_0017f28f:
MOVAPS xmmword ptr [RSP],XMM2
MOVAPS XMM4,XMM0
SHUFPS XMM4,XMM0,0x55
MOVAPS XMM5,XMM4
SUBSS XMM5,XMM2
ADDSS XMM5,XMM3
MOVAPS xmmword ptr [RSP + 0x50],XMM5
ADDSS XMM4,XMM2
MOVAPS xmmword ptr [RSP + 0x20],XMM4
MOVAPS XMM4,XMM0
MOVAPS XMM0,XMM2
ADDSS XMM0,XMM2
SUBSS XMM3,XMM0
MOVAPS xmmword ptr [RSP + 0x40],XMM3
MOVAPS XMM0,XMM4
MOVAPS xmmword ptr [RSP + 0x10],XMM4
SUBSS XMM0,XMM2
ADDSS XMM0,XMM1
MOVAPS xmmword ptr [RSP + 0x60],XMM0
MOVAPS XMM0,XMM2
MOVLHPS XMM0,XMM1
SHUFPS XMM0,XMM1,0xe2
MOVAPS XMM1,XMM0
MOVAPS xmmword ptr [RSP + 0x30],XMM0
XORPS XMM2,XMM2
XORPS XMM3,XMM3
MOVAPS XMM0,XMM4
MOV EDI,EBX
CALL 0x0017ead3
MOVAPS XMM1,xmmword ptr [RSP + 0x10]
MOVAPS XMM0,xmmword ptr [RSP + 0x50]
MOVLHPS XMM0,XMM1
SHUFPS XMM0,XMM1,0xe2
XORPS XMM2,XMM2
XORPS XMM3,XMM3
MOVAPS XMM1,xmmword ptr [RSP + 0x30]
MOV EDI,EBX
CALL 0x0017ead3
MOVAPS XMM1,xmmword ptr [RSP]
UNPCKLPS XMM1,xmmword ptr [RSP + 0x40]
MOVAPS xmmword ptr [RSP],XMM1
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
MOVAPS XMM2,xmmword ptr [RSP + 0x10]
MOVLHPS XMM0,XMM2
SHUFPS XMM0,XMM2,0xe2
XORPS XMM2,XMM2
XORPS XMM3,XMM3
MOV EDI,EBX
CALL 0x0017ead3
MOVAPS XMM0,xmmword ptr [RSP + 0x60]
UNPCKLPS XMM0,xmmword ptr [RSP + 0x20]
XORPS XMM2,XMM2
XORPS XMM3,XMM3
MOVAPS XMM1,xmmword ptr [RSP]
MOV EDI,EBX
ADD RSP,0x70
POP RBX
JMP 0x0017ead3
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void DrawRectangleLinesEx(float param_1,int8 param_2,float param_3,int4 param_4)
{
float fVar1;
float fVar2;
fVar2 = (float)((ulong)param_2 >> 0x20);
fVar1 = (float)param_2;
if ((fVar1 < param_3) || (fVar2 < param_3)) {
if (fVar2 <= fVar1) {
param_3 = _DAT_001d5038 * fVar2;
}
else if (fVar1 <= fVar2) {
param_3 = _DAT_001d5038 * fVar1;
}
}
DrawRectanglePro(param_1,fVar1,0,0,param_4);
DrawRectanglePro(param_1,fVar1,0,0,param_4);
DrawRectanglePro(param_1,param_3,0,0,param_4);
DrawRectanglePro((param_1 - param_3) + fVar1,param_3,0,0,param_4);
return;
}
|
|
6,504 | ilink::~ilink() | eloqsql/sql/sql_list.h | virtual ~ilink() { unlink(); } | O3 | c | ilink::~ilink():
pushq %rbp
movq %rsp, %rbp
leaq 0x303c8f(%rip), %rax # 0x35c5e0
movq %rax, (%rdi)
movq 0x8(%rdi), %rcx
movq 0x10(%rdi), %rax
testq %rcx, %rcx
je 0x58964
movq %rax, (%rcx)
leaq 0x8(%rdi), %rcx
testq %rax, %rax
je 0x58974
movq (%rcx), %rdx
movq %rdx, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rcx)
callq 0x84732
popq %rbp
retq
movq %rax, %rdi
callq 0x568f6
nop
| _ZN5ilinkD0Ev:
push rbp
mov rbp, rsp
lea rax, off_35C5E0
mov [rdi], rax
mov rcx, [rdi+8]
mov rax, [rdi+10h]
test rcx, rcx
jz short loc_58964
mov [rcx], rax
loc_58964:
lea rcx, [rdi+8]
test rax, rax
jz short loc_58974
mov rdx, [rcx]
mov [rax+8], rdx
loc_58974:
xorps xmm0, xmm0
movups xmmword ptr [rcx], xmm0
call my_free
pop rbp
retn
mov rdi, rax
call __clang_call_terminate
| void ilink::~ilink(ilink *this)
{
_QWORD *v1; // rcx
long long v2; // rax
_QWORD *v3; // rcx
*(_QWORD *)this = off_35C5E0;
v1 = (_QWORD *)*((_QWORD *)this + 1);
v2 = *((_QWORD *)this + 2);
if ( v1 )
*v1 = v2;
v3 = (_QWORD *)((char *)this + 8);
if ( v2 )
*(_QWORD *)(v2 + 8) = *v3;
*(_OWORD *)v3 = 0LL;
my_free(this);
}
| ~ilink:
PUSH RBP
MOV RBP,RSP
LEA RAX,[0x45c5e0]
MOV qword ptr [RDI],RAX
MOV RCX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RDI + 0x10]
TEST RCX,RCX
JZ 0x00158964
MOV qword ptr [RCX],RAX
LAB_00158964:
LEA RCX,[RDI + 0x8]
TEST RAX,RAX
JZ 0x00158974
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX + 0x8],RDX
LAB_00158974:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RCX],XMM0
LAB_0015897a:
CALL 0x00184732
POP RBP
RET
|
/* ilink::~ilink() */
void __thiscall ilink::~ilink(ilink *this)
{
long lVar1;
*(int ***)this = &PTR__ilink_0045c5e0;
lVar1 = *(long *)(this + 0x10);
if (*(long **)(this + 8) != (long *)0x0) {
**(long **)(this + 8) = lVar1;
}
if (lVar1 != 0) {
*(int8 *)(lVar1 + 8) = *(int8 *)(this + 8);
}
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
/* try { // try from 0015897a to 0015897e has its CatchHandler @ 00158981 */
my_free();
return;
}
|
|
6,505 | mysql_stmt_bind_result | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | my_bool STDCALL mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *bind)
{
uint i;
if (stmt->state < MYSQL_STMT_PREPARED)
{
SET_CLIENT_STMT_ERROR(stmt, CR_NO_PREPARE_STMT, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (!stmt->field_count)
{
SET_CLIENT_STMT_ERROR(stmt, CR_NO_STMT_METADATA, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (!bind)
return(1);
/* In case of a stored procedure we don't allocate memory for bind
in mysql_stmt_prepare
*/
if (stmt->field_count && !stmt->bind)
{
MA_MEM_ROOT *fields_ma_alloc_root=
&((MADB_STMT_EXTENSION *)stmt->extension)->fields_ma_alloc_root;
if (!(stmt->bind= (MYSQL_BIND *)ma_alloc_root(fields_ma_alloc_root, stmt->field_count * sizeof(MYSQL_BIND))))
{
SET_CLIENT_STMT_ERROR(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);
return(1);
}
}
memcpy(stmt->bind, bind, sizeof(MYSQL_BIND) * stmt->field_count);
for (i=0; i < stmt->field_count; i++)
{
if (stmt->mysql->methods->db_supported_buffer_type &&
!stmt->mysql->methods->db_supported_buffer_type(bind[i].buffer_type))
{
SET_CLIENT_STMT_ERROR(stmt, CR_UNSUPPORTED_PARAM_TYPE, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (!stmt->bind[i].is_null)
stmt->bind[i].is_null= &stmt->bind[i].is_null_value;
if (!stmt->bind[i].length)
stmt->bind[i].length= &stmt->bind[i].length_value;
if (!stmt->bind[i].error)
stmt->bind[i].error= &stmt->bind[i].error_value;
/* set length values for numeric types */
switch(bind[i].buffer_type) {
case MYSQL_TYPE_NULL:
*stmt->bind[i].length= stmt->bind[i].length_value= 0;
break;
case MYSQL_TYPE_TINY:
*stmt->bind[i].length= stmt->bind[i].length_value= 1;
break;
case MYSQL_TYPE_SHORT:
case MYSQL_TYPE_YEAR:
*stmt->bind[i].length= stmt->bind[i].length_value= 2;
break;
case MYSQL_TYPE_INT24:
case MYSQL_TYPE_LONG:
case MYSQL_TYPE_FLOAT:
*stmt->bind[i].length= stmt->bind[i].length_value= 4;
break;
case MYSQL_TYPE_LONGLONG:
case MYSQL_TYPE_DOUBLE:
*stmt->bind[i].length= stmt->bind[i].length_value= 8;
break;
case MYSQL_TYPE_TIME:
case MYSQL_TYPE_DATE:
case MYSQL_TYPE_DATETIME:
case MYSQL_TYPE_TIMESTAMP:
*stmt->bind[i].length= stmt->bind[i].length_value= sizeof(MYSQL_TIME);
break;
default:
break;
}
}
stmt->bind_result_done= 1;
CLEAR_CLIENT_STMT_ERROR(stmt);
return(0);
} | O3 | c | mysql_stmt_bind_result:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x50(%rdi)
je 0x231c8
movl 0x60(%rbx), %eax
testq %rax, %rax
je 0x2320e
movq %rsi, %r15
movb $0x1, %r14b
testq %rsi, %rsi
je 0x23266
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
jne 0x230ce
movq 0x340(%rbx), %rdi
imulq $0x70, %rax, %rsi
callq 0x20a6f
movq %rax, 0x78(%rbx)
testq %rax, %rax
je 0x232be
movq %rax, %rdi
movl 0x60(%rbx), %eax
movl %eax, %eax
imulq $0x70, %rax, %rdx
movq %r15, %rsi
callq 0x13390
cmpl $0x0, 0x60(%rbx)
je 0x23195
movl $0x50, %r12d
xorl %r13d, %r13d
movq 0x38(%rbx), %rax
movq 0x4d0(%rax), %rax
movq 0x38(%rax), %rax
testq %rax, %rax
je 0x23112
movl 0x10(%r15,%r12), %edi
callq *%rax
testb %al, %al
je 0x23278
movq 0x78(%rbx), %rax
cmpq $0x0, -0x48(%rax,%r12)
jne 0x2312d
addq %r12, %rax
addq $0x17, %rax
movq %rax, -0x5f(%rax)
movq 0x78(%rbx), %rax
cmpq $0x0, -0x50(%rax,%r12)
jne 0x23142
leaq (%rax,%r12), %rcx
movq %rcx, -0x50(%rax,%r12)
movq 0x78(%rbx), %rax
cmpq $0x0, -0x38(%rax,%r12)
jne 0x23155
addq %r12, %rax
addq $0x14, %rax
movq %rax, -0x4c(%rax)
movl 0x10(%r15,%r12), %eax
decl %eax
cmpl $0xc, %eax
ja 0x23182
movl %eax, %eax
leaq 0x18e6e(%rip), %rcx # 0x3bfd8
movq (%rcx,%rax,8), %rax
movq 0x78(%rbx), %rcx
movq %rax, (%rcx,%r12)
movq 0x78(%rbx), %rcx
movq -0x50(%rcx,%r12), %rcx
movq %rax, (%rcx)
incq %r13
movl 0x60(%rbx), %eax
addq $0x70, %r12
cmpq %rax, %r13
jb 0x230ef
movb $0x1, 0xe8(%rbx)
movl $0x0, 0x108(%rbx)
movl $0x30303030, 0x30d(%rbx) # imm = 0x30303030
movw $0x30, 0x311(%rbx)
movb $0x0, 0x10c(%rbx)
xorl %r14d, %r14d
jmp 0x23266
movl $0x7ee, 0x108(%rbx) # imm = 0x7EE
leaq 0x30d(%rbx), %rdi
leaq 0x2aba0(%rip), %rax # 0x4dd80
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
xorl %r14d, %r14d
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
leaq 0x2ab8b(%rip), %rax # 0x4dd90
movq 0xf0(%rax), %rsi
jmp 0x23252
movl $0x804, 0x108(%rbx) # imm = 0x804
leaq 0x30d(%rbx), %rdi
leaq 0x2ab5a(%rip), %rax # 0x4dd80
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
xorl %r14d, %r14d
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
leaq 0x2ab45(%rip), %rax # 0x4dd90
movq 0x1a0(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13220
movb %r14b, 0x30b(%rbx)
movb $0x1, %r14b
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x7f4, 0x108(%rbx) # imm = 0x7F4
leaq 0x30d(%rbx), %rdi
leaq 0x2aaf0(%rip), %rax # 0x4dd80
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
xorl %r15d, %r15d
movb %r15b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
leaq 0x2aadb(%rip), %rax # 0x4dd90
movq 0x120(%rax), %rsi
jmp 0x232ff
movl $0x7d8, 0x108(%rbx) # imm = 0x7D8
leaq 0x30d(%rbx), %rdi
leaq 0x2aaaa(%rip), %rax # 0x4dd80
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
xorl %r15d, %r15d
movb %r15b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
leaq 0x2aa95(%rip), %rax # 0x4dd90
movq 0x40(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13220
movb %r15b, 0x30b(%rbx)
jmp 0x23266
| mysql_stmt_bind_result:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
cmp dword ptr [rdi+50h], 0
jz loc_231C8
mov eax, [rbx+60h]
test rax, rax
jz loc_2320E
mov r15, rsi
mov r14b, 1
test rsi, rsi
jz loc_23266
mov rdi, [rbx+78h]
test rdi, rdi
jnz short loc_230CE
mov rdi, [rbx+340h]
imul rsi, rax, 70h ; 'p'
call ma_alloc_root
mov [rbx+78h], rax
test rax, rax
jz loc_232BE
mov rdi, rax
mov eax, [rbx+60h]
loc_230CE:
mov eax, eax
imul rdx, rax, 70h ; 'p'
mov rsi, r15
call _memcpy
cmp dword ptr [rbx+60h], 0
jz loc_23195
mov r12d, 50h ; 'P'
xor r13d, r13d
loc_230EF:
mov rax, [rbx+38h]
mov rax, [rax+4D0h]
mov rax, [rax+38h]
test rax, rax
jz short loc_23112
mov edi, [r15+r12+10h]
call rax
test al, al
jz loc_23278
loc_23112:
mov rax, [rbx+78h]
cmp qword ptr [rax+r12-48h], 0
jnz short loc_2312D
add rax, r12
add rax, 17h
mov [rax-5Fh], rax
mov rax, [rbx+78h]
loc_2312D:
cmp qword ptr [rax+r12-50h], 0
jnz short loc_23142
lea rcx, [rax+r12]
mov [rax+r12-50h], rcx
mov rax, [rbx+78h]
loc_23142:
cmp qword ptr [rax+r12-38h], 0
jnz short loc_23155
add rax, r12
add rax, 14h
mov [rax-4Ch], rax
loc_23155:
mov eax, [r15+r12+10h]
dec eax
cmp eax, 0Ch
ja short loc_23182
mov eax, eax
lea rcx, unk_3BFD8
mov rax, [rcx+rax*8]
mov rcx, [rbx+78h]
mov [rcx+r12], rax
mov rcx, [rbx+78h]
mov rcx, [rcx+r12-50h]
mov [rcx], rax
loc_23182:
inc r13
mov eax, [rbx+60h]
add r12, 70h ; 'p'
cmp r13, rax
jb loc_230EF
loc_23195:
mov byte ptr [rbx+0E8h], 1
mov dword ptr [rbx+108h], 0
mov dword ptr [rbx+30Dh], 30303030h
mov word ptr [rbx+311h], 30h ; '0'
mov byte ptr [rbx+10Ch], 0
xor r14d, r14d
jmp loc_23266
loc_231C8:
mov dword ptr [rbx+108h], 7EEh
lea rdi, [rbx+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
lea rax, client_errors
mov rsi, [rax+0F0h]
jmp short loc_23252
loc_2320E:
mov dword ptr [rbx+108h], 804h
lea rdi, [rbx+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
lea rax, client_errors
mov rsi, [rax+1A0h]
loc_23252:
mov edx, 200h
call _strncpy
mov [rbx+30Bh], r14b
mov r14b, 1
loc_23266:
mov eax, r14d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_23278:
mov dword ptr [rbx+108h], 7F4h
lea rdi, [rbx+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r15d, r15d
mov [rbx+312h], r15b
lea rdi, [rbx+10Ch]
lea rax, client_errors
mov rsi, [rax+120h]
jmp short loc_232FF
loc_232BE:
mov dword ptr [rbx+108h], 7D8h
lea rdi, [rbx+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r15d, r15d
mov [rbx+312h], r15b
lea rdi, [rbx+10Ch]
lea rax, client_errors
mov rsi, [rax+40h]
loc_232FF:
mov edx, 200h
call _strncpy
mov [rbx+30Bh], r15b
jmp loc_23266
| long long mysql_stmt_bind_result(long long a1, long long a2)
{
unsigned int v2; // r14d
char *v4; // rax
char *v5; // rdi
long long v6; // r12
unsigned long long v7; // r13
unsigned __int8 ( *v8)(_QWORD); // rax
long long v9; // rax
unsigned int v10; // eax
long long v11; // rax
long long v12; // rdi
char *v13; // rsi
long long v15; // rdi
char *v16; // rsi
if ( !*(_DWORD *)(a1 + 80) )
{
*(_DWORD *)(a1 + 264) = 2030;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
v2 = 0;
*(_BYTE *)(a1 + 786) = 0;
v12 = a1 + 268;
v13 = client_errors[30];
LABEL_23:
strncpy(v12, v13, 512LL);
*(_BYTE *)(a1 + 779) = 0;
LOBYTE(v2) = 1;
return v2;
}
v4 = (char *)*(unsigned int *)(a1 + 96);
if ( !*(_DWORD *)(a1 + 96) )
{
*(_DWORD *)(a1 + 264) = 2052;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
v2 = 0;
*(_BYTE *)(a1 + 786) = 0;
v12 = a1 + 268;
v13 = client_errors[52];
goto LABEL_23;
}
LOBYTE(v2) = 1;
if ( a2 )
{
v5 = *(char **)(a1 + 120);
if ( !v5 )
{
v4 = ma_alloc_root(*(_QWORD *)(a1 + 832), 112LL * (_QWORD)v4);
*(_QWORD *)(a1 + 120) = v4;
if ( !v4 )
{
*(_DWORD *)(a1 + 264) = 2008;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
v15 = a1 + 268;
v16 = client_errors[8];
LABEL_27:
strncpy(v15, v16, 512LL);
*(_BYTE *)(a1 + 779) = 0;
return v2;
}
v5 = v4;
LODWORD(v4) = *(_DWORD *)(a1 + 96);
}
memcpy(v5, a2, 112LL * (unsigned int)v4);
if ( *(_DWORD *)(a1 + 96) )
{
v6 = 80LL;
v7 = 0LL;
while ( 1 )
{
v8 = *(unsigned __int8 ( **)(_QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 56LL);
if ( v8 )
{
if ( !v8(*(unsigned int *)(a2 + v6 + 16)) )
break;
}
v9 = *(_QWORD *)(a1 + 120);
if ( !*(_QWORD *)(v9 + v6 - 72) )
{
*(_QWORD *)(v6 + v9 - 72) = v6 + v9 + 23;
v9 = *(_QWORD *)(a1 + 120);
}
if ( !*(_QWORD *)(v9 + v6 - 80) )
{
*(_QWORD *)(v9 + v6 - 80) = v9 + v6;
v9 = *(_QWORD *)(a1 + 120);
}
if ( !*(_QWORD *)(v9 + v6 - 56) )
*(_QWORD *)(v6 + v9 - 56) = v6 + v9 + 20;
v10 = *(_DWORD *)(a2 + v6 + 16) - 1;
if ( v10 <= 0xC )
{
v11 = qword_3BFD8[v10];
*(_QWORD *)(*(_QWORD *)(a1 + 120) + v6) = v11;
**(_QWORD **)(*(_QWORD *)(a1 + 120) + v6 - 80) = v11;
}
++v7;
v6 += 112LL;
if ( v7 >= *(unsigned int *)(a1 + 96) )
goto LABEL_20;
}
*(_DWORD *)(a1 + 264) = 2036;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
v15 = a1 + 268;
v16 = client_errors[36];
goto LABEL_27;
}
LABEL_20:
*(_BYTE *)(a1 + 232) = 1;
*(_DWORD *)(a1 + 264) = 0;
strcpy((char *)(a1 + 781), "00000");
*(_BYTE *)(a1 + 268) = 0;
return 0;
}
return v2;
}
| mysql_stmt_bind_result:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
CMP dword ptr [RDI + 0x50],0x0
JZ 0x001231c8
MOV EAX,dword ptr [RBX + 0x60]
TEST RAX,RAX
JZ 0x0012320e
MOV R15,RSI
MOV R14B,0x1
TEST RSI,RSI
JZ 0x00123266
MOV RDI,qword ptr [RBX + 0x78]
TEST RDI,RDI
JNZ 0x001230ce
MOV RDI,qword ptr [RBX + 0x340]
IMUL RSI,RAX,0x70
CALL 0x00120a6f
MOV qword ptr [RBX + 0x78],RAX
TEST RAX,RAX
JZ 0x001232be
MOV RDI,RAX
MOV EAX,dword ptr [RBX + 0x60]
LAB_001230ce:
MOV EAX,EAX
IMUL RDX,RAX,0x70
MOV RSI,R15
CALL 0x00113390
CMP dword ptr [RBX + 0x60],0x0
JZ 0x00123195
MOV R12D,0x50
XOR R13D,R13D
LAB_001230ef:
MOV RAX,qword ptr [RBX + 0x38]
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RAX,qword ptr [RAX + 0x38]
TEST RAX,RAX
JZ 0x00123112
MOV EDI,dword ptr [R15 + R12*0x1 + 0x10]
CALL RAX
TEST AL,AL
JZ 0x00123278
LAB_00123112:
MOV RAX,qword ptr [RBX + 0x78]
CMP qword ptr [RAX + R12*0x1 + -0x48],0x0
JNZ 0x0012312d
ADD RAX,R12
ADD RAX,0x17
MOV qword ptr [RAX + -0x5f],RAX
MOV RAX,qword ptr [RBX + 0x78]
LAB_0012312d:
CMP qword ptr [RAX + R12*0x1 + -0x50],0x0
JNZ 0x00123142
LEA RCX,[RAX + R12*0x1]
MOV qword ptr [RAX + R12*0x1 + -0x50],RCX
MOV RAX,qword ptr [RBX + 0x78]
LAB_00123142:
CMP qword ptr [RAX + R12*0x1 + -0x38],0x0
JNZ 0x00123155
ADD RAX,R12
ADD RAX,0x14
MOV qword ptr [RAX + -0x4c],RAX
LAB_00123155:
MOV EAX,dword ptr [R15 + R12*0x1 + 0x10]
DEC EAX
CMP EAX,0xc
JA 0x00123182
MOV EAX,EAX
LEA RCX,[0x13bfd8]
MOV RAX,qword ptr [RCX + RAX*0x8]
MOV RCX,qword ptr [RBX + 0x78]
MOV qword ptr [RCX + R12*0x1],RAX
MOV RCX,qword ptr [RBX + 0x78]
MOV RCX,qword ptr [RCX + R12*0x1 + -0x50]
MOV qword ptr [RCX],RAX
LAB_00123182:
INC R13
MOV EAX,dword ptr [RBX + 0x60]
ADD R12,0x70
CMP R13,RAX
JC 0x001230ef
LAB_00123195:
MOV byte ptr [RBX + 0xe8],0x1
MOV dword ptr [RBX + 0x108],0x0
MOV dword ptr [RBX + 0x30d],0x30303030
MOV word ptr [RBX + 0x311],0x30
MOV byte ptr [RBX + 0x10c],0x0
XOR R14D,R14D
JMP 0x00123266
LAB_001231c8:
MOV dword ptr [RBX + 0x108],0x7ee
LEA RDI,[RBX + 0x30d]
LEA RAX,[0x14dd80]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
XOR R14D,R14D
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
LEA RAX,[0x14dd90]
MOV RSI,qword ptr [RAX + 0xf0]
JMP 0x00123252
LAB_0012320e:
MOV dword ptr [RBX + 0x108],0x804
LEA RDI,[RBX + 0x30d]
LEA RAX,[0x14dd80]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
XOR R14D,R14D
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
LEA RAX,[0x14dd90]
MOV RSI,qword ptr [RAX + 0x1a0]
LAB_00123252:
MOV EDX,0x200
CALL 0x00113220
MOV byte ptr [RBX + 0x30b],R14B
MOV R14B,0x1
LAB_00123266:
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00123278:
MOV dword ptr [RBX + 0x108],0x7f4
LEA RDI,[RBX + 0x30d]
LEA RAX,[0x14dd80]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
XOR R15D,R15D
MOV byte ptr [RBX + 0x312],R15B
LEA RDI,[RBX + 0x10c]
LEA RAX,[0x14dd90]
MOV RSI,qword ptr [RAX + 0x120]
JMP 0x001232ff
LAB_001232be:
MOV dword ptr [RBX + 0x108],0x7d8
LEA RDI,[RBX + 0x30d]
LEA RAX,[0x14dd80]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
XOR R15D,R15D
MOV byte ptr [RBX + 0x312],R15B
LEA RDI,[RBX + 0x10c]
LEA RAX,[0x14dd90]
MOV RSI,qword ptr [RAX + 0x40]
LAB_001232ff:
MOV EDX,0x200
CALL 0x00113220
MOV byte ptr [RBX + 0x30b],R15B
JMP 0x00123266
|
ulong mysql_stmt_bind_result(long param_1,void *param_2)
{
code *pcVar1;
int8 uVar2;
char cVar3;
uint uVar4;
void *__dest;
long lVar5;
char *pcVar6;
long lVar7;
ulong uVar8;
int8 unaff_R14;
ulong uVar9;
if (*(int *)(param_1 + 0x50) == 0) {
*(int4 *)(param_1 + 0x108) = 0x7ee;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
pcVar6 = PTR_s_Statement_is_not_prepared_0014de80;
}
else {
uVar8 = (ulong)*(uint *)(param_1 + 0x60);
if (uVar8 != 0) {
uVar9 = CONCAT71((int7)((ulong)unaff_R14 >> 8),1);
if (param_2 != (void *)0x0) {
__dest = *(void **)(param_1 + 0x78);
if (__dest == (void *)0x0) {
__dest = (void *)ma_alloc_root(*(int8 *)(param_1 + 0x340),uVar8 * 0x70);
*(void **)(param_1 + 0x78) = __dest;
if (__dest == (void *)0x0) {
*(int4 *)(param_1 + 0x108) = 0x7d8;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
pcVar6 = PTR_s_Client_run_out_of_memory_0014ddd0;
LAB_001232ff:
strncpy((char *)(param_1 + 0x10c),pcVar6,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
goto LAB_00123266;
}
uVar8 = (ulong)*(uint *)(param_1 + 0x60);
}
memcpy(__dest,param_2,uVar8 * 0x70);
if (*(int *)(param_1 + 0x60) != 0) {
lVar7 = 0x50;
uVar8 = 0;
do {
pcVar1 = *(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x38);
if (pcVar1 != (code *)0x0) {
cVar3 = (*pcVar1)(*(int4 *)((long)param_2 + lVar7 + 0x10));
if (cVar3 == '\0') {
*(int4 *)(param_1 + 0x108) = 0x7f4;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
pcVar6 = PTR_s_Buffer_type_is_not_supported_0014deb0;
goto LAB_001232ff;
}
}
lVar5 = *(long *)(param_1 + 0x78);
if (*(long *)(lVar5 + -0x48 + lVar7) == 0) {
*(long *)(lVar5 + lVar7 + -0x48) = lVar5 + lVar7 + 0x17;
lVar5 = *(long *)(param_1 + 0x78);
}
if (*(long *)(lVar5 + -0x50 + lVar7) == 0) {
*(long *)(lVar5 + -0x50 + lVar7) = lVar5 + lVar7;
lVar5 = *(long *)(param_1 + 0x78);
}
if (*(long *)(lVar5 + -0x38 + lVar7) == 0) {
*(long *)(lVar5 + lVar7 + -0x38) = lVar5 + lVar7 + 0x14;
}
uVar4 = *(int *)((long)param_2 + lVar7 + 0x10) - 1;
if (uVar4 < 0xd) {
uVar2 = *(int8 *)(&DAT_0013bfd8 + (ulong)uVar4 * 8);
*(int8 *)(*(long *)(param_1 + 0x78) + lVar7) = uVar2;
**(int8 **)(*(long *)(param_1 + 0x78) + -0x50 + lVar7) = uVar2;
}
uVar8 = uVar8 + 1;
lVar7 = lVar7 + 0x70;
} while (uVar8 < *(uint *)(param_1 + 0x60));
}
*(int1 *)(param_1 + 0xe8) = 1;
*(int4 *)(param_1 + 0x108) = 0;
*(int4 *)(param_1 + 0x30d) = 0x30303030;
*(int2 *)(param_1 + 0x311) = 0x30;
*(int1 *)(param_1 + 0x10c) = 0;
uVar9 = 0;
}
goto LAB_00123266;
}
*(int4 *)(param_1 + 0x108) = 0x804;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
pcVar6 = PTR_s_Prepared_statement_contains_no_m_0014df30;
}
strncpy((char *)(param_1 + 0x10c),pcVar6,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
uVar9 = 1;
LAB_00123266:
return uVar9 & 0xffffffff;
}
|
|
6,506 | ModbusServerResourcePrivate::ModbusServerResourcePrivate(ModbusPort*, ModbusInterface*) | serhmarch[P]ModbusBridge/modbus/src/ModbusServerResource_p.h | ModbusServerResourcePrivate(ModbusPort *port, ModbusInterface *device) :
ModbusServerPortPrivate(device)
{
this->port = port;
setPortError(port->lastErrorStatus());
port->setServerMode(true);
} | O3 | c | ModbusServerResourcePrivate::ModbusServerResourcePrivate(ModbusPort*, ModbusInterface*):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movb %al, 0x18(%rdi)
leaq 0x58(%rdi), %rcx
movq %rcx, 0x28(%rdi)
movq $0x1, 0x30(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rdi)
movl $0x3f800000, 0x48(%rdi) # imm = 0x3F800000
movups %xmm0, 0x50(%rdi)
leaq 0x88(%rdi), %rcx
movq %rcx, 0x78(%rdi)
movq %rax, 0x80(%rdi)
movb %al, 0x88(%rdi)
movq %rdx, 0x60(%rdi)
movl %eax, 0x68(%rdi)
movb %al, 0x6c(%rdi)
movl %eax, 0x98(%rdi)
movq %rax, 0xa0(%rdi)
movb $0x1, 0xa8(%rdi)
movq %rax, 0xb0(%rdi)
leaq 0x12ac5(%rip), %rax # 0x218c8
movq %rax, (%rdi)
movq %rsi, 0xb8(%rdi)
movq %rsi, %rdi
callq 0x91d0
movl %eax, 0x70(%rbx)
movb $0x1, 0x1c9(%rbx)
movq (%r14), %rax
movq %r14, %rdi
movl $0x1, %esi
callq *0x40(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0xef0c
movq %r14, %rdi
callq 0x5550
| _ZN27ModbusServerResourcePrivateC2EP10ModbusPortP15ModbusInterface:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
lea rax, [rdi+18h]
mov [rdi+8], rax
xor eax, eax
mov [rdi+10h], rax
mov [rdi+18h], al
lea rcx, [rdi+58h]
mov [rdi+28h], rcx
mov qword ptr [rdi+30h], 1
xorps xmm0, xmm0
movups xmmword ptr [rdi+38h], xmm0
mov dword ptr [rdi+48h], 3F800000h
movups xmmword ptr [rdi+50h], xmm0
lea rcx, [rdi+88h]
mov [rdi+78h], rcx
mov [rdi+80h], rax
mov [rdi+88h], al
mov [rdi+60h], rdx
mov [rdi+68h], eax
mov [rdi+6Ch], al
mov [rdi+98h], eax
mov [rdi+0A0h], rax
mov byte ptr [rdi+0A8h], 1
mov [rdi+0B0h], rax
lea rax, off_218C8
mov [rdi], rax
mov [rdi+0B8h], rsi
mov rdi, rsi; this
call _ZNK10ModbusPort15lastErrorStatusEv; ModbusPort::lastErrorStatus(void)
mov [rbx+70h], eax
mov byte ptr [rbx+1C9h], 1
mov rax, [r14]
mov rdi, r14
mov esi, 1
call qword ptr [rax+40h]
add rsp, 8
pop rbx
pop r14
retn
mov r14, rax
mov rdi, rbx; this
call _ZN23ModbusServerPortPrivateD2Ev; ModbusServerPortPrivate::~ModbusServerPortPrivate()
mov rdi, r14
call __Unwind_Resume
| void ModbusServerResourcePrivate::ModbusServerResourcePrivate(
ModbusServerResourcePrivate *this,
ModbusPort *a2,
ModbusInterface *a3)
{
*((_QWORD *)this + 1) = (char *)this + 24;
*((_QWORD *)this + 2) = 0LL;
*((_BYTE *)this + 24) = 0;
*((_QWORD *)this + 5) = (char *)this + 88;
*((_QWORD *)this + 6) = 1LL;
*(_OWORD *)((char *)this + 56) = 0LL;
*((_DWORD *)this + 18) = 1065353216;
*((_OWORD *)this + 5) = 0LL;
*((_QWORD *)this + 15) = (char *)this + 136;
*((_QWORD *)this + 16) = 0LL;
*((_BYTE *)this + 136) = 0;
*((_QWORD *)this + 12) = a3;
*((_DWORD *)this + 26) = 0;
*((_BYTE *)this + 108) = 0;
*((_DWORD *)this + 38) = 0;
*((_QWORD *)this + 20) = 0LL;
*((_BYTE *)this + 168) = 1;
*((_QWORD *)this + 22) = 0LL;
*(_QWORD *)this = off_218C8;
*((_QWORD *)this + 23) = a2;
*((_DWORD *)this + 28) = ModbusPort::lastErrorStatus(a2);
*((_BYTE *)this + 457) = 1;
(*(void ( **)(ModbusPort *, long long))(*(_QWORD *)a2 + 64LL))(a2, 1LL);
}
| ModbusServerResourcePrivate:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[RDI + 0x18]
MOV qword ptr [RDI + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],RAX
MOV byte ptr [RDI + 0x18],AL
LEA RCX,[RDI + 0x58]
MOV qword ptr [RDI + 0x28],RCX
MOV qword ptr [RDI + 0x30],0x1
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x38],XMM0
MOV dword ptr [RDI + 0x48],0x3f800000
MOVUPS xmmword ptr [RDI + 0x50],XMM0
LEA RCX,[RDI + 0x88]
MOV qword ptr [RDI + 0x78],RCX
MOV qword ptr [RDI + 0x80],RAX
MOV byte ptr [RDI + 0x88],AL
MOV qword ptr [RDI + 0x60],RDX
MOV dword ptr [RDI + 0x68],EAX
MOV byte ptr [RDI + 0x6c],AL
MOV dword ptr [RDI + 0x98],EAX
MOV qword ptr [RDI + 0xa0],RAX
MOV byte ptr [RDI + 0xa8],0x1
MOV qword ptr [RDI + 0xb0],RAX
LEA RAX,[0x1218c8]
MOV qword ptr [RDI],RAX
MOV qword ptr [RDI + 0xb8],RSI
LAB_0010ee0d:
MOV RDI,RSI
CALL 0x001091d0
MOV dword ptr [RBX + 0x70],EAX
MOV byte ptr [RBX + 0x1c9],0x1
MOV RAX,qword ptr [R14]
MOV RDI,R14
MOV ESI,0x1
CALL qword ptr [RAX + 0x40]
LAB_0010ee2d:
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* ModbusServerResourcePrivate::ModbusServerResourcePrivate(ModbusPort*, ModbusInterface*) */
void __thiscall
ModbusServerResourcePrivate::ModbusServerResourcePrivate
(ModbusServerResourcePrivate *this,ModbusPort *param_1,ModbusInterface *param_2)
{
int4 uVar1;
*(ModbusServerResourcePrivate **)(this + 8) = this + 0x18;
*(int8 *)(this + 0x10) = 0;
this[0x18] = (ModbusServerResourcePrivate)0x0;
*(ModbusServerResourcePrivate **)(this + 0x28) = this + 0x58;
*(int8 *)(this + 0x30) = 1;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int4 *)(this + 0x48) = 0x3f800000;
*(int8 *)(this + 0x50) = 0;
*(int8 *)(this + 0x58) = 0;
*(ModbusServerResourcePrivate **)(this + 0x78) = this + 0x88;
*(int8 *)(this + 0x80) = 0;
this[0x88] = (ModbusServerResourcePrivate)0x0;
*(ModbusInterface **)(this + 0x60) = param_2;
*(int4 *)(this + 0x68) = 0;
this[0x6c] = (ModbusServerResourcePrivate)0x0;
*(int4 *)(this + 0x98) = 0;
*(int8 *)(this + 0xa0) = 0;
this[0xa8] = (ModbusServerResourcePrivate)0x1;
*(int8 *)(this + 0xb0) = 0;
*(int ***)this = &PTR__ModbusServerResourcePrivate_001218c8;
*(ModbusPort **)(this + 0xb8) = param_1;
/* try { // try from 0010ee0d to 0010ee2c has its CatchHandler @ 0010ee35 */
uVar1 = ModbusPort::lastErrorStatus(param_1);
*(int4 *)(this + 0x70) = uVar1;
this[0x1c9] = (ModbusServerResourcePrivate)0x1;
(**(code **)(*(long *)param_1 + 0x40))(param_1,1);
return;
}
|
|
6,507 | VK_LAYER_PYROVEIL_vkNegotiateLoaderLayerInterfaceVersion | HansKristian-Work[P]pyroveil/layer/pyroveil.cpp | VKAPI_ATTR VkResult VKAPI_CALL
VK_LAYER_PYROVEIL_vkNegotiateLoaderLayerInterfaceVersion(VkNegotiateLayerInterface *pVersionStruct)
{
if (pVersionStruct->sType != LAYER_NEGOTIATE_INTERFACE_STRUCT || pVersionStruct->loaderLayerInterfaceVersion < 2)
return VK_ERROR_INITIALIZATION_FAILED;
if (pVersionStruct->loaderLayerInterfaceVersion > CURRENT_LOADER_LAYER_INTERFACE_VERSION)
pVersionStruct->loaderLayerInterfaceVersion = CURRENT_LOADER_LAYER_INTERFACE_VERSION;
if (pVersionStruct->loaderLayerInterfaceVersion >= 2)
{
pVersionStruct->pfnGetInstanceProcAddr = VK_LAYER_PYROVEIL_vkGetInstanceProcAddr;
pVersionStruct->pfnGetDeviceProcAddr = VK_LAYER_PYROVEIL_vkGetDeviceProcAddr;
pVersionStruct->pfnGetPhysicalDeviceProcAddr = nullptr;
}
return VK_SUCCESS;
} | O0 | cpp | VK_LAYER_PYROVEIL_vkNegotiateLoaderLayerInterfaceVersion:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x18688b
movq -0x10(%rbp), %rax
cmpl $0x2, 0x10(%rax)
jae 0x186894
movl $0xfffffffd, -0x4(%rbp) # imm = 0xFFFFFFFD
jmp 0x1868e4
movq -0x10(%rbp), %rax
cmpl $0x2, 0x10(%rax)
jbe 0x1868a9
movq -0x10(%rbp), %rax
movl $0x2, 0x10(%rax)
movq -0x10(%rbp), %rax
cmpl $0x2, 0x10(%rax)
jb 0x1868dd
movq -0x10(%rbp), %rax
leaq 0x32(%rip), %rcx # 0x1868f0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x123(%rip), %rcx # 0x1869f0
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x28(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
| VK_LAYER_PYROVEIL_vkNegotiateLoaderLayerInterfaceVersion:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
cmp dword ptr [rax], 1
jnz short loc_18688B
mov rax, [rbp+var_10]
cmp dword ptr [rax+10h], 2
jnb short loc_186894
loc_18688B:
mov [rbp+var_4], 0FFFFFFFDh
jmp short loc_1868E4
loc_186894:
mov rax, [rbp+var_10]
cmp dword ptr [rax+10h], 2
jbe short loc_1868A9
mov rax, [rbp+var_10]
mov dword ptr [rax+10h], 2
loc_1868A9:
mov rax, [rbp+var_10]
cmp dword ptr [rax+10h], 2
jb short loc_1868DD
mov rax, [rbp+var_10]
lea rcx, _ZL39VK_LAYER_PYROVEIL_vkGetInstanceProcAddrP12VkInstance_TPKc; VK_LAYER_PYROVEIL_vkGetInstanceProcAddr(VkInstance_T *,char const*)
mov [rax+18h], rcx
mov rax, [rbp+var_10]
lea rcx, _ZL37VK_LAYER_PYROVEIL_vkGetDeviceProcAddrP10VkDevice_TPKc; VK_LAYER_PYROVEIL_vkGetDeviceProcAddr(VkDevice_T *,char const*)
mov [rax+20h], rcx
mov rax, [rbp+var_10]
mov qword ptr [rax+28h], 0
loc_1868DD:
mov [rbp+var_4], 0
loc_1868E4:
mov eax, [rbp+var_4]
pop rbp
retn
| long long VK_LAYER_PYROVEIL_vkNegotiateLoaderLayerInterfaceVersion(long long a1)
{
if ( *(_DWORD *)a1 == 1 && *(_DWORD *)(a1 + 16) >= 2u )
{
if ( *(_DWORD *)(a1 + 16) > 2u )
*(_DWORD *)(a1 + 16) = 2;
if ( *(_DWORD *)(a1 + 16) >= 2u )
{
*(_QWORD *)(a1 + 24) = VK_LAYER_PYROVEIL_vkGetInstanceProcAddr;
*(_QWORD *)(a1 + 32) = VK_LAYER_PYROVEIL_vkGetDeviceProcAddr;
*(_QWORD *)(a1 + 40) = 0LL;
}
return 0;
}
else
{
return (unsigned int)-3;
}
}
| |||
6,508 | VK_LAYER_PYROVEIL_vkNegotiateLoaderLayerInterfaceVersion | HansKristian-Work[P]pyroveil/layer/pyroveil.cpp | VKAPI_ATTR VkResult VKAPI_CALL
VK_LAYER_PYROVEIL_vkNegotiateLoaderLayerInterfaceVersion(VkNegotiateLayerInterface *pVersionStruct)
{
if (pVersionStruct->sType != LAYER_NEGOTIATE_INTERFACE_STRUCT || pVersionStruct->loaderLayerInterfaceVersion < 2)
return VK_ERROR_INITIALIZATION_FAILED;
if (pVersionStruct->loaderLayerInterfaceVersion > CURRENT_LOADER_LAYER_INTERFACE_VERSION)
pVersionStruct->loaderLayerInterfaceVersion = CURRENT_LOADER_LAYER_INTERFACE_VERSION;
if (pVersionStruct->loaderLayerInterfaceVersion >= 2)
{
pVersionStruct->pfnGetInstanceProcAddr = VK_LAYER_PYROVEIL_vkGetInstanceProcAddr;
pVersionStruct->pfnGetDeviceProcAddr = VK_LAYER_PYROVEIL_vkGetDeviceProcAddr;
pVersionStruct->pfnGetPhysicalDeviceProcAddr = nullptr;
}
return VK_SUCCESS;
} | O1 | cpp | VK_LAYER_PYROVEIL_vkNegotiateLoaderLayerInterfaceVersion:
pushq %rbp
movq %rsp, %rbp
movl $0xfffffffd, %eax # imm = 0xFFFFFFFD
cmpl $0x1, (%rdi)
jne 0x8a404
cmpl $0x2, 0x10(%rdi)
jb 0x8a404
je 0x8a3de
movl $0x2, 0x10(%rdi)
xorl %eax, %eax
cmpl $0x2, 0x10(%rdi)
jb 0x8a404
leaq 0x19(%rip), %rcx # 0x8a406
movq %rcx, 0x18(%rdi)
leaq 0x183(%rip), %rcx # 0x8a57b
movq %rcx, 0x20(%rdi)
movq $0x0, 0x28(%rdi)
popq %rbp
retq
| VK_LAYER_PYROVEIL_vkNegotiateLoaderLayerInterfaceVersion:
push rbp
mov rbp, rsp
mov eax, 0FFFFFFFDh
cmp dword ptr [rdi], 1
jnz short loc_8A404
cmp dword ptr [rdi+10h], 2
jb short loc_8A404
jz short loc_8A3DE
mov dword ptr [rdi+10h], 2
loc_8A3DE:
xor eax, eax
cmp dword ptr [rdi+10h], 2
jb short loc_8A404
lea rcx, _ZL39VK_LAYER_PYROVEIL_vkGetInstanceProcAddrP12VkInstance_TPKc; VK_LAYER_PYROVEIL_vkGetInstanceProcAddr(VkInstance_T *,char const*)
mov [rdi+18h], rcx
lea rcx, _ZL37VK_LAYER_PYROVEIL_vkGetDeviceProcAddrP10VkDevice_TPKc; VK_LAYER_PYROVEIL_vkGetDeviceProcAddr(VkDevice_T *,char const*)
mov [rdi+20h], rcx
mov qword ptr [rdi+28h], 0
loc_8A404:
pop rbp
retn
| long long VK_LAYER_PYROVEIL_vkNegotiateLoaderLayerInterfaceVersion(long long a1)
{
long long result; // rax
result = 4294967293LL;
if ( *(_DWORD *)a1 == 1 && *(_DWORD *)(a1 + 16) >= 2u )
{
if ( *(_DWORD *)(a1 + 16) != 2 )
*(_DWORD *)(a1 + 16) = 2;
result = 0LL;
if ( *(_DWORD *)(a1 + 16) >= 2u )
{
*(_QWORD *)(a1 + 24) = VK_LAYER_PYROVEIL_vkGetInstanceProcAddr;
*(_QWORD *)(a1 + 32) = VK_LAYER_PYROVEIL_vkGetDeviceProcAddr;
*(_QWORD *)(a1 + 40) = 0LL;
}
}
return result;
}
| VK_LAYER_PYROVEIL_vkNegotiateLoaderLayerInterfaceVersion:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xfffffffd
CMP dword ptr [RDI],0x1
JNZ 0x0018a404
CMP dword ptr [RDI + 0x10],0x2
JC 0x0018a404
JZ 0x0018a3de
MOV dword ptr [RDI + 0x10],0x2
LAB_0018a3de:
XOR EAX,EAX
CMP dword ptr [RDI + 0x10],0x2
JC 0x0018a404
LEA RCX,[0x18a406]
MOV qword ptr [RDI + 0x18],RCX
LEA RCX,[0x18a57b]
MOV qword ptr [RDI + 0x20],RCX
MOV qword ptr [RDI + 0x28],0x0
LAB_0018a404:
POP RBP
RET
|
int8 VK_LAYER_PYROVEIL_vkNegotiateLoaderLayerInterfaceVersion(int *param_1)
{
int8 uVar1;
uVar1 = 0xfffffffd;
if ((*param_1 == 1) && (1 < (uint)param_1[4])) {
if (param_1[4] != 2) {
param_1[4] = 2;
}
uVar1 = 0;
if (1 < (uint)param_1[4]) {
*(code **)(param_1 + 6) = VK_LAYER_PYROVEIL_vkGetInstanceProcAddr;
*(code **)(param_1 + 8) = VK_LAYER_PYROVEIL_vkGetDeviceProcAddr;
param_1[10] = 0;
param_1[0xb] = 0;
}
}
return uVar1;
}
|
|
6,509 | VK_LAYER_PYROVEIL_vkNegotiateLoaderLayerInterfaceVersion | HansKristian-Work[P]pyroveil/layer/pyroveil.cpp | VKAPI_ATTR VkResult VKAPI_CALL
VK_LAYER_PYROVEIL_vkNegotiateLoaderLayerInterfaceVersion(VkNegotiateLayerInterface *pVersionStruct)
{
if (pVersionStruct->sType != LAYER_NEGOTIATE_INTERFACE_STRUCT || pVersionStruct->loaderLayerInterfaceVersion < 2)
return VK_ERROR_INITIALIZATION_FAILED;
if (pVersionStruct->loaderLayerInterfaceVersion > CURRENT_LOADER_LAYER_INTERFACE_VERSION)
pVersionStruct->loaderLayerInterfaceVersion = CURRENT_LOADER_LAYER_INTERFACE_VERSION;
if (pVersionStruct->loaderLayerInterfaceVersion >= 2)
{
pVersionStruct->pfnGetInstanceProcAddr = VK_LAYER_PYROVEIL_vkGetInstanceProcAddr;
pVersionStruct->pfnGetDeviceProcAddr = VK_LAYER_PYROVEIL_vkGetDeviceProcAddr;
pVersionStruct->pfnGetPhysicalDeviceProcAddr = nullptr;
}
return VK_SUCCESS;
} | O2 | cpp | VK_LAYER_PYROVEIL_vkNegotiateLoaderLayerInterfaceVersion:
pushq %rbp
movq %rsp, %rbp
movl $0xfffffffd, %eax # imm = 0xFFFFFFFD
cmpl $0x1, (%rdi)
jne 0xaabc1
cmpl $0x2, 0x10(%rdi)
jb 0xaabc1
je 0xaaba4
movl $0x2, 0x10(%rdi)
leaq 0x18(%rip), %rax # 0xaabc3
movq %rax, 0x18(%rdi)
leaq 0xd5(%rip), %rax # 0xaac8b
movq %rax, 0x20(%rdi)
andq $0x0, 0x28(%rdi)
xorl %eax, %eax
popq %rbp
retq
| VK_LAYER_PYROVEIL_vkNegotiateLoaderLayerInterfaceVersion:
push rbp
mov rbp, rsp
mov eax, 0FFFFFFFDh
cmp dword ptr [rdi], 1
jnz short loc_AABC1
cmp dword ptr [rdi+10h], 2
jb short loc_AABC1
jz short loc_AABA4
mov dword ptr [rdi+10h], 2
loc_AABA4:
lea rax, _ZL39VK_LAYER_PYROVEIL_vkGetInstanceProcAddrP12VkInstance_TPKc; VK_LAYER_PYROVEIL_vkGetInstanceProcAddr(VkInstance_T *,char const*)
mov [rdi+18h], rax
lea rax, _ZL37VK_LAYER_PYROVEIL_vkGetDeviceProcAddrP10VkDevice_TPKc; VK_LAYER_PYROVEIL_vkGetDeviceProcAddr(VkDevice_T *,char const*)
mov [rdi+20h], rax
and qword ptr [rdi+28h], 0
xor eax, eax
loc_AABC1:
pop rbp
retn
| long long VK_LAYER_PYROVEIL_vkNegotiateLoaderLayerInterfaceVersion(long long a1)
{
long long result; // rax
result = 4294967293LL;
if ( *(_DWORD *)a1 == 1 && *(_DWORD *)(a1 + 16) >= 2u )
{
if ( *(_DWORD *)(a1 + 16) != 2 )
*(_DWORD *)(a1 + 16) = 2;
*(_QWORD *)(a1 + 24) = &VK_LAYER_PYROVEIL_vkGetInstanceProcAddr;
*(_QWORD *)(a1 + 32) = &VK_LAYER_PYROVEIL_vkGetDeviceProcAddr;
*(_QWORD *)(a1 + 40) = 0LL;
return 0LL;
}
return result;
}
| VK_LAYER_PYROVEIL_vkNegotiateLoaderLayerInterfaceVersion:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xfffffffd
CMP dword ptr [RDI],0x1
JNZ 0x001aabc1
CMP dword ptr [RDI + 0x10],0x2
JC 0x001aabc1
JZ 0x001aaba4
MOV dword ptr [RDI + 0x10],0x2
LAB_001aaba4:
LEA RAX,[0x1aabc3]
MOV qword ptr [RDI + 0x18],RAX
LEA RAX,[0x1aac8b]
MOV qword ptr [RDI + 0x20],RAX
AND qword ptr [RDI + 0x28],0x0
XOR EAX,EAX
LAB_001aabc1:
POP RBP
RET
|
int8 VK_LAYER_PYROVEIL_vkNegotiateLoaderLayerInterfaceVersion(int *param_1)
{
int8 uVar1;
uVar1 = 0xfffffffd;
if ((*param_1 == 1) && (1 < (uint)param_1[4])) {
if (param_1[4] != 2) {
param_1[4] = 2;
}
*(code **)(param_1 + 6) = VK_LAYER_PYROVEIL_vkGetInstanceProcAddr;
*(code **)(param_1 + 8) = VK_LAYER_PYROVEIL_vkGetDeviceProcAddr;
param_1[10] = 0;
param_1[0xb] = 0;
uVar1 = 0;
}
return uVar1;
}
|
|
6,510 | VK_LAYER_PYROVEIL_vkNegotiateLoaderLayerInterfaceVersion | HansKristian-Work[P]pyroveil/layer/pyroveil.cpp | VKAPI_ATTR VkResult VKAPI_CALL
VK_LAYER_PYROVEIL_vkNegotiateLoaderLayerInterfaceVersion(VkNegotiateLayerInterface *pVersionStruct)
{
if (pVersionStruct->sType != LAYER_NEGOTIATE_INTERFACE_STRUCT || pVersionStruct->loaderLayerInterfaceVersion < 2)
return VK_ERROR_INITIALIZATION_FAILED;
if (pVersionStruct->loaderLayerInterfaceVersion > CURRENT_LOADER_LAYER_INTERFACE_VERSION)
pVersionStruct->loaderLayerInterfaceVersion = CURRENT_LOADER_LAYER_INTERFACE_VERSION;
if (pVersionStruct->loaderLayerInterfaceVersion >= 2)
{
pVersionStruct->pfnGetInstanceProcAddr = VK_LAYER_PYROVEIL_vkGetInstanceProcAddr;
pVersionStruct->pfnGetDeviceProcAddr = VK_LAYER_PYROVEIL_vkGetDeviceProcAddr;
pVersionStruct->pfnGetPhysicalDeviceProcAddr = nullptr;
}
return VK_SUCCESS;
} | O3 | cpp | VK_LAYER_PYROVEIL_vkNegotiateLoaderLayerInterfaceVersion:
pushq %rbp
movq %rsp, %rbp
movl $0xfffffffd, %eax # imm = 0xFFFFFFFD
cmpl $0x1, (%rdi)
jne 0x897dc
cmpl $0x2, 0x10(%rdi)
jb 0x897dc
je 0x897bc
movl $0x2, 0x10(%rdi)
leaq 0x1b(%rip), %rax # 0x897de
movq %rax, 0x18(%rdi)
leaq 0x13c(%rip), %rax # 0x8990a
movq %rax, 0x20(%rdi)
movq $0x0, 0x28(%rdi)
xorl %eax, %eax
popq %rbp
retq
| VK_LAYER_PYROVEIL_vkNegotiateLoaderLayerInterfaceVersion:
push rbp
mov rbp, rsp
mov eax, 0FFFFFFFDh
cmp dword ptr [rdi], 1
jnz short loc_897DC
cmp dword ptr [rdi+10h], 2
jb short loc_897DC
jz short loc_897BC
mov dword ptr [rdi+10h], 2
loc_897BC:
lea rax, _ZL39VK_LAYER_PYROVEIL_vkGetInstanceProcAddrP12VkInstance_TPKc; VK_LAYER_PYROVEIL_vkGetInstanceProcAddr(VkInstance_T *,char const*)
mov [rdi+18h], rax
lea rax, _ZL37VK_LAYER_PYROVEIL_vkGetDeviceProcAddrP10VkDevice_TPKc; VK_LAYER_PYROVEIL_vkGetDeviceProcAddr(VkDevice_T *,char const*)
mov [rdi+20h], rax
mov qword ptr [rdi+28h], 0
xor eax, eax
loc_897DC:
pop rbp
retn
| long long VK_LAYER_PYROVEIL_vkNegotiateLoaderLayerInterfaceVersion(long long a1)
{
long long result; // rax
result = 4294967293LL;
if ( *(_DWORD *)a1 == 1 && *(_DWORD *)(a1 + 16) >= 2u )
{
if ( *(_DWORD *)(a1 + 16) != 2 )
*(_DWORD *)(a1 + 16) = 2;
*(_QWORD *)(a1 + 24) = VK_LAYER_PYROVEIL_vkGetInstanceProcAddr;
*(_QWORD *)(a1 + 32) = VK_LAYER_PYROVEIL_vkGetDeviceProcAddr;
*(_QWORD *)(a1 + 40) = 0LL;
return 0LL;
}
return result;
}
| VK_LAYER_PYROVEIL_vkNegotiateLoaderLayerInterfaceVersion:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xfffffffd
CMP dword ptr [RDI],0x1
JNZ 0x001897dc
CMP dword ptr [RDI + 0x10],0x2
JC 0x001897dc
JZ 0x001897bc
MOV dword ptr [RDI + 0x10],0x2
LAB_001897bc:
LEA RAX,[0x1897de]
MOV qword ptr [RDI + 0x18],RAX
LEA RAX,[0x18990a]
MOV qword ptr [RDI + 0x20],RAX
MOV qword ptr [RDI + 0x28],0x0
XOR EAX,EAX
LAB_001897dc:
POP RBP
RET
|
int8 VK_LAYER_PYROVEIL_vkNegotiateLoaderLayerInterfaceVersion(int *param_1)
{
int8 uVar1;
uVar1 = 0xfffffffd;
if ((*param_1 == 1) && (1 < (uint)param_1[4])) {
if (param_1[4] != 2) {
param_1[4] = 2;
}
*(code **)(param_1 + 6) = VK_LAYER_PYROVEIL_vkGetInstanceProcAddr;
*(code **)(param_1 + 8) = VK_LAYER_PYROVEIL_vkGetDeviceProcAddr;
param_1[10] = 0;
param_1[0xb] = 0;
uVar1 = 0;
}
return uVar1;
}
|
|
6,511 | my_strnxfrm_unicode_full_bin | eloqsql/strings/ctype-utf8.c | size_t
my_strnxfrm_unicode_full_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 (flags & MY_STRXFRM_PAD_WITH_SPACE)
{
for ( ; dst < de && nweights; nweights--)
{
*dst++= 0x00;
if (dst < de)
{
*dst++= 0x00;
if (dst < de)
*dst++= 0x20;
}
}
}
my_strxfrm_desc_and_reverse(dst0, dst, flags, 0);
if (flags & MY_STRXFRM_PAD_TO_MAXLEN)
{
while (dst < de)
{
*dst++= 0x00;
if (dst < de)
{
*dst++= 0x00;
if (dst < de)
*dst++= 0x20;
}
}
}
return dst - dst0;
} | O3 | c | my_strnxfrm_unicode_full_bin:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r12
movq %rsi, %rbx
movl 0x10(%rbp), %r15d
leaq -0x24(%rbp), %rax
movl %ecx, (%rax)
leaq (%rsi,%rdx), %r14
addq %r8, %r9
movq %r14, %rdx
movq %rax, %rcx
callq 0x7025b
leaq (%rbx,%rax), %rcx
testb $0x40, %r15b
jne 0x703a4
movq %rcx, %r12
movq %rbx, %rdi
movq %r12, %rsi
movl %r15d, %edx
xorl %ecx, %ecx
callq 0x5b202
testb %r15b, %r15b
setns %al
cmpq %r14, %r12
setae %cl
orb %al, %cl
jne 0x703f0
leaq 0x1(%r12), %rax
movb $0x0, (%r12)
cmpq %r14, %rax
jae 0x7039a
leaq 0x2(%r12), %rax
movb $0x0, 0x1(%r12)
cmpq %r14, %rax
jae 0x7039a
movb $0x20, 0x2(%r12)
addq $0x3, %r12
movq %r12, %rax
movq %rax, %r12
cmpq %r14, %rax
jb 0x7036e
jmp 0x703f3
cmpq %r12, %rax
jge 0x70347
cmpl $0x0, -0x24(%rbp)
je 0x70347
leaq 0x1(%rcx), %r12
movb $0x0, (%rcx)
cmpq %r14, %r12
jae 0x703d3
leaq 0x2(%rcx), %r12
movb $0x0, 0x1(%rcx)
cmpq %r14, %r12
jae 0x703d3
movb $0x20, 0x2(%rcx)
addq $0x3, %rcx
movq %rcx, %r12
movl -0x24(%rbp), %eax
decl %eax
movl %eax, -0x24(%rbp)
cmpq %r14, %r12
jae 0x7034a
movq %r12, %rcx
testl %eax, %eax
jne 0x703af
jmp 0x7034a
movq %r12, %rax
subq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| my_strnxfrm_unicode_full_bin:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov r12, rdx
mov rbx, rsi
mov r15d, [rbp+arg_0]
lea rax, [rbp+var_24]
mov [rax], ecx
lea r14, [rsi+rdx]
add r9, r8
mov rdx, r14
mov rcx, rax
call my_strnxfrm_unicode_full_bin_internal
lea rcx, [rbx+rax]
test r15b, 40h
jnz short loc_703A4
loc_70347:
mov r12, rcx
loc_7034A:
mov rdi, rbx
mov rsi, r12
mov edx, r15d
xor ecx, ecx
call my_strxfrm_desc_and_reverse
test r15b, r15b
setns al
cmp r12, r14
setnb cl
or cl, al
jnz loc_703F0
loc_7036E:
lea rax, [r12+1]
mov byte ptr [r12], 0
cmp rax, r14
jnb short loc_7039A
lea rax, [r12+2]
mov byte ptr [r12+1], 0
cmp rax, r14
jnb short loc_7039A
mov byte ptr [r12+2], 20h ; ' '
add r12, 3
mov rax, r12
loc_7039A:
mov r12, rax
cmp rax, r14
jb short loc_7036E
jmp short loc_703F3
loc_703A4:
cmp rax, r12
jge short loc_70347
cmp [rbp+var_24], 0
jz short loc_70347
loc_703AF:
lea r12, [rcx+1]
mov byte ptr [rcx], 0
cmp r12, r14
jnb short loc_703D3
lea r12, [rcx+2]
mov byte ptr [rcx+1], 0
cmp r12, r14
jnb short loc_703D3
mov byte ptr [rcx+2], 20h ; ' '
add rcx, 3
mov r12, rcx
loc_703D3:
mov eax, [rbp+var_24]
dec eax
mov [rbp+var_24], eax
cmp r12, r14
jnb loc_7034A
mov rcx, r12
test eax, eax
jnz short loc_703AF
jmp loc_7034A
loc_703F0:
mov rax, r12
loc_703F3:
sub rax, rbx
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long my_strnxfrm_unicode_full_bin(
long long a1,
_BYTE *a2,
long long a3,
int a4,
long long a5,
long long a6,
unsigned int a7)
{
unsigned long long v8; // r14
long long v9; // rax
_BYTE *v10; // rcx
_BYTE *v11; // r12
_BYTE *v12; // rax
int v13; // eax
int v15[9]; // [rsp+Ch] [rbp-24h] BYREF
v15[0] = a4;
v8 = (unsigned long long)&a2[a3];
v9 = my_strnxfrm_unicode_full_bin_internal(a1, a2, (unsigned long long)&a2[a3], v15, a5, a5 + a6);
v10 = &a2[v9];
if ( (a7 & 0x40) != 0 && v9 < a3 && v15[0] )
{
do
{
v11 = v10 + 1;
*v10 = 0;
if ( (unsigned long long)(v10 + 1) < v8 )
{
v11 = v10 + 2;
v10[1] = 0;
if ( (unsigned long long)(v10 + 2) < v8 )
{
v10[2] = 32;
v11 = v10 + 3;
}
}
v13 = --v15[0];
if ( (unsigned long long)v11 >= v8 )
break;
v10 = v11;
}
while ( v13 );
}
else
{
v11 = &a2[v9];
}
my_strxfrm_desc_and_reverse(a2, v11, a7, 0);
if ( (a7 & 0x80u) == 0 || (unsigned long long)v11 >= v8 )
{
v12 = v11;
}
else
{
do
{
v12 = v11 + 1;
*v11 = 0;
if ( (unsigned long long)(v11 + 1) < v8 )
{
v12 = v11 + 2;
v11[1] = 0;
if ( (unsigned long long)(v11 + 2) < v8 )
{
v11[2] = 32;
v12 = v11 + 3;
}
}
v11 = v12;
}
while ( (unsigned long long)v12 < v8 );
}
return v12 - a2;
}
| my_strnxfrm_unicode_full_bin:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R12,RDX
MOV RBX,RSI
MOV R15D,dword ptr [RBP + 0x10]
LEA RAX,[RBP + -0x24]
MOV dword ptr [RAX],ECX
LEA R14,[RSI + RDX*0x1]
ADD R9,R8
MOV RDX,R14
MOV RCX,RAX
CALL 0x0017025b
LEA RCX,[RBX + RAX*0x1]
TEST R15B,0x40
JNZ 0x001703a4
LAB_00170347:
MOV R12,RCX
LAB_0017034a:
MOV RDI,RBX
MOV RSI,R12
MOV EDX,R15D
XOR ECX,ECX
CALL 0x0015b202
TEST R15B,R15B
SETNS AL
CMP R12,R14
SETNC CL
OR CL,AL
JNZ 0x001703f0
LAB_0017036e:
LEA RAX,[R12 + 0x1]
MOV byte ptr [R12],0x0
CMP RAX,R14
JNC 0x0017039a
LEA RAX,[R12 + 0x2]
MOV byte ptr [R12 + 0x1],0x0
CMP RAX,R14
JNC 0x0017039a
MOV byte ptr [R12 + 0x2],0x20
ADD R12,0x3
MOV RAX,R12
LAB_0017039a:
MOV R12,RAX
CMP RAX,R14
JC 0x0017036e
JMP 0x001703f3
LAB_001703a4:
CMP RAX,R12
JGE 0x00170347
CMP dword ptr [RBP + -0x24],0x0
JZ 0x00170347
LAB_001703af:
LEA R12,[RCX + 0x1]
MOV byte ptr [RCX],0x0
CMP R12,R14
JNC 0x001703d3
LEA R12,[RCX + 0x2]
MOV byte ptr [RCX + 0x1],0x0
CMP R12,R14
JNC 0x001703d3
MOV byte ptr [RCX + 0x2],0x20
ADD RCX,0x3
MOV R12,RCX
LAB_001703d3:
MOV EAX,dword ptr [RBP + -0x24]
DEC EAX
MOV dword ptr [RBP + -0x24],EAX
CMP R12,R14
JNC 0x0017034a
MOV RCX,R12
TEST EAX,EAX
JNZ 0x001703af
JMP 0x0017034a
LAB_001703f0:
MOV RAX,R12
LAB_001703f3:
SUB RAX,RBX
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
long my_strnxfrm_unicode_full_bin
(int8 param_1,long param_2,long param_3,int param_4,long param_5,long param_6,
uint param_7)
{
int1 *puVar1;
long lVar2;
int1 *puVar3;
int1 *puVar4;
int local_2c;
puVar1 = (int1 *)(param_2 + param_3);
local_2c = param_4;
lVar2 = my_strnxfrm_unicode_full_bin_internal
(param_1,param_2,puVar1,&local_2c,param_5,param_6 + param_5);
puVar4 = (int1 *)(param_2 + lVar2);
if (((param_7 & 0x40) != 0) && (lVar2 < param_3)) {
do {
if (local_2c == 0) break;
puVar3 = puVar4 + 1;
*puVar4 = 0;
if (puVar3 < puVar1) {
puVar3 = puVar4 + 2;
puVar4[1] = 0;
if (puVar3 < puVar1) {
puVar4[2] = 0x20;
puVar3 = puVar4 + 3;
}
}
local_2c = local_2c + -1;
puVar4 = puVar3;
} while (puVar3 < puVar1);
}
my_strxfrm_desc_and_reverse(param_2,puVar4,param_7,0);
puVar3 = puVar4;
if (puVar4 < puVar1 && (char)param_7 < '\0') {
do {
puVar4 = puVar3 + 1;
*puVar3 = 0;
if (puVar4 < puVar1) {
puVar4 = puVar3 + 2;
puVar3[1] = 0;
if (puVar4 < puVar1) {
puVar3[2] = 0x20;
puVar4 = puVar3 + 3;
}
}
puVar3 = puVar4;
} while (puVar4 < puVar1);
}
return (long)puVar4 - param_2;
}
|
|
6,512 | nglog::VLOG2Initializer() | ng-log[P]ng-log/src/vlog_is_on.cc | static void VLOG2Initializer() {
// Can now parse --vmodule flag and initialize mapping of module-specific
// logging levels.
inited_vmodule = false;
const char* vmodule = FLAGS_vmodule.c_str();
const char* sep;
VModuleInfo* head = nullptr;
VModuleInfo* tail = nullptr;
while ((sep = strchr(vmodule, '=')) != nullptr) {
string pattern(vmodule, static_cast<size_t>(sep - vmodule));
int module_level;
if (sscanf(sep, "=%d", &module_level) == 1) {
auto* info = new VModuleInfo;
info->module_pattern = pattern;
info->vlog_level = module_level;
if (head) {
tail->next = info;
} else {
head = info;
}
tail = info;
}
// Skip past this entry
vmodule = strchr(sep, ',');
if (vmodule == nullptr) break;
vmodule++; // Skip past ","
}
if (head) { // Put them into the list at the head:
tail->next = vmodule_list;
vmodule_list = head;
}
inited_vmodule = true;
} | O0 | cpp | nglog::VLOG2Initializer():
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movb $0x0, 0x345a6(%rip) # 0x80c98
leaq 0x22e9f(%rip), %rax # 0x6f598
movq (%rax), %rdi
callq 0x92b0
movq %rax, -0x8(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl $0x3d, %esi
callq 0x9240
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0x4c87a
movq -0x8(%rbp), %rcx
movq %rcx, -0x80(%rbp)
movq -0x10(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x78(%rbp)
leaq -0x41(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x9d10
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
movq -0x70(%rbp), %rcx
leaq -0x40(%rbp), %rdi
callq 0x9850
jmp 0x4c768
leaq -0x41(%rbp), %rdi
callq 0x97c0
movq -0x10(%rbp), %rdi
leaq 0x29fc(%rip), %rsi # 0x4f178
leaq -0x58(%rbp), %rdx
movb $0x0, %al
callq 0x96c0
cmpl $0x1, %eax
jne 0x4c82c
movl $0x30, %edi
callq 0x9720
movq %rax, -0x88(%rbp)
jmp 0x4c7a3
movq -0x88(%rbp), %rdi
callq 0x4c950
movq -0x88(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x9070
jmp 0x4c7c9
movl -0x58(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, 0x20(%rax)
cmpq $0x0, -0x18(%rbp)
je 0x4c81c
movq -0x60(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x28(%rax)
jmp 0x4c824
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x41(%rbp), %rdi
callq 0x97c0
jmp 0x4c8ab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x9ea8
jmp 0x4c8ab
movq -0x60(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl $0x2c, %esi
callq 0x9240
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x4c84e
movl $0x3, -0x64(%rbp)
jmp 0x4c861
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movl $0x0, -0x64(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x9ea8
movl -0x64(%rbp), %eax
testl %eax, %eax
je 0x4c875
jmp 0x4c873
jmp 0x4c87a
jmp 0x4c715
cmpq $0x0, -0x18(%rbp)
je 0x4c89b
movq 0x343e0(%rip), %rcx # 0x80c68
movq -0x20(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rax
movq %rax, 0x343cd(%rip) # 0x80c68
movb $0x1, 0x343f6(%rip) # 0x80c98
addq $0x90, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x9d00
nopw %cs:(%rax,%rax)
| _ZN5nglogL16VLOG2InitializerEv:
push rbp
mov rbp, rsp
sub rsp, 90h
mov cs:_ZN5nglogL14inited_vmoduleE, 0; nglog::inited_vmodule
lea rax, _ZN3fLS13FLAGS_vmoduleB5cxx11E; fLS::FLAGS_vmodule
mov rdi, [rax]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov [rbp+var_8], rax
mov [rbp+var_18], 0
mov [rbp+var_20], 0
loc_4C715:
mov rdi, [rbp+var_8]
mov esi, 3Dh ; '='
call _strchr
mov [rbp+var_10], rax
cmp rax, 0
jz loc_4C87A
mov rcx, [rbp+var_8]
mov [rbp+var_80], rcx
mov rax, [rbp+var_10]
sub rax, rcx
mov [rbp+var_78], rax
lea rdi, [rbp+var_41]
mov [rbp+var_70], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rbp+var_80]
mov rdx, [rbp+var_78]
mov rcx, [rbp+var_70]
lea rdi, [rbp+var_40]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcmRKS3_; std::string::basic_string(char const*,ulong,std::allocator<char> const&)
jmp short $+2
loc_4C768:
lea rdi, [rbp+var_41]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rdi, [rbp+var_10]
lea rsi, aD_0; "=%d"
lea rdx, [rbp+var_58]
mov al, 0
call ___isoc99_sscanf
cmp eax, 1
jnz loc_4C82C
mov edi, 30h ; '0'; unsigned __int64
call __Znwm; operator new(ulong)
mov [rbp+var_88], rax
jmp short $+2
loc_4C7A3:
mov rdi, [rbp+var_88]; this
call _ZN5nglog11VModuleInfoC2Ev; nglog::VModuleInfo::VModuleInfo(void)
mov rax, [rbp+var_88]
mov [rbp+var_60], rax
mov rdi, [rbp+var_60]
lea rsi, [rbp+var_40]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
jmp short $+2
loc_4C7C9:
mov ecx, [rbp+var_58]
mov rax, [rbp+var_60]
mov [rax+20h], ecx
cmp [rbp+var_18], 0
jz short loc_4C81C
mov rcx, [rbp+var_60]
mov rax, [rbp+var_20]
mov [rax+28h], rcx
jmp short loc_4C824
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
lea rdi, [rbp+var_41]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_4C8AB
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
lea rdi, [rbp+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_4C8AB
loc_4C81C:
mov rax, [rbp+var_60]
mov [rbp+var_18], rax
loc_4C824:
mov rax, [rbp+var_60]
mov [rbp+var_20], rax
loc_4C82C:
mov rdi, [rbp+var_10]
mov esi, 2Ch ; ','
call _strchr
mov [rbp+var_8], rax
cmp [rbp+var_8], 0
jnz short loc_4C84E
mov [rbp+var_64], 3
jmp short loc_4C861
loc_4C84E:
mov rax, [rbp+var_8]
add rax, 1
mov [rbp+var_8], rax
mov [rbp+var_64], 0
loc_4C861:
lea rdi, [rbp+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov eax, [rbp+var_64]
test eax, eax
jz short loc_4C875
jmp short $+2
loc_4C873:
jmp short loc_4C87A
loc_4C875:
jmp loc_4C715
loc_4C87A:
cmp [rbp+var_18], 0
jz short loc_4C89B
mov rcx, cs:_ZN5nglogL12vmodule_listE; nglog::vmodule_list
mov rax, [rbp+var_20]
mov [rax+28h], rcx
mov rax, [rbp+var_18]
mov cs:_ZN5nglogL12vmodule_listE, rax; nglog::vmodule_list
loc_4C89B:
mov cs:_ZN5nglogL14inited_vmoduleE, 1; nglog::inited_vmodule
add rsp, 90h
pop rbp
retn
loc_4C8AB:
mov rdi, [rbp+var_50]
call __Unwind_Resume
| long long nglog::VLOG2Initializer(nglog *this)
{
long long result; // rax
nglog::VModuleInfo *v2; // [rsp+8h] [rbp-88h]
long long v3; // [rsp+10h] [rbp-80h]
long long v4; // [rsp+18h] [rbp-78h]
unsigned int v5; // [rsp+2Ch] [rbp-64h]
int v6; // [rsp+38h] [rbp-58h] BYREF
char v7; // [rsp+4Fh] [rbp-41h] BYREF
_BYTE v8[32]; // [rsp+50h] [rbp-40h] BYREF
nglog::VModuleInfo *v9; // [rsp+70h] [rbp-20h]
long long v10; // [rsp+78h] [rbp-18h]
long long v11; // [rsp+80h] [rbp-10h]
long long v12; // [rsp+88h] [rbp-8h]
nglog::inited_vmodule = 0;
v12 = std::string::c_str(&fLS::FLAGS_vmodule_buf[abi:cxx11]);
v10 = 0LL;
v9 = 0LL;
do
{
result = strchr(v12, 61LL);
v11 = result;
if ( !result )
break;
v3 = v12;
v4 = v11 - v12;
std::allocator<char>::allocator();
std::string::basic_string(v8, v3, v4, &v7);
std::allocator<char>::~allocator(&v7);
if ( (unsigned int)__isoc99_sscanf(v11, "=%d", &v6) == 1 )
{
v2 = (nglog::VModuleInfo *)operator new(0x30uLL);
nglog::VModuleInfo::VModuleInfo(v2);
std::string::operator=(v2, v8);
*((_DWORD *)v2 + 8) = v6;
if ( v10 )
*((_QWORD *)v9 + 5) = v2;
else
v10 = (long long)v2;
v9 = v2;
}
v12 = strchr(v11, 44LL);
if ( v12 )
{
++v12;
v5 = 0;
}
else
{
v5 = 3;
}
std::string::~string(v8);
result = v5;
}
while ( !v5 );
if ( v10 )
{
*((_QWORD *)v9 + 5) = nglog::vmodule_list;
result = v10;
nglog::vmodule_list = v10;
}
nglog::inited_vmodule = 1;
return result;
}
| VLOG2Initializer:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV byte ptr [0x00180c98],0x0
LEA RAX,[0x16f598]
MOV RDI,qword ptr [RAX]
CALL 0x001092b0
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x18],0x0
MOV qword ptr [RBP + -0x20],0x0
LAB_0014c715:
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,0x3d
CALL 0x00109240
MOV qword ptr [RBP + -0x10],RAX
CMP RAX,0x0
JZ 0x0014c87a
MOV RCX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x80],RCX
MOV RAX,qword ptr [RBP + -0x10]
SUB RAX,RCX
MOV qword ptr [RBP + -0x78],RAX
LEA RDI,[RBP + -0x41]
MOV qword ptr [RBP + -0x70],RDI
CALL 0x00109d10
MOV RSI,qword ptr [RBP + -0x80]
MOV RDX,qword ptr [RBP + -0x78]
MOV RCX,qword ptr [RBP + -0x70]
LAB_0014c75d:
LEA RDI,[RBP + -0x40]
CALL 0x00109850
JMP 0x0014c768
LAB_0014c768:
LEA RDI,[RBP + -0x41]
CALL 0x001097c0
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x14f178]
LEA RDX,[RBP + -0x58]
MOV AL,0x0
CALL 0x001096c0
CMP EAX,0x1
JNZ 0x0014c82c
LAB_0014c790:
MOV EDI,0x30
CALL 0x00109720
MOV qword ptr [RBP + -0x88],RAX
JMP 0x0014c7a3
LAB_0014c7a3:
MOV RDI,qword ptr [RBP + -0x88]
CALL 0x0014c950
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RBP + -0x60],RAX
MOV RDI,qword ptr [RBP + -0x60]
LEA RSI,[RBP + -0x40]
CALL 0x00109070
LAB_0014c7c7:
JMP 0x0014c7c9
LAB_0014c7c9:
MOV ECX,dword ptr [RBP + -0x58]
MOV RAX,qword ptr [RBP + -0x60]
MOV dword ptr [RAX + 0x20],ECX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0014c81c
MOV RCX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x28],RCX
JMP 0x0014c824
LAB_0014c81c:
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x18],RAX
LAB_0014c824:
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x20],RAX
LAB_0014c82c:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x2c
CALL 0x00109240
MOV qword ptr [RBP + -0x8],RAX
CMP qword ptr [RBP + -0x8],0x0
JNZ 0x0014c84e
MOV dword ptr [RBP + -0x64],0x3
JMP 0x0014c861
LAB_0014c84e:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x1
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0x64],0x0
LAB_0014c861:
LEA RDI,[RBP + -0x40]
CALL 0x00109ea8
MOV EAX,dword ptr [RBP + -0x64]
TEST EAX,EAX
JZ 0x0014c875
JMP 0x0014c873
LAB_0014c873:
JMP 0x0014c87a
LAB_0014c875:
JMP 0x0014c715
LAB_0014c87a:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0014c89b
MOV RCX,qword ptr [0x00180c68]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x28],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [0x00180c68],RAX
LAB_0014c89b:
MOV byte ptr [0x00180c98],0x1
ADD RSP,0x90
POP RBP
RET
|
/* nglog::VLOG2Initializer() */
void nglog::VLOG2Initializer(void)
{
char *pcVar1;
VModuleInfo *pVVar2;
int iVar3;
ulong uVar4;
VModuleInfo *this;
int local_6c;
int4 local_60 [5];
allocator local_49;
string local_48 [32];
VModuleInfo *local_28;
VModuleInfo *local_20;
char *local_18;
char *local_10;
inited_vmodule = 0;
local_10 = (char *)std::__cxx11::string::c_str();
local_20 = (VModuleInfo *)0x0;
local_28 = (VModuleInfo *)0x0;
do {
local_18 = strchr(local_10,0x3d);
pcVar1 = local_10;
if (local_18 == (char *)0x0) break;
uVar4 = (long)local_18 - (long)local_10;
std::allocator<char>::allocator();
/* try { // try from 0014c75d to 0014c765 has its CatchHandler @ 0014c7e8 */
std::__cxx11::string::string(local_48,pcVar1,uVar4,&local_49);
std::allocator<char>::~allocator((allocator<char> *)&local_49);
iVar3 = __isoc99_sscanf(local_18,&DAT_0014f178,local_60);
this = local_28;
pVVar2 = local_20;
if (iVar3 == 1) {
/* try { // try from 0014c790 to 0014c7c6 has its CatchHandler @ 0014c802 */
this = (VModuleInfo *)operator_new(0x30);
VModuleInfo::VModuleInfo(this);
std::__cxx11::string::operator=((string *)this,local_48);
*(int4 *)(this + 0x20) = local_60[0];
pVVar2 = this;
if (local_20 != (VModuleInfo *)0x0) {
*(VModuleInfo **)(local_28 + 0x28) = this;
pVVar2 = local_20;
}
}
local_20 = pVVar2;
local_28 = this;
local_10 = strchr(local_18,0x2c);
if (local_10 == (char *)0x0) {
local_6c = 3;
local_10 = (char *)0x0;
}
else {
local_10 = local_10 + 1;
local_6c = 0;
}
std::__cxx11::string::~string(local_48);
} while (local_6c == 0);
if (local_20 != (VModuleInfo *)0x0) {
*(VModuleInfo **)(local_28 + 0x28) = vmodule_list;
vmodule_list = local_20;
}
inited_vmodule = 1;
return;
}
|
|
6,513 | google::protobuf::compiler::csharp::PrimitiveOneofFieldGenerator::GenerateMembers(google::protobuf::io::Printer*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/csharp/csharp_primitive_field.cc | void PrimitiveOneofFieldGenerator::GenerateMembers(io::Printer* printer) {
WritePropertyDocComment(printer, descriptor_);
AddPublicMemberAttributes(printer);
printer->Print(
variables_,
"$access_level$ $type_name$ $property_name$ {\n"
" get { return $has_property_check$ ? ($type_name$) $oneof_name$_ : $default_value$; }\n"
" set {\n");
if (is_value_type) {
printer->Print(
variables_,
" $oneof_name$_ = value;\n");
} else {
printer->Print(
variables_,
" $oneof_name$_ = pb::ProtoPreconditions.CheckNotNull(value, \"value\");\n");
}
printer->Print(
variables_,
" $oneof_name$Case_ = $oneof_property_name$OneofCase.$oneof_case_name$;\n"
" }\n"
"}\n");
if (SupportsPresenceApi(descriptor_)) {
printer->Print(
variables_,
"/// <summary>Gets whether the \"$descriptor_name$\" field is set</summary>\n");
AddPublicMemberAttributes(printer);
printer->Print(
variables_,
"$access_level$ bool Has$property_name$ {\n"
" get { return $oneof_name$Case_ == $oneof_property_name$OneofCase.$oneof_case_name$; }\n"
"}\n");
printer->Print(
variables_,
"/// <summary> Clears the value of the oneof if it's currently set to \"$descriptor_name$\" </summary>\n");
AddPublicMemberAttributes(printer);
printer->Print(
variables_,
"$access_level$ void Clear$property_name$() {\n"
" if ($has_property_check$) {\n"
" Clear$oneof_property_name$();\n"
" }\n"
"}\n");
}
} | O0 | cpp | google::protobuf::compiler::csharp::PrimitiveOneofFieldGenerator::GenerateMembers(google::protobuf::io::Printer*):
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x8(%rsp), %rdi
movq 0x10(%rax), %rsi
callq 0x135310
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x13b7a0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdi
addq $0x20, %rsi
leaq 0x3412b2(%rip), %rdx # 0x3adc79
callq 0x3235f0
movq (%rsp), %rax
testb $0x1, 0x50(%rax)
je 0x6c9f1
movq (%rsp), %rsi
movq 0x8(%rsp), %rdi
addq $0x20, %rsi
leaq 0x34131c(%rip), %rdx # 0x3add06
callq 0x3235f0
jmp 0x6ca0a
movq (%rsp), %rsi
movq 0x8(%rsp), %rdi
addq $0x20, %rsi
leaq 0x34131d(%rip), %rdx # 0x3add22
callq 0x3235f0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdi
addq $0x20, %rsi
leaq 0x34134e(%rip), %rdx # 0x3add6c
callq 0x3235f0
movq (%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x6b800
testb $0x1, %al
jne 0x6ca39
jmp 0x6cab9
movq (%rsp), %rsi
movq 0x8(%rsp), %rdi
addq $0x20, %rsi
leaq 0x3406cb(%rip), %rdx # 0x3ad118
callq 0x3235f0
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x13b7a0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdi
addq $0x20, %rsi
leaq 0x3406ee(%rip), %rdx # 0x3ad162
callq 0x3235f0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdi
addq $0x20, %rsi
leaq 0x340759(%rip), %rdx # 0x3ad1e6
callq 0x3235f0
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x13b7a0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdi
addq $0x20, %rsi
leaq 0x340797(%rip), %rdx # 0x3ad24b
callq 0x3235f0
addq $0x18, %rsp
retq
nop
| _ZN6google8protobuf8compiler6csharp28PrimitiveOneofFieldGenerator15GenerateMembersEPNS0_2io7PrinterE:
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 rdi, [rsp+18h+var_10]; this
mov rsi, [rax+10h]; google::protobuf::io::Printer *
call _ZN6google8protobuf8compiler6csharp23WritePropertyDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorE; google::protobuf::compiler::csharp::WritePropertyDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*)
mov rdi, [rsp+18h+var_18]; this
mov rsi, [rsp+18h+var_10]; google::protobuf::io::Printer *
call _ZN6google8protobuf8compiler6csharp18FieldGeneratorBase25AddPublicMemberAttributesEPNS0_2io7PrinterE; google::protobuf::compiler::csharp::FieldGeneratorBase::AddPublicMemberAttributes(google::protobuf::io::Printer *)
mov rsi, [rsp+18h+var_18]
mov rdi, [rsp+18h+var_10]
add rsi, 20h ; ' '
lea rdx, aAccessLevelTyp_2; "$access_level$ $type_name$ $property_na"...
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rax, [rsp+18h+var_18]
test byte ptr [rax+50h], 1
jz short loc_6C9F1
mov rsi, [rsp+18h+var_18]
mov rdi, [rsp+18h+var_10]
add rsi, 20h ; ' '
lea rdx, aOneofNameValue; " $oneof_name$_ = value;\n"
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
jmp short loc_6CA0A
loc_6C9F1:
mov rsi, [rsp+18h+var_18]
mov rdi, [rsp+18h+var_10]
add rsi, 20h ; ' '
lea rdx, aOneofNamePbPro; " $oneof_name$_ = pb::ProtoPreconditi"...
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
loc_6CA0A:
mov rsi, [rsp+18h+var_18]
mov rdi, [rsp+18h+var_10]
add rsi, 20h ; ' '; google::protobuf::FieldDescriptor *
lea rdx, aOneofNameCaseO; " $oneof_name$Case_ = $oneof_property"...
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rax, [rsp+18h+var_18]
mov rdi, [rax+10h]; this
call _ZN6google8protobuf8compiler6csharp19SupportsPresenceApiEPKNS0_15FieldDescriptorE; google::protobuf::compiler::csharp::SupportsPresenceApi(google::protobuf::FieldDescriptor const*)
test al, 1
jnz short loc_6CA39
jmp loc_6CAB9
loc_6CA39:
mov rsi, [rsp+18h+var_18]
mov rdi, [rsp+18h+var_10]
add rsi, 20h ; ' '
lea rdx, aSummaryGetsWhe_0; "/// <summary>Gets whether the \"$descri"...
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rdi, [rsp+18h+var_18]; this
mov rsi, [rsp+18h+var_10]; google::protobuf::io::Printer *
call _ZN6google8protobuf8compiler6csharp18FieldGeneratorBase25AddPublicMemberAttributesEPNS0_2io7PrinterE; google::protobuf::compiler::csharp::FieldGeneratorBase::AddPublicMemberAttributes(google::protobuf::io::Printer *)
mov rsi, [rsp+18h+var_18]
mov rdi, [rsp+18h+var_10]
add rsi, 20h ; ' '
lea rdx, aAccessLevelBoo_0; "$access_level$ bool Has$property_name$ "...
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rsi, [rsp+18h+var_18]
mov rdi, [rsp+18h+var_10]
add rsi, 20h ; ' '
lea rdx, aSummaryClearsT_0; "/// <summary> Clears the value of the o"...
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rdi, [rsp+18h+var_18]; this
mov rsi, [rsp+18h+var_10]; google::protobuf::io::Printer *
call _ZN6google8protobuf8compiler6csharp18FieldGeneratorBase25AddPublicMemberAttributesEPNS0_2io7PrinterE; google::protobuf::compiler::csharp::FieldGeneratorBase::AddPublicMemberAttributes(google::protobuf::io::Printer *)
mov rsi, [rsp+18h+var_18]
mov rdi, [rsp+18h+var_10]
add rsi, 20h ; ' '
lea rdx, aAccessLevelVoi_0; "$access_level$ void Clear$property_name"...
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
loc_6CAB9:
add rsp, 18h
retn
| GenerateMembers:
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 RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RAX + 0x10]
CALL 0x00235310
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x0023b7a0
MOV RSI,qword ptr [RSP]
MOV RDI,qword ptr [RSP + 0x8]
ADD RSI,0x20
LEA RDX,[0x4adc79]
CALL 0x004235f0
MOV RAX,qword ptr [RSP]
TEST byte ptr [RAX + 0x50],0x1
JZ 0x0016c9f1
MOV RSI,qword ptr [RSP]
MOV RDI,qword ptr [RSP + 0x8]
ADD RSI,0x20
LEA RDX,[0x4add06]
CALL 0x004235f0
JMP 0x0016ca0a
LAB_0016c9f1:
MOV RSI,qword ptr [RSP]
MOV RDI,qword ptr [RSP + 0x8]
ADD RSI,0x20
LEA RDX,[0x4add22]
CALL 0x004235f0
LAB_0016ca0a:
MOV RSI,qword ptr [RSP]
MOV RDI,qword ptr [RSP + 0x8]
ADD RSI,0x20
LEA RDX,[0x4add6c]
CALL 0x004235f0
MOV RAX,qword ptr [RSP]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x0016b800
TEST AL,0x1
JNZ 0x0016ca39
JMP 0x0016cab9
LAB_0016ca39:
MOV RSI,qword ptr [RSP]
MOV RDI,qword ptr [RSP + 0x8]
ADD RSI,0x20
LEA RDX,[0x4ad118]
CALL 0x004235f0
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x0023b7a0
MOV RSI,qword ptr [RSP]
MOV RDI,qword ptr [RSP + 0x8]
ADD RSI,0x20
LEA RDX,[0x4ad162]
CALL 0x004235f0
MOV RSI,qword ptr [RSP]
MOV RDI,qword ptr [RSP + 0x8]
ADD RSI,0x20
LEA RDX,[0x4ad1e6]
CALL 0x004235f0
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x0023b7a0
MOV RSI,qword ptr [RSP]
MOV RDI,qword ptr [RSP + 0x8]
ADD RSI,0x20
LEA RDX,[0x4ad24b]
CALL 0x004235f0
LAB_0016cab9:
ADD RSP,0x18
RET
|
/* google::protobuf::compiler::csharp::PrimitiveOneofFieldGenerator::GenerateMembers(google::protobuf::io::Printer*)
*/
void __thiscall
google::protobuf::compiler::csharp::PrimitiveOneofFieldGenerator::GenerateMembers
(PrimitiveOneofFieldGenerator *this,Printer *param_1)
{
ulong uVar1;
WritePropertyDocComment(param_1,*(FieldDescriptor **)(this + 0x10));
FieldGeneratorBase::AddPublicMemberAttributes((FieldGeneratorBase *)this,param_1);
io::Printer::Print(param_1,(map *)(this + 0x20),
"$access_level$ $type_name$ $property_name$ {\n get { return $has_property_check$ ? ($type_name$) $oneof_name$_ : $default_value$; }\n set {\n"
);
if (((byte)this[0x50] & 1) == 0) {
io::Printer::Print(param_1,(map *)(this + 0x20),
" $oneof_name$_ = pb::ProtoPreconditions.CheckNotNull(value, \"value\");\n"
);
}
else {
io::Printer::Print(param_1,(map *)(this + 0x20)," $oneof_name$_ = value;\n");
}
io::Printer::Print(param_1,(map *)(this + 0x20),
" $oneof_name$Case_ = $oneof_property_name$OneofCase.$oneof_case_name$;\n }\n}\n"
);
uVar1 = SupportsPresenceApi(*(FieldDescriptor **)(this + 0x10));
if ((uVar1 & 1) != 0) {
io::Printer::Print(param_1,(map *)(this + 0x20),
"/// <summary>Gets whether the \"$descriptor_name$\" field is set</summary>\n"
);
FieldGeneratorBase::AddPublicMemberAttributes((FieldGeneratorBase *)this,param_1);
io::Printer::Print(param_1,(map *)(this + 0x20),
"$access_level$ bool Has$property_name$ {\n get { return $oneof_name$Case_ == $oneof_property_name$OneofCase.$oneof_case_name$; }\n}\n"
);
io::Printer::Print(param_1,(map *)(this + 0x20),
"/// <summary> Clears the value of the oneof if it\'s currently set to \"$descriptor_name$\" </summary>\n"
);
FieldGeneratorBase::AddPublicMemberAttributes((FieldGeneratorBase *)this,param_1);
io::Printer::Print(param_1,(map *)(this + 0x20),
"$access_level$ void Clear$property_name$() {\n if ($has_property_check$) {\n Clear$oneof_property_name$();\n }\n}\n"
);
}
return;
}
|
||
6,514 | google::protobuf::compiler::csharp::PrimitiveOneofFieldGenerator::GenerateMembers(google::protobuf::io::Printer*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/csharp/csharp_primitive_field.cc | void PrimitiveOneofFieldGenerator::GenerateMembers(io::Printer* printer) {
WritePropertyDocComment(printer, descriptor_);
AddPublicMemberAttributes(printer);
printer->Print(
variables_,
"$access_level$ $type_name$ $property_name$ {\n"
" get { return $has_property_check$ ? ($type_name$) $oneof_name$_ : $default_value$; }\n"
" set {\n");
if (is_value_type) {
printer->Print(
variables_,
" $oneof_name$_ = value;\n");
} else {
printer->Print(
variables_,
" $oneof_name$_ = pb::ProtoPreconditions.CheckNotNull(value, \"value\");\n");
}
printer->Print(
variables_,
" $oneof_name$Case_ = $oneof_property_name$OneofCase.$oneof_case_name$;\n"
" }\n"
"}\n");
if (SupportsPresenceApi(descriptor_)) {
printer->Print(
variables_,
"/// <summary>Gets whether the \"$descriptor_name$\" field is set</summary>\n");
AddPublicMemberAttributes(printer);
printer->Print(
variables_,
"$access_level$ bool Has$property_name$ {\n"
" get { return $oneof_name$Case_ == $oneof_property_name$OneofCase.$oneof_case_name$; }\n"
"}\n");
printer->Print(
variables_,
"/// <summary> Clears the value of the oneof if it's currently set to \"$descriptor_name$\" </summary>\n");
AddPublicMemberAttributes(printer);
printer->Print(
variables_,
"$access_level$ void Clear$property_name$() {\n"
" if ($has_property_check$) {\n"
" Clear$oneof_property_name$();\n"
" }\n"
"}\n");
}
} | O3 | cpp | google::protobuf::compiler::csharp::PrimitiveOneofFieldGenerator::GenerateMembers(google::protobuf::io::Printer*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rsi
movq %rbx, %rdi
callq 0x9d827
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa130c
leaq 0x20(%r14), %r15
leaq 0x16010b(%rip), %rdx # 0x19fb04
movq %rbx, %rdi
movq %r15, %rsi
callq 0x16cd32
leaq 0x160186(%rip), %rax # 0x19fb91
leaq 0x16019b(%rip), %rdx # 0x19fbad
cmpb $0x0, 0x50(%r14)
cmovneq %rax, %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x16cd32
leaq 0x1601ca(%rip), %rdx # 0x19fbf7
movq %rbx, %rdi
movq %r15, %rsi
callq 0x16cd32
movq 0x10(%r14), %r12
movb 0x1(%r12), %al
notb %al
testb $0x60, %al
je 0x3faea
movq 0x18(%r12), %rdi
testq %rdi, %rdi
je 0x3fa71
leaq 0xfa1d8(%rip), %rax # 0x139c34
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x8(%rsp), %rdx
movq %r12, (%rdx)
callq 0x2f19d
cmpb $0xb, 0x2(%r12)
je 0x3faea
movq 0x10(%r12), %rax
cmpb $0x2, 0x3(%rax)
je 0x3fa8c
testb $0x2, 0x1(%r12)
je 0x3faea
leaq 0x15f510(%rip), %rdx # 0x19efa3
movq %rbx, %rdi
movq %r15, %rsi
callq 0x16cd32
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa130c
leaq 0x15f53d(%rip), %rdx # 0x19efed
movq %rbx, %rdi
movq %r15, %rsi
callq 0x16cd32
leaq 0x15f5af(%rip), %rdx # 0x19f071
movq %rbx, %rdi
movq %r15, %rsi
callq 0x16cd32
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa130c
leaq 0x15f5f7(%rip), %rdx # 0x19f0d6
movq %rbx, %rdi
movq %r15, %rsi
callq 0x16cd32
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| _ZN6google8protobuf8compiler6csharp28PrimitiveOneofFieldGenerator15GenerateMembersEPNS0_2io7PrinterE:
push r15; int
push r14; int
push r12; int
push rbx; int
sub rsp, 18h
mov rbx, rsi
mov r14, rdi
mov rsi, [rdi+10h]; google::protobuf::io::Printer *
mov rdi, rbx; this
call _ZN6google8protobuf8compiler6csharp23WritePropertyDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorE; google::protobuf::compiler::csharp::WritePropertyDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*)
mov rdi, r14; this
mov rsi, rbx; google::protobuf::io::Printer *
call _ZN6google8protobuf8compiler6csharp18FieldGeneratorBase25AddPublicMemberAttributesEPNS0_2io7PrinterE; google::protobuf::compiler::csharp::FieldGeneratorBase::AddPublicMemberAttributes(google::protobuf::io::Printer *)
lea r15, [r14+20h]
lea rdx, aAccessLevelTyp_2; "$access_level$ $type_name$ $property_na"...
mov rdi, rbx; this
mov rsi, r15
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
lea rax, aOneofNameValue; " $oneof_name$_ = value;\n"
lea rdx, aOneofNamePbPro; " $oneof_name$_ = pb::ProtoPreconditi"...
cmp byte ptr [r14+50h], 0
cmovnz rdx, rax
mov rdi, rbx; this
mov rsi, r15
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
lea rdx, aOneofNameCaseO; " $oneof_name$Case_ = $oneof_property"...
mov rdi, rbx; this
mov rsi, r15
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov r12, [r14+10h]
mov al, [r12+1]
not al
test al, 60h
jz loc_3FAEA
mov rdi, [r12+18h]
test rdi, rdi
jz short loc_3FA71
lea rax, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*)
lea rsi, [rsp+38h+var_28]
mov [rsi], rax
lea rdx, [rsp+38h+var_30]
mov [rdx], r12
call _ZSt9call_onceIPFvPKN6google8protobuf15FieldDescriptorEEJS4_EEvRSt9once_flagOT_DpOT0_; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(std::once_flag &,void (*)(google::protobuf::FieldDescriptor const*) &&,google::protobuf::FieldDescriptor const* &&)
loc_3FA71:
cmp byte ptr [r12+2], 0Bh
jz short loc_3FAEA
mov rax, [r12+10h]
cmp byte ptr [rax+3], 2
jz short loc_3FA8C
test byte ptr [r12+1], 2
jz short loc_3FAEA
loc_3FA8C:
lea rdx, aSummaryGetsWhe_0; "/// <summary>Gets whether the \"$descri"...
mov rdi, rbx; this
mov rsi, r15
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rdi, r14; this
mov rsi, rbx; google::protobuf::io::Printer *
call _ZN6google8protobuf8compiler6csharp18FieldGeneratorBase25AddPublicMemberAttributesEPNS0_2io7PrinterE; google::protobuf::compiler::csharp::FieldGeneratorBase::AddPublicMemberAttributes(google::protobuf::io::Printer *)
lea rdx, aAccessLevelBoo_0; "$access_level$ bool Has$property_name$ "...
mov rdi, rbx; this
mov rsi, r15
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
lea rdx, aSummaryClearsT_0; "/// <summary> Clears the value of the o"...
mov rdi, rbx; this
mov rsi, r15
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rdi, r14; this
mov rsi, rbx; google::protobuf::io::Printer *
call _ZN6google8protobuf8compiler6csharp18FieldGeneratorBase25AddPublicMemberAttributesEPNS0_2io7PrinterE; google::protobuf::compiler::csharp::FieldGeneratorBase::AddPublicMemberAttributes(google::protobuf::io::Printer *)
lea rdx, aAccessLevelVoi_0; "$access_level$ void Clear$property_name"...
mov rdi, rbx; this
mov rsi, r15
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
loc_3FAEA:
add rsp, 18h
pop rbx
pop r12
pop r14
pop r15
retn
| GenerateMembers:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RSI
MOV R14,RDI
MOV RSI,qword ptr [RDI + 0x10]
MOV RDI,RBX
CALL 0x0019d827
MOV RDI,R14
MOV RSI,RBX
CALL 0x001a130c
LEA R15,[R14 + 0x20]
LEA RDX,[0x29fb04]
MOV RDI,RBX
MOV RSI,R15
CALL 0x0026cd32
LEA RAX,[0x29fb91]
LEA RDX,[0x29fbad]
CMP byte ptr [R14 + 0x50],0x0
CMOVNZ RDX,RAX
MOV RDI,RBX
MOV RSI,R15
CALL 0x0026cd32
LEA RDX,[0x29fbf7]
MOV RDI,RBX
MOV RSI,R15
CALL 0x0026cd32
MOV R12,qword ptr [R14 + 0x10]
MOV AL,byte ptr [R12 + 0x1]
NOT AL
TEST AL,0x60
JZ 0x0013faea
MOV RDI,qword ptr [R12 + 0x18]
TEST RDI,RDI
JZ 0x0013fa71
LEA RAX,[0x239c34]
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI],RAX
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],R12
CALL 0x0012f19d
LAB_0013fa71:
CMP byte ptr [R12 + 0x2],0xb
JZ 0x0013faea
MOV RAX,qword ptr [R12 + 0x10]
CMP byte ptr [RAX + 0x3],0x2
JZ 0x0013fa8c
TEST byte ptr [R12 + 0x1],0x2
JZ 0x0013faea
LAB_0013fa8c:
LEA RDX,[0x29efa3]
MOV RDI,RBX
MOV RSI,R15
CALL 0x0026cd32
MOV RDI,R14
MOV RSI,RBX
CALL 0x001a130c
LEA RDX,[0x29efed]
MOV RDI,RBX
MOV RSI,R15
CALL 0x0026cd32
LEA RDX,[0x29f071]
MOV RDI,RBX
MOV RSI,R15
CALL 0x0026cd32
MOV RDI,R14
MOV RSI,RBX
CALL 0x001a130c
LEA RDX,[0x29f0d6]
MOV RDI,RBX
MOV RSI,R15
CALL 0x0026cd32
LAB_0013faea:
ADD RSP,0x18
POP RBX
POP R12
POP R14
POP R15
RET
|
/* google::protobuf::compiler::csharp::PrimitiveOneofFieldGenerator::GenerateMembers(google::protobuf::io::Printer*)
*/
void __thiscall
google::protobuf::compiler::csharp::PrimitiveOneofFieldGenerator::GenerateMembers
(PrimitiveOneofFieldGenerator *this,Printer *param_1)
{
map *pmVar1;
FieldDescriptor *pFVar2;
char *pcVar3;
FieldDescriptor *local_30;
code *local_28;
WritePropertyDocComment(param_1,*(FieldDescriptor **)(this + 0x10));
FieldGeneratorBase::AddPublicMemberAttributes((FieldGeneratorBase *)this,param_1);
pmVar1 = (map *)(this + 0x20);
io::Printer::Print(param_1,pmVar1,
"$access_level$ $type_name$ $property_name$ {\n get { return $has_property_check$ ? ($type_name$) $oneof_name$_ : $default_value$; }\n set {\n"
);
pcVar3 = " $oneof_name$_ = pb::ProtoPreconditions.CheckNotNull(value, \"value\");\n";
if (this[0x50] != (PrimitiveOneofFieldGenerator)0x0) {
pcVar3 = " $oneof_name$_ = value;\n";
}
io::Printer::Print(param_1,pmVar1,pcVar3);
io::Printer::Print(param_1,pmVar1,
" $oneof_name$Case_ = $oneof_property_name$OneofCase.$oneof_case_name$;\n }\n}\n"
);
pFVar2 = *(FieldDescriptor **)(this + 0x10);
if ((~(byte)pFVar2[1] & 0x60) != 0) {
if (*(once_flag **)(pFVar2 + 0x18) != (once_flag *)0x0) {
local_28 = FieldDescriptor::TypeOnceInit;
local_30 = pFVar2;
std::
call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*>
(*(once_flag **)(pFVar2 + 0x18),(_func_void_FieldDescriptor_ptr *)&local_28,
&local_30);
}
if ((pFVar2[2] != (FieldDescriptor)0xb) &&
((*(char *)(*(long *)(pFVar2 + 0x10) + 3) == '\x02' || (((byte)pFVar2[1] & 2) != 0)))) {
io::Printer::Print(param_1,pmVar1,
"/// <summary>Gets whether the \"$descriptor_name$\" field is set</summary>\n"
);
FieldGeneratorBase::AddPublicMemberAttributes((FieldGeneratorBase *)this,param_1);
io::Printer::Print(param_1,pmVar1,
"$access_level$ bool Has$property_name$ {\n get { return $oneof_name$Case_ == $oneof_property_name$OneofCase.$oneof_case_name$; }\n}\n"
);
io::Printer::Print(param_1,pmVar1,
"/// <summary> Clears the value of the oneof if it\'s currently set to \"$descriptor_name$\" </summary>\n"
);
FieldGeneratorBase::AddPublicMemberAttributes((FieldGeneratorBase *)this,param_1);
io::Printer::Print(param_1,pmVar1,
"$access_level$ void Clear$property_name$() {\n if ($has_property_check$) {\n Clear$oneof_property_name$();\n }\n}\n"
);
}
}
return;
}
|
||
6,515 | next_type | corpus-core[P]colibri-stateless/src/util/json_validate.c | static const char* next_type(const char* pos, const char** next, int* len) {
while (*pos && isspace(*pos)) pos++;
const char* start = pos;
if (*pos == '[') {
const char* end = find_end(pos + 1, '[', ']');
if (!end) return NULL;
*next = end + 1;
*len = end - start;
return start;
}
if (*pos == '{') {
const char* end = find_end(pos + 1, '{', '}');
if (!end) return NULL;
*next = end + 1;
*len = end - start;
return start;
}
return next_name(pos, next, len);
} | O0 | c | next_type:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x39(%rbp)
je 0x21e39
callq 0x5090
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax # imm = 0x2000
cmpl $0x0, %eax
setne %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0x21e42
jmp 0x21e50
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x21e04
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5b, %eax
jne 0x21ebf
movq -0x10(%rbp), %rdi
addq $0x1, %rdi
movl $0x5b, %esi
movl $0x5d, %edx
callq 0x21f50
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x21e93
movq $0x0, -0x8(%rbp)
jmp 0x21f38
movq -0x30(%rbp), %rcx
addq $0x1, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x21f38
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x7b, %eax
jne 0x21f23
movq -0x10(%rbp), %rdi
addq $0x1, %rdi
movl $0x7b, %esi
movl $0x7d, %edx
callq 0x21f50
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x21ef7
movq $0x0, -0x8(%rbp)
jmp 0x21f38
movq -0x38(%rbp), %rcx
addq $0x1, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x21f38
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x21fe0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| next_type:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
loc_21E04:
mov rax, [rbp+var_10]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_39], al
jz short loc_21E39
call ___ctype_b_loc
mov rax, [rax]
mov rcx, [rbp+var_10]
movsx ecx, byte ptr [rcx]
movsxd rcx, ecx
movzx eax, word ptr [rax+rcx*2]
and eax, 2000h
cmp eax, 0
setnz al
mov [rbp+var_39], al
loc_21E39:
mov al, [rbp+var_39]
test al, 1
jnz short loc_21E42
jmp short loc_21E50
loc_21E42:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_21E04
loc_21E50:
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 5Bh ; '['
jnz short loc_21EBF
mov rdi, [rbp+var_10]
add rdi, 1
mov esi, 5Bh ; '['
mov edx, 5Dh ; ']'
call find_end_0
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
jnz short loc_21E93
mov [rbp+var_8], 0
jmp loc_21F38
loc_21E93:
mov rcx, [rbp+var_30]
add rcx, 1
mov rax, [rbp+var_18]
mov [rax], rcx
mov rax, [rbp+var_30]
mov rcx, [rbp+var_28]
sub rax, rcx
mov ecx, eax
mov rax, [rbp+var_20]
mov [rax], ecx
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp short loc_21F38
loc_21EBF:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 7Bh ; '{'
jnz short loc_21F23
mov rdi, [rbp+var_10]
add rdi, 1
mov esi, 7Bh ; '{'
mov edx, 7Dh ; '}'
call find_end_0
mov [rbp+var_38], rax
cmp [rbp+var_38], 0
jnz short loc_21EF7
mov [rbp+var_8], 0
jmp short loc_21F38
loc_21EF7:
mov rcx, [rbp+var_38]
add rcx, 1
mov rax, [rbp+var_18]
mov [rax], rcx
mov rax, [rbp+var_38]
mov rcx, [rbp+var_28]
sub rax, rcx
mov ecx, eax
mov rax, [rbp+var_20]
mov [rax], ecx
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp short loc_21F38
loc_21F23:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call next_name
mov [rbp+var_8], rax
loc_21F38:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long next_type(_BYTE *a1, _QWORD *a2, _DWORD *a3)
{
bool v4; // [rsp+7h] [rbp-39h]
long long v5; // [rsp+8h] [rbp-38h]
long long end_0; // [rsp+10h] [rbp-30h]
while ( 1 )
{
v4 = 0;
if ( *a1 )
v4 = (*(_WORD *)(*(_QWORD *)__ctype_b_loc() + 2LL * (char)*a1) & 0x2000) != 0;
if ( !v4 )
break;
++a1;
}
if ( *a1 == 91 )
{
end_0 = find_end_0(a1 + 1, 91LL, 93LL);
if ( end_0 )
{
*a2 = end_0 + 1;
*a3 = end_0 - (_DWORD)a1;
return (long long)a1;
}
else
{
return 0LL;
}
}
else if ( *a1 == 123 )
{
v5 = find_end_0(a1 + 1, 123LL, 125LL);
if ( v5 )
{
*a2 = v5 + 1;
*a3 = v5 - (_DWORD)a1;
return (long long)a1;
}
else
{
return 0LL;
}
}
else
{
return next_name(a1, a2, a3);
}
}
| next_type:
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
LAB_00121e04:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x39],AL
JZ 0x00121e39
CALL 0x00105090
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x10]
MOVSX ECX,byte ptr [RCX]
MOVSXD RCX,ECX
MOVZX EAX,word ptr [RAX + RCX*0x2]
AND EAX,0x2000
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x39],AL
LAB_00121e39:
MOV AL,byte ptr [RBP + -0x39]
TEST AL,0x1
JNZ 0x00121e42
JMP 0x00121e50
LAB_00121e42:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00121e04
LAB_00121e50:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x5b
JNZ 0x00121ebf
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x1
MOV ESI,0x5b
MOV EDX,0x5d
CALL 0x00121f50
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x00121e93
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00121f38
LAB_00121e93:
MOV RCX,qword ptr [RBP + -0x30]
ADD RCX,0x1
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00121f38
LAB_00121ebf:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x7b
JNZ 0x00121f23
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x1
MOV ESI,0x7b
MOV EDX,0x7d
CALL 0x00121f50
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x00121ef7
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00121f38
LAB_00121ef7:
MOV RCX,qword ptr [RBP + -0x38]
ADD RCX,0x1
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00121f38
LAB_00121f23:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00121fe0
MOV qword ptr [RBP + -0x8],RAX
LAB_00121f38:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
char * next_type(char *param_1,long *param_2,int *param_3)
{
ushort **ppuVar1;
long lVar2;
bool bVar3;
char *local_18;
char *local_10;
local_18 = param_1;
while( true ) {
bVar3 = false;
if (*local_18 != '\0') {
ppuVar1 = __ctype_b_loc();
bVar3 = ((*ppuVar1)[(int)*local_18] & 0x2000) != 0;
}
if (!bVar3) break;
local_18 = local_18 + 1;
}
if (*local_18 == '[') {
lVar2 = find_end(local_18 + 1,0x5b,0x5d);
if (lVar2 == 0) {
local_10 = (char *)0x0;
}
else {
*param_2 = lVar2 + 1;
*param_3 = (int)lVar2 - (int)local_18;
local_10 = local_18;
}
}
else if (*local_18 == '{') {
lVar2 = find_end(local_18 + 1,0x7b,0x7d);
if (lVar2 == 0) {
local_10 = (char *)0x0;
}
else {
*param_2 = lVar2 + 1;
*param_3 = (int)lVar2 - (int)local_18;
local_10 = local_18;
}
}
else {
local_10 = (char *)next_name(local_18,param_2,param_3);
}
return local_10;
}
|
|
6,516 | next_type | corpus-core[P]colibri-stateless/src/util/json_validate.c | static const char* next_type(const char* pos, const char** next, int* len) {
while (*pos && isspace(*pos)) pos++;
const char* start = pos;
if (*pos == '[') {
const char* end = find_end(pos + 1, '[', ']');
if (!end) return NULL;
*next = end + 1;
*len = end - start;
return start;
}
if (*pos == '{') {
const char* end = find_end(pos + 1, '{', '}');
if (!end) return NULL;
*next = end + 1;
*len = end - start;
return start;
}
return next_name(pos, next, len);
} | O1 | c | next_type:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movb (%rdi), %bpl
testb %bpl, %bpl
je 0x185b5
callq 0x5090
movq (%rax), %rdx
leaq 0x1(%r15), %rax
movl %r15d, %ecx
movsbq %bpl, %rsi
testb $0x20, 0x1(%rdx,%rsi,2)
je 0x18570
movb (%rax), %bpl
incq %rax
incl %ecx
testb %bpl, %bpl
jne 0x18550
decq %rax
movq %rax, %r15
jmp 0x185b5
leaq -0x1(%rax), %r15
cmpb $0x5b, %bpl
je 0x185ca
movzbl %bpl, %edx
cmpl $0x7b, %edx
jne 0x185b5
movb (%rax), %sil
testb %sil, %sil
je 0x185fa
movl $0x1, %edx
cmpb $0x7d, %sil
je 0x185a3
movzbl %sil, %esi
cmpl $0x7b, %esi
jne 0x185a7
incl %edx
jmp 0x185a7
decl %edx
je 0x185fc
movb 0x1(%rax), %sil
incq %rax
testb %sil, %sil
jne 0x18590
jmp 0x185fa
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1861f
movb (%rax), %sil
testb %sil, %sil
je 0x185fa
movl $0x1, %edx
cmpb $0x5d, %sil
je 0x185ea
movzbl %sil, %esi
cmpl $0x5b, %esi
jne 0x185ee
incl %edx
jmp 0x185ee
decl %edx
je 0x185fc
movb 0x1(%rax), %sil
incq %rax
testb %sil, %sil
jne 0x185d7
xorl %eax, %eax
testq %rax, %rax
je 0x1860e
leaq 0x1(%rax), %rdx
movq %rdx, (%r14)
subl %ecx, %eax
movl %eax, (%rbx)
jmp 0x18611
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| next_type:
push rbp
push r15
push r14
push rbx
push rax
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov bpl, [rdi]
test bpl, bpl
jz short loc_185B5
call ___ctype_b_loc
mov rdx, [rax]
lea rax, [r15+1]
mov ecx, r15d
loc_18550:
movsx rsi, bpl
test byte ptr [rdx+rsi*2+1], 20h
jz short loc_18570
mov bpl, [rax]
inc rax
inc ecx
test bpl, bpl
jnz short loc_18550
dec rax
mov r15, rax
jmp short loc_185B5
loc_18570:
lea r15, [rax-1]
cmp bpl, 5Bh ; '['
jz short loc_185CA
movzx edx, bpl
cmp edx, 7Bh ; '{'
jnz short loc_185B5
mov sil, [rax]
test sil, sil
jz short loc_185FA
mov edx, 1
loc_18590:
cmp sil, 7Dh ; '}'
jz short loc_185A3
movzx esi, sil
cmp esi, 7Bh ; '{'
jnz short loc_185A7
inc edx
jmp short loc_185A7
loc_185A3:
dec edx
jz short loc_185FC
loc_185A7:
mov sil, [rax+1]
inc rax
test sil, sil
jnz short loc_18590
jmp short loc_185FA
loc_185B5:
mov rdi, r15
mov rsi, r14
mov rdx, rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp short next_name
loc_185CA:
mov sil, [rax]
test sil, sil
jz short loc_185FA
mov edx, 1
loc_185D7:
cmp sil, 5Dh ; ']'
jz short loc_185EA
movzx esi, sil
cmp esi, 5Bh ; '['
jnz short loc_185EE
inc edx
jmp short loc_185EE
loc_185EA:
dec edx
jz short loc_185FC
loc_185EE:
mov sil, [rax+1]
inc rax
test sil, sil
jnz short loc_185D7
loc_185FA:
xor eax, eax
loc_185FC:
test rax, rax
jz short loc_1860E
lea rdx, [rax+1]
mov [r14], rdx
sub eax, ecx
mov [rbx], eax
jmp short loc_18611
loc_1860E:
xor r15d, r15d
loc_18611:
mov rax, r15
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long next_type(char *a1, _QWORD *a2, _DWORD *a3)
{
char *v5; // r15
char v6; // bp
long long v7; // rdx
char *v8; // rax
int v9; // ecx
char v10; // si
int v11; // edx
char v13; // si
int v14; // edx
v5 = a1;
v6 = *a1;
if ( !*a1 )
return next_name(v5, a2, a3);
v7 = *(_QWORD *)__ctype_b_loc(a1);
v8 = a1 + 1;
v9 = (int)a1;
while ( (*(_BYTE *)(v7 + 2LL * v6 + 1) & 0x20) != 0 )
{
v6 = *v8++;
++v9;
if ( !v6 )
{
v5 = v8 - 1;
return next_name(v5, a2, a3);
}
}
v5 = v8 - 1;
if ( v6 == 91 )
{
v13 = *v8;
if ( *v8 )
{
v14 = 1;
do
{
if ( v13 == 93 )
{
if ( !--v14 )
goto LABEL_25;
}
else if ( v13 == 91 )
{
++v14;
}
v13 = *++v8;
}
while ( v13 );
}
goto LABEL_24;
}
if ( v6 != 123 )
return next_name(v5, a2, a3);
v10 = *v8;
if ( *v8 )
{
v11 = 1;
do
{
if ( v10 == 125 )
{
if ( !--v11 )
goto LABEL_25;
}
else if ( v10 == 123 )
{
++v11;
}
v10 = *++v8;
}
while ( v10 );
}
LABEL_24:
v8 = 0LL;
LABEL_25:
if ( !v8 )
return 0LL;
*a2 = v8 + 1;
*a3 = (_DWORD)v8 - v9;
return (long long)v5;
}
| next_type:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
MOV BPL,byte ptr [RDI]
TEST BPL,BPL
JZ 0x001185b5
CALL 0x00105090
MOV RDX,qword ptr [RAX]
LEA RAX,[R15 + 0x1]
MOV ECX,R15D
LAB_00118550:
MOVSX RSI,BPL
TEST byte ptr [RDX + RSI*0x2 + 0x1],0x20
JZ 0x00118570
MOV BPL,byte ptr [RAX]
INC RAX
INC ECX
TEST BPL,BPL
JNZ 0x00118550
DEC RAX
MOV R15,RAX
JMP 0x001185b5
LAB_00118570:
LEA R15,[RAX + -0x1]
CMP BPL,0x5b
JZ 0x001185ca
MOVZX EDX,BPL
CMP EDX,0x7b
JNZ 0x001185b5
MOV SIL,byte ptr [RAX]
TEST SIL,SIL
JZ 0x001185fa
MOV EDX,0x1
LAB_00118590:
CMP SIL,0x7d
JZ 0x001185a3
MOVZX ESI,SIL
CMP ESI,0x7b
JNZ 0x001185a7
INC EDX
JMP 0x001185a7
LAB_001185a3:
DEC EDX
JZ 0x001185fc
LAB_001185a7:
MOV SIL,byte ptr [RAX + 0x1]
INC RAX
TEST SIL,SIL
JNZ 0x00118590
JMP 0x001185fa
LAB_001185b5:
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x0011861f
LAB_001185ca:
MOV SIL,byte ptr [RAX]
TEST SIL,SIL
JZ 0x001185fa
MOV EDX,0x1
LAB_001185d7:
CMP SIL,0x5d
JZ 0x001185ea
MOVZX ESI,SIL
CMP ESI,0x5b
JNZ 0x001185ee
INC EDX
JMP 0x001185ee
LAB_001185ea:
DEC EDX
JZ 0x001185fc
LAB_001185ee:
MOV SIL,byte ptr [RAX + 0x1]
INC RAX
TEST SIL,SIL
JNZ 0x001185d7
LAB_001185fa:
XOR EAX,EAX
LAB_001185fc:
TEST RAX,RAX
JZ 0x0011860e
LEA RDX,[RAX + 0x1]
MOV qword ptr [R14],RDX
SUB EAX,ECX
MOV dword ptr [RBX],EAX
JMP 0x00118611
LAB_0011860e:
XOR R15D,R15D
LAB_00118611:
MOV RAX,R15
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
char * next_type(char *param_1,long *param_2,int *param_3)
{
ushort **ppuVar1;
char *pcVar2;
char *pcVar3;
ulong uVar4;
int iVar5;
char cVar6;
cVar6 = *param_1;
if (cVar6 != '\0') {
ppuVar1 = __ctype_b_loc();
uVar4 = (ulong)param_1 & 0xffffffff;
pcVar3 = param_1 + 1;
do {
pcVar2 = pcVar3;
if ((*(byte *)((long)*ppuVar1 + (long)cVar6 * 2 + 1) & 0x20) == 0) {
param_1 = pcVar2 + -1;
if (cVar6 == '[') {
cVar6 = *pcVar2;
if (cVar6 == '\0') goto LAB_001185fa;
iVar5 = 1;
goto LAB_001185d7;
}
if (cVar6 == '{') {
cVar6 = *pcVar2;
if (cVar6 == '\0') goto LAB_001185fa;
iVar5 = 1;
goto LAB_00118590;
}
break;
}
cVar6 = *pcVar2;
uVar4 = (ulong)((int)uVar4 + 1);
pcVar3 = pcVar2 + 1;
param_1 = pcVar2;
} while (cVar6 != '\0');
}
pcVar3 = (char *)next_name(param_1,param_2,param_3);
return pcVar3;
LAB_001185d7:
do {
if (cVar6 == ']') {
iVar5 = iVar5 + -1;
if (iVar5 == 0) goto LAB_001185fc;
}
else if (cVar6 == '[') {
iVar5 = iVar5 + 1;
}
cVar6 = pcVar2[1];
pcVar2 = pcVar2 + 1;
} while (cVar6 != '\0');
goto LAB_001185fa;
LAB_00118590:
do {
if (cVar6 == '}') {
iVar5 = iVar5 + -1;
if (iVar5 == 0) goto LAB_001185fc;
}
else if (cVar6 == '{') {
iVar5 = iVar5 + 1;
}
cVar6 = pcVar2[1];
pcVar2 = pcVar2 + 1;
} while (cVar6 != '\0');
LAB_001185fa:
pcVar2 = (char *)0x0;
LAB_001185fc:
if (pcVar2 == (char *)0x0) {
param_1 = (char *)0x0;
}
else {
*param_2 = (long)(pcVar2 + 1);
*param_3 = (int)pcVar2 - (int)uVar4;
}
return param_1;
}
|
|
6,517 | next_type | corpus-core[P]colibri-stateless/src/util/json_validate.c | static const char* next_type(const char* pos, const char** next, int* len) {
while (*pos && isspace(*pos)) pos++;
const char* start = pos;
if (*pos == '[') {
const char* end = find_end(pos + 1, '[', ']');
if (!end) return NULL;
*next = end + 1;
*len = end - start;
return start;
}
if (*pos == '{') {
const char* end = find_end(pos + 1, '{', '}');
if (!end) return NULL;
*next = end + 1;
*len = end - start;
return start;
}
return next_name(pos, next, len);
} | O3 | c | next_type:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movb (%rdi), %bpl
testb %bpl, %bpl
je 0x17d37
callq 0x5090
movq (%rax), %rcx
addq $0x2, %r15
movq %r15, %rax
movsbq %bpl, %rdx
testb $0x20, 0x1(%rcx,%rdx,2)
je 0x17ceb
movb -0x1(%rax), %bpl
incq %rax
testb %bpl, %bpl
jne 0x17ccb
addq $-0x2, %rax
movq %rax, %r15
jmp 0x17d37
leaq -0x2(%rax), %r15
cmpb $0x5b, %bpl
je 0x17d4c
movzbl %bpl, %ecx
cmpl $0x7b, %ecx
jne 0x17d37
movb -0x1(%rax), %sil
testb %sil, %sil
je 0x17d83
movl $0x1, %ecx
movl $0x1, %edx
cmpb $0x7d, %sil
je 0x17d24
movzbl %sil, %esi
cmpl $0x7b, %esi
jne 0x17d28
incl %edx
jmp 0x17d28
decl %edx
je 0x17d94
movb (%rax), %sil
incq %rax
incl %ecx
testb %sil, %sil
jne 0x17d11
jmp 0x17d83
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x17d9b
movb -0x1(%rax), %sil
testb %sil, %sil
je 0x17d83
movl $0x1, %ecx
movl $0x1, %edx
cmpb $0x5d, %sil
je 0x17d72
movzbl %sil, %esi
cmpl $0x5b, %esi
jne 0x17d76
incl %edx
jmp 0x17d76
decl %edx
je 0x17d94
movb (%rax), %sil
incq %rax
incl %ecx
testb %sil, %sil
jne 0x17d5f
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, (%r14)
movl %ecx, (%rbx)
jmp 0x17d86
| next_type:
push rbp
push r15
push r14
push rbx
push rax
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov bpl, [rdi]
test bpl, bpl
jz short loc_17D37
call ___ctype_b_loc
mov rcx, [rax]
add r15, 2
mov rax, r15
loc_17CCB:
movsx rdx, bpl
test byte ptr [rcx+rdx*2+1], 20h
jz short loc_17CEB
mov bpl, [rax-1]
inc rax
test bpl, bpl
jnz short loc_17CCB
add rax, 0FFFFFFFFFFFFFFFEh
mov r15, rax
jmp short loc_17D37
loc_17CEB:
lea r15, [rax-2]
cmp bpl, 5Bh ; '['
jz short loc_17D4C
movzx ecx, bpl
cmp ecx, 7Bh ; '{'
jnz short loc_17D37
mov sil, [rax-1]
test sil, sil
jz short loc_17D83
mov ecx, 1
mov edx, 1
loc_17D11:
cmp sil, 7Dh ; '}'
jz short loc_17D24
movzx esi, sil
cmp esi, 7Bh ; '{'
jnz short loc_17D28
inc edx
jmp short loc_17D28
loc_17D24:
dec edx
jz short loc_17D94
loc_17D28:
mov sil, [rax]
inc rax
inc ecx
test sil, sil
jnz short loc_17D11
jmp short loc_17D83
loc_17D37:
mov rdi, r15
mov rsi, r14
mov rdx, rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp short next_name
loc_17D4C:
mov sil, [rax-1]
test sil, sil
jz short loc_17D83
mov ecx, 1
mov edx, 1
loc_17D5F:
cmp sil, 5Dh ; ']'
jz short loc_17D72
movzx esi, sil
cmp esi, 5Bh ; '['
jnz short loc_17D76
inc edx
jmp short loc_17D76
loc_17D72:
dec edx
jz short loc_17D94
loc_17D76:
mov sil, [rax]
inc rax
inc ecx
test sil, sil
jnz short loc_17D5F
loc_17D83:
xor r15d, r15d
loc_17D86:
mov rax, r15
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_17D94:
mov [r14], rax
mov [rbx], ecx
jmp short loc_17D86
| long long next_type(char *a1, char **a2, int *a3)
{
char *v5; // r15
char v6; // bp
long long v7; // rcx
char *v8; // rax
char v9; // si
int v10; // ecx
int v11; // edx
char v13; // si
int v14; // edx
v5 = a1;
v6 = *a1;
if ( !*a1 )
return next_name(v5, a2, a3);
v7 = *(_QWORD *)__ctype_b_loc(a1);
v8 = a1 + 2;
while ( (*(_BYTE *)(v7 + 2LL * v6 + 1) & 0x20) != 0 )
{
v6 = *(v8++ - 1);
if ( !v6 )
{
v5 = v8 - 2;
return next_name(v5, a2, a3);
}
}
v5 = v8 - 2;
if ( v6 != 91 )
{
if ( v6 != 123 )
return next_name(v5, a2, a3);
v9 = *(v8 - 1);
if ( v9 )
{
v10 = 1;
v11 = 1;
do
{
if ( v9 == 125 )
{
if ( !--v11 )
goto LABEL_26;
}
else if ( v9 == 123 )
{
++v11;
}
v9 = *v8++;
++v10;
}
while ( v9 );
}
return 0LL;
}
v13 = *(v8 - 1);
if ( !v13 )
return 0LL;
v10 = 1;
v14 = 1;
while ( 1 )
{
if ( v13 != 93 )
{
if ( v13 == 91 )
++v14;
goto LABEL_23;
}
if ( !--v14 )
break;
LABEL_23:
v13 = *v8++;
++v10;
if ( !v13 )
return 0LL;
}
LABEL_26:
*a2 = v8;
*a3 = v10;
return (long long)v5;
}
| next_type:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
MOV BPL,byte ptr [RDI]
TEST BPL,BPL
JZ 0x00117d37
CALL 0x00105090
MOV RCX,qword ptr [RAX]
ADD R15,0x2
MOV RAX,R15
LAB_00117ccb:
MOVSX RDX,BPL
TEST byte ptr [RCX + RDX*0x2 + 0x1],0x20
JZ 0x00117ceb
MOV BPL,byte ptr [RAX + -0x1]
INC RAX
TEST BPL,BPL
JNZ 0x00117ccb
ADD RAX,-0x2
MOV R15,RAX
JMP 0x00117d37
LAB_00117ceb:
LEA R15,[RAX + -0x2]
CMP BPL,0x5b
JZ 0x00117d4c
MOVZX ECX,BPL
CMP ECX,0x7b
JNZ 0x00117d37
MOV SIL,byte ptr [RAX + -0x1]
TEST SIL,SIL
JZ 0x00117d83
MOV ECX,0x1
MOV EDX,0x1
LAB_00117d11:
CMP SIL,0x7d
JZ 0x00117d24
MOVZX ESI,SIL
CMP ESI,0x7b
JNZ 0x00117d28
INC EDX
JMP 0x00117d28
LAB_00117d24:
DEC EDX
JZ 0x00117d94
LAB_00117d28:
MOV SIL,byte ptr [RAX]
INC RAX
INC ECX
TEST SIL,SIL
JNZ 0x00117d11
JMP 0x00117d83
LAB_00117d37:
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00117d9b
LAB_00117d4c:
MOV SIL,byte ptr [RAX + -0x1]
TEST SIL,SIL
JZ 0x00117d83
MOV ECX,0x1
MOV EDX,0x1
LAB_00117d5f:
CMP SIL,0x5d
JZ 0x00117d72
MOVZX ESI,SIL
CMP ESI,0x5b
JNZ 0x00117d76
INC EDX
JMP 0x00117d76
LAB_00117d72:
DEC EDX
JZ 0x00117d94
LAB_00117d76:
MOV SIL,byte ptr [RAX]
INC RAX
INC ECX
TEST SIL,SIL
JNZ 0x00117d5f
LAB_00117d83:
XOR R15D,R15D
LAB_00117d86:
MOV RAX,R15
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00117d94:
MOV qword ptr [R14],RAX
MOV dword ptr [RBX],ECX
JMP 0x00117d86
|
char * next_type(char *param_1,int8 *param_2,int *param_3)
{
ushort **ppuVar1;
char *pcVar2;
char *pcVar3;
int iVar4;
int iVar5;
char cVar6;
cVar6 = *param_1;
if (cVar6 != '\0') {
ppuVar1 = __ctype_b_loc();
pcVar3 = param_1 + 2;
do {
pcVar2 = pcVar3;
if ((*(byte *)((long)*ppuVar1 + (long)cVar6 * 2 + 1) & 0x20) == 0) {
param_1 = pcVar2 + -2;
if (cVar6 == '[') {
cVar6 = pcVar2[-1];
if (cVar6 == '\0') {
return (char *)0x0;
}
iVar4 = 1;
iVar5 = 1;
goto LAB_00117d5f;
}
if (cVar6 != '{') goto LAB_00117d37;
cVar6 = pcVar2[-1];
if (cVar6 == '\0') {
return (char *)0x0;
}
iVar4 = 1;
iVar5 = 1;
goto LAB_00117d11;
}
cVar6 = pcVar2[-1];
pcVar3 = pcVar2 + 1;
} while (cVar6 != '\0');
param_1 = pcVar2 + -1;
}
LAB_00117d37:
pcVar3 = (char *)next_name(param_1,param_2,param_3);
return pcVar3;
LAB_00117d5f:
if (cVar6 == ']') {
iVar5 = iVar5 + -1;
if (iVar5 == 0) goto LAB_00117d94;
}
else if (cVar6 == '[') {
iVar5 = iVar5 + 1;
}
cVar6 = *pcVar2;
pcVar2 = pcVar2 + 1;
iVar4 = iVar4 + 1;
if (cVar6 == '\0') {
return (char *)0x0;
}
goto LAB_00117d5f;
LAB_00117d11:
if (cVar6 == '}') {
iVar5 = iVar5 + -1;
if (iVar5 == 0) {
LAB_00117d94:
*param_2 = pcVar2;
*param_3 = iVar4;
return param_1;
}
}
else if (cVar6 == '{') {
iVar5 = iVar5 + 1;
}
cVar6 = *pcVar2;
pcVar2 = pcVar2 + 1;
iVar4 = iVar4 + 1;
if (cVar6 == '\0') {
return (char *)0x0;
}
goto LAB_00117d11;
}
|
|
6,518 | gguf_write_to_buf(gguf_context const*, std::vector<signed char, std::allocator<signed char>>&, bool) | Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp | void gguf_write_to_buf(const struct gguf_context * ctx, std::vector<int8_t> & buf, bool only_meta) {
const struct gguf_writer gw(buf);
const int64_t n_kv = gguf_get_n_kv(ctx);
const int64_t n_tensors = gguf_get_n_tensors(ctx);
// write header
gw.write(GGUF_MAGIC[0]);
gw.write(GGUF_MAGIC[1]);
gw.write(GGUF_MAGIC[2]);
gw.write(GGUF_MAGIC[3]);
gw.write(ctx->version);
gw.write(n_tensors);
gw.write(n_kv);
// write key-value pairs
for (int64_t i = 0; i < n_kv; ++i) {
gw.write(ctx->kv[i]);
}
// write tensor info
for (int64_t i = 0; i < n_tensors; ++i) {
gw.write_tensor_meta(ctx->info[i]);
}
// we require the data section to be aligned
gw.pad(ctx->alignment);
if (only_meta) {
return;
}
const size_t offset_data = gw.buf.size();
// write tensor data
for (int64_t i = 0; i < n_tensors; ++i) {
gw.write_tensor_data(ctx->info[i], offset_data, ctx->alignment);
}
} | O0 | cpp | gguf_write_to_buf(gguf_context const*, std::vector<signed char, std::allocator<signed char>>&, bool):
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0x44650
movq -0x8(%rbp), %rdi
callq 0x49eb0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0x49d90
movq %rax, -0x30(%rbp)
leaq -0x20(%rbp), %rdi
leaq 0x33b2e(%rip), %rsi # 0xc2377
callq 0x47360
leaq -0x20(%rbp), %rdi
leaq 0x33b1e(%rip), %rsi # 0xc2377
addq $0x1, %rsi
callq 0x47360
leaq -0x20(%rbp), %rdi
leaq 0x33b0a(%rip), %rsi # 0xc2377
addq $0x2, %rsi
callq 0x47360
leaq -0x20(%rbp), %rdi
leaq 0x33af6(%rip), %rsi # 0xc2377
addq $0x3, %rsi
callq 0x47360
movq -0x8(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0x48680
leaq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x481e0
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x481e0
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x28(%rbp), %rax
jge 0x8e8ee
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
movq -0x38(%rbp), %rsi
callq 0x455e0
movq %rax, %rsi
leaq -0x20(%rbp), %rdi
callq 0x42150
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x8e8b9
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x30(%rbp), %rax
jge 0x8e92b
movq -0x8(%rbp), %rdi
addq $0x20, %rdi
movq -0x40(%rbp), %rsi
callq 0x48b30
movq %rax, %rsi
leaq -0x20(%rbp), %rdi
callq 0x44840
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x8e8f6
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rsi
leaq -0x20(%rbp), %rdi
callq 0x46740
testb $0x1, -0x11(%rbp)
je 0x8e944
jmp 0x8e99a
movq -0x20(%rbp), %rdi
callq 0x49650
movq %rax, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x30(%rbp), %rax
jge 0x8e99a
movq -0x8(%rbp), %rdi
addq $0x20, %rdi
movq -0x50(%rbp), %rsi
callq 0x48b30
movq %rax, %rsi
movq -0x48(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rcx
leaq -0x20(%rbp), %rdi
callq 0x42660
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x8e959
addq $0x50, %rsp
popq %rbp
retq
| _Z17gguf_write_to_bufPK12gguf_contextRSt6vectorIaSaIaEEb:
push rbp
mov rbp, rsp
sub rsp, 50h
mov al, dl
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
and al, 1
mov [rbp+var_11], al
mov rsi, [rbp+var_10]
lea rdi, [rbp+var_20]
call __ZN11gguf_writerC2ERSt6vectorIaSaIaEE; gguf_writer::gguf_writer(std::vector<signed char> &)
mov rdi, [rbp+var_8]
call _gguf_get_n_kv
mov [rbp+var_28], rax
mov rdi, [rbp+var_8]
call _gguf_get_n_tensors
mov [rbp+var_30], rax
lea rdi, [rbp+var_20]
lea rsi, aGguf; "GGUF"
call __ZNK11gguf_writer5writeIcEEvRKT_; gguf_writer::write<char>(char const&)
lea rdi, [rbp+var_20]
lea rsi, aGguf; "GGUF"
add rsi, 1
call __ZNK11gguf_writer5writeIcEEvRKT_; gguf_writer::write<char>(char const&)
lea rdi, [rbp+var_20]
lea rsi, aGguf; "GGUF"
add rsi, 2
call __ZNK11gguf_writer5writeIcEEvRKT_; gguf_writer::write<char>(char const&)
lea rdi, [rbp+var_20]
lea rsi, aGguf; "GGUF"
add rsi, 3
call __ZNK11gguf_writer5writeIcEEvRKT_; gguf_writer::write<char>(char const&)
mov rsi, [rbp+var_8]
lea rdi, [rbp+var_20]
call __ZNK11gguf_writer5writeIjEEvRKT_; gguf_writer::write<uint>(uint const&)
lea rdi, [rbp+var_20]
lea rsi, [rbp+var_30]
call __ZNK11gguf_writer5writeIlEEvRKT_; gguf_writer::write<long>(long const&)
lea rdi, [rbp+var_20]
lea rsi, [rbp+var_28]
call __ZNK11gguf_writer5writeIlEEvRKT_; gguf_writer::write<long>(long const&)
mov [rbp+var_38], 0
loc_8E8B9:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_28]
jge short loc_8E8EE
mov rdi, [rbp+var_8]
add rdi, 8
mov rsi, [rbp+var_38]
call __ZNKSt6vectorI7gguf_kvSaIS0_EEixEm; std::vector<gguf_kv>::operator[](ulong)
mov rsi, rax; gguf_kv *
lea rdi, [rbp+var_20]; this
call __ZNK11gguf_writer5writeERK7gguf_kv; gguf_writer::write(gguf_kv const&)
mov rax, [rbp+var_38]
add rax, 1
mov [rbp+var_38], rax
jmp short loc_8E8B9
loc_8E8EE:
mov [rbp+var_40], 0
loc_8E8F6:
mov rax, [rbp+var_40]
cmp rax, [rbp+var_30]
jge short loc_8E92B
mov rdi, [rbp+var_8]
add rdi, 20h ; ' '
mov rsi, [rbp+var_40]
call __ZNKSt6vectorI16gguf_tensor_infoSaIS0_EEixEm; std::vector<gguf_tensor_info>::operator[](ulong)
mov rsi, rax
lea rdi, [rbp+var_20]
call __ZNK11gguf_writer17write_tensor_metaERK16gguf_tensor_info; gguf_writer::write_tensor_meta(gguf_tensor_info const&)
mov rax, [rbp+var_40]
add rax, 1
mov [rbp+var_40], rax
jmp short loc_8E8F6
loc_8E92B:
mov rax, [rbp+var_8]
mov rsi, [rax+38h]; unsigned __int64
lea rdi, [rbp+var_20]; this
call __ZNK11gguf_writer3padEm; gguf_writer::pad(ulong)
test [rbp+var_11], 1
jz short loc_8E944
jmp short loc_8E99A
loc_8E944:
mov rdi, [rbp+var_20]
call __ZNKSt6vectorIaSaIaEE4sizeEv; std::vector<signed char>::size(void)
mov [rbp+var_48], rax
mov [rbp+var_50], 0
loc_8E959:
mov rax, [rbp+var_50]
cmp rax, [rbp+var_30]
jge short loc_8E99A
mov rdi, [rbp+var_8]
add rdi, 20h ; ' '
mov rsi, [rbp+var_50]
call __ZNKSt6vectorI16gguf_tensor_infoSaIS0_EEixEm; std::vector<gguf_tensor_info>::operator[](ulong)
mov rsi, rax
mov rdx, [rbp+var_48]
mov rax, [rbp+var_8]
mov rcx, [rax+38h]
lea rdi, [rbp+var_20]
call __ZNK11gguf_writer17write_tensor_dataERK16gguf_tensor_infomm; gguf_writer::write_tensor_data(gguf_tensor_info const&,ulong,ulong)
mov rax, [rbp+var_50]
add rax, 1
mov [rbp+var_50], rax
jmp short loc_8E959
loc_8E99A:
add rsp, 50h
pop rbp
retn
| long long gguf_write_to_buf(long long a1, long long a2, char a3)
{
const gguf_kv *v3; // rax
long long v4; // rax
long long result; // rax
long long v6; // rax
long long k; // [rsp+0h] [rbp-50h]
long long v8; // [rsp+8h] [rbp-48h]
long long j; // [rsp+10h] [rbp-40h]
long long i; // [rsp+18h] [rbp-38h]
long long n_tensors; // [rsp+20h] [rbp-30h] BYREF
long long n_kv; // [rsp+28h] [rbp-28h] BYREF
long long v13; // [rsp+30h] [rbp-20h] BYREF
char v14; // [rsp+3Fh] [rbp-11h]
long long v15; // [rsp+40h] [rbp-10h]
long long v16; // [rsp+48h] [rbp-8h]
v16 = a1;
v15 = a2;
v14 = a3 & 1;
gguf_writer::gguf_writer(&v13, a2);
n_kv = gguf_get_n_kv(v16);
n_tensors = gguf_get_n_tensors(v16);
gguf_writer::write<char>(&v13, "GGUF");
gguf_writer::write<char>(&v13, "GUF");
gguf_writer::write<char>(&v13, "UF");
gguf_writer::write<char>(&v13, "F");
gguf_writer::write<unsigned int>(&v13, v16);
gguf_writer::write<long>(&v13, &n_tensors);
gguf_writer::write<long>(&v13, &n_kv);
for ( i = 0LL; i < n_kv; ++i )
{
v3 = (const gguf_kv *)std::vector<gguf_kv>::operator[](v16 + 8, i);
gguf_writer::write((gguf_writer *)&v13, v3);
}
for ( j = 0LL; j < n_tensors; ++j )
{
v4 = std::vector<gguf_tensor_info>::operator[](v16 + 32, j);
gguf_writer::write_tensor_meta(&v13, v4);
}
result = gguf_writer::pad((gguf_writer *)&v13, *(_QWORD *)(v16 + 56));
if ( (v14 & 1) == 0 )
{
v8 = std::vector<signed char>::size(v13);
for ( k = 0LL; ; ++k )
{
result = k;
if ( k >= n_tensors )
break;
v6 = std::vector<gguf_tensor_info>::operator[](v16 + 32, k);
gguf_writer::write_tensor_data(&v13, v6, v8, *(_QWORD *)(v16 + 56));
}
}
return result;
}
| gguf_write_to_buf:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV AL,DL
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
AND AL,0x1
MOV byte ptr [RBP + -0x11],AL
MOV RSI,qword ptr [RBP + -0x10]
LEA RDI,[RBP + -0x20]
CALL 0x00144650
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00149eb0
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00149d90
MOV qword ptr [RBP + -0x30],RAX
LEA RDI,[RBP + -0x20]
LEA RSI,[0x1c2377]
CALL 0x00147360
LEA RDI,[RBP + -0x20]
LEA RSI,[0x1c2377]
ADD RSI,0x1
CALL 0x00147360
LEA RDI,[RBP + -0x20]
LEA RSI,[0x1c2377]
ADD RSI,0x2
CALL 0x00147360
LEA RDI,[RBP + -0x20]
LEA RSI,[0x1c2377]
ADD RSI,0x3
CALL 0x00147360
MOV RSI,qword ptr [RBP + -0x8]
LEA RDI,[RBP + -0x20]
CALL 0x00148680
LEA RDI,[RBP + -0x20]
LEA RSI,[RBP + -0x30]
CALL 0x001481e0
LEA RDI,[RBP + -0x20]
LEA RSI,[RBP + -0x28]
CALL 0x001481e0
MOV qword ptr [RBP + -0x38],0x0
LAB_0018e8b9:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x28]
JGE 0x0018e8ee
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x8
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x001455e0
MOV RSI,RAX
LEA RDI,[RBP + -0x20]
CALL 0x00142150
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0018e8b9
LAB_0018e8ee:
MOV qword ptr [RBP + -0x40],0x0
LAB_0018e8f6:
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x30]
JGE 0x0018e92b
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x20
MOV RSI,qword ptr [RBP + -0x40]
CALL 0x00148b30
MOV RSI,RAX
LEA RDI,[RBP + -0x20]
CALL 0x00144840
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0018e8f6
LAB_0018e92b:
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RAX + 0x38]
LEA RDI,[RBP + -0x20]
CALL 0x00146740
TEST byte ptr [RBP + -0x11],0x1
JZ 0x0018e944
JMP 0x0018e99a
LAB_0018e944:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00149650
MOV qword ptr [RBP + -0x48],RAX
MOV qword ptr [RBP + -0x50],0x0
LAB_0018e959:
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x30]
JGE 0x0018e99a
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x20
MOV RSI,qword ptr [RBP + -0x50]
CALL 0x00148b30
MOV RSI,RAX
MOV RDX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x38]
LEA RDI,[RBP + -0x20]
CALL 0x00142660
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x1
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0018e959
LAB_0018e99a:
ADD RSP,0x50
POP RBP
RET
|
/* gguf_write_to_buf(gguf_context const*, std::vector<signed char, std::allocator<signed char> >&,
bool) */
void gguf_write_to_buf(gguf_context *param_1,vector *param_2,bool param_3)
{
gguf_kv *pgVar1;
gguf_tensor_info *pgVar2;
ulong uVar3;
ulong local_58;
ulong local_48;
ulong local_40;
long local_38;
long local_30;
vector<signed_char,std::allocator<signed_char>> *local_28;
byte local_19;
vector *local_18;
gguf_context *local_10;
local_19 = param_3;
local_18 = param_2;
local_10 = param_1;
gguf_writer::gguf_writer((gguf_writer *)&local_28,param_2);
local_30 = gguf_get_n_kv(local_10);
local_38 = gguf_get_n_tensors(local_10);
gguf_writer::write<char>((gguf_writer *)&local_28,"GGUF");
gguf_writer::write<char>((gguf_writer *)&local_28,"GUF");
gguf_writer::write<char>((gguf_writer *)&local_28,"UF");
gguf_writer::write<char>((gguf_writer *)&local_28,"F");
gguf_writer::write<unsigned_int>((gguf_writer *)&local_28,(uint *)local_10);
gguf_writer::write<long>((gguf_writer *)&local_28,&local_38);
gguf_writer::write<long>((gguf_writer *)&local_28,&local_30);
for (local_40 = 0; (long)local_40 < local_30; local_40 = local_40 + 1) {
pgVar1 = (gguf_kv *)
std::vector<gguf_kv,std::allocator<gguf_kv>>::operator[]
((vector<gguf_kv,std::allocator<gguf_kv>> *)(local_10 + 8),local_40);
gguf_writer::write((gguf_writer *)&local_28,pgVar1);
}
for (local_48 = 0; (long)local_48 < local_38; local_48 = local_48 + 1) {
pgVar2 = (gguf_tensor_info *)
std::vector<gguf_tensor_info,std::allocator<gguf_tensor_info>>::operator[]
((vector<gguf_tensor_info,std::allocator<gguf_tensor_info>> *)
(local_10 + 0x20),local_48);
gguf_writer::write_tensor_meta((gguf_writer *)&local_28,pgVar2);
}
gguf_writer::pad((gguf_writer *)&local_28,*(ulong *)(local_10 + 0x38));
if ((local_19 & 1) == 0) {
uVar3 = std::vector<signed_char,std::allocator<signed_char>>::size(local_28);
for (local_58 = 0; (long)local_58 < local_38; local_58 = local_58 + 1) {
pgVar2 = (gguf_tensor_info *)
std::vector<gguf_tensor_info,std::allocator<gguf_tensor_info>>::operator[]
((vector<gguf_tensor_info,std::allocator<gguf_tensor_info>> *)
(local_10 + 0x20),local_58);
gguf_writer::write_tensor_data
((gguf_writer *)&local_28,pgVar2,uVar3,*(ulong *)(local_10 + 0x38));
}
}
return;
}
|
|
6,519 | gguf_write_to_buf(gguf_context const*, std::vector<signed char, std::allocator<signed char>>&, bool) | Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp | void gguf_write_to_buf(const struct gguf_context * ctx, std::vector<int8_t> & buf, bool only_meta) {
const struct gguf_writer gw(buf);
const int64_t n_kv = gguf_get_n_kv(ctx);
const int64_t n_tensors = gguf_get_n_tensors(ctx);
// write header
gw.write(GGUF_MAGIC[0]);
gw.write(GGUF_MAGIC[1]);
gw.write(GGUF_MAGIC[2]);
gw.write(GGUF_MAGIC[3]);
gw.write(ctx->version);
gw.write(n_tensors);
gw.write(n_kv);
// write key-value pairs
for (int64_t i = 0; i < n_kv; ++i) {
gw.write(ctx->kv[i]);
}
// write tensor info
for (int64_t i = 0; i < n_tensors; ++i) {
gw.write_tensor_meta(ctx->info[i]);
}
// we require the data section to be aligned
gw.pad(ctx->alignment);
if (only_meta) {
return;
}
const size_t offset_data = gw.buf.size();
// write tensor data
for (int64_t i = 0; i < n_tensors; ++i) {
gw.write_tensor_data(ctx->info[i], offset_data, ctx->alignment);
}
} | O3 | cpp | gguf_write_to_buf(gguf_context const*, std::vector<signed char, std::allocator<signed char>>&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, 0x10(%rsp)
movq 0x10(%rdi), %rax
subq 0x8(%rdi), %rax
sarq $0x3, %rax
movabsq $0x2e8ba2e8ba2e8ba3, %r13 # imm = 0x2E8BA2E8BA2E8BA3
imulq %r13, %rax
movq %rax, 0x20(%rsp)
movq 0x28(%rdi), %rax
subq 0x20(%rdi), %rax
movl %edx, 0x1c(%rsp)
sarq $0x3, %rax
movabsq $-0x7d05f417d05f417d, %r12 # imm = 0x82FA0BE82FA0BE83
imulq %r12, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsi), %rsi
cmpq 0x10(%r14), %rsi
je 0x40235
movb $0x47, (%rsi)
movq 0x8(%r14), %rsi
incq %rsi
movq %rsi, 0x8(%r14)
jmp 0x40248
leaq 0x1d04f(%rip), %rdx # 0x5d28b
movq %r14, %rdi
callq 0x17870
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x4025e
movb $0x47, (%rsi)
movq 0x8(%r14), %rsi
incq %rsi
movq %rsi, 0x8(%r14)
jmp 0x40271
leaq 0x1d027(%rip), %rdx # 0x5d28c
movq %r14, %rdi
callq 0x17870
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x40287
movb $0x55, (%rsi)
movq 0x8(%r14), %rsi
incq %rsi
movq %rsi, 0x8(%r14)
jmp 0x4029a
leaq 0x1cfff(%rip), %rdx # 0x5d28d
movq %r14, %rdi
callq 0x17870
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x402a9
movb $0x46, (%rsi)
incq 0x8(%r14)
jmp 0x402b8
leaq 0x1cfde(%rip), %rdx # 0x5d28e
movq %r14, %rdi
callq 0x17870
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x17b90
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x17a80
leaq 0x20(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x17a80
cmpq $0x0, (%r15)
jle 0x4032a
xorl %r15d, %r15d
leaq 0x10(%rsp), %r14
xorl %ebp, %ebp
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rax
subq %rsi, %rax
sarq $0x3, %rax
imulq %r13, %rax
cmpq %rbp, %rax
jbe 0x403f0
addq %r15, %rsi
movq %r14, %rdi
callq 0x16070
incq %rbp
addq $0x58, %r15
cmpq 0x20(%rsp), %rbp
jl 0x402f5
cmpq $0x0, 0x8(%rsp)
jle 0x40375
xorl %r15d, %r15d
leaq 0x10(%rsp), %r14
xorl %r13d, %r13d
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rax
subq %rsi, %rax
sarq $0x3, %rax
imulq %r12, %rax
cmpq %r13, %rax
jbe 0x403f5
addq %r15, %rsi
movq %r14, %rdi
callq 0x16b20
incq %r13
addq $0x158, %r15 # imm = 0x158
cmpq 0x8(%rsp), %r13
jl 0x4033d
movq 0x38(%rbx), %rsi
leaq 0x10(%rsp), %rdi
callq 0x17350
cmpb $0x0, 0x1c(%rsp)
jne 0x403e1
cmpq $0x0, 0x8(%rsp)
jle 0x403e1
leaq 0x10(%rsp), %r14
movq (%r14), %rax
movq 0x8(%rax), %r15
subq (%rax), %r15
xorl %r13d, %r13d
xorl %ebp, %ebp
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rax
subq %rsi, %rax
sarq $0x3, %rax
imulq %r12, %rax
cmpq %rbp, %rax
jbe 0x403fa
addq %r13, %rsi
movq 0x38(%rbx), %rcx
movq %r14, %rdi
movq %r15, %rdx
callq 0x161d0
incq %rbp
addq $0x158, %r13 # imm = 0x158
cmpq 0x8(%rsp), %rbp
jl 0x403a6
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x18e48
callq 0x18e68
callq 0x18e88
| _Z17gguf_write_to_bufPK12gguf_contextRSt6vectorIaSaIaEEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, rsi
mov rbx, rdi
mov [rsp+58h+var_48], rsi
mov rax, [rdi+10h]
sub rax, [rdi+8]
sar rax, 3
mov r13, 2E8BA2E8BA2E8BA3h
imul rax, r13
mov [rsp+58h+var_38], rax
mov rax, [rdi+28h]
sub rax, [rdi+20h]
mov [rsp+58h+var_3C], edx
sar rax, 3
mov r12, 82FA0BE82FA0BE83h
imul rax, r12
mov [rsp+58h+var_50], rax
mov rsi, [rsi+8]
cmp rsi, [r14+10h]
jz short loc_40235
mov byte ptr [rsi], 47h ; 'G'
mov rsi, [r14+8]
inc rsi
mov [r14+8], rsi
jmp short loc_40248
loc_40235:
lea rdx, aGguf; "GGUF"
mov rdi, r14
call __ZNSt6vectorIaSaIaEE17_M_realloc_insertIJRKaEEEvN9__gnu_cxx17__normal_iteratorIPaS1_EEDpOT_; std::vector<signed char>::_M_realloc_insert<signed char const&>(__gnu_cxx::__normal_iterator<signed char *,std::vector<signed char>>,signed char const&)
mov rsi, [r14+8]
loc_40248:
cmp rsi, [r14+10h]
jz short loc_4025E
mov byte ptr [rsi], 47h ; 'G'
mov rsi, [r14+8]
inc rsi
mov [r14+8], rsi
jmp short loc_40271
loc_4025E:
lea rdx, aGguf+1; "GUF"
mov rdi, r14
call __ZNSt6vectorIaSaIaEE17_M_realloc_insertIJRKaEEEvN9__gnu_cxx17__normal_iteratorIPaS1_EEDpOT_; std::vector<signed char>::_M_realloc_insert<signed char const&>(__gnu_cxx::__normal_iterator<signed char *,std::vector<signed char>>,signed char const&)
mov rsi, [r14+8]
loc_40271:
cmp rsi, [r14+10h]
jz short loc_40287
mov byte ptr [rsi], 55h ; 'U'
mov rsi, [r14+8]
inc rsi
mov [r14+8], rsi
jmp short loc_4029A
loc_40287:
lea rdx, aGguf+2; "UF"
mov rdi, r14
call __ZNSt6vectorIaSaIaEE17_M_realloc_insertIJRKaEEEvN9__gnu_cxx17__normal_iteratorIPaS1_EEDpOT_; std::vector<signed char>::_M_realloc_insert<signed char const&>(__gnu_cxx::__normal_iterator<signed char *,std::vector<signed char>>,signed char const&)
mov rsi, [r14+8]
loc_4029A:
cmp rsi, [r14+10h]
jz short loc_402A9
mov byte ptr [rsi], 46h ; 'F'
inc qword ptr [r14+8]
jmp short loc_402B8
loc_402A9:
lea rdx, aGguf+3; "F"
mov rdi, r14
call __ZNSt6vectorIaSaIaEE17_M_realloc_insertIJRKaEEEvN9__gnu_cxx17__normal_iteratorIPaS1_EEDpOT_; std::vector<signed char>::_M_realloc_insert<signed char const&>(__gnu_cxx::__normal_iterator<signed char *,std::vector<signed char>>,signed char const&)
loc_402B8:
lea r14, [rsp+58h+var_48]
mov rdi, r14
mov rsi, rbx
call __ZNK11gguf_writer5writeIjEEvRKT_; gguf_writer::write<uint>(uint const&)
lea rsi, [rsp+58h+var_50]
mov rdi, r14
call __ZNK11gguf_writer5writeIlEEvRKT_; gguf_writer::write<long>(long const&)
lea r15, [rsp+58h+var_38]
mov rdi, r14
mov rsi, r15
call __ZNK11gguf_writer5writeIlEEvRKT_; gguf_writer::write<long>(long const&)
cmp qword ptr [r15], 0
jle short loc_4032A
xor r15d, r15d
lea r14, [rsp+58h+var_48]
xor ebp, ebp
loc_402F5:
mov rsi, [rbx+8]
mov rax, [rbx+10h]
sub rax, rsi
sar rax, 3
imul rax, r13
cmp rax, rbp
jbe loc_403F0
add rsi, r15; gguf_kv *
mov rdi, r14; this
call __ZNK11gguf_writer5writeERK7gguf_kv; gguf_writer::write(gguf_kv const&)
inc rbp
add r15, 58h ; 'X'
cmp rbp, [rsp+58h+var_38]
jl short loc_402F5
loc_4032A:
cmp [rsp+58h+var_50], 0
jle short loc_40375
xor r15d, r15d
lea r14, [rsp+58h+var_48]
xor r13d, r13d
loc_4033D:
mov rsi, [rbx+20h]
mov rax, [rbx+28h]
sub rax, rsi
sar rax, 3
imul rax, r12
cmp rax, r13
jbe loc_403F5
add rsi, r15
mov rdi, r14
call __ZNK11gguf_writer17write_tensor_metaERK16gguf_tensor_info; gguf_writer::write_tensor_meta(gguf_tensor_info const&)
inc r13
add r15, 158h
cmp r13, [rsp+58h+var_50]
jl short loc_4033D
loc_40375:
mov rsi, [rbx+38h]; unsigned __int64
lea rdi, [rsp+58h+var_48]; this
call __ZNK11gguf_writer3padEm; gguf_writer::pad(ulong)
cmp byte ptr [rsp+58h+var_3C], 0
jnz short loc_403E1
cmp [rsp+58h+var_50], 0
jle short loc_403E1
lea r14, [rsp+58h+var_48]
mov rax, [r14]
mov r15, [rax+8]
sub r15, [rax]
xor r13d, r13d
xor ebp, ebp
loc_403A6:
mov rsi, [rbx+20h]
mov rax, [rbx+28h]
sub rax, rsi
sar rax, 3
imul rax, r12
cmp rax, rbp
jbe short loc_403FA
add rsi, r13
mov rcx, [rbx+38h]
mov rdi, r14; this
mov rdx, r15
call __ZNK11gguf_writer17write_tensor_dataERK16gguf_tensor_infomm; gguf_writer::write_tensor_data(gguf_tensor_info const&,ulong,ulong)
inc rbp
add r13, 158h
cmp rbp, [rsp+58h+var_50]
jl short loc_403A6
loc_403E1:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_403F0:
call _Z17gguf_write_to_bufPK12gguf_contextRSt6vectorIaSaIaEEb_cold_1; gguf_write_to_buf(gguf_context const*,std::vector<signed char> &,bool) [clone]
loc_403F5:
call _Z17gguf_write_to_bufPK12gguf_contextRSt6vectorIaSaIaEEb_cold_2; gguf_write_to_buf(gguf_context const*,std::vector<signed char> &,bool) [clone]
loc_403FA:
call _Z17gguf_write_to_bufPK12gguf_contextRSt6vectorIaSaIaEEb_cold_3; gguf_write_to_buf(gguf_context const*,std::vector<signed char> &,bool) [clone]
| long long gguf_write_to_buf(_QWORD *a1, long long a2, int a3)
{
long long v4; // rax
_BYTE *v5; // rsi
_BYTE *v6; // rsi
_BYTE *v7; // rsi
_BYTE *v8; // rsi
long long v9; // r15
unsigned long long v10; // rbp
long long v11; // rsi
long long v12; // r15
unsigned long long i; // r13
long long v14; // rsi
long long result; // rax
long long v16; // r13
unsigned long long j; // rbp
signed long long v18; // [rsp+8h] [rbp-50h] BYREF
long long v19; // [rsp+10h] [rbp-48h] BYREF
int v20; // [rsp+1Ch] [rbp-3Ch]
long long v21[7]; // [rsp+20h] [rbp-38h] BYREF
v19 = a2;
v21[0] = 0x2E8BA2E8BA2E8BA3LL * ((long long)(a1[2] - a1[1]) >> 3);
v4 = a1[5] - a1[4];
v20 = a3;
v18 = 0x82FA0BE82FA0BE83LL * (v4 >> 3);
v5 = *(_BYTE **)(a2 + 8);
if ( v5 == *(_BYTE **)(a2 + 16) )
{
std::vector<signed char>::_M_realloc_insert<signed char const&>(a2, v5, "GGUF");
v6 = *(_BYTE **)(a2 + 8);
}
else
{
*v5 = 71;
v6 = (_BYTE *)(*(_QWORD *)(a2 + 8) + 1LL);
*(_QWORD *)(a2 + 8) = v6;
}
if ( v6 == *(_BYTE **)(a2 + 16) )
{
std::vector<signed char>::_M_realloc_insert<signed char const&>(a2, v6, "GUF");
v7 = *(_BYTE **)(a2 + 8);
}
else
{
*v6 = 71;
v7 = (_BYTE *)(*(_QWORD *)(a2 + 8) + 1LL);
*(_QWORD *)(a2 + 8) = v7;
}
if ( v7 == *(_BYTE **)(a2 + 16) )
{
std::vector<signed char>::_M_realloc_insert<signed char const&>(a2, v7, "UF");
v8 = *(_BYTE **)(a2 + 8);
}
else
{
*v7 = 85;
v8 = (_BYTE *)(*(_QWORD *)(a2 + 8) + 1LL);
*(_QWORD *)(a2 + 8) = v8;
}
if ( v8 == *(_BYTE **)(a2 + 16) )
{
std::vector<signed char>::_M_realloc_insert<signed char const&>(a2, v8, "F");
}
else
{
*v8 = 70;
++*(_QWORD *)(a2 + 8);
}
gguf_writer::write<unsigned int>(&v19, a1);
gguf_writer::write<long>(&v19, &v18);
gguf_writer::write<long>(&v19, v21);
if ( v21[0] > 0 )
{
v9 = 0LL;
v10 = 0LL;
do
{
v11 = a1[1];
if ( 0x2E8BA2E8BA2E8BA3LL * ((a1[2] - v11) >> 3) <= v10 )
gguf_write_to_buf();
gguf_writer::write((gguf_writer *)&v19, (const gguf_kv *)(v9 + v11));
++v10;
v9 += 88LL;
}
while ( (long long)v10 < v21[0] );
}
if ( v18 > 0 )
{
v12 = 0LL;
for ( i = 0LL; (long long)i < v18; ++i )
{
v14 = a1[4];
if ( 0x82FA0BE82FA0BE83LL * ((a1[5] - v14) >> 3) <= i )
gguf_write_to_buf();
gguf_writer::write_tensor_meta(&v19, v12 + v14);
v12 += 344LL;
}
}
result = gguf_writer::pad((gguf_writer *)&v19, a1[7]);
if ( !(_BYTE)v20 && v18 > 0 )
{
v16 = 0LL;
for ( j = 0LL; (long long)j < v18; ++j )
{
if ( 0x82FA0BE82FA0BE83LL * ((long long)(a1[5] - a1[4]) >> 3) <= j )
gguf_write_to_buf();
result = gguf_writer::write_tensor_data((gguf_writer *)&v19);
v16 += 344LL;
}
}
return result;
}
| gguf_write_to_buf:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
MOV RBX,RDI
MOV qword ptr [RSP + 0x10],RSI
MOV RAX,qword ptr [RDI + 0x10]
SUB RAX,qword ptr [RDI + 0x8]
SAR RAX,0x3
MOV R13,0x2e8ba2e8ba2e8ba3
IMUL RAX,R13
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RDI + 0x28]
SUB RAX,qword ptr [RDI + 0x20]
MOV dword ptr [RSP + 0x1c],EDX
SAR RAX,0x3
MOV R12,-0x7d05f417d05f417d
IMUL RAX,R12
MOV qword ptr [RSP + 0x8],RAX
MOV RSI,qword ptr [RSI + 0x8]
CMP RSI,qword ptr [R14 + 0x10]
JZ 0x00140235
MOV byte ptr [RSI],0x47
MOV RSI,qword ptr [R14 + 0x8]
INC RSI
MOV qword ptr [R14 + 0x8],RSI
JMP 0x00140248
LAB_00140235:
LEA RDX,[0x15d28b]
MOV RDI,R14
CALL 0x00117870
MOV RSI,qword ptr [R14 + 0x8]
LAB_00140248:
CMP RSI,qword ptr [R14 + 0x10]
JZ 0x0014025e
MOV byte ptr [RSI],0x47
MOV RSI,qword ptr [R14 + 0x8]
INC RSI
MOV qword ptr [R14 + 0x8],RSI
JMP 0x00140271
LAB_0014025e:
LEA RDX,[0x15d28c]
MOV RDI,R14
CALL 0x00117870
MOV RSI,qword ptr [R14 + 0x8]
LAB_00140271:
CMP RSI,qword ptr [R14 + 0x10]
JZ 0x00140287
MOV byte ptr [RSI],0x55
MOV RSI,qword ptr [R14 + 0x8]
INC RSI
MOV qword ptr [R14 + 0x8],RSI
JMP 0x0014029a
LAB_00140287:
LEA RDX,[0x15d28d]
MOV RDI,R14
CALL 0x00117870
MOV RSI,qword ptr [R14 + 0x8]
LAB_0014029a:
CMP RSI,qword ptr [R14 + 0x10]
JZ 0x001402a9
MOV byte ptr [RSI],0x46
INC qword ptr [R14 + 0x8]
JMP 0x001402b8
LAB_001402a9:
LEA RDX,[0x15d28e]
MOV RDI,R14
CALL 0x00117870
LAB_001402b8:
LEA R14,[RSP + 0x10]
MOV RDI,R14
MOV RSI,RBX
CALL 0x00117b90
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x00117a80
LEA R15,[RSP + 0x20]
MOV RDI,R14
MOV RSI,R15
CALL 0x00117a80
CMP qword ptr [R15],0x0
JLE 0x0014032a
XOR R15D,R15D
LEA R14,[RSP + 0x10]
XOR EBP,EBP
LAB_001402f5:
MOV RSI,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [RBX + 0x10]
SUB RAX,RSI
SAR RAX,0x3
IMUL RAX,R13
CMP RAX,RBP
JBE 0x001403f0
ADD RSI,R15
MOV RDI,R14
CALL 0x00116070
INC RBP
ADD R15,0x58
CMP RBP,qword ptr [RSP + 0x20]
JL 0x001402f5
LAB_0014032a:
CMP qword ptr [RSP + 0x8],0x0
JLE 0x00140375
XOR R15D,R15D
LEA R14,[RSP + 0x10]
XOR R13D,R13D
LAB_0014033d:
MOV RSI,qword ptr [RBX + 0x20]
MOV RAX,qword ptr [RBX + 0x28]
SUB RAX,RSI
SAR RAX,0x3
IMUL RAX,R12
CMP RAX,R13
JBE 0x001403f5
ADD RSI,R15
MOV RDI,R14
CALL 0x00116b20
INC R13
ADD R15,0x158
CMP R13,qword ptr [RSP + 0x8]
JL 0x0014033d
LAB_00140375:
MOV RSI,qword ptr [RBX + 0x38]
LEA RDI,[RSP + 0x10]
CALL 0x00117350
CMP byte ptr [RSP + 0x1c],0x0
JNZ 0x001403e1
CMP qword ptr [RSP + 0x8],0x0
JLE 0x001403e1
LEA R14,[RSP + 0x10]
MOV RAX,qword ptr [R14]
MOV R15,qword ptr [RAX + 0x8]
SUB R15,qword ptr [RAX]
XOR R13D,R13D
XOR EBP,EBP
LAB_001403a6:
MOV RSI,qword ptr [RBX + 0x20]
MOV RAX,qword ptr [RBX + 0x28]
SUB RAX,RSI
SAR RAX,0x3
IMUL RAX,R12
CMP RAX,RBP
JBE 0x001403fa
ADD RSI,R13
MOV RCX,qword ptr [RBX + 0x38]
MOV RDI,R14
MOV RDX,R15
CALL 0x001161d0
INC RBP
ADD R13,0x158
CMP RBP,qword ptr [RSP + 0x8]
JL 0x001403a6
LAB_001403e1:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001403f0:
CALL 0x00118e48
LAB_001403f5:
CALL 0x00118e68
LAB_001403fa:
CALL 0x00118e88
|
/* gguf_write_to_buf(gguf_context const*, std::vector<signed char, std::allocator<signed char> >&,
bool) */
ulong gguf_write_to_buf(gguf_context *param_1,vector *param_2,bool param_3)
{
ulong uVar1;
ulong uVar2;
FILE *__s;
size_t sVar3;
int1 uVar4;
int1 extraout_DL;
int1 extraout_DL_00;
int4 extraout_EDX;
int7 in_register_00000011;
int8 extraout_RDX;
int8 extraout_RDX_00;
int8 extraout_RDX_01;
int8 uVar5;
ulong unaff_RBP;
int1 *puVar6;
vector *__filename;
gguf_writer *this;
long lVar7;
ulong uVar8;
int1 auVar9 [16];
void *pvStack_90;
long lStack_88;
long lStack_80;
gguf_context *pgStack_78;
vector **ppvStack_70;
ulong uStack_68;
code *pcStack_60;
long local_50;
vector *local_48;
int4 local_3c;
long local_38;
local_38 = (*(long *)(param_1 + 0x10) - *(long *)(param_1 + 8) >> 3) * 0x2e8ba2e8ba2e8ba3;
local_3c = (int4)CONCAT71(in_register_00000011,param_3);
local_50 = (*(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20) >> 3) * -0x7d05f417d05f417d;
puVar6 = *(int1 **)(param_2 + 8);
local_48 = param_2;
if (puVar6 == *(int1 **)(param_2 + 0x10)) {
pcStack_60 = (code *)0x140244;
std::vector<signed_char,std::allocator<signed_char>>::_M_realloc_insert<signed_char_const&>
((vector<signed_char,std::allocator<signed_char>> *)param_2,puVar6,&DAT_0015d28b);
puVar6 = *(int1 **)(param_2 + 8);
}
else {
*puVar6 = 0x47;
puVar6 = (int1 *)(*(long *)(param_2 + 8) + 1);
*(int1 **)(param_2 + 8) = puVar6;
}
if (puVar6 == *(int1 **)(param_2 + 0x10)) {
pcStack_60 = (code *)0x14026d;
std::vector<signed_char,std::allocator<signed_char>>::_M_realloc_insert<signed_char_const&>
((vector<signed_char,std::allocator<signed_char>> *)param_2,puVar6,&DAT_0015d28c);
puVar6 = *(int1 **)(param_2 + 8);
}
else {
*puVar6 = 0x47;
puVar6 = (int1 *)(*(long *)(param_2 + 8) + 1);
*(int1 **)(param_2 + 8) = puVar6;
}
if (puVar6 == *(int1 **)(param_2 + 0x10)) {
pcStack_60 = (code *)0x140296;
std::vector<signed_char,std::allocator<signed_char>>::_M_realloc_insert<signed_char_const&>
((vector<signed_char,std::allocator<signed_char>> *)param_2,puVar6,&DAT_0015d28d);
puVar6 = *(int1 **)(param_2 + 8);
}
else {
*puVar6 = 0x55;
puVar6 = (int1 *)(*(long *)(param_2 + 8) + 1);
*(int1 **)(param_2 + 8) = puVar6;
}
if (puVar6 == *(int1 **)(param_2 + 0x10)) {
pcStack_60 = (code *)0x1402b8;
std::vector<signed_char,std::allocator<signed_char>>::_M_realloc_insert<signed_char_const&>
((vector<signed_char,std::allocator<signed_char>> *)param_2,puVar6,&DAT_0015d28e);
}
else {
*puVar6 = 0x46;
*(long *)(param_2 + 8) = *(long *)(param_2 + 8) + 1;
}
this = (gguf_writer *)&local_48;
pcStack_60 = (code *)0x1402c8;
gguf_writer::write<unsigned_int>(this,(uint *)param_1);
pcStack_60 = (code *)0x1402d5;
gguf_writer::write<long>(this,&local_50);
pcStack_60 = (code *)0x1402e5;
gguf_writer::write<long>(this,&local_38);
uVar5 = extraout_RDX;
if (0 < local_38) {
uVar8 = 0;
unaff_RBP = 0;
do {
__filename = *(vector **)(param_1 + 8);
uVar1 = (*(long *)(param_1 + 0x10) - (long)__filename >> 3) * 0x2e8ba2e8ba2e8ba3;
if (uVar1 < unaff_RBP || uVar1 - unaff_RBP == 0) {
pcStack_60 = (code *)0x1403f5;
gguf_write_to_buf((gguf_context *)this,__filename,SUB81(uVar5,0));
uVar4 = extraout_DL;
goto LAB_001403f5;
}
pcStack_60 = (code *)0x14031c;
this = (gguf_writer *)&local_48;
gguf_writer::write((gguf_writer *)&local_48,(gguf_kv *)(__filename + uVar8));
unaff_RBP = unaff_RBP + 1;
uVar8 = uVar8 + 0x58;
uVar5 = extraout_RDX_00;
} while ((long)unaff_RBP < local_38);
}
if (0 < local_50) {
uVar8 = 0;
uVar1 = 0;
do {
uVar4 = (int1)uVar5;
__filename = *(vector **)(param_1 + 0x20);
uVar2 = (*(long *)(param_1 + 0x28) - (long)__filename >> 3) * -0x7d05f417d05f417d;
if (uVar2 < uVar1 || uVar2 - uVar1 == 0) goto LAB_001403f5;
pcStack_60 = (code *)0x140364;
this = (gguf_writer *)&local_48;
gguf_writer::write_tensor_meta
((gguf_writer *)&local_48,(gguf_tensor_info *)(__filename + uVar8));
uVar1 = uVar1 + 1;
uVar8 = uVar8 + 0x158;
uVar5 = extraout_RDX_01;
} while ((long)uVar1 < local_50);
}
this = (gguf_writer *)&local_48;
pcStack_60 = (code *)0x140383;
auVar9 = gguf_writer::pad(this,*(ulong *)(param_1 + 0x38));
uVar5 = auVar9._8_8_;
uVar1 = auVar9._0_8_;
if (((char)local_3c == '\0') && (0 < local_50)) {
uVar8 = *(long *)(local_48 + 8) - *(long *)local_48;
lVar7 = 0;
unaff_RBP = 0;
do {
uVar4 = (int1)uVar5;
__filename = *(vector **)(param_1 + 0x20);
uVar1 = (*(long *)(param_1 + 0x28) - (long)__filename >> 3) * -0x7d05f417d05f417d;
if (uVar1 < unaff_RBP || uVar1 - unaff_RBP == 0) goto LAB_001403fa;
pcStack_60 = (code *)0x1403d0;
this = (gguf_writer *)&local_48;
auVar9 = gguf_writer::write_tensor_data
((gguf_writer *)&local_48,(gguf_tensor_info *)(__filename + lVar7),uVar8,
*(ulong *)(param_1 + 0x38));
uVar5 = auVar9._8_8_;
uVar1 = auVar9._0_8_;
unaff_RBP = unaff_RBP + 1;
lVar7 = lVar7 + 0x158;
} while ((long)unaff_RBP < local_50);
}
return uVar1;
LAB_001403f5:
pcStack_60 = (code *)0x1403fa;
gguf_write_to_buf((gguf_context *)this,__filename,(bool)uVar4);
uVar4 = extraout_DL_00;
LAB_001403fa:
pcStack_60 = gguf_write_to_file;
gguf_write_to_buf((gguf_context *)this,__filename,(bool)uVar4);
pgStack_78 = param_1;
ppvStack_70 = &local_48;
uStack_68 = uVar8;
pcStack_60 = (code *)unaff_RBP;
__s = ggml_fopen((char *)__filename,"wb");
if (__s == (FILE *)0x0) {
uVar8 = 0;
fprintf(*(FILE **)PTR_stderr_0016dfc8,"%s: failed to open file \'%s\' for writing GGUF data\n",
"gguf_write_to_file",__filename);
}
else {
pvStack_90 = (void *)0x0;
lStack_88 = 0;
lStack_80 = 0;
gguf_write_to_buf((gguf_context *)this,(vector *)&pvStack_90,SUB41(extraout_EDX,0));
sVar3 = fwrite(pvStack_90,1,lStack_88 - (long)pvStack_90,__s);
uVar8 = (ulong)CONCAT31((int3)((uint)extraout_EDX >> 8),sVar3 == lStack_88 - (long)pvStack_90);
fclose(__s);
if (pvStack_90 != (void *)0x0) {
operator_delete(pvStack_90,lStack_80 - (long)pvStack_90);
}
}
return uVar8;
}
|
|
6,520 | common_chat_params_init_command_r7b(minja::chat_template const&, common_chat_inputs const&) | monkey531[P]llama/common/chat.cpp | static common_chat_params common_chat_params_init_command_r7b(const common_chat_template & tmpl, const struct common_chat_inputs & inputs) {
common_chat_params data;
data.grammar_lazy = inputs.tool_choice != "required";
data.grammar = build_grammar([&](const common_grammar_builder & builder) {
auto schemas = json::array();
foreach_function(inputs.tools, [&](const json & tool) {
const auto & function = tool["function"];
schemas.push_back({
{"type", "object"},
{"properties", {
{"tool_call_id", {
{"type", "string"},
// Command-R's template expects an integer string.
{"pattern", "^[0-9]{1,10}$"},
}},
{"tool_name", {
{"type", "string"},
{"const", function["name"]},
}},
{"parameters", function["parameters"]},
}},
{"required", json::array({"tool_call_id", "tool_name", "parameters"})},
});
});
auto schema = json {
{"type", "array"},
{"items", schemas.size() == 1 ? schemas[0] : json {{"anyOf", schemas}}},
{"minItems", 1},
};
if (!inputs.parallel_tool_calls) {
schema["maxItems"] = 1;
}
builder.add_rule("root", "\"<|START_ACTION|>\" " + builder.add_schema("tool_calls", schema) + " \"<|END_ACTION|>\"");
}, grammar_options);
data.grammar_triggers.push_back({"<|START_ACTION|>", /* .at_start = */ false});
data.preserved_tokens = {
"<|START_RESPONSE|>",
"<|END_RESPONSE|>",
"<|START_THINKING|>",
"<|END_THINKING|>",
"<|END_ACTION|>",
};
data.prompt = tmpl.apply(inputs.messages, inputs.tools.empty() ? json() : inputs.tools, inputs.add_generation_prompt);
data.format = COMMON_CHAT_FORMAT_COMMAND_R7B;
return data;
} | O1 | cpp | common_chat_params_init_command_r7b(minja::chat_template const&, common_chat_inputs const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdx, %r14
movq %rsi, %rbp
movq %rdi, %rbx
movl $0x0, (%rdi)
xorl %eax, %eax
movb %al, 0x8(%rdi)
movq %rax, 0x10(%rdi)
leaq 0x28(%rdi), %rcx
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movb %al, 0x28(%rdi)
movb %al, 0x38(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x50(%rdi)
movups %xmm0, 0x60(%rdi)
movups %xmm0, 0x70(%rdi)
movq %rax, 0x80(%rdi)
leaq 0x20(%rdx), %rdi
leaq 0x2be65(%rip), %rsi # 0xb76d8
callq 0x2cc5b
movb %al, 0x38(%rbx)
leaq 0x10(%rsp), %rsi
xorps %xmm0, %xmm0
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
movq %r14, (%rsi)
leaq 0xf2de(%rip), %rax # 0x9ab72
movq %rax, 0x18(%rsi)
leaq 0xfc4d(%rip), %rax # 0x9b4ec
movq %rax, 0x10(%rsi)
leaq 0x2fd46(%rip), %rdx # 0xbb5f0
leaq 0x38(%rsp), %rdi
callq 0xa090a
leaq 0x18(%rbx), %rdi
leaq 0x38(%rsp), %r12
movq %r12, %rsi
callq 0x19940
movq (%r12), %rdi
leaq 0x48(%rsp), %r15
cmpq %r15, %rdi
je 0x8b8e0
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x197a0
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x8b8f9
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x38(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x30dd4(%rip), %rsi # 0xbc6dc
leaq 0x30ddd(%rip), %rdx # 0xbc6ec
callq 0x20c8e
leaq 0x40(%rbx), %rdi
leaq 0x38(%rsp), %rsi
movb $0x0, 0x20(%rsi)
callq 0x9f302
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x8b93d
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x197a0
leaq 0x38(%rsp), %r12
movq %r15, (%r12)
leaq 0x31283(%rip), %rsi # 0xbcbd0
leaq 0x3128e(%rip), %rdx # 0xbcbe2
movq %r12, %rdi
callq 0x20c8e
leaq 0x58(%rsp), %r12
leaq 0x68(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x31272(%rip), %rsi # 0xbcbe3
leaq 0x3127b(%rip), %rdx # 0xbcbf3
movq %r12, %rdi
callq 0x20c8e
leaq 0x78(%rsp), %r12
leaq 0x88(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x3125c(%rip), %rsi # 0xbcbf4
leaq 0x31267(%rip), %rdx # 0xbcc06
movq %r12, %rdi
callq 0x20c8e
leaq 0x98(%rsp), %r12
leaq 0xa8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x31245(%rip), %rsi # 0xbcc07
leaq 0x3124e(%rip), %rdx # 0xbcc17
movq %r12, %rdi
callq 0x20c8e
leaq 0xb8(%rsp), %r12
leaq 0xc8(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x3122c(%rip), %rsi # 0xbcc18
leaq 0x31233(%rip), %rdx # 0xbcc26
movq %r12, %rdi
callq 0x20c8e
leaq 0x58(%rbx), %rdi
leaq 0xd8(%rsp), %r15
leaq 0x38(%rsp), %rsi
movq %r15, %rdx
callq 0x9f702
movq $-0xa0, %r12
movq -0x10(%r13), %rdi
cmpq %rdi, %r13
je 0x8ba30
movq (%r13), %rsi
incq %rsi
callq 0x197a0
addq $-0x20, %r13
addq $0x20, %r12
jne 0x8ba1b
movzbl 0x10(%r14), %eax
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jae 0x8ba64
movq 0x18(%r14), %rax
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
je 0x8ba68
leaq 0x10(%r14), %rsi
leaq 0x10(%rsp), %rdi
callq 0x29bca
jmp 0x8ba76
testl %eax, %eax
jne 0x8ba54
movb $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movzbl 0x68(%r14), %r8d
leaq 0xd8(%rsp), %r9
movb $0x0, (%r9)
movq $0x0, 0x8(%r9)
movl $0x1, (%rsp)
leaq 0x38(%rsp), %rdi
leaq 0x10(%rsp), %rcx
movq %rbp, %rsi
movq %r14, %rdx
callq 0x26f1a
leaq 0xe8(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x48(%rsp), %r15
callq 0x2d354
movb 0x8(%rbx), %al
leaq 0xe8(%rsp), %rdi
movb (%rdi), %cl
movb %cl, 0x8(%rbx)
movb %al, (%rdi)
movq 0x10(%rbx), %rax
movq 0x8(%rdi), %rcx
movq %rcx, 0x10(%rbx)
movq %rax, 0x8(%rdi)
callq 0x2968c
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x8bb00
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x197a0
leaq 0xd8(%rsp), %rdi
callq 0x2968c
leaq 0x10(%rsp), %rdi
callq 0x2968c
movl $0xa, (%rbx)
movq %rbx, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8bbf5
jmp 0x8bc26
movq %rax, %r14
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x8bb5b
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x197a0
jmp 0x8bb5b
movq %rax, %r14
leaq 0xd8(%rsp), %rdi
callq 0x2968c
leaq 0x10(%rsp), %rdi
callq 0x2968c
jmp 0x8bc16
movq %rax, %r14
leaq 0x38(%rsp), %rsi
movq %r15, %rdi
callq 0x1b6bb
movb $0x1, %al
jmp 0x8bb98
jmp 0x8bb93
jmp 0x8bb93
jmp 0x8bb93
jmp 0x8bb93
movq %rax, %r14
xorl %eax, %eax
leaq 0x38(%rsp), %rcx
cmpq %r12, %rcx
sete %cl
orb %al, %cl
jne 0x8bc16
addq $-0x10, %r12
leaq 0x38(%rsp), %r15
movq -0x10(%r12), %rdi
cmpq %rdi, %r12
je 0x8bbc6
movq (%r12), %rsi
incq %rsi
callq 0x197a0
leaq -0x20(%r12), %rax
addq $-0x10, %r12
cmpq %r15, %r12
movq %rax, %r12
jne 0x8bbb0
jmp 0x8bc16
movq %rax, %r14
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x8bc16
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x197a0
jmp 0x8bc16
movq %rax, %r14
jmp 0x8bc16
movq %rax, %r14
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x8bc16
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x5b072
movq %r14, %rdi
callq 0x19e00
movq %rax, %rdi
callq 0x2041f
| _ZL35common_chat_params_init_command_r7bRKN5minja13chat_templateERK18common_chat_inputs:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0F8h
mov r14, rdx
mov rbp, rsi
mov rbx, rdi
mov dword ptr [rdi], 0
xor eax, eax
mov [rdi+8], al
mov [rdi+10h], rax
lea rcx, [rdi+28h]
mov [rdi+18h], rcx
mov [rdi+20h], rax
mov [rdi+28h], al
mov [rdi+38h], al
xorps xmm0, xmm0
movups xmmword ptr [rdi+40h], xmm0
movups xmmword ptr [rdi+50h], xmm0
movups xmmword ptr [rdi+60h], xmm0
movups xmmword ptr [rdi+70h], xmm0
mov [rdi+80h], rax
lea rdi, [rdx+20h]
lea rsi, aRequired; "required"
call _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_
mov [rbx+38h], al
lea rsi, [rsp+128h+var_118]
xorps xmm0, xmm0
movaps xmmword ptr [rsi], xmm0
movaps xmmword ptr [rsi+10h], xmm0
mov [rsi], r14
lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL35common_chat_params_init_command_r7bRKN5minja13chat_templateERK18common_chat_inputsE3$_0E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_command_r7b(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke(std::_Any_data const&,common_grammar_builder const&)
mov [rsi+18h], rax
lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL35common_chat_params_init_command_r7bRKN5minja13chat_templateERK18common_chat_inputsE3$_0E10_M_managerERSt9_Any_dataRKSD_St18_Manager_operation; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_command_r7b(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsi+10h], rax
lea rdx, _ZL15grammar_options; grammar_options
lea rdi, [rsp+128h+var_F0]
call _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options; build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)
lea rdi, [rbx+18h]
lea r12, [rsp+128h+var_F0]
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r12]; void *
lea r15, [rsp+128h+var_E0]
cmp rdi, r15
jz short loc_8B8E0
mov rsi, [rsp+128h+var_E0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8B8E0:
mov rax, [rsp+128h+var_108]
test rax, rax
jz short loc_8B8F9
lea rdi, [rsp+128h+var_118]
mov rsi, rdi
mov edx, 3
call rax
loc_8B8F9:
lea rdi, [rsp+128h+var_F0]
mov [rdi], r15
lea rsi, aEndThinkingSta+10h; "<|START_ACTION|>"
lea rdx, aEndThinkingSta+20h; ""
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, [rbx+40h]
lea rsi, [rsp+128h+var_F0]
mov byte ptr [rsi+20h], 0
call _ZNSt6vectorI22common_grammar_triggerSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<common_grammar_trigger>::emplace_back<common_grammar_trigger>(common_grammar_trigger &&)
mov rdi, [rsp+128h+var_F0]; void *
cmp rdi, r15
jz short loc_8B93D
mov rsi, [rsp+128h+var_E0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8B93D:
lea r12, [rsp+128h+var_F0]
mov [r12], r15
lea rsi, aStartResponse; "<|START_RESPONSE|>"
lea rdx, aStartResponse+12h; ""
mov rdi, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea r12, [rsp+128h+var_D0]
lea rax, [rsp+128h+var_C0]
mov [rax-10h], rax
lea rsi, aEndResponse; "<|END_RESPONSE|>"
lea rdx, aEndResponse+10h; ""
mov rdi, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea r12, [rsp+128h+var_B0]
lea rax, [rsp+128h+var_A0]
mov [rax-10h], rax
lea rsi, aStartThinking; "<|START_THINKING|>"
lea rdx, aStartThinking+12h; ""
mov rdi, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea r12, [rsp+128h+var_90]
lea rax, [rsp+128h+var_80]
mov [rax-10h], rax
lea rsi, aEndThinking; "<|END_THINKING|>"
lea rdx, aEndThinking+10h; ""
mov rdi, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea r12, [rsp+128h+var_70]
lea r13, [rsp+128h+var_60]
mov [r13-10h], r13
lea rsi, aEndAction; "<|END_ACTION|>"
lea rdx, aEndAction+0Eh; ""
mov rdi, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rbx+58h]
lea r15, [rsp+128h+var_50]
lea rsi, [rsp+128h+var_F0]
mov rdx, r15
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE13_M_assign_auxIPKS5_EEvT_SB_St20forward_iterator_tag; std::vector<std::string>::_M_assign_aux<std::string const*>(std::string const*,std::string const*,std::forward_iterator_tag)
mov r12, 0FFFFFFFFFFFFFF60h
loc_8BA1B:
mov rdi, [r13-10h]; void *
cmp r13, rdi
jz short loc_8BA30
mov rsi, [r13+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8BA30:
add r13, 0FFFFFFFFFFFFFFE0h
add r12, 20h ; ' '
jnz short loc_8BA1B
movzx eax, byte ptr [r14+10h]
lea ecx, [rax-1]
cmp ecx, 2
jnb short loc_8BA64
mov rax, [r14+18h]
mov rcx, [rax]
cmp rcx, [rax+8]
jz short loc_8BA68
loc_8BA54:
lea rsi, [r14+10h]
lea rdi, [rsp+128h+var_118]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
jmp short loc_8BA76
loc_8BA64:
test eax, eax
jnz short loc_8BA54
loc_8BA68:
mov [rsp+128h+var_118], 0
mov [rsp+128h+var_110], 0
loc_8BA76:
movzx r8d, byte ptr [r14+68h]
lea r9, [rsp+128h+var_50]
mov byte ptr [r9], 0
mov qword ptr [r9+8], 0
mov [rsp+128h+var_128], 1
lea rdi, [rsp+128h+var_F0]
lea rcx, [rsp+128h+var_118]
mov rsi, rbp
mov rdx, r14
call _ZNK5minja13chat_template5applyERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_b; minja::chat_template::apply(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool)
lea rdi, [rsp+128h+var_40]
lea rsi, [rsp+128h+var_F0]
lea r15, [rsp+128h+var_E0]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_
mov al, [rbx+8]
lea rdi, [rsp+128h+var_40]
mov cl, [rdi]
mov [rbx+8], cl
mov [rdi], al
mov rax, [rbx+10h]
mov rcx, [rdi+8]
mov [rbx+10h], rcx
mov [rdi+8], rax
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rsp+128h+var_F0]; void *
cmp rdi, r15
jz short loc_8BB00
mov rsi, [rsp+128h+var_E0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8BB00:
lea rdi, [rsp+128h+var_50]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [rsp+128h+var_118]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov dword ptr [rbx], 0Ah
mov rax, rbx
add rsp, 0F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp loc_8BBF5
jmp loc_8BC26
mov r14, rax
mov rdi, [rsp+128h+var_F0]; void *
cmp rdi, r15
jz short loc_8BB5B
mov rsi, [rsp+128h+var_E0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_8BB5B
mov r14, rax
loc_8BB5B:
lea rdi, [rsp+128h+var_50]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [rsp+128h+var_118]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp loc_8BC16
mov r14, rax
lea rsi, [rsp+128h+var_F0]
mov rdi, r15
call _ZL35common_chat_params_init_command_r7bRKN5minja13chat_templateERK18common_chat_inputs_cold_1; common_chat_params_init_command_r7b(minja::chat_template const&,common_chat_inputs const&) [clone]
mov al, 1
jmp short loc_8BB98
jmp short loc_8BB93
jmp short loc_8BB93
jmp short loc_8BB93
jmp short $+2
loc_8BB93:
mov r14, rax
xor eax, eax
loc_8BB98:
lea rcx, [rsp+128h+var_F0]
cmp rcx, r12
setz cl
or cl, al
jnz short loc_8BC16
add r12, 0FFFFFFFFFFFFFFF0h
lea r15, [rsp+128h+var_F0]
loc_8BBB0:
mov rdi, [r12-10h]; void *
cmp r12, rdi
jz short loc_8BBC6
mov rsi, [r12]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8BBC6:
lea rax, [r12-20h]
add r12, 0FFFFFFFFFFFFFFF0h
cmp r12, r15
mov r12, rax
jnz short loc_8BBB0
jmp short loc_8BC16
mov r14, rax
mov rdi, [rsp+128h+var_F0]; void *
cmp rdi, r15
jz short loc_8BC16
mov rsi, [rsp+128h+var_E0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_8BC16
loc_8BBF5:
mov r14, rax
jmp short loc_8BC16
mov r14, rax
mov rax, [rsp+128h+var_108]
test rax, rax
jz short loc_8BC16
lea rdi, [rsp+128h+var_118]
mov rsi, rdi
mov edx, 3
call rax
loc_8BC16:
mov rdi, rbx; this
call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params()
mov rdi, r14
call __Unwind_Resume
loc_8BC26:
mov rdi, rax
call __clang_call_terminate
| const minja::chat_template * common_chat_params_init_command_r7b(
const minja::chat_template *a1,
const common_chat_inputs *a2,
long long a3)
{
_QWORD *v5; // r13
long long v6; // r12
_QWORD *v7; // rdi
int v8; // r8d
char v9; // al
long long v10; // rax
__int128 v12; // [rsp+10h] [rbp-118h] BYREF
long long ( *v13)(); // [rsp+20h] [rbp-108h]
long long ( *v14)(); // [rsp+28h] [rbp-100h]
void *v15[2]; // [rsp+38h] [rbp-F0h] BYREF
_QWORD v16[2]; // [rsp+48h] [rbp-E0h] BYREF
char *v17; // [rsp+58h] [rbp-D0h] BYREF
char v18; // [rsp+68h] [rbp-C0h] BYREF
char *v19; // [rsp+78h] [rbp-B0h] BYREF
char v20; // [rsp+88h] [rbp-A0h] BYREF
char *v21; // [rsp+98h] [rbp-90h] BYREF
char v22; // [rsp+A8h] [rbp-80h] BYREF
_BYTE *v23; // [rsp+B8h] [rbp-70h] BYREF
_BYTE v24[16]; // [rsp+C8h] [rbp-60h] BYREF
unsigned __int8 v25[8]; // [rsp+D8h] [rbp-50h] BYREF
long long v26; // [rsp+E0h] [rbp-48h]
_BYTE v27[8]; // [rsp+E8h] [rbp-40h] BYREF
long long v28; // [rsp+F0h] [rbp-38h]
*(_DWORD *)a1 = 0;
*((_BYTE *)a1 + 8) = 0;
*((_QWORD *)a1 + 2) = 0LL;
*((_QWORD *)a1 + 3) = (char *)a1 + 40;
*((_QWORD *)a1 + 4) = 0LL;
*((_BYTE *)a1 + 40) = 0;
*((_BYTE *)a1 + 56) = 0;
*((_OWORD *)a1 + 4) = 0LL;
*((_OWORD *)a1 + 5) = 0LL;
*((_OWORD *)a1 + 6) = 0LL;
*((_OWORD *)a1 + 7) = 0LL;
*((_QWORD *)a1 + 16) = 0LL;
*((_BYTE *)a1 + 56) = ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_(
a3 + 32,
(long long)"required");
v12 = 0LL;
*(_QWORD *)&v12 = a3;
v14 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_command_r7b(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke;
v13 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_command_r7b(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager;
build_grammar[abi:cxx11](v15, &v12, &grammar_options);
std::string::operator=((char *)a1 + 24, v15);
if ( v15[0] != v16 )
operator delete(v15[0], v16[0] + 1LL);
if ( v13 )
((void ( *)(__int128 *, __int128 *, long long))v13)(&v12, &v12, 3LL);
v15[0] = v16;
std::string::_M_construct<char const*>(v15, "<|START_ACTION|>", (long long)"");
LOBYTE(v17) = 0;
std::vector<common_grammar_trigger>::emplace_back<common_grammar_trigger>((char *)a1 + 64);
if ( v15[0] != v16 )
operator delete(v15[0], v16[0] + 1LL);
v15[0] = v16;
std::string::_M_construct<char const*>(v15, "<|START_RESPONSE|>", (long long)"");
v17 = &v18;
std::string::_M_construct<char const*>(&v17, "<|END_RESPONSE|>", (long long)"");
v19 = &v20;
std::string::_M_construct<char const*>(&v19, "<|START_THINKING|>", (long long)"");
v21 = &v22;
std::string::_M_construct<char const*>(&v21, "<|END_THINKING|>", (long long)"");
v5 = v24;
v23 = v24;
std::string::_M_construct<char const*>(&v23, "<|END_ACTION|>", (long long)"");
std::vector<std::string>::_M_assign_aux<std::string const*>((char *)a1 + 88, v15, v25);
v6 = -160LL;
do
{
v7 = (_QWORD *)*(v5 - 2);
if ( v5 != v7 )
operator delete(v7, *v5 + 1LL);
v5 -= 4;
v6 += 32LL;
}
while ( v6 );
if ( (unsigned int)*(unsigned __int8 *)(a3 + 16) - 1 >= 2 )
{
if ( *(_BYTE *)(a3 + 16) )
goto LABEL_13;
}
else if ( **(_QWORD **)(a3 + 24) != *(_QWORD *)(*(_QWORD *)(a3 + 24) + 8LL) )
{
LABEL_13:
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)&v12,
(unsigned __int8 *)(a3 + 16));
goto LABEL_16;
}
LOBYTE(v12) = 0;
*((_QWORD *)&v12 + 1) = 0LL;
LABEL_16:
v8 = *(unsigned __int8 *)(a3 + 104);
v25[0] = 0;
v26 = 0LL;
minja::chat_template::apply((long long)v15, a2, a3, &v12, v8, v25, 1);
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_(
(long long)v27,
(long long)v15);
v9 = *((_BYTE *)a1 + 8);
*((_BYTE *)a1 + 8) = v27[0];
v27[0] = v9;
v10 = *((_QWORD *)a1 + 2);
*((_QWORD *)a1 + 2) = v28;
v28 = v10;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v27);
if ( v15[0] != v16 )
operator delete(v15[0], v16[0] + 1LL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v25);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v12);
*(_DWORD *)a1 = 10;
return a1;
}
| common_chat_params_init_command_r7b:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xf8
MOV R14,RDX
MOV RBP,RSI
MOV RBX,RDI
MOV dword ptr [RDI],0x0
XOR EAX,EAX
MOV byte ptr [RDI + 0x8],AL
MOV qword ptr [RDI + 0x10],RAX
LEA RCX,[RDI + 0x28]
MOV qword ptr [RDI + 0x18],RCX
MOV qword ptr [RDI + 0x20],RAX
MOV byte ptr [RDI + 0x28],AL
MOV byte ptr [RDI + 0x38],AL
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x40],XMM0
MOVUPS xmmword ptr [RDI + 0x50],XMM0
MOVUPS xmmword ptr [RDI + 0x60],XMM0
MOVUPS xmmword ptr [RDI + 0x70],XMM0
MOV qword ptr [RDI + 0x80],RAX
LEA RDI,[RDX + 0x20]
LEA RSI,[0x1b76d8]
CALL 0x0012cc5b
MOV byte ptr [RBX + 0x38],AL
LEA RSI,[RSP + 0x10]
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSI],XMM0
MOVAPS xmmword ptr [RSI + 0x10],XMM0
MOV qword ptr [RSI],R14
LEA RAX,[0x19ab72]
MOV qword ptr [RSI + 0x18],RAX
LEA RAX,[0x19b4ec]
MOV qword ptr [RSI + 0x10],RAX
LAB_0018b8a3:
LEA RDX,[0x1bb5f0]
LEA RDI,[RSP + 0x38]
CALL 0x001a090a
LEA RDI,[RBX + 0x18]
LEA R12,[RSP + 0x38]
MOV RSI,R12
CALL 0x00119940
MOV RDI,qword ptr [R12]
LEA R15,[RSP + 0x48]
CMP RDI,R15
JZ 0x0018b8e0
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x001197a0
LAB_0018b8e0:
MOV RAX,qword ptr [RSP + 0x20]
TEST RAX,RAX
JZ 0x0018b8f9
LAB_0018b8ea:
LEA RDI,[RSP + 0x10]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_0018b8f9:
LEA RDI,[RSP + 0x38]
MOV qword ptr [RDI],R15
LAB_0018b901:
LEA RSI,[0x1bc6dc]
LEA RDX,[0x1bc6ec]
CALL 0x00120c8e
LEA RDI,[RBX + 0x40]
LEA RSI,[RSP + 0x38]
MOV byte ptr [RSI + 0x20],0x0
LAB_0018b921:
CALL 0x0019f302
MOV RDI,qword ptr [RSP + 0x38]
CMP RDI,R15
JZ 0x0018b93d
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x001197a0
LAB_0018b93d:
LEA R12,[RSP + 0x38]
MOV qword ptr [R12],R15
LAB_0018b946:
LEA RSI,[0x1bcbd0]
LEA RDX,[0x1bcbe2]
MOV RDI,R12
CALL 0x00120c8e
LEA R12,[RSP + 0x58]
LEA RAX,[RSP + 0x68]
MOV qword ptr [RAX + -0x10],RAX
LAB_0018b96a:
LEA RSI,[0x1bcbe3]
LEA RDX,[0x1bcbf3]
MOV RDI,R12
CALL 0x00120c8e
LEA R12,[RSP + 0x78]
LEA RAX,[RSP + 0x88]
MOV qword ptr [RAX + -0x10],RAX
LAB_0018b991:
LEA RSI,[0x1bcbf4]
LEA RDX,[0x1bcc06]
MOV RDI,R12
CALL 0x00120c8e
LEA R12,[RSP + 0x98]
LEA RAX,[RSP + 0xa8]
MOV qword ptr [RAX + -0x10],RAX
LAB_0018b9bb:
LEA RSI,[0x1bcc07]
LEA RDX,[0x1bcc17]
MOV RDI,R12
CALL 0x00120c8e
LEA R12,[RSP + 0xb8]
LEA R13,[RSP + 0xc8]
MOV qword ptr [R13 + -0x10],R13
LAB_0018b9e5:
LEA RSI,[0x1bcc18]
LEA RDX,[0x1bcc26]
MOV RDI,R12
CALL 0x00120c8e
LEA RDI,[RBX + 0x58]
LEA R15,[RSP + 0xd8]
LAB_0018ba07:
LEA RSI,[RSP + 0x38]
MOV RDX,R15
CALL 0x0019f702
MOV R12,-0xa0
LAB_0018ba1b:
MOV RDI,qword ptr [R13 + -0x10]
CMP R13,RDI
JZ 0x0018ba30
MOV RSI,qword ptr [R13]
INC RSI
CALL 0x001197a0
LAB_0018ba30:
ADD R13,-0x20
ADD R12,0x20
JNZ 0x0018ba1b
MOVZX EAX,byte ptr [R14 + 0x10]
LEA ECX,[RAX + -0x1]
CMP ECX,0x2
JNC 0x0018ba64
MOV RAX,qword ptr [R14 + 0x18]
MOV RCX,qword ptr [RAX]
CMP RCX,qword ptr [RAX + 0x8]
JZ 0x0018ba68
LAB_0018ba54:
LEA RSI,[R14 + 0x10]
LEA RDI,[RSP + 0x10]
CALL 0x00129bca
JMP 0x0018ba76
LAB_0018ba64:
TEST EAX,EAX
JNZ 0x0018ba54
LAB_0018ba68:
MOV byte ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x0
LAB_0018ba76:
MOVZX R8D,byte ptr [R14 + 0x68]
LEA R9,[RSP + 0xd8]
MOV byte ptr [R9],0x0
MOV qword ptr [R9 + 0x8],0x0
LAB_0018ba8f:
MOV dword ptr [RSP],0x1
LEA RDI,[RSP + 0x38]
LEA RCX,[RSP + 0x10]
MOV RSI,RBP
MOV RDX,R14
CALL 0x00126f1a
LAB_0018baab:
LEA RDI,[RSP + 0xe8]
LEA RSI,[RSP + 0x38]
LEA R15,[RSP + 0x48]
CALL 0x0012d354
LAB_0018bac2:
MOV AL,byte ptr [RBX + 0x8]
LEA RDI,[RSP + 0xe8]
MOV CL,byte ptr [RDI]
MOV byte ptr [RBX + 0x8],CL
MOV byte ptr [RDI],AL
MOV RAX,qword ptr [RBX + 0x10]
MOV RCX,qword ptr [RDI + 0x8]
MOV qword ptr [RBX + 0x10],RCX
MOV qword ptr [RDI + 0x8],RAX
CALL 0x0012968c
MOV RDI,qword ptr [RSP + 0x38]
CMP RDI,R15
JZ 0x0018bb00
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x001197a0
LAB_0018bb00:
LEA RDI,[RSP + 0xd8]
CALL 0x0012968c
LEA RDI,[RSP + 0x10]
CALL 0x0012968c
MOV dword ptr [RBX],0xa
MOV RAX,RBX
ADD RSP,0xf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_chat_params_init_command_r7b(minja::chat_template const&, common_chat_inputs const&) */
chat_template *
common_chat_params_init_command_r7b(chat_template *param_1,common_chat_inputs *param_2)
{
int8 uVar1;
chat_template cVar2;
ulong in_RDX;
long lVar3;
long *plVar4;
ulong local_118 [2];
code *local_108;
code *pcStack_100;
long *local_f0 [2];
long local_e0 [2];
int1 *local_d0 [2];
int1 local_c0 [16];
int1 *local_b0 [2];
int1 local_a0 [16];
int1 *local_90 [2];
int1 local_80 [16];
long *local_70 [2];
long local_60 [2];
data local_50 [8];
int8 local_48;
chat_template local_40 [8];
int8 local_38;
*(int4 *)param_1 = 0;
param_1[8] = (chat_template)0x0;
*(int8 *)(param_1 + 0x10) = 0;
*(chat_template **)(param_1 + 0x18) = param_1 + 0x28;
*(int8 *)(param_1 + 0x20) = 0;
param_1[0x28] = (chat_template)0x0;
param_1[0x38] = (chat_template)0x0;
*(int8 *)(param_1 + 0x40) = 0;
*(int8 *)(param_1 + 0x48) = 0;
*(int8 *)(param_1 + 0x50) = 0;
*(int8 *)(param_1 + 0x58) = 0;
*(int8 *)(param_1 + 0x60) = 0;
*(int8 *)(param_1 + 0x68) = 0;
*(int8 *)(param_1 + 0x70) = 0;
*(int8 *)(param_1 + 0x78) = 0;
*(int8 *)(param_1 + 0x80) = 0;
cVar2 = (chat_template)
_ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_
(in_RDX + 0x20,"required");
param_1[0x38] = cVar2;
local_118[1] = 0;
pcStack_100 = std::
_Function_handler<void(common_grammar_builder_const&),common_chat_params_init_command_r7b(minja::chat_template_const&,common_chat_inputs_const&)::$_0>
::_M_invoke;
local_108 = std::
_Function_handler<void(common_grammar_builder_const&),common_chat_params_init_command_r7b(minja::chat_template_const&,common_chat_inputs_const&)::$_0>
::_M_manager;
/* try { // try from 0018b8a3 to 0018b8b3 has its CatchHandler @ 0018bbfa */
local_118[0] = in_RDX;
build_grammar_abi_cxx11_((function *)local_f0,(common_grammar_options *)local_118);
std::__cxx11::string::operator=((string *)(param_1 + 0x18),(string *)local_f0);
if (local_f0[0] != local_e0) {
operator_delete(local_f0[0],local_e0[0] + 1);
}
if (local_108 != (code *)0x0) {
/* try { // try from 0018b8ea to 0018b8f8 has its CatchHandler @ 0018bb37 */
(*local_108)(local_118,local_118,3);
}
local_f0[0] = local_e0;
/* try { // try from 0018b901 to 0018b913 has its CatchHandler @ 0018bbf5 */
std::__cxx11::string::_M_construct<char_const*>(local_f0,"<|START_ACTION|>","");
local_d0[0] = (int1 *)((ulong)local_d0[0] & 0xffffffffffffff00);
/* try { // try from 0018b921 to 0018b925 has its CatchHandler @ 0018bbd9 */
std::vector<common_grammar_trigger,std::allocator<common_grammar_trigger>>::
emplace_back<common_grammar_trigger>
((vector<common_grammar_trigger,std::allocator<common_grammar_trigger>> *)
(param_1 + 0x40),(common_grammar_trigger *)local_f0);
if (local_f0[0] != local_e0) {
operator_delete(local_f0[0],local_e0[0] + 1);
}
local_f0[0] = local_e0;
/* try { // try from 0018b946 to 0018b95b has its CatchHandler @ 0018bb93 */
std::__cxx11::string::_M_construct<char_const*>(local_f0,"<|START_RESPONSE|>","");
local_d0[0] = local_c0;
/* try { // try from 0018b96a to 0018b97f has its CatchHandler @ 0018bb91 */
std::__cxx11::string::_M_construct<char_const*>(local_d0,"<|END_RESPONSE|>","");
local_b0[0] = local_a0;
/* try { // try from 0018b991 to 0018b9a6 has its CatchHandler @ 0018bb8f */
std::__cxx11::string::_M_construct<char_const*>(local_b0,"<|START_THINKING|>","");
local_90[0] = local_80;
/* try { // try from 0018b9bb to 0018b9d0 has its CatchHandler @ 0018bb8d */
std::__cxx11::string::_M_construct<char_const*>(local_90,"<|END_THINKING|>","");
plVar4 = local_60;
local_70[0] = plVar4;
/* try { // try from 0018b9e5 to 0018b9fa has its CatchHandler @ 0018bb8b */
std::__cxx11::string::_M_construct<char_const*>(local_70,"<|END_ACTION|>","");
/* try { // try from 0018ba07 to 0018ba13 has its CatchHandler @ 0018bb77 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
_M_assign_aux<std::__cxx11::string_const*>(param_1 + 0x58,local_f0,local_50);
lVar3 = -0xa0;
do {
if (plVar4 != (long *)plVar4[-2]) {
operator_delete((long *)plVar4[-2],*plVar4 + 1);
}
plVar4 = plVar4 + -4;
lVar3 = lVar3 + 0x20;
} while (lVar3 != 0);
if (*(byte *)(in_RDX + 0x10) - 1 < 2) {
if (**(long **)(in_RDX + 0x18) == (*(long **)(in_RDX + 0x18))[1]) {
LAB_0018ba68:
local_118[0] = local_118[0] & 0xffffffffffffff00;
local_118[1] = 0;
goto LAB_0018ba76;
}
}
else if (*(byte *)(in_RDX + 0x10) == 0) goto LAB_0018ba68;
/* try { // try from 0018ba54 to 0018ba61 has its CatchHandler @ 0018bb32 */
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_118,(basic_json *)(in_RDX + 0x10));
LAB_0018ba76:
local_50[0] = (data)0x0;
local_48 = 0;
/* try { // try from 0018ba8f to 0018baaa has its CatchHandler @ 0018bb58 */
minja::chat_template::apply
((basic_json *)local_f0,(basic_json *)param_2,SUB81(in_RDX,0),(basic_json *)local_118,
*(bool *)(in_RDX + 0x68));
/* try { // try from 0018baab to 0018bac1 has its CatchHandler @ 0018bb3c */
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_
(local_40,local_f0);
cVar2 = param_1[8];
param_1[8] = local_40[0];
uVar1 = *(int8 *)(param_1 + 0x10);
*(int8 *)(param_1 + 0x10) = local_38;
local_40[0] = cVar2;
local_38 = uVar1;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_40);
if (local_f0[0] != local_e0) {
operator_delete(local_f0[0],local_e0[0] + 1);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_50);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_118);
*(int4 *)param_1 = 10;
return param_1;
}
|
|
6,521 | iq2xs_free_impl | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c | void iq2xs_free_impl(enum ggml_type type) {
GGML_ASSERT(type == GGML_TYPE_IQ2_XXS || type == GGML_TYPE_IQ2_XS || type == GGML_TYPE_IQ1_S || type == GGML_TYPE_IQ1_M || type == GGML_TYPE_IQ2_S);
const int gindex = iq2_data_index(type);
if (iq2_data[gindex].grid) {
free(iq2_data[gindex].grid); iq2_data[gindex].grid = NULL;
free(iq2_data[gindex].map); iq2_data[gindex].map = NULL;
free(iq2_data[gindex].neighbours); iq2_data[gindex].neighbours = NULL;
}
} | O0 | c | iq2xs_free_impl:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
cmpl $0x10, -0x4(%rbp)
je 0x7b01a
cmpl $0x11, -0x4(%rbp)
je 0x7b01a
cmpl $0x13, -0x4(%rbp)
je 0x7b01a
cmpl $0x1d, -0x4(%rbp)
je 0x7b01a
cmpl $0x16, -0x4(%rbp)
je 0x7b01a
leaq 0x45d5c(%rip), %rdi # 0xc0d5c
movl $0xb69, %esi # imm = 0xB69
leaq 0x365fd(%rip), %rdx # 0xb1609
leaq 0x4693e(%rip), %rcx # 0xc1951
movb $0x0, %al
callq 0x48a00
movl -0x4(%rbp), %edi
callq 0x7add0
movl %eax, -0x8(%rbp)
movslq -0x8(%rbp), %rcx
leaq 0xa96d0(%rip), %rax # 0x124700
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
je 0x7b0de
movslq -0x8(%rbp), %rcx
leaq 0xa96b4(%rip), %rax # 0x124700
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdi
callq 0x46ad0
movslq -0x8(%rbp), %rcx
leaq 0xa969a(%rip), %rax # 0x124700
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq $0x0, (%rax)
movslq -0x8(%rbp), %rcx
leaq 0xa9681(%rip), %rax # 0x124700
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
callq 0x46ad0
movslq -0x8(%rbp), %rcx
leaq 0xa9666(%rip), %rax # 0x124700
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x8(%rax)
movslq -0x8(%rbp), %rcx
leaq 0xa964c(%rip), %rax # 0x124700
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
callq 0x46ad0
movslq -0x8(%rbp), %rcx
leaq 0xa9631(%rip), %rax # 0x124700
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x10(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| iq2xs_free_impl:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_4], edi
cmp [rbp+var_4], 10h
jz short loc_7B01A
cmp [rbp+var_4], 11h
jz short loc_7B01A
cmp [rbp+var_4], 13h
jz short loc_7B01A
cmp [rbp+var_4], 1Dh
jz short loc_7B01A
cmp [rbp+var_4], 16h
jz short loc_7B01A
lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0B69h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTypeGgmlTypeIq; "type == GGML_TYPE_IQ2_XXS || type == GG"...
mov al, 0
call _ggml_abort
loc_7B01A:
mov edi, [rbp+var_4]
call iq2_data_index
mov [rbp+var_8], eax
movsxd rcx, [rbp+var_8]
lea rax, iq2_data
imul rcx, 18h
add rax, rcx
cmp qword ptr [rax], 0
jz loc_7B0DE
movsxd rcx, [rbp+var_8]
lea rax, iq2_data
imul rcx, 18h
add rax, rcx
mov rdi, [rax]
call _free
movsxd rcx, [rbp+var_8]
lea rax, iq2_data
imul rcx, 18h
add rax, rcx
mov qword ptr [rax], 0
movsxd rcx, [rbp+var_8]
lea rax, iq2_data
imul rcx, 18h
add rax, rcx
mov rdi, [rax+8]
call _free
movsxd rcx, [rbp+var_8]
lea rax, iq2_data
imul rcx, 18h
add rax, rcx
mov qword ptr [rax+8], 0
movsxd rcx, [rbp+var_8]
lea rax, iq2_data
imul rcx, 18h
add rax, rcx
mov rdi, [rax+10h]
call _free
movsxd rcx, [rbp+var_8]
lea rax, iq2_data
imul rcx, 18h
add rax, rcx
mov qword ptr [rax+10h], 0
loc_7B0DE:
add rsp, 10h
pop rbp
retn
| _QWORD * iq2xs_free_impl(int a1, const char *a2)
{
_QWORD *result; // rax
int v3; // [rsp+8h] [rbp-8h]
if ( a1 != 16 && a1 != 17 && a1 != 19 && a1 != 29 && a1 != 22 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c",
2921,
(long long)"GGML_ASSERT(%s) failed",
"type == GGML_TYPE_IQ2_XXS || type == GGML_TYPE_IQ2_XS || type == GGML_TYPE_IQ1_S || type == GGML_TYPE_IQ1_M || typ"
"e == GGML_TYPE_IQ2_S");
v3 = iq2_data_index(a1);
result = &iq2_data[3 * v3];
if ( *result )
{
free(iq2_data[3 * v3], a2);
iq2_data[3 * v3] = 0LL;
free(iq2_data[3 * v3 + 1], a2);
iq2_data[3 * v3 + 1] = 0LL;
free(iq2_data[3 * v3 + 2], a2);
result = &iq2_data[3 * v3];
result[2] = 0LL;
}
return result;
}
| iq2xs_free_impl:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV dword ptr [RBP + -0x4],EDI
CMP dword ptr [RBP + -0x4],0x10
JZ 0x0017b01a
CMP dword ptr [RBP + -0x4],0x11
JZ 0x0017b01a
CMP dword ptr [RBP + -0x4],0x13
JZ 0x0017b01a
CMP dword ptr [RBP + -0x4],0x1d
JZ 0x0017b01a
CMP dword ptr [RBP + -0x4],0x16
JZ 0x0017b01a
LEA RDI,[0x1c0d5c]
MOV ESI,0xb69
LEA RDX,[0x1b1609]
LEA RCX,[0x1c1951]
MOV AL,0x0
CALL 0x00148a00
LAB_0017b01a:
MOV EDI,dword ptr [RBP + -0x4]
CALL 0x0017add0
MOV dword ptr [RBP + -0x8],EAX
MOVSXD RCX,dword ptr [RBP + -0x8]
LEA RAX,[0x224700]
IMUL RCX,RCX,0x18
ADD RAX,RCX
CMP qword ptr [RAX],0x0
JZ 0x0017b0de
MOVSXD RCX,dword ptr [RBP + -0x8]
LEA RAX,[0x224700]
IMUL RCX,RCX,0x18
ADD RAX,RCX
MOV RDI,qword ptr [RAX]
CALL 0x00146ad0
MOVSXD RCX,dword ptr [RBP + -0x8]
LEA RAX,[0x224700]
IMUL RCX,RCX,0x18
ADD RAX,RCX
MOV qword ptr [RAX],0x0
MOVSXD RCX,dword ptr [RBP + -0x8]
LEA RAX,[0x224700]
IMUL RCX,RCX,0x18
ADD RAX,RCX
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x00146ad0
MOVSXD RCX,dword ptr [RBP + -0x8]
LEA RAX,[0x224700]
IMUL RCX,RCX,0x18
ADD RAX,RCX
MOV qword ptr [RAX + 0x8],0x0
MOVSXD RCX,dword ptr [RBP + -0x8]
LEA RAX,[0x224700]
IMUL RCX,RCX,0x18
ADD RAX,RCX
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x00146ad0
MOVSXD RCX,dword ptr [RBP + -0x8]
LEA RAX,[0x224700]
IMUL RCX,RCX,0x18
ADD RAX,RCX
MOV qword ptr [RAX + 0x10],0x0
LAB_0017b0de:
ADD RSP,0x10
POP RBP
RET
|
void iq2xs_free_impl(int param_1)
{
int iVar1;
if ((((param_1 != 0x10) && (param_1 != 0x11)) && (param_1 != 0x13)) &&
((param_1 != 0x1d && (param_1 != 0x16)))) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c"
,0xb69,"GGML_ASSERT(%s) failed",
"type == GGML_TYPE_IQ2_XXS || type == GGML_TYPE_IQ2_XS || type == GGML_TYPE_IQ1_S || type == GGML_TYPE_IQ1_M || type == GGML_TYPE_IQ2_S"
);
}
iVar1 = iq2_data_index(param_1);
if (*(long *)(iq2_data + (long)iVar1 * 0x18) != 0) {
free(*(void **)(iq2_data + (long)iVar1 * 0x18));
*(int8 *)(iq2_data + (long)iVar1 * 0x18) = 0;
free(*(void **)(iq2_data + (long)iVar1 * 0x18 + 8));
*(int8 *)(iq2_data + (long)iVar1 * 0x18 + 8) = 0;
free(*(void **)(iq2_data + (long)iVar1 * 0x18 + 0x10));
*(int8 *)(iq2_data + (long)iVar1 * 0x18 + 0x10) = 0;
}
return;
}
|
|
6,522 | iq2xs_free_impl | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c | void iq2xs_free_impl(enum ggml_type type) {
GGML_ASSERT(type == GGML_TYPE_IQ2_XXS || type == GGML_TYPE_IQ2_XS || type == GGML_TYPE_IQ1_S || type == GGML_TYPE_IQ1_M || type == GGML_TYPE_IQ2_S);
const int gindex = iq2_data_index(type);
if (iq2_data[gindex].grid) {
free(iq2_data[gindex].grid); iq2_data[gindex].grid = NULL;
free(iq2_data[gindex].map); iq2_data[gindex].map = NULL;
free(iq2_data[gindex].neighbours); iq2_data[gindex].neighbours = NULL;
}
} | O1 | c | iq2xs_free_impl:
pushq %r14
pushq %rbx
pushq %rax
leal -0x10(%rdi), %eax
cmpl $0x6, %eax
ja 0x3547c
leaq 0x1ba39(%rip), %rcx # 0x50ea8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorl %eax, %eax
jmp 0x3549d
cmpl $0x1d, %edi
jne 0x354e2
cmpl $0x1d, %edi
sete %al
cmpl $0x13, %edi
sete %cl
orb %al, %cl
movzbl %cl, %eax
xorq $0x3, %rax
jmp 0x3549d
movl $0x1, %eax
leaq (%rax,%rax,2), %rax
leaq 0x79e28(%rip), %rcx # 0xaf2d0
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x354da
leaq (%rcx,%rax,8), %rbx
callq 0x18430
xorl %r14d, %r14d
movq %r14, (%rbx)
movq 0x8(%rbx), %rdi
callq 0x18430
movq %r14, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x18430
movq %r14, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2631b(%rip), %rdi # 0x5b804
leaq 0x170d1(%rip), %rdx # 0x4c5c1
leaq 0x26f02(%rip), %rcx # 0x5c3f9
movl $0xb69, %esi # imm = 0xB69
xorl %eax, %eax
callq 0x18ce0
| iq2xs_free_impl:
push r14
push rbx
push rax
lea eax, [rdi-10h]; switch 7 cases
cmp eax, 6
ja short def_35476; jumptable 0000000000035476 default case
lea rcx, jpt_35476
movsxd rax, ds:(jpt_35476 - 50EA8h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_35478:
xor eax, eax; jumptable 0000000000035476 case 16
jmp short loc_3549D
def_35476:
cmp edi, 1Dh; jumptable 0000000000035476 default case
jnz short loc_354E2; jumptable 0000000000035476 cases 18,20,21
loc_35481:
cmp edi, 1Dh; jumptable 0000000000035476 cases 19,22
setz al
cmp edi, 13h
setz cl
or cl, al
movzx eax, cl
xor rax, 3
jmp short loc_3549D
loc_35498:
mov eax, 1; jumptable 0000000000035476 case 17
loc_3549D:
lea rax, [rax+rax*2]
lea rcx, iq2_data
mov rdi, [rcx+rax*8]
test rdi, rdi
jz short loc_354DA
lea rbx, [rcx+rax*8]
call _free
xor r14d, r14d
mov [rbx], r14
mov rdi, [rbx+8]
call _free
mov [rbx+8], r14
mov rdi, [rbx+10h]
call _free
mov [rbx+10h], r14
loc_354DA:
add rsp, 8
pop rbx
pop r14
retn
loc_354E2:
lea rdi, aWorkspaceLlm4b_4; jumptable 0000000000035476 cases 18,20,21
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTypeGgmlTypeIq; "type == GGML_TYPE_IQ2_XXS || type == GG"...
mov esi, 0B69h
xor eax, eax
call _ggml_abort
| long long iq2xs_free_impl(int a1, long long a2, long long a3, long long a4, int a5, int a6)
{
long long v6; // rax
long long result; // rax
long long v8; // rdi
long long *v9; // rbx
switch ( a1 )
{
case 16:
v6 = 0LL;
goto LABEL_6;
case 17:
v6 = 1LL;
goto LABEL_6;
case 18:
case 20:
case 21:
goto LABEL_9;
case 19:
case 22:
goto LABEL_4;
default:
if ( a1 != 29 )
LABEL_9:
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c",
2921,
(unsigned int)"GGML_ASSERT(%s) failed",
(unsigned int)"type == GGML_TYPE_IQ2_XXS || type == GGML_TYPE_IQ2_XS || type == GGML_TYPE_IQ1_S || type == GGML"
"_TYPE_IQ1_M || type == GGML_TYPE_IQ2_S",
a5,
a6);
LABEL_4:
v6 = ((a1 == 29) | (unsigned __int8)(a1 == 19)) ^ 3LL;
LABEL_6:
result = 3 * v6;
v8 = iq2_data[result];
if ( v8 )
{
v9 = &iq2_data[result];
free(v8);
*v9 = 0LL;
free(v9[1]);
v9[1] = 0LL;
result = free(v9[2]);
v9[2] = 0LL;
}
return result;
}
}
| iq2xs_free_impl:
PUSH R14
PUSH RBX
PUSH RAX
LEA EAX,[RDI + -0x10]
CMP EAX,0x6
JA 0x0013547c
LEA RCX,[0x150ea8]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_10:
XOR EAX,EAX
JMP 0x0013549d
default:
CMP EDI,0x1d
JNZ 0x001354e2
caseD_13:
CMP EDI,0x1d
SETZ AL
CMP EDI,0x13
SETZ CL
OR CL,AL
MOVZX EAX,CL
XOR RAX,0x3
JMP 0x0013549d
caseD_11:
MOV EAX,0x1
LAB_0013549d:
LEA RAX,[RAX + RAX*0x2]
LEA RCX,[0x1af2d0]
MOV RDI,qword ptr [RCX + RAX*0x8]
TEST RDI,RDI
JZ 0x001354da
LEA RBX,[RCX + RAX*0x8]
CALL 0x00118430
XOR R14D,R14D
MOV qword ptr [RBX],R14
MOV RDI,qword ptr [RBX + 0x8]
CALL 0x00118430
MOV qword ptr [RBX + 0x8],R14
MOV RDI,qword ptr [RBX + 0x10]
CALL 0x00118430
MOV qword ptr [RBX + 0x10],R14
LAB_001354da:
ADD RSP,0x8
POP RBX
POP R14
RET
caseD_12:
LEA RDI,[0x15b804]
LEA RDX,[0x14c5c1]
LEA RCX,[0x15c3f9]
MOV ESI,0xb69
XOR EAX,EAX
CALL 0x00118ce0
|
void iq2xs_free_impl(int param_1)
{
ulong uVar1;
switch(param_1) {
case 0x10:
uVar1 = 0;
break;
case 0x11:
uVar1 = 1;
break;
case 0x12:
case 0x14:
case 0x15:
switchD_00135476_caseD_12:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c"
,0xb69,"GGML_ASSERT(%s) failed",
"type == GGML_TYPE_IQ2_XXS || type == GGML_TYPE_IQ2_XS || type == GGML_TYPE_IQ1_S || type == GGML_TYPE_IQ1_M || type == GGML_TYPE_IQ2_S"
);
default:
if (param_1 != 0x1d) goto switchD_00135476_caseD_12;
case 0x13:
case 0x16:
uVar1 = (ulong)(param_1 == 0x13 || param_1 == 0x1d) ^ 3;
}
if ((void *)(&iq2_data)[uVar1 * 3] != (void *)0x0) {
free((void *)(&iq2_data)[uVar1 * 3]);
(&iq2_data)[uVar1 * 3] = 0;
free((void *)(&DAT_001af2d8)[uVar1 * 3]);
(&DAT_001af2d8)[uVar1 * 3] = 0;
free((void *)(&DAT_001af2e0)[uVar1 * 3]);
(&DAT_001af2e0)[uVar1 * 3] = 0;
}
return;
}
|
|
6,523 | iq2xs_free_impl | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c | void iq2xs_free_impl(enum ggml_type type) {
GGML_ASSERT(type == GGML_TYPE_IQ2_XXS || type == GGML_TYPE_IQ2_XS || type == GGML_TYPE_IQ1_S || type == GGML_TYPE_IQ1_M || type == GGML_TYPE_IQ2_S);
const int gindex = iq2_data_index(type);
if (iq2_data[gindex].grid) {
free(iq2_data[gindex].grid); iq2_data[gindex].grid = NULL;
free(iq2_data[gindex].map); iq2_data[gindex].map = NULL;
free(iq2_data[gindex].neighbours); iq2_data[gindex].neighbours = NULL;
}
} | O2 | c | iq2xs_free_impl:
pushq %rbx
cmpl $0x1d, %edi
ja 0x38a86
movl $0x204b0000, %eax # imm = 0x204B0000
btl %edi, %eax
jae 0x38a86
callq 0x389b7
movl %eax, %eax
imulq $0x18, %rax, %rax
leaq 0x7c05d(%rip), %rbx # 0xb4ab0
movq (%rax,%rbx), %rdi
testq %rdi, %rdi
je 0x38a84
addq %rax, %rbx
callq 0x1ed30
andq $0x0, (%rbx)
movq 0x8(%rbx), %rdi
callq 0x1ed30
andq $0x0, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x1ed30
andq $0x0, 0x10(%rbx)
popq %rbx
retq
leaq 0x24fd7(%rip), %rdi # 0x5da64
leaq 0x15b41(%rip), %rdx # 0x4e5d5
leaq 0x25bbe(%rip), %rcx # 0x5e659
movl $0xb69, %esi # imm = 0xB69
xorl %eax, %eax
callq 0x1f9b0
| iq2xs_free_impl:
push rbx
cmp edi, 1Dh
ja short loc_38A86
mov eax, 204B0000h
bt eax, edi
jnb short loc_38A86
call iq2_data_index
mov eax, eax
imul rax, 18h
lea rbx, iq2_data
mov rdi, [rax+rbx]
test rdi, rdi
jz short loc_38A84
add rbx, rax
call _free
and qword ptr [rbx], 0
mov rdi, [rbx+8]
call _free
and qword ptr [rbx+8], 0
mov rdi, [rbx+10h]
call _free
and qword ptr [rbx+10h], 0
loc_38A84:
pop rbx
retn
loc_38A86:
lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTypeGgmlTypeIq; "type == GGML_TYPE_IQ2_XXS || type == GG"...
mov esi, 0B69h
xor eax, eax
call _ggml_abort
| long long iq2xs_free_impl(
unsigned int a1,
const char *a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
int v14; // eax
long long result; // rax
long long v16; // rdi
_QWORD *v17; // rbx
char v18; // [rsp+0h] [rbp-8h]
if ( a1 > 0x1D || (v14 = 541786112, !_bittest(&v14, a1)) )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c",
2921,
(long long)"GGML_ASSERT(%s) failed",
(long long)"type == GGML_TYPE_IQ2_XXS || type == GGML_TYPE_IQ2_XS || type == GGML_TYPE_IQ1_S || type == GGML_TYPE_IQ1"
"_M || type == GGML_TYPE_IQ2_S",
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v18);
result = 24LL * (unsigned int)iq2_data_index(a1, a7, a8, a9, a10, a11, a12, a13, a14, (long long)a2, a3, a4, a5, a6);
v16 = *(long long *)((char *)iq2_data + result);
if ( v16 )
{
v17 = (long long *)((char *)iq2_data + result);
free(v16, a2);
*v17 = 0LL;
free(v17[1], a2);
v17[1] = 0LL;
result = free(v17[2], a2);
v17[2] = 0LL;
}
return result;
}
| iq2xs_free_impl:
PUSH RBX
CMP EDI,0x1d
JA 0x00138a86
MOV EAX,0x204b0000
BT EAX,EDI
JNC 0x00138a86
CALL 0x001389b7
MOV EAX,EAX
IMUL RAX,RAX,0x18
LEA RBX,[0x1b4ab0]
MOV RDI,qword ptr [RAX + RBX*0x1]
TEST RDI,RDI
JZ 0x00138a84
ADD RBX,RAX
CALL 0x0011ed30
AND qword ptr [RBX],0x0
MOV RDI,qword ptr [RBX + 0x8]
CALL 0x0011ed30
AND qword ptr [RBX + 0x8],0x0
MOV RDI,qword ptr [RBX + 0x10]
CALL 0x0011ed30
AND qword ptr [RBX + 0x10],0x0
LAB_00138a84:
POP RBX
RET
LAB_00138a86:
LEA RDI,[0x15da64]
LEA RDX,[0x14e5d5]
LEA RCX,[0x15e659]
MOV ESI,0xb69
XOR EAX,EAX
CALL 0x0011f9b0
|
void iq2xs_free_impl(uint param_1)
{
uint uVar1;
ulong uVar2;
if ((param_1 < 0x1e) && ((0x204b0000U >> (param_1 & 0x1f) & 1) != 0)) {
uVar1 = iq2_data_index();
uVar2 = (ulong)uVar1;
if ((void *)(&iq2_data)[uVar2 * 3] != (void *)0x0) {
free((void *)(&iq2_data)[uVar2 * 3]);
(&iq2_data)[uVar2 * 3] = 0;
free((void *)(&DAT_001b4ab8)[uVar2 * 3]);
(&DAT_001b4ab8)[uVar2 * 3] = 0;
free((void *)(&DAT_001b4ac0)[uVar2 * 3]);
(&DAT_001b4ac0)[uVar2 * 3] = 0;
}
return;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c"
,0xb69,"GGML_ASSERT(%s) failed",
"type == GGML_TYPE_IQ2_XXS || type == GGML_TYPE_IQ2_XS || type == GGML_TYPE_IQ1_S || type == GGML_TYPE_IQ1_M || type == GGML_TYPE_IQ2_S"
);
}
|
|
6,524 | stbi__jpeg_info(stbi__context*, int*, int*, int*) | monkey531[P]llama/examples/llava/../../common/stb_image.h | static int stbi__jpeg_info(stbi__context *s, int *x, int *y, int *comp)
{
int result;
stbi__jpeg* j = (stbi__jpeg*) (stbi__malloc(sizeof(stbi__jpeg)));
if (!j) return stbi__err("outofmem", "Out of memory");
memset(j, 0, sizeof(stbi__jpeg));
j->s = s;
result = stbi__jpeg_info_raw(j, x, y, comp);
STBI_FREE(j);
return result;
} | O0 | c | stbi__jpeg_info(stbi__context*, int*, int*, int*):
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq %rcx, 0x10(%rsp)
movl $0x4888, %edi # imm = 0x4888
callq 0x77db0
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0xa3d5f
leaq 0x1ac537(%rip), %rdi # 0x25028b
callq 0x767f0
movl %eax, 0x34(%rsp)
jmp 0xa3da8
movq (%rsp), %rdi
xorl %esi, %esi
movl $0x4888, %edx # imm = 0x4888
callq 0x616d0
movq 0x28(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, (%rax)
movq (%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rcx
callq 0xa47d0
movl %eax, 0xc(%rsp)
movq (%rsp), %rdi
callq 0x613a0
movl 0xc(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZL15stbi__jpeg_infoP13stbi__contextPiS1_S1_:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov [rsp+38h+var_20], rdx
mov [rsp+38h+var_28], rcx
mov edi, 4888h; unsigned __int64
call _ZL12stbi__mallocm; stbi__malloc(ulong)
mov [rsp+38h+var_38], rax
cmp [rsp+38h+var_38], 0
jnz short loc_A3D5F
lea rdi, aOutofmem; "outofmem"
call _ZL9stbi__errPKc; stbi__err(char const*)
mov [rsp+38h+var_4], eax
jmp short loc_A3DA8
loc_A3D5F:
mov rdi, [rsp+38h+var_38]
xor esi, esi
mov edx, 4888h
call _memset
mov rcx, [rsp+38h+var_10]
mov rax, [rsp+38h+var_38]
mov [rax], rcx
mov rdi, [rsp+38h+var_38]
mov rsi, [rsp+38h+var_18]
mov rdx, [rsp+38h+var_20]
mov rcx, [rsp+38h+var_28]
call _ZL19stbi__jpeg_info_rawP10stbi__jpegPiS1_S1_; stbi__jpeg_info_raw(stbi__jpeg *,int *,int *,int *)
mov [rsp+38h+var_2C], eax
mov rdi, [rsp+38h+var_38]
call _free
mov eax, [rsp+38h+var_2C]
mov [rsp+38h+var_4], eax
loc_A3DA8:
mov eax, [rsp+38h+var_4]
add rsp, 38h
retn
| long long stbi__jpeg_info(long long a1, long long a2, long long a3, long long a4)
{
_QWORD *v5; // [rsp+0h] [rbp-38h]
unsigned int v6; // [rsp+Ch] [rbp-2Ch]
v5 = (_QWORD *)stbi__malloc(18568LL);
if ( v5 )
{
memset(v5, 0LL, 18568LL);
*v5 = a1;
v6 = stbi__jpeg_info_raw(v5, a2, a3, a4);
free(v5);
return v6;
}
else
{
return (unsigned int)stbi__err("outofmem");
}
}
| stbi__jpeg_info:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV qword ptr [RSP + 0x18],RDX
MOV qword ptr [RSP + 0x10],RCX
MOV EDI,0x4888
CALL 0x00177db0
MOV qword ptr [RSP],RAX
CMP qword ptr [RSP],0x0
JNZ 0x001a3d5f
LEA RDI,[0x35028b]
CALL 0x001767f0
MOV dword ptr [RSP + 0x34],EAX
JMP 0x001a3da8
LAB_001a3d5f:
MOV RDI,qword ptr [RSP]
XOR ESI,ESI
MOV EDX,0x4888
CALL 0x001616d0
MOV RCX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP]
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x10]
CALL 0x001a47d0
MOV dword ptr [RSP + 0xc],EAX
MOV RDI,qword ptr [RSP]
CALL 0x001613a0
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSP + 0x34],EAX
LAB_001a3da8:
MOV EAX,dword ptr [RSP + 0x34]
ADD RSP,0x38
RET
|
/* stbi__jpeg_info(stbi__context*, int*, int*, int*) */
int4 stbi__jpeg_info(stbi__context *param_1,int *param_2,int *param_3,int *param_4)
{
stbi__jpeg *__s;
int4 local_4;
__s = (stbi__jpeg *)stbi__malloc(0x4888);
if (__s == (stbi__jpeg *)0x0) {
local_4 = stbi__err("outofmem");
}
else {
memset(__s,0,0x4888);
*(stbi__context **)__s = param_1;
local_4 = stbi__jpeg_info_raw(__s,param_2,param_3,param_4);
free(__s);
}
return local_4;
}
|
|
6,525 | mcp::sse_client::subscribe_to_resource(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | hkr04[P]cpp-mcp/src/mcp_sse_client.cpp | json sse_client::subscribe_to_resource(const std::string& resource_uri) {
return send_request("resources/subscribe", {
{"uri", resource_uri}
}).result;
} | O2 | cpp | mcp::sse_client::subscribe_to_resource(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x28bb4(%rip), %rsi # 0x39ba4
leaq 0x60(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x99ce
leaq 0x28b9a(%rip), %rsi # 0x39ba0
leaq 0x30(%rsp), %rdi
callq 0x9e14
leaq 0x48(%rsp), %rdi
movq %r15, %rsi
callq 0x12438
leaq 0x18(%rsp), %rdi
leaq 0x30(%rsp), %rsi
pushq $0x2
popq %rdx
callq 0x9a3a
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
pushq $0x1
popq %rdx
pushq $0x1
popq %rcx
pushq $0x2
popq %r8
callq 0x9a52
movq (%r14), %rax
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %r14, %rsi
callq *0x28(%rax)
leaq 0x80(%rsp), %rdi
movups 0x30(%rdi), %xmm0
movups %xmm0, (%rbx)
movb $0x0, 0x30(%rdi)
andq $0x0, 0x38(%rdi)
callq 0x1278a
leaq 0x8(%rsp), %rdi
callq 0xa80c
leaq 0x18(%rsp), %rdi
callq 0xa80c
pushq $0x18
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x30, %rdi
callq 0xa80c
addq $-0x18, %r14
cmpq $-0x18, %r14
jne 0x11098
leaq 0x60(%rsp), %rdi
callq 0x8b18
movq %rbx, %rax
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xa80c
jmp 0x110db
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0xa80c
jmp 0x110ea
movq %rax, %rbx
pushq $0x18
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x30, %rdi
callq 0xa80c
addq $-0x18, %r14
cmpq $-0x18, %r14
jne 0x110ee
jmp 0x11119
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xa80c
jmp 0x11119
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x8b18
movq %rbx, %rdi
callq 0x89c0
nop
| _ZN3mcp10sse_client21subscribe_to_resourceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push rbx
sub rsp, 0D0h
mov r15, rdx
mov r14, rsi
mov rbx, rdi
lea rsi, aResourcesSubsc; "resources/subscribe"
lea rdi, [rsp+0E8h+var_88]
lea rdx, [rsp+0E8h+var_E1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, aUri; "uri"
lea rdi, [rsp+0E8h+var_B8]
call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA4_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_
lea rdi, [rsp+0E8h+var_A0]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRKSB_ETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSL_
lea rdi, [rsp+0E8h+var_D0]
lea rsi, [rsp+0E8h+var_B8]
push 2
pop rdx
call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ESt16initializer_listISG_E; nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::json_ref(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>)
lea rdi, [rsp+0E8h+var_E0]
lea rsi, [rsp+0E8h+var_D0]
push 1
pop rdx
push 1
pop rcx
push 2
pop r8
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)
mov rax, [r14]
lea rdi, [rsp+0E8h+var_68]
lea rdx, [rsp+0E8h+var_88]
lea rcx, [rsp+0E8h+var_E0]
mov rsi, r14
call qword ptr [rax+28h]
lea rdi, [rsp+0E8h+var_68]; this
movups xmm0, xmmword ptr [rdi+30h]
movups xmmword ptr [rbx], xmm0
mov byte ptr [rdi+30h], 0
and qword ptr [rdi+38h], 0
call _ZN3mcp8responseD2Ev; mcp::response::~response()
lea rdi, [rsp+0E8h+var_E0]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [rsp+0E8h+var_D0]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
push 18h
pop r14
loc_11098:
lea rdi, [rsp+r14+0E8h+var_E8]
add rdi, 30h ; '0'
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
add r14, 0FFFFFFFFFFFFFFE8h
cmp r14, 0FFFFFFFFFFFFFFE8h
jnz short loc_11098
lea rdi, [rsp+0E8h+var_88]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 0D0h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_0]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_110DB
mov rbx, rax
loc_110DB:
lea rdi, [rsp+arg_10]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_110EA
mov rbx, rax
loc_110EA:
push 18h
pop r14
loc_110EE:
lea rdi, [rsp+r14+0]
add rdi, 30h ; '0'
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
add r14, 0FFFFFFFFFFFFFFE8h
cmp r14, 0FFFFFFFFFFFFFFE8h
jnz short loc_110EE
jmp short loc_11119
mov rbx, rax
lea rdi, [rsp+arg_28]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_11119
mov rbx, rax
loc_11119:
lea rdi, [rsp+arg_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| _OWORD * mcp::sse_client::subscribe_to_resource(_OWORD *a1, long long a2, long long a3)
{
long long i; // r14
_BYTE v6[16]; // [rsp+8h] [rbp-E0h] BYREF
_BYTE v7[24]; // [rsp+18h] [rbp-D0h] BYREF
_BYTE v8[24]; // [rsp+30h] [rbp-B8h] BYREF
_BYTE v9[24]; // [rsp+48h] [rbp-A0h] BYREF
_QWORD v10[4]; // [rsp+60h] [rbp-88h] BYREF
_BYTE v11[48]; // [rsp+80h] [rbp-68h] BYREF
__int128 v12; // [rsp+B0h] [rbp-38h]
std::string::basic_string<std::allocator<char>>(v10, (long long)"resources/subscribe");
ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA4_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_((long long)v8);
ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRKSB_ETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSL_(
v9,
a3);
nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::json_ref(
(long long)v7,
(long long)v8,
2LL);
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(
v6,
v7,
1LL,
1LL,
2LL);
(*(void ( **)(_BYTE *, long long, _QWORD *, _BYTE *))(*(_QWORD *)a2 + 40LL))(v11, a2, v10, v6);
*a1 = v12;
LOBYTE(v12) = 0;
*((_QWORD *)&v12 + 1) = 0LL;
mcp::response::~response((mcp::response *)v11);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v6);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v7);
for ( i = 24LL; i != -24; i -= 24LL )
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v8[i]);
std::string::~string(v10);
return a1;
}
| subscribe_to_resource:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xd0
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
LEA RSI,[0x139ba4]
LEA RDI,[RSP + 0x60]
LEA RDX,[RSP + 0x7]
CALL 0x001099ce
LAB_00110fff:
LEA RSI,[0x139ba0]
LEA RDI,[RSP + 0x30]
CALL 0x00109e14
LEA RDI,[RSP + 0x48]
LAB_00111015:
MOV RSI,R15
CALL 0x00112438
LAB_0011101d:
LEA RDI,[RSP + 0x18]
LEA RSI,[RSP + 0x30]
PUSH 0x2
POP RDX
CALL 0x00109a3a
LAB_0011102f:
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x18]
PUSH 0x1
POP RDX
PUSH 0x1
POP RCX
PUSH 0x2
POP R8
CALL 0x00109a52
MOV RAX,qword ptr [R14]
LAB_0011104b:
LEA RDI,[RSP + 0x80]
LEA RDX,[RSP + 0x60]
LEA RCX,[RSP + 0x8]
MOV RSI,R14
CALL qword ptr [RAX + 0x28]
LAB_00111063:
LEA RDI,[RSP + 0x80]
MOVUPS XMM0,xmmword ptr [RDI + 0x30]
MOVUPS xmmword ptr [RBX],XMM0
MOV byte ptr [RDI + 0x30],0x0
AND qword ptr [RDI + 0x38],0x0
CALL 0x0011278a
LEA RDI,[RSP + 0x8]
CALL 0x0010a80c
LEA RDI,[RSP + 0x18]
CALL 0x0010a80c
PUSH 0x18
POP R14
LAB_00111098:
LEA RDI,[RSP + R14*0x1]
ADD RDI,0x30
CALL 0x0010a80c
ADD R14,-0x18
CMP R14,-0x18
JNZ 0x00111098
LEA RDI,[RSP + 0x60]
CALL 0x00108b18
MOV RAX,RBX
ADD RSP,0xd0
POP RBX
POP R14
POP R15
RET
|
/* mcp::sse_client::subscribe_to_resource(std::__cxx11::string const&) */
string * mcp::sse_client::subscribe_to_resource(string *param_1)
{
long *in_RSI;
long lVar1;
allocator local_e1;
data local_e0 [16];
data local_d0 [24];
data local_b8 [24];
int1 local_a0 [24];
string local_88 [32];
response local_68 [48];
int1 local_38;
int7 uStack_37;
int8 uStack_30;
std::__cxx11::string::string<std::allocator<char>>(local_88,"resources/subscribe",&local_e1);
/* try { // try from 00110fff to 0011100f has its CatchHandler @ 00111116 */
_ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA4_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_
(local_b8,&DAT_00139ba0);
/* try { // try from 00111015 to 0011101c has its CatchHandler @ 00111107 */
_ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRKSB_ETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSL_
(local_a0);
/* try { // try from 0011101d to 0011102e has its CatchHandler @ 001110e7 */
nlohmann::json_abi_v3_11_3::detail::
json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::json_ref(local_d0,local_b8,2);
/* try { // try from 0011102f to 00111047 has its CatchHandler @ 001110d8 */
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_e0,local_d0,1,1,2);
/* try { // try from 0011104b to 00111062 has its CatchHandler @ 001110c9 */
(**(code **)(*in_RSI + 0x28))(local_68);
*(ulong *)param_1 = CONCAT71(uStack_37,local_38);
*(int8 *)(param_1 + 8) = uStack_30;
local_38 = 0;
uStack_30 = 0;
response::~response(local_68);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_e0);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_d0);
lVar1 = 0x18;
do {
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_b8 + lVar1);
lVar1 = lVar1 + -0x18;
} while (lVar1 != -0x18);
std::__cxx11::string::~string(local_88);
return param_1;
}
|
|
6,526 | JS_InitAtoms | bluesky950520[P]quickjs/quickjs.c | static int JS_InitAtoms(JSRuntime *rt)
{
int i, len, atom_type;
const char *p;
rt->atom_hash_size = 0;
rt->atom_hash = NULL;
rt->atom_count = 0;
rt->atom_size = 0;
rt->atom_free_index = 0;
if (JS_ResizeAtomHash(rt, 256)) /* there are at least 195 predefined atoms */
return -1;
p = js_atom_init;
for(i = 1; i < JS_ATOM_END; i++) {
if (i == JS_ATOM_Private_brand)
atom_type = JS_ATOM_TYPE_PRIVATE;
else if (i >= JS_ATOM_Symbol_toPrimitive)
atom_type = JS_ATOM_TYPE_SYMBOL;
else
atom_type = JS_ATOM_TYPE_STRING;
len = strlen(p);
if (__JS_NewAtomInit(rt, p, len, atom_type) == JS_ATOM_NULL)
return -1;
p = p + len + 1;
}
return 0;
} | O0 | c | JS_InitAtoms:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rax
movl $0x0, 0x50(%rax)
movq 0x18(%rsp), %rax
movq $0x0, 0x60(%rax)
movq 0x18(%rsp), %rax
movl $0x0, 0x54(%rax)
movq 0x18(%rsp), %rax
movl $0x0, 0x58(%rax)
movq 0x18(%rsp), %rax
movl $0x0, 0x70(%rax)
movq 0x18(%rsp), %rdi
movl $0x100, %esi # imm = 0x100
callq 0x5b5c0
cmpl $0x0, %eax
je 0x21167
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x21218
leaq 0xea122(%rip), %rax # 0x10b290
movq %rax, (%rsp)
movl $0x1, 0x14(%rsp)
cmpl $0xe0, 0x14(%rsp)
jge 0x21210
cmpl $0xd2, 0x14(%rsp)
jne 0x2119c
movl $0x4, 0xc(%rsp)
jmp 0x211ba
cmpl $0xd3, 0x14(%rsp)
jl 0x211b0
movl $0x3, 0xc(%rsp)
jmp 0x211b8
movl $0x1, 0xc(%rsp)
jmp 0x211ba
movq (%rsp), %rdi
callq 0xe240
movl %eax, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movq (%rsp), %rsi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
callq 0x28080
cmpl $0x0, %eax
jne 0x211ec
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x21218
movq (%rsp), %rax
movslq 0x10(%rsp), %rcx
addq %rcx, %rax
addq $0x1, %rax
movq %rax, (%rsp)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x2117a
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
| JS_InitAtoms:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov rax, [rsp+28h+var_10]
mov dword ptr [rax+50h], 0
mov rax, [rsp+28h+var_10]
mov qword ptr [rax+60h], 0
mov rax, [rsp+28h+var_10]
mov dword ptr [rax+54h], 0
mov rax, [rsp+28h+var_10]
mov dword ptr [rax+58h], 0
mov rax, [rsp+28h+var_10]
mov dword ptr [rax+70h], 0
mov rdi, [rsp+28h+var_10]
mov esi, 100h
call JS_ResizeAtomHash
cmp eax, 0
jz short loc_21167
mov [rsp+28h+var_4], 0FFFFFFFFh
jmp loc_21218
loc_21167:
lea rax, js_atom_init; "null"
mov [rsp+28h+var_28], rax
mov [rsp+28h+var_14], 1
loc_2117A:
cmp [rsp+28h+var_14], 0E0h
jge loc_21210
cmp [rsp+28h+var_14], 0D2h
jnz short loc_2119C
mov [rsp+28h+var_1C], 4
jmp short loc_211BA
loc_2119C:
cmp [rsp+28h+var_14], 0D3h
jl short loc_211B0
mov [rsp+28h+var_1C], 3
jmp short loc_211B8
loc_211B0:
mov [rsp+28h+var_1C], 1
loc_211B8:
jmp short $+2
loc_211BA:
mov rdi, [rsp+28h+var_28]
call _strlen
mov [rsp+28h+var_18], eax
mov rdi, [rsp+28h+var_10]
mov rsi, [rsp+28h+var_28]
mov edx, [rsp+28h+var_18]
mov ecx, [rsp+28h+var_1C]
call __JS_NewAtomInit
cmp eax, 0
jnz short loc_211EC
mov [rsp+28h+var_4], 0FFFFFFFFh
jmp short loc_21218
loc_211EC:
mov rax, [rsp+28h+var_28]
movsxd rcx, [rsp+28h+var_18]
add rax, rcx
add rax, 1
mov [rsp+28h+var_28], rax
mov eax, [rsp+28h+var_14]
add eax, 1
mov [rsp+28h+var_14], eax
jmp loc_2117A
loc_21210:
mov [rsp+28h+var_4], 0
loc_21218:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
| long long JS_InitAtoms(long long a1)
{
const char *v2; // [rsp+0h] [rbp-28h]
unsigned int v3; // [rsp+Ch] [rbp-1Ch]
unsigned int v4; // [rsp+10h] [rbp-18h]
int i; // [rsp+14h] [rbp-14h]
*(_DWORD *)(a1 + 80) = 0;
*(_QWORD *)(a1 + 96) = 0LL;
*(_DWORD *)(a1 + 84) = 0;
*(_DWORD *)(a1 + 88) = 0;
*(_DWORD *)(a1 + 112) = 0;
if ( (unsigned int)JS_ResizeAtomHash(a1, 256LL) )
{
return (unsigned int)-1;
}
else
{
v2 = "null";
for ( i = 1; i < 224; ++i )
{
if ( i == 210 )
{
v3 = 4;
}
else if ( i < 211 )
{
v3 = 1;
}
else
{
v3 = 3;
}
v4 = strlen(v2);
if ( !(unsigned int)_JS_NewAtomInit(a1, v2, v4, v3) )
return (unsigned int)-1;
v2 += (int)v4 + 1;
}
return 0;
}
}
| JS_InitAtoms:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV RAX,qword ptr [RSP + 0x18]
MOV dword ptr [RAX + 0x50],0x0
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + 0x60],0x0
MOV RAX,qword ptr [RSP + 0x18]
MOV dword ptr [RAX + 0x54],0x0
MOV RAX,qword ptr [RSP + 0x18]
MOV dword ptr [RAX + 0x58],0x0
MOV RAX,qword ptr [RSP + 0x18]
MOV dword ptr [RAX + 0x70],0x0
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,0x100
CALL 0x0015b5c0
CMP EAX,0x0
JZ 0x00121167
MOV dword ptr [RSP + 0x24],0xffffffff
JMP 0x00121218
LAB_00121167:
LEA RAX,[0x20b290]
MOV qword ptr [RSP],RAX
MOV dword ptr [RSP + 0x14],0x1
LAB_0012117a:
CMP dword ptr [RSP + 0x14],0xe0
JGE 0x00121210
CMP dword ptr [RSP + 0x14],0xd2
JNZ 0x0012119c
MOV dword ptr [RSP + 0xc],0x4
JMP 0x001211ba
LAB_0012119c:
CMP dword ptr [RSP + 0x14],0xd3
JL 0x001211b0
MOV dword ptr [RSP + 0xc],0x3
JMP 0x001211b8
LAB_001211b0:
MOV dword ptr [RSP + 0xc],0x1
LAB_001211b8:
JMP 0x001211ba
LAB_001211ba:
MOV RDI,qword ptr [RSP]
CALL 0x0010e240
MOV dword ptr [RSP + 0x10],EAX
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP]
MOV EDX,dword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP + 0xc]
CALL 0x00128080
CMP EAX,0x0
JNZ 0x001211ec
MOV dword ptr [RSP + 0x24],0xffffffff
JMP 0x00121218
LAB_001211ec:
MOV RAX,qword ptr [RSP]
MOVSXD RCX,dword ptr [RSP + 0x10]
ADD RAX,RCX
ADD RAX,0x1
MOV qword ptr [RSP],RAX
MOV EAX,dword ptr [RSP + 0x14]
ADD EAX,0x1
MOV dword ptr [RSP + 0x14],EAX
JMP 0x0012117a
LAB_00121210:
MOV dword ptr [RSP + 0x24],0x0
LAB_00121218:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
int4 JS_InitAtoms(long param_1)
{
int iVar1;
size_t sVar2;
char *local_28;
int4 local_1c;
int local_14;
int4 local_4;
*(int4 *)(param_1 + 0x50) = 0;
*(int8 *)(param_1 + 0x60) = 0;
*(int4 *)(param_1 + 0x54) = 0;
*(int4 *)(param_1 + 0x58) = 0;
*(int4 *)(param_1 + 0x70) = 0;
iVar1 = JS_ResizeAtomHash(param_1,0x100);
if (iVar1 == 0) {
local_28 = "null";
for (local_14 = 1; local_14 < 0xe0; local_14 = local_14 + 1) {
if (local_14 == 0xd2) {
local_1c = 4;
}
else if (local_14 < 0xd3) {
local_1c = 1;
}
else {
local_1c = 3;
}
sVar2 = strlen(local_28);
iVar1 = __JS_NewAtomInit(param_1,local_28,sVar2 & 0xffffffff,local_1c);
if (iVar1 == 0) {
return 0xffffffff;
}
local_28 = local_28 + (long)(int)sVar2 + 1;
}
local_4 = 0;
}
else {
local_4 = 0xffffffff;
}
return local_4;
}
|
|
6,527 | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(char*, int, int, int, int) | monkey531[P]llama/common/json.hpp | inline char* format_buffer(char* buf, int len, int decimal_exponent,
int min_exp, int max_exp)
{
JSON_ASSERT(min_exp < 0);
JSON_ASSERT(max_exp > 0);
const int k = len;
const int n = len + decimal_exponent;
// v = buf * 10^(n-k)
// k is the length of the buffer (number of decimal digits)
// n is the position of the decimal point relative to the start of the buffer.
if (k <= n && n <= max_exp)
{
// digits[000]
// len <= max_exp + 2
std::memset(buf + k, '0', static_cast<size_t>(n) - static_cast<size_t>(k));
// Make it look like a floating-point number (#362, #378)
buf[n + 0] = '.';
buf[n + 1] = '0';
return buf + (static_cast<size_t>(n) + 2);
}
if (0 < n && n <= max_exp)
{
// dig.its
// len <= max_digits10 + 1
JSON_ASSERT(k > n);
std::memmove(buf + (static_cast<size_t>(n) + 1), buf + n, static_cast<size_t>(k) - static_cast<size_t>(n));
buf[n] = '.';
return buf + (static_cast<size_t>(k) + 1U);
}
if (min_exp < n && n <= 0)
{
// 0.[000]digits
// len <= 2 + (-min_exp - 1) + max_digits10
std::memmove(buf + (2 + static_cast<size_t>(-n)), buf, static_cast<size_t>(k));
buf[0] = '0';
buf[1] = '.';
std::memset(buf + 2, '0', static_cast<size_t>(-n));
return buf + (2U + static_cast<size_t>(-n) + static_cast<size_t>(k));
}
if (k == 1)
{
// dE+123
// len <= 1 + 5
buf += 1;
}
else
{
// d.igitsE+123
// len <= max_digits10 + 1 + 5
std::memmove(buf + 2, buf + 1, static_cast<size_t>(k) - 1);
buf[1] = '.';
buf += 1 + static_cast<size_t>(k);
}
*buf++ = 'e';
return append_exponent(buf, n - 1);
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(char*, int, int, int, int):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testl %ecx, %ecx
jns 0xb816f
testl %r8d, %r8d
jle 0xb818b
movq %rdi, %rbx
leal (%rdx,%rsi), %r15d
testl %edx, %edx
sets %al
cmpl %r8d, %r15d
setg %dil
orb %al, %dil
je 0xb8018
cmpl %r8d, %r15d
setg %al
testl %r15d, %r15d
setle %dil
orb %al, %dil
je 0xb8045
testl %r15d, %r15d
setg %al
cmpl %ecx, %r15d
setle %cl
orb %al, %cl
jne 0xb8080
negl %r15d
leaq (%rbx,%r15), %r14
addq $0x2, %r14
movslq %esi, %r12
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x1be30
movw $0x2e30, (%rbx) # imm = 0x2E30
addq $0x2, %rbx
movq %rbx, %rdi
movl $0x30, %esi
movq %r15, %rdx
callq 0x1b4e0
addq %r12, %r14
jmp 0xb8160
movslq %esi, %rax
leaq (%rbx,%rax), %rdi
movslq %r15d, %r14
movq %r14, %rdx
subq %rax, %rdx
movl $0x30, %esi
callq 0x1b4e0
addq %rbx, %r14
addq $0x2, %r14
movw $0x302e, -0x2(%r14) # imm = 0x302E
jmp 0xb8160
testl %edx, %edx
jns 0xb81ac
movl %r15d, %ecx
leaq (%rbx,%rcx), %rax
leaq (%rbx,%rcx), %r14
incq %r14
movl %esi, %r15d
movq %r15, %rdx
subq %rcx, %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x1be30
movb $0x2e, -0x1(%r14)
leaq (%rbx,%r15), %r14
incq %r14
jmp 0xb8160
cmpl $0x1, %esi
je 0xb80a3
leaq 0x2(%rbx), %rdi
leaq 0x1(%rbx), %rax
movslq %esi, %r14
leaq -0x1(%r14), %rdx
movq %rax, %rsi
callq 0x1be30
movb $0x2e, 0x1(%rbx)
addq %r14, %rbx
movb $0x65, 0x1(%rbx)
cmpl $0xfffffc19, %r15d # imm = 0xFFFFFC19
jle 0xb81c8
cmpl $0x3e9, %r15d # imm = 0x3E9
jge 0xb81e4
leaq 0x2(%rbx), %r14
leal -0x1(%r15), %ecx
testl %r15d, %r15d
setle %dl
addb %dl, %dl
addb $0x2b, %dl
movl %ecx, %eax
negl %eax
cmovsl %ecx, %eax
movb %dl, 0x2(%rbx)
cmpl $0x9, %eax
ja 0xb80ed
movb $0x30, 0x3(%rbx)
addq $0x4, %rbx
jmp 0xb8111
cmpl $0x63, %eax
ja 0xb8118
movzbl %al, %eax
imull $0xcd, %eax, %ecx
shrl $0xb, %ecx
movl %ecx, %edx
orb $0x30, %dl
movb %dl, 0x3(%rbx)
addq $0x4, %rbx
addl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
subb %cl, %al
movl $0x3, %ecx
jmp 0xb8159
movl $0xffff, %ecx # imm = 0xFFFF
movl %eax, %edx
andl %ecx, %edx
shrl $0x2, %edx
imull $0x147b, %edx, %edx # imm = 0x147B
shrl $0x11, %edx
leal 0x30(%rdx), %esi
movb %sil, 0x3(%rbx)
imull $0x64, %edx, %edx
subl %edx, %eax
imull $0x67, %eax, %edx
andl %ecx, %edx
shrl $0xa, %edx
movl %edx, %ecx
orb $0x30, %cl
movb %cl, 0x4(%rbx)
addq $0x5, %rbx
addl %edx, %edx
leal (%rdx,%rdx,4), %ecx
subb %cl, %al
movl $0x4, %ecx
addq %rcx, %r14
orb $0x30, %al
movb %al, (%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x35ac3(%rip), %rdi # 0xedc39
leaq 0x35b06(%rip), %rdx # 0xedc83
leaq 0x3b449(%rip), %rcx # 0xf35cd
movl $0x45e3, %esi # imm = 0x45E3
jmp 0xb81a5
leaq 0x35aa7(%rip), %rdi # 0xedc39
leaq 0x35aea(%rip), %rdx # 0xedc83
leaq 0x3b439(%rip), %rcx # 0xf35d9
movl $0x45e4, %esi # imm = 0x45E4
xorl %eax, %eax
callq 0x1be90
leaq 0x35a86(%rip), %rdi # 0xedc39
leaq 0x35ac9(%rip), %rdx # 0xedc83
leaq 0x3b424(%rip), %rcx # 0xf35e5
movl $0x45fe, %esi # imm = 0x45FE
jmp 0xb81a5
leaq 0x35a6a(%rip), %rdi # 0xedc39
leaq 0x35aad(%rip), %rdx # 0xedc83
leaq 0x3b40e(%rip), %rcx # 0xf35eb
movl $0x45ae, %esi # imm = 0x45AE
jmp 0xb81a5
leaq 0x35a4e(%rip), %rdi # 0xedc39
leaq 0x35a91(%rip), %rdx # 0xedc83
leaq 0x3b3fc(%rip), %rcx # 0xf35f5
movl $0x45af, %esi # imm = 0x45AF
jmp 0xb81a5
| _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl13format_bufferEPciiii:
push r15
push r14
push r12
push rbx
push rax
test ecx, ecx
jns loc_B816F
test r8d, r8d
jle loc_B818B
mov rbx, rdi
lea r15d, [rdx+rsi]
test edx, edx
sets al
cmp r15d, r8d
setnle dil
or dil, al
jz short loc_B8018
cmp r15d, r8d
setnle al
test r15d, r15d
setle dil
or dil, al
jz short loc_B8045
test r15d, r15d
setnle al
cmp r15d, ecx
setle cl
or cl, al
jnz loc_B8080
neg r15d
lea r14, [rbx+r15]
add r14, 2
movsxd r12, esi
mov rdi, r14
mov rsi, rbx
mov rdx, r12
call _memmove
mov word ptr [rbx], 2E30h
add rbx, 2
mov rdi, rbx
mov esi, 30h ; '0'
mov rdx, r15
call _memset
add r14, r12
jmp loc_B8160
loc_B8018:
movsxd rax, esi
lea rdi, [rbx+rax]
movsxd r14, r15d
mov rdx, r14
sub rdx, rax
mov esi, 30h ; '0'
call _memset
add r14, rbx
add r14, 2
mov word ptr [r14-2], 302Eh
jmp loc_B8160
loc_B8045:
test edx, edx
jns loc_B81AC
mov ecx, r15d
lea rax, [rbx+rcx]
lea r14, [rbx+rcx]
inc r14
mov r15d, esi
mov rdx, r15
sub rdx, rcx
mov rdi, r14
mov rsi, rax
call _memmove
mov byte ptr [r14-1], 2Eh ; '.'
lea r14, [rbx+r15]
inc r14
jmp loc_B8160
loc_B8080:
cmp esi, 1
jz short loc_B80A3
lea rdi, [rbx+2]
lea rax, [rbx+1]
movsxd r14, esi
lea rdx, [r14-1]
mov rsi, rax
call _memmove
mov byte ptr [rbx+1], 2Eh ; '.'
add rbx, r14
loc_B80A3:
mov byte ptr [rbx+1], 65h ; 'e'
cmp r15d, 0FFFFFC19h
jle loc_B81C8
cmp r15d, 3E9h
jge loc_B81E4
lea r14, [rbx+2]
lea ecx, [r15-1]
test r15d, r15d
setle dl
add dl, dl
add dl, 2Bh ; '+'
mov eax, ecx
neg eax
cmovs eax, ecx
mov [rbx+2], dl
cmp eax, 9
ja short loc_B80ED
mov byte ptr [rbx+3], 30h ; '0'
add rbx, 4
jmp short loc_B8111
loc_B80ED:
cmp eax, 63h ; 'c'
ja short loc_B8118
movzx eax, al
imul ecx, eax, 0CDh
shr ecx, 0Bh
mov edx, ecx
or dl, 30h
mov [rbx+3], dl
add rbx, 4
add ecx, ecx
lea ecx, [rcx+rcx*4]
sub al, cl
loc_B8111:
mov ecx, 3
jmp short loc_B8159
loc_B8118:
mov ecx, 0FFFFh
mov edx, eax
and edx, ecx
shr edx, 2
imul edx, 147Bh
shr edx, 11h
lea esi, [rdx+30h]
mov [rbx+3], sil
imul edx, 64h ; 'd'
sub eax, edx
imul edx, eax, 67h ; 'g'
and edx, ecx
shr edx, 0Ah
mov ecx, edx
or cl, 30h
mov [rbx+4], cl
add rbx, 5
add edx, edx
lea ecx, [rdx+rdx*4]
sub al, cl
mov ecx, 4
loc_B8159:
add r14, rcx
or al, 30h
mov [rbx], al
loc_B8160:
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_B816F:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMinExp0; "min_exp < 0"
mov esi, 45E3h
jmp short loc_B81A5
loc_B818B:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMaxExp0; "max_exp > 0"
mov esi, 45E4h
loc_B81A5:
xor eax, eax
call _ggml_abort
loc_B81AC:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKN; "k > n"
mov esi, 45FEh
jmp short loc_B81A5
loc_B81C8:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aE1000; "e > -1000"
mov esi, 45AEh
jmp short loc_B81A5
loc_B81E4:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aE1000_0; "e < 1000"
mov esi, 45AFh
jmp short loc_B81A5
| char * nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this,
char *a2,
int a3,
int a4,
int a5)
{
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *v5; // rbx
int v6; // r15d
long long v7; // r15
char *v8; // r14
char *v9; // r14
char *v10; // r14
unsigned int v11; // eax
_BYTE *v12; // rbx
long long v13; // rcx
if ( a4 >= 0 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17891LL,
"GGML_ASSERT(%s) failed",
"min_exp < 0");
goto LABEL_26;
}
if ( a5 <= 0 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17892LL,
"GGML_ASSERT(%s) failed",
"max_exp > 0");
goto LABEL_26;
}
v5 = this;
v6 = a3 + (_DWORD)a2;
if ( a3 >= 0 && a3 + (int)a2 <= a5 )
{
memset((char *)this + (int)a2, 48LL, v6 - (long long)(int)a2);
v8 = (char *)this + v6 + 2;
*(_WORD *)((char *)this + v6) = 12334;
return v8;
}
if ( v6 <= a5 && v6 > 0 )
{
if ( a3 < 0 )
{
v9 = (char *)this + (unsigned int)v6 + 1;
memmove(v9, (char *)this + (unsigned int)v6, (unsigned int)a2 - (unsigned long long)(unsigned int)v6);
*(v9 - 1) = 46;
return (char *)this + (unsigned int)a2 + 1;
}
goto LABEL_26;
}
if ( v6 > 0 || v6 <= a4 )
{
if ( (_DWORD)a2 != 1 )
{
memmove((char *)this + 2, (char *)this + 1, (int)a2 - 1LL);
*((_BYTE *)this + 1) = 46;
v5 = (nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)((char *)this + (int)a2);
}
*((_BYTE *)v5 + 1) = 101;
if ( v6 <= -999 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17838LL,
"GGML_ASSERT(%s) failed",
"e > -1000");
}
else
{
if ( v6 < 1001 )
{
v10 = (char *)v5 + 2;
v11 = 1 - v6;
if ( 1 - v6 < 0 )
v11 = v6 - 1;
*((_BYTE *)v5 + 2) = 2 * (v6 <= 0) + 43;
if ( v11 > 9 )
{
if ( v11 > 0x63 )
{
*((_BYTE *)v5 + 3) = ((unsigned int)(5243 * ((unsigned __int16)v11 >> 2)) >> 17) + 48;
LOWORD(v11) = (unsigned __int16)v11 % 0x64u;
*((_BYTE *)v5 + 4) = ((unsigned __int16)(103 * v11) >> 10) | 0x30;
v12 = (char *)v5 + 5;
LOBYTE(v11) = v11 - 10 * ((unsigned __int16)(103 * v11) >> 10);
v13 = 4LL;
goto LABEL_22;
}
*((_BYTE *)v5 + 3) = ((unsigned __int8)v11 / 0xAu) | 0x30;
v12 = (char *)v5 + 4;
LOBYTE(v11) = (unsigned __int8)v11 % 0xAu;
}
else
{
*((_BYTE *)v5 + 3) = 48;
v12 = (char *)v5 + 4;
}
v13 = 3LL;
LABEL_22:
v8 = &v10[v13];
*v12 = v11 | 0x30;
return v8;
}
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17839LL,
"GGML_ASSERT(%s) failed",
"e < 1000");
}
while ( 1 )
LABEL_26:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17918LL,
"GGML_ASSERT(%s) failed",
"k > n");
}
v7 = (unsigned int)-v6;
memmove((char *)this + v7 + 2, this, (int)a2);
*(_WORD *)this = 11824;
memset((char *)this + 2, 48LL, v7);
return (char *)this + v7 + (int)a2 + 2;
}
| format_buffer:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
TEST ECX,ECX
JNS 0x001b816f
TEST R8D,R8D
JLE 0x001b818b
MOV RBX,RDI
LEA R15D,[RDX + RSI*0x1]
TEST EDX,EDX
SETS AL
CMP R15D,R8D
SETG DIL
OR DIL,AL
JZ 0x001b8018
CMP R15D,R8D
SETG AL
TEST R15D,R15D
SETLE DIL
OR DIL,AL
JZ 0x001b8045
TEST R15D,R15D
SETG AL
CMP R15D,ECX
SETLE CL
OR CL,AL
JNZ 0x001b8080
NEG R15D
LEA R14,[RBX + R15*0x1]
ADD R14,0x2
MOVSXD R12,ESI
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R12
CALL 0x0011be30
MOV word ptr [RBX],0x2e30
ADD RBX,0x2
MOV RDI,RBX
MOV ESI,0x30
MOV RDX,R15
CALL 0x0011b4e0
ADD R14,R12
JMP 0x001b8160
LAB_001b8018:
MOVSXD RAX,ESI
LEA RDI,[RBX + RAX*0x1]
MOVSXD R14,R15D
MOV RDX,R14
SUB RDX,RAX
MOV ESI,0x30
CALL 0x0011b4e0
ADD R14,RBX
ADD R14,0x2
MOV word ptr [R14 + -0x2],0x302e
JMP 0x001b8160
LAB_001b8045:
TEST EDX,EDX
JNS 0x001b81ac
MOV ECX,R15D
LEA RAX,[RBX + RCX*0x1]
LEA R14,[RBX + RCX*0x1]
INC R14
MOV R15D,ESI
MOV RDX,R15
SUB RDX,RCX
MOV RDI,R14
MOV RSI,RAX
CALL 0x0011be30
MOV byte ptr [R14 + -0x1],0x2e
LEA R14,[RBX + R15*0x1]
INC R14
JMP 0x001b8160
LAB_001b8080:
CMP ESI,0x1
JZ 0x001b80a3
LEA RDI,[RBX + 0x2]
LEA RAX,[RBX + 0x1]
MOVSXD R14,ESI
LEA RDX,[R14 + -0x1]
MOV RSI,RAX
CALL 0x0011be30
MOV byte ptr [RBX + 0x1],0x2e
ADD RBX,R14
LAB_001b80a3:
MOV byte ptr [RBX + 0x1],0x65
CMP R15D,0xfffffc19
JLE 0x001b81c8
CMP R15D,0x3e9
JGE 0x001b81e4
LEA R14,[RBX + 0x2]
LEA ECX,[R15 + -0x1]
TEST R15D,R15D
SETLE DL
ADD DL,DL
ADD DL,0x2b
MOV EAX,ECX
NEG EAX
CMOVS EAX,ECX
MOV byte ptr [RBX + 0x2],DL
CMP EAX,0x9
JA 0x001b80ed
MOV byte ptr [RBX + 0x3],0x30
ADD RBX,0x4
JMP 0x001b8111
LAB_001b80ed:
CMP EAX,0x63
JA 0x001b8118
MOVZX EAX,AL
IMUL ECX,EAX,0xcd
SHR ECX,0xb
MOV EDX,ECX
OR DL,0x30
MOV byte ptr [RBX + 0x3],DL
ADD RBX,0x4
ADD ECX,ECX
LEA ECX,[RCX + RCX*0x4]
SUB AL,CL
LAB_001b8111:
MOV ECX,0x3
JMP 0x001b8159
LAB_001b8118:
MOV ECX,0xffff
MOV EDX,EAX
AND EDX,ECX
SHR EDX,0x2
IMUL EDX,EDX,0x147b
SHR EDX,0x11
LEA ESI,[RDX + 0x30]
MOV byte ptr [RBX + 0x3],SIL
IMUL EDX,EDX,0x64
SUB EAX,EDX
IMUL EDX,EAX,0x67
AND EDX,ECX
SHR EDX,0xa
MOV ECX,EDX
OR CL,0x30
MOV byte ptr [RBX + 0x4],CL
ADD RBX,0x5
ADD EDX,EDX
LEA ECX,[RDX + RDX*0x4]
SUB AL,CL
MOV ECX,0x4
LAB_001b8159:
ADD R14,RCX
OR AL,0x30
MOV byte ptr [RBX],AL
LAB_001b8160:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_001b816f:
LEA RDI,[0x1edc39]
LEA RDX,[0x1edc83]
LEA RCX,[0x1f35cd]
MOV ESI,0x45e3
JMP 0x001b81a5
LAB_001b818b:
LEA RDI,[0x1edc39]
LEA RDX,[0x1edc83]
LEA RCX,[0x1f35d9]
MOV ESI,0x45e4
LAB_001b81a5:
XOR EAX,EAX
CALL 0x0011be90
LAB_001b81ac:
LEA RDI,[0x1edc39]
LEA RDX,[0x1edc83]
LEA RCX,[0x1f35e5]
MOV ESI,0x45fe
JMP 0x001b81a5
LAB_001b81c8:
LEA RDI,[0x1edc39]
LEA RDX,[0x1edc83]
LEA RCX,[0x1f35eb]
MOV ESI,0x45ae
JMP 0x001b81a5
LAB_001b81e4:
LEA RDI,[0x1edc39]
LEA RDX,[0x1edc83]
LEA RCX,[0x1f35f5]
MOV ESI,0x45af
JMP 0x001b81a5
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(char*, int, int, int, int) */
char * nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer
(char *param_1,int param_2,int param_3,int param_4,int param_5)
{
uint uVar1;
byte bVar2;
uint uVar3;
int iVar4;
ulong uVar5;
long lVar6;
char *pcVar7;
byte *pbVar8;
int8 uVar9;
uint uVar10;
if (-1 < param_4) {
pcVar7 = "min_exp < 0";
uVar9 = 0x45e3;
LAB_001b81a5:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar9,
"GGML_ASSERT(%s) failed",pcVar7);
}
if (param_5 < 1) {
pcVar7 = "max_exp > 0";
uVar9 = 0x45e4;
goto LAB_001b81a5;
}
uVar10 = param_3 + param_2;
if ((int)uVar10 <= param_5 && -1 < param_3) {
memset(param_1 + param_2,0x30,(long)(int)uVar10 - (long)param_2);
pcVar7 = param_1 + (int)uVar10;
pcVar7[0] = '.';
pcVar7[1] = '0';
return pcVar7 + 2;
}
if (0 < (int)uVar10 && (int)uVar10 <= param_5) {
if (param_3 < 0) {
uVar5 = (ulong)uVar10;
memmove(param_1 + uVar5 + 1,param_1 + uVar5,(uint)param_2 - uVar5);
param_1[uVar5] = '.';
return param_1 + (ulong)(uint)param_2 + 1;
}
pcVar7 = "k > n";
uVar9 = 0x45fe;
goto LAB_001b81a5;
}
if (param_4 < (int)uVar10 && (int)uVar10 < 1) {
memmove(param_1 + (ulong)-uVar10 + 2,param_1,(long)param_2);
param_1[0] = '0';
param_1[1] = '.';
memset(param_1 + 2,0x30,(ulong)-uVar10);
return param_1 + (ulong)-uVar10 + 2 + param_2;
}
if (param_2 != 1) {
memmove(param_1 + 2,param_1 + 1,(long)param_2 - 1);
param_1[1] = '.';
param_1 = param_1 + param_2;
}
param_1[1] = 'e';
if ((int)uVar10 < -0x3e6) {
pcVar7 = "e > -1000";
uVar9 = 0x45ae;
goto LAB_001b81a5;
}
if (1000 < (int)uVar10) {
pcVar7 = "e < 1000";
uVar9 = 0x45af;
goto LAB_001b81a5;
}
uVar1 = uVar10 - 1;
uVar3 = -uVar1;
if (0 < (int)uVar1) {
uVar3 = uVar1;
}
param_1[2] = ((int)uVar10 < 1) * '\x02' + '+';
if (uVar3 < 10) {
param_1[3] = '0';
}
else {
if (99 < uVar3) {
uVar10 = (uVar3 & 0xffff) / 100;
param_1[3] = (char)uVar10 + '0';
iVar4 = uVar3 + uVar10 * -100;
bVar2 = (byte)((iVar4 * 0x67 & 0xffffU) >> 10);
param_1[4] = bVar2 | 0x30;
pbVar8 = (byte *)(param_1 + 5);
bVar2 = (char)iVar4 + bVar2 * -10;
lVar6 = 4;
goto LAB_001b8159;
}
bVar2 = (byte)((uVar3 & 0xff) / 10);
param_1[3] = bVar2 | 0x30;
uVar3 = (uint)(byte)((char)uVar3 + bVar2 * -10);
}
bVar2 = (byte)uVar3;
pbVar8 = (byte *)(param_1 + 4);
lVar6 = 3;
LAB_001b8159:
*pbVar8 = bVar2 | 0x30;
return param_1 + lVar6 + 2;
}
|
|
6,528 | ma_apply_redo_index_free_page | eloqsql/storage/maria/ma_key_recover.c | uint _ma_apply_redo_index_free_page(MARIA_HA *info,
LSN lsn,
const uchar *header)
{
pgcache_page_no_t page= page_korr(header);
pgcache_page_no_t free_page= page_korr(header + PAGE_STORE_SIZE);
my_off_t old_link;
MARIA_PINNED_PAGE page_link;
MARIA_SHARE *share= info->s;
uchar *buff;
int result;
DBUG_ENTER("_ma_apply_redo_index_free_page");
DBUG_PRINT("enter", ("page: %lu free_page: %lu",
(ulong) page, (ulong) free_page));
share->state.changed|= (STATE_CHANGED | STATE_NOT_OPTIMIZED_KEYS |
STATE_NOT_SORTED_PAGES | STATE_NOT_ZEROFILLED |
STATE_NOT_MOVABLE);
if (cmp_translog_addr(lsn, share->state.is_of_horizon) >= 0)
share->state.key_del= (my_off_t) page * share->block_size;
old_link= ((free_page != IMPOSSIBLE_PAGE_NO) ?
(my_off_t) free_page * share->block_size :
HA_OFFSET_ERROR);
if (!(buff= pagecache_read(share->pagecache, &share->kfile,
page, 0, 0,
PAGECACHE_PLAIN_PAGE, PAGECACHE_LOCK_WRITE,
&page_link.link)))
{
result= (uint) my_errno;
_ma_set_fatal_error(info, my_errno);
goto err;
}
if (lsn_korr(buff) >= lsn)
{
/* Already applied */
check_skipped_lsn(info, lsn_korr(buff), 0, page);
result= 0;
goto err;
}
/* Free page */
bzero(buff + LSN_STORE_SIZE, share->keypage_header - LSN_STORE_SIZE);
_ma_store_keynr(share, buff, (uchar) MARIA_DELETE_KEY_NR);
_ma_store_page_used(share, buff, share->keypage_header + 8);
mi_sizestore(buff + share->keypage_header, old_link);
#ifdef IDENTICAL_PAGES_AFTER_RECOVERY
{
bzero(buff + share->keypage_header + 8,
share->block_size - share->keypage_header - 8 -
KEYPAGE_CHECKSUM_SIZE);
}
#endif
/* Mark page to be unlocked and written at _ma_unpin_all_pages() */
page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK;
page_link.changed= 1;
push_dynamic(&info->pinned_pages, (void*) &page_link);
DBUG_RETURN(0);
err:
pagecache_unlock_by_link(share->pagecache, page_link.link,
PAGECACHE_LOCK_WRITE_UNLOCK,
PAGECACHE_UNPIN, LSN_IMPOSSIBLE,
LSN_IMPOSSIBLE, 0, FALSE);
DBUG_RETURN(result);
} | O3 | c | ma_apply_redo_index_free_page:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %r15
movl (%rdx), %eax
movl 0x5(%rdx), %ecx
movzbl 0x4(%rdx), %r12d
shlq $0x20, %r12
orq %rax, %r12
movzbl 0x9(%rdx), %eax
movq (%rdi), %r13
orl $0x1b1, 0x170(%r13) # imm = 0x1B1
shlq $0x20, %rax
orq %rcx, %rax
cmpq %rsi, 0x180(%r13)
jg 0x4379b
movl 0x7bc(%r13), %ecx
imulq %r12, %rcx
movq %rcx, 0x120(%r13)
movq $-0x1, %rdx
movabsq $0xffffffffff, %rcx # imm = 0xFFFFFFFFFF
cmpq %rcx, %rax
je 0x437bf
movl 0x7bc(%r13), %ecx
imulq %rcx, %rax
movq %rax, %rdx
movq %rdx, -0x30(%rbp)
movq 0x600(%r13), %rdi
leaq 0x750(%r13), %rsi
leaq -0x48(%rbp), %rax
movq %r12, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
pushq %rax
pushq $0x4
callq 0x3e012
addq $0x10, %rsp
testq %rax, %rax
je 0x438fd
movq %rax, %rbx
movzwl (%rax), %eax
shlq $0x20, %rax
movzbl 0x2(%rbx), %ecx
shlq $0x30, %rcx
orq %rax, %rcx
movl 0x3(%rbx), %esi
orq %rcx, %rsi
cmpq %r14, %rsi
jge 0x43916
movq %rbx, %rdi
addq $0x7, %rdi
movl 0x744(%r13), %edx
addl $-0x7, %edx
xorl %r14d, %r14d
xorl %esi, %esi
callq 0x2a2c0
movl 0x744(%r13), %eax
addl $-0x4, %eax
movb $-0x1, (%rbx,%rax)
movl 0x744(%r13), %eax
leal 0x8(%rax), %ecx
movb %cl, -0x1(%rbx,%rax)
movl 0x744(%r13), %eax
movb %ch, -0x2(%rbx,%rax)
movq -0x30(%rbp), %rdx
movq %rdx, %rax
shrq $0x20, %rax
movl 0x744(%r13), %ecx
movb %al, 0x3(%rbx,%rcx)
movq %rdx, %rax
shrq $0x28, %rax
movl 0x744(%r13), %ecx
movb %al, 0x2(%rbx,%rcx)
movq %rdx, %rax
shrq $0x30, %rax
movl 0x744(%r13), %ecx
movb %al, 0x1(%rbx,%rcx)
movq %rdx, %rax
shrq $0x38, %rax
movl 0x744(%r13), %ecx
movb %al, (%rbx,%rcx)
movl 0x744(%r13), %eax
movb %dl, 0x7(%rbx,%rax)
movl 0x744(%r13), %eax
movb %dh, 0x6(%rbx,%rax)
movl %edx, %eax
shrl $0x10, %eax
movl 0x744(%r13), %ecx
movb %al, 0x5(%rbx,%rcx)
shrl $0x18, %edx
movl 0x744(%r13), %eax
movb %dl, 0x4(%rbx,%rax)
leaq -0x48(%rbp), %rsi
movl $0x6, 0x8(%rsi)
movb $0x1, 0x10(%rsi)
addq $0x2e8, %r15 # imm = 0x2E8
movq %r15, %rdi
callq 0x94922
jmp 0x4394e
callq 0xa8156
movl (%rax), %r14d
callq 0xa8156
movl (%rax), %esi
movq %r15, %rdi
callq 0x42bb4
jmp 0x43926
xorl %r14d, %r14d
movq %r15, %rdi
xorl %edx, %edx
movq %r12, %rcx
callq 0x38c21
movq 0x600(%r13), %rdi
movq -0x48(%rbp), %rsi
xorl %eax, %eax
movl $0x6, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rax
pushq %rax
callq 0x3dd2d
addq $0x10, %rsp
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ma_apply_redo_index_free_page:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, rsi
mov r15, rdi
mov eax, [rdx]
mov ecx, [rdx+5]
movzx r12d, byte ptr [rdx+4]
shl r12, 20h
or r12, rax
movzx eax, byte ptr [rdx+9]
mov r13, [rdi]
or dword ptr [r13+170h], 1B1h
shl rax, 20h
or rax, rcx
cmp [r13+180h], rsi
jg short loc_4379B
mov ecx, [r13+7BCh]
imul rcx, r12
mov [r13+120h], rcx
loc_4379B:
mov rdx, 0FFFFFFFFFFFFFFFFh
mov rcx, 0FFFFFFFFFFh
cmp rax, rcx
jz short loc_437BF
mov ecx, [r13+7BCh]
imul rax, rcx
mov rdx, rax
loc_437BF:
mov [rbp+var_30], rdx
mov rdi, [r13+600h]
lea rsi, [r13+750h]
lea rax, [rbp+var_48]
mov rdx, r12
xor ecx, ecx
xor r8d, r8d
mov r9d, 1
push rax
push 4
call pagecache_read
add rsp, 10h
test rax, rax
jz loc_438FD
mov rbx, rax
movzx eax, word ptr [rax]
shl rax, 20h
movzx ecx, byte ptr [rbx+2]
shl rcx, 30h
or rcx, rax
mov esi, [rbx+3]
or rsi, rcx
cmp rsi, r14
jge loc_43916
mov rdi, rbx
add rdi, 7
mov edx, [r13+744h]
add edx, 0FFFFFFF9h
xor r14d, r14d
xor esi, esi
call _memset
mov eax, [r13+744h]
add eax, 0FFFFFFFCh
mov byte ptr [rbx+rax], 0FFh
mov eax, [r13+744h]
lea ecx, [rax+8]
mov [rbx+rax-1], cl
mov eax, [r13+744h]
mov [rbx+rax-2], ch
mov rdx, [rbp+var_30]
mov rax, rdx
shr rax, 20h
mov ecx, [r13+744h]
mov [rbx+rcx+3], al
mov rax, rdx
shr rax, 28h
mov ecx, [r13+744h]
mov [rbx+rcx+2], al
mov rax, rdx
shr rax, 30h
mov ecx, [r13+744h]
mov [rbx+rcx+1], al
mov rax, rdx
shr rax, 38h
mov ecx, [r13+744h]
mov [rbx+rcx], al
mov eax, [r13+744h]
mov [rbx+rax+7], dl
mov eax, [r13+744h]
mov [rbx+rax+6], dh
mov eax, edx
shr eax, 10h
mov ecx, [r13+744h]
mov [rbx+rcx+5], al
shr edx, 18h
mov eax, [r13+744h]
mov [rbx+rax+4], dl
lea rsi, [rbp+var_48]
mov dword ptr [rsi+8], 6
mov byte ptr [rsi+10h], 1
add r15, 2E8h
mov rdi, r15
call insert_dynamic
jmp short loc_4394E
loc_438FD:
call _my_thread_var
mov r14d, [rax]
call _my_thread_var
mov esi, [rax]
mov rdi, r15
call _ma_set_fatal_error
jmp short loc_43926
loc_43916:
xor r14d, r14d
mov rdi, r15
xor edx, edx
mov rcx, r12
call check_skipped_lsn
loc_43926:
mov rdi, [r13+600h]
mov rsi, [rbp+var_48]
xor eax, eax
mov edx, 6
mov ecx, 3
xor r8d, r8d
xor r9d, r9d
push rax
push rax
call pagecache_unlock_by_link
add rsp, 10h
loc_4394E:
mov eax, r14d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ma_apply_redo_index_free_page(_DWORD *a1, signed long long a2, unsigned int *a3)
{
long long v5; // rcx
unsigned long long v6; // r12
long long v7; // rax
long long v8; // r13
long long v9; // rax
long long v10; // rdx
long long v11; // rdi
unsigned __int16 *v12; // rax
unsigned __int16 *v13; // rbx
signed long long v14; // rsi
unsigned int v15; // r14d
long long v16; // rax
long long v17; // rdx
int *v18; // rax
long long v19; // rdx
long long v20; // rcx
long long v21; // r8
int v22; // r9d
long long v24; // [rsp+8h] [rbp-48h] BYREF
int v25; // [rsp+10h] [rbp-40h]
char v26; // [rsp+18h] [rbp-38h]
long long v27; // [rsp+20h] [rbp-30h]
v5 = *(unsigned int *)((char *)a3 + 5);
v6 = *a3 | ((unsigned long long)*((unsigned __int8 *)a3 + 4) << 32);
v7 = *((unsigned __int8 *)a3 + 9);
v8 = *(_QWORD *)a1;
*(_DWORD *)(v8 + 368) |= 0x1B1u;
v9 = v5 | (v7 << 32);
if ( *(_QWORD *)(v8 + 384) <= a2 )
*(_QWORD *)(v8 + 288) = v6 * *(unsigned int *)(v8 + 1980);
v10 = -1LL;
if ( v9 != 0xFFFFFFFFFFLL )
v10 = *(unsigned int *)(v8 + 1980) * v9;
v27 = v10;
v11 = *(_QWORD *)(v8 + 1536);
v12 = (unsigned __int16 *)pagecache_read(v11, v8 + 1872, v6, 0, 0LL, 1, 4u, &v24);
if ( !v12 )
{
v15 = *(_DWORD *)my_thread_var(v11);
v18 = (int *)my_thread_var(v11);
ma_set_fatal_error(a1, *v18, v19, v20, v21, v22);
LABEL_10:
pagecache_unlock_by_link(*(_QWORD *)(v8 + 1536), v24, 6, 3, 0LL, 0LL, 0);
return v15;
}
v13 = v12;
v14 = ((unsigned long long)*v12 << 32) | ((unsigned long long)*((unsigned __int8 *)v12 + 2) << 48) | *(unsigned int *)((char *)v12 + 3);
if ( v14 >= a2 )
{
v15 = 0;
check_skipped_lsn((long long)a1, v14, 0, v6);
goto LABEL_10;
}
v15 = 0;
memset((char *)v12 + 7, 0LL, (unsigned int)(*(_DWORD *)(v8 + 1860) - 7));
*((_BYTE *)v13 + (unsigned int)(*(_DWORD *)(v8 + 1860) - 4)) = -1;
v16 = *(unsigned int *)(v8 + 1860);
*((_BYTE *)v13 + v16 - 1) = v16 + 8;
*((_BYTE *)v13 + *(unsigned int *)(v8 + 1860) - 2) = (unsigned __int16)(v16 + 8) >> 8;
v17 = v27;
*((_BYTE *)v13 + *(unsigned int *)(v8 + 1860) + 3) = BYTE4(v27);
*((_BYTE *)v13 + *(unsigned int *)(v8 + 1860) + 2) = BYTE5(v17);
*((_BYTE *)v13 + *(unsigned int *)(v8 + 1860) + 1) = BYTE6(v17);
*((_BYTE *)v13 + *(unsigned int *)(v8 + 1860)) = HIBYTE(v17);
*((_BYTE *)v13 + *(unsigned int *)(v8 + 1860) + 7) = v17;
*((_BYTE *)v13 + *(unsigned int *)(v8 + 1860) + 6) = BYTE1(v17);
*((_BYTE *)v13 + *(unsigned int *)(v8 + 1860) + 5) = BYTE2(v17);
*((_BYTE *)v13 + *(unsigned int *)(v8 + 1860) + 4) = BYTE3(v17);
v25 = 6;
v26 = 1;
insert_dynamic(a1 + 186, &v24);
return v15;
}
| _ma_apply_redo_index_free_page:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
MOV R15,RDI
MOV EAX,dword ptr [RDX]
MOV ECX,dword ptr [RDX + 0x5]
MOVZX R12D,byte ptr [RDX + 0x4]
SHL R12,0x20
OR R12,RAX
MOVZX EAX,byte ptr [RDX + 0x9]
MOV R13,qword ptr [RDI]
OR dword ptr [R13 + 0x170],0x1b1
SHL RAX,0x20
OR RAX,RCX
CMP qword ptr [R13 + 0x180],RSI
JG 0x0014379b
MOV ECX,dword ptr [R13 + 0x7bc]
IMUL RCX,R12
MOV qword ptr [R13 + 0x120],RCX
LAB_0014379b:
MOV RDX,-0x1
MOV RCX,0xffffffffff
CMP RAX,RCX
JZ 0x001437bf
MOV ECX,dword ptr [R13 + 0x7bc]
IMUL RAX,RCX
MOV RDX,RAX
LAB_001437bf:
MOV qword ptr [RBP + -0x30],RDX
MOV RDI,qword ptr [R13 + 0x600]
LEA RSI,[R13 + 0x750]
LEA RAX,[RBP + -0x48]
MOV RDX,R12
XOR ECX,ECX
XOR R8D,R8D
MOV R9D,0x1
PUSH RAX
PUSH 0x4
CALL 0x0013e012
ADD RSP,0x10
TEST RAX,RAX
JZ 0x001438fd
MOV RBX,RAX
MOVZX EAX,word ptr [RAX]
SHL RAX,0x20
MOVZX ECX,byte ptr [RBX + 0x2]
SHL RCX,0x30
OR RCX,RAX
MOV ESI,dword ptr [RBX + 0x3]
OR RSI,RCX
CMP RSI,R14
JGE 0x00143916
MOV RDI,RBX
ADD RDI,0x7
MOV EDX,dword ptr [R13 + 0x744]
ADD EDX,-0x7
XOR R14D,R14D
XOR ESI,ESI
CALL 0x0012a2c0
MOV EAX,dword ptr [R13 + 0x744]
ADD EAX,-0x4
MOV byte ptr [RBX + RAX*0x1],0xff
MOV EAX,dword ptr [R13 + 0x744]
LEA ECX,[RAX + 0x8]
MOV byte ptr [RBX + RAX*0x1 + -0x1],CL
MOV EAX,dword ptr [R13 + 0x744]
MOV byte ptr [RBX + RAX*0x1 + -0x2],CH
MOV RDX,qword ptr [RBP + -0x30]
MOV RAX,RDX
SHR RAX,0x20
MOV ECX,dword ptr [R13 + 0x744]
MOV byte ptr [RBX + RCX*0x1 + 0x3],AL
MOV RAX,RDX
SHR RAX,0x28
MOV ECX,dword ptr [R13 + 0x744]
MOV byte ptr [RBX + RCX*0x1 + 0x2],AL
MOV RAX,RDX
SHR RAX,0x30
MOV ECX,dword ptr [R13 + 0x744]
MOV byte ptr [RBX + RCX*0x1 + 0x1],AL
MOV RAX,RDX
SHR RAX,0x38
MOV ECX,dword ptr [R13 + 0x744]
MOV byte ptr [RBX + RCX*0x1],AL
MOV EAX,dword ptr [R13 + 0x744]
MOV byte ptr [RBX + RAX*0x1 + 0x7],DL
MOV EAX,dword ptr [R13 + 0x744]
MOV byte ptr [RBX + RAX*0x1 + 0x6],DH
MOV EAX,EDX
SHR EAX,0x10
MOV ECX,dword ptr [R13 + 0x744]
MOV byte ptr [RBX + RCX*0x1 + 0x5],AL
SHR EDX,0x18
MOV EAX,dword ptr [R13 + 0x744]
MOV byte ptr [RBX + RAX*0x1 + 0x4],DL
LEA RSI,[RBP + -0x48]
MOV dword ptr [RSI + 0x8],0x6
MOV byte ptr [RSI + 0x10],0x1
ADD R15,0x2e8
MOV RDI,R15
CALL 0x00194922
JMP 0x0014394e
LAB_001438fd:
CALL 0x001a8156
MOV R14D,dword ptr [RAX]
CALL 0x001a8156
MOV ESI,dword ptr [RAX]
MOV RDI,R15
CALL 0x00142bb4
JMP 0x00143926
LAB_00143916:
XOR R14D,R14D
MOV RDI,R15
XOR EDX,EDX
MOV RCX,R12
CALL 0x00138c21
LAB_00143926:
MOV RDI,qword ptr [R13 + 0x600]
MOV RSI,qword ptr [RBP + -0x48]
XOR EAX,EAX
MOV EDX,0x6
MOV ECX,0x3
XOR R8D,R8D
XOR R9D,R9D
PUSH RAX
PUSH RAX
CALL 0x0013dd2d
ADD RSP,0x10
LAB_0014394e:
MOV EAX,R14D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4 _ma_apply_redo_index_free_page(long *param_1,long param_2,uint5 *param_3)
{
long lVar1;
uint5 uVar2;
ushort *puVar3;
int4 *puVar4;
int iVar5;
ulong uVar6;
ulong uVar7;
int4 uVar8;
int8 local_50;
int4 local_48;
int1 local_40;
long local_38;
uVar7 = (ulong)*param_3;
uVar2 = *(uint5 *)((long)param_3 + 5);
lVar1 = *param_1;
*(uint *)(lVar1 + 0x170) = *(uint *)(lVar1 + 0x170) | 0x1b1;
if (*(long *)(lVar1 + 0x180) <= param_2) {
*(ulong *)(lVar1 + 0x120) = *(uint *)(lVar1 + 0x7bc) * uVar7;
}
local_38 = -1;
if ((ulong)uVar2 != 0xffffffffff) {
local_38 = (ulong)uVar2 * (ulong)*(uint *)(lVar1 + 0x7bc);
}
puVar3 = (ushort *)
pagecache_read(*(int8 *)(lVar1 + 0x600),lVar1 + 0x750,uVar7,0,0,1,4,&local_50);
if (puVar3 == (ushort *)0x0) {
puVar4 = (int4 *)_my_thread_var();
uVar8 = *puVar4;
puVar4 = (int4 *)_my_thread_var();
_ma_set_fatal_error(param_1,*puVar4);
}
else {
uVar6 = (ulong)*(uint *)((long)puVar3 + 3) |
(ulong)(byte)puVar3[1] << 0x30 | (ulong)*puVar3 << 0x20;
if ((long)uVar6 < param_2) {
memset((void *)((long)puVar3 + 7),0,(ulong)(*(int *)(lVar1 + 0x744) - 7));
*(int1 *)((long)puVar3 + (ulong)(*(int *)(lVar1 + 0x744) - 4)) = 0xff;
iVar5 = *(uint *)(lVar1 + 0x744) + 8;
*(char *)((long)puVar3 + ((ulong)*(uint *)(lVar1 + 0x744) - 1)) = (char)iVar5;
*(char *)((long)puVar3 + ((ulong)*(uint *)(lVar1 + 0x744) - 2)) = (char)((uint)iVar5 >> 8);
*(char *)((long)puVar3 + (ulong)*(uint *)(lVar1 + 0x744) + 3) =
(char)((ulong)local_38 >> 0x20);
*(char *)((long)puVar3 + (ulong)*(uint *)(lVar1 + 0x744) + 2) =
(char)((ulong)local_38 >> 0x28);
*(char *)((long)puVar3 + (ulong)*(uint *)(lVar1 + 0x744) + 1) =
(char)((ulong)local_38 >> 0x30);
*(char *)((long)puVar3 + (ulong)*(uint *)(lVar1 + 0x744)) = (char)((ulong)local_38 >> 0x38);
*(char *)((long)puVar3 + (ulong)*(uint *)(lVar1 + 0x744) + 7) = (char)local_38;
*(char *)((long)puVar3 + (ulong)*(uint *)(lVar1 + 0x744) + 6) = (char)((ulong)local_38 >> 8);
*(char *)((long)puVar3 + (ulong)*(uint *)(lVar1 + 0x744) + 5) =
(char)((ulong)local_38 >> 0x10);
*(char *)((long)puVar3 + (ulong)*(uint *)(lVar1 + 0x744) + 4) =
(char)((ulong)local_38 >> 0x18);
local_48 = 6;
local_40 = 1;
insert_dynamic(param_1 + 0x5d);
return 0;
}
uVar8 = 0;
check_skipped_lsn(param_1,uVar6,0,uVar7);
}
pagecache_unlock_by_link(*(int8 *)(lVar1 + 0x600),local_50,6,3,0,0,0,0);
return uVar8;
}
|
|
6,529 | my_caseup_str_mb | eloqsql/strings/ctype-mb.c | size_t my_caseup_str_mb(CHARSET_INFO * cs, char *str)
{
register uint32 l;
register const uchar *map= cs->to_upper;
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);
} | O0 | c | my_caseup_str_mb:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x9e127
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rax
movl 0x9c(%rax), %eax
addq %rax, %rdx
callq 0x9e140
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
je 0x9e105
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x9e125
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
movb (%rax,%rcx), %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x9e0c4
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| my_caseup_str_mb:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov rax, [rax+50h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
loc_9E0C4:
mov rax, [rbp+var_10]
cmp byte ptr [rax], 0
jz short loc_9E127
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_10]
mov rax, [rbp+var_8]
mov eax, [rax+9Ch]
add rdx, rax
call my_ismbchar_0
mov [rbp+var_14], eax
cmp eax, 0
jz short loc_9E105
mov ecx, [rbp+var_14]
mov rax, [rbp+var_10]
mov ecx, ecx
add rax, rcx
mov [rbp+var_10], rax
jmp short loc_9E125
loc_9E105:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx]
mov cl, [rax+rcx]
mov rax, [rbp+var_10]
mov [rax], cl
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
loc_9E125:
jmp short loc_9E0C4
loc_9E127:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_28]
sub rax, rcx
add rsp, 30h
pop rbp
retn
| _BYTE * my_caseup_str_mb(long long a1, _BYTE *a2)
{
long long v3; // [rsp+10h] [rbp-20h]
unsigned int v4; // [rsp+1Ch] [rbp-14h]
_BYTE *v5; // [rsp+20h] [rbp-10h]
v5 = a2;
v3 = *(_QWORD *)(a1 + 80);
while ( *v5 )
{
v4 = my_ismbchar_0(a1, v5, &v5[*(unsigned int *)(a1 + 156)]);
if ( v4 )
{
v5 += v4;
}
else
{
*v5 = *(_BYTE *)(v3 + (unsigned __int8)*v5);
++v5;
}
}
return (_BYTE *)(v5 - a2);
}
| my_caseup_str_mb:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x50]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
LAB_0019e0c4:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX],0x0
JZ 0x0019e127
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x9c]
ADD RDX,RAX
CALL 0x0019e140
MOV dword ptr [RBP + -0x14],EAX
CMP EAX,0x0
JZ 0x0019e105
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0019e125
LAB_0019e105:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
LAB_0019e125:
JMP 0x0019e0c4
LAB_0019e127:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
ADD RSP,0x30
POP RBP
RET
|
long my_caseup_str_mb(long param_1,byte *param_2)
{
long lVar1;
uint uVar2;
byte *local_18;
lVar1 = *(long *)(param_1 + 0x50);
local_18 = param_2;
while (*local_18 != 0) {
uVar2 = my_ismbchar(param_1,local_18,local_18 + *(uint *)(param_1 + 0x9c));
if (uVar2 == 0) {
*local_18 = *(byte *)(lVar1 + (ulong)*local_18);
local_18 = local_18 + 1;
}
else {
local_18 = local_18 + uVar2;
}
}
return (long)local_18 - (long)param_2;
}
|
|
6,530 | ggml_get_n_tasks | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c | static int ggml_get_n_tasks(struct ggml_tensor * node, int n_threads) {
int n_tasks = 0;
if (ggml_is_empty(node)) {
// no need to multi-thread a no-op
n_tasks = 1;
return n_tasks;
}
switch (node->op) {
case GGML_OP_CPY:
case GGML_OP_DUP:
case GGML_OP_CONT:
case GGML_OP_ADD:
case GGML_OP_ADD1:
case GGML_OP_ACC:
{
n_tasks = n_threads;
} break;
case GGML_OP_SUB:
case GGML_OP_SQR:
case GGML_OP_SQRT:
case GGML_OP_LOG:
case GGML_OP_SIN:
case GGML_OP_COS:
case GGML_OP_SUM:
case GGML_OP_SUM_ROWS:
case GGML_OP_MEAN:
case GGML_OP_ARGMAX:
{
n_tasks = 1;
} break;
case GGML_OP_COUNT_EQUAL:
{
n_tasks = n_threads;
} break;
case GGML_OP_REPEAT:
case GGML_OP_REPEAT_BACK:
case GGML_OP_LEAKY_RELU:
{
n_tasks = 1;
} break;
case GGML_OP_UNARY:
switch (ggml_get_unary_op(node)) {
case GGML_UNARY_OP_ABS:
case GGML_UNARY_OP_SGN:
case GGML_UNARY_OP_NEG:
case GGML_UNARY_OP_STEP:
case GGML_UNARY_OP_TANH:
case GGML_UNARY_OP_ELU:
case GGML_UNARY_OP_RELU:
case GGML_UNARY_OP_SIGMOID:
case GGML_UNARY_OP_HARDSWISH:
case GGML_UNARY_OP_HARDSIGMOID:
case GGML_UNARY_OP_EXP:
{
n_tasks = 1;
} break;
case GGML_UNARY_OP_GELU:
case GGML_UNARY_OP_GELU_QUICK:
case GGML_UNARY_OP_SILU:
{
n_tasks = n_threads;
} break;
default:
GGML_ABORT("fatal error");
}
break;
case GGML_OP_SILU_BACK:
case GGML_OP_MUL:
case GGML_OP_DIV:
case GGML_OP_NORM:
case GGML_OP_RMS_NORM:
case GGML_OP_RMS_NORM_BACK:
case GGML_OP_GROUP_NORM:
case GGML_OP_CONCAT:
case GGML_OP_MUL_MAT:
case GGML_OP_MUL_MAT_ID:
case GGML_OP_OUT_PROD:
{
n_tasks = n_threads;
} break;
case GGML_OP_GET_ROWS:
{
// FIXME: get_rows can use additional threads, but the cost of launching additional threads
// decreases performance with GPU offloading
//n_tasks = n_threads;
n_tasks = 1;
} break;
case GGML_OP_SCALE:
case GGML_OP_SET:
case GGML_OP_RESHAPE:
case GGML_OP_VIEW:
case GGML_OP_PERMUTE:
case GGML_OP_TRANSPOSE:
case GGML_OP_GET_ROWS_BACK:
case GGML_OP_DIAG:
{
n_tasks = 1;
} break;
case GGML_OP_DIAG_MASK_ZERO:
case GGML_OP_DIAG_MASK_INF:
case GGML_OP_SOFT_MAX_BACK:
case GGML_OP_ROPE:
case GGML_OP_ROPE_BACK:
case GGML_OP_ADD_REL_POS:
{
n_tasks = n_threads;
} break;
case GGML_OP_CLAMP:
{
n_tasks = 1; //TODO
} break;
case GGML_OP_SOFT_MAX:
{
n_tasks = MIN(n_threads, ggml_nrows(node->src[0]));
} break;
case GGML_OP_IM2COL:
case GGML_OP_IM2COL_BACK:
case GGML_OP_CONV_TRANSPOSE_1D:
case GGML_OP_CONV_TRANSPOSE_2D:
{
n_tasks = n_threads;
} break;
case GGML_OP_POOL_1D:
case GGML_OP_POOL_2D:
case GGML_OP_POOL_2D_BACK:
{
n_tasks = 1;
} break;
case GGML_OP_UPSCALE:
case GGML_OP_PAD:
case GGML_OP_PAD_REFLECT_1D:
case GGML_OP_ARANGE:
case GGML_OP_TIMESTEP_EMBEDDING:
case GGML_OP_ARGSORT:
case GGML_OP_FLASH_ATTN_EXT:
case GGML_OP_FLASH_ATTN_BACK:
case GGML_OP_SSM_CONV:
case GGML_OP_SSM_SCAN:
{
n_tasks = n_threads;
} break;
case GGML_OP_WIN_PART:
case GGML_OP_WIN_UNPART:
case GGML_OP_GET_REL_POS:
case GGML_OP_RWKV_WKV6:
case GGML_OP_GATED_LINEAR_ATTN:
case GGML_OP_MAP_UNARY:
case GGML_OP_MAP_BINARY:
case GGML_OP_MAP_CUSTOM1_F32:
case GGML_OP_MAP_CUSTOM2_F32:
case GGML_OP_MAP_CUSTOM3_F32:
{
n_tasks = 1;
} break;
case GGML_OP_MAP_CUSTOM1:
{
struct ggml_map_custom1_op_params p;
memcpy(&p, node->op_params, sizeof(p));
if (p.n_tasks == GGML_N_TASKS_MAX) {
n_tasks = n_threads;
} else {
n_tasks = MIN(p.n_tasks, n_threads);
}
} break;
case GGML_OP_MAP_CUSTOM2:
{
struct ggml_map_custom2_op_params p;
memcpy(&p, node->op_params, sizeof(p));
if (p.n_tasks == GGML_N_TASKS_MAX) {
n_tasks = n_threads;
} else {
n_tasks = MIN(p.n_tasks, n_threads);
}
} break;
case GGML_OP_MAP_CUSTOM3:
{
struct ggml_map_custom3_op_params p;
memcpy(&p, node->op_params, sizeof(p));
if (p.n_tasks == GGML_N_TASKS_MAX) {
n_tasks = n_threads;
} else {
n_tasks = MIN(p.n_tasks, n_threads);
}
} break;
case GGML_OP_CROSS_ENTROPY_LOSS:
case GGML_OP_CROSS_ENTROPY_LOSS_BACK:
case GGML_OP_OPT_STEP_ADAMW:
{
n_tasks = n_threads;
} break;
case GGML_OP_NONE:
{
n_tasks = 1;
} break;
case GGML_OP_COUNT:
{
GGML_ABORT("fatal error");
}
default:
{
fprintf(stderr, "%s: op not implemented: ", __func__);
if (node->op < GGML_OP_COUNT) {
fprintf(stderr, "%s\n", ggml_op_name(node->op));
} else {
fprintf(stderr, "%d\n", node->op);
}
GGML_ABORT("fatal error");
}
}
assert(n_tasks > 0);
return n_tasks;
} | O0 | c | ggml_get_n_tasks:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0xd080
testb $0x1, %al
jne 0x11018
jmp 0x1102a
movl $0x1, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x11389
movq -0x10(%rbp), %rax
movl 0x50(%rax), %eax
movq %rax, -0x68(%rbp)
subq $0x53, %rax
ja 0x112c3
movq -0x68(%rbp), %rax
leaq 0x625da(%rip), %rcx # 0x73624
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x1135c
movl $0x1, -0x18(%rbp)
jmp 0x1135c
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x1135c
movl $0x1, -0x18(%rbp)
jmp 0x1135c
movq -0x10(%rbp), %rdi
callq 0xdb30
movl %eax, %ecx
movl %ecx, -0x6c(%rbp)
subl $0x8, %eax
jb 0x110b0
jmp 0x11096
movl -0x6c(%rbp), %eax
addl $-0x8, %eax
subl $0x3, %eax
jb 0x110b9
jmp 0x110a3
movl -0x6c(%rbp), %eax
addl $-0xb, %eax
subl $0x2, %eax
ja 0x110c1
jmp 0x110b0
movl $0x1, -0x18(%rbp)
jmp 0x110db
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x110db
leaq 0x62a9a(%rip), %rdi # 0x73b62
movl $0x336b, %esi # imm = 0x336B
leaq 0x62ce9(%rip), %rdx # 0x73dbd
movb $0x0, %al
callq 0xe270
jmp 0x1135c
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x1135c
movl $0x1, -0x18(%rbp)
jmp 0x1135c
movl $0x1, -0x18(%rbp)
jmp 0x1135c
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x1135c
movl $0x1, -0x18(%rbp)
jmp 0x1135c
movslq -0x14(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rdi
callq 0xdc20
movq %rax, %rcx
movq -0x78(%rbp), %rax
cmpq %rcx, %rax
jge 0x11148
movslq -0x14(%rbp), %rax
movq %rax, -0x80(%rbp)
jmp 0x1115c
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rdi
callq 0xdc20
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movl %eax, -0x18(%rbp)
jmp 0x1135c
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x1135c
movl $0x1, -0x18(%rbp)
jmp 0x1135c
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x1135c
movl $0x1, -0x18(%rbp)
jmp 0x1135c
movq -0x10(%rbp), %rax
movq 0x54(%rax), %rcx
movq %rcx, -0x30(%rbp)
movq 0x5c(%rax), %rcx
movq %rcx, -0x28(%rbp)
movq 0x64(%rax), %rax
movq %rax, -0x20(%rbp)
cmpl $-0x1, -0x28(%rbp)
jne 0x111c0
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x111e5
movl -0x28(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x111d3
movl -0x28(%rbp), %eax
movl %eax, -0x84(%rbp)
jmp 0x111dc
movl -0x14(%rbp), %eax
movl %eax, -0x84(%rbp)
movl -0x84(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x1135c
movq -0x10(%rbp), %rax
movq 0x54(%rax), %rcx
movq %rcx, -0x48(%rbp)
movq 0x5c(%rax), %rcx
movq %rcx, -0x40(%rbp)
movq 0x64(%rax), %rax
movq %rax, -0x38(%rbp)
cmpl $-0x1, -0x40(%rbp)
jne 0x11214
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x11239
movl -0x40(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x11227
movl -0x40(%rbp), %eax
movl %eax, -0x88(%rbp)
jmp 0x11230
movl -0x14(%rbp), %eax
movl %eax, -0x88(%rbp)
movl -0x88(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x1135c
movq -0x10(%rbp), %rax
movq 0x54(%rax), %rcx
movq %rcx, -0x60(%rbp)
movq 0x5c(%rax), %rcx
movq %rcx, -0x58(%rbp)
movq 0x64(%rax), %rax
movq %rax, -0x50(%rbp)
cmpl $-0x1, -0x58(%rbp)
jne 0x11268
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x1128d
movl -0x58(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x1127b
movl -0x58(%rbp), %eax
movl %eax, -0x8c(%rbp)
jmp 0x11284
movl -0x14(%rbp), %eax
movl %eax, -0x8c(%rbp)
movl -0x8c(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x1135c
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x1135c
movl $0x1, -0x18(%rbp)
jmp 0x1135c
leaq 0x628b2(%rip), %rdi # 0x73b62
movl $0x33f0, %esi # imm = 0x33F0
leaq 0x62b01(%rip), %rdx # 0x73dbd
movb $0x0, %al
callq 0xe270
movq 0x78ce6(%rip), %rax # 0x89fb0
movq (%rax), %rdi
leaq 0x62dc9(%rip), %rsi # 0x7409d
leaq 0x62ddb(%rip), %rdx # 0x740b6
movb $0x0, %al
callq 0xdf30
movq -0x10(%rbp), %rax
cmpl $0x53, 0x50(%rax)
jae 0x11323
movq 0x78cbd(%rip), %rax # 0x89fb0
movq (%rax), %rax
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rax
movl 0x50(%rax), %edi
callq 0xdbf0
movq -0x98(%rbp), %rdi
movq %rax, %rdx
leaq 0x62eed(%rip), %rsi # 0x74207
movb $0x0, %al
callq 0xdf30
jmp 0x11342
movq 0x78c86(%rip), %rax # 0x89fb0
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x50(%rax), %edx
leaq 0x6616d(%rip), %rsi # 0x774a8
movb $0x0, %al
callq 0xdf30
leaq 0x62819(%rip), %rdi # 0x73b62
movl $0x33fa, %esi # imm = 0x33FA
leaq 0x62a68(%rip), %rdx # 0x73dbd
movb $0x0, %al
callq 0xe270
cmpl $0x0, -0x18(%rbp)
jle 0x11364
jmp 0x11383
leaq 0x62d5c(%rip), %rdi # 0x740c7
leaq 0x627f0(%rip), %rsi # 0x73b62
movl $0x33fe, %edx # imm = 0x33FE
leaq 0x62d55(%rip), %rcx # 0x740d3
callq 0xd690
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ggml_get_n_tasks:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], 0
mov rdi, [rbp+var_10]
call _ggml_is_empty
test al, 1
jnz short loc_11018
jmp short loc_1102A
loc_11018:
mov [rbp+var_18], 1
mov eax, [rbp+var_18]
mov [rbp+var_4], eax
jmp loc_11389
loc_1102A:
mov rax, [rbp+var_10]
mov eax, [rax+50h]
mov [rbp+var_68], rax
sub rax, 53h; switch 84 cases
ja def_11051; jumptable 0000000000011051 default case
mov rax, [rbp+var_68]
lea rcx, jpt_11051
movsxd rax, ds:(jpt_11051 - 73624h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_11053:
mov eax, [rbp+var_14]; jumptable 0000000000011051 cases 1-4,31,32
mov [rbp+var_18], eax
jmp loc_1135C
loc_1105E:
mov [rbp+var_18], 1; jumptable 0000000000011051 cases 5,8-16
jmp loc_1135C
loc_1106A:
mov eax, [rbp+var_14]; jumptable 0000000000011051 case 17
mov [rbp+var_18], eax
jmp loc_1135C
loc_11075:
mov [rbp+var_18], 1; jumptable 0000000000011051 cases 18,19,60
jmp loc_1135C
loc_11081:
mov rdi, [rbp+var_10]; jumptable 0000000000011051 case 71
call _ggml_get_unary_op
mov ecx, eax
mov [rbp+var_6C], ecx
sub eax, 8
jb short loc_110B0
jmp short $+2
loc_11096:
mov eax, [rbp+var_6C]
add eax, 0FFFFFFF8h
sub eax, 3
jb short loc_110B9
jmp short $+2
loc_110A3:
mov eax, [rbp+var_6C]
add eax, 0FFFFFFF5h
sub eax, 2
ja short loc_110C1
jmp short $+2
loc_110B0:
mov [rbp+var_18], 1
jmp short loc_110DB
loc_110B9:
mov eax, [rbp+var_14]
mov [rbp+var_18], eax
jmp short loc_110DB
loc_110C1:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 336Bh
lea rdx, aFatalError; "fatal error"
mov al, 0
call _ggml_abort
loc_110DB:
jmp loc_1135C
loc_110E0:
mov eax, [rbp+var_14]; jumptable 0000000000011051 cases 6,7,20-28
mov [rbp+var_18], eax
jmp loc_1135C
loc_110EB:
mov [rbp+var_18], 1; jumptable 0000000000011051 case 37
jmp loc_1135C
loc_110F7:
mov [rbp+var_18], 1; jumptable 0000000000011051 cases 29,30,33-36,38,39
jmp loc_1135C
loc_11103:
mov eax, [rbp+var_14]; jumptable 0000000000011051 cases 40,41,43-45,68
mov [rbp+var_18], eax
jmp loc_1135C
loc_1110E:
mov [rbp+var_18], 1; jumptable 0000000000011051 case 46
jmp loc_1135C
loc_1111A:
movsxd rax, [rbp+var_14]; jumptable 0000000000011051 case 42
mov [rbp+var_78], rax
mov rax, [rbp+var_10]
mov rdi, [rax+98h]
call _ggml_nrows
mov rcx, rax
mov rax, [rbp+var_78]
cmp rax, rcx
jge short loc_11148
movsxd rax, [rbp+var_14]
mov [rbp+var_80], rax
jmp short loc_1115C
loc_11148:
mov rax, [rbp+var_10]
mov rdi, [rax+98h]
call _ggml_nrows
mov [rbp+var_80], rax
loc_1115C:
mov rax, [rbp+var_80]
mov [rbp+var_18], eax
jmp loc_1135C
loc_11168:
mov eax, [rbp+var_14]; jumptable 0000000000011051 cases 47-50
mov [rbp+var_18], eax
jmp loc_1135C
loc_11173:
mov [rbp+var_18], 1; jumptable 0000000000011051 cases 51-53
jmp loc_1135C
loc_1117F:
mov eax, [rbp+var_14]; jumptable 0000000000011051 cases 54-59,61-64
mov [rbp+var_18], eax
jmp loc_1135C
loc_1118A:
mov [rbp+var_18], 1; jumptable 0000000000011051 cases 65-67,69,70,72-76
jmp loc_1135C
loc_11196:
mov rax, [rbp+var_10]; jumptable 0000000000011051 case 77
mov rcx, [rax+54h]
mov [rbp+var_30], rcx
mov rcx, [rax+5Ch]
mov [rbp+var_28], rcx
mov rax, [rax+64h]
mov [rbp+var_20], rax
cmp dword ptr [rbp+var_28], 0FFFFFFFFh
jnz short loc_111C0
mov eax, [rbp+var_14]
mov [rbp+var_18], eax
jmp short loc_111E5
loc_111C0:
mov eax, dword ptr [rbp+var_28]
cmp eax, [rbp+var_14]
jge short loc_111D3
mov eax, dword ptr [rbp+var_28]
mov [rbp+var_84], eax
jmp short loc_111DC
loc_111D3:
mov eax, [rbp+var_14]
mov [rbp+var_84], eax
loc_111DC:
mov eax, [rbp+var_84]
mov [rbp+var_18], eax
loc_111E5:
jmp loc_1135C
loc_111EA:
mov rax, [rbp+var_10]; jumptable 0000000000011051 case 78
mov rcx, [rax+54h]
mov [rbp+var_48], rcx
mov rcx, [rax+5Ch]
mov [rbp+var_40], rcx
mov rax, [rax+64h]
mov [rbp+var_38], rax
cmp dword ptr [rbp+var_40], 0FFFFFFFFh
jnz short loc_11214
mov eax, [rbp+var_14]
mov [rbp+var_18], eax
jmp short loc_11239
loc_11214:
mov eax, dword ptr [rbp+var_40]
cmp eax, [rbp+var_14]
jge short loc_11227
mov eax, dword ptr [rbp+var_40]
mov [rbp+var_88], eax
jmp short loc_11230
loc_11227:
mov eax, [rbp+var_14]
mov [rbp+var_88], eax
loc_11230:
mov eax, [rbp+var_88]
mov [rbp+var_18], eax
loc_11239:
jmp loc_1135C
loc_1123E:
mov rax, [rbp+var_10]; jumptable 0000000000011051 case 79
mov rcx, [rax+54h]
mov [rbp+var_60], rcx
mov rcx, [rax+5Ch]
mov [rbp+var_58], rcx
mov rax, [rax+64h]
mov [rbp+var_50], rax
cmp dword ptr [rbp+var_58], 0FFFFFFFFh
jnz short loc_11268
mov eax, [rbp+var_14]
mov [rbp+var_18], eax
jmp short loc_1128D
loc_11268:
mov eax, dword ptr [rbp+var_58]
cmp eax, [rbp+var_14]
jge short loc_1127B
mov eax, dword ptr [rbp+var_58]
mov [rbp+var_8C], eax
jmp short loc_11284
loc_1127B:
mov eax, [rbp+var_14]
mov [rbp+var_8C], eax
loc_11284:
mov eax, [rbp+var_8C]
mov [rbp+var_18], eax
loc_1128D:
jmp loc_1135C
loc_11292:
mov eax, [rbp+var_14]; jumptable 0000000000011051 cases 80-82
mov [rbp+var_18], eax
jmp loc_1135C
loc_1129D:
mov [rbp+var_18], 1; jumptable 0000000000011051 case 0
jmp loc_1135C
loc_112A9:
lea rdi, aWorkspaceLlm4b_0; jumptable 0000000000011051 case 83
mov esi, 33F0h
lea rdx, aFatalError; "fatal error"
mov al, 0
call _ggml_abort
def_11051:
mov rax, cs:stderr_ptr; jumptable 0000000000011051 default case
mov rdi, [rax]
lea rsi, aSOpNotImplemen; "%s: op not implemented: "
lea rdx, aGgmlGetNTasks; "ggml_get_n_tasks"
mov al, 0
call _fprintf
mov rax, [rbp+var_10]
cmp dword ptr [rax+50h], 53h ; 'S'
jnb short loc_11323
mov rax, cs:stderr_ptr
mov rax, [rax]
mov [rbp+var_98], rax
mov rax, [rbp+var_10]
mov edi, [rax+50h]
call _ggml_op_name
mov rdi, [rbp+var_98]
mov rdx, rax
lea rsi, aWarningPthread+2Ah; "%s\n"
mov al, 0
call _fprintf
jmp short loc_11342
loc_11323:
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov rax, [rbp+var_10]
mov edx, [rax+50h]
lea rsi, aSRepackTensorS+20h; "%d\n"
mov al, 0
call _fprintf
loc_11342:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 33FAh
lea rdx, aFatalError; "fatal error"
mov al, 0
call _ggml_abort
loc_1135C:
cmp [rbp+var_18], 0
jle short loc_11364
jmp short loc_11383
loc_11364:
lea rdi, aNTasks0; "n_tasks > 0"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov edx, 33FEh
lea rcx, aIntGgmlGetNTas; "int ggml_get_n_tasks(struct ggml_tensor"...
call ___assert_fail
loc_11383:
mov eax, [rbp+var_18]
mov [rbp+var_4], eax
loc_11389:
mov eax, [rbp+var_4]
add rsp, 0A0h
pop rbp
retn
| long long ggml_get_n_tasks(long long a1, int a2)
{
unsigned int unary_op; // eax
const char *v3; // rax
long long v5; // [rsp+8h] [rbp-98h]
int v6; // [rsp+14h] [rbp-8Ch]
int v7; // [rsp+18h] [rbp-88h]
int v8; // [rsp+1Ch] [rbp-84h]
int v9; // [rsp+20h] [rbp-80h]
long long v10; // [rsp+48h] [rbp-58h]
long long v11; // [rsp+60h] [rbp-40h]
long long v12; // [rsp+78h] [rbp-28h]
int v13; // [rsp+88h] [rbp-18h]
unsigned int v14; // [rsp+9Ch] [rbp-4h]
v13 = 0;
if ( (ggml_is_empty(a1) & 1) != 0 )
{
return 1;
}
else
{
switch ( *(_DWORD *)(a1 + 80) )
{
case 0:
v13 = 1;
goto LABEL_52;
case 1:
case 2:
case 3:
case 4:
case 0x1F:
case 0x20:
v13 = a2;
goto LABEL_52;
case 5:
case 8:
case 9:
case 0xA:
case 0xB:
case 0xC:
case 0xD:
case 0xE:
case 0xF:
case 0x10:
v13 = 1;
goto LABEL_52;
case 6:
case 7:
case 0x14:
case 0x15:
case 0x16:
case 0x17:
case 0x18:
case 0x19:
case 0x1A:
case 0x1B:
case 0x1C:
v13 = a2;
goto LABEL_52;
case 0x11:
v13 = a2;
goto LABEL_52;
case 0x12:
case 0x13:
case 0x3C:
v13 = 1;
goto LABEL_52;
case 0x1D:
case 0x1E:
case 0x21:
case 0x22:
case 0x23:
case 0x24:
case 0x26:
case 0x27:
v13 = 1;
goto LABEL_52;
case 0x25:
v13 = 1;
goto LABEL_52;
case 0x28:
case 0x29:
case 0x2B:
case 0x2C:
case 0x2D:
case 0x44:
v13 = a2;
goto LABEL_52;
case 0x2A:
if ( a2 >= ggml_nrows(*(_QWORD *)(a1 + 152)) )
v9 = ggml_nrows(*(_QWORD *)(a1 + 152));
else
v9 = a2;
v13 = v9;
goto LABEL_52;
case 0x2E:
v13 = 1;
goto LABEL_52;
case 0x2F:
case 0x30:
case 0x31:
case 0x32:
v13 = a2;
goto LABEL_52;
case 0x33:
case 0x34:
case 0x35:
v13 = 1;
goto LABEL_52;
case 0x36:
case 0x37:
case 0x38:
case 0x39:
case 0x3A:
case 0x3B:
case 0x3D:
case 0x3E:
case 0x3F:
case 0x40:
v13 = a2;
goto LABEL_52;
case 0x41:
case 0x42:
case 0x43:
case 0x45:
case 0x46:
case 0x48:
case 0x49:
case 0x4A:
case 0x4B:
case 0x4C:
v13 = 1;
goto LABEL_52;
case 0x47:
unary_op = ggml_get_unary_op(a1);
if ( unary_op < 8 )
goto LABEL_11;
if ( unary_op - 8 < 3 )
{
v13 = a2;
}
else if ( unary_op - 11 > 2 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
13163LL,
"fatal error");
}
else
{
LABEL_11:
v13 = 1;
}
LABEL_52:
if ( v13 <= 0 )
__assert_fail(
"n_tasks > 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
13310LL,
"int ggml_get_n_tasks(struct ggml_tensor *, int)");
v14 = v13;
break;
case 0x4D:
v12 = *(_QWORD *)(a1 + 92);
if ( (_DWORD)v12 == -1 )
{
v13 = a2;
}
else
{
if ( (int)v12 >= a2 )
v8 = a2;
else
v8 = *(_QWORD *)(a1 + 92);
v13 = v8;
}
goto LABEL_52;
case 0x4E:
v11 = *(_QWORD *)(a1 + 92);
if ( (_DWORD)v11 == -1 )
{
v13 = a2;
}
else
{
if ( (int)v11 >= a2 )
v7 = a2;
else
v7 = *(_QWORD *)(a1 + 92);
v13 = v7;
}
goto LABEL_52;
case 0x4F:
v10 = *(_QWORD *)(a1 + 92);
if ( (_DWORD)v10 == -1 )
{
v13 = a2;
}
else
{
if ( (int)v10 >= a2 )
v6 = a2;
else
v6 = *(_QWORD *)(a1 + 92);
v13 = v6;
}
goto LABEL_52;
case 0x50:
case 0x51:
case 0x52:
v13 = a2;
goto LABEL_52;
case 0x53:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
13296LL,
"fatal error");
goto LABEL_48;
default:
LABEL_48:
fprintf(stderr, "%s: op not implemented: ", "ggml_get_n_tasks");
if ( *(_DWORD *)(a1 + 80) >= 0x53u )
{
fprintf(stderr, "%d\n", *(_DWORD *)(a1 + 80));
}
else
{
v5 = stderr;
v3 = (const char *)ggml_op_name(*(unsigned int *)(a1 + 80));
fprintf(v5, "%s\n", v3);
}
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
13306LL,
"fatal error");
goto LABEL_52;
}
}
return v14;
}
| ggml_get_n_tasks:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],0x0
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0010d080
TEST AL,0x1
JNZ 0x00111018
JMP 0x0011102a
LAB_00111018:
MOV dword ptr [RBP + -0x18],0x1
MOV EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00111389
LAB_0011102a:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x50]
MOV qword ptr [RBP + -0x68],RAX
SUB RAX,0x53
JA 0x001112c3
MOV RAX,qword ptr [RBP + -0x68]
LEA RCX,[0x173624]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x18],EAX
JMP 0x0011135c
caseD_5:
MOV dword ptr [RBP + -0x18],0x1
JMP 0x0011135c
caseD_11:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x18],EAX
JMP 0x0011135c
caseD_12:
MOV dword ptr [RBP + -0x18],0x1
JMP 0x0011135c
caseD_47:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0010db30
MOV ECX,EAX
MOV dword ptr [RBP + -0x6c],ECX
SUB EAX,0x8
JC 0x001110b0
JMP 0x00111096
LAB_00111096:
MOV EAX,dword ptr [RBP + -0x6c]
ADD EAX,-0x8
SUB EAX,0x3
JC 0x001110b9
JMP 0x001110a3
LAB_001110a3:
MOV EAX,dword ptr [RBP + -0x6c]
ADD EAX,-0xb
SUB EAX,0x2
JA 0x001110c1
JMP 0x001110b0
LAB_001110b0:
MOV dword ptr [RBP + -0x18],0x1
JMP 0x001110db
LAB_001110b9:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x18],EAX
JMP 0x001110db
LAB_001110c1:
LEA RDI,[0x173b62]
MOV ESI,0x336b
LEA RDX,[0x173dbd]
MOV AL,0x0
CALL 0x0010e270
LAB_001110db:
JMP 0x0011135c
caseD_6:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x18],EAX
JMP 0x0011135c
caseD_25:
MOV dword ptr [RBP + -0x18],0x1
JMP 0x0011135c
caseD_1d:
MOV dword ptr [RBP + -0x18],0x1
JMP 0x0011135c
caseD_28:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x18],EAX
JMP 0x0011135c
caseD_2e:
MOV dword ptr [RBP + -0x18],0x1
JMP 0x0011135c
caseD_2a:
MOVSXD RAX,dword ptr [RBP + -0x14]
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x98]
CALL 0x0010dc20
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x78]
CMP RAX,RCX
JGE 0x00111148
MOVSXD RAX,dword ptr [RBP + -0x14]
MOV qword ptr [RBP + -0x80],RAX
JMP 0x0011115c
LAB_00111148:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x98]
CALL 0x0010dc20
MOV qword ptr [RBP + -0x80],RAX
LAB_0011115c:
MOV RAX,qword ptr [RBP + -0x80]
MOV dword ptr [RBP + -0x18],EAX
JMP 0x0011135c
caseD_2f:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x18],EAX
JMP 0x0011135c
caseD_33:
MOV dword ptr [RBP + -0x18],0x1
JMP 0x0011135c
caseD_36:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x18],EAX
JMP 0x0011135c
caseD_41:
MOV dword ptr [RBP + -0x18],0x1
JMP 0x0011135c
caseD_4d:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x54]
MOV qword ptr [RBP + -0x30],RCX
MOV RCX,qword ptr [RAX + 0x5c]
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RAX + 0x64]
MOV qword ptr [RBP + -0x20],RAX
CMP dword ptr [RBP + -0x28],-0x1
JNZ 0x001111c0
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x18],EAX
JMP 0x001111e5
LAB_001111c0:
MOV EAX,dword ptr [RBP + -0x28]
CMP EAX,dword ptr [RBP + -0x14]
JGE 0x001111d3
MOV EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x84],EAX
JMP 0x001111dc
LAB_001111d3:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x84],EAX
LAB_001111dc:
MOV EAX,dword ptr [RBP + -0x84]
MOV dword ptr [RBP + -0x18],EAX
LAB_001111e5:
JMP 0x0011135c
caseD_4e:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x54]
MOV qword ptr [RBP + -0x48],RCX
MOV RCX,qword ptr [RAX + 0x5c]
MOV qword ptr [RBP + -0x40],RCX
MOV RAX,qword ptr [RAX + 0x64]
MOV qword ptr [RBP + -0x38],RAX
CMP dword ptr [RBP + -0x40],-0x1
JNZ 0x00111214
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x18],EAX
JMP 0x00111239
LAB_00111214:
MOV EAX,dword ptr [RBP + -0x40]
CMP EAX,dword ptr [RBP + -0x14]
JGE 0x00111227
MOV EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x88],EAX
JMP 0x00111230
LAB_00111227:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x88],EAX
LAB_00111230:
MOV EAX,dword ptr [RBP + -0x88]
MOV dword ptr [RBP + -0x18],EAX
LAB_00111239:
JMP 0x0011135c
caseD_4f:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x54]
MOV qword ptr [RBP + -0x60],RCX
MOV RCX,qword ptr [RAX + 0x5c]
MOV qword ptr [RBP + -0x58],RCX
MOV RAX,qword ptr [RAX + 0x64]
MOV qword ptr [RBP + -0x50],RAX
CMP dword ptr [RBP + -0x58],-0x1
JNZ 0x00111268
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x18],EAX
JMP 0x0011128d
LAB_00111268:
MOV EAX,dword ptr [RBP + -0x58]
CMP EAX,dword ptr [RBP + -0x14]
JGE 0x0011127b
MOV EAX,dword ptr [RBP + -0x58]
MOV dword ptr [RBP + -0x8c],EAX
JMP 0x00111284
LAB_0011127b:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x8c],EAX
LAB_00111284:
MOV EAX,dword ptr [RBP + -0x8c]
MOV dword ptr [RBP + -0x18],EAX
LAB_0011128d:
JMP 0x0011135c
caseD_50:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x18],EAX
JMP 0x0011135c
caseD_0:
MOV dword ptr [RBP + -0x18],0x1
JMP 0x0011135c
caseD_53:
LEA RDI,[0x173b62]
MOV ESI,0x33f0
LEA RDX,[0x173dbd]
MOV AL,0x0
CALL 0x0010e270
default:
MOV RAX,qword ptr [0x00189fb0]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x17409d]
LEA RDX,[0x1740b6]
MOV AL,0x0
CALL 0x0010df30
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x50],0x53
JNC 0x00111323
MOV RAX,qword ptr [0x00189fb0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EDI,dword ptr [RAX + 0x50]
CALL 0x0010dbf0
MOV RDI,qword ptr [RBP + -0x98]
MOV RDX,RAX
LEA RSI,[0x174207]
MOV AL,0x0
CALL 0x0010df30
JMP 0x00111342
LAB_00111323:
MOV RAX,qword ptr [0x00189fb0]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0x50]
LEA RSI,[0x1774a8]
MOV AL,0x0
CALL 0x0010df30
LAB_00111342:
LEA RDI,[0x173b62]
MOV ESI,0x33fa
LEA RDX,[0x173dbd]
MOV AL,0x0
CALL 0x0010e270
LAB_0011135c:
CMP dword ptr [RBP + -0x18],0x0
JLE 0x00111364
JMP 0x00111383
LAB_00111364:
LEA RDI,[0x1740c7]
LEA RSI,[0x173b62]
MOV EDX,0x33fe
LEA RCX,[0x1740d3]
CALL 0x0010d690
LAB_00111383:
MOV EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x4],EAX
LAB_00111389:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0xa0
POP RBP
RET
|
int ggml_get_n_tasks(long param_1,int param_2)
{
FILE *__stream;
int iVar1;
uint uVar2;
ulong uVar3;
long lVar4;
int8 uVar5;
int local_94;
int local_90;
int local_8c;
int local_88;
int local_60;
int local_48;
int local_30;
int local_20;
local_20 = 0;
uVar3 = ggml_is_empty(param_1);
if ((uVar3 & 1) != 0) {
return 1;
}
switch(*(int4 *)(param_1 + 0x50)) {
case 0:
local_20 = 1;
iVar1 = local_20;
break;
case 1:
case 2:
case 3:
case 4:
case 0x1f:
case 0x20:
iVar1 = param_2;
break;
case 5:
case 8:
case 9:
case 10:
case 0xb:
case 0xc:
case 0xd:
case 0xe:
case 0xf:
case 0x10:
local_20 = 1;
iVar1 = local_20;
break;
case 6:
case 7:
case 0x14:
case 0x15:
case 0x16:
case 0x17:
case 0x18:
case 0x19:
case 0x1a:
case 0x1b:
case 0x1c:
iVar1 = param_2;
break;
case 0x11:
iVar1 = param_2;
break;
case 0x12:
case 0x13:
case 0x3c:
local_20 = 1;
iVar1 = local_20;
break;
case 0x1d:
case 0x1e:
case 0x21:
case 0x22:
case 0x23:
case 0x24:
case 0x26:
case 0x27:
local_20 = 1;
iVar1 = local_20;
break;
case 0x25:
local_20 = 1;
iVar1 = local_20;
break;
case 0x28:
case 0x29:
case 0x2b:
case 0x2c:
case 0x2d:
case 0x44:
iVar1 = param_2;
break;
case 0x2a:
lVar4 = ggml_nrows(*(int8 *)(param_1 + 0x98));
local_88 = param_2;
if (lVar4 <= param_2) {
local_88 = ggml_nrows(*(int8 *)(param_1 + 0x98));
}
iVar1 = local_88;
break;
case 0x2e:
local_20 = 1;
iVar1 = local_20;
break;
case 0x2f:
case 0x30:
case 0x31:
case 0x32:
iVar1 = param_2;
break;
case 0x33:
case 0x34:
case 0x35:
local_20 = 1;
iVar1 = local_20;
break;
case 0x36:
case 0x37:
case 0x38:
case 0x39:
case 0x3a:
case 0x3b:
case 0x3d:
case 0x3e:
case 0x3f:
case 0x40:
iVar1 = param_2;
break;
case 0x41:
case 0x42:
case 0x43:
case 0x45:
case 0x46:
case 0x48:
case 0x49:
case 0x4a:
case 0x4b:
case 0x4c:
local_20 = 1;
iVar1 = local_20;
break;
case 0x47:
uVar2 = ggml_get_unary_op(param_1);
if (7 < uVar2) {
iVar1 = param_2;
if (uVar2 - 8 < 3) break;
if (2 < uVar2 - 0xb) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x336b,"fatal error");
iVar1 = local_20;
break;
}
}
local_20 = 1;
iVar1 = local_20;
break;
case 0x4d:
local_30 = (int)*(int8 *)(param_1 + 0x5c);
iVar1 = param_2;
if (local_30 != -1) {
local_8c = param_2;
if (local_30 < param_2) {
local_8c = local_30;
}
local_20 = local_8c;
iVar1 = local_20;
}
break;
case 0x4e:
local_48 = (int)*(int8 *)(param_1 + 0x5c);
iVar1 = param_2;
if (local_48 != -1) {
local_90 = param_2;
if (local_48 < param_2) {
local_90 = local_48;
}
local_20 = local_90;
iVar1 = local_20;
}
break;
case 0x4f:
local_60 = (int)*(int8 *)(param_1 + 0x5c);
iVar1 = param_2;
if (local_60 != -1) {
local_94 = param_2;
if (local_60 < param_2) {
local_94 = local_60;
}
local_20 = local_94;
iVar1 = local_20;
}
break;
case 0x50:
case 0x51:
case 0x52:
iVar1 = param_2;
break;
case 0x53:
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x33f0,"fatal error");
default:
fprintf(*(FILE **)PTR_stderr_00189fb0,"%s: op not implemented: ","ggml_get_n_tasks");
if (*(uint *)(param_1 + 0x50) < 0x53) {
__stream = *(FILE **)PTR_stderr_00189fb0;
uVar5 = ggml_op_name(*(int4 *)(param_1 + 0x50));
fprintf(__stream,"%s\n",uVar5);
}
else {
fprintf(*(FILE **)PTR_stderr_00189fb0,"%d\n",(ulong)*(uint *)(param_1 + 0x50));
}
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x33fa,"fatal error");
iVar1 = local_20;
}
local_20 = iVar1;
if (0 < local_20) {
return local_20;
}
/* WARNING: Subroutine does not return */
__assert_fail("n_tasks > 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x33fe,"int ggml_get_n_tasks(struct ggml_tensor *, int)");
}
|
|
6,531 | mi_checksum | eloqsql/storage/myisam/mi_checksum.c | ha_checksum mi_checksum(MI_INFO *info, const uchar *buf)
{
ha_checksum crc=0;
const uchar *record= buf;
MI_COLUMNDEF *column= info->s->rec;
MI_COLUMNDEF *column_end= column+ info->s->base.fields;
my_bool skip_null_bits= MY_TEST(info->s->options & HA_OPTION_NULL_FIELDS);
for ( ; column != column_end ; buf+= column++->length)
{
const uchar *pos;
ulong length;
if ((record[column->null_pos] & column->null_bit) &&
skip_null_bits)
continue; /* Null field */
switch (column->type) {
case FIELD_BLOB:
{
length=_mi_calc_blob_length(column->length-
portable_sizeof_char_ptr,
buf);
memcpy((void*) &pos, buf+column->length - portable_sizeof_char_ptr,
sizeof(char*));
break;
}
case FIELD_VARCHAR:
{
uint pack_length= HA_VARCHAR_PACKLENGTH(column->length-1);
if (pack_length == 1)
length= (ulong) *(uchar*) buf;
else
length= uint2korr(buf);
pos= buf+pack_length;
break;
}
default:
length=column->length;
pos=buf;
break;
}
crc=my_checksum(crc, pos ? pos : (uchar*) "", length);
}
return crc;
} | O0 | c | mi_checksum:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x230(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x30, 0x168(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x318(%rax), %rdx
andq $0x400, %rdx # imm = 0x400
xorl %eax, %eax
movl $0x1, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
movb %al, -0x31(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0x2ffeb
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movzwl 0xe(%rcx), %ecx
movzbl (%rax,%rcx), %eax
movq -0x28(%rbp), %rcx
movzbl 0xc(%rcx), %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x2fedc
movsbl -0x31(%rbp), %eax
cmpl $0x0, %eax
je 0x2fedc
jmp 0x2ffc5
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x50(%rbp)
subl $0x4, %eax
je 0x2fef9
jmp 0x2feec
movl -0x50(%rbp), %eax
subl $0x8, %eax
je 0x2ff2b
jmp 0x2ff7a
movq -0x28(%rbp), %rax
movzwl 0x4(%rax), %edi
subl $0x8, %edi
movq -0x10(%rbp), %rsi
callq 0x37390
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movzwl 0x4(%rcx), %ecx
movslq %ecx, %rcx
movq -0x8(%rax,%rcx), %rax
movq %rax, -0x40(%rbp)
jmp 0x2ff8e
movq -0x28(%rbp), %rax
movzwl 0x4(%rax), %edx
subl $0x1, %edx
movl $0x2, %eax
movl $0x1, %ecx
cmpl $0x100, %edx # imm = 0x100
cmovll %ecx, %eax
movl %eax, -0x4c(%rbp)
cmpl $0x1, -0x4c(%rbp)
jne 0x2ff5f
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movq %rax, -0x48(%rbp)
jmp 0x2ff6a
movq -0x10(%rbp), %rax
movzwl (%rax), %eax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movl -0x4c(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
jmp 0x2ff8e
movq -0x28(%rbp), %rax
movzwl 0x4(%rax), %eax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x2ffa5
movq -0x40(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x2ffb2
leaq 0xb9b54(%rip), %rax # 0xe9b00
movq %rax, -0x60(%rbp)
jmp 0x2ffb2
movl -0x54(%rbp), %edi
movq -0x60(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x959f0
movl %eax, -0x14(%rbp)
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x30, %rcx
movq %rcx, -0x28(%rbp)
movzwl 0x4(%rax), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x2fea1
movl -0x14(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| mi_checksum:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], 0
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
mov rax, [rbp+var_8]
mov rax, [rax]
mov rax, [rax+230h]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov rcx, [rbp+var_8]
mov rcx, [rcx]
imul rcx, [rcx+168h], 30h ; '0'
add rax, rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_8]
mov rax, [rax]
mov rdx, [rax+318h]
and rdx, 400h
xor eax, eax
mov ecx, 1
cmp rdx, 0
cmovnz eax, ecx
mov [rbp+var_31], al
loc_2FEA1:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jz loc_2FFEB
mov rax, [rbp+var_20]
mov rcx, [rbp+var_28]
movzx ecx, word ptr [rcx+0Eh]
movzx eax, byte ptr [rax+rcx]
mov rcx, [rbp+var_28]
movzx ecx, byte ptr [rcx+0Ch]
and eax, ecx
cmp eax, 0
jz short loc_2FEDC
movsx eax, [rbp+var_31]
cmp eax, 0
jz short loc_2FEDC
jmp loc_2FFC5
loc_2FEDC:
mov rax, [rbp+var_28]
mov eax, [rax]
mov [rbp+var_50], eax
sub eax, 4
jz short loc_2FEF9
jmp short $+2
loc_2FEEC:
mov eax, [rbp+var_50]
sub eax, 8
jz short loc_2FF2B
jmp loc_2FF7A
loc_2FEF9:
mov rax, [rbp+var_28]
movzx edi, word ptr [rax+4]
sub edi, 8
mov rsi, [rbp+var_10]
call _mi_calc_blob_length
mov [rbp+var_48], rax
mov rax, [rbp+var_10]
mov rcx, [rbp+var_28]
movzx ecx, word ptr [rcx+4]
movsxd rcx, ecx
mov rax, [rax+rcx-8]
mov [rbp+var_40], rax
jmp short loc_2FF8E
loc_2FF2B:
mov rax, [rbp+var_28]
movzx edx, word ptr [rax+4]
sub edx, 1
mov eax, 2
mov ecx, 1
cmp edx, 100h
cmovl eax, ecx
mov [rbp+var_4C], eax
cmp [rbp+var_4C], 1
jnz short loc_2FF5F
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
mov [rbp+var_48], rax
jmp short loc_2FF6A
loc_2FF5F:
mov rax, [rbp+var_10]
movzx eax, word ptr [rax]
mov [rbp+var_48], rax
loc_2FF6A:
mov rax, [rbp+var_10]
mov ecx, [rbp+var_4C]
add rax, rcx
mov [rbp+var_40], rax
jmp short loc_2FF8E
loc_2FF7A:
mov rax, [rbp+var_28]
movzx eax, word ptr [rax+4]
mov [rbp+var_48], rax
mov rax, [rbp+var_10]
mov [rbp+var_40], rax
loc_2FF8E:
mov eax, [rbp+var_14]
mov [rbp+var_54], eax
cmp [rbp+var_40], 0
jz short loc_2FFA5
mov rax, [rbp+var_40]
mov [rbp+var_60], rax
jmp short loc_2FFB2
loc_2FFA5:
lea rax, asc_E9AFC+4; ""
mov [rbp+var_60], rax
jmp short $+2
loc_2FFB2:
mov edi, [rbp+var_54]
mov rsi, [rbp+var_60]
mov rdx, [rbp+var_48]
call my_checksum
mov [rbp+var_14], eax
loc_2FFC5:
mov rax, [rbp+var_28]
mov rcx, rax
add rcx, 30h ; '0'
mov [rbp+var_28], rcx
movzx ecx, word ptr [rax+4]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
jmp loc_2FEA1
loc_2FFEB:
mov eax, [rbp+var_14]
add rsp, 60h
pop rbp
retn
| long long mi_checksum(long long a1, unsigned __int8 *a2)
{
unsigned int v2; // eax
unsigned int v3; // eax
long long v4; // rax
long long v6; // [rsp+18h] [rbp-48h]
unsigned __int8 *v7; // [rsp+20h] [rbp-40h]
bool v8; // [rsp+2Fh] [rbp-31h]
long long v9; // [rsp+30h] [rbp-30h]
long long v10; // [rsp+38h] [rbp-28h]
unsigned int v11; // [rsp+4Ch] [rbp-14h]
unsigned __int8 *v12; // [rsp+50h] [rbp-10h]
v12 = a2;
v11 = 0;
v10 = *(_QWORD *)(*(_QWORD *)a1 + 560LL);
v9 = 48LL * *(_QWORD *)(*(_QWORD *)a1 + 360LL) + v10;
v8 = (*(_QWORD *)(*(_QWORD *)a1 + 792LL) & 0x400LL) != 0;
while ( v10 != v9 )
{
if ( (*(_BYTE *)(v10 + 12) & a2[*(unsigned __int16 *)(v10 + 14)]) == 0 || !v8 )
{
if ( *(_DWORD *)v10 == 4 )
{
v6 = mi_calc_blob_length((unsigned int)*(unsigned __int16 *)(v10 + 4) - 8, v12);
v7 = *(unsigned __int8 **)&v12[*(unsigned __int16 *)(v10 + 4) - 8];
}
else if ( *(_DWORD *)v10 == 8 )
{
v2 = 2;
if ( *(unsigned __int16 *)(v10 + 4) - 1 < 256 )
v2 = 1;
if ( v2 == 1 )
v6 = *v12;
else
v6 = *(unsigned __int16 *)v12;
v7 = &v12[v2];
}
else
{
v6 = *(unsigned __int16 *)(v10 + 4);
v7 = v12;
}
if ( v7 )
v3 = my_checksum(v11, v7, v6);
else
v3 = my_checksum(v11, "", v6);
v11 = v3;
}
v4 = v10;
v10 += 48LL;
v12 += *(unsigned __int16 *)(v4 + 4);
}
return v11;
}
| mi_checksum:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x230]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX]
IMUL RCX,qword ptr [RCX + 0x168],0x30
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x318]
AND RDX,0x400
XOR EAX,EAX
MOV ECX,0x1
CMP RDX,0x0
CMOVNZ EAX,ECX
MOV byte ptr [RBP + -0x31],AL
LAB_0012fea1:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JZ 0x0012ffeb
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
MOVZX ECX,word ptr [RCX + 0xe]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV RCX,qword ptr [RBP + -0x28]
MOVZX ECX,byte ptr [RCX + 0xc]
AND EAX,ECX
CMP EAX,0x0
JZ 0x0012fedc
MOVSX EAX,byte ptr [RBP + -0x31]
CMP EAX,0x0
JZ 0x0012fedc
JMP 0x0012ffc5
LAB_0012fedc:
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x50],EAX
SUB EAX,0x4
JZ 0x0012fef9
JMP 0x0012feec
LAB_0012feec:
MOV EAX,dword ptr [RBP + -0x50]
SUB EAX,0x8
JZ 0x0012ff2b
JMP 0x0012ff7a
LAB_0012fef9:
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EDI,word ptr [RAX + 0x4]
SUB EDI,0x8
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00137390
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x28]
MOVZX ECX,word ptr [RCX + 0x4]
MOVSXD RCX,ECX
MOV RAX,qword ptr [RAX + RCX*0x1 + -0x8]
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0012ff8e
LAB_0012ff2b:
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EDX,word ptr [RAX + 0x4]
SUB EDX,0x1
MOV EAX,0x2
MOV ECX,0x1
CMP EDX,0x100
CMOVL EAX,ECX
MOV dword ptr [RBP + -0x4c],EAX
CMP dword ptr [RBP + -0x4c],0x1
JNZ 0x0012ff5f
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0012ff6a
LAB_0012ff5f:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX]
MOV qword ptr [RBP + -0x48],RAX
LAB_0012ff6a:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x4c]
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0012ff8e
LAB_0012ff7a:
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,word ptr [RAX + 0x4]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x40],RAX
LAB_0012ff8e:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x40],0x0
JZ 0x0012ffa5
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0012ffb2
LAB_0012ffa5:
LEA RAX,[0x1e9b00]
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0012ffb2
LAB_0012ffb2:
MOV EDI,dword ptr [RBP + -0x54]
MOV RSI,qword ptr [RBP + -0x60]
MOV RDX,qword ptr [RBP + -0x48]
CALL 0x001959f0
MOV dword ptr [RBP + -0x14],EAX
LAB_0012ffc5:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,RAX
ADD RCX,0x30
MOV qword ptr [RBP + -0x28],RCX
MOVZX ECX,word ptr [RAX + 0x4]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0012fea1
LAB_0012ffeb:
MOV EAX,dword ptr [RBP + -0x14]
ADD RSP,0x60
POP RBP
RET
|
int4 mi_checksum(long *param_1,ushort *param_2)
{
ulong uVar1;
uint uVar2;
int *piVar3;
ushort *local_68;
ulong local_50;
ushort *local_48;
int *local_30;
int4 local_1c;
ushort *local_18;
local_1c = 0;
local_30 = *(int **)(*param_1 + 0x230);
piVar3 = local_30 + *(long *)(*param_1 + 0x168) * 0xc;
uVar1 = *(ulong *)(*param_1 + 0x318);
local_18 = param_2;
for (; local_30 != piVar3; local_30 = local_30 + 0xc) {
if (((*(byte *)((long)param_2 + (ulong)*(ushort *)((long)local_30 + 0xe)) &
*(byte *)(local_30 + 3)) == 0) || ((uVar1 & 0x400) == 0)) {
if (*local_30 == 4) {
local_50 = _mi_calc_blob_length(*(ushort *)(local_30 + 1) - 8,local_18);
local_48 = *(ushort **)((long)local_18 + (long)(int)(uint)*(ushort *)(local_30 + 1) + -8);
}
else if (*local_30 == 8) {
uVar2 = 2;
if ((int)(*(ushort *)(local_30 + 1) - 1) < 0x100) {
uVar2 = 1;
}
if (uVar2 == 1) {
local_50 = (ulong)(byte)*local_18;
}
else {
local_50 = (ulong)*local_18;
}
local_48 = (ushort *)((long)local_18 + (ulong)uVar2);
}
else {
local_50 = (ulong)*(ushort *)(local_30 + 1);
local_48 = local_18;
}
if (local_48 == (ushort *)0x0) {
local_68 = (ushort *)&DAT_001e9b00;
}
else {
local_68 = local_48;
}
local_1c = my_checksum(local_1c,local_68,local_50);
}
local_18 = (ushort *)((long)local_18 + (long)(int)(uint)*(ushort *)(local_30 + 1));
}
return local_1c;
}
|
|
6,532 | my_copy_fix_mb | eloqsql/strings/ctype-mb.c | size_t
my_copy_fix_mb(CHARSET_INFO *cs,
char *dst, size_t dst_length,
const char *src, size_t src_length,
size_t nchars, MY_STRCOPY_STATUS *status)
{
size_t well_formed_nchars;
size_t well_formed_length;
size_t fixed_length;
size_t min_length= MY_MIN(src_length, dst_length);
well_formed_nchars= my_ci_well_formed_char_length(cs, src, src + min_length,
nchars, status);
DBUG_ASSERT(well_formed_nchars <= nchars);
well_formed_length= status->m_source_end_pos - src;
if (well_formed_length)
memmove(dst, src, well_formed_length);
if (!status->m_well_formed_error_pos)
return well_formed_length;
fixed_length= my_append_fix_badly_formed_tail(cs,
dst + well_formed_length,
dst + dst_length,
src + well_formed_length,
src + src_length,
nchars - well_formed_nchars,
status);
return well_formed_length + fixed_length;
} | O3 | c | my_copy_fix_mb:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq 0x10(%rbp), %rbx
cmpq %rdx, %r8
movq %r8, -0x58(%rbp)
cmovbq %r8, %rdx
addq %rcx, %rdx
movq 0xb8(%rdi), %rax
movq %rdi, -0x40(%rbp)
movq %rcx, %rsi
movq %r9, -0x30(%rbp)
movq %r9, %rcx
movq %rbx, %r8
callq *0xc8(%rax)
movq %rax, %r14
movq (%rbx), %rbx
subq %r15, %rbx
je 0xb384d
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x29110
movq 0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xb393c
leaq (%rbx,%r13), %rax
movq %rbx, -0x50(%rbp)
addq %r15, %rbx
movq -0x30(%rbp), %rcx
cmpq %r14, %rcx
movq %rax, -0x48(%rbp)
je 0xb3922
addq %r12, %r13
movq %r13, -0x38(%rbp)
addq -0x58(%rbp), %r15
subq %rcx, %r14
movq %rax, %r13
movq %r15, -0x30(%rbp)
movq -0x40(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %rbx, %rsi
movq %r15, %rdx
callq *0xc0(%rax)
testl %eax, %eax
jle 0xb38c8
movl %eax, %r15d
leaq (%r15,%r13), %r12
cmpq -0x38(%rbp), %r12
ja 0xb3927
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x29080
movq %r12, %r13
jmp 0xb3910
setne %al
cmpq %r15, %rbx
setae %cl
testb %al, %cl
jne 0xb3927
movq 0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0xb38e4
movq %rbx, 0x8(%rax)
movq -0x40(%rbp), %rdi
movq 0xb8(%rdi), %rax
movl $0x3f, %esi
movq %r13, %rdx
movq -0x38(%rbp), %rcx
callq *0x30(%rax)
testl %eax, %eax
jle 0xb3927
movl %eax, %eax
addq %rax, %r13
movl $0x1, %r15d
movq %r13, %r12
addq %r15, %rbx
incq %r14
movq -0x30(%rbp), %r15
jne 0xb388d
jmp 0xb392a
movq %rax, %r12
jmp 0xb392a
movq %r13, %r12
movq 0x10(%rbp), %rax
movq %rbx, (%rax)
movq -0x50(%rbp), %rbx
subq -0x48(%rbp), %rbx
addq %r12, %rbx
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_copy_fix_mb:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r15, rcx
mov r12, rdx
mov r13, rsi
mov rbx, [rbp+arg_0]
cmp r8, rdx
mov [rbp+var_58], r8
cmovb rdx, r8
add rdx, rcx
mov rax, [rdi+0B8h]
mov [rbp+var_40], rdi
mov rsi, rcx
mov [rbp+var_30], r9
mov rcx, r9
mov r8, rbx
call qword ptr [rax+0C8h]
mov r14, rax
mov rbx, [rbx]
sub rbx, r15
jz short loc_B384D
mov rdi, r13
mov rsi, r15
mov rdx, rbx
call _memmove
loc_B384D:
mov rax, [rbp+arg_0]
cmp qword ptr [rax+8], 0
jz loc_B393C
lea rax, [rbx+r13]
mov [rbp+var_50], rbx
add rbx, r15
mov rcx, [rbp+var_30]
cmp rcx, r14
mov [rbp+var_48], rax
jz loc_B3922
add r13, r12
mov [rbp+var_38], r13
add r15, [rbp+var_58]
sub r14, rcx
mov r13, rax
mov [rbp+var_30], r15
loc_B388D:
mov rdi, [rbp+var_40]
mov rax, [rdi+0B8h]
mov rsi, rbx
mov rdx, r15
call qword ptr [rax+0C0h]
test eax, eax
jle short loc_B38C8
mov r15d, eax
lea r12, [r15+r13]
cmp r12, [rbp+var_38]
ja short loc_B3927
mov rdi, r13
mov rsi, rbx
mov rdx, r15
call _memcpy
mov r13, r12
jmp short loc_B3910
loc_B38C8:
setnz al
cmp rbx, r15
setnb cl
test cl, al
jnz short loc_B3927
mov rax, [rbp+arg_0]
cmp qword ptr [rax+8], 0
jnz short loc_B38E4
mov [rax+8], rbx
loc_B38E4:
mov rdi, [rbp+var_40]
mov rax, [rdi+0B8h]
mov esi, 3Fh ; '?'
mov rdx, r13
mov rcx, [rbp+var_38]
call qword ptr [rax+30h]
test eax, eax
jle short loc_B3927
mov eax, eax
add r13, rax
mov r15d, 1
mov r12, r13
loc_B3910:
add rbx, r15
inc r14
mov r15, [rbp+var_30]
jnz loc_B388D
jmp short loc_B392A
loc_B3922:
mov r12, rax
jmp short loc_B392A
loc_B3927:
mov r12, r13
loc_B392A:
mov rax, [rbp+arg_0]
mov [rax], rbx
mov rbx, [rbp+var_50]
sub rbx, [rbp+var_48]
add rbx, r12
loc_B393C:
mov rax, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long my_copy_fix_mb(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
long long a6,
unsigned long long *a7)
{
unsigned long long v8; // r12
long long v9; // r14
long long v10; // rbx
unsigned long long v11; // rax
unsigned long long v12; // rbx
unsigned long long v13; // r15
long long v14; // r14
long long v15; // r13
unsigned int v16; // eax
long long v17; // r15
unsigned long long v18; // r12
int v19; // eax
long long v22; // [rsp+10h] [rbp-50h]
unsigned long long v23; // [rsp+18h] [rbp-48h]
unsigned long long v24; // [rsp+28h] [rbp-38h]
unsigned long long v26; // [rsp+30h] [rbp-30h]
v8 = a3;
if ( a5 < a3 )
a3 = a5;
v9 = (*(long long ( **)(long long, long long, unsigned long long, long long, unsigned long long *))(*(_QWORD *)(a1 + 184)
+ 200LL))(
a1,
a4,
a4 + a3,
a6,
a7);
v10 = *a7 - a4;
if ( v10 )
memmove(a2, a4, v10);
if ( !a7[1] )
return v10;
v11 = v10 + a2;
v22 = v10;
v12 = a4 + v10;
v23 = v11;
if ( a6 == v9 )
{
v18 = v11;
goto LABEL_20;
}
v24 = v8 + a2;
v13 = a5 + a4;
v14 = v9 - a6;
v15 = v11;
v26 = v13;
while ( 1 )
{
v16 = (*(long long ( **)(long long, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
v12,
v13);
if ( (int)v16 <= 0 )
break;
v17 = v16;
v18 = v16 + v15;
if ( v18 > v24 )
goto LABEL_19;
memcpy(v15, v12, v16);
v15 = v18;
LABEL_16:
v12 += v17;
++v14;
v13 = v26;
if ( !v14 )
goto LABEL_20;
}
if ( v16 == 0 || v12 < v13 )
{
if ( !a7[1] )
a7[1] = v12;
v19 = (*(long long ( **)(long long, long long, long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))(
a1,
63LL,
v15,
v24);
if ( v19 > 0 )
{
v15 += (unsigned int)v19;
v17 = 1LL;
v18 = v15;
goto LABEL_16;
}
}
LABEL_19:
v18 = v15;
LABEL_20:
*a7 = v12;
return v18 + v22 - v23;
}
| my_copy_fix_mb:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R15,RCX
MOV R12,RDX
MOV R13,RSI
MOV RBX,qword ptr [RBP + 0x10]
CMP R8,RDX
MOV qword ptr [RBP + -0x58],R8
CMOVC RDX,R8
ADD RDX,RCX
MOV RAX,qword ptr [RDI + 0xb8]
MOV qword ptr [RBP + -0x40],RDI
MOV RSI,RCX
MOV qword ptr [RBP + -0x30],R9
MOV RCX,R9
MOV R8,RBX
CALL qword ptr [RAX + 0xc8]
MOV R14,RAX
MOV RBX,qword ptr [RBX]
SUB RBX,R15
JZ 0x001b384d
MOV RDI,R13
MOV RSI,R15
MOV RDX,RBX
CALL 0x00129110
LAB_001b384d:
MOV RAX,qword ptr [RBP + 0x10]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x001b393c
LEA RAX,[RBX + R13*0x1]
MOV qword ptr [RBP + -0x50],RBX
ADD RBX,R15
MOV RCX,qword ptr [RBP + -0x30]
CMP RCX,R14
MOV qword ptr [RBP + -0x48],RAX
JZ 0x001b3922
ADD R13,R12
MOV qword ptr [RBP + -0x38],R13
ADD R15,qword ptr [RBP + -0x58]
SUB R14,RCX
MOV R13,RAX
MOV qword ptr [RBP + -0x30],R15
LAB_001b388d:
MOV RDI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,RBX
MOV RDX,R15
CALL qword ptr [RAX + 0xc0]
TEST EAX,EAX
JLE 0x001b38c8
MOV R15D,EAX
LEA R12,[R15 + R13*0x1]
CMP R12,qword ptr [RBP + -0x38]
JA 0x001b3927
MOV RDI,R13
MOV RSI,RBX
MOV RDX,R15
CALL 0x00129080
MOV R13,R12
JMP 0x001b3910
LAB_001b38c8:
SETNZ AL
CMP RBX,R15
SETNC CL
TEST CL,AL
JNZ 0x001b3927
MOV RAX,qword ptr [RBP + 0x10]
CMP qword ptr [RAX + 0x8],0x0
JNZ 0x001b38e4
MOV qword ptr [RAX + 0x8],RBX
LAB_001b38e4:
MOV RDI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RDI + 0xb8]
MOV ESI,0x3f
MOV RDX,R13
MOV RCX,qword ptr [RBP + -0x38]
CALL qword ptr [RAX + 0x30]
TEST EAX,EAX
JLE 0x001b3927
MOV EAX,EAX
ADD R13,RAX
MOV R15D,0x1
MOV R12,R13
LAB_001b3910:
ADD RBX,R15
INC R14
MOV R15,qword ptr [RBP + -0x30]
JNZ 0x001b388d
JMP 0x001b392a
LAB_001b3922:
MOV R12,RAX
JMP 0x001b392a
LAB_001b3927:
MOV R12,R13
LAB_001b392a:
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RAX],RBX
MOV RBX,qword ptr [RBP + -0x50]
SUB RBX,qword ptr [RBP + -0x48]
ADD RBX,R12
LAB_001b393c:
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
size_t my_copy_fix_mb(long param_1,void *param_2,ulong param_3,void *param_4,ulong param_5,
long param_6,long *param_7)
{
void *pvVar1;
uint uVar2;
long lVar3;
size_t __n;
void *__src;
void *__dest;
ulong uVar4;
uVar4 = param_3;
if (param_5 < param_3) {
uVar4 = param_5;
}
lVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 200))
(param_1,param_4,uVar4 + (long)param_4,param_6,param_7);
__n = *param_7 - (long)param_4;
if (__n != 0) {
memmove(param_2,param_4,__n);
}
if (param_7[1] != 0) {
pvVar1 = (void *)(__n + (long)param_2);
__src = (void *)(__n + (long)param_4);
__dest = pvVar1;
if (param_6 != lVar3) {
lVar3 = lVar3 - param_6;
do {
uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))
(param_1,__src,(void *)((long)param_4 + param_5));
if ((int)uVar2 < 1) {
if ((void *)((long)param_4 + param_5) <= __src && uVar2 != 0) break;
if (param_7[1] == 0) {
param_7[1] = (long)__src;
}
uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))
(param_1,0x3f,__dest,(void *)((long)param_2 + param_3));
if ((int)uVar2 < 1) break;
__dest = (void *)((long)__dest + (ulong)uVar2);
uVar4 = 1;
}
else {
uVar4 = (ulong)uVar2;
if ((void *)((long)param_2 + param_3) < (void *)(uVar4 + (long)__dest)) break;
memcpy(__dest,__src,uVar4);
__dest = (void *)(uVar4 + (long)__dest);
}
__src = (void *)((long)__src + uVar4);
lVar3 = lVar3 + 1;
} while (lVar3 != 0);
}
*param_7 = (long)__src;
__n = (__n - (long)pvVar1) + (long)__dest;
}
return __n;
}
|
|
6,533 | thr_abort_locks | eloqsql/mysys/thr_lock.c | void thr_abort_locks(THR_LOCK *lock, my_bool upgrade_lock)
{
THR_LOCK_DATA *data;
DBUG_ENTER("thr_abort_locks");
mysql_mutex_lock(&lock->mutex);
for (data=lock->read_wait.data; data ; data=data->next)
{
data->type=TL_UNLOCK; /* Mark killed */
/* It's safe to signal the cond first: we're still holding the mutex. */
mysql_cond_signal(data->cond);
data->cond=0; /* Removed from list */
}
for (data=lock->write_wait.data; data ; data=data->next)
{
data->type=TL_UNLOCK;
mysql_cond_signal(data->cond);
data->cond=0;
}
lock->read_wait.last= &lock->read_wait.data;
lock->write_wait.last= &lock->write_wait.data;
lock->read_wait.data=lock->write_wait.data=0;
if (upgrade_lock && lock->write.data)
lock->write.data->type=TL_WRITE_ONLY;
mysql_mutex_unlock(&lock->mutex);
DBUG_VOID_RETURN;
} | O0 | c | thr_abort_locks:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
leaq 0x55403(%rip), %rsi # 0x7b004
movl $0x520, %edx # imm = 0x520
callq 0x24810
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x25c50
movq -0x18(%rbp), %rax
movl $0x0, 0x40(%rax)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x25d20
movq -0x18(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x25c17
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x25c98
movq -0x18(%rbp), %rax
movl $0x0, 0x40(%rax)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x25d20
movq -0x18(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x25c5f
movq -0x8(%rbp), %rcx
addq $0x60, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x8(%rbp), %rcx
addq $0x80, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x80(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x60(%rax)
movsbl -0x9(%rbp), %eax
cmpl $0x0, %eax
je 0x25d02
movq -0x8(%rbp), %rax
cmpq $0x0, 0x90(%rax)
je 0x25d02
movq -0x8(%rbp), %rax
movq 0x90(%rax), %rax
movl $0xe, 0x40(%rax)
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0x24880
jmp 0x25d11
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| thr_abort_locks:
push rbp
mov rbp, rsp
sub rsp, 20h
mov al, sil
mov [rbp+var_8], rdi
mov [rbp+var_9], al
mov rdi, [rbp+var_8]
add rdi, 18h
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 520h
call inline_mysql_mutex_lock
mov rax, [rbp+var_8]
mov rax, [rax+60h]
mov [rbp+var_18], rax
loc_25C17:
cmp [rbp+var_18], 0
jz short loc_25C50
mov rax, [rbp+var_18]
mov dword ptr [rax+40h], 0
mov rax, [rbp+var_18]
mov rdi, [rax+20h]
call inline_mysql_cond_signal
mov rax, [rbp+var_18]
mov qword ptr [rax+20h], 0
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov [rbp+var_18], rax
jmp short loc_25C17
loc_25C50:
mov rax, [rbp+var_8]
mov rax, [rax+80h]
mov [rbp+var_18], rax
loc_25C5F:
cmp [rbp+var_18], 0
jz short loc_25C98
mov rax, [rbp+var_18]
mov dword ptr [rax+40h], 0
mov rax, [rbp+var_18]
mov rdi, [rax+20h]
call inline_mysql_cond_signal
mov rax, [rbp+var_18]
mov qword ptr [rax+20h], 0
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov [rbp+var_18], rax
jmp short loc_25C5F
loc_25C98:
mov rcx, [rbp+var_8]
add rcx, 60h ; '`'
mov rax, [rbp+var_8]
mov [rax+68h], rcx
mov rcx, [rbp+var_8]
add rcx, 80h
mov rax, [rbp+var_8]
mov [rax+88h], rcx
mov rax, [rbp+var_8]
mov qword ptr [rax+80h], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+60h], 0
movsx eax, [rbp+var_9]
cmp eax, 0
jz short loc_25D02
mov rax, [rbp+var_8]
cmp qword ptr [rax+90h], 0
jz short loc_25D02
mov rax, [rbp+var_8]
mov rax, [rax+90h]
mov dword ptr [rax+40h], 0Eh
loc_25D02:
mov rdi, [rbp+var_8]
add rdi, 18h
call inline_mysql_mutex_unlock
jmp short $+2
loc_25D11:
add rsp, 20h
pop rbp
retn
| long long thr_abort_locks(_QWORD *a1, char a2)
{
long long i; // [rsp+8h] [rbp-18h]
long long j; // [rsp+8h] [rbp-18h]
inline_mysql_mutex_lock(
(long long)(a1 + 3),
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",
0x520u);
for ( i = a1[12]; i; i = *(_QWORD *)(i + 8) )
{
*(_DWORD *)(i + 64) = 0;
inline_mysql_cond_signal(*(_QWORD *)(i + 32));
*(_QWORD *)(i + 32) = 0LL;
}
for ( j = a1[16]; j; j = *(_QWORD *)(j + 8) )
{
*(_DWORD *)(j + 64) = 0;
inline_mysql_cond_signal(*(_QWORD *)(j + 32));
*(_QWORD *)(j + 32) = 0LL;
}
a1[13] = a1 + 12;
a1[17] = a1 + 16;
a1[16] = 0LL;
a1[12] = 0LL;
if ( a2 && a1[18] )
*(_DWORD *)(a1[18] + 64LL) = 14;
return inline_mysql_mutex_unlock((long long)(a1 + 3));
}
| thr_abort_locks:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV AL,SIL
MOV qword ptr [RBP + -0x8],RDI
MOV byte ptr [RBP + -0x9],AL
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x18
LEA RSI,[0x17b004]
MOV EDX,0x520
CALL 0x00124810
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x60]
MOV qword ptr [RBP + -0x18],RAX
LAB_00125c17:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00125c50
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x40],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x20]
CALL 0x00125d20
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x20],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00125c17
LAB_00125c50:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x80]
MOV qword ptr [RBP + -0x18],RAX
LAB_00125c5f:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00125c98
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x40],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x20]
CALL 0x00125d20
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x20],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00125c5f
LAB_00125c98:
MOV RCX,qword ptr [RBP + -0x8]
ADD RCX,0x60
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x68],RCX
MOV RCX,qword ptr [RBP + -0x8]
ADD RCX,0x80
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x88],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x80],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x60],0x0
MOVSX EAX,byte ptr [RBP + -0x9]
CMP EAX,0x0
JZ 0x00125d02
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x90],0x0
JZ 0x00125d02
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x90]
MOV dword ptr [RAX + 0x40],0xe
LAB_00125d02:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x18
CALL 0x00124880
JMP 0x00125d11
LAB_00125d11:
ADD RSP,0x20
POP RBP
RET
|
void thr_abort_locks(long param_1,char param_2)
{
long local_20;
inline_mysql_mutex_lock
(param_1 + 0x18,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x520);
for (local_20 = *(long *)(param_1 + 0x60); local_20 != 0; local_20 = *(long *)(local_20 + 8)) {
*(int4 *)(local_20 + 0x40) = 0;
inline_mysql_cond_signal(*(int8 *)(local_20 + 0x20));
*(int8 *)(local_20 + 0x20) = 0;
}
for (local_20 = *(long *)(param_1 + 0x80); local_20 != 0; local_20 = *(long *)(local_20 + 8)) {
*(int4 *)(local_20 + 0x40) = 0;
inline_mysql_cond_signal(*(int8 *)(local_20 + 0x20));
*(int8 *)(local_20 + 0x20) = 0;
}
*(long *)(param_1 + 0x68) = param_1 + 0x60;
*(long *)(param_1 + 0x88) = param_1 + 0x80;
*(int8 *)(param_1 + 0x80) = 0;
*(int8 *)(param_1 + 0x60) = 0;
if ((param_2 != '\0') && (*(long *)(param_1 + 0x90) != 0)) {
*(int4 *)(*(long *)(param_1 + 0x90) + 0x40) = 0xe;
}
inline_mysql_mutex_unlock(param_1 + 0x18);
return;
}
|
|
6,534 | mthd_stmt_get_result_metadata | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | my_bool mthd_stmt_get_result_metadata(MYSQL_STMT *stmt)
{
MYSQL_DATA *result;
MA_MEM_ROOT *fields_ma_alloc_root= &((MADB_STMT_EXTENSION *)stmt->extension)->fields_ma_alloc_root;
if (!(result= stmt->mysql->methods->db_read_rows(stmt->mysql, (MYSQL_FIELD *)0,
7 + ma_extended_type_info_rows(stmt->mysql))))
return(1);
if (!(stmt->fields= unpack_fields(stmt->mysql, result, fields_ma_alloc_root,
stmt->field_count, 0)))
return(1);
return(0);
} | O3 | c | mthd_stmt_get_result_metadata:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x340(%rdi), %r14
movq 0x38(%rdi), %rdi
movq 0x4d0(%rdi), %rax
movq 0x4f0(%rdi), %rcx
xorl %edx, %edx
btl $0x3, 0x70(%rcx)
adcl $0x7, %edx
xorl %esi, %esi
callq *0x28(%rax)
testq %rax, %rax
je 0x20f6d
movq 0x38(%rbx), %rdi
movl 0x60(%rbx), %ecx
movq %rax, %rsi
movq %r14, %rdx
xorl %r8d, %r8d
callq 0x17a18
movq %rax, 0x58(%rbx)
testq %rax, %rax
sete %al
jmp 0x20f6f
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
| mthd_stmt_get_result_metadata:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
mov r14, [rdi+340h]
mov rdi, [rdi+38h]
mov rax, [rdi+4D0h]
mov rcx, [rdi+4F0h]
xor edx, edx
bt dword ptr [rcx+70h], 3
adc edx, 7
xor esi, esi
call qword ptr [rax+28h]
test rax, rax
jz short loc_20F6D
mov rdi, [rbx+38h]
mov ecx, [rbx+60h]
mov rsi, rax
mov rdx, r14
xor r8d, r8d
call unpack_fields
mov [rbx+58h], rax
test rax, rax
setz al
jmp short loc_20F6F
loc_20F6D:
mov al, 1
loc_20F6F:
pop rbx
pop r14
pop rbp
retn
| bool mthd_stmt_get_result_metadata(long long a1)
{
long long v1; // r14
_QWORD *v2; // rax
long long v3; // rax
v1 = *(_QWORD *)(a1 + 832);
v2 = (_QWORD *)(*(long long ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 40LL))(
*(_QWORD *)(a1 + 56),
0LL,
(unsigned int)_bittest(
(const signed __int32 *)(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1264LL) + 112LL),
3u)
+ 7);
if ( !v2 )
return 1;
v3 = unpack_fields(*(_QWORD *)(a1 + 56), v2, v1, *(_DWORD *)(a1 + 96), 0);
*(_QWORD *)(a1 + 88) = v3;
return v3 == 0;
}
| mthd_stmt_get_result_metadata:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x340]
MOV RDI,qword ptr [RDI + 0x38]
MOV RAX,qword ptr [RDI + 0x4d0]
MOV RCX,qword ptr [RDI + 0x4f0]
XOR EDX,EDX
BT dword ptr [RCX + 0x70],0x3
ADC EDX,0x7
XOR ESI,ESI
CALL qword ptr [RAX + 0x28]
TEST RAX,RAX
JZ 0x00120f6d
MOV RDI,qword ptr [RBX + 0x38]
MOV ECX,dword ptr [RBX + 0x60]
MOV RSI,RAX
MOV RDX,R14
XOR R8D,R8D
CALL 0x00117a18
MOV qword ptr [RBX + 0x58],RAX
TEST RAX,RAX
SETZ AL
JMP 0x00120f6f
LAB_00120f6d:
MOV AL,0x1
LAB_00120f6f:
POP RBX
POP R14
POP RBP
RET
|
bool mthd_stmt_get_result_metadata(long param_1)
{
int8 uVar1;
long lVar2;
bool bVar3;
uVar1 = *(int8 *)(param_1 + 0x340);
lVar2 = *(long *)(param_1 + 0x38);
lVar2 = (**(code **)(*(long *)(lVar2 + 0x4d0) + 0x28))
(lVar2,0,((*(uint *)(*(long *)(lVar2 + 0x4f0) + 0x70) >> 3 & 1) != 0) + '\a');
if (lVar2 == 0) {
bVar3 = true;
}
else {
lVar2 = unpack_fields(*(int8 *)(param_1 + 0x38),lVar2,uVar1,
*(int4 *)(param_1 + 0x60),0);
*(long *)(param_1 + 0x58) = lVar2;
bVar3 = lVar2 == 0;
}
return bVar3;
}
|
|
6,535 | minja::ExpressionNode::ExpressionNode(minja::Location const&, std::shared_ptr<minja::Expression>&&) | monkey531[P]llama/common/minja.hpp | ExpressionNode(const Location & location, std::shared_ptr<Expression> && e) : TemplateNode(location), expr(std::move(e)) {} | O2 | cpp | minja::ExpressionNode::ExpressionNode(minja::Location const&, std::shared_ptr<minja::Expression>&&):
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
callq 0x765b4
leaq 0x88490(%rip), %rax # 0x1012a8
addq $0x10, %rax
movq %rax, (%r14)
andq $0x0, 0x28(%r14)
movups (%rbx), %xmm0
andq $0x0, 0x8(%rbx)
movups %xmm0, 0x20(%r14)
andq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
| _ZN5minja14ExpressionNodeC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEE:
push r14
push rbx
push rax
mov rbx, rdx
mov r14, rdi
call _ZN5minja12TemplateNodeC2ERKNS_8LocationE; minja::TemplateNode::TemplateNode(minja::Location const&)
lea rax, _ZTVN5minja14ExpressionNodeE; `vtable for'minja::ExpressionNode
add rax, 10h
mov [r14], rax
and qword ptr [r14+28h], 0
movups xmm0, xmmword ptr [rbx]
and qword ptr [rbx+8], 0
movups xmmword ptr [r14+20h], xmm0
and qword ptr [rbx], 0
add rsp, 8
pop rbx
pop r14
retn
| long long * minja::ExpressionNode::ExpressionNode(long long a1, _QWORD *a2, __int128 *a3)
{
long long *result; // rax
__int128 v5; // xmm0
minja::TemplateNode::TemplateNode((_QWORD *)a1, a2);
result = &`vtable for'minja::ExpressionNode + 2;
*(_QWORD *)a1 = &`vtable for'minja::ExpressionNode + 2;
*(_QWORD *)(a1 + 40) = 0LL;
v5 = *a3;
*((_QWORD *)a3 + 1) = 0LL;
*(_OWORD *)(a1 + 32) = v5;
*(_QWORD *)a3 = 0LL;
return result;
}
| ExpressionNode:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RDI
CALL 0x001765b4
LEA RAX,[0x2012a8]
ADD RAX,0x10
MOV qword ptr [R14],RAX
AND qword ptr [R14 + 0x28],0x0
MOVUPS XMM0,xmmword ptr [RBX]
AND qword ptr [RBX + 0x8],0x0
MOVUPS xmmword ptr [R14 + 0x20],XMM0
AND qword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* minja::ExpressionNode::ExpressionNode(minja::Location const&,
std::shared_ptr<minja::Expression>&&) */
void __thiscall
minja::ExpressionNode::ExpressionNode(ExpressionNode *this,Location *param_1,shared_ptr *param_2)
{
int8 uVar1;
TemplateNode::TemplateNode((TemplateNode *)this,param_1);
*(int ***)this = &PTR_do_render_002012b8;
*(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;
return;
}
|
|
6,536 | minja::ExpressionNode::ExpressionNode(minja::Location const&, std::shared_ptr<minja::Expression>&&) | monkey531[P]llama/common/minja.hpp | ExpressionNode(const Location & location, std::shared_ptr<Expression> && e) : TemplateNode(location), expr(std::move(e)) {} | O3 | cpp | minja::ExpressionNode::ExpressionNode(minja::Location const&, std::shared_ptr<minja::Expression>&&):
pushq %rbx
movq %rdi, %rbx
leaq 0x8d7d3(%rip), %rax # 0x12f2a8
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x28(%rdi), %rdi
testq %rdi, %rdi
je 0xa1aea
callq 0x7140a
leaq 0x8d4d7(%rip), %rax # 0x12efc8
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xa1b06
callq 0x7140a
movl $0x30, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x1ba60
| _ZN5minja14ExpressionNodeD0Ev:
push rbx
mov rbx, rdi
lea rax, _ZTVN5minja14ExpressionNodeE; `vtable for'minja::ExpressionNode
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+28h]
test rdi, rdi
jz short loc_A1AEA
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A1AEA:
lea rax, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode
add rax, 10h
mov [rbx], rax
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_A1B06
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A1B06:
mov esi, 30h ; '0'; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
| void minja::ExpressionNode::~ExpressionNode(minja::ExpressionNode *this)
{
volatile signed __int32 *v2; // rdi
volatile signed __int32 *v3; // rdi
*(_QWORD *)this = &`vtable for'minja::ExpressionNode + 2;
v2 = (volatile signed __int32 *)*((_QWORD *)this + 5);
if ( v2 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2);
*(_QWORD *)this = &`vtable for'minja::TemplateNode + 2;
v3 = (volatile signed __int32 *)*((_QWORD *)this + 2);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
operator delete(this, 0x30uLL);
}
| ~ExpressionNode:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x22f2a8]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x28]
TEST RDI,RDI
JZ 0x001a1aea
CALL 0x0017140a
LAB_001a1aea:
LEA RAX,[0x22efc8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x10]
TEST RDI,RDI
JZ 0x001a1b06
CALL 0x0017140a
LAB_001a1b06:
MOV ESI,0x30
MOV RDI,RBX
POP RBX
JMP 0x0011ba60
|
/* minja::ExpressionNode::~ExpressionNode() */
void __thiscall minja::ExpressionNode::~ExpressionNode(ExpressionNode *this)
{
*(int ***)this = &PTR_do_render_0022f2b8;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28));
}
*(int ***)this = &PTR___cxa_pure_virtual_0022efd8;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10));
}
operator_delete(this,0x30);
return;
}
|
|
6,537 | maria_page_filler_set_bitmap | eloqsql/storage/maria/ma_pagecrc.c | my_bool maria_page_filler_set_bitmap(PAGECACHE_IO_HOOK_ARGS *args)
{
uchar *page= args->page;
MARIA_SHARE *share= (MARIA_SHARE *)args->data;
DBUG_ENTER("maria_page_filler_set_bitmap");
int4store_aligned(page + share->block_size - CRC_SIZE,
MARIA_NO_CRC_BITMAP_PAGE);
DBUG_RETURN(0);
} | O3 | c | maria_page_filler_set_bitmap:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
movq 0x10(%rdi), %rcx
movl 0x7bc(%rcx), %ecx
movl $0xfffffffe, -0x4(%rax,%rcx) # imm = 0xFFFFFFFE
xorl %eax, %eax
popq %rbp
retq
| maria_page_filler_set_bitmap:
push rbp
mov rbp, rsp
mov rax, [rdi]
mov rcx, [rdi+10h]
mov ecx, [rcx+7BCh]
mov dword ptr [rax+rcx-4], 0FFFFFFFEh
xor eax, eax
pop rbp
retn
| long long maria_page_filler_set_bitmap(_QWORD *a1)
{
*(_DWORD *)(*a1 + *(unsigned int *)(a1[2] + 1980LL) - 4LL) = -2;
return 0LL;
}
| maria_page_filler_set_bitmap:
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x10]
MOV ECX,dword ptr [RCX + 0x7bc]
MOV dword ptr [RAX + RCX*0x1 + -0x4],0xfffffffe
XOR EAX,EAX
POP RBP
RET
|
int8 maria_page_filler_set_bitmap(long *param_1)
{
*(int4 *)(*param_1 + -4 + (ulong)*(uint *)(param_1[2] + 0x7bc)) = 0xfffffffe;
return 0;
}
|
|
6,538 | bool minja::Value::get<bool>() const | monkey531[P]llama/common/./minja.hpp | T get() const {
if (is_primitive()) return primitive_.get<T>();
throw std::runtime_error("get<T> not defined for this value type: " + dump());
} | O0 | cpp | bool minja::Value::get<bool>() const:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq 0x60(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x9fe30
testb $0x1, %al
jne 0xd41ee
jmp 0xd4201
movq 0x8(%rsp), %rdi
addq $0x40, %rdi
callq 0xd43c0
addq $0x68, %rsp
retq
movb $0x1, 0x13(%rsp)
movl $0x10, %edi
callq 0x50540
movq 0x8(%rsp), %rsi
movq %rax, (%rsp)
leaq 0x20(%rsp), %rdi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x9feb0
jmp 0xd422c
leaq 0xf89ad(%rip), %rsi # 0x1ccbe0
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x7a6e0
jmp 0xd4244
movq (%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x50390
jmp 0xd4254
movq (%rsp), %rdi
movb $0x0, 0x13(%rsp)
movq 0x17fd4c(%rip), %rsi # 0x253fb0
movq 0x17fd0d(%rip), %rdx # 0x253f78
callq 0x508f0
jmp 0xd42d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
jmp 0xd42b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
jmp 0xd42aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x510c0
leaq 0x20(%rsp), %rdi
callq 0x510c0
testb $0x1, 0x13(%rsp)
jne 0xd42bd
jmp 0xd42c6
movq (%rsp), %rdi
callq 0x50c40
jmp 0xd42c8
movq 0x18(%rsp), %rdi
callq 0x50940
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZNK5minja5Value3getIiEET_v:
sub rsp, 68h
mov [rsp+68h+var_8], rdi
mov rdi, [rsp+68h+var_8]; this
mov [rsp+68h+var_60], rdi
call _ZNK5minja5Value12is_primitiveEv; minja::Value::is_primitive(void)
test al, 1
jnz short loc_D41EE
jmp short loc_D4201
loc_D41EE:
mov rdi, [rsp+68h+var_60]
add rdi, 40h ; '@'
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE3getIiiEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalIT_ELi0EEEvEE8get_implIT0_EtlNS0_6detail12priority_tagILj4EEEEEEv
add rsp, 68h
retn
loc_D4201:
mov [rsp+68h+var_55], 1
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rsi, [rsp+68h+var_60]
mov [rsp+68h+var_68], rax
lea rdi, [rsp+68h+var_48]
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
jmp short $+2
loc_D422C:
lea rsi, aGetTNotDefined; "get<T> not defined for this value type:"...
lea rdi, [rsp+68h+var_28]
lea rdx, [rsp+68h+var_48]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
jmp short $+2
loc_D4244:
mov rdi, [rsp+68h+var_68]
lea rsi, [rsp+68h+var_28]
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
jmp short $+2
loc_D4254:
mov rdi, [rsp+68h+var_68]; void *
mov [rsp+68h+var_55], 0
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
| long long minja::Value::get<int>(minja::Value *a1)
{
void *exception; // [rsp+0h] [rbp-68h]
_BYTE v3[32]; // [rsp+20h] [rbp-48h] BYREF
_BYTE v4[32]; // [rsp+40h] [rbp-28h] BYREF
minja::Value *v5; // [rsp+60h] [rbp-8h]
v5 = a1;
if ( (minja::Value::is_primitive(a1) & 1) == 0 )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v3, (long long)a1, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v4, (long long)"get<T> not defined for this value type: ", (long long)v3);
std::runtime_error::runtime_error(exception, v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::get<int,int>((char *)a1 + 64);
}
| get<int>:
SUB RSP,0x68
MOV qword ptr [RSP + 0x60],RDI
MOV RDI,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x0019fe30
TEST AL,0x1
JNZ 0x001d41ee
JMP 0x001d4201
LAB_001d41ee:
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x40
CALL 0x001d43c0
ADD RSP,0x68
RET
LAB_001d4201:
MOV byte ptr [RSP + 0x13],0x1
MOV EDI,0x10
CALL 0x00150540
MOV RSI,qword ptr [RSP + 0x8]
MOV qword ptr [RSP],RAX
LAB_001d4219:
LEA RDI,[RSP + 0x20]
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0019feb0
JMP 0x001d422c
LAB_001d422c:
LEA RSI,[0x2ccbe0]
LEA RDI,[RSP + 0x40]
LEA RDX,[RSP + 0x20]
CALL 0x0017a6e0
JMP 0x001d4244
LAB_001d4244:
MOV RDI,qword ptr [RSP]
LEA RSI,[RSP + 0x40]
CALL 0x00150390
JMP 0x001d4254
LAB_001d4254:
MOV RDI,qword ptr [RSP]
MOV byte ptr [RSP + 0x13],0x0
MOV RSI,qword ptr [0x00353fb0]
MOV RDX,qword ptr [0x00353f78]
CALL 0x001508f0
|
/* int minja::Value::get<int>() const */
int __thiscall minja::Value::get<int>(Value *this)
{
runtime_error *this_00;
uint uVar1;
int iVar2;
int1 local_48 [32];
string local_28 [32];
Value *local_8;
local_8 = this;
uVar1 = is_primitive(this);
if ((uVar1 & 1) == 0) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001d4219 to 001d4229 has its CatchHandler @ 001d4272 */
dump_abi_cxx11_((int)local_48,SUB81(this,0));
/* try { // try from 001d422c to 001d4241 has its CatchHandler @ 001d4282 */
std::operator+((char *)local_28,(string *)"get<T> not defined for this value type: ");
/* try { // try from 001d4244 to 001d426f has its CatchHandler @ 001d4292 */
std::runtime_error::runtime_error(this_00,local_28);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00353fb0,PTR__runtime_error_00353f78);
}
iVar2 = nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::get<int,int>((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 + 0x40));
return iVar2;
}
|
|
6,539 | bool minja::Value::get<bool>() const | monkey531[P]llama/common/./minja.hpp | T get() const {
if (is_primitive()) return primitive_.get<T>();
throw std::runtime_error("get<T> not defined for this value type: " + dump());
} | O1 | cpp | bool minja::Value::get<bool>() const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpq $0x0, 0x10(%rdi)
jne 0x53833
cmpq $0x0, 0x20(%r14)
jne 0x53833
cmpq $0x0, 0x30(%r14)
jne 0x53833
addq $0x40, %r14
movq %rsp, %rbx
movl $0x0, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x538ec
movl (%rbx), %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x18360
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x3f31a
leaq 0x67897(%rip), %rsi # 0xbb0f2
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0x322c7
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x18a80
xorl %ebp, %ebp
movq 0x9f771(%rip), %rsi # 0xf2ff0
movq 0x9f6fa(%rip), %rdx # 0xf2f80
movq %rbx, %rdi
callq 0x18b30
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x538b4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x538b4
movq %rax, %r14
movb $0x1, %bpl
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x538d7
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x538d7
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x538e4
movq %rbx, %rdi
callq 0x18500
movq %r14, %rdi
callq 0x18b90
| _ZNK5minja5Value3getIiEET_v:
push rbp
push r14
push rbx
sub rsp, 40h
mov r14, rdi
cmp qword ptr [rdi+10h], 0
jnz short loc_53833
cmp qword ptr [r14+20h], 0
jnz short loc_53833
cmp qword ptr [r14+30h], 0
jnz short loc_53833
add r14, 40h ; '@'
mov rbx, rsp
mov dword ptr [rbx], 0
mov rdi, r14
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
mov eax, [rbx]
add rsp, 40h
pop rbx
pop r14
pop rbp
retn
loc_53833:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+58h+var_38]
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aGetTNotDefined; "get<T> not defined for this value type:"...
mov rdi, rsp
lea rdx, [rsp+58h+var_38]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
mov rsi, rsp
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_538B4
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_538B4
mov r14, rax
mov bpl, 1
loc_538B4:
lea rax, [rsp+58h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_538D7
mov rsi, [rsp+58h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_538D7
mov r14, rax
mov bpl, 1
loc_538D7:
test bpl, bpl
jz short loc_538E4
mov rdi, rbx; void *
call ___cxa_free_exception
loc_538E4:
mov rdi, r14
call __Unwind_Resume
| long long minja::Value::get<int>(_QWORD *a1)
{
void *exception; // rbx
_DWORD v3[4]; // [rsp+0h] [rbp-58h] BYREF
_BYTE v4[16]; // [rsp+20h] [rbp-38h] BYREF
if ( a1[2] || a1[4] || a1[6] )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v4, (long long)a1, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v3, (long long)"get<T> not defined for this value type: ", (long long)v4);
std::runtime_error::runtime_error(exception, v3);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v3[0] = 0;
ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
a1 + 8,
v3);
return v3[0];
}
| get<int>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP qword ptr [RDI + 0x10],0x0
JNZ 0x00153833
CMP qword ptr [R14 + 0x20],0x0
JNZ 0x00153833
CMP qword ptr [R14 + 0x30],0x0
JNZ 0x00153833
ADD R14,0x40
MOV RBX,RSP
MOV dword ptr [RBX],0x0
MOV RDI,R14
MOV RSI,RBX
CALL 0x001538ec
MOV EAX,dword ptr [RBX]
ADD RSP,0x40
POP RBX
POP R14
POP RBP
RET
LAB_00153833:
MOV EDI,0x10
CALL 0x00118360
MOV RBX,RAX
LAB_00153840:
LEA RDI,[RSP + 0x20]
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0013f31a
LAB_00153854:
LEA RSI,[0x1bb0f2]
MOV RDI,RSP
LEA RDX,[RSP + 0x20]
CALL 0x001322c7
MOV BPL,0x1
LAB_0015386b:
MOV RSI,RSP
MOV RDI,RBX
CALL 0x00118a80
XOR EBP,EBP
MOV RSI,qword ptr [0x001f2ff0]
MOV RDX,qword ptr [0x001f2f80]
MOV RDI,RBX
CALL 0x00118b30
|
/* int minja::Value::get<int>() const */
int __thiscall minja::Value::get<int>(Value *this)
{
runtime_error *this_00;
int local_58 [8];
int1 local_38 [32];
if (((*(long *)(this + 0x10) == 0) && (*(long *)(this + 0x20) == 0)) &&
(*(long *)(this + 0x30) == 0)) {
local_58[0] = 0;
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(this + 0x40,local_58);
return local_58[0];
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00153840 to 00153853 has its CatchHandler @ 001538d1 */
dump_abi_cxx11_((int)local_38,SUB81(this,0));
/* try { // try from 00153854 to 00153867 has its CatchHandler @ 001538ae */
std::operator+((char *)local_58,(string *)"get<T> not defined for this value type: ");
/* try { // try from 0015386b to 0015388d has its CatchHandler @ 0015388e */
std::runtime_error::runtime_error(this_00,(string *)local_58);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_001f2ff0,PTR__runtime_error_001f2f80);
}
|
|
6,540 | bool minja::Value::get<bool>() const | monkey531[P]llama/common/./minja.hpp | T get() const {
if (is_primitive()) return primitive_.get<T>();
throw std::runtime_error("get<T> not defined for this value type: " + dump());
} | O2 | cpp | bool minja::Value::get<bool>() const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x3b604
testb %al, %al
je 0x3cc0f
addq $0x40, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3ce70
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x20390
movq %rax, %rbx
movq %rsp, %rdi
pushq $-0x1
popq %rdx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x3b614
leaq 0x5d4c1(%rip), %rsi # 0x9a0f2
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x30398
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x20aa0
xorl %ebp, %ebp
movq 0xa5391(%rip), %rsi # 0xe1fe8
movq 0xa5312(%rip), %rdx # 0xe1f70
movq %rbx, %rdi
callq 0x20b30
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x20d78
jmp 0x3cc7b
movq %rax, %r14
movb $0x1, %bpl
movq %rsp, %rdi
callq 0x20d78
testb %bpl, %bpl
jne 0x3cc8d
jmp 0x3cc95
movq %rax, %r14
movq %rbx, %rdi
callq 0x20520
movq %r14, %rdi
callq 0x20b90
nop
| _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v:
push rbp
push r14
push rbx
sub rsp, 40h
mov r14, rsi
mov rbx, rdi
mov rdi, rsi; this
call _ZNK5minja5Value12is_primitiveEv; minja::Value::is_primitive(void)
test al, al
jz short loc_3CC0F
add r14, 40h ; '@'
mov rdi, rbx
mov rsi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
mov rax, rbx
add rsp, 40h
pop rbx
pop r14
pop rbp
retn
loc_3CC0F:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, rsp
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, r14
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aGetTNotDefined; "get<T> not defined for this value type:"...
lea rdi, [rsp+58h+var_38]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+58h+var_38]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+58h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_3CC7B
mov r14, rax
mov bpl, 1
loc_3CC7B:
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_3CC8D
jmp short loc_3CC95
mov r14, rax
loc_3CC8D:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_3CC95:
mov rdi, r14
call __Unwind_Resume
| long long minja::Value::get<std::string>(long long a1, minja::Value *a2)
{
void *exception; // rbx
_BYTE v4[32]; // [rsp+0h] [rbp-58h] BYREF
_BYTE v5[56]; // [rsp+20h] [rbp-38h] BYREF
if ( !minja::Value::is_primitive(a2) )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v4, (long long)a2, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v5, (long long)"get<T> not defined for this value type: ", (long long)v4);
std::runtime_error::runtime_error(exception, v5);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
a1,
(char *)a2 + 64);
return a1;
}
| get<std::__cxx11::string>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RSI
MOV RBX,RDI
MOV RDI,RSI
CALL 0x0013b604
TEST AL,AL
JZ 0x0013cc0f
ADD R14,0x40
MOV RDI,RBX
MOV RSI,R14
CALL 0x0013ce70
MOV RAX,RBX
ADD RSP,0x40
POP RBX
POP R14
POP RBP
RET
LAB_0013cc0f:
PUSH 0x10
POP RDI
CALL 0x00120390
MOV RBX,RAX
LAB_0013cc1a:
MOV RDI,RSP
PUSH -0x1
POP RDX
MOV RSI,R14
XOR ECX,ECX
CALL 0x0013b614
LAB_0013cc2a:
LEA RSI,[0x19a0f2]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00130398
MOV BPL,0x1
LAB_0013cc41:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x00120aa0
XOR EBP,EBP
MOV RSI,qword ptr [0x001e1fe8]
MOV RDX,qword ptr [0x001e1f70]
MOV RDI,RBX
CALL 0x00120b30
|
/* std::__cxx11::string minja::Value::get<std::__cxx11::string >() const */
void minja::Value::get<std::__cxx11::string>(void)
{
char cVar1;
runtime_error *this;
Value *in_RSI;
int1 auStack_58 [32];
string local_38 [32];
cVar1 = is_primitive(in_RSI);
if (cVar1 != '\0') {
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
();
return;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0013cc1a to 0013cc29 has its CatchHandler @ 0013cc8a */
dump_abi_cxx11_((int)auStack_58,SUB81(in_RSI,0));
/* try { // try from 0013cc2a to 0013cc3d has its CatchHandler @ 0013cc75 */
std::operator+((char *)local_38,(string *)"get<T> not defined for this value type: ");
/* try { // try from 0013cc41 to 0013cc65 has its CatchHandler @ 0013cc66 */
std::runtime_error::runtime_error(this,local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_001e1fe8,PTR__runtime_error_001e1f70);
}
|
|
6,541 | bool minja::Value::get<bool>() const | monkey531[P]llama/common/./minja.hpp | T get() const {
if (is_primitive()) return primitive_.get<T>();
throw std::runtime_error("get<T> not defined for this value type: " + dump());
} | O3 | cpp | bool minja::Value::get<bool>() const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpq $0x0, 0x10(%rdi)
jne 0x3dbd8
cmpq $0x0, 0x20(%r14)
jne 0x3dbd8
cmpq $0x0, 0x30(%r14)
jne 0x3dbd8
addq $0x40, %r14
leaq 0x20(%rsp), %rbx
movq $0x0, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3f485
movsd (%rbx), %xmm0
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x18360
movq %rax, %rbx
movq %rsp, %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x3dcdc
leaq 0x7936c(%rip), %rsi # 0xb6f6a
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x30c3b
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x18a80
xorl %ebp, %ebp
movq 0xb23cc(%rip), %rsi # 0xefff0
movq 0xb2355(%rip), %rdx # 0xeff80
movq %rbx, %rdi
callq 0x18b30
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3dc51
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x186a0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3dc6c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x186a0
testb %bpl, %bpl
jne 0x3dc96
jmp 0x3dc9e
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3dc96
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x3dc96
movq %rax, %r14
movq %rbx, %rdi
callq 0x18500
movq %r14, %rdi
callq 0x18b90
| _ZNK5minja5Value3getIdEET_v:
push rbp
push r14
push rbx
sub rsp, 40h
mov r14, rdi
cmp qword ptr [rdi+10h], 0
jnz short loc_3DBD8
cmp qword ptr [r14+20h], 0
jnz short loc_3DBD8
cmp qword ptr [r14+30h], 0
jnz short loc_3DBD8
add r14, 40h ; '@'
lea rbx, [rsp+58h+var_38]
mov qword ptr [rbx], 0
mov rdi, r14
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
movsd xmm0, qword ptr [rbx]
add rsp, 40h
pop rbx
pop r14
pop rbp
retn
loc_3DBD8:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, rsp
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aGetTNotDefined; "get<T> not defined for this value type:"...
lea rdi, [rsp+58h+var_38]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+58h+var_38]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+58h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_3DC51
mov rsi, [rsp+58h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3DC51:
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_3DC6C
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3DC6C:
test bpl, bpl
jnz short loc_3DC96
jmp short loc_3DC9E
mov r14, rax
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_3DC96
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_3DC96
mov r14, rax
loc_3DC96:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_3DC9E:
mov rdi, r14
call __Unwind_Resume
| get<double>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP qword ptr [RDI + 0x10],0x0
JNZ 0x0013dbd8
CMP qword ptr [R14 + 0x20],0x0
JNZ 0x0013dbd8
CMP qword ptr [R14 + 0x30],0x0
JNZ 0x0013dbd8
ADD R14,0x40
LEA RBX,[RSP + 0x20]
MOV qword ptr [RBX],0x0
MOV RDI,R14
MOV RSI,RBX
CALL 0x0013f485
MOVSD XMM0,qword ptr [RBX]
ADD RSP,0x40
POP RBX
POP R14
POP RBP
RET
LAB_0013dbd8:
MOV EDI,0x10
CALL 0x00118360
MOV RBX,RAX
LAB_0013dbe5:
MOV RDI,RSP
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0013dcdc
LAB_0013dbf7:
LEA RSI,[0x1b6f6a]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00130c3b
MOV BPL,0x1
LAB_0013dc0e:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x00118a80
XOR EBP,EBP
MOV RSI,qword ptr [0x001efff0]
MOV RDX,qword ptr [0x001eff80]
MOV RDI,RBX
CALL 0x00118b30
|
/* double minja::Value::get<double>() const */
double __thiscall minja::Value::get<double>(Value *this)
{
runtime_error *this_00;
int1 auStack_58 [32];
double local_38 [4];
if (((*(long *)(this + 0x10) == 0) && (*(long *)(this + 0x20) == 0)) &&
(*(long *)(this + 0x30) == 0)) {
local_38[0] = 0.0;
_ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(this + 0x40,local_38);
return local_38[0];
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0013dbe5 to 0013dbf6 has its CatchHandler @ 0013dc93 */
dump_abi_cxx11_((int)auStack_58,SUB81(this,0));
/* try { // try from 0013dbf7 to 0013dc0a has its CatchHandler @ 0013dc73 */
std::operator+((char *)local_38,(string *)"get<T> not defined for this value type: ");
/* try { // try from 0013dc0e to 0013dc32 has its CatchHandler @ 0013dc33 */
std::runtime_error::runtime_error(this_00,(string *)local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_001efff0,PTR__runtime_error_001eff80);
}
|
||
6,542 | my_snprintf_mb2 | eloqsql/strings/ctype-ucs2.c | static size_t
my_snprintf_mb2(CHARSET_INFO *cs __attribute__((unused)),
char* to, size_t n, const char* fmt, ...)
{
size_t ret;
va_list args;
va_start(args,fmt);
ret= my_vsnprintf_mb2(to, n, fmt, args);
va_end(args);
return ret;
} | O0 | c | my_snprintf_mb2:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
testb %al, %al
je 0x6afeb
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
movq %r9, -0xc8(%rbp)
movq %r8, -0xd0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq -0xf0(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x30, -0x3c(%rbp)
movl $0x20, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x40(%rbp), %rcx
callq 0x6e460
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
| my_snprintf_mb2:
push rbp
mov rbp, rsp
sub rsp, 0F0h
test al, al
jz short loc_6AFEB
movaps [rbp+var_C0], xmm0
movaps [rbp+var_B0], xmm1
movaps [rbp+var_A0], xmm2
movaps [rbp+var_90], xmm3
movaps [rbp+var_80], xmm4
movaps [rbp+var_70], xmm5
movaps [rbp+var_60], xmm6
movaps [rbp+var_50], xmm7
loc_6AFEB:
mov [rbp+var_C8], r9
mov [rbp+var_D0], r8
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
lea rax, [rbp+var_F0]
mov [rbp+var_30], rax
lea rax, [rbp+arg_0]
mov [rbp+var_38], rax
mov [rbp+var_3C], 30h ; '0'
mov [rbp+var_40], 20h ; ' '
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
lea rcx, [rbp+var_40]
call my_vsnprintf_mb2
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
add rsp, 0F0h
pop rbp
retn
| long long my_snprintf_mb2(
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)
{
char v16; // [rsp+0h] [rbp-F0h] BYREF
long long v17; // [rsp+20h] [rbp-D0h]
long long v18; // [rsp+28h] [rbp-C8h]
__m128 v19; // [rsp+30h] [rbp-C0h]
__m128 v20; // [rsp+40h] [rbp-B0h]
__m128 v21; // [rsp+50h] [rbp-A0h]
__m128 v22; // [rsp+60h] [rbp-90h]
__m128 v23; // [rsp+70h] [rbp-80h]
__m128 v24; // [rsp+80h] [rbp-70h]
__m128 v25; // [rsp+90h] [rbp-60h]
__m128 v26; // [rsp+A0h] [rbp-50h]
_DWORD v27[2]; // [rsp+B0h] [rbp-40h] BYREF
char *v28; // [rsp+B8h] [rbp-38h]
char *v29; // [rsp+C0h] [rbp-30h]
long long v30; // [rsp+D0h] [rbp-20h]
long long v31; // [rsp+D8h] [rbp-18h]
long long v32; // [rsp+E0h] [rbp-10h]
long long v33; // [rsp+E8h] [rbp-8h]
v19 = a7;
v20 = a8;
v21 = a9;
v22 = a10;
v23 = a11;
v24 = a12;
v25 = a13;
v26 = a14;
v18 = a6;
v17 = a5;
v33 = a1;
v32 = a2;
v31 = a3;
v30 = a4;
v29 = &v16;
v28 = &a15;
v27[1] = 48;
v27[0] = 32;
return my_vsnprintf_mb2(a2, a3, a4, v27);
}
| my_snprintf_mb2:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xf0
TEST AL,AL
JZ 0x0016afeb
MOVAPS xmmword ptr [RBP + -0xc0],XMM0
MOVAPS xmmword ptr [RBP + -0xb0],XMM1
MOVAPS xmmword ptr [RBP + -0xa0],XMM2
MOVAPS xmmword ptr [RBP + -0x90],XMM3
MOVAPS xmmword ptr [RBP + -0x80],XMM4
MOVAPS xmmword ptr [RBP + -0x70],XMM5
MOVAPS xmmword ptr [RBP + -0x60],XMM6
MOVAPS xmmword ptr [RBP + -0x50],XMM7
LAB_0016afeb:
MOV qword ptr [RBP + -0xc8],R9
MOV qword ptr [RBP + -0xd0],R8
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
LEA RAX,[RBP + -0xf0]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV dword ptr [RBP + -0x3c],0x30
MOV dword ptr [RBP + -0x40],0x20
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
LEA RCX,[RBP + -0x40]
CALL 0x0016e460
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RSP,0xf0
POP RBP
RET
|
int8
my_snprintf_mb2(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
int8 uVar1;
int1 local_f8 [32];
int8 local_d8;
int8 local_d0;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int4 local_48;
int4 local_44;
int1 *local_40;
int1 *local_38;
int8 local_28;
int8 local_20;
int8 local_18;
int8 local_10;
if (in_AL != '\0') {
local_c8 = param_1;
local_b8 = param_2;
local_a8 = param_3;
local_98 = param_4;
local_88 = param_5;
local_78 = param_6;
local_68 = param_7;
local_58 = param_8;
}
local_38 = local_f8;
local_40 = &stack0x00000008;
local_44 = 0x30;
local_48 = 0x20;
local_d8 = param_13;
local_d0 = param_14;
local_28 = param_12;
local_20 = param_11;
local_18 = param_10;
local_10 = param_9;
uVar1 = my_vsnprintf_mb2(param_10,param_11,param_12,&local_48);
return uVar1;
}
|
|
6,543 | my_snprintf_mb2 | eloqsql/strings/ctype-ucs2.c | static size_t
my_snprintf_mb2(CHARSET_INFO *cs __attribute__((unused)),
char* to, size_t n, const char* fmt, ...)
{
size_t ret;
va_list args;
va_start(args,fmt);
ret= my_vsnprintf_mb2(to, n, fmt, args);
va_end(args);
return ret;
} | O3 | c | my_snprintf_mb2:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rcx, %r15
movq %rsi, %r14
leaq -0x120(%rbp), %rcx
movq %r8, 0x20(%rcx)
movq %r9, 0x28(%rcx)
testb %al, %al
je 0x4db6c
movaps %xmm0, -0xf0(%rbp)
movaps %xmm1, -0xe0(%rbp)
movaps %xmm2, -0xd0(%rbp)
movaps %xmm3, -0xc0(%rbp)
movaps %xmm4, -0xb0(%rbp)
movaps %xmm5, -0xa0(%rbp)
movaps %xmm6, -0x90(%rbp)
movaps %xmm7, -0x80(%rbp)
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq %rcx, -0x50(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movabsq $0x3000000020, %rax # imm = 0x3000000020
movq %rax, -0x60(%rbp)
leaq (%rsi,%rdx), %rbx
decq %rbx
leaq -0x40(%rbp), %r12
movq %rsi, -0x68(%rbp)
movzbl (%r15), %eax
cmpl $0x25, %eax
je 0x4dbd0
testl %eax, %eax
je 0x4dd36
cmpq %rbx, %r14
je 0x4dd33
movb $0x0, (%r14)
movb (%r15), %al
movb %al, 0x1(%r14)
addq $0x2, %r14
incq %r15
jmp 0x4dba2
addq $0x2, %r15
movb -0x1(%r15), %al
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
jb 0x4dbeb
movzbl %al, %ecx
leal -0x2d(%rcx), %edx
cmpl $0x2, %edx
jae 0x4dbf0
incq %r15
jmp 0x4dbd4
cmpl $0x6c, %ecx
jne 0x4dbfa
movb (%r15), %al
jmp 0x4dbfd
decq %r15
cmpb $0x64, %al
je 0x4dc2d
movzbl %al, %eax
cmpl $0x75, %eax
je 0x4dc2d
cmpl $0x73, %eax
jne 0x4dc55
movl -0x60(%rbp), %ecx
cmpq $0x28, %rcx
ja 0x4dcc2
movq %rcx, %rax
addq -0x50(%rbp), %rax
addl $0x8, %ecx
movl %ecx, -0x60(%rbp)
jmp 0x4dcce
movq %rbx, %rax
subq %r14, %rax
cmpq $0x1f, %rax
jbe 0x4dd36
movl -0x60(%rbp), %ecx
cmpq $0x28, %rcx
ja 0x4dc69
movq %rcx, %rax
addq -0x50(%rbp), %rax
addl $0x8, %ecx
movl %ecx, -0x60(%rbp)
jmp 0x4dc75
cmpq %rbx, %r14
je 0x4dd33
movw $0x2500, (%r14) # imm = 0x2500
jmp 0x4dbc7
movq -0x58(%rbp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, -0x58(%rbp)
movslq (%rax), %rdi
cmpb $0x64, (%r15)
jne 0x4dc88
movq %r12, %rsi
movl $0xfffffff6, %edx # imm = 0xFFFFFFF6
jmp 0x4dc92
movl %edi, %edi
movq %r12, %rsi
movl $0xa, %edx
callq 0x6022e
cmpb $0x0, -0x40(%rbp)
je 0x4dbcb
leaq -0x3f(%rbp), %rax
movb $0x0, (%r14)
movb -0x1(%rax), %cl
movb %cl, 0x1(%r14)
addq $0x2, %r14
cmpb $0x0, (%rax)
leaq 0x1(%rax), %rax
jne 0x4dca5
jmp 0x4dbcb
movq -0x58(%rbp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, -0x58(%rbp)
movq (%rax), %r13
movq %rbx, %r12
subq %r14, %r12
testq %r13, %r13
leaq 0x19429(%rip), %rax # 0x6710a
cmoveq %rax, %r13
movq %r13, %rdi
callq 0x24140
leaq (%rax,%rax), %rdx
movq %r12, %rcx
shrq %rcx
decq %rcx
cmpq %rdx, %r12
cmovaq %rax, %rcx
testq %rcx, %rcx
je 0x4dd2a
xorl %eax, %eax
leaq -0x40(%rbp), %r12
movb $0x0, (%r14)
movb (%r13,%rax), %dl
movb %dl, 0x1(%r14)
addq $0x2, %r14
incq %rax
cmpq %rax, %rcx
jne 0x4dd0c
jmp 0x4dbcb
leaq -0x40(%rbp), %r12
jmp 0x4dbcb
movq %rbx, %r14
movb $0x0, (%r14)
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x4dd62
subq -0x68(%rbp), %r14
movq %r14, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x24400
| my_snprintf_mb2:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0F8h
mov r15, rcx
mov r14, rsi
lea rcx, [rbp+var_120]
mov [rcx+20h], r8
mov [rcx+28h], r9
test al, al
jz short loc_4DB6C
movaps [rbp+var_F0], xmm0
movaps [rbp+var_E0], xmm1
movaps [rbp+var_D0], xmm2
movaps [rbp+var_C0], xmm3
movaps [rbp+var_B0], xmm4
movaps [rbp+var_A0], xmm5
movaps [rbp+var_90], xmm6
movaps [rbp+var_80], xmm7
loc_4DB6C:
mov rax, fs:28h
mov [rbp+var_30], rax
mov [rbp+var_50], rcx
lea rax, [rbp+arg_0]
mov [rbp+var_58], rax
mov rax, 3000000020h
mov [rbp+var_60], rax
lea rbx, [rsi+rdx]
dec rbx
lea r12, [rbp+var_40]
mov [rbp+var_68], rsi
loc_4DBA2:
movzx eax, byte ptr [r15]
cmp eax, 25h ; '%'
jz short loc_4DBD0
test eax, eax
jz loc_4DD36
cmp r14, rbx
jz loc_4DD33
mov byte ptr [r14], 0
mov al, [r15]
mov [r14+1], al
loc_4DBC7:
add r14, 2
loc_4DBCB:
inc r15
jmp short loc_4DBA2
loc_4DBD0:
add r15, 2
loc_4DBD4:
mov al, [r15-1]
lea ecx, [rax-30h]
cmp cl, 0Ah
jb short loc_4DBEB
movzx ecx, al
lea edx, [rcx-2Dh]
cmp edx, 2
jnb short loc_4DBF0
loc_4DBEB:
inc r15
jmp short loc_4DBD4
loc_4DBF0:
cmp ecx, 6Ch ; 'l'
jnz short loc_4DBFA
mov al, [r15]
jmp short loc_4DBFD
loc_4DBFA:
dec r15
loc_4DBFD:
cmp al, 64h ; 'd'
jz short loc_4DC2D
movzx eax, al
cmp eax, 75h ; 'u'
jz short loc_4DC2D
cmp eax, 73h ; 's'
jnz short loc_4DC55
mov ecx, dword ptr [rbp+var_60]
cmp rcx, 28h ; '('
ja loc_4DCC2
mov rax, rcx
add rax, [rbp+var_50]
add ecx, 8
mov dword ptr [rbp+var_60], ecx
jmp loc_4DCCE
loc_4DC2D:
mov rax, rbx
sub rax, r14
cmp rax, 1Fh
jbe loc_4DD36
mov ecx, dword ptr [rbp+var_60]
cmp rcx, 28h ; '('
ja short loc_4DC69
mov rax, rcx
add rax, [rbp+var_50]
add ecx, 8
mov dword ptr [rbp+var_60], ecx
jmp short loc_4DC75
loc_4DC55:
cmp r14, rbx
jz loc_4DD33
mov word ptr [r14], 2500h
jmp loc_4DBC7
loc_4DC69:
mov rax, [rbp+var_58]
lea rcx, [rax+8]
mov [rbp+var_58], rcx
loc_4DC75:
movsxd rdi, dword ptr [rax]
cmp byte ptr [r15], 64h ; 'd'
jnz short loc_4DC88
mov rsi, r12
mov edx, 0FFFFFFF6h
jmp short loc_4DC92
loc_4DC88:
mov edi, edi
mov rsi, r12
mov edx, 0Ah
loc_4DC92:
call int10_to_str
cmp [rbp+var_40], 0
jz loc_4DBCB
lea rax, [rbp+var_3F]
loc_4DCA5:
mov byte ptr [r14], 0
mov cl, [rax-1]
mov [r14+1], cl
add r14, 2
cmp byte ptr [rax], 0
lea rax, [rax+1]
jnz short loc_4DCA5
jmp loc_4DBCB
loc_4DCC2:
mov rax, [rbp+var_58]
lea rcx, [rax+8]
mov [rbp+var_58], rcx
loc_4DCCE:
mov r13, [rax]
mov r12, rbx
sub r12, r14
test r13, r13
lea rax, aNull; "(null)"
cmovz r13, rax
mov rdi, r13
call _strlen
lea rdx, [rax+rax]
mov rcx, r12
shr rcx, 1
dec rcx
cmp r12, rdx
cmova rcx, rax
test rcx, rcx
jz short loc_4DD2A
xor eax, eax
lea r12, [rbp+var_40]
loc_4DD0C:
mov byte ptr [r14], 0
mov dl, [r13+rax+0]
mov [r14+1], dl
add r14, 2
inc rax
cmp rcx, rax
jnz short loc_4DD0C
jmp loc_4DBCB
loc_4DD2A:
lea r12, [rbp+var_40]
jmp loc_4DBCB
loc_4DD33:
mov r14, rbx
loc_4DD36:
mov byte ptr [r14], 0
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_4DD62
sub r14, [rbp+var_68]
mov rax, r14
add rsp, 0F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4DD62:
call ___stack_chk_fail
| _BYTE * my_snprintf_mb2(
__m128 a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
long long a9,
_BYTE *a10,
long long a11,
unsigned __int8 *a12,
long long a13,
long long a14,
char a15)
{
_BYTE *v16; // r14
long long v17; // rbx
unsigned __int8 v18; // al
const char **v19; // rax
char *v20; // rax
long long v21; // rdi
long long v22; // rdx
char *v23; // rax
const char *v25; // r13
unsigned long long v26; // r12
long long v27; // rax
long long v28; // rcx
long long i; // rax
char v31; // [rsp+0h] [rbp-120h] BYREF
long long v32; // [rsp+20h] [rbp-100h]
long long v33; // [rsp+28h] [rbp-F8h]
__m128 v34; // [rsp+30h] [rbp-F0h]
__m128 v35; // [rsp+40h] [rbp-E0h]
__m128 v36; // [rsp+50h] [rbp-D0h]
__m128 v37; // [rsp+60h] [rbp-C0h]
__m128 v38; // [rsp+70h] [rbp-B0h]
__m128 v39; // [rsp+80h] [rbp-A0h]
__m128 v40; // [rsp+90h] [rbp-90h]
__m128 v41; // [rsp+A0h] [rbp-80h]
_BYTE *v42; // [rsp+B8h] [rbp-68h]
long long v43; // [rsp+C0h] [rbp-60h]
char *v44; // [rsp+C8h] [rbp-58h]
char *v45; // [rsp+D0h] [rbp-50h]
char v46; // [rsp+E0h] [rbp-40h] BYREF
char v47; // [rsp+E1h] [rbp-3Fh] BYREF
unsigned long long v48; // [rsp+F0h] [rbp-30h]
v34 = a1;
v35 = a2;
v36 = a3;
v37 = a4;
v38 = a5;
v39 = a6;
v40 = a7;
v41 = a8;
v16 = a10;
v32 = a13;
v33 = a14;
v48 = __readfsqword(0x28u);
v45 = &v31;
v44 = &a15;
v43 = 0x3000000020LL;
v17 = (long long)&a10[a11 - 1];
v42 = a10;
while ( *a12 == 37 )
{
for ( a12 += 2; ; ++a12 )
{
v18 = *(a12 - 1);
if ( (unsigned __int8)(v18 - 48) >= 0xAu && (unsigned int)v18 - 45 >= 2 )
break;
}
if ( v18 == 108 )
v18 = *a12;
else
--a12;
if ( v18 == 100 || v18 == 117 )
{
if ( (unsigned long long)(v17 - (_QWORD)v16) <= 0x1F )
goto LABEL_44;
if ( (unsigned int)v43 > 0x28uLL )
{
v20 = v44;
v44 += 8;
}
else
{
v20 = &v45[(unsigned int)v43];
LODWORD(v43) = v43 + 8;
}
v21 = *(int *)v20;
if ( *a12 == 100 )
{
v22 = 4294967286LL;
}
else
{
v21 = (unsigned int)v21;
v22 = 10LL;
}
int10_to_str(v21, &v46, v22);
if ( v46 )
{
v23 = &v47;
do
{
*v16 = 0;
v16[1] = *(v23 - 1);
v16 += 2;
}
while ( *v23++ != 0 );
}
}
else
{
if ( v18 != 115 )
{
if ( v16 == (_BYTE *)v17 )
goto LABEL_43;
*(_WORD *)v16 = 9472;
goto LABEL_6;
}
if ( (unsigned int)v43 > 0x28uLL )
{
v19 = (const char **)v44;
v44 += 8;
}
else
{
v19 = (const char **)&v45[(unsigned int)v43];
LODWORD(v43) = v43 + 8;
}
v25 = *v19;
v26 = v17 - (_QWORD)v16;
if ( !*v19 )
v25 = "(null)";
v27 = strlen(v25);
v28 = (v26 >> 1) - 1;
if ( v26 > 2 * v27 )
v28 = v27;
if ( v28 )
{
for ( i = 0LL; i != v28; ++i )
{
*v16 = 0;
v16[1] = v25[i];
v16 += 2;
}
}
}
LABEL_7:
++a12;
}
if ( !*a12 )
goto LABEL_44;
if ( v16 != (_BYTE *)v17 )
{
*v16 = 0;
v16[1] = *a12;
LABEL_6:
v16 += 2;
goto LABEL_7;
}
LABEL_43:
v16 = (_BYTE *)v17;
LABEL_44:
*v16 = 0;
return (_BYTE *)(v16 - v42);
}
| my_snprintf_mb2:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xf8
MOV R15,RCX
MOV R14,RSI
LEA RCX,[RBP + -0x120]
MOV qword ptr [RCX + 0x20],R8
MOV qword ptr [RCX + 0x28],R9
TEST AL,AL
JZ 0x0014db6c
MOVAPS xmmword ptr [RBP + -0xf0],XMM0
MOVAPS xmmword ptr [RBP + -0xe0],XMM1
MOVAPS xmmword ptr [RBP + -0xd0],XMM2
MOVAPS xmmword ptr [RBP + -0xc0],XMM3
MOVAPS xmmword ptr [RBP + -0xb0],XMM4
MOVAPS xmmword ptr [RBP + -0xa0],XMM5
MOVAPS xmmword ptr [RBP + -0x90],XMM6
MOVAPS xmmword ptr [RBP + -0x80],XMM7
LAB_0014db6c:
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0x50],RCX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,0x3000000020
MOV qword ptr [RBP + -0x60],RAX
LEA RBX,[RSI + RDX*0x1]
DEC RBX
LEA R12,[RBP + -0x40]
MOV qword ptr [RBP + -0x68],RSI
LAB_0014dba2:
MOVZX EAX,byte ptr [R15]
CMP EAX,0x25
JZ 0x0014dbd0
TEST EAX,EAX
JZ 0x0014dd36
CMP R14,RBX
JZ 0x0014dd33
MOV byte ptr [R14],0x0
MOV AL,byte ptr [R15]
MOV byte ptr [R14 + 0x1],AL
LAB_0014dbc7:
ADD R14,0x2
LAB_0014dbcb:
INC R15
JMP 0x0014dba2
LAB_0014dbd0:
ADD R15,0x2
LAB_0014dbd4:
MOV AL,byte ptr [R15 + -0x1]
LEA ECX,[RAX + -0x30]
CMP CL,0xa
JC 0x0014dbeb
MOVZX ECX,AL
LEA EDX,[RCX + -0x2d]
CMP EDX,0x2
JNC 0x0014dbf0
LAB_0014dbeb:
INC R15
JMP 0x0014dbd4
LAB_0014dbf0:
CMP ECX,0x6c
JNZ 0x0014dbfa
MOV AL,byte ptr [R15]
JMP 0x0014dbfd
LAB_0014dbfa:
DEC R15
LAB_0014dbfd:
CMP AL,0x64
JZ 0x0014dc2d
MOVZX EAX,AL
CMP EAX,0x75
JZ 0x0014dc2d
CMP EAX,0x73
JNZ 0x0014dc55
MOV ECX,dword ptr [RBP + -0x60]
CMP RCX,0x28
JA 0x0014dcc2
MOV RAX,RCX
ADD RAX,qword ptr [RBP + -0x50]
ADD ECX,0x8
MOV dword ptr [RBP + -0x60],ECX
JMP 0x0014dcce
LAB_0014dc2d:
MOV RAX,RBX
SUB RAX,R14
CMP RAX,0x1f
JBE 0x0014dd36
MOV ECX,dword ptr [RBP + -0x60]
CMP RCX,0x28
JA 0x0014dc69
MOV RAX,RCX
ADD RAX,qword ptr [RBP + -0x50]
ADD ECX,0x8
MOV dword ptr [RBP + -0x60],ECX
JMP 0x0014dc75
LAB_0014dc55:
CMP R14,RBX
JZ 0x0014dd33
MOV word ptr [R14],0x2500
JMP 0x0014dbc7
LAB_0014dc69:
MOV RAX,qword ptr [RBP + -0x58]
LEA RCX,[RAX + 0x8]
MOV qword ptr [RBP + -0x58],RCX
LAB_0014dc75:
MOVSXD RDI,dword ptr [RAX]
CMP byte ptr [R15],0x64
JNZ 0x0014dc88
MOV RSI,R12
MOV EDX,0xfffffff6
JMP 0x0014dc92
LAB_0014dc88:
MOV EDI,EDI
MOV RSI,R12
MOV EDX,0xa
LAB_0014dc92:
CALL 0x0016022e
CMP byte ptr [RBP + -0x40],0x0
JZ 0x0014dbcb
LEA RAX,[RBP + -0x3f]
LAB_0014dca5:
MOV byte ptr [R14],0x0
MOV CL,byte ptr [RAX + -0x1]
MOV byte ptr [R14 + 0x1],CL
ADD R14,0x2
CMP byte ptr [RAX],0x0
LEA RAX,[RAX + 0x1]
JNZ 0x0014dca5
JMP 0x0014dbcb
LAB_0014dcc2:
MOV RAX,qword ptr [RBP + -0x58]
LEA RCX,[RAX + 0x8]
MOV qword ptr [RBP + -0x58],RCX
LAB_0014dcce:
MOV R13,qword ptr [RAX]
MOV R12,RBX
SUB R12,R14
TEST R13,R13
LEA RAX,[0x16710a]
CMOVZ R13,RAX
MOV RDI,R13
CALL 0x00124140
LEA RDX,[RAX + RAX*0x1]
MOV RCX,R12
SHR RCX,0x1
DEC RCX
CMP R12,RDX
CMOVA RCX,RAX
TEST RCX,RCX
JZ 0x0014dd2a
XOR EAX,EAX
LEA R12,[RBP + -0x40]
LAB_0014dd0c:
MOV byte ptr [R14],0x0
MOV DL,byte ptr [R13 + RAX*0x1]
MOV byte ptr [R14 + 0x1],DL
ADD R14,0x2
INC RAX
CMP RCX,RAX
JNZ 0x0014dd0c
JMP 0x0014dbcb
LAB_0014dd2a:
LEA R12,[RBP + -0x40]
JMP 0x0014dbcb
LAB_0014dd33:
MOV R14,RBX
LAB_0014dd36:
MOV byte ptr [R14],0x0
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0014dd62
SUB R14,qword ptr [RBP + -0x68]
MOV RAX,R14
ADD RSP,0xf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014dd62:
CALL 0x00124400
|
long my_snprintf_mb2(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int2 *param_10,long param_11,byte *param_12,
int8 param_13,int8 param_14)
{
char in_AL;
byte bVar1;
uint *puVar2;
size_t sVar3;
size_t sVar4;
int8 uVar5;
int2 *puVar6;
ulong uVar7;
char *pcVar8;
int2 *puVar9;
long in_FS_OFFSET;
int1 local_128 [32];
int8 local_108;
int8 local_100;
int8 local_f8;
int8 local_e8;
int8 local_d8;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int2 *local_70;
ulong local_68;
uint *local_60;
int1 *local_58;
char local_48 [16];
long local_38;
local_58 = local_128;
if (in_AL != '\0') {
local_f8 = param_1;
local_e8 = param_2;
local_d8 = param_3;
local_c8 = param_4;
local_b8 = param_5;
local_a8 = param_6;
local_98 = param_7;
local_88 = param_8;
}
local_38 = *(long *)(in_FS_OFFSET + 0x28);
local_60 = (uint *)&stack0x00000008;
local_68 = 0x3000000020;
puVar6 = (int2 *)((long)param_10 + param_11 + -1);
local_108 = param_13;
local_100 = param_14;
local_70 = param_10;
do {
puVar9 = param_10;
if (*param_12 == 0x25) {
param_12 = param_12 + 2;
while ((bVar1 = param_12[-1], (byte)(bVar1 - 0x30) < 10 || (bVar1 - 0x2d < 2))) {
param_12 = param_12 + 1;
}
if (bVar1 == 0x6c) {
bVar1 = *param_12;
}
else {
param_12 = param_12 + -1;
}
if ((bVar1 == 100) || (bVar1 == 0x75)) {
if ((ulong)((long)puVar6 - (long)param_10) < 0x20) {
LAB_0014dd36:
*(int1 *)puVar9 = 0;
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return (long)puVar9 - (long)local_70;
}
uVar7 = local_68 & 0xffffffff;
if (uVar7 < 0x29) {
local_68 = CONCAT44(local_68._4_4_,(int)local_68 + 8);
puVar2 = (uint *)(local_58 + uVar7);
}
else {
puVar2 = local_60;
local_60 = local_60 + 2;
}
uVar7 = (ulong)(int)*puVar2;
if (*param_12 == 100) {
uVar5 = 0xfffffff6;
}
else {
uVar7 = (ulong)*puVar2;
uVar5 = 10;
}
int10_to_str(uVar7,local_48,uVar5);
if (local_48[0] != '\0') {
pcVar8 = local_48;
do {
pcVar8 = pcVar8 + 1;
*(int1 *)param_10 = 0;
*(char *)((long)param_10 + 1) = pcVar8[-1];
param_10 = param_10 + 1;
} while (*pcVar8 != '\0');
}
}
else {
if (bVar1 != 0x73) {
puVar9 = puVar6;
if (param_10 != puVar6) {
*param_10 = 0x2500;
goto LAB_0014dbc7;
}
goto LAB_0014dd36;
}
uVar7 = local_68 & 0xffffffff;
if (uVar7 < 0x29) {
local_68 = CONCAT44(local_68._4_4_,(int)local_68 + 8);
puVar2 = (uint *)(local_58 + uVar7);
}
else {
puVar2 = local_60;
local_60 = local_60 + 2;
}
pcVar8 = *(char **)puVar2;
if (pcVar8 == (char *)0x0) {
pcVar8 = "(null)";
}
sVar3 = strlen(pcVar8);
sVar4 = ((ulong)((long)puVar6 - (long)param_10) >> 1) - 1;
if (sVar3 * 2 < (ulong)((long)puVar6 - (long)param_10)) {
sVar4 = sVar3;
}
if (sVar4 != 0) {
sVar3 = 0;
do {
*(int1 *)param_10 = 0;
*(char *)((long)param_10 + 1) = pcVar8[sVar3];
param_10 = param_10 + 1;
sVar3 = sVar3 + 1;
} while (sVar4 != sVar3);
}
}
}
else {
if ((*param_12 == 0) || (puVar9 = puVar6, param_10 == puVar6)) goto LAB_0014dd36;
*(int1 *)param_10 = 0;
*(byte *)((long)param_10 + 1) = *param_12;
LAB_0014dbc7:
param_10 = param_10 + 1;
}
param_12 = param_12 + 1;
} while( true );
}
|
|
6,544 | ma_cmp_dynamic_record | eloqsql/storage/maria/ma_dynrec.c | my_bool _ma_cmp_dynamic_record(register MARIA_HA *info,
register const uchar *record)
{
uint flag, reclength, b_type,cmp_length;
my_off_t filepos;
uchar *buffer;
MARIA_BLOCK_INFO block_info;
my_bool error= 1, buff_alloced= 0;
size_t UNINIT_VAR(buffer_length);
DBUG_ENTER("_ma_cmp_dynamic_record");
if (info->opt_flag & WRITE_CACHE_USED)
{
info->update&= ~(HA_STATE_WRITE_AT_END | HA_STATE_EXTEND_BLOCK);
if (flush_io_cache(&info->rec_cache))
DBUG_RETURN(1);
}
info->rec_cache.seek_not_done=1;
/* If nobody have touched the database we don't have to test rec */
buffer=info->rec_buff;
if ((info->opt_flag & READ_CHECK_USED))
{ /* If check isn't disabled */
if (info->s->base.blobs)
{
buffer_length= (info->s->base.pack_reclength +
_ma_calc_total_blob_length(info,record));
alloc_on_stack(*info->stack_end_ptr, buffer, buff_alloced, buffer_length);
if (!buffer)
DBUG_RETURN(1);
}
if (!(reclength= _ma_rec_pack(info,buffer,record)))
goto err;
record= buffer;
filepos= info->cur_row.lastpos;
flag=block_info.second_read=0;
block_info.next_filepos=filepos;
while (reclength > 0)
{
if ((b_type= _ma_get_block_info(info, &block_info, info->dfile.file,
block_info.next_filepos))
& (BLOCK_DELETED | BLOCK_ERROR | BLOCK_SYNC_ERROR |
BLOCK_FATAL_ERROR))
{
if (b_type & (BLOCK_SYNC_ERROR | BLOCK_DELETED))
my_errno=HA_ERR_RECORD_CHANGED;
goto err;
}
if (flag == 0) /* First block */
{
flag=1;
if (reclength != block_info.rec_len)
{
my_errno=HA_ERR_RECORD_CHANGED;
goto err;
}
} else if (reclength < block_info.data_len)
{
_ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD);
goto err;
}
reclength-= block_info.data_len;
cmp_length= block_info.data_len;
if (!reclength && info->s->calc_checksum)
cmp_length--; /* 'record' may not contain checksum */
if (_ma_cmp_buffer(info->dfile.file, record, block_info.filepos,
cmp_length))
{
my_errno=HA_ERR_RECORD_CHANGED;
goto err;
}
flag=1;
record+=block_info.data_len;
}
}
my_errno=0;
error= 0;
err:
stack_alloc_free(buffer, buff_alloced);
DBUG_PRINT("exit", ("result: %d", error));
DBUG_RETURN(error);
} | O0 | c | ma_cmp_dynamic_record:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x70(%rbp)
movq %rsi, -0x78(%rbp)
movb $0x1, -0x99(%rbp)
movb $0x0, -0x9a(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x70(%rbp), %rax
movl 0x61c(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x520ab
movq -0x70(%rbp), %rax
movl 0x624(%rax), %ecx
andl $0xfffff6ff, %ecx # imm = 0xFFFFF6FF
movl %ecx, 0x624(%rax)
movq -0x70(%rbp), %rdi
addq $0x4b8, %rdi # imm = 0x4B8
movl $0x1, %esi
callq 0xe8710
cmpl $0x0, %eax
je 0x520a9
jmp 0x520a0
movb $0x1, -0x61(%rbp)
jmp 0x523aa
jmp 0x520ab
movq -0x70(%rbp), %rax
movl $0x1, 0x598(%rax)
movq -0x70(%rbp), %rax
movq 0x3a0(%rax), %rax
movq %rax, -0x98(%rbp)
movq -0x70(%rbp), %rax
movl 0x61c(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x52378
movq -0x70(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x3f0(%rax)
je 0x52205
movq -0x70(%rbp), %rax
movq (%rax), %rax
movq 0x3a0(%rax), %rax
movq %rax, -0xc0(%rbp)
movq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x4e860
movq %rax, %rcx
movq -0xc0(%rbp), %rax
addq %rcx, %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x70(%rbp), %rax
movq 0x78(%rax), %rax
movq (%rax), %rax
leaq -0xb0(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rax
cmpq -0xb0(%rbp), %rax
jbe 0x521cb
movq -0xb8(%rbp), %rcx
subq -0xb0(%rbp), %rcx
movl $0x10000, %eax # imm = 0x10000
cmpq %rcx, %rax
jb 0x521a3
movq -0xb8(%rbp), %rcx
subq -0xb0(%rbp), %rcx
movl $0x8000, %eax # imm = 0x8000
cmpq %rcx, %rax
jae 0x521cb
movl $0x1000, %eax # imm = 0x1000
cmpq -0xb0(%rbp), %rax
ja 0x521cb
movb $0x0, -0x9a(%rbp)
movq -0xa8(%rbp), %rcx
addq $0xf, %rcx
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x98(%rbp)
jmp 0x521ec
movb $0x1, -0x9a(%rbp)
movq -0xa8(%rbp), %rsi
xorl %edi, %edi
movl $0x10010, %edx # imm = 0x10010
callq 0xfb390
movq %rax, -0x98(%rbp)
jmp 0x521ee
cmpq $0x0, -0x98(%rbp)
jne 0x52203
jmp 0x521fa
movb $0x1, -0x61(%rbp)
jmp 0x523aa
jmp 0x52205
movq -0x70(%rbp), %rdi
movq -0x98(%rbp), %rsi
movq -0x78(%rbp), %rdx
callq 0x4d7a0
movl %eax, -0x80(%rbp)
cmpl $0x0, %eax
jne 0x52226
jmp 0x5238a
movq -0x98(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x70(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x90(%rbp)
movl $0x0, -0x10(%rbp)
movl $0x0, -0x7c(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x80(%rbp)
jbe 0x52376
movq -0x70(%rbp), %rdi
movq -0x70(%rbp), %rax
movl 0x480(%rax), %edx
movq -0x20(%rbp), %rcx
leaq -0x60(%rbp), %rsi
callq 0x4fde0
movl %eax, -0x84(%rbp)
andl $0x3c, %eax
cmpl $0x0, %eax
je 0x522ad
movl -0x84(%rbp), %eax
andl $0x14, %eax
cmpl $0x0, %eax
je 0x522a8
callq 0xfdd30
movl $0x7b, (%rax)
jmp 0x5238a
cmpl $0x0, -0x7c(%rbp)
jne 0x522d5
movl $0x1, -0x7c(%rbp)
movl -0x80(%rbp), %eax
cmpq -0x48(%rbp), %rax
je 0x522d3
callq 0xfdd30
movl $0x7b, (%rax)
jmp 0x5238a
jmp 0x522f3
movl -0x80(%rbp), %eax
cmpq -0x40(%rbp), %rax
jae 0x522f1
movq -0x70(%rbp), %rdi
movl $0x7f, %esi
callq 0x39b70
jmp 0x5238a
jmp 0x522f3
movq -0x40(%rbp), %rcx
movl -0x80(%rbp), %eax
subq %rcx, %rax
movl %eax, -0x80(%rbp)
movq -0x40(%rbp), %rax
movl %eax, -0x88(%rbp)
cmpl $0x0, -0x80(%rbp)
jne 0x52330
movq -0x70(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x6a8(%rax)
je 0x52330
movl -0x88(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x88(%rbp)
movq -0x70(%rbp), %rax
movl 0x480(%rax), %edi
movq -0x78(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl -0x88(%rbp), %ecx
callq 0x523e0
cmpb $0x0, %al
je 0x5235e
callq 0xfdd30
movl $0x7b, (%rax)
jmp 0x5238a
movl $0x1, -0x7c(%rbp)
movq -0x40(%rbp), %rax
addq -0x78(%rbp), %rax
movq %rax, -0x78(%rbp)
jmp 0x5225c
jmp 0x52378
callq 0xfdd30
movl $0x0, (%rax)
movb $0x0, -0x99(%rbp)
movq -0x98(%rbp), %rdi
movsbl -0x9a(%rbp), %esi
callq 0x4e900
jmp 0x5239f
jmp 0x523a1
movb -0x99(%rbp), %al
movb %al, -0x61(%rbp)
movb -0x61(%rbp), %al
movb %al, -0xc1(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x523d0
movb -0xc1(%rbp), %al
movq %rbp, %rsp
popq %rbp
retq
callq 0x29230
nopw %cs:(%rax,%rax)
| _ma_cmp_dynamic_record:
push rbp
mov rbp, rsp
sub rsp, 0D0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_70], rdi
mov [rbp+var_78], rsi
mov [rbp+var_99], 1
mov [rbp+var_9A], 0
mov rax, [rbp+var_A8]
mov [rbp+var_A8], rax
mov rax, [rbp+var_70]
mov eax, [rax+61Ch]
and eax, 10h
cmp eax, 0
jz short loc_520AB
mov rax, [rbp+var_70]
mov ecx, [rax+624h]
and ecx, 0FFFFF6FFh
mov [rax+624h], ecx
mov rdi, [rbp+var_70]
add rdi, 4B8h
mov esi, 1
call my_b_flush_io_cache
cmp eax, 0
jz short loc_520A9
jmp short $+2
loc_520A0:
mov [rbp+var_61], 1
jmp loc_523AA
loc_520A9:
jmp short $+2
loc_520AB:
mov rax, [rbp+var_70]
mov dword ptr [rax+598h], 1
mov rax, [rbp+var_70]
mov rax, [rax+3A0h]
mov [rbp+var_98], rax
mov rax, [rbp+var_70]
mov eax, [rax+61Ch]
and eax, 4
cmp eax, 0
jz loc_52378
mov rax, [rbp+var_70]
mov rax, [rax]
cmp dword ptr [rax+3F0h], 0
jz loc_52205
mov rax, [rbp+var_70]
mov rax, [rax]
mov rax, [rax+3A0h]
mov [rbp+var_C0], rax
mov rdi, [rbp+var_70]
mov rsi, [rbp+var_78]
call _ma_calc_total_blob_length
mov rcx, rax
mov rax, [rbp+var_C0]
add rax, rcx
mov [rbp+var_A8], rax
mov rax, [rbp+var_A8]
mov [rbp+var_B0], rax
mov rax, [rbp+var_70]
mov rax, [rax+78h]
mov rax, [rax]
lea rcx, [rbp+var_B0]
sub rax, rcx
mov [rbp+var_B8], rax
mov rax, [rbp+var_B8]
cmp rax, [rbp+var_B0]
jbe short loc_521CB
mov rcx, [rbp+var_B8]
sub rcx, [rbp+var_B0]
mov eax, 10000h
cmp rax, rcx
jb short loc_521A3
mov rcx, [rbp+var_B8]
sub rcx, [rbp+var_B0]
mov eax, 8000h
cmp rax, rcx
jnb short loc_521CB
mov eax, 1000h
cmp rax, [rbp+var_B0]
ja short loc_521CB
loc_521A3:
mov [rbp+var_9A], 0
mov rcx, [rbp+var_A8]
add rcx, 0Fh
and rcx, 0FFFFFFFFFFFFFFF0h
mov rax, rsp
sub rax, rcx
mov rsp, rax
mov [rbp+var_98], rax
jmp short loc_521EC
loc_521CB:
mov [rbp+var_9A], 1
mov rsi, [rbp+var_A8]
xor edi, edi
mov edx, 10010h
call my_malloc
mov [rbp+var_98], rax
loc_521EC:
jmp short $+2
loc_521EE:
cmp [rbp+var_98], 0
jnz short loc_52203
jmp short $+2
loc_521FA:
mov [rbp+var_61], 1
jmp loc_523AA
loc_52203:
jmp short $+2
loc_52205:
mov rdi, [rbp+var_70]
mov rsi, [rbp+var_98]
mov rdx, [rbp+var_78]
call _ma_rec_pack
mov [rbp+var_80], eax
cmp eax, 0
jnz short loc_52226
jmp loc_5238A
loc_52226:
mov rax, [rbp+var_98]
mov [rbp+var_78], rax
mov rax, [rbp+var_70]
mov rax, [rax+98h]
mov [rbp+var_90], rax
mov [rbp+var_10], 0
mov [rbp+var_7C], 0
mov rax, [rbp+var_90]
mov [rbp+var_20], rax
loc_5225C:
cmp [rbp+var_80], 0
jbe loc_52376
mov rdi, [rbp+var_70]
mov rax, [rbp+var_70]
mov edx, [rax+480h]
mov rcx, [rbp+var_20]
lea rsi, [rbp+var_60]
call _ma_get_block_info
mov [rbp+var_84], eax
and eax, 3Ch
cmp eax, 0
jz short loc_522AD
mov eax, [rbp+var_84]
and eax, 14h
cmp eax, 0
jz short loc_522A8
call _my_thread_var
mov dword ptr [rax], 7Bh ; '{'
loc_522A8:
jmp loc_5238A
loc_522AD:
cmp [rbp+var_7C], 0
jnz short loc_522D5
mov [rbp+var_7C], 1
mov eax, [rbp+var_80]
cmp rax, [rbp+var_48]
jz short loc_522D3
call _my_thread_var
mov dword ptr [rax], 7Bh ; '{'
jmp loc_5238A
loc_522D3:
jmp short loc_522F3
loc_522D5:
mov eax, [rbp+var_80]
cmp rax, [rbp+var_40]
jnb short loc_522F1
mov rdi, [rbp+var_70]
mov esi, 7Fh
call _ma_set_fatal_error
jmp loc_5238A
loc_522F1:
jmp short $+2
loc_522F3:
mov rcx, [rbp+var_40]
mov eax, [rbp+var_80]
sub rax, rcx
mov [rbp+var_80], eax
mov rax, [rbp+var_40]
mov [rbp+var_88], eax
cmp [rbp+var_80], 0
jnz short loc_52330
mov rax, [rbp+var_70]
mov rax, [rax]
cmp qword ptr [rax+6A8h], 0
jz short loc_52330
mov eax, [rbp+var_88]
add eax, 0FFFFFFFFh
mov [rbp+var_88], eax
loc_52330:
mov rax, [rbp+var_70]
mov edi, [rax+480h]
mov rsi, [rbp+var_78]
mov rdx, [rbp+var_28]
mov ecx, [rbp+var_88]
call _ma_cmp_buffer
cmp al, 0
jz short loc_5235E
call _my_thread_var
mov dword ptr [rax], 7Bh ; '{'
jmp short loc_5238A
loc_5235E:
mov [rbp+var_7C], 1
mov rax, [rbp+var_40]
add rax, [rbp+var_78]
mov [rbp+var_78], rax
jmp loc_5225C
loc_52376:
jmp short $+2
loc_52378:
call _my_thread_var
mov dword ptr [rax], 0
mov [rbp+var_99], 0
loc_5238A:
mov rdi, [rbp+var_98]
movsx esi, [rbp+var_9A]
call stack_alloc_free_0
jmp short $+2
loc_5239F:
jmp short $+2
loc_523A1:
mov al, [rbp+var_99]
mov [rbp+var_61], al
loc_523AA:
mov al, [rbp+var_61]
mov [rbp+var_C1], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_523D0
mov al, [rbp+var_C1]
mov rsp, rbp
pop rbp
retn
loc_523D0:
call ___stack_chk_fail
| char ma_cmp_dynamic_record(_QWORD *a1, const char *a2, long long a3)
{
long long v3; // r8
int v4; // r9d
long long v5; // rdx
long long v6; // rcx
long long v7; // r8
int v8; // r9d
long long v10; // [rsp+0h] [rbp-D0h] BYREF
long long v11; // [rsp+10h] [rbp-C0h]
unsigned long long v12; // [rsp+18h] [rbp-B8h]
unsigned long long v13; // [rsp+20h] [rbp-B0h] BYREF
unsigned long long v14; // [rsp+28h] [rbp-A8h]
char v15; // [rsp+36h] [rbp-9Ah]
char v16; // [rsp+37h] [rbp-99h]
const char *v17; // [rsp+38h] [rbp-98h]
long long v18; // [rsp+40h] [rbp-90h]
unsigned int v19; // [rsp+48h] [rbp-88h]
int block_info; // [rsp+4Ch] [rbp-84h]
unsigned int v21; // [rsp+50h] [rbp-80h]
int v22; // [rsp+54h] [rbp-7Ch]
const char *v23; // [rsp+58h] [rbp-78h]
_QWORD *v24; // [rsp+60h] [rbp-70h]
unsigned __int8 v26[24]; // [rsp+70h] [rbp-60h] BYREF
long long v27; // [rsp+88h] [rbp-48h]
unsigned long long v28; // [rsp+90h] [rbp-40h]
long long v29; // [rsp+A8h] [rbp-28h]
long long v30; // [rsp+B0h] [rbp-20h]
int v31; // [rsp+C0h] [rbp-10h]
unsigned long long v32; // [rsp+C8h] [rbp-8h]
v32 = __readfsqword(0x28u);
v24 = a1;
v23 = a2;
v16 = 1;
v15 = 0;
if ( (*((_DWORD *)a1 + 391) & 0x10) == 0
|| (*((_DWORD *)v24 + 393) &= 0xFFFFF6FF,
a1 = v24 + 151,
a2 = (_BYTE *)(&dword_0 + 1),
!(unsigned int)my_b_flush_io_cache(v24 + 151, 1LL)) )
{
*((_DWORD *)v24 + 358) = 1;
v17 = (const char *)v24[116];
if ( (*((_DWORD *)v24 + 391) & 4) != 0 )
{
if ( *(_DWORD *)(*v24 + 1008LL) )
{
v11 = *(_QWORD *)(*v24 + 928LL);
v14 = ma_calc_total_blob_length(v24, (long long)v23, a3) + v11;
v13 = v14;
v12 = *(_QWORD *)v24[15] - (_QWORD)&v13;
if ( v12 <= v14 || v12 - v13 <= 0x10000 && (v12 - v13 <= 0x8000 || v13 < 0x1000) )
{
v15 = 1;
v17 = (const char *)my_malloc(0LL, v14, 65552LL);
}
else
{
v15 = 0;
v17 = (char *)&v10 - ((v14 + 15) & 0xFFFFFFFFFFFFFFF0LL);
}
if ( !v17 )
return 1;
}
a1 = v24;
a2 = v17;
v21 = ma_rec_pack((const char *)v24, v17, v23);
if ( !v21 )
{
LABEL_33:
stack_alloc_free_0((long long)v17, v15);
return v16;
}
v23 = v17;
v18 = v24[19];
v31 = 0;
v22 = 0;
v30 = v18;
while ( v21 )
{
a1 = v24;
a2 = (const char *)v26;
block_info = ma_get_block_info((long long)v24, v26, *((unsigned int *)v24 + 288), v30, v3, v4);
if ( (block_info & 0x3C) != 0 )
{
if ( (block_info & 0x14) != 0 )
*(_DWORD *)my_thread_var(a1, (const char *)v26) = 123;
goto LABEL_33;
}
if ( v22 )
{
if ( v21 < v28 )
{
ma_set_fatal_error(v24, 0x7Fu, v5, v6, v7, v8);
goto LABEL_33;
}
}
else
{
v22 = 1;
if ( v21 != v27 )
goto LABEL_23;
}
v21 -= v28;
v19 = v28;
if ( !v21 && *(_QWORD *)(*v24 + 1704LL) )
--v19;
a1 = (_QWORD *)*((unsigned int *)v24 + 288);
a2 = v23;
if ( (unsigned __int8)ma_cmp_buffer(a1, v23, v29, v19) )
{
LABEL_23:
*(_DWORD *)my_thread_var(a1, a2) = 123;
goto LABEL_33;
}
v22 = 1;
v23 += v28;
}
}
*(_DWORD *)my_thread_var(a1, a2) = 0;
v16 = 0;
goto LABEL_33;
}
return 1;
}
| _ma_cmp_dynamic_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x70],RDI
MOV qword ptr [RBP + -0x78],RSI
MOV byte ptr [RBP + -0x99],0x1
MOV byte ptr [RBP + -0x9a],0x0
MOV RAX,qword ptr [RBP + -0xa8]
MOV qword ptr [RBP + -0xa8],RAX
MOV RAX,qword ptr [RBP + -0x70]
MOV EAX,dword ptr [RAX + 0x61c]
AND EAX,0x10
CMP EAX,0x0
JZ 0x001520ab
MOV RAX,qword ptr [RBP + -0x70]
MOV ECX,dword ptr [RAX + 0x624]
AND ECX,0xfffff6ff
MOV dword ptr [RAX + 0x624],ECX
MOV RDI,qword ptr [RBP + -0x70]
ADD RDI,0x4b8
MOV ESI,0x1
CALL 0x001e8710
CMP EAX,0x0
JZ 0x001520a9
JMP 0x001520a0
LAB_001520a0:
MOV byte ptr [RBP + -0x61],0x1
JMP 0x001523aa
LAB_001520a9:
JMP 0x001520ab
LAB_001520ab:
MOV RAX,qword ptr [RBP + -0x70]
MOV dword ptr [RAX + 0x598],0x1
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX + 0x3a0]
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr [RBP + -0x70]
MOV EAX,dword ptr [RAX + 0x61c]
AND EAX,0x4
CMP EAX,0x0
JZ 0x00152378
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x3f0],0x0
JZ 0x00152205
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x3a0]
MOV qword ptr [RBP + -0xc0],RAX
MOV RDI,qword ptr [RBP + -0x70]
MOV RSI,qword ptr [RBP + -0x78]
CALL 0x0014e860
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0xc0]
ADD RAX,RCX
MOV qword ptr [RBP + -0xa8],RAX
MOV RAX,qword ptr [RBP + -0xa8]
MOV qword ptr [RBP + -0xb0],RAX
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX + 0x78]
MOV RAX,qword ptr [RAX]
LEA RCX,[RBP + -0xb0]
SUB RAX,RCX
MOV qword ptr [RBP + -0xb8],RAX
MOV RAX,qword ptr [RBP + -0xb8]
CMP RAX,qword ptr [RBP + -0xb0]
JBE 0x001521cb
MOV RCX,qword ptr [RBP + -0xb8]
SUB RCX,qword ptr [RBP + -0xb0]
MOV EAX,0x10000
CMP RAX,RCX
JC 0x001521a3
MOV RCX,qword ptr [RBP + -0xb8]
SUB RCX,qword ptr [RBP + -0xb0]
MOV EAX,0x8000
CMP RAX,RCX
JNC 0x001521cb
MOV EAX,0x1000
CMP RAX,qword ptr [RBP + -0xb0]
JA 0x001521cb
LAB_001521a3:
MOV byte ptr [RBP + -0x9a],0x0
MOV RCX,qword ptr [RBP + -0xa8]
ADD RCX,0xf
AND RCX,-0x10
MOV RAX,RSP
SUB RAX,RCX
MOV RSP,RAX
MOV qword ptr [RBP + -0x98],RAX
JMP 0x001521ec
LAB_001521cb:
MOV byte ptr [RBP + -0x9a],0x1
MOV RSI,qword ptr [RBP + -0xa8]
XOR EDI,EDI
MOV EDX,0x10010
CALL 0x001fb390
MOV qword ptr [RBP + -0x98],RAX
LAB_001521ec:
JMP 0x001521ee
LAB_001521ee:
CMP qword ptr [RBP + -0x98],0x0
JNZ 0x00152203
JMP 0x001521fa
LAB_001521fa:
MOV byte ptr [RBP + -0x61],0x1
JMP 0x001523aa
LAB_00152203:
JMP 0x00152205
LAB_00152205:
MOV RDI,qword ptr [RBP + -0x70]
MOV RSI,qword ptr [RBP + -0x98]
MOV RDX,qword ptr [RBP + -0x78]
CALL 0x0014d7a0
MOV dword ptr [RBP + -0x80],EAX
CMP EAX,0x0
JNZ 0x00152226
JMP 0x0015238a
LAB_00152226:
MOV RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RBP + -0x90],RAX
MOV dword ptr [RBP + -0x10],0x0
MOV dword ptr [RBP + -0x7c],0x0
MOV RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RBP + -0x20],RAX
LAB_0015225c:
CMP dword ptr [RBP + -0x80],0x0
JBE 0x00152376
MOV RDI,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x70]
MOV EDX,dword ptr [RAX + 0x480]
MOV RCX,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x60]
CALL 0x0014fde0
MOV dword ptr [RBP + -0x84],EAX
AND EAX,0x3c
CMP EAX,0x0
JZ 0x001522ad
MOV EAX,dword ptr [RBP + -0x84]
AND EAX,0x14
CMP EAX,0x0
JZ 0x001522a8
CALL 0x001fdd30
MOV dword ptr [RAX],0x7b
LAB_001522a8:
JMP 0x0015238a
LAB_001522ad:
CMP dword ptr [RBP + -0x7c],0x0
JNZ 0x001522d5
MOV dword ptr [RBP + -0x7c],0x1
MOV EAX,dword ptr [RBP + -0x80]
CMP RAX,qword ptr [RBP + -0x48]
JZ 0x001522d3
CALL 0x001fdd30
MOV dword ptr [RAX],0x7b
JMP 0x0015238a
LAB_001522d3:
JMP 0x001522f3
LAB_001522d5:
MOV EAX,dword ptr [RBP + -0x80]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x001522f1
MOV RDI,qword ptr [RBP + -0x70]
MOV ESI,0x7f
CALL 0x00139b70
JMP 0x0015238a
LAB_001522f1:
JMP 0x001522f3
LAB_001522f3:
MOV RCX,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RBP + -0x80]
SUB RAX,RCX
MOV dword ptr [RBP + -0x80],EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x88],EAX
CMP dword ptr [RBP + -0x80],0x0
JNZ 0x00152330
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX + 0x6a8],0x0
JZ 0x00152330
MOV EAX,dword ptr [RBP + -0x88]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x88],EAX
LAB_00152330:
MOV RAX,qword ptr [RBP + -0x70]
MOV EDI,dword ptr [RAX + 0x480]
MOV RSI,qword ptr [RBP + -0x78]
MOV RDX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RBP + -0x88]
CALL 0x001523e0
CMP AL,0x0
JZ 0x0015235e
CALL 0x001fdd30
MOV dword ptr [RAX],0x7b
JMP 0x0015238a
LAB_0015235e:
MOV dword ptr [RBP + -0x7c],0x1
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x78],RAX
JMP 0x0015225c
LAB_00152376:
JMP 0x00152378
LAB_00152378:
CALL 0x001fdd30
MOV dword ptr [RAX],0x0
MOV byte ptr [RBP + -0x99],0x0
LAB_0015238a:
MOV RDI,qword ptr [RBP + -0x98]
MOVSX ESI,byte ptr [RBP + -0x9a]
CALL 0x0014e900
JMP 0x0015239f
LAB_0015239f:
JMP 0x001523a1
LAB_001523a1:
MOV AL,byte ptr [RBP + -0x99]
MOV byte ptr [RBP + -0x61],AL
LAB_001523aa:
MOV AL,byte ptr [RBP + -0x61]
MOV byte ptr [RBP + -0xc1],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001523d0
MOV AL,byte ptr [RBP + -0xc1]
MOV RSP,RBP
POP RBP
RET
LAB_001523d0:
CALL 0x00129230
|
int8 _ma_cmp_dynamic_record(long *param_1,int1 *param_2)
{
long lVar1;
int1 *puVar2;
long *plVar3;
int8 uVar4;
char cVar5;
int iVar6;
long lVar7;
int4 *puVar8;
int1 *puVar9;
int1 *puVar10;
long in_FS_OFFSET;
int1 auStack_d8 [15];
int1 local_c9;
long local_c8;
ulong local_c0;
ulong local_b8;
ulong local_b0;
char local_a2;
int1 local_a1;
int1 *local_a0;
long local_98;
int local_90;
uint local_8c;
uint local_88;
int local_84;
int1 *local_80;
long *local_78;
int1 local_69;
int1 local_68 [24];
ulong local_50;
ulong local_48;
int8 local_30;
long local_28;
int4 local_18;
long local_10;
puVar10 = auStack_d8;
puVar9 = auStack_d8;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_a1 = 1;
local_a2 = '\0';
local_80 = param_2;
local_78 = param_1;
if ((*(uint *)((long)param_1 + 0x61c) & 0x10) != 0) {
*(uint *)((long)param_1 + 0x624) = *(uint *)((long)param_1 + 0x624) & 0xfffff6ff;
iVar6 = my_b_flush_io_cache(param_1 + 0x97,1);
if (iVar6 != 0) {
local_69 = 1;
puVar10 = auStack_d8;
goto LAB_001523aa;
}
}
*(int4 *)(local_78 + 0xb3) = 1;
local_a0 = (int1 *)local_78[0x74];
if ((*(uint *)((long)local_78 + 0x61c) & 4) == 0) {
LAB_00152378:
*(int8 *)(puVar10 + -8) = 0x15237d;
puVar8 = (int4 *)_my_thread_var();
*puVar8 = 0;
local_a1 = 0;
}
else {
puVar10 = auStack_d8;
if (*(int *)(*local_78 + 0x3f0) != 0) {
local_c8 = *(long *)(*local_78 + 0x3a0);
lVar7 = _ma_calc_total_blob_length(local_78,local_80);
local_b8 = local_c8 + lVar7;
local_c0 = *(long *)local_78[0xf] - (long)&local_b8;
local_b0 = local_b8;
if ((local_b8 < local_c0) &&
((0x10000 < local_c0 - local_b8 || ((0x8000 < local_c0 - local_b8 && (0xfff < local_b8)))))
) {
local_a2 = '\0';
puVar9 = auStack_d8 + -(local_b8 + 0xf & 0xfffffffffffffff0);
local_a0 = puVar9;
}
else {
local_a2 = '\x01';
local_a0 = (int1 *)my_malloc(0,local_b8,0x10010);
}
puVar10 = puVar9;
if (local_a0 == (int1 *)0x0) {
local_69 = 1;
goto LAB_001523aa;
}
}
plVar3 = local_78;
puVar2 = local_80;
puVar9 = local_a0;
*(int8 *)(puVar10 + -8) = 0x152219;
local_88 = _ma_rec_pack(plVar3,puVar9,puVar2);
if (local_88 != 0) {
local_80 = local_a0;
local_98 = local_78[0x13];
local_18 = 0;
local_84 = 0;
local_28 = local_98;
while (lVar7 = local_28, plVar3 = local_78, local_88 != 0) {
lVar1 = local_78[0x90];
*(int8 *)(puVar10 + -8) = 0x152281;
local_8c = _ma_get_block_info(plVar3,local_68,(int)lVar1,lVar7);
uVar4 = local_30;
plVar3 = local_78;
puVar9 = local_80;
if ((local_8c & 0x3c) != 0) {
if ((local_8c & 0x14) != 0) {
*(int8 *)(puVar10 + -8) = 0x1522a2;
puVar8 = (int4 *)_my_thread_var();
*puVar8 = 0x7b;
}
goto LAB_0015238a;
}
if (local_84 == 0) {
local_84 = 1;
if (local_88 != local_50) {
*(int8 *)(puVar10 + -8) = 0x1522c8;
puVar8 = (int4 *)_my_thread_var();
*puVar8 = 0x7b;
goto LAB_0015238a;
}
}
else if (local_88 < local_48) {
*(int8 *)(puVar10 + -8) = 0x1522ec;
_ma_set_fatal_error(plVar3,0x7f);
goto LAB_0015238a;
}
local_90 = (int)local_48;
local_88 = local_88 - local_90;
if ((local_88 == 0) && (*(long *)(*local_78 + 0x6a8) != 0)) {
local_90 = local_90 + -1;
}
iVar6 = local_90;
lVar7 = local_78[0x90];
*(int8 *)(puVar10 + -8) = 0x15234d;
cVar5 = _ma_cmp_buffer((int)lVar7,puVar9,uVar4,iVar6);
if (cVar5 != '\0') {
*(int8 *)(puVar10 + -8) = 0x152356;
puVar8 = (int4 *)_my_thread_var();
*puVar8 = 0x7b;
goto LAB_0015238a;
}
local_84 = 1;
local_80 = local_80 + local_48;
}
goto LAB_00152378;
}
}
LAB_0015238a:
puVar9 = local_a0;
iVar6 = (int)local_a2;
*(int8 *)(puVar10 + -8) = 0x15239d;
stack_alloc_free(puVar9,iVar6);
local_69 = local_a1;
LAB_001523aa:
local_c9 = local_69;
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
*(int8 *)(puVar10 + -8) = 0x1523d5;
__stack_chk_fail();
}
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_69);
}
|
|
6,545 | my_uca_add_contraction | eloqsql/strings/ctype-uca.c | static MY_CONTRACTION *
my_uca_add_contraction(MY_CONTRACTIONS *list, my_wc_t *wc, size_t len,
my_bool with_context)
{
MY_CONTRACTION *next= &list->item[list->nitems];
size_t i;
/*
Contraction is always at least 2 characters.
Contraction is never longer than MY_UCA_MAX_CONTRACTION,
which is guaranteed by using my_coll_rule_expand() with proper limit.
*/
DBUG_ASSERT(len > 1 && len <= MY_UCA_MAX_CONTRACTION);
for (i= 0; i < len; i++)
{
/*
We don't support contractions with U+0000.
my_coll_rule_expand() guarantees there're no U+0000 in a contraction.
*/
DBUG_ASSERT(wc[i] != 0);
next->ch[i]= wc[i];
}
if (i < MY_UCA_MAX_CONTRACTION)
next->ch[i]= 0; /* Add end-of-line marker */
next->with_context= with_context;
list->nitems++;
return next;
} | O0 | c | my_uca_add_contraction:
pushq %rbp
movq %rsp, %rbp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb %al, -0x19(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
imulq $0x58, (%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x62dde
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x62e1a
jmp 0x62df2
jmp 0x62df4
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x62de6
cmpq $0x6, -0x30(%rbp)
jae 0x62e31
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movb -0x19(%rbp), %cl
movq -0x28(%rbp), %rax
movb %cl, 0x52(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
popq %rbp
retq
nop
| my_uca_add_contraction:
push rbp
mov rbp, rsp
mov al, cl
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_19], al
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov rcx, [rbp+var_8]
imul rcx, [rcx], 58h ; 'X'
add rax, rcx
mov [rbp+var_28], rax
jmp short $+2
loc_62DDE:
mov [rbp+var_30], 0
loc_62DE6:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_18]
jnb short loc_62E1A
jmp short $+2
loc_62DF2:
jmp short $+2
loc_62DF4:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_30]
mov rdx, [rax+rcx*8]
mov rax, [rbp+var_28]
mov rcx, [rbp+var_30]
mov [rax+rcx*8], rdx
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp short loc_62DE6
loc_62E1A:
cmp [rbp+var_30], 6
jnb short loc_62E31
mov rax, [rbp+var_28]
mov rcx, [rbp+var_30]
mov qword ptr [rax+rcx*8], 0
loc_62E31:
mov cl, [rbp+var_19]
mov rax, [rbp+var_28]
mov [rax+52h], cl
mov rax, [rbp+var_8]
mov rcx, [rax]
add rcx, 1
mov [rax], rcx
mov rax, [rbp+var_28]
pop rbp
retn
| long long my_uca_add_contraction(_QWORD *a1, long long a2, unsigned long long a3, char a4)
{
unsigned long long i; // [rsp+0h] [rbp-30h]
long long v6; // [rsp+8h] [rbp-28h]
v6 = 88LL * *a1 + a1[1];
for ( i = 0LL; i < a3; ++i )
*(_QWORD *)(v6 + 8 * i) = *(_QWORD *)(a2 + 8 * i);
if ( i < 6 )
*(_QWORD *)(v6 + 8 * i) = 0LL;
*(_BYTE *)(v6 + 82) = a4;
++*a1;
return v6;
}
| my_uca_add_contraction:
PUSH RBP
MOV RBP,RSP
MOV AL,CL
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV byte ptr [RBP + -0x19],AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x8]
IMUL RCX,qword ptr [RCX],0x58
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00162dde
LAB_00162dde:
MOV qword ptr [RBP + -0x30],0x0
LAB_00162de6:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x00162e1a
JMP 0x00162df2
LAB_00162df2:
JMP 0x00162df4
LAB_00162df4:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00162de6
LAB_00162e1a:
CMP qword ptr [RBP + -0x30],0x6
JNC 0x00162e31
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + RCX*0x8],0x0
LAB_00162e31:
MOV CL,byte ptr [RBP + -0x19]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x52],CL
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x28]
POP RBP
RET
|
long my_uca_add_contraction(long *param_1,long param_2,ulong param_3,int1 param_4)
{
long lVar1;
ulong local_38;
lVar1 = param_1[1] + *param_1 * 0x58;
for (local_38 = 0; local_38 < param_3; local_38 = local_38 + 1) {
*(int8 *)(lVar1 + local_38 * 8) = *(int8 *)(param_2 + local_38 * 8);
}
if (local_38 < 6) {
*(int8 *)(lVar1 + local_38 * 8) = 0;
}
*(int1 *)(lVar1 + 0x52) = param_4;
*param_1 = *param_1 + 1;
return lVar1;
}
|
|
6,546 | ma_pvio_read | eloqsql/libmariadb/libmariadb/ma_pvio.c | ssize_t ma_pvio_read(MARIADB_PVIO *pvio, uchar *buffer, size_t length)
{
ssize_t r= -1;
if (!pvio)
return -1;
if (IS_PVIO_ASYNC_ACTIVE(pvio))
{
r=
#if defined(HAVE_TLS) && !defined(HAVE_SCHANNEL)
(pvio->ctls) ? ma_tls_read_async(pvio, buffer, length) :
#endif
(ssize_t)ma_pvio_read_async(pvio, buffer, length);
goto end;
}
else
{
if (IS_PVIO_ASYNC(pvio))
{
/*
If switching from non-blocking to blocking API usage, set the socket
back to blocking mode.
*/
my_bool old_mode;
ma_pvio_blocking(pvio, TRUE, &old_mode);
}
}
/* secure connection */
#ifdef HAVE_TLS
if (pvio->ctls)
{
r= ma_pvio_tls_read(pvio->ctls, buffer, length);
goto end;
}
#endif
if (pvio->methods->read)
r= pvio->methods->read(pvio, buffer, length);
end:
if (pvio_callback)
{
void (*callback)(int mode, MYSQL *mysql, const uchar *buffer, size_t length);
LIST *p= pvio_callback;
while (p)
{
callback= p->data;
callback(0, pvio->mysql, buffer, r);
p= p->next;
}
}
if (r > 0)
pvio->bytes_read+= r;
return r;
} | O0 | c | ma_pvio_read:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $-0x1, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x23fe0
movq $-0x1, -0x8(%rbp)
jmp 0x24188
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x24077
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
cmpq $0x0, 0x480(%rax)
je 0x24077
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x24077
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movsbl 0x14(%rax), %eax
cmpl $0x0, %eax
je 0x24077
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x24055
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x37f50
movq %rax, -0x48(%rbp)
jmp 0x2406a
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x241a0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x24113
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x240bc
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
cmpq $0x0, 0x480(%rax)
je 0x240bc
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x240bc
movq -0x10(%rbp), %rdi
movl $0x1, %esi
leaq -0x29(%rbp), %rdx
callq 0x24320
jmp 0x240be
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x240e4
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x24fb0
movq %rax, -0x28(%rbp)
jmp 0x24113
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x10(%rax)
je 0x24111
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq *%rax
movq %rax, -0x28(%rbp)
jmp 0x24113
leaq 0x3d31e(%rip), %rax # 0x61438
cmpq $0x0, (%rax)
je 0x24169
leaq 0x3d311(%rip), %rax # 0x61438
movq (%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x24167
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rsi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %rcx
xorl %edi, %edi
callq *%rax
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x2412e
jmp 0x24169
cmpq $0x0, -0x28(%rbp)
jle 0x24180
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x60(%rax), %rcx
movq %rcx, 0x60(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_pvio_read:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], 0FFFFFFFFFFFFFFFFh
cmp [rbp+var_10], 0
jnz short loc_23FE0
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp loc_24188
loc_23FE0:
mov rax, [rbp+var_10]
cmp qword ptr [rax+40h], 0
jz loc_24077
mov rax, [rbp+var_10]
mov rax, [rax+40h]
cmp qword ptr [rax+480h], 0
jz short loc_24077
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rax, [rax+480h]
cmp qword ptr [rax+28h], 0
jz short loc_24077
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rax, [rax+480h]
mov rax, [rax+28h]
movsx eax, byte ptr [rax+14h]
cmp eax, 0
jz short loc_24077
mov rax, [rbp+var_10]
cmp qword ptr [rax+38h], 0
jz short loc_24055
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call ma_tls_read_async
mov [rbp+var_48], rax
jmp short loc_2406A
loc_24055:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call ma_pvio_read_async
mov [rbp+var_48], rax
loc_2406A:
mov rax, [rbp+var_48]
mov [rbp+var_28], rax
jmp loc_24113
loc_24077:
mov rax, [rbp+var_10]
cmp qword ptr [rax+40h], 0
jz short loc_240BC
mov rax, [rbp+var_10]
mov rax, [rax+40h]
cmp qword ptr [rax+480h], 0
jz short loc_240BC
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rax, [rax+480h]
cmp qword ptr [rax+28h], 0
jz short loc_240BC
mov rdi, [rbp+var_10]
mov esi, 1
lea rdx, [rbp+var_29]
call ma_pvio_blocking
loc_240BC:
jmp short $+2
loc_240BE:
mov rax, [rbp+var_10]
cmp qword ptr [rax+38h], 0
jz short loc_240E4
mov rax, [rbp+var_10]
mov rdi, [rax+38h]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call ma_pvio_tls_read
mov [rbp+var_28], rax
jmp short loc_24113
loc_240E4:
mov rax, [rbp+var_10]
mov rax, [rax+48h]
cmp qword ptr [rax+10h], 0
jz short loc_24111
mov rax, [rbp+var_10]
mov rax, [rax+48h]
mov rax, [rax+10h]
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call rax
mov [rbp+var_28], rax
loc_24111:
jmp short $+2
loc_24113:
lea rax, pvio_callback
cmp qword ptr [rax], 0
jz short loc_24169
lea rax, pvio_callback
mov rax, [rax]
mov [rbp+var_40], rax
loc_2412E:
cmp [rbp+var_40], 0
jz short loc_24167
mov rax, [rbp+var_40]
mov rax, [rax+10h]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov rcx, [rbp+var_10]
mov rsi, [rcx+40h]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_28]
xor edi, edi
call rax
mov rax, [rbp+var_40]
mov rax, [rax+8]
mov [rbp+var_40], rax
jmp short loc_2412E
loc_24167:
jmp short $+2
loc_24169:
cmp [rbp+var_28], 0
jle short loc_24180
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
add rcx, [rax+60h]
mov [rax+60h], rcx
loc_24180:
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_24188:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
| long long ma_pvio_read(_QWORD *a1, long long a2, long long a3)
{
long long async; // [rsp+8h] [rbp-48h]
long long i; // [rsp+10h] [rbp-40h]
char v6; // [rsp+27h] [rbp-29h] BYREF
long long v7; // [rsp+28h] [rbp-28h]
long long v8; // [rsp+30h] [rbp-20h]
long long v9; // [rsp+38h] [rbp-18h]
_QWORD *v10; // [rsp+40h] [rbp-10h]
v10 = a1;
v9 = a2;
v8 = a3;
v7 = -1LL;
if ( !a1 )
return -1LL;
if ( v10[8]
&& *(_QWORD *)(v10[8] + 1152LL)
&& *(_QWORD *)(*(_QWORD *)(v10[8] + 1152LL) + 40LL)
&& *(_BYTE *)(*(_QWORD *)(*(_QWORD *)(v10[8] + 1152LL) + 40LL) + 20LL) )
{
if ( v10[7] )
async = ma_tls_read_async(v10, v9, v8);
else
async = ma_pvio_read_async(v10, v9, v8);
v7 = async;
}
else
{
if ( v10[8] && *(_QWORD *)(v10[8] + 1152LL) && *(_QWORD *)(*(_QWORD *)(v10[8] + 1152LL) + 40LL) )
ma_pvio_blocking(v10, 1LL, &v6);
if ( v10[7] )
{
v7 = ma_pvio_tls_read(v10[7], v9, v8);
}
else if ( *(_QWORD *)(v10[9] + 16LL) )
{
v7 = (*(long long ( **)(_QWORD *, long long, long long))(v10[9] + 16LL))(v10, v9, v8);
}
}
if ( pvio_callback )
{
for ( i = pvio_callback; i; i = *(_QWORD *)(i + 8) )
(*(void ( **)(_QWORD, _QWORD, long long, long long))(i + 16))(0LL, v10[8], v9, v7);
}
if ( v7 > 0 )
v10[12] += v7;
return v7;
}
| ma_pvio_read:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],-0x1
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x00123fe0
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x00124188
LAB_00123fe0:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x40],0x0
JZ 0x00124077
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x00124077
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0x28],0x0
JZ 0x00124077
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOVSX EAX,byte ptr [RAX + 0x14]
CMP EAX,0x0
JZ 0x00124077
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x38],0x0
JZ 0x00124055
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00137f50
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0012406a
LAB_00124055:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x001241a0
MOV qword ptr [RBP + -0x48],RAX
LAB_0012406a:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00124113
LAB_00124077:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x40],0x0
JZ 0x001240bc
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x001240bc
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0x28],0x0
JZ 0x001240bc
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x1
LEA RDX,[RBP + -0x29]
CALL 0x00124320
LAB_001240bc:
JMP 0x001240be
LAB_001240be:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x38],0x0
JZ 0x001240e4
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x38]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00124fb0
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00124113
LAB_001240e4:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x48]
CMP qword ptr [RAX + 0x10],0x0
JZ 0x00124111
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x48]
MOV RAX,qword ptr [RAX + 0x10]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL RAX
MOV qword ptr [RBP + -0x28],RAX
LAB_00124111:
JMP 0x00124113
LAB_00124113:
LEA RAX,[0x161438]
CMP qword ptr [RAX],0x0
JZ 0x00124169
LEA RAX,[0x161438]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
LAB_0012412e:
CMP qword ptr [RBP + -0x40],0x0
JZ 0x00124167
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RCX + 0x40]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x28]
XOR EDI,EDI
CALL RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0012412e
LAB_00124167:
JMP 0x00124169
LAB_00124169:
CMP qword ptr [RBP + -0x28],0x0
JLE 0x00124180
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RAX + 0x60]
MOV qword ptr [RAX + 0x60],RCX
LAB_00124180:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_00124188:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x50
POP RBP
RET
|
long ma_pvio_read(long param_1,int8 param_2,int8 param_3)
{
long local_50;
long local_48;
int1 local_31;
long local_30;
int8 local_28;
int8 local_20;
long local_18;
long local_10;
local_30 = -1;
if (param_1 == 0) {
local_10 = -1;
}
else {
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
if ((((*(long *)(param_1 + 0x40) == 0) || (*(long *)(*(long *)(param_1 + 0x40) + 0x480) == 0))
|| (*(long *)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x28) == 0)) ||
(*(char *)(*(long *)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x28) + 0x14) == '\0')) {
if (((*(long *)(param_1 + 0x40) != 0) && (*(long *)(*(long *)(param_1 + 0x40) + 0x480) != 0))
&& (*(long *)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x28) != 0)) {
ma_pvio_blocking(param_1,1,&local_31);
}
if (*(long *)(local_18 + 0x38) == 0) {
if (*(long *)(*(long *)(local_18 + 0x48) + 0x10) != 0) {
local_30 = (**(code **)(*(long *)(local_18 + 0x48) + 0x10))(local_18,local_20,local_28);
}
}
else {
local_30 = ma_pvio_tls_read(*(int8 *)(local_18 + 0x38),local_20,local_28);
}
}
else {
if (*(long *)(param_1 + 0x38) == 0) {
local_50 = ma_pvio_read_async(param_1,param_2,param_3);
}
else {
local_50 = ma_tls_read_async(param_1,param_2,param_3);
}
local_30 = local_50;
}
if (pvio_callback != 0) {
for (local_48 = pvio_callback; local_48 != 0; local_48 = *(long *)(local_48 + 8)) {
(**(code **)(local_48 + 0x10))(0,*(int8 *)(local_18 + 0x40),local_20,local_30);
}
}
if (0 < local_30) {
*(long *)(local_18 + 0x60) = local_30 + *(long *)(local_18 + 0x60);
}
local_10 = local_30;
}
return local_10;
}
|
|
6,547 | my_rw_init | eloqsql/mysys/thr_rwlock.c | int my_rw_init(my_rw_lock_t *rwp)
{
pthread_condattr_t cond_attr;
pthread_mutex_init( &rwp->lock, MY_MUTEX_INIT_FAST);
pthread_condattr_init( &cond_attr );
pthread_cond_init( &rwp->readers, &cond_attr );
pthread_cond_init( &rwp->writers, &cond_attr );
pthread_condattr_destroy(&cond_attr);
rwp->state = 0;
rwp->waiters = 0;
#ifdef SAFE_MUTEX
rwp->write_thread = 0;
#endif
return(0);
} | O0 | c | my_rw_init:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0xb89789(%rip), %rsi # 0xc83630
callq 0x2a340
leaq -0xc(%rbp), %rdi
callq 0x2a680
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
leaq -0xc(%rbp), %rsi
callq 0x2a370
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
leaq -0xc(%rbp), %rsi
callq 0x2a370
leaq -0xc(%rbp), %rdi
callq 0x2a670
movq -0x8(%rbp), %rax
movl $0x0, 0x88(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8c(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_rw_init:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
lea rsi, my_fast_mutexattr
call _pthread_mutex_init
lea rdi, [rbp+var_C]
call _pthread_condattr_init
mov rdi, [rbp+var_8]
add rdi, 28h ; '('
lea rsi, [rbp+var_C]
call _pthread_cond_init
mov rdi, [rbp+var_8]
add rdi, 58h ; 'X'
lea rsi, [rbp+var_C]
call _pthread_cond_init
lea rdi, [rbp+var_C]
call _pthread_condattr_destroy
mov rax, [rbp+var_8]
mov dword ptr [rax+88h], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+8Ch], 0
xor eax, eax
add rsp, 10h
pop rbp
retn
| long long my_rw_init(long long a1)
{
_BYTE v2[4]; // [rsp+4h] [rbp-Ch] BYREF
long long v3; // [rsp+8h] [rbp-8h]
v3 = a1;
pthread_mutex_init(a1, &my_fast_mutexattr);
pthread_condattr_init(v2);
pthread_cond_init(v3 + 40, v2);
pthread_cond_init(v3 + 88, v2);
pthread_condattr_destroy(v2);
*(_DWORD *)(v3 + 136) = 0;
*(_DWORD *)(v3 + 140) = 0;
return 0LL;
}
| my_rw_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0xd83630]
CALL 0x0012a340
LEA RDI,[RBP + -0xc]
CALL 0x0012a680
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x28
LEA RSI,[RBP + -0xc]
CALL 0x0012a370
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x58
LEA RSI,[RBP + -0xc]
CALL 0x0012a370
LEA RDI,[RBP + -0xc]
CALL 0x0012a670
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x88],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x8c],0x0
XOR EAX,EAX
ADD RSP,0x10
POP RBP
RET
|
int8 my_rw_init(pthread_mutex_t *param_1)
{
pthread_condattr_t local_14;
pthread_mutex_t *local_10;
local_10 = param_1;
pthread_mutex_init(param_1,(pthread_mutexattr_t *)&my_fast_mutexattr);
pthread_condattr_init(&local_14);
pthread_cond_init((pthread_cond_t *)(local_10 + 1),&local_14);
pthread_cond_init((pthread_cond_t *)((long)local_10 + 0x58),&local_14);
pthread_condattr_destroy(&local_14);
*(int4 *)((long)local_10 + 0x88) = 0;
*(int4 *)((long)local_10 + 0x8c) = 0;
return 0;
}
|
|
6,548 | my_init | eloqsql/mysys/my_init.c | my_bool my_init(void)
{
char *str;
if (my_init_done)
return 0;
my_init_done= 1;
mysys_usage_id++;
my_umask= 0660; /* Default umask for new files */
my_umask_dir= 0700; /* Default umask for new directories */
my_global_flags= 0;
/* Default creation of new files */
if ((str= getenv("UMASK")) != 0)
my_umask= (int) (atoi_octal(str) | 0600);
/* Default creation of new dir's */
if ((str= getenv("UMASK_DIR")) != 0)
my_umask_dir= (int) (atoi_octal(str) | 0700);
init_glob_errs();
instrumented_stdin.m_file= stdin;
instrumented_stdin.m_psi= NULL; /* not yet instrumented */
mysql_stdin= & instrumented_stdin;
my_progname_short= "unknown";
if (my_progname)
my_progname_short= my_progname + dirname_length(my_progname);
/* Initialize our mutex handling */
my_mutex_init();
if (my_thread_global_init())
return 1;
#if defined(SAFEMALLOC) && !defined(DBUG_OFF)
dbug_sanity= sf_sanity;
#endif
/* $HOME is needed early to parse configuration files located in ~/ */
if ((home_dir= getenv("HOME")) != 0)
home_dir= intern_filename(home_dir_buff, home_dir);
{
DBUG_ENTER("my_init");
DBUG_PROCESS((char*) (my_progname ? my_progname : "unknown"));
my_time_init();
my_win_init();
DBUG_PRINT("exit", ("home: '%s'", home_dir));
#ifdef _WIN32
if (win32_init_tcp_ip())
DBUG_RETURN(1);
#endif
#ifdef CHECK_UNLIKELY
init_my_likely();
#endif
DBUG_RETURN(0);
}
} | O3 | c | my_init:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x34970e(%rip), %rax # 0x378fc0
cmpb $0x0, (%rax)
je 0x2f8be
xorl %eax, %eax
jmp 0x2f9a6
leaq 0x3496ff(%rip), %rcx # 0x378fc4
incl (%rcx)
movb $0x1, (%rax)
leaq 0x2cad97(%rip), %r14 # 0x2fa668
movl $0x1b0, (%r14) # imm = 0x1B0
leaq 0x2cad8d(%rip), %rbx # 0x2fa66c
movl $0x1c0, (%rbx) # imm = 0x1C0
leaq 0x349bac(%rip), %rax # 0x379498
movq $0x0, (%rax)
leaq 0x35486(%rip), %rdi # 0x64d80
callq 0x24470
testq %rax, %rax
je 0x2f914
movq %rax, %rdi
callq 0x2f9e2
orl $0x180, %eax # imm = 0x180
movl %eax, (%r14)
leaq 0x3546b(%rip), %rdi # 0x64d86
callq 0x24470
testq %rax, %rax
je 0x2f934
movq %rax, %rdi
callq 0x2f9e2
orl $0x1c0, %eax # imm = 0x1C0
movl %eax, (%rbx)
callq 0x34690
movq 0x2ca680(%rip), %rax # 0x2f9fc0
movq (%rax), %rax
movq %rax, 0x349686(%rip) # 0x378fd0
leaq 0x34967f(%rip), %rax # 0x378fd0
movq $0x0, 0x34967c(%rip) # 0x378fd8
leaq 0x349665(%rip), %rcx # 0x378fc8
movq %rax, (%rcx)
leaq 0x35423(%rip), %rax # 0x64d90
leaq 0x349704(%rip), %r14 # 0x379078
movq %rax, (%r14)
leaq 0x3496f2(%rip), %rax # 0x379070
movq (%rax), %rbx
testq %rbx, %rbx
je 0x2f994
movq %rbx, %rdi
callq 0x2a654
addq %rbx, %rax
movq %rax, (%r14)
callq 0x31e6c
callq 0x31a34
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
je 0x2f9ab
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x35dba(%rip), %rdi # 0x6576c
callq 0x24470
leaq 0x3496aa(%rip), %rbx # 0x379068
movq %rax, (%rbx)
testq %rax, %rax
je 0x2f9d8
leaq 0x3498b3(%rip), %rdi # 0x379280
movq %rax, %rsi
callq 0x34f49
movq %rax, (%rbx)
callq 0x36c0c
jmp 0x2f8b7
| my_init:
push rbp
mov rbp, rsp
push r14
push rbx
lea rax, my_init_done
cmp byte ptr [rax], 0
jz short loc_2F8BE
loc_2F8B7:
xor eax, eax
jmp loc_2F9A6
loc_2F8BE:
lea rcx, mysys_usage_id
inc dword ptr [rcx]
mov byte ptr [rax], 1
lea r14, my_umask
mov dword ptr [r14], 1B0h
lea rbx, my_umask_dir
mov dword ptr [rbx], 1C0h
lea rax, my_global_flags
mov qword ptr [rax], 0
lea rdi, aUmask; "UMASK"
call _getenv
test rax, rax
jz short loc_2F914
mov rdi, rax
call atoi_octal
or eax, 180h
mov [r14], eax
loc_2F914:
lea rdi, aUmaskDir; "UMASK_DIR"
call _getenv
test rax, rax
jz short loc_2F934
mov rdi, rax
call atoi_octal
or eax, 1C0h
mov [rbx], eax
loc_2F934:
call init_glob_errs
mov rax, cs:stdin_ptr
mov rax, [rax]
mov cs:instrumented_stdin, rax
lea rax, instrumented_stdin
mov cs:qword_378FD8, 0
lea rcx, mysql_stdin
mov [rcx], rax
lea rax, aUnknown; "unknown"
lea r14, my_progname_short
mov [r14], rax
lea rax, my_progname
mov rbx, [rax]
test rbx, rbx
jz short loc_2F994
mov rdi, rbx
call dirname_length
add rax, rbx
mov [r14], rax
loc_2F994:
call my_mutex_init
call my_thread_global_init
mov ecx, eax
mov al, 1
test cl, cl
jz short loc_2F9AB
loc_2F9A6:
pop rbx
pop r14
pop rbp
retn
loc_2F9AB:
lea rdi, aMariadbHome+8; "HOME"
call _getenv
lea rbx, home_dir
mov [rbx], rax
test rax, rax
jz short loc_2F9D8
lea rdi, home_dir_buff
mov rsi, rax
call intern_filename
mov [rbx], rax
loc_2F9D8:
call my_time_init
jmp loc_2F8B7
| char my_init()
{
char result; // al
long long v1; // rax
long long v2; // rax
const char *v3; // rbx
char v4; // cl
long long v5; // rax
if ( my_init_done )
return 0;
++mysys_usage_id;
my_init_done = 1;
my_umask = 432;
my_umask_dir = 448;
my_global_flags = 0LL;
v1 = getenv("UMASK");
if ( v1 )
my_umask = atoi_octal(v1) | 0x180;
v2 = getenv("UMASK_DIR");
if ( v2 )
my_umask_dir = atoi_octal(v2) | 0x1C0;
init_glob_errs();
instrumented_stdin = stdin;
qword_378FD8 = 0LL;
mysql_stdin = &instrumented_stdin;
my_progname_short = "unknown";
v3 = my_progname;
if ( my_progname )
my_progname_short = &v3[dirname_length(my_progname)];
my_mutex_init();
v4 = my_thread_global_init();
result = 1;
if ( !v4 )
{
v5 = getenv("HOME");
home_dir = v5;
if ( v5 )
home_dir = intern_filename(&home_dir_buff, v5);
my_time_init();
return 0;
}
return result;
}
| my_init:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
LEA RAX,[0x478fc0]
CMP byte ptr [RAX],0x0
JZ 0x0012f8be
LAB_0012f8b7:
XOR EAX,EAX
JMP 0x0012f9a6
LAB_0012f8be:
LEA RCX,[0x478fc4]
INC dword ptr [RCX]
MOV byte ptr [RAX],0x1
LEA R14,[0x3fa668]
MOV dword ptr [R14],0x1b0
LEA RBX,[0x3fa66c]
MOV dword ptr [RBX],0x1c0
LEA RAX,[0x479498]
MOV qword ptr [RAX],0x0
LEA RDI,[0x164d80]
CALL 0x00124470
TEST RAX,RAX
JZ 0x0012f914
MOV RDI,RAX
CALL 0x0012f9e2
OR EAX,0x180
MOV dword ptr [R14],EAX
LAB_0012f914:
LEA RDI,[0x164d86]
CALL 0x00124470
TEST RAX,RAX
JZ 0x0012f934
MOV RDI,RAX
CALL 0x0012f9e2
OR EAX,0x1c0
MOV dword ptr [RBX],EAX
LAB_0012f934:
CALL 0x00134690
MOV RAX,qword ptr [0x003f9fc0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [0x00478fd0],RAX
LEA RAX,[0x478fd0]
MOV qword ptr [0x00478fd8],0x0
LEA RCX,[0x478fc8]
MOV qword ptr [RCX],RAX
LEA RAX,[0x164d90]
LEA R14,[0x479078]
MOV qword ptr [R14],RAX
LEA RAX,[0x479070]
MOV RBX,qword ptr [RAX]
TEST RBX,RBX
JZ 0x0012f994
MOV RDI,RBX
CALL 0x0012a654
ADD RAX,RBX
MOV qword ptr [R14],RAX
LAB_0012f994:
CALL 0x00131e6c
CALL 0x00131a34
MOV ECX,EAX
MOV AL,0x1
TEST CL,CL
JZ 0x0012f9ab
LAB_0012f9a6:
POP RBX
POP R14
POP RBP
RET
LAB_0012f9ab:
LEA RDI,[0x16576c]
CALL 0x00124470
LEA RBX,[0x479068]
MOV qword ptr [RBX],RAX
TEST RAX,RAX
JZ 0x0012f9d8
LEA RDI,[0x479280]
MOV RSI,RAX
CALL 0x00134f49
MOV qword ptr [RBX],RAX
LAB_0012f9d8:
CALL 0x00136c0c
JMP 0x0012f8b7
|
int8 my_init(void)
{
long lVar1;
char cVar2;
uint uVar3;
char *pcVar4;
long lVar5;
if (my_init_done == '\0') {
mysys_usage_id = mysys_usage_id + 1;
my_init_done = '\x01';
my_umask = 0x1b0;
my_umask_dir = 0x1c0;
my_global_flags = 0;
pcVar4 = getenv("UMASK");
if (pcVar4 != (char *)0x0) {
uVar3 = atoi_octal(pcVar4);
my_umask = uVar3 | 0x180;
}
pcVar4 = getenv("UMASK_DIR");
if (pcVar4 != (char *)0x0) {
uVar3 = atoi_octal(pcVar4);
my_umask_dir = uVar3 | 0x1c0;
}
init_glob_errs();
lVar1 = my_progname;
instrumented_stdin._0_8_ = *(int8 *)PTR_stdin_003f9fc0;
instrumented_stdin._8_8_ = 0;
mysql_stdin = instrumented_stdin;
my_progname_short = "unknown";
if (my_progname != 0) {
lVar5 = dirname_length(my_progname);
my_progname_short = (char *)(lVar5 + lVar1);
}
my_mutex_init();
cVar2 = my_thread_global_init();
if (cVar2 != '\0') {
return 1;
}
home_dir = getenv("HOME");
if (home_dir != (char *)0x0) {
home_dir = (char *)intern_filename(home_dir_buff,home_dir);
}
my_time_init();
}
return 0;
}
|
|
6,549 | mi_ft_parserecord | eloqsql/storage/myisam/ft_update.c | FT_WORD *_mi_ft_parserecord(MI_INFO *info, uint keynr, const uchar *record,
MEM_ROOT *mem_root)
{
TREE ptree;
MYSQL_FTPARSER_PARAM *param;
DBUG_ENTER("_mi_ft_parserecord");
if (! (param= ftparser_call_initializer(info, keynr, 0)))
DBUG_RETURN(NULL);
bzero((char*) &ptree, sizeof(ptree));
param->flags= 0;
if (_mi_ft_parse(&ptree, info, keynr, record, param, mem_root))
DBUG_RETURN(NULL);
DBUG_RETURN(ft_linearize(&ptree, mem_root));
} | O3 | c | mi_ft_parserecord:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2a8, %rsp # imm = 0x2A8
movq %rcx, -0x30(%rbp)
movq %rdx, %r15
movl %esi, %r12d
movq %rdi, %r13
xorl %r14d, %r14d
xorl %edx, %edx
callq 0x4a299
testq %rax, %rax
je 0x4a980
movq %rax, %rbx
leaq -0x2c8(%rbp), %rdi
xorl %r14d, %r14d
movl $0x298, %edx # imm = 0x298
xorl %esi, %esi
callq 0x281f0
movl $0x0, 0x34(%rbx)
leaq -0x2c8(%rbp), %rdi
movq %r13, %rsi
movl %r12d, %edx
movq %r15, %rcx
movq %rbx, %r8
movq -0x30(%rbp), %rbx
movq %rbx, %r9
callq 0x4a82e
testl %eax, %eax
jne 0x4a980
leaq -0x2c8(%rbp), %rdi
movq %rbx, %rsi
callq 0x49a88
movq %rax, %r14
movq %r14, %rax
addq $0x2a8, %rsp # imm = 0x2A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _mi_ft_parserecord:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 2A8h
mov [rbp+var_30], rcx
mov r15, rdx
mov r12d, esi
mov r13, rdi
xor r14d, r14d
xor edx, edx
call ftparser_call_initializer
test rax, rax
jz short loc_4A980
mov rbx, rax
lea rdi, [rbp+var_2C8]
xor r14d, r14d
mov edx, 298h
xor esi, esi
call _memset
mov dword ptr [rbx+34h], 0
lea rdi, [rbp+var_2C8]
mov rsi, r13
mov edx, r12d
mov rcx, r15
mov r8, rbx
mov rbx, [rbp+var_30]
mov r9, rbx
call _mi_ft_parse
test eax, eax
jnz short loc_4A980
lea rdi, [rbp+var_2C8]
mov rsi, rbx
call ft_linearize
mov r14, rax
loc_4A980:
mov rax, r14
add rsp, 2A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _QWORD * mi_ft_parserecord(_QWORD *a1, unsigned int a2, long long a3, long long a4)
{
long long v5; // r14
long long v6; // rax
long long v7; // rbx
long long v8; // r8
long long v9; // rbx
_QWORD v11[83]; // [rsp+8h] [rbp-2C8h] BYREF
long long v12; // [rsp+2A0h] [rbp-30h]
v12 = a4;
v5 = 0LL;
v6 = ftparser_call_initializer(a1, a2, 0);
if ( v6 )
{
v7 = v6;
v5 = 0LL;
memset(v11, 0LL, sizeof(v11));
*(_DWORD *)(v7 + 52) = 0;
v8 = v7;
v9 = v12;
if ( !(unsigned int)mi_ft_parse(v11, (long long)a1, a2, a3, v8, v12) )
return ft_linearize((long long)v11, v9);
}
return (_QWORD *)v5;
}
| _mi_ft_parserecord:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x2a8
MOV qword ptr [RBP + -0x30],RCX
MOV R15,RDX
MOV R12D,ESI
MOV R13,RDI
XOR R14D,R14D
XOR EDX,EDX
CALL 0x0014a299
TEST RAX,RAX
JZ 0x0014a980
MOV RBX,RAX
LEA RDI,[RBP + -0x2c8]
XOR R14D,R14D
MOV EDX,0x298
XOR ESI,ESI
CALL 0x001281f0
MOV dword ptr [RBX + 0x34],0x0
LEA RDI,[RBP + -0x2c8]
MOV RSI,R13
MOV EDX,R12D
MOV RCX,R15
MOV R8,RBX
MOV RBX,qword ptr [RBP + -0x30]
MOV R9,RBX
CALL 0x0014a82e
TEST EAX,EAX
JNZ 0x0014a980
LEA RDI,[RBP + -0x2c8]
MOV RSI,RBX
CALL 0x00149a88
MOV R14,RAX
LAB_0014a980:
MOV RAX,R14
ADD RSP,0x2a8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
_mi_ft_parserecord(int8 param_1,ulong param_2,int8 param_3,int8 param_4)
{
int8 uVar1;
int iVar2;
long lVar3;
int8 uVar4;
int1 local_2d0 [664];
int8 local_38;
uVar4 = 0;
local_38 = param_4;
lVar3 = ftparser_call_initializer(param_1,param_2,0);
if (lVar3 != 0) {
uVar4 = 0;
memset(local_2d0,0,0x298);
uVar1 = local_38;
*(int4 *)(lVar3 + 0x34) = 0;
iVar2 = _mi_ft_parse(local_2d0,param_1,param_2 & 0xffffffff,param_3,lVar3,local_38);
if (iVar2 == 0) {
uVar4 = ft_linearize(local_2d0,uVar1);
}
}
return uVar4;
}
|
|
6,550 | tbb::detail::r1::sleep_node<tbb::detail::r1::market_context>::wait() | aimrt_mujoco_sim/_deps/tbb-src/src/tbb/concurrent_monitor.h | void wait() override {
__TBB_ASSERT(this->my_initialized,
"Use of commit_wait() without prior prepare_wait()");
semaphore().P();
__TBB_ASSERT(!this->my_is_in_list.load(std::memory_order_relaxed), "Still in the queue?");
if (this->my_aborted)
throw_exception(exception_id::user_abort);
} | O0 | c | tbb::detail::r1::sleep_node<tbb::detail::r1::market_context>::wait():
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x701100
movq %rax, %rdi
callq 0x6c9af0
movq 0x8(%rsp), %rax
testb $0x1, 0x2b(%rax)
je 0x7010a5
movl $0x3, %edi
callq 0x6bd120
addq $0x18, %rsp
retq
nopw (%rax,%rax)
| _ZN3tbb6detail2r110sleep_nodeINS1_14market_contextEE4waitEv:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov rdi, [rsp+18h+var_8]
mov [rsp+18h+var_10], rdi
call _ZN3tbb6detail2r110sleep_nodeINS1_14market_contextEE9semaphoreEv; tbb::detail::r1::sleep_node<tbb::detail::r1::market_context>::semaphore(void)
mov rdi, rax; this
call _ZN3tbb6detail2r116binary_semaphore1PEv; tbb::detail::r1::binary_semaphore::P(void)
mov rax, [rsp+18h+var_10]
test byte ptr [rax+2Bh], 1
jz short loc_7010A5
mov edi, 3
call _ZN3tbb6detail2r115throw_exceptionENS0_2d012exception_idE; tbb::detail::r1::throw_exception(tbb::detail::d0::exception_id)
loc_7010A5:
add rsp, 18h
retn
| long long tbb::detail::r1::sleep_node<tbb::detail::r1::market_context>::wait(long long a1)
{
tbb::detail::r1::binary_semaphore *v1; // rax
long long result; // rax
v1 = (tbb::detail::r1::binary_semaphore *)tbb::detail::r1::sleep_node<tbb::detail::r1::market_context>::semaphore(a1);
tbb::detail::r1::binary_semaphore::P(v1);
result = a1;
if ( (*(_BYTE *)(a1 + 43) & 1) != 0 )
return tbb::detail::r1::throw_exception(3LL);
return result;
}
| construct_at<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RDI,qword ptr [RSP + 0x10]
MOV qword ptr [RSP],RDI
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x002dac60
MOV RAX,qword ptr [RSP]
ADD RSP,0x18
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* decltype (::new ((void*)(0)) std::vector<std::__cxx11::string,
std::allocator<std::__cxx11::string > >((std::declval<std::vector<std::__cxx11::string,
std::allocator<std::__cxx11::string > > >)()))
std::construct_at<std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >,
std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >
>(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >*,
std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >&&) */
vector * std::
construct_at<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
(vector *param_1,vector *param_2)
{
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1,param_2);
return param_1;
}
|
|
6,551 | nlohmann::json_abi_v3_11_3::detail::output_adapter<char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::output_adapter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) | monkey531[P]llama/common/json.hpp | output_adapter(StringType& s)
: oa(std::make_shared<output_string_adapter<CharType, StringType>>(s)) {} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::output_adapter<char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::output_adapter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&):
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x6b805
leaq 0x8(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%rbx)
andq $0x0, -0x8(%rdi)
callq 0x30a1a
addq $0x10, %rsp
popq %rbx
retq
| _ZN8nlohmann16json_abi_v3_11_36detail14output_adapterIcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2ERS8_:
push rbx
sub rsp, 10h
mov rbx, rdi
mov rdi, rsp
call _ZSt11make_sharedIN8nlohmann16json_abi_v3_11_36detail21output_string_adapterIcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEJRS9_EESt10shared_ptrIT_EDpOT0_; std::make_shared<nlohmann::json_abi_v3_11_3::detail::output_string_adapter<char,std::string>,std::string&>(std::string&)
lea rdi, [rsp+18h+var_10]
movaps xmm0, xmmword ptr [rdi-8]
and qword ptr [rdi], 0
movups xmmword ptr [rbx], xmm0
and qword ptr [rdi-8], 0
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
add rsp, 10h
pop rbx
retn
| long long nlohmann::json_abi_v3_11_3::detail::output_adapter<char,std::string>::output_adapter(_OWORD *a1)
{
__int128 v1; // xmm0
__int128 v3; // [rsp+0h] [rbp-18h] BYREF
std::make_shared<nlohmann::json_abi_v3_11_3::detail::output_string_adapter<char,std::string>,std::string&>(&v3);
v1 = v3;
*((_QWORD *)&v3 + 1) = 0LL;
*a1 = v1;
*(_QWORD *)&v3 = 0LL;
return std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v3 + 1);
}
| output_adapter:
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
MOV RDI,RSP
CALL 0x0016b805
LEA RDI,[RSP + 0x8]
MOVAPS XMM0,xmmword ptr [RDI + -0x8]
AND qword ptr [RDI],0x0
MOVUPS xmmword ptr [RBX],XMM0
AND qword ptr [RDI + -0x8],0x0
CALL 0x00130a1a
ADD RSP,0x10
POP RBX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::output_adapter<char, std::__cxx11::string
>::output_adapter(std::__cxx11::string&) */
void nlohmann::json_abi_v3_11_3::detail::output_adapter<char,std::__cxx11::string>::output_adapter
(string *param_1)
{
int8 uVar1;
int8 local_18;
int8 uStack_10;
std::
make_shared<nlohmann::json_abi_v3_11_3::detail::output_string_adapter<char,std::__cxx11::string>,std::__cxx11::string&>
((string *)&local_18);
uVar1 = uStack_10;
uStack_10 = 0;
*(int8 *)param_1 = local_18;
*(int8 *)(param_1 + 8) = uVar1;
local_18 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_10);
return;
}
|
|
6,552 | nglog::base_logging::LogStreamBuf::~LogStreamBuf() | ng-log[P]ng-log/src/ng-log/logging.h | class NGLOG_EXPORT LogStreamBuf : public std::streambuf {
public:
// REQUIREMENTS: "len" must be >= 2 to account for the '\n' and '\0'.
LogStreamBuf(char* buf, int len) { setp(buf, buf + len - 2); }
// This effectively ignores overflow.
int_type overflow(int_type ch) { return ch; }
// Legacy public ostrstream method.
size_t pcount() const { return static_cast<size_t>(pptr() - pbase()); }
char* pbase() const { return std::streambuf::pbase(); }
} | O0 | c | nglog::base_logging::LogStreamBuf::~LogStreamBuf():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x9e70
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ZN5nglog12base_logging12LogStreamBufD2Ev:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
call __ZNSt15basic_streambufIcSt11char_traitsIcEED2Ev; std::streambuf::~streambuf()
add rsp, 10h
pop rbp
retn
| void nglog::base_logging::LogStreamBuf::~LogStreamBuf(nglog::base_logging::LogStreamBuf *this)
{
std::streambuf::~streambuf(this);
}
| ~LogStreamBuf:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00109e70
ADD RSP,0x10
POP RBP
RET
|
/* nglog::base_logging::LogStreamBuf::~LogStreamBuf() */
void __thiscall nglog::base_logging::LogStreamBuf::~LogStreamBuf(LogStreamBuf *this)
{
std::streambuf::~streambuf((streambuf *)this);
return;
}
|
|
6,553 | my_numchars_mb | eloqsql/strings/ctype-mb.c | size_t my_numchars_mb(CHARSET_INFO *cs __attribute__((unused)),
const char *pos, const char *end)
{
register size_t count= 0;
while (pos < end)
{
uint mb_len;
pos+= (mb_len= my_ismbchar(cs,pos,end)) ? mb_len : 1;
count++;
}
return count;
} | O0 | c | my_numchars_mb:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x4916f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x48630
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
je 0x49147
movl -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x49151
movl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x49151
movl -0x28(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x4911c
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| my_numchars_mb:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], 0
loc_4911C:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_18]
jnb short loc_4916F
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call my_ismbchar_0
mov [rbp+var_24], eax
cmp eax, 0
jz short loc_49147
mov eax, [rbp+var_24]
mov [rbp+var_28], eax
jmp short loc_49151
loc_49147:
mov eax, 1
mov [rbp+var_28], eax
jmp short $+2
loc_49151:
mov ecx, [rbp+var_28]
mov rax, [rbp+var_10]
mov ecx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_4911C
loc_4916F:
mov rax, [rbp+var_20]
add rsp, 30h
pop rbp
retn
| long long my_numchars_mb(long long a1, unsigned long long a2, unsigned long long a3)
{
unsigned int v4; // [rsp+8h] [rbp-28h]
unsigned int v5; // [rsp+Ch] [rbp-24h]
long long v6; // [rsp+10h] [rbp-20h]
v6 = 0LL;
while ( a2 < a3 )
{
v5 = my_ismbchar_0(a1, a2, a3);
if ( v5 )
v4 = v5;
else
v4 = 1;
a2 += v4;
++v6;
}
return v6;
}
| my_numchars_mb:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],0x0
LAB_0014911c:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x0014916f
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x00148630
MOV dword ptr [RBP + -0x24],EAX
CMP EAX,0x0
JZ 0x00149147
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x28],EAX
JMP 0x00149151
LAB_00149147:
MOV EAX,0x1
MOV dword ptr [RBP + -0x28],EAX
JMP 0x00149151
LAB_00149151:
MOV ECX,dword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0014911c
LAB_0014916f:
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x30
POP RBP
RET
|
long my_numchars_mb(int8 param_1,ulong param_2,ulong param_3)
{
int4 local_30;
int8 local_28;
int8 local_18;
local_28 = 0;
for (local_18 = param_2; local_18 < param_3; local_18 = local_18 + local_30) {
local_30 = my_ismbchar(param_1,local_18,param_3);
if (local_30 == 0) {
local_30 = 1;
}
local_28 = local_28 + 1;
}
return local_28;
}
|
|
6,554 | long minja::Value::get<long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, long) const | monkey531[P]llama/common/minja.hpp | T get(const std::string & key, T default_value) const {
if (!contains(key)) return default_value;
return at(key).get<T>();
} | O1 | cpp | long minja::Value::get<long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, long) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
callq 0x95712
testb %al, %al
je 0xaee96
movq %rsp, %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8c1f0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x952d6
movq %rax, %rdi
callq 0x88164
movq %rax, %rbx
leaq 0x40(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x59822
movq %r14, %rdi
callq 0x5f00e
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0xaee42
callq 0x6e97a
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0xaee51
callq 0x6e97a
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0xaee60
callq 0x6e97a
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xaee96
movq 0x80117(%rip), %rax # 0x12ef88
cmpb $0x0, (%rax)
je 0xaee81
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xaee8b
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xaee96
movq (%rdi), %rax
callq *0x18(%rax)
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x880d8
movq %rbx, %rdi
callq 0x1bfc0
| _ZNK5minja5Value3getIlEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES2_:
push r15
push r14
push rbx
sub rsp, 50h
mov rbx, rdx
mov r15, rsi
mov r14, rdi
call _ZNK5minja5Value8containsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::contains(std::string const&)
test al, al
jz loc_AEE96
mov rbx, rsp
mov rdi, rbx
mov rsi, r15
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rdi, r14; this
mov rsi, rbx; minja::Value *
call _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&)
mov rdi, rax
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
mov rbx, rax
lea r14, [rsp+68h+var_28]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [r14-8]
test rdi, rdi
jz short loc_AEE42
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_AEE42:
mov rdi, [rsp+68h+var_40]
test rdi, rdi
jz short loc_AEE51
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_AEE51:
mov rdi, [rsp+68h+var_50]
test rdi, rdi
jz short loc_AEE60
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_AEE60:
mov rdi, [rsp+68h+var_60]
test rdi, rdi
jz short loc_AEE96
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_AEE81
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_AEE8B
loc_AEE81:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_AEE8B:
cmp eax, 1
jnz short loc_AEE96
mov rax, [rdi]
call qword ptr [rax+18h]
loc_AEE96:
mov rax, rbx
add rsp, 50h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
mov rdi, rsp; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, rbx
call __Unwind_Resume
| long long minja::Value::get<long>(minja::Value *this, long long a2, long long a3)
{
unsigned long long v4; // rax
long long v5; // rdi
signed __int32 v6; // eax
long long v8; // [rsp+0h] [rbp-68h] BYREF
long long v9; // [rsp+8h] [rbp-60h]
volatile signed __int32 *v10; // [rsp+18h] [rbp-50h]
volatile signed __int32 *v11; // [rsp+28h] [rbp-40h]
volatile signed __int32 *v12; // [rsp+38h] [rbp-30h]
char v13[40]; // [rsp+40h] [rbp-28h] BYREF
if ( minja::Value::contains((long long)this, a2) )
{
minja::Value::Value((long long)&v8, a2);
v4 = minja::Value::at(this, (const minja::Value *)&v8);
a3 = minja::Value::get<long>(v4);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v13);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v13);
if ( v12 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v12);
if ( v11 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11);
if ( v10 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v10);
v5 = v9;
if ( v9 )
{
if ( _libc_single_threaded )
{
v6 = *(_DWORD *)(v9 + 12);
*(_DWORD *)(v9 + 12) = v6 - 1;
}
else
{
v6 = _InterlockedExchangeAdd((volatile signed __int32 *)(v9 + 12), 0xFFFFFFFF);
}
if ( v6 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v5 + 24LL))(v5, 0LL);
}
}
return a3;
}
| get<long>:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV RBX,RDX
MOV R15,RSI
MOV R14,RDI
CALL 0x00195712
TEST AL,AL
JZ 0x001aee96
MOV RBX,RSP
MOV RDI,RBX
MOV RSI,R15
CALL 0x0018c1f0
LAB_001aee07:
MOV RDI,R14
MOV RSI,RBX
CALL 0x001952d6
MOV RDI,RAX
CALL 0x00188164
LAB_001aee1a:
MOV RBX,RAX
LEA R14,[RSP + 0x40]
MOV RDI,R14
XOR ESI,ESI
CALL 0x00159822
MOV RDI,R14
CALL 0x0015f00e
MOV RDI,qword ptr [R14 + -0x8]
TEST RDI,RDI
JZ 0x001aee42
CALL 0x0016e97a
LAB_001aee42:
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x001aee51
CALL 0x0016e97a
LAB_001aee51:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x001aee60
CALL 0x0016e97a
LAB_001aee60:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x001aee96
MOV RAX,qword ptr [0x0022ef88]
CMP byte ptr [RAX],0x0
JZ 0x001aee81
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001aee8b
LAB_001aee81:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001aee8b:
CMP EAX,0x1
JNZ 0x001aee96
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001aee96:
MOV RAX,RBX
ADD RSP,0x50
POP RBX
POP R14
POP R15
RET
|
/* long minja::Value::get<long>(std::__cxx11::string const&, long) const */
long __thiscall minja::Value::get<long>(Value *this,string *param_1,long param_2)
{
int *piVar1;
char cVar2;
int iVar3;
Value *this_00;
Value aVStack_68 [8];
long *local_60;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_30;
data local_28 [16];
cVar2 = contains(this,param_1);
if (cVar2 != '\0') {
Value(aVStack_68,param_1);
/* try { // try from 001aee07 to 001aee19 has its CatchHandler @ 001aeea3 */
this_00 = (Value *)at(this,aVStack_68);
param_2 = get<long>(this_00);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_28,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_28);
if (local_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_30);
}
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40);
}
if (local_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_50);
}
if (local_60 != (long *)0x0) {
if (*PTR___libc_single_threaded_0022ef88 == '\0') {
LOCK();
piVar1 = (int *)((long)local_60 + 0xc);
iVar3 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar3 = *(int *)((long)local_60 + 0xc);
*(int *)((long)local_60 + 0xc) = iVar3 + -1;
}
if (iVar3 == 1) {
(**(code **)(*local_60 + 0x18))();
}
}
}
return param_2;
}
|
|
6,555 | ImPlot3D::SetupAxisTicks(int, double, double, int, char const* const*, bool) | zkingston[P]unknot/build_O0/_deps/implot3d-src/implot3d.cpp | void SetupAxisTicks(ImAxis3D idx, double v_min, double v_max, int n_ticks, const char* const labels[], bool keep_default) {
ImPlot3DContext& gp = *GImPlot3D;
IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr && !gp.CurrentPlot->SetupLocked,
"Setup needs to be called after BeginPlot and before any setup locking functions (e.g. PlotX)!");
n_ticks = n_ticks < 2 ? 2 : n_ticks;
ImVector<double> temp;
FillRange(temp, n_ticks, v_min, v_max);
SetupAxisTicks(idx, temp.Data, n_ticks, labels, keep_default);
} | O0 | cpp | ImPlot3D::SetupAxisTicks(int, double, double, int, char const* const*, bool):
subq $0x68, %rsp
movb %cl, %al
movl %edi, 0x64(%rsp)
movsd %xmm0, 0x58(%rsp)
movsd %xmm1, 0x50(%rsp)
movl %esi, 0x4c(%rsp)
movq %rdx, 0x40(%rsp)
andb $0x1, %al
movb %al, 0x3f(%rsp)
movq 0x5be25c(%rip), %rax # 0x68f638
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
cmpq $0x0, 0x28(%rax)
je 0xd13ff
movq 0x30(%rsp), %rax
movq 0x28(%rax), %rax
testb $0x1, 0x1e8(%rax)
je 0xd1413
leaq 0x500e8e(%rip), %rdi # 0x5d2294
callq 0x4f7220
testb $0x1, %al
jne 0xd1411
jmp 0xd1413
jmp 0xd1413
jmp 0xd1415
cmpl $0x2, 0x4c(%rsp)
jge 0xd1427
movl $0x2, %eax
movl %eax, 0x10(%rsp)
jmp 0xd142f
movl 0x4c(%rsp), %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
movl %eax, 0x4c(%rsp)
leaq 0x20(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xd97e0
movq 0x8(%rsp), %rdi
movl 0x4c(%rsp), %esi
movsd 0x58(%rsp), %xmm0
movsd 0x50(%rsp), %xmm1
callq 0xd9800
jmp 0xd1462
movl 0x64(%rsp), %edi
movq 0x28(%rsp), %rsi
movl 0x4c(%rsp), %edx
movq 0x40(%rsp), %rcx
movzbl 0x3f(%rsp), %r8d
andl $0x1, %r8d
callq 0xd1260
jmp 0xd1485
leaq 0x20(%rsp), %rdi
callq 0xd98b0
addq $0x68, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
leaq 0x20(%rsp), %rdi
callq 0xd98b0
movq 0x18(%rsp), %rdi
callq 0x13540
nopw %cs:(%rax,%rax)
| _ZN8ImPlot3D14SetupAxisTicksEiddiPKPKcb:
sub rsp, 68h
mov al, cl
mov [rsp+68h+var_4], edi
movsd [rsp+68h+var_10], xmm0
movsd [rsp+68h+var_1C+4], xmm1
mov dword ptr [rsp+68h+var_1C], esi
mov qword ptr [rsp+68h+var_28], rdx
and al, 1
mov [rsp+68h+var_29], al
mov rax, cs:_ZN8ImPlot3D9GImPlot3DE; ImPlot3D::GImPlot3D
mov [rsp+68h+var_38], rax
mov rax, [rsp+68h+var_38]
cmp qword ptr [rax+28h], 0
jz short loc_D13FF
mov rax, [rsp+68h+var_38]
mov rax, [rax+28h]
test byte ptr [rax+1E8h], 1
jz short loc_D1413
loc_D13FF:
lea rdi, aSetupNeedsToBe; "Setup needs to be called after BeginPlo"...
call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*)
test al, 1
jnz short loc_D1411
jmp short loc_D1413
loc_D1411:
jmp short $+2
loc_D1413:
jmp short $+2
loc_D1415:
cmp dword ptr [rsp+68h+var_1C], 2
jge short loc_D1427
mov eax, 2
mov [rsp+68h+var_58], eax
jmp short loc_D142F
loc_D1427:
mov eax, dword ptr [rsp+68h+var_1C]
mov [rsp+68h+var_58], eax
loc_D142F:
mov eax, [rsp+68h+var_58]
mov dword ptr [rsp+68h+var_1C], eax
lea rdi, [rsp+68h+var_48]
mov [rsp+68h+var_60], rdi
call _ZN8ImVectorIdEC2Ev; ImVector<double>::ImVector(void)
mov rdi, [rsp+68h+var_60]
mov esi, dword ptr [rsp+68h+var_1C]
movsd xmm0, [rsp+68h+var_10]
movsd xmm1, [rsp+68h+var_1C+4]
call _ZN8ImPlot3D9FillRangeIdEEvR8ImVectorIT_EiS2_S2_; ImPlot3D::FillRange<double>(ImVector<double> &,int,double,double)
jmp short $+2
loc_D1462:
mov edi, [rsp+68h+var_4]; this
mov rsi, qword ptr [rsp+68h+var_40]; int
mov edx, dword ptr [rsp+68h+var_1C]; double *
mov rcx, qword ptr [rsp+68h+var_28]; int
movzx r8d, [rsp+68h+var_29]
and r8d, 1; char **
call _ZN8ImPlot3D14SetupAxisTicksEiPKdiPKPKcb; ImPlot3D::SetupAxisTicks(int,double const*,int,char const* const*,bool)
jmp short $+2
loc_D1485:
lea rdi, [rsp+68h+var_48]
call _ZN8ImVectorIdED2Ev; ImVector<double>::~ImVector()
add rsp, 68h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_10], rcx
mov [rsp+arg_C], eax
lea rdi, [rsp+arg_18]
call _ZN8ImVectorIdED2Ev; ImVector<double>::~ImVector()
mov rdi, [rsp+arg_10]
call __Unwind_Resume
| long long ImPlot3D::SetupAxisTicks(
ImPlot3D *this,
const char *a2,
double a3,
double a4,
long long a5,
const char *const *a6)
{
int v7; // [rsp+10h] [rbp-58h]
_BYTE v8[8]; // [rsp+20h] [rbp-48h] BYREF
int v9[2]; // [rsp+28h] [rbp-40h]
long long v10; // [rsp+30h] [rbp-38h]
char v11; // [rsp+3Fh] [rbp-29h]
int v12[2]; // [rsp+40h] [rbp-28h]
int v13; // [rsp+4Ch] [rbp-1Ch]
double v14; // [rsp+50h] [rbp-18h]
double v15; // [rsp+58h] [rbp-10h]
unsigned int v16; // [rsp+64h] [rbp-4h]
v16 = (unsigned int)this;
v15 = a3;
v14 = a4;
v13 = (int)a2;
*(_QWORD *)v12 = a5;
v11 = (unsigned __int8)a6 & 1;
v10 = ImPlot3D::GImPlot3D;
if ( !*(_QWORD *)(ImPlot3D::GImPlot3D + 40) || (*(_BYTE *)(*(_QWORD *)(v10 + 40) + 488LL) & 1) != 0 )
ImGui::ErrorLog(
(ImGui *)"Setup needs to be called after BeginPlot and before any setup locking functions (e.g. PlotX)!",
a2);
if ( v13 >= 2 )
v7 = v13;
else
v7 = 2;
v13 = v7;
ImVector<double>::ImVector();
ImPlot3D::FillRange<double>(v8, (unsigned int)v13, v15, v14);
ImPlot3D::SetupAxisTicks(
(ImPlot3D *)v16,
*(char **)v9,
(const double *)(unsigned int)v13,
*(const double **)v12,
(const char *const *)(v11 & 1));
return ImVector<double>::~ImVector(v8);
}
| SetupAxisTicks:
SUB RSP,0x68
MOV AL,CL
MOV dword ptr [RSP + 0x64],EDI
MOVSD qword ptr [RSP + 0x58],XMM0
MOVSD qword ptr [RSP + 0x50],XMM1
MOV dword ptr [RSP + 0x4c],ESI
MOV qword ptr [RSP + 0x40],RDX
AND AL,0x1
MOV byte ptr [RSP + 0x3f],AL
MOV RAX,qword ptr [0x0078f638]
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x30]
CMP qword ptr [RAX + 0x28],0x0
JZ 0x001d13ff
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0x28]
TEST byte ptr [RAX + 0x1e8],0x1
JZ 0x001d1413
LAB_001d13ff:
LEA RDI,[0x6d2294]
CALL 0x005f7220
TEST AL,0x1
JNZ 0x001d1411
JMP 0x001d1413
LAB_001d1411:
JMP 0x001d1413
LAB_001d1413:
JMP 0x001d1415
LAB_001d1415:
CMP dword ptr [RSP + 0x4c],0x2
JGE 0x001d1427
MOV EAX,0x2
MOV dword ptr [RSP + 0x10],EAX
JMP 0x001d142f
LAB_001d1427:
MOV EAX,dword ptr [RSP + 0x4c]
MOV dword ptr [RSP + 0x10],EAX
LAB_001d142f:
MOV EAX,dword ptr [RSP + 0x10]
MOV dword ptr [RSP + 0x4c],EAX
LEA RDI,[RSP + 0x20]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x001d97e0
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,dword ptr [RSP + 0x4c]
MOVSD XMM0,qword ptr [RSP + 0x58]
MOVSD XMM1,qword ptr [RSP + 0x50]
LAB_001d145b:
CALL 0x001d9800
JMP 0x001d1462
LAB_001d1462:
MOV EDI,dword ptr [RSP + 0x64]
MOV RSI,qword ptr [RSP + 0x28]
MOV EDX,dword ptr [RSP + 0x4c]
MOV RCX,qword ptr [RSP + 0x40]
MOVZX R8D,byte ptr [RSP + 0x3f]
AND R8D,0x1
CALL 0x001d1260
LAB_001d1483:
JMP 0x001d1485
LAB_001d1485:
LEA RDI,[RSP + 0x20]
CALL 0x001d98b0
ADD RSP,0x68
RET
|
/* ImPlot3D::SetupAxisTicks(int, double, double, int, char const* const*, bool) */
void ImPlot3D::SetupAxisTicks
(int param_1,double param_2,double param_3,int param_4,char **param_5,bool param_6)
{
int local_58;
ImVector<double> local_48 [8];
double *local_40;
long local_38;
byte local_29;
char **local_28;
int local_1c;
double local_18;
double local_10;
int local_4;
local_38 = GImPlot3D;
local_29 = param_6;
local_28 = param_5;
local_1c = param_4;
local_18 = param_3;
local_10 = param_2;
local_4 = param_1;
if ((*(long *)(GImPlot3D + 0x28) == 0) ||
((*(byte *)(*(long *)(GImPlot3D + 0x28) + 0x1e8) & 1) != 0)) {
ImGui::ErrorLog(
"Setup needs to be called after BeginPlot and before any setup locking functions (e.g. PlotX)!"
);
}
if (local_1c < 2) {
local_58 = 2;
}
else {
local_58 = local_1c;
}
local_1c = local_58;
ImVector<double>::ImVector(local_48);
/* try { // try from 001d145b to 001d1482 has its CatchHandler @ 001d1494 */
FillRange<double>((ImVector *)local_48,local_1c,local_10,local_18);
SetupAxisTicks(local_4,local_40,local_1c,local_28,(bool)(local_29 & 1));
ImVector<double>::~ImVector(local_48);
return;
}
|
|
6,556 | bf_asin | bluesky950520[P]quickjs/libbf.c | int bf_asin(bf_t *r, const bf_t *a, limb_t prec, bf_flags_t flags)
{
bf_context_t *s = r->ctx;
bf_t T_s, *T = &T_s;
int res;
if (a->len == 0) {
if (a->expn == BF_EXP_NAN) {
bf_set_nan(r);
return 0;
} else if (a->expn == BF_EXP_INF) {
bf_set_nan(r);
return BF_ST_INVALID_OP;
} else {
bf_set_zero(r, a->sign);
return 0;
}
}
bf_init(s, T);
bf_set_ui(T, 1);
res = bf_cmpu(a, T);
bf_delete(T);
if (res > 0) {
bf_set_nan(r);
return BF_ST_INVALID_OP;
}
/* small argument case: result = x+r(x) with r(x) = x^3/6 +
O(X^5). We assume r(x) < 2^(3*EXP(x) - 2). */
if (a->expn < 0) {
slimb_t e;
e = sat_add(2 * a->expn, a->expn - 2);
if (e < a->expn - bf_max(prec + 2, a->len * LIMB_BITS + 2)) {
bf_set(r, a);
return bf_add_epsilon(r, r, e, a->sign, prec, flags);
}
}
return bf_ziv_rounding(r, a, prec, flags, bf_asin_internal, (void *)FALSE);
} | O1 | c | bf_asin:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movabsq $0x7fffffffffffffff, %rbp # imm = 0x7FFFFFFFFFFFFFFF
movq (%rdi), %rax
cmpq $0x0, 0x18(%rsi)
je 0x8d438
movq %rdx, %r15
movl %ecx, 0xc(%rsp)
leaq 0x10(%rsp), %r13
movq %rax, (%r13)
movl $0x0, 0x8(%r13)
leaq 0x1(%rbp), %rax
movq %rax, 0x10(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r13)
movl $0x1, %esi
movq %r13, %rdi
callq 0x84abb
movq %r14, %rdi
movq %r13, %rsi
callq 0x8542a
movl %eax, %r12d
movq (%r13), %rax
testq %rax, %rax
je 0x8d420
movq 0x30(%rsp), %rsi
testq %rsi, %rsi
je 0x8d420
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
testl %r12d, %r12d
jle 0x8d487
cmpq $0x0, 0x18(%rbx)
je 0x8d531
movq (%rbx), %rax
jmp 0x8d519
movq 0x10(%r14), %rcx
movabsq $0x7ffffffffffffffe, %rdx # imm = 0x7FFFFFFFFFFFFFFE
cmpq %rdx, %rcx
je 0x8d512
cmpq %rbp, %rcx
jne 0x8d543
cmpq $0x0, 0x18(%rbx)
je 0x8d477
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
movq %rbp, 0x10(%rbx)
movl $0x0, 0x8(%rbx)
jmp 0x8d571
movq 0x10(%r14), %r13
testq %r13, %r13
jns 0x8d4e8
leaq -0x2(,%r13,2), %r12
addq %r13, %r12
leaq 0x2(%r15), %rax
movq 0x18(%r14), %rcx
shlq $0x6, %rcx
orq $0x2, %rcx
cmpq %rcx, %rax
cmovgq %rax, %rcx
subq %rcx, %r13
cmpq %r13, %r12
jge 0x8d4df
movq %rbx, %rdi
movq %r14, %rsi
callq 0x84c8d
movl 0x8(%r14), %ecx
movq %rbx, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movq %r15, %r8
movl 0xc(%rsp), %r9d
callq 0x8ac4a
cmpq %r13, %r12
jl 0x8d573
leaq 0x93(%rip), %r8 # 0x8d582
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl 0xc(%rsp), %ecx
xorl %r9d, %r9d
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8acec
cmpq $0x0, 0x18(%rbx)
je 0x8d531
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
movq %rbp, 0x10(%rbx)
movl $0x0, 0x8(%rbx)
movl $0x1, %eax
jmp 0x8d573
movl 0x8(%r14), %r14d
cmpq $0x0, 0x18(%rbx)
je 0x8d566
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
incq %rbp
movq %rbp, 0x10(%rbx)
movl %r14d, 0x8(%rbx)
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| bf_asin:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r14, rsi
mov rbx, rdi
mov rbp, 7FFFFFFFFFFFFFFFh
mov rax, [rdi]
cmp qword ptr [rsi+18h], 0
jz short loc_8D438
mov r15, rdx
mov [rsp+68h+var_5C], ecx
lea r13, [rsp+68h+var_58]
mov [r13+0], rax
mov dword ptr [r13+8], 0
lea rax, [rbp+1]
mov [r13+10h], rax
xorps xmm0, xmm0
movups xmmword ptr [r13+18h], xmm0
mov esi, 1
mov rdi, r13
call bf_set_ui
mov rdi, r14
mov rsi, r13
call bf_cmpu
mov r12d, eax
mov rax, [r13+0]
test rax, rax
jz short loc_8D420
mov rsi, [rsp+68h+var_38]
test rsi, rsi
jz short loc_8D420
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_8D420:
test r12d, r12d
jle short loc_8D487
cmp qword ptr [rbx+18h], 0
jz loc_8D531
mov rax, [rbx]
jmp loc_8D519
loc_8D438:
mov rcx, [r14+10h]
mov rdx, 7FFFFFFFFFFFFFFEh
cmp rcx, rdx
jz loc_8D512
cmp rcx, rbp
jnz loc_8D543
cmp qword ptr [rbx+18h], 0
jz short loc_8D477
mov rsi, [rbx+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [rbx+20h], rax
mov qword ptr [rbx+18h], 0
loc_8D477:
mov [rbx+10h], rbp
mov dword ptr [rbx+8], 0
jmp loc_8D571
loc_8D487:
mov r13, [r14+10h]
test r13, r13
jns short loc_8D4E8
lea r12, ds:0FFFFFFFFFFFFFFFEh[r13*2]
add r12, r13
lea rax, [r15+2]
mov rcx, [r14+18h]
shl rcx, 6
or rcx, 2
cmp rax, rcx
cmovg rcx, rax
sub r13, rcx
cmp r12, r13
jge short loc_8D4DF
mov rdi, rbx
mov rsi, r14
call bf_set
mov ecx, [r14+8]
mov rdi, rbx
mov rsi, rbx
mov rdx, r12
mov r8, r15
mov r9d, [rsp+68h+var_5C]
call bf_add_epsilon
loc_8D4DF:
cmp r12, r13
jl loc_8D573
loc_8D4E8:
lea r8, bf_asin_internal
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov ecx, [rsp+68h+var_5C]
xor r9d, r9d
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp bf_ziv_rounding
loc_8D512:
cmp qword ptr [rbx+18h], 0
jz short loc_8D531
loc_8D519:
mov rsi, [rbx+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [rbx+20h], rax
mov qword ptr [rbx+18h], 0
loc_8D531:
mov [rbx+10h], rbp
mov dword ptr [rbx+8], 0
mov eax, 1
jmp short loc_8D573
loc_8D543:
mov r14d, [r14+8]
cmp qword ptr [rbx+18h], 0
jz short loc_8D566
mov rsi, [rbx+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [rbx+20h], rax
mov qword ptr [rbx+18h], 0
loc_8D566:
inc rbp
mov [rbx+10h], rbp
mov [rbx+8], r14d
loc_8D571:
xor eax, eax
loc_8D573:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long bf_asin(long long a1, long long a2, long long a3, unsigned int a4)
{
_QWORD *v4; // rax
int v6; // r12d
long long v7; // rcx
long long v8; // r13
long long v9; // r12
long long v10; // rcx
int v12; // r14d
_QWORD *v14; // [rsp+10h] [rbp-58h] BYREF
int v15; // [rsp+18h] [rbp-50h]
unsigned long long v16; // [rsp+20h] [rbp-48h]
__int128 v17; // [rsp+28h] [rbp-40h]
v4 = *(_QWORD **)a1;
if ( *(_QWORD *)(a2 + 24) )
{
v14 = *(_QWORD **)a1;
v15 = 0;
v16 = 0x8000000000000000LL;
v17 = 0LL;
bf_set_ui(&v14, 1uLL);
v6 = bf_cmpu((_QWORD *)a2, &v14);
if ( v14 && *((_QWORD *)&v17 + 1) )
((void ( *)(_QWORD, _QWORD, _QWORD))v14[1])(*v14, *((_QWORD *)&v17 + 1), 0LL);
if ( v6 > 0 )
{
if ( *(_QWORD *)(a1 + 24) )
{
v4 = *(_QWORD **)a1;
LABEL_20:
*(_QWORD *)(a1 + 32) = ((long long ( *)(_QWORD, _QWORD, _QWORD))v4[1])(*v4, *(_QWORD *)(a1 + 32), 0LL);
*(_QWORD *)(a1 + 24) = 0LL;
}
LABEL_21:
*(_QWORD *)(a1 + 16) = 0x7FFFFFFFFFFFFFFFLL;
*(_DWORD *)(a1 + 8) = 0;
return 1LL;
}
v8 = *(_QWORD *)(a2 + 16);
if ( v8 >= 0 )
return bf_ziv_rounding(
(_QWORD *)a1,
a2,
a3,
a4,
(void ( *)(_QWORD *, long long, long long, long long))bf_asin_internal,
0LL);
v9 = v8 + 2 * v8 - 2;
v10 = (*(_QWORD *)(a2 + 24) << 6) | 2LL;
if ( a3 + 2 > v10 )
v10 = a3 + 2;
if ( v9 >= v8 - v10 )
{
return bf_ziv_rounding(
(_QWORD *)a1,
a2,
a3,
a4,
(void ( *)(_QWORD *, long long, long long, long long))bf_asin_internal,
0LL);
}
else
{
bf_set((_QWORD *)a1, a2);
return bf_add_epsilon((__int128 *)a1, (_QWORD *)a1, v9, *(_DWORD *)(a2 + 8), a3, a4);
}
}
else
{
v7 = *(_QWORD *)(a2 + 16);
if ( v7 == 0x7FFFFFFFFFFFFFFELL )
{
if ( *(_QWORD *)(a1 + 24) )
goto LABEL_20;
goto LABEL_21;
}
if ( v7 == 0x7FFFFFFFFFFFFFFFLL )
{
if ( *(_QWORD *)(a1 + 24) )
{
*(_QWORD *)(a1 + 32) = ((long long ( *)(_QWORD, _QWORD, _QWORD))v4[1])(*v4, *(_QWORD *)(a1 + 32), 0LL);
*(_QWORD *)(a1 + 24) = 0LL;
}
*(_QWORD *)(a1 + 16) = 0x7FFFFFFFFFFFFFFFLL;
*(_DWORD *)(a1 + 8) = 0;
}
else
{
v12 = *(_DWORD *)(a2 + 8);
if ( *(_QWORD *)(a1 + 24) )
{
*(_QWORD *)(a1 + 32) = ((long long ( *)(_QWORD, _QWORD, _QWORD))v4[1])(*v4, *(_QWORD *)(a1 + 32), 0LL);
*(_QWORD *)(a1 + 24) = 0LL;
}
*(_QWORD *)(a1 + 16) = 0x8000000000000000LL;
*(_DWORD *)(a1 + 8) = v12;
}
return 0LL;
}
}
| bf_asin:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14,RSI
MOV RBX,RDI
MOV RBP,0x7fffffffffffffff
MOV RAX,qword ptr [RDI]
CMP qword ptr [RSI + 0x18],0x0
JZ 0x0018d438
MOV R15,RDX
MOV dword ptr [RSP + 0xc],ECX
LEA R13,[RSP + 0x10]
MOV qword ptr [R13],RAX
MOV dword ptr [R13 + 0x8],0x0
LEA RAX,[RBP + 0x1]
MOV qword ptr [R13 + 0x10],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R13 + 0x18],XMM0
MOV ESI,0x1
MOV RDI,R13
CALL 0x00184abb
MOV RDI,R14
MOV RSI,R13
CALL 0x0018542a
MOV R12D,EAX
MOV RAX,qword ptr [R13]
TEST RAX,RAX
JZ 0x0018d420
MOV RSI,qword ptr [RSP + 0x30]
TEST RSI,RSI
JZ 0x0018d420
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
LAB_0018d420:
TEST R12D,R12D
JLE 0x0018d487
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0018d531
MOV RAX,qword ptr [RBX]
JMP 0x0018d519
LAB_0018d438:
MOV RCX,qword ptr [R14 + 0x10]
MOV RDX,0x7ffffffffffffffe
CMP RCX,RDX
JZ 0x0018d512
CMP RCX,RBP
JNZ 0x0018d543
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0018d477
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],0x0
LAB_0018d477:
MOV qword ptr [RBX + 0x10],RBP
MOV dword ptr [RBX + 0x8],0x0
JMP 0x0018d571
LAB_0018d487:
MOV R13,qword ptr [R14 + 0x10]
TEST R13,R13
JNS 0x0018d4e8
LEA R12,[-0x2 + R13*0x2]
ADD R12,R13
LEA RAX,[R15 + 0x2]
MOV RCX,qword ptr [R14 + 0x18]
SHL RCX,0x6
OR RCX,0x2
CMP RAX,RCX
CMOVG RCX,RAX
SUB R13,RCX
CMP R12,R13
JGE 0x0018d4df
MOV RDI,RBX
MOV RSI,R14
CALL 0x00184c8d
MOV ECX,dword ptr [R14 + 0x8]
MOV RDI,RBX
MOV RSI,RBX
MOV RDX,R12
MOV R8,R15
MOV R9D,dword ptr [RSP + 0xc]
CALL 0x0018ac4a
LAB_0018d4df:
CMP R12,R13
JL 0x0018d573
LAB_0018d4e8:
LEA R8,[0x18d582]
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
MOV ECX,dword ptr [RSP + 0xc]
XOR R9D,R9D
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0018acec
LAB_0018d512:
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0018d531
LAB_0018d519:
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],0x0
LAB_0018d531:
MOV qword ptr [RBX + 0x10],RBP
MOV dword ptr [RBX + 0x8],0x0
MOV EAX,0x1
JMP 0x0018d573
LAB_0018d543:
MOV R14D,dword ptr [R14 + 0x8]
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0018d566
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],0x0
LAB_0018d566:
INC RBP
MOV qword ptr [RBX + 0x10],RBP
MOV dword ptr [RBX + 0x8],R14D
LAB_0018d571:
XOR EAX,EAX
LAB_0018d573:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 bf_asin(long *param_1,long param_2,long param_3,int4 param_4)
{
long lVar1;
int4 uVar2;
int iVar3;
int8 uVar4;
int8 *puVar5;
long lVar6;
ulong uVar7;
int8 *local_58;
int4 local_50;
int8 local_48;
int8 local_40;
long lStack_38;
puVar5 = (int8 *)*param_1;
if (*(long *)(param_2 + 0x18) == 0) {
if (*(long *)(param_2 + 0x10) != 0x7ffffffffffffffe) {
if (*(long *)(param_2 + 0x10) == 0x7fffffffffffffff) {
if (param_1[3] != 0) {
lVar6 = (*(code *)puVar5[1])(*puVar5,param_1[4],0);
param_1[4] = lVar6;
param_1[3] = 0;
}
param_1[2] = 0x7fffffffffffffff;
*(int4 *)(param_1 + 1) = 0;
}
else {
uVar2 = *(int4 *)(param_2 + 8);
if (param_1[3] != 0) {
lVar6 = (*(code *)puVar5[1])(*puVar5,param_1[4],0);
param_1[4] = lVar6;
param_1[3] = 0;
}
param_1[2] = -0x8000000000000000;
*(int4 *)(param_1 + 1) = uVar2;
}
return 0;
}
if (param_1[3] == 0) goto LAB_0018d531;
}
else {
local_50 = 0;
local_48 = 0x8000000000000000;
local_40 = 0;
lStack_38 = 0;
local_58 = puVar5;
bf_set_ui(&local_58,1);
iVar3 = bf_cmpu(param_2,&local_58);
if ((local_58 != (int8 *)0x0) && (lStack_38 != 0)) {
(*(code *)local_58[1])(*local_58,lStack_38,0);
}
if (iVar3 < 1) {
lVar6 = *(long *)(param_2 + 0x10);
if (lVar6 < 0) {
lVar1 = lVar6 * 3 + -2;
uVar7 = *(long *)(param_2 + 0x18) << 6 | 2;
if ((long)uVar7 < (long)(param_3 + 2U)) {
uVar7 = param_3 + 2U;
}
if (lVar1 < (long)(lVar6 - uVar7)) {
bf_set(param_1,param_2);
uVar4 = bf_add_epsilon(param_1,param_1,lVar1,*(int4 *)(param_2 + 8),param_3,param_4)
;
return uVar4;
}
}
uVar4 = bf_ziv_rounding(param_1,param_2,param_3,param_4,bf_asin_internal,0);
return uVar4;
}
if (param_1[3] == 0) goto LAB_0018d531;
puVar5 = (int8 *)*param_1;
}
lVar6 = (*(code *)puVar5[1])(*puVar5,param_1[4],0);
param_1[4] = lVar6;
param_1[3] = 0;
LAB_0018d531:
param_1[2] = 0x7fffffffffffffff;
*(int4 *)(param_1 + 1) = 0;
return 1;
}
|
|
6,557 | bf_asin | bluesky950520[P]quickjs/libbf.c | int bf_asin(bf_t *r, const bf_t *a, limb_t prec, bf_flags_t flags)
{
bf_context_t *s = r->ctx;
bf_t T_s, *T = &T_s;
int res;
if (a->len == 0) {
if (a->expn == BF_EXP_NAN) {
bf_set_nan(r);
return 0;
} else if (a->expn == BF_EXP_INF) {
bf_set_nan(r);
return BF_ST_INVALID_OP;
} else {
bf_set_zero(r, a->sign);
return 0;
}
}
bf_init(s, T);
bf_set_ui(T, 1);
res = bf_cmpu(a, T);
bf_delete(T);
if (res > 0) {
bf_set_nan(r);
return BF_ST_INVALID_OP;
}
/* small argument case: result = x+r(x) with r(x) = x^3/6 +
O(X^5). We assume r(x) < 2^(3*EXP(x) - 2). */
if (a->expn < 0) {
slimb_t e;
e = sat_add(2 * a->expn, a->expn - 2);
if (e < a->expn - bf_max(prec + 2, a->len * LIMB_BITS + 2)) {
bf_set(r, a);
return bf_add_epsilon(r, r, e, a->sign, prec, flags);
}
}
return bf_ziv_rounding(r, a, prec, flags, bf_asin_internal, (void *)FALSE);
} | O2 | c | bf_asin:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
cmpq $0x0, 0x18(%rsi)
je 0x7606b
movl %ecx, %ebp
movq %rdx, %r15
movq (%rbx), %rax
movq %rsp, %r12
movq %rax, (%r12)
andl $0x0, 0x8(%r12)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x10(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r12)
pushq $0x1
popq %rsi
movq %r12, %rdi
callq 0x6f556
movq %r14, %rdi
movq %r12, %rsi
callq 0x6fd66
movl %eax, %r13d
movq %r12, %rdi
callq 0x7145e
testl %r13d, %r13d
jg 0x76097
movq 0x10(%r14), %rax
testq %rax, %rax
jns 0x760a4
leaq (%rax,%rax,2), %r12
addq $-0x2, %r12
leaq 0x2(%r15), %rcx
movq 0x18(%r14), %rdx
shlq $0x6, %rdx
orq $0x2, %rdx
cmpq %rdx, %rcx
cmovgq %rcx, %rdx
subq %rdx, %rax
cmpq %rax, %r12
jge 0x760a4
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6f666
movl 0x8(%r14), %ecx
movq %rbx, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movq %r15, %r8
movl %ebp, %r9d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x74401
movq 0x10(%r14), %rax
movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE
cmpq %rcx, %rax
je 0x76097
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rcx, %rax
jne 0x760cc
movq %rbx, %rdi
callq 0x6f5cd
jmp 0x760d8
movq %rbx, %rdi
callq 0x6f5cd
pushq $0x1
popq %rax
jmp 0x760da
leaq 0x3e(%rip), %r8 # 0x760e9
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl %ebp, %ecx
xorl %r9d, %r9d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x74484
movl 0x8(%r14), %esi
movq %rbx, %rdi
callq 0x6f612
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| bf_asin:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, rsi
mov rbx, rdi
cmp qword ptr [rsi+18h], 0
jz loc_7606B
mov ebp, ecx
mov r15, rdx
mov rax, [rbx]
mov r12, rsp
mov [r12], rax
and dword ptr [r12+8], 0
mov rax, 8000000000000000h
mov [r12+10h], rax
xorps xmm0, xmm0
movups xmmword ptr [r12+18h], xmm0
push 1
pop rsi
mov rdi, r12
call bf_set_ui
mov rdi, r14
mov rsi, r12
call bf_cmpu
mov r13d, eax
mov rdi, r12
call bf_delete_0
test r13d, r13d
jg loc_76097
mov rax, [r14+10h]
test rax, rax
jns loc_760A4
lea r12, [rax+rax*2]
add r12, 0FFFFFFFFFFFFFFFEh
lea rcx, [r15+2]
mov rdx, [r14+18h]
shl rdx, 6
or rdx, 2
cmp rcx, rdx
cmovg rdx, rcx
sub rax, rdx
cmp r12, rax
jge short loc_760A4
mov rdi, rbx
mov rsi, r14
call bf_set
mov ecx, [r14+8]
mov rdi, rbx
mov rsi, rbx
mov rdx, r12
mov r8, r15
mov r9d, ebp
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp bf_add_epsilon
loc_7606B:
mov rax, [r14+10h]
mov rcx, 7FFFFFFFFFFFFFFEh
cmp rax, rcx
jz short loc_76097
mov rcx, 7FFFFFFFFFFFFFFFh
cmp rax, rcx
jnz short loc_760CC
mov rdi, rbx
call bf_set_nan
jmp short loc_760D8
loc_76097:
mov rdi, rbx
call bf_set_nan
push 1
pop rax
jmp short loc_760DA
loc_760A4:
lea r8, bf_asin_internal
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov ecx, ebp
xor r9d, r9d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp bf_ziv_rounding
loc_760CC:
mov esi, [r14+8]
mov rdi, rbx
call bf_set_zero
loc_760D8:
xor eax, eax
loc_760DA:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long bf_asin(long long *a1, long long a2, long long a3, unsigned int a4)
{
int v6; // r13d
long long v7; // rax
long long v8; // r12
long long v9; // rdx
long long v11; // rax
long long v12; // [rsp+0h] [rbp-58h] BYREF
int v13; // [rsp+8h] [rbp-50h]
unsigned long long v14; // [rsp+10h] [rbp-48h]
__int128 v15; // [rsp+18h] [rbp-40h]
if ( !*(_QWORD *)(a2 + 24) )
{
v11 = *(_QWORD *)(a2 + 16);
if ( v11 != 0x7FFFFFFFFFFFFFFELL )
{
if ( v11 == 0x7FFFFFFFFFFFFFFFLL )
bf_set_nan((long long)a1);
else
bf_set_zero((long long)a1, *(_DWORD *)(a2 + 8));
return 0LL;
}
LABEL_11:
bf_set_nan((long long)a1);
return 1LL;
}
v12 = *a1;
v13 = 0;
v14 = 0x8000000000000000LL;
v15 = 0LL;
bf_set_ui((long long)&v12, 1uLL);
v6 = bf_cmpu((_QWORD *)a2, &v12);
bf_delete_0(&v12);
if ( v6 > 0 )
goto LABEL_11;
v7 = *(_QWORD *)(a2 + 16);
if ( v7 >= 0 )
return bf_ziv_rounding(
a1,
a2,
a3,
a4,
(void ( *)(_QWORD *, long long, long long, long long))bf_asin_internal,
0LL);
v8 = 3 * v7 - 2;
v9 = (*(_QWORD *)(a2 + 24) << 6) | 2LL;
if ( a3 + 2 > v9 )
v9 = a3 + 2;
if ( v8 >= v7 - v9 )
return bf_ziv_rounding(
a1,
a2,
a3,
a4,
(void ( *)(_QWORD *, long long, long long, long long))bf_asin_internal,
0LL);
bf_set((long long)a1, a2);
return bf_add_epsilon((long long)a1, a1, v8, *(_DWORD *)(a2 + 8), a3, a4);
}
| bf_asin:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
MOV RBX,RDI
CMP qword ptr [RSI + 0x18],0x0
JZ 0x0017606b
MOV EBP,ECX
MOV R15,RDX
MOV RAX,qword ptr [RBX]
MOV R12,RSP
MOV qword ptr [R12],RAX
AND dword ptr [R12 + 0x8],0x0
MOV RAX,-0x8000000000000000
MOV qword ptr [R12 + 0x10],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R12 + 0x18],XMM0
PUSH 0x1
POP RSI
MOV RDI,R12
CALL 0x0016f556
MOV RDI,R14
MOV RSI,R12
CALL 0x0016fd66
MOV R13D,EAX
MOV RDI,R12
CALL 0x0017145e
TEST R13D,R13D
JG 0x00176097
MOV RAX,qword ptr [R14 + 0x10]
TEST RAX,RAX
JNS 0x001760a4
LEA R12,[RAX + RAX*0x2]
ADD R12,-0x2
LEA RCX,[R15 + 0x2]
MOV RDX,qword ptr [R14 + 0x18]
SHL RDX,0x6
OR RDX,0x2
CMP RCX,RDX
CMOVG RDX,RCX
SUB RAX,RDX
CMP R12,RAX
JGE 0x001760a4
MOV RDI,RBX
MOV RSI,R14
CALL 0x0016f666
MOV ECX,dword ptr [R14 + 0x8]
MOV RDI,RBX
MOV RSI,RBX
MOV RDX,R12
MOV R8,R15
MOV R9D,EBP
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00174401
LAB_0017606b:
MOV RAX,qword ptr [R14 + 0x10]
MOV RCX,0x7ffffffffffffffe
CMP RAX,RCX
JZ 0x00176097
MOV RCX,0x7fffffffffffffff
CMP RAX,RCX
JNZ 0x001760cc
MOV RDI,RBX
CALL 0x0016f5cd
JMP 0x001760d8
LAB_00176097:
MOV RDI,RBX
CALL 0x0016f5cd
PUSH 0x1
POP RAX
JMP 0x001760da
LAB_001760a4:
LEA R8,[0x1760e9]
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
MOV ECX,EBP
XOR R9D,R9D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00174484
LAB_001760cc:
MOV ESI,dword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x0016f612
LAB_001760d8:
XOR EAX,EAX
LAB_001760da:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 bf_asin(int8 *param_1,long param_2,long param_3,int4 param_4)
{
long lVar1;
int iVar2;
int8 uVar3;
ulong uVar4;
long lVar5;
int8 local_58;
int4 local_50;
int8 local_48;
int8 local_40;
int8 uStack_38;
if (*(long *)(param_2 + 0x18) == 0) {
if (*(long *)(param_2 + 0x10) != 0x7ffffffffffffffe) {
if (*(long *)(param_2 + 0x10) == 0x7fffffffffffffff) {
bf_set_nan(param_1);
}
else {
bf_set_zero(param_1,*(int4 *)(param_2 + 8));
}
return 0;
}
}
else {
local_58 = *param_1;
local_50 = 0;
local_48 = 0x8000000000000000;
local_40 = 0;
uStack_38 = 0;
bf_set_ui(&local_58,1);
iVar2 = bf_cmpu(param_2,&local_58);
bf_delete(&local_58);
if (iVar2 < 1) {
lVar1 = *(long *)(param_2 + 0x10);
if (lVar1 < 0) {
lVar5 = lVar1 * 3 + -2;
uVar4 = *(long *)(param_2 + 0x18) << 6 | 2;
if ((long)uVar4 < (long)(param_3 + 2U)) {
uVar4 = param_3 + 2U;
}
if (lVar5 < (long)(lVar1 - uVar4)) {
bf_set(param_1,param_2);
uVar3 = bf_add_epsilon(param_1,param_1,lVar5,*(int4 *)(param_2 + 8),param_3,param_4)
;
return uVar3;
}
}
uVar3 = bf_ziv_rounding(param_1,param_2,param_3,param_4,bf_asin_internal,0);
return uVar3;
}
}
bf_set_nan(param_1);
return 1;
}
|
|
6,558 | minja::VariableExpr::VariableExpr(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/minja.hpp | VariableExpr(const Location & location, const std::string& n)
: Expression(location), name(n) {} | O3 | cpp | minja::VariableExpr::VariableExpr(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x91181(%rip), %r15 # 0x12c3a8
addq $0x10, %r15
movq %r15, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0x9b257
movq 0x92d37(%rip), %rcx # 0x12df80
cmpb $0x0, (%rcx)
je 0x9b253
incl 0x8(%rax)
jmp 0x9b257
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rbx)
leaq 0x91b4a(%rip), %rax # 0x12cdb0
addq $0x10, %rax
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 0x229dc
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %r15, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x9b2a2
callq 0x70324
movq %r14, %rdi
callq 0x1c1e0
| _ZN5minja12VariableExprC2ERKNS_8LocationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push rbx
mov rbx, rdi
lea r15, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression
add r15, 10h
mov [rdi], r15
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_9B257
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_9B253
inc dword ptr [rax+8]
jmp short loc_9B257
loc_9B253:
lock inc dword ptr [rax+8]
loc_9B257:
mov rax, [rsi+10h]
mov [rbx+18h], rax
lea rax, _ZTVN5minja12VariableExprE; `vtable for'minja::VariableExpr
add rax, 10h
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_9B2A2
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9B2A2:
mov rdi, r14
call __Unwind_Resume
| long long minja::VariableExpr::VariableExpr(_QWORD *a1, _QWORD *a2, long long a3)
{
long long v3; // rax
*a1 = &`vtable for'minja::Expression + 2;
a1[1] = *a2;
v3 = a2[1];
a1[2] = v3;
if ( v3 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v3 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v3 + 8));
}
a1[3] = a2[2];
*a1 = &`vtable for'minja::VariableExpr + 2;
a1[4] = a1 + 6;
return std::string::_M_construct<char *>((long long)(a1 + 4), *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8));
}
| VariableExpr:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
LEA R15,[0x22c3a8]
ADD R15,0x10
MOV qword ptr [RDI],R15
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],RAX
TEST RAX,RAX
JZ 0x0019b257
MOV RCX,qword ptr [0x0022df80]
CMP byte ptr [RCX],0x0
JZ 0x0019b253
INC dword ptr [RAX + 0x8]
JMP 0x0019b257
LAB_0019b253:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0019b257:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RBX + 0x18],RAX
LEA RAX,[0x22cdb0]
ADD RAX,0x10
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_0019b283:
CALL 0x001229dc
LAB_0019b288:
POP RBX
POP R14
POP R15
RET
|
/* minja::VariableExpr::VariableExpr(minja::Location const&, std::__cxx11::string const&) */
void __thiscall
minja::VariableExpr::VariableExpr(VariableExpr *this,Location *param_1,string *param_2)
{
long lVar1;
*(int ***)this = &PTR___cxa_pure_virtual_0022c3b8;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_0022df80 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10);
*(int ***)this = &PTR_do_evaluate_0022cdc0;
*(VariableExpr **)(this + 0x20) = this + 0x30;
/* try { // try from 0019b283 to 0019b287 has its CatchHandler @ 0019b28e */
std::__cxx11::string::_M_construct<char*>
(this + 0x20,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2);
return;
}
|
|
6,559 | mysql_get_timeout_value | eloqsql/libmariadb/libmariadb/mariadb_lib.c | unsigned int STDCALL
mysql_get_timeout_value(const MYSQL *mysql)
{
unsigned int timeout= 0;
if (mysql->options.extension && mysql->options.extension->async_context)
timeout= mysql->options.extension->async_context->timeout_value;
/* Avoid overflow. */
if (timeout > UINT_MAX - 999)
return (timeout - 1)/1000 + 1;
else
return (timeout+999)/1000;
} | O0 | c | mysql_get_timeout_value:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x480(%rax)
je 0x1db84
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x1db84
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movl 0x10(%rax), %eax
movl %eax, -0x14(%rbp)
cmpl $0xfffffc18, -0x14(%rbp) # imm = 0xFFFFFC18
jbe 0x1dba4
movl -0x14(%rbp), %eax
subl $0x1, %eax
movl $0x3e8, %ecx # imm = 0x3E8
xorl %edx, %edx
divl %ecx
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x1dbb8
movl -0x14(%rbp), %eax
addl $0x3e7, %eax # imm = 0x3E7
movl $0x3e8, %ecx # imm = 0x3E8
xorl %edx, %edx
divl %ecx
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
| mysql_get_timeout_value:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_14], 0
mov rax, [rbp+var_10]
cmp qword ptr [rax+480h], 0
jz short loc_1DB84
mov rax, [rbp+var_10]
mov rax, [rax+480h]
cmp qword ptr [rax+28h], 0
jz short loc_1DB84
mov rax, [rbp+var_10]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov eax, [rax+10h]
mov [rbp+var_14], eax
loc_1DB84:
cmp [rbp+var_14], 0FFFFFC18h
jbe short loc_1DBA4
mov eax, [rbp+var_14]
sub eax, 1
mov ecx, 3E8h
xor edx, edx
div ecx
add eax, 1
mov [rbp+var_4], eax
jmp short loc_1DBB8
loc_1DBA4:
mov eax, [rbp+var_14]
add eax, 3E7h
mov ecx, 3E8h
xor edx, edx
div ecx
mov [rbp+var_4], eax
loc_1DBB8:
mov eax, [rbp+var_4]
pop rbp
retn
| long long mysql_get_timeout_value(long long a1)
{
unsigned int v2; // [rsp+0h] [rbp-14h]
v2 = 0;
if ( *(_QWORD *)(a1 + 1152) && *(_QWORD *)(*(_QWORD *)(a1 + 1152) + 40LL) )
v2 = *(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 40LL) + 16LL);
if ( v2 <= 0xFFFFFC18 )
return (v2 + 999) / 0x3E8;
else
return (v2 - 1) / 0x3E8 + 1;
}
| mysql_get_timeout_value:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],0x0
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x0011db84
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0x28],0x0
JZ 0x0011db84
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV EAX,dword ptr [RAX + 0x10]
MOV dword ptr [RBP + -0x14],EAX
LAB_0011db84:
CMP dword ptr [RBP + -0x14],0xfffffc18
JBE 0x0011dba4
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,0x1
MOV ECX,0x3e8
XOR EDX,EDX
DIV ECX
ADD EAX,0x1
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0011dbb8
LAB_0011dba4:
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x3e7
MOV ECX,0x3e8
XOR EDX,EDX
DIV ECX
MOV dword ptr [RBP + -0x4],EAX
LAB_0011dbb8:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
uint mysql_get_timeout_value(long param_1)
{
int4 local_1c;
int4 local_c;
local_1c = 0;
if ((*(long *)(param_1 + 0x480) != 0) && (*(long *)(*(long *)(param_1 + 0x480) + 0x28) != 0)) {
local_1c = *(uint *)(*(long *)(*(long *)(param_1 + 0x480) + 0x28) + 0x10);
}
if (local_1c < 0xfffffc19) {
local_c = (local_1c + 999) / 1000;
}
else {
local_c = (local_1c - 1) / 1000 + 1;
}
return local_c;
}
|
|
6,560 | make_empty_page | eloqsql/storage/maria/ma_blockrec.c | static void make_empty_page(MARIA_HA *info, uchar *buff, uint page_type,
my_bool create_dir_entry)
{
uint block_size= info->s->block_size;
DBUG_ENTER("make_empty_page");
bzero(buff, PAGE_HEADER_SIZE(info->s));
#if !defined(DONT_ZERO_PAGE_BLOCKS) || defined(HAVE_valgrind)
/*
We zero the rest of the block to avoid getting old memory information
to disk and to allow the file to be compressed better if archived.
The code does not assume the block is zeroed.
*/
if (page_type != BLOB_PAGE)
bzero(buff+ PAGE_HEADER_SIZE(info->s),
block_size - PAGE_HEADER_SIZE(info->s));
#endif
buff[PAGE_TYPE_OFFSET]= (uchar) page_type;
buff[DIR_COUNT_OFFSET]= (int) create_dir_entry;
buff[DIR_FREE_OFFSET]= END_OF_DIR_FREE_LIST;
if (create_dir_entry)
{
/* Create directory entry to point to start of page with size 0 */
buff+= block_size - PAGE_SUFFIX_SIZE - DIR_ENTRY_SIZE;
int2store(buff, PAGE_HEADER_SIZE(info->s));
int2store(buff+2, 0);
}
DBUG_VOID_RETURN;
} | O0 | c | make_empty_page:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movb %al, -0x15(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x7bc(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0xc18(%rax), %eax
addl $0xc, %eax
movl %eax, %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2a0
cmpl $0x3, -0x14(%rbp)
je 0x58bf6
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0xc18(%rax), %eax
addl $0xc, %eax
movl %eax, %eax
addq %rax, %rdi
movl -0x1c(%rbp), %eax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movl 0xc18(%rcx), %ecx
addl $0xc, %ecx
subl %ecx, %eax
movl %eax, %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2a0
movl -0x14(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x7(%rax)
movsbl -0x15(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x8(%rax)
movq -0x10(%rbp), %rax
movb $-0x1, 0x9(%rax)
cmpb $0x0, -0x15(%rbp)
je 0x58c6e
movl -0x1c(%rbp), %ecx
subl $0x4, %ecx
subl $0x4, %ecx
movq -0x10(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0xc18(%rax), %eax
addl $0xc, %eax
movw %ax, %cx
movq -0x28(%rbp), %rax
movw %cx, (%rax)
jmp 0x58c57
movq -0x10(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movw $0x0, (%rax)
jmp 0x58c6e
jmp 0x58c70
jmp 0x58c72
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| make_empty_page:
push rbp
mov rbp, rsp
sub rsp, 30h
mov al, cl
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_15], al
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax+7BCh]
mov [rbp+var_1C], eax
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax+0C18h]
add eax, 0Ch
mov eax, eax
mov edx, eax
xor esi, esi
call _memset
cmp [rbp+var_14], 3
jz short loc_58BF6
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax+0C18h]
add eax, 0Ch
mov eax, eax
add rdi, rax
mov eax, [rbp+var_1C]
mov rcx, [rbp+var_8]
mov rcx, [rcx]
mov ecx, [rcx+0C18h]
add ecx, 0Ch
sub eax, ecx
mov eax, eax
mov edx, eax
xor esi, esi
call _memset
loc_58BF6:
mov eax, [rbp+var_14]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+7], cl
movsx eax, [rbp+var_15]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+8], cl
mov rax, [rbp+var_10]
mov byte ptr [rax+9], 0FFh
cmp [rbp+var_15], 0
jz short loc_58C6E
mov ecx, [rbp+var_1C]
sub ecx, 4
sub ecx, 4
mov rax, [rbp+var_10]
mov ecx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax+0C18h]
add eax, 0Ch
mov cx, ax
mov rax, [rbp+var_28]
mov [rax], cx
jmp short $+2
loc_58C57:
mov rax, [rbp+var_10]
add rax, 2
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov word ptr [rax], 0
jmp short $+2
loc_58C6E:
jmp short $+2
loc_58C70:
jmp short $+2
loc_58C72:
add rsp, 30h
pop rbp
retn
| _WORD * make_empty_page(long long a1, _BYTE *a2, int a3, char a4)
{
_WORD *result; // rax
_WORD *v5; // [rsp+8h] [rbp-28h]
int v6; // [rsp+14h] [rbp-1Ch]
v6 = *(_DWORD *)(*(_QWORD *)a1 + 1980LL);
memset(a2, 0LL, (unsigned int)(*(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 12));
if ( a3 != 3 )
memset(
&a2[*(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 12],
0LL,
(unsigned int)(v6 - (*(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 12)));
a2[7] = a3;
a2[8] = a4;
result = a2;
a2[9] = -1;
if ( a4 )
{
v5 = &a2[v6 - 8];
*v5 = *(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 12;
result = v5 + 1;
v5[1] = 0;
}
return result;
}
| make_empty_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV AL,CL
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV byte ptr [RBP + -0x15],AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x7bc]
MOV dword ptr [RBP + -0x1c],EAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0xc18]
ADD EAX,0xc
MOV EAX,EAX
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2a0
CMP dword ptr [RBP + -0x14],0x3
JZ 0x00158bf6
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0xc18]
ADD EAX,0xc
MOV EAX,EAX
ADD RDI,RAX
MOV EAX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0xc18]
ADD ECX,0xc
SUB EAX,ECX
MOV EAX,EAX
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2a0
LAB_00158bf6:
MOV EAX,dword ptr [RBP + -0x14]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x7],CL
MOVSX EAX,byte ptr [RBP + -0x15]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x8],CL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x9],0xff
CMP byte ptr [RBP + -0x15],0x0
JZ 0x00158c6e
MOV ECX,dword ptr [RBP + -0x1c]
SUB ECX,0x4
SUB ECX,0x4
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0xc18]
ADD EAX,0xc
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x28]
MOV word ptr [RAX],CX
JMP 0x00158c57
LAB_00158c57:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV word ptr [RAX],0x0
JMP 0x00158c6e
LAB_00158c6e:
JMP 0x00158c70
LAB_00158c70:
JMP 0x00158c72
LAB_00158c72:
ADD RSP,0x30
POP RBP
RET
|
void make_empty_page(long *param_1,void *param_2,int param_3,char param_4)
{
int iVar1;
short *psVar2;
iVar1 = *(int *)(*param_1 + 0x7bc);
memset(param_2,0,(ulong)(*(int *)(*param_1 + 0xc18) + 0xc));
if (param_3 != 3) {
memset((void *)((long)param_2 + (ulong)(*(int *)(*param_1 + 0xc18) + 0xc)),0,
(ulong)(uint)(iVar1 - (*(int *)(*param_1 + 0xc18) + 0xc)));
}
*(char *)((long)param_2 + 7) = (char)param_3;
*(char *)((long)param_2 + 8) = param_4;
*(int1 *)((long)param_2 + 9) = 0xff;
if (param_4 != '\0') {
psVar2 = (short *)((long)param_2 + (ulong)(iVar1 - 8));
*psVar2 = (short)*(int4 *)(*param_1 + 0xc18) + 0xc;
psVar2[1] = 0;
}
return;
}
|
|
6,561 | ma_write_dynamic_record | eloqsql/storage/maria/ma_dynrec.c | my_bool _ma_write_dynamic_record(MARIA_HA *info, const uchar *record)
{
ulong reclength= _ma_rec_pack(info,info->rec_buff + MARIA_REC_BUFF_OFFSET,
record);
if (!reclength)
return 1;
return (write_dynamic_record(info,info->rec_buff + MARIA_REC_BUFF_OFFSET,
reclength));
} | O0 | c | ma_write_dynamic_record:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x3a0(%rax), %rsi
addq $0x18, %rsi
movq -0x18(%rbp), %rdx
callq 0x504a0
movl %eax, %eax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x5046f
movb $0x1, -0x1(%rbp)
jmp 0x5048e
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x3a0(%rax), %rsi
addq $0x18, %rsi
movq -0x20(%rbp), %rdx
callq 0x50a90
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _ma_write_dynamic_record:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rdi, [rbp+var_10]
mov rax, [rbp+var_10]
mov rsi, [rax+3A0h]
add rsi, 18h
mov rdx, [rbp+var_18]
call _ma_rec_pack
mov eax, eax
mov [rbp+var_20], rax
cmp [rbp+var_20], 0
jnz short loc_5046F
mov [rbp+var_1], 1
jmp short loc_5048E
loc_5046F:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_10]
mov rsi, [rax+3A0h]
add rsi, 18h
mov rdx, [rbp+var_20]
call write_dynamic_record
mov [rbp+var_1], al
loc_5048E:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
| char ma_write_dynamic_record(long long a1, long long a2)
{
unsigned int v2; // eax
v2 = ma_rec_pack(a1, *(_QWORD *)(a1 + 928) + 24LL, a2);
if ( v2 )
return write_dynamic_record(a1, *(_QWORD *)(a1 + 928) + 24LL, v2);
else
return 1;
}
| _ma_write_dynamic_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x3a0]
ADD RSI,0x18
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x001504a0
MOV EAX,EAX
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x0015046f
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015048e
LAB_0015046f:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x3a0]
ADD RSI,0x18
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00150a90
MOV byte ptr [RBP + -0x1],AL
LAB_0015048e:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 _ma_write_dynamic_record(long param_1,int8 param_2)
{
int iVar1;
int1 local_9;
iVar1 = _ma_rec_pack(param_1,*(long *)(param_1 + 0x3a0) + 0x18,param_2);
if (iVar1 == 0) {
local_9 = 1;
}
else {
local_9 = write_dynamic_record(param_1,*(long *)(param_1 + 0x3a0) + 0x18,iVar1);
}
return local_9;
}
|
|
6,562 | add_req_module_entry | bluesky950520[P]quickjs/quickjs.c | static int add_req_module_entry(JSContext *ctx, JSModuleDef *m,
JSAtom module_name)
{
JSReqModuleEntry *rme;
int i;
/* no need to add the module request if it is already present */
for(i = 0; i < m->req_module_entries_count; i++) {
rme = &m->req_module_entries[i];
if (rme->module_name == module_name)
return i;
}
if (js_resize_array(ctx, (void **)&m->req_module_entries,
sizeof(JSReqModuleEntry),
&m->req_module_entries_size,
m->req_module_entries_count + 1))
return -1;
rme = &m->req_module_entries[m->req_module_entries_count++];
rme->module_name = JS_DupAtom(ctx, module_name);
rme->module = NULL;
return i;
} | O0 | c | add_req_module_entry:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movl %edx, 0x1c(%rsp)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
movq 0x20(%rsp), %rcx
cmpl 0x20(%rcx), %eax
jge 0xb149b
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rax
movslq 0xc(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movl (%rax), %eax
cmpl 0x1c(%rsp), %eax
jne 0xb148c
movl 0xc(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0xb152c
jmp 0xb148e
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0xb144a
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
addq $0x18, %rsi
movq 0x20(%rsp), %rcx
addq $0x24, %rcx
movq 0x20(%rsp), %rax
movl 0x20(%rax), %r8d
addl $0x1, %r8d
movl $0x10, %edx
callq 0x73140
cmpl $0x0, %eax
je 0xb14d8
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0xb152c
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rsp), %rdx
movl 0x20(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x20(%rdx)
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x27fa0
movl %eax, %ecx
movq 0x10(%rsp), %rax
movl %ecx, (%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x8(%rax)
movl 0xc(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
| add_req_module_entry:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov [rsp+38h+var_1C], edx
mov [rsp+38h+var_2C], 0
loc_B144A:
mov eax, [rsp+38h+var_2C]
mov rcx, [rsp+38h+var_18]
cmp eax, [rcx+20h]
jge short loc_B149B
mov rax, [rsp+38h+var_18]
mov rax, [rax+18h]
movsxd rcx, [rsp+38h+var_2C]
shl rcx, 4
add rax, rcx
mov [rsp+38h+var_28], rax
mov rax, [rsp+38h+var_28]
mov eax, [rax]
cmp eax, [rsp+38h+var_1C]
jnz short loc_B148C
mov eax, [rsp+38h+var_2C]
mov [rsp+38h+var_4], eax
jmp loc_B152C
loc_B148C:
jmp short $+2
loc_B148E:
mov eax, [rsp+38h+var_2C]
add eax, 1
mov [rsp+38h+var_2C], eax
jmp short loc_B144A
loc_B149B:
mov rdi, [rsp+38h+var_10]
mov rsi, [rsp+38h+var_18]
add rsi, 18h
mov rcx, [rsp+38h+var_18]
add rcx, 24h ; '$'
mov rax, [rsp+38h+var_18]
mov r8d, [rax+20h]
add r8d, 1
mov edx, 10h
call js_resize_array
cmp eax, 0
jz short loc_B14D8
mov [rsp+38h+var_4], 0FFFFFFFFh
jmp short loc_B152C
loc_B14D8:
mov rax, [rsp+38h+var_18]
mov rax, [rax+18h]
mov rdx, [rsp+38h+var_18]
mov ecx, [rdx+20h]
mov esi, ecx
add esi, 1
mov [rdx+20h], esi
movsxd rcx, ecx
shl rcx, 4
add rax, rcx
mov [rsp+38h+var_28], rax
mov rdi, [rsp+38h+var_10]
mov esi, [rsp+38h+var_1C]
call JS_DupAtom
mov ecx, eax
mov rax, [rsp+38h+var_28]
mov [rax], ecx
mov rax, [rsp+38h+var_28]
mov qword ptr [rax+8], 0
mov eax, [rsp+38h+var_2C]
mov [rsp+38h+var_4], eax
loc_B152C:
mov eax, [rsp+38h+var_4]
add rsp, 38h
retn
| long long add_req_module_entry(long long a1, long long a2, unsigned int a3)
{
long long v3; // rax
int v4; // ecx
unsigned int i; // [rsp+Ch] [rbp-2Ch]
long long v7; // [rsp+10h] [rbp-28h]
for ( i = 0; (signed int)i < *(_DWORD *)(a2 + 32); ++i )
{
if ( *(_DWORD *)(16LL * (int)i + *(_QWORD *)(a2 + 24)) == a3 )
return i;
}
if ( (unsigned int)js_resize_array(a1, a2 + 24, 0x10u, (_DWORD *)(a2 + 36), *(_DWORD *)(a2 + 32) + 1) )
{
return (unsigned int)-1;
}
else
{
v3 = *(_QWORD *)(a2 + 24);
v4 = *(_DWORD *)(a2 + 32);
*(_DWORD *)(a2 + 32) = v4 + 1;
v7 = 16LL * v4 + v3;
*(_DWORD *)v7 = JS_DupAtom(a1, a3);
*(_QWORD *)(v7 + 8) = 0LL;
return i;
}
}
| add_req_module_entry:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV dword ptr [RSP + 0x1c],EDX
MOV dword ptr [RSP + 0xc],0x0
LAB_001b144a:
MOV EAX,dword ptr [RSP + 0xc]
MOV RCX,qword ptr [RSP + 0x20]
CMP EAX,dword ptr [RCX + 0x20]
JGE 0x001b149b
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x18]
MOVSXD RCX,dword ptr [RSP + 0xc]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RAX]
CMP EAX,dword ptr [RSP + 0x1c]
JNZ 0x001b148c
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSP + 0x34],EAX
JMP 0x001b152c
LAB_001b148c:
JMP 0x001b148e
LAB_001b148e:
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc],EAX
JMP 0x001b144a
LAB_001b149b:
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x20]
ADD RSI,0x18
MOV RCX,qword ptr [RSP + 0x20]
ADD RCX,0x24
MOV RAX,qword ptr [RSP + 0x20]
MOV R8D,dword ptr [RAX + 0x20]
ADD R8D,0x1
MOV EDX,0x10
CALL 0x00173140
CMP EAX,0x0
JZ 0x001b14d8
MOV dword ptr [RSP + 0x34],0xffffffff
JMP 0x001b152c
LAB_001b14d8:
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
MOV ECX,dword ptr [RDX + 0x20]
MOV ESI,ECX
ADD ESI,0x1
MOV dword ptr [RDX + 0x20],ESI
MOVSXD RCX,ECX
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,dword ptr [RSP + 0x1c]
CALL 0x00127fa0
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x8],0x0
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSP + 0x34],EAX
LAB_001b152c:
MOV EAX,dword ptr [RSP + 0x34]
ADD RSP,0x38
RET
|
int add_req_module_entry(int8 param_1,long param_2,int param_3)
{
int iVar1;
int4 uVar2;
int4 *puVar3;
int local_2c;
int local_4;
local_2c = 0;
while( true ) {
if (*(int *)(param_2 + 0x20) <= local_2c) {
iVar1 = js_resize_array(param_1,param_2 + 0x18,0x10,param_2 + 0x24,
*(int *)(param_2 + 0x20) + 1);
if (iVar1 == 0) {
iVar1 = *(int *)(param_2 + 0x20);
*(int *)(param_2 + 0x20) = iVar1 + 1;
puVar3 = (int4 *)(*(long *)(param_2 + 0x18) + (long)iVar1 * 0x10);
uVar2 = JS_DupAtom(param_1,param_3);
*puVar3 = uVar2;
*(int8 *)(puVar3 + 2) = 0;
local_4 = local_2c;
}
else {
local_4 = -1;
}
return local_4;
}
if (*(int *)(*(long *)(param_2 + 0x18) + (long)local_2c * 0x10) == param_3) break;
local_2c = local_2c + 1;
}
return local_2c;
}
|
|
6,563 | add_req_module_entry | bluesky950520[P]quickjs/quickjs.c | static int add_req_module_entry(JSContext *ctx, JSModuleDef *m,
JSAtom module_name)
{
JSReqModuleEntry *rme;
int i;
/* no need to add the module request if it is already present */
for(i = 0; i < m->req_module_entries_count; i++) {
rme = &m->req_module_entries[i];
if (rme->module_name == module_name)
return i;
}
if (js_resize_array(ctx, (void **)&m->req_module_entries,
sizeof(JSReqModuleEntry),
&m->req_module_entries_size,
m->req_module_entries_count + 1))
return -1;
rme = &m->req_module_entries[m->req_module_entries_count++];
rme->module_name = JS_DupAtom(ctx, module_name);
rme->module = NULL;
return i;
} | O1 | c | add_req_module_entry:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movslq 0x20(%rsi), %rdx
testq %rdx, %rdx
jle 0x6c8e7
movq 0x18(%r15), %rcx
xorl %eax, %eax
cmpl %ebx, (%rcx)
je 0x6c926
incq %rax
addq $0x10, %rcx
cmpq %rax, %rdx
jne 0x6c8d3
movl %edx, %ebp
jmp 0x6c8e9
xorl %ebp, %ebp
cmpl %edx, 0x24(%r15)
jle 0x6c931
movslq 0x20(%r15), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x20(%r15)
shlq $0x4, %rax
addq 0x18(%r15), %rax
cmpl $0xe0, %ebx
jl 0x6c91a
movq 0x18(%r14), %rcx
movq 0x68(%rcx), %rcx
movl %ebx, %edx
movq (%rcx,%rdx,8), %rcx
incl (%rcx)
movl %ebx, (%rax)
movq $0x0, 0x8(%rax)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18(%r15), %rsi
leaq 0x24(%r15), %rcx
leal 0x1(%rdx), %r8d
movq %r14, %rdi
movl $0x10, %edx
callq 0x434ef
movl %eax, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x6c926
jmp 0x6c8ef
| add_req_module_entry:
push rbp
push r15
push r14
push rbx
push rax
mov ebx, edx
mov r15, rsi
mov r14, rdi
movsxd rdx, dword ptr [rsi+20h]
test rdx, rdx
jle short loc_6C8E7
mov rcx, [r15+18h]
xor eax, eax
loc_6C8D3:
cmp [rcx], ebx
jz short loc_6C926
inc rax
add rcx, 10h
cmp rdx, rax
jnz short loc_6C8D3
mov ebp, edx
jmp short loc_6C8E9
loc_6C8E7:
xor ebp, ebp
loc_6C8E9:
cmp [r15+24h], edx
jle short loc_6C931
loc_6C8EF:
movsxd rax, dword ptr [r15+20h]
lea ecx, [rax+1]
mov [r15+20h], ecx
shl rax, 4
add rax, [r15+18h]
cmp ebx, 0E0h
jl short loc_6C91A
mov rcx, [r14+18h]
mov rcx, [rcx+68h]
mov edx, ebx
mov rcx, [rcx+rdx*8]
inc dword ptr [rcx]
loc_6C91A:
mov [rax], ebx
mov qword ptr [rax+8], 0
mov eax, ebp
loc_6C926:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_6C931:
lea rsi, [r15+18h]
lea rcx, [r15+24h]
lea r8d, [rdx+1]
mov rdi, r14
mov edx, 10h
call js_realloc_array
mov ecx, eax
mov eax, 0FFFFFFFFh
test ecx, ecx
jnz short loc_6C926
jmp short loc_6C8EF
| long long add_req_module_entry(long long a1, long long a2, int a3)
{
long long v4; // rdx
_DWORD *v5; // rcx
long long result; // rax
unsigned int v7; // ebp
long long v8; // rax
long long v9; // rax
_DWORD *v10; // rcx
int v11; // ecx
v4 = *(int *)(a2 + 32);
if ( v4 <= 0 )
{
v7 = 0;
LABEL_7:
if ( *(_DWORD *)(a2 + 36) > (int)v4
|| (v11 = js_realloc_array(a1, (long long *)(a2 + 24), 0x10u, (_DWORD *)(a2 + 36), (int)v4 + 1),
result = 0xFFFFFFFFLL,
!v11) )
{
v8 = *(int *)(a2 + 32);
*(_DWORD *)(a2 + 32) = v8 + 1;
v9 = *(_QWORD *)(a2 + 24) + 16 * v8;
if ( a3 >= 224 )
{
v10 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 8LL * (unsigned int)a3);
++*v10;
}
*(_DWORD *)v9 = a3;
*(_QWORD *)(v9 + 8) = 0LL;
return v7;
}
}
else
{
v5 = *(_DWORD **)(a2 + 24);
result = 0LL;
while ( *v5 != a3 )
{
++result;
v5 += 4;
if ( v4 == result )
{
v7 = *(_DWORD *)(a2 + 32);
goto LABEL_7;
}
}
}
return result;
}
| add_req_module_entry:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,EDX
MOV R15,RSI
MOV R14,RDI
MOVSXD RDX,dword ptr [RSI + 0x20]
TEST RDX,RDX
JLE 0x0016c8e7
MOV RCX,qword ptr [R15 + 0x18]
XOR EAX,EAX
LAB_0016c8d3:
CMP dword ptr [RCX],EBX
JZ 0x0016c926
INC RAX
ADD RCX,0x10
CMP RDX,RAX
JNZ 0x0016c8d3
MOV EBP,EDX
JMP 0x0016c8e9
LAB_0016c8e7:
XOR EBP,EBP
LAB_0016c8e9:
CMP dword ptr [R15 + 0x24],EDX
JLE 0x0016c931
LAB_0016c8ef:
MOVSXD RAX,dword ptr [R15 + 0x20]
LEA ECX,[RAX + 0x1]
MOV dword ptr [R15 + 0x20],ECX
SHL RAX,0x4
ADD RAX,qword ptr [R15 + 0x18]
CMP EBX,0xe0
JL 0x0016c91a
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_0016c91a:
MOV dword ptr [RAX],EBX
MOV qword ptr [RAX + 0x8],0x0
MOV EAX,EBP
LAB_0016c926:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0016c931:
LEA RSI,[R15 + 0x18]
LEA RCX,[R15 + 0x24]
LEA R8D,[RDX + 0x1]
MOV RDI,R14
MOV EDX,0x10
CALL 0x001434ef
MOV ECX,EAX
MOV EAX,0xffffffff
TEST ECX,ECX
JNZ 0x0016c926
JMP 0x0016c8ef
|
ulong add_req_module_entry(long param_1,long param_2,uint param_3)
{
uint uVar1;
int *piVar2;
int iVar3;
ulong uVar4;
uint *puVar5;
uint uVar6;
uVar1 = *(uint *)(param_2 + 0x20);
if ((long)(int)uVar1 < 1) {
uVar6 = 0;
}
else {
puVar5 = *(uint **)(param_2 + 0x18);
uVar4 = 0;
do {
if (*puVar5 == param_3) {
return uVar4;
}
uVar4 = uVar4 + 1;
puVar5 = puVar5 + 4;
uVar6 = uVar1;
} while ((long)(int)uVar1 != uVar4);
}
if ((*(int *)(param_2 + 0x24) <= (int)uVar1) &&
(iVar3 = js_realloc_array(param_1,param_2 + 0x18,0x10,param_2 + 0x24,uVar1 + 1), iVar3 != 0)) {
return 0xffffffff;
}
iVar3 = *(int *)(param_2 + 0x20);
*(int *)(param_2 + 0x20) = iVar3 + 1;
puVar5 = (uint *)((long)iVar3 * 0x10 + *(long *)(param_2 + 0x18));
if (0xdf < (int)param_3) {
piVar2 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + (ulong)param_3 * 8);
*piVar2 = *piVar2 + 1;
}
*puVar5 = param_3;
puVar5[2] = 0;
puVar5[3] = 0;
return (ulong)uVar6;
}
|
|
6,564 | add_req_module_entry | bluesky950520[P]quickjs/quickjs.c | static int add_req_module_entry(JSContext *ctx, JSModuleDef *m,
JSAtom module_name)
{
JSReqModuleEntry *rme;
int i;
/* no need to add the module request if it is already present */
for(i = 0; i < m->req_module_entries_count; i++) {
rme = &m->req_module_entries[i];
if (rme->module_name == module_name)
return i;
}
if (js_resize_array(ctx, (void **)&m->req_module_entries,
sizeof(JSReqModuleEntry),
&m->req_module_entries_size,
m->req_module_entries_count + 1))
return -1;
rme = &m->req_module_entries[m->req_module_entries_count++];
rme->module_name = JS_DupAtom(ctx, module_name);
rme->module = NULL;
return i;
} | O2 | c | add_req_module_entry:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r14
movl 0x20(%rsi), %r8d
addq $0x18, %rsi
xorl %eax, %eax
testl %r8d, %r8d
movl $0x0, %ebx
cmovgl %r8d, %ebx
xorl %ecx, %ecx
cmpq %rcx, %rbx
je 0x5b99b
movq (%rsi), %rdx
cmpl %ebp, (%rdx,%rax)
je 0x5b9b6
incq %rcx
addq $0x10, %rax
jmp 0x5b985
leaq 0x24(%r15), %rcx
incl %r8d
pushq $0x10
popq %rdx
movq %r14, %rdi
callq 0x3b0ef
testl %eax, %eax
je 0x5b9ba
pushq $-0x1
popq %rbx
jmp 0x5b9ec
movl %ecx, %ebx
jmp 0x5b9ec
movslq 0x20(%r15), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x20(%r15)
shlq $0x4, %rax
addq 0x18(%r15), %rax
cmpl $0xe0, %ebp
jl 0x5b9e5
movq 0x18(%r14), %rcx
movq 0x68(%rcx), %rcx
movl %ebp, %edx
movq (%rcx,%rdx,8), %rcx
incl (%rcx)
movl %ebp, (%rax)
andq $0x0, 0x8(%rax)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| add_req_module_entry:
push rbp
push r15
push r14
push rbx
push rax
mov ebp, edx
mov r15, rsi
mov r14, rdi
mov r8d, [rsi+20h]
add rsi, 18h
xor eax, eax
test r8d, r8d
mov ebx, 0
cmovg ebx, r8d
xor ecx, ecx
loc_5B985:
cmp rbx, rcx
jz short loc_5B99B
mov rdx, [rsi]
cmp [rdx+rax], ebp
jz short loc_5B9B6
inc rcx
add rax, 10h
jmp short loc_5B985
loc_5B99B:
lea rcx, [r15+24h]
inc r8d
push 10h
pop rdx
mov rdi, r14
call js_resize_array
test eax, eax
jz short loc_5B9BA
push 0FFFFFFFFFFFFFFFFh
pop rbx
jmp short loc_5B9EC
loc_5B9B6:
mov ebx, ecx
jmp short loc_5B9EC
loc_5B9BA:
movsxd rax, dword ptr [r15+20h]
lea ecx, [rax+1]
mov [r15+20h], ecx
shl rax, 4
add rax, [r15+18h]
cmp ebp, 0E0h
jl short loc_5B9E5
mov rcx, [r14+18h]
mov rcx, [rcx+68h]
mov edx, ebp
mov rcx, [rcx+rdx*8]
inc dword ptr [rcx]
loc_5B9E5:
mov [rax], ebp
and qword ptr [rax+8], 0
loc_5B9EC:
mov eax, ebx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long add_req_module_entry(long long a1, long long a2, int a3)
{
int v5; // r8d
_QWORD *v6; // rsi
long long v7; // rax
long long v8; // rbx
long long i; // rcx
long long v10; // rax
long long v11; // rax
_DWORD *v12; // rcx
v5 = *(_DWORD *)(a2 + 32);
v6 = (_QWORD *)(a2 + 24);
v7 = 0LL;
v8 = 0LL;
if ( v5 > 0 )
v8 = (unsigned int)v5;
for ( i = 0LL; v8 != i; ++i )
{
if ( *(_DWORD *)(*v6 + v7) == a3 )
{
LODWORD(v8) = i;
return (unsigned int)v8;
}
v7 += 16LL;
}
if ( (unsigned int)js_resize_array(a1, (long long)v6, 16LL, (_DWORD *)(a2 + 36), v5 + 1) )
{
LODWORD(v8) = -1;
}
else
{
v10 = *(int *)(a2 + 32);
*(_DWORD *)(a2 + 32) = v10 + 1;
v11 = *(_QWORD *)(a2 + 24) + 16 * v10;
if ( a3 >= 224 )
{
v12 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 8LL * (unsigned int)a3);
++*v12;
}
*(_DWORD *)v11 = a3;
*(_QWORD *)(v11 + 8) = 0LL;
}
return (unsigned int)v8;
}
| add_req_module_entry:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBP,EDX
MOV R15,RSI
MOV R14,RDI
MOV R8D,dword ptr [RSI + 0x20]
ADD RSI,0x18
XOR EAX,EAX
TEST R8D,R8D
MOV EBX,0x0
CMOVG EBX,R8D
XOR ECX,ECX
LAB_0015b985:
CMP RBX,RCX
JZ 0x0015b99b
MOV RDX,qword ptr [RSI]
CMP dword ptr [RDX + RAX*0x1],EBP
JZ 0x0015b9b6
INC RCX
ADD RAX,0x10
JMP 0x0015b985
LAB_0015b99b:
LEA RCX,[R15 + 0x24]
INC R8D
PUSH 0x10
POP RDX
MOV RDI,R14
CALL 0x0013b0ef
TEST EAX,EAX
JZ 0x0015b9ba
PUSH -0x1
POP RBX
JMP 0x0015b9ec
LAB_0015b9b6:
MOV EBX,ECX
JMP 0x0015b9ec
LAB_0015b9ba:
MOVSXD RAX,dword ptr [R15 + 0x20]
LEA ECX,[RAX + 0x1]
MOV dword ptr [R15 + 0x20],ECX
SHL RAX,0x4
ADD RAX,qword ptr [R15 + 0x18]
CMP EBP,0xe0
JL 0x0015b9e5
MOV RCX,qword ptr [R14 + 0x18]
MOV RCX,qword ptr [RCX + 0x68]
MOV EDX,EBP
MOV RCX,qword ptr [RCX + RDX*0x8]
INC dword ptr [RCX]
LAB_0015b9e5:
MOV dword ptr [RAX],EBP
AND qword ptr [RAX + 0x8],0x0
LAB_0015b9ec:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
ulong add_req_module_entry(long param_1,long param_2,uint param_3)
{
uint uVar1;
int *piVar2;
int iVar3;
long lVar4;
uint *puVar5;
ulong uVar6;
ulong uVar7;
uVar1 = *(uint *)(param_2 + 0x20);
lVar4 = 0;
uVar7 = 0;
if (0 < (int)uVar1) {
uVar7 = (ulong)uVar1;
}
uVar6 = 0;
do {
if (uVar7 == uVar6) {
iVar3 = js_resize_array(param_1,(long *)(param_2 + 0x18),0x10,param_2 + 0x24,uVar1 + 1);
if (iVar3 == 0) {
iVar3 = *(int *)(param_2 + 0x20);
*(int *)(param_2 + 0x20) = iVar3 + 1;
puVar5 = (uint *)((long)iVar3 * 0x10 + *(long *)(param_2 + 0x18));
if (0xdf < (int)param_3) {
piVar2 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + (ulong)param_3 * 8);
*piVar2 = *piVar2 + 1;
}
*puVar5 = param_3;
puVar5[2] = 0;
puVar5[3] = 0;
}
else {
uVar7 = 0xffffffffffffffff;
}
LAB_0015b9ec:
return uVar7 & 0xffffffff;
}
if (*(uint *)(*(long *)(param_2 + 0x18) + lVar4) == param_3) {
uVar7 = uVar6 & 0xffffffff;
goto LAB_0015b9ec;
}
uVar6 = uVar6 + 1;
lVar4 = lVar4 + 0x10;
} while( true );
}
|
|
6,565 | common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&, common_chat_inputs const&) | monkey531[P]llama/common/chat.cpp | static common_chat_params common_chat_params_init_functionary_v3_1_llama_3_1(const common_chat_template & tmpl, const struct common_chat_inputs & inputs) {
// https://github.com/MeetKai/functionary/blob/main/tests/prompt_test_v3-llama3.1.txt
common_chat_params data;
json tools = inputs.tools.is_null() ? inputs.tools : json::array();
std::string python_code_argument_name;
auto has_raw_python = false;
data.grammar_lazy = inputs.tool_choice != "required";
data.grammar = build_grammar([&](const common_grammar_builder & builder) {
std::vector<std::string> tool_rules;
foreach_function(inputs.tools, [&](const json & tool) {
const auto & function = tool["function"];
const auto & parameters = function["parameters"];
std::string name = function["name"];
if (name == "python" || name == "ipython") {
if (!parameters.contains("type")) {
throw std::runtime_error("Missing type in python tool");
}
has_raw_python = true;
auto type = parameters.at("type");
if (type == "object") {
auto properties = parameters.at("properties");
for (auto it = properties.begin(); it != properties.end(); ++it) {
if (it.value().at("type") == "string") {
if (!python_code_argument_name.empty()) {
throw std::runtime_error("Multiple string arguments found in python tool");
}
python_code_argument_name = it.key();
}
}
if (python_code_argument_name.empty()) {
throw std::runtime_error("No string argument found in python tool");
}
} else if (type != "string") {
throw std::runtime_error("Invalid type in python tool: " + type.dump());
}
}
tool_rules.push_back(builder.add_rule(name + "-call", "\"<function=" + name + ">\" " + builder.add_schema(name + "-args", parameters) + " \"</function>\" space"));
});
if (has_raw_python) {
tool_rules.push_back(builder.add_rule("python-call", "\"<|python_tag|>\" .*"));
data.grammar_triggers.push_back({"<|python_tag|>", /* .at_start = */ false});
}
auto tool_call = builder.add_rule("tool_call", string_join(tool_rules, " | ")) + " space";
builder.add_rule("root", inputs.parallel_tool_calls ? "(" + tool_call + ")+" : tool_call);
data.grammar_triggers.push_back({"<function=", /* .at_start = */ false});
}, grammar_options);
data.prompt = tmpl.apply(inputs.messages, inputs.tools.empty() ? json() : inputs.tools, inputs.add_generation_prompt);
// TODO: if (has_raw_python)
data.format = COMMON_CHAT_FORMAT_FUNCTIONARY_V3_1_LLAMA_3_1;
return data;
} | O3 | cpp | common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&, common_chat_inputs const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl $0x0, (%rdi)
xorl %eax, %eax
movb %al, 0x8(%rdi)
movq %rax, 0x10(%rdi)
leaq 0x28(%rdi), %rcx
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movb %al, 0x28(%rdi)
movb %al, 0x38(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x50(%rdi)
movups %xmm0, 0x60(%rdi)
movups %xmm0, 0x70(%rdi)
movq %rax, 0x80(%rdi)
leaq 0x10(%rdx), %r12
cmpb %al, 0x10(%rdx)
je 0xd0ad2
leaq 0x58(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x2, %r8d
callq 0x7ef22
jmp 0xd0adf
leaq 0x58(%rsp), %rdi
movq %r12, %rsi
callq 0x5dac6
leaq 0x88(%rsp), %rbp
movq %rbp, -0x10(%rbp)
xorl %r13d, %r13d
movq %r13, -0x8(%rbp)
movb %r13b, (%rbp)
movb %r13b, 0x17(%rsp)
leaq 0x20(%r14), %rdi
leaq 0x1f3cf(%rip), %rsi # 0xefed5
callq 0xa5275
movb %al, 0x38(%rbx)
movq %r13, 0x20(%rsp)
movl $0x20, %edi
callq 0x1a8d0
movq %r14, (%rax)
leaq 0x17(%rsp), %rcx
movq %rcx, 0x8(%rax)
leaq 0x78(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq %rbx, 0x18(%rax)
leaq 0x18(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x9fa9(%rip), %rax # 0xdaaee
movq %rax, 0x18(%rsi)
leaq 0xa692(%rip), %rax # 0xdb1e2
movq %rax, 0x10(%rsi)
leaq 0x252ad(%rip), %rdx # 0xf5e08
leaq 0x38(%rsp), %rdi
callq 0xbb3c8
leaq 0x18(%rbx), %rdi
leaq 0x38(%rsp), %r13
movq %r13, %rsi
callq 0x1aad0
movq (%r13), %rdi
leaq 0x48(%rsp), %r13
cmpq %r13, %rdi
je 0xd0b91
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x1a8f0
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0xd0baa
leaq 0x18(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movzbl (%r12), %eax
testl %eax, %eax
je 0xd0bd9
cmpl $0x2, %eax
je 0xd0bbd
cmpl $0x1, %eax
jne 0xd0bca
movq 0x18(%r14), %rax
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
je 0xd0bd9
leaq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0x5dac6
jmp 0xd0be7
movb $0x0, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movzbl 0x68(%r14), %r8d
leaq 0x68(%rsp), %r9
movb $0x0, (%r9)
movq $0x0, 0x8(%r9)
movl $0x1, (%rsp)
leaq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rcx
movq %r15, %rsi
movq %r14, %rdx
callq 0xa1994
leaq 0x98(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x7fc76
movb 0x8(%rbx), %al
leaq 0x98(%rsp), %rdi
movb (%rdi), %cl
movb %cl, 0x8(%rbx)
movb %al, (%rdi)
movq 0x10(%rbx), %rax
movq 0x8(%rdi), %rcx
movq %rcx, 0x10(%rbx)
movq %rax, 0x8(%rdi)
callq 0x5df92
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0xd0c69
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x1a8f0
leaq 0x68(%rsp), %rdi
callq 0x5df92
leaq 0x18(%rsp), %rdi
callq 0x5df92
movl $0x8, (%rbx)
movq 0x78(%rsp), %rdi
cmpq %rbp, %rdi
je 0xd0c9d
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x1a8f0
leaq 0x58(%rsp), %rdi
callq 0x5df92
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xd0d18
jmp 0xd0d10
movq %rax, %r14
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0xd0cdc
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x1a8f0
jmp 0xd0cdc
movq %rax, %r14
leaq 0x68(%rsp), %rdi
callq 0x5df92
leaq 0x18(%rsp), %rdi
callq 0x5df92
jmp 0xd0d1b
movq %rax, %r14
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0xd0d1b
leaq 0x18(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0xd0d1b
movq %rax, %rdi
callq 0x21a05
movq %rax, %r14
movq 0x78(%rsp), %rdi
cmpq %rbp, %rdi
je 0xd0d35
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x1a8f0
leaq 0x58(%rsp), %rdi
callq 0x5df92
movq %rbx, %rdi
callq 0x7e7a8
movq %r14, %rdi
callq 0x1afb0
movq %rax, %r14
jmp 0xd0d3f
| _ZL50common_chat_params_init_functionary_v3_1_llama_3_1RKN5minja13chat_templateERK18common_chat_inputs:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A8h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov dword ptr [rdi], 0
xor eax, eax
mov [rdi+8], al
mov [rdi+10h], rax
lea rcx, [rdi+28h]
mov [rdi+18h], rcx
mov [rdi+20h], rax
mov [rdi+28h], al
mov [rdi+38h], al
xorps xmm0, xmm0
movups xmmword ptr [rdi+40h], xmm0
movups xmmword ptr [rdi+50h], xmm0
movups xmmword ptr [rdi+60h], xmm0
movups xmmword ptr [rdi+70h], xmm0
mov [rdi+80h], rax
lea r12, [rdx+10h]
cmp [rdx+10h], al
jz short loc_D0AD2
lea rdi, [rsp+0D8h+var_80]
xor esi, esi
xor edx, edx
xor ecx, ecx
mov r8d, 2
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)
jmp short loc_D0ADF
loc_D0AD2:
lea rdi, [rsp+0D8h+var_80]
mov rsi, r12
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
loc_D0ADF:
lea rbp, [rsp+0D8h+var_50]
mov [rbp-10h], rbp
xor r13d, r13d
mov [rbp-8], r13
mov [rbp+0], r13b
mov [rsp+0D8h+var_C1], r13b
lea rdi, [r14+20h]
lea rsi, aRequired; "required"
call _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_
mov [rbx+38h], al
mov [rsp+0D8h+var_B8], r13
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
mov [rax], r14
lea rcx, [rsp+0D8h+var_C1]
mov [rax+8], rcx
lea rcx, [rsp+0D8h+var_60]
mov [rax+10h], rcx
mov [rax+18h], rbx
lea rsi, [rsp+0D8h+var_C0]
mov [rsi], rax
lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL50common_chat_params_init_functionary_v3_1_llama_3_1RKN5minja13chat_templateERK18common_chat_inputsE3$_0E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke(std::_Any_data const&,common_grammar_builder const&)
mov [rsi+18h], rax
lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL50common_chat_params_init_functionary_v3_1_llama_3_1RKN5minja13chat_templateERK18common_chat_inputsE3$_0E10_M_managerERSt9_Any_dataRKSD_St18_Manager_operation; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsi+10h], rax
lea rdx, _ZL15grammar_options; grammar_options
lea rdi, [rsp+0D8h+var_A0]
call _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options; build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)
lea rdi, [rbx+18h]
lea r13, [rsp+0D8h+var_A0]
mov rsi, r13
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r13+0]; void *
lea r13, [rsp+0D8h+var_90]
cmp rdi, r13
jz short loc_D0B91
mov rsi, [rsp+0D8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D0B91:
mov rax, [rsp+0D8h+var_B0]
test rax, rax
jz short loc_D0BAA
lea rdi, [rsp+0D8h+var_C0]
mov rsi, rdi
mov edx, 3
call rax
loc_D0BAA:
movzx eax, byte ptr [r12]
test eax, eax
jz short loc_D0BD9
cmp eax, 2
jz short loc_D0BBD
cmp eax, 1
jnz short loc_D0BCA
loc_D0BBD:
mov rax, [r14+18h]
mov rcx, [rax]
cmp rcx, [rax+8]
jz short loc_D0BD9
loc_D0BCA:
lea rdi, [rsp+0D8h+var_C0]
mov rsi, r12
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
jmp short loc_D0BE7
loc_D0BD9:
mov [rsp+0D8h+var_C0], 0
mov [rsp+0D8h+var_B8], 0
loc_D0BE7:
movzx r8d, byte ptr [r14+68h]
lea r9, [rsp+0D8h+var_70]
mov byte ptr [r9], 0
mov qword ptr [r9+8], 0
mov [rsp+0D8h+var_D8], 1
lea rdi, [rsp+0D8h+var_A0]
lea rcx, [rsp+0D8h+var_C0]
mov rsi, r15
mov rdx, r14
call _ZNK5minja13chat_template5applyERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_b; minja::chat_template::apply(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool)
lea rdi, [rsp+0D8h+var_40]
lea rsi, [rsp+0D8h+var_A0]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_
mov al, [rbx+8]
lea rdi, [rsp+0D8h+var_40]
mov cl, [rdi]
mov [rbx+8], cl
mov [rdi], al
mov rax, [rbx+10h]
mov rcx, [rdi+8]
mov [rbx+10h], rcx
mov [rdi+8], rax
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rsp+0D8h+var_A0]; void *
cmp rdi, r13
jz short loc_D0C69
mov rsi, [rsp+0D8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D0C69:
lea rdi, [rsp+0D8h+var_70]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [rsp+0D8h+var_C0]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov dword ptr [rbx], 8
mov rdi, [rsp+0D8h+var_60]; void *
cmp rdi, rbp
jz short loc_D0C9D
mov rsi, [rsp+0D8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D0C9D:
lea rdi, [rsp+0D8h+var_80]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_D0D18
jmp short loc_D0D10
mov r14, rax
mov rdi, [rsp+0D8h+var_A0]; void *
cmp rdi, r13
jz short loc_D0CDC
mov rsi, [rsp+0D8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_D0CDC
mov r14, rax
loc_D0CDC:
lea rdi, [rsp+0D8h+var_70]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [rsp+0D8h+var_C0]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_D0D1B
mov r14, rax
mov rax, [rsp+0D8h+var_B0]
test rax, rax
jz short loc_D0D1B
lea rdi, [rsp+0D8h+var_C0]
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_D0D1B
loc_D0D10:
mov rdi, rax
call __clang_call_terminate
loc_D0D18:
mov r14, rax
loc_D0D1B:
mov rdi, [rsp+0D8h+var_60]; void *
cmp rdi, rbp
jz short loc_D0D35
mov rsi, [rsp+0D8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D0D35:
lea rdi, [rsp+0D8h+var_80]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_D0D3F:
mov rdi, rbx; this
call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params()
mov rdi, r14
call __Unwind_Resume
mov r14, rax
jmp short loc_D0D3F
| long long common_chat_params_init_functionary_v3_1_llama_3_1(
const minja::chat_template *a1,
const common_chat_inputs *a2,
long long a3)
{
unsigned __int8 *v4; // r12
_QWORD *v5; // rax
int v6; // r8d
int v7; // r9d
int v8; // eax
int v9; // r8d
char v10; // al
long long v11; // rax
char v13; // [rsp+17h] [rbp-C1h] BYREF
_QWORD *v14; // [rsp+18h] [rbp-C0h] BYREF
long long v15; // [rsp+20h] [rbp-B8h]
long long ( *v16)(); // [rsp+28h] [rbp-B0h]
long long ( *v17)(); // [rsp+30h] [rbp-A8h]
void *v18[2]; // [rsp+38h] [rbp-A0h] BYREF
_QWORD v19[2]; // [rsp+48h] [rbp-90h] BYREF
unsigned __int8 v20[16]; // [rsp+58h] [rbp-80h] BYREF
_BYTE v21[8]; // [rsp+68h] [rbp-70h] BYREF
long long v22; // [rsp+70h] [rbp-68h]
void *v23[2]; // [rsp+78h] [rbp-60h] BYREF
_QWORD v24[2]; // [rsp+88h] [rbp-50h] BYREF
char v25[8]; // [rsp+98h] [rbp-40h] BYREF
long long v26; // [rsp+A0h] [rbp-38h]
*(_DWORD *)a1 = 0;
*((_BYTE *)a1 + 8) = 0;
*((_QWORD *)a1 + 2) = 0LL;
*((_QWORD *)a1 + 3) = (char *)a1 + 40;
*((_QWORD *)a1 + 4) = 0LL;
*((_BYTE *)a1 + 40) = 0;
*((_BYTE *)a1 + 56) = 0;
*((_OWORD *)a1 + 4) = 0LL;
*((_OWORD *)a1 + 5) = 0LL;
*((_OWORD *)a1 + 6) = 0LL;
*((_OWORD *)a1 + 7) = 0LL;
*((_QWORD *)a1 + 16) = 0LL;
v4 = (unsigned __int8 *)(a3 + 16);
if ( *(_BYTE *)(a3 + 16) )
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v20,
0LL,
0LL,
0LL,
2LL);
else
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v20,
(unsigned __int8 *)(a3 + 16));
v23[0] = v24;
v23[1] = 0LL;
LOBYTE(v24[0]) = 0;
v13 = 0;
*((_BYTE *)a1 + 56) = ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_(
a3 + 32,
(long long)"required");
v15 = 0LL;
v5 = (_QWORD *)operator new(0x20uLL);
*v5 = a3;
v5[1] = &v13;
v5[2] = v23;
v5[3] = a1;
v14 = v5;
v17 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke;
v16 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager;
build_grammar[abi:cxx11]((long long)v18, (long long)&v14, grammar_options, (long long)v23, v6, v7);
std::string::operator=((char *)a1 + 24, v18);
if ( v18[0] != v19 )
operator delete(v18[0], v19[0] + 1LL);
if ( v16 )
((void ( *)(_QWORD **, _QWORD **, long long))v16)(&v14, &v14, 3LL);
v8 = *v4;
if ( !*v4 || (v8 == 2 || v8 == 1) && **(_QWORD **)(a3 + 24) == *(_QWORD *)(*(_QWORD *)(a3 + 24) + 8LL) )
{
LOBYTE(v14) = 0;
v15 = 0LL;
}
else
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
(unsigned __int8 *)&v14,
v4);
}
v9 = *(unsigned __int8 *)(a3 + 104);
v21[0] = 0;
v22 = 0LL;
minja::chat_template::apply((long long)v18, a2, (unsigned __int8 *)a3, (unsigned __int8 *)&v14, v9, v21, 1);
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_(v25);
v10 = *((_BYTE *)a1 + 8);
*((_BYTE *)a1 + 8) = v25[0];
v25[0] = v10;
v11 = *((_QWORD *)a1 + 2);
*((_QWORD *)a1 + 2) = v26;
v26 = v11;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v25);
if ( v18[0] != v19 )
operator delete(v18[0], v19[0] + 1LL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v21);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v14);
*(_DWORD *)a1 = 8;
if ( v23[0] != v24 )
operator delete(v23[0], v24[0] + 1LL);
return nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v20);
}
| common_chat_params_init_functionary_v3_1_llama_3_1:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV dword ptr [RDI],0x0
XOR EAX,EAX
MOV byte ptr [RDI + 0x8],AL
MOV qword ptr [RDI + 0x10],RAX
LEA RCX,[RDI + 0x28]
MOV qword ptr [RDI + 0x18],RCX
MOV qword ptr [RDI + 0x20],RAX
MOV byte ptr [RDI + 0x28],AL
MOV byte ptr [RDI + 0x38],AL
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x40],XMM0
MOVUPS xmmword ptr [RDI + 0x50],XMM0
MOVUPS xmmword ptr [RDI + 0x60],XMM0
MOVUPS xmmword ptr [RDI + 0x70],XMM0
MOV qword ptr [RDI + 0x80],RAX
LEA R12,[RDX + 0x10]
CMP byte ptr [RDX + 0x10],AL
JZ 0x001d0ad2
LAB_001d0aba:
LEA RDI,[RSP + 0x58]
XOR ESI,ESI
XOR EDX,EDX
XOR ECX,ECX
MOV R8D,0x2
CALL 0x0017ef22
JMP 0x001d0adf
LAB_001d0ad2:
LEA RDI,[RSP + 0x58]
MOV RSI,R12
CALL 0x0015dac6
LAB_001d0adf:
LEA RBP,[RSP + 0x88]
MOV qword ptr [RBP + -0x10],RBP
XOR R13D,R13D
MOV qword ptr [RBP + -0x8],R13
MOV byte ptr [RBP],R13B
MOV byte ptr [RSP + 0x17],R13B
LEA RDI,[R14 + 0x20]
LEA RSI,[0x1efed5]
CALL 0x001a5275
MOV byte ptr [RBX + 0x38],AL
MOV qword ptr [RSP + 0x20],R13
LAB_001d0b13:
MOV EDI,0x20
CALL 0x0011a8d0
MOV qword ptr [RAX],R14
LEA RCX,[RSP + 0x17]
MOV qword ptr [RAX + 0x8],RCX
LEA RCX,[RSP + 0x78]
MOV qword ptr [RAX + 0x10],RCX
MOV qword ptr [RAX + 0x18],RBX
LEA RSI,[RSP + 0x18]
MOV qword ptr [RSI],RAX
LEA RAX,[0x1daaee]
MOV qword ptr [RSI + 0x18],RAX
LEA RAX,[0x1db1e2]
MOV qword ptr [RSI + 0x10],RAX
LAB_001d0b54:
LEA RDX,[0x1f5e08]
LEA RDI,[RSP + 0x38]
CALL 0x001bb3c8
LEA RDI,[RBX + 0x18]
LEA R13,[RSP + 0x38]
MOV RSI,R13
CALL 0x0011aad0
MOV RDI,qword ptr [R13]
LEA R13,[RSP + 0x48]
CMP RDI,R13
JZ 0x001d0b91
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x0011a8f0
LAB_001d0b91:
MOV RAX,qword ptr [RSP + 0x28]
TEST RAX,RAX
JZ 0x001d0baa
LAB_001d0b9b:
LEA RDI,[RSP + 0x18]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001d0baa:
MOVZX EAX,byte ptr [R12]
TEST EAX,EAX
JZ 0x001d0bd9
CMP EAX,0x2
JZ 0x001d0bbd
CMP EAX,0x1
JNZ 0x001d0bca
LAB_001d0bbd:
MOV RAX,qword ptr [R14 + 0x18]
MOV RCX,qword ptr [RAX]
CMP RCX,qword ptr [RAX + 0x8]
JZ 0x001d0bd9
LAB_001d0bca:
LEA RDI,[RSP + 0x18]
MOV RSI,R12
CALL 0x0015dac6
JMP 0x001d0be7
LAB_001d0bd9:
MOV byte ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
LAB_001d0be7:
MOVZX R8D,byte ptr [R14 + 0x68]
LEA R9,[RSP + 0x68]
MOV byte ptr [R9],0x0
MOV qword ptr [R9 + 0x8],0x0
LAB_001d0bfd:
MOV dword ptr [RSP],0x1
LEA RDI,[RSP + 0x38]
LEA RCX,[RSP + 0x18]
MOV RSI,R15
MOV RDX,R14
CALL 0x001a1994
LAB_001d0c19:
LEA RDI,[RSP + 0x98]
LEA RSI,[RSP + 0x38]
CALL 0x0017fc76
MOV AL,byte ptr [RBX + 0x8]
LEA RDI,[RSP + 0x98]
MOV CL,byte ptr [RDI]
MOV byte ptr [RBX + 0x8],CL
MOV byte ptr [RDI],AL
MOV RAX,qword ptr [RBX + 0x10]
MOV RCX,qword ptr [RDI + 0x8]
MOV qword ptr [RBX + 0x10],RCX
MOV qword ptr [RDI + 0x8],RAX
CALL 0x0015df92
MOV RDI,qword ptr [RSP + 0x38]
CMP RDI,R13
JZ 0x001d0c69
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x0011a8f0
LAB_001d0c69:
LEA RDI,[RSP + 0x68]
CALL 0x0015df92
LEA RDI,[RSP + 0x18]
CALL 0x0015df92
MOV dword ptr [RBX],0x8
MOV RDI,qword ptr [RSP + 0x78]
CMP RDI,RBP
JZ 0x001d0c9d
MOV RSI,qword ptr [RSP + 0x88]
INC RSI
CALL 0x0011a8f0
LAB_001d0c9d:
LEA RDI,[RSP + 0x58]
CALL 0x0015df92
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,
common_chat_inputs const&) */
void common_chat_params_init_functionary_v3_1_llama_3_1
(chat_template *param_1,common_chat_inputs *param_2)
{
basic_json *pbVar1;
basic_json bVar2;
int8 uVar3;
chat_template cVar4;
long in_RDX;
int1 local_c1;
long *local_c0;
int8 local_b8;
code *local_b0;
code *local_a8;
long *local_a0 [2];
long local_90 [2];
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_80 [16];
data local_70 [8];
int8 local_68;
int1 *local_60;
int8 local_58;
int1 local_50;
int7 uStack_4f;
chat_template local_40 [8];
int8 local_38;
*(int4 *)param_1 = 0;
param_1[8] = (chat_template)0x0;
*(int8 *)(param_1 + 0x10) = 0;
*(chat_template **)(param_1 + 0x18) = param_1 + 0x28;
*(int8 *)(param_1 + 0x20) = 0;
param_1[0x28] = (chat_template)0x0;
param_1[0x38] = (chat_template)0x0;
*(int8 *)(param_1 + 0x40) = 0;
*(int8 *)(param_1 + 0x48) = 0;
*(int8 *)(param_1 + 0x50) = 0;
*(int8 *)(param_1 + 0x58) = 0;
*(int8 *)(param_1 + 0x60) = 0;
*(int8 *)(param_1 + 0x68) = 0;
*(int8 *)(param_1 + 0x70) = 0;
*(int8 *)(param_1 + 0x78) = 0;
*(int8 *)(param_1 + 0x80) = 0;
pbVar1 = (basic_json *)(in_RDX + 0x10);
if (*(char *)(in_RDX + 0x10) == '\0') {
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_80,pbVar1);
}
else {
/* try { // try from 001d0aba to 001d0ade has its CatchHandler @ 001d0d4f */
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_80,0,0,0,2);
}
local_58 = 0;
local_50 = 0;
local_c1 = 0;
local_60 = &local_50;
cVar4 = (chat_template)
_ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_
(in_RDX + 0x20,"required");
param_1[0x38] = cVar4;
local_b8 = 0;
/* try { // try from 001d0b13 to 001d0b1c has its CatchHandler @ 001d0d18 */
local_c0 = (long *)operator_new(0x20);
*local_c0 = in_RDX;
local_c0[1] = (long)&local_c1;
local_c0[2] = (long)&local_60;
local_c0[3] = (long)param_1;
local_a8 = std::
_Function_handler<void(common_grammar_builder_const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template_const&,common_chat_inputs_const&)::$_0>
::_M_invoke;
local_b0 = std::
_Function_handler<void(common_grammar_builder_const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template_const&,common_chat_inputs_const&)::$_0>
::_M_manager;
/* try { // try from 001d0b54 to 001d0b64 has its CatchHandler @ 001d0cf2 */
build_grammar_abi_cxx11_((function *)local_a0,(common_grammar_options *)&local_c0);
std::__cxx11::string::operator=((string *)(param_1 + 0x18),(string *)local_a0);
if (local_a0[0] != local_90) {
operator_delete(local_a0[0],local_90[0] + 1);
}
if (local_b0 != (code *)0x0) {
/* try { // try from 001d0b9b to 001d0ba9 has its CatchHandler @ 001d0cbb */
(*local_b0)(&local_c0,&local_c0,3);
}
bVar2 = *pbVar1;
if ((bVar2 == (basic_json)0x0) ||
(((bVar2 == (basic_json)0x2 || (bVar2 == (basic_json)0x1)) &&
(**(long **)(in_RDX + 0x18) == (*(long **)(in_RDX + 0x18))[1])))) {
local_c0 = (long *)((ulong)local_c0 & 0xffffffffffffff00);
local_b8 = 0;
}
else {
/* try { // try from 001d0bca to 001d0bd6 has its CatchHandler @ 001d0cb9 */
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)&local_c0,pbVar1);
}
local_70[0] = (data)0x0;
local_68 = 0;
/* try { // try from 001d0bfd to 001d0c18 has its CatchHandler @ 001d0cd9 */
minja::chat_template::apply
((basic_json *)local_a0,(basic_json *)param_2,SUB81(in_RDX,0),(basic_json *)&local_c0,
*(bool *)(in_RDX + 0x68));
/* try { // try from 001d0c19 to 001d0c2a has its CatchHandler @ 001d0cbd */
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_
(local_40,local_a0);
cVar4 = param_1[8];
param_1[8] = local_40[0];
uVar3 = *(int8 *)(param_1 + 0x10);
*(int8 *)(param_1 + 0x10) = local_38;
local_40[0] = cVar4;
local_38 = uVar3;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_40);
if (local_a0[0] != local_90) {
operator_delete(local_a0[0],local_90[0] + 1);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_70);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_c0);
*(int4 *)param_1 = 8;
if (local_60 != &local_50) {
operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_80);
return;
}
|
|
6,566 | usage() | eloqsql/sql/mysqld.cc | static void usage(void)
{
DBUG_ENTER("usage");
myf utf8_flag= global_system_variables.old_behavior &
OLD_MODE_UTF8_IS_UTF8MB3 ? MY_UTF8_IS_UTF8MB3 : 0;
if (!(default_charset_info= get_charset_by_csname(default_character_set_name,
MY_CS_PRIMARY,
MYF(utf8_flag | MY_WME))))
exit(1);
if (!default_collation_name)
default_collation_name= (char*) default_charset_info->coll_name.str;
print_version();
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
puts("Starts the MariaDB database server.\n");
printf("Usage: %s [OPTIONS]\n", my_progname);
if (!opt_verbose)
puts("\nFor more help options (several pages), use mysqld --verbose --help.");
else
{
#ifdef _WIN32
puts("NT and Win32 specific options:\n"
" --install Install the default service (NT).\n"
" --install-manual Install the default service started manually (NT).\n"
" --install service_name Install an optional service (NT).\n"
" --install-manual service_name Install an optional service started manually (NT).\n"
" --remove Remove the default service from the service list (NT).\n"
" --remove service_name Remove the service_name from the service list (NT).\n"
" --enable-named-pipe Only to be used for the default server (NT).\n"
" --standalone Dummy option to start as a standalone server (NT).");
puts("");
#endif
print_defaults(MYSQL_CONFIG_NAME,load_default_groups);
puts("");
set_ports();
/* Print out all the options including plugin supplied options */
print_help();
if (! plugins_are_initialized)
{
puts("\nPlugins have parameters that are not reflected in this list"
"\nbecause execution stopped before plugins were initialized.");
}
puts("\nTo see what variables a running server is using, type"
"\n'SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES' instead of 'mysqld --verbose --help' or 'mariadbd --verbose --help'.");
}
DBUG_VOID_RETURN;
} | O0 | cpp | usage():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0x14b9571(%rip), %rdx # 0x1d49260
andq $0x8, %rdx
xorl %eax, %eax
movl $0x400, %ecx # imm = 0x400
cmpq $0x0, %rdx
cmovnel %ecx, %eax
movl %eax, %eax
movq %rax, -0x8(%rbp)
movq 0x14bdfd2(%rip), %rdi # 0x1d4dce0
movq -0x8(%rbp), %rdx
orq $0x10, %rdx
movl $0x20, %esi
callq 0x1302f40
leaq 0x12f8189(%rip), %rcx # 0x1b87eb0
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x88fd3a
movl $0x1, %edi
callq 0x776de0
cmpq $0x0, 0x14bdfae(%rip) # 0x1d4dcf0
jne 0x88fd59
leaq 0x12f8165(%rip), %rax # 0x1b87eb0
movq (%rax), %rax
movq 0x20(%rax), %rax
movq %rax, 0x14bdf97(%rip) # 0x1d4dcf0
callq 0x899660
leaq 0xb8433c(%rip), %rdi # 0x14140a1
callq 0x777400
leaq 0xb84376(%rip), %rdi # 0x14140e7
callq 0x777400
leaq 0x1d8e473(%rip), %rax # 0x261e1f0
movq (%rax), %rsi
leaq 0xb84385(%rip), %rdi # 0x141410c
movb $0x0, %al
callq 0x7763c0
cmpb $0x0, 0x14bdf7d(%rip) # 0x1d4dd12
jne 0x88fda5
leaq 0xb84383(%rip), %rdi # 0x1414121
callq 0x777400
jmp 0x88fdef
leaq 0xbaea00(%rip), %rdi # 0x143e7ac
leaq 0x12b056d(%rip), %rsi # 0x1b40320
callq 0x1305580
leaq 0xbb5094(%rip), %rdi # 0x1444e53
callq 0x777400
callq 0x89c690
callq 0x89e4e0
cmpb $0x0, 0x14bb3f4(%rip) # 0x1d4b1c9
jne 0x88fde3
leaq 0xb84388(%rip), %rdi # 0x1414166
callq 0x777400
leaq 0xb843f4(%rip), %rdi # 0x14141de
callq 0x777400
jmp 0x88fdf1
jmp 0x88fdf3
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| _ZL5usagev_1:
push rbp
mov rbp, rsp
sub rsp, 10h
mov rdx, cs:qword_1D49260
and rdx, 8
xor eax, eax
mov ecx, 400h
cmp rdx, 0
cmovnz eax, ecx
mov eax, eax
mov [rbp+var_8], rax
mov rdi, cs:_ZL26default_character_set_name; default_character_set_name
mov rdx, [rbp+var_8]
or rdx, 10h
mov esi, 20h ; ' '
call get_charset_by_csname
lea rcx, default_charset_info
mov [rcx], rax
cmp rax, 0
jnz short loc_88FD3A
mov edi, 1
call _exit
loc_88FD3A:
cmp cs:_ZL22default_collation_name, 0; default_collation_name
jnz short loc_88FD59
lea rax, default_charset_info
mov rax, [rax]
mov rax, [rax+20h]
mov cs:_ZL22default_collation_name, rax; default_collation_name
loc_88FD59:
call _ZL13print_versionv_0; print_version(void)
lea rdi, aCopyrightC2000; "Copyright (c) 2000, 2018, Oracle, Maria"...
call _puts
lea rdi, aStartsTheMaria; "Starts the MariaDB database server.\n"
call _puts
lea rax, my_progname
mov rsi, [rax]
lea rdi, aUsageSOptions; "Usage: %s [OPTIONS]\n"
mov al, 0
call _printf
cmp cs:_ZL11opt_verbose, 0; opt_verbose
jnz short loc_88FDA5
lea rdi, aForMoreHelpOpt; "\nFor more help options (several pages)"...
call _puts
jmp short loc_88FDEF
loc_88FDA5:
lea rdi, aDummy+3; "my"
lea rsi, load_default_groups
call print_defaults
lea rdi, byte_1444E53
call _puts
call _ZL9set_portsv; set_ports(void)
call _ZL10print_helpv; print_help(void)
cmp cs:plugins_are_initialized, 0
jnz short loc_88FDE3
lea rdi, aPluginsHavePar; "\nPlugins have parameters that are not "...
call _puts
loc_88FDE3:
lea rdi, aToSeeWhatVaria; "\nTo see what variables a running serve"...
call _puts
loc_88FDEF:
jmp short $+2
loc_88FDF1:
jmp short $+2
loc_88FDF3:
add rsp, 10h
pop rbp
retn
| long long usage(void)
{
unsigned int v0; // eax
v0 = 0;
if ( (qword_1D49260 & 8) != 0 )
v0 = 1024;
default_charset_info = (_UNKNOWN *)get_charset_by_csname(default_character_set_name, 32LL, v0 | 0x10LL);
if ( !default_charset_info )
exit(1LL);
if ( !default_collation_name )
default_collation_name = *((_QWORD *)default_charset_info + 4);
print_version();
puts("Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.\n");
puts("Starts the MariaDB database server.\n");
printf("Usage: %s [OPTIONS]\n", my_progname);
if ( !opt_verbose )
return puts("\nFor more help options (several pages), use mysqld --verbose --help.");
print_defaults("my", &load_default_groups);
puts(&byte_1444E53);
set_ports();
print_help();
if ( !plugins_are_initialized )
puts(
"\n"
"Plugins have parameters that are not reflected in this list\n"
"because execution stopped before plugins were initialized.");
return puts(
"\n"
"To see what variables a running server is using, type\n"
"'SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES' instead of 'mysqld --verbose --help' or 'mariadbd --verbose --help'.");
}
| __cxx_global_var_init.5:
PUSH RBP
MOV RBP,RSP
LEA RDI,[0x1e5a200]
MOV ESI,0x800000
CALL 0x008fd530
POP RBP
RET
|
void __cxx_global_var_init_5(void)
{
date_conv_mode_t::date_conv_mode_t((date_conv_mode_t *)&TIME_NO_ZERO_IN_DATE,0x800000);
return;
}
|
|
6,567 | my_hash_sort_utf8mb4_nopad | eloqsql/strings/ctype-utf8.c | static void
my_hash_sort_utf8mb4_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen,
ulong *nr1, ulong *nr2)
{
my_wc_t wc;
int res;
const uchar *e= s + slen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
register ulong m1= *nr1, m2= *nr2;
while ((res= my_mb_wc_utf8mb4(cs, &wc, (uchar*) s, (uchar*) e)) > 0)
{
my_tosort_unicode(uni_plane, &wc, cs->state);
MY_HASH_ADD_16(m1, m2, (uint) (wc & 0xFFFF));
if (wc > 0xFFFF)
{
/*
Put the highest byte only if it is non-zero,
to make hash functions for utf8mb3 and utf8mb4
compatible for BMP characters.
This is useful to keep order of records in
test results, e.g. for "SHOW GRANTS".
*/
MY_HASH_ADD(m1, m2, (uint) ((wc >> 16) & 0xFF));
}
s+= res;
}
*nr1= m1;
*nr2= m2;
} | O0 | c | my_hash_sort_utf8mb4_nopad:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x40(%rbp), %rcx
leaq -0x30(%rbp), %rsi
callq 0x6b6e0
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
jle 0x7075a
movq -0x48(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0xc(%rax), %edx
leaq -0x30(%rbp), %rsi
callq 0x6be00
jmp 0x70671
movq -0x50(%rbp), %rax
andq $0x3f, %rax
addq -0x58(%rbp), %rax
movq -0x30(%rbp), %rcx
andq $0xffff, %rcx # imm = 0xFFFF
andl $0xff, %ecx
movl %ecx, %ecx
imulq %rcx, %rax
movq -0x50(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x58(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x58(%rbp)
jmp 0x706b5
movq -0x50(%rbp), %rax
andq $0x3f, %rax
addq -0x58(%rbp), %rax
movq -0x30(%rbp), %rcx
andq $0xffff, %rcx # imm = 0xFFFF
shrl $0x8, %ecx
movl %ecx, %ecx
imulq %rcx, %rax
movq -0x50(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x58(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x58(%rbp)
jmp 0x706f6
cmpq $0xffff, -0x30(%rbp) # imm = 0xFFFF
jbe 0x70744
jmp 0x70702
movq -0x50(%rbp), %rax
andq $0x3f, %rax
addq -0x58(%rbp), %rax
movq -0x30(%rbp), %rcx
shrq $0x10, %rcx
andq $0xff, %rcx
movl %ecx, %ecx
imulq %rcx, %rax
movq -0x50(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x58(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x58(%rbp)
jmp 0x70744
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x7063a
movq -0x50(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x58(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_hash_sort_utf8mb4_nopad:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov [rbp+var_48], rax
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_50], rax
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_58], rax
loc_7063A:
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_40]
lea rsi, [rbp+var_30]
call my_mb_wc_utf8mb4
mov [rbp+var_34], eax
cmp eax, 0
jle loc_7075A
mov rdi, [rbp+var_48]
mov rax, [rbp+var_8]
mov edx, [rax+0Ch]
lea rsi, [rbp+var_30]
call my_tosort_unicode
jmp short $+2
loc_70671:
mov rax, [rbp+var_50]
and rax, 3Fh
add rax, [rbp+var_58]
mov rcx, [rbp+var_30]
and rcx, 0FFFFh
and ecx, 0FFh
mov ecx, ecx
imul rax, rcx
mov rcx, [rbp+var_50]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_50]
mov [rbp+var_50], rax
mov rax, [rbp+var_58]
add rax, 3
mov [rbp+var_58], rax
jmp short $+2
loc_706B5:
mov rax, [rbp+var_50]
and rax, 3Fh
add rax, [rbp+var_58]
mov rcx, [rbp+var_30]
and rcx, 0FFFFh
shr ecx, 8
mov ecx, ecx
imul rax, rcx
mov rcx, [rbp+var_50]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_50]
mov [rbp+var_50], rax
mov rax, [rbp+var_58]
add rax, 3
mov [rbp+var_58], rax
jmp short $+2
loc_706F6:
cmp [rbp+var_30], 0FFFFh
jbe short loc_70744
jmp short $+2
loc_70702:
mov rax, [rbp+var_50]
and rax, 3Fh
add rax, [rbp+var_58]
mov rcx, [rbp+var_30]
shr rcx, 10h
and rcx, 0FFh
mov ecx, ecx
imul rax, rcx
mov rcx, [rbp+var_50]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_50]
mov [rbp+var_50], rax
mov rax, [rbp+var_58]
add rax, 3
mov [rbp+var_58], rax
jmp short $+2
loc_70744:
mov ecx, [rbp+var_34]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
jmp loc_7063A
loc_7075A:
mov rcx, [rbp+var_50]
mov rax, [rbp+var_20]
mov [rax], rcx
mov rcx, [rbp+var_58]
mov rax, [rbp+var_28]
mov [rax], rcx
add rsp, 60h
pop rbp
retn
| _QWORD * my_hash_sort_utf8mb4_nopad(long long a1, long long a2, long long a3, long long *a4, _QWORD *a5, long long a6)
{
_QWORD *result; // rax
long long v7; // [rsp+8h] [rbp-58h]
long long v8; // [rsp+8h] [rbp-58h]
long long v9; // [rsp+10h] [rbp-50h]
long long v10; // [rsp+10h] [rbp-50h]
_QWORD *v11; // [rsp+18h] [rbp-48h]
long long v12; // [rsp+20h] [rbp-40h]
int v13; // [rsp+2Ch] [rbp-34h]
unsigned long long v14; // [rsp+30h] [rbp-30h] BYREF
_QWORD *v15; // [rsp+38h] [rbp-28h]
long long *v16; // [rsp+40h] [rbp-20h]
long long v17; // [rsp+48h] [rbp-18h]
long long v18; // [rsp+50h] [rbp-10h]
long long v19; // [rsp+58h] [rbp-8h]
v19 = a1;
v18 = a2;
v17 = a3;
v16 = a4;
v15 = a5;
v12 = a3 + a2;
v11 = *(_QWORD **)(a1 + 120);
v9 = *a4;
v7 = *a5;
while ( 1 )
{
v13 = my_mb_wc_utf8mb4(v19, (long long)&v14, v18, v12, (long long)a5, a6);
if ( v13 <= 0 )
break;
my_tosort_unicode(v11, &v14, *(_DWORD *)(v19 + 12));
v10 = v9 ^ ((v9 << 8) + (unsigned __int8)v14 * (v7 + (v9 & 0x3F)));
v8 = v7 + 3;
v9 = v10 ^ ((v10 << 8) + BYTE1(v14) * (v8 + (v10 & 0x3F)));
v7 = v8 + 3;
if ( v14 > 0xFFFF )
{
v9 ^= (v9 << 8) + BYTE2(v14) * (v7 + (v9 & 0x3F));
v7 += 3LL;
}
v18 += v13;
}
*v16 = v9;
result = v15;
*v15 = v7;
return result;
}
| my_hash_sort_utf8mb4_nopad:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x58],RAX
LAB_0017063a:
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x40]
LEA RSI,[RBP + -0x30]
CALL 0x0016b6e0
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
JLE 0x0017075a
MOV RDI,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RAX + 0xc]
LEA RSI,[RBP + -0x30]
CALL 0x0016be00
JMP 0x00170671
LAB_00170671:
MOV RAX,qword ptr [RBP + -0x50]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x30]
AND RCX,0xffff
AND ECX,0xff
MOV ECX,ECX
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x50]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x3
MOV qword ptr [RBP + -0x58],RAX
JMP 0x001706b5
LAB_001706b5:
MOV RAX,qword ptr [RBP + -0x50]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x30]
AND RCX,0xffff
SHR ECX,0x8
MOV ECX,ECX
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x50]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x3
MOV qword ptr [RBP + -0x58],RAX
JMP 0x001706f6
LAB_001706f6:
CMP qword ptr [RBP + -0x30],0xffff
JBE 0x00170744
JMP 0x00170702
LAB_00170702:
MOV RAX,qword ptr [RBP + -0x50]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x30]
SHR RCX,0x10
AND RCX,0xff
MOV ECX,ECX
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x50]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x3
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00170744
LAB_00170744:
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0017063a
LAB_0017075a:
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
ADD RSP,0x60
POP RBP
RET
|
void my_hash_sort_utf8mb4_nopad(long param_1,long param_2,long param_3,ulong *param_4,long *param_5)
{
int8 uVar1;
long lVar2;
int iVar3;
long local_60;
ulong local_58;
ulong local_38;
long *local_30;
ulong *local_28;
long local_20;
long local_18;
long local_10;
uVar1 = *(int8 *)(param_1 + 0x78);
local_58 = *param_4;
local_60 = *param_5;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
while( true ) {
iVar3 = my_mb_wc_utf8mb4(local_10,&local_38,local_18,param_2 + param_3);
if (iVar3 < 1) break;
my_tosort_unicode(uVar1,&local_38,*(int4 *)(local_10 + 0xc));
local_58 = ((local_58 & 0x3f) + local_60) * (ulong)((uint)local_38 & 0xff) + local_58 * 0x100 ^
local_58;
local_58 = ((local_58 & 0x3f) + local_60 + 3) * (ulong)(((uint)local_38 & 0xffff) >> 8) +
local_58 * 0x100 ^ local_58;
lVar2 = local_60 + 6;
if (0xffff < local_38) {
local_58 = ((local_58 & 0x3f) + local_60 + 6) * (ulong)((uint)(local_38 >> 0x10) & 0xff) +
local_58 * 0x100 ^ local_58;
lVar2 = local_60 + 9;
}
local_60 = lVar2;
local_18 = local_18 + iVar3;
}
*local_28 = local_58;
*local_30 = local_60;
return;
}
|
|
6,568 | bitmap_is_prefix | eloqsql/mysys/my_bitmap.c | my_bool bitmap_is_prefix(const MY_BITMAP *map, uint prefix_size)
{
uint prefix_mask= last_byte_mask(prefix_size);
uchar *m= (uchar*) map->bitmap;
uchar *end_prefix= m+(prefix_size-1)/8;
uchar *end;
DBUG_ASSERT(m);
DBUG_ASSERT(prefix_size <= map->n_bits);
/* Empty prefix is always true */
if (!prefix_size)
return 1;
while (m < end_prefix)
if (*m++ != 0xff)
return 0;
end= ((uchar*) map->bitmap) + no_bytes_in_map(map) - 1;
if (m == end)
return ((*m & last_byte_mask(map->n_bits)) == prefix_mask);
if (*m != prefix_mask)
return 0;
while (++m < end)
if (*m != 0)
return 0;
return ((*m & last_byte_mask(map->n_bits)) == 0);
} | O0 | c | bitmap_is_prefix:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl -0x14(%rbp), %edi
callq 0xef300
movzbl %al, %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
shrl $0x3, %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0xef1f0
jmp 0xef1f2
jmp 0xef1f4
cmpl $0x0, -0x14(%rbp)
jne 0xef203
movb $0x1, -0x1(%rbp)
jmp 0xef2f6
jmp 0xef205
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0xef233
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movzbl (%rax), %eax
cmpl $0xff, %eax
je 0xef231
movb $0x0, -0x1(%rbp)
jmp 0xef2f6
jmp 0xef205
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x1c(%rcx), %ecx
addl $0x7, %ecx
shrl $0x3, %ecx
movl %ecx, %ecx
addq %rcx, %rax
addq $-0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0xef28e
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %edi
callq 0xef300
movb %al, %cl
movl -0x34(%rbp), %eax
movzbl %cl, %ecx
andl %ecx, %eax
cmpl -0x18(%rbp), %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x1(%rbp)
jmp 0xef2f6
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl -0x18(%rbp), %eax
je 0xef2a0
movb $0x0, -0x1(%rbp)
jmp 0xef2f6
jmp 0xef2a2
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
cmpq -0x30(%rbp), %rax
jae 0xef2c8
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
je 0xef2c6
movb $0x0, -0x1(%rbp)
jmp 0xef2f6
jmp 0xef2a2
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %edi
callq 0xef300
movb %al, %cl
movl -0x38(%rbp), %eax
movzbl %cl, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nop
| bitmap_is_prefix:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov edi, [rbp+var_14]
call last_byte_mask
movzx eax, al
mov [rbp+var_18], eax
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov ecx, [rbp+var_14]
sub ecx, 1
shr ecx, 3
mov ecx, ecx
add rax, rcx
mov [rbp+var_28], rax
jmp short $+2
loc_EF1F0:
jmp short $+2
loc_EF1F2:
jmp short $+2
loc_EF1F4:
cmp [rbp+var_14], 0
jnz short loc_EF203
mov [rbp+var_1], 1
jmp loc_EF2F6
loc_EF203:
jmp short $+2
loc_EF205:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jnb short loc_EF233
mov rax, [rbp+var_20]
mov rcx, rax
add rcx, 1
mov [rbp+var_20], rcx
movzx eax, byte ptr [rax]
cmp eax, 0FFh
jz short loc_EF231
mov [rbp+var_1], 0
jmp loc_EF2F6
loc_EF231:
jmp short loc_EF205
loc_EF233:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rcx, [rbp+var_10]
mov ecx, [rcx+1Ch]
add ecx, 7
shr ecx, 3
mov ecx, ecx
add rax, rcx
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_30], rax
mov rax, [rbp+var_20]
cmp rax, [rbp+var_30]
jnz short loc_EF28E
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
mov [rbp+var_34], eax
mov rax, [rbp+var_10]
mov edi, [rax+1Ch]
call last_byte_mask
mov cl, al
mov eax, [rbp+var_34]
movzx ecx, cl
and eax, ecx
cmp eax, [rbp+var_18]
setz al
and al, 1
movzx eax, al
mov [rbp+var_1], al
jmp short loc_EF2F6
loc_EF28E:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
cmp eax, [rbp+var_18]
jz short loc_EF2A0
mov [rbp+var_1], 0
jmp short loc_EF2F6
loc_EF2A0:
jmp short $+2
loc_EF2A2:
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
cmp rax, [rbp+var_30]
jnb short loc_EF2C8
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
cmp eax, 0
jz short loc_EF2C6
mov [rbp+var_1], 0
jmp short loc_EF2F6
loc_EF2C6:
jmp short loc_EF2A2
loc_EF2C8:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
mov [rbp+var_38], eax
mov rax, [rbp+var_10]
mov edi, [rax+1Ch]
call last_byte_mask
mov cl, al
mov eax, [rbp+var_38]
movzx ecx, cl
and eax, ecx
cmp eax, 0
setz al
and al, 1
movzx eax, al
mov [rbp+var_1], al
loc_EF2F6:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
| char bitmap_is_prefix(unsigned __int8 **a1, unsigned int a2)
{
unsigned __int8 *v2; // rax
unsigned __int8 v4; // [rsp+8h] [rbp-38h]
unsigned __int8 v5; // [rsp+Ch] [rbp-34h]
unsigned long long v6; // [rsp+10h] [rbp-30h]
unsigned __int8 *v7; // [rsp+20h] [rbp-20h]
int byte_mask; // [rsp+28h] [rbp-18h]
byte_mask = (unsigned __int8)last_byte_mask(a2);
v7 = *a1;
if ( !a2 )
return 1;
while ( v7 < &(*a1)[(a2 - 1) >> 3] )
{
v2 = v7++;
if ( *v2 != 255 )
return 0;
}
v6 = (unsigned long long)&(*a1)[((unsigned int)(*((_DWORD *)a1 + 7) + 7) >> 3) - 1];
if ( v7 == (unsigned __int8 *)v6 )
{
v5 = *v7;
return (unsigned __int8)(last_byte_mask(*((unsigned int *)a1 + 7)) & v5) == byte_mask;
}
else if ( *v7 == byte_mask )
{
while ( (unsigned long long)++v7 < v6 )
{
if ( *v7 )
return 0;
}
v4 = *v7;
return (unsigned __int8)(last_byte_mask(*((unsigned int *)a1 + 7)) & v4) == 0;
}
else
{
return 0;
}
}
| bitmap_is_prefix:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV EDI,dword ptr [RBP + -0x14]
CALL 0x001ef300
MOVZX EAX,AL
MOV dword ptr [RBP + -0x18],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
SUB ECX,0x1
SHR ECX,0x3
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001ef1f0
LAB_001ef1f0:
JMP 0x001ef1f2
LAB_001ef1f2:
JMP 0x001ef1f4
LAB_001ef1f4:
CMP dword ptr [RBP + -0x14],0x0
JNZ 0x001ef203
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001ef2f6
LAB_001ef203:
JMP 0x001ef205
LAB_001ef205:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JNC 0x001ef233
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x20],RCX
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xff
JZ 0x001ef231
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001ef2f6
LAB_001ef231:
JMP 0x001ef205
LAB_001ef233:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x1c]
ADD ECX,0x7
SHR ECX,0x3
MOV ECX,ECX
ADD RAX,RCX
ADD RAX,-0x1
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001ef28e
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EDI,dword ptr [RAX + 0x1c]
CALL 0x001ef300
MOV CL,AL
MOV EAX,dword ptr [RBP + -0x34]
MOVZX ECX,CL
AND EAX,ECX
CMP EAX,dword ptr [RBP + -0x18]
SETZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x1],AL
JMP 0x001ef2f6
LAB_001ef28e:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,dword ptr [RBP + -0x18]
JZ 0x001ef2a0
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001ef2f6
LAB_001ef2a0:
JMP 0x001ef2a2
LAB_001ef2a2:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x001ef2c8
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x001ef2c6
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001ef2f6
LAB_001ef2c6:
JMP 0x001ef2a2
LAB_001ef2c8:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x38],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EDI,dword ptr [RAX + 0x1c]
CALL 0x001ef300
MOV CL,AL
MOV EAX,dword ptr [RBP + -0x38]
MOVZX ECX,CL
AND EAX,ECX
CMP EAX,0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x1],AL
LAB_001ef2f6:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int8 bitmap_is_prefix(long *param_1,int param_2)
{
byte bVar1;
byte bVar2;
byte bVar3;
byte *pbVar4;
byte *pbVar5;
byte *local_28;
bool local_9;
bVar1 = last_byte_mask(param_2);
pbVar4 = (byte *)*param_1 + (param_2 - 1U >> 3);
local_28 = (byte *)*param_1;
if (param_2 == 0) {
local_9 = true;
pbVar5 = pbVar4;
}
else {
do {
if (pbVar4 <= local_28) {
pbVar4 = (byte *)(*param_1 + (ulong)(*(int *)((long)param_1 + 0x1c) + 7U >> 3) + -1);
if (local_28 == pbVar4) {
bVar3 = *local_28;
bVar2 = last_byte_mask(*(int4 *)((long)param_1 + 0x1c));
local_9 = (bVar3 & bVar2) == bVar1;
pbVar5 = (byte *)0x0;
goto LAB_001ef2f6;
}
pbVar5 = (byte *)0x0;
if (*local_28 == bVar1) goto LAB_001ef2a2;
local_9 = false;
goto LAB_001ef2f6;
}
bVar3 = *local_28;
pbVar5 = (byte *)0x0;
local_28 = local_28 + 1;
} while (bVar3 == 0xff);
local_9 = false;
}
goto LAB_001ef2f6;
while (pbVar5 = (byte *)0x0, *local_28 == 0) {
LAB_001ef2a2:
local_28 = local_28 + 1;
if (pbVar4 <= local_28) {
bVar1 = *local_28;
bVar3 = last_byte_mask(*(int4 *)((long)param_1 + 0x1c));
local_9 = (bVar1 & bVar3) == 0;
pbVar5 = (byte *)0x0;
goto LAB_001ef2f6;
}
}
local_9 = false;
LAB_001ef2f6:
return CONCAT71((int7)((ulong)pbVar5 >> 8),local_9);
}
|
|
6,569 | evmone::instr::core::sstore(evmone::StackTop, long, evmone::ExecutionState&) | corpus-core[P]colibri-stateless/build_O1/_deps/evmone_external-src/lib/evmone/instructions_storage.cpp | Result sstore(StackTop stack, int64_t gas_left, ExecutionState& state) noexcept
{
if (state.in_static_mode())
return {EVMC_STATIC_MODE_VIOLATION, gas_left};
if (state.rev >= EVMC_ISTANBUL && gas_left <= 2300)
return {EVMC_OUT_OF_GAS, gas_left};
const auto key = intx::be::store<evmc::bytes32>(stack.pop());
const auto value = intx::be::store<evmc::bytes32>(stack.pop());
const auto gas_cost_cold =
(state.rev >= EVMC_BERLIN &&
state.host.access_storage(state.msg->recipient, key) == EVMC_ACCESS_COLD) ?
instr::cold_sload_cost :
0;
const auto status = state.host.set_storage(state.msg->recipient, key, value);
const auto [gas_cost_warm, gas_refund] = sstore_costs[state.rev][status];
const auto gas_cost = gas_cost_warm + gas_cost_cold;
if ((gas_left -= gas_cost) < 0)
return {EVMC_OUT_OF_GAS, gas_left};
state.gas_refund += gas_refund;
return {EVMC_SUCCESS, gas_left};
} | O1 | cpp | evmone::instr::core::sstore(evmone::StackTop, long, evmone::ExecutionState&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rsi, %rbx
movq 0x20(%rdx), %rcx
movl $0xb, %eax
testb $0x1, 0x4(%rcx)
jne 0x4f59f
movq %rdx, %r14
movl 0x40(%rdx), %edx
cmpl $0x7, %edx
setge %sil
cmpq $0x8fd, %rbx # imm = 0x8FD
setl %r8b
movl $0x3, %eax
testb %sil, %r8b
jne 0x4f59f
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movq 0x18(%rdi), %rax
bswapq %rax
movq 0x10(%rdi), %rsi
bswapq %rsi
movq 0x8(%rdi), %r8
bswapq %r8
movq (%rdi), %r9
bswapq %r9
movq %rax, (%rsp)
movq %rsi, 0x8(%rsp)
movq %r8, 0x10(%rsp)
movq %r9, 0x18(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq -0x8(%rdi), %rax
bswapq %rax
movq -0x10(%rdi), %rsi
bswapq %rsi
movq -0x18(%rdi), %r8
bswapq %r8
movq -0x20(%rdi), %rdi
bswapq %rdi
movq %rax, 0x20(%rsp)
movq %rsi, 0x28(%rsp)
movq %r8, 0x30(%rsp)
movq %rdi, 0x38(%rsp)
cmpl $0x8, %edx
jl 0x4f53f
movl 0x28(%rcx), %eax
leaq 0x40(%rsp), %rsi
movl %eax, 0x10(%rsi)
movups 0x18(%rcx), %xmm0
movaps %xmm0, (%rsi)
movq 0x30(%r14), %rax
movq 0x38(%r14), %rdi
movq %rsp, %rdx
callq *0x68(%rax)
xorl %ecx, %ecx
testl %eax, %eax
movq $-0x834, %r15 # imm = 0xF7CC
cmovneq %rcx, %r15
jmp 0x4f542
xorl %r15d, %r15d
movq 0x20(%r14), %rax
movl 0x28(%rax), %ecx
leaq 0x40(%rsp), %rsi
movl %ecx, 0x10(%rsi)
movups 0x18(%rax), %xmm0
movaps %xmm0, (%rsi)
movq 0x30(%r14), %rax
movq 0x38(%r14), %rdi
movq %rsp, %rdx
leaq 0x20(%rsp), %rcx
callq *0x10(%rax)
movl 0x40(%r14), %ecx
leaq (%rcx,%rcx,8), %rcx
leaq 0x3de5c(%rip), %rdx # 0x8d3d6
leaq (%rdx,%rcx,4), %rcx
movl %eax, %eax
movswq (%rcx,%rax,4), %rdx
addq %r15, %rbx
subq %rdx, %rbx
js 0x4f59a
movswq 0x2(%rcx,%rax,4), %rax
addq %rax, (%r14)
xorl %eax, %eax
jmp 0x4f59f
movl $0x3, %eax
movq %rbx, %rdx
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x4f5ae
movq %rax, %rdi
callq 0x30731
nop
| _ZN6evmone5instr4core6sstoreENS_8StackTopElRNS_14ExecutionStateE:
push r15
push r14
push rbx
sub rsp, 60h
mov rbx, rsi
mov rcx, [rdx+20h]
mov eax, 0Bh
test byte ptr [rcx+4], 1
jnz loc_4F59F
mov r14, rdx
mov edx, [rdx+40h]
cmp edx, 7
setnl sil
cmp rbx, 8FDh
setl r8b
mov eax, 3
test r8b, sil
jnz loc_4F59F
xorps xmm0, xmm0
movaps [rsp+78h+var_68], xmm0
movaps [rsp+78h+var_78], xmm0
mov rax, [rdi+18h]
bswap rax
mov rsi, [rdi+10h]
bswap rsi
mov r8, [rdi+8]
bswap r8
mov r9, [rdi]
bswap r9
mov qword ptr [rsp+78h+var_78], rax
mov qword ptr [rsp+78h+var_78+8], rsi
mov qword ptr [rsp+78h+var_68], r8
mov qword ptr [rsp+78h+var_68+8], r9
movaps [rsp+78h+var_48], xmm0
movaps [rsp+78h+var_58], xmm0
mov rax, [rdi-8]
bswap rax
mov rsi, [rdi-10h]
bswap rsi
mov r8, [rdi-18h]
bswap r8
mov rdi, [rdi-20h]
bswap rdi
mov qword ptr [rsp+78h+var_58], rax
mov qword ptr [rsp+78h+var_58+8], rsi
mov qword ptr [rsp+78h+var_48], r8
mov qword ptr [rsp+78h+var_48+8], rdi
cmp edx, 8
jl short loc_4F53F
mov eax, [rcx+28h]
lea rsi, [rsp+78h+var_38]
mov [rsi+10h], eax
movups xmm0, xmmword ptr [rcx+18h]
movaps xmmword ptr [rsi], xmm0
mov rax, [r14+30h]
mov rdi, [r14+38h]
mov rdx, rsp
call qword ptr [rax+68h]
xor ecx, ecx
test eax, eax
mov r15, 0FFFFFFFFFFFFF7CCh
cmovnz r15, rcx
jmp short loc_4F542
loc_4F53F:
xor r15d, r15d
loc_4F542:
mov rax, [r14+20h]
mov ecx, [rax+28h]
lea rsi, [rsp+78h+var_38]
mov [rsi+10h], ecx
movups xmm0, xmmword ptr [rax+18h]
movaps xmmword ptr [rsi], xmm0
mov rax, [r14+30h]
mov rdi, [r14+38h]
mov rdx, rsp
lea rcx, [rsp+78h+var_58]
call qword ptr [rax+10h]
mov ecx, [r14+40h]
lea rcx, [rcx+rcx*8]
lea rdx, _ZN6evmone5instr4core12_GLOBAL__N_112sstore_costsE; evmone::instr::core::`anonymous namespace'::sstore_costs
lea rcx, [rdx+rcx*4]
mov eax, eax
movsx rdx, word ptr [rcx+rax*4]
add rbx, r15
sub rbx, rdx
js short loc_4F59A
movsx rax, word ptr [rcx+rax*4+2]
add [r14], rax
xor eax, eax
jmp short loc_4F59F
loc_4F59A:
mov eax, 3
loc_4F59F:
mov rdx, rbx
add rsp, 60h
pop rbx
pop r14
pop r15
retn
jmp short $+2
loc_4F5AE:
mov rdi, rax
call __clang_call_terminate
| long long evmone::instr::core::sstore(unsigned long long *a1, long long a2, long long a3)
{
long long v4; // rcx
long long result; // rax
int v7; // edx
unsigned long long v8; // rsi
unsigned long long v9; // r8
unsigned long long v10; // r9
unsigned long long v11; // rax
unsigned long long v12; // rsi
unsigned long long v13; // r8
unsigned long long v14; // rdi
long long v15; // r15
long long v16; // rax
int v17; // eax
char *v18; // rcx
__int128 v19; // [rsp+0h] [rbp-78h] BYREF
__int128 v20; // [rsp+10h] [rbp-68h]
__int128 v21; // [rsp+20h] [rbp-58h] BYREF
__int128 v22; // [rsp+30h] [rbp-48h]
__int128 v23; // [rsp+40h] [rbp-38h] BYREF
int v24; // [rsp+50h] [rbp-28h]
v4 = *(_QWORD *)(a3 + 32);
result = 11LL;
if ( (*(_BYTE *)(v4 + 4) & 1) == 0 )
{
v7 = *(_DWORD *)(a3 + 64);
result = 3LL;
if ( v7 < 7 || a2 >= 2301 )
{
v20 = 0LL;
v19 = 0LL;
v8 = _byteswap_uint64(a1[2]);
v9 = _byteswap_uint64(a1[1]);
v10 = _byteswap_uint64(*a1);
*(_QWORD *)&v19 = _byteswap_uint64(a1[3]);
*((_QWORD *)&v19 + 1) = v8;
*(_QWORD *)&v20 = v9;
*((_QWORD *)&v20 + 1) = v10;
v22 = 0LL;
v21 = 0LL;
v11 = _byteswap_uint64(*(a1 - 1));
v12 = _byteswap_uint64(*(a1 - 2));
v13 = _byteswap_uint64(*(a1 - 3));
v14 = _byteswap_uint64(*(a1 - 4));
*(_QWORD *)&v21 = v11;
*((_QWORD *)&v21 + 1) = v12;
*(_QWORD *)&v22 = v13;
*((_QWORD *)&v22 + 1) = v14;
if ( v7 < 8 )
{
v15 = 0LL;
}
else
{
v24 = *(_DWORD *)(v4 + 40);
v23 = *(_OWORD *)(v4 + 24);
v15 = -2100LL;
if ( (*(unsigned int ( **)(_QWORD, __int128 *, __int128 *))(*(_QWORD *)(a3 + 48) + 104LL))(
*(_QWORD *)(a3 + 56),
&v23,
&v19) )
{
v15 = 0LL;
}
}
v16 = *(_QWORD *)(a3 + 32);
v24 = *(_DWORD *)(v16 + 40);
v23 = *(_OWORD *)(v16 + 24);
v17 = (*(long long ( **)(_QWORD, __int128 *, __int128 *, __int128 *))(*(_QWORD *)(a3 + 48) + 16LL))(
*(_QWORD *)(a3 + 56),
&v23,
&v19,
&v21);
v18 = (char *)&evmone::instr::core::`anonymous namespace'::sstore_costs + 36 * *(unsigned int *)(a3 + 64);
if ( v15 + a2 - *(__int16 *)&v18[4 * v17] < 0 )
{
return 3LL;
}
else
{
*(_QWORD *)a3 += *(__int16 *)&v18[4 * v17 + 2];
return 0LL;
}
}
}
return result;
}
| sstore:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x60
MOV RBX,RSI
MOV RCX,qword ptr [RDX + 0x20]
MOV EAX,0xb
TEST byte ptr [RCX + 0x4],0x1
JNZ 0x0014f59f
MOV R14,RDX
MOV EDX,dword ptr [RDX + 0x40]
CMP EDX,0x7
SETGE SIL
CMP RBX,0x8fd
SETL R8B
MOV EAX,0x3
TEST R8B,SIL
JNZ 0x0014f59f
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOV RAX,qword ptr [RDI + 0x18]
BSWAP RAX
MOV RSI,qword ptr [RDI + 0x10]
BSWAP RSI
MOV R8,qword ptr [RDI + 0x8]
BSWAP R8
MOV R9,qword ptr [RDI]
BSWAP R9
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RSI
MOV qword ptr [RSP + 0x10],R8
MOV qword ptr [RSP + 0x18],R9
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOV RAX,qword ptr [RDI + -0x8]
BSWAP RAX
MOV RSI,qword ptr [RDI + -0x10]
BSWAP RSI
MOV R8,qword ptr [RDI + -0x18]
BSWAP R8
MOV RDI,qword ptr [RDI + -0x20]
BSWAP RDI
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x30],R8
MOV qword ptr [RSP + 0x38],RDI
CMP EDX,0x8
JL 0x0014f53f
MOV EAX,dword ptr [RCX + 0x28]
LEA RSI,[RSP + 0x40]
MOV dword ptr [RSI + 0x10],EAX
MOVUPS XMM0,xmmword ptr [RCX + 0x18]
MOVAPS xmmword ptr [RSI],XMM0
MOV RAX,qword ptr [R14 + 0x30]
MOV RDI,qword ptr [R14 + 0x38]
LAB_0014f528:
MOV RDX,RSP
CALL qword ptr [RAX + 0x68]
XOR ECX,ECX
TEST EAX,EAX
MOV R15,-0x834
CMOVNZ R15,RCX
JMP 0x0014f542
LAB_0014f53f:
XOR R15D,R15D
LAB_0014f542:
MOV RAX,qword ptr [R14 + 0x20]
MOV ECX,dword ptr [RAX + 0x28]
LEA RSI,[RSP + 0x40]
MOV dword ptr [RSI + 0x10],ECX
MOVUPS XMM0,xmmword ptr [RAX + 0x18]
MOVAPS xmmword ptr [RSI],XMM0
MOV RAX,qword ptr [R14 + 0x30]
MOV RDI,qword ptr [R14 + 0x38]
LAB_0014f560:
MOV RDX,RSP
LEA RCX,[RSP + 0x20]
CALL qword ptr [RAX + 0x10]
MOV ECX,dword ptr [R14 + 0x40]
LEA RCX,[RCX + RCX*0x8]
LEA RDX,[0x18d3d6]
LEA RCX,[RDX + RCX*0x4]
MOV EAX,EAX
MOVSX RDX,word ptr [RCX + RAX*0x4]
ADD RBX,R15
SUB RBX,RDX
JS 0x0014f59a
MOVSX RAX,word ptr [RCX + RAX*0x4 + 0x2]
ADD qword ptr [R14],RAX
XOR EAX,EAX
JMP 0x0014f59f
LAB_0014f59a:
MOV EAX,0x3
LAB_0014f59f:
MOV RDX,RBX
ADD RSP,0x60
POP RBX
POP R14
POP R15
RET
|
/* evmone::instr::core::sstore(evmone::StackTop, long, evmone::ExecutionState&) */
int1 [16] evmone::instr::core::sstore(ulong *param_1,long param_2,long *param_3)
{
ulong uVar1;
long lVar2;
int iVar3;
uint uVar4;
int8 uVar5;
long lVar6;
int1 auVar7 [16];
ulong local_78;
ulong uStack_70;
ulong local_68;
ulong uStack_60;
ulong local_58;
ulong uStack_50;
ulong local_48;
ulong uStack_40;
int4 local_38;
int4 uStack_34;
int4 uStack_30;
int4 uStack_2c;
int4 local_28;
lVar6 = param_3[4];
uVar5 = 0xb;
if ((*(byte *)(lVar6 + 4) & 1) == 0) {
uVar5 = 3;
if (0x8fc < param_2 || (int)param_3[8] < 7) {
uVar1 = param_1[3];
local_78 = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 |
(uVar1 & 0xff0000000000) >> 0x18 | (uVar1 & 0xff00000000) >> 8 |
(uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 | (uVar1 & 0xff00) << 0x28 |
uVar1 << 0x38;
uVar1 = param_1[2];
uStack_70 = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 |
(uVar1 & 0xff0000000000) >> 0x18 | (uVar1 & 0xff00000000) >> 8 |
(uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 | (uVar1 & 0xff00) << 0x28
| uVar1 << 0x38;
uVar1 = param_1[1];
local_68 = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 |
(uVar1 & 0xff0000000000) >> 0x18 | (uVar1 & 0xff00000000) >> 8 |
(uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 | (uVar1 & 0xff00) << 0x28 |
uVar1 << 0x38;
uVar1 = *param_1;
uStack_60 = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 |
(uVar1 & 0xff0000000000) >> 0x18 | (uVar1 & 0xff00000000) >> 8 |
(uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 | (uVar1 & 0xff00) << 0x28
| uVar1 << 0x38;
uVar1 = param_1[-1];
local_58 = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 |
(uVar1 & 0xff0000000000) >> 0x18 | (uVar1 & 0xff00000000) >> 8 |
(uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 | (uVar1 & 0xff00) << 0x28 |
uVar1 << 0x38;
uVar1 = param_1[-2];
uStack_50 = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 |
(uVar1 & 0xff0000000000) >> 0x18 | (uVar1 & 0xff00000000) >> 8 |
(uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 | (uVar1 & 0xff00) << 0x28
| uVar1 << 0x38;
uVar1 = param_1[-3];
local_48 = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 |
(uVar1 & 0xff0000000000) >> 0x18 | (uVar1 & 0xff00000000) >> 8 |
(uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 | (uVar1 & 0xff00) << 0x28 |
uVar1 << 0x38;
uVar1 = param_1[-4];
uStack_40 = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 |
(uVar1 & 0xff0000000000) >> 0x18 | (uVar1 & 0xff00000000) >> 8 |
(uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 | (uVar1 & 0xff00) << 0x28
| uVar1 << 0x38;
if ((int)param_3[8] < 8) {
lVar6 = 0;
}
else {
local_28 = *(int4 *)(lVar6 + 0x28);
local_38 = *(int4 *)(lVar6 + 0x18);
uStack_34 = *(int4 *)(lVar6 + 0x1c);
uStack_30 = *(int4 *)(lVar6 + 0x20);
uStack_2c = *(int4 *)(lVar6 + 0x24);
/* try { // try from 0014f528 to 0014f52d has its CatchHandler @ 0014f5ac */
iVar3 = (**(code **)(param_3[6] + 0x68))(param_3[7],&local_38,&local_78);
lVar6 = -0x834;
if (iVar3 != 0) {
lVar6 = 0;
}
}
lVar2 = param_3[4];
local_28 = *(int4 *)(lVar2 + 0x28);
local_38 = *(int4 *)(lVar2 + 0x18);
uStack_34 = *(int4 *)(lVar2 + 0x1c);
uStack_30 = *(int4 *)(lVar2 + 0x20);
uStack_2c = *(int4 *)(lVar2 + 0x24);
/* try { // try from 0014f560 to 0014f56a has its CatchHandler @ 0014f5ae */
uVar4 = (**(code **)(param_3[6] + 0x10))(param_3[7],&local_38,&local_78,&local_58);
param_2 = (param_2 + lVar6) -
(long)*(short *)((anonymous_namespace)::sstore_costs +
(ulong)uVar4 * 4 + (ulong)*(uint *)(param_3 + 8) * 0x24);
if (param_2 < 0) {
uVar5 = 3;
}
else {
*param_3 = *param_3 +
(long)*(short *)((ulong)*(uint *)(param_3 + 8) * 0x24 + 0x18d3d8 +
(ulong)uVar4 * 4);
uVar5 = 0;
}
}
}
auVar7._8_8_ = param_2;
auVar7._0_8_ = uVar5;
return auVar7;
}
|
|
6,570 | mysql_find_charset_nr | eloqsql/libmariadb/libmariadb/ma_charset.c | const MARIADB_CHARSET_INFO * mysql_find_charset_nr(unsigned int charsetnr)
{
const MARIADB_CHARSET_INFO * c = mariadb_compiled_charsets;
if (my_collation_id_is_uca1400(charsetnr))
charsetnr= my_uca1400_collation_id_uca400_compat(charsetnr);
do {
if (c->nr == charsetnr) {
return(c);
}
++c;
} while (c[0].nr != 0);
return(NULL);
} | O0 | c | mysql_find_charset_nr:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
leaq 0x1c016e(%rip), %rax # 0x235b60
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %edi
callq 0x75a50
cmpb $0x0, %al
je 0x75a0d
movl -0xc(%rbp), %edi
callq 0x75a80
movl %eax, -0xc(%rbp)
jmp 0x75a0f
movq -0x18(%rbp), %rax
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x75a24
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x75a41
movq -0x18(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x75a0f
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| mysql_find_charset_nr:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_C], edi
lea rax, mariadb_compiled_charsets
mov [rbp+var_18], rax
mov edi, [rbp+var_C]
call my_collation_id_is_uca1400
cmp al, 0
jz short loc_75A0D
mov edi, [rbp+var_C]
call my_uca1400_collation_id_uca400_compat
mov [rbp+var_C], eax
loc_75A0D:
jmp short $+2
loc_75A0F:
mov rax, [rbp+var_18]
mov eax, [rax]
cmp eax, [rbp+var_C]
jnz short loc_75A24
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
jmp short loc_75A41
loc_75A24:
mov rax, [rbp+var_18]
add rax, 48h ; 'H'
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
cmp dword ptr [rax], 0
jnz short loc_75A0F
mov [rbp+var_8], 0
loc_75A41:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| _DWORD * mysql_find_charset_nr(unsigned int a1)
{
_DWORD *v2; // [rsp+8h] [rbp-18h]
unsigned int v3; // [rsp+14h] [rbp-Ch]
v3 = a1;
v2 = &mariadb_compiled_charsets;
if ( (unsigned __int8)my_collation_id_is_uca1400(a1) )
v3 = my_uca1400_collation_id_uca400_compat(a1);
do
{
if ( *v2 == v3 )
return v2;
v2 += 18;
}
while ( *v2 );
return 0LL;
}
| mysql_find_charset_nr:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0xc],EDI
LEA RAX,[0x335b60]
MOV qword ptr [RBP + -0x18],RAX
MOV EDI,dword ptr [RBP + -0xc]
CALL 0x00175a50
CMP AL,0x0
JZ 0x00175a0d
MOV EDI,dword ptr [RBP + -0xc]
CALL 0x00175a80
MOV dword ptr [RBP + -0xc],EAX
LAB_00175a0d:
JMP 0x00175a0f
LAB_00175a0f:
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
CMP EAX,dword ptr [RBP + -0xc]
JNZ 0x00175a24
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00175a41
LAB_00175a24:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x48
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX],0x0
JNZ 0x00175a0f
MOV qword ptr [RBP + -0x8],0x0
LAB_00175a41:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
int * mysql_find_charset_nr(int param_1)
{
char cVar1;
int *local_20;
int local_14;
local_20 = &mariadb_compiled_charsets;
cVar1 = my_collation_id_is_uca1400(param_1);
local_14 = param_1;
if (cVar1 != '\0') {
local_14 = my_uca1400_collation_id_uca400_compat(param_1);
}
do {
if (*local_20 == local_14) {
return local_20;
}
local_20 = local_20 + 0x12;
} while (*local_20 != 0);
return (int *)0x0;
}
|
|
6,571 | js_setlike_get_keys | bluesky950520[P]quickjs/quickjs.c | static int js_setlike_get_keys(JSContext *ctx, JSValue setlike, JSValue *pout)
{
JSValue v;
v = JS_GetProperty(ctx, setlike, JS_ATOM_keys);
if (JS_IsException(v))
return -1;
if (JS_IsUndefined(v)) {
JS_ThrowTypeError(ctx, ".keys is undefined");
return -1;
}
if (!JS_IsFunction(ctx, v)) {
JS_ThrowTypeError(ctx, ".keys is not a function");
JS_FreeValue(ctx, v);
return -1;
}
*pout = v;
return 0;
} | O1 | c | js_setlike_get_keys:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r15
movq %rdi, %r14
movl $0x30, %ecx
movq %rsi, %r8
movq %rdx, %r9
pushq $0x0
pushq $0x0
callq 0x22fa3
addq $0x10, %rsp
movq %rdx, %r12
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
cmpl $0x6, %r12d
je 0x51fe5
cmpl $0x3, %r12d
jne 0x51fa5
leaq 0x4e2e7(%rip), %rsi # 0xa0280
movq %r14, %rdi
xorl %eax, %eax
callq 0x22567
jmp 0x51fe5
movq %rax, %r13
movq %r14, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x22dbe
testl %eax, %eax
je 0x51fc5
movq %r13, (%r15)
movq %r12, 0x8(%r15)
xorl %ebx, %ebx
jmp 0x51fe5
leaq 0x4e2c7(%rip), %rsi # 0xa0293
movq %r14, %rdi
xorl %eax, %eax
callq 0x22567
movq 0x18(%r14), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x1d8c6
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| js_setlike_get_keys:
push r15
push r14
push r13
push r12
push rbx
mov r15, rcx
mov r14, rdi
mov ecx, 30h ; '0'
mov r8, rsi
mov r9, rdx
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov r12, rdx
mov ebx, 0FFFFFFFFh
cmp r12d, 6
jz short loc_51FE5
cmp r12d, 3
jnz short loc_51FA5
lea rsi, aKeysIsUndefine; ".keys is undefined"
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
jmp short loc_51FE5
loc_51FA5:
mov r13, rax
mov rdi, r14
mov rsi, rax
mov rdx, r12
call JS_IsFunction
test eax, eax
jz short loc_51FC5
mov [r15], r13
mov [r15+8], r12
xor ebx, ebx
jmp short loc_51FE5
loc_51FC5:
lea rsi, aKeysIsNotAFunc; ".keys is not a function"
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
mov rdi, [r14+18h]
mov rsi, r13
mov rdx, r12
call JS_FreeValueRT
loc_51FE5:
mov eax, ebx
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| long long js_setlike_get_keys(
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)
{
unsigned long long PropertyInternal2; // rax
long long v14; // rdx
long long v15; // rcx
long long v16; // r8
long long v17; // r9
__m128 v18; // xmm4
__m128 v19; // xmm5
long long v20; // r12
unsigned int v21; // ebx
_DWORD *v22; // r13
long long v23; // rdx
long long v24; // rcx
long long v25; // r8
long long v26; // r9
__m128 v27; // xmm4
__m128 v28; // xmm5
char v30; // [rsp+0h] [rbp-28h]
PropertyInternal2 = JS_GetPropertyInternal2(a1, a2, a3, 0x30u, a2, a3, 0LL, 0);
v20 = v14;
v21 = -1;
if ( (_DWORD)v14 != 6 )
{
if ( (_DWORD)v14 == 3 )
{
JS_ThrowTypeError(a1, (long long)".keys is undefined", v14, v15, v16, v17, a5, a6, a7, a8, v18, v19, a11, a12, v30);
}
else
{
v22 = (_DWORD *)PropertyInternal2;
if ( (unsigned int)JS_IsFunction(a1, PropertyInternal2, v14) )
{
*a4 = v22;
a4[1] = v20;
return 0;
}
else
{
JS_ThrowTypeError(
a1,
(long long)".keys is not a function",
v23,
v24,
v25,
v26,
a5,
a6,
a7,
a8,
v27,
v28,
a11,
a12,
v30);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v22, v20);
}
}
}
return v21;
}
| |||
6,572 | js_setlike_get_keys | bluesky950520[P]quickjs/quickjs.c | static int js_setlike_get_keys(JSContext *ctx, JSValue setlike, JSValue *pout)
{
JSValue v;
v = JS_GetProperty(ctx, setlike, JS_ATOM_keys);
if (JS_IsException(v))
return -1;
if (JS_IsUndefined(v)) {
JS_ThrowTypeError(ctx, ".keys is undefined");
return -1;
}
if (!JS_IsFunction(ctx, v)) {
JS_ThrowTypeError(ctx, ".keys is not a function");
JS_FreeValue(ctx, v);
return -1;
}
*pout = v;
return 0;
} | O2 | c | js_setlike_get_keys:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r12
movq %rdi, %r14
pushq $0x30
popq %rcx
callq 0x1b043
movq %rdx, %r15
pushq $-0x1
popq %rbx
cmpl $0x6, %r15d
je 0x465d5
cmpl $0x3, %r15d
jne 0x46594
leaq 0x40c32(%rip), %rsi # 0x871ba
movq %r14, %rdi
xorl %eax, %eax
callq 0x1c64d
jmp 0x465d5
movq %rax, %r13
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x1ce7d
testl %eax, %eax
je 0x465b6
movq %r13, (%r12)
movq %r15, 0x8(%r12)
xorl %ebx, %ebx
jmp 0x465d5
leaq 0x40c10(%rip), %rsi # 0x871cd
movq %r14, %rdi
xorl %eax, %eax
callq 0x1c64d
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x1801e
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| js_setlike_get_keys:
push r15
push r14
push r13
push r12
push rbx
mov r12, rcx
mov r14, rdi
push 30h ; '0'
pop rcx
call JS_GetProperty
mov r15, rdx
push 0FFFFFFFFFFFFFFFFh
pop rbx
cmp r15d, 6
jz short loc_465D5
cmp r15d, 3
jnz short loc_46594
lea rsi, aKeysIsUndefine; ".keys is undefined"
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
jmp short loc_465D5
loc_46594:
mov r13, rax
mov rdi, r14
mov rsi, rax
mov rdx, r15
call JS_IsFunction
test eax, eax
jz short loc_465B6
mov [r12], r13
mov [r12+8], r15
xor ebx, ebx
jmp short loc_465D5
loc_465B6:
lea rsi, aKeysIsNotAFunc; ".keys is not a function"
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
mov rdi, r14
mov rsi, r13
mov rdx, r15
call JS_FreeValue
loc_465D5:
mov eax, ebx
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| long long js_setlike_get_keys(
long long a1,
int a2,
int a3,
long long *a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long Property; // rax
long long v14; // rdx
long long v15; // rcx
long long v16; // r8
long long v17; // r9
__m128 v18; // xmm4
__m128 v19; // xmm5
long long v20; // r15
unsigned int v21; // ebx
long long v22; // r13
long long v23; // rdx
long long v24; // rcx
long long v25; // r8
long long v26; // r9
__m128 v27; // xmm4
__m128 v28; // xmm5
char v30; // [rsp+0h] [rbp-28h]
Property = JS_GetProperty(a1, a2, a3, 48);
v20 = v14;
v21 = -1;
if ( (_DWORD)v14 != 6 )
{
if ( (_DWORD)v14 == 3 )
{
JS_ThrowTypeError(a1, (long long)".keys is undefined", v14, v15, v16, v17, a5, a6, a7, a8, v18, v19, a11, a12, v30);
}
else
{
v22 = Property;
if ( (unsigned int)JS_IsFunction(a1, Property, v14) )
{
*a4 = v22;
a4[1] = v20;
return 0;
}
else
{
JS_ThrowTypeError(
a1,
(long long)".keys is not a function",
v23,
v24,
v25,
v26,
a5,
a6,
a7,
a8,
v27,
v28,
a11,
a12,
v30);
JS_FreeValue(a1, v22, v20);
}
}
}
return v21;
}
| js_setlike_get_keys:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R12,RCX
MOV R14,RDI
PUSH 0x30
POP RCX
CALL 0x0011b043
MOV R15,RDX
PUSH -0x1
POP RBX
CMP R15D,0x6
JZ 0x001465d5
CMP R15D,0x3
JNZ 0x00146594
LEA RSI,[0x1871ba]
MOV RDI,R14
XOR EAX,EAX
CALL 0x0011c64d
JMP 0x001465d5
LAB_00146594:
MOV R13,RAX
MOV RDI,R14
MOV RSI,RAX
MOV RDX,R15
CALL 0x0011ce7d
TEST EAX,EAX
JZ 0x001465b6
MOV qword ptr [R12],R13
MOV qword ptr [R12 + 0x8],R15
XOR EBX,EBX
JMP 0x001465d5
LAB_001465b6:
LEA RSI,[0x1871cd]
MOV RDI,R14
XOR EAX,EAX
CALL 0x0011c64d
MOV RDI,R14
MOV RSI,R13
MOV RDX,R15
CALL 0x0011801e
LAB_001465d5:
MOV EAX,EBX
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
int4
js_setlike_get_keys(int8 param_1,int8 param_2,int8 param_3,
int1 (*param_4) [16])
{
int iVar1;
int4 uVar2;
int1 auVar3 [16];
auVar3 = JS_GetProperty();
uVar2 = 0xffffffff;
if (auVar3._8_4_ != 6) {
if (auVar3._8_4_ == 3) {
JS_ThrowTypeError(param_1,".keys is int");
}
else {
iVar1 = JS_IsFunction(param_1,auVar3._0_8_,auVar3._8_8_);
if (iVar1 == 0) {
JS_ThrowTypeError(param_1,".keys is not a function");
JS_FreeValue(param_1,auVar3._0_8_,auVar3._8_8_);
}
else {
*param_4 = auVar3;
uVar2 = 0;
}
}
}
return uVar2;
}
|
|
6,573 | string_buffer_realloc | bluesky950520[P]quickjs/quickjs.c | static no_inline int string_buffer_realloc(StringBuffer *s, int new_len, int c)
{
JSString *new_str;
int new_size;
size_t new_size_bytes, slack;
if (s->error_status)
return -1;
if (new_len > JS_STRING_LEN_MAX) {
JS_ThrowRangeError(s->ctx, "invalid string length");
return string_buffer_set_error(s);
}
new_size = min_int(max_int(new_len, s->size * 3 / 2), JS_STRING_LEN_MAX);
if (!s->is_wide_char && c >= 0x100) {
return string_buffer_widen(s, new_size);
}
new_size_bytes = sizeof(JSString) + (new_size << s->is_wide_char) + 1 - s->is_wide_char;
new_str = js_realloc2(s->ctx, s->str, new_size_bytes, &slack);
if (!new_str)
return string_buffer_set_error(s);
new_size = min_int(new_size + (slack >> s->is_wide_char), JS_STRING_LEN_MAX);
s->size = new_size;
s->str = new_str;
return 0;
} | O0 | c | string_buffer_realloc:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movl %esi, 0x34(%rsp)
movl %edx, 0x30(%rsp)
movq 0x38(%rsp), %rax
cmpl $0x0, 0x1c(%rax)
je 0x6fcf9
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x6fe40
cmpl $0x3fffffff, 0x34(%rsp) # imm = 0x3FFFFFFF
jle 0x6fd35
movq 0x38(%rsp), %rax
movq (%rax), %rdi
leaq 0x9dcbc(%rip), %rsi # 0x10d9ce
movb $0x0, %al
callq 0x29670
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movq 0x38(%rsp), %rdi
callq 0x6fe50
movl %eax, 0x44(%rsp)
jmp 0x6fe40
movl 0x34(%rsp), %edi
movq 0x38(%rsp), %rax
imull $0x3, 0x14(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %esi
callq 0x5d310
movl %eax, %edi
movl $0x3fffffff, %esi # imm = 0x3FFFFFFF
callq 0x50d00
movl %eax, 0x24(%rsp)
movq 0x38(%rsp), %rax
cmpl $0x0, 0x18(%rax)
jne 0x6fd8d
cmpl $0x100, 0x30(%rsp) # imm = 0x100
jl 0x6fd8d
movq 0x38(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x6fea0
movl %eax, 0x44(%rsp)
jmp 0x6fe40
movl 0x24(%rsp), %eax
movq 0x38(%rsp), %rcx
movl 0x18(%rcx), %ecx
shll %cl, %eax
cltq
addq $0x18, %rax
addq $0x1, %rax
movq 0x38(%rsp), %rcx
movslq 0x18(%rcx), %rcx
subq %rcx, %rax
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rax
movq (%rax), %rdi
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x18(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq 0x21e80
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x6fdf3
movq 0x38(%rsp), %rdi
callq 0x6fe50
movl %eax, 0x44(%rsp)
jmp 0x6fe40
movslq 0x24(%rsp), %rax
movq 0x10(%rsp), %rdx
movq 0x38(%rsp), %rcx
movl 0x18(%rcx), %ecx
shrq %cl, %rdx
movq %rdx, %rcx
addq %rcx, %rax
movl %eax, %edi
movl $0x3fffffff, %esi # imm = 0x3FFFFFFF
callq 0x50d00
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %ecx
movq 0x38(%rsp), %rax
movl %ecx, 0x14(%rax)
movq 0x28(%rsp), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x8(%rax)
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax)
| string_buffer_realloc:
sub rsp, 48h
mov [rsp+48h+var_10], rdi
mov [rsp+48h+var_14], esi
mov [rsp+48h+var_18], edx
mov rax, [rsp+48h+var_10]
cmp dword ptr [rax+1Ch], 0
jz short loc_6FCF9
mov [rsp+48h+var_4], 0FFFFFFFFh
jmp loc_6FE40
loc_6FCF9:
cmp [rsp+48h+var_14], 3FFFFFFFh
jle short loc_6FD35
mov rax, [rsp+48h+var_10]
mov rdi, [rax]
lea rsi, aInvalidStringL; "invalid string length"
mov al, 0
call JS_ThrowRangeError
mov [rsp+48h+var_48], rax
mov [rsp+48h+var_40], rdx
mov rdi, [rsp+48h+var_10]
call string_buffer_set_error
mov [rsp+48h+var_4], eax
jmp loc_6FE40
loc_6FD35:
mov edi, [rsp+48h+var_14]
mov rax, [rsp+48h+var_10]
imul eax, [rax+14h], 3
mov ecx, 2
cdq
idiv ecx
mov esi, eax
call max_int_0
mov edi, eax
mov esi, 3FFFFFFFh
call min_int_0
mov [rsp+48h+var_24], eax
mov rax, [rsp+48h+var_10]
cmp dword ptr [rax+18h], 0
jnz short loc_6FD8D
cmp [rsp+48h+var_18], 100h
jl short loc_6FD8D
mov rdi, [rsp+48h+var_10]
mov esi, [rsp+48h+var_24]
call string_buffer_widen
mov [rsp+48h+var_4], eax
jmp loc_6FE40
loc_6FD8D:
mov eax, [rsp+48h+var_24]
mov rcx, [rsp+48h+var_10]
mov ecx, [rcx+18h]
shl eax, cl
cdqe
add rax, 18h
add rax, 1
mov rcx, [rsp+48h+var_10]
movsxd rcx, dword ptr [rcx+18h]
sub rax, rcx
mov [rsp+48h+var_30], rax
mov rax, [rsp+48h+var_10]
mov rdi, [rax]
mov rax, [rsp+48h+var_10]
mov rsi, [rax+8]
mov rdx, [rsp+48h+var_30]
lea rcx, [rsp+48h+var_38]
call js_realloc2
mov [rsp+48h+var_20], rax
cmp [rsp+48h+var_20], 0
jnz short loc_6FDF3
mov rdi, [rsp+48h+var_10]
call string_buffer_set_error
mov [rsp+48h+var_4], eax
jmp short loc_6FE40
loc_6FDF3:
movsxd rax, [rsp+48h+var_24]
mov rdx, [rsp+48h+var_38]
mov rcx, [rsp+48h+var_10]
mov ecx, [rcx+18h]
shr rdx, cl
mov rcx, rdx
add rax, rcx
mov edi, eax
mov esi, 3FFFFFFFh
call min_int_0
mov [rsp+48h+var_24], eax
mov ecx, [rsp+48h+var_24]
mov rax, [rsp+48h+var_10]
mov [rax+14h], ecx
mov rcx, [rsp+48h+var_20]
mov rax, [rsp+48h+var_10]
mov [rax+8], rcx
mov [rsp+48h+var_4], 0
loc_6FE40:
mov eax, [rsp+48h+var_4]
add rsp, 48h
retn
| long long string_buffer_realloc(
long long a1,
signed int 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)
{
unsigned int v14; // eax
char v16; // [rsp+0h] [rbp-48h]
unsigned long long v17; // [rsp+10h] [rbp-38h] BYREF
unsigned long long v18; // [rsp+18h] [rbp-30h]
unsigned int v19; // [rsp+24h] [rbp-24h]
long long v20; // [rsp+28h] [rbp-20h]
int v21; // [rsp+30h] [rbp-18h]
signed int v22; // [rsp+34h] [rbp-14h]
long long v23; // [rsp+38h] [rbp-10h]
v23 = a1;
v22 = a2;
v21 = a3;
if ( *(_DWORD *)(a1 + 28) )
{
return (unsigned int)-1;
}
else if ( v22 <= 0x3FFFFFFF )
{
v14 = max_int_0(v22, 3 * *(_DWORD *)(v23 + 20) / 2);
v19 = min_int_0(v14, 0x3FFFFFFFu);
if ( *(_DWORD *)(v23 + 24) || v21 < 256 )
{
v18 = (int)(v19 << *(_DWORD *)(v23 + 24)) + 25LL - *(int *)(v23 + 24);
v20 = js_realloc2(*(_QWORD *)v23, *(_QWORD *)(v23 + 8), v18, &v17);
if ( v20 )
{
v19 = min_int_0((unsigned int)(v17 >> *(_DWORD *)(v23 + 24)) + v19, 0x3FFFFFFFu);
*(_DWORD *)(v23 + 20) = v19;
*(_QWORD *)(v23 + 8) = v20;
return 0;
}
else
{
return (unsigned int)string_buffer_set_error(v23);
}
}
else
{
return (unsigned int)string_buffer_widen(v23, v19);
}
}
else
{
JS_ThrowRangeError(
*(_QWORD *)v23,
(long long)"invalid string length",
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v16);
return (unsigned int)string_buffer_set_error(v23);
}
}
| string_buffer_realloc:
SUB RSP,0x48
MOV qword ptr [RSP + 0x38],RDI
MOV dword ptr [RSP + 0x34],ESI
MOV dword ptr [RSP + 0x30],EDX
MOV RAX,qword ptr [RSP + 0x38]
CMP dword ptr [RAX + 0x1c],0x0
JZ 0x0016fcf9
MOV dword ptr [RSP + 0x44],0xffffffff
JMP 0x0016fe40
LAB_0016fcf9:
CMP dword ptr [RSP + 0x34],0x3fffffff
JLE 0x0016fd35
MOV RAX,qword ptr [RSP + 0x38]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x20d9ce]
MOV AL,0x0
CALL 0x00129670
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x0016fe50
MOV dword ptr [RSP + 0x44],EAX
JMP 0x0016fe40
LAB_0016fd35:
MOV EDI,dword ptr [RSP + 0x34]
MOV RAX,qword ptr [RSP + 0x38]
IMUL EAX,dword ptr [RAX + 0x14],0x3
MOV ECX,0x2
CDQ
IDIV ECX
MOV ESI,EAX
CALL 0x0015d310
MOV EDI,EAX
MOV ESI,0x3fffffff
CALL 0x00150d00
MOV dword ptr [RSP + 0x24],EAX
MOV RAX,qword ptr [RSP + 0x38]
CMP dword ptr [RAX + 0x18],0x0
JNZ 0x0016fd8d
CMP dword ptr [RSP + 0x30],0x100
JL 0x0016fd8d
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,dword ptr [RSP + 0x24]
CALL 0x0016fea0
MOV dword ptr [RSP + 0x44],EAX
JMP 0x0016fe40
LAB_0016fd8d:
MOV EAX,dword ptr [RSP + 0x24]
MOV RCX,qword ptr [RSP + 0x38]
MOV ECX,dword ptr [RCX + 0x18]
SHL EAX,CL
CDQE
ADD RAX,0x18
ADD RAX,0x1
MOV RCX,qword ptr [RSP + 0x38]
MOVSXD RCX,dword ptr [RCX + 0x18]
SUB RAX,RCX
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RSP + 0x18]
LEA RCX,[RSP + 0x10]
CALL 0x00121e80
MOV qword ptr [RSP + 0x28],RAX
CMP qword ptr [RSP + 0x28],0x0
JNZ 0x0016fdf3
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x0016fe50
MOV dword ptr [RSP + 0x44],EAX
JMP 0x0016fe40
LAB_0016fdf3:
MOVSXD RAX,dword ptr [RSP + 0x24]
MOV RDX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x38]
MOV ECX,dword ptr [RCX + 0x18]
SHR RDX,CL
MOV RCX,RDX
ADD RAX,RCX
MOV EDI,EAX
MOV ESI,0x3fffffff
CALL 0x00150d00
MOV dword ptr [RSP + 0x24],EAX
MOV ECX,dword ptr [RSP + 0x24]
MOV RAX,qword ptr [RSP + 0x38]
MOV dword ptr [RAX + 0x14],ECX
MOV RCX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RSP + 0x44],0x0
LAB_0016fe40:
MOV EAX,dword ptr [RSP + 0x44]
ADD RSP,0x48
RET
|
int4 string_buffer_realloc(int8 *param_1,int param_2,int param_3)
{
long lVar1;
int4 uVar2;
ulong local_38;
long local_30;
int local_24;
long local_20;
int local_18;
int local_14;
int8 *local_10;
int4 local_4;
if (*(int *)((long)param_1 + 0x1c) == 0) {
local_18 = param_3;
local_14 = param_2;
local_10 = param_1;
if (param_2 < 0x40000000) {
lVar1 = (long)(*(int *)((long)param_1 + 0x14) * 3);
uVar2 = max_int(param_2,lVar1 / 2 & 0xffffffff,lVar1 % 2 & 0xffffffff);
local_24 = min_int(uVar2,0x3fffffff);
if ((*(int *)(local_10 + 3) == 0) && (0xff < local_18)) {
local_4 = string_buffer_widen(local_10,local_24);
}
else {
local_30 = ((long)(local_24 << ((byte)*(int4 *)(local_10 + 3) & 0x1f)) + 0x19) -
(long)*(int *)(local_10 + 3);
local_20 = js_realloc2(*local_10,local_10[1],local_30,&local_38);
if (local_20 == 0) {
local_4 = string_buffer_set_error(local_10);
}
else {
uVar2 = min_int(local_24 + (int)(local_38 >> ((byte)*(int4 *)(local_10 + 3) & 0x3f))
,0x3fffffff);
*(int4 *)((long)local_10 + 0x14) = uVar2;
local_10[1] = local_20;
local_4 = 0;
}
}
}
else {
JS_ThrowRangeError(*param_1,"invalid string length");
local_4 = string_buffer_set_error(local_10);
}
}
else {
local_4 = 0xffffffff;
}
return local_4;
}
|
|
6,574 | get_options | eloqsql/storage/heap/hp_test2.c | static int get_options(int argc,char *argv[])
{
char *pos,*progname;
progname= argv[0];
while (--argc >0 && *(pos = *(++argv)) == '-' ) {
switch(*++pos) {
case 'B': /* Big file */
flag=1;
break;
case 'v': /* verbose */
verbose=1;
break;
case 'm': /* records */
recant=atoi(++pos);
break;
case 's':
silent=1;
break;
case 't':
testflag=atoi(++pos); /* testmod */
break;
case 'V':
case 'I':
case '?':
printf("%s Ver 1.2 for %s at %s\n",progname,SYSTEM_TYPE,MACHINE_TYPE);
puts("TCX Datakonsult AB, by Monty, for your professional use\n");
printf("Usage: %s [-?ABIKLsWv] [-m#] [-t#]\n",progname);
exit(0);
case '#':
DBUG_PUSH (++pos);
break;
}
}
return 0;
} | O0 | c | get_options:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movl -0x4(%rbp), %ecx
addl $-0x1, %ecx
movl %ecx, -0x4(%rbp)
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x21(%rbp)
jle 0x26440
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x10(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movsbl (%rax), %eax
cmpl $0x2d, %eax
sete %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x2644c
jmp 0x26530
movq -0x18(%rbp), %rax
movq %rax, %rcx
incq %rcx
movq %rcx, -0x18(%rbp)
movsbl 0x1(%rax), %eax
addl $-0x23, %eax
movl %eax, %ecx
movq %rcx, -0x30(%rbp)
subl $0x53, %eax
ja 0x2652b
movq -0x30(%rbp), %rax
leaq 0x60b8d(%rip), %rcx # 0x87008
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x1, 0x36e312(%rip) # 0x3947a0
jmp 0x2652b
movl $0x1, 0x387193(%rip) # 0x3ad630
jmp 0x2652b
movq -0x18(%rbp), %rdi
addq $0x1, %rdi
movq %rdi, -0x18(%rbp)
callq 0x244a0
movl %eax, 0x1b6b5f(%rip) # 0x1dd018
jmp 0x2652b
movl $0x1, 0x387173(%rip) # 0x3ad638
jmp 0x2652b
movq -0x18(%rbp), %rdi
addq $0x1, %rdi
movq %rdi, -0x18(%rbp)
callq 0x244a0
movl %eax, 0x387156(%rip) # 0x3ad634
jmp 0x2652b
movq -0x20(%rbp), %rsi
leaq 0x61341(%rip), %rdi # 0x8782c
leaq 0x61354(%rip), %rdx # 0x87846
leaq 0x61353(%rip), %rcx # 0x8784c
movb $0x0, %al
callq 0x24050
leaq 0x6134c(%rip), %rdi # 0x87853
callq 0x24480
movq -0x20(%rbp), %rsi
leaq 0x61375(%rip), %rdi # 0x8788c
movb $0x0, %al
callq 0x24050
xorl %edi, %edi
callq 0x24350
jmp 0x26527
jmp 0x26529
jmp 0x2652b
jmp 0x2640a
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| get_options:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_20], rax
loc_2640A:
mov ecx, [rbp+var_4]
add ecx, 0FFFFFFFFh
mov [rbp+var_4], ecx
xor eax, eax
cmp ecx, 0
mov [rbp+var_21], al
jle short loc_26440
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 8
mov [rbp+var_10], rcx
mov rax, [rax+8]
mov [rbp+var_18], rax
movsx eax, byte ptr [rax]
cmp eax, 2Dh ; '-'
setz al
mov [rbp+var_21], al
loc_26440:
mov al, [rbp+var_21]
test al, 1
jnz short loc_2644C
jmp loc_26530
loc_2644C:
mov rax, [rbp+var_18]
mov rcx, rax
inc rcx
mov [rbp+var_18], rcx
movsx eax, byte ptr [rax+1]
add eax, 0FFFFFFDDh; switch 84 cases
mov ecx, eax
mov [rbp+var_30], rcx
sub eax, 53h
ja def_26482; jumptable 0000000000026482 default case, cases 36-62,64,65,67-72,74-85,87-108,110-114,117
mov rax, [rbp+var_30]
lea rcx, jpt_26482
movsxd rax, ds:(jpt_26482 - 87008h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_26484:
mov cs:flag, 1; jumptable 0000000000026482 case 66
jmp def_26482; jumptable 0000000000026482 default case, cases 36-62,64,65,67-72,74-85,87-108,110-114,117
loc_26493:
mov cs:verbose, 1; jumptable 0000000000026482 case 118
jmp def_26482; jumptable 0000000000026482 default case, cases 36-62,64,65,67-72,74-85,87-108,110-114,117
loc_264A2:
mov rdi, [rbp+var_18]; jumptable 0000000000026482 case 109
add rdi, 1
mov [rbp+var_18], rdi
call _atoi
mov cs:recant, eax
jmp short def_26482; jumptable 0000000000026482 default case, cases 36-62,64,65,67-72,74-85,87-108,110-114,117
loc_264BB:
mov cs:silent, 1; jumptable 0000000000026482 case 115
jmp short def_26482; jumptable 0000000000026482 default case, cases 36-62,64,65,67-72,74-85,87-108,110-114,117
loc_264C7:
mov rdi, [rbp+var_18]; jumptable 0000000000026482 case 116
add rdi, 1
mov [rbp+var_18], rdi
call _atoi
mov cs:testflag, eax
jmp short def_26482; jumptable 0000000000026482 default case, cases 36-62,64,65,67-72,74-85,87-108,110-114,117
loc_264E0:
mov rsi, [rbp+var_20]; jumptable 0000000000026482 cases 63,73,86
lea rdi, aSVer12ForSAtS; "%s Ver 1.2 for %s at %s\n"
lea rdx, aLinux; "Linux"
lea rcx, aX8664; "x86_64"
mov al, 0
call _printf
lea rdi, aTcxDatakonsult; "TCX Datakonsult AB, by Monty, for your "...
call _puts
mov rsi, [rbp+var_20]
lea rdi, aUsageSAbiklswv; "Usage: %s [-?ABIKLsWv] [-m#] [-t#]\n"
mov al, 0
call _printf
xor edi, edi
call _exit
loc_26525:
jmp short $+2; jumptable 0000000000026482 case 35
loc_26527:
jmp short $+2
loc_26529:
jmp short $+2; jumptable 0000000000026482 default case, cases 36-62,64,65,67-72,74-85,87-108,110-114,117
def_26482:
jmp loc_2640A; jumptable 0000000000026482 default case, cases 36-62,64,65,67-72,74-85,87-108,110-114,117
loc_26530:
xor eax, eax
add rsp, 30h
pop rbp
retn
| long long get_options(int a1, const char **a2)
{
const char **v2; // rax
const char *v3; // rax
bool v5; // [rsp+Fh] [rbp-21h]
const char *v6; // [rsp+10h] [rbp-20h]
const char *v7; // [rsp+18h] [rbp-18h]
const char **v8; // [rsp+20h] [rbp-10h]
v8 = a2;
v6 = *a2;
while ( 1 )
{
--a1;
v5 = 0;
if ( a1 > 0 )
{
v2 = v8++;
v7 = v2[1];
v5 = *v7 == 45;
}
if ( !v5 )
return 0LL;
v3 = v7++;
switch ( v3[1] )
{
case '?':
case 'I':
case 'V':
printf("%s Ver 1.2 for %s at %s\n", v6, "Linux", "x86_64");
puts("TCX Datakonsult AB, by Monty, for your professional use\n");
printf("Usage: %s [-?ABIKLsWv] [-m#] [-t#]\n", v6);
exit(0LL);
case 'B':
flag = 1;
break;
case 'm':
recant = atoi(++v7);
break;
case 's':
silent = 1;
break;
case 't':
testflag = atoi(++v7);
break;
case 'v':
verbose = 1;
break;
default:
continue;
}
}
}
| get_options:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
LAB_0012640a:
MOV ECX,dword ptr [RBP + -0x4]
ADD ECX,-0x1
MOV dword ptr [RBP + -0x4],ECX
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x21],AL
JLE 0x00126440
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x8
MOV qword ptr [RBP + -0x10],RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x18],RAX
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2d
SETZ AL
MOV byte ptr [RBP + -0x21],AL
LAB_00126440:
MOV AL,byte ptr [RBP + -0x21]
TEST AL,0x1
JNZ 0x0012644c
JMP 0x00126530
LAB_0012644c:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
INC RCX
MOV qword ptr [RBP + -0x18],RCX
MOVSX EAX,byte ptr [RAX + 0x1]
ADD EAX,-0x23
MOV ECX,EAX
MOV qword ptr [RBP + -0x30],RCX
SUB EAX,0x53
JA 0x0012652b
MOV RAX,qword ptr [RBP + -0x30]
LEA RCX,[0x187008]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_126484:
MOV dword ptr [0x004947a0],0x1
JMP 0x0012652b
caseD_126493:
MOV dword ptr [0x004ad630],0x1
JMP 0x0012652b
caseD_1264a2:
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x1
MOV qword ptr [RBP + -0x18],RDI
CALL 0x001244a0
MOV dword ptr [0x002dd018],EAX
JMP 0x0012652b
caseD_1264bb:
MOV dword ptr [0x004ad638],0x1
JMP 0x0012652b
caseD_1264c7:
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x1
MOV qword ptr [RBP + -0x18],RDI
CALL 0x001244a0
MOV dword ptr [0x004ad634],EAX
JMP 0x0012652b
caseD_1264e0:
MOV RSI,qword ptr [RBP + -0x20]
LEA RDI,[0x18782c]
LEA RDX,[0x187846]
LEA RCX,[0x18784c]
MOV AL,0x0
CALL 0x00124050
LEA RDI,[0x187853]
CALL 0x00124480
MOV RSI,qword ptr [RBP + -0x20]
LEA RDI,[0x18788c]
MOV AL,0x0
CALL 0x00124050
XOR EDI,EDI
CALL 0x00124350
caseD_126525:
JMP 0x00126527
LAB_00126527:
JMP 0x00126529
LAB_00126529:
JMP 0x0012652b
caseD_12652b:
JMP 0x0012640a
LAB_00126530:
XOR EAX,EAX
ADD RSP,0x30
POP RBP
RET
|
int8 get_options(int param_1,int8 *param_2)
{
int8 uVar1;
uint uVar2;
char *pcVar3;
bool bVar4;
char *local_20;
int8 *local_18;
int local_c;
uVar1 = *param_2;
local_18 = param_2;
local_c = param_1;
while( true ) {
local_c = local_c + -1;
bVar4 = false;
if (0 < local_c) {
local_20 = (char *)local_18[1];
bVar4 = *local_20 == '-';
local_18 = local_18 + 1;
}
if (!bVar4) break;
pcVar3 = local_20 + 1;
uVar2 = (int)local_20[1] - 0x23;
if (uVar2 < 0x53 || local_20[1] == 0x76) {
switch((long)&switchD_00126482::switchdataD_00187008 +
(long)(int)(&switchD_00126482::switchdataD_00187008)[uVar2]) {
case 0x126484:
flag = 1;
break;
case 0x126493:
verbose = 1;
break;
case 0x1264a2:
recant = atoi(local_20 + 2);
pcVar3 = local_20 + 2;
break;
case 0x1264bb:
silent = 1;
break;
case 0x1264c7:
testflag = atoi(local_20 + 2);
pcVar3 = local_20 + 2;
break;
case 0x1264e0:
printf("%s Ver 1.2 for %s at %s\n",uVar1,"Linux","x86_64");
puts("TCX Datakonsult AB, by Monty, for your professional use\n");
printf("Usage: %s [-?ABIKLsWv] [-m#] [-t#]\n",uVar1);
/* WARNING: Subroutine does not return */
exit(0);
case 0x126525:
}
}
local_20 = pcVar3;
}
return 0;
}
|
|
6,575 | google::protobuf::internal::OnShutdownRun(void (*)(void const*), void const*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/message_lite.cc | void OnShutdownRun(void (*f)(const void*), const void* arg) {
auto shutdown_data = ShutdownData::get();
MutexLock lock(&shutdown_data->mutex);
shutdown_data->functions.push_back(std::make_pair(f, arg));
} | O3 | cpp | google::protobuf::internal::OnShutdownRun(void (*)(void const*), void const*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %r12
callq 0xfe07e
movq %rax, %r14
leaq 0x18(%rax), %rbx
movq %rbx, %rdi
callq 0x1f720
testl %eax, %eax
jne 0xfe032
movq %r12, 0x8(%rsp)
movq %r15, 0x10(%rsp)
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0xfe011
movups 0x8(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x8(%r14)
jmp 0xfe01e
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
callq 0xfe3cc
movq %rbx, %rdi
callq 0x1f3b0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl %eax, %edi
callq 0x1f2f0
movq %rax, %r14
movq %rbx, %rdi
callq 0x1f3b0
movq %r14, %rdi
callq 0x1f860
| _ZN6google8protobuf8internal13OnShutdownRunEPFvPKvES3_:
push r15
push r14
push r12
push rbx
sub rsp, 18h
mov r15, rsi
mov r12, rdi
call _ZN6google8protobuf8internal12ShutdownData3getEv; google::protobuf::internal::ShutdownData::get(void)
mov r14, rax
lea rbx, [rax+18h]
mov rdi, rbx
call _pthread_mutex_lock
test eax, eax
jnz short loc_FE032
mov qword ptr [rsp+38h+var_30], r12
mov qword ptr [rsp+38h+var_30+8], r15
mov rsi, [r14+8]
cmp rsi, [r14+10h]
jz short loc_FE011
movups xmm0, [rsp+38h+var_30]
movups xmmword ptr [rsi], xmm0
add qword ptr [r14+8], 10h
jmp short loc_FE01E
loc_FE011:
lea rdx, [rsp+38h+var_30]
mov rdi, r14
call _ZNSt6vectorISt4pairIPFvPKvES2_ESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_; std::vector<std::pair<void (*)(void const*),void const*>>::_M_realloc_insert<std::pair<void (*)(void const*),void const*>>(__gnu_cxx::__normal_iterator<std::pair<void (*)(void const*),void const*>*,std::vector<std::pair<void (*)(void const*),void const*>>>,std::pair<void (*)(void const*),void const*> &&)
loc_FE01E:
mov rdi, rbx
call _pthread_mutex_unlock
add rsp, 18h
pop rbx
pop r12
pop r14
pop r15
retn
loc_FE032:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
mov r14, rax
mov rdi, rbx
call _pthread_mutex_unlock
mov rdi, r14
call __Unwind_Resume
| long long google::protobuf::internal::OnShutdownRun(__int128 this, const void *a2)
{
long long v2; // r14
int v3; // eax
_OWORD *v4; // rsi
_OWORD v6[3]; // [rsp+8h] [rbp-30h] BYREF
v2 = google::protobuf::internal::ShutdownData::get((google::protobuf::internal::ShutdownData *)this);
v3 = pthread_mutex_lock(v2 + 24, *((_QWORD *)&this + 1));
if ( v3 )
std::__throw_system_error(v3);
v6[0] = this;
v4 = *(_OWORD **)(v2 + 8);
if ( v4 == *(_OWORD **)(v2 + 16) )
{
std::vector<std::pair<void (*)(void const*),void const*>>::_M_realloc_insert<std::pair<void (*)(void const*),void const*>>(
v2,
v4,
v6);
}
else
{
*v4 = v6[0];
*(_QWORD *)(v2 + 8) += 16LL;
}
return pthread_mutex_unlock(v2 + 24);
}
| OnShutdownRun:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15,RSI
MOV R12,RDI
CALL 0x001fe07e
MOV R14,RAX
LEA RBX,[RAX + 0x18]
MOV RDI,RBX
CALL 0x0011f720
TEST EAX,EAX
JNZ 0x001fe032
MOV qword ptr [RSP + 0x8],R12
MOV qword ptr [RSP + 0x10],R15
MOV RSI,qword ptr [R14 + 0x8]
CMP RSI,qword ptr [R14 + 0x10]
JZ 0x001fe011
MOVUPS XMM0,xmmword ptr [RSP + 0x8]
MOVUPS xmmword ptr [RSI],XMM0
ADD qword ptr [R14 + 0x8],0x10
JMP 0x001fe01e
LAB_001fe011:
LEA RDX,[RSP + 0x8]
MOV RDI,R14
CALL 0x001fe3cc
LAB_001fe01e:
MOV RDI,RBX
CALL 0x0011f3b0
ADD RSP,0x18
POP RBX
POP R12
POP R14
POP R15
RET
LAB_001fe032:
MOV EDI,EAX
CALL 0x0011f2f0
|
/* google::protobuf::internal::OnShutdownRun(void (*)(void const*), void const*) */
void google::protobuf::internal::OnShutdownRun(_func_void_void_ptr *param_1,void *param_2)
{
int8 *puVar1;
int iVar2;
vector<std::pair<void(*)(void_const*),void_const*>,std::allocator<std::pair<void(*)(void_const*),void_const*>>>
*pvVar3;
_func_void_void_ptr *local_30;
void *pvStack_28;
pvVar3 = (vector<std::pair<void(*)(void_const*),void_const*>,std::allocator<std::pair<void(*)(void_const*),void_const*>>>
*)ShutdownData::get();
iVar2 = pthread_mutex_lock((pthread_mutex_t *)(pvVar3 + 0x18));
if (iVar2 == 0) {
puVar1 = *(int8 **)(pvVar3 + 8);
local_30 = param_1;
pvStack_28 = param_2;
if (puVar1 == *(int8 **)(pvVar3 + 0x10)) {
/* try { // try from 001fe011 to 001fe01d has its CatchHandler @ 001fe039 */
std::
vector<std::pair<void(*)(void_const*),void_const*>,std::allocator<std::pair<void(*)(void_const*),void_const*>>>
::_M_realloc_insert<std::pair<void(*)(void_const*),void_const*>>(pvVar3,puVar1,&local_30);
}
else {
*puVar1 = param_1;
puVar1[1] = param_2;
*(long *)(pvVar3 + 8) = *(long *)(pvVar3 + 8) + 0x10;
}
pthread_mutex_unlock((pthread_mutex_t *)(pvVar3 + 0x18));
return;
}
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar2);
}
|
|
6,576 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::reset() | hkr04[P]cpp-mcp/common/json.hpp | void reset() noexcept
{
token_buffer.clear();
token_string.clear();
token_string.push_back(char_traits<char_type>::to_char_type(current));
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::reset():
pushq %rax
movq %rdi, %rax
andq $0x0, 0x58(%rdi)
movq 0x50(%rdi), %rcx
movb $0x0, (%rcx)
addq $0x38, %rdi
movq 0x38(%rax), %rcx
cmpq %rcx, 0x40(%rax)
je 0x2feee
movq %rcx, 0x40(%rax)
movb 0x14(%rax), %al
leaq 0x7(%rsp), %rsi
movb %al, (%rsi)
callq 0x202c2
popq %rax
retq
movq %rax, %rdi
callq 0x99c2
nop
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5resetEv:
push rax
mov rax, rdi
and qword ptr [rdi+58h], 0
mov rcx, [rdi+50h]
mov byte ptr [rcx], 0
add rdi, 38h ; '8'
mov rcx, [rax+38h]
cmp [rax+40h], rcx
jz short loc_2FEEE
mov [rax+40h], rcx
loc_2FEEE:
mov al, [rax+14h]
lea rsi, [rsp+8+var_1]
mov [rsi], al
call _ZNSt6vectorIcSaIcEE12emplace_backIJcEEERcDpOT_; std::vector<char>::emplace_back<char>(char &&)
pop rax
retn
mov rdi, rax
call __clang_call_terminate
| void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::reset(
long long a1)
{
long long v2; // rdi
long long v3; // rcx
char v4; // [rsp+1h] [rbp-1h] BYREF
*(_QWORD *)(a1 + 88) = 0LL;
**(_BYTE **)(a1 + 80) = 0;
v2 = a1 + 56;
v3 = *(_QWORD *)(a1 + 56);
if ( *(_QWORD *)(a1 + 64) != v3 )
*(_QWORD *)(a1 + 64) = v3;
v4 = *(_BYTE *)(a1 + 20);
std::vector<char>::emplace_back<char>(v2, &v4);
}
| reset:
PUSH RAX
MOV RAX,RDI
AND qword ptr [RDI + 0x58],0x0
MOV RCX,qword ptr [RDI + 0x50]
MOV byte ptr [RCX],0x0
ADD RDI,0x38
MOV RCX,qword ptr [RAX + 0x38]
CMP qword ptr [RAX + 0x40],RCX
JZ 0x0012feee
MOV qword ptr [RAX + 0x40],RCX
LAB_0012feee:
MOV AL,byte ptr [RAX + 0x14]
LEA RSI,[RSP + 0x7]
MOV byte ptr [RSI],AL
LAB_0012fef8:
CALL 0x001202c2
POP RAX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::reset() */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::reset(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
int8 in_RAX;
int8 uStack_8;
*(int8 *)(this + 0x58) = 0;
**(int1 **)(this + 0x50) = 0;
if (*(long *)(this + 0x40) != *(long *)(this + 0x38)) {
*(long *)(this + 0x40) = *(long *)(this + 0x38);
}
uStack_8 = CONCAT17(this[0x14],(int7)in_RAX);
/* try { // try from 0012fef8 to 0012fefc has its CatchHandler @ 0012feff */
std::vector<char,std::allocator<char>>::emplace_back<char>
((vector<char,std::allocator<char>> *)(this + 0x38),(char *)((long)&uStack_8 + 7));
return uStack_8;
}
|
|
6,577 | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::start_array(unsigned long) | monkey531[P]llama/common/./json.hpp | bool start_array(std::size_t len)
{
const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::array_start, discarded);
keep_stack.push_back(keep);
auto val = handle_value(BasicJsonType::value_t::array, true);
ref_stack.push_back(val.second);
// check array limit
if (ref_stack.back() && JSON_HEDLEY_UNLIKELY(len != static_cast<std::size_t>(-1) && len > ref_stack.back()->max_size()))
{
JSON_THROW(out_of_range::create(408, concat("excessive array size: ", std::to_string(len)), ref_stack.back()));
}
return true;
} | O0 | cpp | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::start_array(unsigned long):
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq 0xa0(%rsp), %rdi
movq %rdi, 0x20(%rsp)
movq %rdi, %rax
addq $0x80, %rax
movq %rax, 0x18(%rsp)
addq $0x8, %rdi
callq 0xb9280
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rcx
movl %eax, %esi
addq $0xa8, %rcx
movl $0x2, %edx
callq 0xb9220
movq 0x20(%rsp), %rdi
andb $0x1, %al
movb %al, 0x97(%rsp)
addq $0x20, %rdi
movb 0x97(%rsp), %al
andb $0x1, %al
movzbl %al, %esi
callq 0xb6040
movq 0x20(%rsp), %rdi
movb $0x2, 0x7f(%rsp)
leaq 0x7f(%rsp), %rsi
movl $0x1, %edx
callq 0xb92a0
movq 0x20(%rsp), %rdi
movb %al, 0x80(%rsp)
movq %rdx, 0x88(%rsp)
addq $0x8, %rdi
leaq 0x80(%rsp), %rsi
addq $0x8, %rsi
callq 0xb9810
movq 0x20(%rsp), %rdi
addq $0x8, %rdi
callq 0xb9880
cmpq $0x0, (%rax)
je 0xb8a35
xorl %eax, %eax
cmpq $-0x1, 0x98(%rsp)
movb %al, 0x17(%rsp)
je 0xb894b
movq 0x20(%rsp), %rdi
movq 0x98(%rsp), %rax
movq %rax, 0x8(%rsp)
addq $0x8, %rdi
callq 0xb9880
movq (%rax), %rdi
callq 0xb98c0
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
seta %al
movb %al, 0x17(%rsp)
movb 0x17(%rsp), %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xb895c
jmp 0xb8a35
movb $0x1, 0x2b(%rsp)
movl $0x20, %edi
callq 0x50540
movq %rax, (%rsp)
movq 0x98(%rsp), %rsi
leaq 0x38(%rsp), %rdi
callq 0xb9ba0
jmp 0xb8983
leaq 0x116c4c(%rip), %rsi # 0x1cf5d6
leaq 0x58(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0xbe250
jmp 0xb899b
movq 0x20(%rsp), %rdi
addq $0x8, %rdi
callq 0xb9880
movq (%rsp), %rdi
movq (%rax), %rcx
movl $0x198, %esi # imm = 0x198
leaq 0x58(%rsp), %rdx
callq 0xb9940
jmp 0xb89c1
movq (%rsp), %rdi
movb $0x0, 0x2b(%rsp)
leaq 0x19980f(%rip), %rsi # 0x2521e0
leaq 0x568(%rip), %rdx # 0xb8f40
callq 0x508f0
jmp 0xb8a4b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
jmp 0xb8a21
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
jmp 0xb8a17
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x510c0
leaq 0x38(%rsp), %rdi
callq 0x510c0
testb $0x1, 0x2b(%rsp)
jne 0xb8a2a
jmp 0xb8a33
movq (%rsp), %rdi
callq 0x50c40
jmp 0xb8a41
movb $0x1, %al
andb $0x1, %al
addq $0xa8, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0x50940
nopl (%rax,%rax)
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE11start_arrayEm:
sub rsp, 0A8h
mov qword ptr [rsp+0A8h+var_8], rdi
mov [rsp+0A8h+var_10], rsi
mov rdi, qword ptr [rsp+0A8h+var_8]
mov qword ptr [rsp+0A8h+var_88], rdi; int
mov rax, rdi
add rax, 80h
mov qword ptr [rsp+0A8h+var_90], rax; char
add rdi, 8
call _ZNKSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4sizeEv; 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> *,std::allocator<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> *>>::size(void)
mov rdi, qword ptr [rsp+0A8h+var_90]
mov rcx, qword ptr [rsp+0A8h+var_88]
mov esi, eax
add rcx, 0A8h
mov edx, 2
call _ZNKSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEclEiS3_SH_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::operator()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)
mov rdi, qword ptr [rsp+0A8h+var_88]
and al, 1
mov [rsp+0A8h+var_11], al
add rdi, 20h ; ' '
mov al, [rsp+0A8h+var_11]
and al, 1
movzx esi, al
call _ZNSt6vectorIbSaIbEE9push_backEb; std::vector<bool>::push_back(bool)
mov rdi, qword ptr [rsp+0A8h+var_88]
mov [rsp+0A8h+var_29], 2
lea rsi, [rsp+0A8h+var_29]
mov edx, 1
call _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueINS1_7value_tEEESt4pairIbPSF_EOT_b; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(nlohmann::json_abi_v3_11_3::detail::value_t &&,bool)
mov rdi, qword ptr [rsp+0A8h+var_88]
mov byte ptr [rsp+0A8h+var_28], al; int
mov qword ptr [rsp+0A8h+var_20], rdx; int
add rdi, 8
lea rsi, [rsp+0A8h+var_28]
add rsi, 8
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE9push_backERKSE_; 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> *,std::allocator<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> *>>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> * const&)
mov rdi, qword ptr [rsp+0A8h+var_88]
add rdi, 8
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; 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> *,std::allocator<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> *>>::back(void)
cmp qword ptr [rax], 0
jz loc_B8A35
xor eax, eax
cmp [rsp+0A8h+var_10], 0FFFFFFFFFFFFFFFFh
mov [rsp+0A8h+var_91], al
jz short loc_B894B
mov rdi, qword ptr [rsp+0A8h+var_88]
mov rax, [rsp+0A8h+var_10]
mov qword ptr [rsp+0A8h+var_A0], rax; int
add rdi, 8
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; 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> *,std::allocator<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> *>>::back(void)
mov rdi, [rax]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8max_sizeEv; 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>::max_size(void)
mov rcx, rax
mov rax, qword ptr [rsp+0A8h+var_A0]
cmp rax, rcx
setnbe al
mov [rsp+0A8h+var_91], al
loc_B894B:
mov al, [rsp+0A8h+var_91]
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_B895C
jmp loc_B8A35
loc_B895C:
mov [rsp+0A8h+var_7D], 1
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov [rsp+0A8h+var_A8], rax; int
mov rsi, [rsp+0A8h+var_10]; unsigned __int64
lea rdi, [rsp+0A8h+var_70]; this
call _ZNSt7__cxx119to_stringEm; std::to_string(ulong)
jmp short $+2
loc_B8983:
lea rsi, aExcessiveArray; "excessive array size: "
lea rdi, [rsp+0A8h+var_50]
lea rdx, [rsp+0A8h+var_70]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA23_KcS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[23],std::string>(char const(&)[23],std::string &&)
jmp short $+2
loc_B899B:
mov rdi, qword ptr [rsp+0A8h+var_88]
add rdi, 8
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; 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> *,std::allocator<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> *>>::back(void)
mov rdi, [rsp+0A8h+var_A8]; int
mov rcx, [rax]
mov esi, 198h
lea rdx, [rsp+0A8h+var_50]
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
jmp short $+2
loc_B89C1:
mov rdi, [rsp+0A8h+var_A8]; void *
mov [rsp+0A8h+var_7D], 0
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail12out_of_rangeD2Ev; void (*)(void *)
call ___cxa_throw
jmp short loc_B8A4B
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
jmp short loc_B8A21
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
jmp short loc_B8A17
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
lea rdi, [rsp+arg_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_B8A17:
lea rdi, [rsp+arg_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_B8A21:
test [rsp+arg_23], 1
jnz short loc_B8A2A
jmp short loc_B8A33
loc_B8A2A:
mov rdi, [rsp+0]; void *
call ___cxa_free_exception
loc_B8A33:
jmp short loc_B8A41
loc_B8A35:
mov al, 1
and al, 1
add rsp, 0A8h
retn
loc_B8A41:
mov rdi, [rsp+arg_28]
call __Unwind_Resume
loc_B8A4B:
nop dword ptr [rax+rax+00h]
| start_array:
SUB RSP,0xa8
MOV qword ptr [RSP + 0xa0],RDI
MOV qword ptr [RSP + 0x98],RSI
MOV RDI,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x20],RDI
MOV RAX,RDI
ADD RAX,0x80
MOV qword ptr [RSP + 0x18],RAX
ADD RDI,0x8
CALL 0x001b9280
MOV RDI,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x20]
MOV ESI,EAX
ADD RCX,0xa8
MOV EDX,0x2
CALL 0x001b9220
MOV RDI,qword ptr [RSP + 0x20]
AND AL,0x1
MOV byte ptr [RSP + 0x97],AL
ADD RDI,0x20
MOV AL,byte ptr [RSP + 0x97]
AND AL,0x1
MOVZX ESI,AL
CALL 0x001b6040
MOV RDI,qword ptr [RSP + 0x20]
MOV byte ptr [RSP + 0x7f],0x2
LEA RSI,[RSP + 0x7f]
MOV EDX,0x1
CALL 0x001b92a0
MOV RDI,qword ptr [RSP + 0x20]
MOV byte ptr [RSP + 0x80],AL
MOV qword ptr [RSP + 0x88],RDX
ADD RDI,0x8
LEA RSI,[RSP + 0x80]
ADD RSI,0x8
CALL 0x001b9810
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0x8
CALL 0x001b9880
CMP qword ptr [RAX],0x0
JZ 0x001b8a35
XOR EAX,EAX
CMP qword ptr [RSP + 0x98],-0x1
MOV byte ptr [RSP + 0x17],AL
JZ 0x001b894b
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x8],RAX
ADD RDI,0x8
CALL 0x001b9880
MOV RDI,qword ptr [RAX]
CALL 0x001b98c0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
CMP RAX,RCX
SETA AL
MOV byte ptr [RSP + 0x17],AL
LAB_001b894b:
MOV AL,byte ptr [RSP + 0x17]
XOR AL,0xff
XOR AL,0xff
TEST AL,0x1
JNZ 0x001b895c
JMP 0x001b8a35
LAB_001b895c:
MOV byte ptr [RSP + 0x2b],0x1
MOV EDI,0x20
CALL 0x00150540
MOV qword ptr [RSP],RAX
MOV RSI,qword ptr [RSP + 0x98]
LAB_001b8977:
LEA RDI,[RSP + 0x38]
CALL 0x001b9ba0
JMP 0x001b8983
LAB_001b8983:
LEA RSI,[0x2cf5d6]
LEA RDI,[RSP + 0x58]
LEA RDX,[RSP + 0x38]
CALL 0x001be250
JMP 0x001b899b
LAB_001b899b:
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0x8
CALL 0x001b9880
MOV RDI,qword ptr [RSP]
MOV RCX,qword ptr [RAX]
LAB_001b89b0:
MOV ESI,0x198
LEA RDX,[RSP + 0x58]
CALL 0x001b9940
JMP 0x001b89c1
LAB_001b89c1:
MOV RDI,qword ptr [RSP]
MOV byte ptr [RSP + 0x2b],0x0
LEA RSI,[0x3521e0]
LEA RDX,[0x1b8f40]
CALL 0x001508f0
LAB_001b8a35:
MOV AL,0x1
AND AL,0x1
ADD RSP,0xa8
RET
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::start_array(unsigned long) */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::start_array(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,ulong param_1)
{
bool bVar1;
ulong uVar2;
byte bVar3;
int4 uVar4;
long *plVar5;
int8 *puVar6;
ulong uVar7;
int8 uVar8;
basic_json *extraout_RDX;
__cxx11 local_70 [32];
detail local_50 [39];
value_t local_29;
int1 local_28;
basic_json *local_20;
int1 local_11;
ulong local_10;
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*local_8;
local_10 = param_1;
local_8 = this;
uVar4 = 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>*>>
::size((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>*>>
*)(this + 8));
bVar3 = std::
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
::operator()((function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
*)(this + 0x80),uVar4,2,this + 0xa8);
local_11 = bVar3 & 1;
std::vector<bool,std::allocator<bool>>::push_back
((vector<bool,std::allocator<bool>> *)(this + 0x20),(bool)local_11);
local_29 = 2;
local_28 = handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(this,&local_29,true);
local_20 = extraout_RDX;
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>*>>
::push_back((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>*>>
*)(this + 8),&local_20);
plVar5 = (long *)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>*>>
::back((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>*>>
*)(this + 8));
uVar2 = local_10;
if (*plVar5 != 0) {
bVar1 = false;
if (local_10 != 0xffffffffffffffff) {
puVar6 = (int8 *)
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>*>>
::back((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>*>>
*)(this + 8));
uVar7 = 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>
::max_size((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>
*)*puVar6);
bVar1 = uVar7 < uVar2;
}
if (bVar1) {
uVar8 = __cxa_allocate_exception(0x20);
/* try { // try from 001b8977 to 001b8980 has its CatchHandler @ 001b89df */
std::__cxx11::to_string(local_70,local_10);
/* try { // try from 001b8983 to 001b8998 has its CatchHandler @ 001b89ef */
concat<std::__cxx11::string,char_const(&)[23],std::__cxx11::string>
(local_50,"excessive array size: ",(string *)local_70);
puVar6 = (int8 *)
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>*>>
::back((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>*>>
*)(this + 8));
/* try { // try from 001b89b0 to 001b89dc has its CatchHandler @ 001b89ff */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar8,0x198,local_50,*puVar6);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar8,&out_of_range::typeinfo,out_of_range::~out_of_range);
}
}
return 1;
}
|
||
6,578 | ma_tls_async_check_result | eloqsql/libmariadb/libmariadb/secure/openssl.c | static my_bool
ma_tls_async_check_result(int res, struct mysql_async_context *b, SSL *ssl)
{
int ssl_err;
b->events_to_wait_for= 0;
if (res >= 0)
return 1;
ssl_err= SSL_get_error(ssl, res);
if (ssl_err == SSL_ERROR_WANT_READ)
b->events_to_wait_for|= MYSQL_WAIT_READ;
else if (ssl_err == SSL_ERROR_WANT_WRITE)
b->events_to_wait_for|= MYSQL_WAIT_WRITE;
else
return 1;
if (b->suspend_resume_hook)
(*b->suspend_resume_hook)(TRUE, b->suspend_resume_hook_user_data);
my_context_yield(&b->async_context);
if (b->suspend_resume_hook)
(*b->suspend_resume_hook)(FALSE, b->suspend_resume_hook_user_data);
return 0;
} | O3 | c | ma_tls_async_check_result:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl $0x0, (%rsi)
movb $0x1, %r14b
testl %edi, %edi
js 0x39c19
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
movl %edi, %esi
movq %rdx, %rdi
callq 0x14050
cmpl $0x2, %eax
je 0x39c34
cmpl $0x3, %eax
jne 0x39c11
movl $0x2, %eax
jmp 0x39c39
movl $0x1, %eax
orl %eax, (%rbx)
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x39c4f
movq 0x28(%rbx), %rsi
movl $0x1, %edi
callq *%rax
leaq 0x38(%rbx), %rdi
callq 0x3f041
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x39c6e
movq 0x28(%rbx), %rsi
xorl %r14d, %r14d
xorl %edi, %edi
callq *%rax
jmp 0x39c11
xorl %r14d, %r14d
jmp 0x39c11
| ma_tls_async_check_result:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rsi
mov dword ptr [rsi], 0
mov r14b, 1
test edi, edi
js short loc_39C19
loc_39C11:
mov eax, r14d
pop rbx
pop r14
pop rbp
retn
loc_39C19:
mov esi, edi
mov rdi, rdx
call _SSL_get_error
cmp eax, 2
jz short loc_39C34
cmp eax, 3
jnz short loc_39C11
mov eax, 2
jmp short loc_39C39
loc_39C34:
mov eax, 1
loc_39C39:
or [rbx], eax
mov rax, [rbx+20h]
test rax, rax
jz short loc_39C4F
mov rsi, [rbx+28h]
mov edi, 1
call rax
loc_39C4F:
lea rdi, [rbx+38h]
call my_context_yield
mov rax, [rbx+20h]
test rax, rax
jz short loc_39C6E
mov rsi, [rbx+28h]
xor r14d, r14d
xor edi, edi
call rax
jmp short loc_39C11
loc_39C6E:
xor r14d, r14d
jmp short loc_39C11
| long long ma_tls_async_check_result(int a1, long long a2, long long a3)
{
unsigned int v3; // r14d
int error; // eax
int v6; // eax
void ( *v7)(long long, _QWORD); // rax
void ( *v8)(_QWORD, _QWORD); // rax
*(_DWORD *)a2 = 0;
LOBYTE(v3) = 1;
if ( a1 < 0 )
{
error = SSL_get_error(a3, (unsigned int)a1);
if ( error == 2 )
{
v6 = 1;
}
else
{
if ( error != 3 )
return v3;
v6 = 2;
}
*(_DWORD *)a2 |= v6;
v7 = *(void ( **)(long long, _QWORD))(a2 + 32);
if ( v7 )
v7(1LL, *(_QWORD *)(a2 + 40));
my_context_yield(a2 + 56);
v8 = *(void ( **)(_QWORD, _QWORD))(a2 + 32);
v3 = 0;
if ( v8 )
v8(0LL, *(_QWORD *)(a2 + 40));
}
return v3;
}
| ma_tls_async_check_result:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV dword ptr [RSI],0x0
MOV R14B,0x1
TEST EDI,EDI
JS 0x00139c19
LAB_00139c11:
MOV EAX,R14D
POP RBX
POP R14
POP RBP
RET
LAB_00139c19:
MOV ESI,EDI
MOV RDI,RDX
CALL 0x00114050
CMP EAX,0x2
JZ 0x00139c34
CMP EAX,0x3
JNZ 0x00139c11
MOV EAX,0x2
JMP 0x00139c39
LAB_00139c34:
MOV EAX,0x1
LAB_00139c39:
OR dword ptr [RBX],EAX
MOV RAX,qword ptr [RBX + 0x20]
TEST RAX,RAX
JZ 0x00139c4f
MOV RSI,qword ptr [RBX + 0x28]
MOV EDI,0x1
CALL RAX
LAB_00139c4f:
LEA RDI,[RBX + 0x38]
CALL 0x0013f041
MOV RAX,qword ptr [RBX + 0x20]
TEST RAX,RAX
JZ 0x00139c6e
MOV RSI,qword ptr [RBX + 0x28]
XOR R14D,R14D
XOR EDI,EDI
CALL RAX
JMP 0x00139c11
LAB_00139c6e:
XOR R14D,R14D
JMP 0x00139c11
|
ulong ma_tls_async_check_result(int param_1,uint *param_2,SSL *param_3)
{
int iVar1;
uint uVar2;
int8 unaff_R14;
ulong uVar3;
*param_2 = 0;
uVar3 = CONCAT71((int7)((ulong)unaff_R14 >> 8),1);
if (param_1 < 0) {
iVar1 = SSL_get_error(param_3,param_1);
if (iVar1 == 2) {
uVar2 = 1;
}
else {
if (iVar1 != 3) goto LAB_00139c11;
uVar2 = 2;
}
*param_2 = *param_2 | uVar2;
if (*(code **)(param_2 + 8) != (code *)0x0) {
(**(code **)(param_2 + 8))(1,*(int8 *)(param_2 + 10));
}
my_context_yield(param_2 + 0xe);
if (*(code **)(param_2 + 8) == (code *)0x0) {
uVar3 = 0;
}
else {
uVar3 = 0;
(**(code **)(param_2 + 8))(0,*(int8 *)(param_2 + 10));
}
}
LAB_00139c11:
return uVar3 & 0xffffffff;
}
|
|
6,579 | ftxui::hbox(std::vector<std::shared_ptr<ftxui::Node>, std::allocator<std::shared_ptr<ftxui::Node>>>) | Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/dom/hbox.cpp | Element hbox(Elements children) {
return std::make_shared<HBox>(std::move(children));
} | O1 | cpp | ftxui::hbox(std::vector<std::shared_ptr<ftxui::Node>, std::allocator<std::shared_ptr<ftxui::Node>>>):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r12
movq %rdi, %r14
movl $0x70, %edi
callq 0xb3e0
movq %rax, %rbx
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%rbx)
leaq 0x34759(%rip), %rax # 0x584a8
movq %rax, (%rbx)
movq %rbx, %r15
addq $0x10, %r15
movq (%r12), %rax
movq %rax, (%rsp)
movq 0x8(%r12), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%r12), %rdx
movq %rdx, 0x10(%rsp)
xorl %edi, %edi
movq %rdi, 0x10(%r12)
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
leaq 0x20(%rsp), %rsi
movq %rax, (%rsi)
movq %rcx, 0x8(%rsi)
movq %rdx, 0x10(%rsi)
movaps %xmm0, (%rsp)
movq %rdi, 0x10(%rsp)
movq %r15, %rdi
callq 0x240f2
leaq 0x20(%rsp), %rdi
callq 0x151c0
leaq 0x34742(%rip), %rax # 0x584f8
movq %rax, 0x10(%rbx)
movq %rsp, %rdi
callq 0x151c0
movq %r15, (%r14)
movq %rbx, 0x8(%r14)
movq %r14, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x151c0
movq %rsp, %rdi
callq 0x151c0
movl $0x70, %esi
movq %rbx, %rdi
callq 0xb400
movq %r14, %rdi
callq 0xb780
| _ZN5ftxui4hboxESt6vectorISt10shared_ptrINS_4NodeEESaIS3_EE:
push r15
push r14
push r12
push rbx
sub rsp, 38h
mov r12, rsi
mov r14, rdi
mov edi, 70h ; 'p'; unsigned __int64
call __Znwm; operator new(ulong)
mov rbx, rax
mov rax, 100000001h
mov [rbx+8], rax
lea rax, off_584A8
mov [rbx], rax
mov r15, rbx
add r15, 10h
mov rax, [r12]
mov qword ptr [rsp+58h+var_58], rax
mov rcx, [r12+8]
mov qword ptr [rsp+58h+var_58+8], rcx
mov rdx, [r12+10h]
mov [rsp+58h+var_48], rdx
xor edi, edi
mov [r12+10h], rdi
xorps xmm0, xmm0
movups xmmword ptr [r12], xmm0
lea rsi, [rsp+58h+var_38]
mov [rsi], rax
mov [rsi+8], rcx
mov [rsi+10h], rdx
movaps [rsp+58h+var_58], xmm0
mov [rsp+58h+var_48], rdi
mov rdi, r15
call _ZN5ftxui4NodeC2ESt6vectorISt10shared_ptrIS0_ESaIS3_EE; ftxui::Node::Node(std::vector<std::shared_ptr<ftxui::Node>>)
lea rdi, [rsp+58h+var_38]
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
lea rax, off_584F8
mov [rbx+10h], rax
mov rdi, rsp
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
mov [r14], r15
mov [r14+8], rbx
mov rax, r14
add rsp, 38h
pop rbx
pop r12
pop r14
pop r15
retn
mov r14, rax
lea rdi, [rsp+arg_18]
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
mov rdi, rsp
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
mov esi, 70h ; 'p'; unsigned __int64
mov rdi, rbx; void *
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, r14
call __Unwind_Resume
| _QWORD * ftxui::hbox(_QWORD *a1, __int128 *a2)
{
_QWORD *v2; // rbx
__int128 v3; // kr00_16
long long v4; // rdx
__int128 v6; // [rsp+0h] [rbp-58h] BYREF
long long v7; // [rsp+10h] [rbp-48h]
__int128 v8; // [rsp+20h] [rbp-38h] BYREF
long long v9; // [rsp+30h] [rbp-28h]
v2 = (_QWORD *)operator new(0x70uLL);
v2[1] = 0x100000001LL;
*v2 = off_584A8;
v6 = *a2;
v3 = v6;
v4 = *((_QWORD *)a2 + 2);
*((_QWORD *)a2 + 2) = 0LL;
*a2 = 0LL;
v8 = v3;
v9 = v4;
v6 = 0LL;
v7 = 0LL;
ftxui::Node::Node(v2 + 2, &v8);
std::vector<std::shared_ptr<ftxui::Node>>::~vector((void **)&v8);
v2[2] = off_584F8;
std::vector<std::shared_ptr<ftxui::Node>>::~vector((void **)&v6);
*a1 = v2 + 2;
a1[1] = v2;
return a1;
}
| hbox:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R12,RSI
MOV R14,RDI
MOV EDI,0x70
CALL 0x0010b3e0
MOV RBX,RAX
MOV RAX,0x100000001
MOV qword ptr [RBX + 0x8],RAX
LEA RAX,[0x1584a8]
MOV qword ptr [RBX],RAX
MOV R15,RBX
ADD R15,0x10
MOV RAX,qword ptr [R12]
MOV qword ptr [RSP],RAX
MOV RCX,qword ptr [R12 + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RDX,qword ptr [R12 + 0x10]
MOV qword ptr [RSP + 0x10],RDX
XOR EDI,EDI
MOV qword ptr [R12 + 0x10],RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R12],XMM0
LEA RSI,[RSP + 0x20]
MOV qword ptr [RSI],RAX
MOV qword ptr [RSI + 0x8],RCX
MOV qword ptr [RSI + 0x10],RDX
MOVAPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x10],RDI
LAB_00123d9d:
MOV RDI,R15
CALL 0x001240f2
LAB_00123da5:
LEA RDI,[RSP + 0x20]
CALL 0x001151c0
LEA RAX,[0x1584f8]
MOV qword ptr [RBX + 0x10],RAX
MOV RDI,RSP
CALL 0x001151c0
MOV qword ptr [R14],R15
MOV qword ptr [R14 + 0x8],RBX
MOV RAX,R14
ADD RSP,0x38
POP RBX
POP R12
POP R14
POP R15
RET
|
/* ftxui::hbox(std::vector<std::shared_ptr<ftxui::Node>, std::allocator<std::shared_ptr<ftxui::Node>
> >) */
ftxui * __thiscall ftxui::hbox(ftxui *this,int8 *param_2)
{
int8 *puVar1;
int8 local_58;
int8 uStack_50;
int8 local_48;
int8 local_38;
int8 local_30;
int8 local_28;
puVar1 = (int8 *)operator_new(0x70);
puVar1[1] = 0x100000001;
*puVar1 = &PTR___Sp_counted_ptr_inplace_001584a8;
local_38 = *param_2;
local_30 = param_2[1];
local_28 = param_2[2];
param_2[2] = 0;
*param_2 = 0;
param_2[1] = 0;
local_58 = 0;
uStack_50 = 0;
local_48 = 0;
/* try { // try from 00123d9d to 00123da4 has its CatchHandler @ 00123dd8 */
Node::Node((Node *)(puVar1 + 2));
std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector
((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *)
&local_38);
puVar1[2] = &PTR__Node_001584f8;
std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector
((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *)
&local_58);
*(Node **)this = (Node *)(puVar1 + 2);
*(int8 **)(this + 8) = puVar1;
return this;
}
|
|
6,580 | js_inner_module_evaluation | bluesky950520[P]quickjs/quickjs.c | static int js_inner_module_evaluation(JSContext *ctx, JSModuleDef *m,
int index, JSModuleDef **pstack_top,
JSValue *pvalue)
{
JSModuleDef *m1;
int i;
if (js_check_stack_overflow(ctx->rt, 0)) {
JS_ThrowStackOverflow(ctx);
*pvalue = JS_GetException(ctx);
return -1;
}
#ifdef DUMP_MODULE_RESOLVE
if (check_dump_flag(ctx->rt, DUMP_MODULE_RESOLVE)) {
char buf1[ATOM_GET_STR_BUF_SIZE];
printf("js_inner_module_evaluation '%s':\n", JS_AtomGetStr(ctx, buf1, sizeof(buf1), m->module_name));
}
#endif
if (m->status == JS_MODULE_STATUS_EVALUATING_ASYNC ||
m->status == JS_MODULE_STATUS_EVALUATED) {
if (m->eval_has_exception) {
*pvalue = JS_DupValue(ctx, m->eval_exception);
return -1;
} else {
*pvalue = JS_UNDEFINED;
return index;
}
}
if (m->status == JS_MODULE_STATUS_EVALUATING) {
*pvalue = JS_UNDEFINED;
return index;
}
assert(m->status == JS_MODULE_STATUS_LINKED);
m->status = JS_MODULE_STATUS_EVALUATING;
m->dfs_index = index;
m->dfs_ancestor_index = index;
m->pending_async_dependencies = 0;
index++;
/* push 'm' on stack */
m->stack_prev = *pstack_top;
*pstack_top = m;
for(i = 0; i < m->req_module_entries_count; i++) {
JSReqModuleEntry *rme = &m->req_module_entries[i];
m1 = rme->module;
index = js_inner_module_evaluation(ctx, m1, index, pstack_top, pvalue);
if (index < 0)
return -1;
assert(m1->status == JS_MODULE_STATUS_EVALUATING ||
m1->status == JS_MODULE_STATUS_EVALUATING_ASYNC ||
m1->status == JS_MODULE_STATUS_EVALUATED);
if (m1->status == JS_MODULE_STATUS_EVALUATING) {
m->dfs_ancestor_index = min_int(m->dfs_ancestor_index,
m1->dfs_ancestor_index);
} else {
m1 = m1->cycle_root;
assert(m1->status == JS_MODULE_STATUS_EVALUATING_ASYNC ||
m1->status == JS_MODULE_STATUS_EVALUATED);
if (m1->eval_has_exception) {
*pvalue = JS_DupValue(ctx, m1->eval_exception);
return -1;
}
}
if (m1->async_evaluation) {
m->pending_async_dependencies++;
if (js_resize_array(ctx, (void **)&m1->async_parent_modules, sizeof(m1->async_parent_modules[0]), &m1->async_parent_modules_size, m1->async_parent_modules_count + 1)) {
*pvalue = JS_GetException(ctx);
return -1;
}
m1->async_parent_modules[m1->async_parent_modules_count++] = m;
}
}
if (m->pending_async_dependencies > 0) {
assert(!m->async_evaluation);
m->async_evaluation = TRUE;
m->async_evaluation_timestamp =
ctx->rt->module_async_evaluation_next_timestamp++;
} else if (m->has_tla) {
assert(!m->async_evaluation);
m->async_evaluation = TRUE;
m->async_evaluation_timestamp =
ctx->rt->module_async_evaluation_next_timestamp++;
js_execute_async_module(ctx, m);
} else {
if (js_execute_sync_module(ctx, m, pvalue) < 0)
return -1;
}
assert(m->dfs_ancestor_index <= m->dfs_index);
if (m->dfs_index == m->dfs_ancestor_index) {
for(;;) {
/* pop m1 from stack */
m1 = *pstack_top;
*pstack_top = m1->stack_prev;
if (!m1->async_evaluation) {
m1->status = JS_MODULE_STATUS_EVALUATED;
} else {
m1->status = JS_MODULE_STATUS_EVALUATING_ASYNC;
}
/* spec bug: cycle_root must be assigned before the test */
m1->cycle_root = m;
if (m1 == m)
break;
}
}
*pvalue = JS_UNDEFINED;
return index;
} | O1 | c | js_inner_module_evaluation:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rax
cmpq %rbp, 0xe8(%rax)
jbe 0x44adc
leaq 0x5a530(%rip), %rsi # 0x9efd6
movq %r14, %rdi
xorl %eax, %eax
callq 0x20add
movq 0x18(%r14), %rcx
movq 0xf0(%rcx), %rdx
movq 0xf8(%rcx), %rax
movl $0x0, 0xf0(%rcx)
movq $0x4, 0xf8(%rcx)
movq %rdx, (%rbx)
jmp 0x44b23
movl %edx, %r9d
movq %rsi, %r15
movl 0x80(%rsi), %eax
movl %eax, %esi
shrl $0x18, %esi
leal -0x4(%rsi), %edx
cmpl $0x2, %edx
jae 0x44b2e
cmpb $0x0, 0xf0(%r15)
je 0x44d53
movq 0xf8(%r15), %rcx
movq 0x100(%r15), %rax
movq %rcx, -0x40(%rbp)
cmpl $-0x9, %eax
jb 0x44b20
movq -0x40(%rbp), %rdx
incl (%rdx)
movq %rcx, (%rbx)
movl $0xffffffff, %r9d # imm = 0xFFFFFFFF
jmp 0x44d5e
cmpl $0x3, %esi
je 0x44d53
movq %rbx, -0x30(%rbp)
andl $0xffffff, %eax # imm = 0xFFFFFF
orl $0x3000000, %eax # imm = 0x3000000
movl %eax, 0x80(%r15)
movl %r9d, 0x84(%r15)
movl %r9d, 0x88(%r15)
movl $0x0, 0xa8(%r15)
incl %r9d
movq (%rcx), %rax
movq %rax, 0x90(%r15)
movq %r15, (%rcx)
cmpl $0x0, 0x20(%r15)
jle 0x44caf
movl $0x8, %r12d
xorl %r13d, %r13d
movq %r14, -0x38(%rbp)
movq 0x18(%r15), %rax
movq (%rax,%r12), %rbx
movq %r14, %rdi
movq %rbx, %rsi
movl %r9d, %edx
movq %rcx, %r14
movq -0x30(%rbp), %r8
callq 0x44a7b
testl %eax, %eax
js 0x44d74
movl %eax, %r9d
movzbl 0x83(%rbx), %eax
shll $0x18, %eax
cmpl $0x3000000, %eax # imm = 0x3000000
jne 0x44be1
movl 0x88(%r15), %eax
movl 0x88(%rbx), %ecx
cmpl %ecx, %eax
cmovll %eax, %ecx
movl %ecx, 0x88(%r15)
jmp 0x44bf5
movq 0xb8(%rbx), %rbx
cmpb $0x0, 0xf0(%rbx)
jne 0x44d7c
movq %r14, %rcx
cmpl $0x0, 0xac(%rbx)
je 0x44c33
incl 0xa8(%r15)
movl 0xa0(%rbx), %r8d
cmpl %r8d, 0xa4(%rbx)
jle 0x44c4d
movq 0x98(%rbx), %rax
movslq 0xa0(%rbx), %rsi
leal 0x1(%rsi), %edx
movl %edx, 0xa0(%rbx)
movq %r15, (%rax,%rsi,8)
incq %r13
movslq 0x20(%r15), %rax
addq $0x10, %r12
cmpq %rax, %r13
movq -0x38(%rbp), %r14
jl 0x44b8d
jmp 0x44caf
leaq 0x98(%rbx), %rsi
leaq 0xa4(%rbx), %rcx
incl %r8d
movq -0x38(%rbp), %rdi
movl $0x8, %edx
movl %r9d, -0x44(%rbp)
callq 0x434ef
movl -0x44(%rbp), %r9d
movq %r14, %rcx
testl %eax, %eax
je 0x44c18
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rcx
movq 0xf0(%rcx), %rdx
movq 0xf8(%rcx), %rax
movl $0x0, 0xf0(%rcx)
movq $0x4, 0xf8(%rcx)
movq -0x30(%rbp), %rbx
jmp 0x44ad7
cmpl $0x0, 0xa8(%r15)
jle 0x44ce7
movl $0x1, 0xac(%r15)
movq 0x18(%r14), %rax
movq 0x158(%rax), %rsi
leaq 0x1(%rsi), %rdx
movq %rdx, 0x158(%rax)
movq %rsi, 0xb0(%r15)
movq -0x30(%rbp), %rbx
jmp 0x44d17
movq %r14, %rdi
movl %r9d, %r12d
movq %rcx, %r14
cmpb $0x0, 0x80(%r15)
movq -0x30(%rbp), %rbx
jne 0x44da2
movq %r15, %rsi
movq %rbx, %rdx
callq 0x44ddd
testl %eax, %eax
movq %r14, %rcx
movl %r12d, %r9d
js 0x44d74
movl 0x84(%r15), %eax
cmpl 0x88(%r15), %eax
jne 0x44d53
movq (%rcx), %rax
movq 0x90(%rax), %rdx
movq %rdx, (%rcx)
cmpl $0x0, 0xac(%rax)
sete %dl
orb $0x4, %dl
movb %dl, 0x83(%rax)
movq %r15, 0xb8(%rax)
cmpq %r15, %rax
jne 0x44d27
movl $0x0, (%rbx)
movl $0x3, %eax
movq %rax, 0x8(%rbx)
movl %r9d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %r9d # imm = 0xFFFFFFFF
jmp 0x44d62
movq 0xf8(%rbx), %rcx
movq 0x100(%rbx), %rax
movq %rcx, -0x40(%rbp)
cmpl $-0x9, %eax
jb 0x44d99
movq -0x40(%rbp), %rdx
incl (%rdx)
movq -0x30(%rbp), %rbx
jmp 0x44b20
movl $0x1, 0xac(%r15)
movq 0x18(%rdi), %rax
movq 0x158(%rax), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x158(%rax)
movq %rcx, 0xb0(%r15)
movq %r15, %rsi
callq 0x110af
movq %r14, %rcx
movl %r12d, %r9d
jmp 0x44d17
| js_inner_module_evaluation:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, r8
mov r14, rdi
mov rax, [rdi+18h]
cmp [rax+0E8h], rbp
jbe short loc_44ADC
lea rsi, aMaximumCallSta; "Maximum call stack size exceeded"
mov rdi, r14
xor eax, eax
call JS_ThrowRangeError
mov rcx, [r14+18h]
mov rdx, [rcx+0F0h]
mov rax, [rcx+0F8h]
mov dword ptr [rcx+0F0h], 0
mov qword ptr [rcx+0F8h], 4
loc_44AD7:
mov [rbx], rdx
jmp short loc_44B23
loc_44ADC:
mov r9d, edx
mov r15, rsi
mov eax, [rsi+80h]
mov esi, eax
shr esi, 18h
lea edx, [rsi-4]
cmp edx, 2
jnb short loc_44B2E
cmp byte ptr [r15+0F0h], 0
jz loc_44D53
mov rcx, [r15+0F8h]
mov rax, [r15+100h]
mov [rbp+var_40], rcx
cmp eax, 0FFFFFFF7h
jb short loc_44B20
mov rdx, [rbp+var_40]
inc dword ptr [rdx]
loc_44B20:
mov [rbx], rcx
loc_44B23:
mov r9d, 0FFFFFFFFh
jmp loc_44D5E
loc_44B2E:
cmp esi, 3
jz loc_44D53
mov [rbp+var_30], rbx
and eax, 0FFFFFFh
or eax, 3000000h
mov [r15+80h], eax
mov [r15+84h], r9d
mov [r15+88h], r9d
mov dword ptr [r15+0A8h], 0
inc r9d
mov rax, [rcx]
mov [r15+90h], rax
mov [rcx], r15
cmp dword ptr [r15+20h], 0
jle loc_44CAF
mov r12d, 8
xor r13d, r13d
mov [rbp+var_38], r14
loc_44B8D:
mov rax, [r15+18h]
mov rbx, [rax+r12]
mov rdi, r14
mov rsi, rbx
mov edx, r9d
mov r14, rcx
mov r8, [rbp+var_30]
call js_inner_module_evaluation
test eax, eax
js loc_44D74
mov r9d, eax
movzx eax, byte ptr [rbx+83h]
shl eax, 18h
cmp eax, 3000000h
jnz short loc_44BE1
mov eax, [r15+88h]
mov ecx, [rbx+88h]
cmp eax, ecx
cmovl ecx, eax
mov [r15+88h], ecx
jmp short loc_44BF5
loc_44BE1:
mov rbx, [rbx+0B8h]
cmp byte ptr [rbx+0F0h], 0
jnz loc_44D7C
loc_44BF5:
mov rcx, r14
cmp dword ptr [rbx+0ACh], 0
jz short loc_44C33
inc dword ptr [r15+0A8h]
mov r8d, [rbx+0A0h]
cmp [rbx+0A4h], r8d
jle short loc_44C4D
loc_44C18:
mov rax, [rbx+98h]
movsxd rsi, dword ptr [rbx+0A0h]
lea edx, [rsi+1]
mov [rbx+0A0h], edx
mov [rax+rsi*8], r15
loc_44C33:
inc r13
movsxd rax, dword ptr [r15+20h]
add r12, 10h
cmp r13, rax
mov r14, [rbp+var_38]
jl loc_44B8D
jmp short loc_44CAF
loc_44C4D:
lea rsi, [rbx+98h]
lea rcx, [rbx+0A4h]
inc r8d
mov rdi, [rbp+var_38]
mov edx, 8
mov [rbp+var_44], r9d
call js_realloc_array
mov r9d, [rbp+var_44]
mov rcx, r14
test eax, eax
jz short loc_44C18
mov rax, [rbp+var_38]
mov rcx, [rax+18h]
mov rdx, [rcx+0F0h]
mov rax, [rcx+0F8h]
mov dword ptr [rcx+0F0h], 0
mov qword ptr [rcx+0F8h], 4
mov rbx, [rbp+var_30]
jmp loc_44AD7
loc_44CAF:
cmp dword ptr [r15+0A8h], 0
jle short loc_44CE7
mov dword ptr [r15+0ACh], 1
mov rax, [r14+18h]
mov rsi, [rax+158h]
lea rdx, [rsi+1]
mov [rax+158h], rdx
mov [r15+0B0h], rsi
mov rbx, [rbp+var_30]
jmp short loc_44D17
loc_44CE7:
mov rdi, r14
mov r12d, r9d
mov r14, rcx
cmp byte ptr [r15+80h], 0
mov rbx, [rbp+var_30]
jnz loc_44DA2
mov rsi, r15
mov rdx, rbx
call js_execute_sync_module
test eax, eax
mov rcx, r14
mov r9d, r12d
js short loc_44D74
loc_44D17:
mov eax, [r15+84h]
cmp eax, [r15+88h]
jnz short loc_44D53
loc_44D27:
mov rax, [rcx]
mov rdx, [rax+90h]
mov [rcx], rdx
cmp dword ptr [rax+0ACh], 0
setz dl
or dl, 4
mov [rax+83h], dl
mov [rax+0B8h], r15
cmp rax, r15
jnz short loc_44D27
loc_44D53:
mov dword ptr [rbx], 0
mov eax, 3
loc_44D5E:
mov [rbx+8], rax
loc_44D62:
mov eax, r9d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_44D74:
mov r9d, 0FFFFFFFFh
jmp short loc_44D62
loc_44D7C:
mov rcx, [rbx+0F8h]
mov rax, [rbx+100h]
mov [rbp+var_40], rcx
cmp eax, 0FFFFFFF7h
jb short loc_44D99
mov rdx, [rbp+var_40]
inc dword ptr [rdx]
loc_44D99:
mov rbx, [rbp+var_30]
jmp loc_44B20
loc_44DA2:
mov dword ptr [r15+0ACh], 1
mov rax, [rdi+18h]
mov rcx, [rax+158h]
lea rdx, [rcx+1]
mov [rax+158h], rdx
mov [r15+0B0h], rcx
mov rsi, r15
call js_execute_async_module
mov rcx, r14
mov r9d, r12d
jmp loc_44D17
| long long js_inner_module_evaluation(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
_QWORD *v14; // rbx
long long v15; // r14
long long v16; // rcx
long long v17; // rdx
long long v18; // rax
unsigned int v19; // r9d
unsigned int v21; // eax
long long v22; // rcx
long long v23; // r12
long long v24; // r13
long long v25; // rbx
long long v26; // rdi
long long v27; // r14
int v28; // eax
int v29; // ecx
int v30; // r8d
long long v31; // rax
long long v32; // rsi
int v33; // eax
long long v34; // rcx
long long v35; // rax
long long v36; // rsi
long long v37; // rdi
unsigned int v38; // r12d
long long v39; // r14
int v40; // eax
long long v41; // rax
long long v43; // rax
long long v44; // rcx
char v45; // [rsp+0h] [rbp-50h]
unsigned int v46; // [rsp+Ch] [rbp-44h]
long long savedregs; // [rsp+50h] [rbp+0h] BYREF
v14 = (_QWORD *)a5;
v15 = a1;
if ( *(_QWORD *)(*(_QWORD *)(a1 + 24) + 232LL) <= (unsigned long long)&savedregs )
{
v19 = a3;
v21 = *(_DWORD *)(a2 + 128);
if ( HIBYTE(v21) - 4 < 2u )
{
if ( *(_BYTE *)(a2 + 240) )
{
v22 = *(_QWORD *)(a2 + 248);
v18 = *(_QWORD *)(a2 + 256);
if ( (unsigned int)v18 >= 0xFFFFFFF7 )
++**(_DWORD **)(a2 + 248);
LABEL_8:
*v14 = v22;
goto LABEL_9;
}
LABEL_32:
*(_DWORD *)v14 = 0;
v18 = 3LL;
goto LABEL_33;
}
if ( HIBYTE(v21) == 3 )
goto LABEL_32;
*(_DWORD *)(a2 + 128) = v21 & 0xFFFFFF | 0x3000000;
*(_DWORD *)(a2 + 132) = a3;
*(_DWORD *)(a2 + 136) = a3;
*(_DWORD *)(a2 + 168) = 0;
v19 = a3 + 1;
*(_QWORD *)(a2 + 144) = *(_QWORD *)a4;
*(_QWORD *)a4 = a2;
if ( *(int *)(a2 + 32) > 0 )
{
v23 = 8LL;
v24 = 0LL;
do
{
v25 = *(_QWORD *)(*(_QWORD *)(a2 + 24) + v23);
v26 = v15;
v27 = a4;
v28 = js_inner_module_evaluation(v26, v25, v19, a4, a5);
if ( v28 < 0 )
return (unsigned int)-1;
v19 = v28;
if ( *(unsigned __int8 *)(v25 + 131) << 24 == 50331648 )
{
v29 = *(_DWORD *)(v25 + 136);
if ( *(_DWORD *)(a2 + 136) < v29 )
v29 = *(_DWORD *)(a2 + 136);
*(_DWORD *)(a2 + 136) = v29;
}
else
{
v25 = *(_QWORD *)(v25 + 184);
if ( *(_BYTE *)(v25 + 240) )
{
v22 = *(_QWORD *)(v25 + 248);
v18 = *(_QWORD *)(v25 + 256);
if ( (unsigned int)v18 >= 0xFFFFFFF7 )
++**(_DWORD **)(v25 + 248);
v14 = (_QWORD *)a5;
goto LABEL_8;
}
}
a4 = v27;
if ( *(_DWORD *)(v25 + 172) )
{
++*(_DWORD *)(a2 + 168);
v30 = *(_DWORD *)(v25 + 160);
if ( *(_DWORD *)(v25 + 164) <= v30 )
{
v46 = v28;
v33 = js_realloc_array(a1, (long long *)(v25 + 152), 8u, (_DWORD *)(v25 + 164), v30 + 1);
v19 = v46;
a4 = v27;
if ( v33 )
{
v34 = *(_QWORD *)(a1 + 24);
v17 = *(_QWORD *)(v34 + 240);
v18 = *(_QWORD *)(v34 + 248);
*(_DWORD *)(v34 + 240) = 0;
*(_QWORD *)(v34 + 248) = 4LL;
v14 = (_QWORD *)a5;
goto LABEL_3;
}
}
v31 = *(_QWORD *)(v25 + 152);
v32 = *(int *)(v25 + 160);
*(_DWORD *)(v25 + 160) = v32 + 1;
*(_QWORD *)(v31 + 8 * v32) = a2;
}
++v24;
v23 += 16LL;
v15 = a1;
}
while ( v24 < *(int *)(a2 + 32) );
}
if ( *(int *)(a2 + 168) <= 0 )
{
v37 = v15;
v38 = v19;
v39 = a4;
v14 = (_QWORD *)a5;
if ( *(_BYTE *)(a2 + 128) )
{
*(_DWORD *)(a2 + 172) = 1;
v43 = *(_QWORD *)(v37 + 24);
v44 = *(_QWORD *)(v43 + 344);
*(_QWORD *)(v43 + 344) = v44 + 1;
*(_QWORD *)(a2 + 176) = v44;
js_execute_async_module(v37, a2);
a4 = v39;
v19 = v38;
}
else
{
v40 = js_execute_sync_module(v37, a2, a5);
a4 = v39;
v19 = v38;
if ( v40 < 0 )
return (unsigned int)-1;
}
}
else
{
*(_DWORD *)(a2 + 172) = 1;
v35 = *(_QWORD *)(v15 + 24);
v36 = *(_QWORD *)(v35 + 344);
*(_QWORD *)(v35 + 344) = v36 + 1;
*(_QWORD *)(a2 + 176) = v36;
v14 = (_QWORD *)a5;
}
if ( *(_DWORD *)(a2 + 132) == *(_DWORD *)(a2 + 136) )
{
do
{
v41 = *(_QWORD *)a4;
*(_QWORD *)a4 = *(_QWORD *)(*(_QWORD *)a4 + 144LL);
*(_BYTE *)(v41 + 131) = (*(_DWORD *)(v41 + 172) == 0) | 4;
*(_QWORD *)(v41 + 184) = a2;
}
while ( v41 != a2 );
}
goto LABEL_32;
}
JS_ThrowRangeError(
a1,
(long long)"Maximum call stack size exceeded",
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v45);
v16 = *(_QWORD *)(a1 + 24);
v17 = *(_QWORD *)(v16 + 240);
v18 = *(_QWORD *)(v16 + 248);
*(_DWORD *)(v16 + 240) = 0;
*(_QWORD *)(v16 + 248) = 4LL;
LABEL_3:
*v14 = v17;
LABEL_9:
v19 = -1;
LABEL_33:
v14[1] = v18;
return v19;
}
| |||
6,581 | js_inner_module_evaluation | bluesky950520[P]quickjs/quickjs.c | static int js_inner_module_evaluation(JSContext *ctx, JSModuleDef *m,
int index, JSModuleDef **pstack_top,
JSValue *pvalue)
{
JSModuleDef *m1;
int i;
if (js_check_stack_overflow(ctx->rt, 0)) {
JS_ThrowStackOverflow(ctx);
*pvalue = JS_GetException(ctx);
return -1;
}
#ifdef DUMP_MODULE_RESOLVE
if (check_dump_flag(ctx->rt, DUMP_MODULE_RESOLVE)) {
char buf1[ATOM_GET_STR_BUF_SIZE];
printf("js_inner_module_evaluation '%s':\n", JS_AtomGetStr(ctx, buf1, sizeof(buf1), m->module_name));
}
#endif
if (m->status == JS_MODULE_STATUS_EVALUATING_ASYNC ||
m->status == JS_MODULE_STATUS_EVALUATED) {
if (m->eval_has_exception) {
*pvalue = JS_DupValue(ctx, m->eval_exception);
return -1;
} else {
*pvalue = JS_UNDEFINED;
return index;
}
}
if (m->status == JS_MODULE_STATUS_EVALUATING) {
*pvalue = JS_UNDEFINED;
return index;
}
assert(m->status == JS_MODULE_STATUS_LINKED);
m->status = JS_MODULE_STATUS_EVALUATING;
m->dfs_index = index;
m->dfs_ancestor_index = index;
m->pending_async_dependencies = 0;
index++;
/* push 'm' on stack */
m->stack_prev = *pstack_top;
*pstack_top = m;
for(i = 0; i < m->req_module_entries_count; i++) {
JSReqModuleEntry *rme = &m->req_module_entries[i];
m1 = rme->module;
index = js_inner_module_evaluation(ctx, m1, index, pstack_top, pvalue);
if (index < 0)
return -1;
assert(m1->status == JS_MODULE_STATUS_EVALUATING ||
m1->status == JS_MODULE_STATUS_EVALUATING_ASYNC ||
m1->status == JS_MODULE_STATUS_EVALUATED);
if (m1->status == JS_MODULE_STATUS_EVALUATING) {
m->dfs_ancestor_index = min_int(m->dfs_ancestor_index,
m1->dfs_ancestor_index);
} else {
m1 = m1->cycle_root;
assert(m1->status == JS_MODULE_STATUS_EVALUATING_ASYNC ||
m1->status == JS_MODULE_STATUS_EVALUATED);
if (m1->eval_has_exception) {
*pvalue = JS_DupValue(ctx, m1->eval_exception);
return -1;
}
}
if (m1->async_evaluation) {
m->pending_async_dependencies++;
if (js_resize_array(ctx, (void **)&m1->async_parent_modules, sizeof(m1->async_parent_modules[0]), &m1->async_parent_modules_size, m1->async_parent_modules_count + 1)) {
*pvalue = JS_GetException(ctx);
return -1;
}
m1->async_parent_modules[m1->async_parent_modules_count++] = m;
}
}
if (m->pending_async_dependencies > 0) {
assert(!m->async_evaluation);
m->async_evaluation = TRUE;
m->async_evaluation_timestamp =
ctx->rt->module_async_evaluation_next_timestamp++;
} else if (m->has_tla) {
assert(!m->async_evaluation);
m->async_evaluation = TRUE;
m->async_evaluation_timestamp =
ctx->rt->module_async_evaluation_next_timestamp++;
js_execute_async_module(ctx, m);
} else {
if (js_execute_sync_module(ctx, m, pvalue) < 0)
return -1;
}
assert(m->dfs_ancestor_index <= m->dfs_index);
if (m->dfs_index == m->dfs_ancestor_index) {
for(;;) {
/* pop m1 from stack */
m1 = *pstack_top;
*pstack_top = m1->stack_prev;
if (!m1->async_evaluation) {
m1->status = JS_MODULE_STATUS_EVALUATED;
} else {
m1->status = JS_MODULE_STATUS_EVALUATING_ASYNC;
}
/* spec bug: cycle_root must be assigned before the test */
m1->cycle_root = m;
if (m1 == m)
break;
}
}
*pvalue = JS_UNDEFINED;
return index;
} | O2 | c | js_inner_module_evaluation:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movq %rdi, %r12
movq 0x18(%rdi), %rax
cmpq %rbp, 0xe8(%rax)
jbe 0x3c5aa
movq %r12, %rdi
callq 0x35d91
movq 0x18(%r12), %rcx
movq 0xf0(%rcx), %rdx
movq 0xf8(%rcx), %rax
andl $0x0, 0xf0(%rcx)
movq $0x4, 0xf8(%rcx)
movq %rdx, (%rbx)
jmp 0x3c5e5
movl %edx, %r14d
movq %rsi, %r15
movl 0x80(%rsi), %eax
movl %eax, %esi
shrl $0x18, %esi
leal -0x4(%rsi), %edx
cmpl $0x2, %edx
jae 0x3c5eb
cmpb $0x0, 0xf0(%r15)
je 0x3c5f0
movq 0xf8(%r15), %rcx
movq 0x100(%r15), %rax
cmpl $-0x9, %eax
jb 0x3c5e2
incl (%rcx)
movq %rcx, (%rbx)
pushq $-0x1
popq %r14
jmp 0x3c5f6
cmpl $0x3, %esi
jne 0x3c60c
andl $0x0, (%rbx)
pushq $0x3
popq %rax
movq %rax, 0x8(%rbx)
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, -0x30(%rbp)
movq %rbx, -0x38(%rbp)
andl $0xffffff, %eax # imm = 0xFFFFFF
orl $0x3000000, %eax # imm = 0x3000000
movl %eax, 0x80(%r15)
movl %r14d, 0x84(%r15)
movl %r14d, 0x88(%r15)
andl $0x0, 0xa8(%r15)
incl %r14d
movq (%rcx), %rax
movq %rax, 0x90(%r15)
movq %rcx, -0x40(%rbp)
movq %r15, (%rcx)
pushq $0x8
popq %r12
xorl %r13d, %r13d
movslq 0x20(%r15), %rax
cmpq %rax, %r13
jge 0x3c72c
movq 0x18(%r15), %rax
movq (%rax,%r12), %rbx
movq -0x30(%rbp), %rdi
movq %rbx, %rsi
movl %r14d, %edx
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %r8
callq 0x3c554
testl %eax, %eax
js 0x3c773
movl %eax, %r14d
movzbl 0x83(%rbx), %eax
shll $0x18, %eax
cmpl $0x3000000, %eax # imm = 0x3000000
jne 0x3c6b9
movl 0x88(%r15), %eax
movl 0x88(%rbx), %ecx
cmpl %ecx, %eax
cmovll %eax, %ecx
movl %ecx, 0x88(%r15)
jmp 0x3c6cd
movq 0xb8(%rbx), %rbx
cmpb $0x0, 0xf0(%rbx)
jne 0x3c7ac
cmpl $0x0, 0xac(%rbx)
je 0x3c720
incl 0xa8(%r15)
leaq 0x98(%rbx), %rsi
leaq 0xa4(%rbx), %rcx
movl 0xa0(%rbx), %r8d
incl %r8d
movq -0x30(%rbp), %rdi
pushq $0x8
popq %rdx
callq 0x3b0ef
testl %eax, %eax
jne 0x3c77b
movq 0x98(%rbx), %rax
movslq 0xa0(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0xa0(%rbx)
movq %r15, (%rax,%rcx,8)
incq %r13
addq $0x10, %r12
jmp 0x3c656
cmpl $0x0, 0xa8(%r15)
jle 0x3c7ca
movl $0x1, 0xac(%r15)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x158(%rax), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x158(%rax)
movq %rcx, 0xb0(%r15)
movq -0x38(%rbp), %rbx
movq -0x40(%rbp), %r12
jmp 0x3c82c
pushq $-0x1
popq %rax
jmp 0x3c5fd
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rcx
movq 0xf0(%rcx), %rdx
movq 0xf8(%rcx), %rax
andl $0x0, 0xf0(%rcx)
movq $0x4, 0xf8(%rcx)
movq -0x38(%rbp), %rbx
jmp 0x3c5a5
movq 0xf8(%rbx), %rcx
movq 0x100(%rbx), %rax
cmpl $-0x9, %eax
jb 0x3c7c1
incl (%rcx)
movq -0x38(%rbp), %rbx
jmp 0x3c5e2
cmpb $0x0, 0x80(%r15)
movq -0x38(%rbp), %rbx
movq -0x40(%rbp), %r12
je 0x3c812
movl $0x1, 0xac(%r15)
movq -0x30(%rbp), %rdi
movq 0x18(%rdi), %rax
movq 0x158(%rax), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x158(%rax)
movq %rcx, 0xb0(%r15)
movq %r15, %rsi
callq 0x3c873
jmp 0x3c82c
movq -0x30(%rbp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x3c994
testl %eax, %eax
pushq $-0x1
popq %rax
js 0x3c5fd
movl 0x84(%r15), %eax
cmpl 0x88(%r15), %eax
jne 0x3c5f0
movq (%r12), %rax
movq 0x90(%rax), %rcx
movq %rcx, (%r12)
cmpl $0x0, 0xac(%rax)
sete %cl
orb $0x4, %cl
movb %cl, 0x83(%rax)
movq %r15, 0xb8(%rax)
cmpq %r15, %rax
jne 0x3c840
jmp 0x3c5f0
| js_inner_module_evaluation:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, r8
mov r12, rdi
mov rax, [rdi+18h]
cmp [rax+0E8h], rbp
jbe short loc_3C5AA
mov rdi, r12
call JS_ThrowStackOverflow
mov rcx, [r12+18h]
mov rdx, [rcx+0F0h]
mov rax, [rcx+0F8h]
and dword ptr [rcx+0F0h], 0
mov qword ptr [rcx+0F8h], 4
loc_3C5A5:
mov [rbx], rdx
jmp short loc_3C5E5
loc_3C5AA:
mov r14d, edx
mov r15, rsi
mov eax, [rsi+80h]
mov esi, eax
shr esi, 18h
lea edx, [rsi-4]
cmp edx, 2
jnb short loc_3C5EB
cmp byte ptr [r15+0F0h], 0
jz short loc_3C5F0
mov rcx, [r15+0F8h]
mov rax, [r15+100h]
cmp eax, 0FFFFFFF7h
jb short loc_3C5E2
inc dword ptr [rcx]
loc_3C5E2:
mov [rbx], rcx
loc_3C5E5:
push 0FFFFFFFFFFFFFFFFh
pop r14
jmp short loc_3C5F6
loc_3C5EB:
cmp esi, 3
jnz short loc_3C60C
loc_3C5F0:
and dword ptr [rbx], 0
push 3
pop rax
loc_3C5F6:
mov [rbx+8], rax
mov eax, r14d
loc_3C5FD:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3C60C:
mov [rbp+var_30], r12
mov [rbp+var_38], rbx
and eax, 0FFFFFFh
or eax, 3000000h
mov [r15+80h], eax
mov [r15+84h], r14d
mov [r15+88h], r14d
and dword ptr [r15+0A8h], 0
inc r14d
mov rax, [rcx]
mov [r15+90h], rax
mov [rbp+var_40], rcx
mov [rcx], r15
push 8
pop r12
xor r13d, r13d
loc_3C656:
movsxd rax, dword ptr [r15+20h]
cmp r13, rax
jge loc_3C72C
mov rax, [r15+18h]
mov rbx, [rax+r12]
mov rdi, [rbp+var_30]
mov rsi, rbx
mov edx, r14d
mov rcx, [rbp+var_40]
mov r8, [rbp+var_38]
call js_inner_module_evaluation
test eax, eax
js loc_3C773
mov r14d, eax
movzx eax, byte ptr [rbx+83h]
shl eax, 18h
cmp eax, 3000000h
jnz short loc_3C6B9
mov eax, [r15+88h]
mov ecx, [rbx+88h]
cmp eax, ecx
cmovl ecx, eax
mov [r15+88h], ecx
jmp short loc_3C6CD
loc_3C6B9:
mov rbx, [rbx+0B8h]
cmp byte ptr [rbx+0F0h], 0
jnz loc_3C7AC
loc_3C6CD:
cmp dword ptr [rbx+0ACh], 0
jz short loc_3C720
inc dword ptr [r15+0A8h]
lea rsi, [rbx+98h]
lea rcx, [rbx+0A4h]
mov r8d, [rbx+0A0h]
inc r8d
mov rdi, [rbp+var_30]
push 8
pop rdx
call js_resize_array
test eax, eax
jnz short loc_3C77B
mov rax, [rbx+98h]
movsxd rcx, dword ptr [rbx+0A0h]
lea edx, [rcx+1]
mov [rbx+0A0h], edx
mov [rax+rcx*8], r15
loc_3C720:
inc r13
add r12, 10h
jmp loc_3C656
loc_3C72C:
cmp dword ptr [r15+0A8h], 0
jle loc_3C7CA
mov dword ptr [r15+0ACh], 1
mov rax, [rbp+var_30]
mov rax, [rax+18h]
mov rcx, [rax+158h]
lea rdx, [rcx+1]
mov [rax+158h], rdx
mov [r15+0B0h], rcx
mov rbx, [rbp+var_38]
mov r12, [rbp+var_40]
jmp loc_3C82C
loc_3C773:
push 0FFFFFFFFFFFFFFFFh
pop rax
jmp loc_3C5FD
loc_3C77B:
mov rax, [rbp+var_30]
mov rcx, [rax+18h]
mov rdx, [rcx+0F0h]
mov rax, [rcx+0F8h]
and dword ptr [rcx+0F0h], 0
mov qword ptr [rcx+0F8h], 4
mov rbx, [rbp+var_38]
jmp loc_3C5A5
loc_3C7AC:
mov rcx, [rbx+0F8h]
mov rax, [rbx+100h]
cmp eax, 0FFFFFFF7h
jb short loc_3C7C1
inc dword ptr [rcx]
loc_3C7C1:
mov rbx, [rbp+var_38]
jmp loc_3C5E2
loc_3C7CA:
cmp byte ptr [r15+80h], 0
mov rbx, [rbp+var_38]
mov r12, [rbp+var_40]
jz short loc_3C812
mov dword ptr [r15+0ACh], 1
mov rdi, [rbp+var_30]
mov rax, [rdi+18h]
mov rcx, [rax+158h]
lea rdx, [rcx+1]
mov [rax+158h], rdx
mov [r15+0B0h], rcx
mov rsi, r15
call js_execute_async_module
jmp short loc_3C82C
loc_3C812:
mov rdi, [rbp+var_30]
mov rsi, r15
mov rdx, rbx
call js_execute_sync_module
test eax, eax
push 0FFFFFFFFFFFFFFFFh
pop rax
js loc_3C5FD
loc_3C82C:
mov eax, [r15+84h]
cmp eax, [r15+88h]
jnz loc_3C5F0
loc_3C840:
mov rax, [r12]
mov rcx, [rax+90h]
mov [r12], rcx
cmp dword ptr [rax+0ACh], 0
setz cl
or cl, 4
mov [rax+83h], cl
mov [rax+0B8h], r15
cmp rax, r15
jnz short loc_3C840
jmp loc_3C5F0
| long long js_inner_module_evaluation(
long long a1,
long long a2,
long long a3,
long long *a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
_QWORD *v14; // rbx
long long v15; // rcx
long long v16; // rdx
long long v17; // rax
unsigned int v18; // r14d
unsigned int v19; // eax
_DWORD *v20; // rcx
long long result; // rax
long long v22; // r12
long long i; // r13
long long v24; // rbx
int v25; // eax
int v26; // ecx
long long v27; // rax
long long v28; // rcx
long long v29; // rax
long long v30; // rcx
long long *v31; // r12
long long v32; // rcx
long long v33; // rax
long long v34; // rcx
bool v35; // sf
long long v36; // rax
char v37; // [rsp+0h] [rbp-40h]
long long savedregs; // [rsp+40h] [rbp+0h] BYREF
v14 = (_QWORD *)a5;
if ( *(_QWORD *)(*(_QWORD *)(a1 + 24) + 232LL) <= (unsigned long long)&savedregs )
{
v18 = a3;
v19 = *(_DWORD *)(a2 + 128);
if ( HIBYTE(v19) - 4 >= 2u )
{
if ( HIBYTE(v19) != 3 )
{
*(_DWORD *)(a2 + 128) = v19 & 0xFFFFFF | 0x3000000;
*(_DWORD *)(a2 + 132) = a3;
*(_DWORD *)(a2 + 136) = a3;
*(_DWORD *)(a2 + 168) = 0;
v18 = a3 + 1;
*(_QWORD *)(a2 + 144) = *a4;
*a4 = a2;
v22 = 8LL;
for ( i = 0LL; i < *(int *)(a2 + 32); ++i )
{
v24 = *(_QWORD *)(*(_QWORD *)(a2 + 24) + v22);
v25 = js_inner_module_evaluation(a1, v24, v18, a4, a5);
if ( v25 < 0 )
return -1LL;
v18 = v25;
if ( *(unsigned __int8 *)(v24 + 131) << 24 == 50331648 )
{
v26 = *(_DWORD *)(v24 + 136);
if ( *(_DWORD *)(a2 + 136) < v26 )
v26 = *(_DWORD *)(a2 + 136);
*(_DWORD *)(a2 + 136) = v26;
}
else
{
v24 = *(_QWORD *)(v24 + 184);
if ( *(_BYTE *)(v24 + 240) )
{
v20 = *(_DWORD **)(v24 + 248);
v17 = *(_QWORD *)(v24 + 256);
if ( (unsigned int)v17 >= 0xFFFFFFF7 )
++*v20;
v14 = (_QWORD *)a5;
goto LABEL_8;
}
}
if ( *(_DWORD *)(v24 + 172) )
{
++*(_DWORD *)(a2 + 168);
if ( (unsigned int)js_resize_array(a1, v24 + 152, 8LL, (_DWORD *)(v24 + 164), *(_DWORD *)(v24 + 160) + 1) )
{
v32 = *(_QWORD *)(a1 + 24);
v16 = *(_QWORD *)(v32 + 240);
v17 = *(_QWORD *)(v32 + 248);
*(_DWORD *)(v32 + 240) = 0;
*(_QWORD *)(v32 + 248) = 4LL;
v14 = (_QWORD *)a5;
goto LABEL_3;
}
v27 = *(_QWORD *)(v24 + 152);
v28 = *(int *)(v24 + 160);
*(_DWORD *)(v24 + 160) = v28 + 1;
*(_QWORD *)(v27 + 8 * v28) = a2;
}
v22 += 16LL;
}
if ( *(int *)(a2 + 168) <= 0 )
{
v14 = (_QWORD *)a5;
v31 = a4;
if ( *(_BYTE *)(a2 + 128) )
{
*(_DWORD *)(a2 + 172) = 1;
v33 = *(_QWORD *)(a1 + 24);
v34 = *(_QWORD *)(v33 + 344);
*(_QWORD *)(v33 + 344) = v34 + 1;
*(_QWORD *)(a2 + 176) = v34;
js_execute_async_module(a1, a2);
}
else
{
v35 = (int)js_execute_sync_module(a1, a2, a5) < 0;
result = -1LL;
if ( v35 )
return result;
}
}
else
{
*(_DWORD *)(a2 + 172) = 1;
v29 = *(_QWORD *)(a1 + 24);
v30 = *(_QWORD *)(v29 + 344);
*(_QWORD *)(v29 + 344) = v30 + 1;
*(_QWORD *)(a2 + 176) = v30;
v14 = (_QWORD *)a5;
v31 = a4;
}
if ( *(_DWORD *)(a2 + 132) == *(_DWORD *)(a2 + 136) )
{
do
{
v36 = *v31;
*v31 = *(_QWORD *)(*v31 + 144);
*(_BYTE *)(v36 + 131) = (*(_DWORD *)(v36 + 172) == 0) | 4;
*(_QWORD *)(v36 + 184) = a2;
}
while ( v36 != a2 );
}
}
}
else if ( *(_BYTE *)(a2 + 240) )
{
v20 = *(_DWORD **)(a2 + 248);
v17 = *(_QWORD *)(a2 + 256);
if ( (unsigned int)v17 >= 0xFFFFFFF7 )
++*v20;
LABEL_8:
*v14 = v20;
goto LABEL_9;
}
*(_DWORD *)v14 = 0;
v17 = 3LL;
goto LABEL_12;
}
JS_ThrowStackOverflow(a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, a3, (long long)a4, a5, a6, v37);
v15 = *(_QWORD *)(a1 + 24);
v16 = *(_QWORD *)(v15 + 240);
v17 = *(_QWORD *)(v15 + 248);
*(_DWORD *)(v15 + 240) = 0;
*(_QWORD *)(v15 + 248) = 4LL;
LABEL_3:
*v14 = v16;
LABEL_9:
v18 = -1;
LABEL_12:
v14[1] = v17;
return v18;
}
| js_inner_module_evaluation:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,R8
MOV R12,RDI
MOV RAX,qword ptr [RDI + 0x18]
CMP qword ptr [RAX + 0xe8],RBP
JBE 0x0013c5aa
MOV RDI,R12
CALL 0x00135d91
MOV RCX,qword ptr [R12 + 0x18]
MOV RDX,qword ptr [RCX + 0xf0]
MOV RAX,qword ptr [RCX + 0xf8]
AND dword ptr [RCX + 0xf0],0x0
MOV qword ptr [RCX + 0xf8],0x4
LAB_0013c5a5:
MOV qword ptr [RBX],RDX
JMP 0x0013c5e5
LAB_0013c5aa:
MOV R14D,EDX
MOV R15,RSI
MOV EAX,dword ptr [RSI + 0x80]
MOV ESI,EAX
SHR ESI,0x18
LEA EDX,[RSI + -0x4]
CMP EDX,0x2
JNC 0x0013c5eb
CMP byte ptr [R15 + 0xf0],0x0
JZ 0x0013c5f0
MOV RCX,qword ptr [R15 + 0xf8]
MOV RAX,qword ptr [R15 + 0x100]
CMP EAX,-0x9
JC 0x0013c5e2
INC dword ptr [RCX]
LAB_0013c5e2:
MOV qword ptr [RBX],RCX
LAB_0013c5e5:
PUSH -0x1
POP R14
JMP 0x0013c5f6
LAB_0013c5eb:
CMP ESI,0x3
JNZ 0x0013c60c
LAB_0013c5f0:
AND dword ptr [RBX],0x0
PUSH 0x3
POP RAX
LAB_0013c5f6:
MOV qword ptr [RBX + 0x8],RAX
MOV EAX,R14D
LAB_0013c5fd:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013c60c:
MOV qword ptr [RBP + -0x30],R12
MOV qword ptr [RBP + -0x38],RBX
AND EAX,0xffffff
OR EAX,0x3000000
MOV dword ptr [R15 + 0x80],EAX
MOV dword ptr [R15 + 0x84],R14D
MOV dword ptr [R15 + 0x88],R14D
AND dword ptr [R15 + 0xa8],0x0
INC R14D
MOV RAX,qword ptr [RCX]
MOV qword ptr [R15 + 0x90],RAX
MOV qword ptr [RBP + -0x40],RCX
MOV qword ptr [RCX],R15
PUSH 0x8
POP R12
XOR R13D,R13D
LAB_0013c656:
MOVSXD RAX,dword ptr [R15 + 0x20]
CMP R13,RAX
JGE 0x0013c72c
MOV RAX,qword ptr [R15 + 0x18]
MOV RBX,qword ptr [RAX + R12*0x1]
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,RBX
MOV EDX,R14D
MOV RCX,qword ptr [RBP + -0x40]
MOV R8,qword ptr [RBP + -0x38]
CALL 0x0013c554
TEST EAX,EAX
JS 0x0013c773
MOV R14D,EAX
MOVZX EAX,byte ptr [RBX + 0x83]
SHL EAX,0x18
CMP EAX,0x3000000
JNZ 0x0013c6b9
MOV EAX,dword ptr [R15 + 0x88]
MOV ECX,dword ptr [RBX + 0x88]
CMP EAX,ECX
CMOVL ECX,EAX
MOV dword ptr [R15 + 0x88],ECX
JMP 0x0013c6cd
LAB_0013c6b9:
MOV RBX,qword ptr [RBX + 0xb8]
CMP byte ptr [RBX + 0xf0],0x0
JNZ 0x0013c7ac
LAB_0013c6cd:
CMP dword ptr [RBX + 0xac],0x0
JZ 0x0013c720
INC dword ptr [R15 + 0xa8]
LEA RSI,[RBX + 0x98]
LEA RCX,[RBX + 0xa4]
MOV R8D,dword ptr [RBX + 0xa0]
INC R8D
MOV RDI,qword ptr [RBP + -0x30]
PUSH 0x8
POP RDX
CALL 0x0013b0ef
TEST EAX,EAX
JNZ 0x0013c77b
MOV RAX,qword ptr [RBX + 0x98]
MOVSXD RCX,dword ptr [RBX + 0xa0]
LEA EDX,[RCX + 0x1]
MOV dword ptr [RBX + 0xa0],EDX
MOV qword ptr [RAX + RCX*0x8],R15
LAB_0013c720:
INC R13
ADD R12,0x10
JMP 0x0013c656
LAB_0013c72c:
CMP dword ptr [R15 + 0xa8],0x0
JLE 0x0013c7ca
MOV dword ptr [R15 + 0xac],0x1
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RAX + 0x158]
LEA RDX,[RCX + 0x1]
MOV qword ptr [RAX + 0x158],RDX
MOV qword ptr [R15 + 0xb0],RCX
MOV RBX,qword ptr [RBP + -0x38]
MOV R12,qword ptr [RBP + -0x40]
JMP 0x0013c82c
LAB_0013c773:
PUSH -0x1
POP RAX
JMP 0x0013c5fd
LAB_0013c77b:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RAX + 0x18]
MOV RDX,qword ptr [RCX + 0xf0]
MOV RAX,qword ptr [RCX + 0xf8]
AND dword ptr [RCX + 0xf0],0x0
MOV qword ptr [RCX + 0xf8],0x4
MOV RBX,qword ptr [RBP + -0x38]
JMP 0x0013c5a5
LAB_0013c7ac:
MOV RCX,qword ptr [RBX + 0xf8]
MOV RAX,qword ptr [RBX + 0x100]
CMP EAX,-0x9
JC 0x0013c7c1
INC dword ptr [RCX]
LAB_0013c7c1:
MOV RBX,qword ptr [RBP + -0x38]
JMP 0x0013c5e2
LAB_0013c7ca:
CMP byte ptr [R15 + 0x80],0x0
MOV RBX,qword ptr [RBP + -0x38]
MOV R12,qword ptr [RBP + -0x40]
JZ 0x0013c812
MOV dword ptr [R15 + 0xac],0x1
MOV RDI,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RDI + 0x18]
MOV RCX,qword ptr [RAX + 0x158]
LEA RDX,[RCX + 0x1]
MOV qword ptr [RAX + 0x158],RDX
MOV qword ptr [R15 + 0xb0],RCX
MOV RSI,R15
CALL 0x0013c873
JMP 0x0013c82c
LAB_0013c812:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,R15
MOV RDX,RBX
CALL 0x0013c994
TEST EAX,EAX
PUSH -0x1
POP RAX
JS 0x0013c5fd
LAB_0013c82c:
MOV EAX,dword ptr [R15 + 0x84]
CMP EAX,dword ptr [R15 + 0x88]
JNZ 0x0013c5f0
LAB_0013c840:
MOV RAX,qword ptr [R12]
MOV RCX,qword ptr [RAX + 0x90]
MOV qword ptr [R12],RCX
CMP dword ptr [RAX + 0xac],0x0
SETZ CL
OR CL,0x4
MOV byte ptr [RAX + 0x83],CL
MOV qword ptr [RAX + 0xb8],R15
CMP RAX,R15
JNZ 0x0013c840
JMP 0x0013c5f0
|
ulong js_inner_module_evaluation
(long param_1,long param_2,uint param_3,long *param_4,int8 *param_5)
{
int iVar1;
int8 uVar2;
int *piVar3;
int8 uVar4;
long lVar5;
uint uVar6;
long lVar7;
long lVar8;
if (&stack0xfffffffffffffff8 < *(int1 **)(*(long *)(param_1 + 0x18) + 0xe8)) {
JS_ThrowStackOverflow(param_1);
lVar7 = *(long *)(param_1 + 0x18);
uVar4 = *(int8 *)(lVar7 + 0xf0);
uVar2 = *(int8 *)(lVar7 + 0xf8);
*(int4 *)(lVar7 + 0xf0) = 0;
*(int8 *)(lVar7 + 0xf8) = 4;
LAB_0013c5a5:
*param_5 = uVar4;
LAB_0013c5e5:
param_3 = 0xffffffff;
}
else {
uVar6 = *(uint *)(param_2 + 0x80) >> 0x18;
if (uVar6 - 4 < 2) {
if (*(char *)(param_2 + 0xf0) != '\0') {
piVar3 = *(int **)(param_2 + 0xf8);
uVar2 = *(int8 *)(param_2 + 0x100);
if (0xfffffff6 < (uint)uVar2) {
*piVar3 = *piVar3 + 1;
}
LAB_0013c5e2:
*param_5 = piVar3;
goto LAB_0013c5e5;
}
}
else if (uVar6 != 3) {
*(uint *)(param_2 + 0x80) = *(uint *)(param_2 + 0x80) & 0xffffff | 0x3000000;
*(uint *)(param_2 + 0x84) = param_3;
*(uint *)(param_2 + 0x88) = param_3;
*(int4 *)(param_2 + 0xa8) = 0;
param_3 = param_3 + 1;
*(long *)(param_2 + 0x90) = *param_4;
*param_4 = param_2;
lVar7 = 8;
for (lVar8 = 0; lVar8 < *(int *)(param_2 + 0x20); lVar8 = lVar8 + 1) {
lVar5 = *(long *)(*(long *)(param_2 + 0x18) + lVar7);
param_3 = js_inner_module_evaluation(param_1,lVar5,param_3,param_4,param_5);
if ((int)param_3 < 0) {
return 0xffffffffffffffff;
}
if (*(char *)(lVar5 + 0x83) == '\x03') {
iVar1 = *(int *)(lVar5 + 0x88);
if (*(int *)(param_2 + 0x88) < *(int *)(lVar5 + 0x88)) {
iVar1 = *(int *)(param_2 + 0x88);
}
*(int *)(param_2 + 0x88) = iVar1;
}
else {
lVar5 = *(long *)(lVar5 + 0xb8);
if (*(char *)(lVar5 + 0xf0) != '\0') {
piVar3 = *(int **)(lVar5 + 0xf8);
uVar2 = *(int8 *)(lVar5 + 0x100);
if (0xfffffff6 < (uint)uVar2) {
*piVar3 = *piVar3 + 1;
}
goto LAB_0013c5e2;
}
}
if (*(int *)(lVar5 + 0xac) != 0) {
*(int *)(param_2 + 0xa8) = *(int *)(param_2 + 0xa8) + 1;
iVar1 = js_resize_array(param_1,lVar5 + 0x98,8,lVar5 + 0xa4,*(int *)(lVar5 + 0xa0) + 1);
if (iVar1 != 0) {
lVar7 = *(long *)(param_1 + 0x18);
uVar4 = *(int8 *)(lVar7 + 0xf0);
uVar2 = *(int8 *)(lVar7 + 0xf8);
*(int4 *)(lVar7 + 0xf0) = 0;
*(int8 *)(lVar7 + 0xf8) = 4;
goto LAB_0013c5a5;
}
iVar1 = *(int *)(lVar5 + 0xa0);
*(int *)(lVar5 + 0xa0) = iVar1 + 1;
*(long *)(*(long *)(lVar5 + 0x98) + (long)iVar1 * 8) = param_2;
}
lVar7 = lVar7 + 0x10;
}
if (*(int *)(param_2 + 0xa8) < 1) {
if (*(char *)(param_2 + 0x80) == '\0') {
iVar1 = js_execute_sync_module(param_1,param_2,param_5);
if (iVar1 < 0) {
return 0xffffffffffffffff;
}
}
else {
*(int4 *)(param_2 + 0xac) = 1;
lVar7 = *(long *)(*(long *)(param_1 + 0x18) + 0x158);
*(long *)(*(long *)(param_1 + 0x18) + 0x158) = lVar7 + 1;
*(long *)(param_2 + 0xb0) = lVar7;
js_execute_async_module(param_1,param_2);
}
}
else {
*(int4 *)(param_2 + 0xac) = 1;
lVar7 = *(long *)(*(long *)(param_1 + 0x18) + 0x158);
*(long *)(*(long *)(param_1 + 0x18) + 0x158) = lVar7 + 1;
*(long *)(param_2 + 0xb0) = lVar7;
}
if (*(int *)(param_2 + 0x84) == *(int *)(param_2 + 0x88)) {
do {
lVar7 = *param_4;
*param_4 = *(long *)(lVar7 + 0x90);
*(byte *)(lVar7 + 0x83) = *(int *)(lVar7 + 0xac) == 0 | 4;
*(long *)(lVar7 + 0xb8) = param_2;
} while (lVar7 != param_2);
}
}
*(int4 *)param_5 = 0;
uVar2 = 3;
}
param_5[1] = uVar2;
return (ulong)param_3;
}
|
|
6,582 | mi_search_last | eloqsql/storage/myisam/mi_search.c | int _mi_search_last(register MI_INFO *info, register MI_KEYDEF *keyinfo,
register my_off_t pos)
{
uint nod_flag;
uchar *buff,*page;
DBUG_ENTER("_mi_search_last");
if (pos == HA_OFFSET_ERROR)
{
my_errno=HA_ERR_KEY_NOT_FOUND; /* Didn't find key */
info->lastpos= HA_OFFSET_ERROR;
DBUG_RETURN(-1);
}
buff=info->buff;
do
{
if (!_mi_fetch_keypage(info,keyinfo,pos,DFLT_INIT_HITS,buff,0))
{
info->lastpos= HA_OFFSET_ERROR;
DBUG_RETURN(-1);
}
page= buff+mi_getint(buff);
nod_flag=mi_test_if_nod(buff);
} while ((pos=_mi_kpos(nod_flag,page)) != HA_OFFSET_ERROR);
if (!_mi_get_last_key(info,keyinfo,buff,info->lastkey,page,
&info->lastkey_length))
DBUG_RETURN(-1);
info->lastpos=_mi_dpos(info,0,info->lastkey+info->lastkey_length);
info->int_keypos=info->int_maxpos=page;
info->int_nod_flag=nod_flag;
info->int_keytree_version=keyinfo->version;
info->last_search_keypage=info->last_keypage;
info->page_changed=info->buff_used=0;
DBUG_PRINT("exit",("found key at %lu",(ulong) info->lastpos));
DBUG_RETURN(0);
} | O0 | c | mi_search_last:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $-0x1, -0x20(%rbp)
jne 0xc2491
callq 0xf6250
movl $0x78, (%rax)
movq -0x10(%rbp), %rax
movq $-0x1, 0x170(%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xc2637
movq -0x10(%rbp), %rax
movq 0x100(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x30(%rbp), %r8
movl $0x3, %ecx
xorl %r9d, %r9d
callq 0xbdf60
cmpq $0x0, %rax
jne 0xc24de
movq -0x10(%rbp), %rax
movq $-0x1, 0x170(%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xc2637
movq -0x30(%rbp), %rax
movq -0x30(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
movq -0x30(%rbp), %rdx
movzbl (%rdx), %edx
movzwl %dx, %edx
shll $0x8, %edx
orl %edx, %ecx
movzwl %cx, %ecx
andl $0x7fff, %ecx # imm = 0x7FFF
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0xc2531
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x17c(%rax), %eax
movl %eax, -0x3c(%rbp)
jmp 0xc2538
xorl %eax, %eax
movl %eax, -0x3c(%rbp)
jmp 0xc2538
movl -0x3c(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %edi
movq -0x38(%rbp), %rsi
callq 0xbeed0
movq %rax, -0x20(%rbp)
cmpq $-0x1, %rax
jne 0xc24a0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rcx
movq -0x38(%rbp), %r8
movq -0x10(%rbp), %r9
addq $0x1d8, %r9 # imm = 0x1D8
callq 0xc18f0
cmpq $0x0, %rax
jne 0xc2597
jmp 0xc258b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xc2637
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rdx
movq -0x10(%rbp), %rax
movl 0x1d8(%rax), %eax
addq %rax, %rdx
xorl %esi, %esi
callq 0xbf150
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x170(%rax)
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x130(%rax)
movq -0x10(%rbp), %rax
movq %rcx, 0x128(%rax)
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x138(%rax)
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x13c(%rax)
movq -0x10(%rbp), %rax
movq 0x190(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x198(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x33d(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x33c(%rax)
jmp 0xc262e
jmp 0xc2630
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
| _mi_search_last:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
cmp [rbp+var_20], 0FFFFFFFFFFFFFFFFh
jnz short loc_C2491
call _my_thread_var
mov dword ptr [rax], 78h ; 'x'
mov rax, [rbp+var_10]
mov qword ptr [rax+170h], 0FFFFFFFFFFFFFFFFh
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_C2637
loc_C2491:
mov rax, [rbp+var_10]
mov rax, [rax+100h]
mov [rbp+var_30], rax
loc_C24A0:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov r8, [rbp+var_30]
mov ecx, 3
xor r9d, r9d
call _mi_fetch_keypage
cmp rax, 0
jnz short loc_C24DE
mov rax, [rbp+var_10]
mov qword ptr [rax+170h], 0FFFFFFFFFFFFFFFFh
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_C2637
loc_C24DE:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_30]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
mov rdx, [rbp+var_30]
movzx edx, byte ptr [rdx]
movzx edx, dx
shl edx, 8
or ecx, edx
movzx ecx, cx
and ecx, 7FFFh
mov ecx, ecx
add rax, rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_30]
movzx eax, byte ptr [rax]
and eax, 80h
cmp eax, 0
jz short loc_C2531
mov rax, [rbp+var_10]
mov rax, [rax]
mov eax, [rax+17Ch]
mov [rbp+var_3C], eax
jmp short loc_C2538
loc_C2531:
xor eax, eax
mov [rbp+var_3C], eax
jmp short $+2
loc_C2538:
mov eax, [rbp+var_3C]
mov [rbp+var_24], eax
mov edi, [rbp+var_24]
mov rsi, [rbp+var_38]
call _mi_kpos
mov [rbp+var_20], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz loc_C24A0
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_30]
mov rax, [rbp+var_10]
mov rcx, [rax+108h]
mov r8, [rbp+var_38]
mov r9, [rbp+var_10]
add r9, 1D8h
call _mi_get_last_key
cmp rax, 0
jnz short loc_C2597
jmp short $+2
loc_C258B:
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_C2637
loc_C2597:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_10]
mov rdx, [rax+108h]
mov rax, [rbp+var_10]
mov eax, [rax+1D8h]
add rdx, rax
xor esi, esi
call _mi_dpos
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+170h], rcx
mov rcx, [rbp+var_38]
mov rax, [rbp+var_10]
mov [rax+130h], rcx
mov rax, [rbp+var_10]
mov [rax+128h], rcx
mov ecx, [rbp+var_24]
mov rax, [rbp+var_10]
mov [rax+138h], ecx
mov rax, [rbp+var_18]
mov ecx, [rax+1Ch]
mov rax, [rbp+var_10]
mov [rax+13Ch], ecx
mov rax, [rbp+var_10]
mov rcx, [rax+190h]
mov rax, [rbp+var_10]
mov [rax+198h], rcx
mov rax, [rbp+var_10]
mov byte ptr [rax+33Dh], 0
mov rax, [rbp+var_10]
mov byte ptr [rax+33Ch], 0
jmp short $+2
loc_C262E:
jmp short $+2
loc_C2630:
mov [rbp+var_4], 0
loc_C2637:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long mi_search_last(long long a1, long long a2, long long a3)
{
unsigned int v4; // [rsp+4h] [rbp-3Ch]
unsigned long long v5; // [rsp+8h] [rbp-38h]
unsigned __int16 *v6; // [rsp+10h] [rbp-30h]
long long v7; // [rsp+20h] [rbp-20h]
v7 = a3;
if ( a3 == -1 )
{
*(_DWORD *)my_thread_var(a1, (const char *)a2) = 120;
*(_QWORD *)(a1 + 368) = -1LL;
return (unsigned int)-1;
}
else
{
v6 = *(unsigned __int16 **)(a1 + 256);
do
{
if ( !mi_fetch_keypage((_QWORD *)a1, a2, v7, 3, (int)v6, 0) )
{
*(_QWORD *)(a1 + 368) = -1LL;
return (unsigned int)-1;
}
v5 = (unsigned long long)v6 + (_byteswap_ushort(*v6) & 0x7FFF);
if ( (*(_BYTE *)v6 & 0x80) != 0 )
v4 = *(_DWORD *)(*(_QWORD *)a1 + 380LL);
else
v4 = 0;
v7 = mi_kpos(v4, v5);
}
while ( v7 != -1 );
if ( mi_get_last_key(a1, a2, v6, *(_BYTE **)(a1 + 264), v5, (_DWORD *)(a1 + 472)) )
{
*(_QWORD *)(a1 + 368) = mi_dpos(a1, 0, *(unsigned int *)(a1 + 472) + *(_QWORD *)(a1 + 264));
*(_QWORD *)(a1 + 304) = v5;
*(_QWORD *)(a1 + 296) = v5;
*(_DWORD *)(a1 + 312) = v4;
*(_DWORD *)(a1 + 316) = *(_DWORD *)(a2 + 28);
*(_QWORD *)(a1 + 408) = *(_QWORD *)(a1 + 400);
*(_BYTE *)(a1 + 829) = 0;
*(_BYTE *)(a1 + 828) = 0;
return 0;
}
else
{
return (unsigned int)-1;
}
}
}
| _mi_search_last:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
CMP qword ptr [RBP + -0x20],-0x1
JNZ 0x001c2491
CALL 0x001f6250
MOV dword ptr [RAX],0x78
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x170],-0x1
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001c2637
LAB_001c2491:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x100]
MOV qword ptr [RBP + -0x30],RAX
LAB_001c24a0:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV R8,qword ptr [RBP + -0x30]
MOV ECX,0x3
XOR R9D,R9D
CALL 0x001bdf60
CMP RAX,0x0
JNZ 0x001c24de
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x170],-0x1
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001c2637
LAB_001c24de:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x30]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
MOV RDX,qword ptr [RBP + -0x30]
MOVZX EDX,byte ptr [RDX]
MOVZX EDX,DX
SHL EDX,0x8
OR ECX,EDX
MOVZX ECX,CX
AND ECX,0x7fff
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,byte ptr [RAX]
AND EAX,0x80
CMP EAX,0x0
JZ 0x001c2531
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x17c]
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x001c2538
LAB_001c2531:
XOR EAX,EAX
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x001c2538
LAB_001c2538:
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x24],EAX
MOV EDI,dword ptr [RBP + -0x24]
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x001beed0
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,-0x1
JNZ 0x001c24a0
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x108]
MOV R8,qword ptr [RBP + -0x38]
MOV R9,qword ptr [RBP + -0x10]
ADD R9,0x1d8
CALL 0x001c18f0
CMP RAX,0x0
JNZ 0x001c2597
JMP 0x001c258b
LAB_001c258b:
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001c2637
LAB_001c2597:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x108]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x1d8]
ADD RDX,RAX
XOR ESI,ESI
CALL 0x001bf150
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x170],RCX
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x130],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x128],RCX
MOV ECX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x138],ECX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RAX + 0x1c]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x13c],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x190]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x198],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x33d],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x33c],0x0
JMP 0x001c262e
LAB_001c262e:
JMP 0x001c2630
LAB_001c2630:
MOV dword ptr [RBP + -0x4],0x0
LAB_001c2637:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int4 _mi_search_last(long *param_1,long param_2,long param_3)
{
byte *pbVar1;
int4 *puVar2;
long lVar3;
byte *pbVar4;
int4 local_44;
long local_28;
int4 local_c;
if (param_3 == -1) {
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x78;
param_1[0x2e] = -1;
local_c = 0xffffffff;
}
else {
pbVar1 = (byte *)param_1[0x20];
local_28 = param_3;
do {
lVar3 = _mi_fetch_keypage(param_1,param_2,local_28,3,pbVar1,0);
if (lVar3 == 0) {
param_1[0x2e] = -1;
return 0xffffffff;
}
pbVar4 = pbVar1 + ((uint)pbVar1[1] | (*pbVar1 & 0x7f) << 8);
if ((*pbVar1 & 0x80) == 0) {
local_44 = 0;
}
else {
local_44 = *(int4 *)(*param_1 + 0x17c);
}
local_28 = _mi_kpos(local_44,pbVar4);
} while (local_28 != -1);
lVar3 = _mi_get_last_key(param_1,param_2,pbVar1,param_1[0x21],pbVar4,param_1 + 0x3b);
if (lVar3 == 0) {
local_c = 0xffffffff;
}
else {
lVar3 = _mi_dpos(param_1,0,param_1[0x21] + (ulong)*(uint *)(param_1 + 0x3b));
param_1[0x2e] = lVar3;
param_1[0x26] = (long)pbVar4;
param_1[0x25] = (long)pbVar4;
*(int4 *)(param_1 + 0x27) = local_44;
*(int4 *)((long)param_1 + 0x13c) = *(int4 *)(param_2 + 0x1c);
param_1[0x33] = param_1[0x32];
*(int1 *)((long)param_1 + 0x33d) = 0;
*(int1 *)((long)param_1 + 0x33c) = 0;
local_c = 0;
}
}
return local_c;
}
|
|
6,583 | my_filename | eloqsql/mysys/my_div.c | char * my_filename(File fd)
{
DBUG_ENTER("my_filename");
if ((uint) fd >= (uint) my_file_limit || !my_file_info[fd].name)
DBUG_RETURN((char*) "UNKNOWN");
if (fd >= 0 && my_file_info[fd].type != UNOPEN)
{
DBUG_RETURN(my_file_info[fd].name);
}
else
DBUG_RETURN((char*) "UNOPENED"); /* Debug message */
} | O0 | c | my_filename:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
leaq 0x30df4f(%rip), %rcx # 0x38cf30
cmpl (%rcx), %eax
jae 0x7f000
leaq 0x30df4c(%rip), %rax # 0x38cf38
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
jne 0x7f00f
jmp 0x7f002
leaq 0x533b(%rip), %rax # 0x84344
movq %rax, -0x8(%rbp)
jmp 0x7f05d
cmpl $0x0, -0xc(%rbp)
jl 0x7f050
leaq 0x30df1c(%rip), %rax # 0x38cf38
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
je 0x7f050
jmp 0x7f032
leaq 0x30deff(%rip), %rax # 0x38cf38
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x7f05d
jmp 0x7f052
leaq 0x52f3(%rip), %rax # 0x8434c
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| my_filename:
push rbp
mov rbp, rsp
mov [rbp+var_C], edi
mov eax, [rbp+var_C]
lea rcx, my_file_limit
cmp eax, [rcx]
jnb short loc_7F000
lea rax, my_file_info
mov rax, [rax]
movsxd rcx, [rbp+var_C]
shl rcx, 4
add rax, rcx
cmp qword ptr [rax], 0
jnz short loc_7F00F
loc_7F000:
jmp short $+2
loc_7F002:
lea rax, aUnknown_0; "UNKNOWN"
mov [rbp+var_8], rax
jmp short loc_7F05D
loc_7F00F:
cmp [rbp+var_C], 0
jl short loc_7F050
lea rax, my_file_info
mov rax, [rax]
movsxd rcx, [rbp+var_C]
shl rcx, 4
add rax, rcx
cmp dword ptr [rax+8], 0
jz short loc_7F050
jmp short $+2
loc_7F032:
lea rax, my_file_info
mov rax, [rax]
movsxd rcx, [rbp+var_C]
shl rcx, 4
add rax, rcx
mov rax, [rax]
mov [rbp+var_8], rax
jmp short loc_7F05D
loc_7F050:
jmp short $+2
loc_7F052:
lea rax, aUnopened; "UNOPENED"
mov [rbp+var_8], rax
loc_7F05D:
mov rax, [rbp+var_8]
pop rbp
retn
| const char * my_filename(int a1)
{
if ( (unsigned int)a1 >= my_file_limit || !*((_QWORD *)my_file_info + 2 * a1) )
return "UNKNOWN";
if ( a1 >= 0 && *((_DWORD *)my_file_info + 4 * a1 + 2) )
return (const char *)*((_QWORD *)my_file_info + 2 * a1);
return "UNOPENED";
}
| my_filename:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0xc],EDI
MOV EAX,dword ptr [RBP + -0xc]
LEA RCX,[0x48cf30]
CMP EAX,dword ptr [RCX]
JNC 0x0017f000
LEA RAX,[0x48cf38]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0xc]
SHL RCX,0x4
ADD RAX,RCX
CMP qword ptr [RAX],0x0
JNZ 0x0017f00f
LAB_0017f000:
JMP 0x0017f002
LAB_0017f002:
LEA RAX,[0x184344]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0017f05d
LAB_0017f00f:
CMP dword ptr [RBP + -0xc],0x0
JL 0x0017f050
LEA RAX,[0x48cf38]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0xc]
SHL RCX,0x4
ADD RAX,RCX
CMP dword ptr [RAX + 0x8],0x0
JZ 0x0017f050
JMP 0x0017f032
LAB_0017f032:
LEA RAX,[0x48cf38]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0xc]
SHL RCX,0x4
ADD RAX,RCX
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0017f05d
LAB_0017f050:
JMP 0x0017f052
LAB_0017f052:
LEA RAX,[0x18434c]
MOV qword ptr [RBP + -0x8],RAX
LAB_0017f05d:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
char * my_filename(uint param_1)
{
char *local_10;
if ((param_1 < my_file_limit) && (*(long *)(my_file_info + (long)(int)param_1 * 0x10) != 0)) {
if (((int)param_1 < 0) || (*(int *)(my_file_info + (long)(int)param_1 * 0x10 + 8) == 0)) {
local_10 = "UNOPENED";
}
else {
local_10 = *(char **)(my_file_info + (long)(int)param_1 * 0x10);
}
}
else {
local_10 = "UNKNOWN";
}
return local_10;
}
|
|
6,584 | fmt::v10::appender fmt::v10::detail::fill_n<fmt::v10::appender, int, char>(fmt::v10::appender, int, char const&) | aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h | FMT_CONSTEXPR auto fill_n(OutputIt out, Size count, const T& value)
-> OutputIt {
for (Size i = 0; i < count; ++i) *out++ = value;
return out;
} | O3 | c | fmt::v10::appender fmt::v10::detail::fill_n<fmt::v10::appender, int, char>(fmt::v10::appender, int, char const&):
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
testl %esi, %esi
jle 0x39373
movq %rdx, %rbx
movl %esi, %ebp
movq 0x10(%r14), %rax
leaq 0x1(%rax), %rsi
cmpq %rsi, 0x18(%r14)
jae 0x39362
movq (%r14), %rax
movq %r14, %rdi
callq *(%rax)
movq 0x10(%r14), %rax
leaq 0x1(%rax), %rsi
movb (%rbx), %cl
movq 0x8(%r14), %rdx
movq %rsi, 0x10(%r14)
movb %cl, (%rdx,%rax)
decl %ebp
jne 0x39344
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
| _ZN3fmt3v106detail6fill_nINS0_8appenderEicEET_S4_T0_RKT1_:
push rbp
push r14
push rbx
mov r14, rdi
test esi, esi
jle short loc_39373
mov rbx, rdx
mov ebp, esi
loc_39344:
mov rax, [r14+10h]
lea rsi, [rax+1]
cmp [r14+18h], rsi
jnb short loc_39362
mov rax, [r14]
mov rdi, r14
call qword ptr [rax]
mov rax, [r14+10h]
lea rsi, [rax+1]
loc_39362:
mov cl, [rbx]
mov rdx, [r14+8]
mov [r14+10h], rsi
mov [rdx+rax], cl
dec ebp
jnz short loc_39344
loc_39373:
mov rax, r14
pop rbx
pop r14
pop rbp
retn
| long long fmt::v10::detail::fill_n<fmt::v10::appender,int,char>(long long a1, int a2, char *a3)
{
int v4; // ebp
long long v5; // rax
long long v6; // rsi
char v7; // cl
long long v8; // rdx
if ( a2 > 0 )
{
v4 = a2;
do
{
v5 = *(_QWORD *)(a1 + 16);
v6 = v5 + 1;
if ( *(_QWORD *)(a1 + 24) < (unsigned long long)(v5 + 1) )
{
(**(void ( ***)(long long))a1)(a1);
v5 = *(_QWORD *)(a1 + 16);
v6 = v5 + 1;
}
v7 = *a3;
v8 = *(_QWORD *)(a1 + 8);
*(_QWORD *)(a1 + 16) = v6;
*(_BYTE *)(v8 + v5) = v7;
--v4;
}
while ( v4 );
}
return a1;
}
| fill_n<fmt::v10::appender,int,char>:
PUSH RBP
PUSH R14
PUSH RBX
MOV R14,RDI
TEST ESI,ESI
JLE 0x00139373
MOV RBX,RDX
MOV EBP,ESI
LAB_00139344:
MOV RAX,qword ptr [R14 + 0x10]
LEA RSI,[RAX + 0x1]
CMP qword ptr [R14 + 0x18],RSI
JNC 0x00139362
MOV RAX,qword ptr [R14]
MOV RDI,R14
CALL qword ptr [RAX]
MOV RAX,qword ptr [R14 + 0x10]
LEA RSI,[RAX + 0x1]
LAB_00139362:
MOV CL,byte ptr [RBX]
MOV RDX,qword ptr [R14 + 0x8]
MOV qword ptr [R14 + 0x10],RSI
MOV byte ptr [RDX + RAX*0x1],CL
DEC EBP
JNZ 0x00139344
LAB_00139373:
MOV RAX,R14
POP RBX
POP R14
POP RBP
RET
|
/* fmt::v10::appender fmt::v10::detail::fill_n<fmt::v10::appender, int, char>(fmt::v10::appender,
int, char const&) */
int8 *
fmt::v10::detail::fill_n<fmt::v10::appender,int,char>
(int8 *param_1,int param_2,int1 *param_3)
{
int1 uVar1;
long lVar2;
ulong uVar3;
if (0 < param_2) {
do {
lVar2 = param_1[2];
uVar3 = lVar2 + 1;
if ((ulong)param_1[3] < uVar3) {
(**(code **)*param_1)(param_1);
lVar2 = param_1[2];
uVar3 = lVar2 + 1;
}
uVar1 = *param_3;
param_1[2] = uVar3;
*(int1 *)(param_1[1] + lVar2) = uVar1;
param_2 = param_2 + -1;
} while (param_2 != 0);
}
return param_1;
}
|
|
6,585 | JS_IsInstanceOf | bluesky950520[P]quickjs/quickjs.c | int JS_IsInstanceOf(JSContext *ctx, JSValue val, JSValue obj)
{
JSValue method;
if (!JS_IsObject(obj))
goto fail;
method = JS_GetProperty(ctx, obj, JS_ATOM_Symbol_hasInstance);
if (JS_IsException(method))
return -1;
if (!JS_IsNull(method) && !JS_IsUndefined(method)) {
JSValue ret;
ret = JS_CallFree(ctx, method, obj, 1, &val);
return JS_ToBoolFree(ctx, ret);
}
/* legacy case */
if (!JS_IsFunction(ctx, obj)) {
fail:
JS_ThrowTypeError(ctx, "invalid 'instanceof' right operand");
return -1;
}
return JS_OrdinaryIsInstanceOf(ctx, val, obj);
} | O2 | c | JS_IsInstanceOf:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r14
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
pushq $-0x1
popq %rbp
cmpl $-0x1, %r14d
jne 0x1cd3a
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rbx, %rdi
movq %rcx, %rsi
movq %r14, %rdx
movl $0xdc, %ecx
callq 0x1b043
leal -0x2(%rdx), %ecx
cmpl $0x2, %ecx
jae 0x1cd5c
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1ce7d
testl %eax, %eax
je 0x1cd3a
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r8
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1ceba
leaq 0x68e9d(%rip), %rsi # 0x85bde
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1c64d
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x6, %edx
je 0x1cd4b
leaq 0x8(%rsp), %rcx
movq %rcx, (%rsp)
pushq $0x1
popq %r9
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rcx
movq %r14, %r8
callq 0x1cd8e
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1cdfa
movl %eax, %ebp
jmp 0x1cd4b
| JS_IsInstanceOf:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, r8
mov rbx, rdi
mov [rsp+48h+var_40], rsi
mov [rsp+48h+var_38], rdx
push 0FFFFFFFFFFFFFFFFh
pop rbp
cmp r14d, 0FFFFFFFFh
jnz short loc_1CD3A
mov r15, rcx
mov r12, rdx
mov r13, rsi
mov rdi, rbx
mov rsi, rcx
mov rdx, r14
mov ecx, 0DCh
call JS_GetProperty
lea ecx, [rdx-2]
cmp ecx, 2
jnb short loc_1CD5C
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call JS_IsFunction
test eax, eax
jz short loc_1CD3A
mov rdi, rbx
mov rsi, r13
mov rdx, r12
mov rcx, r15
mov r8, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp JS_OrdinaryIsInstanceOf
loc_1CD3A:
lea rsi, aInvalidInstanc; "invalid 'instanceof' right operand"
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
loc_1CD4B:
mov eax, ebp
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_1CD5C:
cmp edx, 6
jz short loc_1CD4B
lea rcx, [rsp+48h+var_40]
mov [rsp+48h+var_48], rcx
push 1
pop r9
mov rdi, rbx
mov rsi, rax
mov rcx, r15
mov r8, r14
call JS_CallFree
mov rdi, rbx
mov rsi, rax
call JS_ToBoolFree
mov ebp, eax
jmp short loc_1CD4B
| long long JS_IsInstanceOf(
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)
{
unsigned int v15; // ebp
int Property; // eax
int v19; // edx
long long v21; // rax
char v22; // [rsp+0h] [rbp-48h]
_QWORD v23[8]; // [rsp+8h] [rbp-40h] BYREF
v23[0] = a2;
v23[1] = a3;
v15 = -1;
if ( (_DWORD)a5 == -1 )
{
Property = JS_GetProperty(a1, a4, -1, 220);
if ( (unsigned int)(v19 - 2) >= 2 )
{
if ( v19 != 6 )
{
v21 = JS_CallFree(a1, Property, v19, a4, a5, 1, (long long)v23);
return (unsigned int)JS_ToBoolFree(a1, v21);
}
return v15;
}
if ( (unsigned int)JS_IsFunction(a1, a4) )
return JS_OrdinaryIsInstanceOf(a1, a2, a3, a4, a5);
}
JS_ThrowTypeError(
a1,
(long long)"invalid 'instanceof' right operand",
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v22);
return v15;
}
| JS_IsInstanceOf:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,R8
MOV RBX,RDI
MOV qword ptr [RSP + 0x8],RSI
MOV qword ptr [RSP + 0x10],RDX
PUSH -0x1
POP RBP
CMP R14D,-0x1
JNZ 0x0011cd3a
MOV R15,RCX
MOV R12,RDX
MOV R13,RSI
MOV RDI,RBX
MOV RSI,RCX
MOV RDX,R14
MOV ECX,0xdc
CALL 0x0011b043
LEA ECX,[RDX + -0x2]
CMP ECX,0x2
JNC 0x0011cd5c
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL 0x0011ce7d
TEST EAX,EAX
JZ 0x0011cd3a
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R12
MOV RCX,R15
MOV R8,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0011ceba
LAB_0011cd3a:
LEA RSI,[0x185bde]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0011c64d
LAB_0011cd4b:
MOV EAX,EBP
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0011cd5c:
CMP EDX,0x6
JZ 0x0011cd4b
LEA RCX,[RSP + 0x8]
MOV qword ptr [RSP],RCX
PUSH 0x1
POP R9
MOV RDI,RBX
MOV RSI,RAX
MOV RCX,R15
MOV R8,R14
CALL 0x0011cd8e
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0011cdfa
MOV EBP,EAX
JMP 0x0011cd4b
|
ulong JS_IsInstanceOf(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5)
{
int iVar1;
uint uVar2;
ulong uVar3;
int8 uVar4;
int1 auVar5 [16];
int8 local_40;
int8 local_38;
uVar3 = 0xffffffffffffffff;
local_40 = param_2;
local_38 = param_3;
if ((int)param_5 == -1) {
auVar5 = JS_GetProperty(param_1,param_4,param_5,0xdc);
if (1 < auVar5._8_4_ - 2U) {
if (auVar5._8_4_ != 6) {
uVar4 = JS_CallFree(param_1,auVar5._0_8_,auVar5._8_8_,param_4,param_5,1,&local_40);
uVar2 = JS_ToBoolFree(param_1,uVar4);
uVar3 = (ulong)uVar2;
}
goto LAB_0011cd4b;
}
iVar1 = JS_IsFunction(param_1,param_4,param_5);
if (iVar1 != 0) {
uVar3 = JS_OrdinaryIsInstanceOf(param_1,param_2,param_3,param_4,param_5);
return uVar3;
}
}
JS_ThrowTypeError(param_1,"invalid \'instanceof\' right operand");
LAB_0011cd4b:
return uVar3 & 0xffffffff;
}
|
|
6,586 | my_strcasecmp_mb | eloqsql/strings/ctype-mb.c | int my_strcasecmp_mb(CHARSET_INFO * cs,const char *s, const char *t)
{
register uint32 l;
register const uchar *map=cs->to_upper;
while (*s && *t)
{
/* Pointing after the '\0' is safe here. */
if ((l=my_ismbchar(cs, s, s + cs->mbmaxlen)))
{
while (l--)
if (*s++ != *t++)
return 1;
}
else if (my_ci_charlen(cs, (const uchar *) t, (const uchar *) t + cs->mbmaxlen) > 1)
return 1;
else if (map[(uchar) *s++] != map[(uchar) *t++])
return 1;
}
/* At least one of '*s' and '*t' is zero here. */
return (*t != *s);
} | O0 | c | my_strcasecmp_mb:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x31(%rbp)
je 0x37c11
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x37c1d
jmp 0x37d03
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rax
movl 0x9c(%rax), %eax
addq %rax, %rdx
callq 0x37880
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
je 0x37c8d
jmp 0x37c45
movl -0x24(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x24(%rbp)
cmpl $0x0, %eax
je 0x37c8b
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movsbl (%rax), %eax
movq -0x20(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movsbl (%rcx), %ecx
cmpl %ecx, %eax
je 0x37c89
movl $0x1, -0x4(%rbp)
jmp 0x37d1e
jmp 0x37c45
jmp 0x37cfe
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rax
movl 0x9c(%rax), %eax
addq %rax, %rdx
callq 0x37d30
cmpl $0x1, %eax
jle 0x37cb9
movl $0x1, -0x4(%rbp)
jmp 0x37d1e
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movzbl (%rcx), %ecx
movzbl (%rax,%rcx), %eax
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rdx
movq %rdx, %rsi
addq $0x1, %rsi
movq %rsi, -0x20(%rbp)
movzbl (%rdx), %edx
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x37cfa
movl $0x1, -0x4(%rbp)
jmp 0x37d1e
jmp 0x37cfc
jmp 0x37cfe
jmp 0x37bf0
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
movq -0x18(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| my_strcasecmp_mb:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax+50h]
mov [rbp+var_30], rax
loc_37BF0:
mov rax, [rbp+var_18]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_31], al
jz short loc_37C11
mov rax, [rbp+var_20]
movsx eax, byte ptr [rax]
cmp eax, 0
setnz al
mov [rbp+var_31], al
loc_37C11:
mov al, [rbp+var_31]
test al, 1
jnz short loc_37C1D
jmp loc_37D03
loc_37C1D:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_18]
mov rax, [rbp+var_10]
mov eax, [rax+9Ch]
add rdx, rax
call my_ismbchar
mov [rbp+var_24], eax
cmp eax, 0
jz short loc_37C8D
jmp short $+2
loc_37C45:
mov eax, [rbp+var_24]
mov ecx, eax
add ecx, 0FFFFFFFFh
mov [rbp+var_24], ecx
cmp eax, 0
jz short loc_37C8B
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
movsx eax, byte ptr [rax]
mov rcx, [rbp+var_20]
mov rdx, rcx
add rdx, 1
mov [rbp+var_20], rdx
movsx ecx, byte ptr [rcx]
cmp eax, ecx
jz short loc_37C89
mov [rbp+var_4], 1
jmp loc_37D1E
loc_37C89:
jmp short loc_37C45
loc_37C8B:
jmp short loc_37CFE
loc_37C8D:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_20]
mov rax, [rbp+var_10]
mov eax, [rax+9Ch]
add rdx, rax
call my_ci_charlen_1
cmp eax, 1
jle short loc_37CB9
mov [rbp+var_4], 1
jmp short loc_37D1E
loc_37CB9:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_18]
mov rdx, rcx
add rdx, 1
mov [rbp+var_18], rdx
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx]
mov rcx, [rbp+var_30]
mov rdx, [rbp+var_20]
mov rsi, rdx
add rsi, 1
mov [rbp+var_20], rsi
movzx edx, byte ptr [rdx]
movzx ecx, byte ptr [rcx+rdx]
cmp eax, ecx
jz short loc_37CFA
mov [rbp+var_4], 1
jmp short loc_37D1E
loc_37CFA:
jmp short $+2
loc_37CFC:
jmp short $+2
loc_37CFE:
jmp loc_37BF0
loc_37D03:
mov rax, [rbp+var_20]
movsx eax, byte ptr [rax]
mov rcx, [rbp+var_18]
movsx ecx, byte ptr [rcx]
cmp eax, ecx
setnz al
and al, 1
movzx eax, al
mov [rbp+var_4], eax
loc_37D1E:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| _BOOL8 my_strcasecmp_mb(long long a1, unsigned __int8 *a2, unsigned __int8 *a3)
{
char *v4; // rax
char *v5; // rcx
unsigned __int8 *v6; // rcx
unsigned __int8 *v7; // rdx
bool v9; // [rsp+Fh] [rbp-31h]
long long v10; // [rsp+10h] [rbp-30h]
int v11; // [rsp+1Ch] [rbp-24h]
v10 = *(_QWORD *)(a1 + 80);
while ( 1 )
{
v9 = 0;
if ( *a2 )
v9 = *a3 != 0;
if ( !v9 )
break;
v11 = my_ismbchar(a1, (long long)a2, (long long)&a2[*(unsigned int *)(a1 + 156)]);
if ( v11 )
{
while ( v11-- )
{
v4 = (char *)a2++;
v5 = (char *)a3++;
if ( *v4 != *v5 )
return 1;
}
}
else
{
if ( (int)my_ci_charlen_1(a1, a3, &a3[*(unsigned int *)(a1 + 156)]) > 1 )
return 1;
v6 = a2++;
v7 = a3++;
if ( *(unsigned __int8 *)(v10 + *v6) != *(unsigned __int8 *)(v10 + *v7) )
return 1;
}
}
return *a3 != *a2;
}
| my_strcasecmp_mb:
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 RAX,qword ptr [RAX + 0x50]
MOV qword ptr [RBP + -0x30],RAX
LAB_00137bf0:
MOV RAX,qword ptr [RBP + -0x18]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x31],AL
JZ 0x00137c11
MOV RAX,qword ptr [RBP + -0x20]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x31],AL
LAB_00137c11:
MOV AL,byte ptr [RBP + -0x31]
TEST AL,0x1
JNZ 0x00137c1d
JMP 0x00137d03
LAB_00137c1d:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x9c]
ADD RDX,RAX
CALL 0x00137880
MOV dword ptr [RBP + -0x24],EAX
CMP EAX,0x0
JZ 0x00137c8d
JMP 0x00137c45
LAB_00137c45:
MOV EAX,dword ptr [RBP + -0x24]
MOV ECX,EAX
ADD ECX,-0x1
MOV dword ptr [RBP + -0x24],ECX
CMP EAX,0x0
JZ 0x00137c8b
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
MOVSX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x20]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOVSX ECX,byte ptr [RCX]
CMP EAX,ECX
JZ 0x00137c89
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00137d1e
LAB_00137c89:
JMP 0x00137c45
LAB_00137c8b:
JMP 0x00137cfe
LAB_00137c8d:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x9c]
ADD RDX,RAX
CALL 0x00137d30
CMP EAX,0x1
JLE 0x00137cb9
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00137d1e
LAB_00137cb9:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x18]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x18],RDX
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV RCX,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x20]
MOV RSI,RDX
ADD RSI,0x1
MOV qword ptr [RBP + -0x20],RSI
MOVZX EDX,byte ptr [RDX]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
CMP EAX,ECX
JZ 0x00137cfa
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00137d1e
LAB_00137cfa:
JMP 0x00137cfc
LAB_00137cfc:
JMP 0x00137cfe
LAB_00137cfe:
JMP 0x00137bf0
LAB_00137d03:
MOV RAX,qword ptr [RBP + -0x20]
MOVSX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x18]
MOVSX ECX,byte ptr [RCX]
CMP EAX,ECX
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x4],EAX
LAB_00137d1e:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
bool my_strcasecmp_mb(long param_1,byte *param_2,byte *param_3)
{
byte bVar1;
byte bVar2;
long lVar3;
int iVar4;
bool bVar5;
int local_2c;
byte *local_28;
byte *local_20;
lVar3 = *(long *)(param_1 + 0x50);
local_28 = param_3;
local_20 = param_2;
do {
while( true ) {
bVar5 = false;
if (*local_20 != 0) {
bVar5 = *local_28 != 0;
}
if (!bVar5) {
return *local_28 != *local_20;
}
local_2c = my_ismbchar(param_1,local_20,local_20 + *(uint *)(param_1 + 0x9c));
if (local_2c == 0) break;
while (local_2c != 0) {
bVar1 = *local_20;
bVar2 = *local_28;
local_2c = local_2c + -1;
local_28 = local_28 + 1;
local_20 = local_20 + 1;
if (bVar1 != bVar2) {
return true;
}
}
}
iVar4 = my_ci_charlen(param_1,local_28,local_28 + *(uint *)(param_1 + 0x9c));
if (1 < iVar4) {
return true;
}
bVar1 = *local_20;
bVar2 = *local_28;
local_28 = local_28 + 1;
local_20 = local_20 + 1;
} while (*(char *)(lVar3 + (ulong)bVar1) == *(char *)(lVar3 + (ulong)bVar2));
return true;
}
|
|
6,587 | ma_log_add | eloqsql/storage/maria/ma_key_recover.c | my_bool _ma_log_add(MARIA_PAGE *ma_page,
uint org_page_length __attribute__ ((unused)),
uchar *key_pos, uint changed_length, int move_length,
my_bool handle_overflow __attribute__ ((unused)),
enum en_key_debug debug_marker __attribute__((unused)))
{
LSN lsn;
uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE + 2 + 3 + 3 + 3 + 3 + 7 +
3 + 2];
uchar *log_pos;
uchar *buff= ma_page->buff;
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 6];
MARIA_HA *info= ma_page->info;
uint offset= (uint) (key_pos - buff);
uint max_page_size= info->s->max_index_block_size;
uint translog_parts, current_size;
pgcache_page_no_t page_pos= ma_page->pos / info->s->block_size;
DBUG_ENTER("_ma_log_add");
DBUG_PRINT("enter", ("page: %lu org_page_length: %u changed_length: %u "
"move_length: %d",
(ulong) page_pos, org_page_length, changed_length,
move_length));
DBUG_ASSERT(info->s->now_transactional);
DBUG_ASSERT(move_length <= (int) changed_length);
DBUG_ASSERT(ma_page->org_size == MY_MIN(org_page_length, max_page_size));
DBUG_ASSERT(ma_page->size == org_page_length + move_length);
DBUG_ASSERT(offset <= ma_page->org_size);
/*
Write REDO entry that contains the logical operations we need
to do the page
*/
log_pos= log_data + FILEID_STORE_SIZE;
page_store(log_pos, page_pos);
current_size= ma_page->org_size;
log_pos+= PAGE_STORE_SIZE;
#ifdef EXTRA_DEBUG_KEY_CHANGES
*log_pos++= KEY_OP_DEBUG;
*log_pos++= debug_marker;
#endif
/* Store keypage_flag */
*log_pos++= KEY_OP_SET_PAGEFLAG;
*log_pos++= _ma_get_keypage_flag(info->s, buff);
/*
Don't overwrite page boundary
It's ok to cut this as we will append the data at end of page
in the next log entry
*/
if (offset + changed_length > max_page_size)
{
DBUG_ASSERT(handle_overflow);
changed_length= max_page_size - offset; /* Update to end of page */
move_length= 0; /* Nothing to move */
/* Extend the page to max length on recovery */
*log_pos++= KEY_OP_MAX_PAGELENGTH;
current_size= max_page_size;
}
/* Check if adding the key made the page overflow */
if (current_size + move_length > max_page_size)
{
/*
Adding the key caused an overflow. Cut away the part of the
page that doesn't fit.
*/
uint diff;
DBUG_ASSERT(handle_overflow);
diff= current_size + move_length - max_page_size;
log_pos[0]= KEY_OP_DEL_SUFFIX;
int2store(log_pos+1, diff);
log_pos+= 3;
current_size= max_page_size - move_length;
}
if (offset == current_size)
{
log_pos[0]= KEY_OP_ADD_SUFFIX;
current_size+= changed_length;
}
else
{
log_pos[0]= KEY_OP_OFFSET;
int2store(log_pos+1, offset);
log_pos+= 3;
if (move_length)
{
if (move_length < 0)
{
DBUG_ASSERT(offset - move_length <= org_page_length);
if (offset - move_length > current_size)
{
/*
Truncate to end of page. We will add data to it from
the page buffer below
*/
move_length= (int) offset - (int) current_size;
}
}
log_pos[0]= KEY_OP_SHIFT;
int2store(log_pos+1, move_length);
log_pos+= 3;
current_size+= move_length;
}
/*
Handle case where page was shortend but 'changed_length' goes over
'current_size'. This can only happen when there was a page overflow
and we will below add back the overflow part
*/
if (offset + changed_length > current_size)
{
DBUG_ASSERT(offset + changed_length <= ma_page->size);
changed_length= current_size - offset;
}
log_pos[0]= KEY_OP_CHANGE;
}
int2store(log_pos+1, changed_length);
log_pos+= 3;
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= (uint) (log_pos -
log_data);
log_array[TRANSLOG_INTERNAL_PARTS + 1].str= key_pos;
log_array[TRANSLOG_INTERNAL_PARTS + 1].length= changed_length;
translog_parts= TRANSLOG_INTERNAL_PARTS + 2;
/*
If page was originally > block_size before operation and now all data
fits, append the end data that was not part of the previous logged
page to it.
*/
DBUG_ASSERT(current_size <= max_page_size && current_size <= ma_page->size);
if (current_size != ma_page->size && current_size != max_page_size)
{
uint length= MY_MIN(ma_page->size, max_page_size) - current_size;
uchar *data= ma_page->buff + current_size;
log_pos[0]= KEY_OP_ADD_SUFFIX;
int2store(log_pos+1, length);
log_array[translog_parts].str= log_pos;
log_array[translog_parts].length= 3;
log_array[translog_parts+1].str= data;
log_array[translog_parts+1].length= length;
log_pos+= 3;
translog_parts+= 2;
current_size+= length;
changed_length+= length + 3;
}
_ma_log_key_changes(ma_page, log_array + translog_parts,
log_pos, &changed_length, &translog_parts);
/*
Remember new page length for future log entries for same page
Note that this can be different from ma_page->size in case of page
overflow!
*/
ma_page->org_size= current_size;
DBUG_ASSERT(ma_page->org_size == MY_MIN(ma_page->size, max_page_size));
if (translog_write_record(&lsn, LOGREC_REDO_INDEX,
info->trn, info,
(translog_size_t)
log_array[TRANSLOG_INTERNAL_PARTS + 0].length +
changed_length, translog_parts,
log_array, log_data, NULL))
DBUG_RETURN(-1);
DBUG_RETURN(0);
} | O3 | c | ma_log_add:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movl %ecx, %esi
movq %rdx, %r9
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
movq 0x10(%rdi), %rbx
movq (%rdi), %rcx
movq 0x18(%rdi), %rax
movq %rdx, %r11
subq %rbx, %r11
movq (%rcx), %r14
movl 0x7bc(%r14), %r15d
movl 0x7c0(%r14), %r10d
xorl %edx, %edx
divq %r15
movl %eax, -0x4e(%rbp)
shrq $0x20, %rax
movb %al, -0x4a(%rbp)
movl 0x24(%rdi), %eax
movb $0xa, -0x49(%rbp)
movl 0x744(%r14), %edx
addl $-0x3, %edx
movb (%rbx,%rdx), %dl
movb %dl, -0x48(%rbp)
leal (%r11,%rsi), %edx
cmpl %r10d, %edx
jbe 0x5adff
movl %r10d, %esi
subl %r11d, %esi
leaq -0x46(%rbp), %rdx
movb $0xc, -0x1(%rdx)
movl %r10d, %eax
xorl %r8d, %r8d
jmp 0x5ae03
leaq -0x47(%rbp), %rdx
leal (%r8,%rax), %ebx
subl %r10d, %ebx
jbe 0x5ae1d
movb $0x7, (%rdx)
movw %bx, 0x1(%rdx)
addq $0x3, %rdx
movl %r10d, %eax
subl %r8d, %eax
movl %r11d, %ebx
subl %eax, %ebx
jne 0x5ae2d
movb $0x6, (%rdx)
leal (%rsi,%r11), %eax
jmp 0x5ae78
movb $0x1, (%rdx)
movw %r11w, 0x1(%rdx)
testl %r8d, %r8d
je 0x5ae60
movl %r11d, %r14d
subl %r8d, %r14d
cmpl %eax, %r14d
cmovbel %r8d, %ebx
testl %r8d, %r8d
cmovnsl %r8d, %ebx
movb $0x2, 0x3(%rdx)
movw %bx, 0x4(%rdx)
addq $0x6, %rdx
addl %eax, %ebx
movl %ebx, %eax
jmp 0x5ae64
addq $0x3, %rdx
leal (%rsi,%r11), %r8d
movl %eax, %ebx
subl %r11d, %ebx
cmpl %eax, %r8d
cmovbel %esi, %ebx
movb $0x3, (%rdx)
movl %ebx, %esi
movw %si, 0x1(%rdx)
leaq 0x3(%rdx), %rbx
leaq -0x50(%rbp), %r11
movq %r11, -0xc0(%rbp)
movl %ebx, %r8d
subl %r11d, %r8d
movq %r8, -0xb8(%rbp)
movq %r9, -0xb0(%rbp)
movl %esi, %r9d
movq %r9, -0xa8(%rbp)
movl 0x20(%rdi), %r14d
cmpl %r14d, %eax
sete %r9b
cmpl %r10d, %eax
sete %r15b
orb %r9b, %r15b
movl $0x4, %r9d
jne 0x5af17
cmpl %r10d, %r14d
cmovbl %r14d, %r10d
movl %r10d, %r8d
subl %eax, %r8d
movl %eax, %eax
addq 0x10(%rdi), %rax
movb $0x6, 0x3(%rdx)
movw %r8w, 0x4(%rdx)
movq %rbx, -0xa0(%rbp)
movq $0x3, -0x98(%rbp)
movq %rax, -0x90(%rbp)
movq %r8, -0x88(%rbp)
leal 0x3(%rsi,%r8), %esi
movl $0x6, %r9d
movq -0xb8(%rbp), %r8
movl %r10d, %eax
movl %eax, 0x24(%rdi)
movq 0x8(%rcx), %rdx
addl %esi, %r8d
subq $0x8, %rsp
leaq -0xe0(%rbp), %rax
leaq -0x58(%rbp), %rdi
movl $0xc, %esi
pushq $0x0
pushq %r11
pushq %rax
callq 0x2a8ac
addq $0x20, %rsp
movl %eax, %ecx
xorl %eax, %eax
negb %cl
sbbl %eax, %eax
movq %fs:0x28, %rcx
cmpq -0x20(%rbp), %rcx
jne 0x5af68
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
| _ma_log_add:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 0C8h
mov esi, ecx
mov r9, rdx
mov rax, fs:28h
mov [rbp+var_20], rax
mov rbx, [rdi+10h]
mov rcx, [rdi]
mov rax, [rdi+18h]
mov r11, rdx
sub r11, rbx
mov r14, [rcx]
mov r15d, [r14+7BCh]
mov r10d, [r14+7C0h]
xor edx, edx
div r15
mov [rbp+var_4E], eax
shr rax, 20h
mov [rbp+var_4A], al
mov eax, [rdi+24h]
mov [rbp+var_49], 0Ah
mov edx, [r14+744h]
add edx, 0FFFFFFFDh
mov dl, [rbx+rdx]
mov [rbp+var_48], dl
lea edx, [r11+rsi]
cmp edx, r10d
jbe short loc_5ADFF
mov esi, r10d
sub esi, r11d
lea rdx, [rbp+var_46]
mov byte ptr [rdx-1], 0Ch
mov eax, r10d
xor r8d, r8d
jmp short loc_5AE03
loc_5ADFF:
lea rdx, [rbp+var_47]
loc_5AE03:
lea ebx, [r8+rax]
sub ebx, r10d
jbe short loc_5AE1D
mov byte ptr [rdx], 7
mov [rdx+1], bx
add rdx, 3
mov eax, r10d
sub eax, r8d
loc_5AE1D:
mov ebx, r11d
sub ebx, eax
jnz short loc_5AE2D
mov byte ptr [rdx], 6
lea eax, [rsi+r11]
jmp short loc_5AE78
loc_5AE2D:
mov byte ptr [rdx], 1
mov [rdx+1], r11w
test r8d, r8d
jz short loc_5AE60
mov r14d, r11d
sub r14d, r8d
cmp r14d, eax
cmovbe ebx, r8d
test r8d, r8d
cmovns ebx, r8d
mov byte ptr [rdx+3], 2
mov [rdx+4], bx
add rdx, 6
add ebx, eax
mov eax, ebx
jmp short loc_5AE64
loc_5AE60:
add rdx, 3
loc_5AE64:
lea r8d, [rsi+r11]
mov ebx, eax
sub ebx, r11d
cmp r8d, eax
cmovbe ebx, esi
mov byte ptr [rdx], 3
mov esi, ebx
loc_5AE78:
mov [rdx+1], si
lea rbx, [rdx+3]
lea r11, [rbp+var_50]
mov [rbp+var_C0], r11
mov r8d, ebx
sub r8d, r11d
mov [rbp+var_B8], r8
mov [rbp+var_B0], r9
mov r9d, esi
mov [rbp+var_A8], r9
mov r14d, [rdi+20h]
cmp eax, r14d
setz r9b
cmp eax, r10d
setz r15b
or r15b, r9b
mov r9d, 4
jnz short loc_5AF17
cmp r14d, r10d
cmovb r10d, r14d
mov r8d, r10d
sub r8d, eax
mov eax, eax
add rax, [rdi+10h]
mov byte ptr [rdx+3], 6
mov [rdx+4], r8w
mov [rbp+var_A0], rbx
mov [rbp+var_98], 3
mov [rbp+var_90], rax
mov [rbp+var_88], r8
lea esi, [rsi+r8+3]
mov r9d, 6
mov r8, [rbp+var_B8]
mov eax, r10d
loc_5AF17:
mov [rdi+24h], eax
mov rdx, [rcx+8]
add r8d, esi
sub rsp, 8
lea rax, [rbp+var_E0]
lea rdi, [rbp+var_58]
mov esi, 0Ch
push 0
push r11
push rax
call translog_write_record
add rsp, 20h
mov ecx, eax
xor eax, eax
neg cl
sbb eax, eax
mov rcx, fs:28h
cmp rcx, [rbp+var_20]
jnz short loc_5AF68
add rsp, 0C8h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_5AF68:
call ___stack_chk_fail
| long long ma_log_add(long long a1, long long a2, long long a3, unsigned int a4, int a5)
{
long long v7; // rbx
_QWORD *v8; // rcx
int v9; // r11d
_DWORD *v10; // r14
unsigned int v11; // r10d
unsigned long long v12; // rax
unsigned int v13; // eax
char *v14; // rdx
int v15; // ebx
unsigned int v16; // ebx
unsigned int v17; // r8d
unsigned int v18; // r14d
int v19; // r9d
long long v20; // r8
long long v21; // rax
__int128 v23; // [rsp+0h] [rbp-E0h] BYREF
__int16 *v24; // [rsp+20h] [rbp-C0h]
long long v25; // [rsp+28h] [rbp-B8h]
long long v26; // [rsp+30h] [rbp-B0h]
long long v27; // [rsp+38h] [rbp-A8h]
char *v28; // [rsp+40h] [rbp-A0h]
long long v29; // [rsp+48h] [rbp-98h]
long long v30; // [rsp+50h] [rbp-90h]
long long v31; // [rsp+58h] [rbp-88h]
_BYTE v32[8]; // [rsp+88h] [rbp-58h] BYREF
__int16 v33; // [rsp+90h] [rbp-50h] BYREF
int v34; // [rsp+92h] [rbp-4Eh]
char v35; // [rsp+96h] [rbp-4Ah]
char v36; // [rsp+97h] [rbp-49h]
char v37; // [rsp+98h] [rbp-48h]
char v38; // [rsp+99h] [rbp-47h] BYREF
char v39; // [rsp+9Ah] [rbp-46h] BYREF
unsigned long long v40; // [rsp+C0h] [rbp-20h]
v40 = __readfsqword(0x28u);
v7 = *(_QWORD *)(a1 + 16);
v8 = *(_QWORD **)a1;
v9 = a3 - v7;
v10 = **(_DWORD ***)a1;
v11 = v10[496];
v12 = *(_QWORD *)(a1 + 24) / (unsigned long long)(unsigned int)v10[495];
v34 = v12;
v35 = BYTE4(v12);
v13 = *(_DWORD *)(a1 + 36);
v36 = 10;
v37 = *(_BYTE *)(v7 + (unsigned int)(v10[465] - 3));
if ( (_DWORD)a3 - (_DWORD)v7 + a4 <= v11 )
{
v14 = &v38;
}
else
{
a4 = v11 - v9;
v14 = &v39;
v38 = 12;
v13 = v11;
a5 = 0;
}
if ( a5 + v13 > v11 )
{
*v14 = 7;
*(_WORD *)(v14 + 1) = a5 + v13 - v11;
v14 += 3;
v13 = v11 - a5;
}
v15 = v9 - v13;
if ( v9 == v13 )
{
*v14 = 6;
v13 = a4 + v9;
}
else
{
*v14 = 1;
*(_WORD *)(v14 + 1) = v9;
if ( a5 )
{
if ( v9 - a5 <= v13 )
v15 = a5;
if ( a5 >= 0 )
v15 = a5;
v14[3] = 2;
*((_WORD *)v14 + 2) = v15;
v14 += 6;
v13 += v15;
}
else
{
v14 += 3;
}
v16 = v13 - v9;
if ( a4 + v9 <= v13 )
v16 = a4;
*v14 = 3;
a4 = v16;
}
*(_WORD *)(v14 + 1) = a4;
v24 = &v33;
v17 = (_DWORD)v14 + 3 - (unsigned int)&v33;
v25 = v17;
v26 = a3;
v27 = a4;
v18 = *(_DWORD *)(a1 + 32);
v19 = 4;
if ( v13 != v18 && v13 != v11 )
{
if ( v18 < v11 )
v11 = *(_DWORD *)(a1 + 32);
v20 = v11 - v13;
v21 = *(_QWORD *)(a1 + 16) + v13;
v14[3] = 6;
*((_WORD *)v14 + 2) = v20;
v28 = v14 + 3;
v29 = 3LL;
v30 = v21;
v31 = v20;
a4 += v20 + 3;
v19 = 6;
v17 = v25;
v13 = v11;
}
*(_DWORD *)(a1 + 36) = v13;
return (unsigned int)-((unsigned __int8)translog_write_record(
(unsigned long long)v32,
&byte_9[3],
v8[1],
v8,
a4 + v17,
v19,
&v23,
&v33,
0LL) != 0);
}
| _ma_log_add:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xc8
MOV ESI,ECX
MOV R9,RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RBX,qword ptr [RDI + 0x10]
MOV RCX,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x18]
MOV R11,RDX
SUB R11,RBX
MOV R14,qword ptr [RCX]
MOV R15D,dword ptr [R14 + 0x7bc]
MOV R10D,dword ptr [R14 + 0x7c0]
XOR EDX,EDX
DIV R15
MOV dword ptr [RBP + -0x4e],EAX
SHR RAX,0x20
MOV byte ptr [RBP + -0x4a],AL
MOV EAX,dword ptr [RDI + 0x24]
MOV byte ptr [RBP + -0x49],0xa
MOV EDX,dword ptr [R14 + 0x744]
ADD EDX,-0x3
MOV DL,byte ptr [RBX + RDX*0x1]
MOV byte ptr [RBP + -0x48],DL
LEA EDX,[R11 + RSI*0x1]
CMP EDX,R10D
JBE 0x0015adff
MOV ESI,R10D
SUB ESI,R11D
LEA RDX,[RBP + -0x46]
MOV byte ptr [RDX + -0x1],0xc
MOV EAX,R10D
XOR R8D,R8D
JMP 0x0015ae03
LAB_0015adff:
LEA RDX,[RBP + -0x47]
LAB_0015ae03:
LEA EBX,[R8 + RAX*0x1]
SUB EBX,R10D
JBE 0x0015ae1d
MOV byte ptr [RDX],0x7
MOV word ptr [RDX + 0x1],BX
ADD RDX,0x3
MOV EAX,R10D
SUB EAX,R8D
LAB_0015ae1d:
MOV EBX,R11D
SUB EBX,EAX
JNZ 0x0015ae2d
MOV byte ptr [RDX],0x6
LEA EAX,[RSI + R11*0x1]
JMP 0x0015ae78
LAB_0015ae2d:
MOV byte ptr [RDX],0x1
MOV word ptr [RDX + 0x1],R11W
TEST R8D,R8D
JZ 0x0015ae60
MOV R14D,R11D
SUB R14D,R8D
CMP R14D,EAX
CMOVBE EBX,R8D
TEST R8D,R8D
CMOVNS EBX,R8D
MOV byte ptr [RDX + 0x3],0x2
MOV word ptr [RDX + 0x4],BX
ADD RDX,0x6
ADD EBX,EAX
MOV EAX,EBX
JMP 0x0015ae64
LAB_0015ae60:
ADD RDX,0x3
LAB_0015ae64:
LEA R8D,[RSI + R11*0x1]
MOV EBX,EAX
SUB EBX,R11D
CMP R8D,EAX
CMOVBE EBX,ESI
MOV byte ptr [RDX],0x3
MOV ESI,EBX
LAB_0015ae78:
MOV word ptr [RDX + 0x1],SI
LEA RBX,[RDX + 0x3]
LEA R11,[RBP + -0x50]
MOV qword ptr [RBP + -0xc0],R11
MOV R8D,EBX
SUB R8D,R11D
MOV qword ptr [RBP + -0xb8],R8
MOV qword ptr [RBP + -0xb0],R9
MOV R9D,ESI
MOV qword ptr [RBP + -0xa8],R9
MOV R14D,dword ptr [RDI + 0x20]
CMP EAX,R14D
SETZ R9B
CMP EAX,R10D
SETZ R15B
OR R15B,R9B
MOV R9D,0x4
JNZ 0x0015af17
CMP R14D,R10D
CMOVC R10D,R14D
MOV R8D,R10D
SUB R8D,EAX
MOV EAX,EAX
ADD RAX,qword ptr [RDI + 0x10]
MOV byte ptr [RDX + 0x3],0x6
MOV word ptr [RDX + 0x4],R8W
MOV qword ptr [RBP + -0xa0],RBX
MOV qword ptr [RBP + -0x98],0x3
MOV qword ptr [RBP + -0x90],RAX
MOV qword ptr [RBP + -0x88],R8
LEA ESI,[RSI + R8*0x1 + 0x3]
MOV R9D,0x6
MOV R8,qword ptr [RBP + -0xb8]
MOV EAX,R10D
LAB_0015af17:
MOV dword ptr [RDI + 0x24],EAX
MOV RDX,qword ptr [RCX + 0x8]
ADD R8D,ESI
SUB RSP,0x8
LEA RAX,[RBP + -0xe0]
LEA RDI,[RBP + -0x58]
MOV ESI,0xc
PUSH 0x0
PUSH R11
PUSH RAX
CALL 0x0012a8ac
ADD RSP,0x20
MOV ECX,EAX
XOR EAX,EAX
NEG CL
SBB EAX,EAX
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x20]
JNZ 0x0015af68
ADD RSP,0xc8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0015af68:
CALL 0x00129270
|
int _ma_log_add(long *param_1,int8 param_2,long param_3,uint param_4,int param_5)
{
long *plVar1;
long lVar2;
int1 auVar3 [16];
char cVar4;
uint uVar5;
uint uVar6;
int1 *puVar7;
int iVar8;
uint uVar9;
int iVar10;
uint uVar11;
uint uVar12;
int8 uVar13;
long lVar14;
long in_FS_OFFSET;
int1 local_e8 [32];
int1 *local_c8;
ulong local_c0;
long local_b8;
ulong local_b0;
int1 *local_a8;
int8 local_a0;
long local_98;
ulong local_90;
int1 local_60 [8];
int1 local_58 [2];
int4 local_56;
int1 local_52;
int1 local_51;
int1 local_50;
int1 local_4f [39];
long local_28;
local_b0 = (ulong)param_4;
local_28 = *(long *)(in_FS_OFFSET + 0x28);
plVar1 = (long *)*param_1;
lVar14 = param_3 - param_1[2];
lVar2 = *plVar1;
uVar12 = *(uint *)(lVar2 + 0x7c0);
auVar3._8_8_ = 0;
auVar3._0_8_ = param_1[3];
auVar3 = auVar3 / ZEXT416(*(uint *)(lVar2 + 0x7bc));
local_56 = auVar3._0_4_;
local_52 = auVar3[4];
uVar5 = *(uint *)((long)param_1 + 0x24);
local_51 = 10;
local_50 = *(int1 *)(param_1[2] + (ulong)(*(int *)(lVar2 + 0x744) - 3));
iVar10 = (int)lVar14;
if (uVar12 < iVar10 + param_4) {
local_b0 = (ulong)(uVar12 - iVar10);
puVar7 = local_4f + 1;
local_4f[0] = 0xc;
param_5 = 0;
uVar5 = uVar12;
}
else {
puVar7 = local_4f;
}
uVar9 = (uint)local_b0;
iVar8 = (param_5 + uVar5) - uVar12;
if (uVar12 <= param_5 + uVar5 && iVar8 != 0) {
*puVar7 = 7;
*(short *)(puVar7 + 1) = (short)iVar8;
puVar7 = puVar7 + 3;
uVar5 = uVar12 - param_5;
}
if (iVar10 - uVar5 == 0) {
*puVar7 = 6;
uVar5 = uVar9 + iVar10;
}
else {
*puVar7 = 1;
*(short *)(puVar7 + 1) = (short)lVar14;
if (param_5 == 0) {
puVar7 = puVar7 + 3;
}
else {
iVar8 = iVar10 - uVar5;
if ((uint)(iVar10 - param_5) <= uVar5) {
iVar8 = param_5;
}
if (-1 < param_5) {
iVar8 = param_5;
}
puVar7[3] = 2;
*(short *)(puVar7 + 4) = (short)iVar8;
puVar7 = puVar7 + 6;
uVar5 = iVar8 + uVar5;
}
uVar6 = uVar5 - iVar10;
if (uVar9 + iVar10 <= uVar5) {
uVar6 = uVar9;
}
*puVar7 = 3;
local_b0 = (ulong)uVar6;
}
*(short *)(puVar7 + 1) = (short)local_b0;
local_c8 = local_58;
uVar11 = (int)(puVar7 + 3) - (int)local_c8;
local_c0 = (ulong)uVar11;
iVar10 = (int)local_b0;
uVar9 = *(uint *)(param_1 + 4);
uVar13 = 4;
uVar6 = uVar5;
if (uVar5 != uVar12 && uVar5 != uVar9) {
uVar6 = uVar12;
if (uVar9 < uVar12) {
uVar6 = uVar9;
}
uVar12 = uVar6 - uVar5;
local_90 = (ulong)uVar12;
local_98 = (ulong)uVar5 + param_1[2];
puVar7[3] = 6;
*(short *)(puVar7 + 4) = (short)uVar12;
local_a0 = 3;
iVar10 = iVar10 + 3 + uVar12;
uVar13 = 6;
local_a8 = puVar7 + 3;
}
*(uint *)((long)param_1 + 0x24) = uVar6;
local_b8 = param_3;
cVar4 = translog_write_record
(local_60,0xc,plVar1[1],plVar1,uVar11 + iVar10,uVar13,local_e8,local_c8,0);
if (*(long *)(in_FS_OFFSET + 0x28) == local_28) {
return -(uint)(cVar4 != '\0');
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
6,588 | common_init()::$_0::__invoke(ggml_log_level, char const*, void*) | monkey531[P]llama/common/common.cpp | void common_init() {
llama_log_set([](ggml_log_level level, const char * text, void * /*user_data*/) {
if (LOG_DEFAULT_LLAMA <= common_log_verbosity_thold) {
common_log_add(common_log_main(), level, "%s", text);
}
}, NULL);
#ifdef NDEBUG
const char * build_type = "";
#else
const char * build_type = " (debug)";
#endif
LOG_INF("build: %d (%s) with %s for %s%s\n", LLAMA_BUILD_NUMBER, LLAMA_COMMIT, LLAMA_COMPILER, LLAMA_BUILD_TARGET, build_type);
} | O0 | cpp | common_init()::$_0::__invoke(ggml_log_level, char const*, void*):
subq $0x28, %rsp
movl %edi, 0x24(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movl 0x24(%rsp), %esi
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rcx
leaq 0xf(%rsp), %rdi
callq 0xf5080
addq $0x28, %rsp
retq
nop
| _ZZ11common_initvEN3$_08__invokeE14ggml_log_levelPKcPv:
sub rsp, 28h
mov [rsp+28h+var_4], edi
mov [rsp+28h+var_10], rsi
mov [rsp+28h+var_18], rdx
mov esi, [rsp+28h+var_4]
mov rdx, [rsp+28h+var_10]
mov rcx, [rsp+28h+var_18]
lea rdi, [rsp+28h+var_19]
call _ZZ11common_initvENK3$_0clE14ggml_log_levelPKcPv; common_init(void)::$_0::operator()(ggml_log_level,char const*,void *)
add rsp, 28h
retn
| long long common_init(void)::$_0::__invoke(unsigned int a1, long long a2, long long a3)
{
char v4; // [rsp+Fh] [rbp-19h] BYREF
long long v5; // [rsp+10h] [rbp-18h]
long long v6; // [rsp+18h] [rbp-10h]
unsigned int v7; // [rsp+24h] [rbp-4h]
v7 = a1;
v6 = a2;
v5 = a3;
return common_init(void)::$_0::operator()(&v4, a1, a2, a3);
}
| __invoke:
SUB RSP,0x28
MOV dword ptr [RSP + 0x24],EDI
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x10],RDX
MOV ESI,dword ptr [RSP + 0x24]
MOV RDX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x10]
LEA RDI,[RSP + 0xf]
CALL 0x001f5080
ADD RSP,0x28
RET
|
/* __invoke(ggml_log_level, char const*, void*) */
void common_init()::$_0::__invoke(int4 param_1,int8 param_2,int8 param_3)
{
int1 local_19;
int8 local_18;
int8 local_10;
int4 local_4;
local_18 = param_3;
local_10 = param_2;
local_4 = param_1;
operator()(&local_19,param_1,param_2,param_3);
return;
}
|
|
6,589 | bf_sqrtrem | bluesky950520[P]quickjs/libbf.c | int bf_sqrtrem(bf_t *r, bf_t *rem1, const bf_t *a)
{
int ret;
if (a->len == 0) {
if (a->expn == BF_EXP_NAN) {
bf_set_nan(r);
} else if (a->expn == BF_EXP_INF && a->sign) {
goto invalid_op;
} else {
bf_set(r, a);
}
if (rem1)
bf_set_ui(rem1, 0);
ret = 0;
} else if (a->sign) {
invalid_op:
bf_set_nan(r);
if (rem1)
bf_set_ui(rem1, 0);
ret = BF_ST_INVALID_OP;
} else {
bf_t rem_s, *rem;
bf_sqrt(r, a, (a->expn + 1) / 2, BF_RNDZ);
bf_rint(r, BF_RNDZ);
/* see if the result is exact by computing the remainder */
if (rem1) {
rem = rem1;
} else {
rem = &rem_s;
bf_init(r->ctx, rem);
}
/* XXX: could avoid recomputing the remainder */
bf_mul(rem, r, r, BF_PREC_INF, BF_RNDZ);
bf_neg(rem);
bf_add(rem, rem, a, BF_PREC_INF, BF_RNDZ);
if (bf_is_nan(rem)) {
ret = BF_ST_MEM_ERROR;
goto done;
}
if (rem->len != 0) {
ret = BF_ST_INEXACT;
} else {
ret = 0;
}
done:
if (!rem1)
bf_delete(rem);
}
return ret;
} | O2 | c | bf_sqrtrem:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
cmpq $0x0, 0x18(%rdx)
je 0x754a3
cmpl $0x0, 0x8(%r14)
je 0x754da
movq %r15, %rdi
callq 0x7317d
pushq $0x1
popq %r14
jmp 0x755a4
movq 0x10(%r14), %rax
movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE
cmpq %rcx, %rax
je 0x7558b
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rcx, %rax
jne 0x75596
movq %r15, %rdi
callq 0x7317d
jmp 0x755a1
movabsq $0x7fffffffffffffff, %r13 # imm = 0x7FFFFFFFFFFFFFFF
movq 0x10(%r14), %rax
incq %rax
pushq $0x2
popq %rcx
cqto
idivq %rcx
pushq $0x1
popq %rbp
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
movl %ebp, %ecx
callq 0x755e5
movq %r15, %rdi
movl %ebp, %esi
callq 0x757ed
movq %rbx, %r12
testq %rbx, %rbx
jne 0x75539
leaq 0x18(%rsp), %rax
movq (%r15), %rcx
movq %rcx, -0x18(%rax)
andl $0x0, -0x10(%rax)
leaq 0x1(%r13), %rcx
movq %rcx, -0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq %rsp, %r12
movabsq $0x3fffffffffffffff, %r13 # imm = 0x3FFFFFFFFFFFFFFF
pushq $0x1
popq %rbp
movq %r12, %rdi
movq %r15, %rsi
movq %r15, %rdx
movq %r13, %rcx
movl %ebp, %r8d
callq 0x74959
xorb $0x1, 0x8(%r12)
movq %r12, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %r13, %rcx
movl %ebp, %r8d
callq 0x757f9
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rax, 0x10(%r12)
jne 0x755b5
pushq $0x20
popq %r14
jmp 0x755c6
cmpl $0x0, 0x8(%r14)
jne 0x75492
movq %r15, %rdi
movq %r14, %rsi
callq 0x73216
xorl %r14d, %r14d
testq %rbx, %rbx
je 0x755d3
movq %rbx, %rdi
xorl %esi, %esi
callq 0x73106
jmp 0x755d3
xorl %r14d, %r14d
cmpq $0x0, 0x18(%r12)
setne %r14b
shll $0x4, %r14d
testq %rbx, %rbx
jne 0x755d3
movq %r12, %rdi
callq 0x7500e
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| bf_sqrtrem:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, rdx
mov rbx, rsi
mov r15, rdi
cmp qword ptr [rdx+18h], 0
jz short loc_754A3
cmp dword ptr [r14+8], 0
jz short loc_754DA
loc_75492:
mov rdi, r15
call bf_set_nan
push 1
pop r14
jmp loc_755A4
loc_754A3:
mov rax, [r14+10h]
mov rcx, 7FFFFFFFFFFFFFFEh
cmp rax, rcx
jz loc_7558B
mov rcx, 7FFFFFFFFFFFFFFFh
cmp rax, rcx
jnz loc_75596
mov rdi, r15
call bf_set_nan
jmp loc_755A1
loc_754DA:
mov r13, 7FFFFFFFFFFFFFFFh
mov rax, [r14+10h]
inc rax
push 2
pop rcx
cqo
idiv rcx
push 1
pop rbp
mov rdi, r15
mov rsi, r14
mov rdx, rax
mov ecx, ebp
call bf_sqrt
mov rdi, r15
mov esi, ebp
call bf_rint
mov r12, rbx
test rbx, rbx
jnz short loc_75539
lea rax, [rsp+58h+var_40]
mov rcx, [r15]
mov [rax-18h], rcx
and dword ptr [rax-10h], 0
lea rcx, [r13+1]
mov [rax-8], rcx
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
mov r12, rsp
loc_75539:
mov r13, 3FFFFFFFFFFFFFFFh
push 1
pop rbp
mov rdi, r12
mov rsi, r15
mov rdx, r15
mov rcx, r13
mov r8d, ebp
call bf_mul
xor byte ptr [r12+8], 1
mov rdi, r12
mov rsi, r12
mov rdx, r14
mov rcx, r13
mov r8d, ebp
call bf_add
mov rax, 7FFFFFFFFFFFFFFFh
cmp [r12+10h], rax
jnz short loc_755B5
push 20h ; ' '
pop r14
jmp short loc_755C6
loc_7558B:
cmp dword ptr [r14+8], 0
jnz loc_75492
loc_75596:
mov rdi, r15
mov rsi, r14
call bf_set
loc_755A1:
xor r14d, r14d
loc_755A4:
test rbx, rbx
jz short loc_755D3
mov rdi, rbx
xor esi, esi
call bf_set_ui
jmp short loc_755D3
loc_755B5:
xor r14d, r14d
cmp qword ptr [r12+18h], 0
setnz r14b
shl r14d, 4
loc_755C6:
test rbx, rbx
jnz short loc_755D3
mov rdi, r12
call bf_delete_0
loc_755D3:
mov eax, r14d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long bf_sqrtrem(long long *a1, long long a2, long long a3)
{
unsigned int v4; // r14d
long long v5; // rax
long long *v6; // r12
long long v8; // [rsp+0h] [rbp-58h] BYREF
int v9; // [rsp+8h] [rbp-50h]
unsigned long long v10; // [rsp+10h] [rbp-48h]
__int128 v11; // [rsp+18h] [rbp-40h]
if ( !*(_QWORD *)(a3 + 24) )
{
v5 = *(_QWORD *)(a3 + 16);
if ( v5 == 0x7FFFFFFFFFFFFFFELL )
{
if ( *(_DWORD *)(a3 + 8) )
goto LABEL_3;
}
else if ( v5 == 0x7FFFFFFFFFFFFFFFLL )
{
bf_set_nan((long long)a1);
LABEL_13:
v4 = 0;
LABEL_14:
if ( a2 )
bf_set_ui(a2, 0LL);
return v4;
}
bf_set((long long)a1, a3);
goto LABEL_13;
}
if ( *(_DWORD *)(a3 + 8) )
{
LABEL_3:
bf_set_nan((long long)a1);
v4 = 1;
goto LABEL_14;
}
bf_sqrt(a1, a3, (*(_QWORD *)(a3 + 16) + 1LL) / 2, 1LL);
bf_rint(a1, 1LL);
v6 = (long long *)a2;
if ( !a2 )
{
v8 = *a1;
v9 = 0;
v10 = 0x8000000000000000LL;
v11 = 0LL;
v6 = &v8;
}
bf_mul(v6, a1, a1, 0x3FFFFFFFFFFFFFFFLL, 1u);
*((_BYTE *)v6 + 8) ^= 1u;
bf_add(v6, v6, a3, 0x3FFFFFFFFFFFFFFFLL, 1LL);
if ( v6[2] == 0x7FFFFFFFFFFFFFFFLL )
v4 = 32;
else
v4 = 16 * (v6[3] != 0);
if ( !a2 )
bf_delete_0(v6);
return v4;
}
| bf_sqrtrem:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RDX
MOV RBX,RSI
MOV R15,RDI
CMP qword ptr [RDX + 0x18],0x0
JZ 0x001754a3
CMP dword ptr [R14 + 0x8],0x0
JZ 0x001754da
LAB_00175492:
MOV RDI,R15
CALL 0x0017317d
PUSH 0x1
POP R14
JMP 0x001755a4
LAB_001754a3:
MOV RAX,qword ptr [R14 + 0x10]
MOV RCX,0x7ffffffffffffffe
CMP RAX,RCX
JZ 0x0017558b
MOV RCX,0x7fffffffffffffff
CMP RAX,RCX
JNZ 0x00175596
MOV RDI,R15
CALL 0x0017317d
JMP 0x001755a1
LAB_001754da:
MOV R13,0x7fffffffffffffff
MOV RAX,qword ptr [R14 + 0x10]
INC RAX
PUSH 0x2
POP RCX
CQO
IDIV RCX
PUSH 0x1
POP RBP
MOV RDI,R15
MOV RSI,R14
MOV RDX,RAX
MOV ECX,EBP
CALL 0x001755e5
MOV RDI,R15
MOV ESI,EBP
CALL 0x001757ed
MOV R12,RBX
TEST RBX,RBX
JNZ 0x00175539
LEA RAX,[RSP + 0x18]
MOV RCX,qword ptr [R15]
MOV qword ptr [RAX + -0x18],RCX
AND dword ptr [RAX + -0x10],0x0
LEA RCX,[R13 + 0x1]
MOV qword ptr [RAX + -0x8],RCX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV R12,RSP
LAB_00175539:
MOV R13,0x3fffffffffffffff
PUSH 0x1
POP RBP
MOV RDI,R12
MOV RSI,R15
MOV RDX,R15
MOV RCX,R13
MOV R8D,EBP
CALL 0x00174959
XOR byte ptr [R12 + 0x8],0x1
MOV RDI,R12
MOV RSI,R12
MOV RDX,R14
MOV RCX,R13
MOV R8D,EBP
CALL 0x001757f9
MOV RAX,0x7fffffffffffffff
CMP qword ptr [R12 + 0x10],RAX
JNZ 0x001755b5
PUSH 0x20
POP R14
JMP 0x001755c6
LAB_0017558b:
CMP dword ptr [R14 + 0x8],0x0
JNZ 0x00175492
LAB_00175596:
MOV RDI,R15
MOV RSI,R14
CALL 0x00173216
LAB_001755a1:
XOR R14D,R14D
LAB_001755a4:
TEST RBX,RBX
JZ 0x001755d3
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00173106
JMP 0x001755d3
LAB_001755b5:
XOR R14D,R14D
CMP qword ptr [R12 + 0x18],0x0
SETNZ R14B
SHL R14D,0x4
LAB_001755c6:
TEST RBX,RBX
JNZ 0x001755d3
MOV RDI,R12
CALL 0x0017500e
LAB_001755d3:
MOV EAX,R14D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long bf_sqrtrem(int8 *param_1,int1 *param_2,long param_3)
{
int8 *puVar1;
long lVar2;
int8 local_58;
int4 local_50;
int8 local_48;
int8 local_40;
int8 uStack_38;
if (*(long *)(param_3 + 0x18) == 0) {
if (*(long *)(param_3 + 0x10) != 0x7ffffffffffffffe) {
if (*(long *)(param_3 + 0x10) == 0x7fffffffffffffff) {
bf_set_nan(param_1);
}
else {
LAB_00175596:
bf_set(param_1,param_3);
}
lVar2 = 0;
goto LAB_001755a4;
}
if (*(int *)(param_3 + 8) == 0) goto LAB_00175596;
}
else if (*(int *)(param_3 + 8) == 0) {
bf_sqrt(param_1,param_3,(*(long *)(param_3 + 0x10) + 1) / 2,1);
bf_rint(param_1,1);
puVar1 = (int8 *)param_2;
if (param_2 == (int1 *)0x0) {
local_58 = *param_1;
local_50 = 0;
local_48 = 0x8000000000000000;
local_40 = 0;
uStack_38 = 0;
puVar1 = &local_58;
}
bf_mul(puVar1,param_1,param_1,0x3fffffffffffffff,1);
*(byte *)((long)puVar1 + 8) = *(byte *)((long)puVar1 + 8) ^ 1;
bf_add(puVar1,puVar1,param_3,0x3fffffffffffffff,1);
if (*(long *)((long)puVar1 + 0x10) == 0x7fffffffffffffff) {
lVar2 = 0x20;
}
else {
lVar2 = (ulong)(*(long *)((long)puVar1 + 0x18) != 0) << 4;
}
if (param_2 != (int1 *)0x0) {
return lVar2;
}
bf_delete(puVar1);
return lVar2;
}
bf_set_nan(param_1);
lVar2 = 1;
LAB_001755a4:
if (param_2 != (int1 *)0x0) {
bf_set_ui(param_2,0);
}
return lVar2;
}
|
|
6,590 | pagecache_delete_by_link | eloqsql/storage/maria/ma_pagecache.c | my_bool pagecache_delete_by_link(PAGECACHE *pagecache,
PAGECACHE_BLOCK_LINK *block,
enum pagecache_page_lock lock,
my_bool flush)
{
my_bool error= 0;
enum pagecache_page_pin pin= PAGECACHE_PIN_LEFT_PINNED;
DBUG_ENTER("pagecache_delete_by_link");
DBUG_PRINT("enter", ("fd: %d block %p %s %s",
block->hash_link->file.file,
block,
page_cache_page_lock_str[lock],
page_cache_page_pin_str[pin]));
DBUG_ASSERT(lock == PAGECACHE_LOCK_WRITE ||
lock == PAGECACHE_LOCK_LEFT_WRITELOCKED);
DBUG_ASSERT(block->pins != 0); /* should be pinned */
if (pagecache->can_be_used)
{
pagecache_pthread_mutex_lock(&pagecache->cache_lock);
if (!pagecache->can_be_used)
goto end;
/*
This block should be pinned (i.e. has not zero request counter) =>
Such block can't be chosen for eviction.
*/
DBUG_ASSERT((block->status &
(PCBLOCK_IN_SWITCH | PCBLOCK_REASSIGNED)) == 0);
/* This lock is deleted in pagecache_delete_internal() called below */
inc_counter_for_resize_op(pagecache);
/*
make_lock_and_pin() can't fail here, because we are keeping pin on the
block and it can't be evicted (which is cause of lock fail and retry)
*/
if (make_lock_and_pin(pagecache, block, lock, pin, FALSE))
DBUG_ASSERT(0);
/*
get_present_hash_link() side effect emulation before call
pagecache_delete_internal()
*/
block->hash_link->requests++;
error= pagecache_delete_internal(pagecache, block, block->hash_link,
flush);
end:
pagecache_pthread_mutex_unlock(&pagecache->cache_lock);
}
DBUG_RETURN(error);
} | O3 | c | pagecache_delete_by_link:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpb $0x0, 0x1aa(%rdi)
je 0x3c860
movl %ecx, %r12d
movl %edx, %r13d
movq %rsi, %r15
movq %rdi, %r14
leaq 0xc8(%rdi), %rbx
cmpq $0x0, 0x108(%rdi)
jne 0x3c88e
movq %rbx, %rdi
callq 0x2a1f0
cmpb $0x0, 0x1aa(%r14)
je 0x3c865
incq 0x68(%r14)
movq %r14, %rdi
movq %r15, %rsi
movl %r13d, %edx
xorl %ecx, %ecx
callq 0x3b317
movq 0x20(%r15), %rax
incl 0x68(%rax)
movq 0x20(%r15), %rdx
movsbl %r12b, %ecx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3c8b9
movl %eax, %r15d
jmp 0x3c868
xorl %r15d, %r15d
jmp 0x3c87c
xorl %r15d, %r15d
movq 0x108(%r14), %rdi
testq %rdi, %rdi
jne 0x3c8a7
movq %rbx, %rdi
callq 0x2a1c0
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa15f4(%rip), %rsi # 0xdde89
movq %rbx, %rdi
movl $0x1002, %edx # imm = 0x1002
callq 0x306c5
jmp 0x3c823
leaq 0x34fb1a(%rip), %rax # 0x38c3c8
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x3c874
| pagecache_delete_by_link:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
cmp byte ptr [rdi+1AAh], 0
jz short loc_3C860
mov r12d, ecx
mov r13d, edx
mov r15, rsi
mov r14, rdi
lea rbx, [rdi+0C8h]
cmp qword ptr [rdi+108h], 0
jnz short loc_3C88E
mov rdi, rbx
call _pthread_mutex_lock
loc_3C823:
cmp byte ptr [r14+1AAh], 0
jz short loc_3C865
inc qword ptr [r14+68h]
mov rdi, r14
mov rsi, r15
mov edx, r13d
xor ecx, ecx
call make_lock_and_pin
mov rax, [r15+20h]
inc dword ptr [rax+68h]
mov rdx, [r15+20h]
movsx ecx, r12b
mov rdi, r14
mov rsi, r15
call pagecache_delete_internal
mov r15d, eax
jmp short loc_3C868
loc_3C860:
xor r15d, r15d
jmp short loc_3C87C
loc_3C865:
xor r15d, r15d
loc_3C868:
mov rdi, [r14+108h]
test rdi, rdi
jnz short loc_3C8A7
loc_3C874:
mov rdi, rbx
call _pthread_mutex_unlock
loc_3C87C:
mov eax, r15d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3C88E:
lea rsi, aWorkspaceLlm4b_26; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rbx
mov edx, 1002h
call psi_mutex_lock
jmp loc_3C823
loc_3C8A7:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_3C874
| long long pagecache_delete_by_link(long long a1, long long a2, int a3, char a4)
{
long long v6; // rbx
unsigned int v7; // r15d
long long v8; // rdi
if ( *(_BYTE *)(a1 + 426) )
{
v6 = a1 + 200;
if ( *(_QWORD *)(a1 + 264) )
psi_mutex_lock(
a1 + 200,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",
0x1002u);
else
pthread_mutex_lock(a1 + 200);
if ( *(_BYTE *)(a1 + 426) )
{
++*(_QWORD *)(a1 + 104);
make_lock_and_pin(a1, a2, a3, 0);
++*(_DWORD *)(*(_QWORD *)(a2 + 32) + 104LL);
v7 = pagecache_delete_internal(a1, a2, *(_QWORD *)(a2 + 32), (unsigned int)a4);
}
else
{
v7 = 0;
}
v8 = *(_QWORD *)(a1 + 264);
if ( v8 )
((void ( *)(long long))PSI_server[44])(v8);
pthread_mutex_unlock(v6);
}
else
{
return 0;
}
return v7;
}
| pagecache_delete_by_link:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
CMP byte ptr [RDI + 0x1aa],0x0
JZ 0x0013c860
MOV R12D,ECX
MOV R13D,EDX
MOV R15,RSI
MOV R14,RDI
LEA RBX,[RDI + 0xc8]
CMP qword ptr [RDI + 0x108],0x0
JNZ 0x0013c88e
MOV RDI,RBX
CALL 0x0012a1f0
LAB_0013c823:
CMP byte ptr [R14 + 0x1aa],0x0
JZ 0x0013c865
INC qword ptr [R14 + 0x68]
MOV RDI,R14
MOV RSI,R15
MOV EDX,R13D
XOR ECX,ECX
CALL 0x0013b317
MOV RAX,qword ptr [R15 + 0x20]
INC dword ptr [RAX + 0x68]
MOV RDX,qword ptr [R15 + 0x20]
MOVSX ECX,R12B
MOV RDI,R14
MOV RSI,R15
CALL 0x0013c8b9
MOV R15D,EAX
JMP 0x0013c868
LAB_0013c860:
XOR R15D,R15D
JMP 0x0013c87c
LAB_0013c865:
XOR R15D,R15D
LAB_0013c868:
MOV RDI,qword ptr [R14 + 0x108]
TEST RDI,RDI
JNZ 0x0013c8a7
LAB_0013c874:
MOV RDI,RBX
CALL 0x0012a1c0
LAB_0013c87c:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013c88e:
LEA RSI,[0x1dde89]
MOV RDI,RBX
MOV EDX,0x1002
CALL 0x001306c5
JMP 0x0013c823
LAB_0013c8a7:
LEA RAX,[0x48c3c8]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0013c874
|
int4 pagecache_delete_by_link(long param_1,long param_2,int4 param_3,char param_4)
{
int *piVar1;
pthread_mutex_t *__mutex;
int4 uVar2;
if (*(char *)(param_1 + 0x1aa) == '\0') {
uVar2 = 0;
}
else {
__mutex = (pthread_mutex_t *)(param_1 + 200);
if (*(long *)(param_1 + 0x108) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c"
,0x1002);
}
if (*(char *)(param_1 + 0x1aa) == '\0') {
uVar2 = 0;
}
else {
*(long *)(param_1 + 0x68) = *(long *)(param_1 + 0x68) + 1;
make_lock_and_pin(param_1,param_2,param_3,0);
piVar1 = (int *)(*(long *)(param_2 + 0x20) + 0x68);
*piVar1 = *piVar1 + 1;
uVar2 = pagecache_delete_internal
(param_1,param_2,*(int8 *)(param_2 + 0x20),(int)param_4);
}
if (*(long *)(param_1 + 0x108) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
}
return uVar2;
}
|
|
6,591 | LEX::stmt_uninstall_plugin_by_name(DDL_options_st const&, Lex_ident_sys_st const&) | eloqsql/sql/sql_lex.cc | bool LEX::stmt_uninstall_plugin_by_name(const DDL_options_st &opt,
const Lex_ident_sys_st &name)
{
check_opt.init();
if (add_create_options_with_check(opt))
return true;
sql_command= SQLCOM_UNINSTALL_PLUGIN;
comment= name;
ident= null_clex_str;
return false;
} | O0 | cpp | LEX::stmt_uninstall_plugin_by_name(DDL_options_st const&, Lex_ident_sys_st const&):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x30(%rbp)
addq $0x1360, %rdi # imm = 0x1360
callq 0xd14a50
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %esi
callq 0x9d0f60
testb $0x1, %al
jne 0x9c9843
jmp 0x9c9849
movb $0x1, -0x1(%rbp)
jmp 0x9c988d
movq -0x30(%rbp), %rax
movl $0x71, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, 0xdb8(%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0xdc0(%rax)
movq 0xae6bf4(%rip), %rcx # 0x14b0468
movq %rcx, 0xdc8(%rax)
movq 0xae6bee(%rip), %rcx # 0x14b0470
movq %rcx, 0xdd0(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ZN3LEX29stmt_uninstall_plugin_by_nameERK14DDL_options_stRK16Lex_ident_sys_st:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rdi, [rbp+var_10]
mov [rbp+var_30], rdi
add rdi, 1360h; this
call _ZN15st_ha_check_opt4initEv; st_ha_check_opt::init(void)
mov rdi, [rbp+var_30]
mov rax, [rbp+var_18]
mov eax, [rax]
mov [rbp+var_24], eax
mov esi, [rbp+var_24]
call _ZN3LEX29add_create_options_with_checkE14DDL_options_st; LEX::add_create_options_with_check(DDL_options_st)
test al, 1
jnz short loc_9C9843
jmp short loc_9C9849
loc_9C9843:
mov [rbp+var_1], 1
jmp short loc_9C988D
loc_9C9849:
mov rax, [rbp+var_30]
mov dword ptr [rax+8], 71h ; 'q'
mov rcx, [rbp+var_20]
mov rdx, [rcx]
mov [rax+0DB8h], rdx
mov rcx, [rcx+8]
mov [rax+0DC0h], rcx
mov rcx, cs:null_clex_str
mov [rax+0DC8h], rcx
mov rcx, cs:qword_14B0470
mov [rax+0DD0h], rcx
mov [rbp+var_1], 0
loc_9C988D:
mov al, [rbp+var_1]
and al, 1
add rsp, 30h
pop rbp
retn
| char LEX::stmt_uninstall_plugin_by_name(LEX *this, const DDL_options_st *a2, const Lex_ident_sys_st *a3)
{
st_ha_check_opt::init((LEX *)((char *)this + 4960));
if ( (LEX::add_create_options_with_check(this, *(unsigned int *)a2) & 1) != 0 )
return 1;
*((_DWORD *)this + 2) = 113;
*((_QWORD *)this + 439) = *(_QWORD *)a3;
*((_QWORD *)this + 440) = *((_QWORD *)a3 + 1);
*((_QWORD *)this + 441) = null_clex_str;
*((_QWORD *)this + 442) = 0LL;
return 0;
}
| operator~:
PUSH RBP
MOV RBP,RSP
MOV AL,DIL
MOV byte ptr [RBP + -0x1],AL
MOVZX EAX,byte ptr [RBP + -0x1]
XOR EAX,0xffffffff
POP RBP
RET
|
/* TEMPNAMEPLACEHOLDERVALUE(item_base_t) */
uint operator~(byte param_1)
{
return param_1 ^ 0xffffffff;
}
|
|
6,592 | nglog::RemoveLogSink(nglog::LogSink*) | ng-log[P]ng-log/src/logging.cc | void RemoveLogSink(LogSink* destination) {
LogDestination::RemoveLogSink(destination);
} | O3 | cpp | nglog::RemoveLogSink(nglog::LogSink*):
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, 0x8(%rsp)
leaq 0x244f3(%rip), %rdi # 0x2fb58
callq 0x7840
cmpl $0x23, %eax
je 0xb6e7
movq 0x244da(%rip), %r15 # 0x2fb50
testq %r15, %r15
je 0xb6d1
movq (%r15), %rdi
movq 0x8(%r15), %rsi
leaq 0x8(%rsp), %rdx
callq 0x11b2d
movq %rax, %rbx
movq 0x244ba(%rip), %rax # 0x2fb50
movq 0x8(%rax), %r14
cmpq %r14, %rbx
je 0xb6d1
movq 0x8(%r15), %rdx
subq %r14, %rdx
je 0xb6bc
movq %rbx, %rdi
movq %r14, %rsi
callq 0x78d0
movq 0x8(%r15), %rax
movq %rax, %rcx
jmp 0xb6c2
movq %r14, %rax
movq %r14, %rcx
subq %r14, %rax
addq %rax, %rbx
cmpq %rbx, %rcx
je 0xb6d1
movq %rbx, 0x8(%r15)
leaq 0x24480(%rip), %rdi # 0x2fb58
callq 0x7730
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl $0x23, %edi
callq 0x7350
movq %rax, %rbx
leaq 0x2445d(%rip), %rdi # 0x2fb58
callq 0x7730
movq %rbx, %rdi
callq 0x7980
| _ZN5nglog13RemoveLogSinkEPNS_7LogSinkE:
push r15
push r14
push rbx
sub rsp, 10h
mov [rsp+28h+var_20], rdi
lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_
call _pthread_rwlock_wrlock
cmp eax, 23h ; '#'
jz short loc_B6E7
mov r15, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_
test r15, r15
jz short loc_B6D1
mov rdi, [r15]
mov rsi, [r15+8]
lea rdx, [rsp+28h+var_20]
call _ZSt11__remove_ifIN9__gnu_cxx17__normal_iteratorIPPN5nglog7LogSinkESt6vectorIS4_SaIS4_EEEENS0_5__ops16_Iter_equals_valIKS4_EEET_SE_SE_T0_; std::__remove_if<__gnu_cxx::__normal_iterator<nglog::LogSink **,std::vector<nglog::LogSink *>>,__gnu_cxx::__ops::_Iter_equals_val<nglog::LogSink * const>>(__gnu_cxx::__normal_iterator<nglog::LogSink **,std::vector<nglog::LogSink *>>,__gnu_cxx::__normal_iterator<nglog::LogSink **,std::vector<nglog::LogSink *>>,__gnu_cxx::__ops::_Iter_equals_val<nglog::LogSink * const>)
mov rbx, rax
mov rax, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_
mov r14, [rax+8]
cmp rbx, r14
jz short loc_B6D1
mov rdx, [r15+8]
sub rdx, r14
jz short loc_B6BC
mov rdi, rbx
mov rsi, r14
call _memmove
mov rax, [r15+8]
mov rcx, rax
jmp short loc_B6C2
loc_B6BC:
mov rax, r14
mov rcx, r14
loc_B6C2:
sub rax, r14
add rbx, rax
cmp rcx, rbx
jz short loc_B6D1
mov [r15+8], rbx
loc_B6D1:
lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_
call _pthread_rwlock_unlock
add rsp, 10h
pop rbx
pop r14
pop r15
retn
loc_B6E7:
mov edi, 23h ; '#'; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
mov rbx, rax
lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_
call _pthread_rwlock_unlock
mov rdi, rbx
call __Unwind_Resume
| long long nglog::RemoveLogSink(nglog *this, nglog::LogSink *a2)
{
long long v2; // r15
long long v3; // rbx
long long v4; // r14
long long v5; // rdx
long long v6; // rax
long long v7; // rbx
nglog *v9; // [rsp+8h] [rbp-20h] BYREF
v9 = this;
if ( (unsigned int)pthread_rwlock_wrlock(&nglog::LogDestination::sink_mutex_) == 35 )
std::__throw_system_error(35);
v2 = nglog::LogDestination::sinks_;
if ( nglog::LogDestination::sinks_ )
{
v3 = std::__remove_if<__gnu_cxx::__normal_iterator<nglog::LogSink **,std::vector<nglog::LogSink *>>,__gnu_cxx::__ops::_Iter_equals_val<nglog::LogSink * const>>(
*(_QWORD *)nglog::LogDestination::sinks_,
*(_QWORD *)(nglog::LogDestination::sinks_ + 8),
&v9);
v4 = *(_QWORD *)(nglog::LogDestination::sinks_ + 8);
if ( v3 != v4 )
{
v5 = *(_QWORD *)(v2 + 8) - v4;
if ( v5 )
{
memmove(v3, *(_QWORD *)(nglog::LogDestination::sinks_ + 8), v5);
v6 = *(_QWORD *)(v2 + 8);
}
else
{
v6 = *(_QWORD *)(nglog::LogDestination::sinks_ + 8);
}
v7 = v6 - v4 + v3;
if ( v6 != v7 )
*(_QWORD *)(v2 + 8) = v7;
}
}
return pthread_rwlock_unlock(&nglog::LogDestination::sink_mutex_);
}
| RemoveLogSink:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV qword ptr [RSP + 0x8],RDI
LEA RDI,[0x12fb58]
CALL 0x00107840
CMP EAX,0x23
JZ 0x0010b6e7
MOV R15,qword ptr [0x0012fb50]
TEST R15,R15
JZ 0x0010b6d1
MOV RDI,qword ptr [R15]
MOV RSI,qword ptr [R15 + 0x8]
LAB_0010b682:
LEA RDX,[RSP + 0x8]
CALL 0x00111b2d
LAB_0010b68c:
MOV RBX,RAX
MOV RAX,qword ptr [0x0012fb50]
MOV R14,qword ptr [RAX + 0x8]
CMP RBX,R14
JZ 0x0010b6d1
MOV RDX,qword ptr [R15 + 0x8]
SUB RDX,R14
JZ 0x0010b6bc
MOV RDI,RBX
MOV RSI,R14
CALL 0x001078d0
MOV RAX,qword ptr [R15 + 0x8]
MOV RCX,RAX
JMP 0x0010b6c2
LAB_0010b6bc:
MOV RAX,R14
MOV RCX,R14
LAB_0010b6c2:
SUB RAX,R14
ADD RBX,RAX
CMP RCX,RBX
JZ 0x0010b6d1
MOV qword ptr [R15 + 0x8],RBX
LAB_0010b6d1:
LEA RDI,[0x12fb58]
CALL 0x00107730
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
LAB_0010b6e7:
MOV EDI,0x23
CALL 0x00107350
|
/* nglog::RemoveLogSink(nglog::LogSink*) */
void nglog::RemoveLogSink(LogSink *param_1)
{
void *__src;
int8 *puVar1;
int iVar2;
void *pvVar3;
void *pvVar4;
LogSink *local_20;
local_20 = param_1;
iVar2 = pthread_rwlock_wrlock((pthread_rwlock_t *)LogDestination::sink_mutex_);
puVar1 = LogDestination::sinks_;
if (iVar2 == 0x23) {
/* WARNING: Subroutine does not return */
std::__throw_system_error(0x23);
}
if (LogDestination::sinks_ != (int8 *)0x0) {
/* try { // try from 0010b682 to 0010b68b has its CatchHandler @ 0010b6f1 */
pvVar3 = (void *)std::
__remove_if<__gnu_cxx::__normal_iterator<nglog::LogSink**,std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>,__gnu_cxx::__ops::_Iter_equals_val<nglog::LogSink*const>>
(*LogDestination::sinks_,LogDestination::sinks_[1],&local_20);
__src = (void *)LogDestination::sinks_[1];
if (pvVar3 != __src) {
pvVar4 = __src;
if (puVar1[1] - (long)__src != 0) {
memmove(pvVar3,__src,puVar1[1] - (long)__src);
pvVar4 = (void *)puVar1[1];
}
pvVar3 = (void *)((long)pvVar3 + ((long)pvVar4 - (long)__src));
if (pvVar4 != pvVar3) {
puVar1[1] = pvVar3;
}
}
}
pthread_rwlock_unlock((pthread_rwlock_t *)LogDestination::sink_mutex_);
return;
}
|
|
6,593 | uf_varchar2 | eloqsql/storage/myisam/mi_packrec.c | static void uf_varchar2(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff,
uchar *to, uchar *end __attribute__((unused)))
{
if (get_bit(bit_buff))
to[0]=to[1]=0; /* Zero lengths */
else
{
ulong length=get_bits(bit_buff,rec->space_length_bits);
int2store(to,length);
decode_bytes(rec,bit_buff,to+2,to+2+length);
}
} | O0 | c | uf_varchar2:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0xbd6c7
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x10(%rbp), %rdx
movl 0x4(%rdx), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rdx)
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0xbd6eb
jmp 0xbd6ff
movq -0x10(%rbp), %rdi
callq 0xbbca0
movq -0x10(%rbp), %rax
movl $0x1f, 0x4(%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x80000000, %eax # imm = 0x80000000
cmpl $0x0, %eax
je 0xbd6ff
movq -0x18(%rbp), %rax
movb $0x0, 0x1(%rax)
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
jmp 0xbd795
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jb 0xbd742
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x8(%rbp), %rcx
movl 0x1c(%rcx), %esi
movq -0x10(%rbp), %rdx
movl 0x4(%rdx), %ecx
subl %esi, %ecx
movl %ecx, 0x4(%rdx)
shrl %cl, %eax
movq -0x8(%rbp), %rcx
movl 0x1c(%rcx), %ecx
movl %ecx, %edx
leaq 0x2093a6(%rip), %rcx # 0x2c6ae0
andl (%rcx,%rdx,4), %eax
movl %eax, -0x34(%rbp)
jmp 0xbd755
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %esi
callq 0xba450
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movw %ax, %cx
movq -0x30(%rbp), %rax
movw %cx, (%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq $0x2, %rdx
movq -0x18(%rbp), %rcx
addq $0x2, %rcx
addq -0x28(%rbp), %rcx
callq 0xbc3b0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| uf_varchar2_0:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rax, [rbp+var_10]
cmp dword ptr [rax+4], 0
jz short loc_BD6C7
mov rax, [rbp+var_10]
mov eax, [rax]
mov rdx, [rbp+var_10]
mov ecx, [rdx+4]
add ecx, 0FFFFFFFFh
mov [rdx+4], ecx
mov edx, 1
shl edx, cl
mov ecx, edx
and eax, ecx
cmp eax, 0
jnz short loc_BD6EB
jmp short loc_BD6FF
loc_BD6C7:
mov rdi, [rbp+var_10]
call fill_buffer_0
mov rax, [rbp+var_10]
mov dword ptr [rax+4], 1Fh
mov rax, [rbp+var_10]
mov eax, [rax]
and eax, 80000000h
cmp eax, 0
jz short loc_BD6FF
loc_BD6EB:
mov rax, [rbp+var_18]
mov byte ptr [rax+1], 0
mov rax, [rbp+var_18]
mov byte ptr [rax], 0
jmp loc_BD795
loc_BD6FF:
mov rax, [rbp+var_10]
mov eax, [rax+4]
mov rcx, [rbp+var_8]
cmp eax, [rcx+1Ch]
jb short loc_BD742
mov rax, [rbp+var_10]
mov eax, [rax]
mov rcx, [rbp+var_8]
mov esi, [rcx+1Ch]
mov rdx, [rbp+var_10]
mov ecx, [rdx+4]
sub ecx, esi
mov [rdx+4], ecx
shr eax, cl
mov rcx, [rbp+var_8]
mov ecx, [rcx+1Ch]
mov edx, ecx
lea rcx, mask_0
and eax, [rcx+rdx*4]
mov [rbp+var_34], eax
jmp short loc_BD755
loc_BD742:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov esi, [rax+1Ch]
call fill_and_get_bits_0
mov [rbp+var_34], eax
loc_BD755:
mov eax, [rbp+var_34]
mov eax, eax
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
mov rax, [rbp+var_28]
mov cx, ax
mov rax, [rbp+var_30]
mov [rax], cx
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
add rdx, 2
mov rcx, [rbp+var_18]
add rcx, 2
add rcx, [rbp+var_28]
call decode_bytes_0
loc_BD795:
add rsp, 40h
pop rbp
retn
| long long uf_varchar2_0(long long a1, int *a2, _BYTE *a3)
{
int v3; // eax
int v4; // ecx
long long result; // rax
unsigned int v6; // eax
int v7; // ecx
int bits_0; // [rsp+Ch] [rbp-34h]
if ( a2[1] )
{
v3 = *a2;
v4 = a2[1] - 1;
a2[1] = v4;
if ( ((1 << v4) & v3) == 0 )
goto LABEL_6;
LABEL_5:
a3[1] = 0;
result = (long long)a3;
*a3 = 0;
return result;
}
fill_buffer_0((long long)a2);
a2[1] = 31;
if ( *a2 < 0 )
goto LABEL_5;
LABEL_6:
if ( (unsigned int)a2[1] < *(_DWORD *)(a1 + 28) )
{
bits_0 = fill_and_get_bits_0(a2, *(_DWORD *)(a1 + 28));
}
else
{
v6 = *a2;
v7 = a2[1] - *(_DWORD *)(a1 + 28);
a2[1] = v7;
bits_0 = mask_0[*(unsigned int *)(a1 + 28)] & (v6 >> v7);
}
*(_WORD *)a3 = bits_0;
return decode_bytes_0(a1, (long long)a2, a3 + 2, &a3[bits_0 + 2]);
}
| uf_varchar2:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x4],0x0
JZ 0x001bd6c7
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RDX + 0x4]
ADD ECX,-0x1
MOV dword ptr [RDX + 0x4],ECX
MOV EDX,0x1
SHL EDX,CL
MOV ECX,EDX
AND EAX,ECX
CMP EAX,0x0
JNZ 0x001bd6eb
JMP 0x001bd6ff
LAB_001bd6c7:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001bbca0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x4],0x1f
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
AND EAX,0x80000000
CMP EAX,0x0
JZ 0x001bd6ff
LAB_001bd6eb:
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x1],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],0x0
JMP 0x001bd795
LAB_001bd6ff:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x4]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0x1c]
JC 0x001bd742
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RCX + 0x1c]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RDX + 0x4]
SUB ECX,ESI
MOV dword ptr [RDX + 0x4],ECX
SHR EAX,CL
MOV RCX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RCX + 0x1c]
MOV EDX,ECX
LEA RCX,[0x3c6ae0]
AND EAX,dword ptr [RCX + RDX*0x4]
MOV dword ptr [RBP + -0x34],EAX
JMP 0x001bd755
LAB_001bd742:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RAX + 0x1c]
CALL 0x001ba450
MOV dword ptr [RBP + -0x34],EAX
LAB_001bd755:
MOV EAX,dword ptr [RBP + -0x34]
MOV EAX,EAX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x30]
MOV word ptr [RAX],CX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
ADD RDX,0x2
MOV RCX,qword ptr [RBP + -0x18]
ADD RCX,0x2
ADD RCX,qword ptr [RBP + -0x28]
CALL 0x001bc3b0
LAB_001bd795:
ADD RSP,0x40
POP RBP
RET
|
void uf_varchar2(long param_1,uint *param_2,int2 *param_3)
{
uint uVar1;
uint local_3c;
if (param_2[1] == 0) {
fill_buffer(param_2);
param_2[1] = 0x1f;
uVar1 = *param_2 & 0x80000000;
}
else {
uVar1 = param_2[1];
param_2[1] = uVar1 - 1;
uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f);
}
if (uVar1 == 0) {
if (param_2[1] < *(uint *)(param_1 + 0x1c)) {
local_3c = fill_and_get_bits(param_2,*(int4 *)(param_1 + 0x1c));
}
else {
uVar1 = param_2[1] - *(int *)(param_1 + 0x1c);
param_2[1] = uVar1;
local_3c = *param_2 >> ((byte)uVar1 & 0x1f) &
*(uint *)(mask + (ulong)*(uint *)(param_1 + 0x1c) * 4);
}
*param_3 = (short)local_3c;
decode_bytes(param_1,param_2,param_3 + 1,(int1 *)((long)param_3 + (ulong)local_3c + 2));
}
else {
*(int1 *)((long)param_3 + 1) = 0;
*(int1 *)param_3 = 0;
}
return;
}
|
|
6,594 | 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;
} | O3 | cpp | minja::Parser::parseConstant():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x20(%rsi), %r14
movq 0x18(%rsi), %r12
movq 0x20(%rsi), %r13
movq %r13, %rbp
cmpq %r12, %r13
je 0xae44f
movq %r13, %rbp
movsbl (%rbp), %edi
callq 0x1d0d0
testl %eax, %eax
je 0xae44f
incq %rbp
movq %rbp, (%r14)
cmpq %r12, %rbp
jne 0xae437
cmpq %r12, %rbp
je 0xae4a5
movzbl (%rbp), %eax
cmpl $0x27, %eax
je 0xae462
cmpl $0x22, %eax
jne 0xae4b0
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0xaf7f4
movq (%r12), %rdx
testq %rdx, %rdx
je 0xae4b0
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0xafe48
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0xae60d
leaq 0x8(%rsp), %rdi
callq 0xb0068
jmp 0xae60d
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0xae60d
leaq 0xa9149(%rip), %rax # 0x157600
movb (%rax), %al
testb %al, %al
je 0xae61f
leaq 0xa9118(%rip), %rdx # 0x1575e0
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movl $0x1, %ecx
callq 0xa7b1a
cmpq $0x0, 0x8(%r12)
je 0xae58c
leaq 0x5d5ce(%rip), %rsi # 0x10babe
leaq 0x8(%rsp), %rdi
callq 0x1d2a0
testl %eax, %eax
je 0xae575
leaq 0x66d83(%rip), %rsi # 0x115288
leaq 0x8(%rsp), %rdi
callq 0x1d2a0
testl %eax, %eax
je 0xae575
leaq 0x6197c(%rip), %rsi # 0x10fe96
leaq 0x8(%rsp), %rdi
callq 0x1d2a0
testl %eax, %eax
je 0xae5bb
leaq 0x66d5a(%rip), %rsi # 0x11528d
leaq 0x8(%rsp), %rdi
callq 0x1d2a0
testl %eax, %eax
je 0xae5bb
leaq 0x67160(%rip), %rsi # 0x1156a8
leaq 0x8(%rsp), %rdi
callq 0x1d2a0
testl %eax, %eax
jne 0xae676
leaq 0x28(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x7(%rsp), %rsi
movq %rbx, %rdi
callq 0xb0188
jmp 0xae5f2
leaq 0x7(%rsp), %rdx
movb $0x1, (%rdx)
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0xb0096
jmp 0xae5f2
leaq 0x18(%r15), %rcx
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xaf874
cmpb $0x0, 0x28(%rsp)
je 0xae5d2
leaq 0x7(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0xb039c
jmp 0xae5db
leaq 0x7(%rsp), %rdx
movb $0x0, (%rdx)
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0xb0096
jmp 0xae5f2
movq %r13, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
leaq 0x28(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x89876
movq %r14, %rdi
callq 0x8eb30
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xae60d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1dc50
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa8fda(%rip), %rdi # 0x157600
callq 0x1e6f0
testl %eax, %eax
je 0xae4c1
leaq 0xa8fa6(%rip), %rdi # 0x1575e0
leaq 0x67042(%rip), %rsi # 0x115683
movl $0x10, %edx
callq 0x934aa
leaq -0x6999c(%rip), %rdi # 0x44cb6
leaq 0xa8f87(%rip), %rsi # 0x1575e0
leaq 0xa8648(%rip), %rdx # 0x156ca8
callq 0x1da80
leaq 0xa8f94(%rip), %rdi # 0x157600
callq 0x1d7c0
jmp 0xae4c1
movl $0x10, %edi
callq 0x1d5b0
movq %rax, %r14
leaq 0x67023(%rip), %rsi # 0x1156ad
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x26b0d
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x1e430
xorl %ebp, %ebp
movq 0xa7936(%rip), %rsi # 0x155fe8
movq 0xa789f(%rip), %rdx # 0x155f58
movq %r14, %rdi
callq 0x1e5b0
movq %rax, %rbx
leaq 0xa8f35(%rip), %rdi # 0x157600
callq 0x1d7a0
jmp 0xae760
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xae6f3
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1dc50
testb %bpl, %bpl
jne 0xae6fd
jmp 0xae72c
movq %rax, %rbx
movq %r14, %rdi
callq 0x1d8c0
jmp 0xae72c
jmp 0xae729
jmp 0xae729
movq %rax, %rbx
leaq 0x28(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x89876
movq %r14, %rdi
callq 0x8eb30
jmp 0xae72c
jmp 0xae729
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xae760
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1dc50
jmp 0xae760
movq %rax, %rbx
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0xae760
leaq 0x8(%rsp), %rdi
callq 0xb0068
movq %rbx, %rdi
callq 0x1e660
| _ZN5minja6Parser13parseConstantEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r15, rsi
mov rbx, rdi
lea r14, [rsi+20h]
mov r12, [rsi+18h]
mov r13, [rsi+20h]
mov rbp, r13
cmp r13, r12
jz short loc_AE44F
mov rbp, r13
loc_AE437:
movsx edi, byte ptr [rbp+0]
call _isspace
test eax, eax
jz short loc_AE44F
inc rbp
mov [r14], rbp
cmp rbp, r12
jnz short loc_AE437
loc_AE44F:
cmp rbp, r12
jz short loc_AE4A5
movzx eax, byte ptr [rbp+0]
cmp eax, 27h ; '''
jz short loc_AE462
cmp eax, 22h ; '"'
jnz short loc_AE4B0
loc_AE462:
lea r12, [rsp+78h+var_70]
mov rdi, r12; int
mov rsi, r15; void *
call _ZN5minja6Parser11parseStringB5cxx11Ev; minja::Parser::parseString(void)
mov rdx, [r12]
test rdx, rdx
jz short loc_AE4B0
lea rsi, [rsp+78h+var_50]
mov rdi, rbx
call _ZNSt12__shared_ptrIN5minja5ValueELN9__gnu_cxx12_Lock_policyE2EEC2ISaIS1_EJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<minja::Value>,std::string &>(std::_Sp_alloc_shared_tag<std::allocator<minja::Value>>,std::string &)
mov rsi, qword ptr [rsp+78h+var_70]
test rsi, rsi
jz loc_AE60D
lea rdi, [rsp+78h+var_70]
call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*)
jmp loc_AE60D
loc_AE4A5:
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
jmp loc_AE60D
loc_AE4B0:
lea rax, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; `guard variable for'minja::Parser::parseConstant(void)::prim_tok
mov al, [rax]
test al, al
jz loc_AE61F
loc_AE4C1:
lea rdx, _ZZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; minja::Parser::parseConstant(void)::prim_tok
lea r12, [rsp+78h+var_70]
mov rdi, r12
mov rsi, r15
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
cmp qword ptr [r12+8], 0
jz loc_AE58C
lea rsi, aTrue; "true"
lea rdi, [rsp+78h+var_70]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_AE575
lea rsi, aTrue_0; "True"
lea rdi, [rsp+78h+var_70]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_AE575
lea rsi, aAdvancedOption+0ABh; "false"
lea rdi, [rsp+78h+var_70]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_AE5BB
lea rsi, aFalse; "False"
lea rdi, [rsp+78h+var_70]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_AE5BB
lea rsi, aNone_0; "None"
lea rdi, [rsp+78h+var_70]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jnz loc_AE676
lea rdx, [rsp+78h+var_50]
mov qword ptr [rdx], 0
lea rsi, [rsp+78h+var_71]
mov rdi, rbx
call _ZNSt12__shared_ptrIN5minja5ValueELN9__gnu_cxx12_Lock_policyE2EEC2ISaIS1_EJDnEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<minja::Value>,decltype(nullptr)>(std::_Sp_alloc_shared_tag<std::allocator<minja::Value>>,decltype(nullptr) &&)
jmp short loc_AE5F2
loc_AE575:
lea rdx, [rsp+78h+var_71]
mov byte ptr [rdx], 1
lea rsi, [rsp+78h+var_50]
mov rdi, rbx
call _ZNSt12__shared_ptrIN5minja5ValueELN9__gnu_cxx12_Lock_policyE2EEC2ISaIS1_EJbEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<minja::Value>,bool>(std::_Sp_alloc_shared_tag<std::allocator<minja::Value>>,bool &&)
jmp short loc_AE5F2
loc_AE58C:
lea rcx, [r15+18h]
lea rdi, [rsp+78h+var_50]
mov rsi, r15
mov rdx, r14
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+78h+var_50], 0
jz short loc_AE5D2
lea rsi, [rsp+78h+var_71]
lea rdx, [rsp+78h+var_50]
mov rdi, rbx
call _ZNSt12__shared_ptrIN5minja5ValueELN9__gnu_cxx12_Lock_policyE2EEC2ISaIS1_EJRN8nlohmann16json_abi_v3_11_310basic_jsonINS8_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS8_14adl_serializerESB_IhSaIhEEvEEEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<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> &>(std::_Sp_alloc_shared_tag<std::allocator<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> &)
jmp short loc_AE5DB
loc_AE5BB:
lea rdx, [rsp+78h+var_71]
mov byte ptr [rdx], 0
lea rsi, [rsp+78h+var_50]
mov rdi, rbx
call _ZNSt12__shared_ptrIN5minja5ValueELN9__gnu_cxx12_Lock_policyE2EEC2ISaIS1_EJbEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<minja::Value>,bool>(std::_Sp_alloc_shared_tag<std::allocator<minja::Value>>,bool &&)
jmp short loc_AE5F2
loc_AE5D2:
mov [r14], r13
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
loc_AE5DB:
lea r14, [rsp+78h+var_50]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_AE5F2:
lea rax, [rsp+78h+var_60]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_AE60D
mov rsi, [rsp+78h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_AE60D:
mov rax, rbx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_AE61F:
lea rdi, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_AE4C1
lea rdi, _ZZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; minja::Parser::parseConstant(void)::prim_tok
lea rsi, aTrueBTrueBFals; "true\\b|True\\b|false\\b|False\\b|None"...
mov edx, 10h
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_AE4C1
loc_AE676:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aUnknownConstan; "Unknown constant token: "
lea rdi, [rsp+78h+var_50]
lea rdx, [rsp+78h+var_70]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov bpl, 1
lea rsi, [rsp+78h+var_50]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp loc_AE760
mov rbx, rax
lea rax, [rsp+78h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_AE6F3
mov rsi, [rsp+78h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_AE6F3:
test bpl, bpl
jnz short loc_AE6FD
jmp short loc_AE72C
mov rbx, rax
loc_AE6FD:
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_AE72C
jmp short loc_AE729
jmp short loc_AE729
mov rbx, rax
lea r14, [rsp+78h+var_50]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_AE72C
jmp short $+2
loc_AE729:
mov rbx, rax
loc_AE72C:
lea rax, [rsp+78h+var_60]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_AE760
mov rsi, [rsp+78h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_AE760
mov rbx, rax
mov rsi, qword ptr [rsp+78h+var_70]
test rsi, rsi
jz short loc_AE760
lea rdi, [rsp+78h+var_70]
call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*)
loc_AE760:
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::parseConstant(minja::Parser *this, unsigned __int8 **a2)
{
unsigned __int8 **v2; // r14
char *v3; // r12
unsigned __int8 *v4; // r13
unsigned __int8 *v5; // rbp
int v6; // eax
void *exception; // r14
char v9; // [rsp+7h] [rbp-71h] BYREF
int v10[2]; // [rsp+8h] [rbp-70h] BYREF
long long v11; // [rsp+10h] [rbp-68h]
long long v12; // [rsp+18h] [rbp-60h] BYREF
_QWORD v13[2]; // [rsp+28h] [rbp-50h] BYREF
v2 = a2 + 4;
v3 = (char *)a2[3];
v4 = a2[4];
v5 = v4;
if ( v4 != (unsigned __int8 *)v3 )
{
v5 = a2[4];
do
{
if ( !(unsigned int)isspace((unsigned int)(char)*v5) )
break;
*v2 = ++v5;
}
while ( v5 != (unsigned __int8 *)v3 );
}
if ( v5 == (unsigned __int8 *)v3 )
{
*(_OWORD *)this = 0LL;
}
else
{
v6 = *v5;
if ( (v6 == 39 || v6 == 34) && (minja::Parser::parseString[abi:cxx11]((int)v10, a2), *(_QWORD *)v10) )
{
std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<minja::Value>,std::string &>(
this,
v13);
if ( *(_QWORD *)v10 )
std::default_delete<std::string>::operator()(v10);
}
else
{
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(
(long long)v10,
(long long)a2,
(long long)&minja::Parser::parseConstant(void)::prim_tok[abi:cxx11],
1u);
if ( v11 )
{
if ( !(unsigned int)std::string::compare(v10, "true") || !(unsigned int)std::string::compare(v10, "True") )
{
v9 = 1;
std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<minja::Value>,bool>(
this,
v13,
&v9);
}
else if ( !(unsigned int)std::string::compare(v10, "false") || !(unsigned int)std::string::compare(v10, "False") )
{
v9 = 0;
std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<minja::Value>,bool>(
this,
v13,
&v9);
}
else
{
if ( (unsigned int)std::string::compare(v10, "None") )
{
exception = __cxa_allocate_exception(0x10uLL);
std::operator+<char>((long long)v13, (long long)"Unknown constant token: ", v10);
std::runtime_error::runtime_error(exception, v13);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v13[0] = 0LL;
std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<minja::Value>,decltype(nullptr)>(
this,
&v9,
v13);
}
}
else
{
minja::Parser::parseNumber(v13, a2, v2, a2 + 3);
if ( LOBYTE(v13[0]) )
{
std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<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,
&v9,
v13);
}
else
{
*v2 = v4;
*(_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>::assert_invariant((char *)v13);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v13);
}
if ( *(long long **)v10 != &v12 )
operator delete(*(void **)v10, v12 + 1);
}
}
return this;
}
| parseConstant:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R15,RSI
MOV RBX,RDI
LEA R14,[RSI + 0x20]
MOV R12,qword ptr [RSI + 0x18]
MOV R13,qword ptr [RSI + 0x20]
MOV RBP,R13
CMP R13,R12
JZ 0x001ae44f
MOV RBP,R13
LAB_001ae437:
MOVSX EDI,byte ptr [RBP]
CALL 0x0011d0d0
TEST EAX,EAX
JZ 0x001ae44f
INC RBP
MOV qword ptr [R14],RBP
CMP RBP,R12
JNZ 0x001ae437
LAB_001ae44f:
CMP RBP,R12
JZ 0x001ae4a5
MOVZX EAX,byte ptr [RBP]
CMP EAX,0x27
JZ 0x001ae462
CMP EAX,0x22
JNZ 0x001ae4b0
LAB_001ae462:
LEA R12,[RSP + 0x8]
MOV RDI,R12
MOV RSI,R15
CALL 0x001af7f4
MOV RDX,qword ptr [R12]
TEST RDX,RDX
JZ 0x001ae4b0
LAB_001ae47b:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x001afe48
LAB_001ae488:
MOV RSI,qword ptr [RSP + 0x8]
TEST RSI,RSI
JZ 0x001ae60d
LEA RDI,[RSP + 0x8]
CALL 0x001b0068
JMP 0x001ae60d
LAB_001ae4a5:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
JMP 0x001ae60d
LAB_001ae4b0:
LEA RAX,[0x257600]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x001ae61f
LAB_001ae4c1:
LEA RDX,[0x2575e0]
LEA R12,[RSP + 0x8]
MOV RDI,R12
MOV RSI,R15
MOV ECX,0x1
CALL 0x001a7b1a
CMP qword ptr [R12 + 0x8],0x0
JZ 0x001ae58c
LEA RSI,[0x20babe]
LEA RDI,[RSP + 0x8]
CALL 0x0011d2a0
TEST EAX,EAX
JZ 0x001ae575
LEA RSI,[0x215288]
LEA RDI,[RSP + 0x8]
CALL 0x0011d2a0
TEST EAX,EAX
JZ 0x001ae575
LEA RSI,[0x20fe96]
LEA RDI,[RSP + 0x8]
CALL 0x0011d2a0
TEST EAX,EAX
JZ 0x001ae5bb
LEA RSI,[0x21528d]
LEA RDI,[RSP + 0x8]
CALL 0x0011d2a0
TEST EAX,EAX
JZ 0x001ae5bb
LEA RSI,[0x2156a8]
LEA RDI,[RSP + 0x8]
CALL 0x0011d2a0
TEST EAX,EAX
JNZ 0x001ae676
LEA RDX,[RSP + 0x28]
MOV qword ptr [RDX],0x0
LAB_001ae566:
LEA RSI,[RSP + 0x7]
MOV RDI,RBX
CALL 0x001b0188
JMP 0x001ae5f2
LAB_001ae575:
LEA RDX,[RSP + 0x7]
MOV byte ptr [RDX],0x1
LAB_001ae57d:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x001b0096
JMP 0x001ae5f2
LAB_001ae58c:
LEA RCX,[R15 + 0x18]
LEA RDI,[RSP + 0x28]
MOV RSI,R15
MOV RDX,R14
CALL 0x001af874
CMP byte ptr [RSP + 0x28],0x0
JZ 0x001ae5d2
LAB_001ae5a7:
LEA RSI,[RSP + 0x7]
LEA RDX,[RSP + 0x28]
MOV RDI,RBX
CALL 0x001b039c
JMP 0x001ae5db
LAB_001ae5bb:
LEA RDX,[RSP + 0x7]
MOV byte ptr [RDX],0x0
LAB_001ae5c3:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x001b0096
JMP 0x001ae5f2
LAB_001ae5d2:
MOV qword ptr [R14],R13
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
LAB_001ae5db:
LEA R14,[RSP + 0x28]
MOV RDI,R14
XOR ESI,ESI
CALL 0x00189876
MOV RDI,R14
CALL 0x0018eb30
LAB_001ae5f2:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001ae60d
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011dc50
LAB_001ae60d:
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001ae61f:
LEA RDI,[0x257600]
CALL 0x0011e6f0
TEST EAX,EAX
JZ 0x001ae4c1
LAB_001ae633:
LEA RDI,[0x2575e0]
LEA RSI,[0x215683]
MOV EDX,0x10
CALL 0x001934aa
LAB_001ae64b:
LEA RDI,[0x144cb6]
LEA RSI,[0x2575e0]
LEA RDX,[0x256ca8]
CALL 0x0011da80
LEA RDI,[0x257600]
CALL 0x0011d7c0
JMP 0x001ae4c1
LAB_001ae676:
MOV EDI,0x10
CALL 0x0011d5b0
MOV R14,RAX
LAB_001ae683:
LEA RSI,[0x2156ad]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x00126b0d
MOV BPL,0x1
LAB_001ae69c:
LEA RSI,[RSP + 0x28]
MOV RDI,R14
CALL 0x0011e430
XOR EBP,EBP
MOV RSI,qword ptr [0x00255fe8]
MOV RDX,qword ptr [0x00255f58]
MOV RDI,R14
CALL 0x0011e5b0
|
/* minja::Parser::parseConstant() */
void minja::Parser::parseConstant(void)
{
char *pcVar1;
char *pcVar2;
int iVar3;
runtime_error *this;
char *pcVar4;
__normal_iterator *in_RSI;
int8 *in_RDI;
string *local_70;
long local_68;
long local_60 [2];
int8 local_50 [4];
pcVar1 = *(char **)(in_RSI + 0x18);
pcVar2 = *(char **)(in_RSI + 0x20);
pcVar4 = pcVar2;
while ((pcVar4 != pcVar1 && (iVar3 = isspace((int)*pcVar4), iVar3 != 0))) {
pcVar4 = pcVar4 + 1;
*(char **)(in_RSI + 0x20) = pcVar4;
}
if (pcVar4 == pcVar1) {
*in_RDI = 0;
in_RDI[1] = 0;
}
else if (((*pcVar4 == '\'') || (*pcVar4 == '\"')) &&
(parseString_abi_cxx11_(), local_70 != (string *)0x0)) {
/* try { // try from 001ae47b to 001ae487 has its CatchHandler @ 001ae749 */
std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::
__shared_ptr<std::allocator<minja::Value>,std::__cxx11::string&>();
if (local_70 != (string *)0x0) {
std::default_delete<std::__cxx11::string>::operator()
((default_delete<std::__cxx11::string> *)&local_70,local_70);
}
}
else {
if ((parseConstant()::prim_tok_abi_cxx11_ == '\0') &&
(iVar3 = __cxa_guard_acquire(&parseConstant()::prim_tok_abi_cxx11_), iVar3 != 0)) {
/* try { // try from 001ae633 to 001ae64a has its CatchHandler @ 001ae6c1 */
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_70);
if (local_68 == 0) {
/* try { // try from 001ae58c to 001ae59f has its CatchHandler @ 001ae727 */
parseNumber((__normal_iterator *)local_50,in_RSI);
if (local_50[0]._0_1_ == (data)0x0) {
*(char **)(in_RSI + 0x20) = pcVar2;
*in_RDI = 0;
in_RDI[1] = 0;
}
else {
/* try { // try from 001ae5a7 to 001ae5b8 has its CatchHandler @ 001ae70b */
std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::
__shared_ptr<std::allocator<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>&>
();
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)local_50,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_50);
}
else {
iVar3 = std::__cxx11::string::compare((char *)&local_70);
if ((iVar3 == 0) || (iVar3 = std::__cxx11::string::compare((char *)&local_70), iVar3 == 0)) {
/* try { // try from 001ae57d to 001ae589 has its CatchHandler @ 001ae729 */
std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::
__shared_ptr<std::allocator<minja::Value>,bool>();
}
else {
iVar3 = std::__cxx11::string::compare((char *)&local_70);
if ((iVar3 == 0) || (iVar3 = std::__cxx11::string::compare((char *)&local_70), iVar3 == 0))
{
/* try { // try from 001ae5c3 to 001ae5cf has its CatchHandler @ 001ae709 */
std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::
__shared_ptr<std::allocator<minja::Value>,bool>();
}
else {
iVar3 = std::__cxx11::string::compare((char *)&local_70);
if (iVar3 != 0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001ae683 to 001ae698 has its CatchHandler @ 001ae6fa */
std::operator+((char *)local_50,(string *)"Unknown constant token: ");
/* try { // try from 001ae69c to 001ae6c0 has its CatchHandler @ 001ae6d5 */
std::runtime_error::runtime_error(this,(string *)local_50);
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00255fe8,PTR__runtime_error_00255f58);
}
local_50[0] = 0;
/* try { // try from 001ae566 to 001ae572 has its CatchHandler @ 001ae707 */
std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::
__shared_ptr<std::allocator<minja::Value>,decltype(nullptr)>();
}
}
}
if (local_70 != (string *)local_60) {
operator_delete(local_70,local_60[0] + 1);
}
}
return;
}
|
|
6,595 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [11], 0>(char const (&) [11]) const | monkey531[P]llama/common/./json.hpp | const_reference at(KeyType && key) const
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return it->second;
} | O1 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [11], 0>(char const (&) [11]) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0xe7f7a
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0xe7f5f
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1b210
testl %eax, %eax
je 0xe7f5c
addq $0x30, %rbx
jmp 0xe7f3d
movq %rbx, %rax
movq 0x8(%r14), %rcx
cmpq 0x8(%rcx), %rax
je 0xe7fd6
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x1b430
movq %rax, %rbx
movq %r14, %rdi
callq 0x60036
leaq 0x20(%rsp), %rdx
movq %rax, (%rdx)
leaq 0xbe54(%rip), %rsi # 0xf3df2
movq %rsp, %rdi
callq 0xace85
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x883c0
xorl %ebp, %ebp
leaq 0x44f53(%rip), %rsi # 0x12cf18
leaq -0x8be54(%rip), %rdx # 0x5c178
movq %rbx, %rdi
callq 0x1bf20
jmp 0xe804f
movl $0x20, %edi
callq 0x1b430
movq %rax, %rbx
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x1b3d0
leaq (%rax,%r15), %rdx
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x23580
leaq 0xbe15(%rip), %rsi # 0xf3e22
leaq 0xbe14(%rip), %rcx # 0xf3e28
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0xad48e
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0xad808
xorl %ebp, %ebp
leaq 0x44e58(%rip), %rsi # 0x12ce98
leaq -0x8becf(%rip), %rdx # 0x5c178
movq %rbx, %rdi
callq 0x1bf20
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe8075
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b8e0
jmp 0xe8075
movq %rax, %r14
movb $0x1, %bpl
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0xe80ae
movq 0x30(%rsp), %rsi
jmp 0xe809e
jmp 0xe80a8
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe80ae
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b8e0
jmp 0xe80ae
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0xe80bb
movq %rbx, %rdi
callq 0x1b670
movq %r14, %rdi
callq 0x1bfb0
nop
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push r12; int
push rbx; char
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_E7F7A
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
loc_E7F3D:
mov rax, [r12+8]
cmp rbx, rax
jz short loc_E7F5F
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_E7F5C
add rbx, 30h ; '0'
jmp short loc_E7F3D
loc_E7F5C:
mov rax, rbx
loc_E7F5F:
mov rcx, [r14+8]
cmp rax, [rcx+8]
jz short loc_E7FD6
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_E7F7A:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+68h+var_48]
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
mov rdi, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
mov rdx, rsp
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_E804F
loc_E7FD6:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r12, [rsp+68h+var_38]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
lea rdi, [rsp+68h+var_48]
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
mov rdi, rsp
lea rdx, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
mov rdx, rsp
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_E804F:
mov r14, rax
lea rax, [rsp+68h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_E8075
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_E8075
mov r14, rax
mov bpl, 1
loc_E8075:
mov rdi, [rsp+68h+var_48]
cmp rdi, r12
jz short loc_E80AE
mov rsi, [rsp+68h+var_38]
jmp short loc_E809E
jmp short loc_E80A8
mov r14, rax
lea rax, [rsp+68h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_E80AE
mov rsi, [rsp+68h+var_58]
loc_E809E:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_E80AE
loc_E80A8:
mov r14, rax
mov bpl, 1
loc_E80AE:
test bpl, bpl
jz short loc_E80BB
mov rdi, rbx; void *
call ___cxa_free_exception
loc_E80BB:
mov rdi, r14
call __Unwind_Resume
| long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_(
long long a1,
_BYTE *a2)
{
long long *v2; // r12
long long i; // rbx
long long v4; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx
long long v8; // rax
_QWORD v9[2]; // [rsp+0h] [rbp-68h] BYREF
_QWORD v10[2]; // [rsp+20h] [rbp-48h] BYREF
long long v11; // [rsp+30h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v10[0] = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(
(long long)v9,
(long long)"cannot use at() with ",
v10);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
304,
v9);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v2 = *(long long **)(a1 + 8);
for ( i = *v2; ; i += 48LL )
{
v4 = v2[1];
if ( i == v4 )
break;
if ( !(unsigned int)std::string::compare(i, a2) )
{
v4 = i;
break;
}
}
if ( v4 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) )
{
v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v10[0] = &v11;
v8 = strlen(a2);
std::string::_M_construct<char const*>(v10, a2, (long long)&a2[v8]);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
(long long)v9,
(long long)"key '",
v10,
(long long)"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
v7,
403,
v9);
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v4 + 32;
}
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x001e7f7a
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
LAB_001e7f3d:
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x001e7f5f
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011b210
TEST EAX,EAX
JZ 0x001e7f5c
ADD RBX,0x30
JMP 0x001e7f3d
LAB_001e7f5c:
MOV RAX,RBX
LAB_001e7f5f:
MOV RCX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x001e7fd6
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001e7f7a:
MOV EDI,0x20
CALL 0x0011b430
MOV RBX,RAX
MOV RDI,R14
CALL 0x00160036
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX],RAX
LAB_001e7f97:
LEA RSI,[0x1f3df2]
MOV RDI,RSP
CALL 0x001ace85
MOV BPL,0x1
LAB_001e7fa9:
MOV RDX,RSP
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x001883c0
XOR EBP,EBP
LEA RSI,[0x22cf18]
LEA RDX,[0x15c178]
MOV RDI,RBX
CALL 0x0011bf20
LAB_001e7fd6:
MOV EDI,0x20
CALL 0x0011b430
MOV RBX,RAX
LEA R12,[RSP + 0x30]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x0011b3d0
LEA RDX,[RAX + R15*0x1]
LAB_001e7ff9:
LEA RDI,[RSP + 0x20]
MOV RSI,R15
CALL 0x00123580
LAB_001e8006:
LEA RSI,[0x1f3e22]
LEA RCX,[0x1f3e28]
MOV RDI,RSP
LEA RDX,[RSP + 0x20]
CALL 0x001ad48e
MOV BPL,0x1
LAB_001e8024:
MOV RDX,RSP
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x001ad808
XOR EBP,EBP
LEA RSI,[0x22ce98]
LEA RDX,[0x15c178]
MOV RDI,RBX
CALL 0x0011bf20
|
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
int8 *puVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
size_t sVar5;
char *pcVar6;
detail adStack_68 [32];
char *local_48 [2];
char local_38 [16];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar4 = __cxa_allocate_exception(0x20);
local_48[0] = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 001e7f97 to 001e7fa5 has its CatchHandler @ 001e80a8 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(adStack_68,"cannot use at() with ",local_48);
/* try { // try from 001e7fa9 to 001e7fd3 has its CatchHandler @ 001e8088 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x130,adStack_68,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
puVar1 = *(int8 **)(param_1 + 8);
pcVar6 = (char *)*puVar1;
while ((pcVar3 = (char *)puVar1[1], pcVar6 != pcVar3 &&
(iVar2 = std::__cxx11::string::compare(pcVar6), pcVar3 = pcVar6, iVar2 != 0))) {
pcVar6 = pcVar6 + 0x30;
}
if (pcVar3 == *(char **)(*(long *)(param_1 + 8) + 8)) {
uVar4 = __cxa_allocate_exception(0x20);
local_48[0] = local_38;
sVar5 = strlen(param_2);
/* try { // try from 001e7ff9 to 001e8005 has its CatchHandler @ 001e8086 */
std::__cxx11::string::_M_construct<char_const*>(local_48,param_2,param_2 + sVar5);
/* try { // try from 001e8006 to 001e8020 has its CatchHandler @ 001e806f */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(adStack_68,"key \'",(string *)local_48,"\' not found");
/* try { // try from 001e8024 to 001e804e has its CatchHandler @ 001e804f */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x193,adStack_68,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return pcVar3 + 0x20;
}
|
|
6,596 | wait_on_queue | eloqsql/mysys/mf_keycache.c | static void wait_on_queue(KEYCACHE_WQUEUE *wqueue,
mysql_mutex_t *mutex)
{
struct st_my_thread_var *last;
struct st_my_thread_var *thread= my_thread_var;
DBUG_ASSERT(!thread->next);
DBUG_ASSERT(!thread->prev); /* Not required, but must be true anyway. */
mysql_mutex_assert_owner(mutex);
/* Add to queue. */
if (! (last= wqueue->last_thread))
thread->next= thread;
else
{
thread->next= last->next;
last->next= thread;
}
wqueue->last_thread= thread;
/*
Wait until thread is removed from queue by the signaling thread.
The loop protects against stray signals.
*/
do
{
KEYCACHE_DBUG_PRINT("wait", ("suspend thread %ld", (ulong) thread->id));
keycache_pthread_cond_wait(&thread->suspend, mutex);
}
while (thread->next);
} | O0 | c | wait_on_queue:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
callq 0xf60c0
movq %rax, -0x20(%rbp)
jmp 0xe36ab
jmp 0xe36ad
jmp 0xe36af
jmp 0xe36b1
jmp 0xe36b3
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0xe36d5
movq -0x20(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x88(%rax)
jmp 0xe36fa
movq -0x18(%rbp), %rax
movq 0x88(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
jmp 0xe3707
jmp 0xe3709
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rsi
leaq 0x70ace(%rip), %rdx # 0x1541ea
movl $0x477, %ecx # imm = 0x477
callq 0xe4e60
movq -0x20(%rbp), %rax
cmpq $0x0, 0x88(%rax)
jne 0xe3705
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| wait_on_queue:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
call _my_thread_var
mov [rbp+var_20], rax
jmp short $+2
loc_E36AB:
jmp short $+2
loc_E36AD:
jmp short $+2
loc_E36AF:
jmp short $+2
loc_E36B1:
jmp short $+2
loc_E36B3:
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_E36D5
mov rcx, [rbp+var_20]
mov rax, [rbp+var_20]
mov [rax+88h], rcx
jmp short loc_E36FA
loc_E36D5:
mov rax, [rbp+var_18]
mov rcx, [rax+88h]
mov rax, [rbp+var_20]
mov [rax+88h], rcx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_18]
mov [rax+88h], rcx
loc_E36FA:
mov rcx, [rbp+var_20]
mov rax, [rbp+var_8]
mov [rax], rcx
loc_E3705:
jmp short $+2
loc_E3707:
jmp short $+2
loc_E3709:
mov rdi, [rbp+var_20]
add rdi, 8
mov rsi, [rbp+var_10]
lea rdx, aWorkspaceLlm4b_36; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 477h
call inline_mysql_cond_wait_4
mov rax, [rbp+var_20]
cmp qword ptr [rax+88h], 0
jnz short loc_E3705
add rsp, 20h
pop rbp
retn
| long long wait_on_queue(long long *a1, const char *a2)
{
long long result; // rax
long long v3; // [rsp+0h] [rbp-20h]
long long v4; // [rsp+8h] [rbp-18h]
v3 = my_thread_var(a1, a2);
v4 = *a1;
if ( *a1 )
{
*(_QWORD *)(v3 + 136) = *(_QWORD *)(v4 + 136);
*(_QWORD *)(v4 + 136) = v3;
}
else
{
*(_QWORD *)(v3 + 136) = v3;
}
*a1 = v3;
do
{
inline_mysql_cond_wait_4(v3 + 8, a2, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 1143LL);
result = v3;
}
while ( *(_QWORD *)(v3 + 136) );
return result;
}
| wait_on_queue:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
CALL 0x001f60c0
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001e36ab
LAB_001e36ab:
JMP 0x001e36ad
LAB_001e36ad:
JMP 0x001e36af
LAB_001e36af:
JMP 0x001e36b1
LAB_001e36b1:
JMP 0x001e36b3
LAB_001e36b3:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x001e36d5
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x88],RCX
JMP 0x001e36fa
LAB_001e36d5:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x88]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x88],RCX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x88],RCX
LAB_001e36fa:
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],RCX
LAB_001e3705:
JMP 0x001e3707
LAB_001e3707:
JMP 0x001e3709
LAB_001e3709:
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x8
MOV RSI,qword ptr [RBP + -0x10]
LEA RDX,[0x2541ea]
MOV ECX,0x477
CALL 0x001e4e60
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0x88],0x0
JNZ 0x001e3705
ADD RSP,0x20
POP RBP
RET
|
void wait_on_queue(long *param_1,int8 param_2)
{
long lVar1;
long lVar2;
lVar2 = _my_thread_var();
lVar1 = *param_1;
if (lVar1 == 0) {
*(long *)(lVar2 + 0x88) = lVar2;
}
else {
*(int8 *)(lVar2 + 0x88) = *(int8 *)(lVar1 + 0x88);
*(long *)(lVar1 + 0x88) = lVar2;
}
*param_1 = lVar2;
do {
inline_mysql_cond_wait
(lVar2 + 8,param_2,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",
0x477);
} while (*(long *)(lVar2 + 0x88) != 0);
return;
}
|
|
6,597 | my_default_csname | eloqsql/mysys/charset.c | const char* my_default_csname()
{
const char* csname = NULL;
#ifdef _WIN32
char cpbuf[64];
int cp = GetConsoleCP();
if (cp == 0)
cp = GetACP();
snprintf(cpbuf, sizeof(cpbuf), "cp%d", (int)cp);
csname = my_os_charset_to_mysql_charset(cpbuf);
#elif defined(HAVE_SETLOCALE) && defined(HAVE_NL_LANGINFO)
if (setlocale(LC_CTYPE, "") && (csname = nl_langinfo(CODESET)))
csname = my_os_charset_to_mysql_charset(csname);
#endif
return csname ? csname : MYSQL_DEFAULT_CHARSET_NAME;
} | O0 | c | my_default_csname:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq $0x0, -0x8(%rbp)
xorl %edi, %edi
leaq 0x74b5c(%rip), %rsi # 0x11e355
callq 0x276f0
cmpq $0x0, %rax
je 0xa9825
movl $0xe, %edi
callq 0x27660
movq %rax, -0x8(%rbp)
cmpq $0x0, %rax
je 0xa9825
movq -0x8(%rbp), %rdi
callq 0xa9850
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xa9836
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0xa9843
leaq 0x7690c(%rip), %rax # 0x120149
movq %rax, -0x10(%rbp)
jmp 0xa9843
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| my_default_csname:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], 0
xor edi, edi
lea rsi, aLibmarias3SDS+19h; ""
call _setlocale
cmp rax, 0
jz short loc_A9825
mov edi, 0Eh
call _nl_langinfo
mov [rbp+var_8], rax
cmp rax, 0
jz short loc_A9825
mov rdi, [rbp+var_8]
call my_os_charset_to_mysql_charset
mov [rbp+var_8], rax
loc_A9825:
cmp [rbp+var_8], 0
jz short loc_A9836
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
jmp short loc_A9843
loc_A9836:
lea rax, aLatin1; "latin1"
mov [rbp+var_10], rax
jmp short $+2
loc_A9843:
mov rax, [rbp+var_10]
add rsp, 10h
pop rbp
retn
| const char *my_default_csname()
{
long long v2; // [rsp+8h] [rbp-8h]
v2 = 0LL;
if ( setlocale(0LL, "") )
{
v2 = nl_langinfo(14LL);
if ( v2 )
v2 = my_os_charset_to_mysql_charset(v2);
}
if ( v2 )
return (const char *)v2;
else
return "latin1";
}
| my_default_csname:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],0x0
XOR EDI,EDI
LEA RSI,[0x21e355]
CALL 0x001276f0
CMP RAX,0x0
JZ 0x001a9825
MOV EDI,0xe
CALL 0x00127660
MOV qword ptr [RBP + -0x8],RAX
CMP RAX,0x0
JZ 0x001a9825
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001a9850
MOV qword ptr [RBP + -0x8],RAX
LAB_001a9825:
CMP qword ptr [RBP + -0x8],0x0
JZ 0x001a9836
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001a9843
LAB_001a9836:
LEA RAX,[0x220149]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001a9843
LAB_001a9843:
MOV RAX,qword ptr [RBP + -0x10]
ADD RSP,0x10
POP RBP
RET
|
char * my_default_csname(void)
{
char *pcVar1;
char *local_18;
char *local_10;
local_10 = (char *)0x0;
pcVar1 = setlocale(0,"");
if (pcVar1 != (char *)0x0) {
local_10 = nl_langinfo(0xe);
if (local_10 != (char *)0x0) {
local_10 = (char *)my_os_charset_to_mysql_charset(local_10);
}
}
if (local_10 == (char *)0x0) {
local_18 = "latin1";
}
else {
local_18 = local_10;
}
return local_18;
}
|
|
6,598 | composition_clear | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-blend.c | static void composition_clear(uint32_t* dest, int length, const uint32_t* src, uint32_t const_alpha)
{
if(const_alpha == 255) {
plutovg_memfill32(dest, length, 0);
} else {
uint32_t ialpha = 255 - const_alpha;
for(int i = 0; i < length; i++) {
dest[i] = BYTE_MUL(dest[i], ialpha);
}
}
} | O0 | c | composition_clear:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
cmpl $0xff, -0x1c(%rbp)
jne 0x88def
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
xorl %edx, %edx
callq 0x86e90
jmp 0x88e36
movl $0xff, %eax
subl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x88e34
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl (%rax,%rcx,4), %edi
movl -0x20(%rbp), %esi
callq 0x88410
movl %eax, %edx
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x88e01
jmp 0x88e36
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| composition_clear:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
cmp [rbp+var_1C], 0FFh
jnz short loc_88DEF
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
xor edx, edx
call plutovg_memfill32
jmp short loc_88E36
loc_88DEF:
mov eax, 0FFh
sub eax, [rbp+var_1C]
mov [rbp+var_20], eax
mov [rbp+var_24], 0
loc_88E01:
mov eax, [rbp+var_24]
cmp eax, [rbp+var_C]
jge short loc_88E34
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_24]
mov edi, [rax+rcx*4]
mov esi, [rbp+var_20]
call BYTE_MUL
mov edx, eax
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_24]
mov [rax+rcx*4], edx
mov eax, [rbp+var_24]
add eax, 1
mov [rbp+var_24], eax
jmp short loc_88E01
loc_88E34:
jmp short $+2
loc_88E36:
add rsp, 30h
pop rbp
retn
| char composition_clear(__m128i *a1, int a2, long long a3, int a4)
{
char result; // al
int i; // [rsp+Ch] [rbp-24h]
int v6; // [rsp+10h] [rbp-20h]
if ( a4 == 255 )
return plutovg_memfill32(a1, a2, 0);
v6 = 255 - a4;
for ( i = 0; ; ++i )
{
result = i;
if ( i >= a2 )
break;
a1->m128i_i32[i] = BYTE_MUL(a1->m128i_u32[i], v6);
}
return result;
}
| composition_clear:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
CMP dword ptr [RBP + -0x1c],0xff
JNZ 0x00188def
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
XOR EDX,EDX
CALL 0x00186e90
JMP 0x00188e36
LAB_00188def:
MOV EAX,0xff
SUB EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x20],EAX
MOV dword ptr [RBP + -0x24],0x0
LAB_00188e01:
MOV EAX,dword ptr [RBP + -0x24]
CMP EAX,dword ptr [RBP + -0xc]
JGE 0x00188e34
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0x24]
MOV EDI,dword ptr [RAX + RCX*0x4]
MOV ESI,dword ptr [RBP + -0x20]
CALL 0x00188410
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0x24]
MOV dword ptr [RAX + RCX*0x4],EDX
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,0x1
MOV dword ptr [RBP + -0x24],EAX
JMP 0x00188e01
LAB_00188e34:
JMP 0x00188e36
LAB_00188e36:
ADD RSP,0x30
POP RBP
RET
|
void composition_clear(long param_1,int param_2,int8 param_3,int param_4)
{
int4 uVar1;
int4 local_2c;
if (param_4 == 0xff) {
plutovg_memfill32(param_1,param_2,0);
}
else {
for (local_2c = 0; local_2c < param_2; local_2c = local_2c + 1) {
uVar1 = BYTE_MUL(*(int4 *)(param_1 + (long)local_2c * 4),0xff - param_4);
*(int4 *)(param_1 + (long)local_2c * 4) = uVar1;
}
}
return;
}
|
|
6,599 | composition_clear | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-blend.c | static void composition_clear(uint32_t* dest, int length, const uint32_t* src, uint32_t const_alpha)
{
if(const_alpha == 255) {
plutovg_memfill32(dest, length, 0);
} else {
uint32_t ialpha = 255 - const_alpha;
for(int i = 0; i < length; i++) {
dest[i] = BYTE_MUL(dest[i], ialpha);
}
}
} | O3 | c | composition_clear:
cmpl $0xff, %ecx
jne 0x410e6
xorl %edx, %edx
jmp 0x3ef00
testl %esi, %esi
jle 0x41156
movl $0xff, %eax
subl %ecx, %eax
movl %esi, %ecx
xorl %edx, %edx
movl $0xff00ff, %esi # imm = 0xFF00FF
movl $0x800080, %r8d # imm = 0x800080
movl (%rdi,%rdx,4), %r9d
movl %r9d, %r10d
andl %esi, %r10d
imull %eax, %r10d
movl %r10d, %r11d
shrl $0x8, %r11d
andl %esi, %r11d
addl %r8d, %r10d
addl %r11d, %r10d
shrl $0x8, %r10d
andl %esi, %r10d
shrl $0x8, %r9d
andl %esi, %r9d
imull %eax, %r9d
movl %r9d, %r11d
shrl $0x8, %r11d
andl %esi, %r11d
addl %r8d, %r9d
addl %r11d, %r9d
andl $0xff00ff00, %r9d # imm = 0xFF00FF00
orl %r10d, %r9d
movl %r9d, (%rdi,%rdx,4)
incq %rdx
cmpq %rdx, %rcx
jne 0x41100
retq
| composition_clear:
cmp ecx, 0FFh
jnz short loc_410E6
xor edx, edx
jmp plutovg_memfill32
loc_410E6:
test esi, esi
jle short locret_41156
mov eax, 0FFh
sub eax, ecx
mov ecx, esi
xor edx, edx
mov esi, 0FF00FFh
mov r8d, 800080h
loc_41100:
mov r9d, [rdi+rdx*4]
mov r10d, r9d
and r10d, esi
imul r10d, eax
mov r11d, r10d
shr r11d, 8
and r11d, esi
add r10d, r8d
add r10d, r11d
shr r10d, 8
and r10d, esi
shr r9d, 8
and r9d, esi
imul r9d, eax
mov r11d, r9d
shr r11d, 8
and r11d, esi
add r9d, r8d
add r9d, r11d
and r9d, 0FF00FF00h
or r9d, r10d
mov [rdi+rdx*4], r9d
inc rdx
cmp rcx, rdx
jnz short loc_41100
locret_41156:
retn
| void composition_clear(__m128i *a1, int a2, long long a3, int a4)
{
int v4; // eax
long long i; // rdx
if ( a4 == 255 )
{
plutovg_memfill32(a1, a2, 0);
}
else if ( a2 > 0 )
{
for ( i = 0LL; i != a2; ++i )
{
v4 = 255 - a4;
a1->m128i_i32[i] = (((((v4 * (a1->m128i_i32[i] & 0xFF00FFu)) >> 8) & 0xFF00FF)
+ v4 * (a1->m128i_i32[i] & 0xFF00FF)
+ 8388736) >> 8) & 0xFF00FF | ((((v4 * (((unsigned __int32)a1->m128i_i32[i] >> 8) & 0xFF00FF)) >> 8) & 0xFF00FF)
+ v4 * (((unsigned __int32)a1->m128i_i32[i] >> 8) & 0xFF00FF)
+ 8388736) & 0xFF00FF00;
}
}
}
| composition_clear:
CMP ECX,0xff
JNZ 0x001410e6
XOR EDX,EDX
JMP 0x0013ef00
LAB_001410e6:
TEST ESI,ESI
JLE 0x00141156
MOV EAX,0xff
SUB EAX,ECX
MOV ECX,ESI
XOR EDX,EDX
MOV ESI,0xff00ff
MOV R8D,0x800080
LAB_00141100:
MOV R9D,dword ptr [RDI + RDX*0x4]
MOV R10D,R9D
AND R10D,ESI
IMUL R10D,EAX
MOV R11D,R10D
SHR R11D,0x8
AND R11D,ESI
ADD R10D,R8D
ADD R10D,R11D
SHR R10D,0x8
AND R10D,ESI
SHR R9D,0x8
AND R9D,ESI
IMUL R9D,EAX
MOV R11D,R9D
SHR R11D,0x8
AND R11D,ESI
ADD R9D,R8D
ADD R9D,R11D
AND R9D,0xff00ff00
OR R9D,R10D
MOV dword ptr [RDI + RDX*0x4],R9D
INC RDX
CMP RCX,RDX
JNZ 0x00141100
LAB_00141156:
RET
|
void composition_clear(long param_1,ulong param_2,int8 param_3,int param_4)
{
ulong uVar1;
uint uVar2;
uint uVar3;
if (param_4 == 0xff) {
plutovg_memfill32(param_1,param_2,0);
return;
}
if (0 < (int)param_2) {
uVar1 = 0;
do {
uVar2 = *(uint *)(param_1 + uVar1 * 4);
uVar3 = (uVar2 & 0xff00ff) * (0xff - param_4);
uVar2 = (uVar2 >> 8 & 0xff00ff) * (0xff - param_4);
*(uint *)(param_1 + uVar1 * 4) =
uVar2 + 0x800080 + (uVar2 >> 8 & 0xff00ff) & 0xff00ff00 |
uVar3 + 0x800080 + (uVar3 >> 8 & 0xff00ff) >> 8 & 0xff00ff;
uVar1 = uVar1 + 1;
} while ((param_2 & 0xffffffff) != uVar1);
}
return;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.