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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
55,100 | dequantize_row_q6_K | ngxson[P]ggml-easy/ggml/src/ggml-quants.c | void dequantize_row_q6_K(const block_q6_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k) {
assert(k % QK_K == 0);
const int64_t nb = k / QK_K;
for (int i = 0; i < nb; i++) {
const float d = GGML_FP16_TO_FP32(x[i].d);
const uint8_t * GGML_RESTRICT ql = x[i].ql;
const uint8_t * GGML_RESTRICT qh = x[i].qh;
const int8_t * GGML_RESTRICT sc = x[i].scales;
for (int n = 0; n < QK_K; n += 128) {
for (int l = 0; l < 32; ++l) {
int is = l/16;
const int8_t q1 = (int8_t)((ql[l + 0] & 0xF) | (((qh[l] >> 0) & 3) << 4)) - 32;
const int8_t q2 = (int8_t)((ql[l + 32] & 0xF) | (((qh[l] >> 2) & 3) << 4)) - 32;
const int8_t q3 = (int8_t)((ql[l + 0] >> 4) | (((qh[l] >> 4) & 3) << 4)) - 32;
const int8_t q4 = (int8_t)((ql[l + 32] >> 4) | (((qh[l] >> 6) & 3) << 4)) - 32;
y[l + 0] = d * sc[is + 0] * q1;
y[l + 32] = d * sc[is + 2] * q2;
y[l + 64] = d * sc[is + 4] * q3;
y[l + 96] = d * sc[is + 6] * q4;
}
y += 128;
ql += 64;
qh += 32;
sc += 8;
}
}
} | O0 | c | dequantize_row_q6_K:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x40(%rsp), %rax
movl $0x100, %ecx # imm = 0x100
cqto
idivq %rcx
movq %rax, 0x38(%rsp)
movl $0x0, 0x34(%rsp)
movslq 0x34(%rsp), %rax
cmpq 0x38(%rsp), %rax
jge 0x7755f
movq 0x50(%rsp), %rax
movslq 0x34(%rsp), %rcx
imulq $0xd2, %rcx, %rcx
addq %rcx, %rax
movzwl 0xd0(%rax), %edi
callq 0x6f9d0
movss %xmm0, 0x30(%rsp)
movq 0x50(%rsp), %rax
movslq 0x34(%rsp), %rcx
imulq $0xd2, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x28(%rsp)
movq 0x50(%rsp), %rax
movslq 0x34(%rsp), %rcx
imulq $0xd2, %rcx, %rcx
addq %rcx, %rax
addq $0x80, %rax
movq %rax, 0x20(%rsp)
movq 0x50(%rsp), %rax
movslq 0x34(%rsp), %rcx
imulq $0xd2, %rcx, %rcx
addq %rcx, %rax
addq $0xc0, %rax
movq %rax, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
cmpl $0x100, 0x14(%rsp) # imm = 0x100
jge 0x7754d
movl $0x0, 0x10(%rsp)
cmpl $0x20, 0x10(%rsp)
jge 0x77501
movl 0x10(%rsp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
movl %eax, 0xc(%rsp)
movq 0x28(%rsp), %rax
movl 0x10(%rsp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
andl $0xf, %eax
movq 0x20(%rsp), %rcx
movslq 0x10(%rsp), %rdx
movzbl (%rcx,%rdx), %ecx
sarl $0x0, %ecx
andl $0x3, %ecx
shll $0x4, %ecx
orl %ecx, %eax
movsbl %al, %eax
subl $0x20, %eax
movb %al, 0xb(%rsp)
movq 0x28(%rsp), %rax
movl 0x10(%rsp), %ecx
addl $0x20, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
andl $0xf, %eax
movq 0x20(%rsp), %rcx
movslq 0x10(%rsp), %rdx
movzbl (%rcx,%rdx), %ecx
sarl $0x2, %ecx
andl $0x3, %ecx
shll $0x4, %ecx
orl %ecx, %eax
movsbl %al, %eax
subl $0x20, %eax
movb %al, 0xa(%rsp)
movq 0x28(%rsp), %rax
movl 0x10(%rsp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
sarl $0x4, %eax
movq 0x20(%rsp), %rcx
movslq 0x10(%rsp), %rdx
movzbl (%rcx,%rdx), %ecx
sarl $0x4, %ecx
andl $0x3, %ecx
shll $0x4, %ecx
orl %ecx, %eax
movsbl %al, %eax
subl $0x20, %eax
movb %al, 0x9(%rsp)
movq 0x28(%rsp), %rax
movl 0x10(%rsp), %ecx
addl $0x20, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
sarl $0x4, %eax
movq 0x20(%rsp), %rcx
movslq 0x10(%rsp), %rdx
movzbl (%rcx,%rdx), %ecx
sarl $0x6, %ecx
andl $0x3, %ecx
shll $0x4, %ecx
orl %ecx, %eax
movsbl %al, %eax
subl $0x20, %eax
movb %al, 0x8(%rsp)
movss 0x30(%rsp), %xmm0
movq 0x18(%rsp), %rax
movl 0xc(%rsp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cvtsi2ss %eax, %xmm1
mulss %xmm1, %xmm0
movsbl 0xb(%rsp), %eax
cvtsi2ss %eax, %xmm1
mulss %xmm1, %xmm0
movq 0x48(%rsp), %rax
movl 0x10(%rsp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movss %xmm0, (%rax,%rcx,4)
movss 0x30(%rsp), %xmm0
movq 0x18(%rsp), %rax
movl 0xc(%rsp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cvtsi2ss %eax, %xmm1
mulss %xmm1, %xmm0
movsbl 0xa(%rsp), %eax
cvtsi2ss %eax, %xmm1
mulss %xmm1, %xmm0
movq 0x48(%rsp), %rax
movl 0x10(%rsp), %ecx
addl $0x20, %ecx
movslq %ecx, %rcx
movss %xmm0, (%rax,%rcx,4)
movss 0x30(%rsp), %xmm0
movq 0x18(%rsp), %rax
movl 0xc(%rsp), %ecx
addl $0x4, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cvtsi2ss %eax, %xmm1
mulss %xmm1, %xmm0
movsbl 0x9(%rsp), %eax
cvtsi2ss %eax, %xmm1
mulss %xmm1, %xmm0
movq 0x48(%rsp), %rax
movl 0x10(%rsp), %ecx
addl $0x40, %ecx
movslq %ecx, %rcx
movss %xmm0, (%rax,%rcx,4)
movss 0x30(%rsp), %xmm0
movq 0x18(%rsp), %rax
movl 0xc(%rsp), %ecx
addl $0x6, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cvtsi2ss %eax, %xmm1
mulss %xmm1, %xmm0
movsbl 0x8(%rsp), %eax
cvtsi2ss %eax, %xmm1
mulss %xmm1, %xmm0
movq 0x48(%rsp), %rax
movl 0x10(%rsp), %ecx
addl $0x60, %ecx
movslq %ecx, %rcx
movss %xmm0, (%rax,%rcx,4)
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x772ea
movq 0x48(%rsp), %rax
addq $0x200, %rax # imm = 0x200
movq %rax, 0x48(%rsp)
movq 0x28(%rsp), %rax
addq $0x40, %rax
movq %rax, 0x28(%rsp)
movq 0x20(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x20(%rsp)
movq 0x18(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x18(%rsp)
movl 0x14(%rsp), %eax
addl $0x80, %eax
movl %eax, 0x14(%rsp)
jmp 0x772d4
jmp 0x7754f
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0x7723f
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
| dequantize_row_q6_K:
sub rsp, 58h
mov [rsp+58h+var_8], rdi
mov [rsp+58h+var_10], rsi
mov [rsp+58h+var_18], rdx
mov rax, [rsp+58h+var_18]
mov ecx, 100h
cqo
idiv rcx
mov [rsp+58h+var_20], rax
mov [rsp+58h+var_24], 0
loc_7723F:
movsxd rax, [rsp+58h+var_24]
cmp rax, [rsp+58h+var_20]
jge loc_7755F
mov rax, [rsp+58h+var_8]
movsxd rcx, [rsp+58h+var_24]
imul rcx, 0D2h
add rax, rcx
movzx edi, word ptr [rax+0D0h]
call ggml_lookup_fp16_to_fp32_0
movss [rsp+58h+var_28], xmm0
mov rax, [rsp+58h+var_8]
movsxd rcx, [rsp+58h+var_24]
imul rcx, 0D2h
add rax, rcx
mov [rsp+58h+var_30], rax
mov rax, [rsp+58h+var_8]
movsxd rcx, [rsp+58h+var_24]
imul rcx, 0D2h
add rax, rcx
add rax, 80h
mov [rsp+58h+var_38], rax
mov rax, [rsp+58h+var_8]
movsxd rcx, [rsp+58h+var_24]
imul rcx, 0D2h
add rax, rcx
add rax, 0C0h
mov [rsp+58h+var_40], rax
mov [rsp+58h+var_44], 0
loc_772D4:
cmp [rsp+58h+var_44], 100h
jge loc_7754D
mov [rsp+58h+var_48], 0
loc_772EA:
cmp [rsp+58h+var_48], 20h ; ' '
jge loc_77501
mov eax, [rsp+58h+var_48]
mov ecx, 10h
cdq
idiv ecx
mov [rsp+58h+var_4C], eax
mov rax, [rsp+58h+var_30]
mov ecx, [rsp+58h+var_48]
add ecx, 0
movsxd rcx, ecx
movzx eax, byte ptr [rax+rcx]
and eax, 0Fh
mov rcx, [rsp+58h+var_38]
movsxd rdx, [rsp+58h+var_48]
movzx ecx, byte ptr [rcx+rdx]
sar ecx, 0
and ecx, 3
shl ecx, 4
or eax, ecx
movsx eax, al
sub eax, 20h ; ' '
mov [rsp+58h+var_4D], al
mov rax, [rsp+58h+var_30]
mov ecx, [rsp+58h+var_48]
add ecx, 20h ; ' '
movsxd rcx, ecx
movzx eax, byte ptr [rax+rcx]
and eax, 0Fh
mov rcx, [rsp+58h+var_38]
movsxd rdx, [rsp+58h+var_48]
movzx ecx, byte ptr [rcx+rdx]
sar ecx, 2
and ecx, 3
shl ecx, 4
or eax, ecx
movsx eax, al
sub eax, 20h ; ' '
mov [rsp+58h+var_4E], al
mov rax, [rsp+58h+var_30]
mov ecx, [rsp+58h+var_48]
add ecx, 0
movsxd rcx, ecx
movzx eax, byte ptr [rax+rcx]
sar eax, 4
mov rcx, [rsp+58h+var_38]
movsxd rdx, [rsp+58h+var_48]
movzx ecx, byte ptr [rcx+rdx]
sar ecx, 4
and ecx, 3
shl ecx, 4
or eax, ecx
movsx eax, al
sub eax, 20h ; ' '
mov [rsp+58h+var_4F], al
mov rax, [rsp+58h+var_30]
mov ecx, [rsp+58h+var_48]
add ecx, 20h ; ' '
movsxd rcx, ecx
movzx eax, byte ptr [rax+rcx]
sar eax, 4
mov rcx, [rsp+58h+var_38]
movsxd rdx, [rsp+58h+var_48]
movzx ecx, byte ptr [rcx+rdx]
sar ecx, 6
and ecx, 3
shl ecx, 4
or eax, ecx
movsx eax, al
sub eax, 20h ; ' '
mov [rsp+58h+var_50], al
movss xmm0, [rsp+58h+var_28]
mov rax, [rsp+58h+var_40]
mov ecx, [rsp+58h+var_4C]
add ecx, 0
movsxd rcx, ecx
movsx eax, byte ptr [rax+rcx]
cvtsi2ss xmm1, eax
mulss xmm0, xmm1
movsx eax, [rsp+58h+var_4D]
cvtsi2ss xmm1, eax
mulss xmm0, xmm1
mov rax, [rsp+58h+var_10]
mov ecx, [rsp+58h+var_48]
add ecx, 0
movsxd rcx, ecx
movss dword ptr [rax+rcx*4], xmm0
movss xmm0, [rsp+58h+var_28]
mov rax, [rsp+58h+var_40]
mov ecx, [rsp+58h+var_4C]
add ecx, 2
movsxd rcx, ecx
movsx eax, byte ptr [rax+rcx]
cvtsi2ss xmm1, eax
mulss xmm0, xmm1
movsx eax, [rsp+58h+var_4E]
cvtsi2ss xmm1, eax
mulss xmm0, xmm1
mov rax, [rsp+58h+var_10]
mov ecx, [rsp+58h+var_48]
add ecx, 20h ; ' '
movsxd rcx, ecx
movss dword ptr [rax+rcx*4], xmm0
movss xmm0, [rsp+58h+var_28]
mov rax, [rsp+58h+var_40]
mov ecx, [rsp+58h+var_4C]
add ecx, 4
movsxd rcx, ecx
movsx eax, byte ptr [rax+rcx]
cvtsi2ss xmm1, eax
mulss xmm0, xmm1
movsx eax, [rsp+58h+var_4F]
cvtsi2ss xmm1, eax
mulss xmm0, xmm1
mov rax, [rsp+58h+var_10]
mov ecx, [rsp+58h+var_48]
add ecx, 40h ; '@'
movsxd rcx, ecx
movss dword ptr [rax+rcx*4], xmm0
movss xmm0, [rsp+58h+var_28]
mov rax, [rsp+58h+var_40]
mov ecx, [rsp+58h+var_4C]
add ecx, 6
movsxd rcx, ecx
movsx eax, byte ptr [rax+rcx]
cvtsi2ss xmm1, eax
mulss xmm0, xmm1
movsx eax, [rsp+58h+var_50]
cvtsi2ss xmm1, eax
mulss xmm0, xmm1
mov rax, [rsp+58h+var_10]
mov ecx, [rsp+58h+var_48]
add ecx, 60h ; '`'
movsxd rcx, ecx
movss dword ptr [rax+rcx*4], xmm0
mov eax, [rsp+58h+var_48]
add eax, 1
mov [rsp+58h+var_48], eax
jmp loc_772EA
loc_77501:
mov rax, [rsp+58h+var_10]
add rax, 200h
mov [rsp+58h+var_10], rax
mov rax, [rsp+58h+var_30]
add rax, 40h ; '@'
mov [rsp+58h+var_30], rax
mov rax, [rsp+58h+var_38]
add rax, 20h ; ' '
mov [rsp+58h+var_38], rax
mov rax, [rsp+58h+var_40]
add rax, 8
mov [rsp+58h+var_40], rax
mov eax, [rsp+58h+var_44]
add eax, 80h
mov [rsp+58h+var_44], eax
jmp loc_772D4
loc_7754D:
jmp short $+2
loc_7754F:
mov eax, [rsp+58h+var_24]
add eax, 1
mov [rsp+58h+var_24], eax
jmp loc_7723F
loc_7755F:
add rsp, 58h
retn
| long long dequantize_row_q6_K(long long a1, long long a2, long long a3)
{
long long result; // rax
char v4; // [rsp+8h] [rbp-50h]
char v5; // [rsp+9h] [rbp-4Fh]
char v6; // [rsp+Ah] [rbp-4Eh]
int k; // [rsp+10h] [rbp-48h]
int j; // [rsp+14h] [rbp-44h]
long long v9; // [rsp+18h] [rbp-40h]
long long v10; // [rsp+20h] [rbp-38h]
long long v11; // [rsp+28h] [rbp-30h]
float v12; // [rsp+30h] [rbp-28h]
int i; // [rsp+34h] [rbp-24h]
long long v14; // [rsp+38h] [rbp-20h]
v14 = a3 / 256;
for ( i = 0; ; ++i )
{
result = i;
if ( i >= v14 )
break;
v12 = ggml_lookup_fp16_to_fp32_0(*(_WORD *)(210LL * i + a1 + 208));
v11 = 210LL * i + a1;
v10 = v11 + 128;
v9 = v11 + 192;
for ( j = 0; j < 256; j += 128 )
{
for ( k = 0; k < 32; ++k )
{
v6 = ((16 * (((int)*(unsigned __int8 *)(v10 + k) >> 2) & 3)) | *(_BYTE *)(v11 + k + 32) & 0xF) - 32;
v5 = ((16 * (((int)*(unsigned __int8 *)(v10 + k) >> 4) & 3)) | ((int)*(unsigned __int8 *)(v11 + k) >> 4)) - 32;
v4 = ((16 * (((int)*(unsigned __int8 *)(v10 + k) >> 6) & 3)) | ((int)*(unsigned __int8 *)(v11 + k + 32) >> 4))
- 32;
*(float *)(a2 + 4LL * k) = (float)(v12 * (float)*(char *)(v9 + k / 16))
* (float)(char)(((16 * (*(_BYTE *)(v10 + k) & 3)) | *(_BYTE *)(v11 + k) & 0xF) - 32);
*(float *)(a2 + 4LL * (k + 32)) = (float)(v12 * (float)*(char *)(v9 + k / 16 + 2)) * (float)v6;
*(float *)(a2 + 4LL * (k + 64)) = (float)(v12 * (float)*(char *)(v9 + k / 16 + 4)) * (float)v5;
*(float *)(a2 + 4LL * (k + 96)) = (float)(v12 * (float)*(char *)(v9 + k / 16 + 6)) * (float)v4;
}
a2 += 512LL;
v11 += 64LL;
v10 += 32LL;
v9 += 8LL;
}
}
return result;
}
| dequantize_row_q6_K:
SUB RSP,0x58
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV qword ptr [RSP + 0x40],RDX
MOV RAX,qword ptr [RSP + 0x40]
MOV ECX,0x100
CQO
IDIV RCX
MOV qword ptr [RSP + 0x38],RAX
MOV dword ptr [RSP + 0x34],0x0
LAB_0017723f:
MOVSXD RAX,dword ptr [RSP + 0x34]
CMP RAX,qword ptr [RSP + 0x38]
JGE 0x0017755f
MOV RAX,qword ptr [RSP + 0x50]
MOVSXD RCX,dword ptr [RSP + 0x34]
IMUL RCX,RCX,0xd2
ADD RAX,RCX
MOVZX EDI,word ptr [RAX + 0xd0]
CALL 0x0016f9d0
MOVSS dword ptr [RSP + 0x30],XMM0
MOV RAX,qword ptr [RSP + 0x50]
MOVSXD RCX,dword ptr [RSP + 0x34]
IMUL RCX,RCX,0xd2
ADD RAX,RCX
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x50]
MOVSXD RCX,dword ptr [RSP + 0x34]
IMUL RCX,RCX,0xd2
ADD RAX,RCX
ADD RAX,0x80
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x50]
MOVSXD RCX,dword ptr [RSP + 0x34]
IMUL RCX,RCX,0xd2
ADD RAX,RCX
ADD RAX,0xc0
MOV qword ptr [RSP + 0x18],RAX
MOV dword ptr [RSP + 0x14],0x0
LAB_001772d4:
CMP dword ptr [RSP + 0x14],0x100
JGE 0x0017754d
MOV dword ptr [RSP + 0x10],0x0
LAB_001772ea:
CMP dword ptr [RSP + 0x10],0x20
JGE 0x00177501
MOV EAX,dword ptr [RSP + 0x10]
MOV ECX,0x10
CDQ
IDIV ECX
MOV dword ptr [RSP + 0xc],EAX
MOV RAX,qword ptr [RSP + 0x28]
MOV ECX,dword ptr [RSP + 0x10]
ADD ECX,0x0
MOVSXD RCX,ECX
MOVZX EAX,byte ptr [RAX + RCX*0x1]
AND EAX,0xf
MOV RCX,qword ptr [RSP + 0x20]
MOVSXD RDX,dword ptr [RSP + 0x10]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
SAR ECX,0x0
AND ECX,0x3
SHL ECX,0x4
OR EAX,ECX
MOVSX EAX,AL
SUB EAX,0x20
MOV byte ptr [RSP + 0xb],AL
MOV RAX,qword ptr [RSP + 0x28]
MOV ECX,dword ptr [RSP + 0x10]
ADD ECX,0x20
MOVSXD RCX,ECX
MOVZX EAX,byte ptr [RAX + RCX*0x1]
AND EAX,0xf
MOV RCX,qword ptr [RSP + 0x20]
MOVSXD RDX,dword ptr [RSP + 0x10]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
SAR ECX,0x2
AND ECX,0x3
SHL ECX,0x4
OR EAX,ECX
MOVSX EAX,AL
SUB EAX,0x20
MOV byte ptr [RSP + 0xa],AL
MOV RAX,qword ptr [RSP + 0x28]
MOV ECX,dword ptr [RSP + 0x10]
ADD ECX,0x0
MOVSXD RCX,ECX
MOVZX EAX,byte ptr [RAX + RCX*0x1]
SAR EAX,0x4
MOV RCX,qword ptr [RSP + 0x20]
MOVSXD RDX,dword ptr [RSP + 0x10]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
SAR ECX,0x4
AND ECX,0x3
SHL ECX,0x4
OR EAX,ECX
MOVSX EAX,AL
SUB EAX,0x20
MOV byte ptr [RSP + 0x9],AL
MOV RAX,qword ptr [RSP + 0x28]
MOV ECX,dword ptr [RSP + 0x10]
ADD ECX,0x20
MOVSXD RCX,ECX
MOVZX EAX,byte ptr [RAX + RCX*0x1]
SAR EAX,0x4
MOV RCX,qword ptr [RSP + 0x20]
MOVSXD RDX,dword ptr [RSP + 0x10]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
SAR ECX,0x6
AND ECX,0x3
SHL ECX,0x4
OR EAX,ECX
MOVSX EAX,AL
SUB EAX,0x20
MOV byte ptr [RSP + 0x8],AL
MOVSS XMM0,dword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x18]
MOV ECX,dword ptr [RSP + 0xc]
ADD ECX,0x0
MOVSXD RCX,ECX
MOVSX EAX,byte ptr [RAX + RCX*0x1]
CVTSI2SS XMM1,EAX
MULSS XMM0,XMM1
MOVSX EAX,byte ptr [RSP + 0xb]
CVTSI2SS XMM1,EAX
MULSS XMM0,XMM1
MOV RAX,qword ptr [RSP + 0x48]
MOV ECX,dword ptr [RSP + 0x10]
ADD ECX,0x0
MOVSXD RCX,ECX
MOVSS dword ptr [RAX + RCX*0x4],XMM0
MOVSS XMM0,dword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x18]
MOV ECX,dword ptr [RSP + 0xc]
ADD ECX,0x2
MOVSXD RCX,ECX
MOVSX EAX,byte ptr [RAX + RCX*0x1]
CVTSI2SS XMM1,EAX
MULSS XMM0,XMM1
MOVSX EAX,byte ptr [RSP + 0xa]
CVTSI2SS XMM1,EAX
MULSS XMM0,XMM1
MOV RAX,qword ptr [RSP + 0x48]
MOV ECX,dword ptr [RSP + 0x10]
ADD ECX,0x20
MOVSXD RCX,ECX
MOVSS dword ptr [RAX + RCX*0x4],XMM0
MOVSS XMM0,dword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x18]
MOV ECX,dword ptr [RSP + 0xc]
ADD ECX,0x4
MOVSXD RCX,ECX
MOVSX EAX,byte ptr [RAX + RCX*0x1]
CVTSI2SS XMM1,EAX
MULSS XMM0,XMM1
MOVSX EAX,byte ptr [RSP + 0x9]
CVTSI2SS XMM1,EAX
MULSS XMM0,XMM1
MOV RAX,qword ptr [RSP + 0x48]
MOV ECX,dword ptr [RSP + 0x10]
ADD ECX,0x40
MOVSXD RCX,ECX
MOVSS dword ptr [RAX + RCX*0x4],XMM0
MOVSS XMM0,dword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x18]
MOV ECX,dword ptr [RSP + 0xc]
ADD ECX,0x6
MOVSXD RCX,ECX
MOVSX EAX,byte ptr [RAX + RCX*0x1]
CVTSI2SS XMM1,EAX
MULSS XMM0,XMM1
MOVSX EAX,byte ptr [RSP + 0x8]
CVTSI2SS XMM1,EAX
MULSS XMM0,XMM1
MOV RAX,qword ptr [RSP + 0x48]
MOV ECX,dword ptr [RSP + 0x10]
ADD ECX,0x60
MOVSXD RCX,ECX
MOVSS dword ptr [RAX + RCX*0x4],XMM0
MOV EAX,dword ptr [RSP + 0x10]
ADD EAX,0x1
MOV dword ptr [RSP + 0x10],EAX
JMP 0x001772ea
LAB_00177501:
MOV RAX,qword ptr [RSP + 0x48]
ADD RAX,0x200
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSP + 0x28]
ADD RAX,0x40
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,0x20
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x18]
ADD RAX,0x8
MOV qword ptr [RSP + 0x18],RAX
MOV EAX,dword ptr [RSP + 0x14]
ADD EAX,0x80
MOV dword ptr [RSP + 0x14],EAX
JMP 0x001772d4
LAB_0017754d:
JMP 0x0017754f
LAB_0017754f:
MOV EAX,dword ptr [RSP + 0x34]
ADD EAX,0x1
MOV dword ptr [RSP + 0x34],EAX
JMP 0x0017723f
LAB_0017755f:
ADD RSP,0x58
RET
|
void dequantize_row_q6_K(long param_1,long param_2,long param_3)
{
byte bVar1;
byte bVar2;
byte bVar3;
byte bVar4;
byte bVar5;
byte bVar6;
int iVar7;
float fVar8;
int4 local_48;
int4 local_44;
int8 local_40;
int8 local_38;
int8 local_30;
int4 local_24;
int8 local_10;
local_10 = param_2;
for (local_24 = 0; (long)local_24 < param_3 / 0x100; local_24 = local_24 + 1) {
fVar8 = (float)ggml_lookup_fp16_to_fp32(*(int2 *)(param_1 + (long)local_24 * 0xd2 + 0xd0))
;
local_30 = param_1 + (long)local_24 * 0xd2;
local_38 = param_1 + (long)local_24 * 0xd2 + 0x80;
local_40 = param_1 + (long)local_24 * 0xd2 + 0xc0;
for (local_44 = 0; local_44 < 0x100; local_44 = local_44 + 0x80) {
for (local_48 = 0; local_48 < 0x20; local_48 = local_48 + 1) {
iVar7 = local_48 / 0x10;
bVar1 = *(byte *)(local_30 + (local_48 + 0x20));
bVar2 = *(byte *)(local_38 + local_48);
bVar3 = *(byte *)(local_30 + local_48);
bVar4 = *(byte *)(local_38 + local_48);
bVar5 = *(byte *)(local_30 + (local_48 + 0x20));
bVar6 = *(byte *)(local_38 + local_48);
*(float *)(local_10 + (long)local_48 * 4) =
fVar8 * (float)(int)*(char *)(local_40 + iVar7) *
(float)(int)(char)((*(byte *)(local_30 + local_48) & 0xf |
(byte)((*(byte *)(local_38 + local_48) & 3) << 4)) - 0x20);
*(float *)(local_10 + (long)(local_48 + 0x20) * 4) =
fVar8 * (float)(int)*(char *)(local_40 + (iVar7 + 2)) *
(float)(int)(char)((bVar1 & 0xf | (byte)(((int)(uint)bVar2 >> 2 & 3U) << 4)) - 0x20);
*(float *)(local_10 + (long)(local_48 + 0x40) * 4) =
fVar8 * (float)(int)*(char *)(local_40 + (iVar7 + 4)) *
(float)(int)(char)(((byte)((int)(uint)bVar3 >> 4) |
(byte)(((int)(uint)bVar4 >> 4 & 3U) << 4)) - 0x20);
*(float *)(local_10 + (long)(local_48 + 0x60) * 4) =
fVar8 * (float)(int)*(char *)(local_40 + (iVar7 + 6)) *
(float)(int)(char)(((byte)((int)(uint)bVar5 >> 4) |
(byte)(((int)(uint)bVar6 >> 6) << 4)) - 0x20);
}
local_10 = local_10 + 0x200;
local_30 = local_30 + 0x40;
local_38 = local_38 + 0x20;
local_40 = local_40 + 8;
}
}
return;
}
| |
55,101 | dequantize_row_q6_K | ngxson[P]ggml-easy/ggml/src/ggml-quants.c | void dequantize_row_q6_K(const block_q6_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k) {
assert(k % QK_K == 0);
const int64_t nb = k / QK_K;
for (int i = 0; i < nb; i++) {
const float d = GGML_FP16_TO_FP32(x[i].d);
const uint8_t * GGML_RESTRICT ql = x[i].ql;
const uint8_t * GGML_RESTRICT qh = x[i].qh;
const int8_t * GGML_RESTRICT sc = x[i].scales;
for (int n = 0; n < QK_K; n += 128) {
for (int l = 0; l < 32; ++l) {
int is = l/16;
const int8_t q1 = (int8_t)((ql[l + 0] & 0xF) | (((qh[l] >> 0) & 3) << 4)) - 32;
const int8_t q2 = (int8_t)((ql[l + 32] & 0xF) | (((qh[l] >> 2) & 3) << 4)) - 32;
const int8_t q3 = (int8_t)((ql[l + 0] >> 4) | (((qh[l] >> 4) & 3) << 4)) - 32;
const int8_t q4 = (int8_t)((ql[l + 32] >> 4) | (((qh[l] >> 6) & 3) << 4)) - 32;
y[l + 0] = d * sc[is + 0] * q1;
y[l + 32] = d * sc[is + 2] * q2;
y[l + 64] = d * sc[is + 4] * q3;
y[l + 96] = d * sc[is + 6] * q4;
}
y += 128;
ql += 64;
qh += 32;
sc += 8;
}
}
} | O2 | c | dequantize_row_q6_K:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rax
movq %rdi, -0x8(%rsp)
movl $0x100, %ecx # imm = 0x100
cqto
idivq %rcx
xorl %edi, %edi
testq %rax, %rax
cmovleq %rdi, %rax
cmpq %rax, %rdi
je 0x34938
imulq $0xd2, %rdi, %rdx
movq -0x8(%rsp), %rcx
leaq (%rcx,%rdx), %r8
leaq (%rcx,%rdx), %r9
addq $0x80, %r9
movzwl 0x50(%r9), %r10d
movq 0x387b9(%rip), %r11 # 0x6cfa8
movss (%r11,%r10,4), %xmm0
leaq (%rcx,%rdx), %r10
addq $0xc0, %r10
xorl %r11d, %r11d
cmpl $0xff, %r11d
ja 0x34930
xorl %ebx, %ebx
cmpq $0x20, %rbx
je 0x34914
movl %ebx, %r14d
shrl $0x4, %r14d
movb (%r8,%rbx), %r13b
movb 0x20(%r8,%rbx), %dl
movl %r13d, %ebp
andb $0xf, %bpl
movb (%r9,%rbx), %r15b
movl %r15d, %r12d
shlb $0x4, %r12b
andb $0x30, %r12b
orb %bpl, %r12b
addb $-0x20, %r12b
movl %edx, %ebp
movsbl (%r10,%r14), %ecx
cvtsi2ss %ecx, %xmm1
andb $0xf, %bpl
leal (,%r15,4), %ecx
andb $0x30, %cl
orb %bpl, %cl
addb $-0x20, %cl
shrb $0x4, %r13b
movl %r15d, %ebp
andb $0x30, %bpl
orb %r13b, %bpl
addb $-0x20, %bpl
shrb $0x4, %dl
shrb $0x2, %r15b
movsbl %r12b, %r12d
cvtsi2ss %r12d, %xmm2
andb $0x30, %r15b
mulss %xmm0, %xmm1
mulss %xmm1, %xmm2
movss %xmm2, (%rsi,%rbx,4)
movsbl 0x2(%r10,%r14), %r12d
cvtsi2ss %r12d, %xmm1
movsbl %cl, %ecx
cvtsi2ss %ecx, %xmm2
orb %dl, %r15b
mulss %xmm0, %xmm1
mulss %xmm1, %xmm2
movss %xmm2, 0x80(%rsi,%rbx,4)
movsbl 0x4(%r10,%r14), %ecx
cvtsi2ss %ecx, %xmm1
movsbl %bpl, %ecx
cvtsi2ss %ecx, %xmm2
addb $-0x20, %r15b
mulss %xmm0, %xmm1
mulss %xmm1, %xmm2
movss %xmm2, 0x100(%rsi,%rbx,4)
movsbl 0x6(%r10,%r14), %ecx
cvtsi2ss %ecx, %xmm1
movsbl %r15b, %ecx
cvtsi2ss %ecx, %xmm2
mulss %xmm0, %xmm1
mulss %xmm1, %xmm2
movss %xmm2, 0x180(%rsi,%rbx,4)
incq %rbx
jmp 0x34812
addq $0x200, %rsi # imm = 0x200
addq $0x40, %r8
addq $0x20, %r9
addq $0x8, %r10
subl $-0x80, %r11d
jmp 0x34803
incq %rdi
jmp 0x347bf
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| dequantize_row_q6_K:
push rbp
push r15
push r14
push r13
push r12
push rbx
mov rax, rdx
mov [rsp+30h+var_38], rdi
mov ecx, 100h
cqo
idiv rcx
xor edi, edi
test rax, rax
cmovle rax, rdi
loc_347BF:
cmp rdi, rax
jz loc_34938
imul rdx, rdi, 0D2h
mov rcx, [rsp+30h+var_38]
lea r8, [rcx+rdx]
lea r9, [rcx+rdx]
add r9, 80h
movzx r10d, word ptr [r9+50h]
mov r11, cs:ggml_table_f32_f16_ptr
movss xmm0, dword ptr [r11+r10*4]
lea r10, [rcx+rdx]
add r10, 0C0h
xor r11d, r11d
loc_34803:
cmp r11d, 0FFh
ja loc_34930
xor ebx, ebx
loc_34812:
cmp rbx, 20h ; ' '
jz loc_34914
mov r14d, ebx
shr r14d, 4
mov r13b, [r8+rbx]
mov dl, [r8+rbx+20h]
mov ebp, r13d
and bpl, 0Fh
mov r15b, [r9+rbx]
mov r12d, r15d
shl r12b, 4
and r12b, 30h
or r12b, bpl
add r12b, 0E0h
mov ebp, edx
movsx ecx, byte ptr [r10+r14]
cvtsi2ss xmm1, ecx
and bpl, 0Fh
lea ecx, ds:0[r15*4]
and cl, 30h
or cl, bpl
add cl, 0E0h
shr r13b, 4
mov ebp, r15d
and bpl, 30h
or bpl, r13b
add bpl, 0E0h
shr dl, 4
shr r15b, 2
movsx r12d, r12b
cvtsi2ss xmm2, r12d
and r15b, 30h
mulss xmm1, xmm0
mulss xmm2, xmm1
movss dword ptr [rsi+rbx*4], xmm2
movsx r12d, byte ptr [r10+r14+2]
cvtsi2ss xmm1, r12d
movsx ecx, cl
cvtsi2ss xmm2, ecx
or r15b, dl
mulss xmm1, xmm0
mulss xmm2, xmm1
movss dword ptr [rsi+rbx*4+80h], xmm2
movsx ecx, byte ptr [r10+r14+4]
cvtsi2ss xmm1, ecx
movsx ecx, bpl
cvtsi2ss xmm2, ecx
add r15b, 0E0h
mulss xmm1, xmm0
mulss xmm2, xmm1
movss dword ptr [rsi+rbx*4+100h], xmm2
movsx ecx, byte ptr [r10+r14+6]
cvtsi2ss xmm1, ecx
movsx ecx, r15b
cvtsi2ss xmm2, ecx
mulss xmm1, xmm0
mulss xmm2, xmm1
movss dword ptr [rsi+rbx*4+180h], xmm2
inc rbx
jmp loc_34812
loc_34914:
add rsi, 200h
add r8, 40h ; '@'
add r9, 20h ; ' '
add r10, 8
sub r11d, 0FFFFFF80h
jmp loc_34803
loc_34930:
inc rdi
jmp loc_347BF
loc_34938:
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long dequantize_row_q6_K(long long a1, long long a2, long long a3)
{
long long result; // rax
long long v4; // rdi
long long v5; // r8
long long v6; // r9
float v7; // xmm0_4
long long v8; // r10
unsigned int i; // r11d
long long j; // rbx
long long v11; // r14
unsigned __int8 v12; // r15
char v13; // cl
char v14; // bp
char v15; // dl
result = a3 / 256;
v4 = 0LL;
if ( a3 / 256 <= 0 )
result = 0LL;
while ( v4 != result )
{
v5 = a1 + 210 * v4;
v6 = v5 + 128;
v7 = ggml_table_f32_f16[*(unsigned __int16 *)(v5 + 208)];
v8 = v5 + 192;
for ( i = 0; i <= 0xFF; i += 128 )
{
for ( j = 0LL; j != 32; ++j )
{
v11 = (unsigned int)j >> 4;
v12 = *(_BYTE *)(v6 + j);
v13 = (*(_BYTE *)(v5 + j + 32) & 0xF | (4 * v12) & 0x30) - 32;
v14 = ((*(_BYTE *)(v5 + j) >> 4) | v12 & 0x30) - 32;
v15 = *(_BYTE *)(v5 + j + 32) >> 4;
*(float *)(a2 + 4 * j) = (float)(char)((*(_BYTE *)(v5 + j) & 0xF | (16 * v12) & 0x30) - 32)
* (float)((float)*(char *)(v8 + v11) * v7);
*(float *)(a2 + 4 * j + 128) = (float)v13 * (float)((float)*(char *)(v8 + v11 + 2) * v7);
*(float *)(a2 + 4 * j + 256) = (float)v14 * (float)((float)*(char *)(v8 + v11 + 4) * v7);
*(float *)(a2 + 4 * j + 384) = (float)(char)((v15 | (v12 >> 2) & 0x30) - 32)
* (float)((float)*(char *)(v8 + v11 + 6) * v7);
}
a2 += 512LL;
v5 += 64LL;
v6 += 32LL;
v8 += 8LL;
}
++v4;
}
return result;
}
| dequantize_row_q6_K:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RAX,RDX
MOV qword ptr [RSP + -0x8],RDI
MOV ECX,0x100
CQO
IDIV RCX
XOR EDI,EDI
TEST RAX,RAX
CMOVLE RAX,RDI
LAB_001347bf:
CMP RDI,RAX
JZ 0x00134938
IMUL RDX,RDI,0xd2
MOV RCX,qword ptr [RSP + -0x8]
LEA R8,[RCX + RDX*0x1]
LEA R9,[RCX + RDX*0x1]
ADD R9,0x80
MOVZX R10D,word ptr [R9 + 0x50]
MOV R11,qword ptr [0x0016cfa8]
MOVSS XMM0,dword ptr [R11 + R10*0x4]
LEA R10,[RCX + RDX*0x1]
ADD R10,0xc0
XOR R11D,R11D
LAB_00134803:
CMP R11D,0xff
JA 0x00134930
XOR EBX,EBX
LAB_00134812:
CMP RBX,0x20
JZ 0x00134914
MOV R14D,EBX
SHR R14D,0x4
MOV R13B,byte ptr [R8 + RBX*0x1]
MOV DL,byte ptr [R8 + RBX*0x1 + 0x20]
MOV EBP,R13D
AND BPL,0xf
MOV R15B,byte ptr [R9 + RBX*0x1]
MOV R12D,R15D
SHL R12B,0x4
AND R12B,0x30
OR R12B,BPL
ADD R12B,0xe0
MOV EBP,EDX
MOVSX ECX,byte ptr [R10 + R14*0x1]
CVTSI2SS XMM1,ECX
AND BPL,0xf
LEA ECX,[R15*0x4]
AND CL,0x30
OR CL,BPL
ADD CL,0xe0
SHR R13B,0x4
MOV EBP,R15D
AND BPL,0x30
OR BPL,R13B
ADD BPL,0xe0
SHR DL,0x4
SHR R15B,0x2
MOVSX R12D,R12B
CVTSI2SS XMM2,R12D
AND R15B,0x30
MULSS XMM1,XMM0
MULSS XMM2,XMM1
MOVSS dword ptr [RSI + RBX*0x4],XMM2
MOVSX R12D,byte ptr [R10 + R14*0x1 + 0x2]
CVTSI2SS XMM1,R12D
MOVSX ECX,CL
CVTSI2SS XMM2,ECX
OR R15B,DL
MULSS XMM1,XMM0
MULSS XMM2,XMM1
MOVSS dword ptr [RSI + RBX*0x4 + 0x80],XMM2
MOVSX ECX,byte ptr [R10 + R14*0x1 + 0x4]
CVTSI2SS XMM1,ECX
MOVSX ECX,BPL
CVTSI2SS XMM2,ECX
ADD R15B,0xe0
MULSS XMM1,XMM0
MULSS XMM2,XMM1
MOVSS dword ptr [RSI + RBX*0x4 + 0x100],XMM2
MOVSX ECX,byte ptr [R10 + R14*0x1 + 0x6]
CVTSI2SS XMM1,ECX
MOVSX ECX,R15B
CVTSI2SS XMM2,ECX
MULSS XMM1,XMM0
MULSS XMM2,XMM1
MOVSS dword ptr [RSI + RBX*0x4 + 0x180],XMM2
INC RBX
JMP 0x00134812
LAB_00134914:
ADD RSI,0x200
ADD R8,0x40
ADD R9,0x20
ADD R10,0x8
SUB R11D,-0x80
JMP 0x00134803
LAB_00134930:
INC RDI
JMP 0x001347bf
LAB_00134938:
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void dequantize_row_q6_K(long param_1,long param_2,long param_3)
{
float fVar1;
byte bVar2;
byte bVar3;
byte bVar4;
long lVar5;
long lVar6;
ulong uVar7;
long lVar8;
long lVar9;
long lVar10;
uint uVar11;
ulong uVar12;
lVar8 = 0;
lVar5 = param_3 / 0x100;
if (param_3 / 0x100 < 1) {
lVar5 = lVar8;
}
for (; lVar8 != lVar5; lVar8 = lVar8 + 1) {
lVar6 = lVar8 * 0xd2;
lVar9 = param_1 + lVar6;
lVar10 = param_1 + lVar6 + 0x80;
fVar1 = *(float *)(PTR_ggml_table_f32_f16_0016cfa8 +
(ulong)*(ushort *)(param_1 + lVar6 + 0xd0) * 4);
lVar6 = param_1 + lVar6 + 0xc0;
for (uVar11 = 0; uVar11 < 0x100; uVar11 = uVar11 + 0x80) {
for (uVar7 = 0; uVar7 != 0x20; uVar7 = uVar7 + 1) {
uVar12 = uVar7 >> 4 & 0xfffffff;
bVar2 = *(byte *)(lVar9 + uVar7);
bVar3 = *(byte *)(lVar9 + 0x20 + uVar7);
bVar4 = *(byte *)(lVar10 + uVar7);
*(float *)(param_2 + uVar7 * 4) =
(float)(int)(char)(((bVar4 & 3) << 4 | bVar2 & 0xf) - 0x20) *
(float)(int)*(char *)(lVar6 + uVar12) * fVar1;
*(float *)(param_2 + 0x80 + uVar7 * 4) =
(float)(int)(char)((bVar4 * '\x04' & 0x30 | bVar3 & 0xf) - 0x20) *
(float)(int)*(char *)(lVar6 + 2 + uVar12) * fVar1;
*(float *)(param_2 + 0x100 + uVar7 * 4) =
(float)(int)(char)((bVar4 & 0x30 | bVar2 >> 4) - 0x20) *
(float)(int)*(char *)(lVar6 + 4 + uVar12) * fVar1;
*(float *)(param_2 + 0x180 + uVar7 * 4) =
(float)(int)(char)((bVar4 >> 2 & 0x30 | bVar3 >> 4) - 0x20) *
(float)(int)*(char *)(lVar6 + 6 + uVar12) * fVar1;
}
param_2 = param_2 + 0x200;
lVar9 = lVar9 + 0x40;
lVar10 = lVar10 + 0x20;
lVar6 = lVar6 + 8;
}
}
return;
}
| |
55,102 | stbi_is_hdr | monkey531[P]llama/examples/llava/../../common/stb_image.h | STBIDEF int stbi_is_hdr (char const *filename)
{
FILE *f = stbi__fopen(filename, "rb");
int result=0;
if (f) {
result = stbi_is_hdr_from_file(f);
fclose(f);
}
return result;
} | O0 | c | stbi_is_hdr:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x1db920(%rip), %rsi # 0x252625
callq 0x75990
movq %rax, 0x8(%rsp)
movl $0x0, 0x4(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x76d37
movq 0x8(%rsp), %rdi
callq 0x76d40
movl %eax, 0x4(%rsp)
movq 0x8(%rsp), %rdi
callq 0x619d0
movl 0x4(%rsp), %eax
addq $0x18, %rsp
retq
| stbi_is_hdr:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov rdi, [rsp+18h+var_8]; char *
lea rsi, aCrb+2; char *
call _ZL11stbi__fopenPKcS0_; stbi__fopen(char const*,char const*)
mov [rsp+18h+var_10], rax
mov [rsp+18h+var_14], 0
cmp [rsp+18h+var_10], 0
jz short loc_76D37
mov rdi, [rsp+18h+var_10]
call stbi_is_hdr_from_file
mov [rsp+18h+var_14], eax
mov rdi, [rsp+18h+var_10]
call _fclose
loc_76D37:
mov eax, [rsp+18h+var_14]
add rsp, 18h
retn
| long long stbi_is_hdr(const char *a1)
{
unsigned int is_hdr_from_file; // [rsp+4h] [rbp-14h]
long long v3; // [rsp+8h] [rbp-10h]
v3 = stbi__fopen(a1, "rb");
is_hdr_from_file = 0;
if ( v3 )
{
is_hdr_from_file = stbi_is_hdr_from_file(v3);
fclose(v3);
}
return is_hdr_from_file;
}
| stbi_is_hdr:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[0x352625]
CALL 0x00175990
MOV qword ptr [RSP + 0x8],RAX
MOV dword ptr [RSP + 0x4],0x0
CMP qword ptr [RSP + 0x8],0x0
JZ 0x00176d37
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00176d40
MOV dword ptr [RSP + 0x4],EAX
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001619d0
LAB_00176d37:
MOV EAX,dword ptr [RSP + 0x4]
ADD RSP,0x18
RET
|
int4 stbi_is_hdr(char *param_1)
{
FILE *__stream;
int4 local_14;
__stream = (FILE *)stbi__fopen(param_1,"rb");
local_14 = 0;
if (__stream != (FILE *)0x0) {
local_14 = stbi_is_hdr_from_file(__stream);
fclose(__stream);
}
return local_14;
}
| |
55,103 | google::protobuf::EnumDescriptor::CopyTo(google::protobuf::EnumDescriptorProto*) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc | void EnumDescriptor::CopyTo(EnumDescriptorProto* proto) const {
proto->set_name(name());
for (int i = 0; i < value_count(); i++) {
value(i)->CopyTo(proto->add_value());
}
for (int i = 0; i < reserved_range_count(); i++) {
EnumDescriptorProto::EnumReservedRange* range = proto->add_reserved_range();
range->set_start(reserved_range(i)->start);
range->set_end(reserved_range(i)->end);
}
for (int i = 0; i < reserved_name_count(); i++) {
proto->add_reserved_name(reserved_name(i));
}
if (&options() != &EnumOptions::default_instance()) {
proto->mutable_options()->CopyFrom(options());
}
} | O0 | cpp | google::protobuf::EnumDescriptor::CopyTo(google::protobuf::EnumDescriptorProto*) const:
subq $0xb8, %rsp
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq 0x90(%rsp), %rdi
movq %rdi, 0x50(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x58(%rsp)
callq 0x4d87d0
movq 0x58(%rsp), %rcx
movq %rcx, 0xa0(%rsp)
movq %rax, 0x98(%rsp)
movq 0xa0(%rsp), %rdi
movq %rdi, %rax
addq $0x10, %rax
movq %rax, 0xb0(%rsp)
movl $0x0, 0xac(%rsp)
movq 0xb0(%rsp), %rax
movslq 0xac(%rsp), %rcx
movl (%rax,%rcx,4), %edx
orl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movq %rdi, %rax
addq $0x10, %rax
addq $0x50, %rax
movq %rax, 0x60(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x68(%rsp)
callq 0x1d8160
movq 0x60(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq %rax, %rdx
callq 0x3bce10
movl $0x0, 0x84(%rsp)
movq 0x50(%rsp), %rdi
movl 0x84(%rsp), %eax
movl %eax, 0x4c(%rsp)
callq 0x4452f0
movl %eax, %ecx
movl 0x4c(%rsp), %eax
cmpl %ecx, %eax
jge 0x49b037
movq 0x50(%rsp), %rdi
movl 0x84(%rsp), %esi
callq 0x445300
movq %rax, 0x40(%rsp)
movq 0x88(%rsp), %rdi
callq 0x4d87e0
movq 0x40(%rsp), %rdi
movq %rax, %rsi
callq 0x49c070
movl 0x84(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x84(%rsp)
jmp 0x49afd5
movl $0x0, 0x80(%rsp)
movq 0x50(%rsp), %rdi
movl 0x80(%rsp), %eax
movl %eax, 0x3c(%rsp)
callq 0x4d7ef0
movl %eax, %ecx
movl 0x3c(%rsp), %eax
cmpl %ecx, %eax
jge 0x49b0d8
movq 0x88(%rsp), %rdi
callq 0x4d8810
movq 0x50(%rsp), %rdi
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x28(%rsp)
movl 0x80(%rsp), %esi
callq 0x4d7f00
movq 0x28(%rsp), %rdi
movl (%rax), %esi
callq 0x4d8840
movq 0x50(%rsp), %rdi
movq 0x78(%rsp), %rax
movq %rax, 0x30(%rsp)
movl 0x80(%rsp), %esi
callq 0x4d7f00
movq 0x30(%rsp), %rdi
movl 0x4(%rax), %esi
callq 0x4d8860
movl 0x80(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x80(%rsp)
jmp 0x49b042
movl $0x0, 0x74(%rsp)
movq 0x50(%rsp), %rdi
movl 0x74(%rsp), %eax
movl %eax, 0x24(%rsp)
callq 0x4d8880
movl %eax, %ecx
movl 0x24(%rsp), %eax
cmpl %ecx, %eax
jge 0x49b131
movq 0x50(%rsp), %rdi
movq 0x88(%rsp), %rax
movq %rax, 0x18(%rsp)
movl 0x74(%rsp), %esi
callq 0x4d88d0
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x4d8890
movl 0x74(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x74(%rsp)
jmp 0x49b0e0
movq 0x50(%rsp), %rdi
callq 0x445390
movq %rax, 0x10(%rsp)
callq 0x4d88f0
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
je 0x49b17b
movq 0x88(%rsp), %rdi
callq 0x4d8900
movq 0x50(%rsp), %rdi
movq %rax, 0x8(%rsp)
callq 0x445390
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x522aa0
addq $0xb8, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZNK6google8protobuf14EnumDescriptor6CopyToEPNS0_19EnumDescriptorProtoE:
sub rsp, 0B8h
mov [rsp+0B8h+var_28], rdi
mov [rsp+0B8h+var_30], rsi
mov rdi, [rsp+0B8h+var_28]
mov [rsp+0B8h+var_68], rdi
mov rax, [rsp+0B8h+var_30]
mov [rsp+0B8h+var_60], rax
call _ZNK6google8protobuf14EnumDescriptor4nameB5cxx11Ev; google::protobuf::EnumDescriptor::name(void)
mov rcx, [rsp+0B8h+var_60]
mov [rsp+0B8h+var_18], rcx
mov [rsp+0B8h+var_20], rax
mov rdi, [rsp+0B8h+var_18]; this
mov rax, rdi
add rax, 10h
mov [rsp+0B8h+var_8], rax
mov [rsp+0B8h+var_C], 0
mov rax, [rsp+0B8h+var_8]
movsxd rcx, [rsp+0B8h+var_C]
mov edx, [rax+rcx*4]
or edx, 1
mov [rax+rcx*4], edx
mov rax, rdi
add rax, 10h
add rax, 50h ; 'P'
mov qword ptr [rsp+0B8h+var_58], rax
mov rax, [rsp+0B8h+var_20]
mov qword ptr [rsp+0B8h+var_50], rax
call _ZNK6google8protobuf11MessageLite21GetArenaForAllocationEv; google::protobuf::MessageLite::GetArenaForAllocation(void)
mov rdi, qword ptr [rsp+0B8h+var_58]; int
mov rsi, qword ptr [rsp+0B8h+var_50]; int
mov rdx, rax; int
call _ZN6google8protobuf8internal14ArenaStringPtr3SetERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS0_5ArenaE; google::protobuf::internal::ArenaStringPtr::Set(std::string const&,google::protobuf::Arena *)
mov [rsp+0B8h+var_34], 0
loc_49AFD5:
mov rdi, [rsp+0B8h+var_68]; this
mov eax, [rsp+0B8h+var_34]
mov [rsp+0B8h+var_6C], eax
call _ZNK6google8protobuf14EnumDescriptor11value_countEv; google::protobuf::EnumDescriptor::value_count(void)
mov ecx, eax
mov eax, [rsp+0B8h+var_6C]
cmp eax, ecx
jge short loc_49B037
mov rdi, [rsp+0B8h+var_68]; this
mov esi, [rsp+0B8h+var_34]; int
call _ZNK6google8protobuf14EnumDescriptor5valueEi; google::protobuf::EnumDescriptor::value(int)
mov [rsp+0B8h+var_78], rax
mov rdi, [rsp+0B8h+var_30]; this
call _ZN6google8protobuf19EnumDescriptorProto9add_valueEv; google::protobuf::EnumDescriptorProto::add_value(void)
mov rdi, [rsp+0B8h+var_78]; this
mov rsi, rax; google::protobuf::EnumValueDescriptorProto *
call _ZNK6google8protobuf19EnumValueDescriptor6CopyToEPNS0_24EnumValueDescriptorProtoE; google::protobuf::EnumValueDescriptor::CopyTo(google::protobuf::EnumValueDescriptorProto *)
mov eax, [rsp+0B8h+var_34]
add eax, 1
mov [rsp+0B8h+var_34], eax
jmp short loc_49AFD5
loc_49B037:
mov [rsp+0B8h+var_38], 0
loc_49B042:
mov rdi, [rsp+0B8h+var_68]; this
mov eax, [rsp+0B8h+var_38]
mov [rsp+0B8h+var_7C], eax
call _ZNK6google8protobuf14EnumDescriptor20reserved_range_countEv; google::protobuf::EnumDescriptor::reserved_range_count(void)
mov ecx, eax
mov eax, [rsp+0B8h+var_7C]
cmp eax, ecx
jge short loc_49B0D8
mov rdi, [rsp+0B8h+var_30]; this
call _ZN6google8protobuf19EnumDescriptorProto18add_reserved_rangeEv; google::protobuf::EnumDescriptorProto::add_reserved_range(void)
mov rdi, [rsp+0B8h+var_68]; this
mov [rsp+0B8h+var_40], rax
mov rax, [rsp+0B8h+var_40]
mov [rsp+0B8h+var_90], rax
mov esi, [rsp+0B8h+var_38]; int
call _ZNK6google8protobuf14EnumDescriptor14reserved_rangeEi; google::protobuf::EnumDescriptor::reserved_range(int)
mov rdi, [rsp+0B8h+var_90]; this
mov esi, [rax]; int
call _ZN6google8protobuf37EnumDescriptorProto_EnumReservedRange9set_startEi; google::protobuf::EnumDescriptorProto_EnumReservedRange::set_start(int)
mov rdi, [rsp+0B8h+var_68]; this
mov rax, [rsp+0B8h+var_40]
mov [rsp+0B8h+var_88], rax
mov esi, [rsp+0B8h+var_38]; int
call _ZNK6google8protobuf14EnumDescriptor14reserved_rangeEi; google::protobuf::EnumDescriptor::reserved_range(int)
mov rdi, [rsp+0B8h+var_88]; this
mov esi, [rax+4]; int
call _ZN6google8protobuf37EnumDescriptorProto_EnumReservedRange7set_endEi; google::protobuf::EnumDescriptorProto_EnumReservedRange::set_end(int)
mov eax, [rsp+0B8h+var_38]
add eax, 1
mov [rsp+0B8h+var_38], eax
jmp loc_49B042
loc_49B0D8:
mov [rsp+0B8h+var_44], 0
loc_49B0E0:
mov rdi, [rsp+0B8h+var_68]; this
mov eax, [rsp+0B8h+var_44]
mov [rsp+0B8h+var_94], eax
call _ZNK6google8protobuf14EnumDescriptor19reserved_name_countEv; google::protobuf::EnumDescriptor::reserved_name_count(void)
mov ecx, eax
mov eax, [rsp+0B8h+var_94]
cmp eax, ecx
jge short loc_49B131
mov rdi, [rsp+0B8h+var_68]
mov rax, [rsp+0B8h+var_30]
mov [rsp+0B8h+var_A0], rax
mov esi, [rsp+0B8h+var_44]
call _ZNK6google8protobuf14EnumDescriptor13reserved_nameB5cxx11Ei; google::protobuf::EnumDescriptor::reserved_name(int)
mov rdi, [rsp+0B8h+var_A0]
mov rsi, rax
call _ZN6google8protobuf19EnumDescriptorProto17add_reserved_nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::EnumDescriptorProto::add_reserved_name(std::string const&)
mov eax, [rsp+0B8h+var_44]
add eax, 1
mov [rsp+0B8h+var_44], eax
jmp short loc_49B0E0
loc_49B131:
mov rdi, [rsp+0B8h+var_68]; this
call _ZNK6google8protobuf14EnumDescriptor7optionsEv; google::protobuf::EnumDescriptor::options(void)
mov [rsp+0B8h+var_A8], rax
call _ZN6google8protobuf11EnumOptions16default_instanceEv; google::protobuf::EnumOptions::default_instance(void)
mov rcx, rax
mov rax, [rsp+0B8h+var_A8]
cmp rax, rcx
jz short loc_49B17B
mov rdi, [rsp+0B8h+var_30]; this
call _ZN6google8protobuf19EnumDescriptorProto15mutable_optionsEv; google::protobuf::EnumDescriptorProto::mutable_options(void)
mov rdi, [rsp+0B8h+var_68]; this
mov [rsp+0B8h+var_B0], rax
call _ZNK6google8protobuf14EnumDescriptor7optionsEv; google::protobuf::EnumDescriptor::options(void)
mov rdi, [rsp+0B8h+var_B0]; this
mov rsi, rax; google::protobuf::EnumOptions *
call _ZN6google8protobuf11EnumOptions8CopyFromERKS1_; google::protobuf::EnumOptions::CopyFrom(google::protobuf::EnumOptions const&)
loc_49B17B:
add rsp, 0B8h
retn
| long long google::protobuf::EnumDescriptor::CopyTo(
google::protobuf::EnumDescriptor *this,
google::protobuf::EnumDescriptorProto *a2)
{
int ArenaForAllocation; // eax
google::protobuf::EnumValueDescriptorProto *v3; // rax
int *v4; // rax
long long v5; // rax
long long v6; // rax
long long v7; // rcx
long long result; // rax
const google::protobuf::EnumOptions *v9; // rax
google::protobuf::EnumOptions *v10; // [rsp+8h] [rbp-B0h]
long long v11; // [rsp+10h] [rbp-A8h]
google::protobuf::EnumDescriptorProto_EnumReservedRange *v12; // [rsp+28h] [rbp-90h]
google::protobuf::EnumValueDescriptor *v13; // [rsp+40h] [rbp-78h]
int k; // [rsp+74h] [rbp-44h]
int j; // [rsp+80h] [rbp-38h]
int i; // [rsp+84h] [rbp-34h]
int v17; // [rsp+98h] [rbp-20h]
v17 = google::protobuf::EnumDescriptor::name[abi:cxx11]();
*((_DWORD *)a2 + 4) |= 1u;
ArenaForAllocation = google::protobuf::MessageLite::GetArenaForAllocation(a2);
google::protobuf::internal::ArenaStringPtr::Set((_DWORD)a2 + 96, v17, ArenaForAllocation);
for ( i = 0; i < (int)google::protobuf::EnumDescriptor::value_count(this); ++i )
{
v13 = (google::protobuf::EnumValueDescriptor *)google::protobuf::EnumDescriptor::value(this, i);
v3 = (google::protobuf::EnumValueDescriptorProto *)google::protobuf::EnumDescriptorProto::add_value(a2);
google::protobuf::EnumValueDescriptor::CopyTo(v13, v3);
}
for ( j = 0; j < (int)google::protobuf::EnumDescriptor::reserved_range_count(this); ++j )
{
v12 = (google::protobuf::EnumDescriptorProto_EnumReservedRange *)google::protobuf::EnumDescriptorProto::add_reserved_range(a2);
v4 = (int *)google::protobuf::EnumDescriptor::reserved_range(this, j);
google::protobuf::EnumDescriptorProto_EnumReservedRange::set_start(v12, *v4);
v5 = google::protobuf::EnumDescriptor::reserved_range(this, j);
google::protobuf::EnumDescriptorProto_EnumReservedRange::set_end(v12, *(_DWORD *)(v5 + 4));
}
for ( k = 0; k < (int)google::protobuf::EnumDescriptor::reserved_name_count(this); ++k )
{
v6 = google::protobuf::EnumDescriptor::reserved_name[abi:cxx11](this, (unsigned int)k);
google::protobuf::EnumDescriptorProto::add_reserved_name(a2, v6);
}
v11 = google::protobuf::EnumDescriptor::options(this);
v7 = google::protobuf::EnumOptions::default_instance(this);
result = v11;
if ( v11 != v7 )
{
v10 = (google::protobuf::EnumOptions *)google::protobuf::EnumDescriptorProto::mutable_options(a2);
v9 = (const google::protobuf::EnumOptions *)google::protobuf::EnumDescriptor::options(this);
return google::protobuf::EnumOptions::CopyFrom(v10, v9);
}
return result;
}
| futex_wakeup_one:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV RSI,qword ptr [RSP + 0x10]
MOV EDI,0xca
MOV EDX,0x81
MOV ECX,0x1
XOR EAX,EAX
MOV R9D,EAX
XOR EAX,EAX
MOV R8,R9
MOV dword ptr [RSP],0x0
MOV AL,0x0
CALL 0x0028ec50
MOV dword ptr [RSP + 0xc],EAX
MOV EAX,dword ptr [RSP + 0xc]
ADD RSP,0x18
RET
|
/* tbb::detail::r1::futex_wakeup_one(void*) */
ulong tbb::detail::r1::futex_wakeup_one(void *param_1)
{
ulong uVar1;
uVar1 = syscall(0xca,param_1,0x81,1,0,0,0);
return uVar1 & 0xffffffff;
}
| |
55,104 | ma_net_write | eloqsql/libmariadb/libmariadb/ma_net.c | int ma_net_write(NET *net, const uchar *packet, size_t len)
{
uchar buff[NET_HEADER_SIZE];
while (len >= MAX_PACKET_LENGTH)
{
const ulong max_len= MAX_PACKET_LENGTH;
int3store(buff,max_len);
buff[3]= (uchar)net->pkt_nr++;
if (ma_net_write_buff(net,(char*) buff,NET_HEADER_SIZE) ||
ma_net_write_buff(net, (char *)packet, max_len))
return 1;
packet+= max_len;
len-= max_len;
}
/* write last remaining packet, size can be zero */
int3store(buff, len);
buff[3]= (uchar)net->pkt_nr++;
if (ma_net_write_buff(net,(char*) buff,NET_HEADER_SIZE) ||
ma_net_write_buff(net, (char *)packet, len))
return 1;
return 0;
} | O0 | c | ma_net_write:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
cmpq $0xffffff, -0x28(%rbp) # imm = 0xFFFFFF
jb 0x1e730
movq $0xffffff, -0x30(%rbp) # imm = 0xFFFFFF
movb $-0x1, -0xc(%rbp)
movb $-0x1, -0xb(%rbp)
movb $-0x1, -0xa(%rbp)
movq -0x18(%rbp), %rcx
movl 0x60(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x60(%rcx)
movb %al, -0x9(%rbp)
movq -0x18(%rbp), %rdi
leaq -0xc(%rbp), %rsi
movl $0x4, %edx
callq 0x1e7d0
cmpl $0x0, %eax
jne 0x1e703
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl $0xffffff, %edx # imm = 0xFFFFFF
callq 0x1e7d0
cmpl $0x0, %eax
je 0x1e70f
movl $0x1, -0x10(%rbp)
jmp 0x1e79e
movq -0x20(%rbp), %rax
addq $0xffffff, %rax # imm = 0xFFFFFF
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
subq $0xffffff, %rax # imm = 0xFFFFFF
movq %rax, -0x28(%rbp)
jmp 0x1e6a1
jmp 0x1e732
movq -0x28(%rbp), %rax
movb %al, -0xc(%rbp)
movq -0x28(%rbp), %rax
shrq $0x8, %rax
movb %al, -0xb(%rbp)
movq -0x28(%rbp), %rax
shrq $0x10, %rax
movb %al, -0xa(%rbp)
movq -0x18(%rbp), %rcx
movl 0x60(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x60(%rcx)
movb %al, -0x9(%rbp)
movq -0x18(%rbp), %rdi
leaq -0xc(%rbp), %rsi
movl $0x4, %edx
callq 0x1e7d0
cmpl $0x0, %eax
jne 0x1e78e
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x1e7d0
cmpl $0x0, %eax
je 0x1e797
movl $0x1, -0x10(%rbp)
jmp 0x1e79e
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0x34(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x1e7bf
movl -0x34(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
callq 0x17690
nopw %cs:(%rax,%rax)
| ma_net_write:
push rbp
mov rbp, rsp
sub rsp, 40h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov [rbp+var_28], rdx
loc_1E6A1:
cmp [rbp+var_28], 0FFFFFFh
jb loc_1E730
mov [rbp+var_30], 0FFFFFFh
mov [rbp+var_C], 0FFh
mov [rbp+var_B], 0FFh
mov [rbp+var_A], 0FFh
mov rcx, [rbp+var_18]
mov eax, [rcx+60h]
mov edx, eax
add edx, 1
mov [rcx+60h], edx
mov [rbp+var_9], al
mov rdi, [rbp+var_18]
lea rsi, [rbp+var_C]
mov edx, 4
call ma_net_write_buff
cmp eax, 0
jnz short loc_1E703
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov edx, 0FFFFFFh
call ma_net_write_buff
cmp eax, 0
jz short loc_1E70F
loc_1E703:
mov [rbp+var_10], 1
jmp loc_1E79E
loc_1E70F:
mov rax, [rbp+var_20]
add rax, 0FFFFFFh
mov [rbp+var_20], rax
mov rax, [rbp+var_28]
sub rax, 0FFFFFFh
mov [rbp+var_28], rax
jmp loc_1E6A1
loc_1E730:
jmp short $+2
loc_1E732:
mov rax, [rbp+var_28]
mov [rbp+var_C], al
mov rax, [rbp+var_28]
shr rax, 8
mov [rbp+var_B], al
mov rax, [rbp+var_28]
shr rax, 10h
mov [rbp+var_A], al
mov rcx, [rbp+var_18]
mov eax, [rcx+60h]
mov edx, eax
add edx, 1
mov [rcx+60h], edx
mov [rbp+var_9], al
mov rdi, [rbp+var_18]
lea rsi, [rbp+var_C]
mov edx, 4
call ma_net_write_buff
cmp eax, 0
jnz short loc_1E78E
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
call ma_net_write_buff
cmp eax, 0
jz short loc_1E797
loc_1E78E:
mov [rbp+var_10], 1
jmp short loc_1E79E
loc_1E797:
mov [rbp+var_10], 0
loc_1E79E:
mov eax, [rbp+var_10]
mov [rbp+var_34], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_1E7BF
mov eax, [rbp+var_34]
add rsp, 40h
pop rbp
retn
loc_1E7BF:
call ___stack_chk_fail
| _BOOL8 ma_net_write(long long a1, long long a2, unsigned long long a3)
{
int v3; // eax
int v4; // eax
__int16 v9; // [rsp+34h] [rbp-Ch] BYREF
char v10; // [rsp+36h] [rbp-Ah]
char v11; // [rsp+37h] [rbp-9h]
unsigned long long v12; // [rsp+38h] [rbp-8h]
v12 = __readfsqword(0x28u);
while ( a3 >= 0xFFFFFF )
{
v9 = -1;
v10 = -1;
v3 = *(_DWORD *)(a1 + 96);
*(_DWORD *)(a1 + 96) = v3 + 1;
v11 = v3;
if ( (unsigned int)ma_net_write_buff(a1, &v9, 4LL) || (unsigned int)ma_net_write_buff(a1, a2, 0xFFFFFFLL) )
return 1;
a2 += 0xFFFFFFLL;
a3 -= 0xFFFFFFLL;
}
v9 = a3;
v10 = BYTE2(a3);
v4 = *(_DWORD *)(a1 + 96);
*(_DWORD *)(a1 + 96) = v4 + 1;
v11 = v4;
return (unsigned int)ma_net_write_buff(a1, &v9, 4LL) || (unsigned int)ma_net_write_buff(a1, a2, a3);
}
| ma_net_write:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV qword ptr [RBP + -0x28],RDX
LAB_0011e6a1:
CMP qword ptr [RBP + -0x28],0xffffff
JC 0x0011e730
MOV qword ptr [RBP + -0x30],0xffffff
MOV byte ptr [RBP + -0xc],0xff
MOV byte ptr [RBP + -0xb],0xff
MOV byte ptr [RBP + -0xa],0xff
MOV RCX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RCX + 0x60]
MOV EDX,EAX
ADD EDX,0x1
MOV dword ptr [RCX + 0x60],EDX
MOV byte ptr [RBP + -0x9],AL
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[RBP + -0xc]
MOV EDX,0x4
CALL 0x0011e7d0
CMP EAX,0x0
JNZ 0x0011e703
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV EDX,0xffffff
CALL 0x0011e7d0
CMP EAX,0x0
JZ 0x0011e70f
LAB_0011e703:
MOV dword ptr [RBP + -0x10],0x1
JMP 0x0011e79e
LAB_0011e70f:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0xffffff
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x28]
SUB RAX,0xffffff
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0011e6a1
LAB_0011e730:
JMP 0x0011e732
LAB_0011e732:
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RBP + -0xc],AL
MOV RAX,qword ptr [RBP + -0x28]
SHR RAX,0x8
MOV byte ptr [RBP + -0xb],AL
MOV RAX,qword ptr [RBP + -0x28]
SHR RAX,0x10
MOV byte ptr [RBP + -0xa],AL
MOV RCX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RCX + 0x60]
MOV EDX,EAX
ADD EDX,0x1
MOV dword ptr [RCX + 0x60],EDX
MOV byte ptr [RBP + -0x9],AL
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[RBP + -0xc]
MOV EDX,0x4
CALL 0x0011e7d0
CMP EAX,0x0
JNZ 0x0011e78e
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x0011e7d0
CMP EAX,0x0
JZ 0x0011e797
LAB_0011e78e:
MOV dword ptr [RBP + -0x10],0x1
JMP 0x0011e79e
LAB_0011e797:
MOV dword ptr [RBP + -0x10],0x0
LAB_0011e79e:
MOV EAX,dword ptr [RBP + -0x10]
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0011e7bf
MOV EAX,dword ptr [RBP + -0x34]
ADD RSP,0x40
POP RBP
RET
LAB_0011e7bf:
CALL 0x00117690
|
int4 ma_net_write(long param_1,long param_2,ulong param_3)
{
int iVar1;
long in_FS_OFFSET;
ulong local_30;
long local_28;
int4 local_18;
int1 local_14;
int1 local_13;
int1 local_12;
int1 local_11;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_28 = param_2;
for (local_30 = param_3; 0xfffffe < local_30; local_30 = local_30 - 0xffffff) {
local_14 = 0xff;
local_13 = 0xff;
local_12 = 0xff;
iVar1 = *(int *)(param_1 + 0x60);
*(int *)(param_1 + 0x60) = iVar1 + 1;
local_11 = (int1)iVar1;
iVar1 = ma_net_write_buff(param_1,&local_14,4);
if (iVar1 != 0) {
LAB_0011e703:
local_18 = 1;
goto LAB_0011e79e;
}
iVar1 = ma_net_write_buff(param_1,local_28,0xffffff);
if (iVar1 != 0) goto LAB_0011e703;
local_28 = local_28 + 0xffffff;
}
local_14 = (int1)local_30;
local_13 = (int1)(local_30 >> 8);
local_12 = (int1)(local_30 >> 0x10);
iVar1 = *(int *)(param_1 + 0x60);
*(int *)(param_1 + 0x60) = iVar1 + 1;
local_11 = (int1)iVar1;
iVar1 = ma_net_write_buff(param_1,&local_14,4);
if (iVar1 == 0) {
iVar1 = ma_net_write_buff(param_1,local_28,local_30);
if (iVar1 == 0) {
local_18 = 0;
goto LAB_0011e79e;
}
}
local_18 = 1;
LAB_0011e79e:
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_18;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
55,105 | LefDefParser::lefiPin::addAntennaModel(int) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiMacro.cpp | void
lefiPin::addAntennaModel(int oxide)
{
// For version 5.5 only OXIDE1, OXIDE2, OXIDE3, & OXIDE4
// are defined within a macro pin
lefiPinAntennaModel *amo;
int i;
if (numAntennaModel_ == 0) { // does not have antennaModel
antennaModel_ = (lefiPinAntennaModel**)
lefMalloc(sizeof(lefiPinAntennaModel*) * 4);
antennaModelAllocated_ = 4;
for (i = 0; i < 4; i++) {
antennaModel_[i] = (lefiPinAntennaModel*)
lefMalloc(sizeof(lefiPinAntennaModel));
antennaModel_[i]->setAntennaModel(0);
// just initialize it first
}
antennaModelAllocated_ = 4;
amo = antennaModel_[0];
curAntennaModelIndex_ = 0;
}
// First can go any oxide, so fill pref oxides models.
for (int idx = 0; idx < oxide - 1; idx++) {
amo = antennaModel_[idx];
if (!amo->antennaOxide()) {
amo->Init();
amo->setAntennaModel(idx + 1);
}
}
amo = antennaModel_[oxide - 1];
curAntennaModelIndex_ = oxide - 1;
// Oxide has not defined yet
if (amo->antennaOxide()) {
amo->clear();
}
if (oxide > numAntennaModel_) {
numAntennaModel_ = oxide;
}
amo->Init();
amo->setAntennaModel(oxide);
return;
} | O0 | cpp | LefDefParser::lefiPin::addAntennaModel(int):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
cmpl $0x0, 0x168(%rax)
jne 0x44290
movl $0x20, %edi
callq 0x359d0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x178(%rax)
movl $0x4, 0x16c(%rax)
movl $0x0, 0xc(%rsp)
cmpl $0x4, 0xc(%rsp)
jge 0x44269
movl $0x70, %edi
callq 0x359d0
movq %rax, %rsi
movq (%rsp), %rax
movq 0x178(%rax), %rcx
movslq 0xc(%rsp), %rdx
movq %rsi, (%rcx,%rdx,8)
movq 0x178(%rax), %rax
movslq 0xc(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
xorl %esi, %esi
callq 0x406a0
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x4421d
movq (%rsp), %rax
movl $0x4, 0x16c(%rax)
movq 0x178(%rax), %rcx
movq (%rcx), %rcx
movq %rcx, 0x10(%rsp)
movl $0x0, 0x170(%rax)
movl $0x0, 0x8(%rsp)
movl 0x8(%rsp), %eax
movl 0x1c(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x442fa
movq (%rsp), %rax
movq 0x178(%rax), %rax
movslq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x40ec0
cmpq $0x0, %rax
jne 0x442eb
movq 0x10(%rsp), %rdi
callq 0x40350
movq 0x10(%rsp), %rdi
movl 0x8(%rsp), %esi
addl $0x1, %esi
callq 0x406a0
jmp 0x442ed
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x44298
movq (%rsp), %rax
movq 0x178(%rax), %rcx
movl 0x1c(%rsp), %edx
subl $0x1, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movq %rcx, 0x10(%rsp)
movl 0x1c(%rsp), %ecx
subl $0x1, %ecx
movl %ecx, 0x170(%rax)
movq 0x10(%rsp), %rdi
callq 0x40ec0
cmpq $0x0, %rax
je 0x4433f
movq 0x10(%rsp), %rdi
callq 0x40490
movq (%rsp), %rcx
movl 0x1c(%rsp), %eax
cmpl 0x168(%rcx), %eax
jle 0x4435d
movq (%rsp), %rax
movl 0x1c(%rsp), %ecx
movl %ecx, 0x168(%rax)
movq 0x10(%rsp), %rdi
callq 0x40350
movq 0x10(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x406a0
addq $0x28, %rsp
retq
nopw (%rax,%rax)
| _ZN12LefDefParser7lefiPin15addAntennaModelEi:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_C], esi
mov rax, [rsp+28h+var_8]
mov [rsp+28h+var_28], rax
cmp dword ptr [rax+168h], 0
jnz loc_44290
mov edi, offset qword_20; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov rcx, rax
mov rax, [rsp+28h+var_28]
mov [rax+178h], rcx
mov dword ptr [rax+16Ch], 4
mov [rsp+28h+var_1C], 0
loc_4421D:
cmp [rsp+28h+var_1C], 4
jge short loc_44269
mov edi, offset qword_70; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov rsi, rax
mov rax, [rsp+28h+var_28]
mov rcx, [rax+178h]
movsxd rdx, [rsp+28h+var_1C]
mov [rcx+rdx*8], rsi
mov rax, [rax+178h]
movsxd rcx, [rsp+28h+var_1C]
mov rdi, [rax+rcx*8]; this
xor esi, esi; int
call _ZN12LefDefParser19lefiPinAntennaModel15setAntennaModelEi; LefDefParser::lefiPinAntennaModel::setAntennaModel(int)
mov eax, [rsp+28h+var_1C]
add eax, 1
mov [rsp+28h+var_1C], eax
jmp short loc_4421D
loc_44269:
mov rax, [rsp+28h+var_28]
mov dword ptr [rax+16Ch], 4
mov rcx, [rax+178h]
mov rcx, [rcx]
mov [rsp+28h+var_18], rcx
mov dword ptr [rax+170h], 0
loc_44290:
mov [rsp+28h+var_20], 0
loc_44298:
mov eax, [rsp+28h+var_20]
mov ecx, [rsp+28h+var_C]
sub ecx, 1
cmp eax, ecx
jge short loc_442FA
mov rax, [rsp+28h+var_28]
mov rax, [rax+178h]
movsxd rcx, [rsp+28h+var_20]
mov rax, [rax+rcx*8]
mov [rsp+28h+var_18], rax
mov rdi, [rsp+28h+var_18]; this
call _ZNK12LefDefParser19lefiPinAntennaModel12antennaOxideEv; LefDefParser::lefiPinAntennaModel::antennaOxide(void)
cmp rax, 0
jnz short loc_442EB
mov rdi, [rsp+28h+var_18]; this
call _ZN12LefDefParser19lefiPinAntennaModel4InitEv; LefDefParser::lefiPinAntennaModel::Init(void)
mov rdi, [rsp+28h+var_18]; this
mov esi, [rsp+28h+var_20]
add esi, 1; int
call _ZN12LefDefParser19lefiPinAntennaModel15setAntennaModelEi; LefDefParser::lefiPinAntennaModel::setAntennaModel(int)
loc_442EB:
jmp short $+2
loc_442ED:
mov eax, [rsp+28h+var_20]
add eax, 1
mov [rsp+28h+var_20], eax
jmp short loc_44298
loc_442FA:
mov rax, [rsp+28h+var_28]
mov rcx, [rax+178h]
mov edx, [rsp+28h+var_C]
sub edx, 1
movsxd rdx, edx
mov rcx, [rcx+rdx*8]
mov [rsp+28h+var_18], rcx
mov ecx, [rsp+28h+var_C]
sub ecx, 1
mov [rax+170h], ecx
mov rdi, [rsp+28h+var_18]; this
call _ZNK12LefDefParser19lefiPinAntennaModel12antennaOxideEv; LefDefParser::lefiPinAntennaModel::antennaOxide(void)
cmp rax, 0
jz short loc_4433F
mov rdi, [rsp+28h+var_18]; this
call _ZN12LefDefParser19lefiPinAntennaModel5clearEv; LefDefParser::lefiPinAntennaModel::clear(void)
loc_4433F:
mov rcx, [rsp+28h+var_28]
mov eax, [rsp+28h+var_C]
cmp eax, [rcx+168h]
jle short loc_4435D
mov rax, [rsp+28h+var_28]
mov ecx, [rsp+28h+var_C]
mov [rax+168h], ecx
loc_4435D:
mov rdi, [rsp+28h+var_18]; this
call _ZN12LefDefParser19lefiPinAntennaModel4InitEv; LefDefParser::lefiPinAntennaModel::Init(void)
mov rdi, [rsp+28h+var_18]; this
mov esi, [rsp+28h+var_C]; int
call _ZN12LefDefParser19lefiPinAntennaModel15setAntennaModelEi; LefDefParser::lefiPinAntennaModel::setAntennaModel(int)
add rsp, 28h
retn
| LefDefParser::lefiPinAntennaModel * LefDefParser::lefiPin::addAntennaModel(
LefDefParser::lefiPin *this,
unsigned long long a2)
{
int j; // [rsp+8h] [rbp-20h]
int i; // [rsp+Ch] [rbp-1Ch]
LefDefParser::lefiPinAntennaModel *v5; // [rsp+10h] [rbp-18h]
LefDefParser **v6; // [rsp+10h] [rbp-18h]
int v7; // [rsp+1Ch] [rbp-Ch]
v7 = a2;
if ( !*((_DWORD *)this + 90) )
{
*((_QWORD *)this + 47) = LefDefParser::lefMalloc((LefDefParser *)&qword_20);
*((_DWORD *)this + 91) = 4;
for ( i = 0; i < 4; ++i )
{
*(_QWORD *)(*((_QWORD *)this + 47) + 8LL * i) = LefDefParser::lefMalloc((LefDefParser *)&qword_70);
a2 = 0LL;
LefDefParser::lefiPinAntennaModel::setAntennaModel(
*(LefDefParser::lefiPinAntennaModel **)(*((_QWORD *)this + 47) + 8LL * i),
0);
}
*((_DWORD *)this + 91) = 4;
*((_DWORD *)this + 92) = 0;
}
for ( j = 0; j < v7 - 1; ++j )
{
v5 = *(LefDefParser::lefiPinAntennaModel **)(*((_QWORD *)this + 47) + 8LL * j);
if ( !LefDefParser::lefiPinAntennaModel::antennaOxide(v5) )
{
LefDefParser::lefiPinAntennaModel::Init(v5);
a2 = (unsigned int)(j + 1);
LefDefParser::lefiPinAntennaModel::setAntennaModel(v5, a2);
}
}
v6 = *(LefDefParser ***)(*((_QWORD *)this + 47) + 8LL * (v7 - 1));
*((_DWORD *)this + 92) = v7 - 1;
if ( LefDefParser::lefiPinAntennaModel::antennaOxide((LefDefParser::lefiPinAntennaModel *)v6) )
LefDefParser::lefiPinAntennaModel::clear(v6, (void *)a2);
if ( v7 > *((_DWORD *)this + 90) )
*((_DWORD *)this + 90) = v7;
LefDefParser::lefiPinAntennaModel::Init((LefDefParser::lefiPinAntennaModel *)v6);
return LefDefParser::lefiPinAntennaModel::setAntennaModel((LefDefParser::lefiPinAntennaModel *)v6, v7);
}
| addAntennaModel:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV dword ptr [RSP + 0x1c],ESI
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP],RAX
CMP dword ptr [RAX + 0x168],0x0
JNZ 0x00144290
MOV EDI,0x20
CALL 0x001359d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RAX + 0x178],RCX
MOV dword ptr [RAX + 0x16c],0x4
MOV dword ptr [RSP + 0xc],0x0
LAB_0014421d:
CMP dword ptr [RSP + 0xc],0x4
JGE 0x00144269
MOV EDI,0x70
CALL 0x001359d0
MOV RSI,RAX
MOV RAX,qword ptr [RSP]
MOV RCX,qword ptr [RAX + 0x178]
MOVSXD RDX,dword ptr [RSP + 0xc]
MOV qword ptr [RCX + RDX*0x8],RSI
MOV RAX,qword ptr [RAX + 0x178]
MOVSXD RCX,dword ptr [RSP + 0xc]
MOV RDI,qword ptr [RAX + RCX*0x8]
XOR ESI,ESI
CALL 0x001406a0
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc],EAX
JMP 0x0014421d
LAB_00144269:
MOV RAX,qword ptr [RSP]
MOV dword ptr [RAX + 0x16c],0x4
MOV RCX,qword ptr [RAX + 0x178]
MOV RCX,qword ptr [RCX]
MOV qword ptr [RSP + 0x10],RCX
MOV dword ptr [RAX + 0x170],0x0
LAB_00144290:
MOV dword ptr [RSP + 0x8],0x0
LAB_00144298:
MOV EAX,dword ptr [RSP + 0x8]
MOV ECX,dword ptr [RSP + 0x1c]
SUB ECX,0x1
CMP EAX,ECX
JGE 0x001442fa
MOV RAX,qword ptr [RSP]
MOV RAX,qword ptr [RAX + 0x178]
MOVSXD RCX,dword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x00140ec0
CMP RAX,0x0
JNZ 0x001442eb
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x00140350
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,dword ptr [RSP + 0x8]
ADD ESI,0x1
CALL 0x001406a0
LAB_001442eb:
JMP 0x001442ed
LAB_001442ed:
MOV EAX,dword ptr [RSP + 0x8]
ADD EAX,0x1
MOV dword ptr [RSP + 0x8],EAX
JMP 0x00144298
LAB_001442fa:
MOV RAX,qword ptr [RSP]
MOV RCX,qword ptr [RAX + 0x178]
MOV EDX,dword ptr [RSP + 0x1c]
SUB EDX,0x1
MOVSXD RDX,EDX
MOV RCX,qword ptr [RCX + RDX*0x8]
MOV qword ptr [RSP + 0x10],RCX
MOV ECX,dword ptr [RSP + 0x1c]
SUB ECX,0x1
MOV dword ptr [RAX + 0x170],ECX
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x00140ec0
CMP RAX,0x0
JZ 0x0014433f
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x00140490
LAB_0014433f:
MOV RCX,qword ptr [RSP]
MOV EAX,dword ptr [RSP + 0x1c]
CMP EAX,dword ptr [RCX + 0x168]
JLE 0x0014435d
MOV RAX,qword ptr [RSP]
MOV ECX,dword ptr [RSP + 0x1c]
MOV dword ptr [RAX + 0x168],ECX
LAB_0014435d:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x00140350
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,dword ptr [RSP + 0x1c]
CALL 0x001406a0
ADD RSP,0x28
RET
|
/* LefDefParser::lefiPin::addAntennaModel(int) */
void __thiscall LefDefParser::lefiPin::addAntennaModel(lefiPin *this,int param_1)
{
lefiPinAntennaModel *plVar1;
int8 uVar2;
long lVar3;
int local_20;
int local_1c;
if (*(int *)(this + 0x168) == 0) {
uVar2 = lefMalloc(0x20);
*(int8 *)(this + 0x178) = uVar2;
*(int4 *)(this + 0x16c) = 4;
for (local_1c = 0; local_1c < 4; local_1c = local_1c + 1) {
uVar2 = lefMalloc(0x70);
*(int8 *)(*(long *)(this + 0x178) + (long)local_1c * 8) = uVar2;
lefiPinAntennaModel::setAntennaModel
(*(lefiPinAntennaModel **)(*(long *)(this + 0x178) + (long)local_1c * 8),0);
}
*(int4 *)(this + 0x16c) = 4;
*(int4 *)(this + 0x170) = 0;
}
for (local_20 = 0; local_20 < param_1 + -1; local_20 = local_20 + 1) {
plVar1 = *(lefiPinAntennaModel **)(*(long *)(this + 0x178) + (long)local_20 * 8);
lVar3 = lefiPinAntennaModel::antennaOxide(plVar1);
if (lVar3 == 0) {
lefiPinAntennaModel::Init(plVar1);
lefiPinAntennaModel::setAntennaModel(plVar1,local_20 + 1);
}
}
plVar1 = *(lefiPinAntennaModel **)(*(long *)(this + 0x178) + (long)(param_1 + -1) * 8);
*(int *)(this + 0x170) = param_1 + -1;
lVar3 = lefiPinAntennaModel::antennaOxide(plVar1);
if (lVar3 != 0) {
lefiPinAntennaModel::clear(plVar1);
}
if (*(int *)(this + 0x168) < param_1) {
*(int *)(this + 0x168) = param_1;
}
lefiPinAntennaModel::Init(plVar1);
lefiPinAntennaModel::setAntennaModel(plVar1,param_1);
return;
}
| |
55,106 | glfwGetOSMesaDepthBuffer | untodesu[P]riteg/build_O1/_deps/glfw-src/src/osmesa_context.c | GLFWAPI int glfwGetOSMesaDepthBuffer(GLFWwindow* handle,
int* width, int* height,
int* bytesPerValue,
void** buffer)
{
void* mesaBuffer;
GLint mesaWidth, mesaHeight, mesaBytes;
_GLFWwindow* window = (_GLFWwindow*) handle;
assert(window != NULL);
_GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE);
if (!OSMesaGetDepthBuffer(window->context.osmesa.handle,
&mesaWidth, &mesaHeight,
&mesaBytes, &mesaBuffer))
{
_glfwInputError(GLFW_PLATFORM_ERROR,
"OSMesa: Failed to retrieve depth buffer");
return GLFW_FALSE;
}
if (width)
*width = mesaWidth;
if (height)
*height = mesaHeight;
if (bytesPerValue)
*bytesPerValue = mesaBytes;
if (buffer)
*buffer = mesaBuffer;
return GLFW_TRUE;
} | O1 | c | glfwGetOSMesaDepthBuffer:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rdi, %rdi
je 0x28788
leaq 0x7bf51(%rip), %rax # 0xa4638
cmpl $0x0, (%rax)
je 0x28757
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq 0x2a0(%rdi), %rdi
leaq 0xc(%rsp), %rsi
leaq 0x8(%rsp), %rdx
leaq 0x4(%rsp), %rcx
leaq 0x10(%rsp), %r8
callq *0x20980(%rax)
testl %eax, %eax
je 0x28763
testq %r12, %r12
je 0x2872a
movl 0xc(%rsp), %eax
movl %eax, (%r12)
testq %r15, %r15
je 0x28736
movl 0x8(%rsp), %eax
movl %eax, (%r15)
testq %r14, %r14
je 0x28742
movl 0x4(%rsp), %eax
movl %eax, (%r14)
movl $0x1, %r14d
testq %rbx, %rbx
je 0x28779
movq 0x10(%rsp), %rax
movq %rax, (%rbx)
jmp 0x28779
xorl %r14d, %r14d
movl $0x10001, %edi # imm = 0x10001
xorl %esi, %esi
jmp 0x28772
leaq 0x5b867(%rip), %rsi # 0x83fd1
xorl %r14d, %r14d
movl $0x10008, %edi # imm = 0x10008
xorl %eax, %eax
callq 0x19081
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x3ae6f(%rip), %rdi # 0x635fe
leaq 0x5b6a4(%rip), %rsi # 0x83e3a
leaq 0x5b7eb(%rip), %rcx # 0x83f88
movl $0x14c, %edx # imm = 0x14C
callq 0xc540
| glfwGetOSMesaDepthBuffer:
push r15
push r14
push r12
push rbx
sub rsp, 18h
test rdi, rdi
jz loc_28788
lea rax, _glfw
cmp dword ptr [rax], 0
jz short loc_28757
mov rbx, r8
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov rdi, [rdi+2A0h]
lea rsi, [rsp+38h+var_2C]
lea rdx, [rsp+38h+var_30]
lea rcx, [rsp+38h+var_34]
lea r8, [rsp+38h+var_28]
call qword ptr [rax+20980h]
test eax, eax
jz short loc_28763
test r12, r12
jz short loc_2872A
mov eax, [rsp+38h+var_2C]
mov [r12], eax
loc_2872A:
test r15, r15
jz short loc_28736
mov eax, [rsp+38h+var_30]
mov [r15], eax
loc_28736:
test r14, r14
jz short loc_28742
mov eax, [rsp+38h+var_34]
mov [r14], eax
loc_28742:
mov r14d, 1
test rbx, rbx
jz short loc_28779
mov rax, [rsp+38h+var_28]
mov [rbx], rax
jmp short loc_28779
loc_28757:
xor r14d, r14d
mov edi, 10001h
xor esi, esi
jmp short loc_28772
loc_28763:
lea rsi, aOsmesaFailedTo_3; "OSMesa: Failed to retrieve depth buffer"
xor r14d, r14d
mov edi, offset loc_10008
loc_28772:
xor eax, eax
call _glfwInputError
loc_28779:
mov eax, r14d
add rsp, 18h
pop rbx
pop r12
pop r14
pop r15
retn
loc_28788:
lea rdi, aWindowNull; "window != NULL"
lea rsi, aWorkspaceLlm4b_20; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aIntGlfwgetosme_0; "int glfwGetOSMesaDepthBuffer(GLFWwindow"...
mov edx, 14Ch
call ___assert_fail
| long long glfwGetOSMesaDepthBuffer(long long a1, _DWORD *a2, _DWORD *a3, _DWORD *a4, _QWORD *a5)
{
unsigned int v8; // r14d
int v10; // [rsp+4h] [rbp-34h] BYREF
int v11; // [rsp+8h] [rbp-30h] BYREF
int v12; // [rsp+Ch] [rbp-2Ch] BYREF
_QWORD v13[5]; // [rsp+10h] [rbp-28h] BYREF
if ( !a1 )
__assert_fail(
"window != NULL",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O1/_deps/glfw-src/src/osmesa_context.c",
332LL,
"int glfwGetOSMesaDepthBuffer(GLFWwindow *, int *, int *, int *, void **)");
if ( glfw[0] )
{
if ( (*(unsigned int ( **)(_QWORD, int *, int *, int *, _QWORD *))&glfw[33376])(
*(_QWORD *)(a1 + 672),
&v12,
&v11,
&v10,
v13) )
{
if ( a2 )
*a2 = v12;
if ( a3 )
*a3 = v11;
if ( a4 )
*a4 = v10;
v8 = 1;
if ( a5 )
*a5 = v13[0];
}
else
{
v8 = 0;
glfwInputError((unsigned int)&loc_10008, (long long)"OSMesa: Failed to retrieve depth buffer");
}
}
else
{
v8 = 0;
glfwInputError(0x10001u, 0LL);
}
return v8;
}
| glfwGetOSMesaDepthBuffer:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x18
TEST RDI,RDI
JZ 0x00128788
LEA RAX,[0x1a4638]
CMP dword ptr [RAX],0x0
JZ 0x00128757
MOV RBX,R8
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV RDI,qword ptr [RDI + 0x2a0]
LEA RSI,[RSP + 0xc]
LEA RDX,[RSP + 0x8]
LEA RCX,[RSP + 0x4]
LEA R8,[RSP + 0x10]
CALL qword ptr [RAX + 0x20980]
TEST EAX,EAX
JZ 0x00128763
TEST R12,R12
JZ 0x0012872a
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [R12],EAX
LAB_0012872a:
TEST R15,R15
JZ 0x00128736
MOV EAX,dword ptr [RSP + 0x8]
MOV dword ptr [R15],EAX
LAB_00128736:
TEST R14,R14
JZ 0x00128742
MOV EAX,dword ptr [RSP + 0x4]
MOV dword ptr [R14],EAX
LAB_00128742:
MOV R14D,0x1
TEST RBX,RBX
JZ 0x00128779
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RBX],RAX
JMP 0x00128779
LAB_00128757:
XOR R14D,R14D
MOV EDI,0x10001
XOR ESI,ESI
JMP 0x00128772
LAB_00128763:
LEA RSI,[0x183fd1]
XOR R14D,R14D
MOV EDI,0x10008
LAB_00128772:
XOR EAX,EAX
CALL 0x00119081
LAB_00128779:
MOV EAX,R14D
ADD RSP,0x18
POP RBX
POP R12
POP R14
POP R15
RET
LAB_00128788:
LEA RDI,[0x1635fe]
LEA RSI,[0x183e3a]
LEA RCX,[0x183f88]
MOV EDX,0x14c
CALL 0x0010c540
|
int8
glfwGetOSMesaDepthBuffer
(long param_1,int4 *param_2,int4 *param_3,int4 *param_4,
int8 *param_5)
{
int iVar1;
char *pcVar2;
int8 uVar3;
int4 local_34;
int4 local_30;
int4 local_2c;
int8 local_28;
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("window != NULL",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O1/_deps/glfw-src/src/osmesa_context.c"
,0x14c,"int glfwGetOSMesaDepthBuffer(GLFWwindow *, int *, int *, int *, void **)")
;
}
if (_glfw == 0) {
uVar3 = 0x10001;
pcVar2 = (char *)0x0;
}
else {
iVar1 = (*DAT_001c4fb8)(*(int8 *)(param_1 + 0x2a0),&local_2c,&local_30,&local_34,&local_28
);
if (iVar1 != 0) {
if (param_2 != (int4 *)0x0) {
*param_2 = local_2c;
}
if (param_3 != (int4 *)0x0) {
*param_3 = local_30;
}
if (param_4 != (int4 *)0x0) {
*param_4 = local_34;
}
if (param_5 == (int8 *)0x0) {
return 1;
}
*param_5 = local_28;
return 1;
}
pcVar2 = "OSMesa: Failed to retrieve depth buffer";
uVar3 = 0x10008;
}
_glfwInputError(uVar3,pcVar2);
return 0;
}
| |
55,107 | lf_hash_delete | eloqsql/mysys/lf_hash.cc | int lf_hash_delete(LF_HASH *hash, LF_PINS *pins, const void *key, uint keylen)
{
LF_SLIST **el;
uint bucket, hashnr;
hashnr= hash->hash_function(hash->charset, (uchar *)key, keylen) & INT_MAX32;
/* hide OOM errors - if we cannot initialize a bucket, try the previous one */
for (bucket= hashnr % hash->size; ;bucket= my_clear_highest_bit(bucket))
{
el= (LF_SLIST **)lf_dynarray_lvalue(&hash->array, bucket);
if (el && (*el || initialize_bucket(hash, el, bucket, pins) == 0))
break;
if (unlikely(bucket == 0))
return 1; /* if there's no bucket==0, the hash is empty */
}
if (l_delete(el, hash->charset, my_reverse_bits(hashnr) | 1,
(uchar *)key, keylen, pins))
{
return 1;
}
my_atomic_add32(&hash->count, -1);
return 0;
} | O3 | cpp | lf_hash_delete:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0xa8(%rdi), %rdi
movl %ecx, %eax
movq %rdx, -0x38(%rbp)
movq %rdx, %rsi
movq %rax, -0x30(%rbp)
movq %rax, %rdx
callq *0xa0(%r14)
movl %eax, %r15d
andl $0x7fffffff, %eax # imm = 0x7FFFFFFF
movq %rax, -0x58(%rbp)
xorl %edx, %edx
divl 0xc0(%r14)
movl %edx, %r12d
movq %r14, %rdi
movl %r12d, %esi
callq 0x2f2ba
testq %rax, %rax
jne 0x2f7c5
testl %r12d, %r12d
je 0x2f8d8
movl %r12d, %eax
shrl %eax
movl %r12d, %ecx
shrl $0x2, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x2, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x4, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x8, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x10, %ecx
orl %eax, %ecx
andl %ecx, %r12d
jmp 0x2f77e
movq %rax, %r13
cmpq $0x0, (%rax)
jne 0x2f7e3
movq %r14, %rdi
movq %r13, %rsi
movl %r12d, %edx
movq %rbx, %rcx
callq 0x2f5c8
testl %eax, %eax
jne 0x2f78e
movq 0xa8(%r14), %rsi
movl $0xff, %eax
movl %r15d, %ecx
andl %eax, %ecx
leaq 0xb24f5(%rip), %rdx # 0xe1cf0
movzbl (%rdx,%rcx), %ecx
shll $0x18, %ecx
movl %r15d, %edi
shrl $0x8, %edi
andl %eax, %edi
movzbl (%rdx,%rdi), %edi
shll $0x10, %edi
orl %ecx, %edi
shrl $0x10, %r15d
andl %eax, %r15d
movzbl (%rdx,%r15), %eax
shll $0x8, %eax
orl %edi, %eax
movq -0x58(%rbp), %rcx
shrl $0x18, %ecx
movzbl (%rdx,%rcx), %r15d
orl %eax, %r15d
orl $0x1, %r15d
leaq -0x50(%rbp), %r9
movq %r13, %rdi
movq %rsi, %r12
movl %r15d, %edx
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %r8
pushq $0x0
pushq %rbx
callq 0x2fada
popq %rcx
popq %rdx
testl %eax, %eax
je 0x2f8c7
movq -0x48(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rax, %rdx
orq $0x1, %rdx
lock
cmpxchgq %rdx, (%rcx)
je 0x2f88b
movq %rax, -0x40(%rbp)
movq %r13, %rdi
movq %r12, %rsi
movl %r15d, %edx
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %r8
leaq -0x50(%rbp), %r9
jmp 0x2f84c
movq -0x40(%rbp), %rcx
movq -0x50(%rbp), %rdx
movq -0x48(%rbp), %rax
lock
cmpxchgq %rcx, (%rdx)
jne 0x2f8ea
movq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0xa5307
xorl %eax, %eax
xchgq %rax, (%rbx)
xorl %eax, %eax
xchgq %rax, 0x8(%rbx)
xorl %eax, %eax
xchgq %rax, 0x10(%rbx)
xorl %eax, %eax
lock
decl 0xc4(%r14)
jmp 0x2f8db
xorl %eax, %eax
xchgq %rax, (%rbx)
xorl %eax, %eax
xchgq %rax, 0x8(%rbx)
xorl %eax, %eax
xchgq %rax, 0x10(%rbx)
pushq $0x1
popq %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x50(%rbp), %r9
movq %rax, 0x8(%r9)
movq %r13, %rdi
movq %r12, %rsi
movl %r15d, %edx
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %r8
pushq $0x0
pushq %rbx
callq 0x2fada
popq %rcx
popq %rdx
jmp 0x2f8aa
| lf_hash_delete:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, rsi
mov r14, rdi
mov rdi, [rdi+0A8h]
mov eax, ecx
mov [rbp+var_38], rdx
mov rsi, rdx
mov [rbp+var_30], rax
mov rdx, rax
call qword ptr [r14+0A0h]
mov r15d, eax
and eax, 7FFFFFFFh
mov [rbp+var_58], rax
xor edx, edx
div dword ptr [r14+0C0h]
mov r12d, edx
loc_2F77E:
mov rdi, r14
mov esi, r12d
call lf_dynarray_lvalue
test rax, rax
jnz short loc_2F7C5
loc_2F78E:
test r12d, r12d
jz loc_2F8D8
mov eax, r12d
shr eax, 1
mov ecx, r12d
shr ecx, 2
or ecx, eax
mov eax, ecx
shr eax, 2
or eax, ecx
mov ecx, eax
shr ecx, 4
or ecx, eax
mov eax, ecx
shr eax, 8
or eax, ecx
mov ecx, eax
shr ecx, 10h
or ecx, eax
and r12d, ecx
jmp short loc_2F77E
loc_2F7C5:
mov r13, rax
cmp qword ptr [rax], 0
jnz short loc_2F7E3
mov rdi, r14
mov rsi, r13
mov edx, r12d
mov rcx, rbx
call _ZL17initialize_bucketP10st_lf_hashPP8LF_SLISTjP7LF_PINS; initialize_bucket(st_lf_hash *,LF_SLIST **,uint,LF_PINS *)
test eax, eax
jnz short loc_2F78E
loc_2F7E3:
mov rsi, [r14+0A8h]
mov eax, 0FFh
mov ecx, r15d
and ecx, eax
lea rdx, _my_bits_reverse_table
movzx ecx, byte ptr [rdx+rcx]
shl ecx, 18h
mov edi, r15d
shr edi, 8
and edi, eax
movzx edi, byte ptr [rdx+rdi]
shl edi, 10h
or edi, ecx
shr r15d, 10h
and r15d, eax
movzx eax, byte ptr [rdx+r15]
shl eax, 8
or eax, edi
mov rcx, [rbp+var_58]
shr ecx, 18h
movzx r15d, byte ptr [rdx+rcx]
or r15d, eax
or r15d, 1
lea r9, [rbp+var_50]
mov rdi, r13
mov r12, rsi
mov edx, r15d
mov rcx, [rbp+var_38]
mov r8, [rbp+var_30]
loc_2F84C:
push 0
push rbx
call _ZL6l_findPP8LF_SLISTPK15charset_info_stjPKhmP6CURSORP7LF_PINSPFcPvSB_E; l_find(LF_SLIST **,charset_info_st const*,uint,uchar const*,ulong,CURSOR *,LF_PINS *,char (*)(void *,void *))
pop rcx
pop rdx
test eax, eax
jz short loc_2F8C7
mov rcx, [rbp+var_48]
mov rax, [rbp+var_40]
mov rdx, rax
or rdx, 1
lock cmpxchg [rcx], rdx
jz short loc_2F88B
mov [rbp+var_40], rax
mov rdi, r13
mov rsi, r12
mov edx, r15d
mov rcx, [rbp+var_38]
mov r8, [rbp+var_30]
lea r9, [rbp+var_50]
jmp short loc_2F84C
loc_2F88B:
mov rcx, [rbp+var_40]
mov rdx, [rbp+var_50]
mov rax, [rbp+var_48]
lock cmpxchg [rdx], rcx
jnz short loc_2F8EA
mov rsi, [rbp+var_48]
mov rdi, rbx
call lf_pinbox_free
loc_2F8AA:
xor eax, eax
xchg rax, [rbx]
xor eax, eax
xchg rax, [rbx+8]
xor eax, eax
xchg rax, [rbx+10h]
xor eax, eax
lock dec dword ptr [r14+0C4h]
jmp short loc_2F8DB
loc_2F8C7:
xor eax, eax
xchg rax, [rbx]
xor eax, eax
xchg rax, [rbx+8]
xor eax, eax
xchg rax, [rbx+10h]
loc_2F8D8:
push 1
pop rax
loc_2F8DB:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2F8EA:
lea r9, [rbp+var_50]
mov [r9+8], rax
mov rdi, r13
mov rsi, r12
mov edx, r15d
mov rcx, [rbp+var_38]
mov r8, [rbp+var_30]
push 0
push rbx
call _ZL6l_findPP8LF_SLISTPK15charset_info_stjPKhmP6CURSORP7LF_PINSPFcPvSB_E; l_find(LF_SLIST **,charset_info_st const*,uint,uchar const*,ulong,CURSOR *,LF_PINS *,char (*)(void *,void *))
pop rcx
pop rdx
jmp short loc_2F8AA
| long long lf_hash_delete(long long a1, volatile long long *a2, long long a3, unsigned int a4)
{
long long v6; // rdi
int v7; // r15d
unsigned int i; // r12d
volatile signed long long *v9; // rax
int v10; // r13d
long long v11; // rsi
int v12; // r15d
int v13; // edi
int v14; // r12d
int v15; // edx
int v16; // ecx
int j; // r8d
signed long long v18; // rax
signed long long v19; // rtt
volatile signed long long *v20; // rax
volatile signed long long *v21; // rtt
long long result; // rax
volatile signed long long *v23; // [rsp+10h] [rbp-50h] BYREF
volatile signed long long *v24; // [rsp+18h] [rbp-48h]
signed long long v25; // [rsp+20h] [rbp-40h]
long long v26; // [rsp+28h] [rbp-38h]
long long v27; // [rsp+30h] [rbp-30h]
v6 = *(_QWORD *)(a1 + 168);
v26 = a3;
v27 = a4;
v7 = (*(long long ( **)(long long, long long, _QWORD))(a1 + 160))(v6, a3, a4);
for ( i = (v7 & 0x7FFFFFFFu) % *(_DWORD *)(a1 + 192);
;
i &= (i >> 1) | (i >> 2) | (((i >> 1) | (i >> 2)) >> 2) | (((i >> 1) | (i >> 2) | (((i >> 1) | (i >> 2)) >> 2)) >> 4) | (((i >> 1) | (i >> 2) | (((i >> 1) | (i >> 2)) >> 2) | (((i >> 1) | (i >> 2) | (((i >> 1) | (i >> 2)) >> 2)) >> 4)) >> 8) | (((i >> 1) | (i >> 2) | (((i >> 1) | (i >> 2)) >> 2) | (((i >> 1) | (i >> 2) | (((i >> 1) | (i >> 2)) >> 2)) >> 4) | (((i >> 1) | (i >> 2) | (((i >> 1) | (i >> 2)) >> 2) | (((i >> 1) | (i >> 2) | (((i >> 1) | (i >> 2)) >> 2)) >> 4)) >> 8)) >> 16) )
{
v9 = (volatile signed long long *)lf_dynarray_lvalue(a1, i);
if ( v9 )
{
v10 = (int)v9;
if ( *v9 || !(unsigned int)initialize_bucket(a1, v9, i, (long long)a2) )
break;
}
if ( !i )
return 1LL;
}
v11 = *(_QWORD *)(a1 + 168);
v12 = (my_bits_reverse_table[(unsigned __int8)v7] << 24) | (my_bits_reverse_table[BYTE1(v7)] << 16) | (my_bits_reverse_table[BYTE2(v7)] << 8) | my_bits_reverse_table[(v7 & 0x7FFFFFFFu) >> 24] | 1;
v13 = v10;
v14 = v11;
v15 = v12;
v16 = v26;
for ( j = v27; ; j = v27 )
{
if ( !(unsigned int)l_find(v13, v11, v15, v16, j, (unsigned int)&v23, (long long)a2, 0LL) )
{
_InterlockedExchange64(a2, 0LL);
_InterlockedExchange64(a2 + 1, 0LL);
_InterlockedExchange64(a2 + 2, 0LL);
return 1LL;
}
v19 = v25;
v18 = _InterlockedCompareExchange64(v24, v25 | 1, v25);
if ( v19 == v18 )
break;
v25 = v18;
v13 = v10;
LODWORD(v11) = v14;
v15 = v12;
v16 = v26;
}
v21 = v24;
v20 = (volatile signed long long *)_InterlockedCompareExchange64(v23, v25, (signed long long)v24);
if ( v21 == v20 )
{
lf_pinbox_free(a2, v24);
}
else
{
v24 = v20;
l_find(v10, v14, v12, v26, v27, (unsigned int)&v23, (long long)a2, 0LL);
}
_InterlockedExchange64(a2, 0LL);
_InterlockedExchange64(a2 + 1, 0LL);
_InterlockedExchange64(a2 + 2, 0LL);
result = 0LL;
_InterlockedDecrement((volatile signed __int32 *)(a1 + 196));
return result;
}
| lf_hash_delete:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RSI
MOV R14,RDI
MOV RDI,qword ptr [RDI + 0xa8]
MOV EAX,ECX
MOV qword ptr [RBP + -0x38],RDX
MOV RSI,RDX
MOV qword ptr [RBP + -0x30],RAX
MOV RDX,RAX
CALL qword ptr [R14 + 0xa0]
MOV R15D,EAX
AND EAX,0x7fffffff
MOV qword ptr [RBP + -0x58],RAX
XOR EDX,EDX
DIV dword ptr [R14 + 0xc0]
MOV R12D,EDX
LAB_0012f77e:
MOV RDI,R14
MOV ESI,R12D
CALL 0x0012f2ba
TEST RAX,RAX
JNZ 0x0012f7c5
LAB_0012f78e:
TEST R12D,R12D
JZ 0x0012f8d8
MOV EAX,R12D
SHR EAX,0x1
MOV ECX,R12D
SHR ECX,0x2
OR ECX,EAX
MOV EAX,ECX
SHR EAX,0x2
OR EAX,ECX
MOV ECX,EAX
SHR ECX,0x4
OR ECX,EAX
MOV EAX,ECX
SHR EAX,0x8
OR EAX,ECX
MOV ECX,EAX
SHR ECX,0x10
OR ECX,EAX
AND R12D,ECX
JMP 0x0012f77e
LAB_0012f7c5:
MOV R13,RAX
CMP qword ptr [RAX],0x0
JNZ 0x0012f7e3
MOV RDI,R14
MOV RSI,R13
MOV EDX,R12D
MOV RCX,RBX
CALL 0x0012f5c8
TEST EAX,EAX
JNZ 0x0012f78e
LAB_0012f7e3:
MOV RSI,qword ptr [R14 + 0xa8]
MOV EAX,0xff
MOV ECX,R15D
AND ECX,EAX
LEA RDX,[0x1e1cf0]
MOVZX ECX,byte ptr [RDX + RCX*0x1]
SHL ECX,0x18
MOV EDI,R15D
SHR EDI,0x8
AND EDI,EAX
MOVZX EDI,byte ptr [RDX + RDI*0x1]
SHL EDI,0x10
OR EDI,ECX
SHR R15D,0x10
AND R15D,EAX
MOVZX EAX,byte ptr [RDX + R15*0x1]
SHL EAX,0x8
OR EAX,EDI
MOV RCX,qword ptr [RBP + -0x58]
SHR ECX,0x18
MOVZX R15D,byte ptr [RDX + RCX*0x1]
OR R15D,EAX
OR R15D,0x1
LEA R9,[RBP + -0x50]
MOV RDI,R13
MOV R12,RSI
MOV EDX,R15D
MOV RCX,qword ptr [RBP + -0x38]
MOV R8,qword ptr [RBP + -0x30]
LAB_0012f84c:
PUSH 0x0
PUSH RBX
CALL 0x0012fada
POP RCX
POP RDX
TEST EAX,EAX
JZ 0x0012f8c7
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x40]
MOV RDX,RAX
OR RDX,0x1
CMPXCHG.LOCK qword ptr [RCX],RDX
JZ 0x0012f88b
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,R13
MOV RSI,R12
MOV EDX,R15D
MOV RCX,qword ptr [RBP + -0x38]
MOV R8,qword ptr [RBP + -0x30]
LEA R9,[RBP + -0x50]
JMP 0x0012f84c
LAB_0012f88b:
MOV RCX,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x48]
CMPXCHG.LOCK qword ptr [RDX],RCX
JNZ 0x0012f8ea
MOV RSI,qword ptr [RBP + -0x48]
MOV RDI,RBX
CALL 0x001a5307
LAB_0012f8aa:
XOR EAX,EAX
XCHG qword ptr [RBX],RAX
XOR EAX,EAX
XCHG qword ptr [RBX + 0x8],RAX
XOR EAX,EAX
XCHG qword ptr [RBX + 0x10],RAX
XOR EAX,EAX
DEC.LOCK dword ptr [R14 + 0xc4]
JMP 0x0012f8db
LAB_0012f8c7:
XOR EAX,EAX
XCHG qword ptr [RBX],RAX
XOR EAX,EAX
XCHG qword ptr [RBX + 0x8],RAX
XOR EAX,EAX
XCHG qword ptr [RBX + 0x10],RAX
LAB_0012f8d8:
PUSH 0x1
POP RAX
LAB_0012f8db:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012f8ea:
LEA R9,[RBP + -0x50]
MOV qword ptr [R9 + 0x8],RAX
MOV RDI,R13
MOV RSI,R12
MOV EDX,R15D
MOV RCX,qword ptr [RBP + -0x38]
MOV R8,qword ptr [RBP + -0x30]
PUSH 0x0
PUSH RBX
CALL 0x0012fada
POP RCX
POP RDX
JMP 0x0012f8aa
|
int8 lf_hash_delete(st_lf_hash *param_1,LF_PINS *param_2,uchar *param_3,ulong param_4)
{
charset_info_st *pcVar1;
uint uVar2;
int iVar3;
LF_SLIST **ppLVar4;
ulong uVar5;
ulong *puVar6;
uint uVar7;
uint uVar8;
bool bVar9;
ulong *local_58;
ulong *local_50;
ulong local_48;
uchar *local_40;
ulong local_38;
local_38 = param_4 & 0xffffffff;
local_40 = param_3;
uVar2 = (**(code **)(param_1 + 0xa0))(*(int8 *)(param_1 + 0xa8),param_3,local_38);
uVar5 = (ulong)(uVar2 & 0x7fffffff) % (ulong)*(uint *)(param_1 + 0xc0);
while( true ) {
uVar8 = (uint)uVar5;
ppLVar4 = (LF_SLIST **)lf_dynarray_lvalue(param_1,uVar5);
if ((ppLVar4 != (LF_SLIST **)0x0) &&
((*ppLVar4 != (LF_SLIST *)0x0 ||
(iVar3 = initialize_bucket(param_1,ppLVar4,uVar8,param_2), iVar3 == 0)))) break;
if (uVar8 == 0) {
return 1;
}
uVar7 = (uint)(uVar5 >> 2) | (uint)(uVar5 >> 1);
uVar7 = uVar7 >> 2 | uVar7;
uVar7 = uVar7 >> 4 | uVar7;
uVar7 = uVar7 >> 8 | uVar7;
uVar5 = (ulong)(uVar8 & (uVar7 >> 0x10 | uVar7));
}
pcVar1 = *(charset_info_st **)(param_1 + 0xa8);
uVar2 = (uint)(byte)_my_bits_reverse_table[(uVar2 & 0x7fffffff) >> 0x18] |
(uint)(byte)_my_bits_reverse_table[uVar2 >> 0x10 & 0xff] << 8 |
(uint)(byte)_my_bits_reverse_table[uVar2 >> 8 & 0xff] << 0x10 |
(uint)(byte)_my_bits_reverse_table[uVar2 & 0xff] << 0x18 | 1;
uVar5 = local_48;
do {
local_48 = uVar5;
iVar3 = l_find(ppLVar4,pcVar1,uVar2,local_40,local_38,(CURSOR *)&local_58,param_2,
(_func_char_void_ptr_void_ptr *)0x0);
if (iVar3 == 0) {
LOCK();
*(int8 *)param_2 = 0;
UNLOCK();
LOCK();
*(int8 *)(param_2 + 8) = 0;
UNLOCK();
LOCK();
*(int8 *)(param_2 + 0x10) = 0;
UNLOCK();
return 1;
}
LOCK();
uVar5 = *local_50;
bVar9 = local_48 == uVar5;
if (bVar9) {
*local_50 = local_48 | 1;
uVar5 = local_48;
}
UNLOCK();
} while (!bVar9);
LOCK();
puVar6 = (ulong *)*local_58;
bVar9 = local_50 == puVar6;
if (bVar9) {
*local_58 = local_48;
puVar6 = local_50;
}
UNLOCK();
if (bVar9) {
lf_pinbox_free(param_2,local_50);
}
else {
local_50 = puVar6;
l_find(ppLVar4,pcVar1,uVar2,local_40,local_38,(CURSOR *)&local_58,param_2,
(_func_char_void_ptr_void_ptr *)0x0);
}
LOCK();
*(int8 *)param_2 = 0;
UNLOCK();
LOCK();
*(int8 *)(param_2 + 8) = 0;
UNLOCK();
LOCK();
*(int8 *)(param_2 + 0x10) = 0;
UNLOCK();
LOCK();
*(int *)(param_1 + 0xc4) = *(int *)(param_1 + 0xc4) + -1;
UNLOCK();
return 0;
}
| |
55,108 | ggml_cpu_extra_work_size | ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu-traits.cpp | bool ggml_cpu_extra_work_size(int n_threads, const struct ggml_tensor * op, size_t * size) {
for (auto extra : ggml_backend_cpu_get_extra_buffers_type()) {
if (extra && extra->context) {
auto buf_extra = (ggml::cpu::extra_buffer_type *) extra->context;
auto tensor_traits = buf_extra->get_tensor_traits(op);
if (tensor_traits && tensor_traits->work_size(n_threads, op, *size)) {
return true;
}
}
}
return false;
} | O0 | cpp | ggml_cpu_extra_work_size:
subq $0x48, %rsp
movl %edi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
callq 0xf230
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
callq 0x107a0
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rdi
callq 0x10710
movq %rax, 0x18(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x106a0
testb $0x1, %al
jne 0x5a672
jmp 0x5a6f9
leaq 0x20(%rsp), %rdi
callq 0x106c0
movq (%rax), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x5a6e8
movq 0x10(%rsp), %rax
cmpq $0x0, 0x38(%rax)
je 0x5a6e8
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq (%rdi), %rax
callq *0x18(%rax)
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
je 0x5a6e6
movq (%rsp), %rdi
movl 0x40(%rsp), %esi
movq 0x38(%rsp), %rdx
movq 0x30(%rsp), %rcx
movq (%rdi), %rax
callq *0x10(%rax)
testb $0x1, %al
jne 0x5a6df
jmp 0x5a6e6
movb $0x1, 0x47(%rsp)
jmp 0x5a6fe
jmp 0x5a6e8
jmp 0x5a6ea
leaq 0x20(%rsp), %rdi
callq 0xfa20
jmp 0x5a65a
movb $0x0, 0x47(%rsp)
movb 0x47(%rsp), %al
andb $0x1, %al
addq $0x48, %rsp
retq
nopl (%rax)
nopl (%rax)
| ggml_cpu_extra_work_size:
sub rsp, 48h
mov [rsp+48h+var_8], edi
mov [rsp+48h+var_10], rsi
mov [rsp+48h+var_18], rdx
call __Z39ggml_backend_cpu_get_extra_buffers_typev; ggml_backend_cpu_get_extra_buffers_type(void)
mov [rsp+48h+var_20], rax
mov rdi, [rsp+48h+var_20]
call __ZNSt6vectorIP24ggml_backend_buffer_typeSaIS1_EE5beginEv; std::vector<ggml_backend_buffer_type *>::begin(void)
mov [rsp+48h+var_28], rax
mov rdi, [rsp+48h+var_20]
call __ZNSt6vectorIP24ggml_backend_buffer_typeSaIS1_EE3endEv; std::vector<ggml_backend_buffer_type *>::end(void)
mov [rsp+48h+var_30], rax
loc_5A65A:
lea rdi, [rsp+48h+var_28]
lea rsi, [rsp+48h+var_30]
call __ZN9__gnu_cxxneIPP24ggml_backend_buffer_typeSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_; __gnu_cxx::operator!=<ggml_backend_buffer_type **,std::vector<ggml_backend_buffer_type *>>(__gnu_cxx::__normal_iterator<ggml_backend_buffer_type **,std::vector<ggml_backend_buffer_type *>> const&,__gnu_cxx::__normal_iterator<ggml_backend_buffer_type **,std::vector<ggml_backend_buffer_type *>> const&)
test al, 1
jnz short loc_5A672
jmp loc_5A6F9
loc_5A672:
lea rdi, [rsp+48h+var_28]
call __ZNK9__gnu_cxx17__normal_iteratorIPP24ggml_backend_buffer_typeSt6vectorIS2_SaIS2_EEEdeEv; __gnu_cxx::__normal_iterator<ggml_backend_buffer_type **,std::vector<ggml_backend_buffer_type *>>::operator*(void)
mov rax, [rax]
mov [rsp+48h+var_38], rax
cmp [rsp+48h+var_38], 0
jz short loc_5A6E8
mov rax, [rsp+48h+var_38]
cmp qword ptr [rax+38h], 0
jz short loc_5A6E8
mov rax, [rsp+48h+var_38]
mov rax, [rax+38h]
mov [rsp+48h+var_40], rax
mov rdi, [rsp+48h+var_40]
mov rsi, [rsp+48h+var_10]
mov rax, [rdi]
call qword ptr [rax+18h]
mov [rsp+48h+var_48], rax
cmp [rsp+48h+var_48], 0
jz short loc_5A6E6
mov rdi, [rsp+48h+var_48]
mov esi, [rsp+48h+var_8]
mov rdx, [rsp+48h+var_10]
mov rcx, [rsp+48h+var_18]
mov rax, [rdi]
call qword ptr [rax+10h]
test al, 1
jnz short loc_5A6DF
jmp short loc_5A6E6
loc_5A6DF:
mov [rsp+48h+var_1], 1
jmp short loc_5A6FE
loc_5A6E6:
jmp short $+2
loc_5A6E8:
jmp short $+2
loc_5A6EA:
lea rdi, [rsp+48h+var_28]
call __ZN9__gnu_cxx17__normal_iteratorIPP24ggml_backend_buffer_typeSt6vectorIS2_SaIS2_EEEppEv; __gnu_cxx::__normal_iterator<ggml_backend_buffer_type **,std::vector<ggml_backend_buffer_type *>>::operator++(void)
jmp loc_5A65A
loc_5A6F9:
mov [rsp+48h+var_1], 0
loc_5A6FE:
mov al, [rsp+48h+var_1]
and al, 1
add rsp, 48h
retn
| char ggml_cpu_extra_work_size(unsigned int a1, long long a2, long long a3)
{
long long v4; // [rsp+0h] [rbp-48h]
long long v5; // [rsp+10h] [rbp-38h]
long long v6; // [rsp+18h] [rbp-30h] BYREF
long long v7; // [rsp+20h] [rbp-28h] BYREF
long long extra_buffers_type; // [rsp+28h] [rbp-20h]
long long v9; // [rsp+30h] [rbp-18h]
long long v10; // [rsp+38h] [rbp-10h]
unsigned int v11; // [rsp+40h] [rbp-8h]
v11 = a1;
v10 = a2;
v9 = a3;
extra_buffers_type = ggml_backend_cpu_get_extra_buffers_type();
v7 = std::vector<ggml_backend_buffer_type *>::begin(extra_buffers_type);
v6 = std::vector<ggml_backend_buffer_type *>::end(extra_buffers_type);
while ( (__gnu_cxx::operator!=<ggml_backend_buffer_type **,std::vector<ggml_backend_buffer_type *>>(&v7, &v6) & 1) != 0 )
{
v5 = *(_QWORD *)__gnu_cxx::__normal_iterator<ggml_backend_buffer_type **,std::vector<ggml_backend_buffer_type *>>::operator*(&v7);
if ( v5 )
{
if ( *(_QWORD *)(v5 + 56) )
{
v4 = (*(long long ( **)(_QWORD, long long))(**(_QWORD **)(v5 + 56) + 24LL))(*(_QWORD *)(v5 + 56), v10);
if ( v4 )
{
if ( ((*(long long ( **)(long long, _QWORD, long long, long long))(*(_QWORD *)v4 + 16LL))(v4, v11, v10, v9) & 1) != 0 )
return 1;
}
}
}
__gnu_cxx::__normal_iterator<ggml_backend_buffer_type **,std::vector<ggml_backend_buffer_type *>>::operator++(&v7);
}
return 0;
}
| ggml_cpu_extra_work_size:
SUB RSP,0x48
MOV dword ptr [RSP + 0x40],EDI
MOV qword ptr [RSP + 0x38],RSI
MOV qword ptr [RSP + 0x30],RDX
CALL 0x0010f230
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001107a0
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00110710
MOV qword ptr [RSP + 0x18],RAX
LAB_0015a65a:
LEA RDI,[RSP + 0x20]
LEA RSI,[RSP + 0x18]
CALL 0x001106a0
TEST AL,0x1
JNZ 0x0015a672
JMP 0x0015a6f9
LAB_0015a672:
LEA RDI,[RSP + 0x20]
CALL 0x001106c0
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x10],RAX
CMP qword ptr [RSP + 0x10],0x0
JZ 0x0015a6e8
MOV RAX,qword ptr [RSP + 0x10]
CMP qword ptr [RAX + 0x38],0x0
JZ 0x0015a6e8
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
MOV qword ptr [RSP],RAX
CMP qword ptr [RSP],0x0
JZ 0x0015a6e6
MOV RDI,qword ptr [RSP]
MOV ESI,dword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x10]
TEST AL,0x1
JNZ 0x0015a6df
JMP 0x0015a6e6
LAB_0015a6df:
MOV byte ptr [RSP + 0x47],0x1
JMP 0x0015a6fe
LAB_0015a6e6:
JMP 0x0015a6e8
LAB_0015a6e8:
JMP 0x0015a6ea
LAB_0015a6ea:
LEA RDI,[RSP + 0x20]
CALL 0x0010fa20
JMP 0x0015a65a
LAB_0015a6f9:
MOV byte ptr [RSP + 0x47],0x0
LAB_0015a6fe:
MOV AL,byte ptr [RSP + 0x47]
AND AL,0x1
ADD RSP,0x48
RET
|
int1 ggml_cpu_extra_work_size(int4 param_1,int8 param_2,int8 param_3)
{
long lVar1;
bool bVar2;
long *plVar3;
ulong uVar4;
int8 local_30;
int8 local_28;
vector<ggml_backend_buffer_type*,std::allocator<ggml_backend_buffer_type*>> *local_20;
int8 local_18;
int8 local_10;
int4 local_8;
local_18 = param_3;
local_10 = param_2;
local_8 = param_1;
local_20 = (vector<ggml_backend_buffer_type*,std::allocator<ggml_backend_buffer_type*>> *)
ggml_backend_cpu_get_extra_buffers_type();
local_28 = std::vector<ggml_backend_buffer_type*,std::allocator<ggml_backend_buffer_type*>>::begin
(local_20);
local_30 = std::vector<ggml_backend_buffer_type*,std::allocator<ggml_backend_buffer_type*>>::end
(local_20);
while( true ) {
bVar2 = __gnu_cxx::operator!=((__normal_iterator *)&local_28,(__normal_iterator *)&local_30);
if (!bVar2) {
return 0;
}
plVar3 = (long *)__gnu_cxx::
__normal_iterator<ggml_backend_buffer_type**,std::vector<ggml_backend_buffer_type*,std::allocator<ggml_backend_buffer_type*>>>
::operator*((__normal_iterator<ggml_backend_buffer_type**,std::vector<ggml_backend_buffer_type*,std::allocator<ggml_backend_buffer_type*>>>
*)&local_28);
lVar1 = *plVar3;
if ((((lVar1 != 0) && (*(long *)(lVar1 + 0x38) != 0)) &&
(plVar3 = (long *)(**(code **)(**(long **)(lVar1 + 0x38) + 0x18))
(*(long **)(lVar1 + 0x38),local_10), plVar3 != (long *)0x0)) &&
(uVar4 = (**(code **)(*plVar3 + 0x10))(plVar3,local_8,local_10,local_18), (uVar4 & 1) != 0))
break;
__gnu_cxx::
__normal_iterator<ggml_backend_buffer_type**,std::vector<ggml_backend_buffer_type*,std::allocator<ggml_backend_buffer_type*>>>
::operator++((__normal_iterator<ggml_backend_buffer_type**,std::vector<ggml_backend_buffer_type*,std::allocator<ggml_backend_buffer_type*>>>
*)&local_28);
}
return 1;
}
| |
55,109 | cmdline::insert(char const*, char const*) | untodesu[P]voxelius/core/cmdline.cc | void cmdline::insert(const char *option, const char *argument)
{
if(argument == nullptr)
options.insert_or_assign(option, std::string());
else options.insert_or_assign(option, argument);
} | O1 | cpp | cmdline::insert(char const*, char const*):
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rax
movq %rsi, 0x30(%rsp)
testq %rsi, %rsi
je 0x503a8
leaq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rdx
movq %rax, %rsi
callq 0x1ccb6
leaq 0xbb889(%rip), %rdi # 0x10bc20
leaq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x50616
jmp 0x503fc
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %rax, %rsi
callq 0x1ccb6
leaq 0x48(%rsp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
leaq 0xbb84a(%rip), %rdi # 0x10bc20
leaq 0x10(%rsp), %rsi
leaq 0x38(%rsp), %rdx
callq 0x505de
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x503fc
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x176b0
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x50417
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x176b0
addq $0x58, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x50440
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x176b0
jmp 0x50440
jmp 0x5045d
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x50460
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x176b0
jmp 0x50460
movq %rax, %rbx
movq %rbx, %rdi
callq 0x17c80
| _ZN7cmdline6insertEPKcS1_:
push r14
push rbx
sub rsp, 58h
mov rax, rdi
mov [rsp+68h+var_38], rsi
test rsi, rsi
jz short loc_503A8
lea rdi, [rsp+68h+var_58]
lea rdx, [rsp+68h+var_30]
mov rsi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, _ZL7optionsB5cxx11; options
lea rsi, [rsp+68h+var_58]
lea rdx, [rsp+68h+var_38]
call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S5_EEE16insert_or_assignIRPKcEESA_INSt8__detail14_Node_iteratorISC_Lb0ELb1EEEbEOS5_OT_; std::unordered_map<std::string,std::string>::insert_or_assign<char const*&>(std::string&&,char const*&)
jmp short loc_503FC
loc_503A8:
lea rdi, [rsp+68h+var_58]
lea rdx, [rsp+68h+var_59]
mov rsi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea r14, [rsp+68h+var_20]
mov [r14-10h], r14
mov qword ptr [r14-8], 0
mov byte ptr [r14], 0
lea rdi, _ZL7optionsB5cxx11; options
lea rsi, [rsp+68h+var_58]
lea rdx, [rsp+68h+var_30]
call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S5_EEE16insert_or_assignIS5_EESA_INSt8__detail14_Node_iteratorISC_Lb0ELb1EEEbEOS5_OT_; std::unordered_map<std::string,std::string>::insert_or_assign<std::string>(std::string&&,std::string &&)
mov rdi, [rsp+68h+var_30]; void *
cmp rdi, r14
jz short loc_503FC
mov rsi, [rsp+68h+var_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_503FC:
lea rax, [rsp+68h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_50417
mov rsi, [rsp+68h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_50417:
add rsp, 58h
pop rbx
pop r14
retn
mov rbx, rax
mov rdi, [rsp+arg_30]; void *
cmp rdi, r14
jz short loc_50440
mov rsi, [rsp+arg_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_50440
jmp short loc_5045D
mov rbx, rax
loc_50440:
lea rax, [rsp+arg_18]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_50460
mov rsi, [rsp+arg_18]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_50460
loc_5045D:
mov rbx, rax
loc_50460:
mov rdi, rbx
call __Unwind_Resume
| void cmdline::insert(cmdline *this, const char *a2, const char *a3)
{
void *v3[2]; // [rsp+10h] [rbp-58h] BYREF
long long v4; // [rsp+20h] [rbp-48h] BYREF
const char *v5; // [rsp+30h] [rbp-38h] BYREF
void *v6[2]; // [rsp+38h] [rbp-30h] BYREF
_QWORD v7[4]; // [rsp+48h] [rbp-20h] BYREF
v5 = a2;
if ( a2 )
{
std::string::basic_string<std::allocator<char>>(v3, (long long)this);
std::unordered_map<std::string,std::string>::insert_or_assign<char const*&>(&options[abi:cxx11], v3, &v5);
}
else
{
std::string::basic_string<std::allocator<char>>(v3, (long long)this);
v6[0] = v7;
v6[1] = 0LL;
LOBYTE(v7[0]) = 0;
std::unordered_map<std::string,std::string>::insert_or_assign<std::string>(&options[abi:cxx11], v3, v6);
if ( v6[0] != v7 )
operator delete(v6[0], v7[0] + 1LL);
}
if ( v3[0] != &v4 )
operator delete(v3[0], v4 + 1);
}
| insert:
PUSH R14
PUSH RBX
SUB RSP,0x58
MOV RAX,RDI
MOV qword ptr [RSP + 0x30],RSI
TEST RSI,RSI
JZ 0x001503a8
LAB_0015037e:
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0x38]
MOV RSI,RAX
CALL 0x0011ccb6
LAB_00150390:
LEA RDI,[0x20bc20]
LEA RSI,[RSP + 0x10]
LEA RDX,[RSP + 0x30]
CALL 0x00150616
JMP 0x001503fc
LAB_001503a8:
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0xf]
MOV RSI,RAX
CALL 0x0011ccb6
LEA R14,[RSP + 0x48]
MOV qword ptr [R14 + -0x10],R14
MOV qword ptr [R14 + -0x8],0x0
MOV byte ptr [R14],0x0
LAB_001503cf:
LEA RDI,[0x20bc20]
LEA RSI,[RSP + 0x10]
LEA RDX,[RSP + 0x38]
CALL 0x001505de
LAB_001503e5:
MOV RDI,qword ptr [RSP + 0x38]
CMP RDI,R14
JZ 0x001503fc
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x001176b0
LAB_001503fc:
LEA RAX,[RSP + 0x20]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00150417
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x001176b0
LAB_00150417:
ADD RSP,0x58
POP RBX
POP R14
RET
|
/* cmdline::insert(char const*, char const*) */
void cmdline::insert(char *param_1,char *param_2)
{
allocator local_59;
long *local_58 [2];
long local_48 [2];
char *local_38;
int1 *local_30;
int8 local_28;
int1 local_20;
int7 uStack_1f;
local_38 = param_2;
if (param_2 == (char *)0x0) {
/* try { // try from 001503a8 to 001503b9 has its CatchHandler @ 0015043b */
std::__cxx11::string::string<std::allocator<char>>((string *)local_58,param_1,&local_59);
local_28 = 0;
local_20 = 0;
/* try { // try from 001503cf to 001503e4 has its CatchHandler @ 0015041f */
local_30 = &local_20;
std::
unordered_map<std::__cxx11::string,std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::insert_or_assign<std::__cxx11::string>
((unordered_map<std::__cxx11::string,std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
*)options_abi_cxx11_,(string *)local_58,(string *)&local_30);
if (local_30 != &local_20) {
operator_delete(local_30,CONCAT71(uStack_1f,local_20) + 1);
}
}
else {
/* try { // try from 0015037e to 0015038f has its CatchHandler @ 0015045d */
std::__cxx11::string::string<std::allocator<char>>
((string *)local_58,param_1,(allocator *)&local_30);
/* try { // try from 00150390 to 001503a5 has its CatchHandler @ 0015043d */
std::
unordered_map<std::__cxx11::string,std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::insert_or_assign<char_const*&>
((unordered_map<std::__cxx11::string,std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
*)options_abi_cxx11_,(string *)local_58,&local_38);
}
if (local_58[0] != local_48) {
operator_delete(local_58[0],local_48[0] + 1);
}
return;
}
| |
55,110 | nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::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>>::dump_float(double) | llama.cpp/common/json.hpp | void dump_float(number_float_t x)
{
// NaN / inf
if (!std::isfinite(x))
{
o->write_characters("null", 4);
return;
}
// If number_float_t is an IEEE-754 single or double precision number,
// use the Grisu2 algorithm to produce short numbers which are
// guaranteed to round-trip, using strtof and strtod, resp.
//
// NB: The test below works if <long double> == <double>.
static constexpr bool is_ieee_single_or_double
= (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 24 && std::numeric_limits<number_float_t>::max_exponent == 128) ||
(std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 53 && std::numeric_limits<number_float_t>::max_exponent == 1024);
dump_float(x, std::integral_constant<bool, is_ieee_single_or_double>());
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::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>>::dump_float(double):
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
jl 0x8ef8d
movq (%rbx), %rdi
movq (%rdi), %rax
movq 0x8(%rax), %rax
leaq 0x9cc81(%rip), %rsi # 0x12bc00
movl $0x4, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
leaq 0x10(%rbx), %r14
leaq 0x50(%rbx), %rsi
movq %r14, %rdi
callq 0x8f1d1
movq (%rbx), %rdi
subq %r14, %rax
movq (%rdi), %rcx
movq 0x8(%rcx), %rcx
movq %r14, %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rcx
nop
| _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10dump_floatEd:
push r14
push rbx
push rax
mov rbx, rdi
movq rax, xmm0
btr rax, 3Fh ; '?'
mov rcx, 7FF0000000000000h
cmp rax, rcx
jl short loc_8EF8D
mov rdi, [rbx]
mov rax, [rdi]
mov rax, [rax+8]
lea rsi, aOnNull_0+5; "null"
mov edx, 4
add rsp, 8
pop rbx
pop r14
jmp rax
loc_8EF8D:
lea r14, [rbx+10h]
lea rsi, [rbx+50h]
mov rdi, r14; this
call _ZN8nlohmann16json_abi_v3_11_36detail8to_charsIdEEPcS3_PKcT_; nlohmann::json_abi_v3_11_3::detail::to_chars<double>(char *,char const*,double)
mov rdi, [rbx]
sub rax, r14
mov rcx, [rdi]
mov rcx, [rcx+8]
mov rsi, r14
mov rdx, rax
add rsp, 8
pop rbx
pop r14
jmp rcx
| long long nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::dump_float(
_QWORD *a1,
double a2)
{
long long v3; // rax
if ( (*(_QWORD *)&a2 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL )
return (*(long long ( **)(_QWORD, char *, long long))(*(_QWORD *)*a1 + 8LL))(*a1, "null", 4LL);
v3 = nlohmann::json_abi_v3_11_3::detail::to_chars<double>((nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)(a1 + 2));
return (*(long long ( **)(_QWORD, _QWORD *, long long))(*(_QWORD *)*a1 + 8LL))(
*a1,
a1 + 2,
v3 - (_QWORD)(a1 + 2));
}
| dump_float:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOVQ RAX,XMM0
BTR RAX,0x3f
MOV RCX,0x7ff0000000000000
CMP RAX,RCX
JL 0x0018ef8d
MOV RDI,qword ptr [RBX]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x8]
LEA RSI,[0x22bc00]
MOV EDX,0x4
ADD RSP,0x8
POP RBX
POP R14
JMP RAX
LAB_0018ef8d:
LEA R14,[RBX + 0x10]
LEA RSI,[RBX + 0x50]
MOV RDI,R14
CALL 0x0018f1d1
MOV RDI,qword ptr [RBX]
SUB RAX,R14
MOV RCX,qword ptr [RDI]
MOV RCX,qword ptr [RCX + 0x8]
MOV RSI,R14
MOV RDX,RAX
ADD RSP,0x8
POP RBX
POP R14
JMP RCX
|
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::dump_float(double) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::dump_float(serializer<nlohmann::json_abi_v3_11_3::basic_json<std::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,double param_1)
{
serializer<nlohmann::json_abi_v3_11_3::basic_json<std::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>>
*psVar1;
code *UNRECOVERED_JUMPTABLE;
char *pcVar2;
if (0x7fefffffffffffff < (ulong)ABS(param_1)) {
/* WARNING: Could not recover jumptable at 0x0018ef8b. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(**(long **)this + 8))(*(long **)this,"null",4);
return;
}
psVar1 = this + 0x10;
pcVar2 = to_chars<double>((char *)psVar1,(char *)(this + 0x50),param_1);
UNRECOVERED_JUMPTABLE = *(code **)(**(long **)this + 8);
/* WARNING: Could not recover jumptable at 0x0018efb7. Too many branches */
/* WARNING: Treating indirect jump as call */
(*UNRECOVERED_JUMPTABLE)(*(long **)this,psVar1,(long)pcVar2 - (long)psVar1,UNRECOVERED_JUMPTABLE);
return;
}
| |
55,111 | ASTWithBlock::~ASTWithBlock() | Pyarmor-Static-Unpack-1shot/ASTNode.h | ASTWithBlock(int end)
: ASTBlock(ASTBlock::BLK_WITH, end) { } | O3 | c | ASTWithBlock::~ASTWithBlock():
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1db0e(%rip), %rax # 0x49e60
movq %rax, (%rdi)
movq 0x48(%rdi), %rdi
testq %rdi, %rdi
je 0x2c369
decl 0x8(%rdi)
jne 0x2c369
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x2c37d
decl 0x8(%rdi)
jne 0x2c37d
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x1d46c(%rip), %rax # 0x497f0
movq %rax, (%rbx)
leaq 0x20(%rbx), %rdi
callq 0x2b2ec
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x71f0
| _ZN12ASTWithBlockD0Ev:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
lea rax, off_49E60
mov [rdi], rax
mov rdi, [rdi+48h]
test rdi, rdi
jz short loc_2C369
dec dword ptr [rdi+8]
jnz short loc_2C369
mov rax, [rdi]
call qword ptr [rax+8]
loc_2C369:
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_2C37D
dec dword ptr [rdi+8]
jnz short loc_2C37D
mov rax, [rdi]
call qword ptr [rax+8]
loc_2C37D:
lea rax, off_497F0
mov [rbx], rax
lea rdi, [rbx+20h]
call _ZNSt7__cxx1110_List_baseI6PycRefI7ASTNodeESaIS3_EE8_M_clearEv; std::_List_base<PycRef<ASTNode>>::_M_clear(void)
mov rdi, rbx; void *
add rsp, 8
pop rbx
pop rbp
jmp __ZdlPv; operator delete(void *)
| void ASTWithBlock::~ASTWithBlock(ASTWithBlock *this)
{
_DWORD *v2; // rdi
bool v3; // zf
_DWORD *v4; // rdi
*(_QWORD *)this = off_49E60;
v2 = (_DWORD *)*((_QWORD *)this + 9);
if ( v2 )
{
v3 = v2[2]-- == 1;
if ( v3 )
(*(void ( **)(_DWORD *))(*(_QWORD *)v2 + 8LL))(v2);
}
v4 = (_DWORD *)*((_QWORD *)this + 8);
if ( v4 )
{
v3 = v4[2]-- == 1;
if ( v3 )
(*(void ( **)(_DWORD *))(*(_QWORD *)v4 + 8LL))(v4);
}
*(_QWORD *)this = off_497F0;
std::_List_base<PycRef<ASTNode>>::_M_clear((_QWORD **)this + 4);
operator delete(this);
}
| ~ASTWithBlock:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA RAX,[0x149e60]
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x48]
TEST RDI,RDI
JZ 0x0012c369
DEC dword ptr [RDI + 0x8]
JNZ 0x0012c369
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_0012c369:
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x0012c37d
DEC dword ptr [RDI + 0x8]
JNZ 0x0012c37d
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_0012c37d:
LEA RAX,[0x1497f0]
MOV qword ptr [RBX],RAX
LEA RDI,[RBX + 0x20]
CALL 0x0012b2ec
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x001071f0
|
/* ASTWithBlock::~ASTWithBlock() */
void __thiscall ASTWithBlock::~ASTWithBlock(ASTWithBlock *this)
{
long *plVar1;
long *plVar2;
*(int ***)this = &PTR__ASTWithBlock_00149e60;
plVar2 = *(long **)(this + 0x48);
if (plVar2 != (long *)0x0) {
plVar1 = plVar2 + 1;
*(int *)plVar1 = (int)*plVar1 + -1;
if ((int)*plVar1 == 0) {
(**(code **)(*plVar2 + 8))();
}
}
plVar2 = *(long **)(this + 0x40);
if (plVar2 != (long *)0x0) {
plVar1 = plVar2 + 1;
*(int *)plVar1 = (int)*plVar1 + -1;
if ((int)*plVar1 == 0) {
(**(code **)(*plVar2 + 8))();
}
}
*(int ***)this = &PTR__ASTBlock_001497f0;
std::__cxx11::_List_base<PycRef<ASTNode>,std::allocator<PycRef<ASTNode>>>::_M_clear
((_List_base<PycRef<ASTNode>,std::allocator<PycRef<ASTNode>>> *)(this + 0x20));
operator_delete(this);
return;
}
| |
55,112 | test_mul_mat_id::vars[abi:cxx11]() | monkey531[P]llama/tests/test-backend-ops.cpp | std::string vars() override {
return VARS_TO_STR8(type_a, type_b, n_mats, n_used, b, m, n, k);
} | O2 | cpp | test_mul_mat_id::vars[abi:cxx11]():
pushq %r15
pushq %r14
pushq %rbx
subq $0x3a0, %rsp # imm = 0x3A0
movq %rsi, %r14
movq %rdi, %rbx
movl 0x38(%rsi), %esi
leaq 0x380(%rsp), %r15
movq %r15, %rdi
callq 0x18e2b
leaq 0xae43(%rip), %rsi # 0x30f97
leaq 0x1c0(%rsp), %rdi
movq %r15, %rdx
callq 0x1ca87
leaq 0xac0c(%rip), %rdx # 0x30d77
leaq 0x1e0(%rsp), %rdi
leaq 0x1c0(%rsp), %rsi
callq 0x1cff2
movl 0x3c(%r14), %esi
leaq 0x180(%rsp), %rdi
callq 0x18e2b
leaq 0xae07(%rip), %rsi # 0x30f9f
leaq 0x1a0(%rsp), %rdi
leaq 0x180(%rsp), %rdx
callq 0x1ca87
leaq 0x200(%rsp), %rdi
leaq 0x1e0(%rsp), %rsi
leaq 0x1a0(%rsp), %rdx
callq 0x1cf8b
leaq 0xaba6(%rip), %rdx # 0x30d77
leaq 0x220(%rsp), %rdi
leaq 0x200(%rsp), %rsi
callq 0x1cff2
leaq 0x40(%r14), %rsi
leaq 0x140(%rsp), %rdi
callq 0x18f03
leaq 0xae3c(%rip), %rsi # 0x3103a
leaq 0x160(%rsp), %rdi
leaq 0x140(%rsp), %rdx
callq 0x1ca87
leaq 0x240(%rsp), %rdi
leaq 0x220(%rsp), %rsi
leaq 0x160(%rsp), %rdx
callq 0x1cf8b
leaq 0xab40(%rip), %rdx # 0x30d77
leaq 0x260(%rsp), %rdi
leaq 0x240(%rsp), %rsi
callq 0x1cff2
leaq 0x44(%r14), %rsi
leaq 0x100(%rsp), %rdi
callq 0x18f03
leaq 0xadde(%rip), %rsi # 0x31042
leaq 0x120(%rsp), %rdi
leaq 0x100(%rsp), %rdx
callq 0x1ca87
leaq 0x280(%rsp), %rdi
leaq 0x260(%rsp), %rsi
leaq 0x120(%rsp), %rdx
callq 0x1cf8b
leaq 0xaada(%rip), %rdx # 0x30d77
leaq 0x2a0(%rsp), %rdi
leaq 0x280(%rsp), %rsi
callq 0x1cff2
leaq 0x48(%r14), %rsi
leaq 0xc0(%rsp), %rdi
callq 0x18f24
leaq 0xac8b(%rip), %rsi # 0x30f55
leaq 0xe0(%rsp), %rdi
leaq 0xc0(%rsp), %rdx
callq 0x1ca87
leaq 0x2c0(%rsp), %rdi
leaq 0x2a0(%rsp), %rsi
leaq 0xe0(%rsp), %rdx
callq 0x1cf8b
leaq 0xaa74(%rip), %rdx # 0x30d77
leaq 0x2e0(%rsp), %rdi
leaq 0x2c0(%rsp), %rsi
callq 0x1cff2
leaq 0x50(%r14), %rsi
leaq 0x80(%rsp), %rdi
callq 0x18f13
leaq 0xabfd(%rip), %rsi # 0x30f2d
leaq 0xa0(%rsp), %rdi
leaq 0x80(%rsp), %rdx
callq 0x1ca87
leaq 0x300(%rsp), %rdi
leaq 0x2e0(%rsp), %rsi
leaq 0xa0(%rsp), %rdx
callq 0x1cf8b
leaq 0xaa0e(%rip), %rdx # 0x30d77
leaq 0x320(%rsp), %rdi
leaq 0x300(%rsp), %rsi
callq 0x1cff2
leaq 0x58(%r14), %rsi
leaq 0x40(%rsp), %rdi
callq 0x18f13
leaq 0xacd1(%rip), %rsi # 0x31064
leaq 0x60(%rsp), %rdi
leaq 0x40(%rsp), %rdx
callq 0x1ca87
leaq 0x340(%rsp), %rdi
leaq 0x320(%rsp), %rsi
leaq 0x60(%rsp), %rdx
callq 0x1cf8b
leaq 0xa9b4(%rip), %rdx # 0x30d77
leaq 0x360(%rsp), %rdi
leaq 0x340(%rsp), %rsi
callq 0x1cff2
addq $0x60, %r14
movq %rsp, %rdi
movq %r14, %rsi
callq 0x18f13
leaq 0xac89(%rip), %rsi # 0x31077
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x1ca87
leaq 0x360(%rsp), %rsi
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x1cf8b
leaq 0x20(%rsp), %rdi
callq 0xf280
movq %rsp, %rdi
callq 0xf280
leaq 0x360(%rsp), %rdi
callq 0xf280
leaq 0x340(%rsp), %rdi
callq 0xf280
leaq 0x60(%rsp), %rdi
callq 0xf280
leaq 0x40(%rsp), %rdi
callq 0xf280
leaq 0x320(%rsp), %rdi
callq 0xf280
leaq 0x300(%rsp), %rdi
callq 0xf280
leaq 0xa0(%rsp), %rdi
callq 0xf280
leaq 0x80(%rsp), %rdi
callq 0xf280
leaq 0x2e0(%rsp), %rdi
callq 0xf280
leaq 0x2c0(%rsp), %rdi
callq 0xf280
leaq 0xe0(%rsp), %rdi
callq 0xf280
leaq 0xc0(%rsp), %rdi
callq 0xf280
leaq 0x2a0(%rsp), %rdi
callq 0xf280
leaq 0x280(%rsp), %rdi
callq 0xf280
leaq 0x120(%rsp), %rdi
callq 0xf280
leaq 0x100(%rsp), %rdi
callq 0xf280
leaq 0x260(%rsp), %rdi
callq 0xf280
leaq 0x240(%rsp), %rdi
callq 0xf280
leaq 0x160(%rsp), %rdi
callq 0xf280
leaq 0x140(%rsp), %rdi
callq 0xf280
leaq 0x220(%rsp), %rdi
callq 0xf280
leaq 0x200(%rsp), %rdi
callq 0xf280
leaq 0x1a0(%rsp), %rdi
callq 0xf280
leaq 0x180(%rsp), %rdi
callq 0xf280
leaq 0x1e0(%rsp), %rdi
callq 0xf280
leaq 0x1c0(%rsp), %rdi
callq 0xf280
leaq 0x380(%rsp), %rdi
callq 0xf280
movq %rbx, %rax
addq $0x3a0, %rsp # imm = 0x3A0
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xf280
jmp 0x2659d
movq %rax, %rbx
movq %rsp, %rdi
callq 0xf280
jmp 0x265aa
movq %rax, %rbx
leaq 0x360(%rsp), %rdi
callq 0xf280
jmp 0x265bc
movq %rax, %rbx
leaq 0x340(%rsp), %rdi
callq 0xf280
jmp 0x265ce
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0xf280
leaq 0x40(%rsp), %rdi
callq 0xf280
leaq 0x320(%rsp), %rdi
callq 0xf280
leaq 0x300(%rsp), %rdi
callq 0xf280
leaq 0xa0(%rsp), %rdi
callq 0xf280
leaq 0x80(%rsp), %rdi
callq 0xf280
leaq 0x2e0(%rsp), %rdi
callq 0xf280
leaq 0x2c0(%rsp), %rdi
callq 0xf280
leaq 0xe0(%rsp), %rdi
callq 0xf280
leaq 0xc0(%rsp), %rdi
callq 0xf280
leaq 0x2a0(%rsp), %rdi
callq 0xf280
leaq 0x280(%rsp), %rdi
callq 0xf280
leaq 0x120(%rsp), %rdi
callq 0xf280
leaq 0x100(%rsp), %rdi
callq 0xf280
leaq 0x260(%rsp), %rdi
callq 0xf280
leaq 0x240(%rsp), %rdi
callq 0xf280
leaq 0x160(%rsp), %rdi
callq 0xf280
leaq 0x140(%rsp), %rdi
callq 0xf280
leaq 0x220(%rsp), %rdi
callq 0xf280
leaq 0x200(%rsp), %rdi
callq 0xf280
leaq 0x1a0(%rsp), %rdi
callq 0xf280
leaq 0x180(%rsp), %rdi
callq 0xf280
leaq 0x1e0(%rsp), %rdi
callq 0xf280
leaq 0x1c0(%rsp), %rdi
callq 0xf280
leaq 0x380(%rsp), %rdi
callq 0xf280
movq %rbx, %rdi
callq 0xfb30
movq %rax, %rbx
jmp 0x265d8
movq %rax, %rbx
jmp 0x265e2
movq %rax, %rbx
jmp 0x265ef
movq %rax, %rbx
jmp 0x265fc
movq %rax, %rbx
jmp 0x26609
movq %rax, %rbx
jmp 0x26616
movq %rax, %rbx
jmp 0x26623
movq %rax, %rbx
jmp 0x26630
movq %rax, %rbx
jmp 0x2663d
movq %rax, %rbx
jmp 0x2664a
movq %rax, %rbx
jmp 0x26657
movq %rax, %rbx
jmp 0x26664
movq %rax, %rbx
jmp 0x26671
movq %rax, %rbx
jmp 0x2667e
movq %rax, %rbx
jmp 0x2668b
movq %rax, %rbx
jmp 0x26698
movq %rax, %rbx
jmp 0x266a5
movq %rax, %rbx
jmp 0x266b2
movq %rax, %rbx
jmp 0x266bf
movq %rax, %rbx
jmp 0x266cc
movq %rax, %rbx
jmp 0x266d9
movq %rax, %rbx
jmp 0x266e6
movq %rax, %rbx
jmp 0x266f3
movq %rax, %rbx
jmp 0x26700
nop
| _ZN15test_mul_mat_id4varsB5cxx11Ev:
push r15
push r14
push rbx
sub rsp, 3A0h
mov r14, rsi
mov rbx, rdi
mov esi, [rsi+38h]
lea r15, [rsp+3B8h+var_38]
mov rdi, r15
call _ZL10var_to_strB5cxx119ggml_type; var_to_str(ggml_type)
lea rsi, aTypeA; "type_a="
lea rdi, [rsp+3B8h+var_1F8]
mov rdx, r15
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
lea rdx, asc_30D77; ","
lea rdi, [rsp+3B8h+var_1D8]
lea rsi, [rsp+3B8h+var_1F8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
mov esi, [r14+3Ch]
lea rdi, [rsp+3B8h+var_238]
call _ZL10var_to_strB5cxx119ggml_type; var_to_str(ggml_type)
lea rsi, aTypeB; "type_b="
lea rdi, [rsp+3B8h+var_218]
lea rdx, [rsp+3B8h+var_238]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
lea rdi, [rsp+3B8h+var_1B8]
lea rsi, [rsp+3B8h+var_1D8]
lea rdx, [rsp+3B8h+var_218]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
lea rdx, asc_30D77; ","
lea rdi, [rsp+3B8h+var_198]
lea rsi, [rsp+3B8h+var_1B8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
lea rsi, [r14+40h]
lea rdi, [rsp+3B8h+var_278]
call _ZL10var_to_strIiENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; var_to_str<int>(int const&)
lea rsi, aNMats; "n_mats="
lea rdi, [rsp+3B8h+var_258]
lea rdx, [rsp+3B8h+var_278]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
lea rdi, [rsp+3B8h+var_178]
lea rsi, [rsp+3B8h+var_198]
lea rdx, [rsp+3B8h+var_258]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
lea rdx, asc_30D77; ","
lea rdi, [rsp+3B8h+var_158]
lea rsi, [rsp+3B8h+var_178]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
lea rsi, [r14+44h]
lea rdi, [rsp+3B8h+var_2B8]
call _ZL10var_to_strIiENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; var_to_str<int>(int const&)
lea rsi, aNUsed; "n_used="
lea rdi, [rsp+3B8h+var_298]
lea rdx, [rsp+3B8h+var_2B8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
lea rdi, [rsp+3B8h+var_138]
lea rsi, [rsp+3B8h+var_158]
lea rdx, [rsp+3B8h+var_298]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
lea rdx, asc_30D77; ","
lea rdi, [rsp+3B8h+var_118]
lea rsi, [rsp+3B8h+var_138]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
lea rsi, [r14+48h]
lea rdi, [rsp+3B8h+var_2F8]
call _ZL10var_to_strIbENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; var_to_str<bool>(bool const&)
lea rsi, aNeB+3; "b="
lea rdi, [rsp+3B8h+var_2D8]
lea rdx, [rsp+3B8h+var_2F8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
lea rdi, [rsp+3B8h+var_F8]
lea rsi, [rsp+3B8h+var_118]
lea rdx, [rsp+3B8h+var_2D8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
lea rdx, asc_30D77; ","
lea rdi, [rsp+3B8h+var_D8]
lea rsi, [rsp+3B8h+var_F8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
lea rsi, [r14+50h]
lea rdi, [rsp+3B8h+var_338]
call _ZL10var_to_strIlENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; var_to_str<long>(long const&)
lea rsi, aDim+2; "m="
lea rdi, [rsp+3B8h+var_318]
lea rdx, [rsp+3B8h+var_338]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
lea rdi, [rsp+3B8h+var_B8]
lea rsi, [rsp+3B8h+var_D8]
lea rdx, [rsp+3B8h+var_318]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
lea rdx, asc_30D77; ","
lea rdi, [rsp+3B8h+var_98]
lea rsi, [rsp+3B8h+var_B8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
lea rsi, [r14+58h]
lea rdi, [rsp+3B8h+var_378]
call _ZL10var_to_strIlENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; var_to_str<long>(long const&)
lea rsi, aMin+2; "n="
lea rdi, [rsp+3B8h+var_358]
lea rdx, [rsp+3B8h+var_378]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
lea rdi, [rsp+3B8h+var_78]
lea rsi, [rsp+3B8h+var_98]
lea rdx, [rsp+3B8h+var_358]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
lea rdx, asc_30D77; ","
lea rdi, [rsp+3B8h+var_58]
lea rsi, [rsp+3B8h+var_78]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
add r14, 60h ; '`'
mov rdi, rsp
mov rsi, r14
call _ZL10var_to_strIlENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; var_to_str<long>(long const&)
lea rsi, aMask+3; "k="
lea rdi, [rsp+3B8h+var_398]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
lea rsi, [rsp+3B8h+var_58]
lea rdx, [rsp+3B8h+var_398]
mov rdi, rbx
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
lea rdi, [rsp+3B8h+var_398]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rsp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+3B8h+var_58]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+3B8h+var_78]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+3B8h+var_358]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+3B8h+var_378]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+3B8h+var_98]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+3B8h+var_B8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+3B8h+var_318]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+3B8h+var_338]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+3B8h+var_D8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+3B8h+var_F8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+3B8h+var_2D8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+3B8h+var_2F8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+3B8h+var_118]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+3B8h+var_138]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+3B8h+var_298]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+3B8h+var_2B8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+3B8h+var_158]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+3B8h+var_178]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+3B8h+var_258]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+3B8h+var_278]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+3B8h+var_198]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+3B8h+var_1B8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+3B8h+var_218]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+3B8h+var_238]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+3B8h+var_1D8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+3B8h+var_1F8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+3B8h+var_38]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 3A0h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_18]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_2659D
mov rbx, rax
loc_2659D:
mov rdi, rsp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_265AA
mov rbx, rax
loc_265AA:
lea rdi, [rsp+arg_358]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_265BC
mov rbx, rax
loc_265BC:
lea rdi, [rsp+arg_338]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_265CE
mov rbx, rax
loc_265CE:
lea rdi, [rsp+arg_58]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_265D8:
lea rdi, [rsp+arg_38]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_265E2:
lea rdi, [rsp+arg_318]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_265EF:
lea rdi, [rsp+arg_2F8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_265FC:
lea rdi, [rsp+arg_98]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_26609:
lea rdi, [rsp+arg_78]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_26616:
lea rdi, [rsp+arg_2D8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_26623:
lea rdi, [rsp+arg_2B8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_26630:
lea rdi, [rsp+arg_D8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_2663D:
lea rdi, [rsp+arg_B8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_2664A:
lea rdi, [rsp+arg_298]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_26657:
lea rdi, [rsp+arg_278]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_26664:
lea rdi, [rsp+arg_118]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_26671:
lea rdi, [rsp+arg_F8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_2667E:
lea rdi, [rsp+arg_258]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_2668B:
lea rdi, [rsp+arg_238]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_26698:
lea rdi, [rsp+arg_158]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_266A5:
lea rdi, [rsp+arg_138]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_266B2:
lea rdi, [rsp+arg_218]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_266BF:
lea rdi, [rsp+arg_1F8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_266CC:
lea rdi, [rsp+arg_198]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_266D9:
lea rdi, [rsp+arg_178]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_266E6:
lea rdi, [rsp+arg_1D8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_266F3:
lea rdi, [rsp+arg_1B8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_26700:
lea rdi, [rsp+arg_378]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
mov rbx, rax
jmp loc_265D8
mov rbx, rax
jmp loc_265E2
mov rbx, rax
jmp loc_265EF
mov rbx, rax
jmp loc_265FC
mov rbx, rax
jmp loc_26609
mov rbx, rax
jmp loc_26616
mov rbx, rax
jmp loc_26623
mov rbx, rax
jmp loc_26630
mov rbx, rax
jmp loc_2663D
mov rbx, rax
jmp loc_2664A
mov rbx, rax
jmp loc_26657
mov rbx, rax
jmp loc_26664
mov rbx, rax
jmp loc_26671
mov rbx, rax
jmp loc_2667E
mov rbx, rax
jmp loc_2668B
mov rbx, rax
jmp loc_26698
mov rbx, rax
jmp loc_266A5
mov rbx, rax
jmp loc_266B2
mov rbx, rax
jmp loc_266BF
mov rbx, rax
jmp loc_266CC
mov rbx, rax
jmp loc_266D9
mov rbx, rax
jmp loc_266E6
mov rbx, rax
jmp loc_266F3
mov rbx, rax
jmp loc_26700
| long long test_mul_mat_id::vars[abi:cxx11](long long a1, long long a2)
{
_BYTE v3[32]; // [rsp+0h] [rbp-3B8h] BYREF
_QWORD v4[4]; // [rsp+20h] [rbp-398h] BYREF
_BYTE v5[32]; // [rsp+40h] [rbp-378h] BYREF
_QWORD v6[4]; // [rsp+60h] [rbp-358h] BYREF
_BYTE v7[32]; // [rsp+80h] [rbp-338h] BYREF
_QWORD v8[4]; // [rsp+A0h] [rbp-318h] BYREF
_BYTE v9[32]; // [rsp+C0h] [rbp-2F8h] BYREF
_QWORD v10[4]; // [rsp+E0h] [rbp-2D8h] BYREF
_BYTE v11[32]; // [rsp+100h] [rbp-2B8h] BYREF
_QWORD v12[4]; // [rsp+120h] [rbp-298h] BYREF
_BYTE v13[32]; // [rsp+140h] [rbp-278h] BYREF
_QWORD v14[4]; // [rsp+160h] [rbp-258h] BYREF
_BYTE v15[32]; // [rsp+180h] [rbp-238h] BYREF
_QWORD v16[4]; // [rsp+1A0h] [rbp-218h] BYREF
_BYTE v17[32]; // [rsp+1C0h] [rbp-1F8h] BYREF
_QWORD v18[4]; // [rsp+1E0h] [rbp-1D8h] BYREF
_BYTE v19[32]; // [rsp+200h] [rbp-1B8h] BYREF
_QWORD v20[4]; // [rsp+220h] [rbp-198h] BYREF
_BYTE v21[32]; // [rsp+240h] [rbp-178h] BYREF
_QWORD v22[4]; // [rsp+260h] [rbp-158h] BYREF
_BYTE v23[32]; // [rsp+280h] [rbp-138h] BYREF
_QWORD v24[4]; // [rsp+2A0h] [rbp-118h] BYREF
_BYTE v25[32]; // [rsp+2C0h] [rbp-F8h] BYREF
_QWORD v26[4]; // [rsp+2E0h] [rbp-D8h] BYREF
_BYTE v27[32]; // [rsp+300h] [rbp-B8h] BYREF
_QWORD v28[4]; // [rsp+320h] [rbp-98h] BYREF
_BYTE v29[32]; // [rsp+340h] [rbp-78h] BYREF
_QWORD v30[4]; // [rsp+360h] [rbp-58h] BYREF
_BYTE v31[56]; // [rsp+380h] [rbp-38h] BYREF
var_to_str[abi:cxx11]((long long)v31, *(_DWORD *)(a2 + 56));
std::operator+<char>((long long)v17, (long long)"type_a=", (long long)v31);
std::operator+<char>((long long)v18, (long long)v17, (long long)",");
var_to_str[abi:cxx11]((long long)v15, *(_DWORD *)(a2 + 60));
std::operator+<char>((long long)v16, (long long)"type_b=", (long long)v15);
std::operator+<char>((long long)v19, v18, v16);
std::operator+<char>((long long)v20, (long long)v19, (long long)",");
var_to_str<int>((std::__cxx11 *)v13, (int *)(a2 + 64));
std::operator+<char>((long long)v14, (long long)"n_mats=", (long long)v13);
std::operator+<char>((long long)v21, v20, v14);
std::operator+<char>((long long)v22, (long long)v21, (long long)",");
var_to_str<int>((std::__cxx11 *)v11, (int *)(a2 + 68));
std::operator+<char>((long long)v12, (long long)"n_used=", (long long)v11);
std::operator+<char>((long long)v23, v22, v12);
std::operator+<char>((long long)v24, (long long)v23, (long long)",");
var_to_str<bool>((std::__cxx11 *)v9, (unsigned __int8 *)(a2 + 72));
std::operator+<char>((long long)v10, (long long)"b=", (long long)v9);
std::operator+<char>((long long)v25, v24, v10);
std::operator+<char>((long long)v26, (long long)v25, (long long)",");
var_to_str<long>((std::__cxx11 *)v7, (long long *)(a2 + 80));
std::operator+<char>((long long)v8, (long long)"m=", (long long)v7);
std::operator+<char>((long long)v27, v26, v8);
std::operator+<char>((long long)v28, (long long)v27, (long long)",");
var_to_str<long>((std::__cxx11 *)v5, (long long *)(a2 + 88));
std::operator+<char>((long long)v6, (long long)"n=", (long long)v5);
std::operator+<char>((long long)v29, v28, v6);
std::operator+<char>((long long)v30, (long long)v29, (long long)",");
var_to_str<long>((std::__cxx11 *)v3, (long long *)(a2 + 96));
std::operator+<char>((long long)v4, (long long)"k=", (long long)v3);
std::operator+<char>(a1, v30, v4);
std::string::~string(v4);
std::string::~string(v3);
std::string::~string(v30);
std::string::~string(v29);
std::string::~string(v6);
std::string::~string(v5);
std::string::~string(v28);
std::string::~string(v27);
std::string::~string(v8);
std::string::~string(v7);
std::string::~string(v26);
std::string::~string(v25);
std::string::~string(v10);
std::string::~string(v9);
std::string::~string(v24);
std::string::~string(v23);
std::string::~string(v12);
std::string::~string(v11);
std::string::~string(v22);
std::string::~string(v21);
std::string::~string(v14);
std::string::~string(v13);
std::string::~string(v20);
std::string::~string(v19);
std::string::~string(v16);
std::string::~string(v15);
std::string::~string(v18);
std::string::~string(v17);
std::string::~string(v31);
return a1;
}
| vars[abi:cxx11]:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x3a0
MOV R14,RSI
MOV RBX,RDI
MOV ESI,dword ptr [RSI + 0x38]
LEA R15,[RSP + 0x380]
MOV RDI,R15
CALL 0x00118e2b
LAB_0012614d:
LEA RSI,[0x130f97]
LEA RDI,[RSP + 0x1c0]
MOV RDX,R15
CALL 0x0011ca87
LAB_00126164:
LEA RDX,[0x130d77]
LEA RDI,[RSP + 0x1e0]
LEA RSI,[RSP + 0x1c0]
CALL 0x0011cff2
MOV ESI,dword ptr [R14 + 0x3c]
LAB_00126184:
LEA RDI,[RSP + 0x180]
CALL 0x00118e2b
LAB_00126191:
LEA RSI,[0x130f9f]
LEA RDI,[RSP + 0x1a0]
LEA RDX,[RSP + 0x180]
CALL 0x0011ca87
LAB_001261ad:
LEA RDI,[RSP + 0x200]
LEA RSI,[RSP + 0x1e0]
LEA RDX,[RSP + 0x1a0]
CALL 0x0011cf8b
LAB_001261ca:
LEA RDX,[0x130d77]
LEA RDI,[RSP + 0x220]
LEA RSI,[RSP + 0x200]
CALL 0x0011cff2
LEA RSI,[R14 + 0x40]
LAB_001261ea:
LEA RDI,[RSP + 0x140]
CALL 0x00118f03
LAB_001261f7:
LEA RSI,[0x13103a]
LEA RDI,[RSP + 0x160]
LEA RDX,[RSP + 0x140]
CALL 0x0011ca87
LAB_00126213:
LEA RDI,[RSP + 0x240]
LEA RSI,[RSP + 0x220]
LEA RDX,[RSP + 0x160]
CALL 0x0011cf8b
LAB_00126230:
LEA RDX,[0x130d77]
LEA RDI,[RSP + 0x260]
LEA RSI,[RSP + 0x240]
CALL 0x0011cff2
LEA RSI,[R14 + 0x44]
LAB_00126250:
LEA RDI,[RSP + 0x100]
CALL 0x00118f03
LAB_0012625d:
LEA RSI,[0x131042]
LEA RDI,[RSP + 0x120]
LEA RDX,[RSP + 0x100]
CALL 0x0011ca87
LAB_00126279:
LEA RDI,[RSP + 0x280]
LEA RSI,[RSP + 0x260]
LEA RDX,[RSP + 0x120]
CALL 0x0011cf8b
LAB_00126296:
LEA RDX,[0x130d77]
LEA RDI,[RSP + 0x2a0]
LEA RSI,[RSP + 0x280]
CALL 0x0011cff2
LEA RSI,[R14 + 0x48]
LAB_001262b6:
LEA RDI,[RSP + 0xc0]
CALL 0x00118f24
LAB_001262c3:
LEA RSI,[0x130f55]
LEA RDI,[RSP + 0xe0]
LEA RDX,[RSP + 0xc0]
CALL 0x0011ca87
LAB_001262df:
LEA RDI,[RSP + 0x2c0]
LEA RSI,[RSP + 0x2a0]
LEA RDX,[RSP + 0xe0]
CALL 0x0011cf8b
LAB_001262fc:
LEA RDX,[0x130d77]
LEA RDI,[RSP + 0x2e0]
LEA RSI,[RSP + 0x2c0]
CALL 0x0011cff2
LEA RSI,[R14 + 0x50]
LAB_0012631c:
LEA RDI,[RSP + 0x80]
CALL 0x00118f13
LAB_00126329:
LEA RSI,[0x130f2d]
LEA RDI,[RSP + 0xa0]
LEA RDX,[RSP + 0x80]
CALL 0x0011ca87
LAB_00126345:
LEA RDI,[RSP + 0x300]
LEA RSI,[RSP + 0x2e0]
LEA RDX,[RSP + 0xa0]
CALL 0x0011cf8b
LAB_00126362:
LEA RDX,[0x130d77]
LEA RDI,[RSP + 0x320]
LEA RSI,[RSP + 0x300]
CALL 0x0011cff2
LEA RSI,[R14 + 0x58]
LAB_00126382:
LEA RDI,[RSP + 0x40]
CALL 0x00118f13
LAB_0012638c:
LEA RSI,[0x131064]
LEA RDI,[RSP + 0x60]
LEA RDX,[RSP + 0x40]
CALL 0x0011ca87
LAB_001263a2:
LEA RDI,[RSP + 0x340]
LEA RSI,[RSP + 0x320]
LEA RDX,[RSP + 0x60]
CALL 0x0011cf8b
LAB_001263bc:
LEA RDX,[0x130d77]
LEA RDI,[RSP + 0x360]
LEA RSI,[RSP + 0x340]
CALL 0x0011cff2
ADD R14,0x60
LAB_001263dc:
MOV RDI,RSP
MOV RSI,R14
CALL 0x00118f13
LAB_001263e7:
LEA RSI,[0x131077]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x0011ca87
LAB_001263fb:
LEA RSI,[RSP + 0x360]
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
CALL 0x0011cf8b
LAB_00126410:
LEA RDI,[RSP + 0x20]
CALL 0x0010f280
MOV RDI,RSP
CALL 0x0010f280
LEA RDI,[RSP + 0x360]
CALL 0x0010f280
LEA RDI,[RSP + 0x340]
CALL 0x0010f280
LEA RDI,[RSP + 0x60]
CALL 0x0010f280
LEA RDI,[RSP + 0x40]
CALL 0x0010f280
LEA RDI,[RSP + 0x320]
CALL 0x0010f280
LEA RDI,[RSP + 0x300]
CALL 0x0010f280
LEA RDI,[RSP + 0xa0]
CALL 0x0010f280
LEA RDI,[RSP + 0x80]
CALL 0x0010f280
LEA RDI,[RSP + 0x2e0]
CALL 0x0010f280
LEA RDI,[RSP + 0x2c0]
CALL 0x0010f280
LEA RDI,[RSP + 0xe0]
CALL 0x0010f280
LEA RDI,[RSP + 0xc0]
CALL 0x0010f280
LEA RDI,[RSP + 0x2a0]
CALL 0x0010f280
LEA RDI,[RSP + 0x280]
CALL 0x0010f280
LEA RDI,[RSP + 0x120]
CALL 0x0010f280
LEA RDI,[RSP + 0x100]
CALL 0x0010f280
LEA RDI,[RSP + 0x260]
CALL 0x0010f280
LEA RDI,[RSP + 0x240]
CALL 0x0010f280
LEA RDI,[RSP + 0x160]
CALL 0x0010f280
LEA RDI,[RSP + 0x140]
CALL 0x0010f280
LEA RDI,[RSP + 0x220]
CALL 0x0010f280
LEA RDI,[RSP + 0x200]
CALL 0x0010f280
LEA RDI,[RSP + 0x1a0]
CALL 0x0010f280
LEA RDI,[RSP + 0x180]
CALL 0x0010f280
LEA RDI,[RSP + 0x1e0]
CALL 0x0010f280
LEA RDI,[RSP + 0x1c0]
CALL 0x0010f280
LEA RDI,[RSP + 0x380]
CALL 0x0010f280
MOV RAX,RBX
ADD RSP,0x3a0
POP RBX
POP R14
POP R15
RET
|
/* test_mul_mat_id::vars[abi:cxx11]() */
void test_mul_mat_id::vars_abi_cxx11_(void)
{
long in_RSI;
string *in_RDI;
string asStack_3b8 [32];
string local_398 [32];
string local_378 [32];
string local_358 [32];
string local_338 [32];
string local_318 [32];
string local_2f8 [32];
string local_2d8 [32];
string local_2b8 [32];
string local_298 [32];
string local_278 [32];
string local_258 [32];
string local_238 [32];
string local_218 [32];
string local_1f8 [32];
string local_1d8 [32];
string local_1b8 [32];
string local_198 [32];
string local_178 [32];
string local_158 [32];
string local_138 [32];
string local_118 [32];
string local_f8 [32];
string local_d8 [32];
string local_b8 [32];
string local_98 [32];
string local_78 [32];
string local_58 [32];
string local_38 [32];
var_to_str_abi_cxx11_(local_38,*(int4 *)(in_RSI + 0x38));
/* try { // try from 0012614d to 00126163 has its CatchHandler @ 001267cd */
std::operator+((char *)local_1f8,(string *)"type_a=");
/* try { // try from 00126164 to 0012617f has its CatchHandler @ 001267c5 */
std::operator+(local_1d8,(char *)local_1f8);
/* try { // try from 00126184 to 00126190 has its CatchHandler @ 001267bd */
var_to_str_abi_cxx11_(local_238,*(int4 *)(in_RSI + 0x3c));
/* try { // try from 00126191 to 001261ac has its CatchHandler @ 001267b5 */
std::operator+((char *)local_218,(string *)"type_b=");
/* try { // try from 001261ad to 001261c9 has its CatchHandler @ 001267ad */
std::operator+(local_1b8,local_1d8);
/* try { // try from 001261ca to 001261e5 has its CatchHandler @ 001267a5 */
std::operator+(local_198,(char *)local_1b8);
/* try { // try from 001261ea to 001261f6 has its CatchHandler @ 0012679d */
var_to_str<int>((int *)local_278);
/* try { // try from 001261f7 to 00126212 has its CatchHandler @ 00126795 */
std::operator+((char *)local_258,(string *)"n_mats=");
/* try { // try from 00126213 to 0012622f has its CatchHandler @ 0012678d */
std::operator+(local_178,local_198);
/* try { // try from 00126230 to 0012624b has its CatchHandler @ 00126785 */
std::operator+(local_158,(char *)local_178);
/* try { // try from 00126250 to 0012625c has its CatchHandler @ 0012677d */
var_to_str<int>((int *)local_2b8);
/* try { // try from 0012625d to 00126278 has its CatchHandler @ 00126775 */
std::operator+((char *)local_298,(string *)"n_used=");
/* try { // try from 00126279 to 00126295 has its CatchHandler @ 0012676d */
std::operator+(local_138,local_158);
/* try { // try from 00126296 to 001262b1 has its CatchHandler @ 00126765 */
std::operator+(local_118,(char *)local_138);
/* try { // try from 001262b6 to 001262c2 has its CatchHandler @ 0012675d */
var_to_str<bool>((bool *)local_2f8);
/* try { // try from 001262c3 to 001262de has its CatchHandler @ 00126755 */
std::operator+((char *)local_2d8,(string *)&DAT_00130f55);
/* try { // try from 001262df to 001262fb has its CatchHandler @ 0012674d */
std::operator+(local_f8,local_118);
/* try { // try from 001262fc to 00126317 has its CatchHandler @ 00126745 */
std::operator+(local_d8,(char *)local_f8);
/* try { // try from 0012631c to 00126328 has its CatchHandler @ 0012673d */
var_to_str<long>((long *)local_338);
/* try { // try from 00126329 to 00126344 has its CatchHandler @ 00126735 */
std::operator+((char *)local_318,(string *)&DAT_00130f2d);
/* try { // try from 00126345 to 00126361 has its CatchHandler @ 0012672d */
std::operator+(local_b8,local_d8);
/* try { // try from 00126362 to 0012637d has its CatchHandler @ 00126725 */
std::operator+(local_98,(char *)local_b8);
/* try { // try from 00126382 to 0012638b has its CatchHandler @ 0012671d */
var_to_str<long>((long *)local_378);
/* try { // try from 0012638c to 001263a1 has its CatchHandler @ 00126715 */
std::operator+((char *)local_358,(string *)&DAT_00131064);
/* try { // try from 001263a2 to 001263bb has its CatchHandler @ 001265cb */
std::operator+(local_78,local_98);
/* try { // try from 001263bc to 001263d7 has its CatchHandler @ 001265b9 */
std::operator+(local_58,(char *)local_78);
/* try { // try from 001263dc to 001263e6 has its CatchHandler @ 001265a7 */
var_to_str<long>((long *)asStack_3b8);
/* try { // try from 001263e7 to 001263fa has its CatchHandler @ 0012659a */
std::operator+((char *)local_398,(string *)&DAT_00131077);
/* try { // try from 001263fb to 0012640f has its CatchHandler @ 0012658b */
std::operator+(in_RDI,local_58);
std::__cxx11::string::~string(local_398);
std::__cxx11::string::~string(asStack_3b8);
std::__cxx11::string::~string(local_58);
std::__cxx11::string::~string(local_78);
std::__cxx11::string::~string(local_358);
std::__cxx11::string::~string(local_378);
std::__cxx11::string::~string(local_98);
std::__cxx11::string::~string(local_b8);
std::__cxx11::string::~string(local_318);
std::__cxx11::string::~string(local_338);
std::__cxx11::string::~string(local_d8);
std::__cxx11::string::~string(local_f8);
std::__cxx11::string::~string(local_2d8);
std::__cxx11::string::~string(local_2f8);
std::__cxx11::string::~string(local_118);
std::__cxx11::string::~string(local_138);
std::__cxx11::string::~string(local_298);
std::__cxx11::string::~string(local_2b8);
std::__cxx11::string::~string(local_158);
std::__cxx11::string::~string(local_178);
std::__cxx11::string::~string(local_258);
std::__cxx11::string::~string(local_278);
std::__cxx11::string::~string(local_198);
std::__cxx11::string::~string(local_1b8);
std::__cxx11::string::~string(local_218);
std::__cxx11::string::~string(local_238);
std::__cxx11::string::~string(local_1d8);
std::__cxx11::string::~string(local_1f8);
std::__cxx11::string::~string(local_38);
return;
}
| |
55,113 | AST::Node::addChild(AST::Node*) | 11AgReS1SoR11[P]Graph/Common/AST/src/Node.hpp | void addChild(Node* child)
{
if (child == nullptr) { throw std::runtime_error("Add child, but nullptr, bug!?"); }
childNodes.push_back(child);
} | O0 | cpp | AST::Node::addChild(AST::Node*):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xa3ff
movl $0x10, %edi
callq 0x51d0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x30(%rbp)
leaq 0x1d69(%rip), %rsi # 0xc133
callq 0x5130
jmp 0xa3d1
movq -0x30(%rbp), %rdi
movq 0x4c1c(%rip), %rsi # 0xeff8
movq 0x4bc5(%rip), %rdx # 0xefa8
callq 0x5710
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x52d0
jmp 0xa416
movq -0x28(%rbp), %rdi
addq $0x20, %rdi
leaq -0x10(%rbp), %rsi
callq 0x5450
addq $0x30, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x5740
nop
| _ZN3AST4Node8addChildEPS0_:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_28], rax
cmp [rbp+var_10], 0
jnz short loc_A3FF
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rbp+var_30], rax
lea rsi, aAddChildButNul; "Add child, but nullptr, bug!?"
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_A3D1:
mov rdi, [rbp+var_30]; void *
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
mov rdi, [rbp+var_30]; void *
mov rcx, rax
mov eax, edx
mov [rbp+var_18], rcx
mov [rbp+var_1C], eax
call ___cxa_free_exception
jmp short loc_A416
loc_A3FF:
mov rdi, [rbp+var_28]
add rdi, 20h ; ' '
lea rsi, [rbp+var_10]
call __ZNSt6vectorIPN3AST4NodeESaIS2_EE9push_backERKS2_; std::vector<AST::Node *>::push_back(AST::Node * const&)
add rsp, 30h
pop rbp
retn
loc_A416:
mov rdi, [rbp+var_18]
call __Unwind_Resume
| long long AST::Node::addChild(long long a1, long long a2)
{
std::runtime_error *exception; // [rsp+0h] [rbp-30h]
_QWORD v4[2]; // [rsp+20h] [rbp-10h] BYREF
v4[1] = a1;
v4[0] = a2;
if ( !a2 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Add child, but nullptr, bug!?");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return std::vector<AST::Node *>::push_back(a1 + 32, v4);
}
| addChild:
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 qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x0010a3ff
MOV EDI,0x10
CALL 0x001051d0
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RBP + -0x30],RAX
LAB_0010a3c3:
LEA RSI,[0x10c133]
CALL 0x00105130
LAB_0010a3cf:
JMP 0x0010a3d1
LAB_0010a3d1:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [0x0010eff8]
MOV RDX,qword ptr [0x0010efa8]
CALL 0x00105710
LAB_0010a3ff:
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0x20
LEA RSI,[RBP + -0x10]
CALL 0x00105450
ADD RSP,0x30
POP RBP
RET
|
/* AST::Node::addChild(AST::Node*) */
void __thiscall AST::Node::addChild(Node *this,Node *param_1)
{
runtime_error *this_00;
Node *local_18;
Node *local_10;
local_18 = param_1;
local_10 = this;
if (param_1 == (Node *)0x0) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0010a3c3 to 0010a3ce has its CatchHandler @ 0010a3e8 */
std::runtime_error::runtime_error(this_00,"Add child, but nullptr, bug!?");
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_0010eff8,PTR__runtime_error_0010efa8);
}
std::vector<AST::Node*,std::allocator<AST::Node*>>::push_back
((vector<AST::Node*,std::allocator<AST::Node*>> *)(this + 0x20),&local_18);
return;
}
| |
55,114 | AST::Node::addChild(AST::Node*) | 11AgReS1SoR11[P]Graph/Common/AST/src/Node.hpp | void addChild(Node* child)
{
if (child == nullptr) { throw std::runtime_error("Add child, but nullptr, bug!?"); }
childNodes.push_back(child);
} | O1 | cpp | AST::Node::addChild(AST::Node*):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, (%rsp)
testq %rsi, %rsi
je 0x582e
movq 0x28(%rdi), %rax
cmpq 0x30(%rdi), %rax
je 0x5817
movq %rsi, (%rax)
addq $0x8, 0x28(%rdi)
jmp 0x5826
addq $0x20, %rdi
movq %rsp, %rdx
movq %rax, %rsi
callq 0x2130
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x20d0
movq %rax, %rbx
leaq 0x92b(%rip), %rsi # 0x616d
movq %rax, %rdi
callq 0x2070
movq 0x37a7(%rip), %rsi # 0x8ff8
movq 0x3750(%rip), %rdx # 0x8fa8
movq %rbx, %rdi
callq 0x2230
movq %rax, %r14
movq %rbx, %rdi
callq 0x2110
movq %r14, %rdi
callq 0x2250
nop
| _ZN3AST4Node8addChildEPS0_:
push r14
push rbx
push rax
mov [rsp+18h+var_18], rsi
test rsi, rsi
jz short loc_582E
mov rax, [rdi+28h]
cmp rax, [rdi+30h]
jz short loc_5817
mov [rax], rsi
add qword ptr [rdi+28h], 8
jmp short loc_5826
loc_5817:
add rdi, 20h ; ' '
mov rdx, rsp
mov rsi, rax
call __ZNSt6vectorIPN3AST4NodeESaIS2_EE17_M_realloc_insertIJRKS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_; std::vector<AST::Node *>::_M_realloc_insert<AST::Node * const&>(__gnu_cxx::__normal_iterator<AST::Node **,std::vector<AST::Node *>>,AST::Node * const&)
loc_5826:
add rsp, 8
pop rbx
pop r14
retn
loc_582E:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aAddChildButNul; "Add child, but nullptr, bug!?"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
mov rdi, r14
call __Unwind_Resume
| _QWORD * AST::Node::addChild(long long a1, long long a2)
{
_QWORD *result; // rax
std::runtime_error *exception; // rbx
_QWORD v4[3]; // [rsp+0h] [rbp-18h] BYREF
v4[0] = a2;
if ( !a2 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Add child, but nullptr, bug!?");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
result = *(_QWORD **)(a1 + 40);
if ( result == *(_QWORD **)(a1 + 48) )
return (_QWORD *)std::vector<AST::Node *>::_M_realloc_insert<AST::Node * const&>(a1 + 32, result, v4);
*result = a2;
*(_QWORD *)(a1 + 40) += 8LL;
return result;
}
| addChild:
PUSH R14
PUSH RBX
PUSH RAX
MOV qword ptr [RSP],RSI
TEST RSI,RSI
JZ 0x0010582e
MOV RAX,qword ptr [RDI + 0x28]
CMP RAX,qword ptr [RDI + 0x30]
JZ 0x00105817
MOV qword ptr [RAX],RSI
ADD qword ptr [RDI + 0x28],0x8
JMP 0x00105826
LAB_00105817:
ADD RDI,0x20
MOV RDX,RSP
MOV RSI,RAX
CALL 0x00102130
LAB_00105826:
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_0010582e:
MOV EDI,0x10
CALL 0x001020d0
MOV RBX,RAX
LAB_0010583b:
LEA RSI,[0x10616d]
MOV RDI,RAX
CALL 0x00102070
LAB_0010584a:
MOV RSI,qword ptr [0x00108ff8]
MOV RDX,qword ptr [0x00108fa8]
MOV RDI,RBX
CALL 0x00102230
|
/* AST::Node::addChild(AST::Node*) */
void __thiscall AST::Node::addChild(Node *this,Node *param_1)
{
int8 *puVar1;
runtime_error *this_00;
Node *local_18;
local_18 = param_1;
if (param_1 != (Node *)0x0) {
puVar1 = *(int8 **)(this + 0x28);
if (puVar1 == *(int8 **)(this + 0x30)) {
std::vector<AST::Node*,std::allocator<AST::Node*>>::_M_realloc_insert<AST::Node*const&>
((vector<AST::Node*,std::allocator<AST::Node*>> *)(this + 0x20),puVar1,&local_18);
}
else {
*puVar1 = param_1;
*(long *)(this + 0x28) = *(long *)(this + 0x28) + 8;
}
return;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0010583b to 00105849 has its CatchHandler @ 00105860 */
std::runtime_error::runtime_error(this_00,"Add child, but nullptr, bug!?");
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00108ff8,PTR__runtime_error_00108fa8);
}
| |
55,115 | MNN::CreateGather(flatbuffers::FlatBufferBuilder&, MNN::DataType, MNN::DataType, bool, int) | mnn-tts/MNN/schema/current/TensorflowOp_generated.h | inline flatbuffers::Offset<Gather> CreateGather(
flatbuffers::FlatBufferBuilder &_fbb,
DataType Tindices = DataType_DT_INVALID,
DataType Tparams = DataType_DT_INVALID,
bool validateIndices = false,
int32_t axis = 0) {
GatherBuilder builder_(_fbb);
builder_.add_axis(axis);
builder_.add_Tparams(Tparams);
builder_.add_Tindices(Tindices);
builder_.add_validateIndices(validateIndices);
return builder_.Finish();
} | O0 | c | MNN::CreateGather(flatbuffers::FlatBufferBuilder&, MNN::DataType, MNN::DataType, bool, int):
subq $0x38, %rsp
movb %cl, %al
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movl %edx, 0x20(%rsp)
andb $0x1, %al
movb %al, 0x1f(%rsp)
movl %r8d, 0x18(%rsp)
movq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x1a500
movl 0x18(%rsp), %esi
leaq 0x8(%rsp), %rdi
callq 0x1a540
movl 0x20(%rsp), %esi
leaq 0x8(%rsp), %rdi
callq 0x1a570
movl 0x24(%rsp), %esi
leaq 0x8(%rsp), %rdi
callq 0x1a5a0
movb 0x1f(%rsp), %al
leaq 0x8(%rsp), %rdi
andb $0x1, %al
movzbl %al, %esi
callq 0x1a5d0
leaq 0x8(%rsp), %rdi
callq 0x1a610
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| _ZN3MNN12CreateGatherERN11flatbuffers17FlatBufferBuilderENS_8DataTypeES3_bi:
sub rsp, 38h
mov al, cl
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_14], esi
mov [rsp+38h+var_18], edx
and al, 1
mov [rsp+38h+var_19], al
mov [rsp+38h+var_20], r8d
mov rsi, [rsp+38h+var_10]; flatbuffers::FlatBufferBuilder *
lea rdi, [rsp+38h+var_30]; this
call _ZN3MNN13GatherBuilderC2ERN11flatbuffers17FlatBufferBuilderE; MNN::GatherBuilder::GatherBuilder(flatbuffers::FlatBufferBuilder &)
mov esi, [rsp+38h+var_20]; int
lea rdi, [rsp+38h+var_30]; this
call _ZN3MNN13GatherBuilder8add_axisEi; MNN::GatherBuilder::add_axis(int)
mov esi, [rsp+38h+var_18]
lea rdi, [rsp+38h+var_30]
call _ZN3MNN13GatherBuilder11add_TparamsENS_8DataTypeE; MNN::GatherBuilder::add_Tparams(MNN::DataType)
mov esi, [rsp+38h+var_14]
lea rdi, [rsp+38h+var_30]
call _ZN3MNN13GatherBuilder12add_TindicesENS_8DataTypeE; MNN::GatherBuilder::add_Tindices(MNN::DataType)
mov al, [rsp+38h+var_19]
lea rdi, [rsp+38h+var_30]; this
and al, 1
movzx esi, al; bool
call _ZN3MNN13GatherBuilder19add_validateIndicesEb; MNN::GatherBuilder::add_validateIndices(bool)
lea rdi, [rsp+38h+var_30]; this
call _ZN3MNN13GatherBuilder6FinishEv; MNN::GatherBuilder::Finish(void)
mov [rsp+38h+var_4], eax
mov eax, [rsp+38h+var_4]
add rsp, 38h
retn
| long long MNN::CreateGather(
flatbuffers::FlatBufferBuilder *a1,
unsigned int a2,
unsigned int a3,
char a4,
int a5)
{
_BYTE v6[16]; // [rsp+8h] [rbp-30h] BYREF
int v7; // [rsp+18h] [rbp-20h]
char v8; // [rsp+1Fh] [rbp-19h]
unsigned int v9; // [rsp+20h] [rbp-18h]
unsigned int v10; // [rsp+24h] [rbp-14h]
flatbuffers::FlatBufferBuilder *v11; // [rsp+28h] [rbp-10h]
v11 = a1;
v10 = a2;
v9 = a3;
v8 = a4 & 1;
v7 = a5;
MNN::GatherBuilder::GatherBuilder((MNN::GatherBuilder *)v6, a1);
MNN::GatherBuilder::add_axis((MNN::GatherBuilder *)v6, v7);
MNN::GatherBuilder::add_Tparams(v6, v9);
MNN::GatherBuilder::add_Tindices(v6, v10);
MNN::GatherBuilder::add_validateIndices((MNN::GatherBuilder *)v6, v8 & 1);
return (unsigned int)MNN::GatherBuilder::Finish((MNN::GatherBuilder *)v6);
}
| CreateGather:
SUB RSP,0x38
MOV AL,CL
MOV qword ptr [RSP + 0x28],RDI
MOV dword ptr [RSP + 0x24],ESI
MOV dword ptr [RSP + 0x20],EDX
AND AL,0x1
MOV byte ptr [RSP + 0x1f],AL
MOV dword ptr [RSP + 0x18],R8D
MOV RSI,qword ptr [RSP + 0x28]
LEA RDI,[RSP + 0x8]
CALL 0x0011a500
MOV ESI,dword ptr [RSP + 0x18]
LEA RDI,[RSP + 0x8]
CALL 0x0011a540
MOV ESI,dword ptr [RSP + 0x20]
LEA RDI,[RSP + 0x8]
CALL 0x0011a570
MOV ESI,dword ptr [RSP + 0x24]
LEA RDI,[RSP + 0x8]
CALL 0x0011a5a0
MOV AL,byte ptr [RSP + 0x1f]
LEA RDI,[RSP + 0x8]
AND AL,0x1
MOVZX ESI,AL
CALL 0x0011a5d0
LEA RDI,[RSP + 0x8]
CALL 0x0011a610
MOV dword ptr [RSP + 0x34],EAX
MOV EAX,dword ptr [RSP + 0x34]
ADD RSP,0x38
RET
|
/* MNN::CreateGather(flatbuffers::FlatBufferBuilder&, MNN::DataType, MNN::DataType, bool, int) */
int4
MNN::CreateGather(FlatBufferBuilder *param_1,int4 param_2,int4 param_3,byte param_4,
int param_5)
{
int4 uVar1;
GatherBuilder local_30 [16];
int local_20;
byte local_19;
int4 local_18;
int4 local_14;
FlatBufferBuilder *local_10;
local_19 = param_4 & 1;
local_20 = param_5;
local_18 = param_3;
local_14 = param_2;
local_10 = param_1;
GatherBuilder::GatherBuilder(local_30,param_1);
GatherBuilder::add_axis(local_30,local_20);
GatherBuilder::add_Tparams(local_30,local_18);
GatherBuilder::add_Tindices(local_30,local_14);
GatherBuilder::add_validateIndices(local_30,(bool)(local_19 & 1));
uVar1 = GatherBuilder::Finish(local_30);
return uVar1;
}
| |
55,116 | lf_pinbox_put_pins | eloqsql/mysys/lf_alloc-pin.c | void lf_pinbox_put_pins(LF_PINS *pins)
{
LF_PINBOX *pinbox= pins->pinbox;
uint32 top_ver, nr;
nr= pins->link;
#ifndef DBUG_OFF
{
/* This thread should not hold any pin. */
int i;
for (i= 0; i < LF_PINBOX_PINS; i++)
DBUG_ASSERT(pins->pin[i] == 0);
}
#endif /* DBUG_OFF */
/*
XXX this will deadlock if other threads will wait for
the caller to do something after lf_pinbox_put_pins(),
and they would have pinned addresses that the caller wants to free.
Thus: only free pins when all work is done and nobody can wait for you!!!
*/
while (pins->purgatory_count)
{
lf_pinbox_real_free(pins);
if (pins->purgatory_count)
pthread_yield();
}
top_ver= pinbox->pinstack_top_ver;
do
{
pins->link= top_ver % LF_PINBOX_MAX_PINS;
} while (!my_atomic_cas32((int32 volatile*) &pinbox->pinstack_top_ver,
(int32*) &top_ver,
top_ver-pins->link+nr+LF_PINBOX_MAX_PINS));
return;
} | O3 | c | lf_pinbox_put_pins:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %r14
movl 0x34(%rdi), %r15d
cmpl $0x0, 0x30(%rdi)
je 0xa56b7
movq %rbx, %rdi
callq 0xa56e2
cmpl $0x0, 0x30(%rbx)
je 0xa56b7
callq 0x29940
cmpl $0x0, 0x30(%rbx)
jne 0xa569e
movl 0x3c(%r14), %eax
addl $0x10000, %r15d # imm = 0x10000
movzwl %ax, %ecx
movl %ecx, 0x34(%rbx)
leal (%r15,%rax), %ecx
subl 0x34(%rbx), %ecx
lock
cmpxchgl %ecx, 0x3c(%r14)
jne 0xa56c2
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| lf_pinbox_put_pins:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov r14, [rdi+20h]
mov r15d, [rdi+34h]
cmp dword ptr [rdi+30h], 0
jz short loc_A56B7
loc_A569E:
mov rdi, rbx
call lf_pinbox_real_free
cmp dword ptr [rbx+30h], 0
jz short loc_A56B7
call _sched_yield
cmp dword ptr [rbx+30h], 0
jnz short loc_A569E
loc_A56B7:
mov eax, [r14+3Ch]
add r15d, 10000h
loc_A56C2:
movzx ecx, ax
mov [rbx+34h], ecx
lea ecx, [r15+rax]
sub ecx, [rbx+34h]
lock cmpxchg [r14+3Ch], ecx
jnz short loc_A56C2
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long lf_pinbox_put_pins(long long a1)
{
long long v1; // r14
int v2; // r15d
long long result; // rax
int v4; // r15d
int v5; // ett
v1 = *(_QWORD *)(a1 + 32);
v2 = *(_DWORD *)(a1 + 52);
while ( *(_DWORD *)(a1 + 48) )
{
lf_pinbox_real_free(a1);
if ( !*(_DWORD *)(a1 + 48) )
break;
sched_yield(a1);
}
LODWORD(result) = *(_DWORD *)(v1 + 60);
v4 = v2 + 0x10000;
do
{
*(_DWORD *)(a1 + 52) = (unsigned __int16)result;
v5 = result;
result = (unsigned int)_InterlockedCompareExchange(
(volatile signed __int32 *)(v1 + 60),
v4 + result - *(_DWORD *)(a1 + 52),
result);
}
while ( v5 != (_DWORD)result );
return result;
}
| lf_pinbox_put_pins:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x20]
MOV R15D,dword ptr [RDI + 0x34]
CMP dword ptr [RDI + 0x30],0x0
JZ 0x001a56b7
LAB_001a569e:
MOV RDI,RBX
CALL 0x001a56e2
CMP dword ptr [RBX + 0x30],0x0
JZ 0x001a56b7
CALL 0x00129940
CMP dword ptr [RBX + 0x30],0x0
JNZ 0x001a569e
LAB_001a56b7:
MOV EAX,dword ptr [R14 + 0x3c]
ADD R15D,0x10000
LAB_001a56c2:
MOVZX ECX,AX
MOV dword ptr [RBX + 0x34],ECX
LEA ECX,[R15 + RAX*0x1]
SUB ECX,dword ptr [RBX + 0x34]
CMPXCHG.LOCK dword ptr [R14 + 0x3c],ECX
JNZ 0x001a56c2
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void lf_pinbox_put_pins(long param_1)
{
uint *puVar1;
uint uVar2;
int iVar3;
int iVar4;
long lVar5;
uint uVar6;
bool bVar7;
lVar5 = *(long *)(param_1 + 0x20);
iVar3 = *(int *)(param_1 + 0x34);
iVar4 = *(int *)(param_1 + 0x30);
while ((iVar4 != 0 && (lf_pinbox_real_free(param_1), *(int *)(param_1 + 0x30) != 0))) {
sched_yield();
iVar4 = *(int *)(param_1 + 0x30);
}
uVar6 = *(uint *)(lVar5 + 0x3c);
do {
*(uint *)(param_1 + 0x34) = uVar6 & 0xffff;
puVar1 = (uint *)(lVar5 + 0x3c);
LOCK();
uVar2 = *puVar1;
bVar7 = uVar6 == uVar2;
if (bVar7) {
*puVar1 = (iVar3 + 0x10000 + uVar6) - *(int *)(param_1 + 0x34);
uVar2 = uVar6;
}
uVar6 = uVar2;
UNLOCK();
} while (!bVar7);
return;
}
| |
55,117 | seek_io_cache | eloqsql/mysys/mf_iocache.c | void seek_io_cache(IO_CACHE *cache, my_off_t needed_offset)
{
my_off_t cached_data_start= cache->pos_in_file;
my_off_t cached_data_end= cache->pos_in_file + (cache->read_end -
cache->buffer);
if (needed_offset >= cached_data_start &&
needed_offset < cached_data_end)
{
/*
The offset we're seeking to is in the buffer.
Move buffer's read position accordingly
*/
cache->read_pos= cache->buffer + (needed_offset - cached_data_start);
}
else
{
if (needed_offset > cache->end_of_file)
needed_offset= cache->end_of_file;
/*
The offset we're seeking to is not in the buffer.
- Set the buffer to be exhausted.
- Make the next read to a mysql_file_seek() call to the required
offset.
TODO(cvicentiu, spetrunia) properly implement aligned seeks for
efficiency.
*/
cache->seek_not_done= 1;
cache->pos_in_file= needed_offset;
/* When reading it must appear as if we've started from the offset
that we've seeked here. We must let _my_b_cache_read assume that
by implying "no reading starting from pos_in_file" has happened. */
cache->read_pos= cache->buffer;
cache->read_end= cache->buffer;
}
} | O3 | c | seek_io_cache:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rdx
movq 0x20(%rdi), %rax
movq %rsi, %rcx
subq %rdx, %rcx
jb 0x2acfa
subq %rax, %rdx
addq 0x18(%rdi), %rdx
cmpq %rsi, %rdx
jbe 0x2acfa
addq %rcx, %rax
movq %rax, 0x10(%rdi)
jmp 0x2ad1a
movq 0x8(%rdi), %rcx
cmpq %rsi, %rcx
cmovbq %rcx, %rsi
movl $0x1, 0xe0(%rdi)
movq %rsi, (%rdi)
movq %rax, 0x10(%rdi)
movq %rax, 0x18(%rdi)
popq %rbp
retq
| seek_io_cache:
push rbp
mov rbp, rsp
mov rdx, [rdi]
mov rax, [rdi+20h]
mov rcx, rsi
sub rcx, rdx
jb short loc_2ACFA
sub rdx, rax
add rdx, [rdi+18h]
cmp rdx, rsi
jbe short loc_2ACFA
add rax, rcx
mov [rdi+10h], rax
jmp short loc_2AD1A
loc_2ACFA:
mov rcx, [rdi+8]
cmp rcx, rsi
cmovb rsi, rcx
mov dword ptr [rdi+0E0h], 1
mov [rdi], rsi
mov [rdi+10h], rax
mov [rdi+18h], rax
loc_2AD1A:
pop rbp
retn
| long long seek_io_cache(long long a1, unsigned long long a2)
{
long long result; // rax
result = *(_QWORD *)(a1 + 32);
if ( a2 < *(_QWORD *)a1 || *(_QWORD *)(a1 + 24) + *(_QWORD *)a1 - result <= a2 )
{
if ( *(_QWORD *)(a1 + 8) < a2 )
a2 = *(_QWORD *)(a1 + 8);
*(_DWORD *)(a1 + 224) = 1;
*(_QWORD *)a1 = a2;
*(_QWORD *)(a1 + 16) = result;
*(_QWORD *)(a1 + 24) = result;
}
else
{
result += a2 - *(_QWORD *)a1;
*(_QWORD *)(a1 + 16) = result;
}
return result;
}
| seek_io_cache:
PUSH RBP
MOV RBP,RSP
MOV RDX,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x20]
MOV RCX,RSI
SUB RCX,RDX
JC 0x0012acfa
SUB RDX,RAX
ADD RDX,qword ptr [RDI + 0x18]
CMP RDX,RSI
JBE 0x0012acfa
ADD RAX,RCX
MOV qword ptr [RDI + 0x10],RAX
JMP 0x0012ad1a
LAB_0012acfa:
MOV RCX,qword ptr [RDI + 0x8]
CMP RCX,RSI
CMOVC RSI,RCX
MOV dword ptr [RDI + 0xe0],0x1
MOV qword ptr [RDI],RSI
MOV qword ptr [RDI + 0x10],RAX
MOV qword ptr [RDI + 0x18],RAX
LAB_0012ad1a:
POP RBP
RET
|
void seek_io_cache(ulong *param_1,ulong param_2)
{
ulong uVar1;
ulong uVar2;
uVar1 = *param_1;
uVar2 = param_1[4];
if ((param_2 < uVar1) || ((uVar1 - uVar2) + param_1[3] <= param_2)) {
if (param_1[1] < param_2) {
param_2 = param_1[1];
}
*(int4 *)(param_1 + 0x1c) = 1;
*param_1 = param_2;
param_1[2] = uVar2;
param_1[3] = uVar2;
}
else {
param_1[2] = uVar2 + (param_2 - uVar1);
}
return;
}
| |
55,118 | evmone::baseline::(anonymous namespace)::Position evmone::baseline::(anonymous namespace)::invoke<(evmone::Opcode)1>(std::array<short, 256ul> const&, intx::uint<256u> const*, evmone::baseline::(anonymous namespace)::Position, long&, evmone::ExecutionState&) | corpus-core[P]colibri-stateless/build_O2/_deps/evmone_external-src/lib/evmone/baseline_execution.cpp | [[release_inline]] inline Position invoke(const CostTable& cost_table, const uint256* stack_bottom,
Position pos, int64_t& gas, ExecutionState& state) noexcept
{
if (const auto status = check_requirements<Op>(cost_table, gas, pos.stack_top, stack_bottom);
status != EVMC_SUCCESS)
{
state.status = status;
return {nullptr, pos.stack_top};
}
const auto new_pos = invoke(instr::core::impl<Op>, pos, gas, state);
const auto new_stack_top = pos.stack_top + instr::traits[Op].stack_height_change;
return {new_pos, new_stack_top};
} | O2 | cpp | evmone::baseline::(anonymous namespace)::Position evmone::baseline::(anonymous namespace)::invoke<(evmone::Opcode)1>(std::array<short, 256ul> const&, intx::uint<256u> const*, evmone::baseline::(anonymous namespace)::Position, long&, evmone::ExecutionState&):
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %rbx
movswq 0x1fe(%rdi), %rax
testq %rax, %rax
js 0x3885d
cmpq %rsi, %rdx
jbe 0x38861
movq %rcx, %r14
movq (%rcx), %rsi
subq %rax, %rsi
movq %rsi, (%rcx)
js 0x38865
movq %rdx, %rdi
movq %rbx, %rdx
callq 0x3d98d
movq %rdx, (%r14)
movl %eax, 0x78(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $0x5
jmp 0x38867
pushq $0x7
jmp 0x38867
pushq $0x3
popq %rax
jmp 0x38852
| _ZN6evmone8baseline12_GLOBAL__N_16invokeILNS_6OpcodeE255EEENS1_8PositionERKSt5arrayIsLm256EEPKN4intx4uintILj256EEES4_RlRNS_14ExecutionStateE:
push r14
push rbx
push rax
mov rbx, r8
movsx rax, word ptr [rdi+1FEh]
test rax, rax
js short loc_3885D
cmp rdx, rsi
jbe short loc_38861
mov r14, rcx
mov rsi, [rcx]
sub rsi, rax
mov [rcx], rsi
js short loc_38865
mov rdi, rdx
mov rdx, rbx
call _ZN6evmone5instr4core12selfdestructENS_8StackTopElRNS_14ExecutionStateE; evmone::instr::core::selfdestruct(evmone::StackTop,long,evmone::ExecutionState &)
mov [r14], rdx
loc_38852:
mov [rbx+78h], eax
add rsp, 8
pop rbx
pop r14
retn
loc_3885D:
push 5
jmp short loc_38867
loc_38861:
push 7
jmp short loc_38867
loc_38865:
push 3
loc_38867:
pop rax
jmp short loc_38852
| long long evmone::baseline::`anonymous namespace'::invoke<(evmone::Opcode)255>(
long long a1,
unsigned long long a2,
unsigned long long a3,
_QWORD *a4,
long long a5)
{
long long v6; // rax
long long v8; // rsi
long long result; // rax
long long v10; // rdx
long long v11; // [rsp-10h] [rbp-20h]
v6 = *(__int16 *)(a1 + 510);
if ( v6 < 0 )
{
v11 = 5LL;
LABEL_9:
result = v11;
goto LABEL_5;
}
if ( a3 <= a2 )
{
v11 = 7LL;
goto LABEL_9;
}
v8 = *a4 - v6;
*a4 = v8;
if ( v8 < 0 )
{
v11 = 3LL;
goto LABEL_9;
}
result = evmone::instr::core::selfdestruct(a3, v8, a5);
*a4 = v10;
LABEL_5:
*(_DWORD *)(a5 + 120) = result;
return result;
}
| invoke<(evmone::Opcode)255>:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,R8
MOVSX RAX,word ptr [RDI + 0x1fe]
TEST RAX,RAX
JS 0x0013885d
CMP RDX,RSI
JBE 0x00138861
MOV R14,RCX
MOV RSI,qword ptr [RCX]
SUB RSI,RAX
MOV qword ptr [RCX],RSI
JS 0x00138865
MOV RDI,RDX
MOV RDX,RBX
CALL 0x0013d98d
MOV qword ptr [R14],RDX
LAB_00138852:
MOV dword ptr [RBX + 0x78],EAX
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_0013885d:
PUSH 0x5
JMP 0x00138867
LAB_00138861:
PUSH 0x7
JMP 0x00138867
LAB_00138865:
PUSH 0x3
LAB_00138867:
POP RAX
JMP 0x00138852
|
/* evmone::baseline::(anonymous namespace)::Position evmone::baseline::(anonymous
namespace)::invoke<(evmone::Opcode)255>(std::array<short, 256ul> const&, intx::uint<256u> const*,
evmone::baseline::(anonymous namespace)::Position, long&, evmone::ExecutionState&) */
void evmone::baseline::(anonymous_namespace)::invoke<(evmone::Opcode)255>
(long param_1,ulong param_2,ulong param_3,long *param_4,long param_5)
{
int4 uVar1;
long extraout_RDX;
long lVar2;
if ((long)*(short *)(param_1 + 0x1fe) < 0) {
uVar1 = 5;
}
else if (param_2 < param_3) {
lVar2 = *param_4 - (long)*(short *)(param_1 + 0x1fe);
*param_4 = lVar2;
if (lVar2 < 0) {
uVar1 = 3;
}
else {
uVar1 = instr::core::selfdestruct(param_3,lVar2,param_5);
*param_4 = extraout_RDX;
}
}
else {
uVar1 = 7;
}
*(int4 *)(param_5 + 0x78) = uVar1;
return;
}
| |
55,119 | void ImPlot::PlotBars<int>(char const*, int const*, int const*, int, double, int, int, int) | zkingston[P]unknot/build_O1/_deps/implot-src/implot_items.cpp | void PlotBars(const char* label_id, const T* xs, const T* ys, int count, double bar_size, ImPlotBarsFlags flags, int offset, int stride) {
if (ImHasFlag(flags, ImPlotBarsFlags_Horizontal)) {
GetterXY<IndexerIdx<T>,IndexerIdx<T>> getter1(IndexerIdx<T>(xs,count,offset,stride),IndexerIdx<T>(ys,count,offset,stride),count);
GetterXY<IndexerConst, IndexerIdx<T>> getter2(IndexerConst(0),IndexerIdx<T>(ys,count,offset,stride),count);
PlotBarsHEx(label_id, getter1, getter2, bar_size, flags);
}
else {
GetterXY<IndexerIdx<T>,IndexerIdx<T>> getter1(IndexerIdx<T>(xs,count,offset,stride),IndexerIdx<T>(ys,count,offset,stride),count);
GetterXY<IndexerIdx<T>,IndexerConst> getter2(IndexerIdx<T>(xs,count,offset,stride),IndexerConst(0),count);
PlotBarsVEx(label_id, getter1, getter2, bar_size, flags);
}
} | O1 | cpp | void ImPlot::PlotBars<int>(char const*, int const*, int const*, int, double, int, int, int):
pushq %rbp
pushq %rbx
subq $0xb8, %rsp
movl %r9d, %r10d
movq %rdx, %r9
movl 0xd0(%rsp), %ebp
xorl %r11d, %r11d
movl $0x0, %ebx
btl $0xa, %r8d
jb 0xd98f2
testl %ecx, %ecx
je 0xd98a6
movl %r10d, %eax
cltd
idivl %ecx
leal (%rdx,%rcx), %eax
cltd
idivl %ecx
movl %edx, %ebx
testl %ecx, %ecx
je 0xd98b9
movl %r10d, %eax
cltd
idivl %ecx
leal (%rdx,%rcx), %eax
cltd
idivl %ecx
movl %edx, %r11d
movq %rsi, 0x30(%rsp)
movl %ecx, 0x38(%rsp)
movl %ebx, 0x3c(%rsp)
movl %ebp, 0x40(%rsp)
movq %r9, 0x48(%rsp)
movl %ecx, 0x50(%rsp)
movl %r11d, 0x54(%rsp)
movl %ebp, 0x58(%rsp)
movl %ecx, 0x60(%rsp)
testl %ecx, %ecx
je 0xd9950
movl %r10d, %eax
cltd
idivl %ecx
leal (%rdx,%rcx), %eax
cltd
idivl %ecx
jmp 0xd9952
testl %ecx, %ecx
je 0xd9904
movl %r10d, %eax
cltd
idivl %ecx
leal (%rdx,%rcx), %eax
cltd
idivl %ecx
movl %edx, %ebx
testl %ecx, %ecx
je 0xd9917
movl %r10d, %eax
cltd
idivl %ecx
leal (%rdx,%rcx), %eax
cltd
idivl %ecx
movl %edx, %r11d
movq %rsi, 0x30(%rsp)
movl %ecx, 0x38(%rsp)
movl %ebx, 0x3c(%rsp)
movl %ebp, 0x40(%rsp)
movq %r9, 0x48(%rsp)
movl %ecx, 0x50(%rsp)
movl %r11d, 0x54(%rsp)
movl %ebp, 0x58(%rsp)
movl %ecx, 0x60(%rsp)
testl %ecx, %ecx
je 0xd99a5
movl %r10d, %eax
cltd
idivl %ecx
leal (%rdx,%rcx), %eax
cltd
idivl %ecx
jmp 0xd99a7
xorl %edx, %edx
movq %rsi, 0x68(%rsp)
movl %ecx, 0x70(%rsp)
movl %edx, 0x74(%rsp)
movl %ebp, 0x78(%rsp)
movq $0x0, 0x80(%rsp)
movl %ecx, 0x88(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x20(%rsp)
movups 0x68(%rsp), %xmm1
movups 0x78(%rsp), %xmm2
movups %xmm2, 0x10(%rsp)
movups %xmm1, (%rsp)
leaq 0x30(%rsp), %rsi
movl %r8d, %edx
callq 0xd9ae9
jmp 0xd99d6
xorl %edx, %edx
leaq 0x90(%rsp), %rax
movq $0x0, (%rax)
movq %r9, 0x8(%rax)
movl %ecx, 0x10(%rax)
movl %edx, 0x14(%rax)
movl %ebp, 0x18(%rax)
movl %ecx, 0x20(%rax)
leaq 0x30(%rsp), %rsi
movq %rax, %rdx
movl %r8d, %ecx
callq 0xd99e0
addq $0xb8, %rsp
popq %rbx
popq %rbp
retq
| _ZN6ImPlot8PlotBarsIdEEvPKcPKT_S5_idiii:
push rbp
push rbx
sub rsp, 0B8h
mov r10d, r9d
mov r9, rdx
mov ebp, [rsp+0C8h+arg_0]
xor r11d, r11d
mov ebx, 0
bt r8d, 0Ah
jb short loc_D98F2
test ecx, ecx
jz short loc_D98A6
mov eax, r10d
cdq
idiv ecx
lea eax, [rdx+rcx]
cdq
idiv ecx
mov ebx, edx
loc_D98A6:
test ecx, ecx
jz short loc_D98B9
mov eax, r10d
cdq
idiv ecx
lea eax, [rdx+rcx]
cdq
idiv ecx
mov r11d, edx
loc_D98B9:
mov [rsp+0C8h+var_98], rsi
mov [rsp+0C8h+var_90], ecx
mov [rsp+0C8h+var_8C], ebx
mov [rsp+0C8h+var_88], ebp
mov [rsp+0C8h+var_80], r9
mov [rsp+0C8h+var_78], ecx
mov [rsp+0C8h+var_74], r11d
mov [rsp+0C8h+var_70], ebp
mov [rsp+0C8h+var_68], ecx
test ecx, ecx
jz short loc_D9950
mov eax, r10d
cdq
idiv ecx
lea eax, [rdx+rcx]
cdq
idiv ecx
jmp short loc_D9952
loc_D98F2:
test ecx, ecx
jz short loc_D9904
mov eax, r10d
cdq
idiv ecx
lea eax, [rdx+rcx]
cdq
idiv ecx
mov ebx, edx
loc_D9904:
test ecx, ecx
jz short loc_D9917
mov eax, r10d
cdq
idiv ecx
lea eax, [rdx+rcx]
cdq
idiv ecx
mov r11d, edx
loc_D9917:
mov [rsp+0C8h+var_98], rsi
mov [rsp+0C8h+var_90], ecx
mov [rsp+0C8h+var_8C], ebx
mov [rsp+0C8h+var_88], ebp
mov [rsp+0C8h+var_80], r9
mov [rsp+0C8h+var_78], ecx
mov [rsp+0C8h+var_74], r11d
mov [rsp+0C8h+var_70], ebp
mov [rsp+0C8h+var_68], ecx
test ecx, ecx
jz short loc_D99A5
mov eax, r10d
cdq
idiv ecx
lea eax, [rdx+rcx]
cdq
idiv ecx
jmp short loc_D99A7
loc_D9950:
xor edx, edx
loc_D9952:
mov qword ptr [rsp+0C8h+var_60], rsi
mov dword ptr [rsp+0C8h+var_60+8], ecx
mov dword ptr [rsp+0C8h+var_60+0Ch], edx
mov dword ptr [rsp+0C8h+var_50], ebp
mov qword ptr [rsp+0C8h+var_50+8], 0
mov dword ptr [rsp+0C8h+var_40], ecx
mov rax, [rsp+0C8h+var_40]
mov [rsp+0C8h+var_A8], rax
movups xmm1, [rsp+0C8h+var_60]
movups xmm2, [rsp+0C8h+var_50]
movups [rsp+0C8h+var_B8], xmm2
movups [rsp+0C8h+var_C8], xmm1
lea rsi, [rsp+0C8h+var_98]
mov edx, r8d
call _ZN6ImPlot11PlotBarsVExINS_8GetterXYINS_10IndexerIdxIdEES3_EENS1_IS3_NS_12IndexerConstEEEEEvPKcRKT_T0_di; ImPlot::PlotBarsVEx<ImPlot::GetterXY<ImPlot::IndexerIdx<double>,ImPlot::IndexerIdx<double>>,ImPlot::GetterXY<ImPlot::IndexerIdx<double>,ImPlot::IndexerConst>>(char const*,ImPlot::GetterXY<ImPlot::IndexerIdx<double>,ImPlot::IndexerIdx<double>> const&,ImPlot::GetterXY<ImPlot::IndexerIdx<double>,ImPlot::IndexerConst>,double,int)
jmp short loc_D99D6
loc_D99A5:
xor edx, edx
loc_D99A7:
lea rax, [rsp+0C8h+var_38]
mov qword ptr [rax], 0
mov [rax+8], r9
mov [rax+10h], ecx
mov [rax+14h], edx
mov [rax+18h], ebp
mov [rax+20h], ecx
lea rsi, [rsp+0C8h+var_98]
mov rdx, rax
mov ecx, r8d
call _ZN6ImPlot11PlotBarsHExINS_8GetterXYINS_10IndexerIdxIdEES3_EENS1_INS_12IndexerConstES3_EEEEvPKcRKT_RKT0_di; ImPlot::PlotBarsHEx<ImPlot::GetterXY<ImPlot::IndexerIdx<double>,ImPlot::IndexerIdx<double>>,ImPlot::GetterXY<ImPlot::IndexerConst,ImPlot::IndexerIdx<double>>>(char const*,ImPlot::GetterXY<ImPlot::IndexerIdx<double>,ImPlot::IndexerIdx<double>> const&,ImPlot::GetterXY<ImPlot::IndexerConst,ImPlot::IndexerIdx<double>> const&,double,int)
loc_D99D6:
add rsp, 0B8h
pop rbx
pop rbp
retn
| long long ImPlot::PlotBars<double>(long long a1, long long a2, long long a3, long long a4, long long a5, int a6, int a7)
{
int v9; // r11d
int v10; // ebx
int v11; // edx
int v12; // edx
long long v14; // [rsp+30h] [rbp-98h] BYREF
int v15; // [rsp+38h] [rbp-90h]
int v16; // [rsp+3Ch] [rbp-8Ch]
int v17; // [rsp+40h] [rbp-88h]
long long v18; // [rsp+48h] [rbp-80h]
int v19; // [rsp+50h] [rbp-78h]
int v20; // [rsp+54h] [rbp-74h]
int v21; // [rsp+58h] [rbp-70h]
int v22; // [rsp+60h] [rbp-68h]
__int128 v23; // [rsp+68h] [rbp-60h]
long long v24; // [rsp+78h] [rbp-50h]
long long v25; // [rsp+80h] [rbp-48h]
long long v26; // [rsp+88h] [rbp-40h]
_QWORD v27[2]; // [rsp+90h] [rbp-38h] BYREF
int v28; // [rsp+A0h] [rbp-28h]
int v29; // [rsp+A4h] [rbp-24h]
int v30; // [rsp+A8h] [rbp-20h]
int v31; // [rsp+B0h] [rbp-18h]
v9 = 0;
v10 = 0;
if ( (a5 & 0x400) != 0 )
{
if ( (_DWORD)a4 )
{
v10 = (a6 % (int)a4 + (int)a4) % (int)a4;
v9 = v10;
}
v14 = a2;
v15 = a4;
v16 = v10;
v17 = a7;
v18 = a3;
v19 = a4;
v20 = v9;
v21 = a7;
v22 = a4;
if ( (_DWORD)a4 )
v12 = (a6 % (int)a4 + (int)a4) % (int)a4;
else
v12 = 0;
v27[0] = 0LL;
v27[1] = a3;
v28 = a4;
v29 = v12;
v30 = a7;
v31 = a4;
return ImPlot::PlotBarsHEx<ImPlot::GetterXY<ImPlot::IndexerIdx<double>,ImPlot::IndexerIdx<double>>,ImPlot::GetterXY<ImPlot::IndexerConst,ImPlot::IndexerIdx<double>>>(
a1,
&v14,
v27,
(unsigned int)a5);
}
else
{
if ( (_DWORD)a4 )
{
v10 = (a6 % (int)a4 + (int)a4) % (int)a4;
v9 = v10;
}
v14 = a2;
v15 = a4;
v16 = v10;
v17 = a7;
v18 = a3;
v19 = a4;
v20 = v9;
v21 = a7;
v22 = a4;
if ( (_DWORD)a4 )
v11 = (a6 % (int)a4 + (int)a4) % (int)a4;
else
v11 = 0;
*(_QWORD *)&v23 = a2;
LODWORD(v24) = a7;
v25 = 0LL;
LODWORD(v26) = a4;
return ImPlot::PlotBarsVEx<ImPlot::GetterXY<ImPlot::IndexerIdx<double>,ImPlot::IndexerIdx<double>>,ImPlot::GetterXY<ImPlot::IndexerIdx<double>,ImPlot::IndexerConst>>(
a1,
&v14,
(unsigned int)a5,
a4,
a5,
a3,
a2,
__PAIR64__(v11, a4),
v24,
0LL,
v26);
}
}
| PlotBars<double>:
PUSH RBP
PUSH RBX
SUB RSP,0xb8
MOV R10D,R9D
MOV R9,RDX
MOV EBP,dword ptr [RSP + 0xd0]
XOR R11D,R11D
MOV EBX,0x0
BT R8D,0xa
JC 0x001d98f2
TEST ECX,ECX
JZ 0x001d98a6
MOV EAX,R10D
CDQ
IDIV ECX
LEA EAX,[RDX + RCX*0x1]
CDQ
IDIV ECX
MOV EBX,EDX
LAB_001d98a6:
TEST ECX,ECX
JZ 0x001d98b9
MOV EAX,R10D
CDQ
IDIV ECX
LEA EAX,[RDX + RCX*0x1]
CDQ
IDIV ECX
MOV R11D,EDX
LAB_001d98b9:
MOV qword ptr [RSP + 0x30],RSI
MOV dword ptr [RSP + 0x38],ECX
MOV dword ptr [RSP + 0x3c],EBX
MOV dword ptr [RSP + 0x40],EBP
MOV qword ptr [RSP + 0x48],R9
MOV dword ptr [RSP + 0x50],ECX
MOV dword ptr [RSP + 0x54],R11D
MOV dword ptr [RSP + 0x58],EBP
MOV dword ptr [RSP + 0x60],ECX
TEST ECX,ECX
JZ 0x001d9950
MOV EAX,R10D
CDQ
IDIV ECX
LEA EAX,[RDX + RCX*0x1]
CDQ
IDIV ECX
JMP 0x001d9952
LAB_001d98f2:
TEST ECX,ECX
JZ 0x001d9904
MOV EAX,R10D
CDQ
IDIV ECX
LEA EAX,[RDX + RCX*0x1]
CDQ
IDIV ECX
MOV EBX,EDX
LAB_001d9904:
TEST ECX,ECX
JZ 0x001d9917
MOV EAX,R10D
CDQ
IDIV ECX
LEA EAX,[RDX + RCX*0x1]
CDQ
IDIV ECX
MOV R11D,EDX
LAB_001d9917:
MOV qword ptr [RSP + 0x30],RSI
MOV dword ptr [RSP + 0x38],ECX
MOV dword ptr [RSP + 0x3c],EBX
MOV dword ptr [RSP + 0x40],EBP
MOV qword ptr [RSP + 0x48],R9
MOV dword ptr [RSP + 0x50],ECX
MOV dword ptr [RSP + 0x54],R11D
MOV dword ptr [RSP + 0x58],EBP
MOV dword ptr [RSP + 0x60],ECX
TEST ECX,ECX
JZ 0x001d99a5
MOV EAX,R10D
CDQ
IDIV ECX
LEA EAX,[RDX + RCX*0x1]
CDQ
IDIV ECX
JMP 0x001d99a7
LAB_001d9950:
XOR EDX,EDX
LAB_001d9952:
MOV qword ptr [RSP + 0x68],RSI
MOV dword ptr [RSP + 0x70],ECX
MOV dword ptr [RSP + 0x74],EDX
MOV dword ptr [RSP + 0x78],EBP
MOV qword ptr [RSP + 0x80],0x0
MOV dword ptr [RSP + 0x88],ECX
MOV RAX,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0x20],RAX
MOVUPS XMM1,xmmword ptr [RSP + 0x68]
MOVUPS XMM2,xmmword ptr [RSP + 0x78]
MOVUPS xmmword ptr [RSP + 0x10],XMM2
MOVUPS xmmword ptr [RSP],XMM1
LEA RSI,[RSP + 0x30]
MOV EDX,R8D
CALL 0x001d9ae9
JMP 0x001d99d6
LAB_001d99a5:
XOR EDX,EDX
LAB_001d99a7:
LEA RAX,[RSP + 0x90]
MOV qword ptr [RAX],0x0
MOV qword ptr [RAX + 0x8],R9
MOV dword ptr [RAX + 0x10],ECX
MOV dword ptr [RAX + 0x14],EDX
MOV dword ptr [RAX + 0x18],EBP
MOV dword ptr [RAX + 0x20],ECX
LEA RSI,[RSP + 0x30]
MOV RDX,RAX
MOV ECX,R8D
CALL 0x001d99e0
LAB_001d99d6:
ADD RSP,0xb8
POP RBX
POP RBP
RET
|
/* void ImPlot::PlotBars<double>(char const*, double const*, double const*, int, double, int, int,
int) */
void ImPlot::PlotBars<double>
(char *param_1,double *param_2,double *param_3,int param_4,double param_5,int param_6
,int param_7,int param_8)
{
double *local_98;
int local_90;
int local_8c;
int local_88;
double *local_80;
int local_78;
int local_74;
int local_70;
int local_68;
double *local_60;
int iStack_58;
int iStack_54;
int local_50;
int8 uStack_48;
int local_40;
int8 local_38;
double *local_30;
int local_28;
int local_24;
int local_20;
int local_18;
local_74 = 0;
local_8c = 0;
local_98 = param_2;
local_90 = param_4;
local_80 = param_3;
local_78 = param_4;
local_68 = param_4;
if (((uint)param_6 >> 10 & 1) == 0) {
if (param_4 != 0) {
local_8c = (param_7 % param_4 + param_4) % param_4;
local_74 = (param_7 % param_4 + param_4) % param_4;
}
local_88 = param_8;
local_70 = param_8;
if (param_4 == 0) {
iStack_54 = 0;
}
else {
iStack_54 = (param_7 % param_4 + param_4) % param_4;
}
local_50 = param_8;
uStack_48 = 0;
local_60 = param_2;
iStack_58 = param_4;
local_40 = param_4;
PlotBarsVEx<ImPlot::GetterXY<ImPlot::IndexerIdx<double>,ImPlot::IndexerIdx<double>>,ImPlot::GetterXY<ImPlot::IndexerIdx<double>,ImPlot::IndexerConst>>
(param_1,&local_98,param_6);
}
else {
if (param_4 != 0) {
local_8c = (param_7 % param_4 + param_4) % param_4;
local_74 = (param_7 % param_4 + param_4) % param_4;
}
local_88 = param_8;
local_70 = param_8;
if (param_4 == 0) {
local_24 = 0;
}
else {
local_24 = (param_7 % param_4 + param_4) % param_4;
}
local_38 = 0;
local_20 = param_8;
local_30 = param_3;
local_28 = param_4;
local_18 = param_4;
PlotBarsHEx<ImPlot::GetterXY<ImPlot::IndexerIdx<double>,ImPlot::IndexerIdx<double>>,ImPlot::GetterXY<ImPlot::IndexerConst,ImPlot::IndexerIdx<double>>>
(param_1,(GetterXY *)&local_98,(GetterXY *)&local_38,param_5,param_6);
}
return;
}
| |
55,120 | spdlog::details::elapsed_formatter<spdlog::details::scoped_padder, std::chrono::duration<long, std::ratio<1l, 1l>>>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&) | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/pattern_formatter-inl.h | void format(const details::log_msg &msg, const std::tm &, memory_buf_t &dest) override {
auto delta = (std::max)(msg.time - last_message_time_, log_clock::duration::zero());
auto delta_units = std::chrono::duration_cast<DurationUnits>(delta);
last_message_time_ = msg.time;
auto delta_count = static_cast<size_t>(delta_units.count());
auto n_digits = static_cast<size_t>(ScopedPadder::count_digits(delta_count));
ScopedPadder p(n_digits, padinfo_, dest);
fmt_helper::append_int(delta_count, dest);
} | O0 | c | spdlog::details::elapsed_formatter<spdlog::details::scoped_padder, std::chrono::duration<long, std::ratio<1l, 1l>>>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&):
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
movq %rcx, 0x48(%rsp)
movq 0x60(%rsp), %rsi
movq %rsi, 0x8(%rsp)
movq 0x58(%rsp), %rdi
addq $0x18, %rdi
addq $0x18, %rsi
callq 0x3ac50
movq %rax, 0x38(%rsp)
callq 0x46090
movq %rax, 0x30(%rsp)
leaq 0x38(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x60d50
movq (%rax), %rax
movq %rax, 0x40(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x3b350
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x28(%rsp)
movq 0x58(%rsp), %rcx
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rax)
leaq 0x28(%rsp), %rdi
callq 0x44330
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
callq 0x66ec0
movq 0x8(%rsp), %rdx
movl %eax, %eax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rsi
addq $0x8, %rdx
movq 0x48(%rsp), %rcx
leaq 0x17(%rsp), %rdi
callq 0x4c850
movq 0x20(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x54b60
addq $0x68, %rsp
retq
nop
| _ZN6spdlog7details17elapsed_formatterINS0_18null_scoped_padderENSt6chrono8durationIlSt5ratioILl1ELl1EEEEE6formatERKNS0_7log_msgERK2tmRN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE:
sub rsp, 68h
mov [rsp+68h+var_8], rdi
mov [rsp+68h+var_10], rsi
mov [rsp+68h+var_18], rdx
mov [rsp+68h+var_20], rcx
mov rsi, [rsp+68h+var_8]
mov [rsp+68h+var_60], rsi
mov rdi, [rsp+68h+var_10]
add rdi, 18h
add rsi, 18h
call _ZNSt6chronomiINS_3_V212system_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEES6_EENSt11common_typeIJT0_T1_EE4typeERKNS_10time_pointIT_S8_EERKNSC_ISD_S9_EE; std::chrono::operator-<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>,std::chrono::duration<long,std::ratio<1l,1000000000l>>>(std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const&,std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const&)
mov [rsp+68h+var_30], rax
call _ZNSt6chrono8durationIlSt5ratioILl1ELl1000000000EEE4zeroEv; std::chrono::duration<long,std::ratio<1l,1000000000l>>::zero(void)
mov [rsp+68h+var_38], rax
lea rdi, [rsp+68h+var_30]
lea rsi, [rsp+68h+var_38]
call _ZSt3maxINSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEEERKT_S7_S7_; std::max<std::chrono::duration<long,std::ratio<1l,1000000000l>>>(std::chrono::duration<long,std::ratio<1l,1000000000l>> const&,std::chrono::duration<long,std::ratio<1l,1000000000l>> const&)
mov rax, [rax]
mov [rsp+68h+var_28], rax
lea rdi, [rsp+68h+var_28]
call _ZNSt6chrono13duration_castINS_8durationIlSt5ratioILl1ELl1EEEElS2_ILl1ELl1000000000EEEENSt9enable_ifIXsr13__is_durationIT_EE5valueES7_E4typeERKNS1_IT0_T1_EE
mov rcx, rax
mov rax, [rsp+68h+var_60]
mov [rsp+68h+var_40], rcx
mov rcx, [rsp+68h+var_10]
mov rcx, [rcx+18h]
mov [rax+18h], rcx
lea rdi, [rsp+68h+var_40]
call _ZNKSt6chrono8durationIlSt5ratioILl1ELl1EEE5countEv; std::chrono::duration<long,std::ratio<1l,1l>>::count(void)
mov [rsp+68h+var_48], rax
mov rdi, [rsp+68h+var_48]
call _ZN6spdlog7details18null_scoped_padder12count_digitsImEEjT_; spdlog::details::null_scoped_padder::count_digits<ulong>(ulong)
mov rdx, [rsp+68h+var_60]
mov eax, eax
mov [rsp+68h+var_50], rax
mov rsi, [rsp+68h+var_50]
add rdx, 8
mov rcx, [rsp+68h+var_20]
lea rdi, [rsp+68h+var_51]
call _ZN6spdlog7details18null_scoped_padderC2EmRKNS0_12padding_infoERN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::null_scoped_padder::null_scoped_padder(ulong,spdlog::details::padding_info const&,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &)
mov rdi, [rsp+68h+var_48]
mov rsi, [rsp+68h+var_20]
call _ZN6spdlog7details10fmt_helper10append_intImEEvT_RN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::fmt_helper::append_int<ulong>(ulong,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &)
add rsp, 68h
retn
| long long spdlog::details::elapsed_formatter<spdlog::details::null_scoped_padder,std::chrono::duration<long,std::ratio<1l,1l>>>::format(
long long a1,
long long a2,
long long a3,
_QWORD *a4)
{
unsigned long long v5; // [rsp+20h] [rbp-48h]
long long v6; // [rsp+28h] [rbp-40h] BYREF
long long v7; // [rsp+30h] [rbp-38h] BYREF
long long v8; // [rsp+38h] [rbp-30h] BYREF
long long v9; // [rsp+40h] [rbp-28h] BYREF
_QWORD *v10; // [rsp+48h] [rbp-20h]
long long v11; // [rsp+50h] [rbp-18h]
long long v12; // [rsp+58h] [rbp-10h]
long long v13; // [rsp+60h] [rbp-8h]
v13 = a1;
v12 = a2;
v11 = a3;
v10 = a4;
v8 = std::chrono::operator-<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>,std::chrono::duration<long,std::ratio<1l,1000000000l>>>(
a2 + 24,
a1 + 24);
v7 = std::chrono::duration<long,std::ratio<1l,1000000000l>>::zero();
v9 = *(_QWORD *)std::max<std::chrono::duration<long,std::ratio<1l,1000000000l>>>((long long)&v8, (long long)&v7);
v6 = std::chrono::duration_cast<std::chrono::duration<long,std::ratio<1l,1l>>,long,std::ratio<1l,1000000000l>>((long long)&v9);
*(_QWORD *)(a1 + 24) = *(_QWORD *)(v12 + 24);
v5 = std::chrono::duration<long,std::ratio<1l,1l>>::count((long long)&v6);
spdlog::details::null_scoped_padder::count_digits<unsigned long>();
spdlog::details::null_scoped_padder::null_scoped_padder();
return spdlog::details::fmt_helper::append_int<unsigned long>(v5, v10);
}
| format:
SUB RSP,0x68
MOV qword ptr [RSP + 0x60],RDI
MOV qword ptr [RSP + 0x58],RSI
MOV qword ptr [RSP + 0x50],RDX
MOV qword ptr [RSP + 0x48],RCX
MOV RSI,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x8],RSI
MOV RDI,qword ptr [RSP + 0x58]
ADD RDI,0x18
ADD RSI,0x18
CALL 0x0013ac50
MOV qword ptr [RSP + 0x38],RAX
CALL 0x00146090
MOV qword ptr [RSP + 0x30],RAX
LEA RDI,[RSP + 0x38]
LEA RSI,[RSP + 0x30]
CALL 0x00160d50
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x40],RAX
LEA RDI,[RSP + 0x40]
CALL 0x0013b350
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x28],RCX
MOV RCX,qword ptr [RSP + 0x58]
MOV RCX,qword ptr [RCX + 0x18]
MOV qword ptr [RAX + 0x18],RCX
LEA RDI,[RSP + 0x28]
CALL 0x00144330
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x00166ec0
MOV RDX,qword ptr [RSP + 0x8]
MOV EAX,EAX
MOV qword ptr [RSP + 0x18],RAX
MOV RSI,qword ptr [RSP + 0x18]
ADD RDX,0x8
MOV RCX,qword ptr [RSP + 0x48]
LEA RDI,[RSP + 0x17]
CALL 0x0014c850
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x48]
CALL 0x00154b60
ADD RSP,0x68
RET
|
/* spdlog::details::elapsed_formatter<spdlog::details::null_scoped_padder,
std::chrono::duration<long, std::ratio<1l, 1l> > >::format(spdlog::details::log_msg const&, tm
const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char> >&) */
void __thiscall
spdlog::details::
elapsed_formatter<spdlog::details::null_scoped_padder,std::chrono::duration<long,std::ratio<1l,1l>>>
::format(elapsed_formatter<spdlog::details::null_scoped_padder,std::chrono::duration<long,std::ratio<1l,1l>>>
*this,log_msg *param_1,tm *param_2,basic_memory_buffer *param_3)
{
uint uVar1;
duration *pdVar2;
null_scoped_padder local_51;
ulong local_50;
ulong local_48;
int8 local_40;
int8 local_38;
int8 local_30;
int8 local_28;
basic_memory_buffer *local_20;
tm *local_18;
log_msg *local_10;
elapsed_formatter<spdlog::details::null_scoped_padder,std::chrono::duration<long,std::ratio<1l,1l>>>
*local_8;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
local_8 = this;
local_30 = std::chrono::operator-(param_1 + 0x18,this + 0x18);
local_38 = std::chrono::duration<long,std::ratio<1l,1000000000l>>::zero();
pdVar2 = std::max<std::chrono::duration<long,std::ratio<1l,1000000000l>>>
((duration *)&local_30,(duration *)&local_38);
local_28 = *(int8 *)pdVar2;
local_40 = std::chrono::
duration_cast<std::chrono::duration<long,std::ratio<1l,1l>>,long,std::ratio<1l,1000000000l>>
((duration *)&local_28);
*(int8 *)(this + 0x18) = *(int8 *)(local_10 + 0x18);
local_48 = std::chrono::duration<long,std::ratio<1l,1l>>::count
((duration<long,std::ratio<1l,1l>> *)&local_40);
uVar1 = null_scoped_padder::count_digits<unsigned_long>(local_48);
local_50 = (ulong)uVar1;
null_scoped_padder::null_scoped_padder(&local_51,local_50,(padding_info *)(this + 8),local_20);
fmt_helper::append_int<unsigned_long>(local_48,local_20);
return;
}
| |
55,121 | parse_cpu_range(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512]) | monkey531[P]llama/common/common.cpp | bool parse_cpu_range(const std::string & range, bool (&boolmask)[GGML_MAX_N_THREADS]) {
size_t dash_loc = range.find('-');
if (dash_loc == std::string::npos) {
LOG_ERR("Format of CPU range is invalid! Expected [<start>]-[<end>].\n");
return false;
}
size_t start_i;
size_t end_i;
if (dash_loc == 0) {
start_i = 0;
} else {
start_i = std::stoull(range.substr(0, dash_loc));
if (start_i >= GGML_MAX_N_THREADS) {
LOG_ERR("Start index out of bounds!\n");
return false;
}
}
if (dash_loc == range.length() - 1) {
end_i = GGML_MAX_N_THREADS - 1;
} else {
end_i = std::stoull(range.substr(dash_loc + 1));
if (end_i >= GGML_MAX_N_THREADS) {
LOG_ERR("End index out of bounds!\n");
return false;
}
}
for (size_t i = start_i; i <= end_i; i++) {
boolmask[i] = true;
}
return true;
} | O0 | cpp | parse_cpu_range(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512]):
subq $0xb8, %rsp
movq %rdi, 0xa8(%rsp)
movq %rsi, 0xa0(%rsp)
movq 0xa8(%rsp), %rdi
movl $0x2d, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x5f330
movq %rax, 0x98(%rsp)
cmpq $-0x1, 0x98(%rsp)
jne 0xfc849
jmp 0xfc812
xorl %eax, %eax
leaq 0x1b7e95(%rip), %rcx # 0x2b46b0
cmpl (%rcx), %eax
jg 0xfc83a
callq 0x1cc1b0
movq %rax, %rdi
movl $0x4, %esi
leaq 0x121e50(%rip), %rdx # 0x21e683
movb $0x0, %al
callq 0x1cc2a0
jmp 0xfc83c
movb $0x0, 0xb7(%rsp)
jmp 0xfca62
cmpq $0x0, 0x98(%rsp)
jne 0xfc865
movq $0x0, 0x90(%rsp)
jmp 0xfc927
movq 0xa8(%rsp), %rsi
movq 0x98(%rsp), %rcx
xorl %eax, %eax
movl %eax, %edx
movq %rdx, 0x20(%rsp)
leaq 0x68(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x5f1a0
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movl $0xa, %edx
callq 0x1084e0
movq %rax, 0x28(%rsp)
jmp 0xfc8a8
movq 0x28(%rsp), %rax
movq %rax, 0x90(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x5f5d8
cmpq $0x200, 0x90(%rsp) # imm = 0x200
jb 0xfc925
jmp 0xfc8cf
xorl %eax, %eax
leaq 0x1b7dd8(%rip), %rcx # 0x2b46b0
cmpl (%rcx), %eax
jg 0xfc916
callq 0x1cc1b0
movq %rax, %rdi
movl $0x4, %esi
leaq 0x121dd0(%rip), %rdx # 0x21e6c0
movb $0x0, %al
callq 0x1cc2a0
jmp 0xfc916
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x5f5d8
jmp 0xfca73
jmp 0xfc918
movb $0x0, 0xb7(%rsp)
jmp 0xfca62
jmp 0xfc927
movq 0x98(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0xa8(%rsp), %rdi
callq 0x5ea40
movq %rax, %rcx
movq 0x10(%rsp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0xfc963
movq $0x1ff, 0x88(%rsp) # imm = 0x1FF
jmp 0xfca1d
movq 0xa8(%rsp), %rsi
movq 0x98(%rsp), %rdx
incq %rdx
leaq 0x38(%rsp), %rdi
movq %rdi, (%rsp)
movq $-0x1, %rcx
callq 0x5f1a0
movq (%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x1084e0
movq %rax, 0x8(%rsp)
jmp 0xfc9a4
movq 0x8(%rsp), %rax
movq %rax, 0x88(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x5f5d8
cmpq $0x200, 0x88(%rsp) # imm = 0x200
jb 0xfca1b
jmp 0xfc9cb
xorl %eax, %eax
leaq 0x1b7cdc(%rip), %rcx # 0x2b46b0
cmpl (%rcx), %eax
jg 0xfca0f
callq 0x1cc1b0
movq %rax, %rdi
movl $0x4, %esi
leaq 0x121cf0(%rip), %rdx # 0x21e6dc
movb $0x0, %al
callq 0x1cc2a0
jmp 0xfca0f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x5f5d8
jmp 0xfca73
jmp 0xfca11
movb $0x0, 0xb7(%rsp)
jmp 0xfca62
jmp 0xfca1d
movq 0x90(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
cmpq 0x88(%rsp), %rax
ja 0xfca5a
movq 0xa0(%rsp), %rax
movq 0x30(%rsp), %rcx
movb $0x1, (%rax,%rcx)
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0xfca2a
movb $0x1, 0xb7(%rsp)
movb 0xb7(%rsp), %al
andb $0x1, %al
addq $0xb8, %rsp
retq
movq 0x60(%rsp), %rdi
callq 0x5ebf0
nopl (%rax)
| _Z15parse_cpu_rangeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA512_b:
sub rsp, 0B8h
mov [rsp+0B8h+var_10], rdi
mov [rsp+0B8h+var_18], rsi
mov rdi, [rsp+0B8h+var_10]
mov esi, 2Dh ; '-'
xor eax, eax
mov edx, eax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
mov [rsp+0B8h+var_20], rax
cmp [rsp+0B8h+var_20], 0FFFFFFFFFFFFFFFFh
jnz short loc_FC849
jmp short $+2
loc_FC812:
xor eax, eax
lea rcx, common_log_verbosity_thold
cmp eax, [rcx]
jg short loc_FC83A
call _Z15common_log_mainv; common_log_main(void)
mov rdi, rax
mov esi, 4
lea rdx, aFormatOfCpuRan; "Format of CPU range is invalid! Expecte"...
mov al, 0
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
loc_FC83A:
jmp short $+2
loc_FC83C:
mov [rsp+0B8h+var_1], 0
jmp loc_FCA62
loc_FC849:
cmp [rsp+0B8h+var_20], 0
jnz short loc_FC865
mov [rsp+0B8h+var_28], 0
jmp loc_FC927
loc_FC865:
mov rsi, [rsp+0B8h+var_10]
mov rcx, [rsp+0B8h+var_20]
xor eax, eax
mov edx, eax
mov [rsp+0B8h+var_98], rdx
lea rdi, [rsp+0B8h+var_50]
mov [rsp+0B8h+var_A0], rdi
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rdi, [rsp+0B8h+var_A0]
mov rsi, [rsp+0B8h+var_98]
mov edx, 0Ah
call _ZNSt7__cxx116stoullERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi; std::stoull(std::string const&,ulong *,int)
mov [rsp+0B8h+var_90], rax
jmp short $+2
loc_FC8A8:
mov rax, [rsp+0B8h+var_90]
mov [rsp+0B8h+var_28], rax
lea rdi, [rsp+0B8h+var_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
cmp [rsp+0B8h+var_28], 200h
jb short loc_FC925
jmp short $+2
loc_FC8CF:
xor eax, eax
lea rcx, common_log_verbosity_thold
cmp eax, [rcx]
jg short loc_FC916
call _Z15common_log_mainv; common_log_main(void)
mov rdi, rax
mov esi, 4
lea rdx, aStartIndexOutO; "Start index out of bounds!\n"
mov al, 0
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
jmp short loc_FC916
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
lea rdi, [rsp+arg_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_FCA73
loc_FC916:
jmp short $+2
loc_FC918:
mov [rsp+0B8h+var_1], 0
jmp loc_FCA62
loc_FC925:
jmp short $+2
loc_FC927:
mov rax, [rsp+0B8h+var_20]
mov [rsp+0B8h+var_A8], rax
mov rdi, [rsp+0B8h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void)
mov rcx, rax
mov rax, [rsp+0B8h+var_A8]
sub rcx, 1
cmp rax, rcx
jnz short loc_FC963
mov [rsp+0B8h+var_30], 1FFh
jmp loc_FCA1D
loc_FC963:
mov rsi, [rsp+0B8h+var_10]
mov rdx, [rsp+0B8h+var_20]
inc rdx
lea rdi, [rsp+0B8h+var_80]
mov [rsp+0B8h+var_B8], rdi
mov rcx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rdi, [rsp+0B8h+var_B8]
xor eax, eax
mov esi, eax
mov edx, 0Ah
call _ZNSt7__cxx116stoullERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi; std::stoull(std::string const&,ulong *,int)
mov [rsp+0B8h+var_B0], rax
jmp short $+2
loc_FC9A4:
mov rax, [rsp+0B8h+var_B0]
mov [rsp+0B8h+var_30], rax
lea rdi, [rsp+0B8h+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
cmp [rsp+0B8h+var_30], 200h
jb short loc_FCA1B
jmp short $+2
loc_FC9CB:
xor eax, eax
lea rcx, common_log_verbosity_thold
cmp eax, [rcx]
jg short loc_FCA0F
call _Z15common_log_mainv; common_log_main(void)
mov rdi, rax
mov esi, 4
lea rdx, aEndIndexOutOfB; "End index out of bounds!\n"
mov al, 0
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
jmp short loc_FCA0F
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
lea rdi, [rsp+arg_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_FCA73
loc_FCA0F:
jmp short $+2
loc_FCA11:
mov [rsp+0B8h+var_1], 0
jmp short loc_FCA62
loc_FCA1B:
jmp short $+2
loc_FCA1D:
mov rax, [rsp+0B8h+var_28]
mov [rsp+0B8h+var_88], rax
loc_FCA2A:
mov rax, [rsp+0B8h+var_88]
cmp rax, [rsp+0B8h+var_30]
ja short loc_FCA5A
mov rax, [rsp+0B8h+var_18]
mov rcx, [rsp+0B8h+var_88]
mov byte ptr [rax+rcx], 1
mov rax, [rsp+0B8h+var_88]
add rax, 1
mov [rsp+0B8h+var_88], rax
jmp short loc_FCA2A
loc_FCA5A:
mov [rsp+0B8h+var_1], 1
loc_FCA62:
mov al, [rsp+0B8h+var_1]
and al, 1
add rsp, 0B8h
retn
loc_FCA73:
mov rdi, [rsp+arg_58]
call __Unwind_Resume
| char parse_cpu_range(long long a1, long long a2)
{
int v2; // eax
int v3; // ecx
int v4; // r8d
int v5; // r9d
int v6; // eax
int v7; // ecx
int v8; // r8d
int v9; // r9d
int v10; // eax
int v11; // ecx
int v12; // r8d
int v13; // r9d
long long v15; // [rsp+10h] [rbp-A8h]
unsigned long long i; // [rsp+30h] [rbp-88h]
_BYTE v17[48]; // [rsp+38h] [rbp-80h] BYREF
_BYTE v18[32]; // [rsp+68h] [rbp-50h] BYREF
unsigned long long v19; // [rsp+88h] [rbp-30h]
unsigned long long v20; // [rsp+90h] [rbp-28h]
long long v21; // [rsp+98h] [rbp-20h]
long long v22; // [rsp+A0h] [rbp-18h]
long long v23; // [rsp+A8h] [rbp-10h]
v23 = a1;
v22 = a2;
v21 = std::string::find(a1, 45LL);
if ( v21 == -1 )
{
if ( common_log_verbosity_thold >= 0 )
{
v2 = common_log_main();
common_log_add(v2, 4, (unsigned int)"Format of CPU range is invalid! Expected [<start>]-[<end>].\n", v3, v4, v5);
}
return 0;
}
if ( v21 )
{
std::string::substr(v18, v23, 0LL, v21);
v20 = std::stoull(v18, 0LL, 10LL);
std::string::~string(v18);
if ( v20 >= 0x200 )
{
if ( common_log_verbosity_thold >= 0 )
{
v6 = common_log_main();
common_log_add(v6, 4, (unsigned int)"Start index out of bounds!\n", v7, v8, v9);
}
return 0;
}
}
else
{
v20 = 0LL;
}
v15 = v21;
if ( v15 == std::string::length(v23) - 1 )
{
v19 = 511LL;
goto LABEL_17;
}
std::string::substr(v17, v23, v21 + 1, -1LL);
v19 = std::stoull(v17, 0LL, 10LL);
std::string::~string(v17);
if ( v19 < 0x200 )
{
LABEL_17:
for ( i = v20; i <= v19; ++i )
*(_BYTE *)(v22 + i) = 1;
return 1;
}
if ( common_log_verbosity_thold >= 0 )
{
v10 = common_log_main();
common_log_add(v10, 4, (unsigned int)"End index out of bounds!\n", v11, v12, v13);
}
return 0;
}
| parse_cpu_range:
SUB RSP,0xb8
MOV qword ptr [RSP + 0xa8],RDI
MOV qword ptr [RSP + 0xa0],RSI
MOV RDI,qword ptr [RSP + 0xa8]
MOV ESI,0x2d
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0015f330
MOV qword ptr [RSP + 0x98],RAX
CMP qword ptr [RSP + 0x98],-0x1
JNZ 0x001fc849
JMP 0x001fc812
LAB_001fc812:
XOR EAX,EAX
LEA RCX,[0x3b46b0]
CMP EAX,dword ptr [RCX]
JG 0x001fc83a
CALL 0x002cc1b0
MOV RDI,RAX
MOV ESI,0x4
LEA RDX,[0x31e683]
MOV AL,0x0
CALL 0x002cc2a0
LAB_001fc83a:
JMP 0x001fc83c
LAB_001fc83c:
MOV byte ptr [RSP + 0xb7],0x0
JMP 0x001fca62
LAB_001fc849:
CMP qword ptr [RSP + 0x98],0x0
JNZ 0x001fc865
MOV qword ptr [RSP + 0x90],0x0
JMP 0x001fc927
LAB_001fc865:
MOV RSI,qword ptr [RSP + 0xa8]
MOV RCX,qword ptr [RSP + 0x98]
XOR EAX,EAX
MOV EDX,EAX
MOV qword ptr [RSP + 0x20],RDX
LEA RDI,[RSP + 0x68]
MOV qword ptr [RSP + 0x18],RDI
CALL 0x0015f1a0
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x20]
LAB_001fc897:
MOV EDX,0xa
CALL 0x002084e0
LAB_001fc8a1:
MOV qword ptr [RSP + 0x28],RAX
JMP 0x001fc8a8
LAB_001fc8a8:
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x90],RAX
LEA RDI,[RSP + 0x68]
CALL 0x0015f5d8
CMP qword ptr [RSP + 0x90],0x200
JC 0x001fc925
JMP 0x001fc8cf
LAB_001fc8cf:
XOR EAX,EAX
LEA RCX,[0x3b46b0]
CMP EAX,dword ptr [RCX]
JG 0x001fc916
CALL 0x002cc1b0
MOV RDI,RAX
MOV ESI,0x4
LEA RDX,[0x31e6c0]
MOV AL,0x0
CALL 0x002cc2a0
JMP 0x001fc916
LAB_001fc916:
JMP 0x001fc918
LAB_001fc918:
MOV byte ptr [RSP + 0xb7],0x0
JMP 0x001fca62
LAB_001fc925:
JMP 0x001fc927
LAB_001fc927:
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0xa8]
CALL 0x0015ea40
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
SUB RCX,0x1
CMP RAX,RCX
JNZ 0x001fc963
MOV qword ptr [RSP + 0x88],0x1ff
JMP 0x001fca1d
LAB_001fc963:
MOV RSI,qword ptr [RSP + 0xa8]
MOV RDX,qword ptr [RSP + 0x98]
INC RDX
LEA RDI,[RSP + 0x38]
MOV qword ptr [RSP],RDI
MOV RCX,-0x1
CALL 0x0015f1a0
MOV RDI,qword ptr [RSP]
LAB_001fc98f:
XOR EAX,EAX
MOV ESI,EAX
MOV EDX,0xa
CALL 0x002084e0
LAB_001fc99d:
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001fc9a4
LAB_001fc9a4:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x88],RAX
LEA RDI,[RSP + 0x38]
CALL 0x0015f5d8
CMP qword ptr [RSP + 0x88],0x200
JC 0x001fca1b
JMP 0x001fc9cb
LAB_001fc9cb:
XOR EAX,EAX
LEA RCX,[0x3b46b0]
CMP EAX,dword ptr [RCX]
JG 0x001fca0f
CALL 0x002cc1b0
MOV RDI,RAX
MOV ESI,0x4
LEA RDX,[0x31e6dc]
MOV AL,0x0
CALL 0x002cc2a0
JMP 0x001fca0f
LAB_001fca0f:
JMP 0x001fca11
LAB_001fca11:
MOV byte ptr [RSP + 0xb7],0x0
JMP 0x001fca62
LAB_001fca1b:
JMP 0x001fca1d
LAB_001fca1d:
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0x30],RAX
LAB_001fca2a:
MOV RAX,qword ptr [RSP + 0x30]
CMP RAX,qword ptr [RSP + 0x88]
JA 0x001fca5a
MOV RAX,qword ptr [RSP + 0xa0]
MOV RCX,qword ptr [RSP + 0x30]
MOV byte ptr [RAX + RCX*0x1],0x1
MOV RAX,qword ptr [RSP + 0x30]
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
JMP 0x001fca2a
LAB_001fca5a:
MOV byte ptr [RSP + 0xb7],0x1
LAB_001fca62:
MOV AL,byte ptr [RSP + 0xb7]
AND AL,0x1
ADD RSP,0xb8
RET
|
/* parse_cpu_range(std::__cxx11::string const&, bool (&) [512]) */
int1 parse_cpu_range(string *param_1,bool *param_2)
{
long lVar1;
int8 uVar2;
long lVar3;
ulong local_88;
string local_80 [48];
string local_50 [32];
ulong local_30;
ulong local_28;
long local_20;
bool *local_18;
string *local_10;
int1 local_1;
local_18 = param_2;
local_10 = param_1;
local_20 = std::__cxx11::string::find((char)param_1,0x2d);
if (local_20 == -1) {
if (-1 < common_log_verbosity_thold) {
uVar2 = common_log_main();
common_log_add(uVar2,4,"Format of CPU range is invalid! Expected [<start>]-[<end>].\n");
}
local_1 = 0;
}
else {
if (local_20 == 0) {
local_28 = 0;
}
else {
std::__cxx11::string::substr((ulong)local_50,(ulong)local_10);
/* try { // try from 001fc897 to 001fc8a0 has its CatchHandler @ 001fc8f9 */
local_28 = std::__cxx11::stoull(local_50,(ulong *)0x0,10);
std::__cxx11::string::~string(local_50);
if (0x1ff < local_28) {
if (-1 < common_log_verbosity_thold) {
uVar2 = common_log_main();
common_log_add(uVar2,4,"Start index out of bounds!\n");
}
return 0;
}
}
lVar1 = local_20;
lVar3 = std::__cxx11::string::length();
if (lVar1 == lVar3 + -1) {
local_30 = 0x1ff;
}
else {
std::__cxx11::string::substr((ulong)local_80,(ulong)local_10);
/* try { // try from 001fc98f to 001fc99c has its CatchHandler @ 001fc9f5 */
local_30 = std::__cxx11::stoull(local_80,(ulong *)0x0,10);
std::__cxx11::string::~string(local_80);
if (0x1ff < local_30) {
if (-1 < common_log_verbosity_thold) {
uVar2 = common_log_main();
common_log_add(uVar2,4,"End index out of bounds!\n");
}
return 0;
}
}
for (local_88 = local_28; local_88 <= local_30; local_88 = local_88 + 1) {
local_18[local_88] = true;
}
local_1 = 1;
}
return local_1;
}
| |
55,122 | parse_cpu_range(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512]) | monkey531[P]llama/common/common.cpp | bool parse_cpu_range(const std::string & range, bool (&boolmask)[GGML_MAX_N_THREADS]) {
size_t dash_loc = range.find('-');
if (dash_loc == std::string::npos) {
LOG_ERR("Format of CPU range is invalid! Expected [<start>]-[<end>].\n");
return false;
}
size_t start_i;
size_t end_i;
if (dash_loc == 0) {
start_i = 0;
} else {
start_i = std::stoull(range.substr(0, dash_loc));
if (start_i >= GGML_MAX_N_THREADS) {
LOG_ERR("Start index out of bounds!\n");
return false;
}
}
if (dash_loc == range.length() - 1) {
end_i = GGML_MAX_N_THREADS - 1;
} else {
end_i = std::stoull(range.substr(dash_loc + 1));
if (end_i >= GGML_MAX_N_THREADS) {
LOG_ERR("End index out of bounds!\n");
return false;
}
}
for (size_t i = start_i; i <= end_i; i++) {
boolmask[i] = true;
}
return true;
} | O2 | cpp | parse_cpu_range(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512]):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r15
pushq $0x2d
popq %rsi
xorl %edx, %edx
callq 0x24b90
movq %rax, %r12
testq %rax, %rax
je 0x5811c
cmpq $-0x1, %r12
jne 0x58121
leaq 0xad3fe(%rip), %rax # 0x105500
cmpl $0x0, (%rax)
js 0x581f7
callq 0x9a7a6
leaq 0x5fb80(%rip), %rdx # 0xb7c97
jmp 0x581d5
movq %r12, %r14
jmp 0x58173
movq %rsp, %r14
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %r12, %rcx
callq 0x24970
pushq $0xa
popq %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x5d3c5
movq %rax, %r14
movq %rsp, %rdi
callq 0x25258
cmpq $0x200, %r14 # imm = 0x200
jb 0x58173
leaq 0xad3a4(%rip), %rax # 0x105500
cmpl $0x0, (%rax)
js 0x581f7
callq 0x9a7a6
leaq 0x5fb63(%rip), %rdx # 0xb7cd4
jmp 0x581d5
movq 0x8(%r15), %rax
decq %rax
movl $0x1ff, %r13d # imm = 0x1FF
cmpq %rax, %r12
je 0x581ee
incq %r12
movq %rsp, %r13
pushq $-0x1
popq %rcx
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x24970
pushq $0xa
popq %rdx
movq %r13, %rdi
xorl %esi, %esi
callq 0x5d3c5
movq %rax, %r13
movq %rsp, %rdi
callq 0x25258
cmpq $0x200, %r13 # imm = 0x200
jb 0x581ee
leaq 0xad33c(%rip), %rax # 0x105500
cmpl $0x0, (%rax)
js 0x581f7
callq 0x9a7a6
leaq 0x5fb1b(%rip), %rdx # 0xb7cf0
xorl %ebx, %ebx
pushq $0x4
popq %rsi
movq %rax, %rdi
xorl %eax, %eax
callq 0x9a83e
jmp 0x581f9
movb $0x1, (%rbx,%r14)
incq %r14
cmpq %r13, %r14
jbe 0x581e6
movb $0x1, %bl
jmp 0x581f9
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x5820b
movq %rax, %rbx
movq %rsp, %rdi
callq 0x25258
movq %rbx, %rdi
callq 0x24fe0
| _Z15parse_cpu_rangeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA512_b:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 20h
mov rbx, rsi
mov r15, rdi
push 2Dh ; '-'
pop rsi
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
mov r12, rax
test rax, rax
jz short loc_5811C
cmp r12, 0FFFFFFFFFFFFFFFFh
jnz short loc_58121
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js loc_581F7
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aFormatOfCpuRan; "Format of CPU range is invalid! Expecte"...
jmp loc_581D5
loc_5811C:
mov r14, r12
jmp short loc_58173
loc_58121:
mov r14, rsp
mov rdi, r14
mov rsi, r15
xor edx, edx
mov rcx, r12
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
push 0Ah
pop rdx
mov rdi, r14
xor esi, esi
call _ZNSt7__cxx116stoullERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi; std::stoull(std::string const&,ulong *,int)
mov r14, rax
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
cmp r14, 200h
jb short loc_58173
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js loc_581F7
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aStartIndexOutO; "Start index out of bounds!\n"
jmp short loc_581D5
loc_58173:
mov rax, [r15+8]
dec rax
mov r13d, 1FFh
cmp r12, rax
jz short loc_581EE
inc r12
mov r13, rsp
push 0FFFFFFFFFFFFFFFFh
pop rcx
mov rdi, r13
mov rsi, r15
mov rdx, r12
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
push 0Ah
pop rdx
mov rdi, r13
xor esi, esi
call _ZNSt7__cxx116stoullERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi; std::stoull(std::string const&,ulong *,int)
mov r13, rax
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
cmp r13, 200h
jb short loc_581EE
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_581F7
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aEndIndexOutOfB; "End index out of bounds!\n"
loc_581D5:
xor ebx, ebx
push 4
pop rsi
mov rdi, rax
xor eax, eax
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
jmp short loc_581F9
loc_581E6:
mov byte ptr [rbx+r14], 1
inc r14
loc_581EE:
cmp r14, r13
jbe short loc_581E6
mov bl, 1
jmp short loc_581F9
loc_581F7:
xor ebx, ebx
loc_581F9:
mov eax, ebx
add rsp, 20h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
jmp short $+2
loc_5820B:
mov rbx, rax
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| long long parse_cpu_range(long long a1, long long a2)
{
unsigned int v2; // ebx
long long v3; // rax
long long v4; // r12
int v5; // eax
int v6; // ecx
int v7; // r8d
int v8; // r9d
const char *v9; // rdx
unsigned long long v10; // r14
unsigned long long v11; // r13
_BYTE v13[72]; // [rsp+0h] [rbp-48h] BYREF
v2 = a2;
v3 = std::string::find(a1, 45LL, 0LL);
v4 = v3;
if ( v3 )
{
if ( v3 == -1 )
{
if ( common_log_verbosity_thold >= 0 )
{
v5 = common_log_main();
v9 = "Format of CPU range is invalid! Expected [<start>]-[<end>].\n";
LABEL_13:
v2 = 0;
common_log_add(v5, 4, (_DWORD)v9, v6, v7, v8);
return v2;
}
return 0;
}
std::string::substr(v13, a1, 0LL, v3);
v10 = std::stoull(v13, 0LL, 10LL);
std::string::~string(v13);
if ( v10 >= 0x200 )
{
if ( common_log_verbosity_thold >= 0 )
{
v5 = common_log_main();
v9 = "Start index out of bounds!\n";
goto LABEL_13;
}
return 0;
}
}
else
{
v10 = 0LL;
}
v11 = 511LL;
if ( v4 != *(_QWORD *)(a1 + 8) - 1LL )
{
std::string::substr(v13, a1, v4 + 1, -1LL);
v11 = std::stoull(v13, 0LL, 10LL);
std::string::~string(v13);
if ( v11 >= 0x200 )
{
if ( common_log_verbosity_thold >= 0 )
{
v5 = common_log_main();
v9 = "End index out of bounds!\n";
goto LABEL_13;
}
return 0;
}
}
while ( v10 <= v11 )
*(_BYTE *)(a2 + v10++) = 1;
LOBYTE(v2) = 1;
return v2;
}
| parse_cpu_range:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV RBX,RSI
MOV R15,RDI
PUSH 0x2d
POP RSI
XOR EDX,EDX
CALL 0x00124b90
MOV R12,RAX
TEST RAX,RAX
JZ 0x0015811c
CMP R12,-0x1
JNZ 0x00158121
LEA RAX,[0x205500]
CMP dword ptr [RAX],0x0
JS 0x001581f7
CALL 0x0019a7a6
LEA RDX,[0x1b7c97]
JMP 0x001581d5
LAB_0015811c:
MOV R14,R12
JMP 0x00158173
LAB_00158121:
MOV R14,RSP
MOV RDI,R14
MOV RSI,R15
XOR EDX,EDX
MOV RCX,R12
CALL 0x00124970
LAB_00158134:
PUSH 0xa
POP RDX
MOV RDI,R14
XOR ESI,ESI
CALL 0x0015d3c5
LAB_00158141:
MOV R14,RAX
MOV RDI,RSP
CALL 0x00125258
CMP R14,0x200
JC 0x00158173
LEA RAX,[0x205500]
CMP dword ptr [RAX],0x0
JS 0x001581f7
CALL 0x0019a7a6
LEA RDX,[0x1b7cd4]
JMP 0x001581d5
LAB_00158173:
MOV RAX,qword ptr [R15 + 0x8]
DEC RAX
MOV R13D,0x1ff
CMP R12,RAX
JZ 0x001581ee
INC R12
MOV R13,RSP
PUSH -0x1
POP RCX
MOV RDI,R13
MOV RSI,R15
MOV RDX,R12
CALL 0x00124970
LAB_0015819c:
PUSH 0xa
POP RDX
MOV RDI,R13
XOR ESI,ESI
CALL 0x0015d3c5
LAB_001581a9:
MOV R13,RAX
MOV RDI,RSP
CALL 0x00125258
CMP R13,0x200
JC 0x001581ee
LEA RAX,[0x205500]
CMP dword ptr [RAX],0x0
JS 0x001581f7
CALL 0x0019a7a6
LEA RDX,[0x1b7cf0]
LAB_001581d5:
XOR EBX,EBX
PUSH 0x4
POP RSI
MOV RDI,RAX
XOR EAX,EAX
CALL 0x0019a83e
JMP 0x001581f9
LAB_001581e6:
MOV byte ptr [RBX + R14*0x1],0x1
INC R14
LAB_001581ee:
CMP R14,R13
JBE 0x001581e6
MOV BL,0x1
JMP 0x001581f9
LAB_001581f7:
XOR EBX,EBX
LAB_001581f9:
MOV EAX,EBX
ADD RSP,0x20
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* parse_cpu_range(std::__cxx11::string const&, bool (&) [512]) */
ulong parse_cpu_range(string *param_1,bool *param_2)
{
long lVar1;
int8 uVar2;
ulong uVar3;
char *pcVar4;
ulong uVar5;
string asStack_48 [32];
lVar1 = std::__cxx11::string::find((char)param_1,0x2d);
if (lVar1 == 0) {
uVar3 = 0;
LAB_00158173:
uVar5 = 0x1ff;
if (lVar1 != *(long *)(param_1 + 8) + -1) {
std::__cxx11::string::substr((ulong)asStack_48,(ulong)param_1);
/* try { // try from 0015819c to 001581a8 has its CatchHandler @ 00158209 */
uVar5 = std::__cxx11::stoull(asStack_48,(ulong *)0x0,10);
std::__cxx11::string::~string(asStack_48);
if (0x1ff < uVar5) {
if (common_log_verbosity_thold < 0) goto LAB_001581f7;
uVar2 = common_log_main();
pcVar4 = "End index out of bounds!\n";
goto LAB_001581d5;
}
}
for (; uVar3 <= uVar5; uVar3 = uVar3 + 1) {
param_2[uVar3] = true;
}
uVar3 = CONCAT71((int7)((ulong)param_2 >> 8),1);
}
else {
if (lVar1 == -1) {
if (common_log_verbosity_thold < 0) {
LAB_001581f7:
uVar3 = 0;
goto LAB_001581f9;
}
uVar2 = common_log_main();
pcVar4 = "Format of CPU range is invalid! Expected [<start>]-[<end>].\n";
}
else {
std::__cxx11::string::substr((ulong)asStack_48,(ulong)param_1);
/* try { // try from 00158134 to 00158140 has its CatchHandler @ 0015820b */
uVar3 = std::__cxx11::stoull(asStack_48,(ulong *)0x0,10);
std::__cxx11::string::~string(asStack_48);
if (uVar3 < 0x200) goto LAB_00158173;
if (common_log_verbosity_thold < 0) goto LAB_001581f7;
uVar2 = common_log_main();
pcVar4 = "Start index out of bounds!\n";
}
LAB_001581d5:
uVar3 = 0;
common_log_add(uVar2,4,pcVar4);
}
LAB_001581f9:
return uVar3 & 0xffffffff;
}
| |
55,123 | void minco::MINCO_op<3, 2, 0>::fillEi_final<0, 0, 1, 2, 3, 4, 5>(minco::BandedMatrix<6, 6>&, Eigen::Matrix<double, 6, -1, 0, 6, -1> const&, int, std::integer_sequence<int, 0, 1, 2, 3, 4, 5>) | zusiliang[P]myMINCO/minco.hpp | static inline double get_pow_norm_T(const T_Type &T, const int Ti) { return T(i, Ti); } | O2 | cpp | void minco::MINCO_op<3, 2, 0>::fillEi_final<0, 0, 1, 2, 3, 4, 5>(minco::BandedMatrix<6, 6>&, Eigen::Matrix<double, 6, -1, 0, 6, -1> const&, int, std::integer_sequence<int, 0, 1, 2, 3, 4, 5>):
movslq %edx, %rax
movq (%rsi), %rcx
imulq $0x30, %rax, %rdx
movsd (%rcx,%rdx), %xmm0
imull $0x6, %eax, %eax
leal 0x1(%rax), %esi
movl %eax, %r8d
subl %esi, %r8d
addl $0x7, %r8d
movslq %esi, %r9
movq (%rdi), %rsi
imulq $0x68, %r9, %rdi
addq %rsi, %rdi
movslq %r8d, %r8
movsd %xmm0, 0x30(%rdi,%r8,8)
movsd 0x8(%rcx,%rdx), %xmm0
addsd %xmm0, %xmm0
leal 0x2(%rax), %edi
movslq %edi, %rdi
imulq $0x68, %rdi, %rdi
movsd %xmm0, 0x58(%rsi,%rdi)
movsd 0x10(%rcx,%rdx), %xmm0
mulsd 0x26cc(%rip), %xmm0 # 0xa0c0
leal 0x3(%rax), %edi
movslq %edi, %rdi
imulq $0x68, %rdi, %rdi
movsd %xmm0, 0x50(%rsi,%rdi)
movsd 0x18(%rcx,%rdx), %xmm0
mulsd 0x26b6(%rip), %xmm0 # 0xa0c8
leal 0x4(%rax), %edi
movslq %edi, %rdi
imulq $0x68, %rdi, %rdi
movsd %xmm0, 0x48(%rsi,%rdi)
movsd 0x20(%rcx,%rdx), %xmm0
mulsd 0x26a0(%rip), %xmm0 # 0xa0d0
addl $0x5, %eax
cltq
imulq $0x68, %rax, %rax
movsd %xmm0, 0x40(%rsi,%rax)
retq
| _ZN5minco8MINCO_opILi3ELi2ELi0EE12fillEi_finalILi1EJLi0ELi1ELi2ELi3ELi4EEEEvRNS_12BandedMatrixILi6ELi6EEERKN5Eigen6MatrixIdLi6ELin1ELi0ELi6ELin1EEEiSt16integer_sequenceIiJXspT0_EEE:
movsxd rax, edx
mov rcx, [rsi]
imul rdx, rax, 30h ; '0'
movsd xmm0, qword ptr [rcx+rdx]
imul eax, 6
lea esi, [rax+1]
mov r8d, eax
sub r8d, esi
add r8d, 7
movsxd r9, esi
mov rsi, [rdi]
imul rdi, r9, 68h ; 'h'
add rdi, rsi
movsxd r8, r8d
movsd qword ptr [rdi+r8*8+30h], xmm0
movsd xmm0, qword ptr [rcx+rdx+8]
addsd xmm0, xmm0
lea edi, [rax+2]
movsxd rdi, edi
imul rdi, 68h ; 'h'
movsd qword ptr [rsi+rdi+58h], xmm0
movsd xmm0, qword ptr [rcx+rdx+10h]
mulsd xmm0, cs:qword_A0C0
lea edi, [rax+3]
movsxd rdi, edi
imul rdi, 68h ; 'h'
movsd qword ptr [rsi+rdi+50h], xmm0
movsd xmm0, qword ptr [rcx+rdx+18h]
mulsd xmm0, cs:qword_A0C8
lea edi, [rax+4]
movsxd rdi, edi
imul rdi, 68h ; 'h'
movsd qword ptr [rsi+rdi+48h], xmm0
movsd xmm0, qword ptr [rcx+rdx+20h]
mulsd xmm0, cs:qword_A0D0
add eax, 5
cdqe
imul rax, 68h ; 'h'
movsd qword ptr [rsi+rax+40h], xmm0
retn
| long long minco::MINCO_op<3,2,0>::fillEi_final<1,0,1,2,3,4>(long long *a1, long long *a2, int a3)
{
int v3; // eax
long long v4; // rcx
long long v5; // rdx
long long v6; // xmm0_8
long long v7; // rsi
long long result; // rax
v3 = a3;
v4 = *a2;
v5 = 48LL * a3;
v6 = *(_QWORD *)(*a2 + v5);
v3 *= 6;
v7 = *a1;
*(_QWORD *)(*a1 + 104LL * (v3 + 1) + 96) = v6;
*(double *)(v7 + 104LL * (v3 + 2) + 88) = *(double *)(v4 + v5 + 8) + *(double *)(v4 + v5 + 8);
*(double *)(v7 + 104LL * (v3 + 3) + 80) = *(double *)(v4 + v5 + 16) * 3.0;
*(double *)(v7 + 104LL * (v3 + 4) + 72) = *(double *)(v4 + v5 + 24) * 4.0;
result = 104LL * (v3 + 5);
*(double *)(v7 + result + 64) = *(double *)(v4 + v5 + 32) * 5.0;
return result;
}
| fillEi_final<1,0,1,2,3,4>:
MOVSXD RAX,EDX
MOV RCX,qword ptr [RSI]
IMUL RDX,RAX,0x30
MOVSD XMM0,qword ptr [RCX + RDX*0x1]
IMUL EAX,EAX,0x6
LEA ESI,[RAX + 0x1]
MOV R8D,EAX
SUB R8D,ESI
ADD R8D,0x7
MOVSXD R9,ESI
MOV RSI,qword ptr [RDI]
IMUL RDI,R9,0x68
ADD RDI,RSI
MOVSXD R8,R8D
MOVSD qword ptr [RDI + R8*0x8 + 0x30],XMM0
MOVSD XMM0,qword ptr [RCX + RDX*0x1 + 0x8]
ADDSD XMM0,XMM0
LEA EDI,[RAX + 0x2]
MOVSXD RDI,EDI
IMUL RDI,RDI,0x68
MOVSD qword ptr [RSI + RDI*0x1 + 0x58],XMM0
MOVSD XMM0,qword ptr [RCX + RDX*0x1 + 0x10]
MULSD XMM0,qword ptr [0x0010a0c0]
LEA EDI,[RAX + 0x3]
MOVSXD RDI,EDI
IMUL RDI,RDI,0x68
MOVSD qword ptr [RSI + RDI*0x1 + 0x50],XMM0
MOVSD XMM0,qword ptr [RCX + RDX*0x1 + 0x18]
MULSD XMM0,qword ptr [0x0010a0c8]
LEA EDI,[RAX + 0x4]
MOVSXD RDI,EDI
IMUL RDI,RDI,0x68
MOVSD qword ptr [RSI + RDI*0x1 + 0x48],XMM0
MOVSD XMM0,qword ptr [RCX + RDX*0x1 + 0x20]
MULSD XMM0,qword ptr [0x0010a0d0]
ADD EAX,0x5
CDQE
IMUL RAX,RAX,0x68
MOVSD qword ptr [RSI + RAX*0x1 + 0x40],XMM0
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* void minco::MINCO_op<3, 2, 0>::fillEi_final<1, 0, 1, 2, 3, 4>(minco::BandedMatrix<6, 6>&,
Eigen::Matrix<double, 6, -1, 0, 6, -1> const&, int, std::integer_sequence<int, 0, 1, 2, 3, 4>) */
void minco::MINCO_op<3,2,0>::fillEi_final<1,0,1,2,3,4>(long *param_1,long *param_2,int param_3)
{
double dVar1;
long lVar2;
long lVar3;
long lVar4;
lVar2 = *param_2;
lVar4 = (long)param_3 * 0x30;
param_3 = param_3 * 6;
lVar3 = *param_1;
*(int8 *)
((long)(param_3 + 1) * 0x68 + lVar3 + 0x30 + (long)((param_3 - (param_3 + 1)) + 7) * 8) =
*(int8 *)(lVar2 + lVar4);
dVar1 = *(double *)(lVar2 + 8 + lVar4);
*(double *)(lVar3 + 0x58 + (long)(param_3 + 2) * 0x68) = dVar1 + dVar1;
*(double *)(lVar3 + 0x50 + (long)(param_3 + 3) * 0x68) =
*(double *)(lVar2 + 0x10 + lVar4) * _DAT_0010a0c0;
*(double *)(lVar3 + 0x48 + (long)(param_3 + 4) * 0x68) =
*(double *)(lVar2 + 0x18 + lVar4) * _DAT_0010a0c8;
*(double *)(lVar3 + 0x40 + (long)(param_3 + 5) * 0x68) =
*(double *)(lVar2 + 0x20 + lVar4) * _DAT_0010a0d0;
return;
}
| |
55,124 | void fmt::v10::detail::handle_dynamic_spec<fmt::v10::detail::precision_checker, fmt::v10::basic_format_context<fmt::v10::appender, char>>(int&, fmt::v10::detail::arg_ref<fmt::v10::basic_format_context<fmt::v10::appender, char>::char_type>, fmt::v10::basic_format_context<fmt::v10::appender, char>&) | AlayaLite/build_O3/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h | FMT_CONSTEXPR void handle_dynamic_spec(int& value,
arg_ref<typename Context::char_type> ref,
Context& ctx) {
switch (ref.kind) {
case arg_id_kind::none:
break;
case arg_id_kind::index:
value = detail::get_dynamic_spec<Handler>(get_arg(ctx, ref.val.index));
break;
case arg_id_kind::name:
value = detail::get_dynamic_spec<Handler>(get_arg(ctx, ref.val.name));
break;
}
} | O3 | c | void fmt::v10::detail::handle_dynamic_spec<fmt::v10::detail::precision_checker, fmt::v10::basic_format_context<fmt::v10::appender, char>>(int&, fmt::v10::detail::arg_ref<fmt::v10::basic_format_context<fmt::v10::appender, char>::char_type>, fmt::v10::basic_format_context<fmt::v10::appender, char>&):
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
leaq 0x80(%rsp), %rax
movl (%rax), %ecx
cmpl $0x2, %ecx
je 0x4a426
cmpl $0x1, %ecx
jne 0x4a454
movl 0x8(%rax), %edx
leaq 0x40(%rsp), %r14
movq %r14, %rdi
callq 0x4a14f
jmp 0x4a43b
movq 0x8(%rax), %rdx
movq 0x10(%rax), %rcx
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x4a6a7
movaps (%r14), %xmm0
movaps 0x10(%r14), %xmm1
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
callq 0x4a709
movl %eax, (%rbx)
addq $0x68, %rsp
popq %rbx
popq %r14
retq
| _ZN3fmt3v106detail19handle_dynamic_specINS1_17precision_checkerENS0_20basic_format_contextINS0_8appenderEcEEEEvRiNS1_7arg_refINT0_9char_typeEEERS9_:
push r14
push rbx
sub rsp, 68h
mov rbx, rdi
lea rax, [rsp+78h+arg_0]
mov ecx, [rax]
cmp ecx, 2
jz short loc_4A426
cmp ecx, 1
jnz short loc_4A454
mov edx, [rax+8]
lea r14, [rsp+78h+var_38]
mov rdi, r14
call _ZN3fmt3v106detail7get_argINS0_20basic_format_contextINS0_8appenderEcEEiEEDTcldtfp_3argfp0_EERT_T0_
jmp short loc_4A43B
loc_4A426:
mov rdx, [rax+8]
mov rcx, [rax+10h]
lea r14, [rsp+78h+var_58]
mov rdi, r14
call _ZN3fmt3v106detail7get_argINS0_20basic_format_contextINS0_8appenderEcEENS0_17basic_string_viewIcEEEEDTcldtfp_3argfp0_EERT_T0_
loc_4A43B:
movaps xmm0, xmmword ptr [r14]
movaps xmm1, xmmword ptr [r14+10h]
movaps [rsp+78h+var_68], xmm1
movaps [rsp+78h+var_78], xmm0
call _ZN3fmt3v106detail16get_dynamic_specINS1_17precision_checkerENS0_16basic_format_argINS0_20basic_format_contextINS0_8appenderEcEEEEEEiT0_; fmt::v10::detail::get_dynamic_spec<fmt::v10::detail::precision_checker,fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>>>(fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>>)
mov [rbx], eax
loc_4A454:
add rsp, 68h
pop rbx
pop r14
retn
| int * fmt::v10::detail::handle_dynamic_spec<fmt::v10::detail::precision_checker,fmt::v10::basic_format_context<fmt::v10::appender,char>>(
_DWORD *a1,
long long a2,
_DWORD a3,
_DWORD a4,
_DWORD a5,
_DWORD a6,
int a7,
long long a8,
long long a9)
{
int *result; // rax
_BYTE *v11; // r14
_BYTE *v12; // rdi
int v13; // edx
int v14; // ecx
int v15; // r8d
int v16; // r9d
_BYTE v17[32]; // [rsp+20h] [rbp-58h] BYREF
_BYTE v18[56]; // [rsp+40h] [rbp-38h] BYREF
result = &a7;
if ( a7 == 2 )
{
v11 = v17;
v12 = v17;
fmt::v10::detail::get_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>,fmt::v10::basic_string_view<char>>(
v17,
a2,
a8,
a9);
}
else
{
if ( a7 != 1 )
return result;
v11 = v18;
v12 = v18;
fmt::v10::detail::get_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>,int>((long long)v18, a2, a8);
}
result = (int *)fmt::v10::detail::get_dynamic_spec<fmt::v10::detail::precision_checker,fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>>>(
(_DWORD)v12,
a2,
v13,
v14,
v15,
v16,
*(_OWORD *)v11,
*((_QWORD *)v11 + 1),
*((_OWORD *)v11 + 1));
*a1 = (_DWORD)result;
return result;
}
| handle_dynamic_spec<fmt::v10::detail::precision_checker,fmt::v10::basic_format_context<fmt::v10::appender,char>>:
PUSH R14
PUSH RBX
SUB RSP,0x68
MOV RBX,RDI
LEA RAX,[RSP + 0x80]
MOV ECX,dword ptr [RAX]
CMP ECX,0x2
JZ 0x0014a426
CMP ECX,0x1
JNZ 0x0014a454
MOV EDX,dword ptr [RAX + 0x8]
LEA R14,[RSP + 0x40]
MOV RDI,R14
CALL 0x0014a14f
JMP 0x0014a43b
LAB_0014a426:
MOV RDX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RAX + 0x10]
LEA R14,[RSP + 0x20]
MOV RDI,R14
CALL 0x0014a6a7
LAB_0014a43b:
MOVAPS XMM0,xmmword ptr [R14]
MOVAPS XMM1,xmmword ptr [R14 + 0x10]
MOVAPS xmmword ptr [RSP + 0x10],XMM1
MOVAPS xmmword ptr [RSP],XMM0
CALL 0x0014a709
MOV dword ptr [RBX],EAX
LAB_0014a454:
ADD RSP,0x68
POP RBX
POP R14
RET
|
/* void fmt::v10::detail::handle_dynamic_spec<fmt::v10::detail::precision_checker,
fmt::v10::basic_format_context<fmt::v10::appender, char> >(int&,
fmt::v10::detail::arg_ref<fmt::v10::basic_format_context<fmt::v10::appender, char>::char_type>,
fmt::v10::basic_format_context<fmt::v10::appender, char>&) */
void fmt::v10::detail::
handle_dynamic_spec<fmt::v10::detail::precision_checker,fmt::v10::basic_format_context<fmt::v10::appender,char>>
(int *param_1,int param_2)
{
int iVar1;
int in_stack_00000008;
int8 in_stack_00000010;
int8 in_stack_00000018;
int1 local_58 [32];
basic_format_context local_38 [40];
if (in_stack_00000008 == 2) {
get_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>,fmt::v10::basic_string_view<char>>
(local_58,param_2,in_stack_00000010,in_stack_00000018);
}
else {
if (in_stack_00000008 != 1) {
return;
}
get_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>,int>(local_38,param_2);
}
iVar1 = get_dynamic_spec<fmt::v10::detail::precision_checker,fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>>>
();
*param_1 = iVar1;
return;
}
| |
55,125 | my_hash_first_from_hash_value | eloqsql/mysys/hash.c | uchar* my_hash_first_from_hash_value(const HASH *hash,
my_hash_value_type hash_value,
const uchar *key,
size_t length,
HASH_SEARCH_STATE *current_record)
{
HASH_LINK *pos;
DBUG_ENTER("my_hash_first_from_hash_value");
if (hash->records)
{
uint flag= 1;
uint idx= my_hash_mask(hash_value,
hash->blength, hash->records);
do
{
pos= dynamic_element(&hash->array,idx,HASH_LINK*);
if (!hashcmp(hash,pos,key,length))
{
DBUG_PRINT("exit",("found key at %d",idx));
*current_record= idx;
DBUG_RETURN (pos->data);
}
if (flag)
{
flag=0; /* Reset flag */
if (my_hash_rec_mask(pos, hash->blength, hash->records) != idx)
break; /* Wrong link */
}
}
while ((idx=pos->next) != NO_RECORD);
}
*current_record= NO_RECORD;
DBUG_RETURN(0);
} | O0 | c | my_hash_first_from_hash_value:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x2c40c
movl $0x1, -0x3c(%rbp)
movl -0x14(%rbp), %edi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
callq 0x2c430
movl %eax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x40(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x2c480
cmpl $0x0, %eax
jne 0x2c3c7
jmp 0x2c3ae
jmp 0x2c3b0
movl -0x40(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x2c41e
cmpl $0x0, -0x3c(%rbp)
je 0x2c3f6
movl $0x0, -0x3c(%rbp)
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
callq 0x2c520
cmpl -0x40(%rbp), %eax
je 0x2c3f4
jmp 0x2c40a
jmp 0x2c3f6
jmp 0x2c3f8
movq -0x38(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x40(%rbp)
cmpl $-0x1, %eax
jne 0x2c37c
jmp 0x2c40c
movq -0x30(%rbp), %rax
movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| my_hash_first_from_hash_value:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov rax, [rbp+var_10]
cmp qword ptr [rax+18h], 0
jz loc_2C40C
mov [rbp+var_3C], 1
mov edi, [rbp+var_14]
mov rax, [rbp+var_10]
mov rsi, [rax+10h]
mov rax, [rbp+var_10]
mov rdx, [rax+18h]
call my_hash_mask
mov [rbp+var_40], eax
loc_2C37C:
mov rax, [rbp+var_10]
mov rax, [rax+28h]
mov ecx, [rbp+var_40]
shl rcx, 4
add rax, rcx
mov [rbp+var_38], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_38]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
call hashcmp
cmp eax, 0
jnz short loc_2C3C7
jmp short $+2
loc_2C3AE:
jmp short $+2
loc_2C3B0:
mov ecx, [rbp+var_40]
mov rax, [rbp+var_30]
mov [rax], ecx
mov rax, [rbp+var_38]
mov rax, [rax+8]
mov [rbp+var_8], rax
jmp short loc_2C41E
loc_2C3C7:
cmp [rbp+var_3C], 0
jz short loc_2C3F6
mov [rbp+var_3C], 0
mov rdi, [rbp+var_38]
mov rax, [rbp+var_10]
mov rsi, [rax+10h]
mov rax, [rbp+var_10]
mov rdx, [rax+18h]
call my_hash_rec_mask
cmp eax, [rbp+var_40]
jz short loc_2C3F4
jmp short loc_2C40A
loc_2C3F4:
jmp short $+2
loc_2C3F6:
jmp short $+2
loc_2C3F8:
mov rax, [rbp+var_38]
mov eax, [rax]
mov [rbp+var_40], eax
cmp eax, 0FFFFFFFFh
jnz loc_2C37C
loc_2C40A:
jmp short $+2
loc_2C40C:
mov rax, [rbp+var_30]
mov dword ptr [rax], 0FFFFFFFFh
mov [rbp+var_8], 0
loc_2C41E:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long my_hash_first_from_hash_value(_QWORD *a1, unsigned int a2, long long a3, long long a4, unsigned int *a5)
{
unsigned int v6; // [rsp+0h] [rbp-40h]
int v7; // [rsp+4h] [rbp-3Ch]
long long v8; // [rsp+8h] [rbp-38h]
if ( a1[3] )
{
v7 = 1;
v6 = my_hash_mask(a2, a1[2], a1[3]);
while ( 1 )
{
v8 = 16LL * v6 + a1[5];
if ( !(unsigned int)hashcmp(a1, v8, a3, a4) )
break;
if ( !v7 || (v7 = 0, (unsigned int)my_hash_rec_mask(v8, a1[2], a1[3]) == v6) )
{
v6 = *(_DWORD *)v8;
if ( *(_DWORD *)v8 != -1 )
continue;
}
goto LABEL_8;
}
*a5 = v6;
return *(_QWORD *)(v8 + 8);
}
else
{
LABEL_8:
*a5 = -1;
return 0LL;
}
}
| my_hash_first_from_hash_value:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x18],0x0
JZ 0x0012c40c
MOV dword ptr [RBP + -0x3c],0x1
MOV EDI,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x18]
CALL 0x0012c430
MOV dword ptr [RBP + -0x40],EAX
LAB_0012c37c:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x28]
MOV ECX,dword ptr [RBP + -0x40]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
CALL 0x0012c480
CMP EAX,0x0
JNZ 0x0012c3c7
JMP 0x0012c3ae
LAB_0012c3ae:
JMP 0x0012c3b0
LAB_0012c3b0:
MOV ECX,dword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0012c41e
LAB_0012c3c7:
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x0012c3f6
MOV dword ptr [RBP + -0x3c],0x0
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x18]
CALL 0x0012c520
CMP EAX,dword ptr [RBP + -0x40]
JZ 0x0012c3f4
JMP 0x0012c40a
LAB_0012c3f4:
JMP 0x0012c3f6
LAB_0012c3f6:
JMP 0x0012c3f8
LAB_0012c3f8:
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x40],EAX
CMP EAX,-0x1
JNZ 0x0012c37c
LAB_0012c40a:
JMP 0x0012c40c
LAB_0012c40c:
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],0xffffffff
MOV qword ptr [RBP + -0x8],0x0
LAB_0012c41e:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
int8
my_hash_first_from_hash_value
(long param_1,int4 param_2,int8 param_3,int8 param_4,uint *param_5)
{
bool bVar1;
int iVar2;
uint uVar3;
uint *puVar4;
uint local_48;
if (*(long *)(param_1 + 0x18) != 0) {
bVar1 = true;
local_48 = my_hash_mask(param_2,*(int8 *)(param_1 + 0x10),*(int8 *)(param_1 + 0x18))
;
do {
puVar4 = (uint *)(*(long *)(param_1 + 0x28) + (ulong)local_48 * 0x10);
iVar2 = hashcmp(param_1,puVar4,param_3,param_4);
if (iVar2 == 0) {
*param_5 = local_48;
return *(int8 *)(puVar4 + 2);
}
if (bVar1) {
bVar1 = false;
uVar3 = my_hash_rec_mask(puVar4,*(int8 *)(param_1 + 0x10),
*(int8 *)(param_1 + 0x18));
if (uVar3 != local_48) break;
}
local_48 = *puVar4;
} while (local_48 != 0xffffffff);
}
*param_5 = 0xffffffff;
return 0;
}
| |
55,126 | ELFIO::elfio::Sections::add(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/include/elfio/elfio.hpp | section* add( const std::string& name )
{
section* new_section = parent->create_section();
new_section->set_name( name );
Elf_Half str_index = parent->get_section_name_str_index();
section* string_table( parent->sections_[str_index] );
string_section_accessor str_writer( string_table );
Elf_Word pos = str_writer.add_string( name );
new_section->set_name_string_offset( pos );
return new_section;
} | O0 | cpp | ELFIO::elfio::Sections::add(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq 0x70(%rsp), %rax
movq %rax, (%rsp)
movq (%rax), %rdi
callq 0x189b0
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x68(%rsp), %rsi
leaq 0x40(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x150d0
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq (%rdi), %rax
movq 0x20(%rax), %rax
callq *%rax
jmp 0x18b87
leaq 0x40(%rsp), %rdi
callq 0x15140
movq (%rsp), %rax
movq (%rax), %rdi
callq 0x1b3c0
movw %ax, %cx
movq (%rsp), %rax
movw %cx, 0x32(%rsp)
movq (%rax), %rdi
addq $0x18, %rdi
movzwl 0x32(%rsp), %eax
movl %eax, %esi
callq 0x1b410
movq (%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x1b430
movq 0x68(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x1b450
movl %eax, 0x1c(%rsp)
movq 0x60(%rsp), %rdi
movl 0x1c(%rsp), %esi
movq (%rdi), %rax
callq *0xb0(%rax)
movq 0x60(%rsp), %rax
addq $0x78, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x15140
movq 0x38(%rsp), %rdi
callq 0x153a0
nopw %cs:(%rax,%rax)
nop
| _ZN5ELFIO5elfio8Sections3addERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 78h
mov [rsp+78h+var_8], rdi
mov [rsp+78h+var_10], rsi
mov rax, [rsp+78h+var_8]
mov [rsp+78h+var_78], rax
mov rdi, [rax]; this
call _ZN5ELFIO5elfio14create_sectionEv; ELFIO::elfio::create_section(void)
mov [rsp+78h+var_18], rax
mov rax, [rsp+78h+var_18]
mov [rsp+78h+var_70], rax
mov rsi, [rsp+78h+var_10]
lea rdi, [rsp+78h+var_38]
mov [rsp+78h+var_68], rdi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&)
mov rdi, [rsp+78h+var_70]
mov rsi, [rsp+78h+var_68]
mov rax, [rdi]
mov rax, [rax+20h]
call rax
jmp short $+2
loc_18B87:
lea rdi, [rsp+78h+var_38]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rax, [rsp+78h+var_78]
mov rdi, [rax]; this
call _ZNK5ELFIO5elfio26get_section_name_str_indexEv; ELFIO::elfio::get_section_name_str_index(void)
mov cx, ax
mov rax, [rsp+78h+var_78]
mov [rsp+78h+var_46], cx
mov rdi, [rax]
add rdi, 18h
movzx eax, [rsp+78h+var_46]
mov esi, eax
call _ZNSt6vectorIPN5ELFIO7sectionESaIS2_EEixEm; std::vector<ELFIO::section *>::operator[](ulong)
mov rax, [rax]
mov [rsp+78h+var_50], rax
mov rsi, [rsp+78h+var_50]
lea rdi, [rsp+78h+var_58]
call _ZN5ELFIO32string_section_accessor_templateINS_7sectionEEC2EPS1_; ELFIO::string_section_accessor_template<ELFIO::section>::string_section_accessor_template(ELFIO::section*)
mov rsi, [rsp+78h+var_10]
lea rdi, [rsp+78h+var_58]
call _ZN5ELFIO32string_section_accessor_templateINS_7sectionEE10add_stringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; ELFIO::string_section_accessor_template<ELFIO::section>::add_string(std::string const&)
mov [rsp+78h+var_5C], eax
mov rdi, [rsp+78h+var_18]
mov esi, [rsp+78h+var_5C]
mov rax, [rdi]
call qword ptr [rax+0B0h]
mov rax, [rsp+78h+var_18]
add rsp, 78h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_30], rcx
mov [rsp+arg_2C], eax
lea rdi, [rsp+arg_38]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rsp+arg_30]
call __Unwind_Resume
| long long ELFIO::elfio::Sections::add(ELFIO::elfio **a1, long long a2)
{
long long v3; // [rsp+8h] [rbp-70h]
unsigned int v4; // [rsp+1Ch] [rbp-5Ch]
_BYTE v5[8]; // [rsp+20h] [rbp-58h] BYREF
long long v6; // [rsp+28h] [rbp-50h]
unsigned __int16 section_name_str_index; // [rsp+32h] [rbp-46h]
_BYTE v8[32]; // [rsp+40h] [rbp-38h] BYREF
long long section; // [rsp+60h] [rbp-18h]
long long v10; // [rsp+68h] [rbp-10h]
ELFIO::elfio **v11; // [rsp+70h] [rbp-8h]
v11 = a1;
v10 = a2;
section = ELFIO::elfio::create_section(*a1);
v3 = section;
std::string::basic_string(v8, a2);
(*(void ( **)(long long, _BYTE *))(*(_QWORD *)v3 + 32LL))(v3, v8);
std::string::~string(v8);
section_name_str_index = ELFIO::elfio::get_section_name_str_index(*a1);
v6 = *(_QWORD *)std::vector<ELFIO::section *>::operator[]((char *)*a1 + 24, section_name_str_index);
ELFIO::string_section_accessor_template<ELFIO::section>::string_section_accessor_template(v5, v6);
v4 = ELFIO::string_section_accessor_template<ELFIO::section>::add_string(v5, v10);
(*(void ( **)(long long, _QWORD))(*(_QWORD *)section + 176LL))(section, v4);
return section;
}
| add:
SUB RSP,0x78
MOV qword ptr [RSP + 0x70],RDI
MOV qword ptr [RSP + 0x68],RSI
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP],RAX
MOV RDI,qword ptr [RAX]
CALL 0x001189b0
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x8],RAX
MOV RSI,qword ptr [RSP + 0x68]
LEA RDI,[RSP + 0x40]
MOV qword ptr [RSP + 0x10],RDI
CALL 0x001150d0
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x20]
LAB_00118b83:
CALL RAX
LAB_00118b85:
JMP 0x00118b87
LAB_00118b87:
LEA RDI,[RSP + 0x40]
CALL 0x00115140
MOV RAX,qword ptr [RSP]
MOV RDI,qword ptr [RAX]
CALL 0x0011b3c0
MOV CX,AX
MOV RAX,qword ptr [RSP]
MOV word ptr [RSP + 0x32],CX
MOV RDI,qword ptr [RAX]
ADD RDI,0x18
MOVZX EAX,word ptr [RSP + 0x32]
MOV ESI,EAX
CALL 0x0011b410
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x28],RAX
MOV RSI,qword ptr [RSP + 0x28]
LEA RDI,[RSP + 0x20]
CALL 0x0011b430
MOV RSI,qword ptr [RSP + 0x68]
LEA RDI,[RSP + 0x20]
CALL 0x0011b450
MOV dword ptr [RSP + 0x1c],EAX
MOV RDI,qword ptr [RSP + 0x60]
MOV ESI,dword ptr [RSP + 0x1c]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0xb0]
MOV RAX,qword ptr [RSP + 0x60]
ADD RSP,0x78
RET
|
/* ELFIO::elfio::Sections::add(std::__cxx11::string const&) */
long * __thiscall ELFIO::elfio::Sections::add(Sections *this,string *param_1)
{
int4 uVar1;
long *plVar2;
int8 *puVar3;
string_section_accessor_template<ELFIO::section> local_58 [8];
section *local_50;
ushort local_46;
string local_38 [32];
long *local_18;
string *local_10;
Sections *local_8;
local_10 = param_1;
local_8 = this;
plVar2 = (long *)create_section(*(elfio **)this);
local_18 = plVar2;
std::__cxx11::string::string(local_38,local_10);
/* try { // try from 00118b83 to 00118b84 has its CatchHandler @ 00118c02 */
(**(code **)(*plVar2 + 0x20))(plVar2,local_38);
std::__cxx11::string::~string(local_38);
local_46 = get_section_name_str_index(*(elfio **)this);
puVar3 = (int8 *)
std::vector<ELFIO::section*,std::allocator<ELFIO::section*>>::operator[]
((vector<ELFIO::section*,std::allocator<ELFIO::section*>> *)
(*(long *)this + 0x18),(ulong)local_46);
local_50 = (section *)*puVar3;
string_section_accessor_template<ELFIO::section>::string_section_accessor_template
(local_58,local_50);
uVar1 = string_section_accessor_template<ELFIO::section>::add_string((string *)local_58);
(**(code **)(*local_18 + 0xb0))(local_18,uVar1);
return local_18;
}
| |
55,127 | ELFIO::elfio::Sections::add(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/include/elfio/elfio.hpp | section* add( const std::string& name )
{
section* new_section = parent->create_section();
new_section->set_name( name );
Elf_Half str_index = parent->get_section_name_str_index();
section* string_table( parent->sections_[str_index] );
string_section_accessor str_writer( string_table );
Elf_Word pos = str_writer.add_string( name );
new_section->set_name_string_offset( pos );
return new_section;
} | O1 | cpp | ELFIO::elfio::Sections::add(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rdi
callq 0xca4c
movq %rax, %rbx
leaq 0x20(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0xd2a8
movq (%rbx), %rax
movq %rbx, %rdi
movq %r12, %rsi
callq *0x20(%rax)
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0xcbcd
callq 0xb1a0
movq (%r15), %rax
movq 0x10(%rax), %rdi
testq %rdi, %rdi
je 0xcbe7
movq (%rdi), %rax
callq *0x100(%rax)
movzwl %ax, %eax
jmp 0xcbe9
xorl %eax, %eax
movq (%r15), %rcx
movq 0x18(%rcx), %rcx
movq (%rcx,%rax,8), %rax
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
movq (%r14), %rsi
callq 0xdaca
movq (%rbx), %rcx
movq %rbx, %rdi
movl %eax, %esi
callq *0xb0(%rcx)
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0xcc35
callq 0xb1a0
movq %rbx, %rdi
callq 0xb360
nop
| _ZN5ELFIO5elfio8Sections3addERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 30h
mov r14, rsi
mov r15, rdi
mov rdi, [rdi]; this
call _ZN5ELFIO5elfio14create_sectionEv; ELFIO::elfio::create_section(void)
mov rbx, rax
lea r13, [rsp+58h+var_38]
mov [r13-10h], r13
mov rsi, [r14]
mov rdx, [r14+8]
add rdx, rsi
lea r12, [rsp+58h+var_48]
mov rdi, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rax, [rbx]
mov rdi, rbx
mov rsi, r12
call qword ptr [rax+20h]
mov rdi, [rsp+58h+var_48]; void *
cmp rdi, r13
jz short loc_CBCD
call __ZdlPv; operator delete(void *)
loc_CBCD:
mov rax, [r15]
mov rdi, [rax+10h]
test rdi, rdi
jz short loc_CBE7
mov rax, [rdi]
call qword ptr [rax+100h]
movzx eax, ax
jmp short loc_CBE9
loc_CBE7:
xor eax, eax
loc_CBE9:
mov rcx, [r15]
mov rcx, [rcx+18h]
mov rax, [rcx+rax*8]
lea rdi, [rsp+58h+var_50]
mov [rdi], rax
mov rsi, [r14]
call _ZN5ELFIO32string_section_accessor_templateINS_7sectionEE10add_stringEPKc; ELFIO::string_section_accessor_template<ELFIO::section>::add_string(char const*)
mov rcx, [rbx]
mov rdi, rbx
mov esi, eax
call qword ptr [rcx+0B0h]
mov rax, rbx
add rsp, 30h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+arg_8]; void *
cmp rdi, r13
jz short loc_CC35
call __ZdlPv; operator delete(void *)
loc_CC35:
mov rdi, rbx
call __Unwind_Resume
| long long ELFIO::elfio::Sections::add(ELFIO::elfio **a1, _QWORD *a2)
{
long long section; // rbx
long long v4; // rdi
long long v5; // rax
unsigned int v6; // eax
long long v8; // [rsp+8h] [rbp-50h] BYREF
void *v9[2]; // [rsp+10h] [rbp-48h] BYREF
_BYTE v10[56]; // [rsp+20h] [rbp-38h] BYREF
section = ELFIO::elfio::create_section(*a1);
v9[0] = v10;
std::string::_M_construct<char *>(v9, *a2, *a2 + a2[1]);
(*(void ( **)(long long, void **))(*(_QWORD *)section + 32LL))(section, v9);
if ( v9[0] != v10 )
operator delete(v9[0]);
v4 = *((_QWORD *)*a1 + 2);
if ( v4 )
v5 = (*(unsigned __int16 ( **)(long long))(*(_QWORD *)v4 + 256LL))(v4);
else
v5 = 0LL;
v8 = *(_QWORD *)(*((_QWORD *)*a1 + 3) + 8 * v5);
v6 = ELFIO::string_section_accessor_template<ELFIO::section>::add_string(&v8, *a2);
(*(void ( **)(long long, _QWORD))(*(_QWORD *)section + 176LL))(section, v6);
return section;
}
| add:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x30
MOV R14,RSI
MOV R15,RDI
MOV RDI,qword ptr [RDI]
CALL 0x0010ca4c
MOV RBX,RAX
LEA R13,[RSP + 0x20]
MOV qword ptr [R13 + -0x10],R13
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
ADD RDX,RSI
LEA R12,[RSP + 0x10]
MOV RDI,R12
CALL 0x0010d2a8
MOV RAX,qword ptr [RBX]
LAB_0010cbb5:
MOV RDI,RBX
MOV RSI,R12
CALL qword ptr [RAX + 0x20]
LAB_0010cbbe:
MOV RDI,qword ptr [RSP + 0x10]
CMP RDI,R13
JZ 0x0010cbcd
CALL 0x0010b1a0
LAB_0010cbcd:
MOV RAX,qword ptr [R15]
MOV RDI,qword ptr [RAX + 0x10]
TEST RDI,RDI
JZ 0x0010cbe7
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x100]
MOVZX EAX,AX
JMP 0x0010cbe9
LAB_0010cbe7:
XOR EAX,EAX
LAB_0010cbe9:
MOV RCX,qword ptr [R15]
MOV RCX,qword ptr [RCX + 0x18]
MOV RAX,qword ptr [RCX + RAX*0x8]
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],RAX
MOV RSI,qword ptr [R14]
CALL 0x0010daca
MOV RCX,qword ptr [RBX]
MOV RDI,RBX
MOV ESI,EAX
CALL qword ptr [RCX + 0xb0]
MOV RAX,RBX
ADD RSP,0x30
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* ELFIO::elfio::Sections::add(std::__cxx11::string const&) */
long * __thiscall ELFIO::elfio::Sections::add(Sections *this,string *param_1)
{
ushort uVar1;
int4 uVar2;
long *plVar3;
ulong uVar4;
int8 local_50;
int1 *local_48 [2];
int1 local_38 [16];
plVar3 = (long *)create_section(*(elfio **)this);
local_48[0] = local_38;
std::__cxx11::string::_M_construct<char*>
(local_48,*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1);
/* try { // try from 0010cbb5 to 0010cbbd has its CatchHandler @ 0010cc23 */
(**(code **)(*plVar3 + 0x20))(plVar3,local_48);
if (local_48[0] != local_38) {
operator_delete(local_48[0]);
}
if (*(long **)(*(long *)this + 0x10) == (long *)0x0) {
uVar4 = 0;
}
else {
uVar1 = (**(code **)(**(long **)(*(long *)this + 0x10) + 0x100))();
uVar4 = (ulong)uVar1;
}
local_50 = *(int8 *)(*(long *)(*(long *)this + 0x18) + uVar4 * 8);
uVar2 = string_section_accessor_template<ELFIO::section>::add_string
((string_section_accessor_template<ELFIO::section> *)&local_50,*(char **)param_1
);
(**(code **)(*plVar3 + 0xb0))(plVar3,uVar2);
return plVar3;
}
| |
55,128 | ELFIO::elfio::Sections::add(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/include/elfio/elfio.hpp | section* add( const std::string& name )
{
section* new_section = parent->create_section();
new_section->set_name( name );
Elf_Half str_index = parent->get_section_name_str_index();
section* string_table( parent->sections_[str_index] );
string_section_accessor str_writer( string_table );
Elf_Word pos = str_writer.add_string( name );
new_section->set_name_string_offset( pos );
return new_section;
} | O2 | cpp | ELFIO::elfio::Sections::add(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rdi
callq 0xd796
movq %rax, %rbx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0xc290
movq (%rbx), %rax
movq %rbx, %rdi
movq %r12, %rsi
callq *0x20(%rax)
leaq 0x8(%rsp), %rdi
callq 0xc0d0
movq (%r15), %rax
movq 0x10(%rax), %rdi
testq %rdi, %rdi
je 0xd8a5
movq (%rdi), %rax
callq *0x100(%rax)
movzwl %ax, %ecx
movq (%r15), %rax
jmp 0xd8a7
xorl %ecx, %ecx
movq 0x18(%rax), %rax
movq (%rax,%rcx,8), %rax
movq %rsp, %rdi
movq %rax, (%rdi)
movq %r14, %rsi
callq 0xe75a
movq (%rbx), %rcx
movq %rbx, %rdi
movl %eax, %esi
callq *0xb0(%rcx)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xc0d0
movq %rbx, %rdi
callq 0xc340
nop
| _ZN5ELFIO5elfio8Sections3addERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push r12
push rbx
sub rsp, 28h
mov r14, rsi
mov r15, rdi
mov rdi, [rdi]; this
call _ZN5ELFIO5elfio14create_sectionEv; ELFIO::elfio::create_section(void)
mov rbx, rax
lea r12, [rsp+48h+var_40]
mov rdi, r12
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
mov rax, [rbx]
mov rdi, rbx
mov rsi, r12
call qword ptr [rax+20h]
lea rdi, [rsp+48h+var_40]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, [r15]
mov rdi, [rax+10h]
test rdi, rdi
jz short loc_D8A5
mov rax, [rdi]
call qword ptr [rax+100h]
movzx ecx, ax
mov rax, [r15]
jmp short loc_D8A7
loc_D8A5:
xor ecx, ecx
loc_D8A7:
mov rax, [rax+18h]
mov rax, [rax+rcx*8]
mov rdi, rsp
mov [rdi], rax
mov rsi, r14
call _ZN5ELFIO32string_section_accessor_templateINS_7sectionEE10add_stringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; ELFIO::string_section_accessor_template<ELFIO::section>::add_string(std::string const&)
mov rcx, [rbx]
mov rdi, rbx
mov esi, eax
call qword ptr [rcx+0B0h]
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| long long ELFIO::elfio::Sections::add(ELFIO::elfio **a1, long long a2)
{
long long section; // rbx
ELFIO::elfio *v4; // rax
long long v5; // rdi
long long v6; // rcx
unsigned int v7; // eax
long long v9; // [rsp+0h] [rbp-48h] BYREF
_BYTE v10[64]; // [rsp+8h] [rbp-40h] BYREF
section = ELFIO::elfio::create_section(*a1);
std::string::basic_string(v10, a2);
(*(void ( **)(long long, _BYTE *))(*(_QWORD *)section + 32LL))(section, v10);
std::string::~string(v10, v10);
v4 = *a1;
v5 = *((_QWORD *)*a1 + 2);
if ( v5 )
{
v6 = (*(unsigned __int16 ( **)(long long))(*(_QWORD *)v5 + 256LL))(v5);
v4 = *a1;
}
else
{
v6 = 0LL;
}
v9 = *(_QWORD *)(*((_QWORD *)v4 + 3) + 8 * v6);
v7 = ELFIO::string_section_accessor_template<ELFIO::section>::add_string(&v9, a2);
(*(void ( **)(long long, _QWORD))(*(_QWORD *)section + 176LL))(section, v7);
return section;
}
| add:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
MOV R15,RDI
MOV RDI,qword ptr [RDI]
CALL 0x0010d796
MOV RBX,RAX
LEA R12,[RSP + 0x8]
MOV RDI,R12
MOV RSI,R14
CALL 0x0010c290
MOV RAX,qword ptr [RBX]
LAB_0010d875:
MOV RDI,RBX
MOV RSI,R12
CALL qword ptr [RAX + 0x20]
LAB_0010d87e:
LEA RDI,[RSP + 0x8]
CALL 0x0010c0d0
MOV RAX,qword ptr [R15]
MOV RDI,qword ptr [RAX + 0x10]
TEST RDI,RDI
JZ 0x0010d8a5
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x100]
MOVZX ECX,AX
MOV RAX,qword ptr [R15]
JMP 0x0010d8a7
LAB_0010d8a5:
XOR ECX,ECX
LAB_0010d8a7:
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV RDI,RSP
MOV qword ptr [RDI],RAX
MOV RSI,R14
CALL 0x0010e75a
MOV RCX,qword ptr [RBX]
MOV RDI,RBX
MOV ESI,EAX
CALL qword ptr [RCX + 0xb0]
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
RET
|
/* ELFIO::elfio::Sections::add(std::__cxx11::string const&) */
long * __thiscall ELFIO::elfio::Sections::add(Sections *this,string *param_1)
{
ushort uVar1;
int4 uVar2;
long *plVar3;
long lVar4;
ulong uVar5;
int8 local_48;
string local_40 [32];
plVar3 = (long *)create_section(*(elfio **)this);
std::__cxx11::string::string(local_40,param_1);
/* try { // try from 0010d875 to 0010d87d has its CatchHandler @ 0010d8da */
(**(code **)(*plVar3 + 0x20))(plVar3,local_40);
std::__cxx11::string::~string(local_40);
lVar4 = *(long *)this;
if (*(long **)(lVar4 + 0x10) == (long *)0x0) {
uVar5 = 0;
}
else {
uVar1 = (**(code **)(**(long **)(lVar4 + 0x10) + 0x100))();
uVar5 = (ulong)uVar1;
lVar4 = *(long *)this;
}
local_48 = *(int8 *)(*(long *)(lVar4 + 0x18) + uVar5 * 8);
uVar2 = string_section_accessor_template<ELFIO::section>::add_string
((string_section_accessor_template<ELFIO::section> *)&local_48,param_1);
(**(code **)(*plVar3 + 0xb0))(plVar3,uVar2);
return plVar3;
}
| |
55,129 | ELFIO::elfio::Sections::add(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/include/elfio/elfio.hpp | section* add( const std::string& name )
{
section* new_section = parent->create_section();
new_section->set_name( name );
Elf_Half str_index = parent->get_section_name_str_index();
section* string_table( parent->sections_[str_index] );
string_section_accessor str_writer( string_table );
Elf_Word pos = str_writer.add_string( name );
new_section->set_name_string_offset( pos );
return new_section;
} | O3 | cpp | ELFIO::elfio::Sections::add(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rdi
callq 0xc9fc
movq %rax, %rbx
leaq 0x20(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0xd25e
movq (%rbx), %rax
movq %rbx, %rdi
movq %r12, %rsi
callq *0x20(%rax)
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0xcb83
callq 0xb1a0
movq (%r15), %rax
movq 0x10(%rax), %rdi
testq %rdi, %rdi
je 0xcba0
movq (%rdi), %rax
callq *0x100(%rax)
movzwl %ax, %ecx
movq (%r15), %rax
jmp 0xcba2
xorl %ecx, %ecx
movq 0x18(%rax), %rax
movq (%rax,%rcx,8), %rax
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
movq (%r14), %rsi
callq 0xda7c
movq (%rbx), %rcx
movq %rbx, %rdi
movl %eax, %esi
callq *0xb0(%rcx)
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0xcbeb
callq 0xb1a0
movq %rbx, %rdi
callq 0xb360
nop
| _ZN5ELFIO5elfio8Sections3addERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 30h
mov r14, rsi
mov r15, rdi
mov rdi, [rdi]; this
call _ZN5ELFIO5elfio14create_sectionEv; ELFIO::elfio::create_section(void)
mov rbx, rax
lea r13, [rsp+58h+var_38]
mov [r13-10h], r13
mov rsi, [r14]
mov rdx, [r14+8]
add rdx, rsi
lea r12, [rsp+58h+var_48]
mov rdi, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rax, [rbx]
mov rdi, rbx
mov rsi, r12
call qword ptr [rax+20h]
mov rdi, [rsp+58h+var_48]; void *
cmp rdi, r13
jz short loc_CB83
call __ZdlPv; operator delete(void *)
loc_CB83:
mov rax, [r15]
mov rdi, [rax+10h]
test rdi, rdi
jz short loc_CBA0
mov rax, [rdi]
call qword ptr [rax+100h]
movzx ecx, ax
mov rax, [r15]
jmp short loc_CBA2
loc_CBA0:
xor ecx, ecx
loc_CBA2:
mov rax, [rax+18h]
mov rax, [rax+rcx*8]
lea rdi, [rsp+58h+var_50]
mov [rdi], rax
mov rsi, [r14]
call _ZN5ELFIO32string_section_accessor_templateINS_7sectionEE10add_stringEPKc; ELFIO::string_section_accessor_template<ELFIO::section>::add_string(char const*)
mov rcx, [rbx]
mov rdi, rbx
mov esi, eax
call qword ptr [rcx+0B0h]
mov rax, rbx
add rsp, 30h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+arg_8]; void *
cmp rdi, r13
jz short loc_CBEB
call __ZdlPv; operator delete(void *)
loc_CBEB:
mov rdi, rbx
call __Unwind_Resume
| long long ELFIO::elfio::Sections::add(ELFIO::elfio **a1, _QWORD *a2)
{
long long section; // rbx
ELFIO::elfio *v4; // rax
long long v5; // rdi
long long v6; // rcx
unsigned int v7; // eax
long long v9; // [rsp+8h] [rbp-50h] BYREF
void *v10[2]; // [rsp+10h] [rbp-48h] BYREF
_BYTE v11[56]; // [rsp+20h] [rbp-38h] BYREF
section = ELFIO::elfio::create_section(*a1);
v10[0] = v11;
std::string::_M_construct<char *>(v10, *a2, *a2 + a2[1]);
(*(void ( **)(long long, void **))(*(_QWORD *)section + 32LL))(section, v10);
if ( v10[0] != v11 )
operator delete(v10[0]);
v4 = *a1;
v5 = *((_QWORD *)*a1 + 2);
if ( v5 )
{
v6 = (*(unsigned __int16 ( **)(long long))(*(_QWORD *)v5 + 256LL))(v5);
v4 = *a1;
}
else
{
v6 = 0LL;
}
v9 = *(_QWORD *)(*((_QWORD *)v4 + 3) + 8 * v6);
v7 = ELFIO::string_section_accessor_template<ELFIO::section>::add_string(&v9, *a2);
(*(void ( **)(long long, _QWORD))(*(_QWORD *)section + 176LL))(section, v7);
return section;
}
| add:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x30
MOV R14,RSI
MOV R15,RDI
MOV RDI,qword ptr [RDI]
CALL 0x0010c9fc
MOV RBX,RAX
LEA R13,[RSP + 0x20]
MOV qword ptr [R13 + -0x10],R13
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
ADD RDX,RSI
LEA R12,[RSP + 0x10]
MOV RDI,R12
CALL 0x0010d25e
MOV RAX,qword ptr [RBX]
LAB_0010cb6b:
MOV RDI,RBX
MOV RSI,R12
CALL qword ptr [RAX + 0x20]
LAB_0010cb74:
MOV RDI,qword ptr [RSP + 0x10]
CMP RDI,R13
JZ 0x0010cb83
CALL 0x0010b1a0
LAB_0010cb83:
MOV RAX,qword ptr [R15]
MOV RDI,qword ptr [RAX + 0x10]
TEST RDI,RDI
JZ 0x0010cba0
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x100]
MOVZX ECX,AX
MOV RAX,qword ptr [R15]
JMP 0x0010cba2
LAB_0010cba0:
XOR ECX,ECX
LAB_0010cba2:
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + RCX*0x8]
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],RAX
MOV RSI,qword ptr [R14]
CALL 0x0010da7c
MOV RCX,qword ptr [RBX]
MOV RDI,RBX
MOV ESI,EAX
CALL qword ptr [RCX + 0xb0]
MOV RAX,RBX
ADD RSP,0x30
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* ELFIO::elfio::Sections::add(std::__cxx11::string const&) */
long * __thiscall ELFIO::elfio::Sections::add(Sections *this,string *param_1)
{
ushort uVar1;
int4 uVar2;
long *plVar3;
long lVar4;
ulong uVar5;
int8 local_50;
int1 *local_48 [2];
int1 local_38 [16];
plVar3 = (long *)create_section(*(elfio **)this);
local_48[0] = local_38;
std::__cxx11::string::_M_construct<char*>
(local_48,*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1);
/* try { // try from 0010cb6b to 0010cb73 has its CatchHandler @ 0010cbd9 */
(**(code **)(*plVar3 + 0x20))(plVar3,local_48);
if (local_48[0] != local_38) {
operator_delete(local_48[0]);
}
lVar4 = *(long *)this;
if (*(long **)(lVar4 + 0x10) == (long *)0x0) {
uVar5 = 0;
}
else {
uVar1 = (**(code **)(**(long **)(lVar4 + 0x10) + 0x100))();
uVar5 = (ulong)uVar1;
lVar4 = *(long *)this;
}
local_50 = *(int8 *)(*(long *)(lVar4 + 0x18) + uVar5 * 8);
uVar2 = string_section_accessor_template<ELFIO::section>::add_string
((string_section_accessor_template<ELFIO::section> *)&local_50,*(char **)param_1
);
(**(code **)(*plVar3 + 0xb0))(plVar3,uVar2);
return plVar3;
}
| |
55,130 | minja::TextTemplateToken::~TextTemplateToken() | monkey531[P]llama/common/minja.hpp | TextTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, const std::string& t) : TemplateToken(Type::Text, location, pre, post), text(t) {} | O3 | cpp | minja::TextTemplateToken::~TextTemplateToken():
pushq %rbx
movq %rdi, %rbx
leaq 0x915fd(%rip), %rax # 0x129f00
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x30(%rdi), %rdi
leaq 0x40(%rbx), %rax
cmpq %rax, %rdi
je 0x98922
movq (%rax), %rsi
incq %rsi
callq 0x1a8b0
leaq 0x909cf(%rip), %rax # 0x1292f8
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x9893f
popq %rbx
jmp 0x6d1fe
popq %rbx
retq
nop
| _ZN5minja17TextTemplateTokenD2Ev:
push rbx
mov rbx, rdi
lea rax, _ZTVN5minja17TextTemplateTokenE; `vtable for'minja::TextTemplateToken
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+30h]; void *
lea rax, [rbx+40h]
cmp rdi, rax
jz short loc_98922
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_98922:
lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken
add rax, 10h
mov [rbx], rax
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_9893F
pop rbx
jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9893F:
pop rbx
retn
| void minja::TextTemplateToken::~TextTemplateToken(minja::TextTemplateToken *this)
{
char *v2; // rdi
volatile signed __int32 *v3; // rdi
*(_QWORD *)this = &`vtable for'minja::TextTemplateToken + 2;
v2 = (char *)*((_QWORD *)this + 6);
if ( v2 != (char *)this + 64 )
operator delete(v2, *((_QWORD *)this + 8) + 1LL);
*(_QWORD *)this = &`vtable for'minja::TemplateToken + 2;
v3 = (volatile signed __int32 *)*((_QWORD *)this + 3);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
}
| ~TextTemplateToken:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x229f00]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x30]
LEA RAX,[RBX + 0x40]
CMP RDI,RAX
JZ 0x00198922
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x0011a8b0
LAB_00198922:
LEA RAX,[0x2292f8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x18]
TEST RDI,RDI
JZ 0x0019893f
POP RBX
JMP 0x0016d1fe
LAB_0019893f:
POP RBX
RET
|
/* minja::TextTemplateToken::~TextTemplateToken() */
void __thiscall minja::TextTemplateToken::~TextTemplateToken(TextTemplateToken *this)
{
*(int ***)this = &PTR__TextTemplateToken_00229f10;
if (*(TextTemplateToken **)(this + 0x30) != this + 0x40) {
operator_delete(*(TextTemplateToken **)(this + 0x30),*(long *)(this + 0x40) + 1);
}
*(int ***)this = &PTR__TemplateToken_00229308;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) !=
(_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 + 0x18));
return;
}
return;
}
| |
55,131 | ma_columndef_write | eloqsql/storage/maria/ma_open.c | my_bool _ma_columndef_write(File file, MARIA_COLUMNDEF *columndef)
{
uchar buff[MARIA_COLUMNDEF_SIZE];
uchar *ptr=buff;
uint low_offset= (uint) (columndef->offset & 0xffff);
uint high_offset= (uint) (columndef->offset >> 16);
mi_int2store(ptr,(ulong) columndef->column_nr); ptr+= 2;
mi_int2store(ptr, low_offset); ptr+= 2;
mi_int2store(ptr,columndef->type); ptr+= 2;
mi_int2store(ptr,columndef->length); ptr+= 2;
mi_int2store(ptr,columndef->fill_length); ptr+= 2;
mi_int2store(ptr,columndef->null_pos); ptr+= 2;
mi_int2store(ptr,columndef->empty_pos); ptr+= 2;
(*ptr++)= columndef->null_bit;
(*ptr++)= columndef->empty_bit;
mi_int2store(ptr, high_offset); ptr+= 2;
ptr[0]= ptr[1]= 0; ptr+= 2; /* For future */
return mysql_file_write(file, buff, (size_t) (ptr-buff), MYF(MY_NABP)) != 0;
} | O0 | c | ma_columndef_write:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movl %edi, -0x24(%rbp)
movq %rsi, -0x30(%rbp)
leaq -0x20(%rbp), %rcx
movq %rcx, -0x38(%rbp)
movq -0x30(%rbp), %rax
movzwl 0x4(%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x30(%rbp), %rax
movzwl 0x6(%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movzwl 0xa(%rax), %eax
movl %eax, -0x44(%rbp)
movb -0x44(%rbp), %dl
movq -0x38(%rbp), %rax
movb %dl, 0x1(%rax)
movb -0x43(%rbp), %dl
movq -0x38(%rbp), %rax
movb %dl, (%rax)
movq -0x38(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x38(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x48(%rbp)
movb -0x48(%rbp), %dl
movq -0x38(%rbp), %rax
movb %dl, 0x1(%rax)
movb -0x47(%rbp), %dl
movq -0x38(%rbp), %rax
movb %dl, (%rax)
movq -0x38(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4c(%rbp)
movb -0x4c(%rbp), %dl
movq -0x38(%rbp), %rax
movb %dl, 0x1(%rax)
movb -0x4b(%rbp), %dl
movq -0x38(%rbp), %rax
movb %dl, (%rax)
movq -0x38(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movzwl 0x8(%rax), %eax
movl %eax, -0x50(%rbp)
movb -0x50(%rbp), %dl
movq -0x38(%rbp), %rax
movb %dl, 0x1(%rax)
movb -0x4f(%rbp), %dl
movq -0x38(%rbp), %rax
movb %dl, (%rax)
movq -0x38(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movzwl 0xc(%rax), %eax
movl %eax, -0x54(%rbp)
movb -0x54(%rbp), %dl
movq -0x38(%rbp), %rax
movb %dl, 0x1(%rax)
movb -0x53(%rbp), %dl
movq -0x38(%rbp), %rax
movb %dl, (%rax)
movq -0x38(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movzwl 0xe(%rax), %eax
movl %eax, -0x58(%rbp)
movb -0x58(%rbp), %dl
movq -0x38(%rbp), %rax
movb %dl, 0x1(%rax)
movb -0x57(%rbp), %dl
movq -0x38(%rbp), %rax
movb %dl, (%rax)
movq -0x38(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movzwl 0x10(%rax), %eax
movl %eax, -0x5c(%rbp)
movb -0x5c(%rbp), %dl
movq -0x38(%rbp), %rax
movb %dl, 0x1(%rax)
movb -0x5b(%rbp), %dl
movq -0x38(%rbp), %rax
movb %dl, (%rax)
movq -0x38(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movb 0x12(%rax), %dl
movq -0x38(%rbp), %rax
movq %rax, %rsi
incq %rsi
movq %rsi, -0x38(%rbp)
movb %dl, (%rax)
movq -0x30(%rbp), %rax
movb 0x13(%rax), %dl
movq -0x38(%rbp), %rax
movq %rax, %rsi
incq %rsi
movq %rsi, -0x38(%rbp)
movb %dl, (%rax)
movl -0x40(%rbp), %eax
movl %eax, -0x60(%rbp)
movb -0x60(%rbp), %dl
movq -0x38(%rbp), %rax
movb %dl, 0x1(%rax)
movb -0x5f(%rbp), %dl
movq -0x38(%rbp), %rax
movb %dl, (%rax)
movq -0x38(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movb $0x0, 0x1(%rax)
movq -0x38(%rbp), %rax
movb $0x0, (%rax)
movq -0x38(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x38(%rbp)
movl -0x24(%rbp), %edx
movq -0x38(%rbp), %r8
subq %rcx, %r8
leaq 0xaca60(%rip), %rdi # 0x11fec8
movl $0x77b, %esi # imm = 0x77B
movl $0x4, %r9d
callq 0x71d90
testq %rax, %rax
setne %al
movb %al, -0x61(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x7349c
movb -0x61(%rbp), %al
addq $0x70, %rsp
popq %rbp
retq
callq 0x272b0
nopw %cs:(%rax,%rax)
| _ma_columndef_write:
push rbp
mov rbp, rsp
sub rsp, 70h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_24], edi
mov [rbp+var_30], rsi
lea rcx, [rbp+var_20]
mov [rbp+var_38], rcx
mov rax, [rbp+var_30]
movzx eax, word ptr [rax+4]
mov [rbp+var_3C], eax
mov rax, [rbp+var_30]
movzx eax, word ptr [rax+6]
mov [rbp+var_40], eax
mov rax, [rbp+var_30]
movzx eax, word ptr [rax+0Ah]
mov [rbp+var_44], eax
mov dl, byte ptr [rbp+var_44]
mov rax, [rbp+var_38]
mov [rax+1], dl
mov dl, byte ptr [rbp+var_44+1]
mov rax, [rbp+var_38]
mov [rax], dl
mov rax, [rbp+var_38]
add rax, 2
mov [rbp+var_38], rax
mov eax, [rbp+var_3C]
mov [rbp+var_48], eax
mov dl, byte ptr [rbp+var_48]
mov rax, [rbp+var_38]
mov [rax+1], dl
mov dl, byte ptr [rbp+var_48+1]
mov rax, [rbp+var_38]
mov [rax], dl
mov rax, [rbp+var_38]
add rax, 2
mov [rbp+var_38], rax
mov rax, [rbp+var_30]
mov eax, [rax]
mov [rbp+var_4C], eax
mov dl, byte ptr [rbp+var_4C]
mov rax, [rbp+var_38]
mov [rax+1], dl
mov dl, byte ptr [rbp+var_4C+1]
mov rax, [rbp+var_38]
mov [rax], dl
mov rax, [rbp+var_38]
add rax, 2
mov [rbp+var_38], rax
mov rax, [rbp+var_30]
movzx eax, word ptr [rax+8]
mov [rbp+var_50], eax
mov dl, byte ptr [rbp+var_50]
mov rax, [rbp+var_38]
mov [rax+1], dl
mov dl, byte ptr [rbp+var_50+1]
mov rax, [rbp+var_38]
mov [rax], dl
mov rax, [rbp+var_38]
add rax, 2
mov [rbp+var_38], rax
mov rax, [rbp+var_30]
movzx eax, word ptr [rax+0Ch]
mov [rbp+var_54], eax
mov dl, byte ptr [rbp+var_54]
mov rax, [rbp+var_38]
mov [rax+1], dl
mov dl, byte ptr [rbp+var_54+1]
mov rax, [rbp+var_38]
mov [rax], dl
mov rax, [rbp+var_38]
add rax, 2
mov [rbp+var_38], rax
mov rax, [rbp+var_30]
movzx eax, word ptr [rax+0Eh]
mov [rbp+var_58], eax
mov dl, byte ptr [rbp+var_58]
mov rax, [rbp+var_38]
mov [rax+1], dl
mov dl, byte ptr [rbp+var_58+1]
mov rax, [rbp+var_38]
mov [rax], dl
mov rax, [rbp+var_38]
add rax, 2
mov [rbp+var_38], rax
mov rax, [rbp+var_30]
movzx eax, word ptr [rax+10h]
mov [rbp+var_5C], eax
mov dl, byte ptr [rbp+var_5C]
mov rax, [rbp+var_38]
mov [rax+1], dl
mov dl, byte ptr [rbp+var_5C+1]
mov rax, [rbp+var_38]
mov [rax], dl
mov rax, [rbp+var_38]
add rax, 2
mov [rbp+var_38], rax
mov rax, [rbp+var_30]
mov dl, [rax+12h]
mov rax, [rbp+var_38]
mov rsi, rax
inc rsi
mov [rbp+var_38], rsi
mov [rax], dl
mov rax, [rbp+var_30]
mov dl, [rax+13h]
mov rax, [rbp+var_38]
mov rsi, rax
inc rsi
mov [rbp+var_38], rsi
mov [rax], dl
mov eax, [rbp+var_40]
mov [rbp+var_60], eax
mov dl, byte ptr [rbp+var_60]
mov rax, [rbp+var_38]
mov [rax+1], dl
mov dl, byte ptr [rbp+var_60+1]
mov rax, [rbp+var_38]
mov [rax], dl
mov rax, [rbp+var_38]
add rax, 2
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov byte ptr [rax+1], 0
mov rax, [rbp+var_38]
mov byte ptr [rax], 0
mov rax, [rbp+var_38]
add rax, 2
mov [rbp+var_38], rax
mov edx, [rbp+var_24]
mov r8, [rbp+var_38]
sub r8, rcx
lea rdi, aWorkspaceLlm4b_18; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 77Bh
mov r9d, 4
call inline_mysql_file_write_0
test rax, rax
setnz al
mov [rbp+var_61], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_7349C
mov al, [rbp+var_61]
add rsp, 70h
pop rbp
retn
loc_7349C:
call ___stack_chk_fail
| bool ma_columndef_write(unsigned int a1, long long a2)
{
__int16 v2; // kr00_2
__int16 v3; // kr04_2
__int16 v4; // kr06_2
__int16 v5; // kr08_2
__int16 v6; // kr0A_2
__int16 v7; // kr0C_2
__int16 v9; // [rsp+30h] [rbp-40h]
__int16 v10; // [rsp+34h] [rbp-3Ch]
_BYTE v11[24]; // [rsp+50h] [rbp-20h] BYREF
unsigned long long v12; // [rsp+68h] [rbp-8h]
v12 = __readfsqword(0x28u);
v10 = *(_WORD *)(a2 + 4);
v9 = *(_WORD *)(a2 + 6);
v2 = *(_WORD *)(a2 + 10);
v11[0] = HIBYTE(v2);
v11[1] = v2;
v11[2] = HIBYTE(v10);
v11[3] = v10;
v3 = *(_DWORD *)a2;
v11[4] = HIBYTE(v3);
v11[5] = v3;
v4 = *(_WORD *)(a2 + 8);
v11[6] = HIBYTE(v4);
v11[7] = v4;
v5 = *(_WORD *)(a2 + 12);
v11[8] = HIBYTE(v5);
v11[9] = v5;
v6 = *(_WORD *)(a2 + 14);
v11[10] = HIBYTE(v6);
v11[11] = v6;
v7 = *(_WORD *)(a2 + 16);
v11[12] = HIBYTE(v7);
v11[13] = v7;
v11[14] = *(_BYTE *)(a2 + 18);
v11[15] = *(_BYTE *)(a2 + 19);
v11[16] = HIBYTE(v9);
v11[17] = v9;
v11[19] = 0;
v11[18] = 0;
return inline_mysql_file_write_0(
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c",
0x77Bu,
a1,
(long long)v11,
20LL,
4LL) != 0;
}
| _ma_columndef_write:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0x24],EDI
MOV qword ptr [RBP + -0x30],RSI
LEA RCX,[RBP + -0x20]
MOV qword ptr [RBP + -0x38],RCX
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX + 0x4]
MOV dword ptr [RBP + -0x3c],EAX
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX + 0x6]
MOV dword ptr [RBP + -0x40],EAX
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX + 0xa]
MOV dword ptr [RBP + -0x44],EAX
MOV DL,byte ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX + 0x1],DL
MOV DL,byte ptr [RBP + -0x43]
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x2
MOV qword ptr [RBP + -0x38],RAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x48],EAX
MOV DL,byte ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX + 0x1],DL
MOV DL,byte ptr [RBP + -0x47]
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x2
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4c],EAX
MOV DL,byte ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX + 0x1],DL
MOV DL,byte ptr [RBP + -0x4b]
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x2
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x50],EAX
MOV DL,byte ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX + 0x1],DL
MOV DL,byte ptr [RBP + -0x4f]
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x2
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX + 0xc]
MOV dword ptr [RBP + -0x54],EAX
MOV DL,byte ptr [RBP + -0x54]
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX + 0x1],DL
MOV DL,byte ptr [RBP + -0x53]
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x2
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX + 0xe]
MOV dword ptr [RBP + -0x58],EAX
MOV DL,byte ptr [RBP + -0x58]
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX + 0x1],DL
MOV DL,byte ptr [RBP + -0x57]
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x2
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX + 0x10]
MOV dword ptr [RBP + -0x5c],EAX
MOV DL,byte ptr [RBP + -0x5c]
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX + 0x1],DL
MOV DL,byte ptr [RBP + -0x5b]
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x2
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV DL,byte ptr [RAX + 0x12]
MOV RAX,qword ptr [RBP + -0x38]
MOV RSI,RAX
INC RSI
MOV qword ptr [RBP + -0x38],RSI
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x30]
MOV DL,byte ptr [RAX + 0x13]
MOV RAX,qword ptr [RBP + -0x38]
MOV RSI,RAX
INC RSI
MOV qword ptr [RBP + -0x38],RSI
MOV byte ptr [RAX],DL
MOV EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x60],EAX
MOV DL,byte ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX + 0x1],DL
MOV DL,byte ptr [RBP + -0x5f]
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x2
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX + 0x1],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x2
MOV qword ptr [RBP + -0x38],RAX
MOV EDX,dword ptr [RBP + -0x24]
MOV R8,qword ptr [RBP + -0x38]
SUB R8,RCX
LEA RDI,[0x21fec8]
MOV ESI,0x77b
MOV R9D,0x4
CALL 0x00171d90
TEST RAX,RAX
SETNZ AL
MOV byte ptr [RBP + -0x61],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0017349c
MOV AL,byte ptr [RBP + -0x61]
ADD RSP,0x70
POP RBP
RET
LAB_0017349c:
CALL 0x001272b0
|
int8 _ma_columndef_write(int4 param_1,int4 *param_2)
{
long lVar1;
long in_FS_OFFSET;
int1 local_68;
int1 uStack_67;
int1 local_64;
int1 uStack_63;
int1 local_60;
int1 uStack_5f;
int1 local_5c;
int1 uStack_5b;
int1 local_58;
int1 uStack_57;
int1 local_54;
int1 uStack_53;
int1 local_50;
int1 uStack_4f;
int1 local_4c;
int1 uStack_4b;
int1 local_28;
int1 local_27;
int1 local_26;
int1 local_25;
int1 local_24;
int1 local_23;
int1 local_22;
int1 local_21;
int1 local_20;
int1 local_1f;
int1 local_1e;
int1 local_1d;
int1 local_1c;
int1 local_1b;
int1 local_1a;
int1 local_19;
int1 local_18;
int1 local_17;
int1 local_16;
int1 local_15;
int1 auStack_14 [4];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_4c = (int1)*(int2 *)((long)param_2 + 10);
local_27 = local_4c;
uStack_4b = (int1)((ushort)*(int2 *)((long)param_2 + 10) >> 8);
local_28 = uStack_4b;
local_50 = (int1)*(int2 *)(param_2 + 1);
local_25 = local_50;
uStack_4f = (int1)((ushort)*(int2 *)(param_2 + 1) >> 8);
local_26 = uStack_4f;
local_54 = (int1)*param_2;
local_23 = local_54;
uStack_53 = (int1)((uint)*param_2 >> 8);
local_24 = uStack_53;
local_58 = (int1)*(int2 *)(param_2 + 2);
local_21 = local_58;
uStack_57 = (int1)((ushort)*(int2 *)(param_2 + 2) >> 8);
local_22 = uStack_57;
local_5c = (int1)*(int2 *)(param_2 + 3);
local_1f = local_5c;
uStack_5b = (int1)((ushort)*(int2 *)(param_2 + 3) >> 8);
local_20 = uStack_5b;
local_60 = (int1)*(int2 *)((long)param_2 + 0xe);
local_1d = local_60;
uStack_5f = (int1)((ushort)*(int2 *)((long)param_2 + 0xe) >> 8);
local_1e = uStack_5f;
local_64 = (int1)*(int2 *)(param_2 + 4);
local_1b = local_64;
uStack_63 = (int1)((ushort)*(int2 *)(param_2 + 4) >> 8);
local_1c = uStack_63;
local_1a = *(int1 *)((long)param_2 + 0x12);
local_19 = *(int1 *)((long)param_2 + 0x13);
local_68 = (int1)*(int2 *)((long)param_2 + 6);
local_17 = local_68;
uStack_67 = (int1)((ushort)*(int2 *)((long)param_2 + 6) >> 8);
local_18 = uStack_67;
local_15 = 0;
local_16 = 0;
lVar1 = inline_mysql_file_write
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c",0x77b,
param_1,&local_28,auStack_14 + -(long)&local_28,4);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),lVar1 != 0);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
55,132 | JS_DefinePropertyValue | bluesky950520[P]quickjs/quickjs.c | int JS_DefinePropertyValue(JSContext *ctx, JSValue this_obj,
JSAtom prop, JSValue val, int flags)
{
int ret;
ret = JS_DefineProperty(ctx, this_obj, prop, val, JS_UNDEFINED, JS_UNDEFINED,
flags | JS_PROP_HAS_VALUE | JS_PROP_HAS_CONFIGURABLE | JS_PROP_HAS_WRITABLE | JS_PROP_HAS_ENUMERABLE);
JS_FreeValue(ctx, val);
return ret;
} | O2 | c | JS_DefinePropertyValue:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %r9, %rbx
movq %r8, %r14
movq %rdi, %r15
andl $0x0, 0x38(%rsp)
pushq $0x3
popq %rax
movq %rax, 0x40(%rsp)
andl $0x0, 0x28(%rsp)
movq %rax, 0x30(%rsp)
movl $0x2700, %eax # imm = 0x2700
orl 0x70(%rsp), %eax
movups 0x28(%rsp), %xmm0
movups %xmm0, 0x10(%rsp)
movups 0x38(%rsp), %xmm0
movups %xmm0, (%rsp)
movl %eax, 0x20(%rsp)
callq 0x22d8e
movl %eax, %ebp
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1bbce
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| JS_DefinePropertyValue:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov rbx, r9
mov r14, r8
mov r15, rdi
and dword ptr [rsp+68h+var_30], 0
push 3
pop rax
mov qword ptr [rsp+68h+var_30+8], rax
and dword ptr [rsp+68h+var_40], 0
mov qword ptr [rsp+68h+var_40+8], rax
mov eax, 2700h
or eax, [rsp+68h+arg_0]
movups xmm0, [rsp+68h+var_40]
movups [rsp+68h+var_58], xmm0
movups xmm0, [rsp+68h+var_30]
movups [rsp+68h+var_68], xmm0
mov [rsp+68h+var_48], eax
call JS_DefineProperty
mov ebp, eax
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call JS_FreeValue
mov eax, ebp
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long JS_DefinePropertyValue(
long long a1,
long long a2,
long long a3,
long long a4,
_DWORD *a5,
long long a6,
double a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
int a15)
{
unsigned int v17; // ebp
_DWORD *v19; // [rsp+28h] [rbp-40h]
__m128 v20; // [rsp+38h] [rbp-30h]
v20.m128_i32[0] = 0;
v20.m128_u64[1] = 3LL;
LODWORD(v19) = 0;
v17 = JS_DefineProperty(
a1,
a2,
a3,
a4,
a5,
a6,
v20,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v20.m128_u64[0],
3u,
v19,
3u,
a15 | 0x2700u);
JS_FreeValue(a1, (long long)a5, a6);
return v17;
}
| JS_DefinePropertyValue:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV RBX,R9
MOV R14,R8
MOV R15,RDI
AND dword ptr [RSP + 0x38],0x0
PUSH 0x3
POP RAX
MOV qword ptr [RSP + 0x40],RAX
AND dword ptr [RSP + 0x28],0x0
MOV qword ptr [RSP + 0x30],RAX
MOV EAX,0x2700
OR EAX,dword ptr [RSP + 0x70]
MOVUPS XMM0,xmmword ptr [RSP + 0x28]
MOVUPS xmmword ptr [RSP + 0x10],XMM0
MOVUPS XMM0,xmmword ptr [RSP + 0x38]
MOVUPS xmmword ptr [RSP],XMM0
MOV dword ptr [RSP + 0x20],EAX
CALL 0x00122d8e
MOV EBP,EAX
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x0011bbce
MOV EAX,EBP
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 JS_DefinePropertyValue(int8 param_1)
{
int4 uVar1;
int8 in_R8;
int8 in_R9;
uVar1 = JS_DefineProperty();
JS_FreeValue(param_1,in_R8,in_R9);
return uVar1;
}
| |
55,133 | void CLI::OptionBase<CLI::OptionDefaults>::copy_to<CLI::Option>(CLI::Option*) const | MikePodsytnik[P]TCRtrie/build_O0/_deps/cli11-src/include/CLI/impl/Option_inl.hpp | void OptionBase<CRTP>::copy_to(T *other) const {
other->group(group_);
other->required(required_);
other->ignore_case(ignore_case_);
other->ignore_underscore(ignore_underscore_);
other->configurable(configurable_);
other->disable_flag_override(disable_flag_override_);
other->delimiter(delimiter_);
other->always_capture_default(always_capture_default_);
other->multi_option_policy(multi_option_policy_);
} | O0 | cpp | void CLI::OptionBase<CLI::OptionDefaults>::copy_to<CLI::Option>(CLI::Option*) const:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x30dd0
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movb 0x20(%rax), %al
andb $0x1, %al
movzbl %al, %esi
callq 0xfe00
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movb 0x21(%rax), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x30ec0
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movb 0x22(%rax), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x31060
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movb 0x23(%rax), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x280d0
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movb 0x24(%rax), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x31200
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movsbl 0x25(%rax), %esi
callq 0x31220
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movb 0x26(%rax), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x31240
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movsbl 0x27(%rax), %esi
callq 0x2b150
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _ZNK3CLI10OptionBaseINS_14OptionDefaultsEE7copy_toINS_6OptionEEEvPT_:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rsi, [rbp+var_8]
mov [rbp+var_18], rsi
mov rdi, [rbp+var_10]
call _ZN3CLI10OptionBaseINS_6OptionEE5groupERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::OptionBase<CLI::Option>::group(std::string const&)
mov rax, [rbp+var_18]
mov rdi, [rbp+var_10]
mov al, [rax+20h]
and al, 1
movzx esi, al
call _ZN3CLI10OptionBaseINS_6OptionEE8requiredEb; CLI::OptionBase<CLI::Option>::required(bool)
mov rax, [rbp+var_18]
mov rdi, [rbp+var_10]
mov al, [rax+21h]
and al, 1
movzx esi, al
call _ZN3CLI6Option11ignore_caseINS_3AppEEEPS0_b; CLI::Option::ignore_case<CLI::App>(bool)
mov rax, [rbp+var_18]
mov rdi, [rbp+var_10]
mov al, [rax+22h]
and al, 1
movzx esi, al
call _ZN3CLI6Option17ignore_underscoreINS_3AppEEEPS0_b; CLI::Option::ignore_underscore<CLI::App>(bool)
mov rax, [rbp+var_18]
mov rdi, [rbp+var_10]
mov al, [rax+23h]
and al, 1
movzx esi, al
call _ZN3CLI10OptionBaseINS_6OptionEE12configurableEb; CLI::OptionBase<CLI::Option>::configurable(bool)
mov rax, [rbp+var_18]
mov rdi, [rbp+var_10]; this
mov al, [rax+24h]
and al, 1
movzx esi, al; bool
call _ZN3CLI6Option21disable_flag_overrideEb; CLI::Option::disable_flag_override(bool)
mov rax, [rbp+var_18]
mov rdi, [rbp+var_10]
movsx esi, byte ptr [rax+25h]
call _ZN3CLI10OptionBaseINS_6OptionEE9delimiterEc; CLI::OptionBase<CLI::Option>::delimiter(char)
mov rax, [rbp+var_18]
mov rdi, [rbp+var_10]
mov al, [rax+26h]
and al, 1
movzx esi, al
call _ZN3CLI10OptionBaseINS_6OptionEE22always_capture_defaultEb; CLI::OptionBase<CLI::Option>::always_capture_default(bool)
mov rax, [rbp+var_18]
mov rdi, [rbp+var_10]
movsx esi, byte ptr [rax+27h]
call _ZN3CLI6Option19multi_option_policyENS_17MultiOptionPolicyE; CLI::Option::multi_option_policy(CLI::MultiOptionPolicy)
add rsp, 20h
pop rbp
retn
| long long CLI::OptionBase<CLI::OptionDefaults>::copy_to<CLI::Option>(_BYTE *a1, CLI::Option *a2)
{
CLI::OptionBase<CLI::Option>::group(a2);
CLI::OptionBase<CLI::Option>::required((long long)a2, a1[32] & 1);
CLI::Option::ignore_case<CLI::App>(a2, a1[33] & 1);
CLI::Option::ignore_underscore<CLI::App>(a2, a1[34] & 1);
CLI::OptionBase<CLI::Option>::configurable((long long)a2, a1[35] & 1);
CLI::Option::disable_flag_override(a2, a1[36] & 1);
CLI::OptionBase<CLI::Option>::delimiter(a2, (unsigned int)(char)a1[37]);
CLI::OptionBase<CLI::Option>::always_capture_default(a2, a1[38] & 1);
return CLI::Option::multi_option_policy((long long)a2, a1[39]);
}
| copy_to<CLI::Option>:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RSI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RSI
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00130dd0
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RBP + -0x10]
MOV AL,byte ptr [RAX + 0x20]
AND AL,0x1
MOVZX ESI,AL
CALL 0x0010fe00
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RBP + -0x10]
MOV AL,byte ptr [RAX + 0x21]
AND AL,0x1
MOVZX ESI,AL
CALL 0x00130ec0
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RBP + -0x10]
MOV AL,byte ptr [RAX + 0x22]
AND AL,0x1
MOVZX ESI,AL
CALL 0x00131060
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RBP + -0x10]
MOV AL,byte ptr [RAX + 0x23]
AND AL,0x1
MOVZX ESI,AL
CALL 0x001280d0
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RBP + -0x10]
MOV AL,byte ptr [RAX + 0x24]
AND AL,0x1
MOVZX ESI,AL
CALL 0x00131200
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RBP + -0x10]
MOVSX ESI,byte ptr [RAX + 0x25]
CALL 0x00131220
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RBP + -0x10]
MOV AL,byte ptr [RAX + 0x26]
AND AL,0x1
MOVZX ESI,AL
CALL 0x00131240
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RBP + -0x10]
MOVSX ESI,byte ptr [RAX + 0x27]
CALL 0x0012b150
ADD RSP,0x20
POP RBP
RET
|
/* void CLI::OptionBase<CLI::OptionDefaults>::copy_to<CLI::Option>(CLI::Option*) const */
void __thiscall
CLI::OptionBase<CLI::OptionDefaults>::copy_to<CLI::Option>
(OptionBase<CLI::OptionDefaults> *this,Option *param_1)
{
OptionBase<CLI::Option>::group((OptionBase<CLI::Option> *)param_1,(string *)this);
OptionBase<CLI::Option>::required((OptionBase<CLI::Option> *)param_1,(bool)((byte)this[0x20] & 1))
;
Option::ignore_case<CLI::App>(param_1,(bool)((byte)this[0x21] & 1));
Option::ignore_underscore<CLI::App>(param_1,(bool)((byte)this[0x22] & 1));
OptionBase<CLI::Option>::configurable
((OptionBase<CLI::Option> *)param_1,(bool)((byte)this[0x23] & 1));
Option::disable_flag_override(param_1,(bool)((byte)this[0x24] & 1));
OptionBase<CLI::Option>::delimiter((OptionBase<CLI::Option> *)param_1,(char)this[0x25]);
OptionBase<CLI::Option>::always_capture_default
((OptionBase<CLI::Option> *)param_1,(bool)((byte)this[0x26] & 1));
Option::multi_option_policy(param_1,(int)(char)this[0x27]);
return;
}
| |
55,134 | mthd_supported_buffer_type | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | my_bool mthd_supported_buffer_type(enum enum_field_types type)
{
switch (type) {
case MYSQL_TYPE_BIT:
case MYSQL_TYPE_BLOB:
case MYSQL_TYPE_DATE:
case MYSQL_TYPE_DATETIME:
case MYSQL_TYPE_DECIMAL:
case MYSQL_TYPE_DOUBLE:
case MYSQL_TYPE_FLOAT:
case MYSQL_TYPE_GEOMETRY:
case MYSQL_TYPE_INT24:
case MYSQL_TYPE_LONG:
case MYSQL_TYPE_LONG_BLOB:
case MYSQL_TYPE_LONGLONG:
case MYSQL_TYPE_MEDIUM_BLOB:
case MYSQL_TYPE_NEWDATE:
case MYSQL_TYPE_NEWDECIMAL:
case MYSQL_TYPE_NULL:
case MYSQL_TYPE_SHORT:
case MYSQL_TYPE_STRING:
case MYSQL_TYPE_JSON:
case MYSQL_TYPE_TIME:
case MYSQL_TYPE_TIMESTAMP:
case MYSQL_TYPE_TINY:
case MYSQL_TYPE_TINY_BLOB:
case MYSQL_TYPE_VAR_STRING:
case MYSQL_TYPE_YEAR:
return 1;
break;
default:
return 0;
break;
}
} | O0 | c | mthd_supported_buffer_type:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0xc(%rbp)
subl $0xf, %eax
jb 0x8a02c
jmp 0x8a004
movl -0xc(%rbp), %eax
subl $0x10, %eax
je 0x8a02c
jmp 0x8a00e
movl -0xc(%rbp), %eax
addl $0xffffff0b, %eax # imm = 0xFFFFFF0B
subl $0x2, %eax
jb 0x8a02c
jmp 0x8a01d
movl -0xc(%rbp), %eax
addl $0xffffff07, %eax # imm = 0xFFFFFF07
subl $0x6, %eax
ja 0x8a032
jmp 0x8a02c
movb $0x1, -0x1(%rbp)
jmp 0x8a036
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopl (%rax,%rax)
| mthd_supported_buffer_type:
push rbp
mov rbp, rsp
mov [rbp+var_8], edi
mov eax, [rbp+var_8]
mov [rbp+var_C], eax
sub eax, 0Fh
jb short loc_8A02C
jmp short $+2
loc_8A004:
mov eax, [rbp+var_C]
sub eax, 10h
jz short loc_8A02C
jmp short $+2
loc_8A00E:
mov eax, [rbp+var_C]
add eax, 0FFFFFF0Bh
sub eax, 2
jb short loc_8A02C
jmp short $+2
loc_8A01D:
mov eax, [rbp+var_C]
add eax, 0FFFFFF07h
sub eax, 6
ja short loc_8A032
jmp short $+2
loc_8A02C:
mov [rbp+var_1], 1
jmp short loc_8A036
loc_8A032:
mov [rbp+var_1], 0
loc_8A036:
mov al, [rbp+var_1]
pop rbp
retn
| bool mthd_supported_buffer_type(unsigned int a1)
{
return a1 < 0xF || a1 == 16 || a1 - 245 < 2 || a1 - 249 <= 6;
}
| mthd_supported_buffer_type:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x8],EDI
MOV EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0xc],EAX
SUB EAX,0xf
JC 0x0018a02c
JMP 0x0018a004
LAB_0018a004:
MOV EAX,dword ptr [RBP + -0xc]
SUB EAX,0x10
JZ 0x0018a02c
JMP 0x0018a00e
LAB_0018a00e:
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0xffffff0b
SUB EAX,0x2
JC 0x0018a02c
JMP 0x0018a01d
LAB_0018a01d:
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0xffffff07
SUB EAX,0x6
JA 0x0018a032
JMP 0x0018a02c
LAB_0018a02c:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0018a036
LAB_0018a032:
MOV byte ptr [RBP + -0x1],0x0
LAB_0018a036:
MOV AL,byte ptr [RBP + -0x1]
POP RBP
RET
|
int8 mthd_supported_buffer_type(uint param_1)
{
ulong uVar1;
int1 local_9;
uVar1 = (ulong)(param_1 - 0xf);
if ((((param_1 < 0xf) || (uVar1 = (ulong)(param_1 - 0x10), param_1 - 0x10 == 0)) ||
(uVar1 = (ulong)(param_1 - 0xf7), param_1 - 0xf5 < 2)) ||
(uVar1 = (ulong)(param_1 - 0xff), param_1 - 0xf9 < 6 || param_1 - 0xff == 0)) {
local_9 = 1;
}
else {
local_9 = 0;
}
return CONCAT71((int7)(uVar1 >> 8),local_9);
}
| |
55,135 | mthd_supported_buffer_type | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | my_bool mthd_supported_buffer_type(enum enum_field_types type)
{
switch (type) {
case MYSQL_TYPE_BIT:
case MYSQL_TYPE_BLOB:
case MYSQL_TYPE_DATE:
case MYSQL_TYPE_DATETIME:
case MYSQL_TYPE_DECIMAL:
case MYSQL_TYPE_DOUBLE:
case MYSQL_TYPE_FLOAT:
case MYSQL_TYPE_GEOMETRY:
case MYSQL_TYPE_INT24:
case MYSQL_TYPE_LONG:
case MYSQL_TYPE_LONG_BLOB:
case MYSQL_TYPE_LONGLONG:
case MYSQL_TYPE_MEDIUM_BLOB:
case MYSQL_TYPE_NEWDATE:
case MYSQL_TYPE_NEWDECIMAL:
case MYSQL_TYPE_NULL:
case MYSQL_TYPE_SHORT:
case MYSQL_TYPE_STRING:
case MYSQL_TYPE_JSON:
case MYSQL_TYPE_TIME:
case MYSQL_TYPE_TIMESTAMP:
case MYSQL_TYPE_TINY:
case MYSQL_TYPE_TINY_BLOB:
case MYSQL_TYPE_VAR_STRING:
case MYSQL_TYPE_YEAR:
return 1;
break;
default:
return 0;
break;
}
} | O3 | c | mthd_supported_buffer_type:
pushq %rbp
movq %rsp, %rbp
movb $0x1, %al
cmpl $0x10, %edi
ja 0x7b9ee
cmpl $0xf, %edi
jne 0x7ba03
addl $0xffffff0b, %edi # imm = 0xFFFFFF0B
cmpl $0xa, %edi
ja 0x7ba05
movl $0x7f3, %ecx # imm = 0x7F3
btl %edi, %ecx
jae 0x7ba05
popq %rbp
retq
xorl %eax, %eax
jmp 0x7ba03
| mthd_supported_buffer_type:
push rbp
mov rbp, rsp
mov al, 1
cmp edi, 10h
ja short loc_7B9EE
cmp edi, 0Fh
jnz short loc_7BA03
loc_7B9EE:
add edi, 0FFFFFF0Bh
cmp edi, 0Ah
ja short loc_7BA05
mov ecx, 7F3h
bt ecx, edi
jnb short loc_7BA05
loc_7BA03:
pop rbp
retn
loc_7BA05:
xor eax, eax
jmp short loc_7BA03
| char mthd_supported_buffer_type(unsigned int a1)
{
char result; // al
unsigned int v2; // edi
int v3; // ecx
result = 1;
if ( a1 > 0x10 || a1 == 15 )
{
v2 = a1 - 245;
if ( v2 > 0xA )
return 0;
v3 = 2035;
if ( !_bittest(&v3, v2) )
return 0;
}
return result;
}
| mthd_supported_buffer_type:
PUSH RBP
MOV RBP,RSP
MOV AL,0x1
CMP EDI,0x10
JA 0x0017b9ee
CMP EDI,0xf
JNZ 0x0017ba03
LAB_0017b9ee:
ADD EDI,0xffffff0b
CMP EDI,0xa
JA 0x0017ba05
MOV ECX,0x7f3
BT ECX,EDI
JNC 0x0017ba05
LAB_0017ba03:
POP RBP
RET
LAB_0017ba05:
XOR EAX,EAX
JMP 0x0017ba03
|
int8 mthd_supported_buffer_type(uint param_1)
{
int8 uVar1;
uVar1 = 1;
if (((0x10 < param_1) || (param_1 == 0xf)) &&
((10 < param_1 - 0xf5 || ((0x7f3U >> (param_1 - 0xf5 & 0x1f) & 1) == 0)))) {
uVar1 = 0;
}
return uVar1;
}
| |
55,136 | my_like_range_win1250ch | eloqsql/strings/ctype-win1250ch.c | static my_bool
my_like_range_win1250ch(CHARSET_INFO *cs __attribute__((unused)),
const char *ptr, size_t ptr_length,
pbool escape, pbool w_one, pbool w_many,
size_t res_length,
char *min_str, char *max_str,
size_t *min_length, size_t *max_length)
{
int only_min_found= 1;
const char *end = ptr + ptr_length;
char *min_org = min_str;
char *min_end = min_str + res_length;
/* return 1; */
for (; ptr != end && min_str != min_end ; ptr++)
{
if (*ptr == escape && ptr+1 != end)
ptr++; /* Skip escape */
else if (*ptr == w_one || *ptr == w_many) /* '_' or '%' in SQL */
break;
*min_str= like_range_prefix_min_win1250ch[(uint) (uchar) (*ptr)];
if (*min_str != min_sort_char)
only_min_found= 0;
min_str++;
*max_str++= like_range_prefix_max_win1250ch[(uint) (uchar) (*ptr)];
}
if (cs->state & MY_CS_BINSORT)
*min_length= (size_t) (min_str - min_org);
else
{
/* 'a\0\0... is the smallest possible string */
*min_length= res_length;
}
/* a\ff\ff... is the biggest possible string */
*max_length= res_length;
while (min_str != min_end)
{
*min_str++ = min_sort_char;
*max_str++ = max_sort_char;
}
return (only_min_found);
} | O0 | c | my_like_range_win1250ch:
pushq %rbp
movq %rsp, %rbp
movl %r8d, -0x50(%rbp)
movl %ecx, %eax
movl -0x50(%rbp), %ecx
movl %eax, -0x4c(%rbp)
movq %rdx, %rax
movl -0x4c(%rbp), %edx
movq %rax, -0x48(%rbp)
movq %rsi, %rax
movq -0x48(%rbp), %rsi
movq %rax, -0x40(%rbp)
movq %rdi, %r8
movq -0x40(%rbp), %rdi
movb %r9b, %al
movq 0x30(%rbp), %r9
movq 0x28(%rbp), %r9
movq 0x20(%rbp), %r9
movq 0x18(%rbp), %r9
movq 0x10(%rbp), %r9
movq %r8, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb %dl, -0x19(%rbp)
movb %cl, -0x1a(%rbp)
movb %al, -0x1b(%rbp)
movl $0x1, -0x20(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq 0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq 0x18(%rbp), %rax
addq 0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x51(%rbp)
je 0xca30c
movq 0x18(%rbp), %rax
cmpq -0x38(%rbp), %rax
setne %al
movb %al, -0x51(%rbp)
movb -0x51(%rbp), %al
testb $0x1, %al
jne 0xca318
jmp 0xca3d6
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
movsbl -0x19(%rbp), %ecx
cmpl %ecx, %eax
jne 0xca343
movq -0x10(%rbp), %rax
addq $0x1, %rax
cmpq -0x28(%rbp), %rax
je 0xca343
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0xca365
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
movsbl -0x1a(%rbp), %ecx
cmpl %ecx, %eax
je 0xca361
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
movsbl -0x1b(%rbp), %ecx
cmpl %ecx, %eax
jne 0xca363
jmp 0xca3d6
jmp 0xca365
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x14deb9(%rip), %rax # 0x218230
movb (%rax,%rcx), %cl
movq 0x18(%rbp), %rax
movb %cl, (%rax)
movq 0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
je 0xca393
movl $0x0, -0x20(%rbp)
movq 0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x3253ff(%rip), %rax # 0x3ef7b0
movb (%rax,%rcx), %cl
movq 0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x20(%rbp)
movb %cl, (%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0xca2ef
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0xca3f9
movq 0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
subq %rax, %rcx
movq 0x28(%rbp), %rax
movq %rcx, (%rax)
jmp 0xca404
movq 0x10(%rbp), %rcx
movq 0x28(%rbp), %rax
movq %rcx, (%rax)
movq 0x10(%rbp), %rcx
movq 0x30(%rbp), %rax
movq %rcx, (%rax)
movq 0x18(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0xca43f
movq 0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rbp)
movb $0x20, (%rax)
movq 0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x20(%rbp)
movb $-0x1, (%rax)
jmp 0xca40f
movl -0x20(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
| my_like_range_win1250ch:
push rbp
mov rbp, rsp
mov [rbp+var_50], r8d
mov eax, ecx
mov ecx, [rbp+var_50]
mov [rbp+var_4C], eax
mov rax, rdx
mov edx, [rbp+var_4C]
mov [rbp+var_48], rax
mov rax, rsi
mov rsi, [rbp+var_48]
mov [rbp+var_40], rax
mov r8, rdi
mov rdi, [rbp+var_40]
mov al, r9b
mov r9, [rbp+arg_20]
mov r9, [rbp+arg_18]
mov r9, [rbp+arg_10]
mov r9, [rbp+arg_8]
mov r9, [rbp+arg_0]
mov [rbp+var_8], r8
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_19], dl
mov [rbp+var_1A], cl
mov [rbp+var_1B], al
mov [rbp+var_20], 1
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_28], rax
mov rax, [rbp+arg_8]
mov [rbp+var_30], rax
mov rax, [rbp+arg_8]
add rax, [rbp+arg_0]
mov [rbp+var_38], rax
loc_CA2EF:
mov rcx, [rbp+var_10]
xor eax, eax
cmp rcx, [rbp+var_28]
mov [rbp+var_51], al
jz short loc_CA30C
mov rax, [rbp+arg_8]
cmp rax, [rbp+var_38]
setnz al
mov [rbp+var_51], al
loc_CA30C:
mov al, [rbp+var_51]
test al, 1
jnz short loc_CA318
jmp loc_CA3D6
loc_CA318:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
movsx ecx, [rbp+var_19]
cmp eax, ecx
jnz short loc_CA343
mov rax, [rbp+var_10]
add rax, 1
cmp rax, [rbp+var_28]
jz short loc_CA343
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_CA365
loc_CA343:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
movsx ecx, [rbp+var_1A]
cmp eax, ecx
jz short loc_CA361
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
movsx ecx, [rbp+var_1B]
cmp eax, ecx
jnz short loc_CA363
loc_CA361:
jmp short loc_CA3D6
loc_CA363:
jmp short $+2
loc_CA365:
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
mov eax, eax
mov ecx, eax
lea rax, like_range_prefix_min_win1250ch
mov cl, [rax+rcx]
mov rax, [rbp+arg_8]
mov [rax], cl
mov rax, [rbp+arg_8]
movsx eax, byte ptr [rax]
cmp eax, 20h ; ' '
jz short loc_CA393
mov [rbp+var_20], 0
loc_CA393:
mov rax, [rbp+arg_8]
add rax, 1
mov [rbp+arg_8], rax
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
mov eax, eax
mov ecx, eax
lea rax, like_range_prefix_max_win1250ch
mov cl, [rax+rcx]
mov rax, [rbp+arg_10]
mov rdx, rax
add rdx, 1
mov [rbp+arg_10], rdx
mov [rax], cl
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp loc_CA2EF
loc_CA3D6:
mov rax, [rbp+var_8]
mov eax, [rax+0Ch]
and eax, 10h
cmp eax, 0
jz short loc_CA3F9
mov rcx, [rbp+arg_8]
mov rax, [rbp+var_30]
sub rcx, rax
mov rax, [rbp+arg_18]
mov [rax], rcx
jmp short loc_CA404
loc_CA3F9:
mov rcx, [rbp+arg_0]
mov rax, [rbp+arg_18]
mov [rax], rcx
loc_CA404:
mov rcx, [rbp+arg_0]
mov rax, [rbp+arg_20]
mov [rax], rcx
loc_CA40F:
mov rax, [rbp+arg_8]
cmp rax, [rbp+var_38]
jz short loc_CA43F
mov rax, [rbp+arg_8]
mov rcx, rax
add rcx, 1
mov [rbp+arg_8], rcx
mov byte ptr [rax], 20h ; ' '
mov rax, [rbp+arg_10]
mov rcx, rax
add rcx, 1
mov [rbp+arg_10], rcx
mov byte ptr [rax], 0FFh
jmp short loc_CA40F
loc_CA43F:
mov eax, [rbp+var_20]
pop rbp
retn
| long long my_like_range_win1250ch(
long long a1,
unsigned __int8 *a2,
long long a3,
char a4,
char a5,
char a6,
long long a7,
_BYTE *a8,
_BYTE *a9,
_QWORD *a10,
_QWORD *a11)
{
_BYTE *v11; // rax
_BYTE *v12; // rax
_BYTE *v13; // rax
bool v15; // [rsp+1h] [rbp-51h]
_BYTE *v16; // [rsp+1Ah] [rbp-38h]
_BYTE *v17; // [rsp+22h] [rbp-30h]
char *v18; // [rsp+2Ah] [rbp-28h]
unsigned int v19; // [rsp+32h] [rbp-20h]
unsigned __int8 *v20; // [rsp+42h] [rbp-10h]
v20 = a2;
v19 = 1;
v18 = (char *)&a2[a3];
v17 = a8;
v16 = &a8[a7];
while ( 1 )
{
v15 = 0;
if ( v20 != (unsigned __int8 *)v18 )
v15 = a8 != v16;
if ( !v15 )
break;
if ( (char)*v20 != a4 || v20 + 1 == (unsigned __int8 *)v18 )
{
if ( (char)*v20 == a5 || (char)*v20 == a6 )
break;
}
else
{
++v20;
}
*a8 = like_range_prefix_min_win1250ch[*v20];
if ( *a8 != 32 )
v19 = 0;
++a8;
v11 = a9++;
*v11 = like_range_prefix_max_win1250ch[*v20++];
}
if ( (*(_DWORD *)(a1 + 12) & 0x10) != 0 )
*a10 = a8 - v17;
else
*a10 = a7;
*a11 = a7;
while ( a8 != v16 )
{
v12 = a8++;
*v12 = 32;
v13 = a9++;
*v13 = -1;
}
return v19;
}
| my_like_range_win1250ch:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x50],R8D
MOV EAX,ECX
MOV ECX,dword ptr [RBP + -0x50]
MOV dword ptr [RBP + -0x4c],EAX
MOV RAX,RDX
MOV EDX,dword ptr [RBP + -0x4c]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,RSI
MOV RSI,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x40],RAX
MOV R8,RDI
MOV RDI,qword ptr [RBP + -0x40]
MOV AL,R9B
MOV R9,qword ptr [RBP + 0x30]
MOV R9,qword ptr [RBP + 0x28]
MOV R9,qword ptr [RBP + 0x20]
MOV R9,qword ptr [RBP + 0x18]
MOV R9,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],R8
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV byte ptr [RBP + -0x19],DL
MOV byte ptr [RBP + -0x1a],CL
MOV byte ptr [RBP + -0x1b],AL
MOV dword ptr [RBP + -0x20],0x1
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + 0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + 0x18]
ADD RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x38],RAX
LAB_001ca2ef:
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x28]
MOV byte ptr [RBP + -0x51],AL
JZ 0x001ca30c
MOV RAX,qword ptr [RBP + 0x18]
CMP RAX,qword ptr [RBP + -0x38]
SETNZ AL
MOV byte ptr [RBP + -0x51],AL
LAB_001ca30c:
MOV AL,byte ptr [RBP + -0x51]
TEST AL,0x1
JNZ 0x001ca318
JMP 0x001ca3d6
LAB_001ca318:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
MOVSX ECX,byte ptr [RBP + -0x19]
CMP EAX,ECX
JNZ 0x001ca343
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
CMP RAX,qword ptr [RBP + -0x28]
JZ 0x001ca343
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001ca365
LAB_001ca343:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
MOVSX ECX,byte ptr [RBP + -0x1a]
CMP EAX,ECX
JZ 0x001ca361
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
MOVSX ECX,byte ptr [RBP + -0x1b]
CMP EAX,ECX
JNZ 0x001ca363
LAB_001ca361:
JMP 0x001ca3d6
LAB_001ca363:
JMP 0x001ca365
LAB_001ca365:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
MOV EAX,EAX
MOV ECX,EAX
LEA RAX,[0x318230]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + 0x18]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + 0x18]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x20
JZ 0x001ca393
MOV dword ptr [RBP + -0x20],0x0
LAB_001ca393:
MOV RAX,qword ptr [RBP + 0x18]
ADD RAX,0x1
MOV qword ptr [RBP + 0x18],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
MOV EAX,EAX
MOV ECX,EAX
LEA RAX,[0x4ef7b0]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + 0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + 0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001ca2ef
LAB_001ca3d6:
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,0x10
CMP EAX,0x0
JZ 0x001ca3f9
MOV RCX,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + -0x30]
SUB RCX,RAX
MOV RAX,qword ptr [RBP + 0x28]
MOV qword ptr [RAX],RCX
JMP 0x001ca404
LAB_001ca3f9:
MOV RCX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + 0x28]
MOV qword ptr [RAX],RCX
LAB_001ca404:
MOV RCX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + 0x30]
MOV qword ptr [RAX],RCX
LAB_001ca40f:
MOV RAX,qword ptr [RBP + 0x18]
CMP RAX,qword ptr [RBP + -0x38]
JZ 0x001ca43f
MOV RAX,qword ptr [RBP + 0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + 0x18],RCX
MOV byte ptr [RAX],0x20
MOV RAX,qword ptr [RBP + 0x20]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + 0x20],RCX
MOV byte ptr [RAX],0xff
JMP 0x001ca40f
LAB_001ca43f:
MOV EAX,dword ptr [RBP + -0x20]
POP RBP
RET
|
int4
my_like_range_win1250ch
(long param_1,byte *param_2,long param_3,byte param_4,byte param_5,byte param_6,
long param_7,char *param_8,int1 *param_9,long *param_10,long *param_11)
{
char *pcVar1;
char *pcVar2;
int4 local_28;
byte *local_18;
pcVar1 = param_8;
local_28 = 1;
pcVar2 = param_8 + param_7;
for (local_18 = param_2; local_18 != param_2 + param_3 && param_8 != pcVar2;
local_18 = local_18 + 1) {
if ((*local_18 == param_4) && (local_18 + 1 != param_2 + param_3)) {
local_18 = local_18 + 1;
}
else if ((*local_18 == param_5) || (*local_18 == param_6)) break;
*param_8 = like_range_prefix_min_win1250ch[*local_18];
if (*param_8 != ' ') {
local_28 = 0;
}
param_8 = param_8 + 1;
*param_9 = like_range_prefix_max_win1250ch[*local_18];
param_9 = param_9 + 1;
}
if ((*(uint *)(param_1 + 0xc) & 0x10) == 0) {
*param_10 = param_7;
}
else {
*param_10 = (long)param_8 - (long)pcVar1;
}
*param_11 = param_7;
while (param_8 != pcVar2) {
*param_8 = ' ';
*param_9 = 0xff;
param_8 = param_8 + 1;
param_9 = param_9 + 1;
}
return local_28;
}
| |
55,137 | change_partitioned_key_cache_param | eloqsql/mysys/mf_keycache.c | static
void change_partitioned_key_cache_param(PARTITIONED_KEY_CACHE_CB *keycache,
uint division_limit,
uint age_threshold)
{
uint i;
uint partitions= keycache->partitions;
DBUG_ENTER("partitioned_change_key_cache_param");
for (i= 0; i < partitions; i++)
{
change_simple_key_cache_param(keycache->partition_array[i], division_limit,
age_threshold);
}
DBUG_VOID_RETURN;
} | O0 | c | change_partitioned_key_cache_param:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x18(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jae 0xea040
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
callq 0xe8010
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xea013
jmp 0xea042
jmp 0xea044
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| change_partitioned_key_cache_param:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
mov rax, [rbp+var_8]
mov eax, [rax+1Ch]
mov [rbp+var_18], eax
mov [rbp+var_14], 0
loc_EA013:
mov eax, [rbp+var_14]
cmp eax, [rbp+var_18]
jnb short loc_EA040
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov ecx, [rbp+var_14]
mov rdi, [rax+rcx*8]
mov esi, [rbp+var_C]
mov edx, [rbp+var_10]
call change_simple_key_cache_param
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp short loc_EA013
loc_EA040:
jmp short $+2
loc_EA042:
jmp short $+2
loc_EA044:
add rsp, 20h
pop rbp
retn
| long long change_partitioned_key_cache_param(long long a1, int a2, int a3)
{
long long result; // rax
unsigned int v4; // [rsp+8h] [rbp-18h]
unsigned int i; // [rsp+Ch] [rbp-14h]
v4 = *(_DWORD *)(a1 + 28);
for ( i = 0; ; ++i )
{
result = i;
if ( i >= v4 )
break;
change_simple_key_cache_param(*(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL * i), a2, a3);
}
return result;
}
| change_partitioned_key_cache_param:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x1c]
MOV dword ptr [RBP + -0x18],EAX
MOV dword ptr [RBP + -0x14],0x0
LAB_001ea013:
MOV EAX,dword ptr [RBP + -0x14]
CMP EAX,dword ptr [RBP + -0x18]
JNC 0x001ea040
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x14]
MOV RDI,qword ptr [RAX + RCX*0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV EDX,dword ptr [RBP + -0x10]
CALL 0x001e8010
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x001ea013
LAB_001ea040:
JMP 0x001ea042
LAB_001ea042:
JMP 0x001ea044
LAB_001ea044:
ADD RSP,0x20
POP RBP
RET
|
void change_partitioned_key_cache_param(long param_1,int4 param_2,int4 param_3)
{
uint uVar1;
int4 local_1c;
uVar1 = *(uint *)(param_1 + 0x1c);
for (local_1c = 0; local_1c < uVar1; local_1c = local_1c + 1) {
change_simple_key_cache_param
(*(int8 *)(*(long *)(param_1 + 8) + (ulong)local_1c * 8),param_2,param_3);
}
return;
}
| |
55,138 | minja::Parser::parseStringConcat() | llama.cpp/common/minja/minja.hpp | std::shared_ptr<Expression> parseStringConcat() {
auto left = parseMathPow();
if (!left) throw std::runtime_error("Expected left side of 'string concat' expression");
static std::regex concat_tok(R"(~(?!\}))");
if (!consumeToken(concat_tok).empty()) {
auto right = parseLogicalAnd();
if (!right) throw std::runtime_error("Expected right side of 'string concat' expression");
left = std::make_shared<BinaryOpExpr>(get_location(), std::move(left), std::move(right), BinaryOpExpr::Op::StrConcat);
}
return left;
} | O3 | cpp | minja::Parser::parseStringConcat():
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0xe18e8
cmpq $0x0, (%rbx)
je 0xe17c6
leaq 0x81ea7(%rip), %rax # 0x163538
movb (%rax), %al
testb %al, %al
je 0xe17fd
leaq 0x81e76(%rip), %rdx # 0x163518
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0xdedb2
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
movq -0x8(%rax), %r15
cmpq %rax, %rdi
je 0xe16d3
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x20180
testq %r15, %r15
je 0xe17b5
movq %rsp, %rdi
movq %r14, %rsi
callq 0xe049e
cmpq $0x0, (%rsp)
je 0xe1854
movq (%r14), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0xe171d
movq 0x80889(%rip), %rcx # 0x161f98
cmpb $0x0, (%rcx)
je 0xe1719
incl 0x8(%rax)
jmp 0xe171d
lock
incl 0x8(%rax)
leaq 0x18(%rsp), %r15
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
movq %rax, 0x8(%r15)
movl $0x58, %edi
callq 0x20210
movq %rax, %r12
leaq 0x38(%rsp), %r14
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%r12)
leaq 0x7f7ba(%rip), %rax # 0x160f10
addq $0x10, %rax
movq %rax, (%r12)
movq %r12, %r13
addq $0x10, %r13
leaq 0x10(%rsp), %rsi
movq %rsp, %rcx
movq %r13, %rdi
movq %rbx, %rdx
xorl %r8d, %r8d
callq 0xec4ca
leaq 0x48(%rsp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%r14)
movups (%rbx), %xmm0
movq %r13, (%rbx)
movq %r12, 0x8(%rbx)
movaps %xmm0, -0x8(%rdi)
callq 0x70a5a
movq %r14, %rdi
callq 0x70a5a
movq %r15, %rdi
callq 0x70a5a
leaq 0x8(%rsp), %rdi
callq 0x70a5a
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x20650
movq %rax, %r15
leaq 0x3f893(%rip), %rsi # 0x12106d
movq %rax, %rdi
callq 0x20430
movq 0x807d7(%rip), %rsi # 0x161fc0
movq 0x80790(%rip), %rdx # 0x161f80
movq %r15, %rdi
callq 0x20a50
jmp 0xe1886
leaq 0x81d34(%rip), %rdi # 0x163538
callq 0x205a0
testl %eax, %eax
je 0xe169b
leaq 0x81d00(%rip), %rdi # 0x163518
leaq 0x3f87f(%rip), %rsi # 0x12109e
movl $0x10, %edx
callq 0x66374
leaq -0x7b410(%rip), %rdi # 0x66420
leaq 0x81ce1(%rip), %rsi # 0x163518
leaq 0x8123a(%rip), %rdx # 0x162a78
callq 0x20ed0
leaq 0x81cee(%rip), %rdi # 0x163538
callq 0x20960
jmp 0xe169b
movl $0x10, %edi
callq 0x20650
movq %rax, %r15
leaq 0x3f83e(%rip), %rsi # 0x1210a6
movq %rax, %rdi
callq 0x20430
movq 0x80749(%rip), %rsi # 0x161fc0
movq 0x80702(%rip), %rdx # 0x161f80
movq %r15, %rdi
callq 0x20a50
movq %rax, %r14
leaq 0x81ca8(%rip), %rdi # 0x163538
callq 0x206d0
jmp 0xe18d4
movq %rax, %r14
jmp 0xe18c3
movq %rax, %r14
movq %r15, %rdi
callq 0x20ef0
jmp 0xe18c3
jmp 0xe18d1
movq %rax, %r14
movq %r15, %rdi
callq 0x20ef0
jmp 0xe18d4
movq %rax, %r14
movq %r15, %rdi
callq 0x70a5a
leaq 0x8(%rsp), %rdi
callq 0x70a5a
jmp 0xe18d4
jmp 0xe18d1
movq %rax, %r14
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x70a5a
movq %r14, %rdi
callq 0x20af0
| _ZN5minja6Parser17parseStringConcatEv:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 50h
mov r14, rsi
mov rbx, rdi
call _ZN5minja6Parser12parseMathPowEv; minja::Parser::parseMathPow(void)
cmp qword ptr [rbx], 0
jz loc_E17C6
lea rax, _ZGVZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; `guard variable for'minja::Parser::parseStringConcat(void)::concat_tok
mov al, [rax]
test al, al
jz loc_E17FD
loc_E169B:
lea rdx, _ZZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; int
lea rdi, [rsp+78h+var_68]; int
mov rsi, r14; int
mov ecx, 1; int
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea rax, [rsp+78h+var_58]
mov rdi, [rax-10h]; void *
mov r15, [rax-8]
cmp rdi, rax
jz short loc_E16D3
mov rsi, [rsp+78h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E16D3:
test r15, r15
jz loc_E17B5
mov rdi, rsp; this
mov rsi, r14
call _ZN5minja6Parser15parseLogicalAndEv; minja::Parser::parseLogicalAnd(void)
cmp [rsp+78h+var_78], 0
jz loc_E1854
mov rax, [r14]
mov qword ptr [rsp+78h+var_68], rax
mov rax, [r14+8]
mov [rsp+78h+var_60], rax
test rax, rax
jz short loc_E171D
mov rcx, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rcx], 0
jz short loc_E1719
inc dword ptr [rax+8]
jmp short loc_E171D
loc_E1719:
lock inc dword ptr [rax+8]
loc_E171D:
lea r15, [rsp+78h+var_60]
mov rax, [r14+20h]
sub rax, [r14+10h]
mov [r15+8], rax
mov edi, 58h ; 'X'; unsigned __int64
call __Znwm; operator new(ulong)
mov r12, rax
lea r14, [rsp+78h+var_40]
mov rax, 100000001h
mov [r12+8], rax
lea rax, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja12BinaryOpExprESaIvELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<void>,(__gnu_cxx::_Lock_policy)2>
add rax, 10h
mov [r12], rax
mov r13, r12
add r13, 10h
lea rsi, [rsp+78h+var_68]
mov rcx, rsp
mov rdi, r13
mov rdx, rbx
xor r8d, r8d
call _ZN5minja12BinaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_NS0_2OpE; minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&,std::shared_ptr<minja::Expression> &&,std::shared_ptr<minja::Expression> &,minja::BinaryOpExpr::Op)
lea rdi, [rsp+78h+var_30]
xorps xmm0, xmm0
movaps xmmword ptr [r14-8], xmm0
movups xmm0, xmmword ptr [rbx]
mov [rbx], r13
mov [rbx+8], r12
movaps xmmword ptr [rdi-8], xmm0
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r14
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r15
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+78h+var_70]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_E17B5:
mov rax, rbx
add rsp, 50h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_E17C6:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedLeftSi_2; "Expected left side of 'string concat' e"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
jmp loc_E1886
loc_E17FD:
lea rdi, _ZGVZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_E169B
lea rdi, _ZZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; minja::Parser::parseStringConcat(void)::concat_tok
lea rsi, asc_12109E; "~(?!\\})"
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, _ZZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_E169B
loc_E1854:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedRightS_2; "Expected right side of 'string concat' "...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
loc_E1886:
mov r14, rax
lea rdi, _ZGVZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_E18D4
mov r14, rax
jmp short loc_E18C3
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_E18C3
jmp short loc_E18D1
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_E18D4
mov r14, rax
mov rdi, r15
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_E18C3:
lea rdi, [rsp+78h+var_70]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_E18D4
jmp short $+2
loc_E18D1:
mov r14, rax
loc_E18D4:
add rbx, 8
mov rdi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r14
call __Unwind_Resume
| minja::Parser * minja::Parser::parseStringConcat(minja::Parser *this, long long *a2)
{
volatile signed __int32 *v2; // r15
volatile signed __int32 *v3; // rax
_QWORD *v4; // r12
__int128 v5; // xmm0
std::runtime_error *exception; // r15
std::runtime_error *v8; // r15
long long v9; // [rsp+0h] [rbp-78h] BYREF
volatile signed __int32 *v10; // [rsp+8h] [rbp-70h] BYREF
int v11[2]; // [rsp+10h] [rbp-68h] BYREF
volatile signed __int32 *v12; // [rsp+18h] [rbp-60h] BYREF
long long v13; // [rsp+20h] [rbp-58h] BYREF
__int128 v14; // [rsp+30h] [rbp-48h] BYREF
__int128 v15; // [rsp+40h] [rbp-38h] BYREF
minja::Parser::parseMathPow(this);
if ( !*(_QWORD *)this )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected left side of 'string concat' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( !(_BYTE)`guard variable for'minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11],
(long long)"~(?!\\})",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11]);
}
minja::Parser::consumeToken(
v11,
(long long)a2,
(long long)&minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11],
1u);
v2 = v12;
if ( *(long long **)v11 != &v13 )
operator delete(*(void **)v11, v13 + 1);
if ( v2 )
{
minja::Parser::parseLogicalAnd((minja::Parser *)&v9, a2);
if ( !v9 )
{
v8 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v8, "Expected right side of 'string concat' expression");
__cxa_throw(
v8,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
*(_QWORD *)v11 = *a2;
v3 = (volatile signed __int32 *)a2[1];
v12 = v3;
if ( v3 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v3 + 2);
else
_InterlockedIncrement(v3 + 2);
}
v13 = a2[4] - a2[2];
v4 = (_QWORD *)operator new(0x58uLL);
v4[1] = 0x100000001LL;
*v4 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<void>,(__gnu_cxx::_Lock_policy)2>
+ 2;
minja::BinaryOpExpr::BinaryOpExpr(v4 + 2, v11, this, &v9, 0LL);
v14 = 0LL;
v5 = *(_OWORD *)this;
*(_QWORD *)this = v4 + 2;
*((_QWORD *)this + 1) = v4;
v15 = v5;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v15 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v14 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v12);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v10);
}
return this;
}
| parseStringConcat:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x50
MOV R14,RSI
MOV RBX,RDI
CALL 0x001e18e8
CMP qword ptr [RBX],0x0
JZ 0x001e17c6
LEA RAX,[0x263538]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x001e17fd
LAB_001e169b:
LEA RDX,[0x263518]
LEA RDI,[RSP + 0x10]
MOV RSI,R14
MOV ECX,0x1
CALL 0x001dedb2
LEA RAX,[RSP + 0x20]
MOV RDI,qword ptr [RAX + -0x10]
MOV R15,qword ptr [RAX + -0x8]
CMP RDI,RAX
JZ 0x001e16d3
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x00120180
LAB_001e16d3:
TEST R15,R15
JZ 0x001e17b5
LAB_001e16dc:
MOV RDI,RSP
MOV RSI,R14
CALL 0x001e049e
CMP qword ptr [RSP],0x0
JZ 0x001e1854
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x18],RAX
TEST RAX,RAX
JZ 0x001e171d
MOV RCX,qword ptr [0x00261f98]
CMP byte ptr [RCX],0x0
JZ 0x001e1719
INC dword ptr [RAX + 0x8]
JMP 0x001e171d
LAB_001e1719:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001e171d:
LEA R15,[RSP + 0x18]
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
MOV qword ptr [R15 + 0x8],RAX
LAB_001e172e:
MOV EDI,0x58
CALL 0x00120210
LAB_001e1738:
MOV R12,RAX
LEA R14,[RSP + 0x38]
MOV RAX,0x100000001
MOV qword ptr [R12 + 0x8],RAX
LEA RAX,[0x260f10]
ADD RAX,0x10
MOV qword ptr [R12],RAX
MOV R13,R12
ADD R13,0x10
LEA RSI,[RSP + 0x10]
MOV RCX,RSP
MOV RDI,R13
MOV RDX,RBX
XOR R8D,R8D
CALL 0x001ec4ca
LEA RDI,[RSP + 0x48]
XORPS XMM0,XMM0
MOVAPS xmmword ptr [R14 + -0x8],XMM0
MOVUPS XMM0,xmmword ptr [RBX]
MOV qword ptr [RBX],R13
MOV qword ptr [RBX + 0x8],R12
MOVAPS xmmword ptr [RDI + -0x8],XMM0
CALL 0x00170a5a
MOV RDI,R14
CALL 0x00170a5a
MOV RDI,R15
CALL 0x00170a5a
LEA RDI,[RSP + 0x8]
CALL 0x00170a5a
LAB_001e17b5:
MOV RAX,RBX
ADD RSP,0x50
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_001e17c6:
MOV EDI,0x10
CALL 0x00120650
MOV R15,RAX
LAB_001e17d3:
LEA RSI,[0x22106d]
MOV RDI,RAX
CALL 0x00120430
LAB_001e17e2:
MOV RSI,qword ptr [0x00261fc0]
MOV RDX,qword ptr [0x00261f80]
MOV RDI,R15
CALL 0x00120a50
LAB_001e17fd:
LEA RDI,[0x263538]
CALL 0x001205a0
TEST EAX,EAX
JZ 0x001e169b
LAB_001e1811:
LEA RDI,[0x263518]
LEA RSI,[0x22109e]
MOV EDX,0x10
CALL 0x00166374
LAB_001e1829:
LEA RDI,[0x166420]
LEA RSI,[0x263518]
LEA RDX,[0x262a78]
CALL 0x00120ed0
LEA RDI,[0x263538]
CALL 0x00120960
JMP 0x001e169b
LAB_001e1854:
MOV EDI,0x10
CALL 0x00120650
MOV R15,RAX
LAB_001e1861:
LEA RSI,[0x2210a6]
MOV RDI,RAX
CALL 0x00120430
LAB_001e1870:
MOV RSI,qword ptr [0x00261fc0]
MOV RDX,qword ptr [0x00261f80]
MOV RDI,R15
CALL 0x00120a50
|
/* minja::Parser::parseStringConcat() */
void minja::Parser::parseStringConcat(void)
{
int iVar1;
int8 *puVar2;
runtime_error *prVar3;
int8 *in_RSI;
long *in_RDI;
long local_78;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_70 [8];
long *local_68;
long local_60;
long local_58 [2];
int8 local_48;
int8 uStack_40;
long local_38;
long lStack_30;
parseMathPow();
if (*in_RDI == 0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001e17d3 to 001e17e1 has its CatchHandler @ 001e18ab */
std::runtime_error::runtime_error(prVar3,"Expected left side of \'string concat\' expression");
/* try { // try from 001e17e2 to 001e17f7 has its CatchHandler @ 001e18a9 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_00261fc0,PTR__runtime_error_00261f80);
}
if (parseStringConcat()::concat_tok_abi_cxx11_ == '\0') {
iVar1 = __cxa_guard_acquire(&parseStringConcat()::concat_tok_abi_cxx11_);
if (iVar1 != 0) {
/* try { // try from 001e1811 to 001e1828 has its CatchHandler @ 001e1886 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseStringConcat()::concat_tok_abi_cxx11_,"~(?!\\})",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseStringConcat()::concat_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseStringConcat()::concat_tok_abi_cxx11_);
}
}
/* try { // try from 001e169b to 001e16b3 has its CatchHandler @ 001e18d1 */
consumeToken(&local_68);
if (local_68 != local_58) {
operator_delete(local_68,local_58[0] + 1);
}
if (local_60 != 0) {
/* try { // try from 001e16dc to 001e16e6 has its CatchHandler @ 001e18cf */
parseLogicalAnd();
if (local_78 == 0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001e1861 to 001e186f has its CatchHandler @ 001e189c */
std::runtime_error::runtime_error
(prVar3,"Expected right side of \'string concat\' expression");
/* try { // try from 001e1870 to 001e1885 has its CatchHandler @ 001e1897 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_00261fc0,PTR__runtime_error_00261f80);
}
local_68 = (long *)*in_RSI;
local_60 = in_RSI[1];
if (local_60 != 0) {
if (*PTR___libc_single_threaded_00261f98 == '\0') {
LOCK();
*(int *)(local_60 + 8) = *(int *)(local_60 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_60 + 8) = *(int *)(local_60 + 8) + 1;
}
}
local_58[0] = in_RSI[4] - in_RSI[2];
/* try { // try from 001e172e to 001e1737 has its CatchHandler @ 001e18b8 */
puVar2 = (int8 *)operator_new(0x58);
puVar2[1] = 0x100000001;
*puVar2 = &PTR___Sp_counted_base_00260f20;
BinaryOpExpr::BinaryOpExpr((BinaryOpExpr *)(puVar2 + 2),&local_68);
local_48 = 0;
uStack_40 = 0;
local_38 = *in_RDI;
lStack_30 = in_RDI[1];
*in_RDI = (long)(puVar2 + 2);
in_RDI[1] = (long)puVar2;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&lStack_30);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_40);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_60);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_70);
}
return;
}
| |
55,139 | mariadb_uncompress | eloqsql/libmariadb/libmariadb/ma_compress.c | my_bool _mariadb_uncompress (NET *net, unsigned char *packet, size_t *len, size_t *complen)
{
if (*complen) /* If compressed */
{
unsigned char *compbuf = (unsigned char *) malloc (*complen);
if (!compbuf)
return 1; /* Not enough memory */
if (compression_plugin(net)->decompress(compression_ctx(net), compbuf, complen, packet, len))
{ /* Probably wrong packet */
free(compbuf);
return 1;
}
*len = *complen;
memcpy(packet,compbuf,*len);
free(compbuf);
}
else *complen= *len;
return 0;
} | O3 | c | mariadb_uncompress:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, -0x30(%rbp)
movq %rdi, %r12
movq (%rcx), %rdi
testq %rdi, %rdi
je 0x1e234
callq 0x13600
movb $0x1, %bl
testq %rax, %rax
je 0x1e257
movq %rax, %r13
movq 0x2a0(%r12), %rax
movq 0x8(%rax), %rdi
movq 0x10(%rax), %rax
movq %r13, %rsi
movq %r14, %rdx
movq -0x30(%rbp), %r12
movq %r12, %rcx
movq %r15, %r8
callq *0x70(%rax)
testb %al, %al
je 0x1e23c
movq %r13, %rdi
callq 0x13570
jmp 0x1e257
movq (%r15), %rax
movq %rax, (%r14)
jmp 0x1e255
movq (%r14), %rdx
movq %rdx, (%r15)
movq %r12, %rdi
movq %r13, %rsi
callq 0x13390
movq %r13, %rdi
callq 0x13570
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _mariadb_uncompress:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rcx
mov r15, rdx
mov [rbp+var_30], rsi
mov r12, rdi
mov rdi, [rcx]
test rdi, rdi
jz short loc_1E234
call _malloc
mov bl, 1
test rax, rax
jz short loc_1E257
mov r13, rax
mov rax, [r12+2A0h]
mov rdi, [rax+8]
mov rax, [rax+10h]
mov rsi, r13
mov rdx, r14
mov r12, [rbp+var_30]
mov rcx, r12
mov r8, r15
call qword ptr [rax+70h]
test al, al
jz short loc_1E23C
mov rdi, r13
call _free
jmp short loc_1E257
loc_1E234:
mov rax, [r15]
mov [r14], rax
jmp short loc_1E255
loc_1E23C:
mov rdx, [r14]
mov [r15], rdx
mov rdi, r12
mov rsi, r13
call _memcpy
mov rdi, r13
call _free
loc_1E255:
xor ebx, ebx
loc_1E257:
mov eax, ebx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mariadb_uncompress(long long a1, long long a2, _QWORD *a3, _QWORD *a4)
{
unsigned int v4; // ebx
long long v7; // rax
long long v8; // r13
long long v9; // rdx
if ( !*a4 )
{
*a4 = *a3;
return 0;
}
v7 = malloc(*a4);
LOBYTE(v4) = 1;
if ( v7 )
{
v8 = v7;
if ( (*(unsigned __int8 ( **)(_QWORD, long long, _QWORD *, long long, _QWORD *))(*(_QWORD *)(*(_QWORD *)(a1 + 672) + 16LL)
+ 112LL))(
*(_QWORD *)(*(_QWORD *)(a1 + 672) + 8LL),
v7,
a4,
a2,
a3) )
{
free(v8);
return v4;
}
v9 = *a4;
*a3 = *a4;
memcpy(a2, v8, v9);
free(v8);
return 0;
}
return v4;
}
| _mariadb_uncompress:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RCX
MOV R15,RDX
MOV qword ptr [RBP + -0x30],RSI
MOV R12,RDI
MOV RDI,qword ptr [RCX]
TEST RDI,RDI
JZ 0x0011e234
CALL 0x00113600
MOV BL,0x1
TEST RAX,RAX
JZ 0x0011e257
MOV R13,RAX
MOV RAX,qword ptr [R12 + 0x2a0]
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV RSI,R13
MOV RDX,R14
MOV R12,qword ptr [RBP + -0x30]
MOV RCX,R12
MOV R8,R15
CALL qword ptr [RAX + 0x70]
TEST AL,AL
JZ 0x0011e23c
MOV RDI,R13
CALL 0x00113570
JMP 0x0011e257
LAB_0011e234:
MOV RAX,qword ptr [R15]
MOV qword ptr [R14],RAX
JMP 0x0011e255
LAB_0011e23c:
MOV RDX,qword ptr [R14]
MOV qword ptr [R15],RDX
MOV RDI,R12
MOV RSI,R13
CALL 0x00113390
MOV RDI,R13
CALL 0x00113570
LAB_0011e255:
XOR EBX,EBX
LAB_0011e257:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong _mariadb_uncompress(long param_1,void *param_2,size_t *param_3,size_t *param_4)
{
size_t __n;
char cVar1;
void *__src;
int8 unaff_RBX;
ulong uVar2;
if (*param_4 == 0) {
*param_4 = *param_3;
}
else {
__src = malloc(*param_4);
uVar2 = CONCAT71((int7)((ulong)unaff_RBX >> 8),1);
if (__src == (void *)0x0) goto LAB_0011e257;
cVar1 = (**(code **)(*(long *)(*(long *)(param_1 + 0x2a0) + 0x10) + 0x70))
(*(int8 *)(*(long *)(param_1 + 0x2a0) + 8),__src,param_4,param_2,param_3
);
if (cVar1 != '\0') {
free(__src);
goto LAB_0011e257;
}
__n = *param_4;
*param_3 = __n;
memcpy(param_2,__src,__n);
free(__src);
}
uVar2 = 0;
LAB_0011e257:
return uVar2 & 0xffffffff;
}
| |
55,140 | mysql_close_start | eloqsql/libmariadb/libmariadb/mariadb_async.c | MK_ASYNC_CONT_BODY_VOID_RETURN(sock)
}
int STDCALL
mysql_close_start(MYSQL *sock)
{
int res;
/* It is legitimate to have NULL sock argument, which will do nothing. */
if (sock && sock->net.pvio)
{
res= mysql_close_slow_part_start(sock);
/* If we need to block, return now and do the rest in mysql_close_cont(). */
if (res)
return res;
}
mysql_close(sock);
return 0;
} | O3 | c | mysql_close_start:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
je 0x2a782
cmpq $0x0, (%rbx)
je 0x2a782
movq %rbx, %rdi
callq 0x2a5a6
testl %eax, %eax
jne 0x2a78c
movq %rbx, %rdi
callq 0x1a94c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| mysql_close_start:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
test rdi, rdi
jz short loc_2A782
cmp qword ptr [rbx], 0
jz short loc_2A782
mov rdi, rbx
call mysql_close_slow_part_start
test eax, eax
jnz short loc_2A78C
loc_2A782:
mov rdi, rbx
call mysql_close
xor eax, eax
loc_2A78C:
add rsp, 8
pop rbx
pop rbp
retn
| long long mysql_close_start(_QWORD *a1)
{
long long result; // rax
if ( !a1 || !*a1 || (result = mysql_close_slow_part_start((long long)a1), !(_DWORD)result) )
{
mysql_close((long long)a1);
return 0LL;
}
return result;
}
| mysql_close_start:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
TEST RDI,RDI
JZ 0x0012a782
CMP qword ptr [RBX],0x0
JZ 0x0012a782
MOV RDI,RBX
CALL 0x0012a5a6
TEST EAX,EAX
JNZ 0x0012a78c
LAB_0012a782:
MOV RDI,RBX
CALL 0x0011a94c
XOR EAX,EAX
LAB_0012a78c:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int8 mysql_close_start(long *param_1)
{
int8 uVar1;
if (((param_1 != (long *)0x0) && (*param_1 != 0)) &&
(uVar1 = mysql_close_slow_part_start(param_1), (int)uVar1 != 0)) {
return uVar1;
}
mysql_close(param_1);
return 0;
}
| |
55,141 | void mcp::logger::log<char const (&) [30], char*>(mcp::log_level, char const (&) [30], char*&&) | hkr04[P]cpp-mcp/include/mcp_logger.h | void log(log_level level, Args&&... args) {
if (level < level_) {
return;
}
std::stringstream ss;
// Add timestamp
auto now = std::chrono::system_clock::now();
auto now_c = std::chrono::system_clock::to_time_t(now);
auto now_tm = std::localtime(&now_c);
ss << std::put_time(now_tm, "%Y-%m-%d %H:%M:%S") << " ";
// Add log level and color
switch (level) {
case log_level::debug:
ss << "\033[36m[DEBUG]\033[0m "; // Cyan
break;
case log_level::info:
ss << "\033[32m[INFO]\033[0m "; // Green
break;
case log_level::warning:
ss << "\033[33m[WARNING]\033[0m "; // Yellow
break;
case log_level::error:
ss << "\033[31m[ERROR]\033[0m "; // Red
break;
}
// Add log content
log_impl(ss, std::forward<Args>(args)...);
// Output log
std::lock_guard<std::mutex> lock(mutex_);
std::cerr << ss.str() << std::endl;
} | O0 | c | void mcp::logger::log<char const (&) [30], char*>(mcp::log_level, char const (&) [30], char*&&):
subq $0x228, %rsp # imm = 0x228
movq %rdi, 0x220(%rsp)
movl %esi, 0x21c(%rsp)
movq %rdx, 0x210(%rsp)
movq 0x220(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movl 0x21c(%rsp), %eax
cmpl (%rcx), %eax
jge 0x486bb
jmp 0x48879
leaq 0x88(%rsp), %rdi
callq 0x6400
callq 0x6080
movq %rax, 0x80(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x28370
movq %rax, 0x78(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x6440
movq %rax, 0x70(%rsp)
leaq 0x98(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x70(%rsp), %rdi
leaq 0x7ed7(%rip), %rsi # 0x505e6
callq 0x28750
movq 0x10(%rsp), %rdi
movq %rax, 0x60(%rsp)
movq %rdx, 0x68(%rsp)
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
callq 0x283e0
movq %rax, 0x18(%rsp)
jmp 0x48739
movq 0x18(%rsp), %rdi
leaq 0x5d7d(%rip), %rsi # 0x4e4c2
callq 0x65b0
jmp 0x4874c
movl 0x21c(%rsp), %eax
movq %rax, 0x8(%rsp)
subq $0x3, %rax
ja 0x487ea
movq 0x8(%rsp), %rax
leaq 0x7806(%rip), %rcx # 0x4ff74
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
jmp 0x488b3
leaq 0x98(%rsp), %rdi
leaq 0x7e5f(%rip), %rsi # 0x505f8
callq 0x65b0
jmp 0x487a0
jmp 0x487ea
leaq 0x98(%rsp), %rdi
leaq 0x7e59(%rip), %rsi # 0x5060a
callq 0x65b0
jmp 0x487b8
jmp 0x487ea
leaq 0x98(%rsp), %rdi
leaq 0x7e52(%rip), %rsi # 0x5061b
callq 0x65b0
jmp 0x487d0
jmp 0x487ea
leaq 0x98(%rsp), %rdi
leaq 0x7e4e(%rip), %rsi # 0x5062f
callq 0x65b0
jmp 0x487e8
jmp 0x487ea
movq 0x20(%rsp), %rdi
movq 0x210(%rsp), %rdx
leaq 0x88(%rsp), %rsi
callq 0x488d0
jmp 0x48806
movq 0x20(%rsp), %rsi
addq $0x8, %rsi
leaq 0x48(%rsp), %rdi
callq 0x93d0
jmp 0x4881b
leaq 0x28(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x65a0
jmp 0x4882f
movq 0x247b2(%rip), %rdi # 0x6cfe8
leaq 0x28(%rsp), %rsi
callq 0x6520
movq %rax, (%rsp)
jmp 0x48846
movq (%rsp), %rdi
movq 0x24717(%rip), %rsi # 0x6cf68
callq 0x6610
jmp 0x48858
leaq 0x28(%rsp), %rdi
callq 0x6360
leaq 0x48(%rsp), %rdi
callq 0x9400
leaq 0x88(%rsp), %rdi
callq 0x6450
addq $0x228, %rsp # imm = 0x228
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
jmp 0x488a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x6360
leaq 0x48(%rsp), %rdi
callq 0x9400
leaq 0x88(%rsp), %rdi
callq 0x6450
movq 0x58(%rsp), %rdi
callq 0x6970
nopw (%rax,%rax)
| _ZN3mcp6logger3logIJRA22_KcEEEvNS_9log_levelEDpOT_:
sub rsp, 228h
mov [rsp+228h+var_8], rdi
mov [rsp+228h+var_C], esi
mov [rsp+228h+var_18], rdx
mov rcx, [rsp+228h+var_8]
mov [rsp+228h+var_208], rcx
mov eax, [rsp+228h+var_C]
cmp eax, [rcx]
jge short loc_486BB
jmp loc_48879
loc_486BB:
lea rdi, [rsp+228h+var_1A0]; this
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void)
mov [rsp+228h+var_1A8], rax
lea rdi, [rsp+228h+var_1A8]
call _ZNSt6chrono3_V212system_clock9to_time_tERKNS_10time_pointIS1_NS_8durationIlSt5ratioILl1ELl1000000000EEEEEE; std::chrono::_V2::system_clock::to_time_t(std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const&)
mov [rsp+228h+var_1B0], rax
lea rdi, [rsp+228h+var_1B0]
call _localtime
mov [rsp+228h+var_1B8], rax
lea rax, [rsp+228h+var_190]
mov [rsp+228h+var_218], rax
mov rdi, [rsp+228h+var_1B8]
lea rsi, aYMDHMS; "%Y-%m-%d %H:%M:%S"
call _ZSt8put_timeIcESt9_Put_timeIT_EPK2tmPKS1_; std::put_time<char>(tm const*,char const*)
mov rdi, [rsp+228h+var_218]
mov [rsp+228h+var_1C8], rax
mov [rsp+228h+var_1C0], rdx
mov rsi, [rsp+228h+var_1C8]
mov rdx, [rsp+228h+var_1C0]
call _ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St9_Put_timeIS3_E; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Put_time<char>)
mov [rsp+228h+var_210], rax
jmp short $+2
loc_48739:
mov rdi, [rsp+228h+var_210]
lea rsi, asc_4E4C1+1; " "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_4874C:
mov eax, [rsp+228h+var_C]
mov [rsp+228h+var_220], rax
sub rax, 3; switch 4 cases
ja def_48775; jumptable 0000000000048775 default case
mov rax, [rsp+228h+var_220]
lea rcx, jpt_48775
movsxd rax, ds:(jpt_48775 - 4FF74h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
mov rcx, rax
mov eax, edx
mov [rsp+arg_50], rcx
mov [rsp+arg_4C], eax
jmp loc_488B3
loc_4878A:
lea rdi, [rsp+228h+var_190]; jumptable 0000000000048775 case 0
lea rsi, a36mDebug0m; "\x1B[36m[DEBUG]\x1B[0m "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_487A0:
jmp short def_48775; jumptable 0000000000048775 default case
loc_487A2:
lea rdi, [rsp+228h+var_190]; jumptable 0000000000048775 case 1
lea rsi, a32mInfo0m; "\x1B[32m[INFO]\x1B[0m "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_487B8:
jmp short def_48775; jumptable 0000000000048775 default case
loc_487BA:
lea rdi, [rsp+228h+var_190]; jumptable 0000000000048775 case 2
lea rsi, a33mWarning0m; "\x1B[33m[WARNING]\x1B[0m "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_487D0:
jmp short def_48775; jumptable 0000000000048775 default case
loc_487D2:
lea rdi, [rsp+228h+var_190]; jumptable 0000000000048775 case 3
lea rsi, a31mError0m; "\x1B[31m[ERROR]\x1B[0m "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_487E8:
jmp short $+2; jumptable 0000000000048775 default case
def_48775:
mov rdi, [rsp+228h+var_208]; jumptable 0000000000048775 default case
mov rdx, [rsp+228h+var_18]
lea rsi, [rsp+228h+var_1A0]
call _ZN3mcp6logger8log_implIRA22_KcEEvRNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEEOT_; mcp::logger::log_impl<char const(&)[22]>(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> &,char const(&)[22] &&)
jmp short $+2
loc_48806:
mov rsi, [rsp+228h+var_208]
add rsi, 8
lea rdi, [rsp+228h+var_1E0]
call _ZNSt10lock_guardISt5mutexEC2ERS0_; std::lock_guard<std::mutex>::lock_guard(std::mutex&)
jmp short $+2
loc_4881B:
lea rdi, [rsp+228h+var_200]
lea rsi, [rsp+228h+var_1A0]
call __ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(void)
jmp short $+2
loc_4882F:
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, [rsp+228h+var_200]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rsp+228h+var_228], rax
jmp short $+2
loc_48846:
mov rdi, [rsp+228h+var_228]
mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr
call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &))
jmp short $+2
loc_48858:
lea rdi, [rsp+228h+var_200]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+228h+var_1E0]
call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard()
lea rdi, [rsp+228h+var_1A0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
loc_48879:
add rsp, 228h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_50], rcx
mov [rsp+arg_4C], eax
jmp short loc_488A9
mov rcx, rax
mov eax, edx
mov [rsp+arg_50], rcx
mov [rsp+arg_4C], eax
lea rdi, [rsp+arg_20]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_488A9:
lea rdi, [rsp+arg_40]
call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard()
loc_488B3:
lea rdi, [rsp+arg_80]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
mov rdi, [rsp+arg_50]
call __Unwind_Resume
| long long mcp::logger::log<char const(&)[22]>(_DWORD *a1, unsigned int a2, long long a3)
{
long long result; // rax
long long v4; // rdx
long long v5; // [rsp+0h] [rbp-228h]
std::ostream *v6; // [rsp+18h] [rbp-210h]
_BYTE v7[32]; // [rsp+28h] [rbp-200h] BYREF
std::mutex *v8[3]; // [rsp+48h] [rbp-1E0h] BYREF
long long v9; // [rsp+60h] [rbp-1C8h]
long long v10; // [rsp+68h] [rbp-1C0h]
long long v11; // [rsp+70h] [rbp-1B8h]
long long v12; // [rsp+78h] [rbp-1B0h] BYREF
long long v13; // [rsp+80h] [rbp-1A8h] BYREF
_BYTE v14[16]; // [rsp+88h] [rbp-1A0h] BYREF
_BYTE v15[376]; // [rsp+98h] [rbp-190h] BYREF
long long v16; // [rsp+210h] [rbp-18h]
unsigned int v17; // [rsp+21Ch] [rbp-Ch]
_DWORD *v18; // [rsp+220h] [rbp-8h]
v18 = a1;
v17 = a2;
v16 = a3;
result = a2;
if ( (signed int)a2 >= *a1 )
{
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v14);
v13 = std::chrono::_V2::system_clock::now((std::chrono::_V2::system_clock *)v14);
v12 = std::chrono::_V2::system_clock::to_time_t((long long)&v13);
v11 = localtime(&v12);
v9 = std::put_time<char>(v11, "%Y-%m-%d %H:%M:%S");
v10 = v4;
v6 = std::operator<<<char,std::char_traits<char>>((std::ostream *)v15, v9, v4);
std::operator<<<std::char_traits<char>>(v6, " ");
switch ( v17 )
{
case 0u:
std::operator<<<std::char_traits<char>>(v15, "\x1B[36m[DEBUG]\x1B[0m ");
break;
case 1u:
std::operator<<<std::char_traits<char>>(v15, "\x1B[32m[INFO]\x1B[0m ");
break;
case 2u:
std::operator<<<std::char_traits<char>>(v15, "\x1B[33m[WARNING]\x1B[0m ");
break;
case 3u:
std::operator<<<std::char_traits<char>>(v15, "\x1B[31m[ERROR]\x1B[0m ");
break;
default:
break;
}
mcp::logger::log_impl<char const(&)[22]>(a1, v14, v16);
std::lock_guard<std::mutex>::lock_guard(v8, (std::mutex *)(a1 + 2));
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(v7, v14);
v5 = std::operator<<<char>(&std::cerr, v7);
std::ostream::operator<<(v5, &std::endl<char,std::char_traits<char>>);
std::string::~string(v7);
std::lock_guard<std::mutex>::~lock_guard(v8);
return std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v14);
}
return result;
}
| log<char_const(&)[22]>:
SUB RSP,0x228
MOV qword ptr [RSP + 0x220],RDI
MOV dword ptr [RSP + 0x21c],ESI
MOV qword ptr [RSP + 0x210],RDX
MOV RCX,qword ptr [RSP + 0x220]
MOV qword ptr [RSP + 0x20],RCX
MOV EAX,dword ptr [RSP + 0x21c]
CMP EAX,dword ptr [RCX]
JGE 0x001486bb
JMP 0x00148879
LAB_001486bb:
LEA RDI,[RSP + 0x88]
CALL 0x00106400
CALL 0x00106080
MOV qword ptr [RSP + 0x80],RAX
LEA RDI,[RSP + 0x80]
CALL 0x00128370
MOV qword ptr [RSP + 0x78],RAX
LEA RDI,[RSP + 0x78]
CALL 0x00106440
MOV qword ptr [RSP + 0x70],RAX
LEA RAX,[RSP + 0x98]
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x70]
LEA RSI,[0x1505e6]
CALL 0x00128750
MOV RDI,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x60],RAX
MOV qword ptr [RSP + 0x68],RDX
MOV RSI,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0x68]
LAB_0014872d:
CALL 0x001283e0
MOV qword ptr [RSP + 0x18],RAX
JMP 0x00148739
LAB_00148739:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[0x14e4c2]
CALL 0x001065b0
JMP 0x0014874c
LAB_0014874c:
MOV EAX,dword ptr [RSP + 0x21c]
MOV qword ptr [RSP + 0x8],RAX
SUB RAX,0x3
JA 0x001487ea
MOV RAX,qword ptr [RSP + 0x8]
LEA RCX,[0x14ff74]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
LEA RDI,[RSP + 0x98]
LEA RSI,[0x1505f8]
CALL 0x001065b0
JMP 0x001487a0
LAB_001487a0:
JMP 0x001487ea
caseD_1:
LEA RDI,[RSP + 0x98]
LEA RSI,[0x15060a]
CALL 0x001065b0
JMP 0x001487b8
LAB_001487b8:
JMP 0x001487ea
caseD_2:
LEA RDI,[RSP + 0x98]
LEA RSI,[0x15061b]
CALL 0x001065b0
JMP 0x001487d0
LAB_001487d0:
JMP 0x001487ea
caseD_3:
LEA RDI,[RSP + 0x98]
LEA RSI,[0x15062f]
CALL 0x001065b0
JMP 0x001487e8
LAB_001487e8:
JMP 0x001487ea
default:
MOV RDI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x210]
LEA RSI,[RSP + 0x88]
CALL 0x001488d0
JMP 0x00148806
LAB_00148806:
MOV RSI,qword ptr [RSP + 0x20]
ADD RSI,0x8
LEA RDI,[RSP + 0x48]
CALL 0x001093d0
JMP 0x0014881b
LAB_0014881b:
LEA RDI,[RSP + 0x28]
LEA RSI,[RSP + 0x88]
CALL 0x001065a0
JMP 0x0014882f
LAB_0014882f:
MOV RDI,qword ptr [0x0016cfe8]
LEA RSI,[RSP + 0x28]
CALL 0x00106520
MOV qword ptr [RSP],RAX
JMP 0x00148846
LAB_00148846:
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [0x0016cf68]
CALL 0x00106610
LAB_00148856:
JMP 0x00148858
LAB_00148858:
LEA RDI,[RSP + 0x28]
CALL 0x00106360
LEA RDI,[RSP + 0x48]
CALL 0x00109400
LEA RDI,[RSP + 0x88]
CALL 0x00106450
LAB_00148879:
ADD RSP,0x228
RET
|
/* void mcp::logger::log<char const (&) [22]>(mcp::log_level, char const (&) [22]) */
void __thiscall mcp::logger::log<char_const(&)[22]>(logger *this,int param_2,char *param_3)
{
ostream *poVar1;
string local_200 [32];
lock_guard<std::mutex> local_1e0 [24];
int1 local_1c8 [16];
tm *local_1b8;
time_t local_1b0;
int8 local_1a8;
stringstream local_1a0 [16];
ostream local_190 [376];
char *local_18;
int local_c;
logger *local_8;
if (*(int *)this <= param_2) {
local_18 = param_3;
local_c = param_2;
local_8 = this;
std::__cxx11::stringstream::stringstream(local_1a0);
local_1a8 = std::chrono::_V2::system_clock::now();
local_1b0 = std::chrono::_V2::system_clock::to_time_t((time_point *)&local_1a8);
local_1b8 = localtime(&local_1b0);
local_1c8 = std::put_time<char>(local_1b8,"%Y-%m-%d %H:%M:%S");
/* try { // try from 0014872d to 00148818 has its CatchHandler @ 00148777 */
poVar1 = std::operator<<(local_190,local_1c8._0_8_,local_1c8._8_8_);
std::operator<<(poVar1," ");
switch(local_c) {
case 0:
std::operator<<(local_190,"\x1b[36m[DEBUG]\x1b[0m ");
break;
case 1:
std::operator<<(local_190,"\x1b[32m[INFO]\x1b[0m ");
break;
case 2:
std::operator<<(local_190,"\x1b[33m[WARNING]\x1b[0m ");
break;
case 3:
std::operator<<(local_190,"\x1b[31m[ERROR]\x1b[0m ");
}
log_impl<char_const(&)[22]>(this,local_1a0,local_18);
std::lock_guard<std::mutex>::lock_guard(local_1e0,(mutex *)(this + 8));
/* try { // try from 0014881b to 0014882c has its CatchHandler @ 00148881 */
std::__cxx11::stringstream::str();
/* try { // try from 0014882f to 00148855 has its CatchHandler @ 00148891 */
poVar1 = std::operator<<((ostream *)PTR_cerr_0016cfe8,local_200);
std::ostream::operator<<
(poVar1,(_func_ostream_ptr_ostream_ptr *)PTR_endl<char,std_char_traits<char>>_0016cf68
);
std::__cxx11::string::~string(local_200);
std::lock_guard<std::mutex>::~lock_guard(local_1e0);
std::__cxx11::stringstream::~stringstream(local_1a0);
}
return;
}
| |
55,142 | void mcp::logger::log<char const (&) [30], char*>(mcp::log_level, char const (&) [30], char*&&) | hkr04[P]cpp-mcp/include/mcp_logger.h | void log(log_level level, Args&&... args) {
if (level < level_) {
return;
}
std::stringstream ss;
// Add timestamp
auto now = std::chrono::system_clock::now();
auto now_c = std::chrono::system_clock::to_time_t(now);
auto now_tm = std::localtime(&now_c);
ss << std::put_time(now_tm, "%Y-%m-%d %H:%M:%S") << " ";
// Add log level and color
switch (level) {
case log_level::debug:
ss << "\033[36m[DEBUG]\033[0m "; // Cyan
break;
case log_level::info:
ss << "\033[32m[INFO]\033[0m "; // Green
break;
case log_level::warning:
ss << "\033[33m[WARNING]\033[0m "; // Yellow
break;
case log_level::error:
ss << "\033[31m[ERROR]\033[0m "; // Red
break;
}
// Add log content
log_impl(ss, std::forward<Args>(args)...);
// Output log
std::lock_guard<std::mutex> lock(mutex_);
std::cerr << ss.str() << std::endl;
} | O1 | c | void mcp::logger::log<char const (&) [30], char*>(mcp::log_level, char const (&) [30], char*&&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1b8, %rsp # imm = 0x1B8
cmpl %esi, (%rdi)
jg 0x14976
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x30(%rsp), %rdi
callq 0x52e0
callq 0x5060
movabsq $0x112e0be826d694b3, %rcx # imm = 0x112E0BE826D694B3
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x1a, %rdx
addq %rax, %rdx
leaq 0x28(%rsp), %rdi
movq %rdx, (%rdi)
callq 0x5330
leaq 0x40(%rsp), %r15
leaq 0xc476(%rip), %rdx # 0x20cee
movq %r15, %rdi
movq %rax, %rsi
callq 0x11560
leaq 0xab70(%rip), %rsi # 0x1f3fa
movl $0x1, %edx
movq %rax, %rdi
callq 0x54d0
cmpl $0x4, %ebp
jae 0x148bc
movl %ebp, %eax
leaq 0x171b3(%rip), %rcx # 0x2ba58
movq (%rcx,%rax,8), %rsi
leaq 0xd918(%rip), %rcx # 0x221c8
movq (%rcx,%rax,8), %rdx
movq %r15, %rdi
callq 0x54d0
movq %r14, %rdi
callq 0x51c0
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x54d0
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x5630
testl %eax, %eax
jne 0x14984
leaq 0x48(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x5670
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x176e2(%rip), %rdi # 0x2bfe8
callq 0x54d0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x5430
movsbl %al, %esi
movq %r14, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x52c0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14950
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5460
movq %rbx, %rdi
callq 0x5340
movq 0x17601(%rip), %rsi # 0x2bf60
leaq 0x30(%rsp), %rdi
callq 0x5320
leaq 0xb0(%rsp), %rdi
callq 0x5130
addq $0x1b8, %rsp # imm = 0x1B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x52a0
movq %rax, %r14
jmp 0x149b5
jmp 0x14992
movq %rax, %r14
jmp 0x149bd
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x149b5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5460
movq %rbx, %rdi
callq 0x5340
movq 0x1759c(%rip), %rsi # 0x2bf60
leaq 0x30(%rsp), %rdi
callq 0x5320
leaq 0xb0(%rsp), %rdi
callq 0x5130
movq %r14, %rdi
callq 0x5740
nop
| _ZN3mcp6logger3logIJRA23_KcEEEvNS_9log_levelEDpOT_:
push rbp
push r15
push r14
push rbx
sub rsp, 1B8h
cmp [rdi], esi
jg loc_14976
mov r14, rdx
mov ebp, esi
mov rbx, rdi
lea rdi, [rsp+1D8h+var_1A8]; this
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void)
mov rcx, 112E0BE826D694B3h
imul rcx
mov rax, rdx
shr rax, 3Fh
sar rdx, 1Ah
add rdx, rax
lea rdi, [rsp+1D8h+var_1B0]
mov [rdi], rdx
call _localtime
lea r15, [rsp+1D8h+var_198]
lea rdx, aYMDHMS; "%Y-%m-%d %H:%M:%S"
mov rdi, r15; std::ostream *
mov rsi, rax
call _ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St9_Put_timeIS3_E; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Put_time<char>)
lea rsi, asc_1F3F9+1; " "
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
cmp ebp, 4
jnb short loc_148BC
mov eax, ebp
lea rcx, off_2BA58; "\x1B[36m[DEBUG]\x1B[0m "
mov rsi, [rcx+rax*8]
lea rcx, qword_221C8
mov rdx, [rcx+rax*8]
mov rdi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_148BC:
mov rdi, r14
call _strlen
mov rdi, r15
mov rsi, r14
mov rdx, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
add rbx, 8
mov rdi, rbx
call _pthread_mutex_lock
test eax, eax
jnz loc_14984
lea rsi, [rsp+1D8h+var_190]
lea rdi, [rsp+1D8h+var_1D0]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov rsi, [rsp+1D8h+var_1D0]
mov rdx, [rsp+1D8h+var_1C8]
mov rdi, cs:_ZSt4cerr_ptr
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r14, rax
mov rax, [rax]
mov rdi, [rax-18h]
add rdi, r14
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, r14; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
lea rax, [rsp+1D8h+var_1C0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_14950
mov rsi, [rsp+1D8h+var_1C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_14950:
mov rdi, rbx
call _pthread_mutex_unlock
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+1D8h+var_1A8]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+1D8h+var_128]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
loc_14976:
add rsp, 1B8h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_14984:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
mov r14, rax
jmp short loc_149B5
jmp short $+2
loc_14992:
mov r14, rax
jmp short loc_149BD
mov r14, rax
lea rax, [rsp+1D8h+var_1C0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_149B5
mov rsi, [rsp+1D8h+var_1C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_149B5:
mov rdi, rbx
call _pthread_mutex_unlock
loc_149BD:
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+1D8h+var_1A8]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+1D8h+var_128]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, r14
call __Unwind_Resume
| void mcp::logger::log<char const(&)[23]>(_DWORD *a1, unsigned int a2, long long a3)
{
long long v4; // rax
std::ostream *v5; // rax
long long v6; // rax
int v7; // eax
std::ostream *v8; // r14
char v9; // al
std::ostream *v10; // rax
void *v11[2]; // [rsp+8h] [rbp-1D0h] BYREF
_QWORD v12[3]; // [rsp+18h] [rbp-1C0h] BYREF
_BYTE v13[16]; // [rsp+30h] [rbp-1A8h] BYREF
_BYTE v14[8]; // [rsp+40h] [rbp-198h] BYREF
_BYTE v15[104]; // [rsp+48h] [rbp-190h] BYREF
_BYTE v16[296]; // [rsp+B0h] [rbp-128h] BYREF
if ( *a1 <= (signed int)a2 )
{
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v13);
v12[2] = std::chrono::_V2::system_clock::now((std::chrono::_V2::system_clock *)v13) / 1000000000LL;
v4 = localtime();
v5 = std::operator<<<char,std::char_traits<char>>((std::ostream *)v14, v4, (long long)"%Y-%m-%d %H:%M:%S");
std::__ostream_insert<char,std::char_traits<char>>(v5, " ", 1LL);
if ( a2 < 4 )
std::__ostream_insert<char,std::char_traits<char>>(v14, off_2BA58[a2], qword_221C8[a2]);
v6 = strlen(a3);
std::__ostream_insert<char,std::char_traits<char>>(v14, a3, v6);
v7 = pthread_mutex_lock(a1 + 2);
if ( v7 )
std::__throw_system_error(v7);
std::stringbuf::str(v11, v15);
v8 = (std::ostream *)std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, v11[0], v11[1]);
v9 = std::ios::widen((char *)v8 + *(_QWORD *)(*(_QWORD *)v8 - 24LL), 10LL);
v10 = (std::ostream *)std::ostream::put(v8, v9);
std::ostream::flush(v10);
if ( v11[0] != v12 )
operator delete(v11[0], v12[0] + 1LL);
pthread_mutex_unlock(a1 + 2);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(
v13,
&`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>);
std::ios_base::~ios_base((std::ios_base *)v16);
}
}
| log<char_const(&)[23]>:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x1b8
CMP dword ptr [RDI],ESI
JG 0x00114976
MOV R14,RDX
MOV EBP,ESI
MOV RBX,RDI
LEA RDI,[RSP + 0x30]
CALL 0x001052e0
CALL 0x00105060
MOV RCX,0x112e0be826d694b3
IMUL RCX
MOV RAX,RDX
SHR RAX,0x3f
SAR RDX,0x1a
ADD RDX,RAX
LEA RDI,[RSP + 0x28]
MOV qword ptr [RDI],RDX
CALL 0x00105330
LEA R15,[RSP + 0x40]
LAB_00114871:
LEA RDX,[0x120cee]
MOV RDI,R15
MOV RSI,RAX
CALL 0x00111560
LEA RSI,[0x11f3fa]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x001054d0
CMP EBP,0x4
JNC 0x001148bc
MOV EAX,EBP
LEA RCX,[0x12ba58]
MOV RSI,qword ptr [RCX + RAX*0x8]
LEA RCX,[0x1221c8]
MOV RDX,qword ptr [RCX + RAX*0x8]
MOV RDI,R15
CALL 0x001054d0
LAB_001148bc:
MOV RDI,R14
CALL 0x001051c0
MOV RDI,R15
MOV RSI,R14
MOV RDX,RAX
CALL 0x001054d0
ADD RBX,0x8
MOV RDI,RBX
CALL 0x00105630
TEST EAX,EAX
JNZ 0x00114984
LEA RSI,[RSP + 0x48]
LAB_001148eb:
LEA RDI,[RSP + 0x8]
CALL 0x00105670
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_001148ff:
MOV RDI,qword ptr [0x0012bfe8]
CALL 0x001054d0
MOV R14,RAX
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,R14
MOV ESI,0xa
CALL 0x00105430
MOVSX ESI,AL
MOV RDI,R14
CALL 0x00105030
MOV RDI,RAX
CALL 0x001052c0
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00114950
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00105460
LAB_00114950:
MOV RDI,RBX
CALL 0x00105340
MOV RSI,qword ptr [0x0012bf60]
LEA RDI,[RSP + 0x30]
CALL 0x00105320
LEA RDI,[RSP + 0xb0]
CALL 0x00105130
LAB_00114976:
ADD RSP,0x1b8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00114984:
MOV EDI,EAX
CALL 0x001052a0
LAB_0011498b:
MOV R14,RAX
JMP 0x001149b5
LAB_001149b5:
MOV RDI,RBX
CALL 0x00105340
LAB_001149bd:
MOV RSI,qword ptr [0x0012bf60]
LEA RDI,[RSP + 0x30]
CALL 0x00105320
LEA RDI,[RSP + 0xb0]
CALL 0x00105130
MOV RDI,R14
CALL 0x00105740
|
/* void mcp::logger::log<char const (&) [23]>(mcp::log_level, char const (&) [23]) */
void __thiscall mcp::logger::log<char_const(&)[23]>(logger *this,uint param_2,char *param_3)
{
int iVar1;
tm *ptVar2;
ostream *poVar3;
size_t sVar4;
int8 uVar5;
pthread_mutex_t *__mutex;
long *local_1d0;
long local_1c8;
long local_1c0 [2];
long local_1b0;
stringstream local_1a8 [16];
ostream local_198 [112];
ios_base local_128 [264];
if (*(int *)this <= (int)param_2) {
std::__cxx11::stringstream::stringstream(local_1a8);
local_1b0 = std::chrono::_V2::system_clock::now();
local_1b0 = local_1b0 / 1000000000;
ptVar2 = localtime(&local_1b0);
/* try { // try from 00114871 to 001148d1 has its CatchHandler @ 00114992 */
poVar3 = std::operator<<(local_198,ptVar2,"%Y-%m-%d %H:%M:%S");
std::__ostream_insert<char,std::char_traits<char>>(poVar3," ",1);
if (param_2 < 4) {
std::__ostream_insert<char,std::char_traits<char>>
(local_198,(&PTR_DAT_0012ba58)[param_2],
*(long *)(&DAT_001221c8 + (ulong)param_2 * 8));
}
sVar4 = strlen(param_3);
std::__ostream_insert<char,std::char_traits<char>>(local_198,param_3,sVar4);
__mutex = (pthread_mutex_t *)(this + 8);
iVar1 = pthread_mutex_lock(__mutex);
if (iVar1 != 0) {
/* try { // try from 00114984 to 0011498a has its CatchHandler @ 00114990 */
uVar5 = std::__throw_system_error(iVar1);
/* catch() { ... } // from try @ 001148eb with catch @ 0011498b */
pthread_mutex_unlock(__mutex);
std::__cxx11::stringstream::~stringstream(local_1a8);
std::ios_base::~ios_base(local_128);
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar5);
}
/* try { // try from 001148eb to 001148f4 has its CatchHandler @ 0011498b */
std::__cxx11::stringbuf::str();
/* try { // try from 001148ff to 00114934 has its CatchHandler @ 00114997 */
poVar3 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_0012bfe8,(char *)local_1d0,local_1c8);
std::ios::widen((char)*(int8 *)(*(long *)poVar3 + -0x18) + (char)poVar3);
std::ostream::put((char)poVar3);
std::ostream::flush();
if (local_1d0 != local_1c0) {
operator_delete(local_1d0,local_1c0[0] + 1);
}
pthread_mutex_unlock(__mutex);
std::__cxx11::stringstream::~stringstream(local_1a8);
std::ios_base::~ios_base(local_128);
}
return;
}
| |
55,143 | void mcp::logger::log<char const (&) [30], char*>(mcp::log_level, char const (&) [30], char*&&) | hkr04[P]cpp-mcp/include/mcp_logger.h | void log(log_level level, Args&&... args) {
if (level < level_) {
return;
}
std::stringstream ss;
// Add timestamp
auto now = std::chrono::system_clock::now();
auto now_c = std::chrono::system_clock::to_time_t(now);
auto now_tm = std::localtime(&now_c);
ss << std::put_time(now_tm, "%Y-%m-%d %H:%M:%S") << " ";
// Add log level and color
switch (level) {
case log_level::debug:
ss << "\033[36m[DEBUG]\033[0m "; // Cyan
break;
case log_level::info:
ss << "\033[32m[INFO]\033[0m "; // Green
break;
case log_level::warning:
ss << "\033[33m[WARNING]\033[0m "; // Yellow
break;
case log_level::error:
ss << "\033[31m[ERROR]\033[0m "; // Red
break;
}
// Add log content
log_impl(ss, std::forward<Args>(args)...);
// Output log
std::lock_guard<std::mutex> lock(mutex_);
std::cerr << ss.str() << std::endl;
} | O2 | c | void mcp::logger::log<char const (&) [30], char*>(mcp::log_level, char const (&) [30], char*&&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1b0, %rsp # imm = 0x1B0
cmpl %esi, (%rdi)
jg 0x1966d
movq %rcx, %r14
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x28(%rsp), %rdi
callq 0x5310
callq 0x5060
movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00
cqto
idivq %rcx
leaq 0x20(%rsp), %rdi
movq %rax, (%rdi)
callq 0x5350
leaq 0x38(%rsp), %r12
leaq 0x36fe(%rip), %rdx # 0x1ccda
movq %r12, %rdi
movq %rax, %rsi
callq 0xf518
leaq 0x1e2c(%rip), %rsi # 0x1b41a
movq %rax, %rdi
callq 0x5470
cmpl $0x4, %ebp
jae 0x19610
movl %ebp, %eax
leaq 0x12464(%rip), %rcx # 0x2ba68
movq (%rcx,%rax,8), %rsi
movq %r12, %rdi
callq 0x5470
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x196ae
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x692c
leaq 0x40(%rsp), %rsi
movq %rsp, %rdi
callq 0x5680
movq 0x129a5(%rip), %rdi # 0x2bfe8
movq %rsp, %rsi
callq 0x5410
movq %rax, %rdi
callq 0x5210
movq %rsp, %rdi
callq 0x51d0
movq %rbx, %rdi
callq 0x5370
leaq 0x28(%rsp), %rdi
callq 0x5360
addq $0x1b0, %rsp # imm = 0x1B0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x1968f
jmp 0x19699
movq %rax, %r14
movq %rsp, %rdi
callq 0x51d0
movq %rbx, %rdi
callq 0x5370
jmp 0x1969c
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x5360
movq %r14, %rdi
callq 0x5750
| _ZN3mcp6logger3logIJRA26_KcPcEEEvNS_9log_levelEDpOT_:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 1B0h
cmp [rdi], esi
jg loc_1966D
mov r14, rcx
mov r15, rdx
mov ebp, esi
mov rbx, rdi
lea rdi, [rsp+1D8h+var_1B0]; this
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void)
mov ecx, 3B9ACA00h
cqo
idiv rcx
lea rdi, [rsp+1D8h+var_1B8]
mov [rdi], rax
call _localtime
lea r12, [rsp+1D8h+var_1A0]
lea rdx, aYMDHMS; "%Y-%m-%d %H:%M:%S"
mov rdi, r12; std::ostream *
mov rsi, rax
call _ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St9_Put_timeIS3_E; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Put_time<char>)
lea rsi, asc_1B419+1; " "
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
cmp ebp, 4
jnb short loc_19610
mov eax, ebp
lea rcx, off_2BA68; "\x1B[36m[DEBUG]\x1B[0m "
mov rsi, [rcx+rax*8]
mov rdi, r12
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
loc_19610:
lea rsi, [rsp+1D8h+var_1B0]
mov rdi, rbx
mov rdx, r15
mov rcx, r14
call _ZN3mcp6logger8log_implIRA26_KcJPcEEEvRNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEEOT_DpOT0_; mcp::logger::log_impl<char const(&)[26],char *>(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> &,char const(&)[26] &&,char * &&)
add rbx, 8
mov rdi, rbx; this
call _ZNSt5mutex4lockEv; std::mutex::lock(void)
lea rsi, [rsp+1D8h+var_198]
mov rdi, rsp
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov rdi, cs:_ZSt4cerr_ptr
mov rsi, rsp
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov rdi, rax
call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &)
mov rdi, rsp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call _pthread_mutex_unlock
lea rdi, [rsp+1D8h+var_1B0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
loc_1966D:
add rsp, 1B0h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
mov r14, rax
jmp short loc_1968F
jmp short loc_19699
mov r14, rax
mov rdi, rsp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_1968F:
mov rdi, rbx
call _pthread_mutex_unlock
jmp short loc_1969C
loc_19699:
mov r14, rax
loc_1969C:
lea rdi, [rsp+arg_20]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
mov rdi, r14
call __Unwind_Resume
| void mcp::logger::log<char const(&)[26],char *>(_DWORD *a1, long long a2, long long a3, long long a4)
{
long long v6; // rax
long long v7; // rax
std::ostream *v8; // rax
long long v9; // rax
_BYTE v10[32]; // [rsp+0h] [rbp-1D8h] BYREF
long long v11; // [rsp+20h] [rbp-1B8h] BYREF
_BYTE v12[16]; // [rsp+28h] [rbp-1B0h] BYREF
_BYTE v13[8]; // [rsp+38h] [rbp-1A0h] BYREF
_BYTE v14[408]; // [rsp+40h] [rbp-198h] BYREF
if ( *a1 <= (int)a2 )
{
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v12);
v6 = std::chrono::_V2::system_clock::now((std::chrono::_V2::system_clock *)v12);
v11 = v6 / 1000000000;
v7 = localtime(&v11, a2, v6 % 1000000000);
v8 = std::operator<<<char,std::char_traits<char>>((std::ostream *)v13, v7, (long long)"%Y-%m-%d %H:%M:%S");
std::operator<<<std::char_traits<char>>(v8, " ");
if ( (unsigned int)a2 < 4 )
std::operator<<<std::char_traits<char>>(v13, off_2BA68[(unsigned int)a2]);
mcp::logger::log_impl<char const(&)[26],char *>(a1, v12, a3, a4);
std::mutex::lock((std::mutex *)(a1 + 2));
std::stringbuf::str(v10, v14);
v9 = std::operator<<<char>(&std::cerr, v10);
std::endl<char,std::char_traits<char>>(v9);
std::string::~string(v10);
pthread_mutex_unlock(a1 + 2);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v12);
}
}
| log<char_const(&)[26],char*>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x1b0
CMP dword ptr [RDI],ESI
JG 0x0011966d
MOV R14,RCX
MOV R15,RDX
MOV EBP,ESI
MOV RBX,RDI
LEA RDI,[RSP + 0x28]
CALL 0x00105310
CALL 0x00105060
MOV ECX,0x3b9aca00
CQO
IDIV RCX
LEA RDI,[RSP + 0x20]
MOV qword ptr [RDI],RAX
CALL 0x00105350
LEA R12,[RSP + 0x38]
LAB_001195d5:
LEA RDX,[0x11ccda]
MOV RDI,R12
MOV RSI,RAX
CALL 0x0010f518
LEA RSI,[0x11b41a]
MOV RDI,RAX
CALL 0x00105470
CMP EBP,0x4
JNC 0x00119610
MOV EAX,EBP
LEA RCX,[0x12ba68]
MOV RSI,qword ptr [RCX + RAX*0x8]
MOV RDI,R12
CALL 0x00105470
LAB_00119610:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
MOV RDX,R15
MOV RCX,R14
CALL 0x001196ae
ADD RBX,0x8
LAB_00119627:
MOV RDI,RBX
CALL 0x0010692c
LEA RSI,[RSP + 0x40]
LAB_00119634:
MOV RDI,RSP
CALL 0x00105680
LAB_0011963c:
MOV RDI,qword ptr [0x0012bfe8]
MOV RSI,RSP
CALL 0x00105410
MOV RDI,RAX
CALL 0x00105210
LAB_00119653:
MOV RDI,RSP
CALL 0x001051d0
MOV RDI,RBX
CALL 0x00105370
LEA RDI,[RSP + 0x28]
CALL 0x00105360
LAB_0011966d:
ADD RSP,0x1b0
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* void mcp::logger::log<char const (&) [26], char*>(mcp::log_level, char const (&) [26], char*&&)
*/
void __thiscall
mcp::logger::log<char_const(&)[26],char*>(logger *this,uint param_2,char *param_3,char **param_4)
{
tm *ptVar1;
ostream *poVar2;
string asStack_1d8 [32];
long local_1b8;
stringstream local_1b0 [16];
ostream local_1a0 [376];
if (*(int *)this <= (int)param_2) {
std::__cxx11::stringstream::stringstream(local_1b0);
local_1b8 = std::chrono::_V2::system_clock::now();
local_1b8 = local_1b8 / 1000000000;
ptVar1 = localtime(&local_1b8);
/* try { // try from 001195d5 to 00119622 has its CatchHandler @ 00119699 */
poVar2 = std::operator<<(local_1a0,ptVar1,"%Y-%m-%d %H:%M:%S");
std::operator<<(poVar2," ");
if (param_2 < 4) {
std::operator<<(local_1a0,(&PTR_DAT_0012ba68)[param_2]);
}
log_impl<char_const(&)[26],char*>(this,local_1b0,param_3,param_4);
/* try { // try from 00119627 to 0011962e has its CatchHandler @ 00119682 */
std::mutex::lock();
/* try { // try from 00119634 to 0011963b has its CatchHandler @ 0011967d */
std::__cxx11::stringbuf::str();
/* try { // try from 0011963c to 00119652 has its CatchHandler @ 00119684 */
poVar2 = std::operator<<((ostream *)PTR_cerr_0012bfe8,asStack_1d8);
std::endl<char,std::char_traits<char>>(poVar2);
std::__cxx11::string::~string(asStack_1d8);
pthread_mutex_unlock((pthread_mutex_t *)(this + 8));
std::__cxx11::stringstream::~stringstream(local_1b0);
}
return;
}
| |
55,144 | void mcp::logger::log<char const (&) [30], char*>(mcp::log_level, char const (&) [30], char*&&) | hkr04[P]cpp-mcp/include/mcp_logger.h | void log(log_level level, Args&&... args) {
if (level < level_) {
return;
}
std::stringstream ss;
// Add timestamp
auto now = std::chrono::system_clock::now();
auto now_c = std::chrono::system_clock::to_time_t(now);
auto now_tm = std::localtime(&now_c);
ss << std::put_time(now_tm, "%Y-%m-%d %H:%M:%S") << " ";
// Add log level and color
switch (level) {
case log_level::debug:
ss << "\033[36m[DEBUG]\033[0m "; // Cyan
break;
case log_level::info:
ss << "\033[32m[INFO]\033[0m "; // Green
break;
case log_level::warning:
ss << "\033[33m[WARNING]\033[0m "; // Yellow
break;
case log_level::error:
ss << "\033[31m[ERROR]\033[0m "; // Red
break;
}
// Add log content
log_impl(ss, std::forward<Args>(args)...);
// Output log
std::lock_guard<std::mutex> lock(mutex_);
std::cerr << ss.str() << std::endl;
} | O3 | c | void mcp::logger::log<char const (&) [30], char*>(mcp::log_level, char const (&) [30], char*&&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1b0, %rsp # imm = 0x1B0
cmpl %esi, (%rdi)
jg 0x138a3
movq %rcx, %r14
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x28(%rsp), %rdi
callq 0x52e0
callq 0x5060
movabsq $0x112e0be826d694b3, %rcx # imm = 0x112E0BE826D694B3
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x1a, %rdx
addq %rax, %rdx
leaq 0x20(%rsp), %rdi
movq %rdx, (%rdi)
callq 0x5330
leaq 0x38(%rsp), %r12
leaq 0xc543(%rip), %rdx # 0x1fcee
movq %r12, %rdi
movq %rax, %rsi
callq 0x1117c
leaq 0xac3d(%rip), %rsi # 0x1e3fa
movl $0x1, %edx
movq %rax, %rdi
callq 0x54d0
cmpl $0x4, %ebp
jae 0x137ef
movl %ebp, %eax
leaq 0x17280(%rip), %rcx # 0x2aa58
movq (%rcx,%rax,8), %rsi
leaq 0xd9e5(%rip), %rcx # 0x211c8
movq (%rcx,%rax,8), %rdx
movq %r12, %rdi
callq 0x54d0
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x13912
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x5630
testl %eax, %eax
jne 0x138b3
leaq 0x40(%rsp), %rsi
movq %rsp, %rdi
callq 0x5670
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x177b5(%rip), %rdi # 0x2afe8
callq 0x54d0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x5430
movsbl %al, %esi
movq %r14, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x52c0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1387d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5460
movq %rbx, %rdi
callq 0x5340
movq 0x176d4(%rip), %rsi # 0x2af60
leaq 0x28(%rsp), %rdi
callq 0x5320
leaq 0xa8(%rsp), %rdi
callq 0x5130
addq $0x1b0, %rsp # imm = 0x1B0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x52a0
movq %rax, %r14
jmp 0x138e4
jmp 0x138c1
movq %rax, %r14
jmp 0x138ec
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x138e4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5460
movq %rbx, %rdi
callq 0x5340
movq 0x1766d(%rip), %rsi # 0x2af60
leaq 0x28(%rsp), %rdi
callq 0x5320
leaq 0xa8(%rsp), %rdi
callq 0x5130
movq %r14, %rdi
callq 0x5740
| _ZN3mcp6logger3logIJRA48_KciEEEvNS_9log_levelEDpOT_:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 1B0h
cmp [rdi], esi
jg loc_138A3
mov r14, rcx
mov r15, rdx
mov ebp, esi
mov rbx, rdi
lea rdi, [rsp+1D8h+var_1B0]; this
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void)
mov rcx, 112E0BE826D694B3h
imul rcx
mov rax, rdx
shr rax, 3Fh
sar rdx, 1Ah
add rdx, rax
lea rdi, [rsp+1D8h+var_1B8]
mov [rdi], rdx
call _localtime
lea r12, [rsp+1D8h+var_1A0]
lea rdx, aYMDHMS; "%Y-%m-%d %H:%M:%S"
mov rdi, r12; std::ostream *
mov rsi, rax
call _ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St9_Put_timeIS3_E; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Put_time<char>)
lea rsi, asc_1E3F9+1; " "
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
cmp ebp, 4
jnb short loc_137EF
mov eax, ebp
lea rcx, off_2AA58; "\x1B[36m[DEBUG]\x1B[0m "
mov rsi, [rcx+rax*8]
lea rcx, qword_211C8
mov rdx, [rcx+rax*8]
mov rdi, r12
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_137EF:
lea rsi, [rsp+1D8h+var_1B0]
mov rdi, rbx
mov rdx, r15
mov rcx, r14
call _ZN3mcp6logger8log_implIRA48_KcJiEEEvRNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEEOT_DpOT0_; mcp::logger::log_impl<char const(&)[48],int>(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> &,char const(&)[48] &&,int &&)
add rbx, 8
mov rdi, rbx
call _pthread_mutex_lock
test eax, eax
jnz loc_138B3
lea rsi, [rsp+1D8h+var_198]
mov rdi, rsp
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov rsi, [rsp+1D8h+var_1D8]
mov rdx, [rsp+1D8h+var_1D0]
mov rdi, cs:_ZSt4cerr_ptr
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r14, rax
mov rax, [rax]
mov rdi, [rax-18h]
add rdi, r14
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, r14; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
lea rax, [rsp+1D8h+var_1C8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1387D
mov rsi, [rsp+1D8h+var_1C8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1387D:
mov rdi, rbx
call _pthread_mutex_unlock
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+1D8h+var_1B0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+1D8h+var_130]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
loc_138A3:
add rsp, 1B0h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_138B3:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
mov r14, rax
jmp short loc_138E4
jmp short $+2
loc_138C1:
mov r14, rax
jmp short loc_138EC
mov r14, rax
lea rax, [rsp+1D8h+var_1C8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_138E4
mov rsi, [rsp+1D8h+var_1C8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_138E4:
mov rdi, rbx
call _pthread_mutex_unlock
loc_138EC:
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+1D8h+var_1B0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+1D8h+var_130]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, r14
call __Unwind_Resume
| void mcp::logger::log<char const(&)[48],int>(_DWORD *a1, unsigned int a2, long long a3, long long a4)
{
long long v6; // rax
std::ostream *v7; // rax
int v8; // eax
std::ostream *v9; // r14
char v10; // al
std::ostream *v11; // rax
void *v12[2]; // [rsp+0h] [rbp-1D8h] BYREF
_QWORD v13[3]; // [rsp+10h] [rbp-1C8h] BYREF
_BYTE v14[16]; // [rsp+28h] [rbp-1B0h] BYREF
_BYTE v15[8]; // [rsp+38h] [rbp-1A0h] BYREF
_BYTE v16[104]; // [rsp+40h] [rbp-198h] BYREF
_BYTE v17[304]; // [rsp+A8h] [rbp-130h] BYREF
if ( *a1 <= (signed int)a2 )
{
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v14);
v13[2] = std::chrono::_V2::system_clock::now((std::chrono::_V2::system_clock *)v14) / 1000000000LL;
v6 = localtime();
v7 = std::operator<<<char,std::char_traits<char>>((std::ostream *)v15, v6, (long long)"%Y-%m-%d %H:%M:%S");
std::__ostream_insert<char,std::char_traits<char>>(v7, " ", 1LL);
if ( a2 < 4 )
std::__ostream_insert<char,std::char_traits<char>>(v15, off_2AA58[a2], qword_211C8[a2]);
mcp::logger::log_impl<char const(&)[48],int>(a1, v14, a3, a4);
v8 = pthread_mutex_lock(a1 + 2);
if ( v8 )
std::__throw_system_error(v8);
std::stringbuf::str(v12, v16);
v9 = (std::ostream *)std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, v12[0], v12[1]);
v10 = std::ios::widen((char *)v9 + *(_QWORD *)(*(_QWORD *)v9 - 24LL), 10LL);
v11 = (std::ostream *)std::ostream::put(v9, v10);
std::ostream::flush(v11);
if ( v12[0] != v13 )
operator delete(v12[0], v13[0] + 1LL);
pthread_mutex_unlock(a1 + 2);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(
v14,
&`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>);
std::ios_base::~ios_base((std::ios_base *)v17);
}
}
| log<char_const(&)[48],int>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x1b0
CMP dword ptr [RDI],ESI
JG 0x001138a3
MOV R14,RCX
MOV R15,RDX
MOV EBP,ESI
MOV RBX,RDI
LEA RDI,[RSP + 0x28]
CALL 0x001052e0
CALL 0x00105060
MOV RCX,0x112e0be826d694b3
IMUL RCX
MOV RAX,RDX
SHR RAX,0x3f
SAR RDX,0x1a
ADD RDX,RAX
LEA RDI,[RSP + 0x20]
MOV qword ptr [RDI],RDX
CALL 0x00105330
LEA R12,[RSP + 0x38]
LAB_001137a4:
LEA RDX,[0x11fcee]
MOV RDI,R12
MOV RSI,RAX
CALL 0x0011117c
LEA RSI,[0x11e3fa]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x001054d0
CMP EBP,0x4
JNC 0x001137ef
MOV EAX,EBP
LEA RCX,[0x12aa58]
MOV RSI,qword ptr [RCX + RAX*0x8]
LEA RCX,[0x1211c8]
MOV RDX,qword ptr [RCX + RAX*0x8]
MOV RDI,R12
CALL 0x001054d0
LAB_001137ef:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
MOV RDX,R15
MOV RCX,R14
CALL 0x00113912
ADD RBX,0x8
MOV RDI,RBX
CALL 0x00105630
TEST EAX,EAX
JNZ 0x001138b3
LEA RSI,[RSP + 0x40]
LAB_0011381b:
MOV RDI,RSP
CALL 0x00105670
MOV RSI,qword ptr [RSP]
MOV RDX,qword ptr [RSP + 0x8]
LAB_0011382c:
MOV RDI,qword ptr [0x0012afe8]
CALL 0x001054d0
MOV R14,RAX
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,R14
MOV ESI,0xa
CALL 0x00105430
MOVSX ESI,AL
MOV RDI,R14
CALL 0x00105030
MOV RDI,RAX
CALL 0x001052c0
LEA RAX,[RSP + 0x10]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0011387d
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x00105460
LAB_0011387d:
MOV RDI,RBX
CALL 0x00105340
MOV RSI,qword ptr [0x0012af60]
LEA RDI,[RSP + 0x28]
CALL 0x00105320
LEA RDI,[RSP + 0xa8]
CALL 0x00105130
LAB_001138a3:
ADD RSP,0x1b0
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001138b3:
MOV EDI,EAX
CALL 0x001052a0
LAB_001138ba:
MOV R14,RAX
JMP 0x001138e4
LAB_001138e4:
MOV RDI,RBX
CALL 0x00105340
LAB_001138ec:
MOV RSI,qword ptr [0x0012af60]
LEA RDI,[RSP + 0x28]
CALL 0x00105320
LEA RDI,[RSP + 0xa8]
CALL 0x00105130
MOV RDI,R14
CALL 0x00105740
|
/* void mcp::logger::log<char const (&) [48], int>(mcp::log_level, char const (&) [48], int&&) */
void __thiscall
mcp::logger::log<char_const(&)[48],int>(logger *this,uint param_2,char *param_3,int *param_4)
{
int iVar1;
tm *ptVar2;
ostream *poVar3;
int8 uVar4;
pthread_mutex_t *__mutex;
long *local_1d8;
long local_1d0;
long local_1c8 [2];
long local_1b8;
stringstream local_1b0 [16];
ostream local_1a0 [112];
ios_base local_130 [264];
if (*(int *)this <= (int)param_2) {
std::__cxx11::stringstream::stringstream(local_1b0);
local_1b8 = std::chrono::_V2::system_clock::now();
local_1b8 = local_1b8 / 1000000000;
ptVar2 = localtime(&local_1b8);
/* try { // try from 001137a4 to 00113801 has its CatchHandler @ 001138c1 */
poVar3 = std::operator<<(local_1a0,ptVar2,"%Y-%m-%d %H:%M:%S");
std::__ostream_insert<char,std::char_traits<char>>(poVar3," ",1);
if (param_2 < 4) {
std::__ostream_insert<char,std::char_traits<char>>
(local_1a0,(&PTR_DAT_0012aa58)[param_2],
*(long *)(&DAT_001211c8 + (ulong)param_2 * 8));
}
log_impl<char_const(&)[48],int>(this,local_1b0,param_3,param_4);
__mutex = (pthread_mutex_t *)(this + 8);
iVar1 = pthread_mutex_lock(__mutex);
if (iVar1 != 0) {
/* try { // try from 001138b3 to 001138b9 has its CatchHandler @ 001138bf */
uVar4 = std::__throw_system_error(iVar1);
/* catch() { ... } // from try @ 0011381b with catch @ 001138ba */
pthread_mutex_unlock(__mutex);
std::__cxx11::stringstream::~stringstream(local_1b0);
std::ios_base::~ios_base(local_130);
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar4);
}
/* try { // try from 0011381b to 00113822 has its CatchHandler @ 001138ba */
std::__cxx11::stringbuf::str();
/* try { // try from 0011382c to 00113861 has its CatchHandler @ 001138c6 */
poVar3 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_0012afe8,(char *)local_1d8,local_1d0);
std::ios::widen((char)*(int8 *)(*(long *)poVar3 + -0x18) + (char)poVar3);
std::ostream::put((char)poVar3);
std::ostream::flush();
if (local_1d8 != local_1c8) {
operator_delete(local_1d8,local_1c8[0] + 1);
}
pthread_mutex_unlock(__mutex);
std::__cxx11::stringstream::~stringstream(local_1b0);
std::ios_base::~ios_base(local_130);
}
return;
}
| |
55,145 | mi_dynmap_file | eloqsql/storage/myisam/mi_dynrec.c | my_bool mi_dynmap_file(MI_INFO *info, my_off_t size)
{
DBUG_ENTER("mi_dynmap_file");
if (size == 0 || size > (my_off_t) (~((size_t) 0)))
{
if (size)
DBUG_PRINT("warning", ("File is too large for mmap"));
else
DBUG_PRINT("warning", ("Do not mmap zero-length"));
DBUG_RETURN(1);
}
/*
I wonder if it is good to use MAP_NORESERVE. From the Linux man page:
MAP_NORESERVE
Do not reserve swap space for this mapping. When swap space is
reserved, one has the guarantee that it is possible to modify the
mapping. When swap space is not reserved one might get SIGSEGV
upon a write if no physical memory is available.
*/
info->s->file_map= (uchar*)
my_mmap(0, (size_t) size,
info->s->mode==O_RDONLY ? PROT_READ :
PROT_READ | PROT_WRITE,
MAP_SHARED | MAP_NORESERVE,
info->dfile, 0L);
if (info->s->file_map == (uchar*) MAP_FAILED)
{
info->s->file_map= NULL;
DBUG_RETURN(1);
}
#if defined(HAVE_MADVISE)
madvise((char*) info->s->file_map, size, MADV_RANDOM);
#endif
info->s->mmaped_length= (size_t) size;
info->s->file_read= mi_mmap_pread;
info->s->file_write= mi_mmap_pwrite;
DBUG_RETURN(0);
} | O3 | c | mi_dynmap_file:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movb $0x1, %r14b
testq %rsi, %rsi
je 0x79b93
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %rax
xorl %ecx, %ecx
cmpl $0x0, 0x358(%rax)
setne %cl
leal 0x1(,%rcx,2), %edx
movl 0x1c0(%rdi), %r8d
xorl %edi, %edi
movl $0x4001, %ecx # imm = 0x4001
xorl %r9d, %r9d
callq 0x295b0
movq (%rbx), %rcx
movq %rax, 0x270(%rcx)
movq (%rbx), %rax
movq 0x270(%rax), %rdi
cmpq $-0x1, %rdi
je 0x79b88
movq %r15, %rsi
movl $0x1, %edx
callq 0x29450
movq (%rbx), %rax
movq %r15, 0x4d0(%rax)
movq (%rbx), %rax
leaq 0x36(%rip), %rcx # 0x79ba1
movq %rcx, 0x2e0(%rax)
movq (%rbx), %rax
leaq 0x1f3(%rip), %rcx # 0x79d6f
movq %rcx, 0x2e8(%rax)
xorl %r14d, %r14d
jmp 0x79b93
movq $0x0, 0x270(%rax)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| mi_dynmap_file:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14b, 1
test rsi, rsi
jz loc_79B93
mov r15, rsi
mov rbx, rdi
mov rax, [rdi]
xor ecx, ecx
cmp dword ptr [rax+358h], 0
setnz cl
lea edx, ds:1[rcx*2]
mov r8d, [rdi+1C0h]
xor edi, edi
mov ecx, 4001h
xor r9d, r9d
call _mmap64
mov rcx, [rbx]
mov [rcx+270h], rax
mov rax, [rbx]
mov rdi, [rax+270h]
cmp rdi, 0FFFFFFFFFFFFFFFFh
jz short loc_79B88
mov rsi, r15
mov edx, 1
call _madvise
mov rax, [rbx]
mov [rax+4D0h], r15
mov rax, [rbx]
lea rcx, mi_mmap_pread
mov [rax+2E0h], rcx
mov rax, [rbx]
lea rcx, mi_mmap_pwrite
mov [rax+2E8h], rcx
xor r14d, r14d
jmp short loc_79B93
loc_79B88:
mov qword ptr [rax+270h], 0
loc_79B93:
mov eax, r14d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long mi_dynmap_file(unsigned int *a1, long long a2)
{
long long v2; // rax
unsigned int v3; // r14d
long long v5; // rax
long long v6; // rdi
LOBYTE(v3) = 1;
if ( a2 )
{
*(_QWORD *)(*(_QWORD *)a1 + 624LL) = mmap64(
0LL,
a2,
2 * (unsigned int)(*(_DWORD *)(*(_QWORD *)a1 + 856LL) != 0) + 1,
16385LL,
a1[112],
0LL,
v2);
v5 = *(_QWORD *)a1;
v6 = *(_QWORD *)(*(_QWORD *)a1 + 624LL);
if ( v6 == -1 )
{
*(_QWORD *)(v5 + 624) = 0LL;
}
else
{
madvise(v6, a2, 1LL);
*(_QWORD *)(*(_QWORD *)a1 + 1232LL) = a2;
*(_QWORD *)(*(_QWORD *)a1 + 736LL) = mi_mmap_pread;
*(_QWORD *)(*(_QWORD *)a1 + 744LL) = mi_mmap_pwrite;
return 0;
}
}
return v3;
}
| mi_dynmap_file:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14B,0x1
TEST RSI,RSI
JZ 0x00179b93
MOV R15,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
XOR ECX,ECX
CMP dword ptr [RAX + 0x358],0x0
SETNZ CL
LEA EDX,[0x1 + RCX*0x2]
MOV R8D,dword ptr [RDI + 0x1c0]
XOR EDI,EDI
MOV ECX,0x4001
XOR R9D,R9D
CALL 0x001295b0
MOV RCX,qword ptr [RBX]
MOV qword ptr [RCX + 0x270],RAX
MOV RAX,qword ptr [RBX]
MOV RDI,qword ptr [RAX + 0x270]
CMP RDI,-0x1
JZ 0x00179b88
MOV RSI,R15
MOV EDX,0x1
CALL 0x00129450
MOV RAX,qword ptr [RBX]
MOV qword ptr [RAX + 0x4d0],R15
MOV RAX,qword ptr [RBX]
LEA RCX,[0x179ba1]
MOV qword ptr [RAX + 0x2e0],RCX
MOV RAX,qword ptr [RBX]
LEA RCX,[0x179d6f]
MOV qword ptr [RAX + 0x2e8],RCX
XOR R14D,R14D
JMP 0x00179b93
LAB_00179b88:
MOV qword ptr [RAX + 0x270],0x0
LAB_00179b93:
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
ulong mi_dynmap_file(long *param_1,size_t param_2)
{
void *pvVar1;
int8 unaff_R14;
ulong uVar2;
uVar2 = CONCAT71((int7)((ulong)unaff_R14 >> 8),1);
if (param_2 != 0) {
pvVar1 = mmap64((void *)0x0,param_2,(uint)(*(int *)(*param_1 + 0x358) != 0) * 2 + 1,0x4001,
(int)param_1[0x38],0);
*(void **)(*param_1 + 0x270) = pvVar1;
pvVar1 = *(void **)(*param_1 + 0x270);
if (pvVar1 == (void *)0xffffffffffffffff) {
*(int8 *)(*param_1 + 0x270) = 0;
}
else {
madvise(pvVar1,param_2,1);
*(size_t *)(*param_1 + 0x4d0) = param_2;
*(code **)(*param_1 + 0x2e0) = mi_mmap_pread;
*(code **)(*param_1 + 0x2e8) = mi_mmap_pwrite;
uVar2 = 0;
}
}
return uVar2 & 0xffffffff;
}
| |
55,146 | my_time_init | eloqsql/mysys/my_getsystime.c | void my_time_init()
{
#ifdef _WIN32
compile_time_assert(sizeof(LARGE_INTEGER) ==
sizeof(query_performance_frequency));
QueryPerformanceFrequency((LARGE_INTEGER *)&query_performance_frequency);
DBUG_ASSERT(query_performance_frequency);
#endif
} | O0 | c | my_time_init:
pushq %rbp
movq %rsp, %rbp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_time_init:
push rbp
mov rbp, rsp
pop rbp
retn
| void my_time_init()
{
;
}
| my_time_init:
PUSH RBP
MOV RBP,RSP
POP RBP
RET
|
void my_time_init(void)
{
return;
}
| |
55,147 | ma_keyseg_read | eloqsql/storage/maria/ma_open.c | uchar *_ma_keyseg_read(uchar *ptr, HA_KEYSEG *keyseg)
{
keyseg->type = *ptr++;
keyseg->language = *ptr++;
keyseg->null_bit = *ptr++;
keyseg->bit_start = *ptr++;
keyseg->language += ((uint16) (*ptr++)) << 8;
keyseg->bit_length = *ptr++;
keyseg->flag = mi_uint2korr(ptr); ptr+= 2;
keyseg->length = mi_uint2korr(ptr); ptr+= 2;
keyseg->start = mi_uint4korr(ptr); ptr+= 4;
keyseg->null_pos = mi_uint4korr(ptr); ptr+= 4;
keyseg->charset=0; /* Will be filled in later */
if (keyseg->null_bit)
keyseg->bit_pos= (uint16)(keyseg->null_pos + (keyseg->null_bit == 7));
else
{
keyseg->bit_pos= (uint16)keyseg->null_pos;
keyseg->null_pos= 0;
}
return ptr;
} | O3 | c | ma_keyseg_read:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
movb (%rdi), %cl
movb %cl, 0x18(%rsi)
movzbl 0x1(%rdi), %edx
movw %dx, 0x16(%rsi)
movb 0x2(%rdi), %cl
movb %cl, 0x19(%rsi)
movb 0x3(%rdi), %dil
movb %dil, 0x1a(%rsi)
movzbl 0x4(%rax), %edi
shll $0x8, %edi
orl %edx, %edi
movw %di, 0x16(%rsi)
movb 0x5(%rax), %dl
movb %dl, 0x1b(%rsi)
movzwl 0x6(%rax), %edx
rolw $0x8, %dx
movw %dx, 0x12(%rsi)
movzwl 0x8(%rax), %edx
rolw $0x8, %dx
movw %dx, 0x14(%rsi)
movl 0xa(%rax), %edx
bswapl %edx
movl %edx, 0x8(%rsi)
movzwl 0x10(%rax), %edx
rolw $0x8, %dx
movzwl %dx, %edx
movzbl 0xf(%rax), %edi
shll $0x10, %edi
movzbl 0xe(%rax), %r8d
shll $0x18, %r8d
orl %edi, %r8d
orl %edx, %r8d
movl %r8d, 0xc(%rsi)
movq $0x0, (%rsi)
testb %cl, %cl
je 0x3aefc
xorl %edi, %edi
cmpb $0x7, %cl
sete %dil
addl %edi, %edx
jmp 0x3af03
movl $0x0, 0xc(%rsi)
movw %dx, 0x10(%rsi)
addq $0x12, %rax
popq %rbp
retq
| _ma_keyseg_read:
push rbp
mov rbp, rsp
mov rax, rdi
mov cl, [rdi]
mov [rsi+18h], cl
movzx edx, byte ptr [rdi+1]
mov [rsi+16h], dx
mov cl, [rdi+2]
mov [rsi+19h], cl
mov dil, [rdi+3]
mov [rsi+1Ah], dil
movzx edi, byte ptr [rax+4]
shl edi, 8
or edi, edx
mov [rsi+16h], di
mov dl, [rax+5]
mov [rsi+1Bh], dl
movzx edx, word ptr [rax+6]
rol dx, 8
mov [rsi+12h], dx
movzx edx, word ptr [rax+8]
rol dx, 8
mov [rsi+14h], dx
mov edx, [rax+0Ah]
bswap edx
mov [rsi+8], edx
movzx edx, word ptr [rax+10h]
rol dx, 8
movzx edx, dx
movzx edi, byte ptr [rax+0Fh]
shl edi, 10h
movzx r8d, byte ptr [rax+0Eh]
shl r8d, 18h
or r8d, edi
or r8d, edx
mov [rsi+0Ch], r8d
mov qword ptr [rsi], 0
test cl, cl
jz short loc_3AEFC
xor edi, edi
cmp cl, 7
setz dil
add edx, edi
jmp short loc_3AF03
loc_3AEFC:
mov dword ptr [rsi+0Ch], 0
loc_3AF03:
mov [rsi+10h], dx
add rax, 12h
pop rbp
retn
| long long ma_keyseg_read(long long a1, long long a2)
{
__int16 v2; // dx
char v3; // cl
unsigned __int16 v4; // dx
*(_BYTE *)(a2 + 24) = *(_BYTE *)a1;
v2 = *(unsigned __int8 *)(a1 + 1);
*(_WORD *)(a2 + 22) = v2;
v3 = *(_BYTE *)(a1 + 2);
*(_BYTE *)(a2 + 25) = v3;
*(_BYTE *)(a2 + 26) = *(_BYTE *)(a1 + 3);
*(_WORD *)(a2 + 22) = v2 | (*(unsigned __int8 *)(a1 + 4) << 8);
*(_BYTE *)(a2 + 27) = *(_BYTE *)(a1 + 5);
*(_WORD *)(a2 + 18) = __ROL2__(*(_WORD *)(a1 + 6), 8);
*(_WORD *)(a2 + 20) = __ROL2__(*(_WORD *)(a1 + 8), 8);
*(_DWORD *)(a2 + 8) = _byteswap_ulong(*(_DWORD *)(a1 + 10));
v4 = __ROL2__(*(_WORD *)(a1 + 16), 8);
*(_DWORD *)(a2 + 12) = v4 | (*(unsigned __int8 *)(a1 + 15) << 16) | (*(unsigned __int8 *)(a1 + 14) << 24);
*(_QWORD *)a2 = 0LL;
if ( v3 )
v4 += v3 == 7;
else
*(_DWORD *)(a2 + 12) = 0;
*(_WORD *)(a2 + 16) = v4;
return a1 + 18;
}
| _ma_keyseg_read:
PUSH RBP
MOV RBP,RSP
MOV RAX,RDI
MOV CL,byte ptr [RDI]
MOV byte ptr [RSI + 0x18],CL
MOVZX EDX,byte ptr [RDI + 0x1]
MOV word ptr [RSI + 0x16],DX
MOV CL,byte ptr [RDI + 0x2]
MOV byte ptr [RSI + 0x19],CL
MOV DIL,byte ptr [RDI + 0x3]
MOV byte ptr [RSI + 0x1a],DIL
MOVZX EDI,byte ptr [RAX + 0x4]
SHL EDI,0x8
OR EDI,EDX
MOV word ptr [RSI + 0x16],DI
MOV DL,byte ptr [RAX + 0x5]
MOV byte ptr [RSI + 0x1b],DL
MOVZX EDX,word ptr [RAX + 0x6]
ROL DX,0x8
MOV word ptr [RSI + 0x12],DX
MOVZX EDX,word ptr [RAX + 0x8]
ROL DX,0x8
MOV word ptr [RSI + 0x14],DX
MOV EDX,dword ptr [RAX + 0xa]
BSWAP EDX
MOV dword ptr [RSI + 0x8],EDX
MOVZX EDX,word ptr [RAX + 0x10]
ROL DX,0x8
MOVZX EDX,DX
MOVZX EDI,byte ptr [RAX + 0xf]
SHL EDI,0x10
MOVZX R8D,byte ptr [RAX + 0xe]
SHL R8D,0x18
OR R8D,EDI
OR R8D,EDX
MOV dword ptr [RSI + 0xc],R8D
MOV qword ptr [RSI],0x0
TEST CL,CL
JZ 0x0013aefc
XOR EDI,EDI
CMP CL,0x7
SETZ DIL
ADD EDX,EDI
JMP 0x0013af03
LAB_0013aefc:
MOV dword ptr [RSI + 0xc],0x0
LAB_0013af03:
MOV word ptr [RSI + 0x10],DX
ADD RAX,0x12
POP RBP
RET
|
int1 * _ma_keyseg_read(int1 *param_1,int8 *param_2)
{
char cVar1;
byte bVar2;
uint uVar3;
ushort uVar4;
*(int1 *)(param_2 + 3) = *param_1;
bVar2 = param_1[1];
*(ushort *)((long)param_2 + 0x16) = (ushort)bVar2;
cVar1 = param_1[2];
*(char *)((long)param_2 + 0x19) = cVar1;
*(int1 *)((long)param_2 + 0x1a) = param_1[3];
*(ushort *)((long)param_2 + 0x16) = CONCAT11(param_1[4],bVar2);
*(int1 *)((long)param_2 + 0x1b) = param_1[5];
*(ushort *)((long)param_2 + 0x12) = *(ushort *)(param_1 + 6) << 8 | *(ushort *)(param_1 + 6) >> 8;
*(ushort *)((long)param_2 + 0x14) = *(ushort *)(param_1 + 8) << 8 | *(ushort *)(param_1 + 8) >> 8;
uVar3 = *(uint *)(param_1 + 10);
*(uint *)(param_2 + 1) =
uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18;
uVar4 = *(ushort *)(param_1 + 0x10) << 8 | *(ushort *)(param_1 + 0x10) >> 8;
*(uint *)((long)param_2 + 0xc) =
(uint)(byte)param_1[0xe] << 0x18 | (uint)(byte)param_1[0xf] << 0x10 | (uint)uVar4;
*param_2 = 0;
if (cVar1 == '\0') {
*(int4 *)((long)param_2 + 0xc) = 0;
}
else {
uVar4 = uVar4 + (cVar1 == '\a');
}
*(ushort *)(param_2 + 2) = uVar4;
return param_1 + 0x12;
}
| |
55,148 | ftxui::ContainerBase::OnEvent(ftxui::Event) | Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/component/container.cpp | bool OnEvent(Event event) override {
if (event.is_mouse()) {
return OnMouseEvent(event);
}
if (!Focused()) {
return false;
}
if (ActiveChild() && ActiveChild()->OnEvent(event)) {
return true;
}
return EventHandler(event);
} | O3 | cpp | ftxui::ContainerBase::OnEvent(ftxui::Event):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xe0, %rsp
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x2, 0x8(%rsi)
jne 0x27bea
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
leaq 0xc0(%rsp), %rdi
movaps %xmm1, -0x10(%rdi)
movaps %xmm0, -0x20(%rdi)
leaq 0xd0(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
callq 0x11be0
movq (%rbx), %rax
leaq 0xa0(%rsp), %rsi
movq %rbx, %rdi
callq *0x48(%rax)
movl %eax, %ebp
movq 0xc0(%rsp), %rdi
cmpq %r15, %rdi
je 0x27ca8
movq (%r15), %rsi
incq %rsi
callq 0xb400
jmp 0x27ca8
movq %rbx, %rdi
callq 0x271c2
testb %al, %al
je 0x27c8a
movq (%rbx), %rax
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq *0x28(%rax)
cmpq $0x0, (%r15)
je 0x27c8e
movq (%rbx), %rax
movq %rsp, %rdi
movq %rbx, %rsi
callq *0x28(%rax)
movq (%rsp), %r15
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
leaq 0x40(%rsp), %rdi
movaps %xmm0, -0x20(%rdi)
movaps %xmm1, -0x10(%rdi)
leaq 0x50(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
callq 0x11be0
movq (%r15), %rax
leaq 0x20(%rsp), %rsi
movq %r15, %rdi
callq *0x18(%rax)
movl %eax, %r15d
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x27c79
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xb400
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x27c91
callq 0x14af8
jmp 0x27c91
xorl %ebp, %ebp
jmp 0x27ca8
xorl %r15d, %r15d
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x27ca0
callq 0x14af8
movb $0x1, %bpl
testb %r15b, %r15b
je 0x27cba
movl %ebp, %eax
addq $0xe0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
leaq 0x80(%rsp), %rdi
movaps %xmm1, -0x10(%rdi)
movaps %xmm0, -0x20(%rdi)
leaq 0x90(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
callq 0x11be0
movq (%rbx), %rax
leaq 0x60(%rsp), %rsi
movq %rbx, %rdi
callq *0x40(%rax)
movl %eax, %ebp
movq 0x80(%rsp), %rdi
jmp 0x27bd1
movq %rax, %rbx
movq 0x80(%rsp), %rdi
cmpq %r15, %rdi
je 0x27d8a
movq 0x90(%rsp), %rsi
jmp 0x27d82
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x27d45
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xb400
jmp 0x27d45
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x27d59
callq 0x14af8
jmp 0x27d59
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x27d8a
callq 0x14af8
jmp 0x27d8a
movq %rax, %rbx
movq 0xc0(%rsp), %rdi
cmpq %r15, %rdi
je 0x27d8a
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0xb400
movq %rbx, %rdi
callq 0xb780
| _ZN5ftxui13ContainerBase7OnEventENS_5EventE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 0E0h
mov r14, rsi
mov rbx, rdi
cmp dword ptr [rsi+8], 2
jnz short loc_27BEA
movups xmm0, xmmword ptr [r14]
movups xmm1, xmmword ptr [r14+10h]
lea rdi, [rsp+108h+var_48]
movaps xmmword ptr [rdi-10h], xmm1
movaps xmmword ptr [rdi-20h], xmm0
lea r15, [rsp+108h+var_38]
mov [r15-10h], r15
mov rsi, [r14+20h]
mov rdx, [r14+28h]
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)
mov rax, [rbx]
lea rsi, [rsp+108h+var_68]
mov rdi, rbx
call qword ptr [rax+48h]
mov ebp, eax
mov rdi, [rsp+108h+var_48]; void *
loc_27BD1:
cmp rdi, r15
jz loc_27CA8
mov rsi, [r15]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_27CA8
loc_27BEA:
mov rdi, rbx; this
call _ZNK5ftxui13ComponentBase7FocusedEv; ftxui::ComponentBase::Focused(void)
test al, al
jz loc_27C8A
mov rax, [rbx]
lea r15, [rsp+108h+var_F8]
mov rdi, r15
mov rsi, rbx
call qword ptr [rax+28h]
cmp qword ptr [r15], 0
jz short loc_27C8E
mov rax, [rbx]
mov rdi, rsp
mov rsi, rbx
call qword ptr [rax+28h]
mov r15, [rsp+108h+var_108]
movups xmm0, xmmword ptr [r14]
movups xmm1, xmmword ptr [r14+10h]
lea rdi, [rsp+108h+var_C8]
movaps xmmword ptr [rdi-20h], xmm0
movaps xmmword ptr [rdi-10h], xmm1
lea r12, [rsp+108h+var_B8]
mov [r12-10h], r12
mov rsi, [r14+20h]
mov rdx, [r14+28h]
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)
mov rax, [r15]
lea rsi, [rsp+108h+var_E8]
mov rdi, r15
call qword ptr [rax+18h]
mov r15d, eax
mov rdi, [rsp+108h+var_C8]; void *
cmp rdi, r12
jz short loc_27C79
mov rsi, [rsp+108h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_27C79:
mov rdi, [rsp+108h+var_100]
test rdi, rdi
jz short loc_27C91
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_27C91
loc_27C8A:
xor ebp, ebp
jmp short loc_27CA8
loc_27C8E:
xor r15d, r15d
loc_27C91:
mov rdi, [rsp+108h+var_F0]
test rdi, rdi
jz short loc_27CA0
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_27CA0:
mov bpl, 1
test r15b, r15b
jz short loc_27CBA
loc_27CA8:
mov eax, ebp
add rsp, 0E0h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_27CBA:
movups xmm0, xmmword ptr [r14]
movups xmm1, xmmword ptr [r14+10h]
lea rdi, [rsp+108h+var_88]
movaps xmmword ptr [rdi-10h], xmm1
movaps xmmword ptr [rdi-20h], xmm0
lea r15, [rsp+108h+var_78]
mov [r15-10h], r15
mov rsi, [r14+20h]
mov rdx, [r14+28h]
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)
mov rax, [rbx]
lea rsi, [rsp+108h+var_A8]
mov rdi, rbx
call qword ptr [rax+40h]
mov ebp, eax
mov rdi, [rsp+108h+var_88]
jmp loc_27BD1
mov rbx, rax
mov rdi, [rsp+arg_78]
cmp rdi, r15
jz short loc_27D8A
mov rsi, [rsp+arg_88]
jmp short loc_27D82
mov rbx, rax
mov rdi, [rsp+arg_38]; void *
cmp rdi, r12
jz short loc_27D45
mov rsi, [rsp+arg_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_27D45
mov rbx, rax
loc_27D45:
mov rdi, [rsp+arg_0]
test rdi, rdi
jz short loc_27D59
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_27D59
mov rbx, rax
loc_27D59:
mov rdi, [rsp+arg_10]
test rdi, rdi
jz short loc_27D8A
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_27D8A
mov rbx, rax
mov rdi, [rsp+arg_B8]; void *
cmp rdi, r15
jz short loc_27D8A
mov rsi, [rsp+arg_C8]
loc_27D82:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_27D8A:
mov rdi, rbx
call __Unwind_Resume
| long long ftxui::ContainerBase::OnEvent(ftxui::ComponentBase *this, __int128 *a2)
{
unsigned int v2; // ebp
__int128 v3; // xmm0
_QWORD *v4; // r15
_QWORD *v5; // rdi
long long v6; // r15
__int128 v7; // xmm1
char v8; // r15
__int128 v10; // xmm0
long long v11; // [rsp+0h] [rbp-108h] BYREF
volatile signed __int32 *v12; // [rsp+8h] [rbp-100h]
long long v13; // [rsp+10h] [rbp-F8h] BYREF
volatile signed __int32 *v14; // [rsp+18h] [rbp-F0h]
_OWORD v15[2]; // [rsp+20h] [rbp-E8h] BYREF
void *v16; // [rsp+40h] [rbp-C8h] BYREF
_QWORD v17[2]; // [rsp+50h] [rbp-B8h] BYREF
_OWORD v18[2]; // [rsp+60h] [rbp-A8h] BYREF
_QWORD *v19; // [rsp+80h] [rbp-88h] BYREF
_QWORD v20[2]; // [rsp+90h] [rbp-78h] BYREF
_OWORD v21[2]; // [rsp+A0h] [rbp-68h] BYREF
void *v22; // [rsp+C0h] [rbp-48h] BYREF
_QWORD v23[7]; // [rsp+D0h] [rbp-38h] BYREF
if ( *((_DWORD *)a2 + 2) == 2 )
{
v3 = *a2;
v21[1] = a2[1];
v21[0] = v3;
v4 = v23;
v22 = v23;
std::string::_M_construct<char *>((long long)&v22, *((_BYTE **)a2 + 4), *((_QWORD *)a2 + 4) + *((_QWORD *)a2 + 5));
v2 = (*(long long ( **)(ftxui::ComponentBase *, _OWORD *))(*(_QWORD *)this + 72LL))(this, v21);
v5 = v22;
goto LABEL_3;
}
if ( !(unsigned __int8)ftxui::ComponentBase::Focused(this) )
return 0;
(*(void ( **)(long long *, ftxui::ComponentBase *))(*(_QWORD *)this + 40LL))(&v13, this);
if ( v13 )
{
(*(void ( **)(long long *, ftxui::ComponentBase *))(*(_QWORD *)this + 40LL))(&v11, this);
v6 = v11;
v7 = a2[1];
v15[0] = *a2;
v15[1] = v7;
v16 = v17;
std::string::_M_construct<char *>((long long)&v16, *((_BYTE **)a2 + 4), *((_QWORD *)a2 + 4) + *((_QWORD *)a2 + 5));
v8 = (*(long long ( **)(long long, _OWORD *))(*(_QWORD *)v6 + 24LL))(v6, v15);
if ( v16 != v17 )
operator delete(v16, v17[0] + 1LL);
if ( v12 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v12);
}
else
{
v8 = 0;
}
if ( v14 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14);
LOBYTE(v2) = 1;
if ( !v8 )
{
v10 = *a2;
v18[1] = a2[1];
v18[0] = v10;
v4 = v20;
v19 = v20;
std::string::_M_construct<char *>((long long)&v19, *((_BYTE **)a2 + 4), *((_QWORD *)a2 + 4) + *((_QWORD *)a2 + 5));
v2 = (*(long long ( **)(ftxui::ComponentBase *, _OWORD *))(*(_QWORD *)this + 64LL))(this, v18);
v5 = v19;
LABEL_3:
if ( v5 != v4 )
operator delete(v5, *v4 + 1LL);
}
return v2;
}
| OnEvent:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0xe0
MOV R14,RSI
MOV RBX,RDI
CMP dword ptr [RSI + 0x8],0x2
JNZ 0x00127bea
MOVUPS XMM0,xmmword ptr [R14]
MOVUPS XMM1,xmmword ptr [R14 + 0x10]
LEA RDI,[RSP + 0xc0]
MOVAPS xmmword ptr [RDI + -0x10],XMM1
MOVAPS xmmword ptr [RDI + -0x20],XMM0
LEA R15,[RSP + 0xd0]
MOV qword ptr [R15 + -0x10],R15
MOV RSI,qword ptr [R14 + 0x20]
MOV RDX,qword ptr [R14 + 0x28]
ADD RDX,RSI
CALL 0x00111be0
MOV RAX,qword ptr [RBX]
LAB_00127bb9:
LEA RSI,[RSP + 0xa0]
MOV RDI,RBX
CALL qword ptr [RAX + 0x48]
LAB_00127bc7:
MOV EBP,EAX
MOV RDI,qword ptr [RSP + 0xc0]
LAB_00127bd1:
CMP RDI,R15
JZ 0x00127ca8
MOV RSI,qword ptr [R15]
INC RSI
CALL 0x0010b400
JMP 0x00127ca8
LAB_00127bea:
MOV RDI,RBX
CALL 0x001271c2
TEST AL,AL
JZ 0x00127c8a
MOV RAX,qword ptr [RBX]
LEA R15,[RSP + 0x10]
MOV RDI,R15
MOV RSI,RBX
CALL qword ptr [RAX + 0x28]
CMP qword ptr [R15],0x0
JZ 0x00127c8e
MOV RAX,qword ptr [RBX]
LAB_00127c14:
MOV RDI,RSP
MOV RSI,RBX
CALL qword ptr [RAX + 0x28]
MOV R15,qword ptr [RSP]
MOVUPS XMM0,xmmword ptr [R14]
MOVUPS XMM1,xmmword ptr [R14 + 0x10]
LEA RDI,[RSP + 0x40]
MOVAPS xmmword ptr [RDI + -0x20],XMM0
MOVAPS xmmword ptr [RDI + -0x10],XMM1
LEA R12,[RSP + 0x50]
MOV qword ptr [R12 + -0x10],R12
MOV RSI,qword ptr [R14 + 0x20]
MOV RDX,qword ptr [R14 + 0x28]
ADD RDX,RSI
LAB_00127c4c:
CALL 0x00111be0
MOV RAX,qword ptr [R15]
LAB_00127c54:
LEA RSI,[RSP + 0x20]
MOV RDI,R15
CALL qword ptr [RAX + 0x18]
LAB_00127c5f:
MOV R15D,EAX
MOV RDI,qword ptr [RSP + 0x40]
CMP RDI,R12
JZ 0x00127c79
MOV RSI,qword ptr [RSP + 0x50]
INC RSI
CALL 0x0010b400
LAB_00127c79:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x00127c91
CALL 0x00114af8
JMP 0x00127c91
LAB_00127c8a:
XOR EBP,EBP
JMP 0x00127ca8
LAB_00127c8e:
XOR R15D,R15D
LAB_00127c91:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x00127ca0
CALL 0x00114af8
LAB_00127ca0:
MOV BPL,0x1
TEST R15B,R15B
JZ 0x00127cba
LAB_00127ca8:
MOV EAX,EBP
ADD RSP,0xe0
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00127cba:
MOVUPS XMM0,xmmword ptr [R14]
MOVUPS XMM1,xmmword ptr [R14 + 0x10]
LEA RDI,[RSP + 0x80]
MOVAPS xmmword ptr [RDI + -0x10],XMM1
MOVAPS xmmword ptr [RDI + -0x20],XMM0
LEA R15,[RSP + 0x90]
MOV qword ptr [R15 + -0x10],R15
MOV RSI,qword ptr [R14 + 0x20]
MOV RDX,qword ptr [R14 + 0x28]
ADD RDX,RSI
CALL 0x00111be0
MOV RAX,qword ptr [RBX]
LAB_00127cf2:
LEA RSI,[RSP + 0x60]
MOV RDI,RBX
CALL qword ptr [RAX + 0x40]
LAB_00127cfd:
MOV EBP,EAX
MOV RDI,qword ptr [RSP + 0x80]
JMP 0x00127bd1
|
/* ftxui::ContainerBase::OnEvent(ftxui::Event) */
ulong __thiscall ftxui::ContainerBase::OnEvent(ContainerBase *this,int4 *param_2)
{
char cVar1;
uint uVar2;
int8 unaff_RBP;
ulong uVar3;
long *plVar4;
long *plVar5;
long *local_108;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_100;
long local_f8;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_f0;
int4 local_e8;
int4 uStack_e4;
int4 uStack_e0;
int4 uStack_dc;
int4 local_d8;
int4 uStack_d4;
int4 uStack_d0;
int4 uStack_cc;
long *local_c8 [2];
long local_b8 [2];
int4 local_a8;
int4 uStack_a4;
int4 uStack_a0;
int4 uStack_9c;
int4 local_98;
int4 uStack_94;
int4 uStack_90;
int4 uStack_8c;
long *local_88 [2];
long local_78 [2];
int4 local_68;
int4 uStack_64;
int4 uStack_60;
int4 uStack_5c;
int4 local_58;
int4 uStack_54;
int4 uStack_50;
int4 uStack_4c;
long *local_48 [2];
long local_38 [2];
if (param_2[2] == 2) {
local_68 = *param_2;
uStack_64 = param_2[1];
uStack_60 = param_2[2];
uStack_5c = param_2[3];
local_58 = param_2[4];
uStack_54 = param_2[5];
uStack_50 = param_2[6];
uStack_4c = param_2[7];
plVar5 = local_38;
local_48[0] = plVar5;
std::__cxx11::string::_M_construct<char*>
(local_48,*(long *)(param_2 + 8),*(long *)(param_2 + 10) + *(long *)(param_2 + 8));
/* try { // try from 00127bb9 to 00127bc6 has its CatchHandler @ 00127d6a */
uVar2 = (**(code **)(*(long *)this + 0x48))(this,&local_68);
plVar4 = local_48[0];
}
else {
cVar1 = ComponentBase::Focused((ComponentBase *)this);
if (cVar1 == '\0') {
uVar3 = 0;
goto LAB_00127ca8;
}
(**(code **)(*(long *)this + 0x28))(&local_f8,this);
if (local_f8 == 0) {
cVar1 = '\0';
}
else {
/* try { // try from 00127c14 to 00127c1c has its CatchHandler @ 00127d56 */
(**(code **)(*(long *)this + 0x28))(&local_108,this);
local_e8 = *param_2;
uStack_e4 = param_2[1];
uStack_e0 = param_2[2];
uStack_dc = param_2[3];
local_d8 = param_2[4];
uStack_d4 = param_2[5];
uStack_d0 = param_2[6];
uStack_cc = param_2[7];
local_c8[0] = local_b8;
/* try { // try from 00127c4c to 00127c50 has its CatchHandler @ 00127d42 */
std::__cxx11::string::_M_construct<char*>
(local_c8,*(long *)(param_2 + 8),*(long *)(param_2 + 10) + *(long *)(param_2 + 8));
/* try { // try from 00127c54 to 00127c5e has its CatchHandler @ 00127d26 */
cVar1 = (**(code **)(*local_108 + 0x18))(local_108,&local_e8);
if (local_c8[0] != local_b8) {
operator_delete(local_c8[0],local_b8[0] + 1);
}
if (local_100 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_100);
}
}
if (local_f0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_f0);
}
uVar3 = CONCAT71((int7)((ulong)unaff_RBP >> 8),1);
if (cVar1 != '\0') goto LAB_00127ca8;
local_a8 = *param_2;
uStack_a4 = param_2[1];
uStack_a0 = param_2[2];
uStack_9c = param_2[3];
local_98 = param_2[4];
uStack_94 = param_2[5];
uStack_90 = param_2[6];
uStack_8c = param_2[7];
plVar5 = local_78;
local_88[0] = plVar5;
std::__cxx11::string::_M_construct<char*>
(local_88,*(long *)(param_2 + 8),*(long *)(param_2 + 10) + *(long *)(param_2 + 8));
/* try { // try from 00127cf2 to 00127cfc has its CatchHandler @ 00127d0c */
uVar2 = (**(code **)(*(long *)this + 0x40))(this,&local_a8);
plVar4 = local_88[0];
}
uVar3 = (ulong)uVar2;
if (plVar4 != plVar5) {
operator_delete(plVar4,*plVar5 + 1);
}
LAB_00127ca8:
return uVar3 & 0xffffffff;
}
| |
55,149 | my_strndup | eloqsql/mysys/my_malloc.c | char *my_strndup(PSI_memory_key key, const char *from, size_t length, myf my_flags)
{
char *ptr;
DBUG_ENTER("my_strndup");
if ((ptr= (char*) my_malloc(key, length+1, my_flags)))
{
memcpy(ptr, from, length);
ptr[length]= 0;
}
DBUG_RETURN(ptr);
} | O0 | c | my_strndup:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl -0x4(%rbp), %edi
movq -0x18(%rbp), %rsi
addq $0x1, %rsi
movq -0x20(%rbp), %rdx
callq 0xbe600
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0xbeb42
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x270d0
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movb $0x0, (%rax,%rcx)
jmp 0xbeb44
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_strndup:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov edi, [rbp+var_4]
mov rsi, [rbp+var_18]
add rsi, 1
mov rdx, [rbp+var_20]
call my_malloc
mov [rbp+var_28], rax
cmp rax, 0
jz short loc_BEB42
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call _memcpy
mov rax, [rbp+var_28]
mov rcx, [rbp+var_18]
mov byte ptr [rax+rcx], 0
loc_BEB42:
jmp short $+2
loc_BEB44:
mov rax, [rbp+var_28]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
add rsp, 30h
pop rbp
retn
| long long my_strndup(unsigned int a1, long long a2, long long a3, int a4)
{
long long v5; // [rsp+8h] [rbp-28h]
v5 = my_malloc(a1, (const char *)(a3 + 1), a4);
if ( v5 )
{
memcpy(v5, a2, a3);
*(_BYTE *)(v5 + a3) = 0;
}
return v5;
}
| my_strndup:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x1
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x001be600
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
JZ 0x001beb42
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x001270d0
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + RCX*0x1],0x0
LAB_001beb42:
JMP 0x001beb44
LAB_001beb44:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x30
POP RBP
RET
|
void * my_strndup(int4 param_1,void *param_2,size_t param_3,int8 param_4)
{
void *__dest;
__dest = (void *)my_malloc(param_1,param_3 + 1,param_4);
if (__dest != (void *)0x0) {
memcpy(__dest,param_2,param_3);
*(int1 *)((long)__dest + param_3) = 0;
}
return __dest;
}
| |
55,150 | Field_enum::get_copy_func(Field const*) const | eloqsql/sql/field.h | Copy_func *get_copy_func(const Field *from) const override
{
if (eq_def(from))
return get_identical_copy_func();
if (real_type() == MYSQL_TYPE_ENUM &&
from->real_type() == MYSQL_TYPE_ENUM)
return do_field_enum;
if (from->result_type() == STRING_RESULT)
return do_field_string;
return do_field_int;
} | O0 | c | Field_enum::get_copy_func(Field const*) const:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movq -0x18(%rbp), %rsi
movq (%rdi), %rax
callq *0x108(%rax)
testb $0x1, %al
jne 0xc0acfb
jmp 0xc0ad0a
movq -0x20(%rbp), %rdi
callq 0xc0dd80
movq %rax, -0x8(%rbp)
jmp 0xc0ad65
movq -0x20(%rbp), %rdi
movq (%rdi), %rax
callq *0x1c0(%rax)
cmpl $0xf7, %eax
jne 0xc0ad3f
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *0x1c0(%rax)
cmpl $0xf7, %eax
jne 0xc0ad3f
leaq 0x2257(%rip), %rax # 0xc0cf90
movq %rax, -0x8(%rbp)
jmp 0xc0ad65
movq -0x18(%rbp), %rdi
callq 0xa20910
cmpl $0x0, %eax
jne 0xc0ad5a
leaq 0x20bc(%rip), %rax # 0xc0ce10
movq %rax, -0x8(%rbp)
jmp 0xc0ad65
leaq 0x227f(%rip), %rax # 0xc0cfe0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
| _ZNK10Field_enum13get_copy_funcEPK5Field:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rdi, [rbp+var_10]
mov [rbp+var_20], rdi
mov rsi, [rbp+var_18]
mov rax, [rdi]
call qword ptr [rax+108h]
test al, 1
jnz short loc_C0ACFB
jmp short loc_C0AD0A
loc_C0ACFB:
mov rdi, [rbp+var_20]; this
call _ZNK5Field23get_identical_copy_funcEv; Field::get_identical_copy_func(void)
mov [rbp+var_8], rax
jmp short loc_C0AD65
loc_C0AD0A:
mov rdi, [rbp+var_20]
mov rax, [rdi]
call qword ptr [rax+1C0h]
cmp eax, 0F7h
jnz short loc_C0AD3F
mov rdi, [rbp+var_18]
mov rax, [rdi]
call qword ptr [rax+1C0h]
cmp eax, 0F7h
jnz short loc_C0AD3F
lea rax, _ZN10Field_enum13do_field_enumEP10Copy_field; Field_enum::do_field_enum(Copy_field *)
mov [rbp+var_8], rax
jmp short loc_C0AD65
loc_C0AD3F:
mov rdi, [rbp+var_18]; this
call _ZNK5Field11result_typeEv; Field::result_type(void)
cmp eax, 0
jnz short loc_C0AD5A
lea rax, _ZN5Field15do_field_stringEP10Copy_field; Field::do_field_string(Copy_field *)
mov [rbp+var_8], rax
jmp short loc_C0AD65
loc_C0AD5A:
lea rax, _ZN5Field12do_field_intEP10Copy_field; Field::do_field_int(Copy_field *)
mov [rbp+var_8], rax
loc_C0AD65:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| long long ( * Field_enum::get_copy_func(
Field_enum *this,
const Field *a2))(Field *__hidden this, Copy_field *)
{
if ( ((*(long long ( **)(Field_enum *, const Field *))(*(_QWORD *)this + 264LL))(this, a2) & 1) != 0 )
return (long long ( *)(Field *__hidden, Copy_field *))Field::get_identical_copy_func(this);
if ( (*(unsigned int ( **)(Field_enum *))(*(_QWORD *)this + 448LL))(this) == 247
&& (*(unsigned int ( **)(const Field *))(*(_QWORD *)a2 + 448LL))(a2) == 247 )
{
return Field_enum::do_field_enum;
}
if ( (unsigned int)Field::result_type(a2) )
return Field::do_field_int;
return Field::do_field_string;
}
| Item_datetime_typecast_fix_length_and_dec:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
JMP 0x00c0acde
LAB_00c0acde:
MOV AL,0x1
AND AL,0x1
POP RBP
RET
|
/* Type_handler_row::Item_datetime_typecast_fix_length_and_dec(Item_datetime_typecast*) const */
int1
Type_handler_row::Item_datetime_typecast_fix_length_and_dec(Item_datetime_typecast *param_1)
{
return 1;
}
| |
55,151 | mp_div_dec | bluesky950520[P]quickjs/libbf.c | static int mp_div_dec(bf_context_t *s, limb_t *tabq,
limb_t *taba, mp_size_t na,
const limb_t *tabb1, mp_size_t nb)
{
limb_t base = BF_DEC_BASE;
limb_t r, mult, t0, t1, a, c, q, v, *tabb;
mp_size_t i, j;
limb_t static_tabb[DIV_STATIC_ALLOC_LEN];
#ifdef DEBUG_DIV_SLOW
mp_print_str_dec("a", taba, na);
mp_print_str_dec("b", tabb1, nb);
#endif
/* normalize tabb */
r = tabb1[nb - 1];
assert(r != 0);
i = na - nb;
if (r >= BF_DEC_BASE / 2) {
mult = 1;
tabb = (limb_t *)tabb1;
q = 1;
for(j = nb - 1; j >= 0; j--) {
if (taba[i + j] != tabb[j]) {
if (taba[i + j] < tabb[j])
q = 0;
break;
}
}
tabq[i] = q;
if (q) {
mp_sub_dec(taba + i, taba + i, tabb, nb, 0);
}
i--;
} else {
mult = base / (r + 1);
if (likely(nb <= DIV_STATIC_ALLOC_LEN)) {
tabb = static_tabb;
} else {
tabb = bf_malloc(s, sizeof(limb_t) * nb);
if (!tabb)
return -1;
}
mp_mul1_dec(tabb, tabb1, nb, mult, 0);
taba[na] = mp_mul1_dec(taba, taba, na, mult, 0);
}
#ifdef DEBUG_DIV_SLOW
printf("mult=" FMT_LIMB "\n", mult);
mp_print_str_dec("a_norm", taba, na + 1);
mp_print_str_dec("b_norm", tabb, nb);
#endif
for(; i >= 0; i--) {
if (unlikely(taba[i + nb] >= tabb[nb - 1])) {
/* XXX: check if it is really possible */
q = base - 1;
} else {
muldq(t1, t0, taba[i + nb], base);
adddq(t1, t0, 0, taba[i + nb - 1]);
divdq(q, r, t1, t0, tabb[nb - 1]);
}
// printf("i=%d q1=%ld\n", i, q);
r = mp_sub_mul1_dec(taba + i, tabb, nb, q);
// mp_dump("r1", taba + i, nb, bd);
// printf("r2=%ld\n", r);
v = taba[i + nb];
a = v - r;
c = a > v;
if (c)
a += base;
taba[i + nb] = a;
if (c != 0) {
/* negative result */
for(;;) {
q--;
c = mp_add_dec(taba + i, taba + i, tabb, nb, 0);
/* propagate carry and test if positive result */
if (c != 0) {
if (++taba[i + nb] == base) {
break;
}
}
}
}
tabq[i] = q;
}
#ifdef DEBUG_DIV_SLOW
mp_print_str_dec("q", tabq, na - nb + 1);
mp_print_str_dec("r", taba, nb);
#endif
/* remove the normalization */
if (mult != 1) {
mp_div1_dec(taba, taba, nb, mult, 0);
if (unlikely(tabb != static_tabb))
bf_free(s, tabb);
}
return 0;
} | O1 | c | mp_div_dec:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %r9, %r15
movq %r8, %r14
movq %rcx, %rbx
movq %rdx, (%rsp)
movq %rsi, 0x18(%rsp)
movq -0x8(%r8,%r9,8), %rcx
movq %rbx, %r8
subq %r9, %r8
movabsq $0x4563918244f40000, %rax # imm = 0x4563918244F40000
movabsq $-0x7538dcfb76180000, %rbp # imm = 0x8AC7230489E80000
cmpq %rax, %rcx
movq %rdi, 0x20(%rsp)
jb 0x92b49
testq %r15, %r15
jle 0x92afd
movq (%rsp), %rax
leaq (%rax,%rbx,8), %rax
addq $-0x8, %rax
movq %r15, %rcx
movq -0x8(%r14,%rcx,8), %rdx
cmpq %rdx, (%rax)
jne 0x92bb1
addq $-0x8, %rax
decq %rcx
jg 0x92ae6
movq 0x18(%rsp), %rax
movq $0x1, (%rax,%r8,8)
testq %r15, %r15
jle 0x92bc6
movq (%rsp), %rax
leaq (%rax,%r8,8), %rax
xorl %ecx, %ecx
xorl %edx, %edx
movq (%rax,%rcx,8), %rsi
addq (%r14,%rcx,8), %rdx
xorl %edi, %edi
subq %rdx, %rsi
setb %dil
leaq (%rsi,%rbp), %rdx
cmovaeq %rsi, %rdx
movq %rdx, (%rax,%rcx,8)
incq %rcx
movq %rdi, %rdx
cmpq %rcx, %r15
jne 0x92b1f
jmp 0x92bc6
movq %r8, 0x8(%rsp)
incq %rcx
movabsq $-0x7538dcfb76180000, %rax # imm = 0x8AC7230489E80000
xorl %edx, %edx
divq %rcx
cmpq $0x11, %r15
movq %rax, 0x10(%rsp)
jge 0x92d28
movq %rax, %rcx
leaq 0x30(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %rcx, %r12
xorl %r8d, %r8d
callq 0x8d975
movq (%rsp), %r14
movq %r14, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x8d975
movq %rax, (%r14,%rbx,8)
movq %r13, %r14
movq 0x8(%rsp), %r8
jmp 0x92bd3
setae %al
movzbl %al, %eax
movq 0x18(%rsp), %rcx
movq %rax, (%rcx,%r8,8)
jae 0x92b0a
decq %r8
movl $0x1, %eax
movq %rax, 0x10(%rsp)
testq %r8, %r8
js 0x92ce9
movq (%rsp), %rax
leaq (%rax,%r15,8), %r12
leaq (%rax,%r8,8), %r13
leaq -0x1(%rbp), %rax
movq %rax, 0x28(%rsp)
movabsq $0x7538dcfb76180000, %rbp # imm = 0x7538DCFB76180000
movq (%r12,%r8,8), %rax
movq -0x8(%r14,%r15,8), %rcx
movq 0x28(%rsp), %rbx
cmpq %rcx, %rax
movq %r8, 0x8(%rsp)
jae 0x92c41
movabsq $-0x7538dcfb76180000, %rdx # imm = 0x8AC7230489E80000
mulq %rdx
addq -0x8(%r12,%r8,8), %rax
adcq $0x0, %rdx
movq %rax, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
xorl %ecx, %ecx
callq 0x9a920
movq 0x8(%rsp), %r8
movq %rax, %rbx
movq (%rsp), %rax
leaq (%rax,%r8,8), %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x8dad4
movq 0x8(%rsp), %r8
movq (%r12,%r8,8), %rcx
subq %rax, %rcx
movabsq $-0x7538dcfb76180000, %rdx # imm = 0x8AC7230489E80000
leaq (%rcx,%rdx), %rax
cmovaeq %rcx, %rax
movq %rax, (%r12,%r8,8)
jae 0x92ccc
movq %rdx, %r9
decq %rbx
testq %r15, %r15
jle 0x92c7e
xorl %eax, %eax
xorl %edx, %edx
movq (%r13,%rax,8), %rcx
addq %rcx, %rdx
addq (%r14,%rax,8), %rdx
leaq (%rdx,%rbp), %rsi
xorl %edi, %edi
cmpq %rcx, %rsi
setbe %dil
cmovbeq %rsi, %rdx
movq %rdx, (%r13,%rax,8)
incq %rax
movq %rdi, %rdx
cmpq %rax, %r15
jne 0x92c8a
cmpq %rcx, %rsi
ja 0x92c7e
movq (%r12,%r8,8), %rax
incq %rax
movq %rax, (%r12,%r8,8)
cmpq %r9, %rax
jne 0x92c7e
movq 0x18(%rsp), %rax
movq %rbx, (%rax,%r8,8)
leaq -0x1(%r8), %rax
addq $-0x8, %r13
testq %r8, %r8
movq %rax, %r8
jg 0x92bfb
xorl %ebx, %ebx
movq 0x10(%rsp), %rcx
cmpq $0x1, %rcx
je 0x92d14
xorl %ebx, %ebx
movq (%rsp), %rdi
movq %rdi, %rsi
movq %r15, %rdx
xorl %r8d, %r8d
callq 0x8dc2e
leaq 0x30(%rsp), %rax
cmpq %rax, %r14
jne 0x92d55
movl %ebx, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdi, %r12
leaq (,%r15,8), %rdx
movq (%rdi), %rdi
xorl %esi, %esi
callq *0x8(%r12)
movq 0x10(%rsp), %rcx
movq %rax, %r13
testq %rax, %rax
jne 0x92b77
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
jmp 0x92d14
testq %r14, %r14
je 0x92d14
movq 0x20(%rsp), %rax
movq (%rax), %rdi
xorl %ebx, %ebx
movq %r14, %rsi
xorl %edx, %edx
callq *0x8(%rax)
jmp 0x92d14
| mp_div_dec:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0B8h
mov r15, r9
mov r14, r8
mov rbx, rcx
mov [rsp+0E8h+var_E8], rdx
mov [rsp+0E8h+var_D0], rsi
mov rcx, [r8+r9*8-8]
mov r8, rbx
sub r8, r9
mov rax, 4563918244F40000h
mov rbp, 8AC7230489E80000h
cmp rcx, rax
mov [rsp+0E8h+var_C8], rdi
jb short loc_92B49
test r15, r15
jle short loc_92AFD
mov rax, [rsp+0E8h+var_E8]
lea rax, [rax+rbx*8]
add rax, 0FFFFFFFFFFFFFFF8h
mov rcx, r15
loc_92AE6:
mov rdx, [r14+rcx*8-8]
cmp [rax], rdx
jnz loc_92BB1
add rax, 0FFFFFFFFFFFFFFF8h
dec rcx
jg short loc_92AE6
loc_92AFD:
mov rax, [rsp+0E8h+var_D0]
mov qword ptr [rax+r8*8], 1
loc_92B0A:
test r15, r15
jle loc_92BC6
mov rax, [rsp+0E8h+var_E8]
lea rax, [rax+r8*8]
xor ecx, ecx
xor edx, edx
loc_92B1F:
mov rsi, [rax+rcx*8]
add rdx, [r14+rcx*8]
xor edi, edi
sub rsi, rdx
setb dil
lea rdx, [rsi+rbp]
cmovnb rdx, rsi
mov [rax+rcx*8], rdx
inc rcx
mov rdx, rdi
cmp r15, rcx
jnz short loc_92B1F
jmp short loc_92BC6
loc_92B49:
mov [rsp+0E8h+var_E0], r8
inc rcx
mov rax, 8AC7230489E80000h
xor edx, edx
div rcx
cmp r15, 11h
mov [rsp+0E8h+var_D8], rax
jge loc_92D28
mov rcx, rax
lea r13, [rsp+0E8h+var_B8]
loc_92B77:
mov rdi, r13
mov rsi, r14
mov rdx, r15
mov r12, rcx
xor r8d, r8d
call mp_mul1_dec
mov r14, [rsp+0E8h+var_E8]
mov rdi, r14
mov rsi, r14
mov rdx, rbx
mov rcx, r12
xor r8d, r8d
call mp_mul1_dec
mov [r14+rbx*8], rax
mov r14, r13
mov r8, [rsp+0E8h+var_E0]
jmp short loc_92BD3
loc_92BB1:
setnb al
movzx eax, al
mov rcx, [rsp+0E8h+var_D0]
mov [rcx+r8*8], rax
jnb loc_92B0A
loc_92BC6:
dec r8
mov eax, 1
mov [rsp+0E8h+var_D8], rax
loc_92BD3:
test r8, r8
js loc_92CE9
mov rax, [rsp+0E8h+var_E8]
lea r12, [rax+r15*8]
lea r13, [rax+r8*8]
lea rax, [rbp-1]
mov [rsp+0E8h+var_C0], rax
mov rbp, 7538DCFB76180000h
loc_92BFB:
mov rax, [r12+r8*8]
mov rcx, [r14+r15*8-8]
mov rbx, [rsp+0E8h+var_C0]
cmp rax, rcx
mov [rsp+0E8h+var_E0], r8
jnb short loc_92C41
mov rdx, 8AC7230489E80000h
mul rdx
add rax, [r12+r8*8-8]
adc rdx, 0
mov rdi, rax
mov rsi, rdx
mov rdx, rcx
xor ecx, ecx
call __udivti3
mov r8, [rsp+0E8h+var_E0]
mov rbx, rax
loc_92C41:
mov rax, [rsp+0E8h+var_E8]
lea rdi, [rax+r8*8]
mov rsi, r14
mov rdx, r15
mov rcx, rbx
call mp_sub_mul1_dec
mov r8, [rsp+0E8h+var_E0]
mov rcx, [r12+r8*8]
sub rcx, rax
mov rdx, 8AC7230489E80000h
lea rax, [rcx+rdx]
cmovnb rax, rcx
mov [r12+r8*8], rax
jnb short loc_92CCC
mov r9, rdx
loc_92C7E:
dec rbx
test r15, r15
jle short loc_92C7E
xor eax, eax
xor edx, edx
loc_92C8A:
mov rcx, [r13+rax*8+0]
add rdx, rcx
add rdx, [r14+rax*8]
lea rsi, [rdx+rbp]
xor edi, edi
cmp rsi, rcx
setbe dil
cmovbe rdx, rsi
mov [r13+rax*8+0], rdx
inc rax
mov rdx, rdi
cmp r15, rax
jnz short loc_92C8A
cmp rsi, rcx
ja short loc_92C7E
mov rax, [r12+r8*8]
inc rax
mov [r12+r8*8], rax
cmp rax, r9
jnz short loc_92C7E
loc_92CCC:
mov rax, [rsp+0E8h+var_D0]
mov [rax+r8*8], rbx
lea rax, [r8-1]
add r13, 0FFFFFFFFFFFFFFF8h
test r8, r8
mov r8, rax
jg loc_92BFB
loc_92CE9:
xor ebx, ebx
mov rcx, [rsp+0E8h+var_D8]
cmp rcx, 1
jz short loc_92D14
xor ebx, ebx
mov rdi, [rsp+0E8h+var_E8]
mov rsi, rdi
mov rdx, r15
xor r8d, r8d
call mp_div1_dec
lea rax, [rsp+0E8h+var_B8]
cmp r14, rax
jnz short loc_92D55
loc_92D14:
mov eax, ebx
add rsp, 0B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_92D28:
mov r12, rdi
lea rdx, ds:0[r15*8]
mov rdi, [rdi]
xor esi, esi
call qword ptr [r12+8]
mov rcx, [rsp+0E8h+var_D8]
mov r13, rax
test rax, rax
jnz loc_92B77
mov ebx, 0FFFFFFFFh
jmp short loc_92D14
loc_92D55:
test r14, r14
jz short loc_92D14
mov rax, [rsp+0E8h+var_C8]
mov rdi, [rax]
xor ebx, ebx
mov rsi, r14
xor edx, edx
call qword ptr [rax+8]
jmp short loc_92D14
| long long mp_div_dec(_QWORD *a1, long long a2, long long a3, long long a4, _BYTE *a5, long long a6)
{
_BYTE *v7; // r14
unsigned long long v9; // rcx
long long v10; // r8
unsigned long long *v11; // rax
long long v12; // rcx
unsigned long long v13; // rdx
bool v14; // cf
long long v16; // rax
long long v17; // rcx
_BOOL8 v18; // rdx
unsigned long long v19; // rsi
unsigned long long v20; // rdx
bool v21; // cf
unsigned long long v22; // rsi
unsigned long long v23; // rdx
unsigned long long v24; // rcx
unsigned long long v25; // rcx
_BYTE *v26; // r13
unsigned long long v27; // r12
long long v28; // r8
long long v29; // r12
long long v30; // r13
unsigned long long v31; // rax
unsigned long long v32; // rcx
unsigned long long v33; // rbx
unsigned __int128 v34; // rdi
long long v35; // rax
unsigned long long v36; // rax
unsigned long long v37; // rcx
bool v38; // cf
unsigned long long v39; // rcx
unsigned long long v40; // rax
long long v41; // rax
_BOOL8 v42; // rdx
unsigned long long v43; // rcx
unsigned long long v44; // rdx
unsigned long long v45; // rsi
_BOOL8 v46; // rdi
long long v47; // rax
unsigned int v48; // ebx
long long v50; // rax
long long v52; // [rsp+8h] [rbp-E0h]
long long v53; // [rsp+8h] [rbp-E0h]
long long v54; // [rsp+10h] [rbp-D8h]
unsigned long long v57; // [rsp+28h] [rbp-C0h]
_BYTE v58[184]; // [rsp+30h] [rbp-B8h] BYREF
v7 = a5;
v9 = *(_QWORD *)&a5[8 * a6 - 8];
v10 = a4 - a6;
if ( v9 >= 0x4563918244F40000LL )
{
if ( a6 <= 0 )
{
LABEL_6:
*(_QWORD *)(a2 + 8 * v10) = 1LL;
}
else
{
v11 = (unsigned long long *)(a3 + 8 * a4 - 8);
v12 = a6;
while ( 1 )
{
v13 = *(_QWORD *)&v7[8 * v12 - 8];
v14 = *v11 < v13;
if ( *v11 != v13 )
break;
--v11;
if ( v12-- <= 1 )
goto LABEL_6;
}
*(_QWORD *)(a2 + 8 * v10) = *v11 >= v13;
if ( v14 )
goto LABEL_17;
}
if ( a6 > 0 )
{
v16 = a3 + 8 * v10;
v17 = 0LL;
v18 = 0LL;
do
{
v19 = *(_QWORD *)(v16 + 8 * v17);
v20 = *(_QWORD *)&v7[8 * v17] + v18;
v21 = v19 < v20;
v22 = v19 - v20;
v23 = v22 - 0x7538DCFB76180000LL;
if ( !v21 )
v23 = v22;
*(_QWORD *)(v16 + 8 * v17++) = v23;
v18 = v21;
}
while ( a6 != v17 );
}
LABEL_17:
v28 = v10 - 1;
v54 = 1LL;
goto LABEL_18;
}
v52 = a4 - a6;
v24 = v9 + 1;
v54 = 0x8AC7230489E80000LL / v24;
if ( a6 >= 17 )
{
v50 = ((long long ( *)(_QWORD, _QWORD, long long, unsigned long long, long long))a1[1])(
*a1,
0LL,
8 * a6,
v24,
v10);
v25 = v54;
v26 = (_BYTE *)v50;
if ( !v50 )
return (unsigned int)-1;
}
else
{
v25 = 0x8AC7230489E80000LL / v24;
v26 = v58;
}
v27 = v25;
mp_mul1_dec((long long)v26, (long long)v7, a6, v25, 0LL);
*(_QWORD *)(a3 + 8 * a4) = mp_mul1_dec(a3, a3, a4, v27, 0LL);
v7 = v26;
v28 = v52;
LABEL_18:
if ( v28 >= 0 )
{
v29 = a3 + 8 * a6;
v30 = a3 + 8 * v28;
v57 = 0x8AC7230489E7FFFFLL;
do
{
v31 = *(_QWORD *)(v29 + 8 * v28);
v32 = *(_QWORD *)&v7[8 * a6 - 8];
v33 = v57;
v53 = v28;
if ( v31 < v32 )
{
v34 = *(unsigned long long *)(v29 + 8 * v28 - 8) + 0x8AC7230489E80000LL * (unsigned __int128)v31;
v35 = _udivti3(v34, *((_QWORD *)&v34 + 1), v32, 0LL);
v28 = v53;
v33 = v35;
}
v36 = mp_sub_mul1_dec(a3 + 8 * v28, (long long)v7, a6, v33);
v37 = *(_QWORD *)(v29 + 8 * v53);
v38 = v37 < v36;
v39 = v37 - v36;
v40 = v39 - 0x7538DCFB76180000LL;
if ( !v38 )
v40 = v39;
*(_QWORD *)(v29 + 8 * v53) = v40;
if ( v38 )
{
while ( 1 )
{
do
--v33;
while ( a6 <= 0 );
v41 = 0LL;
v42 = 0LL;
do
{
v43 = *(_QWORD *)(v30 + 8 * v41);
v44 = *(_QWORD *)&v7[8 * v41] + v43 + v42;
v45 = v44 + 0x7538DCFB76180000LL;
v46 = v44 + 0x7538DCFB76180000LL <= v43;
if ( v44 + 0x7538DCFB76180000LL <= v43 )
v44 += 0x7538DCFB76180000LL;
*(_QWORD *)(v30 + 8 * v41++) = v44;
v42 = v46;
}
while ( a6 != v41 );
if ( v45 <= v43 )
{
v47 = *(_QWORD *)(v29 + 8 * v53) + 1LL;
*(_QWORD *)(v29 + 8 * v53) = v47;
if ( v47 == 0x8AC7230489E80000LL )
break;
}
}
}
*(_QWORD *)(a2 + 8 * v53) = v33;
v30 -= 8LL;
v28 = v53 - 1;
}
while ( v53 > 0 );
}
v48 = 0;
if ( v54 != 1 )
{
v48 = 0;
mp_div1_dec(a3, a3, a6, v54, 0LL);
if ( v7 != v58 )
{
if ( v7 )
{
v48 = 0;
((void ( *)(_QWORD, _BYTE *, _QWORD))a1[1])(*a1, v7, 0LL);
}
}
}
return v48;
}
| mp_div_dec:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xb8
MOV R15,R9
MOV R14,R8
MOV RBX,RCX
MOV qword ptr [RSP],RDX
MOV qword ptr [RSP + 0x18],RSI
MOV RCX,qword ptr [R8 + R9*0x8 + -0x8]
MOV R8,RBX
SUB R8,R9
MOV RAX,0x4563918244f40000
MOV RBP,-0x7538dcfb76180000
CMP RCX,RAX
MOV qword ptr [RSP + 0x20],RDI
JC 0x00192b49
TEST R15,R15
JLE 0x00192afd
MOV RAX,qword ptr [RSP]
LEA RAX,[RAX + RBX*0x8]
ADD RAX,-0x8
MOV RCX,R15
LAB_00192ae6:
MOV RDX,qword ptr [R14 + RCX*0x8 + -0x8]
CMP qword ptr [RAX],RDX
JNZ 0x00192bb1
ADD RAX,-0x8
DEC RCX
JG 0x00192ae6
LAB_00192afd:
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + R8*0x8],0x1
LAB_00192b0a:
TEST R15,R15
JLE 0x00192bc6
MOV RAX,qword ptr [RSP]
LEA RAX,[RAX + R8*0x8]
XOR ECX,ECX
XOR EDX,EDX
LAB_00192b1f:
MOV RSI,qword ptr [RAX + RCX*0x8]
ADD RDX,qword ptr [R14 + RCX*0x8]
XOR EDI,EDI
SUB RSI,RDX
SETC DIL
LEA RDX,[RSI + RBP*0x1]
CMOVNC RDX,RSI
MOV qword ptr [RAX + RCX*0x8],RDX
INC RCX
MOV RDX,RDI
CMP R15,RCX
JNZ 0x00192b1f
JMP 0x00192bc6
LAB_00192b49:
MOV qword ptr [RSP + 0x8],R8
INC RCX
MOV RAX,-0x7538dcfb76180000
XOR EDX,EDX
DIV RCX
CMP R15,0x11
MOV qword ptr [RSP + 0x10],RAX
JGE 0x00192d28
MOV RCX,RAX
LEA R13,[RSP + 0x30]
LAB_00192b77:
MOV RDI,R13
MOV RSI,R14
MOV RDX,R15
MOV R12,RCX
XOR R8D,R8D
CALL 0x0018d975
MOV R14,qword ptr [RSP]
MOV RDI,R14
MOV RSI,R14
MOV RDX,RBX
MOV RCX,R12
XOR R8D,R8D
CALL 0x0018d975
MOV qword ptr [R14 + RBX*0x8],RAX
MOV R14,R13
MOV R8,qword ptr [RSP + 0x8]
JMP 0x00192bd3
LAB_00192bb1:
SETNC AL
MOVZX EAX,AL
MOV RCX,qword ptr [RSP + 0x18]
MOV qword ptr [RCX + R8*0x8],RAX
JNC 0x00192b0a
LAB_00192bc6:
DEC R8
MOV EAX,0x1
MOV qword ptr [RSP + 0x10],RAX
LAB_00192bd3:
TEST R8,R8
JS 0x00192ce9
MOV RAX,qword ptr [RSP]
LEA R12,[RAX + R15*0x8]
LEA R13,[RAX + R8*0x8]
LEA RAX,[RBP + -0x1]
MOV qword ptr [RSP + 0x28],RAX
MOV RBP,0x7538dcfb76180000
LAB_00192bfb:
MOV RAX,qword ptr [R12 + R8*0x8]
MOV RCX,qword ptr [R14 + R15*0x8 + -0x8]
MOV RBX,qword ptr [RSP + 0x28]
CMP RAX,RCX
MOV qword ptr [RSP + 0x8],R8
JNC 0x00192c41
MOV RDX,-0x7538dcfb76180000
MUL RDX
ADD RAX,qword ptr [R12 + R8*0x8 + -0x8]
ADC RDX,0x0
MOV RDI,RAX
MOV RSI,RDX
MOV RDX,RCX
XOR ECX,ECX
CALL 0x0019a920
MOV R8,qword ptr [RSP + 0x8]
MOV RBX,RAX
LAB_00192c41:
MOV RAX,qword ptr [RSP]
LEA RDI,[RAX + R8*0x8]
MOV RSI,R14
MOV RDX,R15
MOV RCX,RBX
CALL 0x0018dad4
MOV R8,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [R12 + R8*0x8]
SUB RCX,RAX
MOV RDX,-0x7538dcfb76180000
LEA RAX,[RCX + RDX*0x1]
CMOVNC RAX,RCX
MOV qword ptr [R12 + R8*0x8],RAX
JNC 0x00192ccc
MOV R9,RDX
LAB_00192c7e:
DEC RBX
TEST R15,R15
JLE 0x00192c7e
XOR EAX,EAX
XOR EDX,EDX
LAB_00192c8a:
MOV RCX,qword ptr [R13 + RAX*0x8]
ADD RDX,RCX
ADD RDX,qword ptr [R14 + RAX*0x8]
LEA RSI,[RDX + RBP*0x1]
XOR EDI,EDI
CMP RSI,RCX
SETBE DIL
CMOVBE RDX,RSI
MOV qword ptr [R13 + RAX*0x8],RDX
INC RAX
MOV RDX,RDI
CMP R15,RAX
JNZ 0x00192c8a
CMP RSI,RCX
JA 0x00192c7e
MOV RAX,qword ptr [R12 + R8*0x8]
INC RAX
MOV qword ptr [R12 + R8*0x8],RAX
CMP RAX,R9
JNZ 0x00192c7e
LAB_00192ccc:
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + R8*0x8],RBX
LEA RAX,[R8 + -0x1]
ADD R13,-0x8
TEST R8,R8
MOV R8,RAX
JG 0x00192bfb
LAB_00192ce9:
XOR EBX,EBX
MOV RCX,qword ptr [RSP + 0x10]
CMP RCX,0x1
JZ 0x00192d14
XOR EBX,EBX
MOV RDI,qword ptr [RSP]
MOV RSI,RDI
MOV RDX,R15
XOR R8D,R8D
CALL 0x0018dc2e
LEA RAX,[RSP + 0x30]
CMP R14,RAX
JNZ 0x00192d55
LAB_00192d14:
MOV EAX,EBX
ADD RSP,0xb8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00192d28:
MOV R12,RDI
LEA RDX,[R15*0x8]
MOV RDI,qword ptr [RDI]
XOR ESI,ESI
CALL qword ptr [R12 + 0x8]
MOV RCX,qword ptr [RSP + 0x10]
MOV R13,RAX
TEST RAX,RAX
JNZ 0x00192b77
MOV EBX,0xffffffff
JMP 0x00192d14
LAB_00192d55:
TEST R14,R14
JZ 0x00192d14
MOV RAX,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RAX]
XOR EBX,EBX
MOV RSI,R14
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
JMP 0x00192d14
|
int8
mp_div_dec(int8 *param_1,long param_2,long param_3,long param_4,int1 *param_5,
long param_6)
{
bool bVar1;
int1 auVar2 [16];
int1 auVar3 [16];
ulong *puVar4;
int8 uVar5;
ulong uVar6;
long lVar7;
ulong uVar8;
long lVar9;
int1 *puVar10;
long lVar11;
long lVar12;
ulong uVar13;
ulong uVar14;
long lVar15;
long local_d8;
long local_c0;
int1 local_b8 [136];
lVar15 = param_4 - param_6;
if (*(ulong *)(param_5 + param_6 * 8 + -8) < 5000000000000000000) {
auVar2._8_8_ = 0;
auVar2._0_8_ = *(ulong *)(param_5 + param_6 * 8 + -8) + 1;
local_d8 = SUB168((ZEXT816(0) << 0x40 | ZEXT816(10000000000000000000)) / auVar2,0);
if (param_6 < 0x11) {
puVar10 = local_b8;
}
else {
puVar10 = (int1 *)(*(code *)param_1[1])(*param_1,0,param_6 * 8);
if (puVar10 == (int1 *)0x0) {
return 0xffffffff;
}
}
mp_mul1_dec(puVar10,param_5,param_6,local_d8,0);
uVar5 = mp_mul1_dec(param_3,param_3,param_4,local_d8,0);
*(int8 *)(param_3 + param_4 * 8) = uVar5;
}
else {
if (0 < param_6) {
puVar4 = (ulong *)(param_3 + param_4 * 8);
lVar11 = param_6;
do {
puVar4 = puVar4 + -1;
uVar6 = *(ulong *)(param_5 + lVar11 * 8 + -8);
uVar8 = *puVar4;
if (uVar8 != uVar6) {
*(ulong *)(param_2 + lVar15 * 8) = (ulong)(uVar6 <= uVar8);
if (uVar6 > uVar8) goto LAB_00192bc6;
goto LAB_00192b0a;
}
lVar12 = lVar11 + -1;
bVar1 = 0 < lVar11;
lVar11 = lVar12;
} while (lVar12 != 0 && bVar1);
}
*(int8 *)(param_2 + lVar15 * 8) = 1;
LAB_00192b0a:
if (0 < param_6) {
lVar11 = param_3 + lVar15 * 8;
lVar12 = 0;
uVar6 = 0;
do {
uVar8 = *(ulong *)(lVar11 + lVar12 * 8);
uVar13 = uVar6 + *(long *)(param_5 + lVar12 * 8);
uVar6 = (ulong)(uVar8 < uVar13);
lVar7 = (uVar8 - uVar13) + -0x7538dcfb76180000;
if (uVar8 >= uVar13) {
lVar7 = uVar8 - uVar13;
}
*(long *)(lVar11 + lVar12 * 8) = lVar7;
lVar12 = lVar12 + 1;
} while (param_6 != lVar12);
}
LAB_00192bc6:
lVar15 = lVar15 + -1;
local_d8 = 1;
puVar10 = param_5;
}
if (-1 < lVar15) {
lVar11 = param_3 + param_6 * 8;
lVar12 = param_3 + lVar15 * 8;
local_c0 = -0x7538dcfb76180001;
do {
uVar6 = *(ulong *)(lVar11 + lVar15 * 8);
lVar7 = local_c0;
if (uVar6 < *(ulong *)(puVar10 + param_6 * 8 + -8)) {
auVar3._8_8_ = 0;
auVar3._0_8_ = uVar6;
uVar6 = SUB168(auVar3 * ZEXT816(10000000000000000000),0);
puVar4 = (ulong *)(lVar11 + -8 + lVar15 * 8);
lVar7 = __udivti3(uVar6 + *puVar4,
SUB168(auVar3 * ZEXT816(10000000000000000000),8) +
(ulong)CARRY8(uVar6,*puVar4),*(ulong *)(puVar10 + param_6 * 8 + -8),0);
}
uVar8 = mp_sub_mul1_dec(param_3 + lVar15 * 8,puVar10,param_6,lVar7);
uVar6 = *(ulong *)(lVar11 + lVar15 * 8);
lVar9 = (uVar6 - uVar8) + -0x7538dcfb76180000;
if (uVar8 <= uVar6) {
lVar9 = uVar6 - uVar8;
}
*(long *)(lVar11 + lVar15 * 8) = lVar9;
if (uVar8 > uVar6) {
do {
do {
lVar7 = lVar7 + -1;
} while (param_6 < 1);
lVar9 = 0;
uVar6 = 0;
do {
uVar13 = *(ulong *)(lVar12 + lVar9 * 8);
uVar14 = uVar6 + uVar13 + *(long *)(puVar10 + lVar9 * 8);
uVar8 = uVar14 + 0x7538dcfb76180000;
uVar6 = (ulong)(uVar8 <= uVar13);
if (uVar8 <= uVar13) {
uVar14 = uVar8;
}
*(ulong *)(lVar12 + lVar9 * 8) = uVar14;
lVar9 = lVar9 + 1;
} while (param_6 != lVar9);
} while ((uVar13 < uVar8) ||
(lVar9 = *(long *)(lVar11 + lVar15 * 8) + 1, *(long *)(lVar11 + lVar15 * 8) = lVar9,
lVar9 != -0x7538dcfb76180000));
}
*(long *)(param_2 + lVar15 * 8) = lVar7;
lVar12 = lVar12 + -8;
bVar1 = 0 < lVar15;
lVar15 = lVar15 + -1;
} while (bVar1);
}
if (((local_d8 != 1) && (mp_div1_dec(param_3,param_3,param_6,local_d8,0), puVar10 != local_b8)) &&
(puVar10 != (int1 *)0x0)) {
(*(code *)param_1[1])(*param_1,puVar10,0);
}
return 0;
}
| |
55,152 | mp_div_dec | bluesky950520[P]quickjs/libbf.c | static int mp_div_dec(bf_context_t *s, limb_t *tabq,
limb_t *taba, mp_size_t na,
const limb_t *tabb1, mp_size_t nb)
{
limb_t base = BF_DEC_BASE;
limb_t r, mult, t0, t1, a, c, q, v, *tabb;
mp_size_t i, j;
limb_t static_tabb[DIV_STATIC_ALLOC_LEN];
#ifdef DEBUG_DIV_SLOW
mp_print_str_dec("a", taba, na);
mp_print_str_dec("b", tabb1, nb);
#endif
/* normalize tabb */
r = tabb1[nb - 1];
assert(r != 0);
i = na - nb;
if (r >= BF_DEC_BASE / 2) {
mult = 1;
tabb = (limb_t *)tabb1;
q = 1;
for(j = nb - 1; j >= 0; j--) {
if (taba[i + j] != tabb[j]) {
if (taba[i + j] < tabb[j])
q = 0;
break;
}
}
tabq[i] = q;
if (q) {
mp_sub_dec(taba + i, taba + i, tabb, nb, 0);
}
i--;
} else {
mult = base / (r + 1);
if (likely(nb <= DIV_STATIC_ALLOC_LEN)) {
tabb = static_tabb;
} else {
tabb = bf_malloc(s, sizeof(limb_t) * nb);
if (!tabb)
return -1;
}
mp_mul1_dec(tabb, tabb1, nb, mult, 0);
taba[na] = mp_mul1_dec(taba, taba, na, mult, 0);
}
#ifdef DEBUG_DIV_SLOW
printf("mult=" FMT_LIMB "\n", mult);
mp_print_str_dec("a_norm", taba, na + 1);
mp_print_str_dec("b_norm", tabb, nb);
#endif
for(; i >= 0; i--) {
if (unlikely(taba[i + nb] >= tabb[nb - 1])) {
/* XXX: check if it is really possible */
q = base - 1;
} else {
muldq(t1, t0, taba[i + nb], base);
adddq(t1, t0, 0, taba[i + nb - 1]);
divdq(q, r, t1, t0, tabb[nb - 1]);
}
// printf("i=%d q1=%ld\n", i, q);
r = mp_sub_mul1_dec(taba + i, tabb, nb, q);
// mp_dump("r1", taba + i, nb, bd);
// printf("r2=%ld\n", r);
v = taba[i + nb];
a = v - r;
c = a > v;
if (c)
a += base;
taba[i + nb] = a;
if (c != 0) {
/* negative result */
for(;;) {
q--;
c = mp_add_dec(taba + i, taba + i, tabb, nb, 0);
/* propagate carry and test if positive result */
if (c != 0) {
if (++taba[i + nb] == base) {
break;
}
}
}
}
tabq[i] = q;
}
#ifdef DEBUG_DIV_SLOW
mp_print_str_dec("q", tabq, na - nb + 1);
mp_print_str_dec("r", taba, nb);
#endif
/* remove the normalization */
if (mult != 1) {
mp_div1_dec(taba, taba, nb, mult, 0);
if (unlikely(tabb != static_tabb))
bf_free(s, tabb);
}
return 0;
} | O2 | c | mp_div_dec:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %r8, %r15
movq %rcx, %rbx
movq %rsi, 0x10(%rsp)
movq -0x8(%r8,%r9,8), %rcx
movq %rbx, %r13
subq %r9, %r13
movabsq $0x4563918244f40000, %rax # imm = 0x4563918244F40000
cmpq %rax, %rcx
movq %r9, (%rsp)
movq %rdi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
jb 0x7a369
movq %rdx, %rbp
leaq -0x1(%r9), %rax
leaq (%rdx,%r13,8), %rdi
leaq (%rdx,%rbx,8), %rcx
addq $-0x8, %rcx
testq %rax, %rax
js 0x7a3d1
movq (%r15,%rax,8), %rdx
decq %rax
leaq -0x8(%rcx), %rsi
cmpq %rdx, (%rcx)
movq %rsi, %rcx
je 0x7a337
setae %al
movzbl %al, %eax
movq 0x10(%rsp), %rcx
movq %rax, (%rcx,%r13,8)
jae 0x7a3de
jmp 0x7a3f3
incq %rcx
movabsq $-0x7538dcfb76180000, %rax # imm = 0x8AC7230489E80000
xorl %edx, %edx
divq %rcx
movq %rax, 0x8(%rsp)
cmpq $0x11, %r9
jge 0x7a524
leaq 0x30(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rsi
movq %r9, %rdx
movq 0x8(%rsp), %r14
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x763f6
movq 0x18(%rsp), %r12
movq %r12, %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x763f6
movq (%rsp), %r9
movq %rax, (%r12,%rbx,8)
movq %rbp, %r15
movq %r12, %rbp
jmp 0x7a3fe
movq 0x10(%rsp), %rax
movq $0x1, (%rax,%r13,8)
movq %rdi, %rsi
movq %r15, %rdx
movq %r9, %rcx
xorl %r8d, %r8d
callq 0x76375
movq (%rsp), %r9
decq %r13
pushq $0x1
popq %rax
movq %rax, 0x8(%rsp)
movabsq $-0x7538dcfb76180000, %rax # imm = 0x8AC7230489E80000
leaq (,%r9,8), %r12
addq %rbp, %r12
decq %rax
movq %rax, 0x28(%rsp)
testq %r13, %r13
js 0x7a4e6
movq (%r12,%r13,8), %rax
movq %r15, %r14
movq -0x8(%r15,%r9,8), %rcx
movq 0x28(%rsp), %rbx
cmpq %rcx, %rax
jae 0x7a467
movabsq $-0x7538dcfb76180000, %rdx # imm = 0x8AC7230489E80000
mulq %rdx
addq -0x8(%r12,%r13,8), %rax
adcq $0x0, %rdx
movq %rax, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
xorl %ecx, %ecx
callq 0x81150
movq (%rsp), %r9
movq %rax, %rbx
leaq (%rbp,%r13,8), %rbp
movq %rbp, %rdi
movq %r14, %rsi
movq %r9, %rdx
movq %rbx, %rcx
callq 0x7655d
movq (%r12,%r13,8), %rcx
subq %rax, %rcx
movabsq $-0x7538dcfb76180000, %rax # imm = 0x8AC7230489E80000
movq %rax, %r14
leaq (%rcx,%rax), %rax
cmovaeq %rcx, %rax
movq %rax, (%r12,%r13,8)
jae 0x7a4cc
decq %rbx
movq %rbp, %rdi
movq %rbp, %rsi
movq %r15, %rdx
movq (%rsp), %rcx
xorl %r8d, %r8d
callq 0x762ee
testq %rax, %rax
je 0x7a49f
movq (%r12,%r13,8), %rax
incq %rax
movq %rax, (%r12,%r13,8)
cmpq %r14, %rax
jne 0x7a49f
movq 0x10(%rsp), %rax
movq %rbx, (%rax,%r13,8)
decq %r13
movq 0x18(%rsp), %rbp
movq (%rsp), %r9
jmp 0x7a41b
xorl %ebx, %ebx
movq 0x8(%rsp), %rcx
cmpq $0x1, %rcx
je 0x7a510
xorl %ebx, %ebx
movq %rbp, %rdi
movq %rbp, %rsi
movq %r9, %rdx
xorl %r8d, %r8d
callq 0x76688
leaq 0x30(%rsp), %rax
cmpq %rax, %r15
jne 0x7a54e
movl %ebx, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdi, %r12
leaq (,%r9,8), %rdx
movq (%rdi), %rdi
xorl %esi, %esi
callq *0x8(%r12)
movq (%rsp), %r9
movq %rax, %rbp
testq %rax, %rax
jne 0x7a38f
pushq $-0x1
popq %rbx
jmp 0x7a510
testq %r15, %r15
je 0x7a510
movq 0x20(%rsp), %rax
movq (%rax), %rdi
xorl %ebx, %ebx
movq %r15, %rsi
xorl %edx, %edx
callq *0x8(%rax)
jmp 0x7a510
| mp_div_dec:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0B8h
mov r15, r8
mov rbx, rcx
mov [rsp+0E8h+var_D8], rsi
mov rcx, [r8+r9*8-8]
mov r13, rbx
sub r13, r9
mov rax, 4563918244F40000h
cmp rcx, rax
mov [rsp+0E8h+var_E8], r9
mov [rsp+0E8h+var_C8], rdi
mov [rsp+0E8h+var_D0], rdx
jb short loc_7A369
mov rbp, rdx
lea rax, [r9-1]
lea rdi, [rdx+r13*8]
lea rcx, [rdx+rbx*8]
add rcx, 0FFFFFFFFFFFFFFF8h
loc_7A337:
test rax, rax
js loc_7A3D1
mov rdx, [r15+rax*8]
dec rax
lea rsi, [rcx-8]
cmp [rcx], rdx
mov rcx, rsi
jz short loc_7A337
setnb al
movzx eax, al
mov rcx, [rsp+0E8h+var_D8]
mov [rcx+r13*8], rax
jnb short loc_7A3DE
jmp loc_7A3F3
loc_7A369:
inc rcx
mov rax, 8AC7230489E80000h
xor edx, edx
div rcx
mov [rsp+0E8h+var_E0], rax
cmp r9, 11h
jge loc_7A524
lea rbp, [rsp+0E8h+var_B8]
loc_7A38F:
mov rdi, rbp
mov rsi, r15
mov rdx, r9
mov r14, [rsp+0E8h+var_E0]
mov rcx, r14
xor r8d, r8d
call mp_mul1_dec
mov r12, [rsp+0E8h+var_D0]
mov rdi, r12
mov rsi, r12
mov rdx, rbx
mov rcx, r14
xor r8d, r8d
call mp_mul1_dec
mov r9, [rsp+0E8h+var_E8]
mov [r12+rbx*8], rax
mov r15, rbp
mov rbp, r12
jmp short loc_7A3FE
loc_7A3D1:
mov rax, [rsp+0E8h+var_D8]
mov qword ptr [rax+r13*8], 1
loc_7A3DE:
mov rsi, rdi
mov rdx, r15
mov rcx, r9
xor r8d, r8d
call mp_sub_dec
mov r9, [rsp+0E8h+var_E8]
loc_7A3F3:
dec r13
push 1
pop rax
mov [rsp+0E8h+var_E0], rax
loc_7A3FE:
mov rax, 8AC7230489E80000h
lea r12, ds:0[r9*8]
add r12, rbp
dec rax
mov [rsp+0E8h+var_C0], rax
loc_7A41B:
test r13, r13
js loc_7A4E6
mov rax, [r12+r13*8]
mov r14, r15
mov rcx, [r15+r9*8-8]
mov rbx, [rsp+0E8h+var_C0]
cmp rax, rcx
jnb short loc_7A467
mov rdx, 8AC7230489E80000h
mul rdx
add rax, [r12+r13*8-8]
adc rdx, 0
mov rdi, rax
mov rsi, rdx
mov rdx, rcx
xor ecx, ecx
call __udivti3
mov r9, [rsp+0E8h+var_E8]
mov rbx, rax
loc_7A467:
lea rbp, [rbp+r13*8+0]
mov rdi, rbp
mov rsi, r14
mov rdx, r9
mov rcx, rbx
call mp_sub_mul1_dec
mov rcx, [r12+r13*8]
sub rcx, rax
mov rax, 8AC7230489E80000h
mov r14, rax
lea rax, [rcx+rax]
cmovnb rax, rcx
mov [r12+r13*8], rax
jnb short loc_7A4CC
loc_7A49F:
dec rbx
mov rdi, rbp
mov rsi, rbp
mov rdx, r15
mov rcx, [rsp+0E8h+var_E8]
xor r8d, r8d
call mp_add_dec
test rax, rax
jz short loc_7A49F
mov rax, [r12+r13*8]
inc rax
mov [r12+r13*8], rax
cmp rax, r14
jnz short loc_7A49F
loc_7A4CC:
mov rax, [rsp+0E8h+var_D8]
mov [rax+r13*8], rbx
dec r13
mov rbp, [rsp+0E8h+var_D0]
mov r9, [rsp+0E8h+var_E8]
jmp loc_7A41B
loc_7A4E6:
xor ebx, ebx
mov rcx, [rsp+0E8h+var_E0]
cmp rcx, 1
jz short loc_7A510
xor ebx, ebx
mov rdi, rbp
mov rsi, rbp
mov rdx, r9
xor r8d, r8d
call mp_div1_dec
lea rax, [rsp+0E8h+var_B8]
cmp r15, rax
jnz short loc_7A54E
loc_7A510:
mov eax, ebx
add rsp, 0B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7A524:
mov r12, rdi
lea rdx, ds:0[r9*8]
mov rdi, [rdi]
xor esi, esi
call qword ptr [r12+8]
mov r9, [rsp+0E8h+var_E8]
mov rbp, rax
test rax, rax
jnz loc_7A38F
push 0FFFFFFFFFFFFFFFFh
pop rbx
jmp short loc_7A510
loc_7A54E:
test r15, r15
jz short loc_7A510
mov rax, [rsp+0E8h+var_C8]
mov rdi, [rax]
xor ebx, ebx
mov rsi, r15
xor edx, edx
call qword ptr [rax+8]
jmp short loc_7A510
| long long mp_div_dec(_QWORD *a1, long long a2, long long a3, long long a4, long long a5, long long a6)
{
_BYTE *v6; // r15
unsigned long long v8; // rcx
long long v9; // r13
long long v10; // rbp
long long v11; // rax
long long v12; // rdi
unsigned long long *v13; // rcx
unsigned long long v14; // rdx
bool v15; // cf
_BYTE *v17; // rbp
long long v18; // rax
long long v19; // r12
unsigned long long v20; // rax
unsigned long long v21; // rcx
unsigned long long v22; // rbx
unsigned __int128 v23; // rdi
long long v24; // rax
long long v25; // rbp
unsigned long long v26; // rax
unsigned long long v27; // rcx
bool v28; // cf
unsigned long long v29; // rcx
unsigned long long v30; // rax
long long v31; // rax
unsigned int v32; // ebx
long long v34; // rax
long long v35; // [rsp+0h] [rbp-E8h]
long long v36; // [rsp+8h] [rbp-E0h]
unsigned long long v40; // [rsp+28h] [rbp-C0h]
_BYTE v41[184]; // [rsp+30h] [rbp-B8h] BYREF
v6 = (_BYTE *)a5;
v8 = *(_QWORD *)(a5 + 8 * a6 - 8);
v9 = a4 - a6;
v35 = a6;
if ( v8 < 0x4563918244F40000LL )
{
v36 = 0x8AC7230489E80000LL / (v8 + 1);
if ( a6 >= 17 )
{
v34 = ((long long ( *)(_QWORD, _QWORD, long long))a1[1])(*a1, 0LL, 8 * a6);
a6 = v35;
v17 = (_BYTE *)v34;
if ( !v34 )
return (unsigned int)-1;
}
else
{
v17 = v41;
}
mp_mul1_dec((long long)v17, (long long)v6, a6, v36, 0LL);
v18 = mp_mul1_dec(a3, a3, a4, v36, 0LL);
a6 = v35;
*(_QWORD *)(a3 + 8 * a4) = v18;
v6 = v17;
v10 = a3;
}
else
{
v10 = a3;
v11 = a6 - 1;
v12 = a3 + 8 * v9;
v13 = (unsigned long long *)(a3 + 8 * a4 - 8);
do
{
if ( v11 < 0 )
{
*(_QWORD *)(a2 + 8 * v9) = 1LL;
goto LABEL_11;
}
v14 = *(_QWORD *)(a5 + 8 * v11--);
v15 = *v13 < v14;
}
while ( *v13-- == v14 );
*(_QWORD *)(a2 + 8 * v9) = !v15;
if ( v15 )
goto LABEL_12;
LABEL_11:
mp_sub_dec(v12, v12, a5, a6, 0LL);
a6 = v35;
LABEL_12:
--v9;
v36 = 1LL;
}
v19 = v10 + 8 * a6;
v40 = 0x8AC7230489E7FFFFLL;
while ( v9 >= 0 )
{
v20 = *(_QWORD *)(v19 + 8 * v9);
v21 = *(_QWORD *)&v6[8 * a6 - 8];
v22 = v40;
if ( v20 < v21 )
{
v23 = *(unsigned long long *)(v19 + 8 * v9 - 8) + 0x8AC7230489E80000LL * (unsigned __int128)v20;
v24 = _udivti3(v23, *((_QWORD *)&v23 + 1), v21, 0LL);
a6 = v35;
v22 = v24;
}
v25 = v10 + 8 * v9;
v26 = mp_sub_mul1_dec(v25, (long long)v6, a6, v22);
v27 = *(_QWORD *)(v19 + 8 * v9);
v28 = v27 < v26;
v29 = v27 - v26;
v30 = v29 - 0x7538DCFB76180000LL;
if ( !v28 )
v30 = v29;
*(_QWORD *)(v19 + 8 * v9) = v30;
if ( v28 )
{
do
{
do
--v22;
while ( !mp_add_dec(v25, v25, (long long)v6, v35, 0LL) );
v31 = *(_QWORD *)(v19 + 8 * v9) + 1LL;
*(_QWORD *)(v19 + 8 * v9) = v31;
}
while ( v31 != 0x8AC7230489E80000LL );
}
*(_QWORD *)(a2 + 8 * v9--) = v22;
v10 = a3;
a6 = v35;
}
v32 = 0;
if ( v36 != 1 )
{
v32 = 0;
mp_div1_dec(v10, v10, a6, v36, 0LL);
if ( v6 != v41 )
{
if ( v6 )
{
v32 = 0;
((void ( *)(_QWORD, _BYTE *, _QWORD))a1[1])(*a1, v6, 0LL);
}
}
}
return v32;
}
| mp_div_dec:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xb8
MOV R15,R8
MOV RBX,RCX
MOV qword ptr [RSP + 0x10],RSI
MOV RCX,qword ptr [R8 + R9*0x8 + -0x8]
MOV R13,RBX
SUB R13,R9
MOV RAX,0x4563918244f40000
CMP RCX,RAX
MOV qword ptr [RSP],R9
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RDX
JC 0x0017a369
MOV RBP,RDX
LEA RAX,[R9 + -0x1]
LEA RDI,[RDX + R13*0x8]
LEA RCX,[RDX + RBX*0x8]
ADD RCX,-0x8
LAB_0017a337:
TEST RAX,RAX
JS 0x0017a3d1
MOV RDX,qword ptr [R15 + RAX*0x8]
DEC RAX
LEA RSI,[RCX + -0x8]
CMP qword ptr [RCX],RDX
MOV RCX,RSI
JZ 0x0017a337
SETNC AL
MOVZX EAX,AL
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RCX + R13*0x8],RAX
JNC 0x0017a3de
JMP 0x0017a3f3
LAB_0017a369:
INC RCX
MOV RAX,-0x7538dcfb76180000
XOR EDX,EDX
DIV RCX
MOV qword ptr [RSP + 0x8],RAX
CMP R9,0x11
JGE 0x0017a524
LEA RBP,[RSP + 0x30]
LAB_0017a38f:
MOV RDI,RBP
MOV RSI,R15
MOV RDX,R9
MOV R14,qword ptr [RSP + 0x8]
MOV RCX,R14
XOR R8D,R8D
CALL 0x001763f6
MOV R12,qword ptr [RSP + 0x18]
MOV RDI,R12
MOV RSI,R12
MOV RDX,RBX
MOV RCX,R14
XOR R8D,R8D
CALL 0x001763f6
MOV R9,qword ptr [RSP]
MOV qword ptr [R12 + RBX*0x8],RAX
MOV R15,RBP
MOV RBP,R12
JMP 0x0017a3fe
LAB_0017a3d1:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + R13*0x8],0x1
LAB_0017a3de:
MOV RSI,RDI
MOV RDX,R15
MOV RCX,R9
XOR R8D,R8D
CALL 0x00176375
MOV R9,qword ptr [RSP]
LAB_0017a3f3:
DEC R13
PUSH 0x1
POP RAX
MOV qword ptr [RSP + 0x8],RAX
LAB_0017a3fe:
MOV RAX,-0x7538dcfb76180000
LEA R12,[R9*0x8]
ADD R12,RBP
DEC RAX
MOV qword ptr [RSP + 0x28],RAX
LAB_0017a41b:
TEST R13,R13
JS 0x0017a4e6
MOV RAX,qword ptr [R12 + R13*0x8]
MOV R14,R15
MOV RCX,qword ptr [R15 + R9*0x8 + -0x8]
MOV RBX,qword ptr [RSP + 0x28]
CMP RAX,RCX
JNC 0x0017a467
MOV RDX,-0x7538dcfb76180000
MUL RDX
ADD RAX,qword ptr [R12 + R13*0x8 + -0x8]
ADC RDX,0x0
MOV RDI,RAX
MOV RSI,RDX
MOV RDX,RCX
XOR ECX,ECX
CALL 0x00181150
MOV R9,qword ptr [RSP]
MOV RBX,RAX
LAB_0017a467:
LEA RBP,[RBP + R13*0x8]
MOV RDI,RBP
MOV RSI,R14
MOV RDX,R9
MOV RCX,RBX
CALL 0x0017655d
MOV RCX,qword ptr [R12 + R13*0x8]
SUB RCX,RAX
MOV RAX,-0x7538dcfb76180000
MOV R14,RAX
LEA RAX,[RCX + RAX*0x1]
CMOVNC RAX,RCX
MOV qword ptr [R12 + R13*0x8],RAX
JNC 0x0017a4cc
LAB_0017a49f:
DEC RBX
MOV RDI,RBP
MOV RSI,RBP
MOV RDX,R15
MOV RCX,qword ptr [RSP]
XOR R8D,R8D
CALL 0x001762ee
TEST RAX,RAX
JZ 0x0017a49f
MOV RAX,qword ptr [R12 + R13*0x8]
INC RAX
MOV qword ptr [R12 + R13*0x8],RAX
CMP RAX,R14
JNZ 0x0017a49f
LAB_0017a4cc:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + R13*0x8],RBX
DEC R13
MOV RBP,qword ptr [RSP + 0x18]
MOV R9,qword ptr [RSP]
JMP 0x0017a41b
LAB_0017a4e6:
XOR EBX,EBX
MOV RCX,qword ptr [RSP + 0x8]
CMP RCX,0x1
JZ 0x0017a510
XOR EBX,EBX
MOV RDI,RBP
MOV RSI,RBP
MOV RDX,R9
XOR R8D,R8D
CALL 0x00176688
LEA RAX,[RSP + 0x30]
CMP R15,RAX
JNZ 0x0017a54e
LAB_0017a510:
MOV EAX,EBX
ADD RSP,0xb8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017a524:
MOV R12,RDI
LEA RDX,[R9*0x8]
MOV RDI,qword ptr [RDI]
XOR ESI,ESI
CALL qword ptr [R12 + 0x8]
MOV R9,qword ptr [RSP]
MOV RBP,RAX
TEST RAX,RAX
JNZ 0x0017a38f
PUSH -0x1
POP RBX
JMP 0x0017a510
LAB_0017a54e:
TEST R15,R15
JZ 0x0017a510
MOV RAX,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RAX]
XOR EBX,EBX
MOV RSI,R15
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
JMP 0x0017a510
|
int4
mp_div_dec(int8 *param_1,long param_2,long param_3,long param_4,int1 *param_5,
long param_6)
{
long lVar1;
int1 auVar2 [16];
int1 auVar3 [16];
long lVar4;
int8 uVar5;
ulong uVar6;
long lVar7;
ulong uVar8;
long lVar9;
int1 *puVar10;
ulong *puVar11;
long lVar12;
long local_e0;
long local_c0;
int1 local_b8 [136];
lVar12 = param_4 - param_6;
if (*(ulong *)(param_5 + param_6 * 8 + -8) < 5000000000000000000) {
auVar2._8_8_ = 0;
auVar2._0_8_ = *(ulong *)(param_5 + param_6 * 8 + -8) + 1;
local_e0 = SUB168((ZEXT816(0) << 0x40 | ZEXT816(10000000000000000000)) / auVar2,0);
if (param_6 < 0x11) {
puVar10 = local_b8;
}
else {
puVar10 = (int1 *)(*(code *)param_1[1])(*param_1,0,param_6 * 8);
if (puVar10 == (int1 *)0x0) {
return 0xffffffff;
}
}
mp_mul1_dec(puVar10,param_5,param_6,local_e0,0);
uVar5 = mp_mul1_dec(param_3,param_3,param_4,local_e0,0);
*(int8 *)(param_3 + param_4 * 8) = uVar5;
}
else {
lVar4 = param_6 + -1;
lVar7 = param_3 + lVar12 * 8;
puVar11 = (ulong *)(param_3 + param_4 * 8);
do {
puVar11 = puVar11 + -1;
if (lVar4 < 0) {
*(int8 *)(param_2 + lVar12 * 8) = 1;
goto LAB_0017a3de;
}
uVar6 = *(ulong *)(param_5 + lVar4 * 8);
lVar4 = lVar4 + -1;
uVar8 = *puVar11;
} while (uVar8 == uVar6);
*(ulong *)(param_2 + lVar12 * 8) = (ulong)(uVar6 <= uVar8);
if (uVar6 <= uVar8) {
LAB_0017a3de:
mp_sub_dec(lVar7,lVar7,param_5,param_6,0);
}
lVar12 = lVar12 + -1;
local_e0 = 1;
puVar10 = param_5;
}
lVar4 = param_6 * 8 + param_3;
local_c0 = -0x7538dcfb76180001;
for (; -1 < lVar12; lVar12 = lVar12 + -1) {
uVar6 = *(ulong *)(lVar4 + lVar12 * 8);
lVar7 = local_c0;
if (uVar6 < *(ulong *)(puVar10 + param_6 * 8 + -8)) {
auVar3._8_8_ = 0;
auVar3._0_8_ = uVar6;
uVar6 = SUB168(auVar3 * ZEXT816(10000000000000000000),0);
puVar11 = (ulong *)(lVar4 + -8 + lVar12 * 8);
lVar7 = __udivti3(uVar6 + *puVar11,
SUB168(auVar3 * ZEXT816(10000000000000000000),8) +
(ulong)CARRY8(uVar6,*puVar11),*(ulong *)(puVar10 + param_6 * 8 + -8),0);
}
lVar1 = param_3 + lVar12 * 8;
uVar8 = mp_sub_mul1_dec(lVar1,puVar10,param_6,lVar7);
uVar6 = *(ulong *)(lVar4 + lVar12 * 8);
lVar9 = (uVar6 - uVar8) + -0x7538dcfb76180000;
if (uVar8 <= uVar6) {
lVar9 = uVar6 - uVar8;
}
*(long *)(lVar4 + lVar12 * 8) = lVar9;
if (uVar8 > uVar6) {
do {
do {
lVar7 = lVar7 + -1;
lVar9 = mp_add_dec(lVar1,lVar1,puVar10,param_6);
} while (lVar9 == 0);
lVar9 = *(long *)(lVar4 + lVar12 * 8) + 1;
*(long *)(lVar4 + lVar12 * 8) = lVar9;
} while (lVar9 != -0x7538dcfb76180000);
}
*(long *)(param_2 + lVar12 * 8) = lVar7;
}
if (((local_e0 != 1) && (mp_div1_dec(param_3,param_3,param_6,local_e0,0), puVar10 != local_b8)) &&
(puVar10 != (int1 *)0x0)) {
(*(code *)param_1[1])(*param_1,puVar10,0);
}
return 0;
}
| |
55,153 | mp_div_dec | bluesky950520[P]quickjs/libbf.c | static int mp_div_dec(bf_context_t *s, limb_t *tabq,
limb_t *taba, mp_size_t na,
const limb_t *tabb1, mp_size_t nb)
{
limb_t base = BF_DEC_BASE;
limb_t r, mult, t0, t1, a, c, q, v, *tabb;
mp_size_t i, j;
limb_t static_tabb[DIV_STATIC_ALLOC_LEN];
#ifdef DEBUG_DIV_SLOW
mp_print_str_dec("a", taba, na);
mp_print_str_dec("b", tabb1, nb);
#endif
/* normalize tabb */
r = tabb1[nb - 1];
assert(r != 0);
i = na - nb;
if (r >= BF_DEC_BASE / 2) {
mult = 1;
tabb = (limb_t *)tabb1;
q = 1;
for(j = nb - 1; j >= 0; j--) {
if (taba[i + j] != tabb[j]) {
if (taba[i + j] < tabb[j])
q = 0;
break;
}
}
tabq[i] = q;
if (q) {
mp_sub_dec(taba + i, taba + i, tabb, nb, 0);
}
i--;
} else {
mult = base / (r + 1);
if (likely(nb <= DIV_STATIC_ALLOC_LEN)) {
tabb = static_tabb;
} else {
tabb = bf_malloc(s, sizeof(limb_t) * nb);
if (!tabb)
return -1;
}
mp_mul1_dec(tabb, tabb1, nb, mult, 0);
taba[na] = mp_mul1_dec(taba, taba, na, mult, 0);
}
#ifdef DEBUG_DIV_SLOW
printf("mult=" FMT_LIMB "\n", mult);
mp_print_str_dec("a_norm", taba, na + 1);
mp_print_str_dec("b_norm", tabb, nb);
#endif
for(; i >= 0; i--) {
if (unlikely(taba[i + nb] >= tabb[nb - 1])) {
/* XXX: check if it is really possible */
q = base - 1;
} else {
muldq(t1, t0, taba[i + nb], base);
adddq(t1, t0, 0, taba[i + nb - 1]);
divdq(q, r, t1, t0, tabb[nb - 1]);
}
// printf("i=%d q1=%ld\n", i, q);
r = mp_sub_mul1_dec(taba + i, tabb, nb, q);
// mp_dump("r1", taba + i, nb, bd);
// printf("r2=%ld\n", r);
v = taba[i + nb];
a = v - r;
c = a > v;
if (c)
a += base;
taba[i + nb] = a;
if (c != 0) {
/* negative result */
for(;;) {
q--;
c = mp_add_dec(taba + i, taba + i, tabb, nb, 0);
/* propagate carry and test if positive result */
if (c != 0) {
if (++taba[i + nb] == base) {
break;
}
}
}
}
tabq[i] = q;
}
#ifdef DEBUG_DIV_SLOW
mp_print_str_dec("q", tabq, na - nb + 1);
mp_print_str_dec("r", taba, nb);
#endif
/* remove the normalization */
if (mult != 1) {
mp_div1_dec(taba, taba, nb, mult, 0);
if (unlikely(tabb != static_tabb))
bf_free(s, tabb);
}
return 0;
} | O3 | c | mp_div_dec:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %r9, %r14
movq %r8, %r15
movq %rcx, %rbx
movq %rdx, (%rsp)
movq %rsi, 0x18(%rsp)
movq -0x8(%r8,%r9,8), %rcx
movq %rbx, %r8
subq %r9, %r8
movabsq $0x4563918244f40000, %rax # imm = 0x4563918244F40000
movabsq $-0x7538dcfb76180000, %rbp # imm = 0x8AC7230489E80000
cmpq %rax, %rcx
movq %rdi, 0x20(%rsp)
jb 0x955c0
testq %r14, %r14
jle 0x95574
movq (%rsp), %rax
leaq (%rax,%rbx,8), %rax
addq $-0x8, %rax
movq %r14, %rcx
movq -0x8(%r15,%rcx,8), %rdx
cmpq %rdx, (%rax)
jne 0x95628
addq $-0x8, %rax
decq %rcx
jg 0x9555d
movq 0x18(%rsp), %rax
movq $0x1, (%rax,%r8,8)
testq %r14, %r14
jle 0x9563d
movq (%rsp), %rax
leaq (%rax,%r8,8), %rax
xorl %ecx, %ecx
xorl %edx, %edx
movq (%rax,%rcx,8), %rsi
addq (%r15,%rcx,8), %rdx
xorl %edi, %edi
subq %rdx, %rsi
setb %dil
leaq (%rsi,%rbp), %rdx
cmovaeq %rsi, %rdx
movq %rdx, (%rax,%rcx,8)
incq %rcx
movq %rdi, %rdx
cmpq %rcx, %r14
jne 0x95596
jmp 0x9563d
movq %r8, 0x8(%rsp)
incq %rcx
movabsq $-0x7538dcfb76180000, %rax # imm = 0x8AC7230489E80000
xorl %edx, %edx
divq %rcx
cmpq $0x11, %r14
movq %rax, 0x10(%rsp)
jge 0x9579f
movq %rax, %rcx
leaq 0x30(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rcx, %r12
xorl %r8d, %r8d
callq 0x903cb
movq (%rsp), %r15
movq %r15, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x903cb
movq %rax, (%r15,%rbx,8)
movq %r13, %r15
movq 0x8(%rsp), %r8
jmp 0x9564a
setae %al
movzbl %al, %eax
movq 0x18(%rsp), %rcx
movq %rax, (%rcx,%r8,8)
jae 0x95581
decq %r8
movl $0x1, %eax
movq %rax, 0x10(%rsp)
testq %r8, %r8
js 0x95760
movq (%rsp), %rax
leaq (%rax,%r14,8), %r12
leaq (%rax,%r8,8), %r13
leaq -0x1(%rbp), %rax
movq %rax, 0x28(%rsp)
movabsq $0x7538dcfb76180000, %rbp # imm = 0x7538DCFB76180000
movq (%r12,%r8,8), %rax
movq -0x8(%r15,%r14,8), %rcx
movq 0x28(%rsp), %rbx
cmpq %rcx, %rax
movq %r8, 0x8(%rsp)
jae 0x956b8
movabsq $-0x7538dcfb76180000, %rdx # imm = 0x8AC7230489E80000
mulq %rdx
addq -0x8(%r12,%r8,8), %rax
adcq $0x0, %rdx
movq %rax, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
xorl %ecx, %ecx
callq 0x9d250
movq 0x8(%rsp), %r8
movq %rax, %rbx
movq (%rsp), %rax
leaq (%rax,%r8,8), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x9052a
movq 0x8(%rsp), %r8
movq (%r12,%r8,8), %rcx
subq %rax, %rcx
movabsq $-0x7538dcfb76180000, %rdx # imm = 0x8AC7230489E80000
leaq (%rcx,%rdx), %rax
cmovaeq %rcx, %rax
movq %rax, (%r12,%r8,8)
jae 0x95743
movq %rdx, %r9
decq %rbx
testq %r14, %r14
jle 0x956f5
xorl %eax, %eax
xorl %edx, %edx
movq (%r13,%rax,8), %rcx
addq %rcx, %rdx
addq (%r15,%rax,8), %rdx
leaq (%rdx,%rbp), %rsi
xorl %edi, %edi
cmpq %rcx, %rsi
setbe %dil
cmovbeq %rsi, %rdx
movq %rdx, (%r13,%rax,8)
incq %rax
movq %rdi, %rdx
cmpq %rax, %r14
jne 0x95701
cmpq %rcx, %rsi
ja 0x956f5
movq (%r12,%r8,8), %rax
incq %rax
movq %rax, (%r12,%r8,8)
cmpq %r9, %rax
jne 0x956f5
movq 0x18(%rsp), %rax
movq %rbx, (%rax,%r8,8)
leaq -0x1(%r8), %rax
addq $-0x8, %r13
testq %r8, %r8
movq %rax, %r8
jg 0x95672
xorl %ebx, %ebx
movq 0x10(%rsp), %rcx
cmpq $0x1, %rcx
je 0x9578b
xorl %ebx, %ebx
movq (%rsp), %rdi
movq %rdi, %rsi
movq %r14, %rdx
xorl %r8d, %r8d
callq 0x90684
leaq 0x30(%rsp), %rax
cmpq %rax, %r15
jne 0x957cc
movl %ebx, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdi, %r12
leaq (,%r14,8), %rdx
movq (%rdi), %rdi
xorl %esi, %esi
callq *0x8(%r12)
movq 0x10(%rsp), %rcx
movq %rax, %r13
testq %rax, %rax
jne 0x955ee
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
jmp 0x9578b
movq 0x20(%rsp), %rax
movq (%rax), %rdi
xorl %ebx, %ebx
movq %r15, %rsi
xorl %edx, %edx
callq *0x8(%rax)
jmp 0x9578b
| mp_div_dec:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0B8h
mov r14, r9
mov r15, r8
mov rbx, rcx
mov [rsp+0E8h+var_E8], rdx
mov [rsp+0E8h+var_D0], rsi
mov rcx, [r8+r9*8-8]
mov r8, rbx
sub r8, r9
mov rax, 4563918244F40000h
mov rbp, 8AC7230489E80000h
cmp rcx, rax
mov [rsp+0E8h+var_C8], rdi
jb short loc_955C0
test r14, r14
jle short loc_95574
mov rax, [rsp+0E8h+var_E8]
lea rax, [rax+rbx*8]
add rax, 0FFFFFFFFFFFFFFF8h
mov rcx, r14
loc_9555D:
mov rdx, [r15+rcx*8-8]
cmp [rax], rdx
jnz loc_95628
add rax, 0FFFFFFFFFFFFFFF8h
dec rcx
jg short loc_9555D
loc_95574:
mov rax, [rsp+0E8h+var_D0]
mov qword ptr [rax+r8*8], 1
loc_95581:
test r14, r14
jle loc_9563D
mov rax, [rsp+0E8h+var_E8]
lea rax, [rax+r8*8]
xor ecx, ecx
xor edx, edx
loc_95596:
mov rsi, [rax+rcx*8]
add rdx, [r15+rcx*8]
xor edi, edi
sub rsi, rdx
setb dil
lea rdx, [rsi+rbp]
cmovnb rdx, rsi
mov [rax+rcx*8], rdx
inc rcx
mov rdx, rdi
cmp r14, rcx
jnz short loc_95596
jmp short loc_9563D
loc_955C0:
mov [rsp+0E8h+var_E0], r8
inc rcx
mov rax, 8AC7230489E80000h
xor edx, edx
div rcx
cmp r14, 11h
mov [rsp+0E8h+var_D8], rax
jge loc_9579F
mov rcx, rax
lea r13, [rsp+0E8h+var_B8]
loc_955EE:
mov rdi, r13
mov rsi, r15
mov rdx, r14
mov r12, rcx
xor r8d, r8d
call mp_mul1_dec
mov r15, [rsp+0E8h+var_E8]
mov rdi, r15
mov rsi, r15
mov rdx, rbx
mov rcx, r12
xor r8d, r8d
call mp_mul1_dec
mov [r15+rbx*8], rax
mov r15, r13
mov r8, [rsp+0E8h+var_E0]
jmp short loc_9564A
loc_95628:
setnb al
movzx eax, al
mov rcx, [rsp+0E8h+var_D0]
mov [rcx+r8*8], rax
jnb loc_95581
loc_9563D:
dec r8
mov eax, 1
mov [rsp+0E8h+var_D8], rax
loc_9564A:
test r8, r8
js loc_95760
mov rax, [rsp+0E8h+var_E8]
lea r12, [rax+r14*8]
lea r13, [rax+r8*8]
lea rax, [rbp-1]
mov [rsp+0E8h+var_C0], rax
mov rbp, 7538DCFB76180000h
loc_95672:
mov rax, [r12+r8*8]
mov rcx, [r15+r14*8-8]
mov rbx, [rsp+0E8h+var_C0]
cmp rax, rcx
mov [rsp+0E8h+var_E0], r8
jnb short loc_956B8
mov rdx, 8AC7230489E80000h
mul rdx
add rax, [r12+r8*8-8]
adc rdx, 0
mov rdi, rax
mov rsi, rdx
mov rdx, rcx
xor ecx, ecx
call __udivti3
mov r8, [rsp+0E8h+var_E0]
mov rbx, rax
loc_956B8:
mov rax, [rsp+0E8h+var_E8]
lea rdi, [rax+r8*8]
mov rsi, r15
mov rdx, r14
mov rcx, rbx
call mp_sub_mul1_dec
mov r8, [rsp+0E8h+var_E0]
mov rcx, [r12+r8*8]
sub rcx, rax
mov rdx, 8AC7230489E80000h
lea rax, [rcx+rdx]
cmovnb rax, rcx
mov [r12+r8*8], rax
jnb short loc_95743
mov r9, rdx
loc_956F5:
dec rbx
test r14, r14
jle short loc_956F5
xor eax, eax
xor edx, edx
loc_95701:
mov rcx, [r13+rax*8+0]
add rdx, rcx
add rdx, [r15+rax*8]
lea rsi, [rdx+rbp]
xor edi, edi
cmp rsi, rcx
setbe dil
cmovbe rdx, rsi
mov [r13+rax*8+0], rdx
inc rax
mov rdx, rdi
cmp r14, rax
jnz short loc_95701
cmp rsi, rcx
ja short loc_956F5
mov rax, [r12+r8*8]
inc rax
mov [r12+r8*8], rax
cmp rax, r9
jnz short loc_956F5
loc_95743:
mov rax, [rsp+0E8h+var_D0]
mov [rax+r8*8], rbx
lea rax, [r8-1]
add r13, 0FFFFFFFFFFFFFFF8h
test r8, r8
mov r8, rax
jg loc_95672
loc_95760:
xor ebx, ebx
mov rcx, [rsp+0E8h+var_D8]
cmp rcx, 1
jz short loc_9578B
xor ebx, ebx
mov rdi, [rsp+0E8h+var_E8]
mov rsi, rdi
mov rdx, r14
xor r8d, r8d
call mp_div1_dec
lea rax, [rsp+0E8h+var_B8]
cmp r15, rax
jnz short loc_957CC
loc_9578B:
mov eax, ebx
add rsp, 0B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9579F:
mov r12, rdi
lea rdx, ds:0[r14*8]
mov rdi, [rdi]
xor esi, esi
call qword ptr [r12+8]
mov rcx, [rsp+0E8h+var_D8]
mov r13, rax
test rax, rax
jnz loc_955EE
mov ebx, 0FFFFFFFFh
jmp short loc_9578B
loc_957CC:
mov rax, [rsp+0E8h+var_C8]
mov rdi, [rax]
xor ebx, ebx
mov rsi, r15
xor edx, edx
call qword ptr [rax+8]
jmp short loc_9578B
| long long mp_div_dec(_QWORD *a1, long long a2, long long a3, long long a4, _BYTE *a5, long long a6)
{
_BYTE *v7; // r15
unsigned long long v9; // rcx
long long v10; // r8
unsigned long long *v11; // rax
long long v12; // rcx
unsigned long long v13; // rdx
bool v14; // cf
long long v16; // rax
long long v17; // rcx
_BOOL8 v18; // rdx
unsigned long long v19; // rsi
unsigned long long v20; // rdx
bool v21; // cf
unsigned long long v22; // rsi
unsigned long long v23; // rdx
unsigned long long v24; // rcx
unsigned long long v25; // rcx
_BYTE *v26; // r13
unsigned long long v27; // r12
long long v28; // r8
long long v29; // r12
long long v30; // r13
unsigned long long v31; // rax
unsigned long long v32; // rcx
unsigned long long v33; // rbx
unsigned __int128 v34; // rdi
long long v35; // rax
unsigned long long v36; // rax
unsigned long long v37; // rcx
bool v38; // cf
unsigned long long v39; // rcx
unsigned long long v40; // rax
long long v41; // rax
_BOOL8 v42; // rdx
unsigned long long v43; // rcx
unsigned long long v44; // rdx
unsigned long long v45; // rsi
_BOOL8 v46; // rdi
long long v47; // rax
unsigned int v48; // ebx
long long v50; // rax
long long v52; // [rsp+8h] [rbp-E0h]
long long v53; // [rsp+8h] [rbp-E0h]
long long v54; // [rsp+10h] [rbp-D8h]
unsigned long long v57; // [rsp+28h] [rbp-C0h]
_BYTE v58[184]; // [rsp+30h] [rbp-B8h] BYREF
v7 = a5;
v9 = *(_QWORD *)&a5[8 * a6 - 8];
v10 = a4 - a6;
if ( v9 >= 0x4563918244F40000LL )
{
if ( a6 <= 0 )
{
LABEL_6:
*(_QWORD *)(a2 + 8 * v10) = 1LL;
}
else
{
v11 = (unsigned long long *)(a3 + 8 * a4 - 8);
v12 = a6;
while ( 1 )
{
v13 = *(_QWORD *)&v7[8 * v12 - 8];
v14 = *v11 < v13;
if ( *v11 != v13 )
break;
--v11;
if ( v12-- <= 1 )
goto LABEL_6;
}
*(_QWORD *)(a2 + 8 * v10) = *v11 >= v13;
if ( v14 )
goto LABEL_17;
}
if ( a6 > 0 )
{
v16 = a3 + 8 * v10;
v17 = 0LL;
v18 = 0LL;
do
{
v19 = *(_QWORD *)(v16 + 8 * v17);
v20 = *(_QWORD *)&v7[8 * v17] + v18;
v21 = v19 < v20;
v22 = v19 - v20;
v23 = v22 - 0x7538DCFB76180000LL;
if ( !v21 )
v23 = v22;
*(_QWORD *)(v16 + 8 * v17++) = v23;
v18 = v21;
}
while ( a6 != v17 );
}
LABEL_17:
v28 = v10 - 1;
v54 = 1LL;
goto LABEL_18;
}
v52 = a4 - a6;
v24 = v9 + 1;
v54 = 0x8AC7230489E80000LL / v24;
if ( a6 >= 17 )
{
v50 = ((long long ( *)(_QWORD, _QWORD, long long, unsigned long long, long long))a1[1])(
*a1,
0LL,
8 * a6,
v24,
v10);
v25 = v54;
v26 = (_BYTE *)v50;
if ( !v50 )
return (unsigned int)-1;
}
else
{
v25 = 0x8AC7230489E80000LL / v24;
v26 = v58;
}
v27 = v25;
mp_mul1_dec((long long)v26, (long long)v7, a6, v25, 0LL);
*(_QWORD *)(a3 + 8 * a4) = mp_mul1_dec(a3, a3, a4, v27, 0LL);
v7 = v26;
v28 = v52;
LABEL_18:
if ( v28 >= 0 )
{
v29 = a3 + 8 * a6;
v30 = a3 + 8 * v28;
v57 = 0x8AC7230489E7FFFFLL;
do
{
v31 = *(_QWORD *)(v29 + 8 * v28);
v32 = *(_QWORD *)&v7[8 * a6 - 8];
v33 = v57;
v53 = v28;
if ( v31 < v32 )
{
v34 = *(unsigned long long *)(v29 + 8 * v28 - 8) + 0x8AC7230489E80000LL * (unsigned __int128)v31;
v35 = _udivti3(v34, *((_QWORD *)&v34 + 1), v32, 0LL);
v28 = v53;
v33 = v35;
}
v36 = mp_sub_mul1_dec(a3 + 8 * v28, (long long)v7, a6, v33);
v37 = *(_QWORD *)(v29 + 8 * v53);
v38 = v37 < v36;
v39 = v37 - v36;
v40 = v39 - 0x7538DCFB76180000LL;
if ( !v38 )
v40 = v39;
*(_QWORD *)(v29 + 8 * v53) = v40;
if ( v38 )
{
while ( 1 )
{
do
--v33;
while ( a6 <= 0 );
v41 = 0LL;
v42 = 0LL;
do
{
v43 = *(_QWORD *)(v30 + 8 * v41);
v44 = *(_QWORD *)&v7[8 * v41] + v43 + v42;
v45 = v44 + 0x7538DCFB76180000LL;
v46 = v44 + 0x7538DCFB76180000LL <= v43;
if ( v44 + 0x7538DCFB76180000LL <= v43 )
v44 += 0x7538DCFB76180000LL;
*(_QWORD *)(v30 + 8 * v41++) = v44;
v42 = v46;
}
while ( a6 != v41 );
if ( v45 <= v43 )
{
v47 = *(_QWORD *)(v29 + 8 * v53) + 1LL;
*(_QWORD *)(v29 + 8 * v53) = v47;
if ( v47 == 0x8AC7230489E80000LL )
break;
}
}
}
*(_QWORD *)(a2 + 8 * v53) = v33;
v30 -= 8LL;
v28 = v53 - 1;
}
while ( v53 > 0 );
}
v48 = 0;
if ( v54 != 1 )
{
v48 = 0;
mp_div1_dec(a3, a3, a6, v54, 0LL);
if ( v7 != v58 )
{
v48 = 0;
((void ( *)(_QWORD, _BYTE *, _QWORD))a1[1])(*a1, v7, 0LL);
}
}
return v48;
}
| mp_div_dec:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xb8
MOV R14,R9
MOV R15,R8
MOV RBX,RCX
MOV qword ptr [RSP],RDX
MOV qword ptr [RSP + 0x18],RSI
MOV RCX,qword ptr [R8 + R9*0x8 + -0x8]
MOV R8,RBX
SUB R8,R9
MOV RAX,0x4563918244f40000
MOV RBP,-0x7538dcfb76180000
CMP RCX,RAX
MOV qword ptr [RSP + 0x20],RDI
JC 0x001955c0
TEST R14,R14
JLE 0x00195574
MOV RAX,qword ptr [RSP]
LEA RAX,[RAX + RBX*0x8]
ADD RAX,-0x8
MOV RCX,R14
LAB_0019555d:
MOV RDX,qword ptr [R15 + RCX*0x8 + -0x8]
CMP qword ptr [RAX],RDX
JNZ 0x00195628
ADD RAX,-0x8
DEC RCX
JG 0x0019555d
LAB_00195574:
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + R8*0x8],0x1
LAB_00195581:
TEST R14,R14
JLE 0x0019563d
MOV RAX,qword ptr [RSP]
LEA RAX,[RAX + R8*0x8]
XOR ECX,ECX
XOR EDX,EDX
LAB_00195596:
MOV RSI,qword ptr [RAX + RCX*0x8]
ADD RDX,qword ptr [R15 + RCX*0x8]
XOR EDI,EDI
SUB RSI,RDX
SETC DIL
LEA RDX,[RSI + RBP*0x1]
CMOVNC RDX,RSI
MOV qword ptr [RAX + RCX*0x8],RDX
INC RCX
MOV RDX,RDI
CMP R14,RCX
JNZ 0x00195596
JMP 0x0019563d
LAB_001955c0:
MOV qword ptr [RSP + 0x8],R8
INC RCX
MOV RAX,-0x7538dcfb76180000
XOR EDX,EDX
DIV RCX
CMP R14,0x11
MOV qword ptr [RSP + 0x10],RAX
JGE 0x0019579f
MOV RCX,RAX
LEA R13,[RSP + 0x30]
LAB_001955ee:
MOV RDI,R13
MOV RSI,R15
MOV RDX,R14
MOV R12,RCX
XOR R8D,R8D
CALL 0x001903cb
MOV R15,qword ptr [RSP]
MOV RDI,R15
MOV RSI,R15
MOV RDX,RBX
MOV RCX,R12
XOR R8D,R8D
CALL 0x001903cb
MOV qword ptr [R15 + RBX*0x8],RAX
MOV R15,R13
MOV R8,qword ptr [RSP + 0x8]
JMP 0x0019564a
LAB_00195628:
SETNC AL
MOVZX EAX,AL
MOV RCX,qword ptr [RSP + 0x18]
MOV qword ptr [RCX + R8*0x8],RAX
JNC 0x00195581
LAB_0019563d:
DEC R8
MOV EAX,0x1
MOV qword ptr [RSP + 0x10],RAX
LAB_0019564a:
TEST R8,R8
JS 0x00195760
MOV RAX,qword ptr [RSP]
LEA R12,[RAX + R14*0x8]
LEA R13,[RAX + R8*0x8]
LEA RAX,[RBP + -0x1]
MOV qword ptr [RSP + 0x28],RAX
MOV RBP,0x7538dcfb76180000
LAB_00195672:
MOV RAX,qword ptr [R12 + R8*0x8]
MOV RCX,qword ptr [R15 + R14*0x8 + -0x8]
MOV RBX,qword ptr [RSP + 0x28]
CMP RAX,RCX
MOV qword ptr [RSP + 0x8],R8
JNC 0x001956b8
MOV RDX,-0x7538dcfb76180000
MUL RDX
ADD RAX,qword ptr [R12 + R8*0x8 + -0x8]
ADC RDX,0x0
MOV RDI,RAX
MOV RSI,RDX
MOV RDX,RCX
XOR ECX,ECX
CALL 0x0019d250
MOV R8,qword ptr [RSP + 0x8]
MOV RBX,RAX
LAB_001956b8:
MOV RAX,qword ptr [RSP]
LEA RDI,[RAX + R8*0x8]
MOV RSI,R15
MOV RDX,R14
MOV RCX,RBX
CALL 0x0019052a
MOV R8,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [R12 + R8*0x8]
SUB RCX,RAX
MOV RDX,-0x7538dcfb76180000
LEA RAX,[RCX + RDX*0x1]
CMOVNC RAX,RCX
MOV qword ptr [R12 + R8*0x8],RAX
JNC 0x00195743
MOV R9,RDX
LAB_001956f5:
DEC RBX
TEST R14,R14
JLE 0x001956f5
XOR EAX,EAX
XOR EDX,EDX
LAB_00195701:
MOV RCX,qword ptr [R13 + RAX*0x8]
ADD RDX,RCX
ADD RDX,qword ptr [R15 + RAX*0x8]
LEA RSI,[RDX + RBP*0x1]
XOR EDI,EDI
CMP RSI,RCX
SETBE DIL
CMOVBE RDX,RSI
MOV qword ptr [R13 + RAX*0x8],RDX
INC RAX
MOV RDX,RDI
CMP R14,RAX
JNZ 0x00195701
CMP RSI,RCX
JA 0x001956f5
MOV RAX,qword ptr [R12 + R8*0x8]
INC RAX
MOV qword ptr [R12 + R8*0x8],RAX
CMP RAX,R9
JNZ 0x001956f5
LAB_00195743:
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + R8*0x8],RBX
LEA RAX,[R8 + -0x1]
ADD R13,-0x8
TEST R8,R8
MOV R8,RAX
JG 0x00195672
LAB_00195760:
XOR EBX,EBX
MOV RCX,qword ptr [RSP + 0x10]
CMP RCX,0x1
JZ 0x0019578b
XOR EBX,EBX
MOV RDI,qword ptr [RSP]
MOV RSI,RDI
MOV RDX,R14
XOR R8D,R8D
CALL 0x00190684
LEA RAX,[RSP + 0x30]
CMP R15,RAX
JNZ 0x001957cc
LAB_0019578b:
MOV EAX,EBX
ADD RSP,0xb8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0019579f:
MOV R12,RDI
LEA RDX,[R14*0x8]
MOV RDI,qword ptr [RDI]
XOR ESI,ESI
CALL qword ptr [R12 + 0x8]
MOV RCX,qword ptr [RSP + 0x10]
MOV R13,RAX
TEST RAX,RAX
JNZ 0x001955ee
MOV EBX,0xffffffff
JMP 0x0019578b
LAB_001957cc:
MOV RAX,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RAX]
XOR EBX,EBX
MOV RSI,R15
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
JMP 0x0019578b
|
int8
mp_div_dec(int8 *param_1,long param_2,long param_3,long param_4,int1 *param_5,
long param_6)
{
bool bVar1;
int1 auVar2 [16];
int1 auVar3 [16];
ulong *puVar4;
int8 uVar5;
ulong uVar6;
long lVar7;
ulong uVar8;
long lVar9;
int1 *puVar10;
long lVar11;
long lVar12;
ulong uVar13;
ulong uVar14;
long lVar15;
long local_d8;
long local_c0;
int1 local_b8 [136];
lVar15 = param_4 - param_6;
if (*(ulong *)(param_5 + param_6 * 8 + -8) < 5000000000000000000) {
auVar2._8_8_ = 0;
auVar2._0_8_ = *(ulong *)(param_5 + param_6 * 8 + -8) + 1;
local_d8 = SUB168((ZEXT816(0) << 0x40 | ZEXT816(10000000000000000000)) / auVar2,0);
if (param_6 < 0x11) {
puVar10 = local_b8;
}
else {
puVar10 = (int1 *)(*(code *)param_1[1])(*param_1,0,param_6 * 8);
if (puVar10 == (int1 *)0x0) {
return 0xffffffff;
}
}
mp_mul1_dec(puVar10,param_5,param_6,local_d8,0);
uVar5 = mp_mul1_dec(param_3,param_3,param_4,local_d8,0);
*(int8 *)(param_3 + param_4 * 8) = uVar5;
}
else {
if (0 < param_6) {
puVar4 = (ulong *)(param_3 + param_4 * 8);
lVar11 = param_6;
do {
puVar4 = puVar4 + -1;
uVar6 = *(ulong *)(param_5 + lVar11 * 8 + -8);
uVar8 = *puVar4;
if (uVar8 != uVar6) {
*(ulong *)(param_2 + lVar15 * 8) = (ulong)(uVar6 <= uVar8);
if (uVar6 > uVar8) goto LAB_0019563d;
goto LAB_00195581;
}
lVar12 = lVar11 + -1;
bVar1 = 0 < lVar11;
lVar11 = lVar12;
} while (lVar12 != 0 && bVar1);
}
*(int8 *)(param_2 + lVar15 * 8) = 1;
LAB_00195581:
if (0 < param_6) {
lVar11 = param_3 + lVar15 * 8;
lVar12 = 0;
uVar6 = 0;
do {
uVar8 = *(ulong *)(lVar11 + lVar12 * 8);
uVar13 = uVar6 + *(long *)(param_5 + lVar12 * 8);
uVar6 = (ulong)(uVar8 < uVar13);
lVar7 = (uVar8 - uVar13) + -0x7538dcfb76180000;
if (uVar8 >= uVar13) {
lVar7 = uVar8 - uVar13;
}
*(long *)(lVar11 + lVar12 * 8) = lVar7;
lVar12 = lVar12 + 1;
} while (param_6 != lVar12);
}
LAB_0019563d:
lVar15 = lVar15 + -1;
local_d8 = 1;
puVar10 = param_5;
}
if (-1 < lVar15) {
lVar11 = param_3 + param_6 * 8;
lVar12 = param_3 + lVar15 * 8;
local_c0 = -0x7538dcfb76180001;
do {
uVar6 = *(ulong *)(lVar11 + lVar15 * 8);
lVar7 = local_c0;
if (uVar6 < *(ulong *)(puVar10 + param_6 * 8 + -8)) {
auVar3._8_8_ = 0;
auVar3._0_8_ = uVar6;
uVar6 = SUB168(auVar3 * ZEXT816(10000000000000000000),0);
puVar4 = (ulong *)(lVar11 + -8 + lVar15 * 8);
lVar7 = __udivti3(uVar6 + *puVar4,
SUB168(auVar3 * ZEXT816(10000000000000000000),8) +
(ulong)CARRY8(uVar6,*puVar4),*(ulong *)(puVar10 + param_6 * 8 + -8),0);
}
uVar8 = mp_sub_mul1_dec(param_3 + lVar15 * 8,puVar10,param_6,lVar7);
uVar6 = *(ulong *)(lVar11 + lVar15 * 8);
lVar9 = (uVar6 - uVar8) + -0x7538dcfb76180000;
if (uVar8 <= uVar6) {
lVar9 = uVar6 - uVar8;
}
*(long *)(lVar11 + lVar15 * 8) = lVar9;
if (uVar8 > uVar6) {
do {
do {
lVar7 = lVar7 + -1;
} while (param_6 < 1);
lVar9 = 0;
uVar6 = 0;
do {
uVar13 = *(ulong *)(lVar12 + lVar9 * 8);
uVar14 = uVar6 + uVar13 + *(long *)(puVar10 + lVar9 * 8);
uVar8 = uVar14 + 0x7538dcfb76180000;
uVar6 = (ulong)(uVar8 <= uVar13);
if (uVar8 <= uVar13) {
uVar14 = uVar8;
}
*(ulong *)(lVar12 + lVar9 * 8) = uVar14;
lVar9 = lVar9 + 1;
} while (param_6 != lVar9);
} while ((uVar13 < uVar8) ||
(lVar9 = *(long *)(lVar11 + lVar15 * 8) + 1, *(long *)(lVar11 + lVar15 * 8) = lVar9,
lVar9 != -0x7538dcfb76180000));
}
*(long *)(param_2 + lVar15 * 8) = lVar7;
lVar12 = lVar12 + -8;
bVar1 = 0 < lVar15;
lVar15 = lVar15 + -1;
} while (bVar1);
}
if ((local_d8 != 1) && (mp_div1_dec(param_3,param_3,param_6,local_d8,0), puVar10 != local_b8)) {
(*(code *)param_1[1])(*param_1,puVar10,0);
}
return 0;
}
| |
55,154 | google::protobuf::compiler::cpp::EnumOneofFieldGenerator::GenerateConstructorCode(google::protobuf::io::Printer*) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/cpp/enum_field.cc | void EnumOneofFieldGenerator::GenerateConstructorCode(
io::Printer* printer) const {
Formatter format(printer, variables_);
format("$ns$::_$classname$_default_instance_.$field$ = $default$;\n");
} | O3 | cpp | google::protobuf::compiler::cpp::EnumOneofFieldGenerator::GenerateConstructorCode(google::protobuf::io::Printer*) const:
pushq %r14
pushq %rbx
subq $0x38, %rsp
leaq 0x18(%rdi), %rax
leaq 0x8(%rsp), %rbx
movq %rsi, -0x8(%rbx)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7e61e
leaq 0xd973d(%rip), %rsi # 0x1cc159
movq %rsp, %rdi
callq 0x39938
movq %rbx, %rdi
callq 0x2e5e0
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2e5e0
movq %r14, %rdi
callq 0x1f860
nop
| _ZNK6google8protobuf8compiler3cpp23EnumOneofFieldGenerator23GenerateConstructorCodeEPNS0_2io7PrinterE:
push r14
push rbx
sub rsp, 38h
lea rax, [rdi+18h]
lea rbx, [rsp+48h+var_40]
mov [rbx-8], rsi
mov rdi, rbx
mov rsi, rax
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EEC2ERKSE_; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::_Rb_tree(std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>> const&)
lea rsi, aNsClassnameDef; "$ns$::_$classname$_default_instance_.$f"...
mov rdi, rsp
call _ZNK6google8protobuf8compiler3cpp9FormatterclIJEEEvPKcDpRKT_
mov rdi, rbx
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree()
add rsp, 38h
pop rbx
pop r14
retn
mov r14, rax
mov rdi, rbx
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree()
mov rdi, r14
call __Unwind_Resume
| long long google::protobuf::compiler::cpp::EnumOneofFieldGenerator::GenerateConstructorCode(
google::protobuf::compiler::cpp::EnumOneofFieldGenerator *this,
google::protobuf::io::Printer *a2)
{
long long result; // rax
google::protobuf::io::Printer *v3; // [rsp+0h] [rbp-48h] BYREF
_BYTE v4[64]; // [rsp+8h] [rbp-40h] BYREF
v3 = a2;
std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::_Rb_tree(
(long long)v4,
(long long)this + 24);
result = google::protobuf::compiler::cpp::Formatter::operator()<>(
&v3,
"$ns$::_$classname$_default_instance_.$field$ = $default$;\n");
std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree((long long)v4);
return result;
}
| GenerateConstructorCode:
PUSH R14
PUSH RBX
SUB RSP,0x38
LEA RAX,[RDI + 0x18]
LEA RBX,[RSP + 0x8]
MOV qword ptr [RBX + -0x8],RSI
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0017e61e
LAB_001f2a15:
LEA RSI,[0x2cc159]
MOV RDI,RSP
CALL 0x00139938
LAB_001f2a24:
MOV RDI,RBX
CALL 0x0012e5e0
ADD RSP,0x38
POP RBX
POP R14
RET
|
/* google::protobuf::compiler::cpp::EnumOneofFieldGenerator::GenerateConstructorCode(google::protobuf::io::Printer*)
const */
void __thiscall
google::protobuf::compiler::cpp::EnumOneofFieldGenerator::GenerateConstructorCode
(EnumOneofFieldGenerator *this,Printer *param_1)
{
Printer *local_48;
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
local_40 [48];
local_48 = param_1;
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::_Rb_tree(local_40,(_Rb_tree *)(this + 0x18));
/* try { // try from 001f2a15 to 001f2a23 has its CatchHandler @ 001f2a34 */
Formatter::operator()<>
((Formatter *)&local_48,"$ns$::_$classname$_default_instance_.$field$ = $default$;\n");
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::~_Rb_tree(local_40);
return;
}
| |
55,155 | parse_cpu_range(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512]) | monkey531[P]llama/common/common.cpp | bool parse_cpu_range(const std::string & range, bool (&boolmask)[GGML_MAX_N_THREADS]) {
size_t dash_loc = range.find('-');
if (dash_loc == std::string::npos) {
LOG_ERR("Format of CPU range is invalid! Expected [<start>]-[<end>].\n");
return false;
}
size_t start_i;
size_t end_i;
if (dash_loc == 0) {
start_i = 0;
} else {
start_i = std::stoull(range.substr(0, dash_loc));
if (start_i >= GGML_MAX_N_THREADS) {
LOG_ERR("Start index out of bounds!\n");
return false;
}
}
if (dash_loc == range.length() - 1) {
end_i = GGML_MAX_N_THREADS - 1;
} else {
end_i = std::stoull(range.substr(dash_loc + 1));
if (end_i >= GGML_MAX_N_THREADS) {
LOG_ERR("End index out of bounds!\n");
return false;
}
}
for (size_t i = start_i; i <= end_i; i++) {
boolmask[i] = true;
}
return true;
} | O1 | cpp | parse_cpu_range(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512]):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r15
movl $0x2d, %esi
xorl %edx, %edx
callq 0x1bb30
movq %rax, %r12
testq %rax, %rax
je 0x7293a
cmpq $-0x1, %r12
jne 0x72947
leaq 0xbdb08(%rip), %rax # 0x130428
cmpl $0x0, (%rax)
js 0x72af8
callq 0xce04b
leaq 0x7f0da(%rip), %rdx # 0xf1a0f
jmp 0x72ac0
movq %rbx, 0x10(%rsp)
movq %r12, %r14
jmp 0x72a01
movq %rbx, 0x10(%rsp)
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %r12, %rcx
callq 0x1b930
movq (%r14), %rbp
callq 0x1b060
movq %rax, %r13
movl (%rax), %eax
movl %eax, 0x4(%rsp)
movl $0x0, (%r13)
leaq 0x8(%rsp), %rbx
movq %rbp, %rdi
movq %rbx, %rsi
movl $0xa, %edx
callq 0x1bb60
cmpq %rbp, (%rbx)
je 0x72b0b
movq %rax, %r14
movl (%r13), %eax
testl %eax, %eax
je 0x729b4
cmpl $0x22, %eax
jne 0x729bc
leaq 0x7fc21(%rip), %rdi # 0xf25d0
callq 0x1bcb0
movl 0x4(%rsp), %eax
movl %eax, (%r13)
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x729d7
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x1b8e0
cmpq $0x200, %r14 # imm = 0x200
jb 0x72a01
leaq 0xbda41(%rip), %rax # 0x130428
cmpl $0x0, (%rax)
js 0x72af8
callq 0xce04b
leaq 0x7f050(%rip), %rdx # 0xf1a4c
jmp 0x72ac0
movq 0x8(%r15), %rax
decq %rax
movl $0x1ff, %r13d # imm = 0x1FF
cmpq %rax, %r12
je 0x72ad3
incq %r12
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq $-0x1, %rcx
callq 0x1b930
movq (%rbx), %rbx
callq 0x1b060
movq %rax, %r15
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x8(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x1bb60
cmpq %rbx, (%r12)
je 0x72b17
movq %rax, %r13
movl (%r15), %eax
testl %eax, %eax
je 0x72a81
cmpl $0x22, %eax
jne 0x72a84
leaq 0x7fb54(%rip), %rdi # 0xf25d0
callq 0x1bcb0
movl %ebp, (%r15)
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x72a9f
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x1b8e0
cmpq $0x200, %r13 # imm = 0x200
jb 0x72ad3
leaq 0xbd979(%rip), %rax # 0x130428
cmpl $0x0, (%rax)
js 0x72af8
callq 0xce04b
leaq 0x7efa8(%rip), %rdx # 0xf1a68
xorl %ebp, %ebp
movq %rax, %rdi
movl $0x4, %esi
xorl %eax, %eax
callq 0xce0e6
jmp 0x72afa
movb $0x1, %bpl
cmpq %r13, %r14
ja 0x72afa
movq 0x10(%rsp), %rdi
addq %r14, %rdi
subq %r14, %r13
incq %r13
movl $0x1, %esi
movq %r13, %rdx
callq 0x1b4f0
jmp 0x72afa
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7fabe(%rip), %rdi # 0xf25d0
callq 0x1b550
leaq 0x7fab2(%rip), %rdi # 0xf25d0
callq 0x1b550
movq %rax, %rbx
cmpl $0x0, (%r15)
jne 0x72b2f
movl %ebp, (%r15)
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x1c970
jmp 0x72b61
movq %rax, %rbx
cmpl $0x0, (%r13)
jne 0x72b52
movl 0x4(%rsp), %eax
movl %eax, (%r13)
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x1c98d
movq %rbx, %rdi
callq 0x1bfb0
| _Z15parse_cpu_rangeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA512_b:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, rsi
mov r15, rdi
mov esi, 2Dh ; '-'
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
mov r12, rax
test rax, rax
jz short loc_7293A
cmp r12, 0FFFFFFFFFFFFFFFFh
jnz short loc_72947
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js loc_72AF8
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aFormatOfCpuRan; "Format of CPU range is invalid! Expecte"...
jmp loc_72AC0
loc_7293A:
mov [rsp+68h+var_58], rbx
mov r14, r12
jmp loc_72A01
loc_72947:
mov [rsp+68h+var_58], rbx
lea r14, [rsp+68h+var_50]
mov rdi, r14
mov rsi, r15
xor edx, edx
mov rcx, r12
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rbp, [r14]
call ___errno_location
mov r13, rax
mov eax, [rax]
mov [rsp+68h+var_64], eax
mov dword ptr [r13+0], 0
lea rbx, [rsp+68h+var_60]
mov rdi, rbp
mov rsi, rbx
mov edx, 0Ah
call _strtoull
cmp [rbx], rbp
jz loc_72B0B
mov r14, rax
mov eax, [r13+0]
test eax, eax
jz short loc_729B4
cmp eax, 22h ; '"'
jnz short loc_729BC
lea rdi, aStoull; "stoull"
call __ZSt20__throw_out_of_rangePKc; std::__throw_out_of_range(char const*)
loc_729B4:
mov eax, [rsp+68h+var_64]
mov [r13+0], eax
loc_729BC:
lea rax, [rsp+68h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_729D7
mov rsi, [rsp+68h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_729D7:
cmp r14, 200h
jb short loc_72A01
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js loc_72AF8
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aStartIndexOutO; "Start index out of bounds!\n"
jmp loc_72AC0
loc_72A01:
mov rax, [r15+8]
dec rax
mov r13d, 1FFh
cmp r12, rax
jz loc_72AD3
inc r12
lea rbx, [rsp+68h+var_50]
mov rdi, rbx
mov rsi, r15
mov rdx, r12
mov rcx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rbx, [rbx]
call ___errno_location
mov r15, rax
mov ebp, [rax]
mov dword ptr [rax], 0
lea r12, [rsp+68h+var_60]
mov rdi, rbx
mov rsi, r12
mov edx, 0Ah
call _strtoull
cmp [r12], rbx
jz loc_72B17
mov r13, rax
mov eax, [r15]
test eax, eax
jz short loc_72A81
cmp eax, 22h ; '"'
jnz short loc_72A84
lea rdi, aStoull; "stoull"
call __ZSt20__throw_out_of_rangePKc; std::__throw_out_of_range(char const*)
loc_72A81:
mov [r15], ebp
loc_72A84:
lea rax, [rsp+68h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_72A9F
mov rsi, [rsp+68h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_72A9F:
cmp r13, 200h
jb short loc_72AD3
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_72AF8
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aEndIndexOutOfB; "End index out of bounds!\n"
loc_72AC0:
xor ebp, ebp
mov rdi, rax
mov esi, 4
xor eax, eax
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
jmp short loc_72AFA
loc_72AD3:
mov bpl, 1
cmp r14, r13
ja short loc_72AFA
mov rdi, [rsp+68h+var_58]
add rdi, r14
sub r13, r14
inc r13
mov esi, 1
mov rdx, r13
call _memset
jmp short loc_72AFA
loc_72AF8:
xor ebp, ebp
loc_72AFA:
mov eax, ebp
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_72B0B:
lea rdi, aStoull; "stoull"
call __ZSt24__throw_invalid_argumentPKc; std::__throw_invalid_argument(char const*)
loc_72B17:
lea rdi, aStoull; "stoull"
call __ZSt24__throw_invalid_argumentPKc; std::__throw_invalid_argument(char const*)
mov rbx, rax
cmp dword ptr [r15], 0
jnz short loc_72B2F
mov [r15], ebp
loc_72B2F:
lea rdi, [rsp+68h+var_60]
lea rsi, [rsp+68h+var_50]
call _Z15parse_cpu_rangeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA512_b_cold_1; parse_cpu_range(std::string const&,bool (&)[512]) [clone]
jmp short loc_72B61
mov rbx, rax
cmp dword ptr [r13+0], 0
jnz short loc_72B52
mov eax, [rsp+68h+var_64]
mov [r13+0], eax
loc_72B52:
lea rdi, [rsp+68h+var_60]
lea rsi, [rsp+68h+var_50]
call _Z15parse_cpu_rangeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA512_b_cold_2; parse_cpu_range(std::string const&,bool (&)[512]) [clone]
loc_72B61:
mov rdi, rbx
call __Unwind_Resume
| long long parse_cpu_range(long long a1, long long a2, double a3)
{
void *v3; // rbp
_DWORD *v4; // r15
long long v5; // rax
long long v6; // r12
int v7; // eax
int v8; // ecx
int v9; // r8d
int v10; // r9d
const char *v11; // rdx
unsigned long long v12; // r14
int *v13; // r13
long long v14; // rax
unsigned long long v15; // r13
void *v16; // rbx
long long v17; // rax
long long v19; // rbx
int v20; // [rsp+4h] [rbp-64h]
void *v21; // [rsp+8h] [rbp-60h] BYREF
long long v22; // [rsp+10h] [rbp-58h]
void *v23[2]; // [rsp+18h] [rbp-50h] BYREF
_QWORD v24[8]; // [rsp+28h] [rbp-40h] BYREF
v4 = (_DWORD *)a1;
v5 = std::string::find(a1, 45LL, 0LL);
v6 = v5;
if ( v5 )
{
if ( v5 == -1 )
{
if ( common_log_verbosity_thold >= 0 )
{
v7 = common_log_main();
v11 = "Format of CPU range is invalid! Expected [<start>]-[<end>].\n";
LABEL_27:
LODWORD(v3) = 0;
common_log_add(v7, 4, (_DWORD)v11, v8, v9, v10);
return (unsigned int)v3;
}
goto LABEL_30;
}
v22 = a2;
std::string::substr(v23, a1, 0LL, v5);
v3 = v23[0];
v13 = (int *)__errno_location(a3);
v20 = *v13;
*v13 = 0;
v14 = strtoull(v3, &v21, 10LL);
if ( v21 == v3 )
{
std::__throw_invalid_argument("stoull");
goto LABEL_33;
}
v12 = v14;
if ( *v13 )
{
if ( *v13 == 34 )
std::__throw_out_of_range("stoull");
}
else
{
*v13 = v20;
}
if ( v23[0] != v24 )
operator delete(v23[0], v24[0] + 1LL);
if ( v12 >= 0x200 )
{
if ( common_log_verbosity_thold >= 0 )
{
v7 = common_log_main();
v11 = "Start index out of bounds!\n";
goto LABEL_27;
}
LABEL_30:
LODWORD(v3) = 0;
return (unsigned int)v3;
}
}
else
{
v22 = a2;
v12 = 0LL;
}
v15 = 511LL;
if ( v6 == *(_QWORD *)(a1 + 8) - 1LL )
goto LABEL_28;
std::string::substr(v23, a1, v6 + 1, -1LL);
v16 = v23[0];
v4 = (_DWORD *)__errno_location(a3);
LODWORD(v3) = *v4;
*v4 = 0;
v17 = strtoull(v16, &v21, 10LL);
if ( v21 == v16 )
{
LABEL_33:
v19 = std::__throw_invalid_argument("stoull");
if ( !*v4 )
*v4 = (_DWORD)v3;
parse_cpu_range((long long)&v21, v23);
_Unwind_Resume(v19);
}
v15 = v17;
if ( *v4 )
{
if ( *v4 == 34 )
std::__throw_out_of_range("stoull");
}
else
{
*v4 = (_DWORD)v3;
}
if ( v23[0] != v24 )
operator delete(v23[0], v24[0] + 1LL);
if ( v15 >= 0x200 )
{
if ( common_log_verbosity_thold >= 0 )
{
v7 = common_log_main();
v11 = "End index out of bounds!\n";
goto LABEL_27;
}
goto LABEL_30;
}
LABEL_28:
LOBYTE(v3) = 1;
if ( v12 <= v15 )
memset(v12 + v22, 1LL, v15 - v12 + 1);
return (unsigned int)v3;
}
| parse_cpu_range:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RSI
MOV R15,RDI
MOV ESI,0x2d
XOR EDX,EDX
CALL 0x0011bb30
MOV R12,RAX
TEST RAX,RAX
JZ 0x0017293a
CMP R12,-0x1
JNZ 0x00172947
LEA RAX,[0x230428]
CMP dword ptr [RAX],0x0
JS 0x00172af8
CALL 0x001ce04b
LEA RDX,[0x1f1a0f]
JMP 0x00172ac0
LAB_0017293a:
MOV qword ptr [RSP + 0x10],RBX
MOV R14,R12
JMP 0x00172a01
LAB_00172947:
MOV qword ptr [RSP + 0x10],RBX
LEA R14,[RSP + 0x18]
MOV RDI,R14
MOV RSI,R15
XOR EDX,EDX
MOV RCX,R12
CALL 0x0011b930
MOV RBP,qword ptr [R14]
CALL 0x0011b060
MOV R13,RAX
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x4],EAX
MOV dword ptr [R13],0x0
LEA RBX,[RSP + 0x8]
MOV RDI,RBP
MOV RSI,RBX
MOV EDX,0xa
CALL 0x0011bb60
CMP qword ptr [RBX],RBP
JZ 0x00172b0b
MOV R14,RAX
MOV EAX,dword ptr [R13]
TEST EAX,EAX
JZ 0x001729b4
CMP EAX,0x22
JNZ 0x001729bc
LAB_001729a8:
LEA RDI,[0x1f25d0]
CALL 0x0011bcb0
LAB_001729b4:
MOV EAX,dword ptr [RSP + 0x4]
MOV dword ptr [R13],EAX
LAB_001729bc:
LEA RAX,[RSP + 0x28]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001729d7
MOV RSI,qword ptr [RSP + 0x28]
INC RSI
CALL 0x0011b8e0
LAB_001729d7:
CMP R14,0x200
JC 0x00172a01
LEA RAX,[0x230428]
CMP dword ptr [RAX],0x0
JS 0x00172af8
CALL 0x001ce04b
LEA RDX,[0x1f1a4c]
JMP 0x00172ac0
LAB_00172a01:
MOV RAX,qword ptr [R15 + 0x8]
DEC RAX
MOV R13D,0x1ff
CMP R12,RAX
JZ 0x00172ad3
INC R12
LEA RBX,[RSP + 0x18]
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
MOV RCX,-0x1
CALL 0x0011b930
MOV RBX,qword ptr [RBX]
CALL 0x0011b060
MOV R15,RAX
MOV EBP,dword ptr [RAX]
MOV dword ptr [RAX],0x0
LEA R12,[RSP + 0x8]
MOV RDI,RBX
MOV RSI,R12
MOV EDX,0xa
CALL 0x0011bb60
CMP qword ptr [R12],RBX
JZ 0x00172b17
MOV R13,RAX
MOV EAX,dword ptr [R15]
TEST EAX,EAX
JZ 0x00172a81
CMP EAX,0x22
JNZ 0x00172a84
LAB_00172a75:
LEA RDI,[0x1f25d0]
CALL 0x0011bcb0
LAB_00172a81:
MOV dword ptr [R15],EBP
LAB_00172a84:
LEA RAX,[RSP + 0x28]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00172a9f
MOV RSI,qword ptr [RSP + 0x28]
INC RSI
CALL 0x0011b8e0
LAB_00172a9f:
CMP R13,0x200
JC 0x00172ad3
LEA RAX,[0x230428]
CMP dword ptr [RAX],0x0
JS 0x00172af8
CALL 0x001ce04b
LEA RDX,[0x1f1a68]
LAB_00172ac0:
XOR EBP,EBP
MOV RDI,RAX
MOV ESI,0x4
XOR EAX,EAX
CALL 0x001ce0e6
JMP 0x00172afa
LAB_00172ad3:
MOV BPL,0x1
CMP R14,R13
JA 0x00172afa
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,R14
SUB R13,R14
INC R13
MOV ESI,0x1
MOV RDX,R13
CALL 0x0011b4f0
JMP 0x00172afa
LAB_00172af8:
XOR EBP,EBP
LAB_00172afa:
MOV EAX,EBP
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00172b0b:
LEA RDI,[0x1f25d0]
CALL 0x0011b550
LAB_00172b17:
LEA RDI,[0x1f25d0]
CALL 0x0011b550
LAB_00172b23:
MOV RBX,RAX
CMP dword ptr [R15],0x0
JNZ 0x00172b2f
MOV dword ptr [R15],EBP
LAB_00172b2f:
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x18]
CALL 0x0011c970
JMP 0x00172b61
LAB_00172b61:
MOV RDI,RBX
CALL 0x0011bfb0
|
/* parse_cpu_range(std::__cxx11::string const&, bool (&) [512]) */
ulong parse_cpu_range(string *param_1,bool *param_2)
{
int iVar1;
uint uVar2;
long *__nptr;
long lVar3;
int8 uVar4;
int *piVar5;
ulong uVar6;
char *pcVar7;
long *unaff_RBP;
ulong uVar8;
ulonglong uVar9;
long *local_60;
bool *local_58;
long *local_50 [2];
long local_40 [2];
lVar3 = std::__cxx11::string::find((char)param_1,0x2d);
if (lVar3 == 0) {
uVar6 = 0;
local_58 = param_2;
LAB_00172a01:
uVar9 = 0x1ff;
if (lVar3 != *(long *)(param_1 + 8) + -1) {
std::__cxx11::string::substr((ulong)local_50,(ulong)param_1);
__nptr = local_50[0];
param_1 = (string *)__errno_location();
uVar2 = *(uint *)param_1;
unaff_RBP = (long *)(ulong)uVar2;
*(uint *)param_1 = 0;
uVar9 = strtoull((char *)__nptr,(char **)&local_60,10);
if (local_60 == __nptr) {
LAB_00172b17:
/* try { // try from 00172b17 to 00172b22 has its CatchHandler @ 00172b23 */
uVar4 = std::__throw_invalid_argument("stoull");
/* catch() { ... } // from try @ 00172a75 with catch @ 00172b23
catch() { ... } // from try @ 00172b17 with catch @ 00172b23 */
if (*(uint *)param_1 == 0) {
*(uint *)param_1 = (uint)unaff_RBP;
}
parse_cpu_range((string *)&local_60,(bool *)local_50);
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar4);
}
if (*(uint *)param_1 == 0) {
LAB_00172a81:
*(uint *)param_1 = uVar2;
}
else if (*(uint *)param_1 == 0x22) {
/* try { // try from 00172a75 to 00172a80 has its CatchHandler @ 00172b23 */
std::__throw_out_of_range("stoull");
goto LAB_00172a81;
}
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
if (0x1ff < uVar9) {
if (common_log_verbosity_thold < 0) goto LAB_00172af8;
uVar4 = common_log_main();
pcVar7 = "End index out of bounds!\n";
goto LAB_00172ac0;
}
}
uVar8 = CONCAT71((int7)((ulong)unaff_RBP >> 8),1);
if (uVar6 <= uVar9) {
memset(local_58 + uVar6,1,(uVar9 - uVar6) + 1);
}
}
else {
if (lVar3 == -1) {
if (common_log_verbosity_thold < 0) {
LAB_00172af8:
uVar8 = 0;
goto LAB_00172afa;
}
uVar4 = common_log_main();
pcVar7 = "Format of CPU range is invalid! Expected [<start>]-[<end>].\n";
}
else {
local_58 = param_2;
std::__cxx11::string::substr((ulong)local_50,(ulong)param_1);
unaff_RBP = local_50[0];
piVar5 = __errno_location();
iVar1 = *piVar5;
*piVar5 = 0;
uVar6 = strtoull((char *)unaff_RBP,(char **)&local_60,10);
if (local_60 == unaff_RBP) {
/* try { // try from 00172b0b to 00172b16 has its CatchHandler @ 00172b40 */
std::__throw_invalid_argument("stoull");
goto LAB_00172b17;
}
if (*piVar5 == 0) {
LAB_001729b4:
*piVar5 = iVar1;
}
else if (*piVar5 == 0x22) {
/* try { // try from 001729a8 to 001729b3 has its CatchHandler @ 00172b40 */
std::__throw_out_of_range("stoull");
goto LAB_001729b4;
}
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
if (uVar6 < 0x200) goto LAB_00172a01;
if (common_log_verbosity_thold < 0) goto LAB_00172af8;
uVar4 = common_log_main();
pcVar7 = "Start index out of bounds!\n";
}
LAB_00172ac0:
uVar8 = 0;
common_log_add(uVar4,4,pcVar7);
}
LAB_00172afa:
return uVar8 & 0xffffffff;
}
| |
55,156 | parse_cpu_range(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512]) | monkey531[P]llama/common/common.cpp | bool parse_cpu_range(const std::string & range, bool (&boolmask)[GGML_MAX_N_THREADS]) {
size_t dash_loc = range.find('-');
if (dash_loc == std::string::npos) {
LOG_ERR("Format of CPU range is invalid! Expected [<start>]-[<end>].\n");
return false;
}
size_t start_i;
size_t end_i;
if (dash_loc == 0) {
start_i = 0;
} else {
start_i = std::stoull(range.substr(0, dash_loc));
if (start_i >= GGML_MAX_N_THREADS) {
LOG_ERR("Start index out of bounds!\n");
return false;
}
}
if (dash_loc == range.length() - 1) {
end_i = GGML_MAX_N_THREADS - 1;
} else {
end_i = std::stoull(range.substr(dash_loc + 1));
if (end_i >= GGML_MAX_N_THREADS) {
LOG_ERR("End index out of bounds!\n");
return false;
}
}
for (size_t i = start_i; i <= end_i; i++) {
boolmask[i] = true;
}
return true;
} | O2 | cpp | parse_cpu_range(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512]):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r15
pushq $0x2d
popq %rsi
xorl %edx, %edx
callq 0x23b70
movq %rax, %r12
testq %rax, %rax
je 0x53f9c
cmpq $-0x1, %r12
jne 0x53fa1
leaq 0xab4d6(%rip), %rax # 0xff458
cmpl $0x0, (%rax)
js 0x54077
callq 0x96e52
leaq 0x5ea08(%rip), %rdx # 0xb299f
jmp 0x54055
movq %r12, %r14
jmp 0x53ff3
movq %rsp, %r14
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %r12, %rcx
callq 0x23950
pushq $0xa
popq %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x59245
movq %rax, %r14
movq %rsp, %rdi
callq 0x241f8
cmpq $0x200, %r14 # imm = 0x200
jb 0x53ff3
leaq 0xab47c(%rip), %rax # 0xff458
cmpl $0x0, (%rax)
js 0x54077
callq 0x96e52
leaq 0x5e9eb(%rip), %rdx # 0xb29dc
jmp 0x54055
movq 0x8(%r15), %rax
decq %rax
movl $0x1ff, %r13d # imm = 0x1FF
cmpq %rax, %r12
je 0x5406e
incq %r12
movq %rsp, %r13
pushq $-0x1
popq %rcx
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x23950
pushq $0xa
popq %rdx
movq %r13, %rdi
xorl %esi, %esi
callq 0x59245
movq %rax, %r13
movq %rsp, %rdi
callq 0x241f8
cmpq $0x200, %r13 # imm = 0x200
jb 0x5406e
leaq 0xab414(%rip), %rax # 0xff458
cmpl $0x0, (%rax)
js 0x54077
callq 0x96e52
leaq 0x5e9a3(%rip), %rdx # 0xb29f8
xorl %ebx, %ebx
pushq $0x4
popq %rsi
movq %rax, %rdi
xorl %eax, %eax
callq 0x96eea
jmp 0x54079
movb $0x1, (%rbx,%r14)
incq %r14
cmpq %r13, %r14
jbe 0x54066
movb $0x1, %bl
jmp 0x54079
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x5408b
movq %rax, %rbx
movq %rsp, %rdi
callq 0x241f8
movq %rbx, %rdi
callq 0x23fb0
| _Z15parse_cpu_rangeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA512_b:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 20h
mov rbx, rsi
mov r15, rdi
push 2Dh ; '-'
pop rsi
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
mov r12, rax
test rax, rax
jz short loc_53F9C
cmp r12, 0FFFFFFFFFFFFFFFFh
jnz short loc_53FA1
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js loc_54077
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aFormatOfCpuRan; "Format of CPU range is invalid! Expecte"...
jmp loc_54055
loc_53F9C:
mov r14, r12
jmp short loc_53FF3
loc_53FA1:
mov r14, rsp
mov rdi, r14
mov rsi, r15
xor edx, edx
mov rcx, r12
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
push 0Ah
pop rdx
mov rdi, r14
xor esi, esi
call _ZNSt7__cxx116stoullERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi; std::stoull(std::string const&,ulong *,int)
mov r14, rax
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
cmp r14, 200h
jb short loc_53FF3
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js loc_54077
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aStartIndexOutO; "Start index out of bounds!\n"
jmp short loc_54055
loc_53FF3:
mov rax, [r15+8]
dec rax
mov r13d, 1FFh
cmp r12, rax
jz short loc_5406E
inc r12
mov r13, rsp
push 0FFFFFFFFFFFFFFFFh
pop rcx
mov rdi, r13
mov rsi, r15
mov rdx, r12
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
push 0Ah
pop rdx
mov rdi, r13
xor esi, esi
call _ZNSt7__cxx116stoullERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi; std::stoull(std::string const&,ulong *,int)
mov r13, rax
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
cmp r13, 200h
jb short loc_5406E
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_54077
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aEndIndexOutOfB; "End index out of bounds!\n"
loc_54055:
xor ebx, ebx
push 4
pop rsi
mov rdi, rax
xor eax, eax
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
jmp short loc_54079
loc_54066:
mov byte ptr [rbx+r14], 1
inc r14
loc_5406E:
cmp r14, r13
jbe short loc_54066
mov bl, 1
jmp short loc_54079
loc_54077:
xor ebx, ebx
loc_54079:
mov eax, ebx
add rsp, 20h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
jmp short $+2
loc_5408B:
mov rbx, rax
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| long long parse_cpu_range(long long a1, long long a2)
{
unsigned int v2; // ebx
long long v3; // rax
long long v4; // r12
int v5; // eax
int v6; // ecx
int v7; // r8d
int v8; // r9d
const char *v9; // rdx
unsigned long long v10; // r14
unsigned long long v11; // r13
_BYTE v13[72]; // [rsp+0h] [rbp-48h] BYREF
v2 = a2;
v3 = std::string::find(a1, 45LL, 0LL);
v4 = v3;
if ( v3 )
{
if ( v3 == -1 )
{
if ( common_log_verbosity_thold >= 0 )
{
v5 = common_log_main();
v9 = "Format of CPU range is invalid! Expected [<start>]-[<end>].\n";
LABEL_13:
v2 = 0;
common_log_add(v5, 4, (_DWORD)v9, v6, v7, v8);
return v2;
}
return 0;
}
std::string::substr(v13, a1, 0LL, v3);
v10 = std::stoull(v13, 0LL, 10LL);
std::string::~string(v13);
if ( v10 >= 0x200 )
{
if ( common_log_verbosity_thold >= 0 )
{
v5 = common_log_main();
v9 = "Start index out of bounds!\n";
goto LABEL_13;
}
return 0;
}
}
else
{
v10 = 0LL;
}
v11 = 511LL;
if ( v4 != *(_QWORD *)(a1 + 8) - 1LL )
{
std::string::substr(v13, a1, v4 + 1, -1LL);
v11 = std::stoull(v13, 0LL, 10LL);
std::string::~string(v13);
if ( v11 >= 0x200 )
{
if ( common_log_verbosity_thold >= 0 )
{
v5 = common_log_main();
v9 = "End index out of bounds!\n";
goto LABEL_13;
}
return 0;
}
}
while ( v10 <= v11 )
*(_BYTE *)(a2 + v10++) = 1;
LOBYTE(v2) = 1;
return v2;
}
| parse_cpu_range:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV RBX,RSI
MOV R15,RDI
PUSH 0x2d
POP RSI
XOR EDX,EDX
CALL 0x00123b70
MOV R12,RAX
TEST RAX,RAX
JZ 0x00153f9c
CMP R12,-0x1
JNZ 0x00153fa1
LEA RAX,[0x1ff458]
CMP dword ptr [RAX],0x0
JS 0x00154077
CALL 0x00196e52
LEA RDX,[0x1b299f]
JMP 0x00154055
LAB_00153f9c:
MOV R14,R12
JMP 0x00153ff3
LAB_00153fa1:
MOV R14,RSP
MOV RDI,R14
MOV RSI,R15
XOR EDX,EDX
MOV RCX,R12
CALL 0x00123950
LAB_00153fb4:
PUSH 0xa
POP RDX
MOV RDI,R14
XOR ESI,ESI
CALL 0x00159245
LAB_00153fc1:
MOV R14,RAX
MOV RDI,RSP
CALL 0x001241f8
CMP R14,0x200
JC 0x00153ff3
LEA RAX,[0x1ff458]
CMP dword ptr [RAX],0x0
JS 0x00154077
CALL 0x00196e52
LEA RDX,[0x1b29dc]
JMP 0x00154055
LAB_00153ff3:
MOV RAX,qword ptr [R15 + 0x8]
DEC RAX
MOV R13D,0x1ff
CMP R12,RAX
JZ 0x0015406e
INC R12
MOV R13,RSP
PUSH -0x1
POP RCX
MOV RDI,R13
MOV RSI,R15
MOV RDX,R12
CALL 0x00123950
LAB_0015401c:
PUSH 0xa
POP RDX
MOV RDI,R13
XOR ESI,ESI
CALL 0x00159245
LAB_00154029:
MOV R13,RAX
MOV RDI,RSP
CALL 0x001241f8
CMP R13,0x200
JC 0x0015406e
LEA RAX,[0x1ff458]
CMP dword ptr [RAX],0x0
JS 0x00154077
CALL 0x00196e52
LEA RDX,[0x1b29f8]
LAB_00154055:
XOR EBX,EBX
PUSH 0x4
POP RSI
MOV RDI,RAX
XOR EAX,EAX
CALL 0x00196eea
JMP 0x00154079
LAB_00154066:
MOV byte ptr [RBX + R14*0x1],0x1
INC R14
LAB_0015406e:
CMP R14,R13
JBE 0x00154066
MOV BL,0x1
JMP 0x00154079
LAB_00154077:
XOR EBX,EBX
LAB_00154079:
MOV EAX,EBX
ADD RSP,0x20
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* parse_cpu_range(std::__cxx11::string const&, bool (&) [512]) */
ulong parse_cpu_range(string *param_1,bool *param_2)
{
long lVar1;
int8 uVar2;
ulong uVar3;
char *pcVar4;
ulong uVar5;
string asStack_48 [32];
lVar1 = std::__cxx11::string::find((char)param_1,0x2d);
if (lVar1 == 0) {
uVar3 = 0;
LAB_00153ff3:
uVar5 = 0x1ff;
if (lVar1 != *(long *)(param_1 + 8) + -1) {
std::__cxx11::string::substr((ulong)asStack_48,(ulong)param_1);
/* try { // try from 0015401c to 00154028 has its CatchHandler @ 00154089 */
uVar5 = std::__cxx11::stoull(asStack_48,(ulong *)0x0,10);
std::__cxx11::string::~string(asStack_48);
if (0x1ff < uVar5) {
if (common_log_verbosity_thold < 0) goto LAB_00154077;
uVar2 = common_log_main();
pcVar4 = "End index out of bounds!\n";
goto LAB_00154055;
}
}
for (; uVar3 <= uVar5; uVar3 = uVar3 + 1) {
param_2[uVar3] = true;
}
uVar3 = CONCAT71((int7)((ulong)param_2 >> 8),1);
}
else {
if (lVar1 == -1) {
if (common_log_verbosity_thold < 0) {
LAB_00154077:
uVar3 = 0;
goto LAB_00154079;
}
uVar2 = common_log_main();
pcVar4 = "Format of CPU range is invalid! Expected [<start>]-[<end>].\n";
}
else {
std::__cxx11::string::substr((ulong)asStack_48,(ulong)param_1);
/* try { // try from 00153fb4 to 00153fc0 has its CatchHandler @ 0015408b */
uVar3 = std::__cxx11::stoull(asStack_48,(ulong *)0x0,10);
std::__cxx11::string::~string(asStack_48);
if (uVar3 < 0x200) goto LAB_00153ff3;
if (common_log_verbosity_thold < 0) goto LAB_00154077;
uVar2 = common_log_main();
pcVar4 = "Start index out of bounds!\n";
}
LAB_00154055:
uVar3 = 0;
common_log_add(uVar2,4,pcVar4);
}
LAB_00154079:
return uVar3 & 0xffffffff;
}
| |
55,157 | c4_proofer_execute | corpus-core[P]colibri-stateless/src/proofer/proofer.c | c4_status_t c4_proofer_execute(proofer_ctx_t* ctx) {
// we alkways check the state first, so we don't execute if the result or error is already there.
if (c4_state_get_pending_request(&ctx->state)) return C4_PENDING;
if (ctx->state.error) return C4_ERROR;
if (ctx->proof.data) return C4_SUCCESS;
proofer_execute(ctx);
return c4_proofer_status(ctx);
} | O1 | c | c4_proofer_execute:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x38(%rdi), %rbx
movq %rbx, %rdi
callq 0x1885a
movl $0x2, %ebp
testq %rax, %rax
jne 0x6625
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
cmpq $0x0, 0x40(%r14)
jne 0x6625
cmpq $0x0, 0x28(%r14)
je 0x65e9
xorl %ebp, %ebp
jmp 0x6625
movq %r14, %rdi
callq 0x662c
testb %al, %al
jne 0x6605
leaq 0x36e8a(%rip), %rdi # 0x3d486
callq 0x5030
movq %rax, 0x40(%r14)
cmpq $0x0, 0x40(%r14)
jne 0x6625
cmpq $0x0, 0x28(%r14)
movl $0x0, %ebp
jne 0x6625
movq %rbx, %rdi
callq 0x1885a
movl $0x2, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
| c4_proofer_execute:
push rbp
push r14
push rbx
mov r14, rdi
lea rbx, [rdi+38h]
mov rdi, rbx
call c4_state_get_pending_request
mov ebp, 2
test rax, rax
jnz short loc_6625
mov ebp, 0FFFFFFFFh
cmp qword ptr [r14+40h], 0
jnz short loc_6625
cmp qword ptr [r14+28h], 0
jz short loc_65E9
xor ebp, ebp
jmp short loc_6625
loc_65E9:
mov rdi, r14
call eth_proofer_execute
test al, al
jnz short loc_6605
lea rdi, aUnsupportedCha; "Unsupported chain"
call _strdup
mov [r14+40h], rax
loc_6605:
cmp qword ptr [r14+40h], 0
jnz short loc_6625
cmp qword ptr [r14+28h], 0
mov ebp, 0
jnz short loc_6625
mov rdi, rbx
call c4_state_get_pending_request
mov ebp, 2
loc_6625:
mov eax, ebp
pop rbx
pop r14
pop rbp
retn
| long long c4_proofer_execute(long long a1)
{
unsigned int v1; // ebp
v1 = 2;
if ( !c4_state_get_pending_request(a1 + 56) )
{
v1 = -1;
if ( !*(_QWORD *)(a1 + 64) )
{
if ( *(_QWORD *)(a1 + 40) )
{
return 0;
}
else
{
if ( !(unsigned __int8)eth_proofer_execute(a1) )
*(_QWORD *)(a1 + 64) = strdup("Unsupported chain");
if ( !*(_QWORD *)(a1 + 64) )
{
v1 = 0;
if ( !*(_QWORD *)(a1 + 40) )
{
c4_state_get_pending_request(a1 + 56);
return 2;
}
}
}
}
}
return v1;
}
| c4_proofer_execute:
PUSH RBP
PUSH R14
PUSH RBX
MOV R14,RDI
LEA RBX,[RDI + 0x38]
MOV RDI,RBX
CALL 0x0011885a
MOV EBP,0x2
TEST RAX,RAX
JNZ 0x00106625
MOV EBP,0xffffffff
CMP qword ptr [R14 + 0x40],0x0
JNZ 0x00106625
CMP qword ptr [R14 + 0x28],0x0
JZ 0x001065e9
XOR EBP,EBP
JMP 0x00106625
LAB_001065e9:
MOV RDI,R14
CALL 0x0010662c
TEST AL,AL
JNZ 0x00106605
LEA RDI,[0x13d486]
CALL 0x00105030
MOV qword ptr [R14 + 0x40],RAX
LAB_00106605:
CMP qword ptr [R14 + 0x40],0x0
JNZ 0x00106625
CMP qword ptr [R14 + 0x28],0x0
MOV EBP,0x0
JNZ 0x00106625
MOV RDI,RBX
CALL 0x0011885a
MOV EBP,0x2
LAB_00106625:
MOV EAX,EBP
POP RBX
POP R14
POP RBP
RET
|
int8 c4_proofer_execute(long param_1)
{
char cVar1;
long lVar2;
char *pcVar3;
int8 uVar4;
lVar2 = c4_state_get_pending_request(param_1 + 0x38);
uVar4 = 2;
if ((lVar2 == 0) && (uVar4 = 0xffffffff, *(long *)(param_1 + 0x40) == 0)) {
if (*(long *)(param_1 + 0x28) == 0) {
cVar1 = eth_proofer_execute(param_1);
if (cVar1 == '\0') {
pcVar3 = strdup("Unsupported chain");
*(char **)(param_1 + 0x40) = pcVar3;
}
if ((*(long *)(param_1 + 0x40) == 0) && (uVar4 = 0, *(long *)(param_1 + 0x28) == 0)) {
c4_state_get_pending_request(param_1 + 0x38);
uVar4 = 2;
}
}
else {
uVar4 = 0;
}
}
return uVar4;
}
| |
55,158 | c4_proofer_execute | corpus-core[P]colibri-stateless/src/proofer/proofer.c | c4_status_t c4_proofer_execute(proofer_ctx_t* ctx) {
// we alkways check the state first, so we don't execute if the result or error is already there.
if (c4_state_get_pending_request(&ctx->state)) return C4_PENDING;
if (ctx->state.error) return C4_ERROR;
if (ctx->proof.data) return C4_SUCCESS;
proofer_execute(ctx);
return c4_proofer_status(ctx);
} | O2 | c | c4_proofer_execute:
pushq %rbx
movq %rdi, %rbx
addq $0x38, %rdi
callq 0x16fb9
testq %rax, %rax
je 0x6258
pushq $0x2
jmp 0x6261
cmpq $0x0, 0x40(%rbx)
je 0x6264
pushq $-0x1
popq %rax
popq %rbx
retq
xorl %eax, %eax
cmpq $0x0, 0x28(%rbx)
jne 0x6262
movq %rbx, %rdi
callq 0x6294
testb %al, %al
jne 0x6289
leaq 0x32206(%rip), %rdi # 0x38486
callq 0x5030
movq %rax, 0x40(%rbx)
movq %rbx, %rdi
popq %rbx
jmp 0x621b
nop
| c4_proofer_execute:
push rbx
mov rbx, rdi
add rdi, 38h ; '8'
call c4_state_get_pending_request
test rax, rax
jz short loc_6258
push 2
jmp short loc_6261
loc_6258:
cmp qword ptr [rbx+40h], 0
jz short loc_6264
push 0FFFFFFFFFFFFFFFFh
loc_6261:
pop rax
loc_6262:
pop rbx
retn
loc_6264:
xor eax, eax
cmp qword ptr [rbx+28h], 0
jnz short loc_6262
mov rdi, rbx
call eth_proofer_execute
test al, al
jnz short loc_6289
lea rdi, aUnsupportedCha; "Unsupported chain"
call _strdup
mov [rbx+40h], rax
loc_6289:
mov rdi, rbx
pop rbx
jmp c4_proofer_status
| long long c4_proofer_execute(long long a1)
{
long long result; // rax
if ( c4_state_get_pending_request(a1 + 56) )
return 2LL;
if ( *(_QWORD *)(a1 + 64) )
return -1LL;
result = 0LL;
if ( !*(_QWORD *)(a1 + 40) )
{
if ( !(unsigned __int8)eth_proofer_execute(a1) )
*(_QWORD *)(a1 + 64) = strdup("Unsupported chain");
return c4_proofer_status(a1);
}
return result;
}
| c4_proofer_execute:
PUSH RBX
MOV RBX,RDI
ADD RDI,0x38
CALL 0x00116fb9
TEST RAX,RAX
JZ 0x00106258
PUSH 0x2
JMP 0x00106261
LAB_00106258:
CMP qword ptr [RBX + 0x40],0x0
JZ 0x00106264
PUSH -0x1
LAB_00106261:
POP RAX
LAB_00106262:
POP RBX
RET
LAB_00106264:
XOR EAX,EAX
CMP qword ptr [RBX + 0x28],0x0
JNZ 0x00106262
MOV RDI,RBX
CALL 0x00106294
TEST AL,AL
JNZ 0x00106289
LEA RDI,[0x138486]
CALL 0x00105030
MOV qword ptr [RBX + 0x40],RAX
LAB_00106289:
MOV RDI,RBX
POP RBX
JMP 0x0010621b
|
int8 c4_proofer_execute(long param_1)
{
char cVar1;
long lVar2;
char *pcVar3;
int8 uVar4;
int8 uStack_10;
lVar2 = c4_state_get_pending_request(param_1 + 0x38);
if (lVar2 == 0) {
if (*(long *)(param_1 + 0x40) == 0) {
uStack_10 = 0;
if (*(long *)(param_1 + 0x28) == 0) {
cVar1 = eth_proofer_execute(param_1);
if (cVar1 == '\0') {
pcVar3 = strdup("Unsupported chain");
*(char **)(param_1 + 0x40) = pcVar3;
}
uVar4 = c4_proofer_status(param_1);
return uVar4;
}
}
else {
uStack_10 = 0xffffffffffffffff;
}
}
else {
uStack_10 = 2;
}
return uStack_10;
}
| |
55,159 | js_parse_function_check_names | bluesky950520[P]quickjs/quickjs.c | static int js_parse_function_check_names(JSParseState *s, JSFunctionDef *fd,
JSAtom func_name)
{
JSAtom name;
int i, idx;
if (fd->is_strict_mode) {
if (!fd->has_simple_parameter_list && fd->has_use_strict) {
return js_parse_error(s, "\"use strict\" not allowed in function with default or destructuring parameter");
}
if (js_invalid_strict_name(func_name)) {
return js_parse_error(s, "invalid function name in strict code");
}
for (idx = 0; idx < fd->arg_count; idx++) {
name = fd->args[idx].var_name;
if (js_invalid_strict_name(name)) {
return js_parse_error(s, "invalid argument name in strict code");
}
}
}
/* check async_generator case */
if (fd->is_strict_mode
|| !fd->has_simple_parameter_list
|| (fd->func_type == JS_PARSE_FUNC_METHOD && fd->func_kind == JS_FUNC_ASYNC)
|| fd->func_type == JS_PARSE_FUNC_ARROW
|| fd->func_type == JS_PARSE_FUNC_METHOD) {
for (idx = 0; idx < fd->arg_count; idx++) {
name = fd->args[idx].var_name;
if (name != JS_ATOM_NULL) {
for (i = 0; i < idx; i++) {
if (fd->args[i].var_name == name)
goto duplicate;
}
/* Check if argument name duplicates a destructuring parameter */
/* XXX: should have a flag for such variables */
for (i = 0; i < fd->var_count; i++) {
if (fd->vars[i].var_name == name &&
fd->vars[i].scope_level == 0)
goto duplicate;
}
}
}
}
return 0;
duplicate:
return js_parse_error(s, "Duplicate parameter name not allowed in this context");
} | O0 | c | js_parse_function_check_names:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl %edx, 0xc(%rsp)
movq 0x10(%rsp), %rax
movw 0x84(%rax), %ax
shrw $0xf, %ax
cmpb $0x0, %al
je 0xa5ea3
movq 0x10(%rsp), %rax
cmpl $0x0, 0x50(%rax)
jne 0xa5e0c
movq 0x10(%rsp), %rax
cmpl $0x0, 0x58(%rax)
je 0xa5e0c
movq 0x18(%rsp), %rdi
leaq 0x68d15(%rip), %rsi # 0x10eb11
movb $0x0, %al
callq 0x473d0
movl %eax, 0x24(%rsp)
jmp 0xa605b
movl 0xc(%rsp), %edi
callq 0xb0030
cmpl $0x0, %eax
je 0xa5e36
movq 0x18(%rsp), %rdi
leaq 0x68d38(%rip), %rsi # 0x10eb5e
movb $0x0, %al
callq 0x473d0
movl %eax, 0x24(%rsp)
jmp 0xa605b
movl $0x0, (%rsp)
movl (%rsp), %eax
movq 0x10(%rsp), %rcx
cmpl 0xb4(%rcx), %eax
jge 0xa5ea1
movq 0x10(%rsp), %rax
movq 0xa8(%rax), %rax
movslq (%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %edi
callq 0xb0030
cmpl $0x0, %eax
je 0xa5e94
movq 0x18(%rsp), %rdi
leaq 0x68cff(%rip), %rsi # 0x10eb83
movb $0x0, %al
callq 0x473d0
movl %eax, 0x24(%rsp)
jmp 0xa605b
jmp 0xa5e96
movl (%rsp), %eax
addl $0x1, %eax
movl %eax, (%rsp)
jmp 0xa5e3d
jmp 0xa5ea3
movq 0x10(%rsp), %rax
movw 0x84(%rax), %ax
shrw $0xf, %ax
movzbl %al, %eax
cmpl $0x0, %eax
jne 0xa5f36
movq 0x10(%rsp), %rax
cmpl $0x0, 0x50(%rax)
je 0xa5f36
movq 0x10(%rsp), %rax
movw 0x84(%rax), %ax
shrw $0x8, %ax
andw $0x7f, %ax
movzwl %ax, %eax
cmpl $0x6, %eax
jne 0xa5efa
movq 0x10(%rsp), %rax
movw 0x84(%rax), %ax
andw $0xff, %ax
movzwl %ax, %eax
cmpl $0x2, %eax
je 0xa5f36
movq 0x10(%rsp), %rax
movw 0x84(%rax), %ax
shrw $0x8, %ax
andw $0x7f, %ax
movzwl %ax, %eax
cmpl $0x3, %eax
je 0xa5f36
movq 0x10(%rsp), %rax
movw 0x84(%rax), %ax
shrw $0x8, %ax
andw $0x7f, %ax
movzwl %ax, %eax
cmpl $0x6, %eax
jne 0xa603a
movl $0x0, (%rsp)
movl (%rsp), %eax
movq 0x10(%rsp), %rcx
cmpl 0xb4(%rcx), %eax
jge 0xa6038
movq 0x10(%rsp), %rax
movq 0xa8(%rax), %rax
movslq (%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, 0x8(%rsp)
cmpl $0x0, 0x8(%rsp)
je 0xa6028
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
cmpl (%rsp), %eax
jge 0xa5fbe
movq 0x10(%rsp), %rax
movq 0xa8(%rax), %rax
movslq 0x4(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
cmpl 0x8(%rsp), %eax
jne 0xa5faf
jmp 0xa6044
jmp 0xa5fb1
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0xa5f81
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
movq 0x10(%rsp), %rcx
cmpl 0xa4(%rcx), %eax
jge 0xa6026
movq 0x10(%rsp), %rax
movq 0x90(%rax), %rax
movslq 0x4(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
cmpl 0x8(%rsp), %eax
jne 0xa6017
movq 0x10(%rsp), %rax
movq 0x90(%rax), %rax
movslq 0x4(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x0, 0x4(%rax)
jne 0xa6017
jmp 0xa6044
jmp 0xa6019
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0xa5fc6
jmp 0xa6028
jmp 0xa602a
movl (%rsp), %eax
addl $0x1, %eax
movl %eax, (%rsp)
jmp 0xa5f3d
jmp 0xa603a
movl $0x0, 0x24(%rsp)
jmp 0xa605b
movq 0x18(%rsp), %rdi
leaq 0x68a8c(%rip), %rsi # 0x10eadc
movb $0x0, %al
callq 0x473d0
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
| js_parse_function_check_names:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_18], rsi
mov [rsp+28h+var_1C], edx
mov rax, [rsp+28h+var_18]
mov ax, [rax+84h]
shr ax, 0Fh
cmp al, 0
jz loc_A5EA3
mov rax, [rsp+28h+var_18]
cmp dword ptr [rax+50h], 0
jnz short loc_A5E0C
mov rax, [rsp+28h+var_18]
cmp dword ptr [rax+58h], 0
jz short loc_A5E0C
mov rdi, [rsp+28h+var_10]
lea rsi, aUseStrictNotAl; "\"use strict\" not allowed in function "...
mov al, 0
call js_parse_error
mov [rsp+28h+var_4], eax
jmp loc_A605B
loc_A5E0C:
mov edi, [rsp+28h+var_1C]
call js_invalid_strict_name
cmp eax, 0
jz short loc_A5E36
mov rdi, [rsp+28h+var_10]
lea rsi, aInvalidFunctio; "invalid function name in strict code"
mov al, 0
call js_parse_error
mov [rsp+28h+var_4], eax
jmp loc_A605B
loc_A5E36:
mov [rsp+28h+var_28], 0
loc_A5E3D:
mov eax, [rsp+28h+var_28]
mov rcx, [rsp+28h+var_18]
cmp eax, [rcx+0B4h]
jge short loc_A5EA1
mov rax, [rsp+28h+var_18]
mov rax, [rax+0A8h]
movsxd rcx, [rsp+28h+var_28]
shl rcx, 4
add rax, rcx
mov eax, [rax]
mov [rsp+28h+var_20], eax
mov edi, [rsp+28h+var_20]
call js_invalid_strict_name
cmp eax, 0
jz short loc_A5E94
mov rdi, [rsp+28h+var_10]
lea rsi, aInvalidArgumen; "invalid argument name in strict code"
mov al, 0
call js_parse_error
mov [rsp+28h+var_4], eax
jmp loc_A605B
loc_A5E94:
jmp short $+2
loc_A5E96:
mov eax, [rsp+28h+var_28]
add eax, 1
mov [rsp+28h+var_28], eax
jmp short loc_A5E3D
loc_A5EA1:
jmp short $+2
loc_A5EA3:
mov rax, [rsp+28h+var_18]
mov ax, [rax+84h]
shr ax, 0Fh
movzx eax, al
cmp eax, 0
jnz short loc_A5F36
mov rax, [rsp+28h+var_18]
cmp dword ptr [rax+50h], 0
jz short loc_A5F36
mov rax, [rsp+28h+var_18]
mov ax, [rax+84h]
shr ax, 8
and ax, 7Fh
movzx eax, ax
cmp eax, 6
jnz short loc_A5EFA
mov rax, [rsp+28h+var_18]
mov ax, [rax+84h]
and ax, 0FFh
movzx eax, ax
cmp eax, 2
jz short loc_A5F36
loc_A5EFA:
mov rax, [rsp+28h+var_18]
mov ax, [rax+84h]
shr ax, 8
and ax, 7Fh
movzx eax, ax
cmp eax, 3
jz short loc_A5F36
mov rax, [rsp+28h+var_18]
mov ax, [rax+84h]
shr ax, 8
and ax, 7Fh
movzx eax, ax
cmp eax, 6
jnz loc_A603A
loc_A5F36:
mov [rsp+28h+var_28], 0
loc_A5F3D:
mov eax, [rsp+28h+var_28]
mov rcx, [rsp+28h+var_18]
cmp eax, [rcx+0B4h]
jge loc_A6038
mov rax, [rsp+28h+var_18]
mov rax, [rax+0A8h]
movsxd rcx, [rsp+28h+var_28]
shl rcx, 4
add rax, rcx
mov eax, [rax]
mov [rsp+28h+var_20], eax
cmp [rsp+28h+var_20], 0
jz loc_A6028
mov [rsp+28h+var_24], 0
loc_A5F81:
mov eax, [rsp+28h+var_24]
cmp eax, [rsp+28h+var_28]
jge short loc_A5FBE
mov rax, [rsp+28h+var_18]
mov rax, [rax+0A8h]
movsxd rcx, [rsp+28h+var_24]
shl rcx, 4
add rax, rcx
mov eax, [rax]
cmp eax, [rsp+28h+var_20]
jnz short loc_A5FAF
jmp loc_A6044
loc_A5FAF:
jmp short $+2
loc_A5FB1:
mov eax, [rsp+28h+var_24]
add eax, 1
mov [rsp+28h+var_24], eax
jmp short loc_A5F81
loc_A5FBE:
mov [rsp+28h+var_24], 0
loc_A5FC6:
mov eax, [rsp+28h+var_24]
mov rcx, [rsp+28h+var_18]
cmp eax, [rcx+0A4h]
jge short loc_A6026
mov rax, [rsp+28h+var_18]
mov rax, [rax+90h]
movsxd rcx, [rsp+28h+var_24]
shl rcx, 4
add rax, rcx
mov eax, [rax]
cmp eax, [rsp+28h+var_20]
jnz short loc_A6017
mov rax, [rsp+28h+var_18]
mov rax, [rax+90h]
movsxd rcx, [rsp+28h+var_24]
shl rcx, 4
add rax, rcx
cmp dword ptr [rax+4], 0
jnz short loc_A6017
jmp short loc_A6044
loc_A6017:
jmp short $+2
loc_A6019:
mov eax, [rsp+28h+var_24]
add eax, 1
mov [rsp+28h+var_24], eax
jmp short loc_A5FC6
loc_A6026:
jmp short $+2
loc_A6028:
jmp short $+2
loc_A602A:
mov eax, [rsp+28h+var_28]
add eax, 1
mov [rsp+28h+var_28], eax
jmp loc_A5F3D
loc_A6038:
jmp short $+2
loc_A603A:
mov [rsp+28h+var_4], 0
jmp short loc_A605B
loc_A6044:
mov rdi, [rsp+28h+var_10]
lea rsi, aDuplicateParam; "Duplicate parameter name not allowed in"...
mov al, 0
call js_parse_error
mov [rsp+28h+var_4], eax
loc_A605B:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
| long long js_parse_function_check_names(
_QWORD *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)
{
long long v14; // rcx
long long v15; // rcx
long long v16; // rcx
char v18; // [rsp+0h] [rbp-28h]
int i; // [rsp+0h] [rbp-28h]
int j; // [rsp+0h] [rbp-28h]
int k; // [rsp+4h] [rbp-24h]
int m; // [rsp+4h] [rbp-24h]
int v23; // [rsp+8h] [rbp-20h]
if ( *(__int16 *)(a2 + 132) < 0 )
{
if ( !*(_DWORD *)(a2 + 80) && *(_DWORD *)(a2 + 88) )
return (unsigned int)js_parse_error(
a1,
(long long)"\"use strict\" not allowed in function with default or destructuring parameter",
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v18);
if ( (unsigned int)js_invalid_strict_name((unsigned int)a3) )
return (unsigned int)js_parse_error(
a1,
(long long)"invalid function name in strict code",
a3,
v14,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v18);
for ( i = 0; i < *(_DWORD *)(a2 + 180); ++i )
{
if ( (unsigned int)js_invalid_strict_name(*(unsigned int *)(16LL * i + *(_QWORD *)(a2 + 168))) )
return (unsigned int)js_parse_error(
a1,
(long long)"invalid argument name in strict code",
a3,
v15,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
i);
}
}
if ( *(__int16 *)(a2 + 132) < 0
|| !*(_DWORD *)(a2 + 80)
|| (HIBYTE(*(_WORD *)(a2 + 132)) & 0x7F) == 6 && (unsigned __int8)*(_WORD *)(a2 + 132) == 2
|| (HIBYTE(*(_WORD *)(a2 + 132)) & 0x7F) == 3
|| (HIBYTE(*(_WORD *)(a2 + 132)) & 0x7F) == 6 )
{
for ( j = 0; j < *(_DWORD *)(a2 + 180); ++j )
{
v23 = *(_DWORD *)(16LL * j + *(_QWORD *)(a2 + 168));
if ( v23 )
{
for ( k = 0; k < j; ++k )
{
v16 = 16LL * k;
if ( *(_DWORD *)(v16 + *(_QWORD *)(a2 + 168)) == v23 )
return (unsigned int)js_parse_error(
a1,
(long long)"Duplicate parameter name not allowed in this context",
a3,
v16,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
j);
}
for ( m = 0; m < *(_DWORD *)(a2 + 164); ++m )
{
if ( *(_DWORD *)(16LL * m + *(_QWORD *)(a2 + 144)) == v23 )
{
v16 = 16LL * m;
if ( !*(_DWORD *)(v16 + *(_QWORD *)(a2 + 144) + 4) )
return (unsigned int)js_parse_error(
a1,
(long long)"Duplicate parameter name not allowed in this context",
a3,
v16,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
j);
}
}
}
}
}
return 0;
}
| js_parse_function_check_names:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV qword ptr [RSP + 0x10],RSI
MOV dword ptr [RSP + 0xc],EDX
MOV RAX,qword ptr [RSP + 0x10]
MOV AX,word ptr [RAX + 0x84]
SHR AX,0xf
CMP AL,0x0
JZ 0x001a5ea3
MOV RAX,qword ptr [RSP + 0x10]
CMP dword ptr [RAX + 0x50],0x0
JNZ 0x001a5e0c
MOV RAX,qword ptr [RSP + 0x10]
CMP dword ptr [RAX + 0x58],0x0
JZ 0x001a5e0c
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[0x20eb11]
MOV AL,0x0
CALL 0x001473d0
MOV dword ptr [RSP + 0x24],EAX
JMP 0x001a605b
LAB_001a5e0c:
MOV EDI,dword ptr [RSP + 0xc]
CALL 0x001b0030
CMP EAX,0x0
JZ 0x001a5e36
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[0x20eb5e]
MOV AL,0x0
CALL 0x001473d0
MOV dword ptr [RSP + 0x24],EAX
JMP 0x001a605b
LAB_001a5e36:
MOV dword ptr [RSP],0x0
LAB_001a5e3d:
MOV EAX,dword ptr [RSP]
MOV RCX,qword ptr [RSP + 0x10]
CMP EAX,dword ptr [RCX + 0xb4]
JGE 0x001a5ea1
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + 0xa8]
MOVSXD RCX,dword ptr [RSP]
SHL RCX,0x4
ADD RAX,RCX
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x8],EAX
MOV EDI,dword ptr [RSP + 0x8]
CALL 0x001b0030
CMP EAX,0x0
JZ 0x001a5e94
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[0x20eb83]
MOV AL,0x0
CALL 0x001473d0
MOV dword ptr [RSP + 0x24],EAX
JMP 0x001a605b
LAB_001a5e94:
JMP 0x001a5e96
LAB_001a5e96:
MOV EAX,dword ptr [RSP]
ADD EAX,0x1
MOV dword ptr [RSP],EAX
JMP 0x001a5e3d
LAB_001a5ea1:
JMP 0x001a5ea3
LAB_001a5ea3:
MOV RAX,qword ptr [RSP + 0x10]
MOV AX,word ptr [RAX + 0x84]
SHR AX,0xf
MOVZX EAX,AL
CMP EAX,0x0
JNZ 0x001a5f36
MOV RAX,qword ptr [RSP + 0x10]
CMP dword ptr [RAX + 0x50],0x0
JZ 0x001a5f36
MOV RAX,qword ptr [RSP + 0x10]
MOV AX,word ptr [RAX + 0x84]
SHR AX,0x8
AND AX,0x7f
MOVZX EAX,AX
CMP EAX,0x6
JNZ 0x001a5efa
MOV RAX,qword ptr [RSP + 0x10]
MOV AX,word ptr [RAX + 0x84]
AND AX,0xff
MOVZX EAX,AX
CMP EAX,0x2
JZ 0x001a5f36
LAB_001a5efa:
MOV RAX,qword ptr [RSP + 0x10]
MOV AX,word ptr [RAX + 0x84]
SHR AX,0x8
AND AX,0x7f
MOVZX EAX,AX
CMP EAX,0x3
JZ 0x001a5f36
MOV RAX,qword ptr [RSP + 0x10]
MOV AX,word ptr [RAX + 0x84]
SHR AX,0x8
AND AX,0x7f
MOVZX EAX,AX
CMP EAX,0x6
JNZ 0x001a603a
LAB_001a5f36:
MOV dword ptr [RSP],0x0
LAB_001a5f3d:
MOV EAX,dword ptr [RSP]
MOV RCX,qword ptr [RSP + 0x10]
CMP EAX,dword ptr [RCX + 0xb4]
JGE 0x001a6038
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + 0xa8]
MOVSXD RCX,dword ptr [RSP]
SHL RCX,0x4
ADD RAX,RCX
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x8],EAX
CMP dword ptr [RSP + 0x8],0x0
JZ 0x001a6028
MOV dword ptr [RSP + 0x4],0x0
LAB_001a5f81:
MOV EAX,dword ptr [RSP + 0x4]
CMP EAX,dword ptr [RSP]
JGE 0x001a5fbe
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + 0xa8]
MOVSXD RCX,dword ptr [RSP + 0x4]
SHL RCX,0x4
ADD RAX,RCX
MOV EAX,dword ptr [RAX]
CMP EAX,dword ptr [RSP + 0x8]
JNZ 0x001a5faf
JMP 0x001a6044
LAB_001a5faf:
JMP 0x001a5fb1
LAB_001a5fb1:
MOV EAX,dword ptr [RSP + 0x4]
ADD EAX,0x1
MOV dword ptr [RSP + 0x4],EAX
JMP 0x001a5f81
LAB_001a5fbe:
MOV dword ptr [RSP + 0x4],0x0
LAB_001a5fc6:
MOV EAX,dword ptr [RSP + 0x4]
MOV RCX,qword ptr [RSP + 0x10]
CMP EAX,dword ptr [RCX + 0xa4]
JGE 0x001a6026
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + 0x90]
MOVSXD RCX,dword ptr [RSP + 0x4]
SHL RCX,0x4
ADD RAX,RCX
MOV EAX,dword ptr [RAX]
CMP EAX,dword ptr [RSP + 0x8]
JNZ 0x001a6017
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + 0x90]
MOVSXD RCX,dword ptr [RSP + 0x4]
SHL RCX,0x4
ADD RAX,RCX
CMP dword ptr [RAX + 0x4],0x0
JNZ 0x001a6017
JMP 0x001a6044
LAB_001a6017:
JMP 0x001a6019
LAB_001a6019:
MOV EAX,dword ptr [RSP + 0x4]
ADD EAX,0x1
MOV dword ptr [RSP + 0x4],EAX
JMP 0x001a5fc6
LAB_001a6026:
JMP 0x001a6028
LAB_001a6028:
JMP 0x001a602a
LAB_001a602a:
MOV EAX,dword ptr [RSP]
ADD EAX,0x1
MOV dword ptr [RSP],EAX
JMP 0x001a5f3d
LAB_001a6038:
JMP 0x001a603a
LAB_001a603a:
MOV dword ptr [RSP + 0x24],0x0
JMP 0x001a605b
LAB_001a6044:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[0x20eadc]
MOV AL,0x0
CALL 0x001473d0
MOV dword ptr [RSP + 0x24],EAX
LAB_001a605b:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
int4 js_parse_function_check_names(int8 param_1,long param_2,int4 param_3)
{
int4 uVar1;
int iVar2;
int local_28;
int local_24;
if (*(short *)(param_2 + 0x84) < 0) {
if ((*(int *)(param_2 + 0x50) == 0) && (*(int *)(param_2 + 0x58) != 0)) {
uVar1 = js_parse_error(param_1,
"\"use strict\" not allowed in function with default or destructuring parameter"
);
return uVar1;
}
iVar2 = js_invalid_strict_name(param_3);
if (iVar2 != 0) {
uVar1 = js_parse_error(param_1,"invalid function name in strict code");
return uVar1;
}
for (local_28 = 0; local_28 < *(int *)(param_2 + 0xb4); local_28 = local_28 + 1) {
iVar2 = js_invalid_strict_name
(*(int4 *)(*(long *)(param_2 + 0xa8) + (long)local_28 * 0x10));
if (iVar2 != 0) {
uVar1 = js_parse_error(param_1,"invalid argument name in strict code");
return uVar1;
}
}
}
if ((((*(short *)(param_2 + 0x84) < 0) || (*(int *)(param_2 + 0x50) == 0)) ||
(((*(ushort *)(param_2 + 0x84) >> 8 & 0x7f) == 6 &&
((*(ushort *)(param_2 + 0x84) & 0xff) == 2)))) ||
(((*(ushort *)(param_2 + 0x84) >> 8 & 0x7f) == 3 ||
((*(ushort *)(param_2 + 0x84) >> 8 & 0x7f) == 6)))) {
for (local_28 = 0; local_28 < *(int *)(param_2 + 0xb4); local_28 = local_28 + 1) {
iVar2 = *(int *)(*(long *)(param_2 + 0xa8) + (long)local_28 * 0x10);
if (iVar2 != 0) {
for (local_24 = 0; local_24 < local_28; local_24 = local_24 + 1) {
if (*(int *)(*(long *)(param_2 + 0xa8) + (long)local_24 * 0x10) == iVar2)
goto LAB_001a6044;
}
for (local_24 = 0; local_24 < *(int *)(param_2 + 0xa4); local_24 = local_24 + 1) {
if ((*(int *)(*(long *)(param_2 + 0x90) + (long)local_24 * 0x10) == iVar2) &&
(*(int *)(*(long *)(param_2 + 0x90) + (long)local_24 * 0x10 + 4) == 0)) {
LAB_001a6044:
uVar1 = js_parse_error(param_1,"Duplicate parameter name not allowed in this context");
return uVar1;
}
}
}
}
}
return 0;
}
| |
55,160 | js_parse_function_check_names | bluesky950520[P]quickjs/quickjs.c | static int js_parse_function_check_names(JSParseState *s, JSFunctionDef *fd,
JSAtom func_name)
{
JSAtom name;
int i, idx;
if (fd->is_strict_mode) {
if (!fd->has_simple_parameter_list && fd->has_use_strict) {
return js_parse_error(s, "\"use strict\" not allowed in function with default or destructuring parameter");
}
if (js_invalid_strict_name(func_name)) {
return js_parse_error(s, "invalid function name in strict code");
}
for (idx = 0; idx < fd->arg_count; idx++) {
name = fd->args[idx].var_name;
if (js_invalid_strict_name(name)) {
return js_parse_error(s, "invalid argument name in strict code");
}
}
}
/* check async_generator case */
if (fd->is_strict_mode
|| !fd->has_simple_parameter_list
|| (fd->func_type == JS_PARSE_FUNC_METHOD && fd->func_kind == JS_FUNC_ASYNC)
|| fd->func_type == JS_PARSE_FUNC_ARROW
|| fd->func_type == JS_PARSE_FUNC_METHOD) {
for (idx = 0; idx < fd->arg_count; idx++) {
name = fd->args[idx].var_name;
if (name != JS_ATOM_NULL) {
for (i = 0; i < idx; i++) {
if (fd->args[i].var_name == name)
goto duplicate;
}
/* Check if argument name duplicates a destructuring parameter */
/* XXX: should have a flag for such variables */
for (i = 0; i < fd->var_count; i++) {
if (fd->vars[i].var_name == name &&
fd->vars[i].scope_level == 0)
goto duplicate;
}
}
}
}
return 0;
duplicate:
return js_parse_error(s, "Duplicate parameter name not allowed in this context");
} | O1 | c | js_parse_function_check_names:
pushq %r14
pushq %rbx
pushq %rax
movzwl 0x84(%rsi), %ecx
testw %cx, %cx
js 0x6442c
movl %ecx, %eax
andl $0x7fff, %eax # imm = 0x7FFF
cmpl $0x602, %eax # imm = 0x602
je 0x64395
cmpl $0x0, 0x50(%rsi)
je 0x64395
shrl $0x8, %ecx
andl $0x7f, %ecx
cmpl $0x6, %ecx
je 0x64395
cmpl $0x3, %ecx
jne 0x64425
movslq 0xb4(%rsi), %rcx
testq %rcx, %rcx
jle 0x64425
movq 0xa8(%rsi), %rdx
xorl %r8d, %r8d
leaq 0x3b72a(%rip), %rax # 0x9fae0
xorl %r9d, %r9d
movq %r9, %r10
shlq $0x4, %r10
movl (%rdx,%r10), %r10d
testl %r10d, %r10d
je 0x64419
testq %r9, %r9
je 0x643e4
xorl %r11d, %r11d
cmpl %r10d, (%rdx,%r11)
je 0x644a9
addq $0x10, %r11
cmpq %r11, %r8
jne 0x643d1
movslq 0xa4(%rsi), %r11
testq %r11, %r11
jle 0x64419
movq 0x90(%rsi), %rbx
shlq $0x4, %r11
xorl %r14d, %r14d
cmpl %r10d, (%rbx,%r14)
jne 0x64410
cmpl $0x0, 0x4(%rbx,%r14)
je 0x644a9
addq $0x10, %r14
cmpq %r14, %r11
jne 0x643fe
incq %r9
addq $0x10, %r8
cmpq %rcx, %r9
jne 0x643b9
xorl %eax, %eax
jmp 0x644b8
cmpl $0x0, 0x50(%rsi)
je 0x6449c
leaq 0x3b729(%rip), %rax # 0x9fb62
leal -0x25(%rdx), %r8d
cmpl $0x9, %r8d
jb 0x644a9
cmpl $0x3b, %edx
je 0x644a9
cmpl $0x4e, %edx
je 0x644a9
movslq 0xb4(%rsi), %rax
testq %rax, %rax
jle 0x6448e
movq 0xa8(%rsi), %rdx
shlq $0x4, %rax
xorl %r8d, %r8d
movabsq $0x200004001ff, %r9 # imm = 0x200004001FF
movl (%rdx,%r8), %r10d
addl $-0x25, %r10d
cmpl $0x29, %r10d
ja 0x64485
btq %r10, %r9
jb 0x644c0
addq $0x10, %r8
cmpq %r8, %rax
jne 0x64471
testw %cx, %cx
jns 0x6436d
jmp 0x64395
cmpl $0x0, 0x58(%rsi)
je 0x64432
leaq 0x3b66c(%rip), %rax # 0x9fb15
movq %rax, %rsi
xorl %eax, %eax
callq 0x2f0d5
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x3b6c0(%rip), %rax # 0x9fb87
jmp 0x644a9
| js_parse_function_check_names:
push r14
push rbx
push rax
movzx ecx, word ptr [rsi+84h]
test cx, cx
js loc_6442C
loc_6436D:
mov eax, ecx
and eax, 7FFFh
cmp eax, 602h
jz short loc_64395
cmp dword ptr [rsi+50h], 0
jz short loc_64395
shr ecx, 8
and ecx, 7Fh
cmp ecx, 6
jz short loc_64395
cmp ecx, 3
jnz loc_64425
loc_64395:
movsxd rcx, dword ptr [rsi+0B4h]
test rcx, rcx
jle loc_64425
mov rdx, [rsi+0A8h]
xor r8d, r8d
lea rax, aDuplicateParam; "Duplicate parameter name not allowed in"...
xor r9d, r9d
loc_643B9:
mov r10, r9
shl r10, 4
mov r10d, [rdx+r10]
test r10d, r10d
jz short loc_64419
test r9, r9
jz short loc_643E4
xor r11d, r11d
loc_643D1:
cmp [rdx+r11], r10d
jz loc_644A9
add r11, 10h
cmp r8, r11
jnz short loc_643D1
loc_643E4:
movsxd r11, dword ptr [rsi+0A4h]
test r11, r11
jle short loc_64419
mov rbx, [rsi+90h]
shl r11, 4
xor r14d, r14d
loc_643FE:
cmp [rbx+r14], r10d
jnz short loc_64410
cmp dword ptr [rbx+r14+4], 0
jz loc_644A9
loc_64410:
add r14, 10h
cmp r11, r14
jnz short loc_643FE
loc_64419:
inc r9
add r8, 10h
cmp r9, rcx
jnz short loc_643B9
loc_64425:
xor eax, eax
jmp loc_644B8
loc_6442C:
cmp dword ptr [rsi+50h], 0
jz short loc_6449C
loc_64432:
lea rax, aInvalidFunctio; "invalid function name in strict code"
lea r8d, [rdx-25h]
cmp r8d, 9
jb short loc_644A9
cmp edx, 3Bh ; ';'
jz short loc_644A9
cmp edx, 4Eh ; 'N'
jz short loc_644A9
movsxd rax, dword ptr [rsi+0B4h]
test rax, rax
jle short loc_6448E
mov rdx, [rsi+0A8h]
shl rax, 4
xor r8d, r8d
mov r9, 200004001FFh
loc_64471:
mov r10d, [rdx+r8]
add r10d, 0FFFFFFDBh
cmp r10d, 29h ; ')'
ja short loc_64485
bt r9, r10
jb short loc_644C0
loc_64485:
add r8, 10h
cmp rax, r8
jnz short loc_64471
loc_6448E:
test cx, cx
jns loc_6436D
jmp loc_64395
loc_6449C:
cmp dword ptr [rsi+58h], 0
jz short loc_64432
lea rax, aUseStrictNotAl; "\"use strict\" not allowed in function "...
loc_644A9:
mov rsi, rax
xor eax, eax
call js_parse_error
mov eax, 0FFFFFFFFh
loc_644B8:
add rsp, 8
pop rbx
pop r14
retn
loc_644C0:
lea rax, aInvalidArgumen; "invalid argument name in strict code"
jmp short loc_644A9
| long long js_parse_function_check_names(
long long *a1,
long long a2,
long long a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
long long a12,
long long a13,
long long a14)
{
char v14; // al
long long v15; // rcx
unsigned int v16; // ecx
const char *v17; // rax
int v18; // r10d
long long v19; // r11
long long v20; // r11
long long v21; // rbx
long long v22; // r11
long long v23; // r14
long long v25; // rax
long long v26; // rax
unsigned long long v27; // r10
char v28; // [rsp-8h] [rbp-18h]
v28 = v14;
v15 = *(unsigned __int16 *)(a2 + 132);
if ( (v15 & 0x8000u) == 0LL )
{
if ( (v15 & 0x7FFF) != 0x602 )
{
if ( *(_DWORD *)(a2 + 80) )
{
v16 = ((unsigned int)v15 >> 8) & 0x7F;
if ( v16 != 6 && v16 != 3 )
return 0LL;
}
}
LABEL_6:
v15 = *(int *)(a2 + 180);
if ( v15 > 0 )
{
a3 = *(_QWORD *)(a2 + 168);
a13 = 0LL;
v17 = "Duplicate parameter name not allowed in this context";
a14 = 0LL;
while ( 1 )
{
v18 = *(_DWORD *)(a3 + 16 * a14);
if ( v18 )
{
if ( a14 )
{
v19 = 0LL;
while ( *(_DWORD *)(a3 + v19) != v18 )
{
v19 += 16LL;
if ( a13 == v19 )
goto LABEL_13;
}
goto LABEL_32;
}
LABEL_13:
v20 = *(int *)(a2 + 164);
if ( v20 > 0 )
{
v21 = *(_QWORD *)(a2 + 144);
v22 = 16 * v20;
v23 = 0LL;
while ( *(_DWORD *)(v21 + v23) != v18 || *(_DWORD *)(v21 + v23 + 4) )
{
v23 += 16LL;
if ( v22 == v23 )
goto LABEL_18;
}
goto LABEL_32;
}
}
LABEL_18:
++a14;
a13 += 16LL;
if ( a14 == v15 )
return 0LL;
}
}
return 0LL;
}
if ( !*(_DWORD *)(a2 + 80) && *(_DWORD *)(a2 + 88) )
{
v17 = "\"use strict\" not allowed in function with default or destructuring parameter";
goto LABEL_32;
}
v17 = "invalid function name in strict code";
a13 = (unsigned int)(a3 - 37);
if ( (unsigned int)a13 >= 9 && (_DWORD)a3 != 59 && (_DWORD)a3 != 78 )
{
v25 = *(int *)(a2 + 180);
if ( v25 > 0 )
{
a3 = *(_QWORD *)(a2 + 168);
v26 = 16 * v25;
a13 = 0LL;
a14 = 0x200004001FFLL;
do
{
v27 = (unsigned int)(*(_DWORD *)(a3 + a13) - 37);
if ( (unsigned int)v27 <= 0x29 && _bittest64(&a14, v27) )
{
v17 = "invalid argument name in strict code";
goto LABEL_32;
}
a13 += 16LL;
}
while ( v26 != a13 );
}
goto LABEL_6;
}
LABEL_32:
js_parse_error(a1, (long long)v17, a3, v15, a13, a14, a4, a5, a6, a7, a8, a9, a10, a11, v28);
return 0xFFFFFFFFLL;
}
| js_parse_function_check_names:
PUSH R14
PUSH RBX
PUSH RAX
MOVZX ECX,word ptr [RSI + 0x84]
TEST CX,CX
JS 0x0016442c
LAB_0016436d:
MOV EAX,ECX
AND EAX,0x7fff
CMP EAX,0x602
JZ 0x00164395
CMP dword ptr [RSI + 0x50],0x0
JZ 0x00164395
SHR ECX,0x8
AND ECX,0x7f
CMP ECX,0x6
JZ 0x00164395
CMP ECX,0x3
JNZ 0x00164425
LAB_00164395:
MOVSXD RCX,dword ptr [RSI + 0xb4]
TEST RCX,RCX
JLE 0x00164425
MOV RDX,qword ptr [RSI + 0xa8]
XOR R8D,R8D
LEA RAX,[0x19fae0]
XOR R9D,R9D
LAB_001643b9:
MOV R10,R9
SHL R10,0x4
MOV R10D,dword ptr [RDX + R10*0x1]
TEST R10D,R10D
JZ 0x00164419
TEST R9,R9
JZ 0x001643e4
XOR R11D,R11D
LAB_001643d1:
CMP dword ptr [RDX + R11*0x1],R10D
JZ 0x001644a9
ADD R11,0x10
CMP R8,R11
JNZ 0x001643d1
LAB_001643e4:
MOVSXD R11,dword ptr [RSI + 0xa4]
TEST R11,R11
JLE 0x00164419
MOV RBX,qword ptr [RSI + 0x90]
SHL R11,0x4
XOR R14D,R14D
LAB_001643fe:
CMP dword ptr [RBX + R14*0x1],R10D
JNZ 0x00164410
CMP dword ptr [RBX + R14*0x1 + 0x4],0x0
JZ 0x001644a9
LAB_00164410:
ADD R14,0x10
CMP R11,R14
JNZ 0x001643fe
LAB_00164419:
INC R9
ADD R8,0x10
CMP R9,RCX
JNZ 0x001643b9
LAB_00164425:
XOR EAX,EAX
JMP 0x001644b8
LAB_0016442c:
CMP dword ptr [RSI + 0x50],0x0
JZ 0x0016449c
LAB_00164432:
LEA RAX,[0x19fb62]
LEA R8D,[RDX + -0x25]
CMP R8D,0x9
JC 0x001644a9
CMP EDX,0x3b
JZ 0x001644a9
CMP EDX,0x4e
JZ 0x001644a9
MOVSXD RAX,dword ptr [RSI + 0xb4]
TEST RAX,RAX
JLE 0x0016448e
MOV RDX,qword ptr [RSI + 0xa8]
SHL RAX,0x4
XOR R8D,R8D
MOV R9,0x200004001ff
LAB_00164471:
MOV R10D,dword ptr [RDX + R8*0x1]
ADD R10D,-0x25
CMP R10D,0x29
JA 0x00164485
BT R9,R10
JC 0x001644c0
LAB_00164485:
ADD R8,0x10
CMP RAX,R8
JNZ 0x00164471
LAB_0016448e:
TEST CX,CX
JNS 0x0016436d
JMP 0x00164395
LAB_0016449c:
CMP dword ptr [RSI + 0x58],0x0
JZ 0x00164432
LEA RAX,[0x19fb15]
LAB_001644a9:
MOV RSI,RAX
XOR EAX,EAX
CALL 0x0012f0d5
MOV EAX,0xffffffff
LAB_001644b8:
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_001644c0:
LEA RAX,[0x19fb87]
JMP 0x001644a9
|
int8 js_parse_function_check_names(int8 param_1,long param_2,int param_3)
{
int iVar1;
char *pcVar2;
int8 uVar3;
ushort uVar4;
long lVar5;
long lVar6;
uint uVar7;
long lVar8;
uVar4 = *(ushort *)(param_2 + 0x84);
if ((short)uVar4 < 0) {
if ((*(int *)(param_2 + 0x50) == 0) && (*(int *)(param_2 + 0x58) != 0)) {
pcVar2 = "\"use strict\" not allowed in function with default or destructuring parameter";
}
else {
pcVar2 = "invalid function name in strict code";
if ((8 < param_3 - 0x25U) && ((param_3 != 0x3b && (param_3 != 0x4e)))) {
if (0 < (long)*(int *)(param_2 + 0xb4)) {
lVar5 = 0;
do {
uVar7 = *(int *)(*(long *)(param_2 + 0xa8) + lVar5) - 0x25;
if ((uVar7 < 0x2a) && ((0x200004001ffU >> ((ulong)uVar7 & 0x3f) & 1) != 0)) {
pcVar2 = "invalid argument name in strict code";
goto LAB_001644a9;
}
lVar5 = lVar5 + 0x10;
} while ((long)*(int *)(param_2 + 0xb4) * 0x10 != lVar5);
}
if (-1 < (short)uVar4) goto LAB_0016436d;
goto LAB_00164395;
}
}
LAB_001644a9:
js_parse_error(param_1,pcVar2);
uVar3 = 0xffffffff;
}
else {
LAB_0016436d:
if (((((uVar4 & 0x7fff) == 0x602) || (*(int *)(param_2 + 0x50) == 0)) ||
(uVar4 = uVar4 >> 8 & 0x7f, uVar4 == 6)) || (uVar4 == 3)) {
LAB_00164395:
if (0 < (long)*(int *)(param_2 + 0xb4)) {
lVar5 = 0;
pcVar2 = "Duplicate parameter name not allowed in this context";
lVar6 = 0;
do {
iVar1 = *(int *)(*(long *)(param_2 + 0xa8) + lVar6 * 0x10);
if (iVar1 != 0) {
if (lVar6 != 0) {
lVar8 = 0;
do {
if (*(int *)(*(long *)(param_2 + 0xa8) + lVar8) == iVar1) goto LAB_001644a9;
lVar8 = lVar8 + 0x10;
} while (lVar5 != lVar8);
}
if (0 < (long)*(int *)(param_2 + 0xa4)) {
lVar8 = 0;
do {
if ((*(int *)(*(long *)(param_2 + 0x90) + lVar8) == iVar1) &&
(*(int *)(*(long *)(param_2 + 0x90) + 4 + lVar8) == 0)) goto LAB_001644a9;
lVar8 = lVar8 + 0x10;
} while ((long)*(int *)(param_2 + 0xa4) * 0x10 != lVar8);
}
}
lVar6 = lVar6 + 1;
lVar5 = lVar5 + 0x10;
} while (lVar6 != *(int *)(param_2 + 0xb4));
}
}
uVar3 = 0;
}
return uVar3;
}
| |
55,161 | js_parse_function_check_names | bluesky950520[P]quickjs/quickjs.c | static int js_parse_function_check_names(JSParseState *s, JSFunctionDef *fd,
JSAtom func_name)
{
JSAtom name;
int i, idx;
if (fd->is_strict_mode) {
if (!fd->has_simple_parameter_list && fd->has_use_strict) {
return js_parse_error(s, "\"use strict\" not allowed in function with default or destructuring parameter");
}
if (js_invalid_strict_name(func_name)) {
return js_parse_error(s, "invalid function name in strict code");
}
for (idx = 0; idx < fd->arg_count; idx++) {
name = fd->args[idx].var_name;
if (js_invalid_strict_name(name)) {
return js_parse_error(s, "invalid argument name in strict code");
}
}
}
/* check async_generator case */
if (fd->is_strict_mode
|| !fd->has_simple_parameter_list
|| (fd->func_type == JS_PARSE_FUNC_METHOD && fd->func_kind == JS_FUNC_ASYNC)
|| fd->func_type == JS_PARSE_FUNC_ARROW
|| fd->func_type == JS_PARSE_FUNC_METHOD) {
for (idx = 0; idx < fd->arg_count; idx++) {
name = fd->args[idx].var_name;
if (name != JS_ATOM_NULL) {
for (i = 0; i < idx; i++) {
if (fd->args[i].var_name == name)
goto duplicate;
}
/* Check if argument name duplicates a destructuring parameter */
/* XXX: should have a flag for such variables */
for (i = 0; i < fd->var_count; i++) {
if (fd->vars[i].var_name == name &&
fd->vars[i].scope_level == 0)
goto duplicate;
}
}
}
}
return 0;
duplicate:
return js_parse_error(s, "Duplicate parameter name not allowed in this context");
} | O3 | c | js_parse_function_check_names:
pushq %r14
pushq %rbx
pushq %rax
movzwl 0x84(%rsi), %eax
movl 0x50(%rsi), %ecx
testw %ax, %ax
js 0x66c96
testl %ecx, %ecx
sete %cl
movzwl %ax, %eax
cmpl $0x602, %eax # imm = 0x602
sete %dl
orb %cl, %dl
jne 0x66bff
shrl $0x8, %eax
cmpb $0x6, %al
je 0x66bff
cmpl $0x3, %eax
jne 0x66c8f
movslq 0xb4(%rsi), %rcx
testq %rcx, %rcx
jle 0x66c8f
movq 0xa8(%rsi), %rdx
xorl %r8d, %r8d
leaq 0x3be7a(%rip), %rax # 0xa2a9a
xorl %r9d, %r9d
movq %r9, %r10
shlq $0x4, %r10
movl (%rdx,%r10), %r10d
testl %r10d, %r10d
je 0x66c83
testq %r9, %r9
je 0x66c4e
xorl %r11d, %r11d
cmpl %r10d, (%rdx,%r11)
je 0x66d09
addq $0x10, %r11
cmpq %r11, %r8
jne 0x66c3b
movslq 0xa4(%rsi), %r11
testq %r11, %r11
jle 0x66c83
movq 0x90(%rsi), %rbx
shlq $0x4, %r11
xorl %r14d, %r14d
cmpl %r10d, (%rbx,%r14)
jne 0x66c7a
cmpl $0x0, 0x4(%rbx,%r14)
je 0x66d09
addq $0x10, %r14
cmpq %r14, %r11
jne 0x66c68
incq %r9
addq $0x10, %r8
cmpq %rcx, %r9
jne 0x66c23
xorl %eax, %eax
jmp 0x66d18
testl %ecx, %ecx
je 0x66cfc
leaq 0x3be7b(%rip), %rax # 0xa2b1c
leal -0x25(%rdx), %ecx
cmpl $0x9, %ecx
jb 0x66d09
cmpl $0x3b, %edx
je 0x66d09
cmpl $0x4e, %edx
je 0x66d09
movslq 0xb4(%rsi), %rax
testq %rax, %rax
jle 0x66bff
movq 0xa8(%rsi), %rcx
shlq $0x4, %rax
xorl %edx, %edx
movabsq $0x200004001ff, %r8 # imm = 0x200004001FF
movl (%rcx,%rdx), %r9d
addl $-0x25, %r9d
cmpl $0x29, %r9d
ja 0x66cee
btq %r9, %r8
jb 0x66d20
addq $0x10, %rdx
cmpq %rdx, %rax
jne 0x66cda
jmp 0x66bff
cmpl $0x0, 0x58(%rsi)
je 0x66c9a
leaq 0x3bdc6(%rip), %rax # 0xa2acf
movq %rax, %rsi
xorl %eax, %eax
callq 0x2fed1
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x3be1a(%rip), %rax # 0xa2b41
jmp 0x66d09
| js_parse_function_check_names:
push r14
push rbx
push rax
movzx eax, word ptr [rsi+84h]
mov ecx, [rsi+50h]
test ax, ax
js loc_66C96
test ecx, ecx
setz cl
movzx eax, ax
cmp eax, 602h
setz dl
or dl, cl
jnz short loc_66BFF
shr eax, 8
cmp al, 6
jz short loc_66BFF
cmp eax, 3
jnz loc_66C8F
loc_66BFF:
movsxd rcx, dword ptr [rsi+0B4h]
test rcx, rcx
jle loc_66C8F
mov rdx, [rsi+0A8h]
xor r8d, r8d
lea rax, aDuplicateParam; "Duplicate parameter name not allowed in"...
xor r9d, r9d
loc_66C23:
mov r10, r9
shl r10, 4
mov r10d, [rdx+r10]
test r10d, r10d
jz short loc_66C83
test r9, r9
jz short loc_66C4E
xor r11d, r11d
loc_66C3B:
cmp [rdx+r11], r10d
jz loc_66D09
add r11, 10h
cmp r8, r11
jnz short loc_66C3B
loc_66C4E:
movsxd r11, dword ptr [rsi+0A4h]
test r11, r11
jle short loc_66C83
mov rbx, [rsi+90h]
shl r11, 4
xor r14d, r14d
loc_66C68:
cmp [rbx+r14], r10d
jnz short loc_66C7A
cmp dword ptr [rbx+r14+4], 0
jz loc_66D09
loc_66C7A:
add r14, 10h
cmp r11, r14
jnz short loc_66C68
loc_66C83:
inc r9
add r8, 10h
cmp r9, rcx
jnz short loc_66C23
loc_66C8F:
xor eax, eax
jmp loc_66D18
loc_66C96:
test ecx, ecx
jz short loc_66CFC
loc_66C9A:
lea rax, aInvalidFunctio; "invalid function name in strict code"
lea ecx, [rdx-25h]
cmp ecx, 9
jb short loc_66D09
cmp edx, 3Bh ; ';'
jz short loc_66D09
cmp edx, 4Eh ; 'N'
jz short loc_66D09
movsxd rax, dword ptr [rsi+0B4h]
test rax, rax
jle loc_66BFF
mov rcx, [rsi+0A8h]
shl rax, 4
xor edx, edx
mov r8, 200004001FFh
loc_66CDA:
mov r9d, [rcx+rdx]
add r9d, 0FFFFFFDBh
cmp r9d, 29h ; ')'
ja short loc_66CEE
bt r8, r9
jb short loc_66D20
loc_66CEE:
add rdx, 10h
cmp rax, rdx
jnz short loc_66CDA
jmp loc_66BFF
loc_66CFC:
cmp dword ptr [rsi+58h], 0
jz short loc_66C9A
lea rax, aUseStrictNotAl; "\"use strict\" not allowed in function "...
loc_66D09:
mov rsi, rax
xor eax, eax
call js_parse_error
mov eax, 0FFFFFFFFh
loc_66D18:
add rsp, 8
pop rbx
pop r14
retn
loc_66D20:
lea rax, aInvalidArgumen; "invalid argument name in strict code"
jmp short loc_66D09
| long long js_parse_function_check_names(
long long *a1,
long long a2,
long long a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
long long a12,
long long a13,
unsigned long long a14)
{
char v14; // al
unsigned __int16 v15; // ax
long long v16; // rcx
int v17; // eax
const char *v18; // rax
int v19; // r10d
long long v20; // r11
long long v21; // r11
long long v22; // rbx
long long v23; // r11
long long v24; // r14
long long v26; // rax
long long v27; // rax
char v28; // [rsp-8h] [rbp-18h]
v28 = v14;
v15 = *(_WORD *)(a2 + 132);
v16 = *(unsigned int *)(a2 + 80);
if ( (v15 & 0x8000u) == 0 )
{
if ( (_DWORD)v16 != 0 && v15 != 1538 )
{
v17 = HIBYTE(v15);
if ( (_BYTE)v17 != 6 && v17 != 3 )
return 0LL;
}
LABEL_5:
v16 = *(int *)(a2 + 180);
if ( v16 > 0 )
{
a3 = *(_QWORD *)(a2 + 168);
a13 = 0LL;
v18 = "Duplicate parameter name not allowed in this context";
a14 = 0LL;
while ( 1 )
{
v19 = *(_DWORD *)(a3 + 16 * a14);
if ( v19 )
{
if ( a14 )
{
v20 = 0LL;
while ( *(_DWORD *)(a3 + v20) != v19 )
{
v20 += 16LL;
if ( a13 == v20 )
goto LABEL_12;
}
goto LABEL_31;
}
LABEL_12:
v21 = *(int *)(a2 + 164);
if ( v21 > 0 )
{
v22 = *(_QWORD *)(a2 + 144);
v23 = 16 * v21;
v24 = 0LL;
while ( *(_DWORD *)(v22 + v24) != v19 || *(_DWORD *)(v22 + v24 + 4) )
{
v24 += 16LL;
if ( v23 == v24 )
goto LABEL_17;
}
goto LABEL_31;
}
}
LABEL_17:
++a14;
a13 += 16LL;
if ( a14 == v16 )
return 0LL;
}
}
return 0LL;
}
if ( !(_DWORD)v16 && *(_DWORD *)(a2 + 88) )
{
v18 = "\"use strict\" not allowed in function with default or destructuring parameter";
goto LABEL_31;
}
v18 = "invalid function name in strict code";
v16 = (unsigned int)(a3 - 37);
if ( (unsigned int)v16 >= 9 && (_DWORD)a3 != 59 && (_DWORD)a3 != 78 )
{
v26 = *(int *)(a2 + 180);
if ( v26 > 0 )
{
v16 = *(_QWORD *)(a2 + 168);
v27 = 16 * v26;
a3 = 0LL;
a13 = 0x200004001FFLL;
do
{
a14 = (unsigned int)(*(_DWORD *)(v16 + a3) - 37);
if ( (unsigned int)a14 <= 0x29 && _bittest64(&a13, a14) )
{
v18 = "invalid argument name in strict code";
goto LABEL_31;
}
a3 += 16LL;
}
while ( v27 != a3 );
}
goto LABEL_5;
}
LABEL_31:
js_parse_error(a1, (long long)v18, a3, v16, a13, a14, a4, a5, a6, a7, a8, a9, a10, a11, v28);
return 0xFFFFFFFFLL;
}
| js_parse_function_check_names:
PUSH R14
PUSH RBX
PUSH RAX
MOVZX EAX,word ptr [RSI + 0x84]
MOV ECX,dword ptr [RSI + 0x50]
TEST AX,AX
JS 0x00166c96
TEST ECX,ECX
SETZ CL
MOVZX EAX,AX
CMP EAX,0x602
SETZ DL
OR DL,CL
JNZ 0x00166bff
SHR EAX,0x8
CMP AL,0x6
JZ 0x00166bff
CMP EAX,0x3
JNZ 0x00166c8f
LAB_00166bff:
MOVSXD RCX,dword ptr [RSI + 0xb4]
TEST RCX,RCX
JLE 0x00166c8f
MOV RDX,qword ptr [RSI + 0xa8]
XOR R8D,R8D
LEA RAX,[0x1a2a9a]
XOR R9D,R9D
LAB_00166c23:
MOV R10,R9
SHL R10,0x4
MOV R10D,dword ptr [RDX + R10*0x1]
TEST R10D,R10D
JZ 0x00166c83
TEST R9,R9
JZ 0x00166c4e
XOR R11D,R11D
LAB_00166c3b:
CMP dword ptr [RDX + R11*0x1],R10D
JZ 0x00166d09
ADD R11,0x10
CMP R8,R11
JNZ 0x00166c3b
LAB_00166c4e:
MOVSXD R11,dword ptr [RSI + 0xa4]
TEST R11,R11
JLE 0x00166c83
MOV RBX,qword ptr [RSI + 0x90]
SHL R11,0x4
XOR R14D,R14D
LAB_00166c68:
CMP dword ptr [RBX + R14*0x1],R10D
JNZ 0x00166c7a
CMP dword ptr [RBX + R14*0x1 + 0x4],0x0
JZ 0x00166d09
LAB_00166c7a:
ADD R14,0x10
CMP R11,R14
JNZ 0x00166c68
LAB_00166c83:
INC R9
ADD R8,0x10
CMP R9,RCX
JNZ 0x00166c23
LAB_00166c8f:
XOR EAX,EAX
JMP 0x00166d18
LAB_00166c96:
TEST ECX,ECX
JZ 0x00166cfc
LAB_00166c9a:
LEA RAX,[0x1a2b1c]
LEA ECX,[RDX + -0x25]
CMP ECX,0x9
JC 0x00166d09
CMP EDX,0x3b
JZ 0x00166d09
CMP EDX,0x4e
JZ 0x00166d09
MOVSXD RAX,dword ptr [RSI + 0xb4]
TEST RAX,RAX
JLE 0x00166bff
MOV RCX,qword ptr [RSI + 0xa8]
SHL RAX,0x4
XOR EDX,EDX
MOV R8,0x200004001ff
LAB_00166cda:
MOV R9D,dword ptr [RCX + RDX*0x1]
ADD R9D,-0x25
CMP R9D,0x29
JA 0x00166cee
BT R8,R9
JC 0x00166d20
LAB_00166cee:
ADD RDX,0x10
CMP RAX,RDX
JNZ 0x00166cda
JMP 0x00166bff
LAB_00166cfc:
CMP dword ptr [RSI + 0x58],0x0
JZ 0x00166c9a
LEA RAX,[0x1a2acf]
LAB_00166d09:
MOV RSI,RAX
XOR EAX,EAX
CALL 0x0012fed1
MOV EAX,0xffffffff
LAB_00166d18:
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_00166d20:
LEA RAX,[0x1a2b41]
JMP 0x00166d09
|
int8 js_parse_function_check_names(int8 param_1,long param_2,int param_3)
{
ushort uVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
long lVar5;
uint uVar6;
long lVar7;
long lVar8;
uVar1 = *(ushort *)(param_2 + 0x84);
if ((short)uVar1 < 0) {
if ((*(int *)(param_2 + 0x50) == 0) && (*(int *)(param_2 + 0x58) != 0)) {
pcVar3 = "\"use strict\" not allowed in function with default or destructuring parameter";
}
else {
pcVar3 = "invalid function name in strict code";
if ((8 < param_3 - 0x25U) && ((param_3 != 0x3b && (param_3 != 0x4e)))) {
if (0 < (long)*(int *)(param_2 + 0xb4)) {
lVar5 = 0;
do {
uVar6 = *(int *)(*(long *)(param_2 + 0xa8) + lVar5) - 0x25;
if ((uVar6 < 0x2a) && ((0x200004001ffU >> ((ulong)uVar6 & 0x3f) & 1) != 0)) {
pcVar3 = "invalid argument name in strict code";
goto LAB_00166d09;
}
lVar5 = lVar5 + 0x10;
} while ((long)*(int *)(param_2 + 0xb4) * 0x10 != lVar5);
}
goto LAB_00166bff;
}
}
LAB_00166d09:
js_parse_error(param_1,pcVar3);
uVar4 = 0xffffffff;
}
else {
if (((uVar1 == 0x602 || *(int *)(param_2 + 0x50) == 0) || ((char)(uVar1 >> 8) == '\x06')) ||
(uVar1 >> 8 == 3)) {
LAB_00166bff:
if (0 < (long)*(int *)(param_2 + 0xb4)) {
lVar5 = 0;
pcVar3 = "Duplicate parameter name not allowed in this context";
lVar7 = 0;
do {
iVar2 = *(int *)(*(long *)(param_2 + 0xa8) + lVar7 * 0x10);
if (iVar2 != 0) {
if (lVar7 != 0) {
lVar8 = 0;
do {
if (*(int *)(*(long *)(param_2 + 0xa8) + lVar8) == iVar2) goto LAB_00166d09;
lVar8 = lVar8 + 0x10;
} while (lVar5 != lVar8);
}
if (0 < (long)*(int *)(param_2 + 0xa4)) {
lVar8 = 0;
do {
if ((*(int *)(*(long *)(param_2 + 0x90) + lVar8) == iVar2) &&
(*(int *)(*(long *)(param_2 + 0x90) + 4 + lVar8) == 0)) goto LAB_00166d09;
lVar8 = lVar8 + 0x10;
} while ((long)*(int *)(param_2 + 0xa4) * 0x10 != lVar8);
}
}
lVar7 = lVar7 + 1;
lVar5 = lVar5 + 0x10;
} while (lVar7 != *(int *)(param_2 + 0xb4));
}
}
uVar4 = 0;
}
return uVar4;
}
| |
55,162 | mp_sqrtrem | bluesky950520[P]quickjs/libbf.c | int mp_sqrtrem(bf_context_t *s, limb_t *tabs, limb_t *taba, limb_t n)
{
limb_t tmp_buf1[8];
limb_t *tmp_buf;
mp_size_t n2;
int ret;
n2 = n / 2 + 1;
if (n2 <= countof(tmp_buf1)) {
tmp_buf = tmp_buf1;
} else {
tmp_buf = bf_malloc(s, sizeof(limb_t) * n2);
if (!tmp_buf)
return -1;
}
ret = mp_sqrtrem_rec(s, tabs, taba, n, tmp_buf, taba + n);
if (tmp_buf != tmp_buf1)
bf_free(s, tmp_buf);
return ret;
} | O0 | c | mp_sqrtrem:
subq $0x88, %rsp
movq %rdi, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
movq %rdx, 0x68(%rsp)
movq %rcx, 0x60(%rsp)
movq 0x60(%rsp), %rax
shrq %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
cmpq $0x8, 0x10(%rsp)
ja 0xefae0
leaq 0x20(%rsp), %rax
movq %rax, 0x18(%rsp)
jmp 0xefb0f
movq 0x78(%rsp), %rdi
movq 0x10(%rsp), %rsi
shlq $0x3, %rsi
callq 0xee350
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0xefb0d
movl $0xffffffff, 0x84(%rsp) # imm = 0xFFFFFFFF
jmp 0xefb6b
jmp 0xefb0f
movq 0x78(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq 0x60(%rsp), %rcx
movq 0x18(%rsp), %r8
movq 0x68(%rsp), %r9
movq 0x60(%rsp), %rax
shlq $0x3, %rax
addq %rax, %r9
callq 0xefb80
movl %eax, 0xc(%rsp)
movq 0x18(%rsp), %rax
leaq 0x20(%rsp), %rcx
cmpq %rcx, %rax
je 0xefb60
movq 0x78(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0xec6c0
movl 0xc(%rsp), %eax
movl %eax, 0x84(%rsp)
movl 0x84(%rsp), %eax
addq $0x88, %rsp
retq
nopw (%rax,%rax)
| mp_sqrtrem:
sub rsp, 88h
mov [rsp+88h+var_10], rdi
mov [rsp+88h+var_18], rsi
mov [rsp+88h+var_20], rdx
mov [rsp+88h+var_28], rcx
mov rax, [rsp+88h+var_28]
shr rax, 1
add rax, 1
mov [rsp+88h+var_78], rax
cmp [rsp+88h+var_78], 8
ja short loc_EFAE0
lea rax, [rsp+88h+var_68]
mov [rsp+88h+var_70], rax
jmp short loc_EFB0F
loc_EFAE0:
mov rdi, [rsp+88h+var_10]
mov rsi, [rsp+88h+var_78]
shl rsi, 3
call bf_malloc
mov [rsp+88h+var_70], rax
cmp [rsp+88h+var_70], 0
jnz short loc_EFB0D
mov [rsp+88h+var_4], 0FFFFFFFFh
jmp short loc_EFB6B
loc_EFB0D:
jmp short $+2
loc_EFB0F:
mov rdi, [rsp+88h+var_10]
mov rsi, [rsp+88h+var_18]
mov rdx, [rsp+88h+var_20]
mov rcx, [rsp+88h+var_28]
mov r8, [rsp+88h+var_70]
mov r9, [rsp+88h+var_20]
mov rax, [rsp+88h+var_28]
shl rax, 3
add r9, rax
call mp_sqrtrem_rec
mov [rsp+88h+var_7C], eax
mov rax, [rsp+88h+var_70]
lea rcx, [rsp+88h+var_68]
cmp rax, rcx
jz short loc_EFB60
mov rdi, [rsp+88h+var_10]
mov rsi, [rsp+88h+var_70]
call bf_free_0
loc_EFB60:
mov eax, [rsp+88h+var_7C]
mov [rsp+88h+var_4], eax
loc_EFB6B:
mov eax, [rsp+88h+var_4]
add rsp, 88h
retn
| long long mp_sqrtrem(long long a1, long long a2, long long a3, unsigned long long a4, long long a5, long long a6)
{
unsigned int v6; // eax
long long v7; // rdx
long long v8; // r8
long long v9; // r9
unsigned int v11; // [rsp+Ch] [rbp-7Ch]
unsigned long long v12; // [rsp+10h] [rbp-78h]
_BYTE *v13; // [rsp+18h] [rbp-70h]
_BYTE v14[64]; // [rsp+20h] [rbp-68h] BYREF
unsigned long long v15; // [rsp+60h] [rbp-28h]
long long v16; // [rsp+68h] [rbp-20h]
long long v17; // [rsp+70h] [rbp-18h]
long long v18; // [rsp+78h] [rbp-10h]
v18 = a1;
v17 = a2;
v16 = a3;
v15 = a4;
v12 = (a4 >> 1) + 1;
if ( v12 > 8 )
{
v13 = (_BYTE *)bf_malloc(v18, 8 * v12, a3, a4, a5, a6);
if ( !v13 )
return (unsigned int)-1;
v6 = mp_sqrtrem_rec(v18, v17, v16, v15, v13, 8 * v15 + v16);
}
else
{
v13 = v14;
v6 = mp_sqrtrem_rec(v18, v17, v16, v15, v14, 8 * v15 + v16);
}
v11 = v6;
if ( v13 != v14 )
bf_free_0(v18, (long long)v13, v7, (long long)v14, v8, v9);
return v11;
}
| mp_sqrtrem:
SUB RSP,0x88
MOV qword ptr [RSP + 0x78],RDI
MOV qword ptr [RSP + 0x70],RSI
MOV qword ptr [RSP + 0x68],RDX
MOV qword ptr [RSP + 0x60],RCX
MOV RAX,qword ptr [RSP + 0x60]
SHR RAX,0x1
ADD RAX,0x1
MOV qword ptr [RSP + 0x10],RAX
CMP qword ptr [RSP + 0x10],0x8
JA 0x001efae0
LEA RAX,[RSP + 0x20]
MOV qword ptr [RSP + 0x18],RAX
JMP 0x001efb0f
LAB_001efae0:
MOV RDI,qword ptr [RSP + 0x78]
MOV RSI,qword ptr [RSP + 0x10]
SHL RSI,0x3
CALL 0x001ee350
MOV qword ptr [RSP + 0x18],RAX
CMP qword ptr [RSP + 0x18],0x0
JNZ 0x001efb0d
MOV dword ptr [RSP + 0x84],0xffffffff
JMP 0x001efb6b
LAB_001efb0d:
JMP 0x001efb0f
LAB_001efb0f:
MOV RDI,qword ptr [RSP + 0x78]
MOV RSI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x68]
MOV RCX,qword ptr [RSP + 0x60]
MOV R8,qword ptr [RSP + 0x18]
MOV R9,qword ptr [RSP + 0x68]
MOV RAX,qword ptr [RSP + 0x60]
SHL RAX,0x3
ADD R9,RAX
CALL 0x001efb80
MOV dword ptr [RSP + 0xc],EAX
MOV RAX,qword ptr [RSP + 0x18]
LEA RCX,[RSP + 0x20]
CMP RAX,RCX
JZ 0x001efb60
MOV RDI,qword ptr [RSP + 0x78]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x001ec6c0
LAB_001efb60:
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSP + 0x84],EAX
LAB_001efb6b:
MOV EAX,dword ptr [RSP + 0x84]
ADD RSP,0x88
RET
|
int4 mp_sqrtrem(int8 param_1,int8 param_2,long param_3,ulong param_4)
{
int4 uVar1;
ulong uVar2;
int1 *local_70;
int1 local_68 [64];
ulong local_28;
long local_20;
int8 local_18;
int8 local_10;
uVar2 = (param_4 >> 1) + 1;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
if (uVar2 < 9) {
local_70 = local_68;
}
else {
local_70 = (int1 *)bf_malloc(param_1,uVar2 * 8);
if (local_70 == (int1 *)0x0) {
return 0xffffffff;
}
}
uVar1 = mp_sqrtrem_rec(local_10,local_18,local_20,local_28,local_70,local_20 + local_28 * 8);
if (local_70 != local_68) {
bf_free(local_10,local_70);
}
return uVar1;
}
| |
55,163 | mp_sqrtrem | bluesky950520[P]quickjs/libbf.c | int mp_sqrtrem(bf_context_t *s, limb_t *tabs, limb_t *taba, limb_t n)
{
limb_t tmp_buf1[8];
limb_t *tmp_buf;
mp_size_t n2;
int ret;
n2 = n / 2 + 1;
if (n2 <= countof(tmp_buf1)) {
tmp_buf = tmp_buf1;
} else {
tmp_buf = bf_malloc(s, sizeof(limb_t) * n2);
if (!tmp_buf)
return -1;
}
ret = mp_sqrtrem_rec(s, tabs, taba, n, tmp_buf, taba + n);
if (tmp_buf != tmp_buf1)
bf_free(s, tmp_buf);
return ret;
} | O2 | c | mp_sqrtrem:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq %rsp, %rbp
movq %rbp, %r13
cmpq $0x10, %rcx
jb 0x751f9
movq %r14, %rax
andq $-0x2, %rax
leaq 0x8(,%rax,4), %rdx
movq (%rbx), %rdi
xorl %esi, %esi
callq *0x8(%rbx)
movq %rax, %r13
testq %rax, %rax
je 0x75228
leaq (%r15,%r14,8), %r9
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %r13, %r8
callq 0x7523c
movq %rbp, %rcx
movl %eax, %ebp
cmpq %rcx, %r13
je 0x7522b
movq (%rbx), %rdi
movq %r13, %rsi
xorl %edx, %edx
callq *0x8(%rbx)
jmp 0x7522b
pushq $-0x1
popq %rbp
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| mp_sqrtrem:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov rbx, rdi
mov rbp, rsp
mov r13, rbp
cmp rcx, 10h
jb short loc_751F9
mov rax, r14
and rax, 0FFFFFFFFFFFFFFFEh
lea rdx, ds:8[rax*4]
mov rdi, [rbx]
xor esi, esi
call qword ptr [rbx+8]
mov r13, rax
test rax, rax
jz short loc_75228
loc_751F9:
lea r9, [r15+r14*8]
mov rdi, rbx
mov rsi, r12
mov rdx, r15
mov rcx, r14
mov r8, r13
call mp_sqrtrem_rec
mov rcx, rbp
mov ebp, eax
cmp r13, rcx
jz short loc_7522B
mov rdi, [rbx]
mov rsi, r13
xor edx, edx
call qword ptr [rbx+8]
jmp short loc_7522B
loc_75228:
push 0FFFFFFFFFFFFFFFFh
pop rbp
loc_7522B:
mov eax, ebp
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mp_sqrtrem(_QWORD *a1, long long a2, long long a3, unsigned long long a4)
{
_QWORD *v6; // r13
unsigned int v7; // ebp
_QWORD savedregs[15]; // [rsp+0h] [rbp+0h] BYREF
v6 = savedregs;
if ( a4 < 0x10
|| (v6 = (_QWORD *)((long long ( *)(_QWORD, _QWORD, unsigned long long))a1[1])(
*a1,
0LL,
4 * (a4 & 0xFFFFFFFFFFFFFFFELL) + 8)) != 0LL )
{
v7 = mp_sqrtrem_rec(a1, a2, a3, a4, v6, a3 + 8 * a4);
if ( v6 != savedregs )
((void ( *)(_QWORD, _QWORD *, _QWORD))a1[1])(*a1, v6, 0LL);
}
else
{
return (unsigned int)-1;
}
return v7;
}
| mp_sqrtrem:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
MOV RBP,RSP
MOV R13,RBP
CMP RCX,0x10
JC 0x001751f9
MOV RAX,R14
AND RAX,-0x2
LEA RDX,[0x8 + RAX*0x4]
MOV RDI,qword ptr [RBX]
XOR ESI,ESI
CALL qword ptr [RBX + 0x8]
MOV R13,RAX
TEST RAX,RAX
JZ 0x00175228
LAB_001751f9:
LEA R9,[R15 + R14*0x8]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
MOV RCX,R14
MOV R8,R13
CALL 0x0017523c
MOV RCX,RBP
MOV EBP,EAX
CMP R13,RCX
JZ 0x0017522b
MOV RDI,qword ptr [RBX]
MOV RSI,R13
XOR EDX,EDX
CALL qword ptr [RBX + 0x8]
JMP 0x0017522b
LAB_00175228:
PUSH -0x1
POP RBP
LAB_0017522b:
MOV EAX,EBP
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4 mp_sqrtrem(int8 *param_1,int8 param_2,long param_3,ulong param_4)
{
int4 uVar1;
int1 *puVar2;
int1 auStack_78 [72];
puVar2 = auStack_78;
if ((0xf < param_4) &&
(puVar2 = (int1 *)
(*(code *)param_1[1])(*param_1,0,(param_4 & 0xfffffffffffffffe) * 4 + 8),
puVar2 == (int1 *)0x0)) {
return 0xffffffff;
}
uVar1 = mp_sqrtrem_rec(param_1,param_2,param_3,param_4,puVar2,param_3 + param_4 * 8);
if (puVar2 != auStack_78) {
(*(code *)param_1[1])(*param_1,puVar2,0);
}
return uVar1;
}
| |
55,164 | my_strnxfrm_czech | eloqsql/strings/ctype-czech.c | static size_t
my_strnxfrm_czech(CHARSET_INFO *cs __attribute__((unused)),
uchar *dest, size_t len,
uint nweights_arg __attribute__((unused)),
const uchar *src, size_t srclen, uint flags)
{
int value;
const uchar *p, * store;
int pass = 0;
size_t totlen = 0;
p = src; store = src;
if (!(flags & 0x0F)) /* All levels by default */
flags|= 0x0F;
do
{
int add= (1 << pass) & flags; /* If this level is needed */
NEXT_CMP_VALUE(src, p, store, pass, value, (int)srclen);
if (add)
ADD_TO_RESULT(dest, len, totlen, value);
}
while (value);
if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len > totlen)
{
memset(dest + totlen, ' ', len - totlen);
totlen= len;
}
return totlen;
} | O0 | c | my_strnxfrm_czech:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl $0x0, -0x4c(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movl 0x10(%rbp), %eax
andl $0xf, %eax
cmpl $0x0, %eax
jne 0x38d98
movl 0x10(%rbp), %eax
orl $0xf, %eax
movl %eax, 0x10(%rbp)
jmp 0x38d9a
movl -0x4c(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
andl 0x10(%rbp), %eax
movl %eax, -0x5c(%rbp)
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq -0x30(%rbp), %rcx
movslq %ecx, %rcx
cmpq %rcx, %rax
jl 0x38e0d
movl $0x0, -0x34(%rbp)
cmpl $0x3, -0x4c(%rbp)
je 0x38e08
movl -0x4c(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x4c(%rbp)
cmpl $0x0, %eax
jne 0x38deb
movq -0x48(%rbp), %rax
movq %rax, -0x98(%rbp)
jmp 0x38df6
movq -0x28(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x1, -0x34(%rbp)
jmp 0x39067
movslq -0x4c(%rbp), %rcx
leaq 0x18c8c8(%rip), %rax # 0x1c56e0
movq (%rax,%rcx,8), %rax
movq -0x40(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl (%rax,%rcx), %eax
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jne 0x38e41
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x38daa
cmpl $0x2, -0x34(%rbp)
jne 0x38f4d
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rcx
movq -0x28(%rbp), %rax
subq %rax, %rcx
movq -0x30(%rbp), %rax
movslq %eax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x99(%rbp)
jge 0x38ea0
movslq -0x4c(%rbp), %rcx
leaq 0x18c85b(%rip), %rax # 0x1c56e0
movq (%rax,%rcx,8), %rax
movq -0x70(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0x2, %eax
sete %al
movb %al, -0x99(%rbp)
movb -0x99(%rbp), %al
testb $0x1, %al
jne 0x38eac
jmp 0x38eba
movq -0x70(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x70(%rbp)
jmp 0x38e5b
movq -0x70(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq -0x30(%rbp), %rcx
movslq %ecx, %rcx
cmpq %rcx, %rax
jl 0x38ed9
movq -0x70(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpl $0x2, -0x4c(%rbp)
jg 0x38efe
movq -0x70(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq -0x30(%rbp), %rcx
movslq %ecx, %rcx
cmpq %rcx, %rax
jge 0x38efe
movq -0x70(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq -0x30(%rbp), %rcx
movslq %ecx, %rcx
cmpq %rcx, %rax
jl 0x38f1a
jmp 0x38daa
cmpl $0x1, -0x4c(%rbp)
jle 0x38f25
jmp 0x39067
movq -0x40(%rbp), %rax
movq %rax, -0x68(%rbp)
movl $0x1, %eax
subl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x39067
cmpl $0xff, -0x34(%rbp)
jne 0x3905b
movl $0x0, -0x74(%rbp)
cmpl $0x50, -0x74(%rbp)
jge 0x39059
movslq -0x74(%rbp), %rcx
leaq 0x18c78a(%rip), %rax # 0x1c5700
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x88(%rbp)
movl $0x0, -0x8c(%rbp)
movq -0x80(%rbp), %rax
movslq -0x8c(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x39006
movq -0x88(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq -0x30(%rbp), %rcx
movslq %ecx, %rcx
cmpq %rcx, %rax
jge 0x38fe1
movq -0x88(%rbp), %rax
movsbl (%rax), %eax
movq -0x80(%rbp), %rcx
movslq -0x8c(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x38fe3
jmp 0x39006
movl -0x8c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8c(%rbp)
movq -0x88(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x88(%rbp)
jmp 0x38f99
movq -0x80(%rbp), %rax
movslq -0x8c(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
jne 0x39049
movslq -0x74(%rbp), %rcx
leaq 0x18c6de(%rip), %rax # 0x1c5700
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movslq -0x4c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x34(%rbp)
movq -0x88(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x39059
jmp 0x3904b
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x38f61
jmp 0x3905b
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
cmpl $0x0, -0x5c(%rbp)
je 0x39094
movq -0x58(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x39092
movl -0x34(%rbp), %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq -0x58(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x58(%rbp)
movb %dl, (%rax,%rcx)
jmp 0x39094
jmp 0x39096
cmpl $0x0, -0x34(%rbp)
jne 0x38d9a
movl 0x10(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x390d9
movq -0x18(%rbp), %rax
cmpq -0x58(%rbp), %rax
jbe 0x390d9
movq -0x10(%rbp), %rdi
addq -0x58(%rbp), %rdi
movq -0x18(%rbp), %rdx
subq -0x58(%rbp), %rdx
movl $0x20, %esi
callq 0x24190
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_strnxfrm_czech:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov eax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov [rbp+var_4C], 0
mov [rbp+var_58], 0
mov rax, [rbp+var_28]
mov [rbp+var_40], rax
mov rax, [rbp+var_28]
mov [rbp+var_48], rax
mov eax, [rbp+arg_0]
and eax, 0Fh
cmp eax, 0
jnz short loc_38D98
mov eax, [rbp+arg_0]
or eax, 0Fh
mov [rbp+arg_0], eax
loc_38D98:
jmp short $+2
loc_38D9A:
mov ecx, [rbp+var_4C]
mov eax, 1
shl eax, cl
and eax, [rbp+arg_0]
mov [rbp+var_5C], eax
loc_38DAA:
mov rax, [rbp+var_40]
mov rcx, [rbp+var_28]
sub rax, rcx
mov rcx, [rbp+var_30]
movsxd rcx, ecx
cmp rax, rcx
jl short loc_38E0D
mov [rbp+var_34], 0
cmp [rbp+var_4C], 3
jz short loc_38E08
mov eax, [rbp+var_4C]
mov ecx, eax
add ecx, 1
mov [rbp+var_4C], ecx
cmp eax, 0
jnz short loc_38DEB
mov rax, [rbp+var_48]
mov [rbp+var_98], rax
jmp short loc_38DF6
loc_38DEB:
mov rax, [rbp+var_28]
mov [rbp+var_98], rax
loc_38DF6:
mov rax, [rbp+var_98]
mov [rbp+var_40], rax
mov [rbp+var_34], 1
loc_38E08:
jmp loc_39067
loc_38E0D:
movsxd rcx, [rbp+var_4C]
lea rax, CZ_SORT_TABLE
mov rax, [rax+rcx*8]
mov rcx, [rbp+var_40]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_34], eax
cmp [rbp+var_34], 0
jnz short loc_38E41
mov rax, [rbp+var_40]
add rax, 1
mov [rbp+var_40], rax
jmp loc_38DAA
loc_38E41:
cmp [rbp+var_34], 2
jnz loc_38F4D
mov rax, [rbp+var_40]
add rax, 1
mov [rbp+var_40], rax
mov [rbp+var_70], rax
loc_38E5B:
mov rcx, [rbp+var_70]
mov rax, [rbp+var_28]
sub rcx, rax
mov rax, [rbp+var_30]
movsxd rdx, eax
xor eax, eax
cmp rcx, rdx
mov [rbp+var_99], al
jge short loc_38EA0
movsxd rcx, [rbp+var_4C]
lea rax, CZ_SORT_TABLE
mov rax, [rax+rcx*8]
mov rcx, [rbp+var_70]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx]
cmp eax, 2
setz al
mov [rbp+var_99], al
loc_38EA0:
mov al, [rbp+var_99]
test al, 1
jnz short loc_38EAC
jmp short loc_38EBA
loc_38EAC:
mov rax, [rbp+var_70]
add rax, 1
mov [rbp+var_70], rax
jmp short loc_38E5B
loc_38EBA:
mov rax, [rbp+var_70]
mov rcx, [rbp+var_28]
sub rax, rcx
mov rcx, [rbp+var_30]
movsxd rcx, ecx
cmp rax, rcx
jl short loc_38ED9
mov rax, [rbp+var_70]
mov [rbp+var_40], rax
loc_38ED9:
cmp [rbp+var_4C], 2
jg short loc_38EFE
mov rax, [rbp+var_70]
mov rcx, [rbp+var_28]
sub rax, rcx
mov rcx, [rbp+var_30]
movsxd rcx, ecx
cmp rax, rcx
jge short loc_38EFE
mov rax, [rbp+var_70]
mov [rbp+var_40], rax
loc_38EFE:
mov rax, [rbp+var_40]
mov rcx, [rbp+var_28]
sub rax, rcx
mov rcx, [rbp+var_30]
movsxd rcx, ecx
cmp rax, rcx
jl short loc_38F1A
jmp loc_38DAA
loc_38F1A:
cmp [rbp+var_4C], 1
jle short loc_38F25
jmp loc_39067
loc_38F25:
mov rax, [rbp+var_40]
mov [rbp+var_68], rax
mov eax, 1
sub eax, [rbp+var_4C]
mov [rbp+var_4C], eax
mov rax, [rbp+var_48]
mov [rbp+var_40], rax
mov rax, [rbp+var_68]
mov [rbp+var_48], rax
jmp loc_39067
loc_38F4D:
cmp [rbp+var_34], 0FFh
jnz loc_3905B
mov [rbp+var_74], 0
loc_38F61:
cmp [rbp+var_74], 50h ; 'P'
jge loc_39059
movsxd rcx, [rbp+var_74]
lea rax, doubles
shl rcx, 4
add rax, rcx
mov rax, [rax]
mov [rbp+var_80], rax
mov rax, [rbp+var_40]
mov [rbp+var_88], rax
mov [rbp+var_8C], 0
loc_38F99:
mov rax, [rbp+var_80]
movsxd rcx, [rbp+var_8C]
cmp byte ptr [rax+rcx], 0
jz short loc_39006
mov rax, [rbp+var_88]
mov rcx, [rbp+var_28]
sub rax, rcx
mov rcx, [rbp+var_30]
movsxd rcx, ecx
cmp rax, rcx
jge short loc_38FE1
mov rax, [rbp+var_88]
movsx eax, byte ptr [rax]
mov rcx, [rbp+var_80]
movsxd rdx, [rbp+var_8C]
movsx ecx, byte ptr [rcx+rdx]
cmp eax, ecx
jz short loc_38FE3
loc_38FE1:
jmp short loc_39006
loc_38FE3:
mov eax, [rbp+var_8C]
add eax, 1
mov [rbp+var_8C], eax
mov rax, [rbp+var_88]
add rax, 1
mov [rbp+var_88], rax
jmp short loc_38F99
loc_39006:
mov rax, [rbp+var_80]
movsxd rcx, [rbp+var_8C]
cmp byte ptr [rax+rcx], 0
jnz short loc_39049
movsxd rcx, [rbp+var_74]
lea rax, doubles
shl rcx, 4
add rax, rcx
mov rax, [rax+8]
movsxd rcx, [rbp+var_4C]
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_34], eax
mov rax, [rbp+var_88]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_40], rax
jmp short loc_39059
loc_39049:
jmp short $+2
loc_3904B:
mov eax, [rbp+var_74]
add eax, 1
mov [rbp+var_74], eax
jmp loc_38F61
loc_39059:
jmp short $+2
loc_3905B:
mov rax, [rbp+var_40]
add rax, 1
mov [rbp+var_40], rax
loc_39067:
cmp [rbp+var_5C], 0
jz short loc_39094
mov rax, [rbp+var_58]
cmp rax, [rbp+var_18]
jnb short loc_39092
mov eax, [rbp+var_34]
mov dl, al
mov rax, [rbp+var_10]
mov rcx, [rbp+var_58]
mov rsi, rcx
add rsi, 1
mov [rbp+var_58], rsi
mov [rax+rcx], dl
loc_39092:
jmp short $+2
loc_39094:
jmp short $+2
loc_39096:
cmp [rbp+var_34], 0
jnz loc_38D9A
mov eax, [rbp+arg_0]
and eax, 80h
cmp eax, 0
jz short loc_390D9
mov rax, [rbp+var_18]
cmp rax, [rbp+var_58]
jbe short loc_390D9
mov rdi, [rbp+var_10]
add rdi, [rbp+var_58]
mov rdx, [rbp+var_18]
sub rdx, [rbp+var_58]
mov esi, 20h ; ' '
call _memset
mov rax, [rbp+var_18]
mov [rbp+var_58], rax
loc_390D9:
mov rax, [rbp+var_58]
add rsp, 0A0h
pop rbp
retn
| unsigned long long my_strnxfrm_czech(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
char *a5,
int a6,
int a7)
{
long long v8; // rcx
long long v9; // rcx
bool v11; // [rsp+7h] [rbp-99h]
char *v12; // [rsp+8h] [rbp-98h]
int k; // [rsp+14h] [rbp-8Ch]
char *v14; // [rsp+18h] [rbp-88h]
long long v15; // [rsp+20h] [rbp-80h]
int j; // [rsp+2Ch] [rbp-74h]
unsigned __int8 *i; // [rsp+30h] [rbp-70h]
char *v18; // [rsp+38h] [rbp-68h]
int v19; // [rsp+44h] [rbp-5Ch]
unsigned long long v20; // [rsp+48h] [rbp-58h]
int v21; // [rsp+54h] [rbp-4Ch]
char *v22; // [rsp+58h] [rbp-48h]
char *v23; // [rsp+60h] [rbp-40h]
int v24; // [rsp+6Ch] [rbp-34h]
v21 = 0;
v20 = 0LL;
v23 = a5;
v22 = a5;
if ( (a7 & 0xF) == 0 )
a7 |= 0xFu;
do
{
v19 = a7 & (1 << v21);
while ( 1 )
{
while ( 1 )
{
if ( v23 - a5 >= a6 )
{
v24 = 0;
if ( v21 != 3 )
{
if ( v21++ )
v12 = a5;
else
v12 = v22;
v23 = v12;
v24 = 1;
}
goto LABEL_40;
}
v8 = (unsigned __int8)*v23;
v24 = *((unsigned __int8 *)*(&CZ_SORT_TABLE + v21) + v8);
if ( *((_BYTE *)*(&CZ_SORT_TABLE + v21) + v8) )
break;
++v23;
}
if ( v24 != 2 )
break;
for ( i = (unsigned __int8 *)++v23; ; ++i )
{
v11 = 0;
if ( i - (unsigned __int8 *)a5 < a6 )
v11 = *((_BYTE *)*(&CZ_SORT_TABLE + v21) + *i) == 2;
if ( !v11 )
break;
}
if ( i - (unsigned __int8 *)a5 >= a6 )
v23 = (char *)i;
if ( v21 <= 2 && i - (unsigned __int8 *)a5 < a6 )
v23 = (char *)i;
if ( v23 - a5 < a6 )
{
if ( v21 <= 1 )
{
v18 = v23;
v21 = 1 - v21;
v23 = v22;
v22 = v18;
}
goto LABEL_40;
}
}
if ( v24 == 255 )
{
for ( j = 0; j < 80; ++j )
{
v15 = (long long)*(&doubles + 2 * j);
v14 = v23;
for ( k = 0; *(_BYTE *)(v15 + k) && v14 - a5 < a6 && *v14 == *(char *)(v15 + k); ++k )
++v14;
if ( !*(_BYTE *)(v15 + k) )
{
v24 = *((unsigned __int8 *)*(&doubles + 2 * j + 1) + v21);
v23 = v14 - 1;
break;
}
}
}
++v23;
LABEL_40:
if ( v19 && v20 < a3 )
{
v9 = v20++;
*(_BYTE *)(a2 + v9) = v24;
}
}
while ( v24 );
if ( (a7 & 0x80) != 0 && a3 > v20 )
{
memset(v20 + a2, 32LL, a3 - v20);
return a3;
}
return v20;
}
| my_strnxfrm_czech:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV dword ptr [RBP + -0x4c],0x0
MOV qword ptr [RBP + -0x58],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x48],RAX
MOV EAX,dword ptr [RBP + 0x10]
AND EAX,0xf
CMP EAX,0x0
JNZ 0x00138d98
MOV EAX,dword ptr [RBP + 0x10]
OR EAX,0xf
MOV dword ptr [RBP + 0x10],EAX
LAB_00138d98:
JMP 0x00138d9a
LAB_00138d9a:
MOV ECX,dword ptr [RBP + -0x4c]
MOV EAX,0x1
SHL EAX,CL
AND EAX,dword ptr [RBP + 0x10]
MOV dword ptr [RBP + -0x5c],EAX
LAB_00138daa:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV RCX,qword ptr [RBP + -0x30]
MOVSXD RCX,ECX
CMP RAX,RCX
JL 0x00138e0d
MOV dword ptr [RBP + -0x34],0x0
CMP dword ptr [RBP + -0x4c],0x3
JZ 0x00138e08
MOV EAX,dword ptr [RBP + -0x4c]
MOV ECX,EAX
ADD ECX,0x1
MOV dword ptr [RBP + -0x4c],ECX
CMP EAX,0x0
JNZ 0x00138deb
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x98],RAX
JMP 0x00138df6
LAB_00138deb:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x98],RAX
LAB_00138df6:
MOV RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0x40],RAX
MOV dword ptr [RBP + -0x34],0x1
LAB_00138e08:
JMP 0x00139067
LAB_00138e0d:
MOVSXD RCX,dword ptr [RBP + -0x4c]
LEA RAX,[0x2c56e0]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV RCX,qword ptr [RBP + -0x40]
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RBP + -0x34],EAX
CMP dword ptr [RBP + -0x34],0x0
JNZ 0x00138e41
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
JMP 0x00138daa
LAB_00138e41:
CMP dword ptr [RBP + -0x34],0x2
JNZ 0x00138f4d
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
MOV qword ptr [RBP + -0x70],RAX
LAB_00138e5b:
MOV RCX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x28]
SUB RCX,RAX
MOV RAX,qword ptr [RBP + -0x30]
MOVSXD RDX,EAX
XOR EAX,EAX
CMP RCX,RDX
MOV byte ptr [RBP + -0x99],AL
JGE 0x00138ea0
MOVSXD RCX,dword ptr [RBP + -0x4c]
LEA RAX,[0x2c56e0]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV RCX,qword ptr [RBP + -0x70]
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x2
SETZ AL
MOV byte ptr [RBP + -0x99],AL
LAB_00138ea0:
MOV AL,byte ptr [RBP + -0x99]
TEST AL,0x1
JNZ 0x00138eac
JMP 0x00138eba
LAB_00138eac:
MOV RAX,qword ptr [RBP + -0x70]
ADD RAX,0x1
MOV qword ptr [RBP + -0x70],RAX
JMP 0x00138e5b
LAB_00138eba:
MOV RAX,qword ptr [RBP + -0x70]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV RCX,qword ptr [RBP + -0x30]
MOVSXD RCX,ECX
CMP RAX,RCX
JL 0x00138ed9
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x40],RAX
LAB_00138ed9:
CMP dword ptr [RBP + -0x4c],0x2
JG 0x00138efe
MOV RAX,qword ptr [RBP + -0x70]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV RCX,qword ptr [RBP + -0x30]
MOVSXD RCX,ECX
CMP RAX,RCX
JGE 0x00138efe
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x40],RAX
LAB_00138efe:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV RCX,qword ptr [RBP + -0x30]
MOVSXD RCX,ECX
CMP RAX,RCX
JL 0x00138f1a
JMP 0x00138daa
LAB_00138f1a:
CMP dword ptr [RBP + -0x4c],0x1
JLE 0x00138f25
JMP 0x00139067
LAB_00138f25:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x68],RAX
MOV EAX,0x1
SUB EAX,dword ptr [RBP + -0x4c]
MOV dword ptr [RBP + -0x4c],EAX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x00139067
LAB_00138f4d:
CMP dword ptr [RBP + -0x34],0xff
JNZ 0x0013905b
MOV dword ptr [RBP + -0x74],0x0
LAB_00138f61:
CMP dword ptr [RBP + -0x74],0x50
JGE 0x00139059
MOVSXD RCX,dword ptr [RBP + -0x74]
LEA RAX,[0x2c5700]
SHL RCX,0x4
ADD RAX,RCX
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x88],RAX
MOV dword ptr [RBP + -0x8c],0x0
LAB_00138f99:
MOV RAX,qword ptr [RBP + -0x80]
MOVSXD RCX,dword ptr [RBP + -0x8c]
CMP byte ptr [RAX + RCX*0x1],0x0
JZ 0x00139006
MOV RAX,qword ptr [RBP + -0x88]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV RCX,qword ptr [RBP + -0x30]
MOVSXD RCX,ECX
CMP RAX,RCX
JGE 0x00138fe1
MOV RAX,qword ptr [RBP + -0x88]
MOVSX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x80]
MOVSXD RDX,dword ptr [RBP + -0x8c]
MOVSX ECX,byte ptr [RCX + RDX*0x1]
CMP EAX,ECX
JZ 0x00138fe3
LAB_00138fe1:
JMP 0x00139006
LAB_00138fe3:
MOV EAX,dword ptr [RBP + -0x8c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x8c],EAX
MOV RAX,qword ptr [RBP + -0x88]
ADD RAX,0x1
MOV qword ptr [RBP + -0x88],RAX
JMP 0x00138f99
LAB_00139006:
MOV RAX,qword ptr [RBP + -0x80]
MOVSXD RCX,dword ptr [RBP + -0x8c]
CMP byte ptr [RAX + RCX*0x1],0x0
JNZ 0x00139049
MOVSXD RCX,dword ptr [RBP + -0x74]
LEA RAX,[0x2c5700]
SHL RCX,0x4
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0x8]
MOVSXD RCX,dword ptr [RBP + -0x4c]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x88]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x40],RAX
JMP 0x00139059
LAB_00139049:
JMP 0x0013904b
LAB_0013904b:
MOV EAX,dword ptr [RBP + -0x74]
ADD EAX,0x1
MOV dword ptr [RBP + -0x74],EAX
JMP 0x00138f61
LAB_00139059:
JMP 0x0013905b
LAB_0013905b:
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
LAB_00139067:
CMP dword ptr [RBP + -0x5c],0x0
JZ 0x00139094
MOV RAX,qword ptr [RBP + -0x58]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x00139092
MOV EAX,dword ptr [RBP + -0x34]
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x58]
MOV RSI,RCX
ADD RSI,0x1
MOV qword ptr [RBP + -0x58],RSI
MOV byte ptr [RAX + RCX*0x1],DL
LAB_00139092:
JMP 0x00139094
LAB_00139094:
JMP 0x00139096
LAB_00139096:
CMP dword ptr [RBP + -0x34],0x0
JNZ 0x00138d9a
MOV EAX,dword ptr [RBP + 0x10]
AND EAX,0x80
CMP EAX,0x0
JZ 0x001390d9
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x58]
JBE 0x001390d9
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,qword ptr [RBP + -0x58]
MOV RDX,qword ptr [RBP + -0x18]
SUB RDX,qword ptr [RBP + -0x58]
MOV ESI,0x20
CALL 0x00124190
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x58],RAX
LAB_001390d9:
MOV RAX,qword ptr [RBP + -0x58]
ADD RSP,0xa0
POP RBP
RET
|
ulong my_strnxfrm_czech(int8 param_1,long param_2,ulong param_3,int8 param_4,
byte *param_5,int param_6,uint param_7)
{
char cVar1;
long lVar2;
byte *pbVar3;
byte bVar4;
bool bVar5;
byte *local_a0;
int local_94;
byte *local_90;
int local_7c;
byte *local_78;
ulong local_60;
int local_54;
byte *local_50;
byte *local_48;
local_54 = 0;
local_60 = 0;
local_50 = param_5;
local_48 = param_5;
if ((param_7 & 0xf) == 0) {
param_7 = param_7 | 0xf;
}
LAB_00138d9a:
bVar4 = (byte)local_54;
do {
while( true ) {
if ((long)param_6 <= (long)local_48 - (long)param_5) {
cVar1 = '\0';
if (local_54 != 3) {
local_a0 = param_5;
if (local_54 == 0) {
local_a0 = local_50;
}
local_48 = local_a0;
cVar1 = '\x01';
local_54 = local_54 + 1;
}
goto LAB_00139067;
}
cVar1 = (&CZ_SORT_TABLE)[local_54][*local_48];
if (cVar1 != '\0') break;
local_48 = local_48 + 1;
}
if (cVar1 != '\x02') {
if (cVar1 != -1) goto LAB_0013905b;
local_7c = 0;
goto LAB_00138f61;
}
local_48 = local_48 + 1;
local_78 = local_48;
while( true ) {
bVar5 = false;
if ((long)local_78 - (long)param_5 < (long)param_6) {
bVar5 = (&CZ_SORT_TABLE)[local_54][*local_78] == '\x02';
}
if (!bVar5) break;
local_78 = local_78 + 1;
}
if ((long)param_6 <= (long)local_78 - (long)param_5) {
local_48 = local_78;
}
if ((local_54 < 3) && ((long)local_78 - (long)param_5 < (long)param_6)) {
local_48 = local_78;
}
pbVar3 = local_48;
} while ((long)param_6 <= (long)local_48 - (long)param_5);
if (local_54 < 2) {
local_48 = local_50;
local_50 = pbVar3;
local_54 = 1 - local_54;
}
goto LAB_00139067;
LAB_00138f61:
if (0x4f < local_7c) goto LAB_0013905b;
lVar2 = *(long *)(doubles + (long)local_7c * 0x10);
local_94 = 0;
for (local_90 = local_48;
((*(char *)(lVar2 + local_94) != '\0' && ((long)local_90 - (long)param_5 < (long)param_6)) &&
(*local_90 == *(byte *)(lVar2 + local_94))); local_90 = local_90 + 1) {
local_94 = local_94 + 1;
}
if (*(char *)(lVar2 + local_94) == '\0') {
cVar1 = *(char *)(*(long *)(doubles + (long)local_7c * 0x10 + 8) + (long)local_54);
local_48 = local_90 + -1;
goto LAB_0013905b;
}
local_7c = local_7c + 1;
goto LAB_00138f61;
LAB_0013905b:
local_48 = local_48 + 1;
LAB_00139067:
if (((1 << (bVar4 & 0x1f) & param_7) != 0) && (local_60 < param_3)) {
*(char *)(param_2 + local_60) = cVar1;
local_60 = local_60 + 1;
}
if (cVar1 == '\0') {
if (((param_7 & 0x80) != 0) && (local_60 < param_3)) {
memset((void *)(param_2 + local_60),0x20,param_3 - local_60);
local_60 = param_3;
}
return local_60;
}
goto LAB_00138d9a;
}
| |
55,165 | nglog::LogMessageTime::LogMessageTime(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>>) | ng-log[P]ng-log/src/logging.cc | LogMessageTime::LogMessageTime(std::chrono::system_clock::time_point now)
: timestamp_{now} {
std::time_t timestamp;
std::tie(tm_, timestamp, gmtoffset_) = Breakdown(now);
usecs_ = std::chrono::duration_cast<std::chrono::microseconds>(
now - std::chrono::system_clock::from_time_t(timestamp));
} | O3 | cpp | nglog::LogMessageTime::LogMessageTime(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>>):
pushq %r14
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movl $0x0, 0x20(%rdi)
movups %xmm0, 0x28(%rdi)
movq %rsi, 0x38(%rdi)
movabsq $0x112e0be826d694b3, %rcx # imm = 0x112E0BE826D694B3
movq %rsi, %rax
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x1a, %rdx
addq %rax, %rdx
movq %rdx, (%rsp)
leaq 0x216e2(%rip), %rax # 0x2fc29
cmpb $0x1, (%rax)
jne 0xe55b
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x79f0
jmp 0xe568
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x7260
movq 0x30(%rsp), %rax
movups 0x8(%rsp), %xmm0
movups 0x18(%rsp), %xmm1
movups 0x28(%rsp), %xmm2
movaps %xmm0, 0x40(%rsp)
movaps %xmm1, 0x50(%rsp)
movaps %xmm2, 0x60(%rsp)
movq 0x38(%rsp), %rdx
movq %rdx, 0x70(%rsp)
imulq $-0x3b9aca00, (%rsp), %rcx # imm = 0xC4653600
movq %rdx, 0x30(%rbx)
movups %xmm2, 0x20(%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
movabsq $0x48d159e26af37c05, %rdx # imm = 0x48D159E26AF37C05
imulq %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0xa, %rdx
addq %rax, %rdx
imulq $0xe10, %rdx, %rax # imm = 0xE10
movq %rax, 0x48(%rbx)
addq %r14, %rcx
movabsq $0x20c49ba5e353f7cf, %rdx # imm = 0x20C49BA5E353F7CF
movq %rcx, %rax
imulq %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
addq %rax, %rdx
movq %rdx, 0x40(%rbx)
addq $0x78, %rsp
popq %rbx
popq %r14
retq
nop
| _ZN5nglog14LogMessageTimeC2ENSt6chrono10time_pointINS1_3_V212system_clockENS1_8durationIlSt5ratioILl1ELl1000000000EEEEEE:
push r14; Alternative name is 'nglog::LogMessageTime::LogMessageTime(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>>)'
push rbx
sub rsp, 78h
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi+10h], xmm0
movups xmmword ptr [rdi], xmm0
mov dword ptr [rdi+20h], 0
movups xmmword ptr [rdi+28h], xmm0
mov [rdi+38h], rsi
mov rcx, 112E0BE826D694B3h
mov rax, rsi
imul rcx
mov rax, rdx
shr rax, 3Fh
sar rdx, 1Ah
add rdx, rax
mov [rsp+88h+var_88], rdx
lea rax, _ZN3fLB18FLAGS_log_utc_timeE; fLB::FLAGS_log_utc_time
cmp byte ptr [rax], 1
jnz short loc_E55B
mov rdi, rsp
lea rsi, [rsp+88h+var_80]
call _gmtime_r
jmp short loc_E568
loc_E55B:
mov rdi, rsp
lea rsi, [rsp+88h+var_80]
call _localtime_r
loc_E568:
mov rax, [rsp+88h+var_58]
movups xmm0, [rsp+88h+var_80]
movups xmm1, [rsp+88h+var_70]
movups xmm2, xmmword ptr [rsp+28h]
movaps [rsp+88h+var_48], xmm0
movaps [rsp+88h+var_38], xmm1
movaps [rsp+88h+var_28], xmm2
mov rdx, [rsp+88h+var_50]
mov [rsp+88h+var_18], rdx
imul rcx, [rsp+88h+var_88], 0FFFFFFFFC4653600h
mov [rbx+30h], rdx
movups xmmword ptr [rbx+20h], xmm2
movups xmmword ptr [rbx+10h], xmm1
movups xmmword ptr [rbx], xmm0
mov rdx, 48D159E26AF37C05h
imul rdx
mov rax, rdx
shr rax, 3Fh
sar rdx, 0Ah
add rdx, rax
imul rax, rdx, 0E10h
mov [rbx+48h], rax
add rcx, r14
mov rdx, 20C49BA5E353F7CFh
mov rax, rcx
imul rdx
mov rax, rdx
shr rax, 3Fh
sar rdx, 7
add rdx, rax
mov [rbx+40h], rdx
add rsp, 78h
pop rbx
pop r14
retn
| unsigned long long nglog::LogMessageTime::LogMessageTime(long long a1, long long a2)
{
long long v2; // rax
__int128 v3; // xmm0
__int128 v4; // xmm1
__int128 v5; // xmm2
long long v6; // rcx
long long v7; // rcx
unsigned long long result; // rax
long long v9; // [rsp+0h] [rbp-88h] BYREF
_OWORD v10[2]; // [rsp+8h] [rbp-80h] BYREF
__int128 v11; // [rsp+28h] [rbp-60h]
long long v12; // [rsp+38h] [rbp-50h]
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
*(_DWORD *)(a1 + 32) = 0;
*(_OWORD *)(a1 + 40) = 0LL;
*(_QWORD *)(a1 + 56) = a2;
v9 = a2 / 1000000000;
if ( fLB::FLAGS_log_utc_time == 1 )
gmtime_r(&v9, v10);
else
localtime_r(&v9, v10);
v2 = *((_QWORD *)&v11 + 1);
v3 = v10[0];
v4 = v10[1];
v5 = v11;
v6 = -1000000000 * v9;
*(_QWORD *)(a1 + 48) = v12;
*(_OWORD *)(a1 + 32) = v5;
*(_OWORD *)(a1 + 16) = v4;
*(_OWORD *)a1 = v3;
*(_QWORD *)(a1 + 72) = 3600 * (v2 / 3600);
v7 = a2 + v6;
result = (unsigned long long)((unsigned __int128)(0x20C49BA5E353F7CFLL * (__int128)v7) >> 64) >> 63;
*(_QWORD *)(a1 + 64) = v7 / 1000;
return result;
}
| LogMessageTime:
PUSH R14
PUSH RBX
SUB RSP,0x78
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV dword ptr [RDI + 0x20],0x0
MOVUPS xmmword ptr [RDI + 0x28],XMM0
MOV qword ptr [RDI + 0x38],RSI
MOV RCX,0x112e0be826d694b3
MOV RAX,RSI
IMUL RCX
MOV RAX,RDX
SHR RAX,0x3f
SAR RDX,0x1a
ADD RDX,RAX
MOV qword ptr [RSP],RDX
LEA RAX,[0x12fc29]
CMP byte ptr [RAX],0x1
JNZ 0x0010e55b
MOV RDI,RSP
LEA RSI,[RSP + 0x8]
CALL 0x001079f0
JMP 0x0010e568
LAB_0010e55b:
MOV RDI,RSP
LEA RSI,[RSP + 0x8]
CALL 0x00107260
LAB_0010e568:
MOV RAX,qword ptr [RSP + 0x30]
MOVUPS XMM0,xmmword ptr [RSP + 0x8]
MOVUPS XMM1,xmmword ptr [RSP + 0x18]
MOVUPS XMM2,xmmword ptr [RSP + 0x28]
MOVAPS xmmword ptr [RSP + 0x40],XMM0
MOVAPS xmmword ptr [RSP + 0x50],XMM1
MOVAPS xmmword ptr [RSP + 0x60],XMM2
MOV RDX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x70],RDX
IMUL RCX,qword ptr [RSP],-0x3b9aca00
MOV qword ptr [RBX + 0x30],RDX
MOVUPS xmmword ptr [RBX + 0x20],XMM2
MOVUPS xmmword ptr [RBX + 0x10],XMM1
MOVUPS xmmword ptr [RBX],XMM0
MOV RDX,0x48d159e26af37c05
IMUL RDX
MOV RAX,RDX
SHR RAX,0x3f
SAR RDX,0xa
ADD RDX,RAX
IMUL RAX,RDX,0xe10
MOV qword ptr [RBX + 0x48],RAX
ADD RCX,R14
MOV RDX,0x20c49ba5e353f7cf
MOV RAX,RCX
IMUL RDX
MOV RAX,RDX
SHR RAX,0x3f
SAR RDX,0x7
ADD RDX,RAX
MOV qword ptr [RBX + 0x40],RDX
ADD RSP,0x78
POP RBX
POP R14
RET
|
/* nglog::LogMessageTime::LogMessageTime(std::chrono::time_point<std::chrono::_V2::system_clock,
std::chrono::duration<long, std::ratio<1l, 1000000000l> > >) */
void __thiscall nglog::LogMessageTime::LogMessageTime(LogMessageTime *this,long param_2)
{
long local_88;
tm local_80 [2];
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int4 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(long *)(this + 0x38) = param_2;
local_88 = param_2 / 1000000000;
if (fLB::FLAGS_log_utc_time == '\x01') {
gmtime_r(&local_88,local_80);
}
else {
localtime_r(&local_88,local_80);
}
*(char **)(this + 0x30) = local_80[0].tm_zone;
*(int8 *)(this + 0x20) = local_80[0]._32_8_;
*(long *)(this + 0x28) = local_80[0].tm_gmtoff;
*(int8 *)(this + 0x10) = local_80[0]._16_8_;
*(int8 *)(this + 0x18) = local_80[0]._24_8_;
*(int8 *)this = local_80[0]._0_8_;
*(int8 *)(this + 8) = local_80[0]._8_8_;
*(long *)(this + 0x48) = (local_80[0].tm_gmtoff / 0xe10) * 0xe10;
*(long *)(this + 0x40) = (local_88 * -1000000000 + param_2) / 1000;
return;
}
| |
55,166 | minja::Context::at(minja::Value const&) | monkey531[P]llama/common/minja.hpp | virtual Value & at(const Value & key) {
if (values_.contains(key)) return values_.at(key);
if (parent_) return parent_->at(key);
throw std::runtime_error("Undefined variable: " + key.dump());
} | O1 | cpp | minja::Context::at(minja::Value const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rdi), %r15
movq %r15, %rdi
callq 0x996e8
testb %al, %al
je 0xa2f67
movq %r15, %rdi
movq %r14, %rsi
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x994ea
movq 0x68(%rbx), %rdi
testq %rdi, %rdi
je 0xa2f86
movq (%rdi), %rax
movq 0x18(%rax), %rax
movq %r14, %rsi
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *%rax
movl $0x10, %edi
callq 0x1b450
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x8c5e0
leaq 0x55d9d(%rip), %rsi # 0xf8d4b
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x7e407
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x1be70
xorl %ebp, %ebp
movq 0x91012(%rip), %rsi # 0x133fe8
movq 0x90f7b(%rip), %rdx # 0x133f58
movq %rbx, %rdi
callq 0x1bf60
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa300b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1b910
jmp 0xa300b
movq %rax, %r14
movb $0x1, %bpl
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa302e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b910
jmp 0xa302e
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0xa303b
movq %rbx, %rdi
callq 0x1b690
movq %r14, %rdi
callq 0x1bff0
nop
| _ZN5minja7Context2atERKNS_5ValueE:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
lea r15, [rdi+18h]
mov rdi, r15; this
call _ZNK5minja5Value8containsERKS0_; minja::Value::contains(minja::Value const&)
test al, al
jz short loc_A2F67
mov rdi, r15; this
mov rsi, r14; minja::Value *
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
jmp _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&)
loc_A2F67:
mov rdi, [rbx+68h]
test rdi, rdi
jz short loc_A2F86
mov rax, [rdi]
mov rax, [rax+18h]
mov rsi, r14
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
jmp rax
loc_A2F86:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_60]
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUndefinedVaria; "Undefined variable: "
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_60]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_40]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+68h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A300B
mov rsi, [rsp+68h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A300B
mov r14, rax
mov bpl, 1
loc_A300B:
lea rax, [rsp+68h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A302E
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A302E
mov r14, rax
mov bpl, 1
loc_A302E:
test bpl, bpl
jz short loc_A303B
mov rdi, rbx; void *
call ___cxa_free_exception
loc_A303B:
mov rdi, r14
call __Unwind_Resume
| unsigned long long minja::Context::at(minja::Context *this, const minja::Value *a2, __m128d a3)
{
long long v4; // rdi
void *exception; // rbx
_BYTE v6[16]; // [rsp+8h] [rbp-60h] BYREF
_BYTE v7[16]; // [rsp+28h] [rbp-40h] BYREF
if ( (unsigned __int8)minja::Value::contains((minja::Context *)((char *)this + 24), a2, a3) )
return minja::Value::at((minja::Context *)((char *)this + 24), a2);
v4 = *((_QWORD *)this + 13);
if ( !v4 )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v6, (long long)a2, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v7, (long long)"Undefined variable: ", (long long)v6);
std::runtime_error::runtime_error(exception, v7);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return (*(long long ( **)(long long, const minja::Value *))(*(_QWORD *)v4 + 24LL))(v4, a2);
}
| at:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RDI + 0x18]
MOV RDI,R15
CALL 0x001996e8
TEST AL,AL
JZ 0x001a2f67
MOV RDI,R15
MOV RSI,R14
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
JMP 0x001994ea
LAB_001a2f67:
MOV RDI,qword ptr [RBX + 0x68]
TEST RDI,RDI
JZ 0x001a2f86
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x18]
MOV RSI,R14
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
JMP RAX
LAB_001a2f86:
MOV EDI,0x10
CALL 0x0011b450
MOV RBX,RAX
LAB_001a2f93:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0018c5e0
LAB_001a2fa7:
LEA RSI,[0x1f8d4b]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x0017e407
MOV BPL,0x1
LAB_001a2fc0:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x0011be70
XOR EBP,EBP
MOV RSI,qword ptr [0x00233fe8]
MOV RDX,qword ptr [0x00233f58]
MOV RDI,RBX
CALL 0x0011bf60
|
/* minja::Context::at(minja::Value const&) */
void __thiscall minja::Context::at(Context *this,Value *param_1)
{
long *plVar1;
char cVar2;
runtime_error *this_00;
int1 local_60 [32];
string local_40 [32];
cVar2 = Value::contains((Value *)(this + 0x18),param_1);
if (cVar2 != '\0') {
Value::at((Value *)(this + 0x18),param_1);
return;
}
plVar1 = *(long **)(this + 0x68);
if (plVar1 != (long *)0x0) {
/* WARNING: Could not recover jumptable at 0x001a2f84. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*plVar1 + 0x18))(plVar1,param_1);
return;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001a2f93 to 001a2fa6 has its CatchHandler @ 001a3028 */
Value::dump_abi_cxx11_((int)local_60,SUB81(param_1,0));
/* try { // try from 001a2fa7 to 001a2fbc has its CatchHandler @ 001a3005 */
std::operator+((char *)local_40,(string *)"Undefined variable: ");
/* try { // try from 001a2fc0 to 001a2fe4 has its CatchHandler @ 001a2fe5 */
std::runtime_error::runtime_error(this_00,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00233fe8,PTR__runtime_error_00233f58);
}
| |
55,167 | minja::Context::at(minja::Value const&) | monkey531[P]llama/common/minja.hpp | virtual Value & at(const Value & key) {
if (values_.contains(key)) return values_.at(key);
if (parent_) return parent_->at(key);
throw std::runtime_error("Undefined variable: " + key.dump());
} | O2 | cpp | minja::Context::at(minja::Value const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rdi), %r15
movq %r15, %rdi
callq 0x71ee4
testb %al, %al
je 0x793d5
movq %r15, %rdi
movq %r14, %rsi
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x71d52
movq 0x68(%rbx), %rdi
testq %rdi, %rdi
je 0x793f4
movq (%rdi), %rax
movq 0x18(%rax), %rax
movq %r14, %rsi
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *%rax
pushq $0x10
popq %rdi
callq 0x24470
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
pushq $-0x1
popq %rdx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x67bc2
leaq 0x40933(%rip), %rsi # 0xb9d4b
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x5d362
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x24e80
xorl %ebp, %ebp
movq 0x8abb0(%rip), %rsi # 0x103ff0
movq 0x8ab11(%rip), %rdx # 0x103f58
movq %rbx, %rdi
callq 0x24f50
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x25258
jmp 0x79464
movq %rax, %r14
movb $0x1, %bpl
leaq 0x8(%rsp), %rdi
callq 0x25258
testb %bpl, %bpl
jne 0x79478
jmp 0x79480
movq %rax, %r14
movq %rbx, %rdi
callq 0x246b0
movq %r14, %rdi
callq 0x24fe0
| _ZN5minja7Context2atERKNS_5ValueE:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
lea r15, [rdi+18h]
mov rdi, r15; this
call _ZNK5minja5Value8containsERKS0_; minja::Value::contains(minja::Value const&)
test al, al
jz short loc_793D5
mov rdi, r15; this
mov rsi, r14; minja::Value *
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
jmp _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&)
loc_793D5:
mov rdi, [rbx+68h]
test rdi, rdi
jz short loc_793F4
mov rax, [rdi]
mov rax, [rax+18h]
mov rsi, r14
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
jmp rax
loc_793F4:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_60]
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, r14
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUndefinedVaria; "Undefined variable: "
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_60]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_40]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+68h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_79464
mov r14, rax
mov bpl, 1
loc_79464:
lea rdi, [rsp+68h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_79478
jmp short loc_79480
mov r14, rax
loc_79478:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_79480:
mov rdi, r14
call __Unwind_Resume
| long long minja::Context::at(char ***this, const minja::Value *a2, __m128d a3)
{
char **v4; // rdi
void *exception; // rbx
_BYTE v6[32]; // [rsp+8h] [rbp-60h] BYREF
_BYTE v7[64]; // [rsp+28h] [rbp-40h] BYREF
if ( (unsigned __int8)minja::Value::contains(this + 3, a2, a3) )
return minja::Value::at((minja::Value *)(this + 3), a2);
v4 = this[13];
if ( !v4 )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v6, (long long)a2, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v7, (long long)"Undefined variable: ", (long long)v6);
std::runtime_error::runtime_error(exception, v7);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return (*((long long ( **)(char **, const minja::Value *))*v4 + 3))(v4, a2);
}
| at:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RDI + 0x18]
MOV RDI,R15
CALL 0x00171ee4
TEST AL,AL
JZ 0x001793d5
MOV RDI,R15
MOV RSI,R14
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00171d52
LAB_001793d5:
MOV RDI,qword ptr [RBX + 0x68]
TEST RDI,RDI
JZ 0x001793f4
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x18]
MOV RSI,R14
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
JMP RAX
LAB_001793f4:
PUSH 0x10
POP RDI
CALL 0x00124470
MOV RBX,RAX
LAB_001793ff:
LEA RDI,[RSP + 0x8]
PUSH -0x1
POP RDX
MOV RSI,R14
XOR ECX,ECX
CALL 0x00167bc2
LAB_00179411:
LEA RSI,[0x1b9d4b]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x0015d362
MOV BPL,0x1
LAB_0017942a:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x00124e80
XOR EBP,EBP
MOV RSI,qword ptr [0x00203ff0]
MOV RDX,qword ptr [0x00203f58]
MOV RDI,RBX
CALL 0x00124f50
|
/* minja::Context::at(minja::Value const&) */
void __thiscall minja::Context::at(Context *this,Value *param_1)
{
long *plVar1;
char cVar2;
runtime_error *this_00;
int1 local_60 [32];
string local_40 [32];
cVar2 = Value::contains((Value *)(this + 0x18),param_1);
if (cVar2 != '\0') {
Value::at((Value *)(this + 0x18),param_1);
return;
}
plVar1 = *(long **)(this + 0x68);
if (plVar1 != (long *)0x0) {
/* WARNING: Could not recover jumptable at 0x001793f2. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*plVar1 + 0x18))(plVar1,param_1);
return;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001793ff to 00179410 has its CatchHandler @ 00179475 */
Value::dump_abi_cxx11_((int)local_60,SUB81(param_1,0));
/* try { // try from 00179411 to 00179426 has its CatchHandler @ 0017945e */
std::operator+((char *)local_40,(string *)"Undefined variable: ");
/* try { // try from 0017942a to 0017944e has its CatchHandler @ 0017944f */
std::runtime_error::runtime_error(this_00,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00203ff0,PTR__runtime_error_00203f58);
}
| |
55,168 | stbi__psd_decode_rle(stbi__context*, unsigned char*, int) | 7CodeWizard[P]stablediffusion/thirdparty/stb_image.h | static int stbi__psd_decode_rle(stbi__context *s, stbi_uc *p, int pixelCount)
{
int count, nleft, len;
count = 0;
while ((nleft = pixelCount - count) > 0) {
len = stbi__get8(s);
if (len == 128) {
// No-op.
} else if (len < 128) {
// Copy next len+1 bytes literally.
len++;
if (len > nleft) return 0; // corrupt data
count += len;
while (len) {
*p = stbi__get8(s);
p += 4;
len--;
}
} else if (len > 128) {
stbi_uc val;
// Next -len+1 bytes in the dest are replicated from next source byte.
// (Interpret len as a negative 8-bit int.)
len = 257 - len;
if (len > nleft) return 0; // corrupt data
val = stbi__get8(s);
count += len;
while (len) {
*p = val;
p += 4;
len--;
}
}
}
return 1;
} | O0 | c | stbi__psd_decode_rle(stbi__context*, unsigned char*, int):
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movl %edx, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movl 0x1c(%rsp), %eax
subl 0x18(%rsp), %eax
movl %eax, 0x14(%rsp)
cmpl $0x0, %eax
jle 0x1e58b
movq 0x28(%rsp), %rdi
callq 0x17f50
movzbl %al, %eax
movl %eax, 0x10(%rsp)
cmpl $0x80, 0x10(%rsp)
jne 0x1e49f
jmp 0x1e586
cmpl $0x80, 0x10(%rsp)
jge 0x1e50e
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
cmpl 0x14(%rsp), %eax
jle 0x1e4cb
movl $0x0, 0x34(%rsp)
jmp 0x1e593
movl 0x10(%rsp), %eax
addl 0x18(%rsp), %eax
movl %eax, 0x18(%rsp)
cmpl $0x0, 0x10(%rsp)
je 0x1e50c
movq 0x28(%rsp), %rdi
callq 0x17f50
movb %al, %cl
movq 0x20(%rsp), %rax
movb %cl, (%rax)
movq 0x20(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x20(%rsp)
movl 0x10(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x1e4d7
jmp 0x1e584
cmpl $0x80, 0x10(%rsp)
jle 0x1e582
movl $0x101, %eax # imm = 0x101
subl 0x10(%rsp), %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
cmpl 0x14(%rsp), %eax
jle 0x1e539
movl $0x0, 0x34(%rsp)
jmp 0x1e593
movq 0x28(%rsp), %rdi
callq 0x17f50
movb %al, 0xf(%rsp)
movl 0x10(%rsp), %eax
addl 0x18(%rsp), %eax
movl %eax, 0x18(%rsp)
cmpl $0x0, 0x10(%rsp)
je 0x1e580
movb 0xf(%rsp), %cl
movq 0x20(%rsp), %rax
movb %cl, (%rax)
movq 0x20(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x20(%rsp)
movl 0x10(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x1e553
jmp 0x1e582
jmp 0x1e584
jmp 0x1e586
jmp 0x1e46a
movl $0x1, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax)
| _ZL20stbi__psd_decode_rleP13stbi__contextPhi:
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_20], 0
loc_1E46A:
mov eax, [rsp+38h+var_1C]
sub eax, [rsp+38h+var_20]
mov [rsp+38h+var_24], eax
cmp eax, 0
jle loc_1E58B
mov rdi, [rsp+38h+var_10]
call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *)
movzx eax, al
mov [rsp+38h+var_28], eax
cmp [rsp+38h+var_28], 80h
jnz short loc_1E49F
jmp loc_1E586
loc_1E49F:
cmp [rsp+38h+var_28], 80h
jge short loc_1E50E
mov eax, [rsp+38h+var_28]
add eax, 1
mov [rsp+38h+var_28], eax
mov eax, [rsp+38h+var_28]
cmp eax, [rsp+38h+var_24]
jle short loc_1E4CB
mov [rsp+38h+var_4], 0
jmp loc_1E593
loc_1E4CB:
mov eax, [rsp+38h+var_28]
add eax, [rsp+38h+var_20]
mov [rsp+38h+var_20], eax
loc_1E4D7:
cmp [rsp+38h+var_28], 0
jz short loc_1E50C
mov rdi, [rsp+38h+var_10]
call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *)
mov cl, al
mov rax, [rsp+38h+var_18]
mov [rax], cl
mov rax, [rsp+38h+var_18]
add rax, 4
mov [rsp+38h+var_18], rax
mov eax, [rsp+38h+var_28]
add eax, 0FFFFFFFFh
mov [rsp+38h+var_28], eax
jmp short loc_1E4D7
loc_1E50C:
jmp short loc_1E584
loc_1E50E:
cmp [rsp+38h+var_28], 80h
jle short loc_1E582
mov eax, 101h
sub eax, [rsp+38h+var_28]
mov [rsp+38h+var_28], eax
mov eax, [rsp+38h+var_28]
cmp eax, [rsp+38h+var_24]
jle short loc_1E539
mov [rsp+38h+var_4], 0
jmp short loc_1E593
loc_1E539:
mov rdi, [rsp+38h+var_10]
call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *)
mov [rsp+38h+var_29], al
mov eax, [rsp+38h+var_28]
add eax, [rsp+38h+var_20]
mov [rsp+38h+var_20], eax
loc_1E553:
cmp [rsp+38h+var_28], 0
jz short loc_1E580
mov cl, [rsp+38h+var_29]
mov rax, [rsp+38h+var_18]
mov [rax], cl
mov rax, [rsp+38h+var_18]
add rax, 4
mov [rsp+38h+var_18], rax
mov eax, [rsp+38h+var_28]
add eax, 0FFFFFFFFh
mov [rsp+38h+var_28], eax
jmp short loc_1E553
loc_1E580:
jmp short $+2
loc_1E582:
jmp short $+2
loc_1E584:
jmp short $+2
loc_1E586:
jmp loc_1E46A
loc_1E58B:
mov [rsp+38h+var_4], 1
loc_1E593:
mov eax, [rsp+38h+var_4]
add rsp, 38h
retn
| long long stbi__psd_decode_rle(long long a1, char *a2, int a3)
{
char v4; // [rsp+Fh] [rbp-29h]
int v5; // [rsp+10h] [rbp-28h]
int v6; // [rsp+10h] [rbp-28h]
int v7; // [rsp+10h] [rbp-28h]
int v8; // [rsp+14h] [rbp-24h]
int v9; // [rsp+18h] [rbp-20h]
v9 = 0;
while ( 1 )
{
v8 = a3 - v9;
if ( a3 - v9 <= 0 )
break;
v5 = (unsigned __int8)stbi__get8(a1);
if ( v5 != 128 )
{
if ( v5 >= 128 )
{
v7 = 257 - v5;
if ( v7 > v8 )
return 0;
v4 = stbi__get8(a1);
v9 += v7;
while ( v7 )
{
*a2 = v4;
a2 += 4;
--v7;
}
}
else
{
v6 = v5 + 1;
if ( v6 > v8 )
return 0;
v9 += v6;
while ( v6 )
{
*a2 = stbi__get8(a1);
a2 += 4;
--v6;
}
}
}
}
return 1;
}
| stbi__psd_decode_rle:
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 + 0x18],0x0
LAB_0011e46a:
MOV EAX,dword ptr [RSP + 0x1c]
SUB EAX,dword ptr [RSP + 0x18]
MOV dword ptr [RSP + 0x14],EAX
CMP EAX,0x0
JLE 0x0011e58b
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00117f50
MOVZX EAX,AL
MOV dword ptr [RSP + 0x10],EAX
CMP dword ptr [RSP + 0x10],0x80
JNZ 0x0011e49f
JMP 0x0011e586
LAB_0011e49f:
CMP dword ptr [RSP + 0x10],0x80
JGE 0x0011e50e
MOV EAX,dword ptr [RSP + 0x10]
ADD EAX,0x1
MOV dword ptr [RSP + 0x10],EAX
MOV EAX,dword ptr [RSP + 0x10]
CMP EAX,dword ptr [RSP + 0x14]
JLE 0x0011e4cb
MOV dword ptr [RSP + 0x34],0x0
JMP 0x0011e593
LAB_0011e4cb:
MOV EAX,dword ptr [RSP + 0x10]
ADD EAX,dword ptr [RSP + 0x18]
MOV dword ptr [RSP + 0x18],EAX
LAB_0011e4d7:
CMP dword ptr [RSP + 0x10],0x0
JZ 0x0011e50c
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00117f50
MOV CL,AL
MOV RAX,qword ptr [RSP + 0x20]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,0x4
MOV qword ptr [RSP + 0x20],RAX
MOV EAX,dword ptr [RSP + 0x10]
ADD EAX,-0x1
MOV dword ptr [RSP + 0x10],EAX
JMP 0x0011e4d7
LAB_0011e50c:
JMP 0x0011e584
LAB_0011e50e:
CMP dword ptr [RSP + 0x10],0x80
JLE 0x0011e582
MOV EAX,0x101
SUB EAX,dword ptr [RSP + 0x10]
MOV dword ptr [RSP + 0x10],EAX
MOV EAX,dword ptr [RSP + 0x10]
CMP EAX,dword ptr [RSP + 0x14]
JLE 0x0011e539
MOV dword ptr [RSP + 0x34],0x0
JMP 0x0011e593
LAB_0011e539:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00117f50
MOV byte ptr [RSP + 0xf],AL
MOV EAX,dword ptr [RSP + 0x10]
ADD EAX,dword ptr [RSP + 0x18]
MOV dword ptr [RSP + 0x18],EAX
LAB_0011e553:
CMP dword ptr [RSP + 0x10],0x0
JZ 0x0011e580
MOV CL,byte ptr [RSP + 0xf]
MOV RAX,qword ptr [RSP + 0x20]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,0x4
MOV qword ptr [RSP + 0x20],RAX
MOV EAX,dword ptr [RSP + 0x10]
ADD EAX,-0x1
MOV dword ptr [RSP + 0x10],EAX
JMP 0x0011e553
LAB_0011e580:
JMP 0x0011e582
LAB_0011e582:
JMP 0x0011e584
LAB_0011e584:
JMP 0x0011e586
LAB_0011e586:
JMP 0x0011e46a
LAB_0011e58b:
MOV dword ptr [RSP + 0x34],0x1
LAB_0011e593:
MOV EAX,dword ptr [RSP + 0x34]
ADD RSP,0x38
RET
|
/* stbi__psd_decode_rle(stbi__context*, unsigned char*, int) */
int4 stbi__psd_decode_rle(stbi__context *param_1,uchar *param_2,int param_3)
{
byte bVar1;
uchar uVar2;
int iVar3;
uint uVar4;
int local_28;
int local_20;
uchar *local_18;
local_20 = 0;
local_18 = param_2;
while( true ) {
do {
while( true ) {
do {
iVar3 = param_3 - local_20;
if (iVar3 < 1) {
return 1;
}
bVar1 = stbi__get8(param_1);
uVar4 = (uint)bVar1;
} while (uVar4 == 0x80);
if (0x7f < uVar4) break;
local_28 = uVar4 + 1;
if (iVar3 < local_28) {
return 0;
}
local_20 = local_28 + local_20;
for (; local_28 != 0; local_28 = local_28 + -1) {
uVar2 = stbi__get8(param_1);
*local_18 = uVar2;
local_18 = local_18 + 4;
}
}
} while (uVar4 < 0x81);
local_28 = 0x101 - uVar4;
if (iVar3 < local_28) break;
uVar2 = stbi__get8(param_1);
local_20 = local_28 + local_20;
for (; local_28 != 0; local_28 = local_28 + -1) {
*local_18 = uVar2;
local_18 = local_18 + 4;
}
}
return 0;
}
| |
55,169 | stbi__psd_decode_rle(stbi__context*, unsigned char*, int) | 7CodeWizard[P]stablediffusion/thirdparty/stb_image.h | static int stbi__psd_decode_rle(stbi__context *s, stbi_uc *p, int pixelCount)
{
int count, nleft, len;
count = 0;
while ((nleft = pixelCount - count) > 0) {
len = stbi__get8(s);
if (len == 128) {
// No-op.
} else if (len < 128) {
// Copy next len+1 bytes literally.
len++;
if (len > nleft) return 0; // corrupt data
count += len;
while (len) {
*p = stbi__get8(s);
p += 4;
len--;
}
} else if (len > 128) {
stbi_uc val;
// Next -len+1 bytes in the dest are replicated from next source byte.
// (Interpret len as a negative 8-bit int.)
len = 257 - len;
if (len > nleft) return 0; // corrupt data
val = stbi__get8(s);
count += len;
while (len) {
*p = val;
p += 4;
len--;
}
}
}
return 1;
} | O1 | c | stbi__psd_decode_rle(stbi__context*, unsigned char*, int):
movl $0x1, %eax
testl %edx, %edx
jle 0x2a8ce
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
movl %edx, %r13d
movl %edx, 0x4(%rsp)
movq 0xc0(%r15), %rax
cmpq 0xc8(%r15), %rax
jb 0x2a7cf
cmpl $0x0, 0x30(%r15)
je 0x2a845
movq %r15, %rdi
callq 0x2696c
movq 0xc0(%r15), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xc0(%r15)
movb (%rax), %al
cmpb $-0x80, %al
je 0x2a8a5
movzbl %al, %ebx
testb %al, %al
js 0x2a849
cmpl %ebx, %r13d
jle 0x2a8be
incl %ebx
movl %ebx, %ebp
movq 0xc0(%r15), %rax
cmpq 0xc8(%r15), %rax
jb 0x2a81e
cmpl $0x0, 0x30(%r15)
je 0x2a838
movq %r15, %rdi
callq 0x2696c
movq 0xc0(%r15), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xc0(%r15)
movb (%rax), %al
movb %al, (%r14)
addq $0x4, %r14
decl %ebp
jne 0x2a7f8
jmp 0x2a83c
xorl %eax, %eax
jmp 0x2a82b
addl %ebx, %r12d
movl 0x4(%rsp), %ebx
jmp 0x2a8a5
xorl %eax, %eax
jmp 0x2a7dc
movl $0x101, %ebp # imm = 0x101
subl %ebx, %ebp
cmpl %r13d, %ebp
jg 0x2a89c
movq 0xc0(%r15), %rax
cmpq 0xc8(%r15), %rax
jb 0x2a87b
cmpl $0x0, 0x30(%r15)
je 0x2a8b3
movq %r15, %rdi
callq 0x2696c
movq 0xc0(%r15), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xc0(%r15)
movb (%rax), %al
addl $0xfffffeff, %ebx # imm = 0xFFFFFEFF
movb %al, (%r14)
addq $0x4, %r14
incl %ebx
jne 0x2a88e
addl %ebp, %r12d
cmpl %r13d, %ebp
movl 0x4(%rsp), %ebx
jg 0x2a8be
movl %ebx, %r13d
subl %r12d, %r13d
jg 0x2a7a5
jmp 0x2a8b7
xorl %eax, %eax
jmp 0x2a888
movl $0x1, %eax
jmp 0x2a8c0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZL20stbi__psd_decode_rleP13stbi__contextPhi:
mov eax, 1
test edx, edx
jle locret_2A8CE
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebx, edx
mov r14, rsi
mov r15, rdi
xor r12d, r12d
mov r13d, edx
mov [rsp+38h+var_34], edx
loc_2A7A5:
mov rax, [r15+0C0h]
cmp rax, [r15+0C8h]
jb short loc_2A7CF
cmp dword ptr [r15+30h], 0
jz loc_2A845
mov rdi, r15
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [r15+0C0h]
loc_2A7CF:
lea rcx, [rax+1]
mov [r15+0C0h], rcx
mov al, [rax]
loc_2A7DC:
cmp al, 80h
jz loc_2A8A5
movzx ebx, al
test al, al
js short loc_2A849
cmp r13d, ebx
jle loc_2A8BE
inc ebx
mov ebp, ebx
loc_2A7F8:
mov rax, [r15+0C0h]
cmp rax, [r15+0C8h]
jb short loc_2A81E
cmp dword ptr [r15+30h], 0
jz short loc_2A838
mov rdi, r15
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [r15+0C0h]
loc_2A81E:
lea rcx, [rax+1]
mov [r15+0C0h], rcx
mov al, [rax]
loc_2A82B:
mov [r14], al
add r14, 4
dec ebp
jnz short loc_2A7F8
jmp short loc_2A83C
loc_2A838:
xor eax, eax
jmp short loc_2A82B
loc_2A83C:
add r12d, ebx
mov ebx, [rsp+38h+var_34]
jmp short loc_2A8A5
loc_2A845:
xor eax, eax
jmp short loc_2A7DC
loc_2A849:
mov ebp, 101h
sub ebp, ebx
cmp ebp, r13d
jg short loc_2A89C
mov rax, [r15+0C0h]
cmp rax, [r15+0C8h]
jb short loc_2A87B
cmp dword ptr [r15+30h], 0
jz short loc_2A8B3
mov rdi, r15
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [r15+0C0h]
loc_2A87B:
lea rcx, [rax+1]
mov [r15+0C0h], rcx
mov al, [rax]
loc_2A888:
add ebx, 0FFFFFEFFh
loc_2A88E:
mov [r14], al
add r14, 4
inc ebx
jnz short loc_2A88E
add r12d, ebp
loc_2A89C:
cmp ebp, r13d
mov ebx, [rsp+38h+var_34]
jg short loc_2A8BE
loc_2A8A5:
mov r13d, ebx
sub r13d, r12d
jg loc_2A7A5
jmp short loc_2A8B7
loc_2A8B3:
xor eax, eax
jmp short loc_2A888
loc_2A8B7:
mov eax, 1
jmp short loc_2A8C0
loc_2A8BE:
xor eax, eax
loc_2A8C0:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
locret_2A8CE:
retn
| long long stbi__psd_decode_rle(long long a1, _BYTE *a2, int a3)
{
long long result; // rax
int v4; // ebx
int v6; // r12d
int v7; // r13d
unsigned __int8 *v8; // rax
unsigned __int8 v9; // al
int v10; // ebx
int v11; // ebx
int v12; // ebp
char *v13; // rax
char v14; // al
int v15; // ebp
char *v16; // rax
char v17; // al
int v18; // ebx
result = 1LL;
if ( a3 <= 0 )
return result;
v4 = a3;
v6 = 0;
v7 = a3;
while ( 1 )
{
v8 = *(unsigned __int8 **)(a1 + 192);
if ( (unsigned long long)v8 < *(_QWORD *)(a1 + 200) )
goto LABEL_6;
if ( *(_DWORD *)(a1 + 48) )
{
stbi__refill_buffer(a1);
v8 = *(unsigned __int8 **)(a1 + 192);
LABEL_6:
*(_QWORD *)(a1 + 192) = v8 + 1;
v9 = *v8;
goto LABEL_7;
}
v9 = 0;
LABEL_7:
if ( v9 == 0x80 )
goto LABEL_28;
v10 = v9;
if ( (v9 & 0x80u) == 0 )
break;
v15 = 257 - v9;
if ( v15 <= v7 )
{
v16 = *(char **)(a1 + 192);
if ( (unsigned long long)v16 >= *(_QWORD *)(a1 + 200) )
{
if ( !*(_DWORD *)(a1 + 48) )
{
v17 = 0;
LABEL_24:
v18 = v10 - 257;
do
{
*a2 = v17;
a2 += 4;
++v18;
}
while ( v18 );
v6 += v15;
goto LABEL_27;
}
stbi__refill_buffer(a1);
v16 = *(char **)(a1 + 192);
}
*(_QWORD *)(a1 + 192) = v16 + 1;
v17 = *v16;
goto LABEL_24;
}
LABEL_27:
v4 = a3;
if ( v15 > v7 )
return 0LL;
LABEL_28:
v7 = v4 - v6;
if ( v4 <= v6 )
return 1LL;
}
if ( v7 > v9 )
{
v11 = v9 + 1;
v12 = v11;
while ( 1 )
{
v13 = *(char **)(a1 + 192);
if ( (unsigned long long)v13 >= *(_QWORD *)(a1 + 200) )
{
if ( !*(_DWORD *)(a1 + 48) )
{
v14 = 0;
goto LABEL_15;
}
stbi__refill_buffer(a1);
v13 = *(char **)(a1 + 192);
}
*(_QWORD *)(a1 + 192) = v13 + 1;
v14 = *v13;
LABEL_15:
*a2 = v14;
a2 += 4;
if ( !--v12 )
{
v6 += v11;
v4 = a3;
goto LABEL_28;
}
}
}
return 0LL;
}
| |||
55,170 | stbi__psd_decode_rle(stbi__context*, unsigned char*, int) | 7CodeWizard[P]stablediffusion/thirdparty/stb_image.h | static int stbi__psd_decode_rle(stbi__context *s, stbi_uc *p, int pixelCount)
{
int count, nleft, len;
count = 0;
while ((nleft = pixelCount - count) > 0) {
len = stbi__get8(s);
if (len == 128) {
// No-op.
} else if (len < 128) {
// Copy next len+1 bytes literally.
len++;
if (len > nleft) return 0; // corrupt data
count += len;
while (len) {
*p = stbi__get8(s);
p += 4;
len--;
}
} else if (len > 128) {
stbi_uc val;
// Next -len+1 bytes in the dest are replicated from next source byte.
// (Interpret len as a negative 8-bit int.)
len = 257 - len;
if (len > nleft) return 0; // corrupt data
val = stbi__get8(s);
count += len;
while (len) {
*p = val;
p += 4;
len--;
}
}
}
return 1;
} | O3 | c | stbi__psd_decode_rle(stbi__context*, unsigned char*, int):
movl $0x1, %eax
testl %edx, %edx
jle 0x29cf5
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
movl %edx, %ebp
movl %edx, 0x4(%rsp)
movq 0xc0(%r15), %rcx
cmpq 0xc8(%r15), %rcx
jb 0x29bfe
cmpl $0x0, 0x30(%r15)
je 0x29c29
movq %r15, %rdi
callq 0x2620e
movq 0xc0(%r15), %rcx
leaq 0x1(%rcx), %rax
movq %rax, 0xc0(%r15)
movzbl (%rcx), %r13d
cmpl $0x80, %r13d
je 0x29ccd
testb %r13b, %r13b
js 0x29c7b
cmpl %r13d, %ebp
ja 0x29c2c
jmp 0x29ce5
xorl %r13d, %r13d
incl %r13d
movl %r13d, %ebx
movq 0xc0(%r15), %rax
cmpq 0xc8(%r15), %rax
jb 0x29c58
cmpl $0x0, 0x30(%r15)
je 0x29c72
movq %r15, %rdi
callq 0x2620e
movq 0xc0(%r15), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xc0(%r15)
movb (%rax), %al
movb %al, (%r14)
addq $0x4, %r14
decl %ebx
jne 0x29c32
jmp 0x29c76
xorl %eax, %eax
jmp 0x29c65
addl %r13d, %r12d
jmp 0x29cc9
movl $0x101, %ebx # imm = 0x101
subl %r13d, %ebx
cmpl %ebp, %ebx
ja 0x29ce5
cmpq 0xc8(%r15), %rax
jb 0x29ca6
cmpl $0x0, 0x30(%r15)
je 0x29cda
movq %r15, %rdi
callq 0x2620e
movq 0xc0(%r15), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xc0(%r15)
movb (%rax), %al
addl $0xfffffeff, %r13d # imm = 0xFFFFFEFF
movb %al, (%r14)
addq $0x4, %r14
incl %r13d
jne 0x29cba
addl %ebx, %r12d
movl 0x4(%rsp), %ebx
movl %ebx, %ebp
subl %r12d, %ebp
jg 0x29bd8
jmp 0x29cde
xorl %eax, %eax
jmp 0x29cb3
movl $0x1, %eax
jmp 0x29ce7
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZL20stbi__psd_decode_rleP13stbi__contextPhi:
mov eax, 1
test edx, edx
jle locret_29CF5
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebx, edx
mov r14, rsi
mov r15, rdi
xor r12d, r12d
mov ebp, edx
mov [rsp+38h+var_34], edx
loc_29BD8:
mov rcx, [r15+0C0h]
cmp rcx, [r15+0C8h]
jb short loc_29BFE
cmp dword ptr [r15+30h], 0
jz short loc_29C29
mov rdi, r15
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rcx, [r15+0C0h]
loc_29BFE:
lea rax, [rcx+1]
mov [r15+0C0h], rax
movzx r13d, byte ptr [rcx]
cmp r13d, 80h
jz loc_29CCD
test r13b, r13b
js short loc_29C7B
cmp ebp, r13d
ja short loc_29C2C
jmp loc_29CE5
loc_29C29:
xor r13d, r13d
loc_29C2C:
inc r13d
mov ebx, r13d
loc_29C32:
mov rax, [r15+0C0h]
cmp rax, [r15+0C8h]
jb short loc_29C58
cmp dword ptr [r15+30h], 0
jz short loc_29C72
mov rdi, r15
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [r15+0C0h]
loc_29C58:
lea rcx, [rax+1]
mov [r15+0C0h], rcx
mov al, [rax]
loc_29C65:
mov [r14], al
add r14, 4
dec ebx
jnz short loc_29C32
jmp short loc_29C76
loc_29C72:
xor eax, eax
jmp short loc_29C65
loc_29C76:
add r12d, r13d
jmp short loc_29CC9
loc_29C7B:
mov ebx, 101h
sub ebx, r13d
cmp ebx, ebp
ja short loc_29CE5
cmp rax, [r15+0C8h]
jb short loc_29CA6
cmp dword ptr [r15+30h], 0
jz short loc_29CDA
mov rdi, r15
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [r15+0C0h]
loc_29CA6:
lea rcx, [rax+1]
mov [r15+0C0h], rcx
mov al, [rax]
loc_29CB3:
add r13d, 0FFFFFEFFh
loc_29CBA:
mov [r14], al
add r14, 4
inc r13d
jnz short loc_29CBA
add r12d, ebx
loc_29CC9:
mov ebx, [rsp+38h+var_34]
loc_29CCD:
mov ebp, ebx
sub ebp, r12d
jg loc_29BD8
jmp short loc_29CDE
loc_29CDA:
xor eax, eax
jmp short loc_29CB3
loc_29CDE:
mov eax, 1
jmp short loc_29CE7
loc_29CE5:
xor eax, eax
loc_29CE7:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
locret_29CF5:
retn
| long long stbi__psd_decode_rle(long long a1, _BYTE *a2, int a3)
{
long long result; // rax
int v4; // ebx
int v6; // r12d
unsigned int v7; // ebp
unsigned __int8 *v8; // rcx
char *v9; // rax
unsigned int v10; // r13d
unsigned int v11; // r13d
unsigned int v12; // ebx
char *v13; // rax
char v14; // al
unsigned int v15; // ebx
char v16; // al
unsigned int v17; // r13d
result = 1LL;
if ( a3 > 0 )
{
v4 = a3;
v6 = 0;
v7 = a3;
while ( 1 )
{
v8 = *(unsigned __int8 **)(a1 + 192);
if ( (unsigned long long)v8 >= *(_QWORD *)(a1 + 200) )
{
if ( !*(_DWORD *)(a1 + 48) )
{
v10 = 0;
goto LABEL_11;
}
stbi__refill_buffer(a1);
v8 = *(unsigned __int8 **)(a1 + 192);
}
v9 = (char *)(v8 + 1);
*(_QWORD *)(a1 + 192) = v8 + 1;
v10 = *v8;
if ( v10 != 128 )
break;
LABEL_28:
v7 = v4 - v6;
if ( v4 <= v6 )
return 1LL;
}
if ( (v10 & 0x80u) == 0 )
{
if ( v7 <= v10 )
return 0LL;
LABEL_11:
v11 = v10 + 1;
v12 = v11;
while ( 2 )
{
v13 = *(char **)(a1 + 192);
if ( (unsigned long long)v13 < *(_QWORD *)(a1 + 200) )
{
LABEL_15:
*(_QWORD *)(a1 + 192) = v13 + 1;
v14 = *v13;
}
else
{
if ( *(_DWORD *)(a1 + 48) )
{
stbi__refill_buffer(a1);
v13 = *(char **)(a1 + 192);
goto LABEL_15;
}
v14 = 0;
}
*a2 = v14;
a2 += 4;
if ( !--v12 )
{
v6 += v11;
goto LABEL_27;
}
continue;
}
}
v15 = 257 - v10;
if ( 257 - v10 > v7 )
return 0LL;
if ( (unsigned long long)v9 >= *(_QWORD *)(a1 + 200) )
{
if ( !*(_DWORD *)(a1 + 48) )
{
v16 = 0;
goto LABEL_24;
}
stbi__refill_buffer(a1);
v9 = *(char **)(a1 + 192);
}
*(_QWORD *)(a1 + 192) = v9 + 1;
v16 = *v9;
LABEL_24:
v17 = v10 - 257;
do
{
*a2 = v16;
a2 += 4;
++v17;
}
while ( v17 );
v6 += v15;
LABEL_27:
v4 = a3;
goto LABEL_28;
}
return result;
}
| |||
55,171 | OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::Apply(OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::Parameters const&) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/../bfr/pointOperations.h | static void Apply(Parameters const & parameters) {
switch (parameters.pointSize) {
case 1: apply<1>(parameters); break;
case 2: apply<2>(parameters); break;
case 3: apply<3>(parameters); break;
case 4: apply<4>(parameters); break;
default: apply<>(parameters); break;
}
} | O0 | c | OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::Apply(OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::Parameters const&):
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x10(%rbp)
subl $0x3, %eax
ja 0x1af220
movq -0x10(%rbp), %rax
leaq 0x4b55d(%rip), %rcx # 0x1fa748
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
callq 0xd3740
jmp 0x1af229
movq -0x8(%rbp), %rdi
callq 0xd6800
jmp 0x1af229
movq -0x8(%rbp), %rdi
callq 0xc5340
jmp 0x1af229
movq -0x8(%rbp), %rdi
callq 0xca4a0
jmp 0x1af229
movq -0x8(%rbp), %rdi
callq 0xcf170
addq $0x10, %rsp
popq %rbp
retq
nop
| _ZN10OpenSubdiv6v3_6_03Bfr6points9SplitFaceIdE5ApplyERKNS4_10ParametersE:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov eax, [rax+8]
dec eax; switch 4 cases
mov ecx, eax
mov [rbp+var_10], rcx
sub eax, 3
ja short def_1AF1F2; jumptable 00000000001AF1F2 default case
mov rax, [rbp+var_10]
lea rcx, jpt_1AF1F2
movsxd rax, ds:(jpt_1AF1F2 - 1FA748h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_1AF1F4:
mov rdi, [rbp+var_8]; jumptable 00000000001AF1F2 case 1
call __ZN10OpenSubdiv6v3_6_03Bfr6points9SplitFaceIdE5applyILi1EEEvRKNS4_10ParametersE; OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::apply<1>(OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::Parameters const&)
jmp short loc_1AF229
loc_1AF1FF:
mov rdi, [rbp+var_8]; jumptable 00000000001AF1F2 case 2
call __ZN10OpenSubdiv6v3_6_03Bfr6points9SplitFaceIdE5applyILi2EEEvRKNS4_10ParametersE; OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::apply<2>(OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::Parameters const&)
jmp short loc_1AF229
loc_1AF20A:
mov rdi, [rbp+var_8]; jumptable 00000000001AF1F2 case 3
call __ZN10OpenSubdiv6v3_6_03Bfr6points9SplitFaceIdE5applyILi3EEEvRKNS4_10ParametersE; OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::apply<3>(OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::Parameters const&)
jmp short loc_1AF229
loc_1AF215:
mov rdi, [rbp+var_8]; jumptable 00000000001AF1F2 case 4
call __ZN10OpenSubdiv6v3_6_03Bfr6points9SplitFaceIdE5applyILi4EEEvRKNS4_10ParametersE; OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::apply<4>(OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::Parameters const&)
jmp short loc_1AF229
def_1AF1F2:
mov rdi, [rbp+var_8]; jumptable 00000000001AF1F2 default case
call __ZN10OpenSubdiv6v3_6_03Bfr6points9SplitFaceIdE5applyILi0EEEvRKNS4_10ParametersE; OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::apply<0>(OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::Parameters const&)
loc_1AF229:
add rsp, 10h
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::Apply(long long a1)
{
long long result; // rax
switch ( *(_DWORD *)(a1 + 8) )
{
case 1:
result = OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::apply<1>(a1);
break;
case 2:
result = OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::apply<2>(a1);
break;
case 3:
result = OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::apply<3>(a1);
break;
case 4:
result = OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::apply<4>(a1);
break;
default:
result = OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::apply<0>(a1);
break;
}
return result;
}
| |||
55,172 | OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::Apply(OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::Parameters const&) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/../bfr/pointOperations.h | static void Apply(Parameters const & parameters) {
switch (parameters.pointSize) {
case 1: apply<1>(parameters); break;
case 2: apply<2>(parameters); break;
case 3: apply<3>(parameters); break;
case 4: apply<4>(parameters); break;
default: apply<>(parameters); break;
}
} | O1 | c | OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::Apply(OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::Parameters const&):
movl 0x8(%rdi), %eax
decl %eax
cmpl $0x3, %eax
ja 0x38f40
leaq 0x29e1b(%rip), %rcx # 0xc1418
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x38ab0
jmp 0x3bcd0
jmp 0x3baa0
jmp 0x3c410
| _ZN10OpenSubdiv6v3_6_03Bfr6points9SplitFaceIfE5ApplyERKNS4_10ParametersE:
mov eax, [rdi+8]
dec eax; switch 4 cases
cmp eax, 3
ja __ZN10OpenSubdiv6v3_6_03Bfr6points9SplitFaceIfE5applyILi0EEEvRKNS4_10ParametersE; OpenSubdiv::v3_6_0::Bfr::points::SplitFace<float>::apply<0>(OpenSubdiv::v3_6_0::Bfr::points::SplitFace<float>::Parameters const&)
lea rcx, jpt_97604
movsxd rax, ds:(jpt_97604 - 0C1418h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_97606:
jmp __ZN10OpenSubdiv6v3_6_03Bfr6points9SplitFaceIfE5applyILi1EEEvRKNS4_10ParametersE; jumptable 0000000000097604 case 1
loc_9760B:
jmp __ZN10OpenSubdiv6v3_6_03Bfr6points9SplitFaceIfE5applyILi3EEEvRKNS4_10ParametersE; jumptable 0000000000097604 case 3
loc_97610:
jmp __ZN10OpenSubdiv6v3_6_03Bfr6points9SplitFaceIfE5applyILi4EEEvRKNS4_10ParametersE; jumptable 0000000000097604 case 4
loc_97615:
jmp __ZN10OpenSubdiv6v3_6_03Bfr6points9SplitFaceIfE5applyILi2EEEvRKNS4_10ParametersE; jumptable 0000000000097604 case 2
| long long OpenSubdiv::v3_6_0::Bfr::points::SplitFace<float>::Apply(long long a1)
{
long long result; // rax
switch ( *(_DWORD *)(a1 + 8) )
{
case 1:
result = OpenSubdiv::v3_6_0::Bfr::points::SplitFace<float>::apply<1>();
break;
case 2:
result = OpenSubdiv::v3_6_0::Bfr::points::SplitFace<float>::apply<2>();
break;
case 3:
result = OpenSubdiv::v3_6_0::Bfr::points::SplitFace<float>::apply<3>();
break;
case 4:
result = OpenSubdiv::v3_6_0::Bfr::points::SplitFace<float>::apply<4>();
break;
default:
JUMPOUT(0x38F40LL);
}
return result;
}
| Apply:
MOV EAX,dword ptr [RDI + 0x8]
DEC EAX
CMP EAX,0x3
JA 0x00138f40
LEA RCX,[0x1c1418]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
JMP 0x00138ab0
caseD_3:
JMP 0x0013bcd0
caseD_4:
JMP 0x0013baa0
caseD_2:
JMP 0x0013c410
|
/* OpenSubdiv::v3_6_0::Bfr::points::SplitFace<float>::Apply(OpenSubdiv::v3_6_0::Bfr::points::SplitFace<float>::Parameters
const&) */
void OpenSubdiv::v3_6_0::Bfr::points::SplitFace<float>::Apply(Parameters *param_1)
{
switch(*(int4 *)(param_1 + 8)) {
case 1:
apply<1>(param_1);
return;
case 2:
apply<2>(param_1);
return;
case 3:
apply<3>(param_1);
return;
case 4:
apply<4>(param_1);
return;
default:
(*(code *)PTR_apply<0>_001de7a0)();
return;
}
}
| |
55,173 | OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::Apply(OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::Parameters const&) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/../bfr/pointOperations.h | static void Apply(Parameters const & parameters) {
switch (parameters.pointSize) {
case 1: apply<1>(parameters); break;
case 2: apply<2>(parameters); break;
case 3: apply<3>(parameters); break;
case 4: apply<4>(parameters); break;
default: apply<>(parameters); break;
}
} | O2 | c | OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::Apply(OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::Parameters const&):
movl 0x8(%rdi), %eax
decl %eax
cmpl $0x3, %eax
ja 0x521b0
leaq 0x26db7(%rip), %rcx # 0xcc034
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x53bf0
jmp 0x510f0
jmp 0x51520
jmp 0x54480
| _ZN10OpenSubdiv6v3_6_03Bfr6points15CopyConsecutiveIdfE5ApplyERKNS4_10ParametersE:
mov eax, [rdi+8]
dec eax; switch 4 cases
cmp eax, 3
ja __ZN10OpenSubdiv6v3_6_03Bfr6points15CopyConsecutiveIdfE5applyILi0EEEvRKNS4_10ParametersE; OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double,float>::apply<0>(OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double,float>::Parameters const&)
lea rcx, jpt_A5284
movsxd rax, ds:(jpt_A5284 - 0CC034h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_A5286:
jmp __ZN10OpenSubdiv6v3_6_03Bfr6points15CopyConsecutiveIdfE5applyILi1EEEvRKNS4_10ParametersE; jumptable 00000000000A5284 case 1
loc_A528B:
jmp __ZN10OpenSubdiv6v3_6_03Bfr6points15CopyConsecutiveIdfE5applyILi3EEEvRKNS4_10ParametersE; jumptable 00000000000A5284 case 3
loc_A5290:
jmp __ZN10OpenSubdiv6v3_6_03Bfr6points15CopyConsecutiveIdfE5applyILi4EEEvRKNS4_10ParametersE; jumptable 00000000000A5284 case 4
loc_A5295:
jmp __ZN10OpenSubdiv6v3_6_03Bfr6points15CopyConsecutiveIdfE5applyILi2EEEvRKNS4_10ParametersE; jumptable 00000000000A5284 case 2
| long long OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double,float>::Apply(long long a1)
{
long long result; // rax
switch ( *(_DWORD *)(a1 + 8) )
{
case 1:
result = OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double,float>::apply<1>();
break;
case 2:
result = OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double,float>::apply<2>();
break;
case 3:
result = OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double,float>::apply<3>();
break;
case 4:
result = OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double,float>::apply<4>();
break;
default:
JUMPOUT(0x521B0LL);
}
return result;
}
| Apply:
MOV EAX,dword ptr [RDI + 0x8]
DEC EAX
CMP EAX,0x3
JA 0x001521b0
LEA RCX,[0x1cc034]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
JMP 0x00153bf0
caseD_3:
JMP 0x001510f0
caseD_4:
JMP 0x00151520
caseD_2:
JMP 0x00154480
|
/* OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double,
float>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double, float>::Parameters const&)
*/
void OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double,float>::Apply(Parameters *param_1)
{
switch(*(int4 *)(param_1 + 8)) {
case 1:
apply<1>(param_1);
return;
case 2:
apply<2>(param_1);
return;
case 3:
apply<3>(param_1);
return;
case 4:
apply<4>(param_1);
return;
default:
(*(code *)PTR_apply<0>_001f28d8)();
return;
}
}
| |
55,174 | OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::Apply(OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::Parameters const&) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/../bfr/pointOperations.h | static void Apply(Parameters const & parameters) {
switch (parameters.pointSize) {
case 1: apply<1>(parameters); break;
case 2: apply<2>(parameters); break;
case 3: apply<3>(parameters); break;
case 4: apply<4>(parameters); break;
default: apply<>(parameters); break;
}
} | O3 | c | OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::Apply(OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::Parameters const&):
movl 0x8(%rdi), %eax
decl %eax
cmpl $0x3, %eax
ja 0x38350
leaq 0x298af(%rip), %rcx # 0xc4cf0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x38f90
jmp 0x3c110
jmp 0x3be40
jmp 0x38fa0
| _ZN10OpenSubdiv6v3_6_03Bfr6points15CopyConsecutiveIfdE5ApplyERKNS4_10ParametersE:
mov eax, [rdi+8]
dec eax; switch 4 cases
cmp eax, 3
ja __ZN10OpenSubdiv6v3_6_03Bfr6points15CopyConsecutiveIfdE5applyILi0EEEvRKNS4_10ParametersE; OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<float,double>::apply<0>(OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<float,double>::Parameters const&)
lea rcx, jpt_9B448
movsxd rax, ds:(jpt_9B448 - 0C4CF0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_9B44A:
jmp __ZN10OpenSubdiv6v3_6_03Bfr6points15CopyConsecutiveIfdE5applyILi1EEEvRKNS4_10ParametersE; jumptable 000000000009B448 case 1
loc_9B44F:
jmp __ZN10OpenSubdiv6v3_6_03Bfr6points15CopyConsecutiveIfdE5applyILi3EEEvRKNS4_10ParametersE; jumptable 000000000009B448 case 3
loc_9B454:
jmp __ZN10OpenSubdiv6v3_6_03Bfr6points15CopyConsecutiveIfdE5applyILi4EEEvRKNS4_10ParametersE; jumptable 000000000009B448 case 4
loc_9B459:
jmp __ZN10OpenSubdiv6v3_6_03Bfr6points15CopyConsecutiveIfdE5applyILi2EEEvRKNS4_10ParametersE; jumptable 000000000009B448 case 2
| long long OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<float,double>::Apply(long long a1)
{
long long result; // rax
switch ( *(_DWORD *)(a1 + 8) )
{
case 1:
result = OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<float,double>::apply<1>();
break;
case 2:
result = OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<float,double>::apply<2>();
break;
case 3:
result = OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<float,double>::apply<3>();
break;
case 4:
result = OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<float,double>::apply<4>();
break;
default:
JUMPOUT(0x38350LL);
}
return result;
}
| default:
JMP qword ptr [0x001e21a8]
Apply:
MOV EAX,dword ptr [RDI + 0x8]
DEC EAX
CMP EAX,0x3
JA 0x00138350
LEA RCX,[0x1c4cf0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
JMP 0x00138f90
caseD_3:
JMP 0x0013c110
caseD_4:
JMP 0x0013be40
caseD_2:
JMP 0x00138fa0
|
/* OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<float,
double>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<float, double>::Parameters
const&) */
void OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<float,double>::Apply(Parameters *param_1)
{
switch(*(int4 *)(param_1 + 8)) {
case 1:
apply<1>(param_1);
return;
case 2:
apply<2>(param_1);
return;
case 3:
apply<3>(param_1);
return;
case 4:
apply<4>(param_1);
return;
default:
(*(code *)PTR_apply<0>_001e21a8)();
return;
}
}
| |
55,175 | OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceFVarValues(int, int) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/level.cpp | ConstIndexArray
Level::getFaceFVarValues(Index faceIndex, int channel) const {
return _fvarChannels[channel]->getFaceValues(faceIndex);
} | O1 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceFVarValues(int, int) const:
movslq %edx, %rax
movq 0x1c8(%rdi), %rcx
movq (%rcx,%rax,8), %rcx
movq (%rcx), %rax
leal (%rsi,%rsi), %edx
movslq %edx, %rdx
movq 0x18(%rax), %rax
movl (%rax,%rdx,4), %edx
leal 0x1(,%rsi,2), %esi
movslq %esi, %rsi
movslq (%rax,%rsi,4), %rax
shlq $0x2, %rax
addq 0x18(%rcx), %rax
retq
nop
| _ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level17getFaceFVarValuesEii:
movsxd rax, edx
mov rcx, [rdi+1C8h]
mov rcx, [rcx+rax*8]
mov rax, [rcx]
lea edx, [rsi+rsi]
movsxd rdx, edx
mov rax, [rax+18h]
mov edx, [rax+rdx*4]
lea esi, ds:1[rsi*2]
movsxd rsi, esi
movsxd rax, dword ptr [rax+rsi*4]
shl rax, 2
add rax, [rcx+18h]
retn
| long long OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceFVarValues(
OpenSubdiv::v3_6_0::Vtr::internal::Level *this,
int a2,
int a3)
{
_QWORD *v3; // rcx
v3 = *(_QWORD **)(*((_QWORD *)this + 57) + 8LL * a3);
return v3[3] + 4LL * *(int *)(*(_QWORD *)(*v3 + 24LL) + 4LL * (2 * a2 + 1));
}
| getFaceFVarValues:
MOVSXD RAX,EDX
MOV RCX,qword ptr [RDI + 0x1c8]
MOV RCX,qword ptr [RCX + RAX*0x8]
MOV RAX,qword ptr [RCX]
LEA EDX,[RSI + RSI*0x1]
MOVSXD RDX,EDX
MOV RAX,qword ptr [RAX + 0x18]
MOV EDX,dword ptr [RAX + RDX*0x4]
LEA ESI,[0x1 + RSI*0x2]
MOVSXD RSI,ESI
MOVSXD RAX,dword ptr [RAX + RSI*0x4]
SHL RAX,0x2
ADD RAX,qword ptr [RCX + 0x18]
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceFVarValues(int, int) const */
int1 [16] __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceFVarValues(Level *this,int param_1,int param_2)
{
long *plVar1;
long lVar2;
int1 auVar3 [16];
plVar1 = *(long **)(*(long *)(this + 0x1c8) + (long)param_2 * 8);
lVar2 = *(long *)(*plVar1 + 0x18);
auVar3._0_8_ = (long)*(int *)(lVar2 + (long)(param_1 * 2 + 1) * 4) * 4 + plVar1[3];
auVar3._8_4_ = *(int4 *)(lVar2 + (long)(param_1 * 2) * 4);
auVar3._12_4_ = 0;
return auVar3;
}
| |
55,176 | OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceFVarValues(int, int) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/level.cpp | ConstIndexArray
Level::getFaceFVarValues(Index faceIndex, int channel) const {
return _fvarChannels[channel]->getFaceValues(faceIndex);
} | O3 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceFVarValues(int, int) const:
movslq %edx, %rax
movq 0x1c8(%rdi), %rcx
movq (%rcx,%rax,8), %rcx
movq (%rcx), %rax
leal (%rsi,%rsi), %edx
movslq %edx, %rdx
movq 0x18(%rax), %rax
movl (%rax,%rdx,4), %edx
leal 0x1(,%rsi,2), %esi
movslq %esi, %rsi
movslq (%rax,%rsi,4), %rax
shlq $0x2, %rax
addq 0x18(%rcx), %rax
retq
nop
| _ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level17getFaceFVarValuesEii:
movsxd rax, edx
mov rcx, [rdi+1C8h]
mov rcx, [rcx+rax*8]
mov rax, [rcx]
lea edx, [rsi+rsi]
movsxd rdx, edx
mov rax, [rax+18h]
mov edx, [rax+rdx*4]
lea esi, ds:1[rsi*2]
movsxd rsi, esi
movsxd rax, dword ptr [rax+rsi*4]
shl rax, 2
add rax, [rcx+18h]
retn
| long long OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceFVarValues(
OpenSubdiv::v3_6_0::Vtr::internal::Level *this,
int a2,
int a3)
{
_QWORD *v3; // rcx
v3 = *(_QWORD **)(*((_QWORD *)this + 57) + 8LL * a3);
return v3[3] + 4LL * *(int *)(*(_QWORD *)(*v3 + 24LL) + 4LL * (2 * a2 + 1));
}
| getFaceFVarValues:
MOVSXD RAX,EDX
MOV RCX,qword ptr [RDI + 0x1c8]
MOV RCX,qword ptr [RCX + RAX*0x8]
MOV RAX,qword ptr [RCX]
LEA EDX,[RSI + RSI*0x1]
MOVSXD RDX,EDX
MOV RAX,qword ptr [RAX + 0x18]
MOV EDX,dword ptr [RAX + RDX*0x4]
LEA ESI,[0x1 + RSI*0x2]
MOVSXD RSI,ESI
MOVSXD RAX,dword ptr [RAX + RSI*0x4]
SHL RAX,0x2
ADD RAX,qword ptr [RCX + 0x18]
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceFVarValues(int, int) const */
int1 [16] __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceFVarValues(Level *this,int param_1,int param_2)
{
long *plVar1;
long lVar2;
int1 auVar3 [16];
plVar1 = *(long **)(*(long *)(this + 0x1c8) + (long)param_2 * 8);
lVar2 = *(long *)(*plVar1 + 0x18);
auVar3._0_8_ = (long)*(int *)(lVar2 + (long)(param_1 * 2 + 1) * 4) * 4 + plVar1[3];
auVar3._8_4_ = *(int4 *)(lVar2 + (long)(param_1 * 2) * 4);
auVar3._12_4_ = 0;
return auVar3;
}
| |
55,177 | google::protobuf::internal::DynamicMapField::DynamicMapField(google::protobuf::Message const*, google::protobuf::Arena*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/map_field.h | explicit MapFieldBase(Arena* arena)
: arena_(arena), repeated_field_(nullptr), state_(STATE_MODIFIED_MAP) {} | O3 | c | google::protobuf::internal::DynamicMapField::DynamicMapField(google::protobuf::Message const*, google::protobuf::Arena*):
movq %rdx, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x30(%rdi)
movl $0x0, 0x40(%rdi)
leaq 0x8d41d(%rip), %rax # 0xffe78
movq %rax, (%rdi)
xorl %eax, %eax
movq %rax, 0x48(%rdi)
movl $0x1, %ecx
movq %rcx, 0x50(%rdi)
movq %rax, 0x58(%rdi)
movq %rcx, 0x60(%rdi)
leaq 0x4b48c(%rip), %rax # 0xbdf08
movq %rax, 0x68(%rdi)
movq %rdx, 0x70(%rdi)
movq %rsi, 0x78(%rdi)
retq
nop
| _ZN6google8protobuf8internal15DynamicMapFieldC2EPKNS0_7MessageEPNS0_5ArenaE:
mov [rdi+8], rdx
xorps xmm0, xmm0
movups xmmword ptr [rdi+10h], xmm0
movups xmmword ptr [rdi+20h], xmm0
movups xmmword ptr [rdi+30h], xmm0
mov dword ptr [rdi+40h], 0
lea rax, off_FFE78
mov [rdi], rax
xor eax, eax
mov [rdi+48h], rax
mov ecx, 1
mov [rdi+50h], rcx
mov [rdi+58h], rax
mov [rdi+60h], rcx
lea rax, _ZN6google8protobuf8internal17kGlobalEmptyTableE; google::protobuf::internal::kGlobalEmptyTable
mov [rdi+68h], rax
mov [rdi+70h], rdx
mov [rdi+78h], rsi
retn
| void * google::protobuf::internal::DynamicMapField::DynamicMapField(
google::protobuf::internal::DynamicMapField *this,
const google::protobuf::Message *a2,
google::protobuf::Arena *a3)
{
void *result; // rax
*((_QWORD *)this + 1) = a3;
*((_OWORD *)this + 1) = 0LL;
*((_OWORD *)this + 2) = 0LL;
*((_OWORD *)this + 3) = 0LL;
*((_DWORD *)this + 16) = 0;
*(_QWORD *)this = &off_FFE78;
*((_QWORD *)this + 9) = 0LL;
*((_QWORD *)this + 10) = 1LL;
*((_QWORD *)this + 11) = 0LL;
*((_QWORD *)this + 12) = 1LL;
result = &google::protobuf::internal::kGlobalEmptyTable;
*((_QWORD *)this + 13) = &google::protobuf::internal::kGlobalEmptyTable;
*((_QWORD *)this + 14) = a3;
*((_QWORD *)this + 15) = a2;
return result;
}
| DynamicMapField:
MOV qword ptr [RDI + 0x8],RDX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOV dword ptr [RDI + 0x40],0x0
LEA RAX,[0x1ffe78]
MOV qword ptr [RDI],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x48],RAX
MOV ECX,0x1
MOV qword ptr [RDI + 0x50],RCX
MOV qword ptr [RDI + 0x58],RAX
MOV qword ptr [RDI + 0x60],RCX
LEA RAX,[0x1bdf08]
MOV qword ptr [RDI + 0x68],RAX
MOV qword ptr [RDI + 0x70],RDX
MOV qword ptr [RDI + 0x78],RSI
RET
|
/* google::protobuf::internal::DynamicMapField::DynamicMapField(google::protobuf::Message const*,
google::protobuf::Arena*) */
void __thiscall
google::protobuf::internal::DynamicMapField::DynamicMapField
(DynamicMapField *this,Message *param_1,Arena *param_2)
{
*(Arena **)(this + 8) = param_2;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int4 *)(this + 0x40) = 0;
*(int ***)this = &PTR_ContainsMapKey_001ffe78;
*(int8 *)(this + 0x48) = 0;
*(int8 *)(this + 0x50) = 1;
*(int8 *)(this + 0x58) = 0;
*(int8 *)(this + 0x60) = 1;
*(int8 **)(this + 0x68) = &kGlobalEmptyTable;
*(Arena **)(this + 0x70) = param_2;
*(Message **)(this + 0x78) = param_1;
return;
}
| |
55,178 | js_os_dup | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_dup(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
int fd, ret;
if (JS_ToInt32(ctx, &fd, argv[0]))
return JS_EXCEPTION;
ret = js_get_errno(dup(fd));
return JS_NewInt32(ctx, ret);
} | O0 | c | js_os_dup:
subq $0x68, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rdi, 0x20(%rsp)
movl %ecx, 0x1c(%rsp)
movq %r8, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
leaq 0xc(%rsp), %rsi
callq 0x38f20
cmpl $0x0, %eax
je 0x1cb5f
movl $0x0, 0x38(%rsp)
movq $0x6, 0x40(%rsp)
jmp 0x1cbab
movl 0xc(%rsp), %edi
callq 0xe310
movslq %eax, %rdi
callq 0x13a50
movl %eax, 0x8(%rsp)
movq 0x20(%rsp), %rcx
movl 0x8(%rsp), %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
movl 0x4c(%rsp), %eax
movl %eax, 0x58(%rsp)
movq $0x0, 0x60(%rsp)
movq 0x58(%rsp), %rcx
movq 0x60(%rsp), %rax
movq %rcx, 0x38(%rsp)
movq %rax, 0x40(%rsp)
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rdx
addq $0x68, %rsp
retq
nopw (%rax,%rax)
| js_os_dup:
sub rsp, 68h
mov [rsp+68h+var_40], rsi
mov [rsp+68h+var_38], rdx
mov [rsp+68h+var_48], rdi
mov [rsp+68h+var_4C], ecx
mov [rsp+68h+var_58], r8
mov rdi, [rsp+68h+var_48]
mov rax, [rsp+68h+var_58]
mov rdx, [rax]
mov rcx, [rax+8]
lea rsi, [rsp+68h+var_5C]
call JS_ToInt32
cmp eax, 0
jz short loc_1CB5F
mov dword ptr [rsp+68h+var_30], 0
mov [rsp+68h+var_28], 6
jmp short loc_1CBAB
loc_1CB5F:
mov edi, [rsp+68h+var_5C]
call _dup
movsxd rdi, eax
call js_get_errno
mov [rsp+68h+var_60], eax
mov rcx, [rsp+68h+var_48]
mov eax, [rsp+68h+var_60]
mov [rsp+68h+var_18], rcx
mov [rsp+68h+var_1C], eax
mov eax, [rsp+68h+var_1C]
mov dword ptr [rsp+68h+var_10], eax
mov [rsp+68h+var_8], 0
mov rcx, [rsp+68h+var_10]
mov rax, [rsp+68h+var_8]
mov [rsp+68h+var_30], rcx
mov [rsp+68h+var_28], rax
loc_1CBAB:
mov rax, [rsp+68h+var_30]
mov rdx, [rsp+68h+var_28]
add rsp, 68h
retn
| long long js_os_dup(long long a1, long long a2, long long a3, int a4, _QWORD *a5)
{
int v5; // eax
int errno; // [rsp+8h] [rbp-60h]
unsigned int v8; // [rsp+Ch] [rbp-5Ch] BYREF
_QWORD *v9; // [rsp+10h] [rbp-58h]
int v10; // [rsp+1Ch] [rbp-4Ch]
long long v11; // [rsp+20h] [rbp-48h]
long long v12; // [rsp+28h] [rbp-40h]
long long v13; // [rsp+30h] [rbp-38h]
long long v14; // [rsp+38h] [rbp-30h]
long long v15; // [rsp+40h] [rbp-28h]
int v16; // [rsp+4Ch] [rbp-1Ch]
long long v17; // [rsp+50h] [rbp-18h]
long long v18; // [rsp+58h] [rbp-10h]
long long v19; // [rsp+60h] [rbp-8h]
v12 = a2;
v13 = a3;
v11 = a1;
v10 = a4;
v9 = a5;
if ( (unsigned int)JS_ToInt32(a1, &v8, *a5, a5[1]) )
{
LODWORD(v14) = 0;
v15 = 6LL;
}
else
{
v5 = dup(v8);
errno = js_get_errno(v5);
v17 = v11;
v16 = errno;
LODWORD(v18) = errno;
v19 = 0LL;
v14 = v18;
v15 = 0LL;
}
return v14;
}
| js_os_dup:
SUB RSP,0x68
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP + 0x20],RDI
MOV dword ptr [RSP + 0x1c],ECX
MOV qword ptr [RSP + 0x10],R8
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0xc]
CALL 0x00138f20
CMP EAX,0x0
JZ 0x0011cb5f
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x6
JMP 0x0011cbab
LAB_0011cb5f:
MOV EDI,dword ptr [RSP + 0xc]
CALL 0x0010e310
MOVSXD RDI,EAX
CALL 0x00113a50
MOV dword ptr [RSP + 0x8],EAX
MOV RCX,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x50],RCX
MOV dword ptr [RSP + 0x4c],EAX
MOV EAX,dword ptr [RSP + 0x4c]
MOV dword ptr [RSP + 0x58],EAX
MOV qword ptr [RSP + 0x60],0x0
MOV RCX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x38],RCX
MOV qword ptr [RSP + 0x40],RAX
LAB_0011cbab:
MOV RAX,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
ADD RSP,0x68
RET
|
int1 [16]
js_os_dup(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 *param_5)
{
int1 auVar1 [16];
int iVar2;
int local_5c;
int8 *local_58;
int4 local_4c;
int8 local_48;
int8 local_40;
int8 local_38;
int4 local_30;
int4 uStack_2c;
int8 local_28;
int4 uStack_c;
local_58 = param_5;
local_4c = param_4;
local_48 = param_1;
local_40 = param_2;
local_38 = param_3;
iVar2 = JS_ToInt32(param_1,&local_5c,*param_5,param_5[1]);
if (iVar2 == 0) {
iVar2 = dup(local_5c);
local_30 = js_get_errno((long)iVar2);
uStack_2c = uStack_c;
local_28 = 0;
}
else {
local_30 = 0;
local_28 = 6;
}
auVar1._4_4_ = uStack_2c;
auVar1._0_4_ = local_30;
auVar1._8_8_ = local_28;
return auVar1;
}
| |
55,179 | LefDefParser::lefiLayer::addAntennaModel(int) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiLayer.cpp | void
lefiLayer::addAntennaModel(int aOxide)
{
// For version 5.5 only OXIDE1, OXIDE2, OXIDE3, & OXIDE4
// are defined within a macro pin
lefiAntennaModel *amo;
int i;
if (numAntennaModel_ == 0) { // does not have antennaModel
antennaModel_ = (lefiAntennaModel**)
lefMalloc(sizeof(lefiAntennaModel*) * 4);
antennaModelAllocated_ = 4;
for (i = 0; i < 4; i++) {
antennaModel_[i] = (lefiAntennaModel*)
lefMalloc(sizeof(lefiAntennaModel));
antennaModel_[i]->Init();
// just initialize it first
}
antennaModelAllocated_ = 4;
amo = antennaModel_[0];
}
// First can go any oxide, so fill pref oxides models.
for (int idx = 0; idx < aOxide - 1; idx++) {
amo = antennaModel_[idx];
if (!amo->antennaOxide()) {
amo->setAntennaModel(idx + 1);
}
}
amo = antennaModel_[aOxide - 1];
// Oxide has not defined yet
if (amo->antennaOxide()) {
amo->Destroy();
}
if (aOxide > numAntennaModel_) {
numAntennaModel_ = aOxide;
}
amo->Init();
amo->setAntennaModel(aOxide);
currentAntennaModel_ = amo;
return;
} | O0 | cpp | LefDefParser::lefiLayer::addAntennaModel(int):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
cmpl $0x0, 0x3f0(%rax)
jne 0x25b74
movl $0x20, %edi
callq 0x359d0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x3f8(%rax)
movl $0x4, 0x3f4(%rax)
movl $0x0, 0xc(%rsp)
cmpl $0x4, 0xc(%rsp)
jge 0x25b57
movl $0xe0, %edi
callq 0x359d0
movq %rax, %rsi
movq (%rsp), %rax
movq 0x3f8(%rax), %rcx
movslq 0xc(%rsp), %rdx
movq %rsi, (%rcx,%rdx,8)
movq 0x3f8(%rax), %rax
movslq 0xc(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1c520
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x25b0d
movq (%rsp), %rax
movl $0x4, 0x3f4(%rax)
movq 0x3f8(%rax), %rax
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movl $0x0, 0x8(%rsp)
movl 0x8(%rsp), %eax
movl 0x1c(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x25bd4
movq (%rsp), %rax
movq 0x3f8(%rax), %rax
movslq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x1ce10
cmpq $0x0, %rax
jne 0x25bc5
movq 0x10(%rsp), %rdi
movl 0x8(%rsp), %esi
addl $0x1, %esi
callq 0x1c780
jmp 0x25bc7
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x25b7c
movq (%rsp), %rax
movq 0x3f8(%rax), %rax
movl 0x1c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x1ce10
cmpq $0x0, %rax
je 0x25c0c
movq 0x10(%rsp), %rdi
callq 0x1c5f0
movq (%rsp), %rcx
movl 0x1c(%rsp), %eax
cmpl 0x3f0(%rcx), %eax
jle 0x25c2a
movq (%rsp), %rax
movl 0x1c(%rsp), %ecx
movl %ecx, 0x3f0(%rax)
movq 0x10(%rsp), %rdi
callq 0x1c520
movq 0x10(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x1c780
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movq %rcx, 0x3e8(%rax)
addq $0x28, %rsp
retq
nopw (%rax,%rax)
| _ZN12LefDefParser9lefiLayer15addAntennaModelEi:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_C], esi
mov rax, [rsp+28h+var_8]
mov [rsp+28h+var_28], rax
cmp dword ptr [rax+3F0h], 0
jnz loc_25B74
mov edi, offset qword_20; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov rcx, rax
mov rax, [rsp+28h+var_28]
mov [rax+3F8h], rcx
mov dword ptr [rax+3F4h], 4
mov [rsp+28h+var_1C], 0
loc_25B0D:
cmp [rsp+28h+var_1C], 4
jge short loc_25B57
mov edi, offset qword_E0; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov rsi, rax
mov rax, [rsp+28h+var_28]
mov rcx, [rax+3F8h]
movsxd rdx, [rsp+28h+var_1C]
mov [rcx+rdx*8], rsi
mov rax, [rax+3F8h]
movsxd rcx, [rsp+28h+var_1C]
mov rdi, [rax+rcx*8]; this
call _ZN12LefDefParser16lefiAntennaModel4InitEv; LefDefParser::lefiAntennaModel::Init(void)
mov eax, [rsp+28h+var_1C]
add eax, 1
mov [rsp+28h+var_1C], eax
jmp short loc_25B0D
loc_25B57:
mov rax, [rsp+28h+var_28]
mov dword ptr [rax+3F4h], 4
mov rax, [rax+3F8h]
mov rax, [rax]
mov [rsp+28h+var_18], rax
loc_25B74:
mov [rsp+28h+var_20], 0
loc_25B7C:
mov eax, [rsp+28h+var_20]
mov ecx, [rsp+28h+var_C]
sub ecx, 1
cmp eax, ecx
jge short loc_25BD4
mov rax, [rsp+28h+var_28]
mov rax, [rax+3F8h]
movsxd rcx, [rsp+28h+var_20]
mov rax, [rax+rcx*8]
mov [rsp+28h+var_18], rax
mov rdi, [rsp+28h+var_18]; this
call _ZNK12LefDefParser16lefiAntennaModel12antennaOxideEv; LefDefParser::lefiAntennaModel::antennaOxide(void)
cmp rax, 0
jnz short loc_25BC5
mov rdi, [rsp+28h+var_18]; this
mov esi, [rsp+28h+var_20]
add esi, 1; int
call _ZN12LefDefParser16lefiAntennaModel15setAntennaModelEi; LefDefParser::lefiAntennaModel::setAntennaModel(int)
loc_25BC5:
jmp short $+2
loc_25BC7:
mov eax, [rsp+28h+var_20]
add eax, 1
mov [rsp+28h+var_20], eax
jmp short loc_25B7C
loc_25BD4:
mov rax, [rsp+28h+var_28]
mov rax, [rax+3F8h]
mov ecx, [rsp+28h+var_C]
sub ecx, 1
movsxd rcx, ecx
mov rax, [rax+rcx*8]
mov [rsp+28h+var_18], rax
mov rdi, [rsp+28h+var_18]; this
call _ZNK12LefDefParser16lefiAntennaModel12antennaOxideEv; LefDefParser::lefiAntennaModel::antennaOxide(void)
cmp rax, 0
jz short loc_25C0C
mov rdi, [rsp+28h+var_18]; this
call _ZN12LefDefParser16lefiAntennaModel7DestroyEv; LefDefParser::lefiAntennaModel::Destroy(void)
loc_25C0C:
mov rcx, [rsp+28h+var_28]
mov eax, [rsp+28h+var_C]
cmp eax, [rcx+3F0h]
jle short loc_25C2A
mov rax, [rsp+28h+var_28]
mov ecx, [rsp+28h+var_C]
mov [rax+3F0h], ecx
loc_25C2A:
mov rdi, [rsp+28h+var_18]; this
call _ZN12LefDefParser16lefiAntennaModel4InitEv; LefDefParser::lefiAntennaModel::Init(void)
mov rdi, [rsp+28h+var_18]; this
mov esi, [rsp+28h+var_C]; int
call _ZN12LefDefParser16lefiAntennaModel15setAntennaModelEi; LefDefParser::lefiAntennaModel::setAntennaModel(int)
mov rax, [rsp+28h+var_28]
mov rcx, [rsp+28h+var_18]
mov [rax+3E8h], rcx
add rsp, 28h
retn
| LefDefParser::lefiLayer * LefDefParser::lefiLayer::addAntennaModel(
LefDefParser::lefiLayer *this,
unsigned long long a2)
{
LefDefParser::lefiLayer *result; // rax
int j; // [rsp+8h] [rbp-20h]
int i; // [rsp+Ch] [rbp-1Ch]
LefDefParser **v5; // [rsp+10h] [rbp-18h]
LefDefParser::lefiAntennaModel *v6; // [rsp+10h] [rbp-18h]
int v7; // [rsp+1Ch] [rbp-Ch]
v7 = a2;
if ( !*((_DWORD *)this + 252) )
{
*((_QWORD *)this + 127) = LefDefParser::lefMalloc((LefDefParser *)&qword_20, a2);
*((_DWORD *)this + 253) = 4;
for ( i = 0; i < 4; ++i )
{
a2 = LefDefParser::lefMalloc((LefDefParser *)&qword_E0, a2);
*(_QWORD *)(*((_QWORD *)this + 127) + 8LL * i) = a2;
LefDefParser::lefiAntennaModel::Init(*(LefDefParser::lefiAntennaModel **)(*((_QWORD *)this + 127) + 8LL * i));
}
*((_DWORD *)this + 253) = 4;
}
for ( j = 0; j < v7 - 1; ++j )
{
v5 = *(LefDefParser ***)(*((_QWORD *)this + 127) + 8LL * j);
if ( !LefDefParser::lefiAntennaModel::antennaOxide((LefDefParser::lefiAntennaModel *)v5) )
{
a2 = (unsigned int)(j + 1);
LefDefParser::lefiAntennaModel::setAntennaModel(v5, (void *)a2);
}
}
v6 = *(LefDefParser::lefiAntennaModel **)(*((_QWORD *)this + 127) + 8LL * (v7 - 1));
if ( LefDefParser::lefiAntennaModel::antennaOxide(v6) )
LefDefParser::lefiAntennaModel::Destroy(v6, (void *)a2);
if ( v7 > *((_DWORD *)this + 252) )
*((_DWORD *)this + 252) = v7;
LefDefParser::lefiAntennaModel::Init(v6);
LefDefParser::lefiAntennaModel::setAntennaModel((LefDefParser **)v6, (void *)(unsigned int)v7);
result = this;
*((_QWORD *)this + 125) = v6;
return result;
}
| addAntennaModel:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV dword ptr [RSP + 0x1c],ESI
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP],RAX
CMP dword ptr [RAX + 0x3f0],0x0
JNZ 0x00125b74
MOV EDI,0x20
CALL 0x001359d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RAX + 0x3f8],RCX
MOV dword ptr [RAX + 0x3f4],0x4
MOV dword ptr [RSP + 0xc],0x0
LAB_00125b0d:
CMP dword ptr [RSP + 0xc],0x4
JGE 0x00125b57
MOV EDI,0xe0
CALL 0x001359d0
MOV RSI,RAX
MOV RAX,qword ptr [RSP]
MOV RCX,qword ptr [RAX + 0x3f8]
MOVSXD RDX,dword ptr [RSP + 0xc]
MOV qword ptr [RCX + RDX*0x8],RSI
MOV RAX,qword ptr [RAX + 0x3f8]
MOVSXD RCX,dword ptr [RSP + 0xc]
MOV RDI,qword ptr [RAX + RCX*0x8]
CALL 0x0011c520
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc],EAX
JMP 0x00125b0d
LAB_00125b57:
MOV RAX,qword ptr [RSP]
MOV dword ptr [RAX + 0x3f4],0x4
MOV RAX,qword ptr [RAX + 0x3f8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x10],RAX
LAB_00125b74:
MOV dword ptr [RSP + 0x8],0x0
LAB_00125b7c:
MOV EAX,dword ptr [RSP + 0x8]
MOV ECX,dword ptr [RSP + 0x1c]
SUB ECX,0x1
CMP EAX,ECX
JGE 0x00125bd4
MOV RAX,qword ptr [RSP]
MOV RAX,qword ptr [RAX + 0x3f8]
MOVSXD RCX,dword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0011ce10
CMP RAX,0x0
JNZ 0x00125bc5
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,dword ptr [RSP + 0x8]
ADD ESI,0x1
CALL 0x0011c780
LAB_00125bc5:
JMP 0x00125bc7
LAB_00125bc7:
MOV EAX,dword ptr [RSP + 0x8]
ADD EAX,0x1
MOV dword ptr [RSP + 0x8],EAX
JMP 0x00125b7c
LAB_00125bd4:
MOV RAX,qword ptr [RSP]
MOV RAX,qword ptr [RAX + 0x3f8]
MOV ECX,dword ptr [RSP + 0x1c]
SUB ECX,0x1
MOVSXD RCX,ECX
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0011ce10
CMP RAX,0x0
JZ 0x00125c0c
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0011c5f0
LAB_00125c0c:
MOV RCX,qword ptr [RSP]
MOV EAX,dword ptr [RSP + 0x1c]
CMP EAX,dword ptr [RCX + 0x3f0]
JLE 0x00125c2a
MOV RAX,qword ptr [RSP]
MOV ECX,dword ptr [RSP + 0x1c]
MOV dword ptr [RAX + 0x3f0],ECX
LAB_00125c2a:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0011c520
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,dword ptr [RSP + 0x1c]
CALL 0x0011c780
MOV RAX,qword ptr [RSP]
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x3e8],RCX
ADD RSP,0x28
RET
|
/* LefDefParser::lefiLayer::addAntennaModel(int) */
void __thiscall LefDefParser::lefiLayer::addAntennaModel(lefiLayer *this,int param_1)
{
lefiAntennaModel *plVar1;
int8 uVar2;
long lVar3;
int local_20;
int local_1c;
if (*(int *)(this + 0x3f0) == 0) {
uVar2 = lefMalloc(0x20);
*(int8 *)(this + 0x3f8) = uVar2;
*(int4 *)(this + 0x3f4) = 4;
for (local_1c = 0; local_1c < 4; local_1c = local_1c + 1) {
uVar2 = lefMalloc(0xe0);
*(int8 *)(*(long *)(this + 0x3f8) + (long)local_1c * 8) = uVar2;
lefiAntennaModel::Init(*(lefiAntennaModel **)(*(long *)(this + 0x3f8) + (long)local_1c * 8));
}
*(int4 *)(this + 0x3f4) = 4;
}
for (local_20 = 0; local_20 < param_1 + -1; local_20 = local_20 + 1) {
plVar1 = *(lefiAntennaModel **)(*(long *)(this + 0x3f8) + (long)local_20 * 8);
lVar3 = lefiAntennaModel::antennaOxide(plVar1);
if (lVar3 == 0) {
lefiAntennaModel::setAntennaModel(plVar1,local_20 + 1);
}
}
plVar1 = *(lefiAntennaModel **)(*(long *)(this + 0x3f8) + (long)(param_1 + -1) * 8);
lVar3 = lefiAntennaModel::antennaOxide(plVar1);
if (lVar3 != 0) {
lefiAntennaModel::Destroy(plVar1);
}
if (*(int *)(this + 0x3f0) < param_1) {
*(int *)(this + 0x3f0) = param_1;
}
lefiAntennaModel::Init(plVar1);
lefiAntennaModel::setAntennaModel(plVar1,param_1);
*(lefiAntennaModel **)(this + 1000) = plVar1;
return;
}
| |
55,180 | psi_rwlock_tryrdlock | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD
int psi_rwlock_tryrdlock(mysql_rwlock_t *that, const char *file, uint line)
{
PSI_rwlock_locker_state state;
PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_rdwait)
(&state, that->m_psi, PSI_RWLOCK_TRYREADLOCK, file, line);
int result= rw_tryrdlock(&that->m_rwlock);
if (locker)
PSI_RWLOCK_CALL(end_rwlock_rdwait)(locker, result);
return result;
} | O3 | c | psi_rwlock_tryrdlock:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edx, %r8d
movq %rsi, %rcx
movq %rdi, %r14
leaq 0x2cafa9(%rip), %r15 # 0x2ef830
movq (%r15), %rax
movq 0x90(%rdi), %rsi
leaq -0x48(%rbp), %rdi
pushq $0x2
popq %rdx
callq *0x1a0(%rax)
movq %rax, %rbx
movq %r14, %rdi
callq 0x273b2
movl %eax, %r14d
testq %rbx, %rbx
je 0x248c0
movq (%r15), %rax
movq %rbx, %rdi
movl %r14d, %esi
callq *0x1a8(%rax)
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| psi_rwlock_tryrdlock:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 38h
mov r8d, edx
mov rcx, rsi
mov r14, rdi
lea r15, PSI_server
mov rax, [r15]
mov rsi, [rdi+90h]
lea rdi, [rbp+var_48]
push 2
pop rdx
call qword ptr [rax+1A0h]
mov rbx, rax
mov rdi, r14
call my_rw_tryrdlock
mov r14d, eax
test rbx, rbx
jz short loc_248C0
mov rax, [r15]
mov rdi, rbx
mov esi, r14d
call qword ptr [rax+1A8h]
loc_248C0:
mov eax, r14d
add rsp, 38h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long psi_rwlock_tryrdlock(long long a1, long long a2, unsigned int a3)
{
long long v3; // rbx
unsigned int v4; // r14d
_BYTE v6[72]; // [rsp+8h] [rbp-48h] BYREF
v3 = (*((long long ( **)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[0] + 52))(
v6,
*(_QWORD *)(a1 + 144),
2LL,
a2,
a3);
v4 = my_rw_tryrdlock(a1);
if ( v3 )
(*((void ( **)(long long, _QWORD))PSI_server[0] + 53))(v3, v4);
return v4;
}
| psi_rwlock_tryrdlock:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV R8D,EDX
MOV RCX,RSI
MOV R14,RDI
LEA R15,[0x3ef830]
MOV RAX,qword ptr [R15]
MOV RSI,qword ptr [RDI + 0x90]
LEA RDI,[RBP + -0x48]
PUSH 0x2
POP RDX
CALL qword ptr [RAX + 0x1a0]
MOV RBX,RAX
MOV RDI,R14
CALL 0x001273b2
MOV R14D,EAX
TEST RBX,RBX
JZ 0x001248c0
MOV RAX,qword ptr [R15]
MOV RDI,RBX
MOV ESI,R14D
CALL qword ptr [RAX + 0x1a8]
LAB_001248c0:
MOV EAX,R14D
ADD RSP,0x38
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 psi_rwlock_tryrdlock(long param_1,int8 param_2,int4 param_3)
{
int4 uVar1;
long lVar2;
int1 local_50 [48];
lVar2 = (**(code **)(PSI_server + 0x1a0))
(local_50,*(int8 *)(param_1 + 0x90),2,param_2,param_3);
uVar1 = my_rw_tryrdlock(param_1);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1a8))(lVar2,uVar1);
}
return uVar1;
}
| |
55,181 | my_realpath | eloqsql/mysys/my_symlink.c | int my_realpath(char *to, const char *filename, myf MyFlags)
{
#if defined(HAVE_REALPATH) && !defined(HAVE_BROKEN_REALPATH)
int result=0;
char buff[BUFF_LEN];
char *ptr;
DBUG_ENTER("my_realpath");
DBUG_PRINT("info",("executing realpath"));
if ((ptr=realpath(filename,buff)))
strmake(to, ptr, FN_REFLEN-1);
else
{
/*
Realpath didn't work; Use my_load_path() which is a poor substitute
original name but will at least be able to resolve paths that starts
with '.'.
*/
if (MyFlags)
DBUG_PRINT("error",("realpath failed with errno: %d", errno));
my_errno=errno;
if (MyFlags & MY_WME)
my_error(EE_REALPATH, MYF(0), filename, my_errno);
my_load_path(to, filename, NullS);
if (my_errno == ENOENT)
result= 1;
else
result= -1;
}
DBUG_RETURN(result);
#elif defined(_WIN32)
int ret= GetFullPathName(filename,FN_REFLEN, to, NULL);
if (ret == 0 || ret > FN_REFLEN)
{
my_errno= (ret > FN_REFLEN) ? ENAMETOOLONG : GetLastError();
if (MyFlags & MY_WME)
my_error(EE_REALPATH, MYF(0), filename, my_errno);
/*
GetFullPathName didn't work : use my_load_path() which is a poor
substitute original name but will at least be able to resolve
paths that starts with '.'.
*/
my_load_path(to, filename, NullS);
return -1;
}
#else
my_load_path(to, filename, NullS);
#endif
return 0;
} | O3 | c | my_realpath:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1010, %rsp # imm = 0x1010
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
leaq -0x1030(%rbp), %rsi
movq %r14, %rdi
callq 0x24100
testq %rax, %rax
je 0x310c9
movl $0x1ff, %edx # imm = 0x1FF
movq %rbx, %rdi
movq %rax, %rsi
callq 0x631d4
xorl %eax, %eax
jmp 0x31118
callq 0x24050
movl (%rax), %r12d
callq 0x3193e
movl %r12d, (%rax)
testb $0x10, %r15b
je 0x310f7
callq 0x3193e
movl (%rax), %ecx
movl $0x1a, %edi
xorl %esi, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2cce7
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x34c1c
callq 0x3193e
xorl %ecx, %ecx
cmpl $0x2, (%rax)
sete %cl
leal -0x1(,%rcx,2), %eax
movq %fs:0x28, %rcx
cmpq -0x28(%rbp), %rcx
jne 0x31137
addq $0x1010, %rsp # imm = 0x1010
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x243e0
| my_realpath:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 1010h
mov r15, rdx
mov r14, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_28], rax
lea rsi, [rbp+var_1030]
mov rdi, r14
call _realpath
test rax, rax
jz short loc_310C9
mov edx, 1FFh
mov rdi, rbx
mov rsi, rax
call strmake
xor eax, eax
jmp short loc_31118
loc_310C9:
call ___errno_location
mov r12d, [rax]
call _my_thread_var
mov [rax], r12d
test r15b, 10h
jz short loc_310F7
call _my_thread_var
mov ecx, [rax]
mov edi, 1Ah
xor esi, esi
mov rdx, r14
xor eax, eax
call my_error
loc_310F7:
mov rdi, rbx
mov rsi, r14
xor edx, edx
call my_load_path
call _my_thread_var
xor ecx, ecx
cmp dword ptr [rax], 2
setz cl
lea eax, ds:0FFFFFFFFFFFFFFFFh[rcx*2]
loc_31118:
mov rcx, fs:28h
cmp rcx, [rbp+var_28]
jnz short loc_31137
add rsp, 1010h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_31137:
call ___stack_chk_fail
| long long my_realpath(long long a1, long long a2, char a3)
{
long long v4; // rax
int v6; // r12d
long long v7; // rdx
long long v8; // rcx
long long v9; // r8
long long v10; // r9
long long v11; // rdx
long long v12; // rcx
long long v13; // r8
long long v14; // r9
unsigned int *v15; // rax
long long v16; // rdx
long long v17; // rcx
long long v18; // r8
long long v19; // r9
_BYTE v20[4104]; // [rsp+0h] [rbp-1030h] BYREF
unsigned long long v21; // [rsp+1008h] [rbp-28h]
v21 = __readfsqword(0x28u);
v4 = realpath(a2, v20);
if ( v4 )
{
strmake(a1, v4, 511LL);
return 0LL;
}
else
{
v6 = *(_DWORD *)__errno_location(a2);
*(_DWORD *)my_thread_var(a2, v20, v7, v8, v9, v10) = v6;
if ( (a3 & 0x10) != 0 )
{
v15 = (unsigned int *)my_thread_var(a2, v20, v11, v12, v13, v14);
my_error(0x1Au, 0LL, a2, *v15);
}
my_load_path(a1, a2, 0LL);
return 2 * (unsigned int)(*(_DWORD *)my_thread_var(a1, a2, v16, v17, v18, v19) == 2) - 1;
}
}
| my_realpath:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x1010
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
LEA RSI,[RBP + -0x1030]
MOV RDI,R14
CALL 0x00124100
TEST RAX,RAX
JZ 0x001310c9
MOV EDX,0x1ff
MOV RDI,RBX
MOV RSI,RAX
CALL 0x001631d4
XOR EAX,EAX
JMP 0x00131118
LAB_001310c9:
CALL 0x00124050
MOV R12D,dword ptr [RAX]
CALL 0x0013193e
MOV dword ptr [RAX],R12D
TEST R15B,0x10
JZ 0x001310f7
CALL 0x0013193e
MOV ECX,dword ptr [RAX]
MOV EDI,0x1a
XOR ESI,ESI
MOV RDX,R14
XOR EAX,EAX
CALL 0x0012cce7
LAB_001310f7:
MOV RDI,RBX
MOV RSI,R14
XOR EDX,EDX
CALL 0x00134c1c
CALL 0x0013193e
XOR ECX,ECX
CMP dword ptr [RAX],0x2
SETZ CL
LEA EAX,[-0x1 + RCX*0x2]
LAB_00131118:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x28]
JNZ 0x00131137
ADD RSP,0x1010
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00131137:
CALL 0x001243e0
|
int my_realpath(int8 param_1,char *param_2,ulong param_3)
{
int iVar1;
char *pcVar2;
int *piVar3;
int4 *puVar4;
long in_FS_OFFSET;
char local_1038 [4104];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
pcVar2 = realpath(param_2,local_1038);
if (pcVar2 == (char *)0x0) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar3 = (int *)_my_thread_var();
*piVar3 = iVar1;
if ((param_3 & 0x10) != 0) {
puVar4 = (int4 *)_my_thread_var();
my_error(0x1a,0,param_2,*puVar4);
}
my_load_path(param_1,param_2,0);
piVar3 = (int *)_my_thread_var();
iVar1 = (uint)(*piVar3 == 2) * 2 + -1;
}
else {
strmake(param_1,pcVar2,0x1ff);
iVar1 = 0;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_30) {
return iVar1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
55,182 | String::append_for_single_quote(char const*, unsigned long) | eloqsql/sql/sql_string.cc | bool String::append_for_single_quote(const char *st, size_t len)
{
const char *end= st+len;
for (; st < end; st++)
{
uchar c= *st;
switch (c)
{
case '\\': APPEND(STRING_WITH_LEN("\\\\"));
case '\0': APPEND(STRING_WITH_LEN("\\0"));
case '\'': APPEND(STRING_WITH_LEN("\\'"));
case '\n': APPEND(STRING_WITH_LEN("\\n"));
case '\r': APPEND(STRING_WITH_LEN("\\r"));
case '\032': APPEND(STRING_WITH_LEN("\\Z"));
default: APPEND(c);
}
}
return 0;
} | O0 | cpp | String::append_for_single_quote(char const*, unsigned long):
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 %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x60480
movq -0x18(%rbp), %rax
movb (%rax), %al
movb %al, -0x29(%rbp)
movzbl -0x29(%rbp), %eax
movl %eax, -0x3c(%rbp)
testl %eax, %eax
je 0x60397
jmp 0x6032c
movl -0x3c(%rbp), %eax
subl $0xa, %eax
je 0x603e9
jmp 0x6033a
movl -0x3c(%rbp), %eax
subl $0xd, %eax
je 0x6040c
jmp 0x60348
movl -0x3c(%rbp), %eax
subl $0x1a, %eax
je 0x6042f
jmp 0x60356
movl -0x3c(%rbp), %eax
subl $0x27, %eax
je 0x603c0
jmp 0x60360
movl -0x3c(%rbp), %eax
subl $0x5c, %eax
jne 0x60452
jmp 0x6036e
movq -0x38(%rbp), %rdi
leaq 0xb2339(%rip), %rsi # 0x1126b2
movl $0x2, %edx
callq 0x4bfc0
testb $0x1, %al
jne 0x60389
jmp 0x60392
movb $0x1, -0x1(%rbp)
jmp 0x60484
jmp 0x6046d
movq -0x38(%rbp), %rdi
leaq 0xb2313(%rip), %rsi # 0x1126b5
movl $0x2, %edx
callq 0x4bfc0
testb $0x1, %al
jne 0x603b2
jmp 0x603bb
movb $0x1, -0x1(%rbp)
jmp 0x60484
jmp 0x6046d
movq -0x38(%rbp), %rdi
leaq 0xb22ed(%rip), %rsi # 0x1126b8
movl $0x2, %edx
callq 0x4bfc0
testb $0x1, %al
jne 0x603db
jmp 0x603e4
movb $0x1, -0x1(%rbp)
jmp 0x60484
jmp 0x6046d
movq -0x38(%rbp), %rdi
leaq 0xb22c7(%rip), %rsi # 0x1126bb
movl $0x2, %edx
callq 0x4bfc0
testb $0x1, %al
jne 0x60404
jmp 0x6040a
movb $0x1, -0x1(%rbp)
jmp 0x60484
jmp 0x6046d
movq -0x38(%rbp), %rdi
leaq 0xb22a7(%rip), %rsi # 0x1126be
movl $0x2, %edx
callq 0x4bfc0
testb $0x1, %al
jne 0x60427
jmp 0x6042d
movb $0x1, -0x1(%rbp)
jmp 0x60484
jmp 0x6046d
movq -0x38(%rbp), %rdi
leaq 0xb2287(%rip), %rsi # 0x1126c1
movl $0x2, %edx
callq 0x4bfc0
testb $0x1, %al
jne 0x6044a
jmp 0x60450
movb $0x1, -0x1(%rbp)
jmp 0x60484
jmp 0x6046d
movq -0x38(%rbp), %rdi
movsbl -0x29(%rbp), %esi
callq 0x67460
testb $0x1, %al
jne 0x60465
jmp 0x6046b
movb $0x1, -0x1(%rbp)
jmp 0x60484
jmp 0x6046d
jmp 0x6046f
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x60308
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nop
| _ZN6String23append_for_single_quoteEPKcm:
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 [rbp+var_38], rax
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_28], rax
loc_60308:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_28]
jnb loc_60480
mov rax, [rbp+var_18]
mov al, [rax]
mov [rbp+var_29], al
movzx eax, [rbp+var_29]
mov [rbp+var_3C], eax
test eax, eax
jz short loc_60397
jmp short $+2
loc_6032C:
mov eax, [rbp+var_3C]
sub eax, 0Ah
jz loc_603E9
jmp short $+2
loc_6033A:
mov eax, [rbp+var_3C]
sub eax, 0Dh
jz loc_6040C
jmp short $+2
loc_60348:
mov eax, [rbp+var_3C]
sub eax, 1Ah
jz loc_6042F
jmp short $+2
loc_60356:
mov eax, [rbp+var_3C]
sub eax, 27h ; '''
jz short loc_603C0
jmp short $+2
loc_60360:
mov eax, [rbp+var_3C]
sub eax, 5Ch ; '\'
jnz loc_60452
jmp short $+2
loc_6036E:
mov rdi, [rbp+var_38]; this
lea rsi, asc_1126B2; "\\\\"
mov edx, 2; unsigned __int64
call _ZN6String6appendEPKcm; String::append(char const*,ulong)
test al, 1
jnz short loc_60389
jmp short loc_60392
loc_60389:
mov [rbp+var_1], 1
jmp loc_60484
loc_60392:
jmp loc_6046D
loc_60397:
mov rdi, [rbp+var_38]; this
lea rsi, a0; "\\0"
mov edx, 2; unsigned __int64
call _ZN6String6appendEPKcm; String::append(char const*,ulong)
test al, 1
jnz short loc_603B2
jmp short loc_603BB
loc_603B2:
mov [rbp+var_1], 1
jmp loc_60484
loc_603BB:
jmp loc_6046D
loc_603C0:
mov rdi, [rbp+var_38]; this
lea rsi, asc_1126B8; "\\'"
mov edx, 2; unsigned __int64
call _ZN6String6appendEPKcm; String::append(char const*,ulong)
test al, 1
jnz short loc_603DB
jmp short loc_603E4
loc_603DB:
mov [rbp+var_1], 1
jmp loc_60484
loc_603E4:
jmp loc_6046D
loc_603E9:
mov rdi, [rbp+var_38]; this
lea rsi, aN; "\\n"
mov edx, 2; unsigned __int64
call _ZN6String6appendEPKcm; String::append(char const*,ulong)
test al, 1
jnz short loc_60404
jmp short loc_6040A
loc_60404:
mov [rbp+var_1], 1
jmp short loc_60484
loc_6040A:
jmp short loc_6046D
loc_6040C:
mov rdi, [rbp+var_38]; this
lea rsi, aR; "\\r"
mov edx, 2; unsigned __int64
call _ZN6String6appendEPKcm; String::append(char const*,ulong)
test al, 1
jnz short loc_60427
jmp short loc_6042D
loc_60427:
mov [rbp+var_1], 1
jmp short loc_60484
loc_6042D:
jmp short loc_6046D
loc_6042F:
mov rdi, [rbp+var_38]; this
lea rsi, aZ; "\\Z"
mov edx, 2; unsigned __int64
call _ZN6String6appendEPKcm; String::append(char const*,ulong)
test al, 1
jnz short loc_6044A
jmp short loc_60450
loc_6044A:
mov [rbp+var_1], 1
jmp short loc_60484
loc_60450:
jmp short loc_6046D
loc_60452:
mov rdi, [rbp+var_38]; this
movsx esi, [rbp+var_29]; char
call _ZN6String6appendEc; String::append(char)
test al, 1
jnz short loc_60465
jmp short loc_6046B
loc_60465:
mov [rbp+var_1], 1
jmp short loc_60484
loc_6046B:
jmp short $+2
loc_6046D:
jmp short $+2
loc_6046F:
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp loc_60308
loc_60480:
mov [rbp+var_1], 0
loc_60484:
mov al, [rbp+var_1]
and al, 1
add rsp, 40h
pop rbp
retn
| char String::append_for_single_quote(String *this, char *a2, long long a3)
{
int v4; // [rsp+4h] [rbp-3Ch]
const char *v5; // [rsp+18h] [rbp-28h]
char *v6; // [rsp+28h] [rbp-18h]
v6 = a2;
v5 = &a2[a3];
while ( v6 < v5 )
{
v4 = (unsigned __int8)*v6;
if ( *v6 )
{
switch ( v4 )
{
case 10:
if ( (String::append(this, "\\n", 2LL) & 1) != 0 )
return 1;
break;
case 13:
if ( (String::append(this, "\\r", 2LL) & 1) != 0 )
return 1;
break;
case 26:
if ( (String::append(this, "\\Z", 2LL) & 1) != 0 )
return 1;
break;
case 39:
if ( (String::append(this, "\\'", 2LL) & 1) != 0 )
return 1;
break;
case 92:
if ( (String::append(this, "\\\\", 2LL) & 1) != 0 )
return 1;
break;
default:
if ( (String::append(this, *v6) & 1) != 0 )
return 1;
break;
}
}
else if ( (String::append(this, "\\0", 2LL) & 1) != 0 )
{
return 1;
}
++v6;
}
return 0;
}
| append_for_single_quote:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x28],RAX
LAB_00160308:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x28]
JNC 0x00160480
MOV RAX,qword ptr [RBP + -0x18]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x29],AL
MOVZX EAX,byte ptr [RBP + -0x29]
MOV dword ptr [RBP + -0x3c],EAX
TEST EAX,EAX
JZ 0x00160397
JMP 0x0016032c
LAB_0016032c:
MOV EAX,dword ptr [RBP + -0x3c]
SUB EAX,0xa
JZ 0x001603e9
JMP 0x0016033a
LAB_0016033a:
MOV EAX,dword ptr [RBP + -0x3c]
SUB EAX,0xd
JZ 0x0016040c
JMP 0x00160348
LAB_00160348:
MOV EAX,dword ptr [RBP + -0x3c]
SUB EAX,0x1a
JZ 0x0016042f
JMP 0x00160356
LAB_00160356:
MOV EAX,dword ptr [RBP + -0x3c]
SUB EAX,0x27
JZ 0x001603c0
JMP 0x00160360
LAB_00160360:
MOV EAX,dword ptr [RBP + -0x3c]
SUB EAX,0x5c
JNZ 0x00160452
JMP 0x0016036e
LAB_0016036e:
MOV RDI,qword ptr [RBP + -0x38]
LEA RSI,[0x2126b2]
MOV EDX,0x2
CALL 0x0014bfc0
TEST AL,0x1
JNZ 0x00160389
JMP 0x00160392
LAB_00160389:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00160484
LAB_00160392:
JMP 0x0016046d
LAB_00160397:
MOV RDI,qword ptr [RBP + -0x38]
LEA RSI,[0x2126b5]
MOV EDX,0x2
CALL 0x0014bfc0
TEST AL,0x1
JNZ 0x001603b2
JMP 0x001603bb
LAB_001603b2:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00160484
LAB_001603bb:
JMP 0x0016046d
LAB_001603c0:
MOV RDI,qword ptr [RBP + -0x38]
LEA RSI,[0x2126b8]
MOV EDX,0x2
CALL 0x0014bfc0
TEST AL,0x1
JNZ 0x001603db
JMP 0x001603e4
LAB_001603db:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00160484
LAB_001603e4:
JMP 0x0016046d
LAB_001603e9:
MOV RDI,qword ptr [RBP + -0x38]
LEA RSI,[0x2126bb]
MOV EDX,0x2
CALL 0x0014bfc0
TEST AL,0x1
JNZ 0x00160404
JMP 0x0016040a
LAB_00160404:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00160484
LAB_0016040a:
JMP 0x0016046d
LAB_0016040c:
MOV RDI,qword ptr [RBP + -0x38]
LEA RSI,[0x2126be]
MOV EDX,0x2
CALL 0x0014bfc0
TEST AL,0x1
JNZ 0x00160427
JMP 0x0016042d
LAB_00160427:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00160484
LAB_0016042d:
JMP 0x0016046d
LAB_0016042f:
MOV RDI,qword ptr [RBP + -0x38]
LEA RSI,[0x2126c1]
MOV EDX,0x2
CALL 0x0014bfc0
TEST AL,0x1
JNZ 0x0016044a
JMP 0x00160450
LAB_0016044a:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00160484
LAB_00160450:
JMP 0x0016046d
LAB_00160452:
MOV RDI,qword ptr [RBP + -0x38]
MOVSX ESI,byte ptr [RBP + -0x29]
CALL 0x00167460
TEST AL,0x1
JNZ 0x00160465
JMP 0x0016046b
LAB_00160465:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00160484
LAB_0016046b:
JMP 0x0016046d
LAB_0016046d:
JMP 0x0016046f
LAB_0016046f:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00160308
LAB_00160480:
MOV byte ptr [RBP + -0x1],0x0
LAB_00160484:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x40
POP RBP
RET
|
/* String::append_for_single_quote(char const*, unsigned long) */
int1 __thiscall String::append_for_single_quote(String *this,char *param_1,ulong param_2)
{
char cVar1;
ulong uVar2;
char *local_20;
local_20 = param_1;
do {
if (param_1 + param_2 <= local_20) {
return 0;
}
cVar1 = *local_20;
if (cVar1 == '\0') {
uVar2 = append(this,"\\0",2);
if ((uVar2 & 1) != 0) {
return 1;
}
}
else if (cVar1 == '\n') {
uVar2 = append(this,"\\n",2);
if ((uVar2 & 1) != 0) {
return 1;
}
}
else if (cVar1 == '\r') {
uVar2 = append(this,"\\r",2);
if ((uVar2 & 1) != 0) {
return 1;
}
}
else if (cVar1 == '\x1a') {
uVar2 = append(this,"\\Z",2);
if ((uVar2 & 1) != 0) {
return 1;
}
}
else if (cVar1 == '\'') {
uVar2 = append(this,"\\\'",2);
if ((uVar2 & 1) != 0) {
return 1;
}
}
else if (cVar1 == '\\') {
uVar2 = append(this,"\\\\",2);
if ((uVar2 & 1) != 0) {
return 1;
}
}
else {
uVar2 = append(this,cVar1);
if ((uVar2 & 1) != 0) {
return 1;
}
}
local_20 = local_20 + 1;
} while( true );
}
| |
55,183 | remove_io_thread | eloqsql/mysys/mf_iocache.c | void remove_io_thread(IO_CACHE *cache)
{
IO_CACHE_SHARE *cshare= cache->share;
uint total;
DBUG_ENTER("remove_io_thread");
/* If the writer goes, it needs to flush the write cache. */
if (cache == cshare->source_cache)
flush_io_cache(cache);
mysql_mutex_lock(&cshare->mutex);
DBUG_PRINT("io_cache_share", ("%s: %p",
(cache == cshare->source_cache) ?
"writer" : "reader", cache));
/* Remove from share. */
total= --cshare->total_threads;
DBUG_PRINT("io_cache_share", ("remaining threads: %u", total));
/* Detach from share. */
cache->share= NULL;
/* If the writer goes, let the readers know. */
if (cache == cshare->source_cache)
{
DBUG_PRINT("io_cache_share", ("writer leaves"));
cshare->source_cache= NULL;
}
/* If all threads are waiting for me to join the lock, wake them. */
if (!--cshare->running_threads)
{
DBUG_PRINT("io_cache_share", ("the last running thread leaves, wake all"));
mysql_cond_signal(&cshare->cond_writer);
mysql_cond_broadcast(&cshare->cond);
}
mysql_mutex_unlock(&cshare->mutex);
if (!total)
{
DBUG_PRINT("io_cache_share", ("last thread removed, destroy share"));
mysql_cond_destroy (&cshare->cond_writer);
mysql_cond_destroy (&cshare->cond);
mysql_mutex_destroy(&cshare->mutex);
}
DBUG_VOID_RETURN;
} | O0 | c | remove_io_thread:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0xc0(%rcx), %rax
jne 0xe10ca
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0xe05d0
movq -0x10(%rbp), %rdi
leaq 0x71f5a(%rip), %rsi # 0x15302f
movl $0x392, %edx # imm = 0x392
callq 0xe11b0
jmp 0xe10e1
movq -0x10(%rbp), %rcx
movl 0xdc(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0xdc(%rcx)
movl %eax, -0x14(%rbp)
jmp 0xe10f9
movq -0x8(%rbp), %rax
movq $0x0, 0x98(%rax)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0xc0(%rcx), %rax
jne 0xe112c
jmp 0xe111b
jmp 0xe111d
movq -0x10(%rbp), %rax
movq $0x0, 0xc0(%rax)
movq -0x10(%rbp), %rcx
movl 0xd8(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0xd8(%rcx)
cmpl $0x0, %eax
jne 0xe1165
jmp 0xe1146
jmp 0xe1148
movq -0x10(%rbp), %rdi
addq $0x80, %rdi
callq 0xe1220
movq -0x10(%rbp), %rdi
addq $0x48, %rdi
callq 0xe1280
movq -0x10(%rbp), %rdi
callq 0xe12e0
cmpl $0x0, -0x14(%rbp)
jne 0xe119e
jmp 0xe1176
jmp 0xe1178
movq -0x10(%rbp), %rdi
addq $0x80, %rdi
callq 0xe1340
movq -0x10(%rbp), %rdi
addq $0x48, %rdi
callq 0xe1340
movq -0x10(%rbp), %rdi
callq 0xe13b0
jmp 0xe11a0
jmp 0xe11a2
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| remove_io_thread:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rax, [rax+98h]
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
mov rcx, [rbp+var_10]
cmp rax, [rcx+0C0h]
jnz short loc_E10CA
mov rdi, [rbp+var_8]
mov esi, 1
call my_b_flush_io_cache
loc_E10CA:
mov rdi, [rbp+var_10]
lea rsi, aWorkspaceLlm4b_35; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 392h
call inline_mysql_mutex_lock_23
jmp short $+2
loc_E10E1:
mov rcx, [rbp+var_10]
mov eax, [rcx+0DCh]
add eax, 0FFFFFFFFh
mov [rcx+0DCh], eax
mov [rbp+var_14], eax
jmp short $+2
loc_E10F9:
mov rax, [rbp+var_8]
mov qword ptr [rax+98h], 0
mov rax, [rbp+var_8]
mov rcx, [rbp+var_10]
cmp rax, [rcx+0C0h]
jnz short loc_E112C
jmp short $+2
loc_E111B:
jmp short $+2
loc_E111D:
mov rax, [rbp+var_10]
mov qword ptr [rax+0C0h], 0
loc_E112C:
mov rcx, [rbp+var_10]
mov eax, [rcx+0D8h]
add eax, 0FFFFFFFFh
mov [rcx+0D8h], eax
cmp eax, 0
jnz short loc_E1165
jmp short $+2
loc_E1146:
jmp short $+2
loc_E1148:
mov rdi, [rbp+var_10]
add rdi, 80h
call inline_mysql_cond_signal_1
mov rdi, [rbp+var_10]
add rdi, 48h ; 'H'
call inline_mysql_cond_broadcast_2
loc_E1165:
mov rdi, [rbp+var_10]
call inline_mysql_mutex_unlock_24
cmp [rbp+var_14], 0
jnz short loc_E119E
jmp short $+2
loc_E1176:
jmp short $+2
loc_E1178:
mov rdi, [rbp+var_10]
add rdi, 80h
call inline_mysql_cond_destroy_3
mov rdi, [rbp+var_10]
add rdi, 48h ; 'H'
call inline_mysql_cond_destroy_3
mov rdi, [rbp+var_10]
call inline_mysql_mutex_destroy_6
loc_E119E:
jmp short $+2
loc_E11A0:
jmp short $+2
loc_E11A2:
add rsp, 20h
pop rbp
retn
| long long remove_io_thread(long long a1)
{
int v1; // eax
int v2; // eax
long long result; // rax
int v4; // [rsp+Ch] [rbp-14h]
long long v5; // [rsp+10h] [rbp-10h]
v5 = *(_QWORD *)(a1 + 152);
if ( a1 == *(_QWORD *)(v5 + 192) )
my_b_flush_io_cache(a1, 1);
inline_mysql_mutex_lock_23(v5, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 914LL);
v1 = *(_DWORD *)(v5 + 220) - 1;
*(_DWORD *)(v5 + 220) = v1;
v4 = v1;
*(_QWORD *)(a1 + 152) = 0LL;
if ( a1 == *(_QWORD *)(v5 + 192) )
*(_QWORD *)(v5 + 192) = 0LL;
v2 = *(_DWORD *)(v5 + 216) - 1;
*(_DWORD *)(v5 + 216) = v2;
if ( !v2 )
{
inline_mysql_cond_signal_1(v5 + 128);
inline_mysql_cond_broadcast_2(v5 + 72);
}
result = inline_mysql_mutex_unlock_24(v5);
if ( !v4 )
{
inline_mysql_cond_destroy_3(v5 + 128);
inline_mysql_cond_destroy_3(v5 + 72);
return inline_mysql_mutex_destroy_6(v5);
}
return result;
}
| remove_io_thread:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0xc0]
JNZ 0x001e10ca
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,0x1
CALL 0x001e05d0
LAB_001e10ca:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x25302f]
MOV EDX,0x392
CALL 0x001e11b0
JMP 0x001e10e1
LAB_001e10e1:
MOV RCX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RCX + 0xdc]
ADD EAX,-0x1
MOV dword ptr [RCX + 0xdc],EAX
MOV dword ptr [RBP + -0x14],EAX
JMP 0x001e10f9
LAB_001e10f9:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x98],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0xc0]
JNZ 0x001e112c
JMP 0x001e111b
LAB_001e111b:
JMP 0x001e111d
LAB_001e111d:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xc0],0x0
LAB_001e112c:
MOV RCX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RCX + 0xd8]
ADD EAX,-0x1
MOV dword ptr [RCX + 0xd8],EAX
CMP EAX,0x0
JNZ 0x001e1165
JMP 0x001e1146
LAB_001e1146:
JMP 0x001e1148
LAB_001e1148:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x80
CALL 0x001e1220
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x48
CALL 0x001e1280
LAB_001e1165:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001e12e0
CMP dword ptr [RBP + -0x14],0x0
JNZ 0x001e119e
JMP 0x001e1176
LAB_001e1176:
JMP 0x001e1178
LAB_001e1178:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x80
CALL 0x001e1340
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x48
CALL 0x001e1340
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001e13b0
LAB_001e119e:
JMP 0x001e11a0
LAB_001e11a0:
JMP 0x001e11a2
LAB_001e11a2:
ADD RSP,0x20
POP RBP
RET
|
void remove_io_thread(long param_1)
{
long lVar1;
int iVar2;
int iVar3;
lVar1 = *(long *)(param_1 + 0x98);
if (param_1 == *(long *)(lVar1 + 0xc0)) {
my_b_flush_io_cache(param_1,1);
}
inline_mysql_mutex_lock(lVar1,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x392)
;
iVar2 = *(int *)(lVar1 + 0xdc) + -1;
*(int *)(lVar1 + 0xdc) = iVar2;
*(int8 *)(param_1 + 0x98) = 0;
if (param_1 == *(long *)(lVar1 + 0xc0)) {
*(int8 *)(lVar1 + 0xc0) = 0;
}
iVar3 = *(int *)(lVar1 + 0xd8) + -1;
*(int *)(lVar1 + 0xd8) = iVar3;
if (iVar3 == 0) {
inline_mysql_cond_signal(lVar1 + 0x80);
inline_mysql_cond_broadcast(lVar1 + 0x48);
}
inline_mysql_mutex_unlock(lVar1);
if (iVar2 == 0) {
inline_mysql_cond_destroy(lVar1 + 0x80);
inline_mysql_cond_destroy(lVar1 + 0x48);
inline_mysql_mutex_destroy(lVar1);
}
return;
}
| |
55,184 | mz_zip_file_read_func | 7CodeWizard[P]stablediffusion/thirdparty/miniz.h | static size_t mz_zip_file_read_func(void *pOpaque, mz_uint64 file_ofs,
void *pBuf, size_t n) {
mz_zip_archive *pZip = (mz_zip_archive *)pOpaque;
mz_int64 cur_ofs = MZ_FTELL64(pZip->m_pState->m_pFile);
file_ofs += pZip->m_pState->m_file_archive_start_ofs;
if (((mz_int64)file_ofs < 0) ||
(((cur_ofs != (mz_int64)file_ofs)) &&
(MZ_FSEEK64(pZip->m_pState->m_pFile, (mz_int64)file_ofs, SEEK_SET))))
return 0;
return MZ_FREAD(pBuf, 1, n, pZip->m_pState->m_pFile);
} | O0 | c | mz_zip_file_read_func:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq %rcx, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq 0x68(%rax), %rax
movq 0x70(%rax), %rdi
callq 0xb940
movq %rax, (%rsp)
movq 0x8(%rsp), %rax
movq 0x68(%rax), %rax
movq 0x78(%rax), %rax
addq 0x20(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
jl 0xffab0
movq (%rsp), %rax
cmpq 0x20(%rsp), %rax
je 0xffabb
movq 0x8(%rsp), %rax
movq 0x68(%rax), %rax
movq 0x70(%rax), %rdi
movq 0x20(%rsp), %rsi
xorl %edx, %edx
callq 0xb410
cmpl $0x0, %eax
je 0xffabb
movq $0x0, 0x30(%rsp)
jmp 0xffae1
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rax
movq 0x68(%rax), %rax
movq 0x70(%rax), %rcx
movl $0x1, %esi
callq 0xbb40
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
| mz_zip_file_read_func:
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 rax, [rsp+38h+var_10]
mov [rsp+38h+var_30], rax
mov rax, [rsp+38h+var_30]
mov rax, [rax+68h]
mov rdi, [rax+70h]
call _ftello
mov [rsp+38h+var_38], rax
mov rax, [rsp+38h+var_30]
mov rax, [rax+68h]
mov rax, [rax+78h]
add rax, [rsp+38h+var_18]
mov [rsp+38h+var_18], rax
cmp [rsp+38h+var_18], 0
jl short loc_FFAB0
mov rax, [rsp+38h+var_38]
cmp rax, [rsp+38h+var_18]
jz short loc_FFABB
mov rax, [rsp+38h+var_30]
mov rax, [rax+68h]
mov rdi, [rax+70h]
mov rsi, [rsp+38h+var_18]
xor edx, edx
call _fseeko
cmp eax, 0
jz short loc_FFABB
loc_FFAB0:
mov [rsp+38h+var_8], 0
jmp short loc_FFAE1
loc_FFABB:
mov rdi, [rsp+38h+var_20]
mov rdx, [rsp+38h+var_28]
mov rax, [rsp+38h+var_30]
mov rax, [rax+68h]
mov rcx, [rax+70h]
mov esi, 1
call _fread
mov [rsp+38h+var_8], rax
loc_FFAE1:
mov rax, [rsp+38h+var_8]
add rsp, 38h
retn
| long long mz_zip_file_read_func(long long a1, long long a2, long long a3, long long a4)
{
long long v5; // [rsp+0h] [rbp-38h]
long long v8; // [rsp+20h] [rbp-18h]
v5 = ftello(*(_QWORD *)(*(_QWORD *)(a1 + 104) + 112LL));
v8 = a2 + *(_QWORD *)(*(_QWORD *)(a1 + 104) + 120LL);
if ( v8 >= 0 && (v5 == v8 || !(unsigned int)fseeko(*(_QWORD *)(*(_QWORD *)(a1 + 104) + 112LL), v8, 0LL)) )
return fread(a3, 1LL, a4, *(_QWORD *)(*(_QWORD *)(a1 + 104) + 112LL));
else
return 0LL;
}
| mz_zip_file_read_func:
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 RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x68]
MOV RDI,qword ptr [RAX + 0x70]
CALL 0x0010b940
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x68]
MOV RAX,qword ptr [RAX + 0x78]
ADD RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x20],RAX
CMP qword ptr [RSP + 0x20],0x0
JL 0x001ffab0
MOV RAX,qword ptr [RSP]
CMP RAX,qword ptr [RSP + 0x20]
JZ 0x001ffabb
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x68]
MOV RDI,qword ptr [RAX + 0x70]
MOV RSI,qword ptr [RSP + 0x20]
XOR EDX,EDX
CALL 0x0010b410
CMP EAX,0x0
JZ 0x001ffabb
LAB_001ffab0:
MOV qword ptr [RSP + 0x30],0x0
JMP 0x001ffae1
LAB_001ffabb:
MOV RDI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x68]
MOV RCX,qword ptr [RAX + 0x70]
MOV ESI,0x1
CALL 0x0010bb40
MOV qword ptr [RSP + 0x30],RAX
LAB_001ffae1:
MOV RAX,qword ptr [RSP + 0x30]
ADD RSP,0x38
RET
|
size_t mz_zip_file_read_func(long param_1,long param_2,void *param_3,size_t param_4)
{
int iVar1;
__off_t _Var2;
int8 local_8;
_Var2 = ftello(*(FILE **)(*(long *)(param_1 + 0x68) + 0x70));
param_2 = *(long *)(*(long *)(param_1 + 0x68) + 0x78) + param_2;
if (param_2 < 0) {
LAB_001ffab0:
local_8 = 0;
}
else {
if (_Var2 != param_2) {
iVar1 = fseeko(*(FILE **)(*(long *)(param_1 + 0x68) + 0x70),param_2,0);
if (iVar1 != 0) goto LAB_001ffab0;
}
local_8 = fread(param_3,1,param_4,*(FILE **)(*(long *)(param_1 + 0x68) + 0x70));
}
return local_8;
}
| |
55,185 | mz_zip_file_read_func | 7CodeWizard[P]stablediffusion/thirdparty/miniz.h | static size_t mz_zip_file_read_func(void *pOpaque, mz_uint64 file_ofs,
void *pBuf, size_t n) {
mz_zip_archive *pZip = (mz_zip_archive *)pOpaque;
mz_int64 cur_ofs = MZ_FTELL64(pZip->m_pState->m_pFile);
file_ofs += pZip->m_pState->m_file_archive_start_ofs;
if (((mz_int64)file_ofs < 0) ||
(((cur_ofs != (mz_int64)file_ofs)) &&
(MZ_FSEEK64(pZip->m_pState->m_pFile, (mz_int64)file_ofs, SEEK_SET))))
return 0;
return MZ_FREAD(pBuf, 1, n, pZip->m_pState->m_pFile);
} | O1 | c | mz_zip_file_read_func:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movq 0x68(%rdi), %rax
movq 0x70(%rax), %rdi
callq 0xa730
movq 0x68(%r15), %rcx
addq 0x78(%rcx), %r12
js 0x83fb4
cmpq %r12, %rax
je 0x83fc2
movq 0x70(%rcx), %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0xa330
testl %eax, %eax
je 0x83fc2
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x68(%r15), %rax
movq 0x70(%rax), %rcx
movl $0x1, %esi
movq %r14, %rdi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xa910
| mz_zip_file_read_func:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rcx
mov r14, rdx
mov r12, rsi
mov r15, rdi
mov rax, [rdi+68h]
mov rdi, [rax+70h]
call _ftello
mov rcx, [r15+68h]
add r12, [rcx+78h]
js short loc_83FB4
cmp rax, r12
jz short loc_83FC2
mov rdi, [rcx+70h]
mov rsi, r12
xor edx, edx
call _fseeko
test eax, eax
jz short loc_83FC2
loc_83FB4:
xor eax, eax
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_83FC2:
mov rax, [r15+68h]
mov rcx, [rax+70h]
mov esi, 1
mov rdi, r14
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp _fread
| long long mz_zip_file_read_func(long long a1, long long a2, long long a3, long long a4)
{
long long v6; // rax
long long v7; // rcx
long long v8; // r12
v6 = ftello(*(_QWORD *)(*(_QWORD *)(a1 + 104) + 112LL));
v7 = *(_QWORD *)(a1 + 104);
v8 = *(_QWORD *)(v7 + 120) + a2;
if ( v8 >= 0 && (v6 == v8 || !(unsigned int)fseeko(*(_QWORD *)(v7 + 112), v8, 0LL)) )
return fread(a3, 1LL, a4, *(_QWORD *)(*(_QWORD *)(a1 + 104) + 112LL));
else
return 0LL;
}
| |||
55,186 | mz_zip_file_read_func | 7CodeWizard[P]stablediffusion/thirdparty/miniz.h | static size_t mz_zip_file_read_func(void *pOpaque, mz_uint64 file_ofs,
void *pBuf, size_t n) {
mz_zip_archive *pZip = (mz_zip_archive *)pOpaque;
mz_int64 cur_ofs = MZ_FTELL64(pZip->m_pState->m_pFile);
file_ofs += pZip->m_pState->m_file_archive_start_ofs;
if (((mz_int64)file_ofs < 0) ||
(((cur_ofs != (mz_int64)file_ofs)) &&
(MZ_FSEEK64(pZip->m_pState->m_pFile, (mz_int64)file_ofs, SEEK_SET))))
return 0;
return MZ_FREAD(pBuf, 1, n, pZip->m_pState->m_pFile);
} | O2 | c | mz_zip_file_read_func:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movq 0x68(%rdi), %rax
movq 0x70(%rax), %rdi
callq 0xa740
movq 0x68(%r15), %rcx
addq 0x78(%rcx), %r12
js 0x5e74b
cmpq %r12, %rax
je 0x5e75d
movq 0x70(%rcx), %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0xa330
testl %eax, %eax
je 0x5e759
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x68(%r15), %rcx
movq 0x70(%rcx), %rcx
pushq $0x1
popq %rsi
movq %r14, %rdi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xa910
| mz_zip_file_read_func:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rcx
mov r14, rdx
mov r12, rsi
mov r15, rdi
mov rax, [rdi+68h]
mov rdi, [rax+70h]
call _ftello
mov rcx, [r15+68h]
add r12, [rcx+78h]
js short loc_5E74B
cmp rax, r12
jz short loc_5E75D
mov rdi, [rcx+70h]
mov rsi, r12
xor edx, edx
call _fseeko
test eax, eax
jz short loc_5E759
loc_5E74B:
xor eax, eax
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_5E759:
mov rcx, [r15+68h]
loc_5E75D:
mov rcx, [rcx+70h]
push 1
pop rsi
mov rdi, r14
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp _fread
| long long mz_zip_file_read_func(long long a1, long long a2, long long a3, long long a4)
{
long long v6; // rax
long long v7; // rcx
long long v8; // r12
v6 = ftello(*(_QWORD *)(*(_QWORD *)(a1 + 104) + 112LL));
v7 = *(_QWORD *)(a1 + 104);
v8 = *(_QWORD *)(v7 + 120) + a2;
if ( v8 < 0 )
return 0LL;
if ( v6 != v8 )
{
if ( (unsigned int)fseeko(*(_QWORD *)(v7 + 112), v8, 0LL) )
return 0LL;
v7 = *(_QWORD *)(a1 + 104);
}
return fread(a3, 1LL, a4, *(_QWORD *)(v7 + 112));
}
| mz_zip_file_read_func:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RCX
MOV R14,RDX
MOV R12,RSI
MOV R15,RDI
MOV RAX,qword ptr [RDI + 0x68]
MOV RDI,qword ptr [RAX + 0x70]
CALL 0x0010a740
MOV RCX,qword ptr [R15 + 0x68]
ADD R12,qword ptr [RCX + 0x78]
JS 0x0015e74b
CMP RAX,R12
JZ 0x0015e75d
MOV RDI,qword ptr [RCX + 0x70]
MOV RSI,R12
XOR EDX,EDX
CALL 0x0010a330
TEST EAX,EAX
JZ 0x0015e759
LAB_0015e74b:
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0015e759:
MOV RCX,qword ptr [R15 + 0x68]
LAB_0015e75d:
MOV RCX,qword ptr [RCX + 0x70]
PUSH 0x1
POP RSI
MOV RDI,R14
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x0010a910
|
size_t mz_zip_file_read_func(long param_1,long param_2,void *param_3,size_t param_4)
{
int iVar1;
__off_t _Var2;
size_t sVar3;
long lVar4;
_Var2 = ftello(*(FILE **)(*(long *)(param_1 + 0x68) + 0x70));
lVar4 = *(long *)(param_1 + 0x68);
param_2 = param_2 + *(long *)(lVar4 + 0x78);
if (param_2 < 0) {
return 0;
}
if (_Var2 != param_2) {
iVar1 = fseeko(*(FILE **)(lVar4 + 0x70),param_2,0);
if (iVar1 != 0) {
return 0;
}
lVar4 = *(long *)(param_1 + 0x68);
}
sVar3 = fread(param_3,1,param_4,*(FILE **)(lVar4 + 0x70));
return sVar3;
}
| |
55,187 | mz_zip_file_read_func | 7CodeWizard[P]stablediffusion/thirdparty/miniz.h | static size_t mz_zip_file_read_func(void *pOpaque, mz_uint64 file_ofs,
void *pBuf, size_t n) {
mz_zip_archive *pZip = (mz_zip_archive *)pOpaque;
mz_int64 cur_ofs = MZ_FTELL64(pZip->m_pState->m_pFile);
file_ofs += pZip->m_pState->m_file_archive_start_ofs;
if (((mz_int64)file_ofs < 0) ||
(((cur_ofs != (mz_int64)file_ofs)) &&
(MZ_FSEEK64(pZip->m_pState->m_pFile, (mz_int64)file_ofs, SEEK_SET))))
return 0;
return MZ_FREAD(pBuf, 1, n, pZip->m_pState->m_pFile);
} | O3 | c | mz_zip_file_read_func:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movq 0x68(%rdi), %rax
movq 0x70(%rax), %rdi
callq 0xa720
movq 0x68(%r15), %rcx
addq 0x78(%rcx), %r12
js 0x83046
cmpq %r12, %rax
je 0x83058
movq 0x70(%rcx), %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0xa320
testl %eax, %eax
je 0x83054
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x68(%r15), %rcx
movq 0x70(%rcx), %rcx
movl $0x1, %esi
movq %r14, %rdi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xa900
| mz_zip_file_read_func:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rcx
mov r14, rdx
mov r12, rsi
mov r15, rdi
mov rax, [rdi+68h]
mov rdi, [rax+70h]
call _ftello
mov rcx, [r15+68h]
add r12, [rcx+78h]
js short loc_83046
cmp rax, r12
jz short loc_83058
mov rdi, [rcx+70h]
mov rsi, r12
xor edx, edx
call _fseeko
test eax, eax
jz short loc_83054
loc_83046:
xor eax, eax
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_83054:
mov rcx, [r15+68h]
loc_83058:
mov rcx, [rcx+70h]
mov esi, 1
mov rdi, r14
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp _fread
| long long mz_zip_file_read_func(long long a1, long long a2, long long a3, long long a4)
{
long long v6; // rax
long long v7; // rcx
long long v8; // r12
v6 = ftello(*(_QWORD *)(*(_QWORD *)(a1 + 104) + 112LL));
v7 = *(_QWORD *)(a1 + 104);
v8 = *(_QWORD *)(v7 + 120) + a2;
if ( v8 < 0 )
return 0LL;
if ( v6 != v8 )
{
if ( (unsigned int)fseeko(*(_QWORD *)(v7 + 112), v8, 0LL) )
return 0LL;
v7 = *(_QWORD *)(a1 + 104);
}
return fread(a3, 1LL, a4, *(_QWORD *)(v7 + 112));
}
| |||
55,188 | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::key() const | monkey531[P]llama/common/./json.hpp | const typename object_t::key_type& key() const
{
JSON_ASSERT(m_object != nullptr);
if (JSON_HEDLEY_LIKELY(m_object->is_object()))
{
return m_it.object_iterator->first;
}
JSON_THROW(invalid_iterator::create(207, "cannot use key() for non-object iterators", m_object));
} | O0 | cpp | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::key() const:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, (%rax)
je 0xc6b1b
jmp 0xc6b3a
leaq 0x10f395(%rip), %rdi # 0x1d5eb7
leaq 0x105df3(%rip), %rsi # 0x1cc91c
movl $0x3519, %edx # imm = 0x3519
leaq 0x10a708(%rip), %rcx # 0x1d123d
callq 0x50230
movq 0x10(%rsp), %rax
movq (%rax), %rdi
callq 0xa2c80
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xc6b51
jmp 0xc6b64
movq 0x10(%rsp), %rdi
addq $0x8, %rdi
callq 0xbbbe0
addq $0x58, %rsp
retq
movb $0x1, 0x1b(%rsp)
movl $0x20, %edi
callq 0x50540
movq %rax, (%rsp)
leaq 0x2f(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x50d60
movq 0x8(%rsp), %rdx
leaq 0x10a76e(%rip), %rsi # 0x1d1300
leaq 0x30(%rsp), %rdi
callq 0x61bd0
jmp 0xc6b9e
movq (%rsp), %rdi
movq 0x10(%rsp), %rax
movq (%rax), %rcx
movl $0xcf, %esi
leaq 0x30(%rsp), %rdx
callq 0xc8220
jmp 0xc6bbb
movq (%rsp), %rdi
movb $0x0, 0x1b(%rsp)
leaq 0x18b655(%rip), %rsi # 0x252220
leaq -0xb1f2(%rip), %rdx # 0xbb9e0
callq 0x508f0
jmp 0xc6c29
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
jmp 0xc6c01
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x510c0
leaq 0x2f(%rsp), %rdi
callq 0x510a0
testb $0x1, 0x1b(%rsp)
jne 0xc6c14
jmp 0xc6c1d
movq (%rsp), %rdi
callq 0x50c40
jmp 0xc6c1f
movq 0x20(%rsp), %rdi
callq 0x50940
nopl (%rax)
| _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv:
sub rsp, 58h
mov qword ptr [rsp+58h+var_8], rdi; char
mov rax, qword ptr [rsp+58h+var_8]
mov qword ptr [rsp+58h+var_48], rax; int
cmp qword ptr [rax], 0
jz short loc_C6B1B
jmp short loc_C6B3A
loc_C6B1B:
lea rdi, aAnchorMObjectN+7; "m_object != nullptr"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov edx, 3519h
lea rcx, aConstTypenameO; "const typename object_t::key_type &nloh"...
call ___assert_fail
loc_C6B3A:
mov rax, qword ptr [rsp+58h+var_48]
mov rdi, [rax]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9is_objectEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::is_object(void)
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_C6B51
jmp short loc_C6B64
loc_C6B51:
mov rdi, qword ptr [rsp+58h+var_48]
add rdi, 8
call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator->(void)
add rsp, 58h
retn
loc_C6B64:
mov [rsp+58h+var_3D], 1
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov [rsp+58h+var_58], rax; int
lea rdi, [rsp+58h+var_29]
mov qword ptr [rsp+58h+var_50], rdi; int
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, qword ptr [rsp+58h+var_50]
lea rsi, aCannotUseKeyFo; "cannot use key() for non-object iterato"...
lea rdi, [rsp+58h+var_29+1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_C6B9E:
mov rdi, [rsp+58h+var_58]; int
mov rax, qword ptr [rsp+58h+var_48]
mov rcx, [rax]
mov esi, 0CFh
lea rdx, [rsp+58h+var_29+1]
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
jmp short $+2
loc_C6BBB:
mov rdi, [rsp+58h+var_58]; void *
mov [rsp+58h+var_3D], 0
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorD2Ev; void (*)(void *)
call ___cxa_throw
| key:
SUB RSP,0x58
MOV qword ptr [RSP + 0x50],RDI
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x10],RAX
CMP qword ptr [RAX],0x0
JZ 0x001c6b1b
JMP 0x001c6b3a
LAB_001c6b1b:
LEA RDI,[0x2d5eb7]
LEA RSI,[0x2cc91c]
MOV EDX,0x3519
LEA RCX,[0x2d123d]
CALL 0x00150230
LAB_001c6b3a:
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX]
CALL 0x001a2c80
XOR AL,0xff
XOR AL,0xff
TEST AL,0x1
JNZ 0x001c6b51
JMP 0x001c6b64
LAB_001c6b51:
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x8
CALL 0x001bbbe0
ADD RSP,0x58
RET
LAB_001c6b64:
MOV byte ptr [RSP + 0x1b],0x1
MOV EDI,0x20
CALL 0x00150540
MOV qword ptr [RSP],RAX
LEA RDI,[RSP + 0x2f]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x00150d60
MOV RDX,qword ptr [RSP + 0x8]
LAB_001c6b8b:
LEA RSI,[0x2d1300]
LEA RDI,[RSP + 0x30]
CALL 0x00161bd0
JMP 0x001c6b9e
LAB_001c6b9e:
MOV RDI,qword ptr [RSP]
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RAX]
LAB_001c6baa:
MOV ESI,0xcf
LEA RDX,[RSP + 0x30]
CALL 0x001c8220
JMP 0x001c6bbb
LAB_001c6bbb:
MOV RDI,qword ptr [RSP]
MOV byte ptr [RSP + 0x1b],0x0
LEA RSI,[0x352220]
LEA RDX,[0x1bb9e0]
CALL 0x001508f0
|
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const>::key() const */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::key(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*this)
{
byte bVar1;
int8 uVar2;
allocator local_29;
string local_28 [32];
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*local_8;
local_8 = this;
if (*(long *)this == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("m_object != nullptr",
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",
0x3519,
"const typename object_t::key_type &nlohmann::detail::iter_impl<const nlohmann::basic_json<nlohmann::ordered_map>>::key() const [BasicJsonType = const nlohmann::basic_json<nlohmann::ordered_map>]"
);
}
bVar1 = basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::is_object(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)this);
if ((bVar1 & 1) == 0) {
uVar2 = __cxa_allocate_exception(0x20);
std::allocator<char>::allocator();
/* try { // try from 001c6b8b to 001c6b9b has its CatchHandler @ 001c6bd9 */
std::__cxx11::string::string<std::allocator<char>>
(local_28,"cannot use key() for non-object iterators",&local_29);
/* try { // try from 001c6baa to 001c6bd6 has its CatchHandler @ 001c6be9 */
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0xcf,local_28,*(int8 *)this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&invalid_iterator::typeinfo,invalid_iterator::~invalid_iterator);
}
__gnu_cxx::
__normal_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>*,std::vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>>
::operator->((__normal_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>*,std::vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>>
*)(this + 8));
return;
}
| ||
55,189 | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::key() const | monkey531[P]llama/common/./json.hpp | const typename object_t::key_type& key() const
{
JSON_ASSERT(m_object != nullptr);
if (JSON_HEDLEY_LIKELY(m_object->is_object()))
{
return m_it.object_iterator->first;
}
JSON_THROW(invalid_iterator::create(207, "cannot use key() for non-object iterators", m_object));
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::key() const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq (%rdi), %rax
testq %rax, %rax
je 0x71cc7
movq %rdi, %r14
cmpb $0x1, (%rax)
jne 0x71c69
movq 0x8(%r14), %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x18360
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x48ec4(%rip), %rsi # 0xbab4a
leaq 0x48ee6(%rip), %rdx # 0xbab73
leaq 0x8(%rsp), %rdi
callq 0x590a2
movq (%r14), %rcx
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0xcf, %esi
callq 0x49aa2
xorl %ebp, %ebp
leaq 0x7c728(%rip), %rsi # 0xee3e0
leaq -0x2590f(%rip), %rdx # 0x4c3b0
movq %rbx, %rdi
callq 0x18b30
leaq 0x4b0b4(%rip), %rdi # 0xbcd82
leaq 0x44fd1(%rip), %rsi # 0xb6ca6
leaq 0x4b1a6(%rip), %rcx # 0xbce82
movl $0x3519, %edx # imm = 0x3519
callq 0x18470
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x71d00
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186a0
testb %bpl, %bpl
jne 0x71d0a
jmp 0x71d12
movq %rax, %r14
movq %rbx, %rdi
callq 0x18500
movq %r14, %rdi
callq 0x18b90
| _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv:
push rbp; char
push r15; int
push r14; __int64
push rbx; int
sub rsp, 28h
mov rax, [rdi]
test rax, rax
jz short loc_71CC7
mov r14, rdi
cmp byte ptr [rax], 1
jnz short loc_71C69
mov rax, [r14+8]
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_71C69:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r15, [rsp+48h+var_30]
mov [r15-10h], r15
lea rsi, aCannotUseKeyFo; "cannot use key() for non-object iterato"...
lea rdx, aCannotUseKeyFo+29h; ""
lea rdi, [rsp+48h+var_40]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rcx, [r14]
mov bpl, 1
lea rdx, [rsp+48h+var_40]
mov rdi, rbx; this
mov esi, 0CFh; int
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_71CC7:
lea rdi, aAnchorMObjectN+7; "m_object != nullptr"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aConstTypenameO_0; "const typename object_t::key_type &nloh"...
mov edx, 3519h
call ___assert_fail
mov r14, rax
mov rdi, [rsp+48h+var_40]; void *
cmp rdi, r15
jz short loc_71D00
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_71D00:
test bpl, bpl
jnz short loc_71D0A
jmp short loc_71D12
mov r14, rax
loc_71D0A:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_71D12:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::key(
_QWORD *a1)
{
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
void *v3[2]; // [rsp+8h] [rbp-40h] BYREF
long long v4; // [rsp+18h] [rbp-30h] BYREF
if ( !*a1 )
__assert_fail(
"m_object != nullptr",
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",
13593LL,
"const typename object_t::key_type &nlohmann::detail::iter_impl<nlohmann::basic_json<nlohmann::ordered_map>>::key()"
" const [BasicJsonType = nlohmann::basic_json<nlohmann::ordered_map>]");
if ( *(_BYTE *)*a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v3[0] = &v4;
std::string::_M_construct<char const*>((long long)v3, "cannot use key() for non-object iterators", (long long)"");
ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
207,
v3);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return a1[1];
}
| key:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x00171cc7
MOV R14,RDI
CMP byte ptr [RAX],0x1
JNZ 0x00171c69
MOV RAX,qword ptr [R14 + 0x8]
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00171c69:
MOV EDI,0x20
CALL 0x00118360
MOV RBX,RAX
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
LAB_00171c7f:
LEA RSI,[0x1bab4a]
LEA RDX,[0x1bab73]
LEA RDI,[RSP + 0x8]
CALL 0x001590a2
MOV RCX,qword ptr [R14]
MOV BPL,0x1
LAB_00171c9d:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0xcf
CALL 0x00149aa2
XOR EBP,EBP
LEA RSI,[0x1ee3e0]
LEA RDX,[0x14c3b0]
MOV RDI,RBX
CALL 0x00118b30
LAB_00171cc7:
LEA RDI,[0x1bcd82]
LEA RSI,[0x1b6ca6]
LEA RCX,[0x1bce82]
MOV EDX,0x3519
CALL 0x00118470
|
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::key() const */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::key(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this)
{
int8 uVar1;
int1 *local_40 [2];
int1 local_30 [16];
if (*(char **)this == (char *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("m_object != nullptr",
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",
0x3519,
"const typename object_t::key_type &nlohmann::detail::iter_impl<nlohmann::basic_json<nlohmann::ordered_map>>::key() const [BasicJsonType = nlohmann::basic_json<nlohmann::ordered_map>]"
);
}
if (**(char **)this == '\x01') {
return *(int8 *)(this + 8);
}
uVar1 = __cxa_allocate_exception(0x20);
local_40[0] = local_30;
/* try { // try from 00171c7f to 00171c96 has its CatchHandler @ 00171d07 */
std::__cxx11::string::_M_construct<char_const*>
(local_40,"cannot use key() for non-object iterators","");
/* try { // try from 00171c9d to 00171cc6 has its CatchHandler @ 00171ce6 */
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar1,0xcf,local_40,*(int8 *)this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&invalid_iterator::typeinfo,exception::~exception);
}
| |
55,190 | extend_area_on_page | eloqsql/storage/maria/ma_blockrec.c | static my_bool extend_area_on_page(MARIA_HA *info,
uchar *buff, uchar *dir,
uint rownr,
uint request_length,
uint *empty_space, uint *ret_offset,
uint *ret_length,
my_bool head_page)
{
uint rec_offset, length, org_rec_length;
uint max_entry= (uint) buff[DIR_COUNT_OFFSET];
MARIA_SHARE *share= info->s;
uint block_size= share->block_size;
DBUG_ENTER("extend_area_on_page");
/*
We can't check for min length here as we may have called
extend_directory() to create a new (empty) entry just before
*/
check_directory(share, buff, block_size, 0, *empty_space);
rec_offset= uint2korr(dir);
if (rec_offset)
{
/* Extending old row; Mark current space as 'free' */
length= org_rec_length= uint2korr(dir + 2);
DBUG_PRINT("info", ("rec_offset: %u length: %u request_length: %u "
"empty_space: %u",
rec_offset, org_rec_length, request_length,
*empty_space));
*empty_space+= org_rec_length;
}
else
{
/* Reusing free directory entry; Free it from the directory list */
if (dir[2] == END_OF_DIR_FREE_LIST)
buff[DIR_FREE_OFFSET]= dir[3];
else
{
uchar *prev_dir= dir_entry_pos(buff, block_size, (uint) dir[2]);
DBUG_ASSERT(uint2korr(prev_dir) == 0 && prev_dir[3] == (uchar) rownr);
prev_dir[3]= dir[3];
}
if (dir[3] != END_OF_DIR_FREE_LIST)
{
uchar *next_dir= dir_entry_pos(buff, block_size, (uint) dir[3]);
DBUG_ASSERT(uint2korr(next_dir) == 0 && next_dir[2] == (uchar) rownr);
next_dir[2]= dir[2];
}
rec_offset= start_of_next_entry(dir);
length= 0;
}
if (length < request_length)
{
uint old_rec_offset;
/*
New data did not fit in old position.
Find first possible position where to put new data.
*/
old_rec_offset= rec_offset;
rec_offset= end_of_previous_entry(share,
dir, buff + block_size -
PAGE_SUFFIX_SIZE);
length+= (uint) (old_rec_offset - rec_offset);
DBUG_ASSERT(old_rec_offset);
/*
'length' is 0 if we are doing an insert into a not allocated block.
This can only happen during "REDO of INSERT" or "UNDO of DELETE."
*/
if (length < request_length)
{
/*
Did not fit in current block + empty space. Extend with
empty space after block.
*/
if (rownr == max_entry - 1)
{
/* Last entry; Everything is free between this and directory */
length= ((block_size - PAGE_SUFFIX_SIZE - DIR_ENTRY_SIZE * max_entry) -
rec_offset);
}
else
length= start_of_next_entry(dir) - rec_offset;
DBUG_ASSERT((int) length >= 0);
if (length < request_length)
{
/* Not enough continuous space, compact page to get more */
int2store(dir, rec_offset);
/* Reset length, as this may be a deleted block */
int2store(dir+2, 0);
_ma_compact_block_page(share,
buff, rownr, 1,
head_page ? info->trn->min_read_from: 0,
head_page ? share->base.min_block_length : 0);
rec_offset= uint2korr(dir);
length= uint2korr(dir+2);
if (length < request_length)
{
DBUG_PRINT("error", ("Not enough space: "
"length: %u request_length: %u",
length, request_length));
_ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD);
DBUG_RETURN(1); /* Error in block */
}
*empty_space= length; /* All space is here */
}
}
}
int2store(dir, rec_offset);
int2store(dir + 2, length);
*ret_offset= rec_offset;
*ret_length= length;
check_directory(share,
buff, block_size,
head_page ? share->base.min_block_length : 0,
*empty_space - length);
DBUG_RETURN(0);
} | O3 | c | extend_area_on_page:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movl %r8d, %r12d
movq %rdx, %rbx
movq %rdi, %r15
movzbl 0x8(%rsi), %edx
movq (%rdi), %rdi
movl 0x7bc(%rdi), %eax
movzwl (%rbx), %r9d
testw %r9w, %r9w
je 0x4dbb5
movzwl 0x2(%rbx), %r8d
addl %r8d, (%r14)
jmp 0x4dc1d
movzbl 0x2(%rbx), %r8d
cmpq $0xff, %r8
je 0x4dbd8
leaq (%rsi,%rax), %r9
shll $0x2, %r8d
subq %r8, %r9
movb 0x3(%rbx), %r8b
movb %r8b, -0x5(%r9)
jmp 0x4dbe0
movb 0x3(%rbx), %r8b
movb %r8b, 0x9(%rsi)
cmpb $-0x1, %r8b
je 0x4dbfd
leaq (%rsi,%rax), %r9
movzbl %r8b, %r8d
shll $0x2, %r8d
subq %r8, %r9
movb 0x2(%rbx), %r8b
movb %r8b, -0x6(%r9)
leaq -0x3(%rbx), %r9
movq %r9, %r8
cmpb $0x0, -0x1(%r9)
jne 0x4dc15
leaq -0x4(%r8), %r9
cmpb $0x0, (%r8)
je 0x4dc01
movzwl -0x1(%r8), %r9d
xorl %r8d, %r8d
movzwl %r9w, %r11d
cmpl %r12d, %r8d
jae 0x4dcc9
leaq (%rsi,%rax), %r13
addq $-0x4, %r13
leaq 0x4(%rbx), %r10
cmpq %r13, %r10
jae 0x4dc52
movzwl (%r10), %r9d
addq $0x4, %r10
testl %r9d, %r9d
je 0x4dc36
movzwl -0x2(%r10), %r10d
addl %r9d, %r10d
jmp 0x4dc5d
movl 0xc18(%rdi), %r10d
addl $0xc, %r10d
subl %r10d, %r11d
addl %r11d, %r8d
cmpl %r12d, %r8d
jae 0x4dcc6
leal -0x1(%rdx), %r8d
cmpl %ecx, %r8d
jne 0x4dc7f
leal (%r10,%rdx,4), %edx
subl %edx, %eax
addl $-0x4, %eax
movl %eax, %r8d
jmp 0x4dc9d
leaq -0x3(%rbx), %rdx
movq %rdx, %rax
cmpb $0x0, -0x1(%rdx)
jne 0x4dc95
leaq -0x4(%rax), %rdx
cmpb $0x0, (%rax)
je 0x4dc83
movzwl -0x1(%rax), %r8d
subl %r10d, %r8d
cmpl %r12d, %r8d
jae 0x4dcc6
movw %r10w, (%rbx)
movw $0x0, 0x2(%rbx)
cmpb $0x0, 0x20(%rbp)
je 0x4dcf1
movq 0x8(%r15), %rax
movq 0x80(%rax), %r8
movl 0x3b8(%rdi), %r9d
jmp 0x4dcf7
movl %r10d, %r11d
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rcx
movw %r11w, (%rbx)
movw %r8w, 0x2(%rbx)
movl %r11d, (%rcx)
movl %r8d, (%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r8d, %r8d
xorl %r9d, %r9d
movl %ecx, %edx
movl $0x1, %ecx
callq 0x4a60c
movzwl 0x2(%rbx), %r8d
cmpl %r12d, %r8d
jae 0x4dd1e
movq %r15, %rdi
movl $0x7f, %esi
callq 0x3fc44
movb $0x1, %al
jmp 0x4dce2
movzwl (%rbx), %r11d
movl %r8d, (%r14)
jmp 0x4dcc9
| extend_area_on_page:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r9
mov r12d, r8d
mov rbx, rdx
mov r15, rdi
movzx edx, byte ptr [rsi+8]
mov rdi, [rdi]
mov eax, [rdi+7BCh]
movzx r9d, word ptr [rbx]
test r9w, r9w
jz short loc_4DBB5
movzx r8d, word ptr [rbx+2]
add [r14], r8d
jmp short loc_4DC1D
loc_4DBB5:
movzx r8d, byte ptr [rbx+2]
cmp r8, 0FFh
jz short loc_4DBD8
lea r9, [rsi+rax]
shl r8d, 2
sub r9, r8
mov r8b, [rbx+3]
mov [r9-5], r8b
jmp short loc_4DBE0
loc_4DBD8:
mov r8b, [rbx+3]
mov [rsi+9], r8b
loc_4DBE0:
cmp r8b, 0FFh
jz short loc_4DBFD
lea r9, [rsi+rax]
movzx r8d, r8b
shl r8d, 2
sub r9, r8
mov r8b, [rbx+2]
mov [r9-6], r8b
loc_4DBFD:
lea r9, [rbx-3]
loc_4DC01:
mov r8, r9
cmp byte ptr [r9-1], 0
jnz short loc_4DC15
lea r9, [r8-4]
cmp byte ptr [r8], 0
jz short loc_4DC01
loc_4DC15:
movzx r9d, word ptr [r8-1]
xor r8d, r8d
loc_4DC1D:
movzx r11d, r9w
cmp r8d, r12d
jnb loc_4DCC9
lea r13, [rsi+rax]
add r13, 0FFFFFFFFFFFFFFFCh
lea r10, [rbx+4]
loc_4DC36:
cmp r10, r13
jnb short loc_4DC52
movzx r9d, word ptr [r10]
add r10, 4
test r9d, r9d
jz short loc_4DC36
movzx r10d, word ptr [r10-2]
add r10d, r9d
jmp short loc_4DC5D
loc_4DC52:
mov r10d, [rdi+0C18h]
add r10d, 0Ch
loc_4DC5D:
sub r11d, r10d
add r8d, r11d
cmp r8d, r12d
jnb short loc_4DCC6
lea r8d, [rdx-1]
cmp r8d, ecx
jnz short loc_4DC7F
lea edx, [r10+rdx*4]
sub eax, edx
add eax, 0FFFFFFFCh
mov r8d, eax
jmp short loc_4DC9D
loc_4DC7F:
lea rdx, [rbx-3]
loc_4DC83:
mov rax, rdx
cmp byte ptr [rdx-1], 0
jnz short loc_4DC95
lea rdx, [rax-4]
cmp byte ptr [rax], 0
jz short loc_4DC83
loc_4DC95:
movzx r8d, word ptr [rax-1]
sub r8d, r10d
loc_4DC9D:
cmp r8d, r12d
jnb short loc_4DCC6
mov [rbx], r10w
mov word ptr [rbx+2], 0
cmp [rbp+arg_10], 0
jz short loc_4DCF1
mov rax, [r15+8]
mov r8, [rax+80h]
mov r9d, [rdi+3B8h]
jmp short loc_4DCF7
loc_4DCC6:
mov r11d, r10d
loc_4DCC9:
mov rax, [rbp+arg_8]
mov rcx, [rbp+arg_0]
mov [rbx], r11w
mov [rbx+2], r8w
mov [rcx], r11d
mov [rax], r8d
xor eax, eax
loc_4DCE2:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4DCF1:
xor r8d, r8d
xor r9d, r9d
loc_4DCF7:
mov edx, ecx
mov ecx, 1
call _ma_compact_block_page
movzx r8d, word ptr [rbx+2]
cmp r8d, r12d
jnb short loc_4DD1E
mov rdi, r15
mov esi, 7Fh
call _ma_set_fatal_error
mov al, 1
jmp short loc_4DCE2
loc_4DD1E:
movzx r11d, word ptr [rbx]
mov [r14], r8d
jmp short loc_4DCC9
| char extend_area_on_page(
long long a1,
long long a2,
unsigned __int16 *a3,
int a4,
unsigned int a5,
_DWORD *a6,
_DWORD *a7,
_DWORD *a8,
char a9)
{
int v13; // edx
_DWORD *v14; // rdi
long long v15; // rax
unsigned __int16 v16; // r9
long long v17; // r8
long long v18; // r8
long long v19; // r9
unsigned __int8 v20; // r8
char *v21; // r9
int v22; // r11d
unsigned __int16 *v23; // r10
int v24; // r9d
int v25; // r10d
_BYTE *v26; // rdx
_BYTE *v27; // rax
unsigned long long v28; // r8
unsigned int v29; // r9d
long long v31; // rdx
long long v32; // rcx
int v33; // r9d
v13 = *(unsigned __int8 *)(a2 + 8);
v14 = *(_DWORD **)a1;
v15 = (unsigned int)v14[495];
v16 = *a3;
if ( *a3 )
{
LODWORD(v17) = a3[1];
*a6 += v17;
}
else
{
v18 = *((unsigned __int8 *)a3 + 2);
if ( v18 == 255 )
{
v20 = *((_BYTE *)a3 + 3);
*(_BYTE *)(a2 + 9) = v20;
}
else
{
v19 = a2 + v15 - (unsigned int)(4 * v18);
v20 = *((_BYTE *)a3 + 3);
*(_BYTE *)(v19 - 5) = v20;
}
if ( v20 != 0xFF )
*(_BYTE *)(a2 + v15 - 4 * (unsigned int)v20 - 6) = *((_BYTE *)a3 + 2);
v21 = (char *)a3 - 3;
do
{
v17 = (long long)v21;
if ( *(v21 - 1) )
break;
v21 -= 4;
}
while ( !*(_BYTE *)v17 );
v16 = *(_WORD *)(v17 - 1);
LODWORD(v17) = 0;
}
v22 = v16;
if ( (unsigned int)v17 < a5 )
{
v23 = a3 + 2;
while ( (unsigned long long)v23 < a2 + v15 - 4 )
{
v24 = *v23;
v23 += 2;
if ( v24 )
{
v25 = v24 + *(v23 - 1);
goto LABEL_18;
}
}
v25 = v14[774] + 12;
LABEL_18:
LODWORD(v17) = v22 - v25 + v17;
if ( (unsigned int)v17 >= a5 )
goto LABEL_28;
if ( v13 - 1 == a4 )
{
LODWORD(v17) = v15 - (v25 + 4 * v13) - 4;
}
else
{
v26 = (char *)a3 - 3;
do
{
v27 = v26;
if ( *(v26 - 1) )
break;
v26 -= 4;
}
while ( !*v27 );
LODWORD(v17) = *(unsigned __int16 *)(v27 - 1) - v25;
}
if ( (unsigned int)v17 >= a5 )
{
LABEL_28:
v22 = v25;
}
else
{
*a3 = v25;
a3[1] = 0;
if ( a9 )
{
v28 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 128LL);
v29 = v14[238];
}
else
{
v28 = 0LL;
v29 = 0;
}
ma_compact_block_page((long long)v14, a2, a4, 1, v28, v29);
v17 = a3[1];
if ( (unsigned int)v17 < a5 )
{
ma_set_fatal_error((_DWORD *)a1, 127, v31, v32, v17, v33);
return 1;
}
v22 = *a3;
*a6 = v17;
}
}
*a3 = v22;
a3[1] = v17;
*a7 = v22;
*a8 = v17;
return 0;
}
| extend_area_on_page:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R9
MOV R12D,R8D
MOV RBX,RDX
MOV R15,RDI
MOVZX EDX,byte ptr [RSI + 0x8]
MOV RDI,qword ptr [RDI]
MOV EAX,dword ptr [RDI + 0x7bc]
MOVZX R9D,word ptr [RBX]
TEST R9W,R9W
JZ 0x0014dbb5
MOVZX R8D,word ptr [RBX + 0x2]
ADD dword ptr [R14],R8D
JMP 0x0014dc1d
LAB_0014dbb5:
MOVZX R8D,byte ptr [RBX + 0x2]
CMP R8,0xff
JZ 0x0014dbd8
LEA R9,[RSI + RAX*0x1]
SHL R8D,0x2
SUB R9,R8
MOV R8B,byte ptr [RBX + 0x3]
MOV byte ptr [R9 + -0x5],R8B
JMP 0x0014dbe0
LAB_0014dbd8:
MOV R8B,byte ptr [RBX + 0x3]
MOV byte ptr [RSI + 0x9],R8B
LAB_0014dbe0:
CMP R8B,0xff
JZ 0x0014dbfd
LEA R9,[RSI + RAX*0x1]
MOVZX R8D,R8B
SHL R8D,0x2
SUB R9,R8
MOV R8B,byte ptr [RBX + 0x2]
MOV byte ptr [R9 + -0x6],R8B
LAB_0014dbfd:
LEA R9,[RBX + -0x3]
LAB_0014dc01:
MOV R8,R9
CMP byte ptr [R9 + -0x1],0x0
JNZ 0x0014dc15
LEA R9,[R8 + -0x4]
CMP byte ptr [R8],0x0
JZ 0x0014dc01
LAB_0014dc15:
MOVZX R9D,word ptr [R8 + -0x1]
XOR R8D,R8D
LAB_0014dc1d:
MOVZX R11D,R9W
CMP R8D,R12D
JNC 0x0014dcc9
LEA R13,[RSI + RAX*0x1]
ADD R13,-0x4
LEA R10,[RBX + 0x4]
LAB_0014dc36:
CMP R10,R13
JNC 0x0014dc52
MOVZX R9D,word ptr [R10]
ADD R10,0x4
TEST R9D,R9D
JZ 0x0014dc36
MOVZX R10D,word ptr [R10 + -0x2]
ADD R10D,R9D
JMP 0x0014dc5d
LAB_0014dc52:
MOV R10D,dword ptr [RDI + 0xc18]
ADD R10D,0xc
LAB_0014dc5d:
SUB R11D,R10D
ADD R8D,R11D
CMP R8D,R12D
JNC 0x0014dcc6
LEA R8D,[RDX + -0x1]
CMP R8D,ECX
JNZ 0x0014dc7f
LEA EDX,[R10 + RDX*0x4]
SUB EAX,EDX
ADD EAX,-0x4
MOV R8D,EAX
JMP 0x0014dc9d
LAB_0014dc7f:
LEA RDX,[RBX + -0x3]
LAB_0014dc83:
MOV RAX,RDX
CMP byte ptr [RDX + -0x1],0x0
JNZ 0x0014dc95
LEA RDX,[RAX + -0x4]
CMP byte ptr [RAX],0x0
JZ 0x0014dc83
LAB_0014dc95:
MOVZX R8D,word ptr [RAX + -0x1]
SUB R8D,R10D
LAB_0014dc9d:
CMP R8D,R12D
JNC 0x0014dcc6
MOV word ptr [RBX],R10W
MOV word ptr [RBX + 0x2],0x0
CMP byte ptr [RBP + 0x20],0x0
JZ 0x0014dcf1
MOV RAX,qword ptr [R15 + 0x8]
MOV R8,qword ptr [RAX + 0x80]
MOV R9D,dword ptr [RDI + 0x3b8]
JMP 0x0014dcf7
LAB_0014dcc6:
MOV R11D,R10D
LAB_0014dcc9:
MOV RAX,qword ptr [RBP + 0x18]
MOV RCX,qword ptr [RBP + 0x10]
MOV word ptr [RBX],R11W
MOV word ptr [RBX + 0x2],R8W
MOV dword ptr [RCX],R11D
MOV dword ptr [RAX],R8D
XOR EAX,EAX
LAB_0014dce2:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014dcf1:
XOR R8D,R8D
XOR R9D,R9D
LAB_0014dcf7:
MOV EDX,ECX
MOV ECX,0x1
CALL 0x0014a60c
MOVZX R8D,word ptr [RBX + 0x2]
CMP R8D,R12D
JNC 0x0014dd1e
MOV RDI,R15
MOV ESI,0x7f
CALL 0x0013fc44
MOV AL,0x1
JMP 0x0014dce2
LAB_0014dd1e:
MOVZX R11D,word ptr [RBX]
MOV dword ptr [R14],R8D
JMP 0x0014dcc9
|
int8
extend_area_on_page(long *param_1,long param_2,ushort *param_3,int param_4,uint param_5,
uint *param_6,uint *param_7,uint *param_8,char param_9)
{
byte bVar1;
ushort uVar2;
uint uVar3;
long lVar4;
char *pcVar5;
ushort *puVar6;
ulong uVar7;
char *pcVar8;
byte bVar9;
uint uVar10;
int8 uVar11;
int4 uVar12;
uint uVar13;
ushort *puVar14;
bVar1 = *(byte *)(param_2 + 8);
lVar4 = *param_1;
uVar3 = *(uint *)(lVar4 + 0x7bc);
uVar7 = (ulong)uVar3;
uVar2 = *param_3;
if (uVar2 == 0) {
if ((byte)param_3[1] == 0xff) {
bVar9 = *(byte *)((long)param_3 + 3);
*(byte *)(param_2 + 9) = bVar9;
}
else {
bVar9 = *(byte *)((long)param_3 + 3);
*(byte *)(param_2 + uVar7 + (ulong)(byte)param_3[1] * -4 + -5) = bVar9;
}
if (bVar9 != 0xff) {
*(char *)(param_2 + uVar7 + (ulong)bVar9 * -4 + -6) = (char)param_3[1];
}
pcVar5 = (char *)((long)param_3 + -3);
do {
pcVar8 = pcVar5;
if (pcVar8[-1] != '\0') break;
pcVar5 = pcVar8 + -4;
} while (*pcVar8 == '\0');
uVar2 = *(ushort *)(pcVar8 + -1);
uVar10 = 0;
}
else {
uVar10 = (uint)param_3[1];
*param_6 = *param_6 + (uint)param_3[1];
}
uVar13 = (uint)uVar2;
if (uVar10 < param_5) {
puVar6 = param_3 + 2;
do {
puVar14 = puVar6;
if ((ushort *)(param_2 + uVar7 + -4) <= puVar14) {
uVar13 = *(int *)(lVar4 + 0xc18) + 0xc;
goto LAB_0014dc5d;
}
puVar6 = puVar14 + 2;
} while (*puVar14 == 0);
uVar13 = (uint)puVar14[1] + (uint)*puVar14;
LAB_0014dc5d:
uVar10 = uVar10 + (uVar2 - uVar13);
if (uVar10 < param_5) {
if (bVar1 - 1 == param_4) {
uVar10 = (uVar3 - (uVar13 + (uint)bVar1 * 4)) - 4;
}
else {
pcVar5 = (char *)((long)param_3 + -3);
do {
pcVar8 = pcVar5;
if (pcVar8[-1] != '\0') break;
pcVar5 = pcVar8 + -4;
} while (*pcVar8 == '\0');
uVar10 = *(ushort *)(pcVar8 + -1) - uVar13;
}
if (uVar10 < param_5) {
*param_3 = (ushort)uVar13;
param_3[1] = 0;
if (param_9 == '\0') {
uVar11 = 0;
uVar12 = 0;
}
else {
uVar11 = *(int8 *)(param_1[1] + 0x80);
uVar12 = *(int4 *)(lVar4 + 0x3b8);
}
_ma_compact_block_page(lVar4,param_2,param_4,1,uVar11,uVar12);
uVar10 = (uint)param_3[1];
if (uVar10 < param_5) {
_ma_set_fatal_error(param_1,0x7f);
return 1;
}
uVar13 = (uint)*param_3;
*param_6 = uVar10;
}
}
}
*param_3 = (ushort)uVar13;
param_3[1] = (ushort)uVar10;
*param_7 = uVar13;
*param_8 = uVar10;
return 0;
}
| |
55,191 | my_init_mysys_psi_keys | eloqsql/mysys/my_init.c | void my_init_mysys_psi_keys()
{
const char* category= "mysys";
int count;
count= sizeof(all_mysys_mutexes)/sizeof(all_mysys_mutexes[0]);
mysql_mutex_register(category, all_mysys_mutexes, count);
count= sizeof(all_mysys_conds)/sizeof(all_mysys_conds[0]);
mysql_cond_register(category, all_mysys_conds, count);
count= sizeof(all_mysys_rwlocks)/sizeof(all_mysys_rwlocks[0]);
mysql_rwlock_register(category, all_mysys_rwlocks, count);
count= sizeof(all_mysys_threads)/sizeof(all_mysys_threads[0]);
mysql_thread_register(category, all_mysys_threads, count);
count= sizeof(all_mysys_files)/sizeof(all_mysys_files[0]);
mysql_file_register(category, all_mysys_files, count);
count= array_elements(all_mysys_stages);
mysql_stage_register(category, all_mysys_stages, count);
} | O0 | c | my_init_mysys_psi_keys:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x637ca(%rip), %rax # 0x121289
movq %rax, -0x8(%rbp)
movl $0x13, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x1cafc8(%rip), %rsi # 0x288aa0
callq 0xbdb70
movl $0x7, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x1cb17e(%rip), %rsi # 0x288c70
callq 0xbdbb0
movl $0x1, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x1cb214(%rip), %rsi # 0x288d20
callq 0xbdbf0
movl $0x1, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x1cb21a(%rip), %rsi # 0x288d40
callq 0xbdc30
movl $0x2, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x1cb220(%rip), %rsi # 0x288d60
callq 0xbdc70
movl $0x1, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x1caf36(%rip), %rsi # 0x288a90
callq 0xbdcb0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_init_mysys_psi_keys:
push rbp
mov rbp, rsp
sub rsp, 10h
lea rax, aMysys; "mysys"
mov [rbp+var_8], rax
mov [rbp+var_C], 13h
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_mysys_mutexes
call inline_mysql_mutex_register
mov [rbp+var_C], 7
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_mysys_conds
call inline_mysql_cond_register
mov [rbp+var_C], 1
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_mysys_rwlocks
call inline_mysql_rwlock_register
mov [rbp+var_C], 1
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_mysys_threads
call inline_mysql_thread_register
mov [rbp+var_C], 2
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_mysys_files
call inline_mysql_file_register
mov [rbp+var_C], 1
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_mysys_stages
call inline_mysql_stage_register
add rsp, 10h
pop rbp
retn
| long long my_init_mysys_psi_keys()
{
inline_mysql_mutex_register("mysys", &all_mysys_mutexes, 19LL);
inline_mysql_cond_register("mysys", &all_mysys_conds, 7LL);
inline_mysql_rwlock_register("mysys", &all_mysys_rwlocks, 1LL);
inline_mysql_thread_register("mysys", &all_mysys_threads, 1LL);
inline_mysql_file_register("mysys", &all_mysys_files, 2LL);
return inline_mysql_stage_register("mysys", &all_mysys_stages, 1LL);
}
| my_init_mysys_psi_keys:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
LEA RAX,[0x221289]
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0xc],0x13
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x388aa0]
CALL 0x001bdb70
MOV dword ptr [RBP + -0xc],0x7
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x388c70]
CALL 0x001bdbb0
MOV dword ptr [RBP + -0xc],0x1
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x388d20]
CALL 0x001bdbf0
MOV dword ptr [RBP + -0xc],0x1
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x388d40]
CALL 0x001bdc30
MOV dword ptr [RBP + -0xc],0x2
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x388d60]
CALL 0x001bdc70
MOV dword ptr [RBP + -0xc],0x1
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x388a90]
CALL 0x001bdcb0
ADD RSP,0x10
POP RBP
RET
|
void my_init_mysys_psi_keys(void)
{
inline_mysql_mutex_register("mysys",all_mysys_mutexes,0x13);
inline_mysql_cond_register("mysys",all_mysys_conds,7);
inline_mysql_rwlock_register("mysys",all_mysys_rwlocks,1);
inline_mysql_thread_register("mysys",all_mysys_threads,1);
inline_mysql_file_register("mysys",all_mysys_files,2);
inline_mysql_stage_register("mysys",&all_mysys_stages,1);
return;
}
| |
55,192 | TinyDecoder::calculate_mem_size() | 7CodeWizard[P]stablediffusion/tae.hpp | size_t calculate_mem_size() {
size_t mem_size = channels * z_channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_input_w
mem_size += channels * ggml_type_size(GGML_TYPE_F32); // conv_input_b
for (int i = 0; i < num_blocks; i++) {
mem_size += input_blocks[i].calculate_mem_size();
}
mem_size += channels * channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_1_w
for (int i = 0; i < num_blocks; i++) {
mem_size += middle_blocks[i].calculate_mem_size();
}
mem_size += channels * channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_2_w
for (int i = 0; i < num_blocks; i++) {
mem_size += output_blocks[i].calculate_mem_size();
}
mem_size += channels * channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_3_w
mem_size += final_block.calculate_mem_size();
mem_size += output_channels * channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_input_w
mem_size += output_channels * ggml_type_size(GGML_TYPE_F32); // conv_input_b
return mem_size;
} | O0 | cpp | TinyDecoder::calculate_mem_size():
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq 0x60(%rsp), %rcx
movq %rcx, 0x38(%rsp)
movl 0x4(%rcx), %eax
imull (%rcx), %eax
imull $0x3, %eax, %eax
imull $0x3, %eax, %eax
cltq
movq %rax, 0x30(%rsp)
movl $0x1, %edi
callq 0x11afb0
movq 0x30(%rsp), %rcx
movq %rax, %rdx
movq 0x38(%rsp), %rax
imulq %rdx, %rcx
movq %rcx, 0x58(%rsp)
movslq 0x4(%rax), %rax
movq %rax, 0x40(%rsp)
xorl %edi, %edi
callq 0x11afb0
movq %rax, %rcx
movq 0x40(%rsp), %rax
imulq %rcx, %rax
addq 0x58(%rsp), %rax
movq %rax, 0x58(%rsp)
movl $0x0, 0x54(%rsp)
movq 0x38(%rsp), %rcx
movl 0x54(%rsp), %eax
cmpl 0xc(%rcx), %eax
jge 0x4c8f3
movq 0x38(%rsp), %rdi
addq $0x20, %rdi
movslq 0x54(%rsp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x4cd00
addq 0x58(%rsp), %rax
movq %rax, 0x58(%rsp)
movl 0x54(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x54(%rsp)
jmp 0x4c8b4
movq 0x38(%rsp), %rcx
movl 0x4(%rcx), %eax
imull 0x4(%rcx), %eax
imull $0x3, %eax, %eax
imull $0x3, %eax, %eax
cltq
movq %rax, 0x28(%rsp)
movl $0x1, %edi
callq 0x11afb0
movq %rax, %rcx
movq 0x28(%rsp), %rax
imulq %rcx, %rax
addq 0x58(%rsp), %rax
movq %rax, 0x58(%rsp)
movl $0x0, 0x50(%rsp)
movq 0x38(%rsp), %rcx
movl 0x50(%rsp), %eax
cmpl 0xc(%rcx), %eax
jge 0x4c976
movq 0x38(%rsp), %rdi
addq $0xe8, %rdi
movslq 0x50(%rsp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x4cd00
addq 0x58(%rsp), %rax
movq %rax, 0x58(%rsp)
movl 0x50(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x50(%rsp)
jmp 0x4c934
movq 0x38(%rsp), %rcx
movl 0x4(%rcx), %eax
imull 0x4(%rcx), %eax
imull $0x3, %eax, %eax
imull $0x3, %eax, %eax
cltq
movq %rax, 0x20(%rsp)
movl $0x1, %edi
callq 0x11afb0
movq %rax, %rcx
movq 0x20(%rsp), %rax
imulq %rcx, %rax
addq 0x58(%rsp), %rax
movq %rax, 0x58(%rsp)
movl $0x0, 0x4c(%rsp)
movq 0x38(%rsp), %rcx
movl 0x4c(%rsp), %eax
cmpl 0xc(%rcx), %eax
jge 0x4c9f9
movq 0x38(%rsp), %rdi
addq $0x1b0, %rdi # imm = 0x1B0
movslq 0x4c(%rsp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x4cd00
addq 0x58(%rsp), %rax
movq %rax, 0x58(%rsp)
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x4c9b7
movq 0x38(%rsp), %rcx
movl 0x4(%rcx), %eax
imull 0x4(%rcx), %eax
imull $0x3, %eax, %eax
imull $0x3, %eax, %eax
cltq
movq %rax, 0x8(%rsp)
movl $0x1, %edi
callq 0x11afb0
movq 0x38(%rsp), %rdi
movq %rax, %rcx
movq 0x8(%rsp), %rax
imulq %rcx, %rax
addq 0x58(%rsp), %rax
movq %rax, 0x58(%rsp)
addq $0x278, %rdi # imm = 0x278
callq 0x4cd00
movq 0x38(%rsp), %rcx
addq 0x58(%rsp), %rax
movq %rax, 0x58(%rsp)
movl 0x8(%rcx), %eax
imull 0x4(%rcx), %eax
imull $0x3, %eax, %eax
imull $0x3, %eax, %eax
cltq
movq %rax, 0x10(%rsp)
movl $0x1, %edi
callq 0x11afb0
movq 0x10(%rsp), %rcx
movq %rax, %rdx
movq 0x38(%rsp), %rax
imulq %rdx, %rcx
addq 0x58(%rsp), %rcx
movq %rcx, 0x58(%rsp)
movslq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
xorl %edi, %edi
callq 0x11afb0
movq %rax, %rcx
movq 0x18(%rsp), %rax
imulq %rcx, %rax
addq 0x58(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
addq $0x68, %rsp
retq
nopl (%rax,%rax)
| _ZN11TinyDecoder18calculate_mem_sizeEv:
sub rsp, 68h
mov [rsp+68h+var_8], rdi
mov rcx, [rsp+68h+var_8]
mov [rsp+68h+var_30], rcx
mov eax, [rcx+4]
imul eax, [rcx]
imul eax, 3
imul eax, 3
cdqe
mov [rsp+68h+var_38], rax
mov edi, 1
call ggml_type_size
mov rcx, [rsp+68h+var_38]
mov rdx, rax
mov rax, [rsp+68h+var_30]
imul rcx, rdx
mov [rsp+68h+var_10], rcx
movsxd rax, dword ptr [rax+4]
mov [rsp+68h+var_28], rax
xor edi, edi
call ggml_type_size
mov rcx, rax
mov rax, [rsp+68h+var_28]
imul rax, rcx
add rax, [rsp+68h+var_10]
mov [rsp+68h+var_10], rax
mov [rsp+68h+var_14], 0
loc_4C8B4:
mov rcx, [rsp+68h+var_30]
mov eax, [rsp+68h+var_14]
cmp eax, [rcx+0Ch]
jge short loc_4C8F3
mov rdi, [rsp+68h+var_30]
add rdi, 20h ; ' '
movsxd rax, [rsp+68h+var_14]
shl rax, 6
add rdi, rax; this
call _ZN8TAEBlock18calculate_mem_sizeEv; TAEBlock::calculate_mem_size(void)
add rax, [rsp+68h+var_10]
mov [rsp+68h+var_10], rax
mov eax, [rsp+68h+var_14]
add eax, 1
mov [rsp+68h+var_14], eax
jmp short loc_4C8B4
loc_4C8F3:
mov rcx, [rsp+68h+var_30]
mov eax, [rcx+4]
imul eax, [rcx+4]
imul eax, 3
imul eax, 3
cdqe
mov [rsp+68h+var_40], rax
mov edi, 1
call ggml_type_size
mov rcx, rax
mov rax, [rsp+68h+var_40]
imul rax, rcx
add rax, [rsp+68h+var_10]
mov [rsp+68h+var_10], rax
mov [rsp+68h+var_18], 0
loc_4C934:
mov rcx, [rsp+68h+var_30]
mov eax, [rsp+68h+var_18]
cmp eax, [rcx+0Ch]
jge short loc_4C976
mov rdi, [rsp+68h+var_30]
add rdi, 0E8h
movsxd rax, [rsp+68h+var_18]
shl rax, 6
add rdi, rax; this
call _ZN8TAEBlock18calculate_mem_sizeEv; TAEBlock::calculate_mem_size(void)
add rax, [rsp+68h+var_10]
mov [rsp+68h+var_10], rax
mov eax, [rsp+68h+var_18]
add eax, 1
mov [rsp+68h+var_18], eax
jmp short loc_4C934
loc_4C976:
mov rcx, [rsp+68h+var_30]
mov eax, [rcx+4]
imul eax, [rcx+4]
imul eax, 3
imul eax, 3
cdqe
mov [rsp+68h+var_48], rax
mov edi, 1
call ggml_type_size
mov rcx, rax
mov rax, [rsp+68h+var_48]
imul rax, rcx
add rax, [rsp+68h+var_10]
mov [rsp+68h+var_10], rax
mov [rsp+68h+var_1C], 0
loc_4C9B7:
mov rcx, [rsp+68h+var_30]
mov eax, [rsp+68h+var_1C]
cmp eax, [rcx+0Ch]
jge short loc_4C9F9
mov rdi, [rsp+68h+var_30]
add rdi, 1B0h
movsxd rax, [rsp+68h+var_1C]
shl rax, 6
add rdi, rax; this
call _ZN8TAEBlock18calculate_mem_sizeEv; TAEBlock::calculate_mem_size(void)
add rax, [rsp+68h+var_10]
mov [rsp+68h+var_10], rax
mov eax, [rsp+68h+var_1C]
add eax, 1
mov [rsp+68h+var_1C], eax
jmp short loc_4C9B7
loc_4C9F9:
mov rcx, [rsp+68h+var_30]
mov eax, [rcx+4]
imul eax, [rcx+4]
imul eax, 3
imul eax, 3
cdqe
mov [rsp+68h+var_60], rax
mov edi, 1
call ggml_type_size
mov rdi, [rsp+68h+var_30]
mov rcx, rax
mov rax, [rsp+68h+var_60]
imul rax, rcx
add rax, [rsp+68h+var_10]
mov [rsp+68h+var_10], rax
add rdi, 278h; this
call _ZN8TAEBlock18calculate_mem_sizeEv; TAEBlock::calculate_mem_size(void)
mov rcx, [rsp+68h+var_30]
add rax, [rsp+68h+var_10]
mov [rsp+68h+var_10], rax
mov eax, [rcx+8]
imul eax, [rcx+4]
imul eax, 3
imul eax, 3
cdqe
mov [rsp+68h+var_58], rax
mov edi, 1
call ggml_type_size
mov rcx, [rsp+68h+var_58]
mov rdx, rax
mov rax, [rsp+68h+var_30]
imul rcx, rdx
add rcx, [rsp+68h+var_10]
mov [rsp+68h+var_10], rcx
movsxd rax, dword ptr [rax+8]
mov [rsp+68h+var_50], rax
xor edi, edi
call ggml_type_size
mov rcx, rax
mov rax, [rsp+68h+var_50]
imul rax, rcx
add rax, [rsp+68h+var_10]
mov [rsp+68h+var_10], rax
mov rax, [rsp+68h+var_10]
add rsp, 68h
retn
| long long TinyDecoder::calculate_mem_size(TinyDecoder *this)
{
long long v2; // [rsp+8h] [rbp-60h]
long long v3; // [rsp+10h] [rbp-58h]
long long v4; // [rsp+18h] [rbp-50h]
long long v5; // [rsp+20h] [rbp-48h]
long long v6; // [rsp+28h] [rbp-40h]
long long v7; // [rsp+30h] [rbp-38h]
long long v8; // [rsp+40h] [rbp-28h]
int k; // [rsp+4Ch] [rbp-1Ch]
int j; // [rsp+50h] [rbp-18h]
int i; // [rsp+54h] [rbp-14h]
long long v12; // [rsp+58h] [rbp-10h]
long long v13; // [rsp+58h] [rbp-10h]
long long v14; // [rsp+58h] [rbp-10h]
long long v15; // [rsp+58h] [rbp-10h]
long long v16; // [rsp+58h] [rbp-10h]
long long v17; // [rsp+58h] [rbp-10h]
long long v18; // [rsp+58h] [rbp-10h]
v7 = 9 * *(_DWORD *)this * *((_DWORD *)this + 1);
v12 = ggml_type_size(1LL) * v7;
v8 = *((int *)this + 1);
v13 = v12 + ggml_type_size(0LL) * v8;
for ( i = 0; i < *((_DWORD *)this + 3); ++i )
v13 += TAEBlock::calculate_mem_size((TinyDecoder *)((char *)this + 64 * (long long)i + 32));
v6 = 9 * *((_DWORD *)this + 1) * *((_DWORD *)this + 1);
v14 = v13 + ggml_type_size(1LL) * v6;
for ( j = 0; j < *((_DWORD *)this + 3); ++j )
v14 += TAEBlock::calculate_mem_size((TinyDecoder *)((char *)this + 64 * (long long)j + 232));
v5 = 9 * *((_DWORD *)this + 1) * *((_DWORD *)this + 1);
v15 = v14 + ggml_type_size(1LL) * v5;
for ( k = 0; k < *((_DWORD *)this + 3); ++k )
v15 += TAEBlock::calculate_mem_size((TinyDecoder *)((char *)this + 64 * (long long)k + 432));
v2 = 9 * *((_DWORD *)this + 1) * *((_DWORD *)this + 1);
v16 = v15 + ggml_type_size(1LL) * v2;
v17 = v16 + TAEBlock::calculate_mem_size((TinyDecoder *)((char *)this + 632));
v3 = 9 * *((_DWORD *)this + 1) * *((_DWORD *)this + 2);
v18 = v17 + ggml_type_size(1LL) * v3;
v4 = *((int *)this + 2);
return v18 + ggml_type_size(0LL) * v4;
}
| calculate_mem_size:
SUB RSP,0x68
MOV qword ptr [RSP + 0x60],RDI
MOV RCX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x38],RCX
MOV EAX,dword ptr [RCX + 0x4]
IMUL EAX,dword ptr [RCX]
IMUL EAX,EAX,0x3
IMUL EAX,EAX,0x3
CDQE
MOV qword ptr [RSP + 0x30],RAX
MOV EDI,0x1
CALL 0x0021afb0
MOV RCX,qword ptr [RSP + 0x30]
MOV RDX,RAX
MOV RAX,qword ptr [RSP + 0x38]
IMUL RCX,RDX
MOV qword ptr [RSP + 0x58],RCX
MOVSXD RAX,dword ptr [RAX + 0x4]
MOV qword ptr [RSP + 0x40],RAX
XOR EDI,EDI
CALL 0x0021afb0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x40]
IMUL RAX,RCX
ADD RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x58],RAX
MOV dword ptr [RSP + 0x54],0x0
LAB_0014c8b4:
MOV RCX,qword ptr [RSP + 0x38]
MOV EAX,dword ptr [RSP + 0x54]
CMP EAX,dword ptr [RCX + 0xc]
JGE 0x0014c8f3
MOV RDI,qword ptr [RSP + 0x38]
ADD RDI,0x20
MOVSXD RAX,dword ptr [RSP + 0x54]
SHL RAX,0x6
ADD RDI,RAX
CALL 0x0014cd00
ADD RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x58],RAX
MOV EAX,dword ptr [RSP + 0x54]
ADD EAX,0x1
MOV dword ptr [RSP + 0x54],EAX
JMP 0x0014c8b4
LAB_0014c8f3:
MOV RCX,qword ptr [RSP + 0x38]
MOV EAX,dword ptr [RCX + 0x4]
IMUL EAX,dword ptr [RCX + 0x4]
IMUL EAX,EAX,0x3
IMUL EAX,EAX,0x3
CDQE
MOV qword ptr [RSP + 0x28],RAX
MOV EDI,0x1
CALL 0x0021afb0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x28]
IMUL RAX,RCX
ADD RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x58],RAX
MOV dword ptr [RSP + 0x50],0x0
LAB_0014c934:
MOV RCX,qword ptr [RSP + 0x38]
MOV EAX,dword ptr [RSP + 0x50]
CMP EAX,dword ptr [RCX + 0xc]
JGE 0x0014c976
MOV RDI,qword ptr [RSP + 0x38]
ADD RDI,0xe8
MOVSXD RAX,dword ptr [RSP + 0x50]
SHL RAX,0x6
ADD RDI,RAX
CALL 0x0014cd00
ADD RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x58],RAX
MOV EAX,dword ptr [RSP + 0x50]
ADD EAX,0x1
MOV dword ptr [RSP + 0x50],EAX
JMP 0x0014c934
LAB_0014c976:
MOV RCX,qword ptr [RSP + 0x38]
MOV EAX,dword ptr [RCX + 0x4]
IMUL EAX,dword ptr [RCX + 0x4]
IMUL EAX,EAX,0x3
IMUL EAX,EAX,0x3
CDQE
MOV qword ptr [RSP + 0x20],RAX
MOV EDI,0x1
CALL 0x0021afb0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x20]
IMUL RAX,RCX
ADD RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x58],RAX
MOV dword ptr [RSP + 0x4c],0x0
LAB_0014c9b7:
MOV RCX,qword ptr [RSP + 0x38]
MOV EAX,dword ptr [RSP + 0x4c]
CMP EAX,dword ptr [RCX + 0xc]
JGE 0x0014c9f9
MOV RDI,qword ptr [RSP + 0x38]
ADD RDI,0x1b0
MOVSXD RAX,dword ptr [RSP + 0x4c]
SHL RAX,0x6
ADD RDI,RAX
CALL 0x0014cd00
ADD RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x58],RAX
MOV EAX,dword ptr [RSP + 0x4c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x4c],EAX
JMP 0x0014c9b7
LAB_0014c9f9:
MOV RCX,qword ptr [RSP + 0x38]
MOV EAX,dword ptr [RCX + 0x4]
IMUL EAX,dword ptr [RCX + 0x4]
IMUL EAX,EAX,0x3
IMUL EAX,EAX,0x3
CDQE
MOV qword ptr [RSP + 0x8],RAX
MOV EDI,0x1
CALL 0x0021afb0
MOV RDI,qword ptr [RSP + 0x38]
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
IMUL RAX,RCX
ADD RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x58],RAX
ADD RDI,0x278
CALL 0x0014cd00
MOV RCX,qword ptr [RSP + 0x38]
ADD RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x58],RAX
MOV EAX,dword ptr [RCX + 0x8]
IMUL EAX,dword ptr [RCX + 0x4]
IMUL EAX,EAX,0x3
IMUL EAX,EAX,0x3
CDQE
MOV qword ptr [RSP + 0x10],RAX
MOV EDI,0x1
CALL 0x0021afb0
MOV RCX,qword ptr [RSP + 0x10]
MOV RDX,RAX
MOV RAX,qword ptr [RSP + 0x38]
IMUL RCX,RDX
ADD RCX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x58],RCX
MOVSXD RAX,dword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x18],RAX
XOR EDI,EDI
CALL 0x0021afb0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x18]
IMUL RAX,RCX
ADD RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x58]
ADD RSP,0x68
RET
|
/* TinyDecoder::calculate_mem_size() */
long __thiscall TinyDecoder::calculate_mem_size(TinyDecoder *this)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
long lVar6;
long lVar7;
long lVar8;
long lVar9;
int local_1c;
int local_18;
int local_14;
long local_10;
iVar1 = *(int *)(this + 4);
iVar2 = *(int *)this;
lVar6 = ggml_type_size(1);
iVar3 = *(int *)(this + 4);
lVar7 = ggml_type_size(0);
local_10 = iVar3 * lVar7 + (iVar1 * iVar2 * 9) * lVar6;
for (local_14 = 0; local_14 < *(int *)(this + 0xc); local_14 = local_14 + 1) {
lVar6 = TAEBlock::calculate_mem_size((TAEBlock *)(this + (long)local_14 * 0x40 + 0x20));
local_10 = lVar6 + local_10;
}
iVar1 = *(int *)(this + 4);
iVar2 = *(int *)(this + 4);
lVar6 = ggml_type_size(1);
local_10 = (iVar1 * iVar2 * 9) * lVar6 + local_10;
for (local_18 = 0; local_18 < *(int *)(this + 0xc); local_18 = local_18 + 1) {
lVar6 = TAEBlock::calculate_mem_size((TAEBlock *)(this + (long)local_18 * 0x40 + 0xe8));
local_10 = lVar6 + local_10;
}
iVar1 = *(int *)(this + 4);
iVar2 = *(int *)(this + 4);
lVar6 = ggml_type_size(1);
local_10 = (iVar1 * iVar2 * 9) * lVar6 + local_10;
for (local_1c = 0; local_1c < *(int *)(this + 0xc); local_1c = local_1c + 1) {
lVar6 = TAEBlock::calculate_mem_size((TAEBlock *)(this + (long)local_1c * 0x40 + 0x1b0));
local_10 = lVar6 + local_10;
}
iVar1 = *(int *)(this + 4);
iVar2 = *(int *)(this + 4);
lVar6 = ggml_type_size(1);
lVar7 = TAEBlock::calculate_mem_size((TAEBlock *)(this + 0x278));
iVar3 = *(int *)(this + 8);
iVar4 = *(int *)(this + 4);
lVar8 = ggml_type_size(1);
iVar5 = *(int *)(this + 8);
lVar9 = ggml_type_size(0);
return iVar5 * lVar9 +
(iVar3 * iVar4 * 9) * lVar8 + lVar7 + (iVar1 * iVar2 * 9) * lVar6 + local_10;
}
| |
55,193 | TinyDecoder::calculate_mem_size() | 7CodeWizard[P]stablediffusion/tae.hpp | size_t calculate_mem_size() {
size_t mem_size = channels * z_channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_input_w
mem_size += channels * ggml_type_size(GGML_TYPE_F32); // conv_input_b
for (int i = 0; i < num_blocks; i++) {
mem_size += input_blocks[i].calculate_mem_size();
}
mem_size += channels * channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_1_w
for (int i = 0; i < num_blocks; i++) {
mem_size += middle_blocks[i].calculate_mem_size();
}
mem_size += channels * channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_2_w
for (int i = 0; i < num_blocks; i++) {
mem_size += output_blocks[i].calculate_mem_size();
}
mem_size += channels * channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_3_w
mem_size += final_block.calculate_mem_size();
mem_size += output_channels * channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_input_w
mem_size += output_channels * ggml_type_size(GGML_TYPE_F32); // conv_input_b
return mem_size;
} | O2 | cpp | TinyDecoder::calculate_mem_size():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x4(%rdi), %eax
imull (%rdi), %eax
leal (%rax,%rax,8), %eax
movslq %eax, %r14
pushq $0x1
popq %rdi
callq 0x67b83
movq %rax, %r15
imulq %r14, %r15
movslq 0x4(%rbx), %r13
xorl %r12d, %r12d
xorl %edi, %edi
callq 0x67b83
movq %rax, %r14
imulq %r13, %r14
addq %r15, %r14
leaq 0x20(%rbx), %r15
movslq 0xc(%rbx), %rax
cmpq %rax, %r12
jge 0x24a4e
movq %r15, %rdi
callq 0x24c84
addq %rax, %r14
incq %r12
addq $0x40, %r15
jmp 0x24a31
movl 0x4(%rbx), %eax
imull %eax, %eax
leal (%rax,%rax,8), %eax
movslq %eax, %r12
pushq $0x1
popq %rdi
callq 0x67b83
movq %rax, %r15
imulq %r12, %r15
addq %r14, %r15
leaq 0xe8(%rbx), %r14
xorl %r12d, %r12d
movslq 0xc(%rbx), %rax
cmpq %rax, %r12
jge 0x24a93
movq %r14, %rdi
callq 0x24c84
addq %rax, %r15
incq %r12
addq $0x40, %r14
jmp 0x24a76
movl 0x4(%rbx), %eax
imull %eax, %eax
leal (%rax,%rax,8), %eax
movslq %eax, %r12
pushq $0x1
popq %rdi
callq 0x67b83
movq %rax, %r14
imulq %r12, %r14
addq %r15, %r14
leaq 0x1b0(%rbx), %r15
xorl %r12d, %r12d
movslq 0xc(%rbx), %rax
cmpq %rax, %r12
jge 0x24ad8
movq %r15, %rdi
callq 0x24c84
addq %rax, %r14
incq %r12
addq $0x40, %r15
jmp 0x24abb
movl 0x4(%rbx), %eax
imull %eax, %eax
leal (%rax,%rax,8), %eax
movslq %eax, %r12
pushq $0x1
popq %r13
movl %r13d, %edi
callq 0x67b83
movq %rax, %r15
imulq %r12, %r15
leaq 0x278(%rbx), %rdi
callq 0x24c84
movq %rax, %r12
movl 0x8(%rbx), %eax
imull 0x4(%rbx), %eax
leal (%rax,%rax,8), %eax
movslq %eax, %rbp
movl %r13d, %edi
callq 0x67b83
movq %rax, %r13
imulq %rbp, %r13
movslq 0x8(%rbx), %rbx
xorl %edi, %edi
callq 0x67b83
imulq %rbx, %rax
addq %r13, %rax
addq %r14, %r12
addq %r15, %r12
addq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN11TinyDecoder18calculate_mem_sizeEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
mov eax, [rdi+4]
imul eax, [rdi]
lea eax, [rax+rax*8]
movsxd r14, eax
push 1
pop rdi
call ggml_type_size
mov r15, rax
imul r15, r14
movsxd r13, dword ptr [rbx+4]
xor r12d, r12d
xor edi, edi
call ggml_type_size
mov r14, rax
imul r14, r13
add r14, r15
lea r15, [rbx+20h]
loc_24A31:
movsxd rax, dword ptr [rbx+0Ch]
cmp r12, rax
jge short loc_24A4E
mov rdi, r15; this
call _ZN8TAEBlock18calculate_mem_sizeEv; TAEBlock::calculate_mem_size(void)
add r14, rax
inc r12
add r15, 40h ; '@'
jmp short loc_24A31
loc_24A4E:
mov eax, [rbx+4]
imul eax, eax
lea eax, [rax+rax*8]
movsxd r12, eax
push 1
pop rdi
call ggml_type_size
mov r15, rax
imul r15, r12
add r15, r14
lea r14, [rbx+0E8h]
xor r12d, r12d
loc_24A76:
movsxd rax, dword ptr [rbx+0Ch]
cmp r12, rax
jge short loc_24A93
mov rdi, r14; this
call _ZN8TAEBlock18calculate_mem_sizeEv; TAEBlock::calculate_mem_size(void)
add r15, rax
inc r12
add r14, 40h ; '@'
jmp short loc_24A76
loc_24A93:
mov eax, [rbx+4]
imul eax, eax
lea eax, [rax+rax*8]
movsxd r12, eax
push 1
pop rdi
call ggml_type_size
mov r14, rax
imul r14, r12
add r14, r15
lea r15, [rbx+1B0h]
xor r12d, r12d
loc_24ABB:
movsxd rax, dword ptr [rbx+0Ch]
cmp r12, rax
jge short loc_24AD8
mov rdi, r15; this
call _ZN8TAEBlock18calculate_mem_sizeEv; TAEBlock::calculate_mem_size(void)
add r14, rax
inc r12
add r15, 40h ; '@'
jmp short loc_24ABB
loc_24AD8:
mov eax, [rbx+4]
imul eax, eax
lea eax, [rax+rax*8]
movsxd r12, eax
push 1
pop r13
mov edi, r13d
call ggml_type_size
mov r15, rax
imul r15, r12
lea rdi, [rbx+278h]; this
call _ZN8TAEBlock18calculate_mem_sizeEv; TAEBlock::calculate_mem_size(void)
mov r12, rax
mov eax, [rbx+8]
imul eax, [rbx+4]
lea eax, [rax+rax*8]
movsxd rbp, eax
mov edi, r13d
call ggml_type_size
mov r13, rax
imul r13, rbp
movsxd rbx, dword ptr [rbx+8]
xor edi, edi
call ggml_type_size
imul rax, rbx
add rax, r13
add r12, r14
add r12, r15
add rax, r12
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long TinyDecoder::calculate_mem_size(TinyDecoder *this)
{
long long v1; // r14
long long v2; // r15
long long v3; // r13
long long v4; // r12
long long v5; // r14
TAEBlock *v6; // r15
long long v7; // r12
long long v8; // r15
TAEBlock *v9; // r14
long long i; // r12
long long v11; // r12
long long v12; // r14
TAEBlock *v13; // r15
long long j; // r12
long long v15; // r12
long long v16; // r15
long long v17; // r12
long long v18; // rbp
long long v19; // r13
long long v20; // rbx
v1 = 9 * *(_DWORD *)this * *((_DWORD *)this + 1);
v2 = v1 * ggml_type_size(1LL);
v3 = *((int *)this + 1);
v4 = 0LL;
v5 = v2 + v3 * ggml_type_size(0LL);
v6 = (TinyDecoder *)((char *)this + 32);
while ( v4 < *((int *)this + 3) )
{
v5 += TAEBlock::calculate_mem_size(v6);
++v4;
v6 = (TAEBlock *)((char *)v6 + 64);
}
v7 = 9 * *((_DWORD *)this + 1) * *((_DWORD *)this + 1);
v8 = v5 + v7 * ggml_type_size(1LL);
v9 = (TinyDecoder *)((char *)this + 232);
for ( i = 0LL; i < *((int *)this + 3); ++i )
{
v8 += TAEBlock::calculate_mem_size(v9);
v9 = (TAEBlock *)((char *)v9 + 64);
}
v11 = 9 * *((_DWORD *)this + 1) * *((_DWORD *)this + 1);
v12 = v8 + v11 * ggml_type_size(1LL);
v13 = (TinyDecoder *)((char *)this + 432);
for ( j = 0LL; j < *((int *)this + 3); ++j )
{
v12 += TAEBlock::calculate_mem_size(v13);
v13 = (TAEBlock *)((char *)v13 + 64);
}
v15 = 9 * *((_DWORD *)this + 1) * *((_DWORD *)this + 1);
v16 = v15 * ggml_type_size(1LL);
v17 = TAEBlock::calculate_mem_size((TinyDecoder *)((char *)this + 632));
v18 = 9 * *((_DWORD *)this + 1) * *((_DWORD *)this + 2);
v19 = v18 * ggml_type_size(1LL);
v20 = *((int *)this + 2);
return v16 + v12 + v17 + v19 + v20 * ggml_type_size(0LL);
}
| calculate_mem_size:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV EAX,dword ptr [RDI + 0x4]
IMUL EAX,dword ptr [RDI]
LEA EAX,[RAX + RAX*0x8]
MOVSXD R14,EAX
PUSH 0x1
POP RDI
CALL 0x00167b83
MOV R15,RAX
IMUL R15,R14
MOVSXD R13,dword ptr [RBX + 0x4]
XOR R12D,R12D
XOR EDI,EDI
CALL 0x00167b83
MOV R14,RAX
IMUL R14,R13
ADD R14,R15
LEA R15,[RBX + 0x20]
LAB_00124a31:
MOVSXD RAX,dword ptr [RBX + 0xc]
CMP R12,RAX
JGE 0x00124a4e
MOV RDI,R15
CALL 0x00124c84
ADD R14,RAX
INC R12
ADD R15,0x40
JMP 0x00124a31
LAB_00124a4e:
MOV EAX,dword ptr [RBX + 0x4]
IMUL EAX,EAX
LEA EAX,[RAX + RAX*0x8]
MOVSXD R12,EAX
PUSH 0x1
POP RDI
CALL 0x00167b83
MOV R15,RAX
IMUL R15,R12
ADD R15,R14
LEA R14,[RBX + 0xe8]
XOR R12D,R12D
LAB_00124a76:
MOVSXD RAX,dword ptr [RBX + 0xc]
CMP R12,RAX
JGE 0x00124a93
MOV RDI,R14
CALL 0x00124c84
ADD R15,RAX
INC R12
ADD R14,0x40
JMP 0x00124a76
LAB_00124a93:
MOV EAX,dword ptr [RBX + 0x4]
IMUL EAX,EAX
LEA EAX,[RAX + RAX*0x8]
MOVSXD R12,EAX
PUSH 0x1
POP RDI
CALL 0x00167b83
MOV R14,RAX
IMUL R14,R12
ADD R14,R15
LEA R15,[RBX + 0x1b0]
XOR R12D,R12D
LAB_00124abb:
MOVSXD RAX,dword ptr [RBX + 0xc]
CMP R12,RAX
JGE 0x00124ad8
MOV RDI,R15
CALL 0x00124c84
ADD R14,RAX
INC R12
ADD R15,0x40
JMP 0x00124abb
LAB_00124ad8:
MOV EAX,dword ptr [RBX + 0x4]
IMUL EAX,EAX
LEA EAX,[RAX + RAX*0x8]
MOVSXD R12,EAX
PUSH 0x1
POP R13
MOV EDI,R13D
CALL 0x00167b83
MOV R15,RAX
IMUL R15,R12
LEA RDI,[RBX + 0x278]
CALL 0x00124c84
MOV R12,RAX
MOV EAX,dword ptr [RBX + 0x8]
IMUL EAX,dword ptr [RBX + 0x4]
LEA EAX,[RAX + RAX*0x8]
MOVSXD RBP,EAX
MOV EDI,R13D
CALL 0x00167b83
MOV R13,RAX
IMUL R13,RBP
MOVSXD RBX,dword ptr [RBX + 0x8]
XOR EDI,EDI
CALL 0x00167b83
IMUL RAX,RBX
ADD RAX,R13
ADD R12,R14
ADD R12,R15
ADD RAX,R12
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* TinyDecoder::calculate_mem_size() */
long __thiscall TinyDecoder::calculate_mem_size(TinyDecoder *this)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
long lVar5;
long lVar6;
long lVar7;
long lVar8;
long lVar9;
TinyDecoder *pTVar10;
iVar1 = *(int *)(this + 4);
iVar2 = *(int *)this;
lVar5 = ggml_type_size(1);
iVar3 = *(int *)(this + 4);
lVar6 = ggml_type_size(0);
lVar6 = lVar6 * iVar3 + lVar5 * (iVar1 * iVar2 * 9);
pTVar10 = this + 0x20;
for (lVar5 = 0; lVar5 < *(int *)(this + 0xc); lVar5 = lVar5 + 1) {
lVar7 = TAEBlock::calculate_mem_size((TAEBlock *)pTVar10);
lVar6 = lVar6 + lVar7;
pTVar10 = (TinyDecoder *)((TAEBlock *)pTVar10 + 0x40);
}
iVar1 = *(int *)(this + 4);
lVar5 = ggml_type_size(1);
lVar6 = lVar5 * (iVar1 * iVar1 * 9) + lVar6;
pTVar10 = this + 0xe8;
for (lVar5 = 0; lVar5 < *(int *)(this + 0xc); lVar5 = lVar5 + 1) {
lVar7 = TAEBlock::calculate_mem_size((TAEBlock *)pTVar10);
lVar6 = lVar6 + lVar7;
pTVar10 = (TinyDecoder *)((TAEBlock *)pTVar10 + 0x40);
}
iVar1 = *(int *)(this + 4);
lVar5 = ggml_type_size(1);
lVar6 = lVar5 * (iVar1 * iVar1 * 9) + lVar6;
pTVar10 = this + 0x1b0;
for (lVar5 = 0; lVar5 < *(int *)(this + 0xc); lVar5 = lVar5 + 1) {
lVar7 = TAEBlock::calculate_mem_size((TAEBlock *)pTVar10);
lVar6 = lVar6 + lVar7;
pTVar10 = (TinyDecoder *)((TAEBlock *)pTVar10 + 0x40);
}
iVar1 = *(int *)(this + 4);
lVar5 = ggml_type_size(1);
lVar7 = TAEBlock::calculate_mem_size((TAEBlock *)(this + 0x278));
iVar2 = *(int *)(this + 8);
iVar3 = *(int *)(this + 4);
lVar8 = ggml_type_size(1);
iVar4 = *(int *)(this + 8);
lVar9 = ggml_type_size(0);
return lVar9 * iVar4 + lVar8 * (iVar2 * iVar3 * 9) + lVar7 + lVar6 + lVar5 * (iVar1 * iVar1 * 9);
}
| |
55,194 | TinyDecoder::calculate_mem_size() | 7CodeWizard[P]stablediffusion/tae.hpp | size_t calculate_mem_size() {
size_t mem_size = channels * z_channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_input_w
mem_size += channels * ggml_type_size(GGML_TYPE_F32); // conv_input_b
for (int i = 0; i < num_blocks; i++) {
mem_size += input_blocks[i].calculate_mem_size();
}
mem_size += channels * channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_1_w
for (int i = 0; i < num_blocks; i++) {
mem_size += middle_blocks[i].calculate_mem_size();
}
mem_size += channels * channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_2_w
for (int i = 0; i < num_blocks; i++) {
mem_size += output_blocks[i].calculate_mem_size();
}
mem_size += channels * channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_3_w
mem_size += final_block.calculate_mem_size();
mem_size += output_channels * channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_input_w
mem_size += output_channels * ggml_type_size(GGML_TYPE_F32); // conv_input_b
return mem_size;
} | O3 | cpp | TinyDecoder::calculate_mem_size():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x4(%rdi), %eax
imull (%rdi), %eax
leal (%rax,%rax,8), %eax
movslq %eax, %r14
movl $0x1, %edi
callq 0x8ceea
movq %rax, %r15
imulq %r14, %r15
movslq 0x4(%rbx), %r12
xorl %edi, %edi
callq 0x8ceea
movq %rax, %r14
imulq %r12, %r14
addq %r15, %r14
cmpl $0x0, 0xc(%rbx)
jle 0x3a7ce
leaq 0x20(%rbx), %r15
xorl %r12d, %r12d
movq %r15, %rdi
callq 0x3aa1a
addq %rax, %r14
incq %r12
movslq 0xc(%rbx), %rax
addq $0x40, %r15
cmpq %rax, %r12
jl 0x3a7b3
movl 0x4(%rbx), %eax
imull %eax, %eax
leal (%rax,%rax,8), %eax
movslq %eax, %r12
movl $0x1, %edi
callq 0x8ceea
movq %rax, %r15
imulq %r12, %r15
addq %r14, %r15
cmpl $0x0, 0xc(%rbx)
jle 0x3a819
leaq 0xe8(%rbx), %r14
xorl %r12d, %r12d
movq %r14, %rdi
callq 0x3aa1a
addq %rax, %r15
incq %r12
movslq 0xc(%rbx), %rax
addq $0x40, %r14
cmpq %rax, %r12
jl 0x3a7fe
movl 0x4(%rbx), %eax
imull %eax, %eax
leal (%rax,%rax,8), %eax
movslq %eax, %r12
movl $0x1, %edi
callq 0x8ceea
movq %rax, %r14
imulq %r12, %r14
addq %r15, %r14
cmpl $0x0, 0xc(%rbx)
jle 0x3a864
leaq 0x1b0(%rbx), %r15
xorl %r12d, %r12d
movq %r15, %rdi
callq 0x3aa1a
addq %rax, %r14
incq %r12
movslq 0xc(%rbx), %rax
addq $0x40, %r15
cmpq %rax, %r12
jl 0x3a849
movl 0x4(%rbx), %eax
imull %eax, %eax
leal (%rax,%rax,8), %eax
movslq %eax, %r12
movl $0x1, %edi
callq 0x8ceea
movq %rax, %r15
imulq %r12, %r15
leaq 0x278(%rbx), %rdi
callq 0x3aa1a
movq %rax, %r12
movl 0x8(%rbx), %eax
imull 0x4(%rbx), %eax
leal (%rax,%rax,8), %eax
movslq %eax, %rbp
movl $0x1, %edi
callq 0x8ceea
movq %rax, %r13
imulq %rbp, %r13
movslq 0x8(%rbx), %rbx
xorl %edi, %edi
callq 0x8ceea
imulq %rbx, %rax
addq %r13, %rax
addq %r14, %r12
addq %r15, %r12
addq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN11TinyDecoder18calculate_mem_sizeEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
mov eax, [rdi+4]
imul eax, [rdi]
lea eax, [rax+rax*8]
movsxd r14, eax
mov edi, 1
call ggml_type_size
mov r15, rax
imul r15, r14
movsxd r12, dword ptr [rbx+4]
xor edi, edi
call ggml_type_size
mov r14, rax
imul r14, r12
add r14, r15
cmp dword ptr [rbx+0Ch], 0
jle short loc_3A7CE
lea r15, [rbx+20h]
xor r12d, r12d
loc_3A7B3:
mov rdi, r15; this
call _ZN8TAEBlock18calculate_mem_sizeEv; TAEBlock::calculate_mem_size(void)
add r14, rax
inc r12
movsxd rax, dword ptr [rbx+0Ch]
add r15, 40h ; '@'
cmp r12, rax
jl short loc_3A7B3
loc_3A7CE:
mov eax, [rbx+4]
imul eax, eax
lea eax, [rax+rax*8]
movsxd r12, eax
mov edi, 1
call ggml_type_size
mov r15, rax
imul r15, r12
add r15, r14
cmp dword ptr [rbx+0Ch], 0
jle short loc_3A819
lea r14, [rbx+0E8h]
xor r12d, r12d
loc_3A7FE:
mov rdi, r14; this
call _ZN8TAEBlock18calculate_mem_sizeEv; TAEBlock::calculate_mem_size(void)
add r15, rax
inc r12
movsxd rax, dword ptr [rbx+0Ch]
add r14, 40h ; '@'
cmp r12, rax
jl short loc_3A7FE
loc_3A819:
mov eax, [rbx+4]
imul eax, eax
lea eax, [rax+rax*8]
movsxd r12, eax
mov edi, 1
call ggml_type_size
mov r14, rax
imul r14, r12
add r14, r15
cmp dword ptr [rbx+0Ch], 0
jle short loc_3A864
lea r15, [rbx+1B0h]
xor r12d, r12d
loc_3A849:
mov rdi, r15; this
call _ZN8TAEBlock18calculate_mem_sizeEv; TAEBlock::calculate_mem_size(void)
add r14, rax
inc r12
movsxd rax, dword ptr [rbx+0Ch]
add r15, 40h ; '@'
cmp r12, rax
jl short loc_3A849
loc_3A864:
mov eax, [rbx+4]
imul eax, eax
lea eax, [rax+rax*8]
movsxd r12, eax
mov edi, 1
call ggml_type_size
mov r15, rax
imul r15, r12
lea rdi, [rbx+278h]; this
call _ZN8TAEBlock18calculate_mem_sizeEv; TAEBlock::calculate_mem_size(void)
mov r12, rax
mov eax, [rbx+8]
imul eax, [rbx+4]
lea eax, [rax+rax*8]
movsxd rbp, eax
mov edi, 1
call ggml_type_size
mov r13, rax
imul r13, rbp
movsxd rbx, dword ptr [rbx+8]
xor edi, edi
call ggml_type_size
imul rax, rbx
add rax, r13
add r12, r14
add r12, r15
add rax, r12
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long TinyDecoder::calculate_mem_size(TinyDecoder *this)
{
long long v1; // r14
long long v2; // r15
long long v3; // r12
long long v4; // r14
TAEBlock *v5; // r15
long long v6; // r12
long long v7; // r12
long long v8; // r15
TAEBlock *v9; // r14
long long v10; // r12
long long v11; // r12
long long v12; // r14
TAEBlock *v13; // r15
long long v14; // r12
long long v15; // r12
long long v16; // r15
long long v17; // r12
long long v18; // rbp
long long v19; // r13
long long v20; // rbx
v1 = 9 * *(_DWORD *)this * *((_DWORD *)this + 1);
v2 = v1 * ggml_type_size(1LL);
v3 = *((int *)this + 1);
v4 = v2 + v3 * ggml_type_size(0LL);
if ( *((int *)this + 3) > 0 )
{
v5 = (TinyDecoder *)((char *)this + 32);
v6 = 0LL;
do
{
v4 += TAEBlock::calculate_mem_size(v5);
++v6;
v5 = (TAEBlock *)((char *)v5 + 64);
}
while ( v6 < *((int *)this + 3) );
}
v7 = 9 * *((_DWORD *)this + 1) * *((_DWORD *)this + 1);
v8 = v4 + v7 * ggml_type_size(1LL);
if ( *((int *)this + 3) > 0 )
{
v9 = (TinyDecoder *)((char *)this + 232);
v10 = 0LL;
do
{
v8 += TAEBlock::calculate_mem_size(v9);
++v10;
v9 = (TAEBlock *)((char *)v9 + 64);
}
while ( v10 < *((int *)this + 3) );
}
v11 = 9 * *((_DWORD *)this + 1) * *((_DWORD *)this + 1);
v12 = v8 + v11 * ggml_type_size(1LL);
if ( *((int *)this + 3) > 0 )
{
v13 = (TinyDecoder *)((char *)this + 432);
v14 = 0LL;
do
{
v12 += TAEBlock::calculate_mem_size(v13);
++v14;
v13 = (TAEBlock *)((char *)v13 + 64);
}
while ( v14 < *((int *)this + 3) );
}
v15 = 9 * *((_DWORD *)this + 1) * *((_DWORD *)this + 1);
v16 = v15 * ggml_type_size(1LL);
v17 = TAEBlock::calculate_mem_size((TinyDecoder *)((char *)this + 632));
v18 = 9 * *((_DWORD *)this + 1) * *((_DWORD *)this + 2);
v19 = v18 * ggml_type_size(1LL);
v20 = *((int *)this + 2);
return v16 + v12 + v17 + v19 + v20 * ggml_type_size(0LL);
}
| |||
55,195 | string_parse_kv_override(char const*, std::vector<llama_model_kv_override, std::allocator<llama_model_kv_override>>&) | monkey531[P]llama/common/common.cpp | bool string_parse_kv_override(const char * data, std::vector<llama_model_kv_override> & overrides) {
const char * sep = strchr(data, '=');
if (sep == nullptr || sep - data >= 128) {
LOG_ERR("%s: malformed KV override '%s'\n", __func__, data);
return false;
}
llama_model_kv_override kvo;
std::strncpy(kvo.key, data, sep - data);
kvo.key[sep - data] = 0;
sep++;
if (strncmp(sep, "int:", 4) == 0) {
sep += 4;
kvo.tag = LLAMA_KV_OVERRIDE_TYPE_INT;
kvo.val_i64 = std::atol(sep);
} else if (strncmp(sep, "float:", 6) == 0) {
sep += 6;
kvo.tag = LLAMA_KV_OVERRIDE_TYPE_FLOAT;
kvo.val_f64 = std::atof(sep);
} else if (strncmp(sep, "bool:", 5) == 0) {
sep += 5;
kvo.tag = LLAMA_KV_OVERRIDE_TYPE_BOOL;
if (std::strcmp(sep, "true") == 0) {
kvo.val_bool = true;
} else if (std::strcmp(sep, "false") == 0) {
kvo.val_bool = false;
} else {
LOG_ERR("%s: invalid boolean value for KV override '%s'\n", __func__, data);
return false;
}
} else if (strncmp(sep, "str:", 4) == 0) {
sep += 4;
kvo.tag = LLAMA_KV_OVERRIDE_TYPE_STR;
if (strlen(sep) > 127) {
LOG_ERR("%s: malformed KV override '%s', value cannot exceed 127 chars\n", __func__, data);
return false;
}
strncpy(kvo.val_str, sep, 127);
kvo.val_str[127] = '\0';
} else {
LOG_ERR("%s: invalid type for KV override '%s'\n", __func__, data);
return false;
}
overrides.emplace_back(std::move(kvo));
return true;
} | O3 | cpp | string_parse_kv_override(char const*, std::vector<llama_model_kv_override, std::allocator<llama_model_kv_override>>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x110, %rsp # imm = 0x110
movq %rsi, %r14
movq %rdi, %rbx
movl $0x3d, %esi
callq 0x1a260
testq %rax, %rax
je 0x246e8
movq %rax, %r15
movq %rax, %r12
subq %rbx, %r12
cmpq $0x80, %r12
jl 0x24724
leaq 0xbf9e1(%rip), %rax # 0xe40d0
cmpl $0x0, (%rax)
js 0x248d0
callq 0x842cf
leaq 0x89641(%rip), %rdx # 0xadd45
leaq 0x8965a(%rip), %rcx # 0xadd65
xorl %ebp, %ebp
movq %rax, %rdi
movl $0x4, %esi
movq %rbx, %r8
xorl %eax, %eax
callq 0x8436c
jmp 0x248d2
leaq 0xc(%rsp), %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x1a3b0
movb $0x0, 0xc(%rsp,%r12)
leaq 0x1(%r15), %r12
leaq 0x89639(%rip), %rsi # 0xadd7e
movl $0x4, %edx
movq %r12, %rdi
callq 0x1a370
testl %eax, %eax
je 0x247c7
leaq 0x89626(%rip), %rsi # 0xadd83
movl $0x6, %edx
movq %r12, %rdi
callq 0x1a370
testl %eax, %eax
je 0x247e5
leaq 0x89615(%rip), %rsi # 0xadd8a
movl $0x5, %edx
movq %r12, %rdi
callq 0x1a370
testl %eax, %eax
je 0x24840
leaq 0x8962f(%rip), %rsi # 0xaddc0
movl $0x4, %edx
movq %r12, %rdi
callq 0x1a370
testl %eax, %eax
je 0x24897
leaq 0xbf923(%rip), %rax # 0xe40d0
cmpl $0x0, (%rax)
js 0x248d0
callq 0x842cf
leaq 0x89642(%rip), %rdx # 0xade04
jmp 0x24704
addq $0x5, %r15
movl $0x0, 0x8(%rsp)
movq %r15, %rdi
callq 0x1a8d0
movq %rax, 0x90(%rsp)
jmp 0x24802
addq $0x7, %r15
movl $0x1, 0x8(%rsp)
movq %r15, %rdi
callq 0x1a920
movsd %xmm0, 0x90(%rsp)
movq 0x8(%r14), %rax
cmpq 0x10(%r14), %rax
je 0x24828
leaq 0x8(%rsp), %rsi
movl $0x108, %edx # imm = 0x108
movq %rax, %rdi
callq 0x1a5e0
addq $0x108, 0x8(%r14) # imm = 0x108
jmp 0x24838
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x81e44
movb $0x1, %bpl
jmp 0x248d2
addq $0x6, %r15
movl $0x2, 0x8(%rsp)
leaq 0x894b0(%rip), %rsi # 0xadd03
movq %r15, %rdi
callq 0x1aa70
testl %eax, %eax
je 0x248e4
leaq 0x8949e(%rip), %rsi # 0xadd08
movq %r15, %rdi
callq 0x1aa70
testl %eax, %eax
je 0x24912
leaq 0xbf84f(%rip), %rax # 0xe40d0
cmpl $0x0, (%rax)
js 0x248d0
callq 0x842cf
leaq 0x894fe(%rip), %rdx # 0xadd90
jmp 0x24704
addq $0x5, %r15
movl $0x3, 0x8(%rsp)
movq %r15, %rdi
callq 0x1a330
cmpq $0x80, %rax
jb 0x248f1
leaq 0xbf816(%rip), %rax # 0xe40d0
cmpl $0x0, (%rax)
js 0x248d0
callq 0x842cf
leaq 0x894fa(%rip), %rdx # 0xaddc5
jmp 0x24704
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x110, %rsp # imm = 0x110
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, 0x90(%rsp)
jmp 0x24802
leaq 0x90(%rsp), %rbx
movl $0x7f, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1a3b0
movb $0x0, 0x7f(%rbx)
jmp 0x24802
movb $0x0, 0x90(%rsp)
jmp 0x24802
| _Z24string_parse_kv_overridePKcRSt6vectorI23llama_model_kv_overrideSaIS2_EE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 110h
mov r14, rsi
mov rbx, rdi
mov esi, 3Dh ; '='
call _strchr
test rax, rax
jz short loc_246E8
mov r15, rax
mov r12, rax
sub r12, rbx
cmp r12, 80h
jl short loc_24724
loc_246E8:
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js loc_248D0
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aSMalformedKvOv; "%s: malformed KV override '%s'\n"
loc_24704:
lea rcx, aStringParseKvO; "string_parse_kv_override"
xor ebp, ebp
mov rdi, rax
mov esi, 4
mov r8, rbx
xor eax, eax
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
jmp loc_248D2
loc_24724:
lea rdi, [rsp+138h+var_12C]
mov rsi, rbx
mov rdx, r12
call _strncpy
mov [rsp+r12+138h+var_12C], 0
lea r12, [r15+1]
lea rsi, aInt; "int:"
mov edx, 4
mov rdi, r12
call _strncmp
test eax, eax
jz short loc_247C7
lea rsi, aFloat; "float:"
mov edx, 6
mov rdi, r12
call _strncmp
test eax, eax
jz short loc_247E5
lea rsi, aBool; "bool:"
mov edx, 5
mov rdi, r12
call _strncmp
test eax, eax
jz loc_24840
lea rsi, aStr; "str:"
mov edx, 4
mov rdi, r12
call _strncmp
test eax, eax
jz loc_24897
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js loc_248D0
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aSInvalidTypeFo; "%s: invalid type for KV override '%s'\n"
jmp loc_24704
loc_247C7:
add r15, 5
mov [rsp+138h+var_130], 0
mov rdi, r15
call _atol
mov [rsp+138h+var_A8], rax
jmp short loc_24802
loc_247E5:
add r15, 7
mov [rsp+138h+var_130], 1
mov rdi, r15
call _atof
movsd [rsp+138h+var_A8], xmm0
loc_24802:
mov rax, [r14+8]
cmp rax, [r14+10h]
jz short loc_24828
lea rsi, [rsp+138h+var_130]
mov edx, 108h
mov rdi, rax
call _memcpy
add qword ptr [r14+8], 108h
jmp short loc_24838
loc_24828:
lea rdx, [rsp+138h+var_130]
mov rdi, r14
mov rsi, rax
call _ZNSt6vectorI23llama_model_kv_overrideSaIS0_EE17_M_realloc_insertIJS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_; std::vector<llama_model_kv_override>::_M_realloc_insert<llama_model_kv_override>(__gnu_cxx::__normal_iterator<llama_model_kv_override*,std::vector<llama_model_kv_override>>,llama_model_kv_override &&)
loc_24838:
mov bpl, 1
jmp loc_248D2
loc_24840:
add r15, 6
mov [rsp+138h+var_130], 2
lea rsi, aTrue; "true"
mov rdi, r15
call _strcmp
test eax, eax
jz loc_248E4
lea rsi, aFalse; "false"
mov rdi, r15
call _strcmp
test eax, eax
jz loc_24912
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_248D0
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aSInvalidBoolea; "%s: invalid boolean value for KV overri"...
jmp loc_24704
loc_24897:
add r15, 5
mov [rsp+138h+var_130], 3
mov rdi, r15
call _strlen
cmp rax, 80h
jb short loc_248F1
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_248D0
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aSMalformedKvOv_0; "%s: malformed KV override '%s', value c"...
jmp loc_24704
loc_248D0:
xor ebp, ebp
loc_248D2:
mov eax, ebp
add rsp, 110h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_248E4:
mov byte ptr [rsp+138h+var_A8], 1
jmp loc_24802
loc_248F1:
lea rbx, [rsp+138h+var_A8]
mov edx, 7Fh
mov rdi, rbx
mov rsi, r15
call _strncpy
mov byte ptr [rbx+7Fh], 0
jmp loc_24802
loc_24912:
mov byte ptr [rsp+138h+var_A8], 0
jmp loc_24802
| long long string_parse_kv_override(long long a1, long long a2)
{
unsigned int v2; // ebp
long long v3; // rax
long long v4; // r15
long long v5; // r12
int v6; // eax
int v7; // r9d
const char *v8; // rdx
long long v9; // r15
long long v10; // r15
int v12; // [rsp+8h] [rbp-130h] BYREF
_BYTE v13[132]; // [rsp+Ch] [rbp-12Ch] BYREF
long long v14[15]; // [rsp+90h] [rbp-A8h] BYREF
char v15; // [rsp+10Fh] [rbp-29h]
v3 = strchr(a1, 61LL);
if ( !v3 || (v4 = v3, v5 = v3 - a1, v3 - a1 >= 128) )
{
if ( common_log_verbosity_thold >= 0 )
{
v6 = common_log_main();
v8 = "%s: malformed KV override '%s'\n";
LABEL_5:
v2 = 0;
common_log_add(v6, 4, (_DWORD)v8, (unsigned int)"string_parse_kv_override", a1, v7);
return v2;
}
return 0;
}
strncpy(v13, a1, v3 - a1);
v13[v5] = 0;
if ( !(unsigned int)strncmp(v4 + 1, "int:", 4LL) )
{
v12 = 0;
v14[0] = atol(v4 + 5);
}
else if ( !(unsigned int)strncmp(v4 + 1, "float:", 6LL) )
{
v12 = 1;
v14[0] = atof(v4 + 7);
}
else if ( !(unsigned int)strncmp(v4 + 1, "bool:", 5LL) )
{
v9 = v4 + 6;
v12 = 2;
if ( !(unsigned int)strcmp(v9, "true") )
{
LOBYTE(v14[0]) = 1;
}
else
{
if ( (unsigned int)strcmp(v9, "false") )
{
if ( common_log_verbosity_thold >= 0 )
{
v6 = common_log_main();
v8 = "%s: invalid boolean value for KV override '%s'\n";
goto LABEL_5;
}
return 0;
}
LOBYTE(v14[0]) = 0;
}
}
else
{
if ( (unsigned int)strncmp(v4 + 1, "str:", 4LL) )
{
if ( common_log_verbosity_thold >= 0 )
{
v6 = common_log_main();
v8 = "%s: invalid type for KV override '%s'\n";
goto LABEL_5;
}
return 0;
}
v10 = v4 + 5;
v12 = 3;
if ( (unsigned long long)strlen(v10) >= 0x80 )
{
if ( common_log_verbosity_thold >= 0 )
{
v6 = common_log_main();
v8 = "%s: malformed KV override '%s', value cannot exceed 127 chars\n";
goto LABEL_5;
}
return 0;
}
strncpy(v14, v10, 127LL);
v15 = 0;
}
if ( *(_QWORD *)(a2 + 8) == *(_QWORD *)(a2 + 16) )
{
std::vector<llama_model_kv_override>::_M_realloc_insert<llama_model_kv_override>(a2, *(_QWORD *)(a2 + 8), &v12);
}
else
{
memcpy(*(_QWORD *)(a2 + 8), &v12, 264LL);
*(_QWORD *)(a2 + 8) += 264LL;
}
LOBYTE(v2) = 1;
return v2;
}
| string_parse_kv_override:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x110
MOV R14,RSI
MOV RBX,RDI
MOV ESI,0x3d
CALL 0x0011a260
TEST RAX,RAX
JZ 0x001246e8
MOV R15,RAX
MOV R12,RAX
SUB R12,RBX
CMP R12,0x80
JL 0x00124724
LAB_001246e8:
LEA RAX,[0x1e40d0]
CMP dword ptr [RAX],0x0
JS 0x001248d0
CALL 0x001842cf
LEA RDX,[0x1add45]
LAB_00124704:
LEA RCX,[0x1add65]
XOR EBP,EBP
MOV RDI,RAX
MOV ESI,0x4
MOV R8,RBX
XOR EAX,EAX
CALL 0x0018436c
JMP 0x001248d2
LAB_00124724:
LEA RDI,[RSP + 0xc]
MOV RSI,RBX
MOV RDX,R12
CALL 0x0011a3b0
MOV byte ptr [RSP + R12*0x1 + 0xc],0x0
LEA R12,[R15 + 0x1]
LEA RSI,[0x1add7e]
MOV EDX,0x4
MOV RDI,R12
CALL 0x0011a370
TEST EAX,EAX
JZ 0x001247c7
LEA RSI,[0x1add83]
MOV EDX,0x6
MOV RDI,R12
CALL 0x0011a370
TEST EAX,EAX
JZ 0x001247e5
LEA RSI,[0x1add8a]
MOV EDX,0x5
MOV RDI,R12
CALL 0x0011a370
TEST EAX,EAX
JZ 0x00124840
LEA RSI,[0x1addc0]
MOV EDX,0x4
MOV RDI,R12
CALL 0x0011a370
TEST EAX,EAX
JZ 0x00124897
LEA RAX,[0x1e40d0]
CMP dword ptr [RAX],0x0
JS 0x001248d0
CALL 0x001842cf
LEA RDX,[0x1ade04]
JMP 0x00124704
LAB_001247c7:
ADD R15,0x5
MOV dword ptr [RSP + 0x8],0x0
MOV RDI,R15
CALL 0x0011a8d0
MOV qword ptr [RSP + 0x90],RAX
JMP 0x00124802
LAB_001247e5:
ADD R15,0x7
MOV dword ptr [RSP + 0x8],0x1
MOV RDI,R15
CALL 0x0011a920
MOVSD qword ptr [RSP + 0x90],XMM0
LAB_00124802:
MOV RAX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [R14 + 0x10]
JZ 0x00124828
LEA RSI,[RSP + 0x8]
MOV EDX,0x108
MOV RDI,RAX
CALL 0x0011a5e0
ADD qword ptr [R14 + 0x8],0x108
JMP 0x00124838
LAB_00124828:
LEA RDX,[RSP + 0x8]
MOV RDI,R14
MOV RSI,RAX
CALL 0x00181e44
LAB_00124838:
MOV BPL,0x1
JMP 0x001248d2
LAB_00124840:
ADD R15,0x6
MOV dword ptr [RSP + 0x8],0x2
LEA RSI,[0x1add03]
MOV RDI,R15
CALL 0x0011aa70
TEST EAX,EAX
JZ 0x001248e4
LEA RSI,[0x1add08]
MOV RDI,R15
CALL 0x0011aa70
TEST EAX,EAX
JZ 0x00124912
LEA RAX,[0x1e40d0]
CMP dword ptr [RAX],0x0
JS 0x001248d0
CALL 0x001842cf
LEA RDX,[0x1add90]
JMP 0x00124704
LAB_00124897:
ADD R15,0x5
MOV dword ptr [RSP + 0x8],0x3
MOV RDI,R15
CALL 0x0011a330
CMP RAX,0x80
JC 0x001248f1
LEA RAX,[0x1e40d0]
CMP dword ptr [RAX],0x0
JS 0x001248d0
CALL 0x001842cf
LEA RDX,[0x1addc5]
JMP 0x00124704
LAB_001248d0:
XOR EBP,EBP
LAB_001248d2:
MOV EAX,EBP
ADD RSP,0x110
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001248e4:
MOV byte ptr [RSP + 0x90],0x1
JMP 0x00124802
LAB_001248f1:
LEA RBX,[RSP + 0x90]
MOV EDX,0x7f
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011a3b0
MOV byte ptr [RBX + 0x7f],0x0
JMP 0x00124802
LAB_00124912:
MOV byte ptr [RSP + 0x90],0x0
JMP 0x00124802
|
/* string_parse_kv_override(char const*, std::vector<llama_model_kv_override,
std::allocator<llama_model_kv_override> >&) */
ulong string_parse_kv_override(char *param_1,vector *param_2)
{
char *__s1;
void *__dest;
int iVar1;
char *pcVar2;
int8 uVar3;
int8 unaff_RBP;
ulong uVar4;
size_t sVar5;
int4 local_130;
char local_12c [132];
double local_a8 [15];
int1 local_29;
pcVar2 = strchr(param_1,0x3d);
if ((pcVar2 == (char *)0x0) || (sVar5 = (long)pcVar2 - (long)param_1, 0x7f < (long)sVar5)) {
if (common_log_verbosity_thold < 0) goto LAB_001248d0;
uVar3 = common_log_main();
pcVar2 = "%s: malformed KV override \'%s\'\n";
goto LAB_00124704;
}
strncpy(local_12c,param_1,sVar5);
local_12c[sVar5] = '\0';
__s1 = pcVar2 + 1;
iVar1 = strncmp(__s1,"int:",4);
if (iVar1 == 0) {
local_130 = 0;
local_a8[0] = (double)atol(pcVar2 + 5);
}
else {
iVar1 = strncmp(__s1,"float:",6);
if (iVar1 == 0) {
local_130 = 1;
local_a8[0] = atof(pcVar2 + 7);
}
else {
iVar1 = strncmp(__s1,"bool:",5);
if (iVar1 != 0) {
iVar1 = strncmp(__s1,"str:",4);
if (iVar1 == 0) {
local_130 = 3;
sVar5 = strlen(pcVar2 + 5);
if (sVar5 < 0x80) {
strncpy((char *)local_a8,pcVar2 + 5,0x7f);
local_29 = 0;
goto LAB_00124802;
}
if (common_log_verbosity_thold < 0) goto LAB_001248d0;
uVar3 = common_log_main();
pcVar2 = "%s: malformed KV override \'%s\', value cannot exceed 127 chars\n";
}
else {
if (common_log_verbosity_thold < 0) {
LAB_001248d0:
uVar4 = 0;
goto LAB_001248d2;
}
uVar3 = common_log_main();
pcVar2 = "%s: invalid type for KV override \'%s\'\n";
}
LAB_00124704:
uVar4 = 0;
common_log_add(uVar3,4,pcVar2,"string_parse_kv_override",param_1);
goto LAB_001248d2;
}
local_130 = 2;
iVar1 = strcmp(pcVar2 + 6,"true");
if (iVar1 == 0) {
local_a8[0] = (double)CONCAT71(local_a8[0]._1_7_,1);
}
else {
iVar1 = strcmp(pcVar2 + 6,"false");
if (iVar1 != 0) {
if (common_log_verbosity_thold < 0) goto LAB_001248d0;
uVar3 = common_log_main();
pcVar2 = "%s: invalid boolean value for KV override \'%s\'\n";
goto LAB_00124704;
}
local_a8[0] = (double)((ulong)local_a8[0] & 0xffffffffffffff00);
}
}
}
LAB_00124802:
__dest = *(void **)(param_2 + 8);
if (__dest == *(void **)(param_2 + 0x10)) {
std::vector<llama_model_kv_override,std::allocator<llama_model_kv_override>>::
_M_realloc_insert<llama_model_kv_override>
((vector<llama_model_kv_override,std::allocator<llama_model_kv_override>> *)param_2,
__dest,&local_130);
}
else {
memcpy(__dest,&local_130,0x108);
*(long *)(param_2 + 8) = *(long *)(param_2 + 8) + 0x108;
}
uVar4 = CONCAT71((int7)((ulong)unaff_RBP >> 8),1);
LAB_001248d2:
return uVar4 & 0xffffffff;
}
| |
55,196 | ok | eloqsql/libmariadb/unittest/mytap/tap.c | void
ok(int const pass, char const *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
if (!pass && *g_test.todo == '\0')
++g_test.failed;
vemit_tap(pass, fmt, ap);
va_end(ap);
if (*g_test.todo != '\0')
emit_dir("todo", g_test.todo);
emit_endl();
} | O0 | c | ok:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0x15548
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
movq %r9, -0xb8(%rbp)
movq %r8, -0xc0(%rbp)
movq %rcx, -0xc8(%rbp)
movq %rdx, -0xd0(%rbp)
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x30(%rbp), %rax
leaq -0xe0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
cmpl $0x0, -0x4(%rbp)
jne 0x155b0
movsbl 0x4adc4(%rip), %eax # 0x60360
cmpl $0x0, %eax
jne 0x155b0
movl 0x4adb5(%rip), %eax # 0x6035c
addl $0x1, %eax
movl %eax, 0x4adac(%rip) # 0x6035c
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x15600
leaq -0x30(%rbp), %rax
movsbl 0x4ad95(%rip), %eax # 0x60360
cmpl $0x0, %eax
je 0x155e7
leaq 0x361e3(%rip), %rdi # 0x4b7ba
leaq 0x4ad76(%rip), %rsi # 0x60354
addq $0xc, %rsi
callq 0x156d0
callq 0x159c0
addq $0xe0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ok:
push rbp
mov rbp, rsp
sub rsp, 0E0h
test al, al
jz short loc_15548
movaps [rbp+var_B0], xmm0
movaps [rbp+var_A0], xmm1
movaps [rbp+var_90], xmm2
movaps [rbp+var_80], xmm3
movaps [rbp+var_70], xmm4
movaps [rbp+var_60], xmm5
movaps [rbp+var_50], xmm6
movaps [rbp+var_40], xmm7
loc_15548:
mov [rbp+var_B8], r9
mov [rbp+var_C0], r8
mov [rbp+var_C8], rcx
mov [rbp+var_D0], rdx
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
lea rax, [rbp+var_30]
lea rcx, [rbp+var_E0]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 10h
cmp [rbp+var_4], 0
jnz short loc_155B0
movsx eax, cs:byte_60360
cmp eax, 0
jnz short loc_155B0
mov eax, cs:dword_6035C
add eax, 1
mov cs:dword_6035C, eax
loc_155B0:
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
lea rdx, [rbp+var_30]
call vemit_tap
lea rax, [rbp+var_30]
movsx eax, cs:byte_60360
cmp eax, 0
jz short loc_155E7
lea rdi, aTodo; "todo"
lea rsi, g_test
add rsi, 0Ch
call emit_dir
loc_155E7:
call emit_endl
add rsp, 0E0h
pop rbp
retn
| long long ok(unsigned int a1, long long a2, ...)
{
va_list va; // [rsp+B0h] [rbp-30h] BYREF
long long v4; // [rsp+D0h] [rbp-10h]
unsigned int v5; // [rsp+DCh] [rbp-4h]
va_start(va, a2);
v5 = a1;
v4 = a2;
if ( !a1 && !byte_60360 )
++dword_6035C;
vemit_tap(v5, v4, va);
if ( byte_60360 )
emit_dir("todo", &g_test + 3);
return emit_endl();
}
| ok:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xe0
TEST AL,AL
JZ 0x00115548
MOVAPS xmmword ptr [RBP + -0xb0],XMM0
MOVAPS xmmword ptr [RBP + -0xa0],XMM1
MOVAPS xmmword ptr [RBP + -0x90],XMM2
MOVAPS xmmword ptr [RBP + -0x80],XMM3
MOVAPS xmmword ptr [RBP + -0x70],XMM4
MOVAPS xmmword ptr [RBP + -0x60],XMM5
MOVAPS xmmword ptr [RBP + -0x50],XMM6
MOVAPS xmmword ptr [RBP + -0x40],XMM7
LAB_00115548:
MOV qword ptr [RBP + -0xb8],R9
MOV qword ptr [RBP + -0xc0],R8
MOV qword ptr [RBP + -0xc8],RCX
MOV qword ptr [RBP + -0xd0],RDX
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
LEA RAX,[RBP + -0x30]
LEA RCX,[RBP + -0xe0]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x10
CMP dword ptr [RBP + -0x4],0x0
JNZ 0x001155b0
MOVSX EAX,byte ptr [0x00160360]
CMP EAX,0x0
JNZ 0x001155b0
MOV EAX,dword ptr [0x0016035c]
ADD EAX,0x1
MOV dword ptr [0x0016035c],EAX
LAB_001155b0:
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDX,[RBP + -0x30]
CALL 0x00115600
LEA RAX,[RBP + -0x30]
MOVSX EAX,byte ptr [0x00160360]
CMP EAX,0x0
JZ 0x001155e7
LEA RDI,[0x14b7ba]
LEA RSI,[0x160354]
ADD RSI,0xc
CALL 0x001156d0
LAB_001155e7:
CALL 0x001159c0
ADD RSP,0xe0
POP RBP
RET
|
void ok(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,int param_9,
int8 param_10,int8 param_11,int8 param_12,int8 param_13,
int8 param_14)
{
char in_AL;
int1 local_e8 [16];
int8 local_d8;
int8 local_d0;
int8 local_c8;
int8 local_c0;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int4 local_38;
int4 local_34;
int1 *local_30;
int1 *local_28;
int8 local_18;
int local_c;
if (in_AL != '\0') {
local_b8 = param_1;
local_a8 = param_2;
local_98 = param_3;
local_88 = param_4;
local_78 = param_5;
local_68 = param_6;
local_58 = param_7;
local_48 = param_8;
}
local_28 = local_e8;
local_30 = &stack0x00000008;
local_34 = 0x30;
local_38 = 0x10;
if ((param_9 == 0) && (DAT_00160360 == '\0')) {
DAT_0016035c = DAT_0016035c + 1;
}
local_d8 = param_11;
local_d0 = param_12;
local_c8 = param_13;
local_c0 = param_14;
local_18 = param_10;
local_c = param_9;
vemit_tap(param_9,param_10,&local_38);
if (DAT_00160360 != '\0') {
emit_dir(&DAT_0014b7ba,&DAT_00160360);
}
emit_endl();
return;
}
| |
55,197 | diff | eloqsql/strings/dtoa.c | static Bigint *diff(Bigint *a, Bigint *b, Stack_alloc *alloc)
{
Bigint *c;
int i, wa, wb;
ULong *xa, *xae, *xb, *xbe, *xc;
ULLong borrow, y;
i= cmp(a,b);
if (!i)
{
c= Balloc(0, alloc);
c->wds= 1;
c->p.x[0]= 0;
return c;
}
if (i < 0)
{
c= a;
a= b;
b= c;
i= 1;
}
else
i= 0;
c= Balloc(a->k, alloc);
c->sign= i;
wa= a->wds;
xa= a->p.x;
xae= xa + wa;
wb= b->wds;
xb= b->p.x;
xbe= xb + wb;
xc= c->p.x;
borrow= 0;
do
{
y= (ULLong)*xa++ - *xb++ - borrow;
borrow= y >> 32 & (ULong)1;
*xc++= (ULong) (y & FFFFFFFF);
}
while (xb < xbe);
while (xa < xae)
{
y= *xa++ - borrow;
borrow= y >> 32 & (ULong)1;
*xc++= (ULong) (y & FFFFFFFF);
}
while (!*--xc)
wa--;
c->wds= wa;
return c;
} | O0 | c | diff:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x6aa60
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0x6a89e
movq -0x20(%rbp), %rsi
xorl %edi, %edi
callq 0x69f70
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl $0x1, 0x14(%rax)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl $0x0, (%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x6aa4a
cmpl $0x0, -0x2c(%rbp)
jge 0x6a8c5
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x1, -0x2c(%rbp)
jmp 0x6a8cc
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edi
movq -0x20(%rbp), %rsi
callq 0x69f70
movq %rax, -0x28(%rbp)
movl -0x2c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movslq -0x30(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movslq -0x34(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq $0x0, -0x68(%rbp)
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x40(%rbp)
movl (%rax), %eax
movq -0x50(%rbp), %rcx
movq %rcx, %rdx
addq $0x4, %rdx
movq %rdx, -0x50(%rbp)
movl (%rcx), %ecx
subq %rcx, %rax
subq -0x68(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
shrq $0x20, %rax
andq $0x1, %rax
movq %rax, -0x68(%rbp)
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x70(%rbp), %rax
movl %eax, %ecx
movq -0x60(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x60(%rbp)
movl %ecx, (%rax)
movq -0x50(%rbp), %rax
cmpq -0x58(%rbp), %rax
jb 0x6a94d
jmp 0x6a9b7
movq -0x40(%rbp), %rax
cmpq -0x48(%rbp), %rax
jae 0x6aa0d
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x40(%rbp)
movl (%rax), %eax
subq -0x68(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
shrq $0x20, %rax
andq $0x1, %rax
movq %rax, -0x68(%rbp)
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x70(%rbp), %rax
movl %eax, %ecx
movq -0x60(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x60(%rbp)
movl %ecx, (%rax)
jmp 0x6a9b7
jmp 0x6aa0f
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $-0x4, %rcx
movq %rcx, -0x60(%rbp)
cmpl $0x0, -0x4(%rax)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x6aa2d
jmp 0x6aa38
movl -0x30(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x6aa0f
movl -0x30(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| diff:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call cmp
mov [rbp+var_2C], eax
cmp [rbp+var_2C], 0
jnz short loc_6A89E
mov rsi, [rbp+var_20]
xor edi, edi
call Balloc
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov dword ptr [rax+14h], 1
mov rax, [rbp+var_28]
mov rax, [rax]
mov dword ptr [rax], 0
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp loc_6AA4A
loc_6A89E:
cmp [rbp+var_2C], 0
jge short loc_6A8C5
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
mov [rbp+var_10], rax
mov rax, [rbp+var_28]
mov [rbp+var_18], rax
mov [rbp+var_2C], 1
jmp short loc_6A8CC
loc_6A8C5:
mov [rbp+var_2C], 0
loc_6A8CC:
mov rax, [rbp+var_10]
mov edi, [rax+8]
mov rsi, [rbp+var_20]
call Balloc
mov [rbp+var_28], rax
mov ecx, [rbp+var_2C]
mov rax, [rbp+var_28]
mov [rax+10h], ecx
mov rax, [rbp+var_10]
mov eax, [rax+14h]
mov [rbp+var_30], eax
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
movsxd rcx, [rbp+var_30]
shl rcx, 2
add rax, rcx
mov [rbp+var_48], rax
mov rax, [rbp+var_18]
mov eax, [rax+14h]
mov [rbp+var_34], eax
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
movsxd rcx, [rbp+var_34]
shl rcx, 2
add rax, rcx
mov [rbp+var_58], rax
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_60], rax
mov [rbp+var_68], 0
loc_6A94D:
mov rax, [rbp+var_40]
mov rcx, rax
add rcx, 4
mov [rbp+var_40], rcx
mov eax, [rax]
mov rcx, [rbp+var_50]
mov rdx, rcx
add rdx, 4
mov [rbp+var_50], rdx
mov ecx, [rcx]
sub rax, rcx
sub rax, [rbp+var_68]
mov [rbp+var_70], rax
mov rax, [rbp+var_70]
shr rax, 20h
and rax, 1
mov [rbp+var_68], rax
mov rax, 0FFFFFFFFh
and rax, [rbp+var_70]
mov ecx, eax
mov rax, [rbp+var_60]
mov rdx, rax
add rdx, 4
mov [rbp+var_60], rdx
mov [rax], ecx
mov rax, [rbp+var_50]
cmp rax, [rbp+var_58]
jb short loc_6A94D
jmp short $+2
loc_6A9B7:
mov rax, [rbp+var_40]
cmp rax, [rbp+var_48]
jnb short loc_6AA0D
mov rax, [rbp+var_40]
mov rcx, rax
add rcx, 4
mov [rbp+var_40], rcx
mov eax, [rax]
sub rax, [rbp+var_68]
mov [rbp+var_70], rax
mov rax, [rbp+var_70]
shr rax, 20h
and rax, 1
mov [rbp+var_68], rax
mov rax, 0FFFFFFFFh
and rax, [rbp+var_70]
mov ecx, eax
mov rax, [rbp+var_60]
mov rdx, rax
add rdx, 4
mov [rbp+var_60], rdx
mov [rax], ecx
jmp short loc_6A9B7
loc_6AA0D:
jmp short $+2
loc_6AA0F:
mov rax, [rbp+var_60]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_60], rcx
cmp dword ptr [rax-4], 0
setnz al
xor al, 0FFh
test al, 1
jnz short loc_6AA2D
jmp short loc_6AA38
loc_6AA2D:
mov eax, [rbp+var_30]
add eax, 0FFFFFFFFh
mov [rbp+var_30], eax
jmp short loc_6AA0F
loc_6AA38:
mov ecx, [rbp+var_30]
mov rax, [rbp+var_28]
mov [rax+14h], ecx
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_6AA4A:
mov rax, [rbp+var_8]
add rsp, 70h
pop rbp
retn
| long long diff(unsigned int **a1, unsigned int **a2, long long a3)
{
unsigned int *v3; // rax
unsigned int *v4; // rcx
_DWORD *v5; // rax
unsigned int *v6; // rax
_DWORD *v7; // rax
_DWORD *v8; // rax
unsigned long long v10; // [rsp+0h] [rbp-70h]
unsigned long long v11; // [rsp+0h] [rbp-70h]
long long v12; // [rsp+8h] [rbp-68h]
_DWORD *v13; // [rsp+10h] [rbp-60h]
unsigned long long v14; // [rsp+18h] [rbp-58h]
unsigned int *v15; // [rsp+20h] [rbp-50h]
unsigned long long v16; // [rsp+28h] [rbp-48h]
unsigned int *v17; // [rsp+30h] [rbp-40h]
int v18; // [rsp+40h] [rbp-30h]
int v19; // [rsp+44h] [rbp-2Ch]
int v20; // [rsp+44h] [rbp-2Ch]
long long v21; // [rsp+48h] [rbp-28h]
long long v22; // [rsp+48h] [rbp-28h]
unsigned int **v24; // [rsp+58h] [rbp-18h]
unsigned int **v25; // [rsp+60h] [rbp-10h]
v25 = a1;
v24 = a2;
v19 = cmp(a1, a2);
if ( v19 )
{
if ( v19 >= 0 )
{
v20 = 0;
}
else
{
v25 = a2;
v24 = a1;
v20 = 1;
}
v22 = Balloc(*((_DWORD *)v25 + 2), a3);
*(_DWORD *)(v22 + 16) = v20;
v18 = *((_DWORD *)v25 + 5);
v17 = *v25;
v16 = (unsigned long long)&(*v25)[v18];
v15 = *v24;
v14 = (unsigned long long)&(*v24)[*((int *)v24 + 5)];
v13 = *(_DWORD **)v22;
v12 = 0LL;
do
{
v3 = v17++;
v4 = v15++;
v10 = *v3 - (unsigned long long)*v4 - v12;
v12 = HIDWORD(v10) & 1;
v5 = v13++;
*v5 = v10;
}
while ( (unsigned long long)v15 < v14 );
while ( (unsigned long long)v17 < v16 )
{
v6 = v17++;
v11 = *v6 - v12;
v12 = HIDWORD(v11) & 1;
v7 = v13++;
*v7 = v11;
}
while ( 1 )
{
v8 = v13--;
if ( *(v8 - 1) )
break;
--v18;
}
*(_DWORD *)(v22 + 20) = v18;
return v22;
}
else
{
v21 = Balloc(0, a3);
*(_DWORD *)(v21 + 20) = 1;
**(_DWORD **)v21 = 0;
return v21;
}
}
| diff:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0016aa60
MOV dword ptr [RBP + -0x2c],EAX
CMP dword ptr [RBP + -0x2c],0x0
JNZ 0x0016a89e
MOV RSI,qword ptr [RBP + -0x20]
XOR EDI,EDI
CALL 0x00169f70
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x14],0x1
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0016aa4a
LAB_0016a89e:
CMP dword ptr [RBP + -0x2c],0x0
JGE 0x0016a8c5
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x18],RAX
MOV dword ptr [RBP + -0x2c],0x1
JMP 0x0016a8cc
LAB_0016a8c5:
MOV dword ptr [RBP + -0x2c],0x0
LAB_0016a8cc:
MOV RAX,qword ptr [RBP + -0x10]
MOV EDI,dword ptr [RAX + 0x8]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00169f70
MOV qword ptr [RBP + -0x28],RAX
MOV ECX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x30],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOVSXD RCX,dword ptr [RBP + -0x30]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOVSXD RCX,dword ptr [RBP + -0x34]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x60],RAX
MOV qword ptr [RBP + -0x68],0x0
LAB_0016a94d:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x40],RCX
MOV EAX,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x50]
MOV RDX,RCX
ADD RDX,0x4
MOV qword ptr [RBP + -0x50],RDX
MOV ECX,dword ptr [RCX]
SUB RAX,RCX
SUB RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x70]
SHR RAX,0x20
AND RAX,0x1
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x70]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RDX,RAX
ADD RDX,0x4
MOV qword ptr [RBP + -0x60],RDX
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x58]
JC 0x0016a94d
JMP 0x0016a9b7
LAB_0016a9b7:
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x48]
JNC 0x0016aa0d
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x40],RCX
MOV EAX,dword ptr [RAX]
SUB RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x70]
SHR RAX,0x20
AND RAX,0x1
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x70]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RDX,RAX
ADD RDX,0x4
MOV qword ptr [RBP + -0x60],RDX
MOV dword ptr [RAX],ECX
JMP 0x0016a9b7
LAB_0016aa0d:
JMP 0x0016aa0f
LAB_0016aa0f:
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,RAX
ADD RCX,-0x4
MOV qword ptr [RBP + -0x60],RCX
CMP dword ptr [RAX + -0x4],0x0
SETNZ AL
XOR AL,0xff
TEST AL,0x1
JNZ 0x0016aa2d
JMP 0x0016aa38
LAB_0016aa2d:
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x30],EAX
JMP 0x0016aa0f
LAB_0016aa38:
MOV ECX,dword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x14],ECX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_0016aa4a:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x70
POP RBP
RET
|
int8 * diff(int8 *param_1,int8 *param_2,int8 param_3)
{
uint *puVar1;
uint *puVar2;
int iVar3;
ulong uVar4;
uint *puVar5;
uint *puVar6;
int4 *puVar7;
ulong local_70;
int4 *local_68;
uint *local_58;
uint *local_48;
int local_38;
uint local_34;
int8 *local_20;
int8 *local_18;
int8 *local_10;
iVar3 = cmp(param_1,param_2);
if (iVar3 == 0) {
local_10 = (int8 *)Balloc(0,param_3);
*(int4 *)((long)local_10 + 0x14) = 1;
*(int4 *)*local_10 = 0;
}
else {
local_20 = param_2;
local_18 = param_1;
if (iVar3 < 0) {
local_20 = param_1;
local_18 = param_2;
}
local_34 = (uint)(iVar3 < 0);
local_10 = (int8 *)Balloc(*(int4 *)(local_18 + 1),param_3);
*(uint *)(local_10 + 2) = local_34;
local_38 = *(int *)((long)local_18 + 0x14);
puVar1 = (uint *)*local_18;
iVar3 = *(int *)((long)local_20 + 0x14);
puVar2 = (uint *)*local_20;
local_70 = 0;
local_68 = (int4 *)*local_10;
local_58 = puVar2;
local_48 = puVar1;
do {
puVar5 = local_48 + 1;
puVar6 = local_58 + 1;
uVar4 = ((ulong)*local_48 - (ulong)*local_58) - local_70;
local_70 = uVar4 >> 0x20 & 1;
puVar7 = local_68 + 1;
*local_68 = (int)uVar4;
local_68 = puVar7;
local_58 = puVar6;
local_48 = puVar5;
} while (puVar6 < puVar2 + iVar3);
while (local_48 < puVar1 + local_38) {
uVar4 = *local_48 - local_70;
local_70 = uVar4 >> 0x20 & 1;
*local_68 = (int)uVar4;
local_68 = local_68 + 1;
local_48 = local_48 + 1;
}
while (local_68[-1] == 0) {
local_38 = local_38 + -1;
local_68 = local_68 + -1;
}
*(int *)((long)local_10 + 0x14) = local_38;
}
return local_10;
}
| |
55,198 | process_int_arg | eloqsql/strings/my_vsnprintf.c | static char *process_int_arg(char *to, const char *end, size_t length,
longlong par, char arg_type, uint print_type)
{
size_t res_length, to_length;
char *store_start= to, *store_end;
char buff[32];
if ((to_length= (size_t) (end-to)) < 16 || length)
store_start= buff;
if (arg_type == 'd' || arg_type == 'i')
store_end= longlong10_to_str(par, store_start, -10);
else if (arg_type == 'u')
store_end= longlong10_to_str(par, store_start, 10);
else if (arg_type == 'p')
{
store_start[0]= '0';
store_start[1]= 'x';
store_end= ll2str(par, store_start + 2, 16, 0);
}
else if (arg_type == 'o')
{
store_end= ll2str(par, store_start, 8, 0);
}
else
{
DBUG_ASSERT(arg_type == 'X' || arg_type =='x');
store_end= ll2str(par, store_start, 16, (arg_type == 'X'));
}
if ((res_length= (size_t) (store_end - store_start)) > to_length)
return to; /* num doesn't fit in output */
/* If %#d syntax was used, we have to pre-zero/pre-space the string */
if (store_start == buff)
{
length= MY_MIN(length, to_length);
if (res_length < length)
{
size_t diff= (length- res_length);
bfill(to, diff, (print_type & PREZERO_ARG) ? '0' : ' ');
if (arg_type == 'p' && print_type & PREZERO_ARG)
{
if (diff > 1)
to[1]= 'x';
else
store_start[0]= 'x';
store_start[1]= '0';
}
to+= diff;
}
bmove(to, store_start, res_length);
}
to+= res_length;
return to;
} | O3 | c | process_int_arg:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r13
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
subq %rdi, %r13
cmpq $0x10, %r13
setb %al
movq %rdx, -0x68(%rbp)
testq %rdx, %rdx
setne %dl
orb %al, %dl
leaq -0x50(%rbp), %rax
movq %rdi, %r15
cmovneq %rax, %r15
cmpl $0x6e, %r8d
movl %r8d, -0x58(%rbp)
movb %dl, -0x51(%rbp)
movq %r9, -0x60(%rbp)
jle 0xd6cf6
cmpl $0x6f, %r8d
je 0xd6d17
cmpl $0x70, %r8d
je 0xd6d27
movq %rax, %r12
cmpl $0x75, %r8d
jne 0xd6d4b
movq %rcx, %rdi
movq %r15, %rsi
movl $0xa, %edx
jmp 0xd6d10
movq %rax, %r12
cmpl $0x64, %r8d
je 0xd6d05
cmpl $0x69, %r8d
jne 0xd6d4b
movq %rcx, %rdi
movq %r15, %rsi
movl $0xfffffff6, %edx # imm = 0xFFFFFFF6
callq 0xd58a6
jmp 0xd6d66
movq %rax, %r12
movq %rcx, %rdi
movq %r15, %rsi
movl $0x8, %edx
jmp 0xd6d47
movb $0x30, (%r15)
testb %dl, %dl
movq %rbx, %rsi
movq %rax, %r12
cmovneq %rax, %rsi
movb $0x78, 0x1(%rsi)
addq $0x2, %rsi
movq %rcx, %rdi
movl $0x10, %edx
xorl %ecx, %ecx
jmp 0xd6d61
xorl %eax, %eax
cmpb $0x58, %r8b
sete %al
movq %rcx, %rdi
movq %r15, %rsi
movl $0x10, %edx
movl %eax, %ecx
callq 0xd57d0
movq %rax, %r14
subq %r15, %r14
cmpq %r13, %r14
ja 0xd6de2
cmpq %r12, %r15
jne 0xd6ddf
movq -0x68(%rbp), %r12
cmpq %r12, %r13
cmovbq %r13, %r12
subq %r14, %r12
jbe 0xd6dd1
movq -0x60(%rbp), %rax
andl $0x4, %eax
sete %r13b
leal 0x20(,%rax,4), %esi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x292a0
cmpb $0x70, -0x58(%rbp)
setne %al
orb %r13b, %al
jne 0xd6dce
leaq 0x1(%rbx), %rax
cmpq $0x2, %r12
cmovbq %r15, %rax
movb $0x78, (%rax)
cmpb $0x0, -0x51(%rbp)
leaq -0x50(%rbp), %rax
cmoveq %rbx, %rax
movb $0x30, 0x1(%rax)
addq %r12, %rbx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x29110
addq %r14, %rbx
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0xd6e03
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29250
| process_int_arg:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r13, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
sub r13, rdi
cmp r13, 10h
setb al
mov [rbp+var_68], rdx
test rdx, rdx
setnz dl
or dl, al
lea rax, [rbp+var_50]
mov r15, rdi
cmovnz r15, rax
cmp r8d, 6Eh ; 'n'
mov [rbp+var_58], r8d
mov [rbp+var_51], dl
mov [rbp+var_60], r9
jle short loc_D6CF6
cmp r8d, 6Fh ; 'o'
jz short loc_D6D17
cmp r8d, 70h ; 'p'
jz short loc_D6D27
mov r12, rax
cmp r8d, 75h ; 'u'
jnz short loc_D6D4B
mov rdi, rcx
mov rsi, r15
mov edx, 0Ah
jmp short loc_D6D10
loc_D6CF6:
mov r12, rax
cmp r8d, 64h ; 'd'
jz short loc_D6D05
cmp r8d, 69h ; 'i'
jnz short loc_D6D4B
loc_D6D05:
mov rdi, rcx
mov rsi, r15
mov edx, 0FFFFFFF6h
loc_D6D10:
call int10_to_str
jmp short loc_D6D66
loc_D6D17:
mov r12, rax
mov rdi, rcx
mov rsi, r15
mov edx, 8
jmp short loc_D6D47
loc_D6D27:
mov byte ptr [r15], 30h ; '0'
test dl, dl
mov rsi, rbx
mov r12, rax
cmovnz rsi, rax
mov byte ptr [rsi+1], 78h ; 'x'
add rsi, 2
mov rdi, rcx
mov edx, 10h
loc_D6D47:
xor ecx, ecx
jmp short loc_D6D61
loc_D6D4B:
xor eax, eax
cmp r8b, 58h ; 'X'
setz al
mov rdi, rcx
mov rsi, r15
mov edx, 10h
mov ecx, eax
loc_D6D61:
call int2str
loc_D6D66:
mov r14, rax
sub r14, r15
cmp r14, r13
ja short loc_D6DE2
cmp r15, r12
jnz short loc_D6DDF
mov r12, [rbp+var_68]
cmp r13, r12
cmovb r12, r13
sub r12, r14
jbe short loc_D6DD1
mov rax, [rbp+var_60]
and eax, 4
setz r13b
lea esi, ds:20h[rax*4]
mov rdi, rbx
mov rdx, r12
call _memset
cmp byte ptr [rbp+var_58], 70h ; 'p'
setnz al
or al, r13b
jnz short loc_D6DCE
lea rax, [rbx+1]
cmp r12, 2
cmovb rax, r15
mov byte ptr [rax], 78h ; 'x'
cmp [rbp+var_51], 0
lea rax, [rbp+var_50]
cmovz rax, rbx
mov byte ptr [rax+1], 30h ; '0'
loc_D6DCE:
add rbx, r12
loc_D6DD1:
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call _memmove
loc_D6DDF:
add rbx, r14
loc_D6DE2:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_D6E03
mov rax, rbx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_D6E03:
call ___stack_chk_fail
| _BYTE * process_int_arg(_BYTE *a1, long long a2, unsigned long long a3, unsigned long long a4, int a5, char a6)
{
_BYTE *v6; // rbx
unsigned long long v7; // r13
bool v8; // dl
_BYTE *v9; // r15
unsigned long long v10; // rdi
_BYTE *v11; // rsi
int v12; // edx
_BYTE *v13; // rax
unsigned long long v14; // rdi
_BYTE *v15; // rsi
unsigned int v16; // edx
_BYTE *v17; // rsi
BOOL v18; // ecx
unsigned long long v19; // r14
unsigned long long v20; // r12
bool v21; // cc
unsigned long long v22; // r12
_BYTE *v23; // rax
_BYTE *v24; // rax
char v28; // [rsp+18h] [rbp-58h]
bool v29; // [rsp+1Fh] [rbp-51h]
_BYTE v30[32]; // [rsp+20h] [rbp-50h] BYREF
unsigned long long v31; // [rsp+40h] [rbp-30h]
v6 = a1;
v31 = __readfsqword(0x28u);
v7 = a2 - (_QWORD)a1;
v8 = (unsigned long long)(a2 - (_QWORD)a1) < 0x10 || a3 != 0;
v9 = a1;
if ( v8 )
v9 = v30;
v28 = a5;
v29 = v8;
if ( a5 <= 110 )
{
if ( a5 == 100 || a5 == 105 )
{
v10 = a4;
v11 = v9;
v12 = -10;
goto LABEL_11;
}
goto LABEL_17;
}
switch ( a5 )
{
case 'o':
v14 = a4;
v15 = v9;
v16 = 8;
break;
case 'p':
*v9 = 48;
v17 = a1;
if ( v8 )
v17 = v30;
v17[1] = 120;
v15 = v17 + 2;
v14 = a4;
v16 = 16;
break;
case 'u':
v10 = a4;
v11 = v9;
v12 = 10;
LABEL_11:
v13 = int10_to_str(v10, v11, v12);
goto LABEL_19;
default:
LABEL_17:
v14 = a4;
v15 = v9;
v16 = 16;
v18 = (_BYTE)a5 == 88;
goto LABEL_18;
}
v18 = 0;
LABEL_18:
v13 = int2str(v14, v15, v16, v18);
LABEL_19:
v19 = v13 - v9;
if ( v13 - v9 <= v7 )
{
if ( v9 == v30 )
{
v20 = a3;
if ( v7 < a3 )
v20 = v7;
v21 = v20 <= v19;
v22 = v20 - v19;
if ( !v21 )
{
memset(v6, 4 * (a6 & 4u) + 32, v22);
if ( (a6 & 4) != 0 && v28 == 112 )
{
v23 = v6 + 1;
if ( v22 < 2 )
v23 = v9;
*v23 = 120;
v24 = v30;
if ( !v29 )
v24 = v6;
v24[1] = 48;
}
v6 += v22;
}
memmove(v6, v9, v19);
}
v6 += v19;
}
return v6;
}
| process_int_arg:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R13,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
SUB R13,RDI
CMP R13,0x10
SETC AL
MOV qword ptr [RBP + -0x68],RDX
TEST RDX,RDX
SETNZ DL
OR DL,AL
LEA RAX,[RBP + -0x50]
MOV R15,RDI
CMOVNZ R15,RAX
CMP R8D,0x6e
MOV dword ptr [RBP + -0x58],R8D
MOV byte ptr [RBP + -0x51],DL
MOV qword ptr [RBP + -0x60],R9
JLE 0x001d6cf6
CMP R8D,0x6f
JZ 0x001d6d17
CMP R8D,0x70
JZ 0x001d6d27
MOV R12,RAX
CMP R8D,0x75
JNZ 0x001d6d4b
MOV RDI,RCX
MOV RSI,R15
MOV EDX,0xa
JMP 0x001d6d10
LAB_001d6cf6:
MOV R12,RAX
CMP R8D,0x64
JZ 0x001d6d05
CMP R8D,0x69
JNZ 0x001d6d4b
LAB_001d6d05:
MOV RDI,RCX
MOV RSI,R15
MOV EDX,0xfffffff6
LAB_001d6d10:
CALL 0x001d58a6
JMP 0x001d6d66
LAB_001d6d17:
MOV R12,RAX
MOV RDI,RCX
MOV RSI,R15
MOV EDX,0x8
JMP 0x001d6d47
LAB_001d6d27:
MOV byte ptr [R15],0x30
TEST DL,DL
MOV RSI,RBX
MOV R12,RAX
CMOVNZ RSI,RAX
MOV byte ptr [RSI + 0x1],0x78
ADD RSI,0x2
MOV RDI,RCX
MOV EDX,0x10
LAB_001d6d47:
XOR ECX,ECX
JMP 0x001d6d61
LAB_001d6d4b:
XOR EAX,EAX
CMP R8B,0x58
SETZ AL
MOV RDI,RCX
MOV RSI,R15
MOV EDX,0x10
MOV ECX,EAX
LAB_001d6d61:
CALL 0x001d57d0
LAB_001d6d66:
MOV R14,RAX
SUB R14,R15
CMP R14,R13
JA 0x001d6de2
CMP R15,R12
JNZ 0x001d6ddf
MOV R12,qword ptr [RBP + -0x68]
CMP R13,R12
CMOVC R12,R13
SUB R12,R14
JBE 0x001d6dd1
MOV RAX,qword ptr [RBP + -0x60]
AND EAX,0x4
SETZ R13B
LEA ESI,[0x20 + RAX*0x4]
MOV RDI,RBX
MOV RDX,R12
CALL 0x001292a0
CMP byte ptr [RBP + -0x58],0x70
SETNZ AL
OR AL,R13B
JNZ 0x001d6dce
LEA RAX,[RBX + 0x1]
CMP R12,0x2
CMOVC RAX,R15
MOV byte ptr [RAX],0x78
CMP byte ptr [RBP + -0x51],0x0
LEA RAX,[RBP + -0x50]
CMOVZ RAX,RBX
MOV byte ptr [RAX + 0x1],0x30
LAB_001d6dce:
ADD RBX,R12
LAB_001d6dd1:
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL 0x00129110
LAB_001d6ddf:
ADD RBX,R14
LAB_001d6de2:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001d6e03
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001d6e03:
CALL 0x00129250
|
int1 *
process_int_arg(int1 *param_1,long param_2,ulong param_3,int8 param_4,int param_5,
uint param_6)
{
long lVar1;
int1 *puVar2;
int8 uVar3;
ulong uVar4;
ulong __n;
int1 *__src;
long in_FS_OFFSET;
bool bVar5;
bool bVar6;
bool bVar7;
int1 local_58 [32];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar4 = param_2 - (long)param_1;
bVar5 = uVar4 < 0x10;
bVar6 = param_3 != 0;
__src = param_1;
if (bVar6 || bVar5) {
__src = local_58;
}
puVar2 = __src;
if (param_5 < 0x6f) {
if ((param_5 == 100) || (param_5 == 0x69)) {
uVar3 = 0xfffffff6;
LAB_001d6d10:
lVar1 = int10_to_str(param_4,__src,uVar3);
goto LAB_001d6d66;
}
LAB_001d6d4b:
bVar7 = (char)param_5 == 'X';
uVar3 = 0x10;
}
else {
if (param_5 == 0x6f) {
uVar3 = 8;
}
else {
if (param_5 != 0x70) {
if (param_5 != 0x75) goto LAB_001d6d4b;
uVar3 = 10;
goto LAB_001d6d10;
}
*__src = 0x30;
puVar2 = param_1;
if (bVar6 || bVar5) {
puVar2 = local_58;
}
puVar2[1] = 0x78;
uVar3 = 0x10;
puVar2 = puVar2 + 2;
}
bVar7 = false;
}
lVar1 = int2str(param_4,puVar2,uVar3,bVar7);
LAB_001d6d66:
__n = lVar1 - (long)__src;
if (__n <= uVar4) {
if (__src == local_58) {
if (uVar4 < param_3) {
param_3 = uVar4;
}
uVar4 = param_3 - __n;
if (__n <= param_3 && uVar4 != 0) {
memset(param_1,(param_6 & 4) * 4 + 0x20,uVar4);
if ((char)param_5 == 'p' && (param_6 & 4) != 0) {
puVar2 = param_1 + 1;
if (uVar4 < 2) {
puVar2 = __src;
}
*puVar2 = 0x78;
puVar2 = local_58;
if (!bVar6 && !bVar5) {
puVar2 = param_1;
}
puVar2[1] = 0x30;
}
param_1 = param_1 + uVar4;
}
memmove(param_1,__src,__n);
}
param_1 = param_1 + __n;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return param_1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
55,199 | my_xml_enter | eloqsql/strings/xml.c | static int my_xml_enter(MY_XML_PARSER *st, const char *str, size_t len)
{
if (my_xml_attr_ensure_space(st, len + 1 /* the separator char */))
return MY_XML_ERROR;
if (st->attr.end > st->attr.start)
{
st->attr.end[0]= '/';
st->attr.end++;
}
memcpy(st->attr.end, str, len);
st->attr.end+= len;
st->attr.end[0]= '\0';
if (st->flags & MY_XML_FLAG_RELATIVE_NAMES)
return st->enter ? st->enter(st, str, len) : MY_XML_OK;
else
return st->enter ?
st->enter(st, st->attr.start, st->attr.end - st->attr.start) : MY_XML_OK;
} | O3 | c | my_xml_enter:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x120(%rdi), %rdi
movq 0x110(%rbx), %rcx
movq 0x118(%rbx), %rax
movq %rdi, %r12
subq %rax, %r12
addq %r12, %rdx
addq $0x2, %rdx
cmpq %rcx, %rdx
jbe 0x7ab09
leaq 0x2(%r14), %rax
movq $-0x3, %rdx
subq %r14, %rdx
shrq %rdx
cmpq %rcx, %rdx
leaq (%rax,%rcx,2), %rax
movq $-0x1, %rdx
cmovaq %rax, %rdx
movq %rdx, 0x110(%rbx)
movq 0x108(%rbx), %rsi
xorl %edi, %edi
testq %rsi, %rsi
je 0x7aab7
xorl %ecx, %ecx
callq 0x453f0
movq %rax, 0x108(%rbx)
jmp 0x7aaec
movq %rdx, %rsi
xorl %edx, %edx
callq 0x452cd
movq %rax, 0x108(%rbx)
testq %rax, %rax
je 0x7ab87
leaq 0x88(%rbx), %rsi
leaq 0x1(%r12), %rdx
movq %rax, %rdi
callq 0x26290
movq 0x108(%rbx), %rax
movq %rax, 0x118(%rbx)
addq %rax, %r12
movq %r12, 0x120(%rbx)
movq %r12, %rdi
testq %rax, %rax
je 0x7ab99
cmpq %rax, %rdi
jbe 0x7ab22
movb $0x2f, (%rdi)
movq 0x120(%rbx), %rdi
incq %rdi
movq %rdi, 0x120(%rbx)
movq %r15, %rsi
movq %r14, %rdx
callq 0x26290
movq 0x120(%rbx), %rax
leaq (%rax,%r14), %rcx
movq %rcx, 0x120(%rbx)
movb $0x0, (%rax,%r14)
testb $0x1, (%rbx)
movq 0x148(%rbx), %rax
jne 0x7ab6b
testq %rax, %rax
je 0x7ab83
movq 0x118(%rbx), %rsi
movq 0x120(%rbx), %rdx
subq %rsi, %rdx
movq %rbx, %rdi
jmp 0x7ab79
testq %rax, %rax
je 0x7ab83
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmpq *%rax
xorl %eax, %eax
jmp 0x7ab9e
movq $0x0, 0x118(%rbx)
movq %r12, 0x120(%rbx)
movl $0x1, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| my_xml_enter:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov rdi, [rdi+120h]
mov rcx, [rbx+110h]
mov rax, [rbx+118h]
mov r12, rdi
sub r12, rax
add rdx, r12
add rdx, 2
cmp rdx, rcx
jbe loc_7AB09
lea rax, [r14+2]
mov rdx, 0FFFFFFFFFFFFFFFDh
sub rdx, r14
shr rdx, 1
cmp rdx, rcx
lea rax, [rax+rcx*2]
mov rdx, 0FFFFFFFFFFFFFFFFh
cmova rdx, rax
mov [rbx+110h], rdx
mov rsi, [rbx+108h]
xor edi, edi
test rsi, rsi
jz short loc_7AAB7
xor ecx, ecx
call my_realloc
mov [rbx+108h], rax
jmp short loc_7AAEC
loc_7AAB7:
mov rsi, rdx
xor edx, edx
call my_malloc
mov [rbx+108h], rax
test rax, rax
jz loc_7AB87
lea rsi, [rbx+88h]
lea rdx, [r12+1]
mov rdi, rax
call _memcpy
mov rax, [rbx+108h]
loc_7AAEC:
mov [rbx+118h], rax
add r12, rax
mov [rbx+120h], r12
mov rdi, r12
test rax, rax
jz loc_7AB99
loc_7AB09:
cmp rdi, rax
jbe short loc_7AB22
mov byte ptr [rdi], 2Fh ; '/'
mov rdi, [rbx+120h]
inc rdi
mov [rbx+120h], rdi
loc_7AB22:
mov rsi, r15
mov rdx, r14
call _memcpy
mov rax, [rbx+120h]
lea rcx, [rax+r14]
mov [rbx+120h], rcx
mov byte ptr [rax+r14], 0
test byte ptr [rbx], 1
mov rax, [rbx+148h]
jnz short loc_7AB6B
test rax, rax
jz short loc_7AB83
mov rsi, [rbx+118h]
mov rdx, [rbx+120h]
sub rdx, rsi
mov rdi, rbx
jmp short loc_7AB79
loc_7AB6B:
test rax, rax
jz short loc_7AB83
mov rdi, rbx
mov rsi, r15
mov rdx, r14
loc_7AB79:
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp rax
loc_7AB83:
xor eax, eax
jmp short loc_7AB9E
loc_7AB87:
mov qword ptr [rbx+118h], 0
mov [rbx+120h], r12
loc_7AB99:
mov eax, 1
loc_7AB9E:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long my_xml_enter(long long a1, long long a2, long long a3)
{
_BYTE *v6; // rdi
unsigned long long v7; // rcx
unsigned long long v8; // rax
_BYTE *v9; // r12
bool v10; // cc
unsigned long long v11; // rdx
long long v12; // rsi
long long v13; // rax
_BYTE *v14; // r12
_BYTE *v15; // rcx
long long ( *v16)(long long, long long, long long); // rax
long long v17; // rsi
long long v18; // rdx
long long v19; // rdi
v6 = *(_BYTE **)(a1 + 288);
v7 = *(_QWORD *)(a1 + 272);
v8 = *(_QWORD *)(a1 + 280);
v9 = &v6[-v8];
if ( (unsigned long long)&v6[a3 - v8 + 2] > v7 )
{
v10 = (unsigned long long)(-3 - a3) >> 1 <= v7;
v11 = -1LL;
if ( !v10 )
v11 = a3 + 2 + 2 * v7;
*(_QWORD *)(a1 + 272) = v11;
v12 = *(_QWORD *)(a1 + 264);
if ( v12 )
{
v8 = my_realloc(0, v12, v11, 0);
*(_QWORD *)(a1 + 264) = v8;
}
else
{
v13 = my_malloc(0, v11, 0);
*(_QWORD *)(a1 + 264) = v13;
if ( !v13 )
{
*(_QWORD *)(a1 + 280) = 0LL;
*(_QWORD *)(a1 + 288) = v9;
return 1LL;
}
memcpy(v13, a1 + 136, v9 + 1);
v8 = *(_QWORD *)(a1 + 264);
}
*(_QWORD *)(a1 + 280) = v8;
v14 = &v9[v8];
*(_QWORD *)(a1 + 288) = v14;
v6 = v14;
if ( v8 )
goto LABEL_9;
return 1LL;
}
LABEL_9:
if ( (unsigned long long)v6 > v8 )
{
*v6 = 47;
v6 = (_BYTE *)(*(_QWORD *)(a1 + 288) + 1LL);
*(_QWORD *)(a1 + 288) = v6;
}
memcpy(v6, a2, a3);
v15 = (_BYTE *)(*(_QWORD *)(a1 + 288) + a3);
*(_QWORD *)(a1 + 288) = v15;
*v15 = 0;
v16 = *(long long ( **)(long long, long long, long long))(a1 + 328);
if ( (*(_BYTE *)a1 & 1) != 0 )
{
if ( v16 )
{
v19 = a1;
v17 = a2;
v18 = a3;
return v16(v19, v17, v18);
}
}
else if ( v16 )
{
v17 = *(_QWORD *)(a1 + 280);
v18 = *(_QWORD *)(a1 + 288) - v17;
v19 = a1;
return v16(v19, v17, v18);
}
return 0LL;
}
| my_xml_enter:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x120]
MOV RCX,qword ptr [RBX + 0x110]
MOV RAX,qword ptr [RBX + 0x118]
MOV R12,RDI
SUB R12,RAX
ADD RDX,R12
ADD RDX,0x2
CMP RDX,RCX
JBE 0x0017ab09
LEA RAX,[R14 + 0x2]
MOV RDX,-0x3
SUB RDX,R14
SHR RDX,0x1
CMP RDX,RCX
LEA RAX,[RAX + RCX*0x2]
MOV RDX,-0x1
CMOVA RDX,RAX
MOV qword ptr [RBX + 0x110],RDX
MOV RSI,qword ptr [RBX + 0x108]
XOR EDI,EDI
TEST RSI,RSI
JZ 0x0017aab7
XOR ECX,ECX
CALL 0x001453f0
MOV qword ptr [RBX + 0x108],RAX
JMP 0x0017aaec
LAB_0017aab7:
MOV RSI,RDX
XOR EDX,EDX
CALL 0x001452cd
MOV qword ptr [RBX + 0x108],RAX
TEST RAX,RAX
JZ 0x0017ab87
LEA RSI,[RBX + 0x88]
LEA RDX,[R12 + 0x1]
MOV RDI,RAX
CALL 0x00126290
MOV RAX,qword ptr [RBX + 0x108]
LAB_0017aaec:
MOV qword ptr [RBX + 0x118],RAX
ADD R12,RAX
MOV qword ptr [RBX + 0x120],R12
MOV RDI,R12
TEST RAX,RAX
JZ 0x0017ab99
LAB_0017ab09:
CMP RDI,RAX
JBE 0x0017ab22
MOV byte ptr [RDI],0x2f
MOV RDI,qword ptr [RBX + 0x120]
INC RDI
MOV qword ptr [RBX + 0x120],RDI
LAB_0017ab22:
MOV RSI,R15
MOV RDX,R14
CALL 0x00126290
MOV RAX,qword ptr [RBX + 0x120]
LEA RCX,[RAX + R14*0x1]
MOV qword ptr [RBX + 0x120],RCX
MOV byte ptr [RAX + R14*0x1],0x0
TEST byte ptr [RBX],0x1
MOV RAX,qword ptr [RBX + 0x148]
JNZ 0x0017ab6b
TEST RAX,RAX
JZ 0x0017ab83
MOV RSI,qword ptr [RBX + 0x118]
MOV RDX,qword ptr [RBX + 0x120]
SUB RDX,RSI
MOV RDI,RBX
JMP 0x0017ab79
LAB_0017ab6b:
TEST RAX,RAX
JZ 0x0017ab83
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
LAB_0017ab79:
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP RAX
LAB_0017ab83:
XOR EAX,EAX
JMP 0x0017ab9e
LAB_0017ab87:
MOV qword ptr [RBX + 0x118],0x0
MOV qword ptr [RBX + 0x120],R12
LAB_0017ab99:
MOV EAX,0x1
LAB_0017ab9e:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 my_xml_enter(byte *param_1,void *param_2,size_t param_3)
{
ulong uVar1;
code *UNRECOVERED_JUMPTABLE;
int1 *puVar2;
void *__dest;
int8 uVar3;
long lVar4;
long lVar5;
int1 *__dest_00;
__dest_00 = *(int1 **)(param_1 + 0x120);
uVar1 = *(ulong *)(param_1 + 0x110);
puVar2 = *(int1 **)(param_1 + 0x118);
lVar5 = (long)__dest_00 - (long)puVar2;
if (uVar1 < param_3 + lVar5 + 2) {
lVar4 = -1;
if (uVar1 < -param_3 - 3 >> 1) {
lVar4 = param_3 + 2 + uVar1 * 2;
}
*(long *)(param_1 + 0x110) = lVar4;
if (*(long *)(param_1 + 0x108) == 0) {
__dest = (void *)my_malloc(0,lVar4,0);
*(void **)(param_1 + 0x108) = __dest;
if (__dest != (void *)0x0) {
memcpy(__dest,param_1 + 0x88,lVar5 + 1);
puVar2 = *(int1 **)(param_1 + 0x108);
goto LAB_0017aaec;
}
param_1[0x118] = 0;
param_1[0x119] = 0;
param_1[0x11a] = 0;
param_1[0x11b] = 0;
param_1[0x11c] = 0;
param_1[0x11d] = 0;
param_1[0x11e] = 0;
param_1[0x11f] = 0;
*(long *)(param_1 + 0x120) = lVar5;
}
else {
puVar2 = (int1 *)my_realloc();
*(int1 **)(param_1 + 0x108) = puVar2;
LAB_0017aaec:
*(int1 **)(param_1 + 0x118) = puVar2;
__dest_00 = puVar2 + lVar5;
*(int1 **)(param_1 + 0x120) = __dest_00;
if (puVar2 != (int1 *)0x0) goto LAB_0017ab09;
}
uVar3 = 1;
}
else {
LAB_0017ab09:
if (puVar2 < __dest_00) {
*__dest_00 = 0x2f;
__dest_00 = (int1 *)(*(long *)(param_1 + 0x120) + 1);
*(int1 **)(param_1 + 0x120) = __dest_00;
}
memcpy(__dest_00,param_2,param_3);
lVar5 = *(long *)(param_1 + 0x120);
*(size_t *)(param_1 + 0x120) = lVar5 + param_3;
*(int1 *)(lVar5 + param_3) = 0;
UNRECOVERED_JUMPTABLE = *(code **)(param_1 + 0x148);
if ((*param_1 & 1) == 0) {
if (UNRECOVERED_JUMPTABLE != (code *)0x0) {
param_2 = *(void **)(param_1 + 0x118);
param_3 = *(long *)(param_1 + 0x120) - (long)param_2;
LAB_0017ab79:
/* WARNING: Could not recover jumptable at 0x0017ab81. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar3 = (*UNRECOVERED_JUMPTABLE)(param_1,param_2,param_3);
return uVar3;
}
}
else if (UNRECOVERED_JUMPTABLE != (code *)0x0) goto LAB_0017ab79;
uVar3 = 0;
}
return uVar3;
}
|
Subsets and Splits
C++ Functions With Standard Library Dependencies
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.